const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DDtKBkCy.js","assets/vendor-react-DYNCg6N5.js","assets/index-q4s1wmSu.js","assets/vendor-mantine-h0WlM2Mj.js","assets/vendor-mantine-sAAlXJKR.css","assets/preserveCursorPosition-NFvD_VQV.js","assets/validation-Ds00Zghx.js","assets/types-B9VC9FeZ.js","assets/vendor-i18n-wisIXUFi.js","assets/types-espwwxTQ.js","assets/vendor-icons-xWhXK_Ui.js","assets/index-EN60obZ7.js","assets/RegistrationForm-CuW4XnXz.js","assets/passwordOptions-b-kjbiiT.js","assets/passwordUtils-B3CN2t6O.js","assets/useGeneratePolicy-B4rO5xUa.js","assets/index-1TpVQR3a.js","assets/options-CRIRDAK6.js","assets/index-C-CFogWu.js","assets/index-3c9En-DB.js","assets/index-CfN7Ll0p.js","assets/errorIcon-PZO0f1IY.js","assets/index.es-BTZFX8B-.js","assets/useUpdateUser-innD962A.js","assets/index-C6QQOvbB.js","assets/index-CcqTjOWY.js","assets/useDebounce-DTubzIUC.js","assets/index-C_Fw_IUU.js","assets/index-_NgMYV3i.js","assets/index-TL41xEJi.js","assets/index-B7nmdYVM.js","assets/utils-D5kCyTRM.js","assets/index-leRPH4yM.js","assets/index-D4BAIihc.js","assets/useCopyToClipboard-C-S2RacD.js","assets/useTerminateSessions-Cb3ukMTY.js","assets/index-DqcA8P_y.js","assets/styles-3NoIlzov.js","assets/index-DMTgSMwy.js","assets/index-DFEP7Sv_.js","assets/index-woYEqWvh.js","assets/index-Ds4Bnwmy.js","assets/date-bOIw2uwV.js","assets/format-CMT-x-V3.js","assets/index-DOqL4InQ.js","assets/styles-BC5VOxAU.js","assets/index-Zaude47i.js","assets/index-zpOhy7mV.js","assets/papaparse.min-Ds9XhCoe.js","assets/index-lR9_AURi.js","assets/index-C7llsr9G.js","assets/validate-Bw-sUlFj.js","assets/index-CNv4hlnY.js","assets/index-B9yUPW9X.js","assets/ru-Bush41s2.js","assets/index-CUcivY9l.js","assets/index-BvQfhnV_.js","assets/styles-C9HVNQJ0.js","assets/index-72JBTuLT.js","assets/index-db49HOnJ.css","assets/index-DnphFLKH.js","assets/index-CslanKI5.js","assets/styles-Dnu4P1Zm.js","assets/index-C2HWmCvh.js","assets/index-BWhdniX1.js","assets/index-BoQKW1g7.js","assets/index-CEv9Eejp.js","assets/validateTextInput-2E2Z5K9Z.js","assets/index-DFZKJmic.js","assets/index-DOixMRp5.js","assets/index-DppR1vQX.js","assets/index-DYQg5Zv2.js","assets/createForm-CM9BvDgp.js","assets/validate-CA6bwF22.js","assets/index-t2CI3gBu.js","assets/form-BjvLuBG-.js","assets/index-dNCk3QFy.js","assets/index--1rmaIap.js","assets/styles-BS0QIA50.js","assets/index-DUqj3r8B.js","assets/index-BIbihtfI.js","assets/serverForm-BbGb2r52.js","assets/styles-rKP3r-bS.js","assets/types-DVpDEwlm.js","assets/utiils-DzEu0_6s.js","assets/icon-forms-C3RNUl8Z.js","assets/icon-draw-BHY0kAVH.js","assets/index-CV2nvQ4Y.js","assets/index-BmZnwe2q.js","assets/index-DM5_T2JW.js","assets/index-7NP-GXLT.js","assets/InvalidLinkContent-CWLs7Xhy.js","assets/icon-mail-success-C8dZWFGQ.js","assets/index-BCxEOlV-.js","assets/icon-mail-error-BTXt9n8h.js","assets/index-CtFaoOYp.js","assets/index-BIIcHhad.js","assets/index-BxZsfbZq.js","assets/index-lG79Dd5P.js","assets/index-Do2ASPt2.css","assets/index-kE_8rhIF.css","assets/index-FLmifAIL.js","assets/index-CXUYumHQ.css","assets/index-DpSc2s9t.js","assets/index-DRm13RDQ.js","assets/index-UG854A7p.js","assets/useSaveSettings-GkZlPEM1.js","assets/index-DGrXxZ89.js","assets/index-BBtw-2vv.js","assets/index-CbTPqI7c.js","assets/index-D34j4ee8.css","assets/index-CUoIuKcD.js","assets/index-BLmUkvkI.js","assets/index-Bo08Q_Mg.js","assets/index-DwQBSy2U.js","assets/index-Rv8Lmn4U.js","assets/index-CHSpKsOm.js","assets/index-DRc8D7K-.js","assets/index-BPIuUjBu.js","assets/types-Cx44Kkix.js","assets/index-B4Fqbfm-.css","assets/index-CrwcKuxe.js","assets/index-CArnrf6K.js","assets/index-Bh2iSHyj.css","assets/index-DLeCAHzh.js","assets/index-BVQ-Y7LP.js","assets/index-DeLPTh4Q.js","assets/index-wbXPwO45.js","assets/index-DXVFB9sp.js","assets/index-d-f5nm7J.js","assets/index-CuQrAARb.js","assets/index-MU215kbw.js","assets/index-D1V9bFNj.js","assets/index-lnjoUqiy.js","assets/index-BQFpm4P_.js","assets/index-rGn03PTj.css","assets/index-CQqoUH6l.js","assets/index-Bn6PTY2_.js","assets/index-BrPxVWEo.js","assets/index-Cg5pRT9x.js","assets/index-9yT4-U2s.js","assets/index-C17ZigX9.js","assets/styles-CGXtrnyw.js","assets/index-BcFqSuPN.js","assets/useSaveCommonSettings-DdirtcwG.js","assets/index-BRmgVx8q.js","assets/index-DeA4DjbJ.js","assets/validate-DKrglko6.js","assets/index-CtVsydR1.js","assets/index-CXiJUPid.js","assets/index-BDxz8DSx.js","assets/index-8uZokwya.css","assets/index-CsGJaTP-.js","assets/index-CPnWygUh.js","assets/index-C8AOGyjn.js","assets/index-Ds6tAxUN.js","assets/index-D1z3qsw1.js","assets/notifications.page-BxPNbMCF.js","assets/notification-settings.page-DmRC7Fwx.js"])))=>i.map(i=>d[i]);
var _a;
import { E as compilerRuntimeExports, j as jsxRuntimeExports, r as reactExports, a as r, L as Link, H as useSelector$1, I as useDispatch$1, J as useLocation, K as fetchBaseQuery$1, M as createApi$1, N as createSlice$1, O as isRejectedWithValue$1, P as configureStore, Q as setupListeners, S as bindActionCreators, T as useNavigate, U as Navigate, V as Outlet, W as Route, X as BrowserRouter, Y as Routes, Z as ReactDOM, $ as Provider } from "./vendor-react-DYNCg6N5.js";
import { c as createStyles, G as Group, B as Button, I as Image, T as Text, F as Flex, S as Stack, C as Container, a as colorsTuple, L as List, A as Avatar, b as Box, u as useHover, d as Checkbox, H as HoverCard, e as useMantineColorScheme, f as CheckIcon, g as Loader, P as Paper, h as ActionIcon, M as Menu, i as Indicator, j as Tabs, k as Tooltip, l as ScrollArea, m as Center, r as rem, n as useDisclosure, o as Burger, p as Transition, s as showNotification, q as Popover, t as ModalsProvider, v as Global, N as Notifications, D as DirectionProvider, w as MantineProvider, x as emotionTransform, y as MantineEmotionProvider } from "./vendor-mantine-h0WlM2Mj.js";
import { u as useTranslation, t, T as Trans, i as instance$1, a as initReactI18next } from "./vendor-i18n-wisIXUFi.js";
import { g as g5, I as IconLayersLinked, x as xN, G as GT, q as qC, L as LHe, R as RQe, a as Gie } from "./vendor-icons-xWhXK_Ui.js";
(function polyfill() {
  const relList = document.createElement("link").relList;
  if (relList && relList.supports && relList.supports("modulepreload")) {
    return;
  }
  for (const link2 of document.querySelectorAll('link[rel="modulepreload"]')) {
    processPreload(link2);
  }
  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(link2) {
    const fetchOpts = {};
    if (link2.integrity) fetchOpts.integrity = link2.integrity;
    if (link2.referrerPolicy) fetchOpts.referrerPolicy = link2.referrerPolicy;
    if (link2.crossOrigin === "use-credentials") fetchOpts.credentials = "include";
    else if (link2.crossOrigin === "anonymous") fetchOpts.credentials = "omit";
    else fetchOpts.credentials = "same-origin";
    return fetchOpts;
  }
  function processPreload(link2) {
    if (link2.ep) return;
    link2.ep = true;
    const fetchOpts = getFetchOpts(link2);
    fetch(link2.href, fetchOpts);
  }
})();
const scriptRel = "modulepreload";
const assetsURL = function(dep) {
  return "/" + dep;
};
const seen = {};
const __vitePreload = function preload(baseModule, deps, importerUrl) {
  let promise = Promise.resolve();
  if (deps && deps.length > 0) {
    document.getElementsByTagName("link");
    const cspNonceMeta = document.querySelector("meta[property=csp-nonce]");
    const cspNonce = (cspNonceMeta == null ? void 0 : cspNonceMeta.nonce) || (cspNonceMeta == null ? void 0 : cspNonceMeta.getAttribute("nonce"));
    promise = Promise.allSettled(deps.map((dep) => {
      dep = assetsURL(dep);
      if (dep in seen) return;
      seen[dep] = true;
      const isCss = dep.endsWith(".css");
      const cssSelector = isCss ? '[rel="stylesheet"]' : "";
      if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) {
        return;
      }
      const link2 = document.createElement("link");
      link2.rel = isCss ? "stylesheet" : scriptRel;
      if (!isCss) {
        link2.as = "script";
      }
      link2.crossOrigin = "";
      link2.href = dep;
      if (cspNonce) {
        link2.setAttribute("nonce", cspNonce);
      }
      document.head.appendChild(link2);
      if (isCss) {
        return new Promise((res, rej) => {
          link2.addEventListener("load", res);
          link2.addEventListener("error", () => rej(new Error(`Unable to preload CSS for ${dep}`)));
        });
      }
    }));
  }
  function handlePreloadError(err) {
    const e = new Event("vite:preloadError", {
      cancelable: true
    });
    e.payload = err;
    window.dispatchEvent(e);
    if (!e.defaultPrevented) {
      throw err;
    }
  }
  return promise.then((res) => {
    for (const item of res || []) {
      if (item.status !== "rejected") continue;
      handlePreloadError(item.reason);
    }
    return baseModule().catch(handlePreloadError);
  });
};
const useStyles$9 = createStyles((theme2) => ({
  errorContainer: {
    backgroundColor: "rgba(255, 255, 255)",
    color: "white",
    textAlign: "center",
    width: "100%",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    height: "100vh"
  },
  errorInfo: {
    display: "flex",
    justifyContent: "center",
    alignItems: "flex-start",
    flexDirection: "column",
    height: "100%",
    color: theme2.colors.dark[9]
  },
  button: {
    marginTop: theme2.spacing.md
  },
  textError: {
    color: theme2.colors.red[6]
  }
}));
const defaultIcon$1 = "/assets/500-CayWt4dn.svg";
const useStyles$8 = createStyles(() => ({
  root: {
    paddingTop: "24px",
    paddingBottom: "24px",
    minHeight: "100dvh",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    width: "100%",
    wordBreak: "keep-all",
    maxWidth: "410px"
  }
}));
const useStyles$7 = createStyles(() => ({
  redirectButton: {
    marginTop: "26px",
    borderRadius: "4px",
    "& .mantine-Button-label": {
      fontSize: "14px",
      fontWeight: 500
    }
  }
}));
const NoDataContainer = (t0) => {
  const $ = compilerRuntimeExports.c(17);
  const {
    title: title2,
    description,
    buttons,
    illustration
  } = t0;
  const {
    classes: classes2
  } = useStyles$7();
  let t1;
  if ($[0] !== illustration || $[1] !== title2) {
    t1 = illustration && title2 && /* @__PURE__ */ jsxRuntimeExports.jsx(Image, { src: illustration, alt: title2, style: {
      height: 240,
      width: 270,
      objectFit: "contain"
    } });
    $[0] = illustration;
    $[1] = title2;
    $[2] = t1;
  } else {
    t1 = $[2];
  }
  let t2;
  if ($[3] !== title2) {
    t2 = title2 && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { fz: "26", ta: "center", fw: "500", mb: "4px", children: title2 });
    $[3] = title2;
    $[4] = t2;
  } else {
    t2 = $[4];
  }
  let t3;
  if ($[5] !== description) {
    t3 = description && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { fz: "16", ta: "center", c: "#868E96", sx: {
      lineHeight: "23px"
    }, children: description });
    $[5] = description;
    $[6] = t3;
  } else {
    t3 = $[6];
  }
  let t4;
  if ($[7] !== buttons || $[8] !== classes2) {
    t4 = (buttons == null ? void 0 : buttons.length) ? /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { gap: "xs", justify: "center", children: buttons.map((button, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: button.handleClick, className: classes2.redirectButton, children: button.buttonText }, index)) }) : null;
    $[7] = buttons;
    $[8] = classes2;
    $[9] = t4;
  } else {
    t4 = $[9];
  }
  let t5;
  if ($[10] !== t2 || $[11] !== t3 || $[12] !== t4) {
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", justify: "center", direction: "column", maw: 360, children: [
      t2,
      t3,
      t4
    ] });
    $[10] = t2;
    $[11] = t3;
    $[12] = t4;
    $[13] = t5;
  } else {
    t5 = $[13];
  }
  let t6;
  if ($[14] !== t1 || $[15] !== t5) {
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { gap: "0", justify: "center", flex: 1, align: "center", children: [
      t1,
      t5
    ] });
    $[14] = t1;
    $[15] = t5;
    $[16] = t6;
  } else {
    t6 = $[16];
  }
  return t6;
};
const ErrorBoundaryPage = () => {
  const $ = compilerRuntimeExports.c(15);
  const {
    t: t2
  } = useTranslation();
  const {
    classes: classes2
  } = useStyles$8();
  const t0 = classes2.root;
  let t1;
  if ($[0] !== t2) {
    t1 = t2("notFound.somethingWrong");
    $[0] = t2;
    $[1] = t1;
  } else {
    t1 = $[1];
  }
  let t22;
  if ($[2] !== t2) {
    t22 = t2("notFound.tryAgain");
    $[2] = t2;
    $[3] = t22;
  } else {
    t22 = $[3];
  }
  let t3;
  if ($[4] !== t2) {
    t3 = t2("notFound.reload");
    $[4] = t2;
    $[5] = t3;
  } else {
    t3 = $[5];
  }
  let t4;
  if ($[6] !== t3) {
    t4 = [{
      buttonText: t3,
      handleClick: _temp$c
    }];
    $[6] = t3;
    $[7] = t4;
  } else {
    t4 = $[7];
  }
  let t5;
  if ($[8] !== t1 || $[9] !== t22 || $[10] !== t4) {
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsx(NoDataContainer, { title: t1, description: t22, illustration: defaultIcon$1, buttons: t4 });
    $[8] = t1;
    $[9] = t22;
    $[10] = t4;
    $[11] = t5;
  } else {
    t5 = $[11];
  }
  let t6;
  if ($[12] !== classes2.root || $[13] !== t5) {
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { className: t0, children: t5 });
    $[12] = classes2.root;
    $[13] = t5;
    $[14] = t6;
  } else {
    t6 = $[14];
  }
  return t6;
};
function _temp$c() {
  return window.location.reload();
}
const documentTitle$1 = "Р7-Управление";
const managementLogoAlt$1 = "Логотип Р7-Управление";
const officeLogoAlt$1 = "Логотип Р7-Офис";
const spaceLogoAlt$1 = "Логотип Р7-Пространство";
const showMore$1 = "Еще...";
const hide$1 = "...Скрыть";
const title$1 = "Заголовок";
const deleted$1 = "Удалено";
const add$1 = " Добавить";
const cancel$1 = "Отмена";
const close$1 = "Закрыть";
const enable$1 = "Включить";
const disable$1 = "Отключить";
const send$1 = "Отправить";
const verify$1 = "Проверить";
const create$1 = "Создать";
const warning$1 = "Предупреждение";
const ok$1 = "Ok";
const type$1 = "Тип";
const name$1 = "Имя";
const priority$1 = "Приоритет";
const loadingError$1 = "Не удалось загрузить данные";
const reload$1 = "Перезагрузить";
const save$1 = "Сохранить";
const saved$1 = "Сохранено";
const success$1 = "Успешно";
const noData$1 = "Нет данных";
const dataError$1 = "Ошибка при загрузке данных";
const home$1 = "Главная";
const review$1 = "Обзор";
const profil$1 = "Профиль";
const exit$1 = "Выйти";
const reportError$1 = "Сообщить об ошибке";
const tarif$1 = "Подписка";
const download$1 = "Скачать";
const team$1 = "Команда";
const link$1 = "Ссылка";
const zoomIn$1 = "Приблизить";
const zoomOut$1 = "Уменьшить";
const reset$1 = "Сбросить";
const panning$1 = "Панорамирование";
const selection$1 = "Выбор";
const select$1 = "Выбрать";
const menu$1 = "Меню";
const backMain$1 = "Вернуться на главную";
const choose$1 = "Выберите...";
const sync$1 = "Синхронизировать";
const hello$1 = "Здравствуйте";
const goToProfile$1 = "Управление аккаунтом";
const goHome$1 = "Вернутся на главную";
const userNotFound$1 = "Пользователь не найден";
const search$1 = "Поиск";
const common$1 = "Общие";
const noInformation$1 = "Нет информации";
const male$1 = "Мужской";
const female$1 = "Женский";
const modules$1 = "Модули";
const successfulAuthorization$1 = "Успешная авторизация";
const failedLoginAttempt$1 = "Неудачная попытка входа";
const signOut$1 = "Выход из системы";
const noAction$1 = "Нет действия";
const settings$1 = "Настройки";
const copied$1 = "Скопировано";
const refresh$1 = " Обновить";
const change$1 = " Изменить";
const copy$1 = "Скопировать";
const navigation$1 = {
  users: "Пользователи",
  roles: "Группы",
  units: "Организации",
  statistics: "Статистика",
  commonSettings: "Общие настройки",
  activations: "Активации",
  manageSubscription: "Управление подпиской"
};
const validation$1 = {
  ipAddress: "Введите валидный IP-адрес",
  ipAddressRange: "Введите диапазон IP-адресов в формате #.#.#.#-#.#.#.#",
  required: "Поле обязательно для заполнения",
  emptyEmail: "Email не должен содержать пробелы",
  emptyInput: "Значение не может быть пробелом",
  passwordStartsWithSpace: "Пароль не может начинаться с пробела",
  selectUserStatus: "Выберите статус пользователя",
  statusRequired: "Статус является обязательным",
  selectDepartment: "Выберите организацию",
  selectTimeZone: "Выберите часовой пояс",
  selectLanguage: "Выберите язык",
  divisionRequired: "Организация является обязательным",
  enterPosition: "Введите должность",
  selectQuota: "Выберите квоту",
  quotaMandatory: "Квота является обязательной",
  enterLogin: "Введите Логин",
  enterLoginOrEmail: "Введите Логин или email",
  loginWithoutSpaces: "Логин не должен содержать пробелы",
  loginInvalidChars: "Логин может содержать только латинские буквы, цифры и символы . _ @ -",
  nameInvalidChars: "Поле может содержать только буквы, пробел, дефис и апостроф",
  passwordHasForbiddenSymbols: "Пароль содержит недопустимые символы. Допустимы только: латинские буквы, цифры и символы {{symbols}}",
  emailsShouldNotBeTheSame: "Электронные почты не должны совпадать.",
  enterLastName: "Введите фамилию",
  enterName: "Введите имя",
  enterFirstName: "Введите имя",
  indicateBirthday: "Укажите дату рождения",
  enteredDateSmall: "Введенная дата является слишком маленькой",
  dateLessCurrent: "Дата должна быть меньше текущей",
  extensionPhoneContainNumbers: "Дополнительный телефон должен содержать только цифры",
  enterRolesName: "Введите имя группы",
  enterLinkName: "Введите название ссылки",
  invalidUrl: "Введите корректный URL",
  invalidUrlOrUrn: "Введите корректный URL или URN",
  invalidUuid: "Введите корректный UUID",
  maxLength: "Максимальная длина {{max}} символов",
  certificatePasswordRequired: "Пароль сертификата обязателен",
  duplicateValues: "Поля не должны содержать одинаковые значения",
  maxLengthSymbols: "Максимальная длина {{count}} символа",
  wrongMobilePhoneFormat: "Неверный формат номера телефона. Должен состоять из 10 цифр",
  wrongEmailFormat: 'Неверный email. Должен быть в формате "example@email.com"',
  passwordShouldNotContainSpaces: "Пароль не должен содержать пробелы",
  chooseGender: "Выберите пол",
  enterEmail: "Введите email",
  maxLengthSymbolsWithCount: {
    symbols_zero: "Максимальная длина {{count}} символов",
    symbols_one: "Максимальная длина {{count}} символ",
    symbols_few: "Максимальная длина {{count}} символа",
    symbols_many: "Максимальная длина {{count}} символов",
    symbols_other: "Максимальная длина {{count}} символов"
  },
  minLengthSymbolsWithCount: {
    symbols_zero: "Минимальная длина {{count}} символов",
    symbols_one: "Минимальная длина {{count}} символ",
    symbols_few: "Минимальная длина {{count}} символа",
    symbols_many: "Минимальная длина {{count}} символов",
    symbols_other: "Минимальная длина {{count}} символов"
  },
  brandColorHEXFormat: "Введите брендовый цвет в HEX формате",
  typeCompanyName: "Введите название компании",
  chooseLogo: "Выберите логотип",
  enterImageUrl: "Введите url изображения",
  enterUpdateUrl: "Введите ссылку на обновление",
  enterTitle: "Введите заголовок",
  enterTextMessage: "Введите текс оповещения",
  enterUpdateDate: "Выберите дату обновления",
  enterReleaseDate: "Выберите дату релиза",
  enterVersion: "Введите версию",
  enterUpdateId: "Введите id обновления",
  enterFilialName: "Введите название организации"
};
const filters$1 = {
  roleFilter: "Группа",
  userStatusFilter: "Статус",
  filialFilter: "Организация",
  positionFilter: "Должность",
  supervisorFilter: "Руководитель",
  roleTypeFilter: "Роль",
  userTypeFilter: "Авторизация",
  genderFilter: "Пол",
  emailStatusFilter: "Email",
  addressFilter: "Местоположение",
  birthDateFilter: "Дата рождения",
  dateOfCreateFilter: "Дата создания",
  lastVisitDateFilter: "Последний вход",
  quotaFilter: "Политика квот",
  usingQuotaSizeFilter: "Занято места, Мб",
  userFilter: "Пользователь",
  authActionTypeFilter: "Событие",
  title: "Заголовок",
  from: "от",
  to: "до"
};
const addDomain$1 = {
  title: "Добавление домена",
  action: "Добавить свой домен",
  text1: "Прежде чем вы сможете начать создавать корпоративные email адреса, вам надо добавить TXT-запись в панели управления вашего домена, чтобы подтвердить владение доменом.",
  text2: "Откройте панель управления вашего домена в другой вкладке браузера и скопируйте текст, выделенный жирным шрифтом, в соответствующие поля или выберите наиболее подходящие из доступных полей:",
  text3: "Запись для подтверждения владения доменом",
  hint1: "В некоторых случаях служба управления DNS не позволяет использовать символ '@' в качестве имени домена или поддомена. Используйте имя вашего домена с точкой '.' в конце, например: 'adf.ru.'",
  hint2: "Пожалуйста, обратите внимание: обновление записи DNS может занять от нескольких минут до нескольких часов. Подождите некоторое время, если вы изменили запись недавно.",
  inputLabel: "Введите в поле ниже доменное имя вашей компании:",
  success: "Домен успешно добавлен",
  errors: {
    exists: "Этот домен уже добавлен.",
    nonExists: "Выбранный домен нe существует. Проверьте правильность ввода.",
    error: "Oшибка. Попробуйте повторить позже.",
    nonExistsRecord: "Нет записи для подтверждения владения доменом.",
    invalidName: "Недопустимое имя домена.",
    notCreated: "Ошибка создания доменa"
  }
};
const servers$1 = {
  turnOnConnection: "Включить интеграцию с почтовым сервером",
  api: {
    Host: "Хост",
    Password: "Пароль",
    Login: "Логин",
    HasLdapAuth: "На почтовом сервере подключена LDAP авторизация",
    connect: {
      title: "API",
      success: "Соединение успешно",
      failed: "Соединения не произошло",
      button: "Проверить соединение"
    },
    oauth20: {
      enable: "Настроить OAuth 2.0",
      title: "Oauth2.0",
      urlAuth20: "Ссылка",
      redirectUrl: "Valid Redirect URIs (Через запятую)",
      clientId: "Client ID",
      secretId: "Secret ID"
    }
  },
  server: "Сервер",
  title: "Почтовые серверы",
  configMail: "Настройка почтовых серверов",
  warning: "Вы уверены что хотите удалить почтовый сервер",
  create: "Добавить почтовый сервер",
  edit: "Редактирование почтового сервера",
  add: "Добавление почтового сервера",
  name: "Название",
  nameLabel: "Наименование сервера",
  domains: "Домены",
  domainsLabel: "Допустимые домены через запятую",
  popServer: "POP сервер",
  port: "Порт",
  connection: "Выберите соединение",
  connectionType: "Тип соединения",
  imapServer: "IMAP сервер",
  sshIntegration: "Интеграция с почтовым сервером по SSH",
  key: "Ключ",
  smtpServer: "SMTP сервер",
  createError: "Ошибка создания сервера",
  createSuccess: "Сервер успешно добавлен!",
  addKey: "Введите ключ",
  addSshServer: "Введите SSH сервер",
  addLogin: "Введите логин",
  addHost: "Введите хост",
  addPassword: "Введите пароль",
  changeKey: "Изменить ключ",
  authType: "Тип входа",
  goToServer: "Перейти к серверу",
  goToServerLinkNotGenerated: "Ссылка ещё не была сгенерирована",
  editServer: "Редактировать",
  integration: "Интеграция",
  emptyData: "Почтовые серверы не найдены"
};
const domains$1 = {
  domain: "Домен",
  title: "Настройка доменов",
  "delete": "Удалить домен",
  deleteWarning: "Если вы удалите свой домен, все почтовые ящики и группы с этим доменом также будут удалены",
  confirmDelete: " Вы хотите удалить",
  settings: "Настройки домена",
  settingsError: "Пожалуйста, перейдите в панель настроек своего домена и добавьте недостающие записи:",
  mxRecord: " Запись MX(Mail Exchange)",
  spfRecord: "Запись SPF(Sender Policy Framework)",
  dkimRecord: "Запись DKIM(DomainKeys Identified Mail)",
  textMeaning: "Текст/Значение",
  deleteSuccess: "Домен успешно удален.",
  deleteError: "Ошибка удаления доменa"
};
const avatar$1 = {
  conditions: "Максимальный размер 5 мб. Поддерживаемые форматы: png, jpg, jpeg, bmp",
  changePhoto: "Выбрать другое фото",
  warning: "Выберите файл меньше 5 Мб",
  wrongFormat: "Выберите файл с поддерживаемым форматом изображения: png, jpg, jpeg, или bmp",
  hint: "Перетащите, чтобы изменить положение",
  choosePhoto: "Выберите фото",
  changeAvatar: "Изменить фото профиля",
  uploadPhoto: "Загрузить фото",
  confirmDelete: "Вы уверены, что хотите удалить фотографию?",
  error: "Произошла ошибка, перезагрузите страницу или повторите попытку"
};
const passwordMinError$1 = "Пароль должен быть не короче 8 символов";
const passwordRegError$1 = "Пароль должен содержать хотя бы одну букву и одну цифру.";
const emailFormatError$1 = "Введите валидный email в формате:  example@mail.com";
const emailMinError$1 = "Введите email";
const domainMinError$1 = "Выберите домен";
const noDomainsForMailServer$1 = "У выбранного почтового сервера нет доменов";
const noDomain$1 = "Нет домена";
const incorrectOldEmailPassword$1 = "Введенный старый пароль недействителен";
const admin$1 = "Админ";
const selectGroup$1 = {
  searchRole: "Поиск по группам"
};
const dateOfCreation$1 = "Дата создания";
const unit$1 = "Организация";
const owner$1 = "Владелец";
const participants$1 = "Участники";
const searchRolesByName$1 = "Поиск групп по названию";
const roles$1 = {
  create: "Создать новую группу",
  roleType: "Роль",
  parentalRole: "Родительская группа",
  roleLeader: "Руководитель группы",
  leader: "Руководитель",
  childRoles: "Дочерние группы",
  mailboxes: "Почтовые ящики",
  noSelectedUsers: "Вы не выбрали пользователей!",
  edit: "Редактирование группы",
  addFilial: "Добавить организацию",
  whoCanShareAccess: "Кто может назначать доступ",
  addAllowedRoles: "Добавить группу",
  name: "Название группы",
  addParentRole: "Добавить родительскую группу",
  addRoleManager: "Добавить руководителя группы",
  roleAdded: "Группа успешно добавлена!",
  roleCreatedSuccess: "Группа {{name}}, успешно создана!",
  roleCreateError: "Ошибка создания группы",
  enterName: "Придумайте название",
  createButton: "Создать",
  back: "Назад",
  addUsers: "Добавить пользователей",
  successEdit: "Группа успешно изменена!",
  chooseRole: "Выберите группу",
  list: "Список групп",
  roleNotFound: "Группа не найдена",
  types: {
    admin: "Админ",
    user: "Пользователь",
    superAdmin: "Супер-админ",
    guest: "Гость",
    all: "Все",
    support: "Поддержка"
  },
  deleteSuccess: "Группа успешно удалена!",
  addSuccess: "Группы успешно добавлены",
  deleteWarningText: "Вы уверены что хотите удалить группу? Пользователи с данными группы могут потерять доступ к данным, к которым были предоставлены права.",
  found: "Групп найдено",
  reset: "Сбросить"
};
const passwordReset$1 = {
  newPassword: "Новый пароль",
  confirmNewPassword: "Подтвердите новый пароль",
  enterNewPassword: "Введите новый пароль",
  enterNewPasswordAgain: "Введите новый пароль еще раз",
  linkIsInvalid: "Ссылка недействительна",
  passwordChangedSuccessfully: " Пароль успешно изменен",
  passwordRecovery: "Восстановление пароля",
  passwordsDoNotMatch: "Введенные пароли не совпадают",
  passwordPolicyString: "Пароль должен содержать {{policy}}.",
  passwordPolicy: {
    minMaxLength: "Пароль должен быть от {{MinLength}} до {{MaxLength}} символов",
    useCapitalLetters: "Пароль должен содержать хотя бы одну заглавную букву",
    useLowLetter: "Пароль должен содержать хотя бы одну строчную букву",
    digital: "Пароль должен содержать хотя бы одну цифру",
    passwordLatinOnly: "Пароль должен содержать только латинские символы",
    specialCharacters: "Добавьте хотя бы один специальный символ",
    passwordShouldNotContainSpaces: "Пароль не должен содержать пробелы",
    useSpecialCharacters: "Добавьте хотя бы один специальный символ",
    allowedSpecialCharacters: "Допустимые специальные символы: {{characters}}, удалите {{symbols}}",
    forbiddenSpecialCharacters: "Пароль содержит запрещённые символы{{symbols}}",
    noRequirements: "Пароль должен содержать от {{MinLength}} до {{MaxLength}} символов"
  },
  reliability: {
    unreliable: "ненадежный",
    quite_reliable: "вполне надежный",
    reliable: "надежный"
  },
  passwordStrength: "Надежность пароля",
  create: " Создать пароль",
  createRules: "Можно использовать только буквы латинского алфавита (a—z и A—Z), цифры (0—9) и такие специальные символы, как !@#$%^&;*.()."
};
const requestResetPassword$1 = {
  title: "Восстановление пароля",
  text: "Введите email, указанный при регистрации, и мы отправим необходимые инструкции.",
  withAdditionalEmailText: "Введите ваш email, указанный при регистрации, и резервный email, куда мы отправим необходимые инструкции.",
  corporateText: "За инструкциями по восстановлению пароля, обратитесь к системному администраторы вашей организации.",
  email: "Email",
  additionalEmail: "Резервный email",
  haveNoAccessToEmail: "Нет доступа к email",
  emailHaveToBeUnique: "Email-ы должны отличаться",
  successText: "Инструкции успешно отправлены на указанный email.\nПроверьте почту и следуйте полученным рекомендациям.",
  errorText: "Произошла ошибка",
  backMain: "Вернуться на главную",
  tryAgain: "Повторить попытку",
  incorrectEmail: 'Неверный email. Должен быть в формате "example@email.com"',
  ready: "Готово",
  generateStrongPassword: "Сгенерировать надежный пароль"
};
const login$1 = {
  enter: "Войти",
  login: "Еmаil",
  loginBox: "Логин или email",
  register: "Зарегистрироваться",
  password: "Пароль",
  additionally: "Дополнительно",
  customerCode: "Код организации",
  forgotPassword: "Забыли пароль?",
  enterESIA: "Войти через ЕСИА",
  enterGASU: "Войти через ГАСУ",
  enterSSO: "Войти через ССО",
  enterKerberos: "Войти через Керберос",
  errors: {
    somethingWentWrong: "При попытке входа что-то пошло не так, повторите попытку",
    emptyPassword: "Пароль не может быть пустым",
    loginError: "Ошибка авторизации",
    incorrectNamePassword: "Неверное имя пользователя или пароль",
    limit: "Исчерпан лимит попыток",
    notFound: "Ресурс не найден",
    internalError: "Внутренняя ошибка сервера",
    tryLater: "Пожалуйста, повторите попытку позже.",
    blockedAccount: "Учетная запись заблокирована",
    wrongPassword: "Неверный пароль",
    toManyRequests: "Исчерпан лимит попыток. Ваш аккаунт заблокирован. Обратитесь к администратору."
  }
};
const register$1 = {
  title: "Регистрация",
  text: "После регистрации автоматически будет активирован пробный 30-дневный период",
  register: "Зарегистрироваться",
  enter: "Войти",
  makeNewPassword: "Придумайте надежный пароль:",
  "continue": "Продолжить",
  back: "Назад",
  useExistingEmail: "Использовать существующий адрес электронной почты",
  createNewEmail: "Содать новую электронную почту",
  firstName: "Имя",
  surname: "Фамилия",
  company: "Назовите ваше Пространство",
  email: "Email",
  phone: "Телефон",
  password: "Пароль",
  confirmPassword: "Повторите пароль",
  requiredField: "Обязательное поле",
  nameShort: "Имя слишком короткое",
  surnameShort: "Фамилия слишком короткое",
  companyShort: "Название слишком короткое",
  passwordShort: "Пароль слишком короткое",
  passwordAllowedStart: "Можно использовать только:",
  passwordLong: "Пароль должен содержать от {{MinLength}} до {{MaxLength}} символов",
  passwordLongShort: "от {{MinLength}}–{{MaxLength}} символов",
  passwordLetters: "Пароль должен содержать строчные буквы",
  passwordLettersShort: "строчные буквы",
  passwordNumbers: "Пароль должен содержать цифры",
  passwordNumbersShort: "цифры",
  passwordUppercase: "Пароль должен содержать заглавные буквы",
  passwordUppercaseShort: "заглавные буквы",
  passwordSpecialChars: "Пароль должен содержать специальные символы",
  passwordSpecialCharsShort: "спец. символы",
  passwordLatinOnly: "Пароль может содержать только латинские символы",
  passwordLatinOnlyShort: "латиница",
  allowedSpecialChars: "Разрешённые специальные символы: {{characters}}",
  allowedSpecialCharsShort: "{{characters}}",
  noWhitespace: "Пароль не должен содержать пробелы",
  noWhitespaceShort: "без пробелов",
  forbiddenSpecialChars: "Запрещённые специальные символы: {{characters}}",
  forbiddenSpecialCharsShort: "без {{characters}}",
  wrongPassword: "Пароль должен содержать от 8 до 30 символов, включать заглавные буквы, разрешенные специальные символы ~ @ # % ^ * _ + = - ? : { } [ ] \\ / и только символы латиницы. Кириллица не допускается.",
  incorrectEmail: "Некорректный адрес",
  emailFirstChar: "Первый символ должен быть буквой (a—z и A—Z) или цифрой (0-9)",
  emailLastChar: "Последний символ должен быть буквой (a—z и A—Z) или цифрой (0-9)",
  emailRules: "Имя должнo содержать от 6 до 30 символов и можно использовать только буквы латинского алфавита (a—z и A—Z), цифры (0—9) и такие специальные символы, как . _ -",
  emailExists: "Такой email уже занят, попробуйте другой",
  emailCheckError: "Ошибка при проверке email",
  differencePassword: "Введенные пароли не совпадают",
  agreementsConfirmedInfo: "Необходимо согласие на получение информационных писем",
  agreementsConfirmedRule: "Подтверждение обязательно",
  userExists: "Такой пользователь уже зарегистрирован",
  invalidPassword: "Пароль невалидный",
  cantRegister: "Регистрация временно недоступна. Попробуйте позже или обратитесь в Службу поддержки.",
  successRegister: "Регистрация прошла успешно!",
  registerError: "Ошибка регистрации",
  subscribeAccept: "Согласен на получение информационных писем",
  serviceRules: "Условиями использования сервиса",
  privacyPolicy: "Политикой конфиденциальности",
  accept: "Согласен с",
  and: "и",
  hasAccount: "Уже есть аккаунт",
  hasNotAccount: "Ещё нет аккаунта?",
  createEmail: "Создайте новую электронную почту:",
  addExistEmail: "Введите существующий email:"
};
const profile$1 = {
  save: "Сохранить",
  saved: "Сохранено",
  cancel: "Отмена",
  personalData: "Личные данные",
  company: "Компания",
  safety: "Безопасность",
  emailAccount: "Почтовые аккаунты",
  credentials: "Учетные данные",
  generalInformation: "Общая информация",
  login: "Логин",
  loginExist: "логин",
  email: "Еmаil",
  emailServer: "Почтовый сервер",
  selectEmailServer: "Выберите почтовый сервер",
  selectServer: "Выберите почтовый сервер",
  domain: "Домен",
  emailDomain: "Почтовый домен",
  selectDomain: "Выберите домен",
  backupEmail: "Резервный еmаil",
  backupEmailDescription: "Для восстановления доступа к аккаунту",
  createUser: "Создание пользователя",
  statusDescription: "Определяет возможность входа в систему",
  surName: "Фамилия",
  firstName: "Имя",
  middleName: "Отчество",
  gender: "Пол",
  address: "Адрес (город, улица, дом)",
  addAddress: "Введите адрес...",
  choose: "Выберите...",
  birthDate: "Дата рождения",
  chooseBirthDate: "Выберите дату рождения",
  phone: "Телефон",
  additionalPhone: "Дополнительный телефон",
  dateOfCreateProfile: "Дата создания профиля",
  lastEntryDate: "Дата последнего входа",
  unit: "Организация",
  position: "Должность",
  add: "Добавить",
  addPosition: "Добавить Должность",
  noPosition: "Должность не определена",
  addManager: "Добавить руководителя",
  roles: "Группы",
  role: "Группа",
  mobile: "Мобильный телефон",
  homePhone: "Домашний телефон",
  addRole: "Добавить группу",
  oldPassword: "Старый пароль",
  newPassword: "Новый пароль",
  passwordChange: "Поменять пароль",
  passwordChangeTitle: "Смена пароля учетной записи",
  addOldPassword: "Введите старый пароль",
  passwordChangeWarning: "Придумайте новый пароль для электронной почты. Обратите внимание на то, что пароль от портала изменяется в другом месте.",
  password: "Пароль",
  passwordRecoveryLink: "Ссылка на восстановление пароля",
  passwordRequiring: "Должен содержать не менее 8 символов и цифр",
  noActiveLink: "нет активной ссылки",
  resetPassword: "Сбросить пароль",
  passwordReset: "Сброс пароля",
  reset: "Сбросить",
  resetPasswordAndGenerateLink: "Сбросить пароль и сгенерировать ссылку на восстановление пароля",
  resetPasswordSuccess: "Пароль успешно сброшен",
  localAuthorization: "Авторизация локальная",
  mailModuleAccount: "Настройка модуля «Почта»",
  createMailAccountRequiring: " Чтобы создать новую учетную запись почты, настройте интеграцию хотя бы с одним почтовым сервером по SSH.",
  account: "Учетная запись",
  mailServers: "Почтовые сервера",
  accounts: "Учетные записи",
  createAccount: "Создание нового email",
  activeConnections: "Активные подключения",
  allConnectionsTerminatedSuccess: "Активные подключения успешно прерваны!",
  oneConnectionTerminatedSuccess: "Активное подключение успешно прервано!",
  cantDisconnectCurrentConnection: "Нельзя отключить текущие подключение",
  terminateAllConnections: "Прервать все подключения",
  terminateMyConnections: "Прервать все подключения, кроме текущего",
  noActiveConnections: "Активных подключений нет",
  noInformation: "Нет информации",
  changePassword: "Сменить пароль",
  removeMail: "Удалить почту",
  renameMail: "Переименовать почту",
  renameEmailTitle: "Переименовать почту?",
  renameEmailLabel: "Название",
  renameEmailPlaceholder: "Введите название",
  renameEmailSuccess: "Почта успешно переименована",
  canonicalNames: "Канонические имена",
  canonicalNamesTitle: "Канонические имена",
  canonicalNameField: "Имя",
  canonicalDomainField: "Домен",
  addCanonicalName: "Добавить",
  canonicalNameAdded: "Каноническое имя добавлено",
  canonicalNameDeleted: "Каноническое имя удалено",
  linkAccount: "Добавить email",
  createNewAccount: "Создать новый email",
  infoDescription: "Для работы с существующим email в модуле «Почта», добавьте его указав адрес и пароль. Также, при наличии подключенных почтовых серверов с интеграцией по SSH, можно создать новый email.",
  integrationTypeSsh: "SSH",
  integrationTypeApi: "API",
  integrationTypeOther: "Другое",
  accountCreatedMessage: "Учетная запись создана!",
  avatarDeletedSuccessMessage: "Аватар успешно удален!",
  avatarEditSuccess: "Аватар успешно загружен",
  deletedSuccessMessage: "Успешно удалено!",
  updatePasswordSuccessMessage: "Пароль успешно обновлен!",
  deleteMailAccountTitle: "Удаление учетной записи почты",
  addEmailAccount: "Введите данные учетной записи",
  areYouSureToDelete: "Вы уверены что вы хотите отвязать учетную запись",
  untie: "Отвязать",
  retentionPolicy: "Политика хранения",
  storageBinding: "Привязка хранилища",
  storageBindingDescription: "Выберите хранилище, которое будет привязано к организации. Все данные организации будут сохраняться в выбранном хранилище.",
  selectStorage: "Выберите",
  noStorage: "Нет хранилища",
  settings: "Настройки",
  timezones: "Часовые пояса",
  locale: "Время и языки",
  localeInfo: "Выбранный язык будет использоваться в интерфейсе всех модулей системы",
  selectLanguage: "Выберите язык",
  timezoneCheckboxLabel: "Отображать в календаре дополнительный часовой пояс",
  timezoneInfo: "Только в календаре",
  timezoneInfoOrganization: "При создании нового пользователя используется часовой пояс организации.",
  timeZone: "Часовой пояс",
  dopTimeZone: "Дополнительный часовой пояс",
  additionalTimezone: "Отображать в календаре дополнительный часовой пояс",
  additionalTimezoneDescription: "Только в календаре",
  selectTimeZone: "Выберите часовой пояс",
  language: "Язык",
  languageSettings: "Настройки языка",
  timeZonesSettings: "Настройки часового пояса",
  noQuota: "Квота не определена",
  savedMessage: "Cохранено",
  savedMessageError: "Ошибка сохранения",
  sentEmailActivation: "Мы отправили письмо для подтверждения нового адреса",
  selectDefaultQuota: "Выберите квоту",
  quota: "Квота",
  failedToLoadData: "Не удалось загрузить данные",
  chooseStatus: "Выберите статус",
  loginAs: "Войти от имени",
  loginAsHint: "Чтобы войти от имени пользователя <strong>{{LoginAs}}</strong>, введите ваш пароль:",
  enterPassword: "Введите ваш пароль",
  profilePhoto: "Фото профиля",
  additionalInfo: "Дополнительная информация",
  savingQuota: "Квота хранения данных",
  filledSpacePercent: "Заполнено на {{FillPercentTmp}} %",
  quotaDetails: "Политика квоты хранения данных",
  userQuota: "Политика квот",
  userStatus: "Статус пользователя",
  noEmail: "Email не указан",
  emailConfirmed: "Поздравляем, email подтверждён",
  emailError: "Произошла ошибка при подтверждении email",
  mailAccounts: "Учетные записи в модуле почта",
  such: "Такой",
  mail: "еmail",
  exists: "уже существует",
  cancelWarning: "Вы не сохранили информацию о новом пользователе. Вы уверены, что не хотите сохранить измения?",
  generatePassword: "Сгенерировать автоматически",
  createPassword: "Задать пароль вручную",
  additional: "Дополнительные поля",
  commonInfo: "Общие данные",
  useExistingEmail: "Использовать существующий email",
  createNewEmail: " Создать новый email",
  emailExistsDescription: "Укажите еmаil для входа в аккаунт и уведомлений",
  createEmailDescription: "Создайте еmаil для входа в аккаунт и уведомлений",
  loginDescription: "Для входа в аккаунт",
  createMore: "Создать еще пользователя",
  successCreated: "Пользователь создан",
  success: {
    credentialEmailUpdate: "На новый email отправлено письмо подтверждения",
    successCreated: "Успешно создан",
    userLogin: "Пользователь {{login}}"
  },
  error: {
    createLimit: "Исчерпан лимит подключенных пользователей. Подключите расширенный Тарифный план или замените подключенного пользователя.",
    createLimitButton: "Управление тарифным планом",
    userAddEmail: "Невозможно установить еmail, обратитесь к админу",
    createEmail: "Ошибка добавления учетной записи"
  },
  languageOptions: {
    ru: "Русский",
    en: "Английский"
  },
  user: "Пользователь",
  notifications: "Уведомления",
  notificationSettings: "Настройки уведомлений"
};
const filials$1 = {
  list: "Список организаций",
  create: "Создать новую организацию",
  addName: "Придумайте название организации",
  addParrent: "Добавить родительскую организацию",
  filialSuccess: "Организация успешно добавлена!",
  filialError: "Ошибка создания организации",
  search: "Поиск организаций по названию и по коду организации",
  maxLength: "Максимальная длина {{number}} символа",
  isRequiredField: "Поле является обязательным",
  successDelete: "Организация успешно удалена",
  successSave: "Изменения успешно сохранены",
  successUpdate: "Организация успешно обновлена",
  branding: "Брендирование",
  integrations: "Интеграции",
  auditTrail: "Журнал аудита",
  storages: "Хранилища",
  emailSetting: "Настройки рассылок",
  serverList: "Список серверов",
  addServer: "Добавить сервер",
  groups: "Группы",
  draw: "Графика",
  calendar: "Календарь",
  contacts: "Контакты",
  pages: "Страницы",
  forms: "Формы",
  link: "Ссылка",
  admin: "Управление",
  disk: "Диск",
  teams: "Команды",
  projects: "Проекты",
  payments: "Тарифные планы и оплата",
  linkInvite: "Пригласить по ссылке",
  configureLdap: "Настроить LDAP",
  availableServices: "Состояние системы",
  documentServer: "Сервер документов",
  mailServer: "Почтовый сервер",
  mailModule: "Модуль «Почта»",
  mail: "Почта",
  calendarModule: "Модуль «Календарь»",
  contactsModule: "Модуль «Контакты»",
  expiredTitle: "Если срок действия подписки истек",
  expiredInfo1: "Если срок действия подписки истек, вы увидите соответствующее предупреждение в Личном кабинете, а также в сервисах Р7-Пространства и приложениях Р7 для десктоп. ",
  expiredSubtitle1: "Как продолжить пользоваться сервисами?",
  expiredInfo2: "Для продолжения пользования сервисами и приложениями Р7, необходимо активировать новую подписку Р7-Пространства.",
  expiredSubtitle2: "Что с моими документами?",
  expiredInfo3: "До активации новой подписки, сервисы Р7-Пространства и приложения Р7 для десктоп будет работать в ограниченном режиме. Вы по-прежнему сможете открывать и печатать документы, но их нельзя будет редактировать и создавать.",
  expiredInfo4: "Документы, загруженные на Р7-Диск, можно будет сохранить в течение XX дней, после чего они будут удалены.",
  servicesStatusError: "Есть проблемы с доступом",
  servicesStatusSuccess: "Все сервисы доступны",
  filialNotFound: "Организация не найдена",
  services: {
    Unknown: "Не выбран",
    MailService: "Почтовый сервер",
    DocumentServer: "Сервер документов",
    MailModule: "Модуль «Почта»",
    ContactsModule: "Модуль «Контакты»",
    DiskModule: "Модуль «Диск»",
    DrawModule: "Модуль «Графика»",
    CalendarModule: "Модуль «Календарь»",
    ProjectsModule: "Модуль «Проекты»",
    LdapServer: "Почтовый сервер:"
  },
  editors: "Редакторы",
  organiser: "Органайзер (ПРО-опционально)",
  mailSetup: {
    emailPlaceholder: "Выберите email",
    emailLabel: "Почта пользователя",
    noEmail: "У пользователя нет привязанного аккаунта почты",
    userLabel: "Пользователь"
  },
  inviteLinks: {
    title: "Пригласительные ссылки",
    createLink: "Создать ссылку",
    linkName: "Название ссылки",
    validPeriod: "Срок действия, до",
    creatingLink: "Создание ссылки",
    editingLink: "Редактирование ссылки",
    validUntil: "Действует до {{date}}",
    warning: "Вы уверены что хотите удалить пригласительную ссылку",
    linkInactiveWasValidUntil: "Ссылка неактивна, действовала до {{date}}",
    linkSuccessDeleted: "Ссылка успешно удалена!",
    linkSuccessCreated: "Ссылка успешно создана!",
    linkSuccessEdited: "Изменения сохранены!"
  },
  diskSpace: {
    disk: "Диск",
    diskConfig: "Настройка квот",
    noQuotas: "Нет доступных квот",
    assignQuotaSuccess: "Назначение успешно добавлено",
    editQuotaSuccess: "Назначение успешно изменено",
    filialQuota: "Квота организации",
    storageUpdated: "Хранилище успешно обновлено",
    storageUpdateError: "Ошибка при обновлении хранилища",
    usersQuota: "Пользовательские квоты",
    addQuota: "Добавить квоту",
    quotas: "Квоты",
    quotaCreate: "Создать квоту",
    addQuotaAppointment: "Добавить назначение квоты",
    newAssign: "Новое назначение квоты",
    editAssign: "Редактирование назначения",
    quotaName: "Название квоты",
    quotaSizeInGb: "Размер квоты ГБ",
    maxTextTooltip: "Установить максимальное значение",
    createQuota: "Создание квоты",
    commonQuota: "Общая квота",
    editUsersQuota: "Редактирование пользовательской квоты",
    createUsersQuota: "Создание пользовательской квоты",
    filialQuotaEdit: "Редактирование квоты организации",
    edit: "Редактировать",
    "delete": "Удалить",
    changeTariff: "Изменить тариф",
    plan: "Тарифный план",
    activateTariff: "Активировать подписку",
    validity: "Срок действия:",
    usersNumber: "Кол-во пользователей:",
    unlimited: "Неограничен",
    to: "до",
    expiredPayment: "Срок действия подписки истек",
    usedSpace: "Занято на Р7-Диске:",
    warning: "Документы можно открыть только в режиме просмотра.",
    availableSpace: "Облачное хранилище:",
    remainingDays: "Осталось дней",
    deleteQuotaDescription: ' Сейчас "{{name}}" установлена у {{users}} {{usersText}}. При удалении она будет заменена на квоту по умолчанию.',
    deleteUsersQuotaDescription: 'При удалении квоты "{{name}}", {{users}} {{usersText}} без квоты',
    quotasDescription: "С помощью квот вы можете ограничивать доступное дисковое пространство.",
    quotasTable: "Таблица назначений квот",
    massAddQuota: "Массовое назначение квоты по группе",
    massQuotaRule: "Вы можете установить квоту всем пользователям с выбранной группой. По умолчанию квота будет установлена только тем пользователям, у которых размер текущей квоты меньше размера устанавливаемой квоты. Опционально вы можете проигнорировать это правило и установить квоту всем пользователям.",
    calculateQuotaTitle: "Способ расчета квоты",
    calculateQuotaInfo: "Выберите способ расчета размера доступного дискового пространства для пользователя в случае если пользователю назначены несколько квот (пользовательская и/или по группам).",
    bigQuota: "По большей квоте",
    smallQuota: "По меньшей квоте",
    sumQuota: "Суммирование квот",
    assignQuotas: "Назначить квоты",
    save: "Сохранить",
    addQuotaByRole: "Назначение квоты по группе",
    setQuotasSuccess: "Квоты успешно установлены",
    massQuotaHint: "Назначить квоту пользователям с размером текущей квоты больше размера устанавливаемой квоты",
    pastUrl: "Вставьте ссылку на объект",
    urlTooltip: "Скопируйте ссылку из браузера, например: \n Пользователь: https://admin.domain.com/profile/101 \n Группа: https://admin.domain.com/roles/101 \n Папка: https://disk.domain.com/docs/101 \n Комната: https://disk.domain.com/rooms/101",
    useExistingQuota: "Использовать существующую квоту",
    createNewQuota: "Создать новую квоту",
    assignQuotaDescription: "Вы можете назначить квоту на пользователя, группу, комнату или папку. Для этого укажите ссылку на объект и выберите квоту.",
    quotasSetup: {
      searchPlaceholder: "Поиск по квоте, объекту",
      sectionTitle: "Таблица назначений квот",
      createAssignment: "Создать назначение",
      table: {
        quota: "Квота",
        size: "Размер",
        objectType: "Тип объекта",
        object: "Объект",
        owner: "Владелец объекта"
      },
      filters: {
        quota: "Квота",
        objectType: "Тип объекта",
        owner: "Владелец"
      }
    },
    table: {
      name: "Название",
      size: "Размер",
      users: "Пользователи",
      used: "Использовано",
      available: "Доступно",
      appointments: "Кол-во назначений"
    },
    docVersionsLimit: {
      title: "Ограничение по хранению версий файла",
      label: "Количество версий",
      description: "Настройте максимальное количество версий файла. Если при добавлении новой версии количество превысит указанное число, система автоматически удалит самую старую версию, чтобы сохранить заданный лимит.",
      validationError: "Значение должно быть от {{min}} до {{max}}"
    },
    errors: {
      required: "Введите название квоты",
      size: "Введите размер",
      type: "Квота должна быть числом",
      max: "Квота не может превышать 1000 Гигабайт",
      filialMax: "Квота не может превышать 2097151 Гигабайт",
      positive: "Размер квоты должен быть положительным"
    }
  },
  deleteFilial: {
    rootFilial: "Корневую организацию удалить невозможно.",
    usersFilial: "Удалить организацию невозможно, так как к нему привязаны пользователи.",
    confirm: "Вы уверены что хотите удалить организацию?",
    insert: "Чтобы удалить организацию, введите"
  },
  settings: {
    eventsTitle: "События",
    general: "Общие настройки",
    auth: "Аутентификация",
    name: "Название",
    filialName: "Название организации",
    filialCode: "Код организации",
    filialParent: "Родительская организация",
    filialKids: "Дочерние организации",
    enterCode: "Введите код организации",
    chooseParent: "Выберите родительскую организацию",
    linkSettings: "Настройки рассылки",
    locale: "Время и языки",
    localePageTitle: "Языки и время",
    localeLanguageTitle: "Язык",
    localeLanguageLabel: "Для всех новых пользователей",
    localeTimezoneTitle: "Часовой пояс",
    localeTimezoneLabel: "Для всех новых пользователей и процессов",
    configLink: "Настройка рассылки",
    linkDescription: "Выберите пользователя и его учетную запись электронной почты, которая будет служить для отправки оповещений с портала.",
    allModules: "Все модули",
    module: "Модуль",
    searchByName: "Поиск по имени",
    searchByEvent: "Поиск по событиям",
    table: {
      event: "Событие",
      module: "Модуль",
      criticalityLevel: "Уровень критичности"
    },
    userAction: {
      SuccessfulAuthorization: "Успешная авторизация",
      UnsuccessfulAttempt: "Неудачная попытка",
      Logout: "Выход из системы",
      DocumentCreation: "Создание документа",
      DocumentRemovalFromFolder: "Удаление документа из папки",
      DocumentRemovalFromTrash: "Удаление документа из корзины",
      DocumentRemovalFromGlobalTrash: "Удаление документа из глобальной корзины",
      CalendarDeletion: "Удаление календаря",
      ContactAddToFavorites: "Добавление в избранное контакта",
      DocumentAddToFavorites: "Добавление в избранное документа",
      LinkCreation: "Создание ссылки",
      ExternalLinkCreation: "Создание внешней ссылки",
      DocumentDownload: "Скачивание документа",
      DocumentUpload: "Загрузка документа",
      DocumentDownloadByLink: "Скачивание документа по ссылке",
      DocumentOpen: "Открытие документа",
      DocumentOpenByExternalLink: "Открытие документа по внешней ссылке",
      DocumentEditing: "Редактирование документа",
      EventAccessGrant: "Предоставление доступа к событию",
      CalendarAccessGrant: "Предоставление доступа к календарю",
      ProjectAccessGrant: "Предоставление доступа к проекту",
      FolderDeletion: "Удаление папки",
      EventDeletion: "Удаление события",
      DocumentListRetrieval: "Получение списка документов",
      FolderRestoration: "Восстановление папки",
      DocumentMove: "Перемещение документа",
      UserDeletion: "Удаление пользователя",
      UserDeletionWithDocumentTransfer: "Удаление пользователя с переносом документов",
      ChangeTokenDuration: "Изменение срока действия токена",
      PasswordEnterCount: "Изменение количества попыток ввода пароля",
      AdminIpWhiteList: "Изменение белого списка IP-адресов администратора",
      UserIpWhiteList: "Изменение белого списка IP-адресов пользователя",
      ChangeLdapSettings: "Изменение настроек LDAP",
      Unknown: "Неизвестно"
    },
    priority: {
      Emergency: "Аварийная ситуация – система неработоспособна",
      Alert: "Требуется немедленное вмешательство",
      Critical: "Критическая ошибка",
      "Error": "Ошибка, требующая исправления",
      Warning: "Предупреждение о возможной проблеме",
      Notice: "Информационное сообщение, не являющееся ошибкой",
      info: "Обычная информационная запись",
      Debug: "Отладочные сообщения"
    }
  },
  authorization: {
    method: "Метод аутентификации",
    local: "Локальная аутентификация",
    dn: "DN каталога пользователей",
    filter: "Фильтр пользователей",
    ssl: "Использовать SSL",
    attributes: "Сопоставление атрибутов",
    description: "Выберите атрибуты пользователя, которые требуется синхронизировать с сервером LDAP. Унификация пользователя происходит по полю “Логин”.",
    name: "Основное имя",
    identifier: "Внешний идентификатор",
    mail: "Email",
    birthdate: "День рождения",
    organization: "Организация",
    address: "Адрес",
    blocked: "Заблокирован",
    exportGroup: "Экспорт групп",
    exportModel: "Экспорт ролевой модели",
    dnGroup: "DN каталог групп",
    filterGroup: "Фильтр групп",
    groupAttributes: " Сопоставление атрибутов для групп",
    groupDescription: "Выберите атрибуты групп, которые требуется синхронизировать с сервером LDAP. Унификация групп происходит по полю “UID”.",
    id: "Идентификатор",
    userId: "Идентификатор участника",
    details: "Описание",
    addPort: "Введите порт",
    numberPort: "Порт должен быть числом",
    syncStarted: "Синхронизация запущена!",
    teamNumber: "Номер телефона команды",
    linkEmail: "Email для создания",
    teamNumberDescription: "Этот номер телефона будет присвоен пользователю в Р7-Команда",
    linkEmailDescription: "Этот адрес электронной почты будет присвоен пользователем на почтовом сервере Р7",
    refferalTitle: "Режим реферальных ссылок",
    refferalDescription: "Использование свойства ReferralFollowing при синхронизации."
  },
  modules: {
    config: "Настройка модулей",
    rolesAccess: "Доступ к модулю по группам",
    rolesHint: "Вы можете выдать доступ к модулю по группам, принадлежащим этой организации.",
    addRole: "Добавить группу",
    userAccess: "Доступ к модулю по пользователям",
    userHint: "  Вы можете выдать доступ к модулю пользователям этой организации.",
    addUser: " Добавить пользователя",
    addUserInGroup: "Добавить пользователя в группу"
  },
  errors: {
    "delete": "Ошибка удаления организации",
    save: "Ошибка сохранения организации",
    syncError: "Ошибка синхронизации"
  }
};
const filialSecurity$1 = {
  passwordTitle: "Ограничение попыток ввода пароля",
  passwordLabel: "Максимальное количество попыток",
  passwordWarning: "При превышении максимального количества попыток входа для пользователя в минуту, статус пользователя изменяется на «заблокированный»",
  sessionTitle: "Время существования токена",
  maxSessionTime: "Максимальная значение  {{count}}",
  sessionInfo: "Укажите период в минутах. По истечению данного периода старый токен станет недействительным и пользователю будет выдан новый токен.",
  passwordStrengthTitle: "Настройки надежности пароля",
  passwordStrengthDescriptionSaaS: "Настройки надежности пароля влияют на валидацию пароля при его задании на страницах восстановления пароля и регистрации пользователей",
  passwordStrengthDescriptionBox: "Настройки надежности пароля влияют на валидацию пароля при его задании на странице восстановления пароля.",
  useCapitalLetters: "Использовать заглавные буквы",
  useLowerCaseLetters: "Использовать строчные буквы",
  useDigital: "Использовать цифры",
  useSpecialCharacters: "Использовать специальные символы",
  passwordMinLength: "Минимальная длина пароля",
  limitUse: "Ограничить использование",
  specialCharacters: "специальных символов",
  ipSecurityWarningDescription: "⚠️ Первым необходимо указать ваш текущий IP-адрес или диапазон IP-адресов, в который входит ваш текущий IP, иначе после сохранения настроек Вам будет заблокирован доступ к порталу.",
  ipSecurityUsersDescription: "Настройки IP-безопасности для всех пользователей и ролей, кроме ролей “Админ” и “Супер-админ”. Вы можете задать разрешенные IP-адреса, указав конкретные значения IP-адресов в формате IPv4 (#.#.#.#, где # - это число от 0 до 255) или диапазон IP-адресов (в формате #.#.#.#-#.#.#.#).",
  ipSecurityAdminDescription: "Настройки IP-безопасности для пользователей с ролью “Админ” или “Супер-админ”. Вы можете задать разрешенные IP-адреса, указав конкретные значения IP-адресов в формате IPv4 (#.#.#.#, где # - это число от 0 до 255) или диапазон IP-адресов (в формате #.#.#.#-#.#.#.#).",
  passwordSecurity: "Безопасность пароля",
  ipSecurity: "IP-безопасность",
  ipSecurityForUsers: "IP-безопасность пользователей",
  addAllowedIpAddress: "Добавить разрешенный IP-адрес",
  ipSecurityAdministration: "IP-безопасность администрирования",
  specialCharactersTooltip: "Допустимые специальные символы @ # % ^ * _ + = - ? : { } [ ] \\ /",
  errors: {
    positive: "Должно быть положительное число",
    passwordAttempts: "Введите количество попыток",
    sessionTime: "Введите время существования сессии",
    passwordMinMaxLength: "Должно быть в диапозоне от 8 до 30"
  }
};
const users$1 = {
  list: "Список пользователей",
  searchUsers: "Поиск по пользователям",
  allUsers: "Все пользователи",
  search: "Поиск пользователей по ФИО, email или телефону",
  resetFilters: "Сбросить фильтры",
  status: "Статус",
  allFilters: "Все фильтры",
  mailboxes: "Почтовые ящики",
  transferToUser: "Выбрать пользователя для передачи данных",
  "delete": "Удаление пользователей с портала",
  deleteTime: "Удаление может занять несколько минут ...",
  deleteSelected: "Выбранные пользователи будут удалены с портала.",
  deleteInfo: "Будут удалены личные документы пользователей, в том числе доступные для других. Чтобы избежать этого, вы можете настроить передачу данных:",
  errorDuringDeletion: "Ошибка при удалении",
  deleteCompletedSuccessfully: "Удаление было успешно завершено",
  chooseTransfer: "Выберите пользователя для всех, кому будут переданы данные по умолчанию",
  userTransfer: "Кому передать данные",
  noRightsToDelete: "Нет прав на удаление",
  transferInfo: "После нажатия на кнопку “Удалить” будут переданы данные отмеченных пользователей и далее эти пользователи будут окончательно удалены.",
  transferInfoUser: " После нажатия на кнопку “Удалить”, сначала, согласно вашим настройкам, будут переданы данные пользователя и далее пользователь будет окончательно удален.",
  addGroupOwner: "Добавить владельца группы",
  groupList: "Список групп",
  notes: "Заметки",
  noNotes: "Заметок пока нет",
  chooseRange: "Выберите диапазон",
  selectAll: "Выбрать все",
  userNotFound: "Пользователь не найден",
  actionList: {
    emailConfirmation: "Подтверждение email",
    changeStatus: "Изменить статус",
    locked: "Заблокированный",
    active: "Активный",
    deleted: "Удаленный",
    writeLetter: "Написать письмо",
    changeDepartment: "Изменить организацию",
    addRole: "Добавить группу",
    "delete": "Удалить",
    editProfile: "Редактировать профиль",
    confirmEmail: "Подтвердить email",
    unblock: "Разблокировать",
    loginAs: "Войти от имени",
    block: "Заблокировать",
    terminateConnections: "Прервать подключения"
  },
  indicatorItems: {
    blocked: "Заблокирован",
    deleted: "Удален",
    disabled: "Отключен",
    active: "Активный",
    invited: "Приглашенный"
  }
};
const quota$1 = {
  size: "Размер квоты",
  used: "Использовано квоты",
  usedSpace: "Занятое пространство",
  errors: {
    required: "Введите название квоты",
    size: "Введите размер",
    type: "Квота должна быть числом",
    max: "Квота не может превышать 1000 Гигабайт",
    positive: "Квота должна быть положительна",
    wrongLink: "Ссылка не корректная"
  },
  deleteWarningText: "Вы уверены, что хотите удалить это назначение квоты?",
  deleteSuccess: "Назначение квоты успешно удалено"
};
const entity$1 = {
  type: {
    directory: "Папка",
    role: "Группа",
    room: "Комната",
    user: "Пользователь"
  }
};
const sendLetter$1 = {
  successOne: "Письмo успешно отправлено!",
  successMultiple: "Письма успешно отправлены!",
  oneEmailActivationSuccessMessage: "Письмо активации успешно отправлено",
  multipleEmailsActivationSuccessMessage: "Письма активации успешно отправлены",
  newLetter: "Новое письмо",
  subject: "Тема",
  subjectPlaceholder: "Введите тему письма...",
  writeLetter: "Написать письмо",
  confirmLetter: "Подтверждение email",
  showUsers: "Показать список выбранных пользователей",
  sendActivationsDescription: "Пользователям с неподтверждённым email будет отправлено письмо для подтверждения.",
  sendWarning: "Письмо будет отправлено только тем пользователям у которых есть почта и в их организации настроена рассылка.",
  noSettings: "Не настроены",
  params: "параметры рассылки",
  sendActivationToEmail: "На email <strong>{{ email }}</strong> будет отправлено письмо для подтверждения.",
  errors: {
    notSent: "Ошибка при отправке письма",
    noSubject: "Введите тему письма",
    noText: "Введите текст письма",
    notConfigured: "Нет настроек почтового сервера",
    noEmail: "Hет зарегистрированного адреса электронной почты",
    emailNotActivated: "Aдреса электронной почты не активированы"
  }
};
const requestsErrors$1 = {
  objectNotFound: "Не найдено",
  objectIsNotActive: "Не действительно",
  noRights: "Нет прав",
  userIsExists: "Пользователь уже существует",
  customerIsExists: "Организация уже существует",
  emptyParameter: "Пустой запрос",
  internalError: "Ошибка на сервере. Попробуйте позже",
  badGateway: "Технические работы на сервере",
  emptyCustomerName: "Задайте имя организации",
  customerIsNotExists: "Такогй организации не существует",
  passwordNotChanges: "Смена пароля не удалась",
  userIsNotExists: "Пользователь не существует",
  parentNotSet: "Родитель не задан",
  notFoundAll: "Ничего не найдено",
  emptyOrWhiteSpaceLogin: "Логин не должен содержать пробелы и не может быть пустым",
  emptyCustomer: "Название организации не может быть пустым",
  notRightsForSuperAdmin: 'Нет прав. Невозможно изменять статус пользователя с ролью "Супер-админ"',
  notRightsForSelf: "Нет прав. Невозможно изменять статус самому себе.",
  invalidLoginOrPassword: "Неверное имя учетной записи или пароль",
  invalidPassword: "Пароль невалидный",
  invalidEmailFormat: "Неверный формат email",
  toManyRequests: "Исчерпан лимит попыток",
  notConfiguredCustomersEmail: "Нет настроек почтового сервера",
  notSendEmail: "Ошибка при отправке письма",
  dontHaveEmail: "Hет зарегистрированного адреса электронной почты",
  emailAlreadyActivated: "Почта уже подтверждена",
  emailNotActivated: "Email не активирован",
  inputEmptyEmail: "Не задана почта.",
  notExistsMxRecords: "Нет MX записей",
  cantCreateDomain: "Не возможно привязать домен",
  notFoundEmailServer: "Не найдены настройки почтового сервера",
  emailAlreadyLinked: "Данный еmail уже привязан к другому пользователю",
  emailIsNotExists: "Такой еmail не существует",
  notFoundImapFolder: "Не найдена Imap папка",
  cantCreateEmail: "Не удалось создать email",
  cantLinkEmail: "Не удалось привязать email",
  emailExists: "Такой еmail уже существует",
  invalidEmail: "Email невалидный",
  emailServerError: "Ошибка почтового сервера",
  additionalEmailEqualsEmail: "Резервный еmail равен основному",
  notConfiguredPasswordSecurity: "Не заданны настройки надежности пароля",
  incorrectPasswordSecurityMinLength: "Недопустимая минимальная длинна пароля",
  notConfiguredCanRegisterCustomer: "Не заданы настройки для создания организации ",
  setupEmailSshIntegration: "Настройте SSH интеграцию",
  noPackInstance: "Не применимо для данного решения",
  notExistsEmailConfirmTemplate: "Не найден шаблон подтверждения еmail",
  notSetCommandUrl: "Не задана ссылка на команду.",
  wrongCommonViewSettingsName: "Неверное имя настроек общего вида.",
  notFoundLdapField: "Не заполнено одно из обязательных полей в AD",
  failLdapAuth: "Ошибка авторизации",
  roleNotFound: "Группа не найдена",
  canNotDeleteAdminSuperAdmin: 'Нельзя удалять роль "Админ" и "Супер-админ"',
  canNotHaveParent: "Нельзя добавить родителя",
  selectCustomer: "Выберите организацию",
  canNotSelfParent: "Нельзя добавить себя",
  emptyQuotaName: "Название квоты не может быть пустым",
  zeroQuotaSize: "Недопустимый размер квоты",
  longQuotaName: "Название квоты слишком длинное",
  notFoundQuota: "Не удалось найти квоту",
  error: "Ошибка",
  unknownError: "Что-то пошло не так, повторите попытку",
  inviteRegisterLinkNoValid: "Ссылка регистрации не действительна",
  registerUserExists: "Такой пользователь уже зарегистрирован",
  invalidRegistrationEmail: "Невалидный email",
  customerHasUsers: "Удалить организацию невозможно, так как к нему привязаны пользователи",
  userExistsByPhone: "Такой телефон уже существует",
  userExistsByLogin: "Такой еmail уже существует",
  userExistsByEmail: "Такой пользователь уже зарегистрирован",
  maxFilialQuota: "Квота не может превышать 2097151 Гигабайт",
  invalidPasswordRegister: "Пароль невалидный",
  quotaRelationExists: "Назначение уже существует",
  quotaRelationInvalidUrl: "Ссылка не корректная",
  notFoundDirectory: "Директория не найдена",
  notFoundRole: "Группа не найдена",
  notFoundRoom: "Комната не найдена",
  notFoundUser: "Пользователь не найден",
  noEqualsCustomers: "Невозможно назначить квоту на сущность из другой организации"
};
const statistics$1 = {
  load_csv: "Загрузка csv...",
  records: "записи",
  records_: "записей",
  from: "из",
  visitors: "Посетители",
  visitors_: "Посетителей",
  authorizations: "Авторизации",
  authorizations_: "Авторизаций",
  documents: "Документы",
  documents_create: "Создано документов",
  files: "Файлы",
  files_create: "Создано файлов",
  date: "Дата",
  total: "Итого",
  filial: "Организация",
  "export": "Экспортировать",
  downloadAndOpenReport: "Скачать и открыть отчет",
  user: "Пользователь",
  date_time: "Дата и время",
  date_action: "Дата действия",
  action: "Событие",
  search_by_name: "Поиск по имени",
  space_used: "Занято места",
  documents_count: "Кол-во документов",
  files_count: "Кол-во файлов",
  disk_space: "Дисковое пространство",
  another: "Другой",
  dekstop: "Десктоп",
  mobile: "Мобильный",
  audit: "Журнал аудита",
  activity: "Активность",
  description: "Описание",
  ip: "IP-Адрес",
  newValue: "Новое значение",
  newValues: "Новые значения",
  oldValue: "Старое значение",
  oldValues: "Старые значения",
  valuesActions: {
    None: "Нет значения / не задано",
    IsEnabled: "Включено",
    PasswordEnterCount: "Количество попыток ввода пароля",
    TokenDuration: "Срок действия токена",
    IpList: "Список IP-адресов",
    Login: "Логин",
    Password: "Пароль",
    Server: "Сервер",
    Port: "Порт",
    DN: "DN каталога пользователей",
    UseSsl: "Использовать SSL",
    UserFilter: "Фильтр пользователей",
    AccountFilter: "Фильтр учётных записей",
    GroupDn: "DN группы",
    GroupEnabled: "Включение группы",
    GroupFilter: "Фильтр групп",
    ReferralFollowing: "Следовать переадресациям",
    LdapMappingBirthdate: "Дата рождения",
    LdapMappingMail: "Электронная почта",
    LdapMappingFirstName: "Имя",
    LdapMappingPhone: "Телефон",
    LdapMappingPhone2: "Дополнительный телефон",
    LdapMappingPrincipalName: "PrincipalName",
    LdapMappingSecondName: "Фамилия",
    LdapMappingCity: "Город",
    LdapMappingOrganization: "Организация",
    LdapMappingPosition: "Должность",
    LdapMappingIsDeleted: "Признак удаления",
    LdapMappingMiddleName: "Отчество",
    LdapMappingTeamNumber: "Номер команды",
    LdapMappingLinkEmail: "Связанный Email",
    LdapMappingUid: "UID",
    LdapGroupMappingUid: "UID Группы",
    LdapGroupMappingName: "Название группы",
    LdapGroupMappingDescription: "Описание группы",
    LdapGroupMappingMember: "Члены группы"
  },
  actions: {
    ChangeTokenDuration: "Изменить длительность токена",
    PasswordEnterCount: "Количество попыток ввода пароля",
    AdminIpWhiteList: "Белый список IP-администратора",
    UserIpWhiteList: "Белый список IP-пользователя",
    ChangeLdapSettings: "Изменить настройки LDAP",
    logOut: "Выход из системы",
    successLogin: "Успешная авторизация",
    loadDoc: "Загрузка документа",
    errorAttempt: "Неудачная попытка",
    openDocExternalLink: "Открытие документа по внешней ссылке",
    openDoc: "Открытие документа",
    editDoc: "Редактирование документа",
    downloadDoc: "Скачивание документа",
    downloadDocLink: "Скачивание документа по ссылке",
    createExternalLink: "Создание внешней ссылки",
    createDoc: "Создание документа",
    createLink: "Создание ссылки",
    deleteDocFromFolder: "Удаление документа из папки",
    deleteDocFromGlobalTrash: "Удаление документа из глобальной корзины",
    deleteDocFromTrash: "Удаление документа из корзины",
    deleteFromFavorites: "Удаление из избранного",
    deleteCalendar: "Удаление календаря",
    deleteDirectory: "Удаление папки",
    deleteEvent: "Удаление события",
    moveDirectory: "Перемещение директории",
    restoreDirectory: "Восстановление папки",
    documentMove: "Перемещение документа",
    accessToProject: "Предоставление доступа к проекту",
    accessToCalendar: "Предоставление доступа к календарю",
    accessToEvent: "Предоставление доступа к событию",
    getDocList: "Получение списка документов",
    addDocToFav: "Добавление в избранное документа",
    addContactToFav: "Добавление в избранное контакта",
    deleteUser: "Удаление пользователя",
    deleteUserWithTransfer: "Удаление пользователя с переносом документов"
  }
};
const commonSettings$1 = {
  companyName: "Название компании",
  useAsLogo: "Использовать как логотип",
  logoConditions: "Максимальный размер 5 мб. Поддерживаемые форматы: png ({{width}} x {{height}} px), svg.",
  incorrectImageDimensions: "Разрешение изображения должно быть {{width}} x {{height}} px",
  incorrectImageExtension: "Не допустимое расширение",
  mainLogo: "Главный логотип",
  choosePhoto: "Выберите фото",
  notifications: "Уведомления",
  systemNotification: "Системное уведомление",
  imageUrl: "Url изображения",
  updateUrl: "Ссылка на обновление",
  title: "Заголовок",
  textMessage: "Текст оповещения",
  updateDate: "Дата обновления",
  releaseDate: "Дата релиза",
  version: "Версия",
  updateId: "ID обновления"
};
const teams$1 = {
  rabbitUser: "Пользователь RabbitMQ",
  rabbitPassword: "Пароль RabbitMQ",
  rabbitInfo: "Для интеграции Р7-Команда с Корпоративным сервером 2024 создайте пользователя в RabbitMQ, согласно инструкции"
};
const sso$1 = {
  authMethod: "Настройки SSO",
  metadataIdP: "Metadata IdP (URL)",
  issuer: "Issuer (SP Entity ID)",
  signatureAlgorithm: "Алгоритм подписи",
  certificateFile: "Файл сертификата",
  attachFile: "Прикрепить вложения",
  currentFile: "Текущий файл",
  selectedFile: "Выбранный файл",
  certificatePassword: "Пароль сертификата",
  certificatePasswordRequiredForNewCert: "Обязателен при загрузке нового сертификата",
  certificatePasswordTooltip: "При загрузке нового сертификата пароль обязателен. Для существующего сертификата пароль необязателен (сохранится старый). Если указать новый пароль - он обновится.",
  certificateValidationMode: "Режим валидации сертификата",
  validationModeNone: "None",
  validationModePeerTrust: "PeerTrust",
  validationModeChainTrust: "ChainTrust",
  validationModePeerOrChainTrust: "PeerOrChainTrust",
  validationModeCustom: "Custom",
  revocationMode: "Проверка отзыва сертификата",
  revocationModeNoCheck: "NoCheck",
  revocationModeOnline: "Online",
  revocationModeOffline: "Offline",
  authnContext: "Контекст аутентификации",
  createUserOnFirstLogin: "Создавать пользователя при первом входе",
  signAuthnRequest: "Подписывать AuthnRequest",
  loadError: "Ошибка загрузки настроек SSO",
  saveError: "Ошибка сохранения настроек SSO"
};
const license$1 = {
  licenses: "Лицензии",
  deactivated: "Деактивированные",
  activated: "Активированные",
  product: "Продукт",
  device: "Устройство",
  ipAddress: "IP-address",
  activationDate: "Дата активации",
  deactivationDate: "Дата деактивации",
  status: "Статус",
  activate: "Активировать",
  activeLicense: "Активирован",
  deactiveLicense: "Деактивирован",
  deactivate: "Деактивировать",
  hostName: "Host name",
  activations: "Активации",
  activationSuccess: "Лицензия успешно активирована",
  deactivationSuccess: "Лицензия успешно деактивирована",
  noRecordsToShow: "Нет записей для показа",
  searchByPC: "Пойск по названию ПК",
  searchActivations: "Поиск активаций",
  all: "Все",
  active: "Активные",
  noActive: "Неактивные",
  deactivateLicense: "Деактивация выполнена",
  activateLicense: "Активация выполнена",
  copied: "Скопировано в буфер обмена",
  editorDesktop: "Десктоп редактор",
  auroraDesktop: "Десктоп аврора",
  organiser: "Органайзер",
  organiserPro: "Органайзер про",
  desktopDraw: "Десктоп графика"
};
const notFound$1 = {
  "404": "Страница, которую вы пытаетесь открыть не существует. Возможно, вы ошиблись в адресе или страница была перемещена на другой URL",
  error: "Что-то неправильно...",
  description: " Страница, которую вы пытаетесь открыть, не существует. Возможно, вы ошиблись адресом или страница была перемещена на другой URL. Если вы считаете, что это ошибка, обратитесь в службу поддержки.",
  back: "Вернуться на главную страницу",
  somethingWrong: "Что-то пошло не так",
  tryAgain: "Попробуйте перезагрузить страницу или зайдите позже",
  reload: "Перезагрузить страницу"
};
const errors$1 = {
  positive: "Должен быть положительным",
  maxValue: "Должен быть меньше 65536",
  enterServer: "Введите сервер",
  enterPassword: "Введите пароль",
  enterDomain: "Введите домен",
  enterFilter: "Введите фильтр пользователей",
  enterGeneralName: "Введите основное имя",
  enterName: "Введите имя",
  enterLastName: "Введите фамилию",
  enterDn: "Введите DN каталог групп",
  enterGroupFilter: "Введите Фильтр групп",
  enterId: "Введите Идентификатор",
  enterUserId: "Введите Идентификатор участника",
  enterPop: "Введите POP сервер",
  enterImap: "Введите IMAP сервер",
  enterSmtp: "Введите SMTP сервер",
  addDomains: "Введите  домены",
  accessError: "Ошибка доступа",
  doNotAccessToModule: "У вас нет доступа к модулю {{module}}",
  serverNoResponse: "Сервер не отвечает",
  somethingWentWrong: "Что-то пошло не так",
  somethingHappened: "Произошла ошибка, перезагрузите страницу или повторите попытку",
  componentError: "Компонент с ошибкой",
  loadError: "Ошибка загрузки",
  addError: "Ошибка добавления",
  deleteError: "Ошибка удаления"
};
const notifications$1 = {
  success: {
    saved: "Сохранено",
    createdMailAccount: "Учетная запись успешна создана",
    linkedMailAccount: "Учетная запись успешна привязана"
  },
  errors: {
    integrationNotConfigured: "Интеграция не настроена"
  },
  settings: {
    notificationSettingType: {
      RoleChange: "Изменения ролей",
      Login: "Авторизация с другого устройства",
      TaskChange: "Изменения задач в спринте",
      AssignedTaskChange: "Изменения задач назначенных на тебя",
      TaskAssign: "Назначение на задачу",
      CommentMention: "Упоминание в комментариях",
      ProjectAccess: "Выдача доступа к проекту",
      SprintCreated: "Новый спринт создан",
      NewMessage: "Новое входящее сообщение",
      ReplyToImportantMessage: "Ответ на важное сообщение",
      DiskCommentMention: "Упоминание в комментариях",
      DiskAccess: "Выдача доступа",
      DiskFull: "Заканчивается место на диске",
      AvailableDocumentChange: "Изменения доступным мне документов",
      MyDocumentChange: "Изменения моих документов",
      UpcomingEvent: "Уведомление о предстоящем событии",
      EventInvite: "Приглашение в событие",
      EventUpcomingNotification: "Приближение события",
      EventChange: "Изменение событий в твоем календаре или где ты участник",
      SharedEventChange: "Изменение событий в пошареных тебе календарях",
      CalendarShared: "Выдача доступа к календарю"
    }
  }
};
const timezones$1 = {
  "Africa/Abidjan": "Абиджан",
  "Africa/Algiers": "Алжир",
  "Africa/Bissau": "Бисау",
  "Africa/Cairo": "Каир",
  "Africa/Casablanca": "Касабланка",
  "Africa/Ceuta": "Сеута",
  "Africa/El_Aaiun": "Эль-Аюн",
  "Africa/Johannesburg": "Йоханнесбург",
  "Africa/Juba": "Джуба",
  "Africa/Khartoum": "Хартум",
  "Africa/Lagos": "Лагос",
  "Africa/Maputo": "Мапуту",
  "Africa/Monrovia": "Монровия",
  "Africa/Nairobi": "Найроби",
  "Africa/Ndjamena": "Нджамена",
  "Africa/Sao_Tome": "Сан-Томе",
  "Africa/Tripoli": "Триполи",
  "Africa/Tunis": "Тунис",
  "Africa/Windhoek": "Виндхук",
  "America/Adak": "Адак",
  "America/Anchorage": "Анкоридж",
  "America/Araguaina": "Арагуайна",
  "America/Argentina/Buenos_Aires": "Буэнос-Айрес",
  "America/Argentina/Catamarca": "Катамарка",
  "America/Argentina/Cordoba": "Кордова",
  "America/Argentina/Jujuy": "Жужуй",
  "America/Argentina/La_Rioja": "Ла-Риоха",
  "America/Argentina/Mendoza": "Мендоса",
  "America/Argentina/Rio_Gallegos": "Рио-Гальегос",
  "America/Argentina/Salta": "Сальта",
  "America/Argentina/San_Juan": "Сан-Хуан",
  "America/Argentina/San_Luis": "Сан-Луис",
  "America/Argentina/Tucuman": "Тукуман",
  "America/Argentina/Ushuaia": "Ушуая",
  "America/Asuncion": "Асунсьон",
  "America/Bahia": "Баия",
  "America/Bahia_Banderas": "Баия-де-Бандерас",
  "America/Barbados": "Барбадос",
  "America/Belem": "Белен",
  "America/Belize": "Белиз",
  "America/Boa_Vista": "Боа-Виста",
  "America/Bogota": "Богота",
  "America/Boise": "Бойсе",
  "America/Cambridge_Bay": "Кембридж-Бей",
  "America/Campo_Grande": "Кампу-Гранди",
  "America/Cancun": "Канкун",
  "America/Caracas": "Каракас",
  "America/Cayenne": "Кайенна",
  "America/Chicago": "Чикаго",
  "America/Chihuahua": "Чиуауа",
  "America/Ciudad_Juarez": "Сьюдад-Хуарес",
  "America/Costa_Rica": "Коста-Рика",
  "America/Cuiaba": "Куяба",
  "America/Danmarkshavn": "Данмарксхавн",
  "America/Dawson": "Доусон",
  "America/Dawson_Creek": "Доусон-Крик",
  "America/Denver": "Денвер",
  "America/Detroit": "Детройт",
  "America/Edmonton": "Эдмонтон",
  "America/Eirunepe": "Эйрунепе",
  "America/El_Salvador": "Сальвадор",
  "America/Fort_Nelson": "Форт-Нельсон",
  "America/Fortaleza": "Форталеза",
  "America/Glace_Bay": "Глейс-Бей",
  "America/Goose_Bay": "Гус-Бей",
  "America/Grand_Turk": "Гранд-Терк",
  "America/Guatemala": "Гватемала",
  "America/Guayaquil": "Гуаякиль",
  "America/Guyana": "Гайана",
  "America/Halifax": "Галифакс",
  "America/Havana": "Гавана",
  "America/Hermosillo": "Эрмосильо",
  "America/Indiana/Indianapolis": "Индианаполис",
  "America/Indiana/Knox": "Нокс",
  "America/Indiana/Marengo": "Маренго",
  "America/Indiana/Petersburg": "Петерсбург",
  "America/Indiana/Tell_City": "Тэлл-Сити",
  "America/Indiana/Vevay": "Вивей",
  "America/Indiana/Vincennes": "Винсеннес",
  "America/Indiana/Winamac": "Уинамак",
  "America/Inuvik": "Инувик",
  "America/Iqaluit": "Икалуит",
  "America/Jamaica": "Ямайка",
  "America/Juneau": "Джуно",
  "America/Kentucky/Louisville": "Луисвилл",
  "America/Kentucky/Monticello": "Монтечелло",
  "America/La_Paz": "Ла-Пас",
  "America/Lima": "Лима",
  "America/Los_Angeles": "Лос-Анджелес",
  "America/Maceio": "Масейо",
  "America/Managua": "Манагуа",
  "America/Manaus": "Манаус",
  "America/Martinique": "Мартиника",
  "America/Matamoros": "Матаморос",
  "America/Mazatlan": "Масатлан",
  "America/Menominee": "Меномини",
  "America/Merida": "Мерида",
  "America/Metlakatla": "Метлакатла",
  "America/Mexico_City": "Мехико",
  "America/Miquelon": "Микелон",
  "America/Moncton": "Монктон",
  "America/Monterrey": "Монтеррей",
  "America/Montevideo": "Монтевидео",
  "America/New_York": "Нью-Йорк",
  "America/Nipigon": "Нипигон",
  "America/Nome": "Ном",
  "America/Noronha": "Норонья",
  "America/North_Dakota/Beulah": "Бьюла",
  "America/North_Dakota/Center": "Центр",
  "America/North_Dakota/New_Salem": "Нью-Сейлем",
  "America/Nuuk": "Нуук",
  "America/Ojinaga": "Охинага",
  "America/Panama": "Панама",
  "America/Pangnirtung": "Пангниртанг",
  "America/Paramaribo": "Парамарибо",
  "America/Phoenix": "Финикс",
  "America/Port-au-Prince": "Порт-о-Пренс",
  "America/Porto_Velho": "Порту-Велью",
  "America/Puerto_Rico": "Пуэрто-Рико",
  "America/Punta_Arenas": "Пунта-Аренас",
  "America/Rainy_River": "Рэйнривер",
  "America/Rankin_Inlet": "Ранкин-Инлет",
  "America/Recife": "Ресифи",
  "America/Regina": "Реджайна",
  "America/Resolute": "Резольют",
  "America/Rio_Branco": "Рио-Бранко",
  "America/Santarem": "Сантарем",
  "America/Santiago": "Сантьяго",
  "America/Santo_Domingo": "Санто-Доминго",
  "America/Sao_Paulo": "Сан-Паулу",
  "America/Scoresbysund": "Скорсбисунд",
  "America/Sitka": "Ситка",
  "America/St_Johns": "Сент-Джонс",
  "America/Swift_Current": "Свифт-Каррент",
  "America/Tegucigalpa": "Тегусигальпа",
  "America/Thule": "Туле",
  "America/Thunder_Bay": "Тандер-Бей",
  "America/Tijuana": "Тихуана",
  "America/Toronto": "Торонто",
  "America/Vancouver": "Ванкувер",
  "America/Whitehorse": "Уайтхорс",
  "America/Winnipeg": "Виннипег",
  "America/Yakutat": "Якутат",
  "America/Yellowknife": "Йеллоунайф",
  "Antarctica/Casey": "Кейси",
  "Antarctica/Davis": "Дэвис",
  "Antarctica/Macquarie": "Маккуори",
  "Antarctica/Mawson": "Моусон",
  "Antarctica/Palmer": "Палмер",
  "Antarctica/Rothera": "Ротера",
  "Antarctica/Troll": "Тролль",
  "Antarctica/Vostok": "Восток",
  "Asia/Almaty": "Алматы",
  "Asia/Amman": "Амман",
  "Asia/Anadyr": "Анадырь",
  "Asia/Aqtau": "Актау",
  "Asia/Aqtobe": "Актобе",
  "Asia/Ashgabat": "Ашхабад",
  "Asia/Atyrau": "Атырау",
  "Asia/Baghdad": "Багдад",
  "Asia/Baku": "Баку",
  "Asia/Bangkok": "Бангкок",
  "Asia/Barnaul": "Барнаул",
  "Asia/Beirut": "Бейрут",
  "Asia/Bishkek": "Бишкек",
  "Asia/Brunei": "Бруней",
  "Asia/Chita": "Чита",
  "Asia/Choibalsan": "Чойбалсан",
  "Asia/Colombo": "Коломбо",
  "Asia/Damascus": "Дамаск",
  "Asia/Dhaka": "Дакка",
  "Asia/Dili": "Дили",
  "Asia/Dubai": "Дубай",
  "Asia/Dushanbe": "Душанбе",
  "Asia/Famagusta": "Фамагуста",
  "Asia/Gaza": "Газа",
  "Asia/Hebron": "Хеврон",
  "Asia/Ho_Chi_Minh": "Хошимин",
  "Asia/Hong_Kong": "Гонконг",
  "Asia/Hovd": "Ховд",
  "Asia/Irkutsk": "Иркутск",
  "Asia/Jakarta": "Джакарта",
  "Asia/Jayapura": "Джаяпура",
  "Asia/Jerusalem": "Иерусалим",
  "Asia/Kabul": "Кабул",
  "Asia/Kamchatka": "Камчатка",
  "Asia/Karachi": "Карачи",
  "Asia/Kathmandu": "Катманду",
  "Asia/Khandyga": "Хандыга",
  "Asia/Kolkata": "Калькутта",
  "Asia/Krasnoyarsk": "Красноярск",
  "Asia/Kuala_Lumpur": "Куала-Лумпур",
  "Asia/Kuching": "Кучинг",
  "Asia/Macau": "Макао",
  "Asia/Magadan": "Магадан",
  "Asia/Makassar": "Макассар",
  "Asia/Manila": "Манила",
  "Asia/Nicosia": "Никосия",
  "Asia/Novokuznetsk": "Новокузнецк",
  "Asia/Novosibirsk": "Новосибирск",
  "Asia/Omsk": "Омск",
  "Asia/Oral": "Орал",
  "Asia/Pontianak": "Понтианак",
  "Asia/Pyongyang": "Пхеньян",
  "Asia/Qatar": "Катар",
  "Asia/Qostanay": "Костанай",
  "Asia/Qyzylorda": "Кызылорда",
  "Asia/Riyadh": "Эр-Рияд",
  "Asia/Sakhalin": "Сахалин",
  "Asia/Samarkand": "Самарканд",
  "Asia/Seoul": "Сеул",
  "Asia/Shanghai": "Шанхай",
  "Asia/Singapore": "Сингапур",
  "Asia/Srednekolymsk": "Среднеколымск",
  "Asia/Taipei": "Тайбэй",
  "Asia/Tashkent": "Ташкент",
  "Asia/Tbilisi": "Тбилиси",
  "Asia/Tehran": "Тегеран",
  "Asia/Thimphu": "Тхимпху",
  "Asia/Tokyo": "Токио",
  "Asia/Tomsk": "Томск",
  "Asia/Ulaanbaatar": "Улан-Батор",
  "Asia/Urumqi": "Урумчи",
  "Asia/Ust-Nera": "Усть-Нера",
  "Asia/Vladivostok": "Владивосток",
  "Asia/Yakutsk": "Якутск",
  "Asia/Yangon": "Янгон",
  "Asia/Yekaterinburg": "Екатеринбург",
  "Asia/Yerevan": "Ереван",
  "Atlantic/Azores": "Азоры",
  "Atlantic/Bermuda": "Бермуды",
  "Atlantic/Canary": "Канары",
  "Atlantic/Cape_Verde": "Кабо-Верде",
  "Atlantic/Faroe": "Фареры",
  "Atlantic/Madeira": "Мадейра",
  "Atlantic/Reykjavik": "Рейкьявик",
  "Atlantic/South_Georgia": "Южная Георгия",
  "Atlantic/Stanley": "Стэнли",
  "Australia/Adelaide": "Аделаида",
  "Australia/Brisbane": "Брисбен",
  "Australia/Broken_Hill": "Брокен-Хилл",
  "Australia/Darwin": "Дарвин",
  "Australia/Eucla": "Юкла",
  "Australia/Hobart": "Хобарт",
  "Australia/Lindeman": "Линдеман",
  "Australia/Lord_Howe": "Лорд-Хау",
  "Australia/Melbourne": "Мельбурн",
  "Australia/Perth": "Перт",
  "Australia/Sydney": "Сидней",
  "Etc/UTC": "Всемирное координированное время",
  "Europe/Amsterdam": "Амстердам",
  "Europe/Andorra": "Андорра",
  "Europe/Astrakhan": "Астрахань",
  "Europe/Athens": "Афины",
  "Europe/Belgrade": "Белград",
  "Europe/Berlin": "Берлин",
  "Europe/Brussels": "Брюссель",
  "Europe/Bucharest": "Бухарест",
  "Europe/Budapest": "Будапешт",
  "Europe/Chisinau": "Кишинёв",
  "Europe/Copenhagen": "Копенгаген",
  "Europe/Dublin": "Дублин",
  "Europe/Gibraltar": "Гибралтар",
  "Europe/Helsinki": "Хельсинки",
  "Europe/Istanbul": "Стамбул",
  "Europe/Kaliningrad": "Калининград",
  "Europe/Kyiv": "Киев",
  "Europe/Kiyv": "Киев",
  "Europe/Kirov": "Киров",
  "Europe/Lisbon": "Лиссабон",
  "Europe/London": "Лондон",
  "Europe/Luxembourg": "Люксембург",
  "Europe/Madrid": "Мадрид",
  "Europe/Malta": "Мальта",
  "Europe/Minsk": "Минск",
  "Europe/Monaco": "Монако",
  "Europe/Moscow": "Москва",
  "Europe/Oslo": "Осло",
  "Europe/Paris": "Париж",
  "Europe/Prague": "Прага",
  "Europe/Riga": "Рига",
  "Europe/Rome": "Рим",
  "Europe/Samara": "Самара",
  "Europe/Saratov": "Саратов",
  "Europe/Simferopol": "Симферополь",
  "Europe/Sofia": "София",
  "Europe/Stockholm": "Стокгольм",
  "Europe/Tallinn": "Таллин",
  "Europe/Tirane": "Тирана",
  "Europe/Ulyanovsk": "Ульяновск",
  "Europe/Vienna": "Вена",
  "Europe/Vilnius": "Вильнюс",
  "Europe/Volgograd": "Волгоград",
  "Europe/Warsaw": "Варшава",
  "Europe/Zurich": "Цюрих",
  "Indian/Chagos": "Чагос",
  "Indian/Christmas": "Рождество",
  "Indian/Cocos": "Кокосовые острова",
  "Indian/Kerguelen": "Кергелен",
  "Indian/Mahe": "Маэ",
  "Indian/Maldives": "Мальдивы",
  "Indian/Mauritius": "Маврикий",
  "Indian/Reunion": "Реюньон",
  "Pacific/Apia": "Апиа",
  "Pacific/Auckland": "Окленд",
  "Pacific/Bougainville": "Бугенвиль",
  "Pacific/Chatham": "Чатем",
  "Pacific/Enderbury": "Эндербери",
  "Pacific/Fakaofo": "Факаофо",
  "Pacific/Fiji": "Фиджи",
  "Pacific/Funafuti": "Фунафути",
  "Pacific/Galapagos": "Галапагос",
  "Pacific/Gambier": "Гамбиер",
  "Pacific/Guadalcanal": "Гуадалканал",
  "Pacific/Guam": "Гуам",
  "Pacific/Honolulu": "Гаваи",
  "Pacific/Marquesas": "Маркезас",
  "Pacific/Porto_Velho": "Порту-Велью",
  "Pacific/Efate": "Эфат",
  "Pacific/Easter": "Эстер",
  "Pacific/Port_Moresby": "Порт Морсби",
  "Pacific/Noumea": "Нумеа",
  "Pacific/Chuuk": "Чуук",
  "Pacific/Pohnpei": "Понпеи",
  "Pacific/Majuro": "Маджуро",
  "Pacific/Kanton": "Кантон",
  "Pacific/Kwajalein": "Квайалайин",
  "Pacific/Johnston": "Джонстон",
  "Pacific/Kiritimati": "Киритимати",
  "Pacific/Kosrae": "Косрей",
  "Pacific/Nauru": "Науру",
  "Pacific/Niue": "Ниуэ",
  "Pacific/Norfolk": "Норфолк",
  "Pacific/Pago_Pago": "Пагопаго",
  "Pacific/Palau": "Палау",
  "Pacific/Pitcairn": "Питкерн",
  "Pacific/Rarotonga": "Раротонга",
  "Pacific/Saipan": "Сайпан",
  "Pacific/Tahiti": "Таити",
  "Pacific/Tarawa": "Тарава",
  "Pacific/Tongatapu": "Тонгатапу",
  "Pacific/Wake": "Уэйк",
  "Pacific/Wallis": "Уоллис",
  "Pacific/Whangarei": "Фангарею"
};
const CustomLinks$1 = {
  title: "Модули и меню",
  description: "Настройте доступ к каждому модулю, сервису или интеграции в их параметрах — по группам или отдельным пользователям. Порядок, заданный в этом списке, отображается на главной странице и в меню выбора модулей.",
  addLink: "Добавить ссылку",
  types: {
    module: "Модуль",
    integration: "Интеграция",
    link: "Ссылка"
  },
  table: {
    name: "Название",
    type: "Тип"
  },
  modal: {
    add: "Добавить ссылку",
    edit: "Настройки модуля",
    type: "Тип",
    typePlaceholder: "Выберите тип",
    module: "Модуль",
    modulePlaceholder: "Выберите модуль",
    url: "URL-адрес",
    urlPlaceholder: "Введите URL-адрес",
    name: "Название",
    enName: "Английское название",
    ruName: "Русское название",
    namePlaceholder: "Введите название",
    title: "Название",
    titlePlaceholder: "Введите название модуля",
    icon: "Иконка (svg или jpg, png от 256x256 px)",
    uploadImage: "Загрузить изображение",
    systemIcon: "Иконка модуля по умолчанию",
    accessTitle: "Доступ к модулю",
    accessDescription: "Выдайте доступ к модулю для групп или отдельных пользователей организации. Пользователи с доступом увидят модуль в меню.",
    addGroup: "Добавить группу",
    groupPlaceholder: "Выберите группы",
    addUser: "Добавить пользователя",
    userPlaceholder: "Выберите пользователей",
    saveButton: "Сохранить",
    updateButton: "Обновить",
    cancelButton: "Отмена",
    errorTitle: "Ошибка",
    requiredFields: "Пожалуйста, заполните все обязательные поля",
    validation: {
      moduleRequired: "Пожалуйста, выберите модуль",
      titleRuRequired: "Пожалуйста, введите русское название",
      titleEnRequired: "Пожалуйста, введите английское название",
      iconRequired: "Пожалуйста, загрузите иконку",
      invalidUrl: "Введите корректный URL (например, https://example.com)"
    },
    charsLeft: "Осталось: {{count}} симв.",
    invalidImageFormat: "Неверный формат изображения. Пожалуйста, загрузите файл SVG, JPG или PNG.",
    invalidImageSize: "Размер изображения должен быть от 256x256 до 512x512 пикселей.",
    invalidImage: "Не удалось загрузить изображение. Пожалуйста, попробуйте другой файл."
  },
  deleteModal: {
    title: "Удалить ссылку",
    message: "Вы уверены, что хотите удалить «{{name}}»?",
    confirmButton: "Удалить",
    cancelButton: "Отмена"
  },
  notifications: {
    createSuccess: "Модуль успешно добавлен",
    updateSuccess: "Модуль успешно обновлен",
    deleteSuccess: "Модуль успешно удален",
    orderSuccess: "Порядок модулей успешно обновлен"
  },
  errors: {
    loadFailed: "Не удалось загрузить список модулей",
    saveFailed: "Не удалось сохранить модуль",
    deleteFailed: "Не удалось удалить модуль",
    orderFailed: "Не удалось обновить порядок модулей"
  }
};
const ShareLinks$1 = {
  title: "Внешние ссылки",
  isDisabled: "Запретить создание внешних ссылок",
  isEnabledRules: "Использовать исключения",
  addRule: "Добавить исключение",
  RulesTable: {
    roles: "Группы",
    password: "Пароль",
    expirationDate: "Срок действия",
    folderType: "Тип папки",
    accessLevel: "Уровень доступа",
    Cells: {
      Password: {
        requiredCount: "{{count}} часов",
        required: "Обязателен",
        optional: "Не обязателен",
        requirements: "Требования",
        lowercase: "Маленькая буква",
        uppercase: "Заглавная буква",
        digit: "Цифра"
      },
      FolderType: {
        myDocuments: "Мои документы",
        sharedFolder: "Общая папка",
        room: "Комната",
        unknownType: "Неизвестный тип",
        notLimited: "Не ограничивать"
      },
      Period: {
        unlimited: "Не ограничен",
        limited: "Ограничен",
        hours: "{{count}} ч."
      },
      AccessType: {
        noRestrictions: "Не ограничивать",
        onlyUpload: "Только загрузка",
        read: "Чтение",
        comment: "Комментирование",
        write: "Запись",
        unknown: "Неизвестный тип"
      }
    }
  },
  RulesPopUp: {
    createTitle: "Создание правила",
    editTitle: "Настройка правила",
    roles: "Группы",
    chooseRoles: "Выберите группы",
    roleError: "Необходимо добавить минимум одну группу",
    password: "Пароль",
    optional: "Необязателен",
    required: "Обязателен",
    minPasswordLength: "Минимальная длина пароля",
    includeLowercase: "Использовать строчную букву",
    includeUppercase: "Использовать заглавную букву",
    includeNumber: "Использовать цифру",
    expirationDate: "Срок действия",
    unlimited: "Не ограничивать",
    limit: "Ограничивать",
    limited: "Ограничивать",
    expirationTime: "Макс. срок действия (в часах)",
    folderType: "Тип папки",
    folderTypeError: "Выберите хотя бы один тип папки",
    myDocuments: "Мои документы",
    commonFolder: "Общая папка",
    room: "Комната",
    create: "Создать",
    edit: "Редактировать",
    cancel: "Отмена",
    accessLevel: "Уровень доступа",
    noRestrictions: "Без ограничений",
    restrictAccess: "Ограничить",
    accessLevelError: "Выберите хотя бы один уровень доступа",
    onlyUpload: "Только загрузка",
    read: "Чтение",
    comment: "Комментирование",
    write: "Запись"
  },
  helper: "Укажите иключения по которым пользователи смогут создавать внешние ссылки.",
  description: "Вы можете ограничить создание внешних ссылок на файлы и документы в модуле «Диск».\n        Вы можете создать правила исключения, по которым пользователи смогут создавать внешние\n        ссылки с\n        определенными требованиями по группам, паролю, сроку действия и расположению."
};
const SettingSIEMSystem$1 = {
  title: "Настройка системы SIEM по протоколу Syslog",
  turnOn: "Включить",
  turnOff: "Отключить",
  host: "Хост",
  port: "Порт",
  format: "Используемый формат",
  save: "Сохранить",
  notificationTitle: "Настройки системы SIEM",
  success: "Сохранено",
  error: "Невозможно установить настройки, обратитесь к админу"
};
const RestrictRoomsByRoles$1 = {
  title: "Разрешение на создание комнат",
  description: "Укажите группы для которых разрешено создание комнат",
  addRole: "Добавить группу",
  RulesRestrictionPopUp: {
    roles: "Группы",
    title: "Добавить группу",
    chooseRoles: "Выберите группы",
    cancel: "Отмена",
    save: "Сохранить"
  }
};
const unknown$3 = "Неизвестно";
const notificationSetting$3 = {
  Off: "Отключено",
  All: "Все модули",
  Self: "Этот модуль"
};
const accessType$3 = {
  Deny: "Запретить",
  OnlyUpload: "Только загрузка",
  FreeBusy: "Свободен/Занят",
  CanDownload: "Можно скачать",
  Read: "Чтение",
  Comment: "Комментировать",
  Review: "Рецензировать",
  Write: "Запись",
  Delete: "Удалить",
  FullInternal: "Полный внутренний",
  Full: "Полный",
  Lock: "Заблокировать",
  LockPrint: "Заблокировать печать",
  LockCopy: "Заблокировать копирование",
  LockDownload: "Заблокировать скачивание"
};
const module$4 = {
  Admin: "Управление",
  Disk: "Диск",
  Projects: "Проекты",
  Calendar: "Календарь",
  Mail: "Почта",
  Contacts: "Контакты"
};
const notificationSettingType$2 = {
  RoleChange: "Изменения ролей",
  Login: "Авторизация с другого устройства",
  TaskChange: "Изменения задач в спринте",
  AssignedTaskChange: "Изменения задач назначенных на тебя",
  TaskAssign: "Назначение на задачу",
  CommentMention: "Упоминание в комментариях",
  ProjectAccess: "Выдача доступа к проекту",
  SprintCreated: "Новый спринт создан",
  NewMessage: "Новое входящее сообщение",
  ReplyToImportantMessage: "Ответ на важное сообщение",
  DiskCommentMention: "Упоминание в комментариях",
  DiskAccess: "Выдача доступа",
  DiskFull: "Заканчивается место на диске",
  AvailableDocumentChange: "Изменения доступным мне документов",
  MyDocumentChange: "Изменения моих документов",
  UpcomingEvent: "Уведомление о предстоящем событии",
  EventInvite: "Приглашение в событие",
  EventUpcomingNotification: "Приближение события",
  EventChange: "Изменение событий в твоем календаре или где ты участник",
  SharedEventChange: "Изменение событий в пошареных тебе календарях",
  CalendarShared: "Выдача доступа к календарю"
};
const userGender$1 = {
  NotSpecified: "Not specified",
  Male: "Male",
  Female: "Female"
};
const userStatus$1 = {
  Active: "Активен",
  Blocked: "Заблокирован"
};
const roleType$1 = {
  User: "Пользователь",
  Admin: "Админ",
  SuperUser: "Супер-админ",
  Guest: "Гость",
  All: "Все",
  Support: "Поддержка"
};
const userAction$1 = {
  Logout: "Выход из системы",
  SuccessLogin: "Успешная авторизация",
  LoadDoc: "Загрузка документа",
  ErrorAttempt: "Неудачная попытка",
  OpenDocExternalLink: "Открытие документа по внешней ссылке",
  OpenDoc: "Открытие документа",
  EditDoc: "Редактирование документа",
  DownloadDoc: "Скачивание документа",
  DownloadDocLink: "Скачивание документа по ссылке",
  CreateExternalLink: "Создание внешней ссылки",
  CreateDoc: "Создание документа",
  CreateLink: "Создание ссылки",
  DeleteDocFromFolder: "Удаление документа из папки",
  DeleteDocFromGlobalTrash: "Удаление документа из глобальной корзины",
  DeleteDocFromTrash: "Удаление документа из корзины",
  DeleteFromFavorites: "Удаление из избранного",
  DeleteCalendar: "Удаление календаря",
  DeleteDirectory: "Удаление папки",
  DeleteEvent: "Удаление события",
  MoveDirectory: "Перемещение директории",
  RestoreDirectory: "Восстановление папки",
  DocumentMove: "Перемещение документа",
  AccessToProject: "Предоставление доступа к проекту",
  AccessToCalendar: "Предоставление доступа к календарю",
  AccessToEvent: "Предоставление доступа к событию",
  GetDocList: "Получение списка документов",
  AddDocToFav: "Добавление в избранное документа",
  AddContactToFav: "Добавление в избранное контакта",
  DeleteUser: "Удаление пользователя",
  DeleteUserWithTransfer: "Удаление пользователя с переносом документов",
  ChangeTokenDuration: "Изменение длительности токена",
  PasswordEnterCount: "Количество попыток ввода пароля",
  AdminIpWhiteList: "Белый список IP администратора",
  UserIpWhiteList: "Белый список IP пользователя",
  ChangeLdapSettings: "Изменение настроек LDAP"
};
const storagePage$1 = {
  title: "Хранилища",
  searchPlaceholder: "Поиск хранилища",
  createButton: "Создать",
  migrationProgressError: "Ошибка при переносе. Попробуйте повторить",
  migrationProgressRetry: "Повторить",
  migrationProgressCancel: "Назад",
  table: {
    nameHeader: "Название",
    typeHeader: "Тип",
    activityHeader: "Активность",
    migrationProgress: "Процесс переноса данных"
  },
  storageTypes: {
    s3: "S3",
    fileStorage: "Файловое хранилище",
    s3Encrypted: "S3 (зашифрованное)",
    fileStorageEncrypted: "Файловое хранилище (зашифрованное)",
    unknown: "Неизвестный тип"
  },
  statuses: {
    "default": "По умолчанию",
    available: "Доступно",
    active: "Активно",
    disabled: "Отключено",
    error: "Ошибка"
  },
  createDialog: {
    title: "Создать хранилище",
    nameLabel: "Название",
    namePlaceholder: "Название",
    typeLabel: "Тип хранилища",
    typePlaceholder: "Тип хранилища",
    s3KeyLabel: "Ключ",
    s3KeyPlaceholder: "Введите ключ",
    s3SecretLabel: "Секрет",
    s3SecretPlaceholder: "Введите секрет",
    s3SystemNameLabel: "Системное имя",
    s3SystemNamePlaceholder: "Введите системное имя",
    s3BucketLabel: "Bucket",
    s3BucketPlaceholder: "Введите название bucket",
    s3UrlLabel: "URL",
    s3UrlPlaceholder: "Введите URL",
    fsUrlLabel: "Путь",
    fsUrlPlaceholder: "Введите путь к хранилищу",
    enableEncryption: "Включить шифрование",
    validateButton: "Валидировать",
    validationSuccess: "Валидация прошла успешно",
    createButton: "Создать",
    cancelButton: "Отмена",
    tooltips: {
      fillRequiredFields: "Заполните все обязательные поля",
      validateFirst: "Сначала выполните валидацию"
    }
  },
  editDialog: {
    title: "Редактировать хранилище",
    nameLabel: "Название",
    namePlaceholder: "Название",
    typeLabel: "Тип хранилища",
    typePlaceholder: "Тип хранилища",
    s3KeyLabel: "Ключ",
    s3KeyPlaceholder: "Введите ключ",
    s3SecretLabel: "Секрет",
    s3SecretPlaceholder: "Введите секрет",
    s3SystemNameLabel: "Системное имя",
    s3SystemNamePlaceholder: "Введите системное имя",
    s3BucketLabel: "Bucket",
    s3BucketPlaceholder: "Введите название bucket",
    s3UrlLabel: "URL",
    s3UrlPlaceholder: "Введите URL",
    fsUrlLabel: "Путь",
    fsUrlPlaceholder: "Введите путь к хранилищу",
    enableEncryption: "Включить шифрование",
    saveButton: "Сохранить",
    cancelButton: "Отмена",
    tooltips: {
      fillRequiredFields: "Заполните все обязательные поля",
      editingDisabled: "Редактирование хранилищ временно недоступно"
    }
  },
  deleteDialog: {
    title: "Удалить хранилище",
    confirmMessage: "Вы уверены, что хотите удалить хранилище?",
    deleteButton: "Удалить",
    cancelButton: "Отмена"
  },
  transferDialog: {
    title: "Перенести данные",
    targetLabel: "Целевое хранилище",
    targetPlaceholder: "Выберите хранилище",
    noStoragesAvailable: "Нет доступных хранилищ для переноса",
    transferButton: "Перенести",
    cancelButton: "Отмена"
  },
  migrationProgress: {
    title: "Перенос данных",
    description: "Перенос данных выполняется и может занять время. При отмене все перенесённые файлы будут удалены из целевого хранилища. Файлы в исходном хранилище останутся без изменений.",
    cancelButton: "Отмена переноса данных"
  },
  actions: {
    edit: "Редактировать",
    transfer: "Перенести данные",
    transferDescription: "Перенести файлы из этого хранилища в другое",
    transferDisabled: "Нельзя перенести данные из хранилища по умолчанию",
    "delete": "Удалить",
    deleteDescription: "Удалить хранилище (только если в нём нет файлов)",
    clear: "Очистить",
    clearDescription: "Очистить все данные в хранилище",
    cannotDelete: "Невозможно удалить",
    deleteDefaultDisabled: "Нельзя удалить хранилище по умолчанию",
    deleteHasFilesDisabled: "Хранилище содержит файлы",
    cancelMigration: "Отменить перенос данных",
    migrationInProgress: "Идёт перенос данных"
  },
  errors: {
    fetchingStorages: "Ошибка при загрузке хранилищ",
    creatingStorage: "Ошибка при создании хранилища",
    updatingStorage: "Ошибка при обновлении хранилища",
    deletingStorage: "Ошибка при удалении хранилища",
    migratingStorage: "Ошибка при переносе данных"
  },
  notifications: {
    migrationStarted: "Перенос данных запущен",
    migrationCancelled: "Перенос данных отменён",
    migrationCancelError: "Не удалось отменить перенос данных",
    migrationRetryStarted: "Перенос данных перезапущен",
    migrationRetryError: "Не удалось перезапустить перенос данных",
    migrationCompleted: "Перенос данных из хранилища «{{from}}» в хранилище «{{to}}» успешно завершён",
    migrationCompletedSimple: "Перенос данных успешно завершён",
    invalidStorageIds: "Неверные ID хранилищ",
    storageCreated: "Хранилище успешно создано",
    storageCreateError: "Не удалось создать хранилище",
    storageUpdated: "Хранилище успешно обновлено",
    storageUpdateError: "Не удалось обновить хранилище",
    storageDeleted: "Хранилище успешно удалено",
    storageDeleteError: "Не удалось удалить хранилище",
    storageCleared: "Хранилище успешно очищено",
    storageClearError: "Не удалось очистить хранилище",
    storageEnabledSuccess: "Хранилище успешно включено",
    storageDisabledSuccess: "Хранилище успешно отключено",
    storageToggleError: "Не удалось изменить статус хранилища"
  }
};
const dlp$1 = {
  title: "Интеграция с ICAP-сервером",
  connectionName: "Имя соединения",
  activity: "Активность",
  addIntegration: "Добавить интеграцию",
  editIntegration: "Редактирование интеграции",
  createIntegration: "Добавление интеграции",
  deleteIntegrationTitle: "Удаление интеграции",
  deleteIntegrationConfirm: "Вы уверены, что хотите удалить эту интеграцию?",
  "delete": "Удалить",
  cancel: "Отмена",
  create: "Создать",
  save: "Сохранить",
  success: "Успешно",
  error: "Ошибка",
  loading: "Загрузка",
  loadError: "Ошибка загрузки",
  loadErrorMessage: "Не удалось загрузить список интеграций",
  deleteSuccess: "Интеграция успешно удалена",
  deleteError: "Не удалось удалить интеграцию",
  createSuccess: "Интеграция успешно создана",
  updateSuccess: "Интеграция успешно обновлена",
  saveError: "Не удалось сохранить интеграцию",
  toggleSuccess: "Интеграция {{action}}",
  enabled: "включена",
  disabled: "выключена",
  toggleError: "Не удалось изменить состояние интеграции",
  accessDenied: "Доступ запрещен",
  accessDeniedMessage: "У вашего аккаунта нет доступа к настройкам DLP/Антивирус. Обратитесь к администратору для получения необходимых прав.",
  form: {
    title: "Интеграция с антивирусами и DLP-системами",
    name: "Имя соединения",
    type: "Тип",
    host: "Адрес",
    port: "Порт",
    respmodService: "Путь сервиса для RESPMOD",
    reqmodService: "Путь сервиса для REQMOD",
    additionalServers: "Доп. серверы",
    addServer: "Добавить сервер",
    timeoutsAndAttempts: "Таймауты и попытки",
    connectTimeout: "Тайм-аут подключения, мс",
    writeTimeout: "Тайм-аут записи, мс",
    readTimeout: "Тайм-аут чтения, мс",
    resultTimeout: "Общий тайм-аут ответа, мс",
    attempts: "Кол-во попыток",
    backoff: "Интервал между попытками, мс",
    maxConnections: "Максимальное кол-во соединений",
    onTimeout: "Поведение при таймауте",
    onTimeoutBlock: "Блокировать",
    onTimeoutAllow: "Разрешить",
    onTimeoutQuarantine: "Карантин",
    scanConditions: "Условия сканирования",
    scanUpload: "При загрузке",
    scanDownload: "При скачивании",
    scanShareInternal: "При выдаче прав внутреннему пользователю",
    scanShareGuest: "При выдаче прав гостю",
    scanExternalLink: "При создании внешней ссылки",
    fileTypeFiltering: "Фильтрация по типу файлов",
    fileTypesMode: "Режим фильтрации",
    fileTypeModeOff: "Выключено",
    fileTypeModeAllowList: "Белый список",
    fileTypeModeDenyList: "Черный список",
    allowedExt: "Разрешённые расширения, через запятую",
    blockedExt: "Запрещенные расширения, через запятую",
    allowedMime: "Разрешённые MIME, через запятую",
    blockedMime: "Запрещённые MIME, через запятую",
    restrictionsAndSettings: "Ограничения и доп. настройки",
    maxFileSizeMb: "Максимальный размер файла, МБ",
    whenDownWaitMs: "Пауза при недоступности сервиса, мс",
    maxMessageSizeKb: "Ограничение на размер ICAP-сообщения, КБ",
    skipOnIcapErrors: "Пропускать проверки при ошибках ICAP",
    cachingAndHashing: "Кэширование и хеширование",
    hashTtlMinutes: "Время жизни хеша, мин",
    useHashCache: "Использовать кэш хешей",
    headersAndMetadata: "Заголовки и метаданные",
    headerFileName: "Имя файла",
    headerFileSize: "Размер в байтах",
    headerFileId: "ID файла",
    headerFileHash: "Хэш файла",
    headerRecipientEmail: "E-mail получателя",
    headerUserEmail: "E-mail текущего пользователя",
    headerRoleId: "ID роли",
    headerRoleName: "Имя роли",
    headerRoleType: "Тип роли",
    saveButton: "Сохранить",
    createButton: "Создать",
    cancelButton: "Отмена"
  },
  server: {
    add: "Добавление сервера",
    edit: "Редактирование сервера",
    host: "Адрес",
    port: "Порт",
    hostPlaceholder: "Введите адрес",
    portPlaceholder: "Введите порт",
    respmodService: "Путь сервиса для RESPMOD",
    reqmodService: "Путь сервиса для REQMOD",
    respmodPlaceholder: "/respmod",
    reqmodPlaceholder: "/reqmod",
    saveButton: "Добавить",
    updateButton: "Сохранить",
    cancelButton: "Отмена",
    tableAddress: "Адрес",
    tablePort: "Порт",
    tableReqmod: "REQMOD",
    tableRespmod: "RESPMOD",
    tableActions: "Действия"
  },
  validation: {
    nameRequired: "Имя соединения обязательно",
    hostRequired: "Адрес обязателен",
    hostInvalid: "Некорректный адрес (ожидается IP адрес или доменное имя)",
    portRequired: "Порт обязателен",
    portInvalid: "Некорректный порт",
    pathMustStartWithSlash: "Путь должен начинаться с /",
    max5Minutes: "Максимум 5 минут",
    max10Minutes: "Максимум 10 минут",
    max100Attempts: "Максимум 100 попыток",
    max1Minute: "Максимум 1 минута",
    max1Hour: "Максимум 1 час",
    range1To10000: "Должно быть от 1 до 10000",
    maxFileSizeRange: "Должно быть от 0 до 10240 МБ (10 ГБ)",
    messageSizeNonNegative: "Размер сообщения не может быть отрицательным",
    selectAtLeastOneScanCondition: "Выберите хотя бы одно условие сканирования",
    allowListRequiresExtOrMime: "При белом списке укажите разрешённые расширения или MIME-типы",
    denyListRequiresExtOrMime: "При чёрном списке укажите запрещённые расширения или MIME-типы",
    hashCacheRequiresTtl: "При использовании кэша укажите время жизни хеша (больше 0)",
    uploadScanRequiresReqmod: "При сканировании загрузки укажите путь REQMOD",
    downloadScanRequiresRespmod: "При сканировании скачивания/шаринга укажите путь RESPMOD"
  },
  validationError: "Ошибка валидации",
  validationErrorMessage: "Пожалуйста, заполните все обязательные поля корректно",
  saveErrorMessage: "Не удалось сохранить интеграцию",
  additionalServersRequireService: "Для дополнительных серверов укажите хотя бы один путь сервиса (REQMOD или RESPMOD)"
};
const appsMenu$1 = {
  links: "Ссылки"
};
const ru$2 = {
  documentTitle: documentTitle$1,
  managementLogoAlt: managementLogoAlt$1,
  officeLogoAlt: officeLogoAlt$1,
  spaceLogoAlt: spaceLogoAlt$1,
  showMore: showMore$1,
  hide: hide$1,
  title: title$1,
  "delete": "Удалить",
  deleted: deleted$1,
  add: add$1,
  cancel: cancel$1,
  close: close$1,
  enable: enable$1,
  disable: disable$1,
  send: send$1,
  "continue": "Продолжить",
  verify: verify$1,
  create: create$1,
  warning: warning$1,
  ok: ok$1,
  type: type$1,
  name: name$1,
  priority: priority$1,
  loadingError: loadingError$1,
  reload: reload$1,
  save: save$1,
  saved: saved$1,
  success: success$1,
  noData: noData$1,
  dataError: dataError$1,
  home: home$1,
  review: review$1,
  profil: profil$1,
  exit: exit$1,
  reportError: reportError$1,
  tarif: tarif$1,
  download: download$1,
  team: team$1,
  link: link$1,
  zoomIn: zoomIn$1,
  zoomOut: zoomOut$1,
  reset: reset$1,
  panning: panning$1,
  selection: selection$1,
  select: select$1,
  menu: menu$1,
  backMain: backMain$1,
  choose: choose$1,
  sync: sync$1,
  hello: hello$1,
  goToProfile: goToProfile$1,
  goHome: goHome$1,
  userNotFound: userNotFound$1,
  search: search$1,
  common: common$1,
  noInformation: noInformation$1,
  male: male$1,
  female: female$1,
  modules: modules$1,
  successfulAuthorization: successfulAuthorization$1,
  failedLoginAttempt: failedLoginAttempt$1,
  signOut: signOut$1,
  noAction: noAction$1,
  settings: settings$1,
  copied: copied$1,
  refresh: refresh$1,
  change: change$1,
  copy: copy$1,
  navigation: navigation$1,
  validation: validation$1,
  filters: filters$1,
  addDomain: addDomain$1,
  servers: servers$1,
  domains: domains$1,
  avatar: avatar$1,
  passwordMinError: passwordMinError$1,
  passwordRegError: passwordRegError$1,
  emailFormatError: emailFormatError$1,
  emailMinError: emailMinError$1,
  domainMinError: domainMinError$1,
  noDomainsForMailServer: noDomainsForMailServer$1,
  noDomain: noDomain$1,
  incorrectOldEmailPassword: incorrectOldEmailPassword$1,
  admin: admin$1,
  selectGroup: selectGroup$1,
  dateOfCreation: dateOfCreation$1,
  unit: unit$1,
  owner: owner$1,
  participants: participants$1,
  searchRolesByName: searchRolesByName$1,
  roles: roles$1,
  passwordReset: passwordReset$1,
  requestResetPassword: requestResetPassword$1,
  login: login$1,
  register: register$1,
  profile: profile$1,
  filials: filials$1,
  filialSecurity: filialSecurity$1,
  users: users$1,
  quota: quota$1,
  entity: entity$1,
  sendLetter: sendLetter$1,
  requestsErrors: requestsErrors$1,
  statistics: statistics$1,
  commonSettings: commonSettings$1,
  teams: teams$1,
  sso: sso$1,
  license: license$1,
  notFound: notFound$1,
  errors: errors$1,
  notifications: notifications$1,
  timezones: timezones$1,
  CustomLinks: CustomLinks$1,
  ShareLinks: ShareLinks$1,
  SettingSIEMSystem: SettingSIEMSystem$1,
  RestrictRoomsByRoles: RestrictRoomsByRoles$1,
  unknown: unknown$3,
  notificationSetting: notificationSetting$3,
  accessType: accessType$3,
  module: module$4,
  notificationSettingType: notificationSettingType$2,
  userGender: userGender$1,
  userStatus: userStatus$1,
  roleType: roleType$1,
  userAction: userAction$1,
  storagePage: storagePage$1,
  dlp: dlp$1,
  appsMenu: appsMenu$1
};
const documentTitle = "R7-Management";
const managementLogoAlt = "Logo R7-Management";
const officeLogoAlt = "Logo R7-Office";
const spaceLogoAlt = "Logo R7-Space";
const showMore = "Show More...";
const hide = "...Hide";
const title = "Title";
const deleted = "Deleted";
const add = "Add";
const cancel = "Cancel";
const close = "Close";
const enable = "Enable";
const disable = "Disable";
const send = "Send";
const verify = "Verify";
const create = "Create";
const warning = "Warning";
const ok = "Ok";
const type = "Type";
const name = "Name";
const priority = "Priority";
const loadingError = "Failed to load data";
const reload = "Reload";
const save = "Save";
const saved = "Saved";
const success = "Success";
const noData = "No data";
const dataError = "Error loading data";
const home = "Home";
const review = "Review";
const profil = "Profile";
const exit = "Exit";
const reportError = "Report Error";
const tarif = "Subscription";
const download = "Download";
const team = "Team";
const link = "Link";
const zoomIn = "Zoom In";
const zoomOut = "Zoom Out";
const reset = "Reset";
const panning = "Panning";
const selection = "Selection";
const select = "Select";
const menu = "Menu";
const backMain = "Back to Main";
const choose = "Choose...";
const sync = "Sync";
const hello = "Hello";
const goToProfile = "Manage Account";
const goHome = "Go Back Home";
const userNotFound = "User Not Found";
const search = "Search";
const common = "Common";
const noInformation = "No Information";
const male = "Male";
const female = "Female";
const modules = "Modules";
const successfulAuthorization = "Successful Authorization";
const failedLoginAttempt = "Failed Login Attempt";
const signOut = "Sign Out";
const noAction = "No Action";
const settings = "Settings";
const copied = "Copied";
const refresh = " Refresh";
const change = " Change";
const copy = "Copy";
const navigation = {
  users: "Users",
  roles: "Groups",
  units: "Organizations",
  statistics: "Statistics",
  commonSettings: "Common Settings",
  activations: "Activations",
  manageSubscription: "Manage Subscription"
};
const validation = {
  ipAddress: "Enter a valid IP address",
  ipAddressRange: "Enter a range of IP addresses in the format #.#.#.#-#.#.#.#",
  required: "This field is required",
  emptyEmail: "Email address should not contain spaces",
  emptyInput: "Value cannot be empty",
  passwordStartsWithSpace: "Password cannot start with a space",
  selectUserStatus: "Select user status",
  statusRequired: "Status is required",
  selectDepartment: "Select organization",
  selectTimeZone: "Select time zone",
  selectLanguage: "Select language",
  divisionRequired: "Organization is required",
  enterPosition: "Enter position",
  selectQuota: "Select quota",
  quotaMandatory: "Quota is mandatory",
  enterLogin: "Enter login",
  enterLoginOrEmail: "Enter login or email",
  loginWithoutSpaces: "Login should not contain spaces",
  loginInvalidChars: "Login can only contain Latin letters, digits and the characters . _ @ -",
  nameInvalidChars: "Field can only contain letters, spaces, hyphens and apostrophes",
  passwordHasForbiddenSymbols: "The password contains forbidden characters. Only Latin letters, digits, and the following symbols are allowed: {{symbols}}",
  emailsShouldNotBeTheSame: "Emails should not be the same",
  enterLastName: "Enter last name",
  enterName: "Enter name",
  enterFirstName: "Enter First Name",
  indicateBirthday: "Indicate birthday",
  enteredDateSmall: "Entered date is too small",
  dateLessCurrent: "Date should be less than current",
  extensionPhoneContainNumbers: "Extension phone should contain only numbers",
  enterRolesName: "Enter group name",
  enterLinkName: "Enter link name",
  invalidUrl: "Enter a valid URL",
  invalidUrlOrUrn: "Enter a valid URL or URN",
  invalidUuid: "Enter a valid UUID",
  maxLength: "Maximum length is {{max}} characters",
  certificatePasswordRequired: "Certificate password is required",
  duplicateValues: "Fields must not contain duplicate values",
  maxLengthSymbols: "Maximum length of {{count}} symbol",
  wrongMobilePhoneFormat: "Incorrect phone number format. Should consist of 10 digits",
  wrongEmailFormat: 'Incorrect email format. Should be in the format "example@email.com"',
  passwordShouldNotContainSpaces: "Password must not contain spaces",
  chooseGender: "Choose gender",
  enterEmail: "Enter email",
  maxLengthSymbolsWithCount: {
    symbols_zero: "Maximum length of {{count}} symbols",
    symbols_one: "Maximum length of {{count}} symbol",
    symbols_few: "Maximum length of {{count}} symbols",
    symbols_many: "Maximum length of {{count}} symbols",
    symbols_other: "Maximum length of {{count}} symbols"
  },
  minLengthSymbolsWithCount: {
    symbols_zero: "Minimum length of {{count}} symbols",
    symbols_one: "Minimum length of {{count}} symbol",
    symbols_few: "Minimum length of {{count}} symbols",
    symbols_many: "Minimum length of {{count}} symbols",
    symbols_other: "Minimum length of {{count}} symbols"
  },
  brandColorHEXFormat: "Enter brand color in HEX format",
  typeCompanyName: "Type company name",
  chooseLogo: "Choose logo",
  enterImageUrl: "Enter the image URL",
  enterUpdateUrl: "Enter the update URL",
  enterTitle: "Enter the title",
  enterTextMessage: "Enter the notification text",
  enterUpdateDate: "Select the update date",
  enterReleaseDate: "Select the release date",
  enterVersion: "Enter the version",
  enterUpdateId: "Enter the update ID",
  enterFilialName: "Enter the organization name"
};
const filters = {
  roleFilter: "Group",
  userStatusFilter: "Status",
  filialFilter: "Organization",
  positionFilter: "Position",
  supervisorFilter: "Supervisor",
  roleTypeFilter: "Role",
  userTypeFilter: "Authorization",
  genderFilter: "Gender",
  emailStatusFilter: "Email",
  addressFilter: "Location",
  birthDateFilter: "Date of Birth",
  dateOfCreateFilter: "Creation Date",
  lastVisitDateFilter: "Last Login Date",
  quotaFilter: "Quota Policy",
  usingQuotaSizeFilter: "Used Quota Size, MB",
  userFilter: "User",
  authActionTypeFilter: "Event",
  title: "Title",
  from: "from",
  to: "to"
};
const addDomain = {
  title: "Adding a Domain",
  action: "Add your Domain",
  text1: "Before you can start creating corporate email addresses, you need to add a TXT record to your domain control panel to verify ownership of the domain.",
  text2: "Open your domain control panel in another browser tab and copy the text highlighted in bold into the corresponding fields or select the most suitable ones from the available fields:",
  text3: "Records for Domain Ownership Verification",
  hint1: "In some cases, the DNS management service may not allow the use of the '@' symbol as the domain or subdomain name. Use your domain name with a period '.' at the end, for example, 'example.com.'",
  hint2: "Please note: updating the DNS record may take from a few minutes to several hours. Wait for some time if you have recently made changes to the record.",
  inputLabel: "Enter your company's domain name in the field below:",
  success: "Domain successfully added",
  errors: {
    exists: "This domain is already added.",
    nonExists: "The selected domain does not exist. Check the input correctness.",
    error: "Error. Please try again later.",
    nonExistsRecord: "No record to confirm domain ownership.",
    invalidName: "Invalid domain name.",
    notCreated: "Domain creation error"
  }
};
const servers = {
  turnOnConnection: "Enable integration with mail server",
  api: {
    Host: "Host",
    Password: "Password",
    Login: "Login",
    HasLdapAuth: "LDAP authentication is enabled on the mail server",
    connect: {
      title: "API Connection",
      success: "API connection successful",
      failed: "API connection failed",
      button: "Test connection"
    },
    oauth20: {
      enable: "Configure OAuth 2.0",
      title: "Oauth2.0",
      urlAuth20: "URL",
      redirectUrl: "Valid Redirect URIs (Separate with commas)",
      clientId: "Client ID",
      secretId: "Secret ID"
    }
  },
  server: "Server",
  title: "Mail Servers",
  configMail: "Config Mail Server",
  warning: "Are you sure you want to delete the mail server",
  create: "Add Mail Server",
  edit: "Edit Mail Server",
  add: "Add Mail Server",
  name: "Name",
  nameLabel: "Server Name",
  domains: "Domains",
  domainsLabel: "Allowed domains separated by commas",
  popServer: "POP Server",
  port: "Port",
  connection: "Select Connection",
  connectionType: "Connection Type",
  imapServer: "IMAP Server",
  sshIntegration: "Integration with mail server via SSH",
  key: "Key",
  smtpServer: "SMTP Server",
  createError: "Error creating server",
  createSuccess: "Server successfully added!",
  addKey: "Enter key",
  addSshServer: "Enter SSH server",
  addLogin: "Enter login",
  addHost: "Enter host",
  addPassword: "Enter password",
  changeKey: "Change key",
  authType: "Auth type",
  goToServer: "Go to server",
  goToServerLinkNotGenerated: "The link has not been generated yet",
  editServer: "Edit",
  integration: "Integration",
  emptyData: "No mail servers found"
};
const domains = {
  domain: "Domain",
  title: "Domain Settings",
  "delete": "Delete Domain",
  deleteWarning: "If you delete your domain, all mailboxes and groups with this domain will also be deleted.",
  confirmDelete: "Do you want to delete",
  settings: "Domain Settings",
  settingsError: "Please go to your domain settings panel and add the missing records:",
  mxRecord: "MX Record (Mail Exchange)",
  spfRecord: "SPF Record (Sender Policy Framework)",
  dkimRecord: "DKIM Record (DomainKeys Identified Mail)",
  textMeaning: "Text/Meaning",
  deleteSuccess: "The domain was successfully deleted",
  deleteError: "Error deleting domain"
};
const avatar = {
  conditions: "Maximum size 5 MB. Supported formats: png, jpg, jpeg, bmp",
  changePhoto: "Choose another photo",
  warning: "Select a file smaller than 5 MB",
  wrongFormat: "Select a file with a supported image format: png, jpg, jpeg, or bmp",
  hint: "Drag to adjust position",
  choosePhoto: "Choose a photo",
  changeAvatar: "Change profile photo",
  uploadPhoto: "Upload photo",
  confirmDelete: "Are you sure you want to delete the photo?",
  error: "An error occurred, please reload the page or try again."
};
const passwordMinError = "Password must be at least 8 characters long";
const passwordRegError = "Password must contain at least one letter and one number.";
const emailFormatError = "Enter a valid email address in the format: example@mail.com";
const emailMinError = "Enter an email address";
const domainMinError = "Select a domain";
const noDomainsForMailServer = "The selected mail server has no domains";
const noDomain = "No domain";
const incorrectOldEmailPassword = "The entered old password is invalid";
const admin = "Admin";
const selectGroup = {
  searchRole: "Search groups"
};
const dateOfCreation = "Date of Creation";
const unit = "Organization";
const owner = "Owner";
const participants = "Participants";
const searchRolesByName = "Search Groups by Name";
const roles = {
  create: "Create a New Group",
  roleType: "Role",
  parentalRole: "Parental Group",
  roleLeader: "Group Leader",
  leader: "Leader",
  childRoles: "Child Groups",
  mailboxes: "Mailboxes",
  noSelectedUsers: "You haven't selected any users!",
  edit: "Edit Group",
  addFilial: "Add organization",
  whoCanShareAccess: "Who can share access",
  addAllowedRoles: "Add group",
  name: "Group Name",
  addParentRole: "Add Parent Group",
  addRoleManager: "Add Group Manager",
  roleAdded: "Group successfully added!",
  roleCreatedSuccess: "Group {{name}} successfully created!",
  roleCreateError: "Error creating group",
  enterName: "Enter a name",
  createButton: "Create",
  back: "Back",
  addUsers: "Add Users",
  successEdit: "Group successfully edited!",
  list: "List of Groups",
  chooseRole: "Choose Group",
  roleNotFound: "Group not found",
  types: {
    admin: "Admin",
    user: "User",
    superAdmin: "Super Admin",
    guest: "Guest",
    all: "All",
    support: "Support"
  },
  deleteSuccess: "Group successfully deleted!",
  addSuccess: "Groups successfully added",
  deleteWarningText: "Are you sure you want to delete this group? Users with this group may lose access to data that they have been granted permissions to.",
  found: "Groups found",
  reset: "Reset"
};
const passwordReset = {
  newPassword: "New Password",
  confirmNewPassword: "Confirm New Password",
  enterNewPassword: "Enter New Password",
  enterNewPasswordAgain: "Enter New Password Again",
  linkIsInvalid: "The link is invalid",
  passwordChangedSuccessfully: "Password successfully changed",
  passwordRecovery: "Password Recovery",
  passwordsDoNotMatch: "The entered passwords do not match",
  passwordPolicyString: "Password must contain {{policy}}.",
  passwordPolicy: {
    minMaxLength: "Password must be between {{MinLength}} and {{MaxLength}} characters",
    useCapitalLetters: "Password must contain at least one uppercase letter",
    useLowLetter: "Password must contain at least one lowercase letter",
    digital: "Password must contain at least one digit",
    passwordLatinOnly: "Password must contain only Latin characters",
    specialCharacters: "Add at least one special character",
    passwordShouldNotContainSpaces: "Password must not contain spaces",
    useSpecialCharacters: "Add at least one special character",
    allowedSpecialCharacters: "Allowed special characters: {{characters}}, remove {{symbols}}",
    forbiddenSpecialCharacters: "Password contains forbidden characters{{symbols}}",
    noRequirements: "Password must be between {{MinLength}} and {{MaxLength}} characters"
  },
  reliability: {
    unreliable: "unreliable",
    quite_reliable: "quite reliable",
    reliable: "reliable"
  },
  passwordStrength: "Password Strength",
  create: "Create Password",
  createRules: "You can use only Latin letters (a—z and A—Z), digits (0—9), and such special characters as !@#$%^&;*()."
};
const requestResetPassword = {
  title: "Password Recovery",
  text: "Enter the email address you used during registration, and we will send you the necessary instructions.",
  withAdditionalEmailText: "Enter your email address used during registration and a backup email address where we will send the necessary instructions.",
  corporateText: "For password recovery instructions, contact your organization's system administrator.",
  email: "Email",
  additionalEmail: "Backup email",
  haveNoAccessToEmail: "No access to email",
  emailHaveToBeUnique: "Emails must be different",
  successText: "Instructions successfully sent to the specified email.\nCheck your inbox and follow the provided recommendations.",
  errorText: "An error occurred",
  backMain: "Back to Main",
  tryAgain: "Try Again",
  incorrectEmail: 'Incorrect email address. It should be in the format "example@email.com"',
  ready: "Ready",
  generateStrongPassword: "Generate a Strong Password"
};
const login = {
  enter: "Sign In",
  login: "Еmаil",
  loginBox: "Login or email",
  register: "Register",
  password: "Password",
  additionally: "Additionally",
  customerCode: "Organization Code",
  forgotPassword: "Forgot Password?",
  enterESIA: "Sign in via ESIA",
  enterGASU: "Sign in via GASU",
  enterSSO: "Sign in via SSO",
  enterKerberos: "Sign in via Kerberos",
  errors: {
    somethingWentWrong: "Something went wrong during login, please try again",
    emptyPassword: "Password cannot be empty",
    loginError: "Authorization error",
    incorrectNamePassword: "Incorrect username or password",
    limit: "Attempt limit exceeded",
    notFound: "Resource not found",
    internalError: "Internal server error",
    tryLater: "Please try again later.",
    blockedAccount: "Account blocked",
    wrongPassword: "Incorrect password",
    toManyRequests: "Attempt limit exceeded. Your account is blocked. Please contact the administrator."
  }
};
const register = {
  title: "Registration",
  text: "After registration, a 30-day trial period will be automatically activated",
  register: "Register",
  enter: "Sign In",
  makeNewPassword: "Create a new password:",
  "continue": "Continue",
  back: "Back",
  useExistingEmail: "Use existing email address",
  createNewEmail: "Create new email",
  firstName: "First Name",
  surname: "Surname",
  company: "Name your Space",
  email: "Email",
  phone: "Phone",
  password: "Password",
  confirmPassword: "Confirm Password",
  requiredField: "Required field",
  nameShort: "First name is too short",
  surnameShort: "Surname is too short",
  companyShort: "Name is too short",
  passwordShort: "Password is too short",
  passwordAllowedStart: "Allowed characters:",
  passwordLong: "Password must be between {{MinLength}} and {{MaxLength}} characters",
  passwordLongShort: "from {{MinLength}}–{{MaxLength}} characters",
  passwordLetters: "Password must contain lowercase letters",
  passwordLettersShort: "lowercase letters",
  passwordNumbers: "Password must contain numbers",
  passwordNumbersShort: "numbers",
  passwordUppercase: "Password must contain uppercase letters",
  passwordUppercaseShort: "uppercase letters",
  passwordSpecialChars: "Password must contain special characters",
  passwordSpecialCharsShort: "special characters",
  passwordLatinOnly: "Password must contain only Latin characters",
  passwordLatinOnlyShort: "Latin characters",
  allowedSpecialChars: "Allowed special characters: {{characters}}",
  allowedSpecialCharsShort: "{{characters}}",
  noWhitespace: "Password must not contain spaces",
  noWhitespaceShort: "no spaces",
  forbiddenSpecialChars: "Forbidden special characters: {{characters}}",
  forbiddenSpecialCharsShort: "without {{characters}}",
  wrongPassword: "The password must be between 8 and 30 characters long, include uppercase letters, allowed special characters ~ @ # % ^ * _ + = - ? : { } [ ] \\ /, and use only Latin characters. Cyrillic characters are not allowed.",
  incorrectEmail: "Invalid email address",
  differencePassword: "Entered passwords do not match",
  agreementsConfirmedInfo: "Agreement to receive informational emails is required",
  agreementsConfirmedRule: "Confirmation is mandatory",
  userExists: "Such user is already registered",
  invalidPassword: "Invalid password",
  cantRegister: "Registration is temporarily unavailable. Please try again later or contact support.",
  emailFirstChar: "The first character must be a letter (a—z or A—Z) or a number (0-9)",
  emailLastChar: "The last character must be a letter (a—z or A—Z) or a number (0-9)",
  emailRules: "The name must contain between 6 and 30 characters and can only use Latin letters (a—z and A—Z), numbers (0—9), and special characters like . _ -",
  emailExists: "This email is already taken, please try another",
  emailCheckError: "Error while checking the email",
  successRegister: "Registration successful!",
  registerError: "Registration error",
  subscribeAccept: "I agree to receive informational emails",
  serviceRules: "Terms of service",
  privacyPolicy: "Privacy policy",
  accept: "I agree with",
  and: "and",
  hasAccount: "Already have an account?",
  hasNotAccount: "Don't have an account yet?",
  createEmail: "Create a new email:",
  addExistEmail: "Enter an existing email:"
};
const profile = {
  save: "Save",
  saved: "Saved",
  cancel: "Cancel",
  infoDescription: "To work with an existing email in the 'Mail' module, add it by specifying the address and password. Additionally, if mail servers with SSH integration are connected, a new email can be created.",
  integrationTypeSsh: "SSH",
  integrationTypeApi: "API",
  integrationTypeOther: "Other",
  personalData: "Personal Data",
  company: "Company",
  safety: "Safety",
  emailAccount: "Email Accounts",
  credentials: "Credentials",
  generalInformation: "General Information",
  login: "Login",
  loginExist: "login",
  email: "Еmаil",
  emailServer: "Email Server",
  selectEmailServer: "Select email server",
  selectServer: "Select email server",
  domain: "Domain",
  emailDomain: "Email Domain",
  selectDomain: "Select domain",
  backupEmail: "Backup еmаil",
  backupEmailDescription: "For account recovery",
  createUser: "Create user",
  statusDescription: "Determines the ability to log in",
  surName: "Surname",
  firstName: "First Name",
  middleName: "Middle Name",
  gender: "Gender",
  address: "Address (City, Street, House)",
  addAddress: "Enter address...",
  choose: "Choose...",
  birthDate: "Date of Birth",
  chooseBirthDate: "Choose birth date",
  phone: "Phone",
  additionalPhone: "Additional Phone",
  dateOfCreateProfile: "Date of Profile Creation",
  lastEntryDate: "Last Login Date",
  unit: "Organization",
  position: "Position",
  add: "Add",
  addPosition: "Add Position",
  noPosition: "No Position Defined",
  addManager: "Add Manager",
  roles: "Groups",
  role: "Group",
  mobile: "Mobile Phone",
  homePhone: "Home Phone",
  addRole: "Add Group",
  oldPassword: "Old Password",
  newPassword: "New Password",
  passwordChange: "Change Password",
  passwordChangeTitle: "Change Account Password",
  addOldPassword: "Enter old password",
  passwordChangeWarning: "Choose a new password for your email. Note that the portal password is changed elsewhere.",
  password: "Password",
  passwordRecoveryLink: "Password Recovery Link",
  passwordRequiring: "Must contain at least 8 characters and digits",
  noActiveLink: "no active link",
  resetPassword: "Reset Password",
  passwordReset: "Password Reset",
  reset: "Reset",
  resetPasswordAndGenerateLink: "Reset Password and Generate Password Recovery Link",
  resetPasswordSuccess: "Password reset successful",
  localAuthorization: "Local Authorization",
  mailModuleAccount: "Mail Module Account",
  createMailAccountRequiring: "To create a new mail account, integrate with at least one mail server via SSH.",
  account: "Account",
  mailServers: "Mails servers",
  accounts: "Accounts",
  createAccount: "Create New Account",
  activeConnections: "Active Connections",
  allConnectionsTerminatedSuccess: "All active connections successfully terminated!",
  oneConnectionTerminatedSuccess: "Active connection successfully terminated!",
  cantDisconnectCurrentConnection: "Cannot disconnect current connections",
  terminateAllConnections: "Terminate All Connections",
  terminateMyConnections: "Terminate All Connections Except Current",
  noActiveConnections: "No Active Connections",
  noInformation: "No Information",
  changePassword: "Change Password",
  removeMail: "Remove mail",
  renameMail: "Rename mail",
  renameEmailTitle: "Rename email?",
  renameEmailLabel: "Name",
  renameEmailPlaceholder: "Enter name",
  renameEmailSuccess: "Email successfully renamed",
  canonicalNames: "Canonical Names",
  canonicalNamesTitle: "Canonical Names",
  canonicalNameField: "Name",
  canonicalDomainField: "Domain",
  addCanonicalName: "Add",
  canonicalNameAdded: "Canonical name added",
  canonicalNameDeleted: "Canonical name deleted",
  linkAccount: "Link Account",
  createNewAccount: "Create New Account",
  accountCreatedMessage: "Account Created!",
  avatarDeletedSuccessMessage: "Avatar successfully deleted!",
  avatarEditSuccess: "Avatar successfully uploaded",
  deletedSuccessMessage: "Successfully deleted!",
  updatePasswordSuccessMessage: "Password successfully updated!",
  deleteMailAccountTitle: "Delete Mail Account",
  addEmailAccount: "Enter account information",
  areYouSureToDelete: "Are you sure you want to unlink the account",
  untie: "Untie",
  retentionPolicy: "Retention Policy",
  storageBinding: "Storage Binding",
  storageBindingDescription: "Select a storage that will be linked to the organization. All organization data will be saved in the selected storage.",
  selectStorage: "Select",
  noStorage: "No storage",
  settings: "Settings",
  timezones: "Timezones",
  locale: "Time and Language",
  localeInfo: "Selected language will be used in all modules.",
  selectLanguage: "Select language",
  timezoneCheckboxLabel: "Show timezone in calendar",
  timezoneInfo: "Calendar only.",
  timezoneInfoOrganization: "When creating a new user, the organization's time zone is used.",
  timeZone: "Time Zone",
  dopTimeZone: "Additional Time Zone",
  additionalTimezone: "Show additional time zone in calendar",
  additionalTimezoneDescription: "Calendar only",
  selectTimeZone: "Select Time Zone",
  language: "Language",
  languageSettings: "Language Settings",
  timeZonesSettings: "Time Zone Settings",
  noQuota: "Quota not defined",
  savedMessage: "Saved",
  savedMessageError: "Save error",
  sentEmailActivation: "We have sent an activation email to the specified address",
  selectDefaultQuota: "Select Quota",
  quota: "Quota",
  failedToLoadData: "Failed to load data",
  chooseStatus: "Choose Status",
  loginAs: "Login As",
  loginAsHint: "To log in as user <strong>{{LoginAs}}</strong>, enter your password:",
  enterPassword: "Enter your password",
  profilePhoto: "Profile Photo",
  additionalInfo: "Additional Information",
  savingQuota: "Data Storage Quota",
  filledSpacePercent: "Filled at {{FillPercentTmp}} %",
  quotaDetails: "Data Storage Quota Policy",
  userQuota: "Quota Policy",
  userStatus: "User Status",
  noEmail: "Email not specified",
  emailConfirmed: "Congratulations, email confirmed",
  emailError: "Error confirming email",
  mailAccounts: "Mail Module Accounts",
  such: "Such",
  mail: "mail",
  exists: "exists",
  cancelWarning: "You have not saved information about the new user. Are you sure you don't want to save the changes?",
  generatePassword: "Generate automatically",
  createPassword: "Set password manually",
  additional: "Additional fields",
  commonInfo: "General information",
  useExistingEmail: "Use existing email",
  createNewEmail: "Create a new email",
  emailExistsDescription: "Specify the еmаil for account login and notifications",
  createEmailDescription: "Create an еmаil for account login and notifications",
  loginDescription: "For account login",
  createMore: "Create another user",
  successCreated: "User created",
  success: {
    credentialEmailUpdate: "A confirmation email has been sent to the new email",
    successCreated: "Successfully created",
    userLogin: "User {{login}}"
  },
  error: {
    createLimit: "Connected user limit reached. Upgrade your plan or replace a connected user.",
    createLimitButton: "Manage Plan",
    userAddEmail: "Unable to set email, contact admin",
    createEmail: "Error adding email account"
  },
  languageOptions: {
    ru: "Russian",
    en: "English"
  },
  user: "User",
  notifications: "Notifications",
  notificationSettings: "Notification Settings"
};
const filials = {
  list: "List of organizations",
  create: "Create New Organization",
  addName: "Enter Organization Name",
  addParrent: "Add Parent Organization",
  filialSuccess: "Organization successfully added!",
  linkInvite: "Link Invite",
  configureLdap: "Configure LDAP",
  filialError: "Error creating organization",
  search: "Search organizations by name and organization code",
  maxLength: "Maximum length is {{number}} characters",
  isRequiredField: "This field is required",
  successDelete: "Organization successfully deleted",
  successSave: "Organization successfully saved!",
  successUpdate: "Organization successfully updated",
  branding: "Branding",
  integrations: "Integrations",
  auditTrail: "Audit trail",
  storages: "Storages",
  emailSetting: "Newsletter Settings",
  serverList: "Server List",
  addServer: "Add Server",
  groups: "Groups",
  draw: "Draw",
  mail: "Mail",
  admin: "Admin",
  disk: "Disk",
  calendar: "Calendar",
  contacts: "Contacts",
  projects: "Projects",
  payments: "Tariffs and Payments",
  availableServices: "System Status",
  servicesStatusError: "There are problems with access",
  servicesStatusSuccess: "All services are available",
  editors: "Editors",
  organiser: "Organizer (PRO-optional)",
  pages: "Pages",
  forms: "Forms",
  link: "Link",
  teams: "Teams",
  documentServer: "Document Server",
  mailServer: "Mail Server",
  mailModule: "Mail Module",
  calendarModule: "Calendar Module",
  contactsModule: "Contacts Module",
  expiredTitle: "If the subscription has expired",
  expiredInfo1: "If the subscription has expired, you will see a corresponding warning in your Personal Account, as well as in the R7-Space services and R7 desktop applications.",
  expiredSubtitle1: "How to continue using the services?",
  expiredInfo2: "To continue using R7 services and applications, you need to activate a new R7-Space subscription.",
  expiredSubtitle2: "What happens to my documents?",
  expiredInfo3: "Until a new subscription is activated, R7-Space services and R7 desktop applications will operate in a limited mode. You will still be able to open and print documents, but you will not be able to edit or create them.",
  expiredInfo4: "Documents uploaded to R7-Drive can be saved for XX days, after which they will be deleted.",
  filialNotFound: "Organization not found",
  services: {
    Unknown: "Unknown",
    MailService: "Mail Server",
    DocumentServer: "Document Server",
    MailModule: "«Mail» Module",
    ContactsModule: "«Contacts» Module",
    DiskModule: "«Disk» Module",
    DrawModule: "«Draw» Module",
    CalendarModule: "«Calendar» Module",
    ProjectsModule: "«Projects» Module",
    LdapServer: "Mail Server:"
  },
  mailSetup: {
    emailPlaceholder: "Select email",
    emailLabel: "User's email",
    noEmail: "User has no associated email account",
    userLabel: "User"
  },
  inviteLinks: {
    title: "Invitation Links",
    createLink: "Create Link",
    linkName: "Link Name",
    validPeriod: "Valid Until",
    creatingLink: "Creating Link",
    editingLink: "Editing Link",
    validUntil: "Valid until {{date}}",
    warning: "Are you sure you want to delete the invitation link",
    linkInactiveWasValidUntil: "Link is inactive, was valid until {{date}}",
    linkSuccessDeleted: "Link successfully deleted!",
    linkSuccessCreated: "Link successfully created!",
    linkSuccessEdited: "Changes saved!"
  },
  diskSpace: {
    disk: "Disk",
    diskConfig: "Setting quotas",
    editAssign: "Edit Quota assignment",
    assignQuotaSuccess: "Quota assigned successfully",
    editQuotaSuccess: "Quota assignment successfully changed",
    filialQuota: "Organization Quota",
    storageUpdated: "Storage successfully updated",
    storageUpdateError: "Error updating storage",
    usersQuota: "User Quotas",
    addQuota: "Add Quota",
    quotas: "Quotas",
    quotaCreate: "Create Quota",
    addQuotaAppointment: "Add quota assignment",
    newAssign: "New Quota assignment",
    quotaName: "Quota Name",
    quotaSizeInGb: "Quota Size GB",
    maxTextTooltip: "Set the maximum value",
    createQuota: "Create Quota",
    commonQuota: "Common Quota",
    editUsersQuota: "Edit User Quota",
    createUsersQuota: "Create User Quota",
    filialQuotaEdit: "Edit Organization Quota",
    edit: "Edit",
    "delete": "Delete",
    changeTariff: "Change Tariff",
    deleteQuotaDescription: 'Currently "{{name}}" is set for {{users}} {{usersText}}. Upon deletion, it will be replaced with the default quota.',
    deleteUsersQuotaDescription: 'Upon deletion of quota "{{name}}", {{users}} {{usersText}} will be without quota',
    quotasDescription: "Quotas allow you to limit the available disk space.",
    quotasTable: "Quota assignment table",
    noQuotas: "No Quotas",
    plan: "Tariff plan",
    activateTariff: "Activate Tariff",
    validity: "Validity period:",
    usersNumber: "Number of users:",
    unlimited: "Unlimited",
    to: "to",
    expiredPayment: "Expired payment",
    usedSpace: "Busy on P7-Disk:",
    warning: "Documents can only be opened in view mode.",
    availableSpace: "Cloud storage:",
    remainingDays: "Remaining days:",
    massAddQuota: "Bulk quota assignment by group",
    massQuotaRule: "You can set a quota for all users with the selected group. By default, the quota will be applied only to users whose current quota is smaller than the one being set. Optionally, you can ignore this rule and set the quota for all users.",
    calculateQuotaTitle: "Quota calculation method",
    calculateQuotaInfo: "Select the method for calculating the size of the available disk space for the user in case the user has multiple quotas assigned (user and/or by groups).",
    bigQuota: "By larger quota",
    smallQuota: "By smaller quota",
    sumQuota: "Summing quotas",
    assignQuotas: "Assign Quotas",
    save: "Save",
    addQuotaByRole: "Quota assignment by group",
    setQuotasSuccess: "Quotas successfully set!",
    massQuotaHint: "Assign a quota to users whose current quota is larger than the quota being set.",
    pastUrl: "Paste the object link",
    urlTooltip: "Copy the link from browser, e.g.:\n User: https://admin.domain.com/profile/101\n Group: https://admin.domain.com/roles/101\n Folder: https://disk.domain.com/docs/101\n Room: https://disk.domain.com/rooms/101",
    useExistingQuota: "Use existing quota",
    createNewQuota: "Create new quota",
    assignQuotaDescription: "You can assign a quota to a user, group, room, or folder. To do this, provide the object link and select a quota.",
    quotasSetup: {
      searchPlaceholder: "Search by quota, object",
      sectionTitle: "Quota assignment table",
      createAssignment: "Create assignment",
      table: {
        quota: "Quota",
        size: "Size",
        objectType: "Object Type",
        object: "Object",
        owner: "Owner"
      },
      filters: {
        quota: "Quota",
        objectType: "Object Type",
        owner: "Owner"
      }
    },
    table: {
      name: "Name",
      size: "Size",
      users: "Users",
      used: "Used",
      available: "Available",
      appointments: "No. of assignments"
    },
    docVersionsLimit: {
      title: "File Version Storage Limit",
      label: "Number of versions",
      description: "Set the maximum number of file versions. When a new version is added and the count exceeds the specified limit, the system will automatically delete the oldest version to maintain the limit.",
      validationError: "Value must be between {{min}} and {{max}}"
    },
    errors: {
      required: "Enter quota name",
      size: "Enter size",
      type: "Quota must be a number",
      max: "Quota cannot exceed 1000 Gigabytes",
      filialMax: "Quota cannot exceed 2097151 Gigabytes",
      positive: "Quota size must be positive"
    }
  },
  deleteFilial: {
    rootFilial: "Cannot delete root organization.",
    usersFilial: "Cannot delete organization because it has associated users.",
    confirm: "Are you sure you want to delete the organization?",
    insert: "To delete the organization, enter"
  },
  settings: {
    eventsTitle: "Events",
    general: "General Settings",
    auth: "Authorization",
    name: "Name",
    filialName: "Organization Name",
    filialCode: "Organization Code",
    filialParent: "Parent Organization",
    filialKids: "Child Organizations",
    enterCode: "Enter organization code",
    chooseParent: "Choose parent organization",
    linkSettings: "Dispatch Settings",
    locale: "Time and Language",
    localePageTitle: "Language and Time",
    localeLanguageTitle: "Language",
    localeLanguageLabel: "For all new users",
    localeTimezoneTitle: "Time Zone",
    localeTimezoneLabel: "For all new users and processes",
    linkDescription: "Select a user and their email account to be used for sending portal notifications.",
    configLink: "Configure Link",
    allModules: "All Modules",
    module: "Module",
    searchByName: "Search by name",
    searchByEvent: "Search by event",
    table: {
      event: "Event",
      module: "Module",
      criticalityLevel: "Criticality level"
    },
    userAction: {
      SuccessfulAuthorization: "Successful authorization",
      UnsuccessfulAttempt: "Unsuccessful attempt",
      Logout: "Logout",
      DocumentCreation: "Document creation",
      DocumentRemovalFromFolder: "Document removal from folder",
      DocumentRemovalFromTrash: "Document removal from trash",
      DocumentRemovalFromGlobalTrash: "Document removal from global trash",
      CalendarDeletion: "Calendar deletion",
      ContactAddToFavorites: "Adding contact to favorites",
      DocumentAddToFavorites: "Adding document to favorites",
      LinkCreation: "Link creation",
      ExternalLinkCreation: "External link creation",
      DocumentDownload: "Document download",
      DocumentUpload: "Document upload",
      DocumentDownloadByLink: "Document download via link",
      DocumentOpen: "Document opening",
      DocumentOpenByExternalLink: "Document opening via external link",
      DocumentEditing: "Document editing",
      EventAccessGrant: "Event access grant",
      CalendarAccessGrant: "Calendar access grant",
      ProjectAccessGrant: "Project access grant",
      FolderDeletion: "Folder deletion",
      EventDeletion: "Event deletion",
      DocumentListRetrieval: "Document list retrieval",
      FolderRestoration: "Folder restoration",
      DocumentMove: "Document move",
      UserDeletion: "User deletion",
      UserDeletionWithDocumentTransfer: "User deletion with document transfer",
      Unknown: "Unknown",
      ChangeTokenDuration: "Change token expiration duration",
      PasswordEnterCount: "Change password entry attempt count",
      AdminIpWhiteList: "Modify admin IP whitelist",
      UserIpWhiteList: "Modify user IP whitelist",
      ChangeLdapSettings: "Change LDAP settings"
    },
    priority: {
      Emergency: "Emergency – system is unusable",
      Alert: "Alert – immediate action required",
      Critical: "Critical – critical error",
      "Error": "Error – needs to be corrected",
      Warning: "Warning – potential problem",
      Notice: "Notice – informational, not an error",
      info: "Info – general information",
      Debug: "Debug – debugging messages"
    }
  },
  authorization: {
    method: "Authorization Method",
    local: "Local Authorization",
    dn: "User Directory DN",
    filter: "User Filter",
    ssl: "Use SSL",
    attributes: "Attribute Mapping",
    description: "Select user attributes to synchronize with the LDAP server. User unification is based on the 'Login' field.",
    name: "Primary Name",
    identifier: "External Identifier",
    mail: "Email",
    birthdate: "Birthdate",
    organization: "Organization",
    address: "Address",
    blocked: "Blocked",
    exportGroup: "Export Groups",
    exportModel: "Export Role Model",
    dnGroup: "Group Directory DN",
    filterGroup: "Group Filter",
    groupAttributes: "Attribute Mapping for Groups",
    groupDescription: "Select group attributes to synchronize with the LDAP server. Group unification is based on the 'UID' field.",
    id: "Identifier",
    userId: "Member Identifier",
    details: "Details",
    addPort: "Enter port",
    numberPort: "Port must be a number",
    syncStarted: "Synchronization started",
    teamNumber: "Team Number",
    linkEmail: "Email to create",
    teamNumberDescription: "This phone number will be assigned to the user in P7-Team",
    linkEmailDescription: "This email address will be assigned by the user on the P7 mail server",
    refferalTitle: "Referral link mode",
    refferalDescription: "Using the ReferralFollowing property during synchronization."
  },
  modules: {
    config: "Module Configuration",
    rolesAccess: "Module Access by Groups",
    rolesHint: "You can grant module access by groups belonging to this organization.",
    addRole: "Add Group",
    userAccess: "Module Access by Users",
    userHint: "You can grant module access by users of this organization.",
    addUser: "Add User",
    addUserInGroup: "Add User to Group"
  },
  errors: {
    "delete": "Error deleting organization",
    save: "Error saving organization",
    syncError: "Error synchronizing organization"
  }
};
const filialSecurity = {
  passwordTitle: "Password Input Attempts Restriction",
  passwordLabel: "Maximum Number of Attempts",
  passwordWarning: "When the maximum number of login attempts per minute is exceeded for a user, the user's status is changed to 'blocked'",
  sessionTitle: "Token Lifetime",
  maxSessionTime: "Maximum value {{count}}",
  sessionInfo: "Specify the period in minutes. After this period, the old token will become invalid, and the user will be issued a new token.",
  passwordStrengthTitle: "Password Strength Settings",
  passwordStrengthDescriptionSaaS: "Password strength settings affect password validation when setting passwords on password recovery and user registration pages",
  passwordStrengthDescriptionBox: "Password strength settings affect password validation when setting passwords on the password recovery page.",
  useCapitalLetters: "Use Capital Letters",
  useLowerCaseLetters: "Use Lowercase Letters",
  useDigital: "Use Digits",
  useSpecialCharacters: "Use Special Characters",
  passwordMinLength: "Minimum Password Length",
  limitUse: "Limit Use of",
  ipSecurity: "IP Security",
  passwordSecurity: "Password Security",
  specialCharacters: "special characters",
  ipSecurityWarningDescription: "⚠️ You must first specify your current IP address or IP address range that includes your current IP. Otherwise, after saving the settings, you will be blocked from accessing the portal.",
  ipSecurityUsersDescription: "IP security settings for all users and roles except for roles 'Admin' and 'Super Admin'. You can specify allowed IP addresses by providing specific IPv4 address values (#.#.#.#, where # is a number from 0 to 255) or IP address ranges (in the format #.#.#.#-#.#.#.#).",
  ipSecurityAdminDescription: "IP security settings for users with roles 'Admin' or 'Super Admin'. You can specify allowed IP addresses by providing specific IPv4 address values (#.#.#.#, where # is a number from 0 to 255) or IP address ranges (in the format #.#.#.#-#.#.#.#).",
  ipSecurityForUsers: "User IP Security",
  addAllowedIpAddress: "Add Allowed IP Address",
  ipSecurityAdministration: "Administration IP Security",
  specialCharactersTooltip: "Allowed special characters are @ # % ^ * _ + = - ? : { } [ ] \\ /",
  errors: {
    positive: "Must be a positive number",
    passwordAttempts: "Enter the number of attempts",
    sessionTime: "Enter session time",
    passwordMinMaxLength: "Must be in the range of 8 to 30"
  }
};
const users = {
  list: "List of Users",
  searchUsers: "Search Users",
  allUsers: "All Users",
  search: "Search users by full name, email, or phone",
  resetFilters: "Reset Filters",
  status: "Status",
  allFilters: "All Filters",
  mailboxes: "Mailboxes",
  transferToUser: "Select a user to transfer data to",
  "delete": "Deleting users from the portal",
  deleteTime: "Deletion may take a few minutes...",
  deleteSelected: "Selected users will be deleted from the portal.",
  deleteInfo: "Users' personal documents, including those available to others, will be deleted. To avoid this, you can configure data transfer:",
  errorDuringDeletion: "Error during deletion",
  deleteCompletedSuccessfully: "Deletion completed successfully",
  chooseTransfer: "Choose a user for everyone to whom data will be transferred by default",
  userTransfer: "Transfer data to",
  noRightsToDelete: "No rights to delete",
  transferInfo: "After clicking the “Delete” button, the data of the selected users will be transferred, and then these users will be permanently deleted.",
  transferInfoUser: "After clicking the “Delete” button, according to your settings, the user's data will be transferred first, and then the user will be permanently deleted.",
  addGroupOwner: "Add group owner",
  groupList: "Group List",
  notes: "Notes",
  noNotes: "No notes yet",
  chooseRange: "Choose Range",
  selectAll: "Select All",
  userNotFound: "User Not Found",
  actionList: {
    emailConfirmation: "Email Confirmation",
    changeStatus: "Change Status",
    locked: "Blocked",
    active: "Active",
    deleted: "Deleted",
    writeLetter: "Write Letter",
    changeDepartment: "Change organization",
    addRole: "Add Group",
    "delete": "Delete",
    editProfile: "Edit Profile",
    confirmEmail: "Confirm Email",
    unblock: "Unblock",
    loginAs: "Login As",
    block: "Block",
    terminateConnections: "Terminate Connections"
  },
  indicatorItems: {
    blocked: "Blocked",
    deleted: "Deleted",
    disabled: "Disabled",
    active: "Active",
    invited: "Invited"
  }
};
const quota = {
  size: "Quota Size",
  used: "Quota Used",
  usedSpace: "Used Space",
  errors: {
    required: "Please enter a quota name",
    size: "Please enter a size",
    type: "Quota must be a number",
    max: "Quota cannot exceed 1000 GB",
    positive: "Quota must be positive",
    wrongLink: "The link is incorrect"
  },
  deleteWarningText: "Are you sure you want to delete this quota relation?",
  deleteSuccess: "The quota relation was successfully deleted"
};
const entity = {
  type: {
    directory: "Folder",
    role: "Group",
    room: "Room",
    user: "User"
  }
};
const sendLetter = {
  successOne: "Letter successfully sent!",
  successMultiple: "Letters successfully sent!",
  oneEmailActivationSuccessMessage: "Activation email successfully sent",
  multipleEmailsActivationSuccessMessage: "Activation emails successfully sent",
  newLetter: "New Letter",
  subject: "Subject",
  subjectPlaceholder: "Enter the subject of the letter...",
  writeLetter: "Write Letter",
  confirmLetter: "Email Confirmation",
  showUsers: "Show list of selected users",
  sendActivationsDescription: "Users with unconfirmed email will receive an activation email.",
  sendWarning: "The email will be sent only to those users who have an email and have email distribution configured in their organization.",
  noSettings: "Not configured",
  params: "mailing parameters",
  sendActivationToEmail: "An email will be sent to <strong>{{ email }}</strong> for email confirmation.",
  errors: {
    notSent: "Error sending the email",
    noSubject: "Enter the subject of the email",
    noText: "Enter the text of the email",
    notConfigured: "No email server settings configured",
    noEmail: "No registered email address",
    emailNotActivated: "Email addresses are not activated"
  }
};
const requestsErrors = {
  objectNotFound: "Not found",
  objectIsNotActive: "Not active",
  noRights: "No rights",
  userIsExists: "User already exists",
  customerIsExists: "Organization already exists",
  emptyParameter: "Empty request",
  internalError: "Server error. Please try again later",
  badGateway: "Server technical issues",
  emptyCustomerName: "Specify the organization name",
  customerIsNotExists: "Organization does not exist",
  passwordNotChanges: "Password change failed",
  userIsNotExists: "User does not exist",
  parentNotSet: "Parent not set",
  notFoundAll: "Nothing found",
  emptyOrWhiteSpaceLogin: "Login cannot contain spaces and cannot be empty",
  emptyCustomer: "Organization name cannot be empty",
  notRightsForSuperAdmin: 'No rights. Cannot change status of a user with "Super-admin" role',
  notRightsForSelf: "No rights. Cannot change status of yourself",
  invalidLoginOrPassword: "Invalid account name or password",
  invalidPassword: "Invalid password",
  invalidEmailFormat: "Invalid email format",
  toManyRequests: "Exceeded request limit",
  notConfiguredCustomersEmail: "No email server settings configured",
  notSendEmail: "Error sending email",
  dontHaveEmail: "No registered email address",
  emailAlreadyActivated: "Email already activated",
  emailNotActivated: "Email not activated",
  inputEmptyEmail: "Email not specified.",
  notExistsMxRecords: "No MX records",
  cantCreateDomain: "Cannot bind domain",
  notFoundEmailServer: "No email server settings found",
  emailAlreadyLinked: "This email is already linked to another user",
  emailIsNotExists: "This email does not exist",
  notFoundImapFolder: "Imap folder not found",
  cantCreateEmail: "Failed to create email",
  cantLinkEmail: "Failed to link email",
  emailExists: "Email already exists",
  invalidEmail: "Invalid email",
  emailServerError: "Email server error",
  additionalEmailEqualsEmail: "Secondary email equals primary email",
  notConfiguredPasswordSecurity: "Password security settings not configured",
  incorrectPasswordSecurityMinLength: "Invalid minimum password length",
  notConfiguredCanRegisterCustomer: "Organization creation settings not configured",
  setupEmailSshIntegration: "Set up email SSH integration",
  noPackInstance: "Not applicable for this solution",
  notExistsEmailConfirmTemplate: "Email confirmation template not found",
  notSetCommandUrl: "Command link not set.",
  wrongCommonViewSettingsName: "Incorrect common view settings name.",
  roleNotFound: "Group not found",
  canNotDeleteAdminSuperAdmin: 'Cannot delete role "Admin" and "Super-admin"',
  canNotHaveParent: "Cannot add parent",
  selectCustomer: "Select organization",
  canNotSelfParent: "Cannot add yourself",
  emptyQuotaName: "Quota name cannot be empty",
  zeroQuotaSize: "Invalid quota size",
  longQuotaName: "Quota name is too long",
  notFoundQuota: "Quota not found",
  error: "Error",
  unknownError: "Something went wrong, please try again",
  inviteRegisterLinkNoValid: "Registration link is not valid",
  registerUserExists: "User is already registered",
  invalidRegistrationEmail: "Invalid email",
  customerHasUsers: "Cannot delete organization because it has associated users",
  userExistsByPhone: "Phone number already exists",
  userExistsByLogin: "Email already exists",
  userExistsByEmail: "User already registered with this email",
  notFoundLdapField: "One of the required fields in AD is not filled in",
  failLdapAuth: "Authentication error",
  maxFilialQuota: "Quota cannot exceed 2097151 GB",
  invalidPasswordRegister: "Invalid password",
  quotaRelationExists: "Quota assignment already exists",
  quotaRelationInvalidUrl: "The link is invalid",
  notFoundDirectory: "Directory not found",
  notFoundRole: "Group not found",
  notFoundRoom: "Room not found",
  notFoundUser: "User not found",
  noEqualsCustomers: "It is not possible to assign a quota to an entity from another organization"
};
const statistics = {
  load_csv: "Loading csv...",
  records: "records",
  records_: "records",
  from: "from",
  visitors: "Visitors",
  visitors_: "Visitors",
  authorizations: "Authorizations",
  authorizations_: "Authorizations",
  documents: "Documents",
  documents_create: "Documents created",
  files: "Files",
  files_create: "Files created",
  date: "Date",
  total: "Total",
  filial: "Organization",
  "export": "Export",
  downloadAndOpenReport: "Download and open report",
  user: "User",
  date_time: "Date and Time",
  date_action: "Action Date",
  action: "Event",
  search_by_name: "Search by name",
  space_used: "Space used",
  documents_count: "Number of documents",
  files_count: "Number of files",
  disk_space: "Disk space",
  another: "Other",
  dekstop: "Desktop",
  mobile: "Mobile",
  audit: "Audit Log",
  activity: "Activity",
  description: "Description",
  ip: "IP-Address",
  newValue: "New value",
  newValues: "New values",
  oldValue: "Old value",
  oldValues: "Old values",
  valuesActions: {
    None: "No value / not set",
    IsEnabled: "Enabled",
    PasswordEnterCount: "Number of password attempts",
    TokenDuration: "Token duration",
    IpList: "List of IP addresses",
    Login: "Login",
    Password: "Password",
    Server: "Server",
    Port: "Port",
    DN: "DN of the user directory",
    UseSsl: "Use SSL",
    UserFilter: "User filter",
    AccountFilter: "Account filter",
    GroupDn: "Group DN",
    GroupEnabled: "Enable group",
    GroupFilter: "Group filter",
    ReferralFollowing: "Follow referrals",
    LdapMappingBirthdate: "Date of birth",
    LdapMappingMail: "Email",
    LdapMappingFirstName: "First name",
    LdapMappingPhone: "Phone",
    LdapMappingPhone2: "Additional phone",
    LdapMappingPrincipalName: "PrincipalName",
    LdapMappingSecondName: "Last name",
    LdapMappingCity: "City",
    LdapMappingOrganization: "Organization",
    LdapMappingPosition: "Position",
    LdapMappingIsDeleted: "Deletion flag",
    LdapMappingMiddleName: "Middle name",
    LdapMappingTeamNumber: "Team number",
    LdapMappingLinkEmail: "Linked email",
    LdapMappingUid: "UID",
    LdapGroupMappingUid: "Group UID",
    LdapGroupMappingName: "Group name",
    LdapGroupMappingDescription: "Group description",
    LdapGroupMappingMember: "Group members"
  },
  actions: {
    ChangeTokenDuration: "Change token duration",
    PasswordEnterCount: "Password enter count",
    AdminIpWhiteList: "Admin IP white list",
    UserIpWhiteList: "User IP white list",
    ChangeLdapSettings: "Change LDAP settings",
    logOut: "Logout",
    successLogin: "Successful login",
    loadDoc: "Load document",
    errorAttempt: "Failed attempt",
    openDocExternalLink: "Open document by external link",
    openDoc: "Open document",
    editDoc: "Edit document",
    downloadDoc: "Download document",
    downloadDocLink: "Download document by link",
    createExternalLink: "Create external link",
    createDoc: "Create document",
    createLink: "Create link",
    deleteDocFromFolder: "Delete document from folder",
    deleteDocFromGlobalTrash: "Delete document from global trash",
    deleteDocFromTrash: "Delete document from trash",
    deleteFromFavorites: "Delete from favorites",
    deleteCalendar: "Delete calendar",
    deleteDirectory: "Delete directory",
    deleteEvent: "Delete event",
    moveDirectory: "Move directory",
    restoreDirectory: "Restore directory",
    documentMove: "Move document",
    accessToProject: "Grant access to project",
    accessToCalendar: "Grant access to calendar",
    accessToEvent: "Grant access to event",
    getDocList: "Get document list",
    addDocToFav: "Add document to favorites",
    addContactToFav: "Add contact to favorites",
    deleteUser: "Delete user",
    deleteUserWithTransfer: "Delete user with transfer"
  }
};
const commonSettings = {
  companyName: "Company Name",
  useAsLogo: "Use as Logo",
  logoConditions: "Maximum size 5 MB. Supported formats: png ({{width}} x {{height}} px), svg.",
  incorrectImageDimensions: "Image dimensions should be {{width}} x {{height}} px",
  incorrectImageExtension: "Invalid extension",
  mainLogo: "Main Logo",
  choosePhoto: "Choose Photo",
  notifications: "Notifications",
  systemNotification: "System Notification",
  imageUrl: "Image URL",
  updateUrl: "Update URL",
  title: "Title",
  textMessage: "Notification Text",
  updateDate: "Update Date",
  releaseDate: "Release Date",
  version: "Version",
  updateId: "Update ID"
};
const teams = {
  rabbitUser: "User RabbitMQ",
  rabbitPassword: "Password RabbitMQ",
  rabbitInfo: "To integrate R7-Command with Corporate Server 2024, create a user in RabbitMQ, according to the instructions"
};
const sso = {
  authMethod: "SOO's Settings",
  metadataIdP: "Metadata IdP (URL)",
  issuer: "Issuer (SP Entity ID)",
  signatureAlgorithm: "Signature Algorithm",
  certificateFile: "Certificate File",
  attachFile: "Attach File",
  currentFile: "Current file",
  selectedFile: "Selected file",
  certificatePassword: "Certificate Password",
  certificatePasswordRequiredForNewCert: "Required when uploading a new certificate",
  certificatePasswordTooltip: "Password is required when uploading a new certificate. For an existing certificate, the password is optional (the old password will be kept). If you specify a new password, it will be updated.",
  certificateValidationMode: "Certificate Validation Mode",
  validationModeNone: "None",
  validationModePeerTrust: "PeerTrust",
  validationModeChainTrust: "ChainTrust",
  validationModePeerOrChainTrust: "PeerOrChainTrust",
  validationModeCustom: "Custom",
  revocationMode: "Revocation Check",
  revocationModeNoCheck: "NoCheck",
  revocationModeOnline: "Online",
  revocationModeOffline: "Offline",
  authnContext: "Authentication Context",
  createUserOnFirstLogin: "Create user on first login",
  signAuthnRequest: "Sign AuthnRequest",
  loadError: "Error loading SSO settings",
  saveError: "Error saving SSO settings"
};
const license = {
  licenses: "Licenses",
  deactivated: "Deactivated",
  activated: "Activated",
  product: "Product",
  device: "Device",
  ipAddress: "IP-address",
  activationDate: "Activation Date",
  deactivationDate: "Deactivation Date",
  status: "Status",
  activate: "Activate",
  activeLicense: "Activated",
  deactiveLicense: "Deactivated",
  deactivate: "Deactivate",
  hostName: "Host name",
  activations: "Activations",
  activationSuccess: "License successfully activated",
  deactivationSuccess: "License successfully deactivated",
  noRecordsToShow: "No records to show",
  searchByPC: "Search by PC name",
  searchActivations: "Search activations",
  all: "All",
  active: "Active",
  noActive: "Not active",
  deactivateLicense: "Deactivation completed",
  activateLicense: "Activation completed",
  copied: "Copied to clipboard",
  editorDesktop: "Desktop Editor",
  auroraDesktop: "Aurora Desktop",
  organiser: "Organizer",
  organiserPro: "Organizer Pro",
  desktopDraw: "Desktop Graphics"
};
const notFound = {
  "404": "The page you are trying to open does not exist. You may have made a mistake in the address or the page has been moved to a different URL",
  error: "Something's wrong...",
  description: "The page you are trying to access does not exist. Perhaps you mistyped the address or the page has been moved to another URL. If you believe this is an error, please contact support.",
  back: "Back to Home Page",
  somethingWrong: "Something's wrong",
  tryAgain: "Try reloading the page or come back later",
  reload: "Reload Page"
};
const errors = {
  positive: "Must be positive",
  maxValue: "Must be less than 65536",
  enterServer: "Enter server",
  enterPassword: "Enter password",
  enterDomain: "Enter domain",
  enterFilter: "Enter user filter",
  enterGeneralName: "Enter general name",
  enterName: "Enter name",
  enterLastName: "Enter last name",
  enterDn: "Enter DN group catalog",
  enterGroupFilter: "Enter group filter",
  enterId: "Enter identifier",
  enterUserId: "Enter user identifier",
  enterPop: "Enter POP server",
  enterImap: "Enter IMAP server",
  enterSmtp: "Enter SMTP server",
  addDomains: "Enter domains",
  accessError: "Access error",
  doNotAccessToModule: "You do not have access to the module {{module}}",
  serverNoResponse: "Server did not respond",
  somethingWentWrong: "Something went wrong, please try again",
  somethingHappened: "Something happened, please reload the page or try again",
  componentError: "Component error",
  loadError: "Load error",
  addError: "Add error",
  deleteError: "Delete error"
};
const notifications = {
  success: {
    saved: "Saved",
    createdMailAccount: "Mail account successfully created",
    linkedMailAccount: "Mail account successfully linked"
  },
  errors: {
    integrationNotConfigured: "Integration not configured"
  }
};
const timezones = {
  "Africa/Abidjan": "Abidjan",
  "Africa/Algiers": "Algiers",
  "Africa/Bissau": "Bissau",
  "Africa/Cairo": "Cairo",
  "Africa/Casablanca": "Casablanca",
  "Africa/Ceuta": "Ceuta",
  "Africa/El_Aaiun": "El-Aaiun",
  "Africa/Johannesburg": "Johannesburg",
  "Africa/Juba": "Juba",
  "Africa/Khartoum": "Khartoum",
  "Africa/Lagos": "Lagos",
  "Africa/Maputo": "Maputo",
  "Africa/Monrovia": "Monrovia",
  "Africa/Nairobi": "Nairobi",
  "Africa/Ndjamena": "Ndjamena",
  "Africa/Sao_Tome": "Sao Tome",
  "Africa/Tripoli": "Tripoli",
  "Africa/Tunis": "Tunis",
  "Africa/Windhoek": "Windhoek",
  "America/Adak": "Adak",
  "America/Anchorage": "Anchorage",
  "America/Araguaina": "Araguaina",
  "America/Argentina/Buenos_Aires": "Buenos Aires",
  "America/Argentina/Catamarca": "Catamarca",
  "America/Argentina/Cordoba": "Cordoba",
  "America/Argentina/Jujuy": "Jujuy",
  "America/Argentina/La_Rioja": "La Rioja",
  "America/Argentina/Mendoza": "Mendoza",
  "America/Argentina/Rio_Gallegos": "Rio Gallegos",
  "America/Argentina/Salta": "Salta",
  "America/Argentina/San_Juan": "San Juan",
  "America/Argentina/San_Luis": "San Luis",
  "America/Argentina/Tucuman": "Tucuman",
  "America/Argentina/Ushuaia": "Ushuaia",
  "America/Asuncion": "Asuncion",
  "America/Bahia": "Bahia",
  "America/Bahia_Banderas": "Bahia de Banderas",
  "America/Barbados": "Barbados",
  "America/Belem": "Belem",
  "America/Belize": "Belize",
  "America/Boa_Vista": "Boa Vista",
  "America/Bogota": "Bogota",
  "America/Boise": "Boise",
  "America/Cambridge_Bay": "Cambridge Bay",
  "America/Campo_Grande": "Campo Grande",
  "America/Cancun": "Cancun",
  "America/Caracas": "Caracas",
  "America/Cayenne": "Cayenne",
  "America/Chicago": "Chicago",
  "America/Chihuahua": "Chihuahua",
  "America/Ciudad_Juarez": "Ciudad Juarez",
  "America/Costa_Rica": "Costa Rica",
  "America/Cuiaba": "Cuiaba",
  "America/Danmarkshavn": "Danmarkshavn",
  "America/Dawson": "Dawson",
  "America/Dawson_Creek": "Dawson Creek",
  "America/Denver": "Denver",
  "America/Detroit": "Detroit",
  "America/Edmonton": "Edmonton",
  "America/Eirunepe": "Eirunepe",
  "America/El_Salvador": "El Salvador",
  "America/Fort_Nelson": "Fort Nelson",
  "America/Fortaleza": "Fortaleza",
  "America/Glace_Bay": "Glace Bay",
  "America/Goose_Bay": "Goose Bay",
  "America/Grand_Turk": "Grand Turk",
  "America/Guatemala": "Guatemala",
  "America/Guayaquil": "Guayaquil",
  "America/Guyana": "Guyana",
  "America/Halifax": "Halifax",
  "America/Havana": "Havana",
  "America/Hermosillo": "Hermosillo",
  "America/Indiana/Indianapolis": "Indianapolis",
  "America/Indiana/Knox": "Knox",
  "America/Indiana/Marengo": "Marengo",
  "America/Indiana/Petersburg": "Petersburg",
  "America/Indiana/Tell_City": "Tell City",
  "America/Indiana/Vevay": "Vevay",
  "America/Indiana/Vincennes": "Vincennes",
  "America/Indiana/Winamac": "Winamac",
  "America/Inuvik": "Inuvik",
  "America/Iqaluit": "Iqaluit",
  "America/Jamaica": "Jamaica",
  "America/Juneau": "Juneau",
  "America/Kentucky/Louisville": "Louisville",
  "America/Kentucky/Monticello": "Monticello",
  "America/La_Paz": "La Paz",
  "America/Lima": "Lima",
  "America/Los_Angeles": "Los Angeles",
  "America/Maceio": "Maceio",
  "America/Managua": "Managua",
  "America/Manaus": "Manaus",
  "America/Martinique": "Martinique",
  "America/Matamoros": "Matamoros",
  "America/Mazatlan": "Mazatlan",
  "America/Menominee": "Menominee",
  "America/Merida": "Merida",
  "America/Metlakatla": "Metlakatla",
  "America/Mexico_City": "Mexico City",
  "America/Miquelon": "Miquelon",
  "America/Moncton": "Moncton",
  "America/Monterrey": "Monterrey",
  "America/Montevideo": "Montevideo",
  "America/New_York": "New York",
  "America/Nipigon": "Nipigon",
  "America/Nome": "Nome",
  "America/Noronha": "Noronha",
  "America/North_Dakota/Beulah": "Beulah",
  "America/North_Dakota/Center": "Center",
  "America/North_Dakota/New_Salem": "New Salem",
  "America/Nuuk": "Nuuk",
  "America/Ojinaga": "Ojinaga",
  "America/Panama": "Panama",
  "America/Pangnirtung": "Pangnirtung",
  "America/Paramaribo": "Paramaribo",
  "America/Phoenix": "Phoenix",
  "America/Port-au-Prince": "Port-au-Prince",
  "America/Porto_Velho": "Porto Velho",
  "America/Puerto_Rico": "Puerto Rico",
  "America/Punta_Arenas": "Punta Arenas",
  "America/Rainy_River": "Rainy River",
  "America/Rankin_Inlet": "Rankin Inlet",
  "America/Recife": "Recife",
  "America/Regina": "Regina",
  "America/Resolute": "Resolute",
  "America/Rio_Branco": "Rio Branco",
  "America/Santarem": "Santarem",
  "America/Santiago": "Santiago",
  "America/Santo_Domingo": "Santo Domingo",
  "America/Sao_Paulo": "Sao Paulo",
  "America/Scoresbysund": "Scoresbysund",
  "America/Sitka": "Sitka",
  "America/St_Johns": "St. Johns",
  "America/Swift_Current": "Swift Current",
  "America/Tegucigalpa": "Tegucigalpa",
  "America/Thule": "Thule",
  "America/Thunder_Bay": "Thunder Bay",
  "America/Tijuana": "Tijuana",
  "America/Toronto": "Toronto",
  "America/Vancouver": "Vancouver",
  "America/Whitehorse": "Whitehorse",
  "America/Winnipeg": "Winnipeg",
  "America/Yakutat": "Yakutat",
  "America/Yellowknife": "Yellowknife",
  "Antarctica/Casey": "Casey",
  "Antarctica/Davis": "Davis",
  "Antarctica/Macquarie": "Macquarie",
  "Antarctica/Mawson": "Mawson",
  "Antarctica/Palmer": "Palmer",
  "Antarctica/Rothera": "Rothera",
  "Antarctica/Troll": "Troll",
  "Antarctica/Vostok": "Vostok",
  "Asia/Almaty": "Almaty",
  "Asia/Amman": "Amman",
  "Asia/Anadyr": "Anadyr",
  "Asia/Aqtau": "Aktau",
  "Asia/Aqtobe": "Aktobe",
  "Asia/Ashgabat": "Ashgabat",
  "Asia/Atyrau": "Atyrau",
  "Asia/Baghdad": "Baghdad",
  "Asia/Baku": "Baku",
  "Asia/Bangkok": "Bangkok",
  "Asia/Barnaul": "Barnaul",
  "Asia/Beirut": "Beirut",
  "Asia/Bishkek": "Bishkek",
  "Asia/Brunei": "Brunei",
  "Asia/Chita": "Chita",
  "Asia/Choibalsan": "Choibalsan",
  "Asia/Colombo": "Colombo",
  "Asia/Damascus": "Damascus",
  "Asia/Dhaka": "Dhaka",
  "Asia/Dili": "Dili",
  "Asia/Dubai": "Dubai",
  "Asia/Dushanbe": "Dushanbe",
  "Asia/Famagusta": "Famagusta",
  "Asia/Gaza": "Gaza",
  "Asia/Hebron": "Hebron",
  "Asia/Ho_Chi_Minh": "Ho Chi Minh",
  "Asia/Hong_Kong": "Hong Kong",
  "Asia/Hovd": "Hovd",
  "Asia/Irkutsk": "Irkutsk",
  "Asia/Jakarta": "Jakarta",
  "Asia/Jayapura": "Jayapura",
  "Asia/Jerusalem": "Jerusalem",
  "Asia/Kabul": "Kabul",
  "Asia/Kamchatka": "Kamchatka",
  "Asia/Karachi": "Karachi",
  "Asia/Kathmandu": "Kathmandu",
  "Asia/Khandyga": "Khandyga",
  "Asia/Kolkata": "Kolkata",
  "Asia/Krasnoyarsk": "Krasnoyarsk",
  "Asia/Kuala_Lumpur": "Kuala Lumpur",
  "Asia/Kuching": "Kuching",
  "Asia/Macau": "Macau",
  "Asia/Magadan": "Magadan",
  "Asia/Makassar": "Makassar",
  "Asia/Manila": "Manila",
  "Asia/Nicosia": "Nicosia",
  "Asia/Novokuznetsk": "Novokuznetsk",
  "Asia/Novosibirsk": "Novosibirsk",
  "Asia/Omsk": "Omsk",
  "Asia/Oral": "Oral",
  "Asia/Pontianak": "Pontianak",
  "Asia/Pyongyang": "Pyongyang",
  "Asia/Qatar": "Qatar",
  "Asia/Qostanay": "Qostanay",
  "Asia/Qyzylorda": "Qyzylorda",
  "Asia/Riyadh": "Riyadh",
  "Asia/Sakhalin": "Sakhalin",
  "Asia/Samarkand": "Samarkand",
  "Asia/Seoul": "Seoul",
  "Asia/Shanghai": "Shanghai",
  "Asia/Singapore": "Singapore",
  "Asia/Srednekolymsk": "Srednekolymsk",
  "Asia/Taipei": "Taipei",
  "Asia/Tashkent": "Tashkent",
  "Asia/Tbilisi": "Tbilisi",
  "Asia/Tehran": "Tehran",
  "Asia/Thimphu": "Thimphu",
  "Asia/Tokyo": "Tokyo",
  "Asia/Tomsk": "Tomsk",
  "Asia/Ulaanbaatar": "Ulaanbaatar",
  "Asia/Urumqi": "Urumqi",
  "Asia/Ust-Nera": "Ust-Nera",
  "Asia/Vladivostok": "Vladivostok",
  "Asia/Yakutsk": "Yakutsk",
  "Asia/Yangon": "Yangon",
  "Asia/Yekaterinburg": "Yekaterinburg",
  "Asia/Yerevan": "Yerevan",
  "Atlantic/Azores": "Azores",
  "Atlantic/Bermuda": "Bermuda",
  "Atlantic/Canary": "Canary",
  "Atlantic/Cape_Verde": "Cape Verde",
  "Atlantic/Faroe": "Faroe",
  "Atlantic/Madeira": "Madeira",
  "Atlantic/Reykjavik": "Reykjavik",
  "Atlantic/South_Georgia": "South Georgia",
  "Atlantic/Stanley": "Stanley",
  "Australia/Adelaide": "Adelaide",
  "Australia/Brisbane": "Brisbane",
  "Australia/Broken_Hill": "Broken Hill",
  "Australia/Darwin": "Darwin",
  "Australia/Eucla": "Eucla",
  "Australia/Hobart": "Hobart",
  "Australia/Lindeman": "Lindeman",
  "Australia/Lord_Howe": "Lord Howe",
  "Australia/Melbourne": "Melbourne",
  "Australia/Perth": "Perth",
  "Australia/Sydney": "Sydney",
  "Etc/UTC": "Coordinated Universal Time",
  "Europe/Amsterdam": "Amsterdam",
  "Europe/Andorra": "Andorra",
  "Europe/Astrakhan": "Astrakhan",
  "Europe/Athens": "Athens",
  "Europe/Belgrade": "Belgrade",
  "Europe/Berlin": "Berlin",
  "Europe/Brussels": "Brussels",
  "Europe/Bucharest": "Bucharest",
  "Europe/Budapest": "Budapest",
  "Europe/Chisinau": "Chisinau",
  "Europe/Copenhagen": "Copenhagen",
  "Europe/Dublin": "Dublin",
  "Europe/Gibraltar": "Gibraltar",
  "Europe/Helsinki": "Helsinki",
  "Europe/Istanbul": "Istanbul",
  "Europe/Kaliningrad": "Kaliningrad",
  "Europe/Kyiv": "Kyiv",
  "Europe/Kiyv": "Kyiv",
  "Europe/Kirov": "Kirov",
  "Europe/Lisbon": "Lisbon",
  "Europe/London": "London",
  "Europe/Luxembourg": "Luxembourg",
  "Europe/Madrid": "Madrid",
  "Europe/Malta": "Malta",
  "Europe/Minsk": "Minsk",
  "Europe/Monaco": "Monaco",
  "Europe/Moscow": "Moscow",
  "Europe/Oslo": "Oslo",
  "Europe/Paris": "Paris",
  "Europe/Prague": "Prague",
  "Europe/Riga": "Riga",
  "Europe/Rome": "Rome",
  "Europe/Samara": "Samara",
  "Europe/Saratov": "Saratov",
  "Europe/Simferopol": "Simferopol",
  "Europe/Sofia": "Sofia",
  "Europe/Stockholm": "Stockholm",
  "Europe/Tallinn": "Tallinn",
  "Europe/Tirane": "Tirane",
  "Europe/Ulyanovsk": "Ulyanovsk",
  "Europe/Vienna": "Vienna",
  "Europe/Vilnius": "Vilnius",
  "Europe/Volgograd": "Volgograd",
  "Europe/Warsaw": "Warsaw",
  "Europe/Zurich": "Zurich",
  "Indian/Chagos": "Chagos",
  "Indian/Christmas": "Christmas",
  "Indian/Cocos": "Cocos Islands",
  "Indian/Kerguelen": "Kerguelen",
  "Indian/Mahe": "Mahe",
  "Indian/Maldives": "Maldives",
  "Indian/Mauritius": "Mauritius",
  "Indian/Reunion": "Reunion",
  "Pacific/Apia": "Apia",
  "Pacific/Auckland": "Auckland",
  "Pacific/Bougainville": "Bougainville",
  "Pacific/Chatham": "Chatham",
  "Pacific/Enderbury": "Enderbury",
  "Pacific/Fakaofo": "Fakaofo",
  "Pacific/Fiji": "Fiji",
  "Pacific/Funafuti": "Funafuti",
  "Pacific/Galapagos": "Galapagos",
  "Pacific/Gambier": "Gambier",
  "Pacific/Guadalcanal": "Guadalcanal",
  "Pacific/Guam": "Guam",
  "Pacific/Honolulu": "Hawaii",
  "Pacific/Marquesas": "Marquesas",
  "Pacific/Porto_Velho": "Porto Velho",
  "Pacific/Efate": "Efate",
  "Pacific/Easter": "Easter",
  "Pacific/Port_Moresby": "Port Moresby",
  "Pacific/Noumea": "Noumea",
  "Pacific/Chuuk": "Chuuk",
  "Pacific/Pohnpei": "Pohnpei",
  "Pacific/Majuro": "Majuro",
  "Pacific/Kanton": "Kanton",
  "Pacific/Kwajalein": "Kwajalein",
  "Pacific/Johnston": "Johnston",
  "Pacific/Kiritimati": "Kiritimati",
  "Pacific/Kosrae": "Kosrae",
  "Pacific/Nauru": "Nauru",
  "Pacific/Niue": "Niue",
  "Pacific/Norfolk": "Norfolk",
  "Pacific/Pago_Pago": "Pago Pago",
  "Pacific/Palau": "Palau",
  "Pacific/Pitcairn": "Pitcairn",
  "Pacific/Rarotonga": "Rarotonga",
  "Pacific/Saipan": "Saipan",
  "Pacific/Tahiti": "Tahiti",
  "Pacific/Tarawa": "Tarawa",
  "Pacific/Tongatapu": "Tongatapu",
  "Pacific/Wake": "Wake",
  "Pacific/Wallis": "Wallis",
  "Pacific/Whangarei": "Whangarei"
};
const CustomLinks = {
  title: "Modules and Menu",
  description: "Configure access to each module, service, or integration in their settings — by groups or individual users. The order defined in this list is displayed on the main page and in the module selection menu.",
  addLink: "Add Link",
  types: {
    module: "Module",
    integration: "Integration",
    link: "Link"
  },
  table: {
    name: "Name",
    type: "Type"
  },
  modal: {
    add: "Add Link",
    edit: "Module Settings",
    type: "Type",
    typePlaceholder: "Select type",
    module: "Module",
    modulePlaceholder: "Select module",
    url: "URL address",
    urlPlaceholder: "Enter URL address",
    enName: "English Name",
    ruName: "Russian Name",
    namePlaceholder: "Enter name",
    title: "Title",
    titlePlaceholder: "Enter module title",
    icon: "Icon (svg or jpg, png from 256x256 px)",
    uploadImage: "Upload image",
    systemIcon: "Default module icon",
    accessTitle: "Module access",
    accessDescription: "Grant access to the module for groups or individual users of the organization. Users with access will see the module in the menu.",
    addGroup: "Add group",
    groupPlaceholder: "Select groups",
    addUser: "Add user",
    userPlaceholder: "Select users",
    saveButton: "Save",
    updateButton: "Update",
    cancelButton: "Cancel",
    errorTitle: "Error",
    requiredFields: "Please fill in all required fields",
    validation: {
      moduleRequired: "Please select a module",
      titleRuRequired: "Please enter a Russian title",
      titleEnRequired: "Please enter an English title",
      iconRequired: "Please upload an icon",
      invalidUrl: "Enter a valid URL (e.g. https://example.com)"
    },
    charsLeft: "Remaining: {{count}} chars",
    invalidImageFormat: "Invalid image format. Please upload SVG, JPG or PNG file.",
    invalidImageSize: "Image dimensions must be between 256x256 and 512x512 pixels.",
    invalidImage: "Failed to load image. Please try another file."
  },
  deleteModal: {
    title: "Delete Link",
    message: "Are you sure you want to delete «{{name}}»?",
    confirmButton: "Delete",
    cancelButton: "Cancel"
  },
  notifications: {
    createSuccess: "Module successfully added",
    updateSuccess: "Module successfully updated",
    deleteSuccess: "Module successfully deleted",
    orderSuccess: "Module order successfully updated"
  },
  errors: {
    loadFailed: "Failed to load modules list",
    saveFailed: "Failed to save module",
    deleteFailed: "Failed to delete module",
    orderFailed: "Failed to update module order"
  }
};
const ShareLinks = {
  title: "External Links",
  isDisabled: "Prohibit creating external links?",
  isEnabledRules: "Enable exception rules?",
  addRule: "Add exception",
  RulesTable: {
    roles: "Groups",
    password: "Password",
    expirationDate: "Expiration Date",
    folderType: "Folder Type",
    accessLevel: "Access Level",
    Cells: {
      Password: {
        requiredCount: "{{count}} hours",
        required: "Required",
        optional: "Optional",
        requirements: "Requirements",
        lowercase: "Lowercase letter",
        uppercase: "Uppercase letter",
        digit: "Digit"
      },
      FolderType: {
        myDocuments: "My Documents",
        sharedFolder: "Shared Folder",
        room: "Room",
        unknownType: "Unknown Type",
        notLimited: "No Restrictions"
      },
      Period: {
        unlimited: "Unlimited",
        limited: "Limited",
        hours: "{{count}} h"
      },
      AccessType: {
        noRestrictions: "No Restrictions",
        onlyUpload: "Only Upload",
        read: "Read",
        comment: "Comment",
        write: "Write",
        unknown: "Unknown Type"
      }
    }
  },
  RulesPopUp: {
    createTitle: "Rule Settings",
    editTitle: "Rule Settings",
    roles: "Groups",
    chooseRoles: "Choose groups",
    roleError: "Select at least one group",
    password: "Password",
    optional: "Optional",
    required: "Required",
    minPasswordLength: "Minimum password length",
    includeLowercase: "Include lowercase letter",
    includeUppercase: "Include uppercase letter",
    includeNumber: "Include digit",
    expirationDate: "Expiration Date",
    unlimited: "No Restrictions",
    limit: "Restrict",
    limited: "Restrict",
    expirationTime: "Max expiration time (in hours)",
    folderType: "Folder Type",
    folderTypeError: "Select at least one folder type",
    myDocuments: "My Documents",
    commonFolder: "Shared Folder",
    room: "Room",
    create: "Create",
    edit: "Edit",
    cancel: "Cancel",
    accessLevel: "Access Level",
    noRestrictions: "No Restrictions",
    restrictAccess: "Restrict",
    accessLevelError: "Select at least one access level",
    onlyUpload: "Only Upload",
    read: "Read",
    comment: "Comment",
    write: "Write"
  },
  helper: "Specify exceptions for which users can create external links.",
  description: "You can restrict creating external links to files and documents in the 'Disk' module.\n        You can create exception rules that allow users to create external links with\n        specific requirements for groups, passwords, expiration dates, and locations."
};
const SettingSIEMSystem = {
  title: "SIEM System Configuration via Syslog Protocol",
  turnOn: "Enable",
  turnOff: "Disable",
  host: "Host",
  port: "Port",
  format: "Used Format",
  save: "Save",
  notificationTitle: "SIEM System Settings",
  success: "Saved",
  error: "Unable to apply settings, please contact the administrator"
};
const RestrictRoomsByRoles = {
  title: "Room Creation Permission",
  description: "Specify the groups allowed to create rooms",
  addRole: "Add Group",
  RulesRestrictionPopUp: {
    roles: "Groups",
    title: "Add Group",
    chooseRoles: "Select groups",
    cancel: "Cancel",
    save: "Save"
  }
};
const unknown$2 = "Unknown";
const notificationSetting$2 = {
  Off: "Off",
  All: "All modules",
  Self: "This module"
};
const accessType$2 = {
  Deny: "Deny",
  OnlyUpload: "Upload Only",
  FreeBusy: "Free/Busy",
  CanDownload: "Can Download",
  Read: "Read",
  Comment: "Comment",
  Review: "Review",
  Write: "Write",
  Delete: "Delete",
  FullInternal: "Full Internal",
  Full: "Full",
  Lock: "Lock",
  LockPrint: "Lock Print",
  LockCopy: "Lock Copy",
  LockDownload: "Lock Download"
};
const module$3 = {
  Admin: "Admin",
  Disk: "Disk",
  Projects: "Projects",
  Calendar: "Calendar",
  Mail: "Mail",
  Contacts: "Contacts"
};
const notificationSettingType$1 = {
  RoleChange: "Role Change",
  Login: "Login from another device",
  TaskChange: "Task changes in sprint",
  AssignedTaskChange: "Changes in tasks assigned to you",
  TaskAssign: "Task assignment",
  CommentMention: "Mention in comments",
  ProjectAccess: "Project access",
  SprintCreated: "New sprint created",
  NewMessage: "New incoming message",
  ReplyToImportantMessage: "Reply to important message",
  DiskCommentMention: "Mention in comments",
  DiskAccess: "Access granted",
  DiskFull: "Disk space is running out",
  AvailableDocumentChange: "Changes in available documents",
  MyDocumentChange: "Changes in my documents",
  UpcomingEvent: "Upcoming event notification",
  EventInvite: "Event invitation",
  EventUpcomingNotification: "Event approaching",
  EventChange: "Event changes in your calendar or where you are a participant",
  SharedEventChange: "Event changes in shared calendars",
  CalendarShared: "Calendar access granted"
};
const userStatus = {
  Active: "Active",
  Blocked: "Blocked"
};
const roleType = {
  User: "User",
  Admin: "Admin",
  SuperUser: "Super Admin",
  Guest: "Guest",
  All: "All",
  Support: "Support"
};
const userAction = {
  Logout: "Logout",
  SuccessLogin: "Successful login",
  LoadDoc: "Load document",
  ErrorAttempt: "Failed attempt",
  OpenDocExternalLink: "Open document by external link",
  OpenDoc: "Open document",
  EditDoc: "Edit document",
  DownloadDoc: "Download document",
  DownloadDocLink: "Download document by link",
  CreateExternalLink: "Create external link",
  CreateDoc: "Create document",
  CreateLink: "Create link",
  DeleteDocFromFolder: "Delete document from folder",
  DeleteDocFromGlobalTrash: "Delete document from global trash",
  DeleteDocFromTrash: "Delete document from trash",
  DeleteFromFavorites: "Delete from favorites",
  DeleteCalendar: "Delete calendar",
  DeleteDirectory: "Delete directory",
  DeleteEvent: "Delete event",
  MoveDirectory: "Move directory",
  RestoreDirectory: "Restore directory",
  DocumentMove: "Move document",
  AccessToProject: "Grant access to project",
  AccessToCalendar: "Grant access to calendar",
  AccessToEvent: "Grant access to event",
  GetDocList: "Get document list",
  AddDocToFav: "Add document to favorites",
  AddContactToFav: "Add contact to favorites",
  DeleteUser: "Delete user",
  DeleteUserWithTransfer: "Delete user with transfer",
  ChangeTokenDuration: "Change token duration",
  PasswordEnterCount: "Password enter count",
  AdminIpWhiteList: "Admin IP white list",
  UserIpWhiteList: "User IP white list",
  ChangeLdapSettings: "Change LDAP settings"
};
const dlp = {
  title: "ICAP Server Integration",
  connectionName: "Connection Name",
  activity: "Activity",
  addIntegration: "Add Integration",
  editIntegration: "Edit Integration",
  createIntegration: "Add Integration",
  deleteIntegrationTitle: "Delete Integration",
  deleteIntegrationConfirm: "Are you sure you want to delete this integration?",
  "delete": "Delete",
  cancel: "Cancel",
  create: "Create",
  save: "Save",
  success: "Success",
  error: "Error",
  loading: "Loading",
  loadError: "Load Error",
  loadErrorMessage: "Failed to load integrations list",
  deleteSuccess: "Integration successfully deleted",
  deleteError: "Failed to delete integration",
  createSuccess: "Integration successfully created",
  updateSuccess: "Integration successfully updated",
  saveError: "Failed to save integration",
  toggleSuccess: "Integration {{action}}",
  enabled: "enabled",
  disabled: "disabled",
  toggleError: "Failed to change integration state",
  accessDenied: "Access Denied",
  accessDeniedMessage: "Your account doesn't have access to DLP/Antivirus settings. Please contact your administrator for the necessary permissions.",
  form: {
    title: "Integration with Antivirus and DLP Systems",
    name: "Connection Name",
    type: "Type",
    host: "Address",
    port: "Port",
    respmodService: "RESPMOD Service Path",
    reqmodService: "REQMOD Service Path",
    additionalServers: "Additional Servers",
    addServer: "Add Server",
    timeoutsAndAttempts: "Timeouts and Attempts",
    connectTimeout: "Connection Timeout, ms",
    writeTimeout: "Write Timeout, ms",
    readTimeout: "Read Timeout, ms",
    resultTimeout: "Total Response Timeout, ms",
    attempts: "Number of Attempts",
    backoff: "Interval Between Attempts, ms",
    maxConnections: "Maximum Number of Connections",
    onTimeout: "Behavior on Timeout",
    onTimeoutBlock: "Block",
    onTimeoutAllow: "Allow",
    onTimeoutQuarantine: "Quarantine",
    scanConditions: "Scan Conditions",
    scanUpload: "On Upload",
    scanDownload: "On Download",
    scanShareInternal: "When Granting Access to Internal User",
    scanShareGuest: "When Granting Access to Guest",
    scanExternalLink: "When Creating External Link",
    fileTypeFiltering: "File Type Filtering",
    fileTypesMode: "Filtering Mode",
    fileTypeModeOff: "Off",
    fileTypeModeAllowList: "Allow List",
    fileTypeModeDenyList: "Deny List",
    allowedExt: "Allowed Extensions, comma-separated",
    blockedExt: "Blocked Extensions, comma-separated",
    allowedMime: "Allowed MIME, comma-separated",
    blockedMime: "Blocked MIME, comma-separated",
    restrictionsAndSettings: "Restrictions and Additional Settings",
    maxFileSizeMb: "Maximum File Size, MB",
    whenDownWaitMs: "Pause When Service Unavailable, ms",
    maxMessageSizeKb: "ICAP Message Size Limit, KB",
    skipOnIcapErrors: "Skip Checks on ICAP Errors",
    cachingAndHashing: "Caching and Hashing",
    hashTtlMinutes: "Hash Time to Live, min",
    useHashCache: "Use Hash Cache",
    headersAndMetadata: "Headers and Metadata",
    headerFileName: "File Name",
    headerFileSize: "Size in Bytes",
    headerFileId: "File ID",
    headerFileHash: "File Hash",
    headerRecipientEmail: "Recipient Email",
    headerUserEmail: "Current User Email",
    headerRoleId: "Role ID",
    headerRoleName: "Role Name",
    headerRoleType: "Role Type",
    saveButton: "Save",
    createButton: "Create",
    cancelButton: "Cancel"
  },
  server: {
    add: "Add Server",
    edit: "Edit Server",
    host: "Address",
    port: "Port",
    hostPlaceholder: "Enter address",
    portPlaceholder: "Enter port",
    respmodService: "RESPMOD Service Path",
    reqmodService: "REQMOD Service Path",
    respmodPlaceholder: "/respmod",
    reqmodPlaceholder: "/reqmod",
    saveButton: "Add",
    updateButton: "Save",
    cancelButton: "Cancel",
    tableAddress: "Address",
    tablePort: "Port",
    tableReqmod: "REQMOD",
    tableRespmod: "RESPMOD",
    tableActions: "Actions"
  },
  validation: {
    nameRequired: "Connection name is required",
    hostRequired: "Address is required",
    hostInvalid: "Invalid address (expected IP address or domain name)",
    portRequired: "Port is required",
    portInvalid: "Invalid port",
    pathMustStartWithSlash: "Path must start with /",
    max5Minutes: "Maximum 5 minutes",
    max10Minutes: "Maximum 10 minutes",
    max100Attempts: "Maximum 100 attempts",
    max1Minute: "Maximum 1 minute",
    max1Hour: "Maximum 1 hour",
    range1To10000: "Must be between 1 and 10000",
    maxFileSizeRange: "Must be between 0 and 10240 MB (10 GB)",
    messageSizeNonNegative: "Message size cannot be negative",
    selectAtLeastOneScanCondition: "Select at least one scan condition",
    allowListRequiresExtOrMime: "For allow list, specify allowed extensions or MIME types",
    denyListRequiresExtOrMime: "For deny list, specify blocked extensions or MIME types",
    hashCacheRequiresTtl: "When using cache, specify hash time to live (greater than 0)",
    uploadScanRequiresReqmod: "For upload scanning, specify REQMOD path",
    downloadScanRequiresRespmod: "For download/sharing scanning, specify RESPMOD path"
  },
  validationError: "Validation Error",
  validationErrorMessage: "Please fill all required fields correctly",
  saveErrorMessage: "Failed to save integration",
  additionalServersRequireService: "For additional servers, specify at least one service path (REQMOD or RESPMOD)"
};
const userGender = {
  NotSpecified: "Not specified",
  Male: "Male",
  Female: "Female"
};
const storagePage = {
  title: "Storages",
  searchPlaceholder: "Search storage",
  createButton: "Create",
  migrationProgressError: "Migration failed. Please try again.",
  migrationProgressRetry: "Retry",
  migrationProgressCancel: "Back",
  table: {
    nameHeader: "Name",
    typeHeader: "Type",
    activityHeader: "Activity",
    migrationProgress: "Data transfer in progress"
  },
  storageTypes: {
    s3: "S3",
    fileStorage: "File Storage",
    s3Encrypted: "S3 Encrypted",
    fileStorageEncrypted: "File Storage Encrypted",
    unknown: "Unknown"
  },
  statuses: {
    "default": "Default",
    available: "Available",
    active: "Active",
    disabled: "Disabled",
    error: "Error"
  },
  createDialog: {
    title: "Create Storage",
    nameLabel: "Name",
    namePlaceholder: "Name",
    typeLabel: "Storage Type",
    typePlaceholder: "Storage Type",
    s3KeyLabel: "Key",
    s3KeyPlaceholder: "Enter key",
    s3SecretLabel: "Secret",
    s3SecretPlaceholder: "Enter secret",
    s3SystemNameLabel: "System Name",
    s3SystemNamePlaceholder: "Enter system name",
    s3BucketLabel: "Bucket",
    s3BucketPlaceholder: "Enter bucket name",
    s3UrlLabel: "URL",
    s3UrlPlaceholder: "Enter URL",
    fsUrlLabel: "Path",
    fsUrlPlaceholder: "Enter storage path",
    enableEncryption: "Enable encryption",
    validateButton: "Validate",
    validationSuccess: "Validation successful",
    createButton: "Create",
    cancelButton: "Cancel",
    tooltips: {
      fillRequiredFields: "Fill in all required fields",
      validateFirst: "Please validate first"
    }
  },
  editDialog: {
    title: "Edit Storage",
    nameLabel: "Name",
    namePlaceholder: "Name",
    typeLabel: "Storage Type",
    typePlaceholder: "Storage Type",
    s3KeyLabel: "Key",
    s3KeyPlaceholder: "Enter key",
    s3SecretLabel: "Secret",
    s3SecretPlaceholder: "Enter secret",
    s3SystemNameLabel: "System Name",
    s3SystemNamePlaceholder: "Enter system name",
    s3BucketLabel: "Bucket",
    s3BucketPlaceholder: "Enter bucket name",
    s3UrlLabel: "URL",
    s3UrlPlaceholder: "Enter URL",
    fsUrlLabel: "Path",
    fsUrlPlaceholder: "Enter storage path",
    enableEncryption: "Enable encryption",
    saveButton: "Save",
    cancelButton: "Cancel",
    tooltips: {
      fillRequiredFields: "Fill in all required fields",
      editingDisabled: "Editing storages is temporarily unavailable"
    }
  },
  deleteDialog: {
    title: "Delete Storage",
    confirmMessage: "Are you sure you want to delete the storage?",
    deleteButton: "Delete",
    cancelButton: "Cancel"
  },
  transferDialog: {
    title: "Transfer Data",
    targetLabel: "Target Storage",
    targetPlaceholder: "Select storage",
    noStoragesAvailable: "No storages available for transfer",
    transferButton: "Transfer",
    cancelButton: "Cancel"
  },
  migrationProgress: {
    title: "Data Transfer",
    description: "Data transfer is in progress and may take some time. If cancelled, all transferred files will be deleted from the target storage. Files in the source storage will remain unchanged.",
    cancelButton: "Cancel data transfer"
  },
  actions: {
    edit: "Edit",
    transfer: "Transfer data",
    transferDescription: "Transfer files from this storage to another",
    transferDisabled: "Cannot transfer data from default storage",
    "delete": "Delete",
    deleteDescription: "Delete storage (only if it contains no files)",
    clear: "Clear",
    clearDescription: "Clear all data in storage",
    cannotDelete: "Cannot delete",
    deleteDefaultDisabled: "Cannot delete default storage",
    deleteHasFilesDisabled: "Storage contains files",
    cancelMigration: "Cancel data transfer",
    migrationInProgress: "Data transfer in progress"
  },
  errors: {
    fetchingStorages: "Error fetching storages",
    creatingStorage: "Error creating storage",
    updatingStorage: "Error updating storage",
    deletingStorage: "Error deleting storage",
    migratingStorage: "Error transferring data"
  },
  notifications: {
    migrationStarted: "Data transfer started",
    migrationCancelled: "Data transfer cancelled",
    migrationCancelError: "Failed to cancel data transfer",
    migrationRetryStarted: "Data transfer restarted",
    migrationRetryError: "Failed to restart data transfer",
    migrationCompleted: 'Data transfer from storage "{{from}}" to storage "{{to}}" completed successfully',
    migrationCompletedSimple: "Data transfer completed successfully",
    invalidStorageIds: "Invalid storage IDs",
    storageCreated: "Storage created successfully",
    storageCreateError: "Failed to create storage",
    storageUpdated: "Storage updated successfully",
    storageUpdateError: "Failed to update storage",
    storageDeleted: "Storage deleted successfully",
    storageDeleteError: "Failed to delete storage",
    storageCleared: "Storage cleared successfully",
    storageClearError: "Failed to clear storage",
    storageEnabledSuccess: "Storage enabled successfully",
    storageDisabledSuccess: "Storage disabled successfully",
    storageToggleError: "Failed to change storage status"
  }
};
const appsMenu = {
  links: "Links"
};
const en = {
  documentTitle,
  managementLogoAlt,
  officeLogoAlt,
  spaceLogoAlt,
  showMore,
  hide,
  title,
  "delete": "Delete",
  deleted,
  add,
  cancel,
  close,
  enable,
  disable,
  send,
  "continue": "Continue",
  verify,
  create,
  warning,
  ok,
  type,
  name,
  priority,
  loadingError,
  reload,
  save,
  saved,
  success,
  noData,
  dataError,
  home,
  review,
  profil,
  exit,
  reportError,
  tarif,
  download,
  team,
  link,
  zoomIn,
  zoomOut,
  reset,
  panning,
  selection,
  select,
  menu,
  backMain,
  choose,
  sync,
  hello,
  goToProfile,
  goHome,
  userNotFound,
  search,
  common,
  noInformation,
  male,
  female,
  modules,
  successfulAuthorization,
  failedLoginAttempt,
  signOut,
  noAction,
  settings,
  copied,
  refresh,
  change,
  copy,
  navigation,
  validation,
  filters,
  addDomain,
  servers,
  domains,
  avatar,
  passwordMinError,
  passwordRegError,
  emailFormatError,
  emailMinError,
  domainMinError,
  noDomainsForMailServer,
  noDomain,
  incorrectOldEmailPassword,
  admin,
  selectGroup,
  dateOfCreation,
  unit,
  owner,
  participants,
  searchRolesByName,
  roles,
  passwordReset,
  requestResetPassword,
  login,
  register,
  profile,
  filials,
  filialSecurity,
  users,
  quota,
  entity,
  sendLetter,
  requestsErrors,
  statistics,
  commonSettings,
  teams,
  sso,
  license,
  notFound,
  errors,
  notifications,
  timezones,
  CustomLinks,
  ShareLinks,
  SettingSIEMSystem,
  RestrictRoomsByRoles,
  unknown: unknown$2,
  notificationSetting: notificationSetting$2,
  accessType: accessType$2,
  module: module$3,
  notificationSettingType: notificationSettingType$1,
  userStatus,
  roleType,
  userAction,
  dlp,
  userGender,
  storagePage,
  appsMenu
};
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
({
  accent: colorsTuple("#339AF0"),
  primary: colorsTuple([
    "#f7f7f7",
    "#f7f7f7",
    "#f7f7f7",
    "#f7f7f7",
    "#f7f7f7",
    // dark
    "#f7f7f7",
    "#343a40",
    // light
    "#f7f7f7",
    "#f7f7f7",
    "#f7f7f7"
  ]),
  secondary: colorsTuple("#868e96"),
  warning: colorsTuple("#FA5252")
});
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var defaultAttributes = {
  outline: {
    xmlns: "http://www.w3.org/2000/svg",
    width: 24,
    height: 24,
    viewBox: "0 0 24 24",
    fill: "none",
    stroke: "currentColor",
    strokeWidth: 2,
    strokeLinecap: "round",
    strokeLinejoin: "round"
  },
  filled: {
    xmlns: "http://www.w3.org/2000/svg",
    width: 24,
    height: 24,
    viewBox: "0 0 24 24",
    fill: "currentColor",
    stroke: "none"
  }
};
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
const createReactComponent = (type2, iconName, iconNamePascal, iconNode) => {
  const Component = reactExports.forwardRef(
    ({ color = "currentColor", size = 24, stroke = 2, title: title2, className, children, ...rest }, ref) => reactExports.createElement(
      "svg",
      {
        ref,
        ...defaultAttributes[type2],
        width: size,
        height: size,
        className: [`tabler-icon`, `tabler-icon-${iconName}`, className].join(" "),
        ...type2 === "filled" ? {
          fill: color
        } : {
          strokeWidth: stroke,
          stroke: color
        },
        ...rest
      },
      [
        title2 && reactExports.createElement("title", { key: "svg-title" }, title2),
        ...iconNode.map(([tag, attrs]) => reactExports.createElement(tag, attrs)),
        ...Array.isArray(children) ? children : [children]
      ]
    )
  );
  Component.displayName = `${iconNamePascal}`;
  return Component;
};
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconArchive = createReactComponent("outline", "archive", "IconArchive", [["path", { "d": "M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z", "key": "svg-0" }], ["path", { "d": "M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10", "key": "svg-1" }], ["path", { "d": "M10 12l4 0", "key": "svg-2" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconBell = createReactComponent("outline", "bell", "IconBell", [["path", { "d": "M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6", "key": "svg-0" }], ["path", { "d": "M9 17v1a3 3 0 0 0 6 0v-1", "key": "svg-1" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconBuildingSkyscraper = createReactComponent("outline", "building-skyscraper", "IconBuildingSkyscraper", [["path", { "d": "M3 21l18 0", "key": "svg-0" }], ["path", { "d": "M5 21v-14l8 -4v18", "key": "svg-1" }], ["path", { "d": "M19 21v-10l-6 -4", "key": "svg-2" }], ["path", { "d": "M9 9l0 .01", "key": "svg-3" }], ["path", { "d": "M9 12l0 .01", "key": "svg-4" }], ["path", { "d": "M9 15l0 .01", "key": "svg-5" }], ["path", { "d": "M9 18l0 .01", "key": "svg-6" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconCalendarEvent = createReactComponent("outline", "calendar-event", "IconCalendarEvent", [["path", { "d": "M4 5m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z", "key": "svg-0" }], ["path", { "d": "M16 3l0 4", "key": "svg-1" }], ["path", { "d": "M8 3l0 4", "key": "svg-2" }], ["path", { "d": "M4 11l16 0", "key": "svg-3" }], ["path", { "d": "M8 15h2v2h-2z", "key": "svg-4" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconChecks = createReactComponent("outline", "checks", "IconChecks", [["path", { "d": "M7 12l5 5l10 -10", "key": "svg-0" }], ["path", { "d": "M2 12l5 5m5 -5l5 -5", "key": "svg-1" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
createReactComponent("outline", "chevron-right", "IconChevronRight", [["path", { "d": "M9 6l6 6l-6 6", "key": "svg-0" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconMail = createReactComponent("outline", "mail", "IconMail", [["path", { "d": "M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z", "key": "svg-0" }], ["path", { "d": "M3 7l9 6l9 -6", "key": "svg-1" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconSettings = createReactComponent("outline", "settings", "IconSettings", [["path", { "d": "M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z", "key": "svg-0" }], ["path", { "d": "M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", "key": "svg-1" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconStar = createReactComponent("outline", "star", "IconStar", [["path", { "d": "M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z", "key": "svg-0" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconUserPlus = createReactComponent("outline", "user-plus", "IconUserPlus", [["path", { "d": "M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0", "key": "svg-0" }], ["path", { "d": "M16 19h6", "key": "svg-1" }], ["path", { "d": "M19 16v6", "key": "svg-2" }], ["path", { "d": "M6 21v-2a4 4 0 0 1 4 -4h4", "key": "svg-3" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconUsers = createReactComponent("outline", "users", "IconUsers", [["path", { "d": "M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", "key": "svg-0" }], ["path", { "d": "M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2", "key": "svg-1" }], ["path", { "d": "M16 3.13a4 4 0 0 1 0 7.75", "key": "svg-2" }], ["path", { "d": "M21 21v-2a4 4 0 0 0 -3 -3.85", "key": "svg-3" }]]);
/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */
var IconStarFilled = createReactComponent("filled", "star-filled", "IconStarFilled", [["path", { "d": "M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z", "key": "svg-0" }]]);
const NotificationType = {
  // Disk
  DiskFileShared: 1,
  DiskFileCommented: 2,
  DiskFileMentioned: 3,
  DiskFileUploaded: 23,
  DiskFilePermissionGranted: 24,
  DiskFileDownloadReady: 25,
  DiskLinkGenerated: 26,
  DiskDirectoryShared: 200,
  DiskRoomShared: 201,
  // Project
  ProjectShared: 400,
  ProjectTaskCreated: 401,
  ProjectTaskDeleted: 402,
  ProjectTaskUpdated: 403,
  ProjectTaskMoved: 404,
  ProjectTaskStatusChanged: 405,
  ProjectTaskCommented: 406,
  ProjectMyTaskDeleted: 420,
  ProjectMyTaskUpdated: 421,
  ProjectMyTaskMoved: 422,
  ProjectMyTaskStatusChanged: 423,
  ProjectMyTaskCommented: 424,
  ProjectTaskUnassigned: 425,
  ProjectTaskAssigned: 426,
  ProjectTaskMentioned: 427,
  ProjectTaskAttachmentAdded: 429,
  ProjectSprintCreated: 450,
  // Admin
  AdminRoleAssigned: 500,
  AdminRoleDeleted: 501,
  // Mail
  MailMessageImportant: 550,
  MailMessageReceived: 551,
  // Calendar
  CalendarShared: 600,
  CalendarEventCanceled: 601,
  CalendarEventInvited: 602,
  CalendarEventUpdated: 603,
  CalendarEventUpcoming: 604
};
const NotificationState = {
  Unread: 0,
  Read: 1
};
const useTheme = () => {
  const { colorScheme } = useMantineColorScheme();
  const isDark = colorScheme === "dark";
  return {
    isDark,
    colorScheme
  };
};
const NotificationLayout = ({ children }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { gap: 2, w: "100%", style: { flexGrow: 1 }, children });
};
function getDefaultExportFromCjs(x) {
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
var dayjs_min$1 = { exports: {} };
var dayjs_min = dayjs_min$1.exports;
var hasRequiredDayjs_min;
function requireDayjs_min() {
  if (hasRequiredDayjs_min) return dayjs_min$1.exports;
  hasRequiredDayjs_min = 1;
  (function(module2, exports$1) {
    !function(t2, e) {
      module2.exports = e();
    }(dayjs_min, function() {
      var t2 = 1e3, e = 6e4, n2 = 36e5, r2 = "millisecond", i = "second", s2 = "minute", u = "hour", a = "day", o = "week", c = "month", f2 = "quarter", h = "year", d = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
        var e2 = ["th", "st", "nd", "rd"], n22 = t3 % 100;
        return "[" + t3 + (e2[(n22 - 20) % 10] || e2[n22] || e2[0]) + "]";
      } }, m = function(t3, e2, n22) {
        var r22 = String(t3);
        return !r22 || r22.length >= e2 ? t3 : "" + Array(e2 + 1 - r22.length).join(n22) + t3;
      }, v = { s: m, z: function(t3) {
        var e2 = -t3.utcOffset(), n22 = Math.abs(e2), r22 = Math.floor(n22 / 60), i2 = n22 % 60;
        return (e2 <= 0 ? "+" : "-") + m(r22, 2, "0") + ":" + m(i2, 2, "0");
      }, m: function t3(e2, n22) {
        if (e2.date() < n22.date()) return -t3(n22, e2);
        var r22 = 12 * (n22.year() - e2.year()) + (n22.month() - e2.month()), i2 = e2.clone().add(r22, c), s3 = n22 - i2 < 0, u2 = e2.clone().add(r22 + (s3 ? -1 : 1), c);
        return +(-(r22 + (n22 - i2) / (s3 ? i2 - u2 : u2 - i2)) || 0);
      }, a: function(t3) {
        return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
      }, p: function(t3) {
        return { M: c, y: h, w: o, d: a, D: d, h: u, m: s2, s: i, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
      }, u: function(t3) {
        return void 0 === t3;
      } }, g = "en", D = {};
      D[g] = M;
      var p = "$isDayjsObject", S = function(t3) {
        return t3 instanceof _ || !(!t3 || !t3[p]);
      }, w = function t3(e2, n22, r22) {
        var i2;
        if (!e2) return g;
        if ("string" == typeof e2) {
          var s3 = e2.toLowerCase();
          D[s3] && (i2 = s3), n22 && (D[s3] = n22, i2 = s3);
          var u2 = e2.split("-");
          if (!i2 && u2.length > 1) return t3(u2[0]);
        } else {
          var a2 = e2.name;
          D[a2] = e2, i2 = a2;
        }
        return !r22 && i2 && (g = i2), i2 || !r22 && g;
      }, O = function(t3, e2) {
        if (S(t3)) return t3.clone();
        var n22 = "object" == typeof e2 ? e2 : {};
        return n22.date = t3, n22.args = arguments, new _(n22);
      }, b = v;
      b.l = w, b.i = S, b.w = function(t3, e2) {
        return O(t3, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
      };
      var _ = function() {
        function M2(t3) {
          this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
        }
        var m2 = M2.prototype;
        return m2.parse = function(t3) {
          this.$d = function(t4) {
            var e2 = t4.date, n22 = t4.utc;
            if (null === e2) return /* @__PURE__ */ new Date(NaN);
            if (b.u(e2)) return /* @__PURE__ */ new Date();
            if (e2 instanceof Date) return new Date(e2);
            if ("string" == typeof e2 && !/Z$/i.test(e2)) {
              var r22 = e2.match($);
              if (r22) {
                var i2 = r22[2] - 1 || 0, s3 = (r22[7] || "0").substring(0, 3);
                return n22 ? new Date(Date.UTC(r22[1], i2, r22[3] || 1, r22[4] || 0, r22[5] || 0, r22[6] || 0, s3)) : new Date(r22[1], i2, r22[3] || 1, r22[4] || 0, r22[5] || 0, r22[6] || 0, s3);
              }
            }
            return new Date(e2);
          }(t3), this.init();
        }, m2.init = function() {
          var t3 = this.$d;
          this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
        }, m2.$utils = function() {
          return b;
        }, m2.isValid = function() {
          return !(this.$d.toString() === l2);
        }, m2.isSame = function(t3, e2) {
          var n22 = O(t3);
          return this.startOf(e2) <= n22 && n22 <= this.endOf(e2);
        }, m2.isAfter = function(t3, e2) {
          return O(t3) < this.startOf(e2);
        }, m2.isBefore = function(t3, e2) {
          return this.endOf(e2) < O(t3);
        }, m2.$g = function(t3, e2, n22) {
          return b.u(t3) ? this[e2] : this.set(n22, t3);
        }, m2.unix = function() {
          return Math.floor(this.valueOf() / 1e3);
        }, m2.valueOf = function() {
          return this.$d.getTime();
        }, m2.startOf = function(t3, e2) {
          var n22 = this, r22 = !!b.u(e2) || e2, f3 = b.p(t3), l22 = function(t4, e3) {
            var i2 = b.w(n22.$u ? Date.UTC(n22.$y, e3, t4) : new Date(n22.$y, e3, t4), n22);
            return r22 ? i2 : i2.endOf(a);
          }, $2 = function(t4, e3) {
            return b.w(n22.toDate()[t4].apply(n22.toDate("s"), (r22 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n22);
          }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
          switch (f3) {
            case h:
              return r22 ? l22(1, 0) : l22(31, 11);
            case c:
              return r22 ? l22(1, M3) : l22(0, M3 + 1);
            case o:
              var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
              return l22(r22 ? m3 - D2 : m3 + (6 - D2), M3);
            case a:
            case d:
              return $2(v2 + "Hours", 0);
            case u:
              return $2(v2 + "Minutes", 1);
            case s2:
              return $2(v2 + "Seconds", 2);
            case i:
              return $2(v2 + "Milliseconds", 3);
            default:
              return this.clone();
          }
        }, m2.endOf = function(t3) {
          return this.startOf(t3, false);
        }, m2.$set = function(t3, e2) {
          var n22, o2 = b.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l22 = (n22 = {}, n22[a] = f3 + "Date", n22[d] = f3 + "Date", n22[c] = f3 + "Month", n22[h] = f3 + "FullYear", n22[u] = f3 + "Hours", n22[s2] = f3 + "Minutes", n22[i] = f3 + "Seconds", n22[r2] = f3 + "Milliseconds", n22)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
          if (o2 === c || o2 === h) {
            var y2 = this.clone().set(d, 1);
            y2.$d[l22]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
          } else l22 && this.$d[l22]($2);
          return this.init(), this;
        }, m2.set = function(t3, e2) {
          return this.clone().$set(t3, e2);
        }, m2.get = function(t3) {
          return this[b.p(t3)]();
        }, m2.add = function(r22, f3) {
          var d2, l22 = this;
          r22 = Number(r22);
          var $2 = b.p(f3), y2 = function(t3) {
            var e2 = O(l22);
            return b.w(e2.date(e2.date() + Math.round(t3 * r22)), l22);
          };
          if ($2 === c) return this.set(c, this.$M + r22);
          if ($2 === h) return this.set(h, this.$y + r22);
          if ($2 === a) return y2(1);
          if ($2 === o) return y2(7);
          var M3 = (d2 = {}, d2[s2] = e, d2[u] = n2, d2[i] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r22 * M3;
          return b.w(m3, this);
        }, m2.subtract = function(t3, e2) {
          return this.add(-1 * t3, e2);
        }, m2.format = function(t3) {
          var e2 = this, n22 = this.$locale();
          if (!this.isValid()) return n22.invalidDate || l2;
          var r22 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s3 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n22.weekdays, c2 = n22.months, f3 = n22.meridiem, h2 = function(t4, n3, i3, s4) {
            return t4 && (t4[n3] || t4(e2, r22)) || i3[n3].slice(0, s4);
          }, d2 = function(t4) {
            return b.s(s3 % 12 || 12, t4, "0");
          }, $2 = f3 || function(t4, e3, n3) {
            var r3 = t4 < 12 ? "AM" : "PM";
            return n3 ? r3.toLowerCase() : r3;
          };
          return r22.replace(y, function(t4, r3) {
            return r3 || function(t5) {
              switch (t5) {
                case "YY":
                  return String(e2.$y).slice(-2);
                case "YYYY":
                  return b.s(e2.$y, 4, "0");
                case "M":
                  return a2 + 1;
                case "MM":
                  return b.s(a2 + 1, 2, "0");
                case "MMM":
                  return h2(n22.monthsShort, a2, c2, 3);
                case "MMMM":
                  return h2(c2, a2);
                case "D":
                  return e2.$D;
                case "DD":
                  return b.s(e2.$D, 2, "0");
                case "d":
                  return String(e2.$W);
                case "dd":
                  return h2(n22.weekdaysMin, e2.$W, o2, 2);
                case "ddd":
                  return h2(n22.weekdaysShort, e2.$W, o2, 3);
                case "dddd":
                  return o2[e2.$W];
                case "H":
                  return String(s3);
                case "HH":
                  return b.s(s3, 2, "0");
                case "h":
                  return d2(1);
                case "hh":
                  return d2(2);
                case "a":
                  return $2(s3, u2, true);
                case "A":
                  return $2(s3, u2, false);
                case "m":
                  return String(u2);
                case "mm":
                  return b.s(u2, 2, "0");
                case "s":
                  return String(e2.$s);
                case "ss":
                  return b.s(e2.$s, 2, "0");
                case "SSS":
                  return b.s(e2.$ms, 3, "0");
                case "Z":
                  return i2;
              }
              return null;
            }(t4) || i2.replace(":", "");
          });
        }, m2.utcOffset = function() {
          return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
        }, m2.diff = function(r22, d2, l22) {
          var $2, y2 = this, M3 = b.p(d2), m3 = O(r22), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
            return b.m(y2, m3);
          };
          switch (M3) {
            case h:
              $2 = D2() / 12;
              break;
            case c:
              $2 = D2();
              break;
            case f2:
              $2 = D2() / 3;
              break;
            case o:
              $2 = (g2 - v2) / 6048e5;
              break;
            case a:
              $2 = (g2 - v2) / 864e5;
              break;
            case u:
              $2 = g2 / n2;
              break;
            case s2:
              $2 = g2 / e;
              break;
            case i:
              $2 = g2 / t2;
              break;
            default:
              $2 = g2;
          }
          return l22 ? $2 : b.a($2);
        }, m2.daysInMonth = function() {
          return this.endOf(c).$D;
        }, m2.$locale = function() {
          return D[this.$L];
        }, m2.locale = function(t3, e2) {
          if (!t3) return this.$L;
          var n22 = this.clone(), r22 = w(t3, e2, true);
          return r22 && (n22.$L = r22), n22;
        }, m2.clone = function() {
          return b.w(this.$d, this);
        }, m2.toDate = function() {
          return new Date(this.valueOf());
        }, m2.toJSON = function() {
          return this.isValid() ? this.toISOString() : null;
        }, m2.toISOString = function() {
          return this.$d.toISOString();
        }, m2.toString = function() {
          return this.$d.toUTCString();
        }, M2;
      }(), k = _.prototype;
      return O.prototype = k, [["$ms", r2], ["$s", i], ["$m", s2], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t3) {
        k[t3[1]] = function(e2) {
          return this.$g(e2, t3[0], t3[1]);
        };
      }), O.extend = function(t3, e2) {
        return t3.$i || (t3(e2, _, O), t3.$i = true), O;
      }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
        return O(1e3 * t3);
      }, O.en = D[g], O.Ls = D, O.p = {}, O;
    });
  })(dayjs_min$1);
  return dayjs_min$1.exports;
}
var dayjs_minExports = requireDayjs_min();
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
var ru$1 = { exports: {} };
var ru = ru$1.exports;
var hasRequiredRu;
function requireRu() {
  if (hasRequiredRu) return ru$1.exports;
  hasRequiredRu = 1;
  (function(module2, exports$1) {
    !function(_, t2) {
      module2.exports = t2(requireDayjs_min());
    }(ru, function(_) {
      function t2(_2) {
        return _2 && "object" == typeof _2 && "default" in _2 ? _2 : { default: _2 };
      }
      var e = t2(_), n2 = "января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"), s2 = "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"), r2 = "янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"), o = "янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"), i = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
      function d(_2, t3, e2) {
        var n22, s3;
        return "m" === e2 ? t3 ? "минута" : "минуту" : _2 + " " + (n22 = +_2, s3 = { mm: t3 ? "минута_минуты_минут" : "минуту_минуты_минут", hh: "час_часа_часов", dd: "день_дня_дней", MM: "месяц_месяца_месяцев", yy: "год_года_лет" }[e2].split("_"), n22 % 10 == 1 && n22 % 100 != 11 ? s3[0] : n22 % 10 >= 2 && n22 % 10 <= 4 && (n22 % 100 < 10 || n22 % 100 >= 20) ? s3[1] : s3[2]);
      }
      var u = function(_2, t3) {
        return i.test(t3) ? n2[_2.month()] : s2[_2.month()];
      };
      u.s = s2, u.f = n2;
      var a = function(_2, t3) {
        return i.test(t3) ? r2[_2.month()] : o[_2.month()];
      };
      a.s = o, a.f = r2;
      var m = { name: "ru", weekdays: "воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"), weekdaysShort: "вск_пнд_втр_срд_чтв_птн_сбт".split("_"), weekdaysMin: "вс_пн_вт_ср_чт_пт_сб".split("_"), months: u, monthsShort: a, weekStart: 1, yearStart: 4, formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY г.", LLL: "D MMMM YYYY г., H:mm", LLLL: "dddd, D MMMM YYYY г., H:mm" }, relativeTime: { future: "через %s", past: "%s назад", s: "несколько секунд", m: d, mm: d, h: "час", hh: d, d: "день", dd: d, M: "месяц", MM: d, y: "год", yy: d }, ordinal: function(_2) {
        return _2;
      }, meridiem: function(_2) {
        return _2 < 4 ? "ночи" : _2 < 12 ? "утра" : _2 < 17 ? "дня" : "вечера";
      } };
      return e.default.locale(m, null, true), m;
    });
  })(ru$1);
  return ru$1.exports;
}
requireRu();
const formatNotificationDate = (value) => {
  if (!value) return "";
  const lang = instance$1.language.split("-")[0];
  dayjs.locale(lang);
  const date = dayjs(value);
  const now2 = dayjs();
  const isToday = date.isSame(now2, "day");
  if (isToday) {
    return new Intl.DateTimeFormat(lang, {
      hour: "2-digit",
      minute: "2-digit"
    }).format(date.toDate());
  }
  const isSameYear = date.isSame(now2, "year");
  if (isSameYear) {
    const formatted = new Intl.DateTimeFormat(lang, {
      day: "numeric",
      month: "long"
    }).format(date.toDate());
    const [day, month] = formatted.split(" ");
    const shortMonth = month.length > 4 ? month.slice(0, 3) + "." : month;
    return `${day} ${shortMonth}`;
  }
  return new Intl.DateTimeFormat(lang).format(date.toDate());
};
const timeToSeconds = (timeString) => {
  if (!timeString || typeof timeString !== "string") return 0;
  const trimmed = timeString.trim();
  if (trimmed.includes(".")) {
    const [daysPart, ...timeParts] = trimmed.split(".");
    const days = parseInt(daysPart, 10);
    if (isNaN(days)) return 0;
    if (timeParts.length > 0) {
      const timeString2 = timeParts.join(".");
      const parts2 = timeString2.split(":").map((part) => parseInt(part, 10));
      if (parts2.some((part) => isNaN(part))) return 0;
      if (parts2.length === 3) {
        const [hours, minutes, seconds] = parts2;
        return days * 86400 + hours * 3600 + minutes * 60 + seconds;
      }
    }
    return days * 86400;
  }
  const parts = trimmed.split(":").map((part) => parseInt(part, 10));
  if (parts.some((part) => isNaN(part))) return 0;
  if (parts.length === 2) {
    const [minutes, seconds] = parts;
    return minutes * 60 + seconds;
  } else if (parts.length === 3) {
    const [hours, minutes, seconds] = parts;
    return hours * 3600 + minutes * 60 + seconds;
  } else if (parts.length === 4) {
    const [days, hours, minutes, seconds] = parts;
    return days * 86400 + hours * 3600 + minutes * 60 + seconds;
  }
  return 0;
};
function formatProdErrorMessage$1(code) {
  return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
}
var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
var ActionTypes = {
  INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
  REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
  PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
};
var actionTypes_default = ActionTypes;
function isPlainObject$1(obj) {
  if (typeof obj !== "object" || obj === null)
    return false;
  let proto = obj;
  while (Object.getPrototypeOf(proto) !== null) {
    proto = Object.getPrototypeOf(proto);
  }
  return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
}
function assertReducerShape(reducers) {
  Object.keys(reducers).forEach((key) => {
    const reducer = reducers[key];
    const initialState2 = reducer(void 0, {
      type: actionTypes_default.INIT
    });
    if (typeof initialState2 === "undefined") {
      throw new Error(formatProdErrorMessage$1(12));
    }
    if (typeof reducer(void 0, {
      type: actionTypes_default.PROBE_UNKNOWN_ACTION()
    }) === "undefined") {
      throw new Error(formatProdErrorMessage$1(13));
    }
  });
}
function combineReducers(reducers) {
  const reducerKeys = Object.keys(reducers);
  const finalReducers = {};
  for (let i = 0; i < reducerKeys.length; i++) {
    const key = reducerKeys[i];
    if (typeof reducers[key] === "function") {
      finalReducers[key] = reducers[key];
    }
  }
  const finalReducerKeys = Object.keys(finalReducers);
  let shapeAssertionError;
  try {
    assertReducerShape(finalReducers);
  } catch (e) {
    shapeAssertionError = e;
  }
  return function combination(state = {}, action) {
    if (shapeAssertionError) {
      throw shapeAssertionError;
    }
    let hasChanged = false;
    const nextState = {};
    for (let i = 0; i < finalReducerKeys.length; i++) {
      const key = finalReducerKeys[i];
      const reducer = finalReducers[key];
      const previousStateForKey = state[key];
      const nextStateForKey = reducer(previousStateForKey, action);
      if (typeof nextStateForKey === "undefined") {
        action && action.type;
        throw new Error(formatProdErrorMessage$1(14));
      }
      nextState[key] = nextStateForKey;
      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
    }
    hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
    return hasChanged ? nextState : state;
  };
}
function isAction(action) {
  return isPlainObject$1(action) && "type" in action && typeof action.type === "string";
}
var NOTHING = Symbol.for("immer-nothing");
var DRAFTABLE = Symbol.for("immer-draftable");
var DRAFT_STATE = Symbol.for("immer-state");
function die(error, ...args) {
  throw new Error(
    `[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`
  );
}
var getPrototypeOf$1 = Object.getPrototypeOf;
function isDraft(value) {
  return !!value && !!value[DRAFT_STATE];
}
function isDraftable(value) {
  var _a2;
  if (!value)
    return false;
  return isPlainObject$2(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!((_a2 = value.constructor) == null ? void 0 : _a2[DRAFTABLE]) || isMap(value) || isSet(value);
}
var objectCtorString = Object.prototype.constructor.toString();
function isPlainObject$2(value) {
  if (!value || typeof value !== "object")
    return false;
  const proto = getPrototypeOf$1(value);
  if (proto === null) {
    return true;
  }
  const Ctor = Object.hasOwnProperty.call(proto, "constructor") && proto.constructor;
  if (Ctor === Object)
    return true;
  return typeof Ctor == "function" && Function.toString.call(Ctor) === objectCtorString;
}
function original(value) {
  if (!isDraft(value))
    die(15, value);
  return value[DRAFT_STATE].base_;
}
function each(obj, iter) {
  if (getArchtype(obj) === 0) {
    Reflect.ownKeys(obj).forEach((key) => {
      iter(key, obj[key], obj);
    });
  } else {
    obj.forEach((entry, index) => iter(index, entry, obj));
  }
}
function getArchtype(thing) {
  const state = thing[DRAFT_STATE];
  return state ? state.type_ : Array.isArray(thing) ? 1 : isMap(thing) ? 2 : isSet(thing) ? 3 : 0;
}
function has(thing, prop) {
  return getArchtype(thing) === 2 ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);
}
function get(thing, prop) {
  return getArchtype(thing) === 2 ? thing.get(prop) : thing[prop];
}
function set(thing, propOrOldValue, value) {
  const t2 = getArchtype(thing);
  if (t2 === 2)
    thing.set(propOrOldValue, value);
  else if (t2 === 3) {
    thing.add(value);
  } else
    thing[propOrOldValue] = value;
}
function is$1(x, y) {
  if (x === y) {
    return x !== 0 || 1 / x === 1 / y;
  } else {
    return x !== x && y !== y;
  }
}
function isMap(target) {
  return target instanceof Map;
}
function isSet(target) {
  return target instanceof Set;
}
function latest(state) {
  return state.copy_ || state.base_;
}
function shallowCopy(base, strict) {
  if (isMap(base)) {
    return new Map(base);
  }
  if (isSet(base)) {
    return new Set(base);
  }
  if (Array.isArray(base))
    return Array.prototype.slice.call(base);
  const isPlain = isPlainObject$2(base);
  if (strict === true || strict === "class_only" && !isPlain) {
    const descriptors = Object.getOwnPropertyDescriptors(base);
    delete descriptors[DRAFT_STATE];
    let keys = Reflect.ownKeys(descriptors);
    for (let i = 0; i < keys.length; i++) {
      const key = keys[i];
      const desc = descriptors[key];
      if (desc.writable === false) {
        desc.writable = true;
        desc.configurable = true;
      }
      if (desc.get || desc.set)
        descriptors[key] = {
          configurable: true,
          writable: true,
          // could live with !!desc.set as well here...
          enumerable: desc.enumerable,
          value: base[key]
        };
    }
    return Object.create(getPrototypeOf$1(base), descriptors);
  } else {
    const proto = getPrototypeOf$1(base);
    if (proto !== null && isPlain) {
      return { ...base };
    }
    const obj = Object.create(proto);
    return Object.assign(obj, base);
  }
}
function freeze(obj, deep = false) {
  if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj))
    return obj;
  if (getArchtype(obj) > 1) {
    obj.set = obj.add = obj.clear = obj.delete = dontMutateFrozenCollections;
  }
  Object.freeze(obj);
  if (deep)
    Object.entries(obj).forEach(([key, value]) => freeze(value, true));
  return obj;
}
function dontMutateFrozenCollections() {
  die(2);
}
function isFrozen(obj) {
  return Object.isFrozen(obj);
}
var plugins = {};
function getPlugin(pluginKey) {
  const plugin = plugins[pluginKey];
  if (!plugin) {
    die(0, pluginKey);
  }
  return plugin;
}
function loadPlugin(pluginKey, implementation) {
  if (!plugins[pluginKey])
    plugins[pluginKey] = implementation;
}
var currentScope;
function getCurrentScope() {
  return currentScope;
}
function createScope(parent_, immer_) {
  return {
    drafts_: [],
    parent_,
    immer_,
    // Whenever the modified draft contains a draft from another scope, we
    // need to prevent auto-freezing so the unowned draft can be finalized.
    canAutoFreeze_: true,
    unfinalizedDrafts_: 0
  };
}
function usePatchesInScope(scope, patchListener) {
  if (patchListener) {
    getPlugin("Patches");
    scope.patches_ = [];
    scope.inversePatches_ = [];
    scope.patchListener_ = patchListener;
  }
}
function revokeScope(scope) {
  leaveScope(scope);
  scope.drafts_.forEach(revokeDraft);
  scope.drafts_ = null;
}
function leaveScope(scope) {
  if (scope === currentScope) {
    currentScope = scope.parent_;
  }
}
function enterScope(immer2) {
  return currentScope = createScope(currentScope, immer2);
}
function revokeDraft(draft) {
  const state = draft[DRAFT_STATE];
  if (state.type_ === 0 || state.type_ === 1)
    state.revoke_();
  else
    state.revoked_ = true;
}
function processResult(result, scope) {
  scope.unfinalizedDrafts_ = scope.drafts_.length;
  const baseDraft = scope.drafts_[0];
  const isReplaced = result !== void 0 && result !== baseDraft;
  if (isReplaced) {
    if (baseDraft[DRAFT_STATE].modified_) {
      revokeScope(scope);
      die(4);
    }
    if (isDraftable(result)) {
      result = finalize(scope, result);
      if (!scope.parent_)
        maybeFreeze(scope, result);
    }
    if (scope.patches_) {
      getPlugin("Patches").generateReplacementPatches_(
        baseDraft[DRAFT_STATE].base_,
        result,
        scope.patches_,
        scope.inversePatches_
      );
    }
  } else {
    result = finalize(scope, baseDraft, []);
  }
  revokeScope(scope);
  if (scope.patches_) {
    scope.patchListener_(scope.patches_, scope.inversePatches_);
  }
  return result !== NOTHING ? result : void 0;
}
function finalize(rootScope, value, path) {
  if (isFrozen(value))
    return value;
  const state = value[DRAFT_STATE];
  if (!state) {
    each(
      value,
      (key, childValue) => finalizeProperty(rootScope, state, value, key, childValue, path)
    );
    return value;
  }
  if (state.scope_ !== rootScope)
    return value;
  if (!state.modified_) {
    maybeFreeze(rootScope, state.base_, true);
    return state.base_;
  }
  if (!state.finalized_) {
    state.finalized_ = true;
    state.scope_.unfinalizedDrafts_--;
    const result = state.copy_;
    let resultEach = result;
    let isSet2 = false;
    if (state.type_ === 3) {
      resultEach = new Set(result);
      result.clear();
      isSet2 = true;
    }
    each(
      resultEach,
      (key, childValue) => finalizeProperty(rootScope, state, result, key, childValue, path, isSet2)
    );
    maybeFreeze(rootScope, result, false);
    if (path && rootScope.patches_) {
      getPlugin("Patches").generatePatches_(
        state,
        path,
        rootScope.patches_,
        rootScope.inversePatches_
      );
    }
  }
  return state.copy_;
}
function finalizeProperty(rootScope, parentState, targetObject, prop, childValue, rootPath, targetIsSet) {
  if (isDraft(childValue)) {
    const path = rootPath && parentState && parentState.type_ !== 3 && // Set objects are atomic since they have no keys.
    !has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
    const res = finalize(rootScope, childValue, path);
    set(targetObject, prop, res);
    if (isDraft(res)) {
      rootScope.canAutoFreeze_ = false;
    } else
      return;
  } else if (targetIsSet) {
    targetObject.add(childValue);
  }
  if (isDraftable(childValue) && !isFrozen(childValue)) {
    if (!rootScope.immer_.autoFreeze_ && rootScope.unfinalizedDrafts_ < 1) {
      return;
    }
    finalize(rootScope, childValue);
    if ((!parentState || !parentState.scope_.parent_) && typeof prop !== "symbol" && Object.prototype.propertyIsEnumerable.call(targetObject, prop))
      maybeFreeze(rootScope, childValue);
  }
}
function maybeFreeze(scope, value, deep = false) {
  if (!scope.parent_ && scope.immer_.autoFreeze_ && scope.canAutoFreeze_) {
    freeze(value, deep);
  }
}
function createProxyProxy(base, parent) {
  const isArray2 = Array.isArray(base);
  const state = {
    type_: isArray2 ? 1 : 0,
    // Track which produce call this is associated with.
    scope_: parent ? parent.scope_ : getCurrentScope(),
    // True for both shallow and deep changes.
    modified_: false,
    // Used during finalization.
    finalized_: false,
    // Track which properties have been assigned (true) or deleted (false).
    assigned_: {},
    // The parent draft state.
    parent_: parent,
    // The base state.
    base_: base,
    // The base proxy.
    draft_: null,
    // set below
    // The base copy with any updated values.
    copy_: null,
    // Called by the `produce` function.
    revoke_: null,
    isManual_: false
  };
  let target = state;
  let traps = objectTraps;
  if (isArray2) {
    target = [state];
    traps = arrayTraps;
  }
  const { revoke, proxy } = Proxy.revocable(target, traps);
  state.draft_ = proxy;
  state.revoke_ = revoke;
  return proxy;
}
var objectTraps = {
  get(state, prop) {
    if (prop === DRAFT_STATE)
      return state;
    const source = latest(state);
    if (!has(source, prop)) {
      return readPropFromProto(state, source, prop);
    }
    const value = source[prop];
    if (state.finalized_ || !isDraftable(value)) {
      return value;
    }
    if (value === peek(state.base_, prop)) {
      prepareCopy(state);
      return state.copy_[prop] = createProxy(value, state);
    }
    return value;
  },
  has(state, prop) {
    return prop in latest(state);
  },
  ownKeys(state) {
    return Reflect.ownKeys(latest(state));
  },
  set(state, prop, value) {
    const desc = getDescriptorFromProto(latest(state), prop);
    if (desc == null ? void 0 : desc.set) {
      desc.set.call(state.draft_, value);
      return true;
    }
    if (!state.modified_) {
      const current2 = peek(latest(state), prop);
      const currentState = current2 == null ? void 0 : current2[DRAFT_STATE];
      if (currentState && currentState.base_ === value) {
        state.copy_[prop] = value;
        state.assigned_[prop] = false;
        return true;
      }
      if (is$1(value, current2) && (value !== void 0 || has(state.base_, prop)))
        return true;
      prepareCopy(state);
      markChanged(state);
    }
    if (state.copy_[prop] === value && // special case: handle new props with value 'undefined'
    (value !== void 0 || prop in state.copy_) || // special case: NaN
    Number.isNaN(value) && Number.isNaN(state.copy_[prop]))
      return true;
    state.copy_[prop] = value;
    state.assigned_[prop] = true;
    return true;
  },
  deleteProperty(state, prop) {
    if (peek(state.base_, prop) !== void 0 || prop in state.base_) {
      state.assigned_[prop] = false;
      prepareCopy(state);
      markChanged(state);
    } else {
      delete state.assigned_[prop];
    }
    if (state.copy_) {
      delete state.copy_[prop];
    }
    return true;
  },
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
  // the same guarantee in ES5 mode.
  getOwnPropertyDescriptor(state, prop) {
    const owner2 = latest(state);
    const desc = Reflect.getOwnPropertyDescriptor(owner2, prop);
    if (!desc)
      return desc;
    return {
      writable: true,
      configurable: state.type_ !== 1 || prop !== "length",
      enumerable: desc.enumerable,
      value: owner2[prop]
    };
  },
  defineProperty() {
    die(11);
  },
  getPrototypeOf(state) {
    return getPrototypeOf$1(state.base_);
  },
  setPrototypeOf() {
    die(12);
  }
};
var arrayTraps = {};
each(objectTraps, (key, fn) => {
  arrayTraps[key] = function() {
    arguments[0] = arguments[0][0];
    return fn.apply(this, arguments);
  };
});
arrayTraps.deleteProperty = function(state, prop) {
  return arrayTraps.set.call(this, state, prop, void 0);
};
arrayTraps.set = function(state, prop, value) {
  return objectTraps.set.call(this, state[0], prop, value, state[0]);
};
function peek(draft, prop) {
  const state = draft[DRAFT_STATE];
  const source = state ? latest(state) : draft;
  return source[prop];
}
function readPropFromProto(state, source, prop) {
  var _a2;
  const desc = getDescriptorFromProto(source, prop);
  return desc ? `value` in desc ? desc.value : (
    // This is a very special case, if the prop is a getter defined by the
    // prototype, we should invoke it with the draft as context!
    (_a2 = desc.get) == null ? void 0 : _a2.call(state.draft_)
  ) : void 0;
}
function getDescriptorFromProto(source, prop) {
  if (!(prop in source))
    return void 0;
  let proto = getPrototypeOf$1(source);
  while (proto) {
    const desc = Object.getOwnPropertyDescriptor(proto, prop);
    if (desc)
      return desc;
    proto = getPrototypeOf$1(proto);
  }
  return void 0;
}
function markChanged(state) {
  if (!state.modified_) {
    state.modified_ = true;
    if (state.parent_) {
      markChanged(state.parent_);
    }
  }
}
function prepareCopy(state) {
  if (!state.copy_) {
    state.copy_ = shallowCopy(
      state.base_,
      state.scope_.immer_.useStrictShallowCopy_
    );
  }
}
var Immer2 = class {
  constructor(config) {
    this.autoFreeze_ = true;
    this.useStrictShallowCopy_ = false;
    this.produce = (base, recipe, patchListener) => {
      if (typeof base === "function" && typeof recipe !== "function") {
        const defaultBase = recipe;
        recipe = base;
        const self2 = this;
        return function curriedProduce(base2 = defaultBase, ...args) {
          return self2.produce(base2, (draft) => recipe.call(this, draft, ...args));
        };
      }
      if (typeof recipe !== "function")
        die(6);
      if (patchListener !== void 0 && typeof patchListener !== "function")
        die(7);
      let result;
      if (isDraftable(base)) {
        const scope = enterScope(this);
        const proxy = createProxy(base, void 0);
        let hasError = true;
        try {
          result = recipe(proxy);
          hasError = false;
        } finally {
          if (hasError)
            revokeScope(scope);
          else
            leaveScope(scope);
        }
        usePatchesInScope(scope, patchListener);
        return processResult(result, scope);
      } else if (!base || typeof base !== "object") {
        result = recipe(base);
        if (result === void 0)
          result = base;
        if (result === NOTHING)
          result = void 0;
        if (this.autoFreeze_)
          freeze(result, true);
        if (patchListener) {
          const p = [];
          const ip = [];
          getPlugin("Patches").generateReplacementPatches_(base, result, p, ip);
          patchListener(p, ip);
        }
        return result;
      } else
        die(1, base);
    };
    this.produceWithPatches = (base, recipe) => {
      if (typeof base === "function") {
        return (state, ...args) => this.produceWithPatches(state, (draft) => base(draft, ...args));
      }
      let patches, inversePatches;
      const result = this.produce(base, recipe, (p, ip) => {
        patches = p;
        inversePatches = ip;
      });
      return [result, patches, inversePatches];
    };
    if (typeof (config == null ? void 0 : config.autoFreeze) === "boolean")
      this.setAutoFreeze(config.autoFreeze);
    if (typeof (config == null ? void 0 : config.useStrictShallowCopy) === "boolean")
      this.setUseStrictShallowCopy(config.useStrictShallowCopy);
  }
  createDraft(base) {
    if (!isDraftable(base))
      die(8);
    if (isDraft(base))
      base = current(base);
    const scope = enterScope(this);
    const proxy = createProxy(base, void 0);
    proxy[DRAFT_STATE].isManual_ = true;
    leaveScope(scope);
    return proxy;
  }
  finishDraft(draft, patchListener) {
    const state = draft && draft[DRAFT_STATE];
    if (!state || !state.isManual_)
      die(9);
    const { scope_: scope } = state;
    usePatchesInScope(scope, patchListener);
    return processResult(void 0, scope);
  }
  /**
   * Pass true to automatically freeze all copies created by Immer.
   *
   * By default, auto-freezing is enabled.
   */
  setAutoFreeze(value) {
    this.autoFreeze_ = value;
  }
  /**
   * Pass true to enable strict shallow copy.
   *
   * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
   */
  setUseStrictShallowCopy(value) {
    this.useStrictShallowCopy_ = value;
  }
  applyPatches(base, patches) {
    let i;
    for (i = patches.length - 1; i >= 0; i--) {
      const patch = patches[i];
      if (patch.path.length === 0 && patch.op === "replace") {
        base = patch.value;
        break;
      }
    }
    if (i > -1) {
      patches = patches.slice(i + 1);
    }
    const applyPatchesImpl = getPlugin("Patches").applyPatches_;
    if (isDraft(base)) {
      return applyPatchesImpl(base, patches);
    }
    return this.produce(
      base,
      (draft) => applyPatchesImpl(draft, patches)
    );
  }
};
function createProxy(value, parent) {
  const draft = isMap(value) ? getPlugin("MapSet").proxyMap_(value, parent) : isSet(value) ? getPlugin("MapSet").proxySet_(value, parent) : createProxyProxy(value, parent);
  const scope = parent ? parent.scope_ : getCurrentScope();
  scope.drafts_.push(draft);
  return draft;
}
function current(value) {
  if (!isDraft(value))
    die(10, value);
  return currentImpl(value);
}
function currentImpl(value) {
  if (!isDraftable(value) || isFrozen(value))
    return value;
  const state = value[DRAFT_STATE];
  let copy2;
  if (state) {
    if (!state.modified_)
      return state.base_;
    state.finalized_ = true;
    copy2 = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);
  } else {
    copy2 = shallowCopy(value, true);
  }
  each(copy2, (key, childValue) => {
    set(copy2, key, currentImpl(childValue));
  });
  if (state) {
    state.finalized_ = false;
  }
  return copy2;
}
function enablePatches() {
  const errorOffset = 16;
  const REPLACE = "replace";
  const ADD = "add";
  const REMOVE = "remove";
  function generatePatches_(state, basePath, patches, inversePatches) {
    switch (state.type_) {
      case 0:
      case 2:
        return generatePatchesFromAssigned(
          state,
          basePath,
          patches,
          inversePatches
        );
      case 1:
        return generateArrayPatches(state, basePath, patches, inversePatches);
      case 3:
        return generateSetPatches(
          state,
          basePath,
          patches,
          inversePatches
        );
    }
  }
  function generateArrayPatches(state, basePath, patches, inversePatches) {
    let { base_, assigned_ } = state;
    let copy_ = state.copy_;
    if (copy_.length < base_.length) {
      [base_, copy_] = [copy_, base_];
      [patches, inversePatches] = [inversePatches, patches];
    }
    for (let i = 0; i < base_.length; i++) {
      if (assigned_[i] && copy_[i] !== base_[i]) {
        const path = basePath.concat([i]);
        patches.push({
          op: REPLACE,
          path,
          // Need to maybe clone it, as it can in fact be the original value
          // due to the base/copy inversion at the start of this function
          value: clonePatchValueIfNeeded(copy_[i])
        });
        inversePatches.push({
          op: REPLACE,
          path,
          value: clonePatchValueIfNeeded(base_[i])
        });
      }
    }
    for (let i = base_.length; i < copy_.length; i++) {
      const path = basePath.concat([i]);
      patches.push({
        op: ADD,
        path,
        // Need to maybe clone it, as it can in fact be the original value
        // due to the base/copy inversion at the start of this function
        value: clonePatchValueIfNeeded(copy_[i])
      });
    }
    for (let i = copy_.length - 1; base_.length <= i; --i) {
      const path = basePath.concat([i]);
      inversePatches.push({
        op: REMOVE,
        path
      });
    }
  }
  function generatePatchesFromAssigned(state, basePath, patches, inversePatches) {
    const { base_, copy_ } = state;
    each(state.assigned_, (key, assignedValue) => {
      const origValue = get(base_, key);
      const value = get(copy_, key);
      const op = !assignedValue ? REMOVE : has(base_, key) ? REPLACE : ADD;
      if (origValue === value && op === REPLACE)
        return;
      const path = basePath.concat(key);
      patches.push(op === REMOVE ? { op, path } : { op, path, value });
      inversePatches.push(
        op === ADD ? { op: REMOVE, path } : op === REMOVE ? { op: ADD, path, value: clonePatchValueIfNeeded(origValue) } : { op: REPLACE, path, value: clonePatchValueIfNeeded(origValue) }
      );
    });
  }
  function generateSetPatches(state, basePath, patches, inversePatches) {
    let { base_, copy_ } = state;
    let i = 0;
    base_.forEach((value) => {
      if (!copy_.has(value)) {
        const path = basePath.concat([i]);
        patches.push({
          op: REMOVE,
          path,
          value
        });
        inversePatches.unshift({
          op: ADD,
          path,
          value
        });
      }
      i++;
    });
    i = 0;
    copy_.forEach((value) => {
      if (!base_.has(value)) {
        const path = basePath.concat([i]);
        patches.push({
          op: ADD,
          path,
          value
        });
        inversePatches.unshift({
          op: REMOVE,
          path,
          value
        });
      }
      i++;
    });
  }
  function generateReplacementPatches_(baseValue, replacement, patches, inversePatches) {
    patches.push({
      op: REPLACE,
      path: [],
      value: replacement === NOTHING ? void 0 : replacement
    });
    inversePatches.push({
      op: REPLACE,
      path: [],
      value: baseValue
    });
  }
  function applyPatches_(draft, patches) {
    patches.forEach((patch) => {
      const { path, op } = patch;
      let base = draft;
      for (let i = 0; i < path.length - 1; i++) {
        const parentType = getArchtype(base);
        let p = path[i];
        if (typeof p !== "string" && typeof p !== "number") {
          p = "" + p;
        }
        if ((parentType === 0 || parentType === 1) && (p === "__proto__" || p === "constructor"))
          die(errorOffset + 3);
        if (typeof base === "function" && p === "prototype")
          die(errorOffset + 3);
        base = get(base, p);
        if (typeof base !== "object")
          die(errorOffset + 2, path.join("/"));
      }
      const type2 = getArchtype(base);
      const value = deepClonePatchValue(patch.value);
      const key = path[path.length - 1];
      switch (op) {
        case REPLACE:
          switch (type2) {
            case 2:
              return base.set(key, value);
            case 3:
              die(errorOffset);
            default:
              return base[key] = value;
          }
        case ADD:
          switch (type2) {
            case 1:
              return key === "-" ? base.push(value) : base.splice(key, 0, value);
            case 2:
              return base.set(key, value);
            case 3:
              return base.add(value);
            default:
              return base[key] = value;
          }
        case REMOVE:
          switch (type2) {
            case 1:
              return base.splice(key, 1);
            case 2:
              return base.delete(key);
            case 3:
              return base.delete(patch.value);
            default:
              return delete base[key];
          }
        default:
          die(errorOffset + 1, op);
      }
    });
    return draft;
  }
  function deepClonePatchValue(obj) {
    if (!isDraftable(obj))
      return obj;
    if (Array.isArray(obj))
      return obj.map(deepClonePatchValue);
    if (isMap(obj))
      return new Map(
        Array.from(obj.entries()).map(([k, v]) => [k, deepClonePatchValue(v)])
      );
    if (isSet(obj))
      return new Set(Array.from(obj).map(deepClonePatchValue));
    const cloned = Object.create(getPrototypeOf$1(obj));
    for (const key in obj)
      cloned[key] = deepClonePatchValue(obj[key]);
    if (has(obj, DRAFTABLE))
      cloned[DRAFTABLE] = obj[DRAFTABLE];
    return cloned;
  }
  function clonePatchValueIfNeeded(obj) {
    if (isDraft(obj)) {
      return deepClonePatchValue(obj);
    } else
      return obj;
  }
  loadPlugin("Patches", {
    applyPatches_,
    generatePatches_,
    generateReplacementPatches_
  });
}
var immer = new Immer2();
var produce = immer.produce;
var produceWithPatches = immer.produceWithPatches.bind(
  immer
);
immer.setAutoFreeze.bind(immer);
immer.setUseStrictShallowCopy.bind(immer);
var applyPatches = immer.applyPatches.bind(immer);
immer.createDraft.bind(immer);
immer.finishDraft.bind(immer);
function assertIsFunction(func, errorMessage = `expected a function, instead received ${typeof func}`) {
  if (typeof func !== "function") {
    throw new TypeError(errorMessage);
  }
}
function assertIsObject(object, errorMessage = `expected an object, instead received ${typeof object}`) {
  if (typeof object !== "object") {
    throw new TypeError(errorMessage);
  }
}
function assertIsArrayOfFunctions(array, errorMessage = `expected all items to be functions, instead received the following types: `) {
  if (!array.every((item) => typeof item === "function")) {
    const itemTypes = array.map(
      (item) => typeof item === "function" ? `function ${item.name || "unnamed"}()` : typeof item
    ).join(", ");
    throw new TypeError(`${errorMessage}[${itemTypes}]`);
  }
}
var ensureIsArray = (item) => {
  return Array.isArray(item) ? item : [item];
};
function getDependencies(createSelectorArgs) {
  const dependencies = Array.isArray(createSelectorArgs[0]) ? createSelectorArgs[0] : createSelectorArgs;
  assertIsArrayOfFunctions(
    dependencies,
    `createSelector expects all input-selectors to be functions, but received the following types: `
  );
  return dependencies;
}
function collectInputSelectorResults(dependencies, inputSelectorArgs) {
  const inputSelectorResults = [];
  const { length } = dependencies;
  for (let i = 0; i < length; i++) {
    inputSelectorResults.push(dependencies[i].apply(null, inputSelectorArgs));
  }
  return inputSelectorResults;
}
var StrongRef = class {
  constructor(value) {
    this.value = value;
  }
  deref() {
    return this.value;
  }
};
var Ref = typeof WeakRef !== "undefined" ? WeakRef : StrongRef;
var UNTERMINATED = 0;
var TERMINATED = 1;
function createCacheNode() {
  return {
    s: UNTERMINATED,
    v: void 0,
    o: null,
    p: null
  };
}
function weakMapMemoize(func, options = {}) {
  let fnNode = createCacheNode();
  const { resultEqualityCheck } = options;
  let lastResult;
  let resultsCount = 0;
  function memoized() {
    var _a2;
    let cacheNode = fnNode;
    const { length } = arguments;
    for (let i = 0, l2 = length; i < l2; i++) {
      const arg = arguments[i];
      if (typeof arg === "function" || typeof arg === "object" && arg !== null) {
        let objectCache = cacheNode.o;
        if (objectCache === null) {
          cacheNode.o = objectCache = /* @__PURE__ */ new WeakMap();
        }
        const objectNode = objectCache.get(arg);
        if (objectNode === void 0) {
          cacheNode = createCacheNode();
          objectCache.set(arg, cacheNode);
        } else {
          cacheNode = objectNode;
        }
      } else {
        let primitiveCache = cacheNode.p;
        if (primitiveCache === null) {
          cacheNode.p = primitiveCache = /* @__PURE__ */ new Map();
        }
        const primitiveNode = primitiveCache.get(arg);
        if (primitiveNode === void 0) {
          cacheNode = createCacheNode();
          primitiveCache.set(arg, cacheNode);
        } else {
          cacheNode = primitiveNode;
        }
      }
    }
    const terminatedNode = cacheNode;
    let result;
    if (cacheNode.s === TERMINATED) {
      result = cacheNode.v;
    } else {
      result = func.apply(null, arguments);
      resultsCount++;
      if (resultEqualityCheck) {
        const lastResultValue = ((_a2 = lastResult == null ? void 0 : lastResult.deref) == null ? void 0 : _a2.call(lastResult)) ?? lastResult;
        if (lastResultValue != null && resultEqualityCheck(lastResultValue, result)) {
          result = lastResultValue;
          resultsCount !== 0 && resultsCount--;
        }
        const needsWeakRef = typeof result === "object" && result !== null || typeof result === "function";
        lastResult = needsWeakRef ? new Ref(result) : result;
      }
    }
    terminatedNode.s = TERMINATED;
    terminatedNode.v = result;
    return result;
  }
  memoized.clearCache = () => {
    fnNode = createCacheNode();
    memoized.resetResultsCount();
  };
  memoized.resultsCount = () => resultsCount;
  memoized.resetResultsCount = () => {
    resultsCount = 0;
  };
  return memoized;
}
function createSelectorCreator(memoizeOrOptions, ...memoizeOptionsFromArgs) {
  const createSelectorCreatorOptions = typeof memoizeOrOptions === "function" ? {
    memoize: memoizeOrOptions,
    memoizeOptions: memoizeOptionsFromArgs
  } : memoizeOrOptions;
  const createSelector2 = (...createSelectorArgs) => {
    let recomputations = 0;
    let dependencyRecomputations = 0;
    let lastResult;
    let directlyPassedOptions = {};
    let resultFunc = createSelectorArgs.pop();
    if (typeof resultFunc === "object") {
      directlyPassedOptions = resultFunc;
      resultFunc = createSelectorArgs.pop();
    }
    assertIsFunction(
      resultFunc,
      `createSelector expects an output function after the inputs, but received: [${typeof resultFunc}]`
    );
    const combinedOptions = {
      ...createSelectorCreatorOptions,
      ...directlyPassedOptions
    };
    const {
      memoize,
      memoizeOptions = [],
      argsMemoize = weakMapMemoize,
      argsMemoizeOptions = []
    } = combinedOptions;
    const finalMemoizeOptions = ensureIsArray(memoizeOptions);
    const finalArgsMemoizeOptions = ensureIsArray(argsMemoizeOptions);
    const dependencies = getDependencies(createSelectorArgs);
    const memoizedResultFunc = memoize(function recomputationWrapper() {
      recomputations++;
      return resultFunc.apply(
        null,
        arguments
      );
    }, ...finalMemoizeOptions);
    const selector = argsMemoize(function dependenciesChecker() {
      dependencyRecomputations++;
      const inputSelectorResults = collectInputSelectorResults(
        dependencies,
        arguments
      );
      lastResult = memoizedResultFunc.apply(null, inputSelectorResults);
      return lastResult;
    }, ...finalArgsMemoizeOptions);
    return Object.assign(selector, {
      resultFunc,
      memoizedResultFunc,
      dependencies,
      dependencyRecomputations: () => dependencyRecomputations,
      resetDependencyRecomputations: () => {
        dependencyRecomputations = 0;
      },
      lastResult: () => lastResult,
      recomputations: () => recomputations,
      resetRecomputations: () => {
        recomputations = 0;
      },
      memoize,
      argsMemoize
    });
  };
  Object.assign(createSelector2, {
    withTypes: () => createSelector2
  });
  return createSelector2;
}
var createSelector = /* @__PURE__ */ createSelectorCreator(weakMapMemoize);
var createStructuredSelector = Object.assign(
  (inputSelectorsObject, selectorCreator = createSelector) => {
    assertIsObject(
      inputSelectorsObject,
      `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof inputSelectorsObject}`
    );
    const inputSelectorKeys = Object.keys(inputSelectorsObject);
    const dependencies = inputSelectorKeys.map(
      (key) => inputSelectorsObject[key]
    );
    const structuredSelector = selectorCreator(
      dependencies,
      (...inputSelectorResults) => {
        return inputSelectorResults.reduce((composition, value, index) => {
          composition[inputSelectorKeys[index]] = value;
          return composition;
        }, {});
      }
    );
    return structuredSelector;
  },
  { withTypes: () => createStructuredSelector }
);
var hasMatchFunction = (v) => {
  return v && typeof v.match === "function";
};
function createAction(type2, prepareAction) {
  function actionCreator(...args) {
    if (prepareAction) {
      let prepared = prepareAction(...args);
      if (!prepared) {
        throw new Error(formatProdErrorMessage(0));
      }
      return {
        type: type2,
        payload: prepared.payload,
        ..."meta" in prepared && {
          meta: prepared.meta
        },
        ..."error" in prepared && {
          error: prepared.error
        }
      };
    }
    return {
      type: type2,
      payload: args[0]
    };
  }
  actionCreator.toString = () => `${type2}`;
  actionCreator.type = type2;
  actionCreator.match = (action) => isAction(action) && action.type === type2;
  return actionCreator;
}
function freezeDraftable(val) {
  return isDraftable(val) ? produce(val, () => {
  }) : val;
}
function getOrInsertComputed(map, key, compute) {
  if (map.has(key)) return map.get(key);
  return map.set(key, compute(key)).get(key);
}
var SHOULD_AUTOBATCH = "RTK_autoBatch";
var prepareAutoBatched = () => (payload) => ({
  payload,
  meta: {
    [SHOULD_AUTOBATCH]: true
  }
});
function executeReducerBuilderCallback(builderCallback) {
  const actionsMap = {};
  const actionMatchers = [];
  let defaultCaseReducer;
  const builder = {
    addCase(typeOrActionCreator, reducer) {
      const type2 = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
      if (!type2) {
        throw new Error(formatProdErrorMessage(28));
      }
      if (type2 in actionsMap) {
        throw new Error(formatProdErrorMessage(29));
      }
      actionsMap[type2] = reducer;
      return builder;
    },
    addMatcher(matcher, reducer) {
      actionMatchers.push({
        matcher,
        reducer
      });
      return builder;
    },
    addDefaultCase(reducer) {
      defaultCaseReducer = reducer;
      return builder;
    }
  };
  builderCallback(builder);
  return [actionsMap, actionMatchers, defaultCaseReducer];
}
function isStateFunction(x) {
  return typeof x === "function";
}
function createReducer(initialState2, mapOrBuilderCallback) {
  let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = executeReducerBuilderCallback(mapOrBuilderCallback);
  let getInitialState;
  if (isStateFunction(initialState2)) {
    getInitialState = () => freezeDraftable(initialState2());
  } else {
    const frozenInitialState = freezeDraftable(initialState2);
    getInitialState = () => frozenInitialState;
  }
  function reducer(state = getInitialState(), action) {
    let caseReducers = [actionsMap[action.type], ...finalActionMatchers.filter(({
      matcher
    }) => matcher(action)).map(({
      reducer: reducer2
    }) => reducer2)];
    if (caseReducers.filter((cr) => !!cr).length === 0) {
      caseReducers = [finalDefaultCaseReducer];
    }
    return caseReducers.reduce((previousState, caseReducer) => {
      if (caseReducer) {
        if (isDraft(previousState)) {
          const draft = previousState;
          const result = caseReducer(draft, action);
          if (result === void 0) {
            return previousState;
          }
          return result;
        } else if (!isDraftable(previousState)) {
          const result = caseReducer(previousState, action);
          if (result === void 0) {
            if (previousState === null) {
              return previousState;
            }
            throw Error("A case reducer on a non-draftable value must not return undefined");
          }
          return result;
        } else {
          return produce(previousState, (draft) => {
            return caseReducer(draft, action);
          });
        }
      }
      return previousState;
    }, state);
  }
  reducer.getInitialState = getInitialState;
  return reducer;
}
var matches = (matcher, action) => {
  if (hasMatchFunction(matcher)) {
    return matcher.match(action);
  } else {
    return matcher(action);
  }
};
function isAnyOf(...matchers) {
  return (action) => {
    return matchers.some((matcher) => matches(matcher, action));
  };
}
function isAllOf(...matchers) {
  return (action) => {
    return matchers.every((matcher) => matches(matcher, action));
  };
}
function hasExpectedRequestMetadata(action, validStatus) {
  if (!action || !action.meta) return false;
  const hasValidRequestId = typeof action.meta.requestId === "string";
  const hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
  return hasValidRequestId && hasValidRequestStatus;
}
function isAsyncThunkArray(a) {
  return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0];
}
function isPending(...asyncThunks) {
  if (asyncThunks.length === 0) {
    return (action) => hasExpectedRequestMetadata(action, ["pending"]);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isPending()(asyncThunks[0]);
  }
  return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.pending));
}
function isRejected(...asyncThunks) {
  if (asyncThunks.length === 0) {
    return (action) => hasExpectedRequestMetadata(action, ["rejected"]);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isRejected()(asyncThunks[0]);
  }
  return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.rejected));
}
function isRejectedWithValue(...asyncThunks) {
  const hasFlag = (action) => {
    return action && action.meta && action.meta.rejectedWithValue;
  };
  if (asyncThunks.length === 0) {
    return isAllOf(isRejected(...asyncThunks), hasFlag);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isRejectedWithValue()(asyncThunks[0]);
  }
  return isAllOf(isRejected(...asyncThunks), hasFlag);
}
function isFulfilled(...asyncThunks) {
  if (asyncThunks.length === 0) {
    return (action) => hasExpectedRequestMetadata(action, ["fulfilled"]);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isFulfilled()(asyncThunks[0]);
  }
  return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.fulfilled));
}
function isAsyncThunkAction(...asyncThunks) {
  if (asyncThunks.length === 0) {
    return (action) => hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isAsyncThunkAction()(asyncThunks[0]);
  }
  return isAnyOf(...asyncThunks.flatMap((asyncThunk) => [asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled]));
}
var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
var nanoid = (size = 21) => {
  let id = "";
  let i = size;
  while (i--) {
    id += urlAlphabet[Math.random() * 64 | 0];
  }
  return id;
};
var commonProperties = ["name", "message", "stack", "code"];
var RejectWithValue = class {
  constructor(payload, meta) {
    __publicField(this, "_type");
    this.payload = payload;
    this.meta = meta;
  }
};
var FulfillWithMeta = class {
  constructor(payload, meta) {
    __publicField(this, "_type");
    this.payload = payload;
    this.meta = meta;
  }
};
var miniSerializeError = (value) => {
  if (typeof value === "object" && value !== null) {
    const simpleError = {};
    for (const property of commonProperties) {
      if (typeof value[property] === "string") {
        simpleError[property] = value[property];
      }
    }
    return simpleError;
  }
  return {
    message: String(value)
  };
};
var createAsyncThunk = /* @__PURE__ */ (() => {
  function createAsyncThunk2(typePrefix, payloadCreator, options) {
    const fulfilled = createAction(typePrefix + "/fulfilled", (payload, requestId, arg, meta) => ({
      payload,
      meta: {
        ...meta || {},
        arg,
        requestId,
        requestStatus: "fulfilled"
      }
    }));
    const pending = createAction(typePrefix + "/pending", (requestId, arg, meta) => ({
      payload: void 0,
      meta: {
        ...meta || {},
        arg,
        requestId,
        requestStatus: "pending"
      }
    }));
    const rejected = createAction(typePrefix + "/rejected", (error, requestId, arg, payload, meta) => ({
      payload,
      error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
      meta: {
        ...meta || {},
        arg,
        requestId,
        rejectedWithValue: !!payload,
        requestStatus: "rejected",
        aborted: (error == null ? void 0 : error.name) === "AbortError",
        condition: (error == null ? void 0 : error.name) === "ConditionError"
      }
    }));
    function actionCreator(arg) {
      return (dispatch, getState, extra) => {
        const requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid();
        const abortController = new AbortController();
        let abortHandler;
        let abortReason;
        function abort(reason) {
          abortReason = reason;
          abortController.abort();
        }
        const promise = async function() {
          var _a2, _b;
          let finalAction;
          try {
            let conditionResult = (_a2 = options == null ? void 0 : options.condition) == null ? void 0 : _a2.call(options, arg, {
              getState,
              extra
            });
            if (isThenable$1(conditionResult)) {
              conditionResult = await conditionResult;
            }
            if (conditionResult === false || abortController.signal.aborted) {
              throw {
                name: "ConditionError",
                message: "Aborted due to condition callback returning false."
              };
            }
            const abortedPromise = new Promise((_, reject) => {
              abortHandler = () => {
                reject({
                  name: "AbortError",
                  message: abortReason || "Aborted"
                });
              };
              abortController.signal.addEventListener("abort", abortHandler);
            });
            dispatch(pending(requestId, arg, (_b = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _b.call(options, {
              requestId,
              arg
            }, {
              getState,
              extra
            })));
            finalAction = await Promise.race([abortedPromise, Promise.resolve(payloadCreator(arg, {
              dispatch,
              getState,
              extra,
              requestId,
              signal: abortController.signal,
              abort,
              rejectWithValue: (value, meta) => {
                return new RejectWithValue(value, meta);
              },
              fulfillWithValue: (value, meta) => {
                return new FulfillWithMeta(value, meta);
              }
            })).then((result) => {
              if (result instanceof RejectWithValue) {
                throw result;
              }
              if (result instanceof FulfillWithMeta) {
                return fulfilled(result.payload, requestId, arg, result.meta);
              }
              return fulfilled(result, requestId, arg);
            })]);
          } catch (err) {
            finalAction = err instanceof RejectWithValue ? rejected(null, requestId, arg, err.payload, err.meta) : rejected(err, requestId, arg);
          } finally {
            if (abortHandler) {
              abortController.signal.removeEventListener("abort", abortHandler);
            }
          }
          const skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
          if (!skipDispatch) {
            dispatch(finalAction);
          }
          return finalAction;
        }();
        return Object.assign(promise, {
          abort,
          requestId,
          arg,
          unwrap() {
            return promise.then(unwrapResult);
          }
        });
      };
    }
    return Object.assign(actionCreator, {
      pending,
      rejected,
      fulfilled,
      settled: isAnyOf(rejected, fulfilled),
      typePrefix
    });
  }
  createAsyncThunk2.withTypes = () => createAsyncThunk2;
  return createAsyncThunk2;
})();
function unwrapResult(action) {
  if (action.meta && action.meta.rejectedWithValue) {
    throw action.payload;
  }
  if (action.error) {
    throw action.error;
  }
  return action.payload;
}
function isThenable$1(value) {
  return value !== null && typeof value === "object" && typeof value.then === "function";
}
var asyncThunkSymbol = /* @__PURE__ */ Symbol.for("rtk-slice-createasyncthunk");
function getType(slice, actionKey) {
  return `${slice}/${actionKey}`;
}
function buildCreateSlice({
  creators
} = {}) {
  var _a2;
  const cAT = (_a2 = creators == null ? void 0 : creators.asyncThunk) == null ? void 0 : _a2[asyncThunkSymbol];
  return function createSlice2(options) {
    const {
      name: name2,
      reducerPath = name2
    } = options;
    if (!name2) {
      throw new Error(formatProdErrorMessage(11));
    }
    const reducers = (typeof options.reducers === "function" ? options.reducers(buildReducerCreators()) : options.reducers) || {};
    const reducerNames = Object.keys(reducers);
    const context = {
      sliceCaseReducersByName: {},
      sliceCaseReducersByType: {},
      actionCreators: {},
      sliceMatchers: []
    };
    const contextMethods = {
      addCase(typeOrActionCreator, reducer2) {
        const type2 = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
        if (!type2) {
          throw new Error(formatProdErrorMessage(12));
        }
        if (type2 in context.sliceCaseReducersByType) {
          throw new Error(formatProdErrorMessage(13));
        }
        context.sliceCaseReducersByType[type2] = reducer2;
        return contextMethods;
      },
      addMatcher(matcher, reducer2) {
        context.sliceMatchers.push({
          matcher,
          reducer: reducer2
        });
        return contextMethods;
      },
      exposeAction(name22, actionCreator) {
        context.actionCreators[name22] = actionCreator;
        return contextMethods;
      },
      exposeCaseReducer(name22, reducer2) {
        context.sliceCaseReducersByName[name22] = reducer2;
        return contextMethods;
      }
    };
    reducerNames.forEach((reducerName) => {
      const reducerDefinition = reducers[reducerName];
      const reducerDetails = {
        reducerName,
        type: getType(name2, reducerName),
        createNotation: typeof options.reducers === "function"
      };
      if (isAsyncThunkSliceReducerDefinition(reducerDefinition)) {
        handleThunkCaseReducerDefinition(reducerDetails, reducerDefinition, contextMethods, cAT);
      } else {
        handleNormalReducerDefinition(reducerDetails, reducerDefinition, contextMethods);
      }
    });
    function buildReducer() {
      const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];
      const finalCaseReducers = {
        ...extraReducers,
        ...context.sliceCaseReducersByType
      };
      return createReducer(options.initialState, (builder) => {
        for (let key in finalCaseReducers) {
          builder.addCase(key, finalCaseReducers[key]);
        }
        for (let sM of context.sliceMatchers) {
          builder.addMatcher(sM.matcher, sM.reducer);
        }
        for (let m of actionMatchers) {
          builder.addMatcher(m.matcher, m.reducer);
        }
        if (defaultCaseReducer) {
          builder.addDefaultCase(defaultCaseReducer);
        }
      });
    }
    const selectSelf = (state) => state;
    const injectedSelectorCache = /* @__PURE__ */ new Map();
    let _reducer;
    function reducer(state, action) {
      if (!_reducer) _reducer = buildReducer();
      return _reducer(state, action);
    }
    function getInitialState() {
      if (!_reducer) _reducer = buildReducer();
      return _reducer.getInitialState();
    }
    function makeSelectorProps(reducerPath2, injected = false) {
      function selectSlice(state) {
        let sliceState = state[reducerPath2];
        if (typeof sliceState === "undefined") {
          if (injected) {
            sliceState = getInitialState();
          }
        }
        return sliceState;
      }
      function getSelectors(selectState = selectSelf) {
        const selectorCache = getOrInsertComputed(injectedSelectorCache, injected, () => /* @__PURE__ */ new WeakMap());
        return getOrInsertComputed(selectorCache, selectState, () => {
          const map = {};
          for (const [name22, selector] of Object.entries(options.selectors ?? {})) {
            map[name22] = wrapSelector(selector, selectState, getInitialState, injected);
          }
          return map;
        });
      }
      return {
        reducerPath: reducerPath2,
        getSelectors,
        get selectors() {
          return getSelectors(selectSlice);
        },
        selectSlice
      };
    }
    const slice = {
      name: name2,
      reducer,
      actions: context.actionCreators,
      caseReducers: context.sliceCaseReducersByName,
      getInitialState,
      ...makeSelectorProps(reducerPath),
      injectInto(injectable, {
        reducerPath: pathOpt,
        ...config
      } = {}) {
        const newReducerPath = pathOpt ?? reducerPath;
        injectable.inject({
          reducerPath: newReducerPath,
          reducer
        }, config);
        return {
          ...slice,
          ...makeSelectorProps(newReducerPath, true)
        };
      }
    };
    return slice;
  };
}
function wrapSelector(selector, selectState, getInitialState, injected) {
  function wrapper(rootState, ...args) {
    let sliceState = selectState(rootState);
    if (typeof sliceState === "undefined") {
      if (injected) {
        sliceState = getInitialState();
      }
    }
    return selector(sliceState, ...args);
  }
  wrapper.unwrapped = selector;
  return wrapper;
}
var createSlice = /* @__PURE__ */ buildCreateSlice();
function buildReducerCreators() {
  function asyncThunk(payloadCreator, config) {
    return {
      _reducerDefinitionType: "asyncThunk",
      payloadCreator,
      ...config
    };
  }
  asyncThunk.withTypes = () => asyncThunk;
  return {
    reducer(caseReducer) {
      return Object.assign({
        // hack so the wrapping function has the same name as the original
        // we need to create a wrapper so the `reducerDefinitionType` is not assigned to the original
        [caseReducer.name](...args) {
          return caseReducer(...args);
        }
      }[caseReducer.name], {
        _reducerDefinitionType: "reducer"
        /* reducer */
      });
    },
    preparedReducer(prepare, reducer) {
      return {
        _reducerDefinitionType: "reducerWithPrepare",
        prepare,
        reducer
      };
    },
    asyncThunk
  };
}
function handleNormalReducerDefinition({
  type: type2,
  reducerName,
  createNotation
}, maybeReducerWithPrepare, context) {
  let caseReducer;
  let prepareCallback;
  if ("reducer" in maybeReducerWithPrepare) {
    if (createNotation && !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)) {
      throw new Error(formatProdErrorMessage(17));
    }
    caseReducer = maybeReducerWithPrepare.reducer;
    prepareCallback = maybeReducerWithPrepare.prepare;
  } else {
    caseReducer = maybeReducerWithPrepare;
  }
  context.addCase(type2, caseReducer).exposeCaseReducer(reducerName, caseReducer).exposeAction(reducerName, prepareCallback ? createAction(type2, prepareCallback) : createAction(type2));
}
function isAsyncThunkSliceReducerDefinition(reducerDefinition) {
  return reducerDefinition._reducerDefinitionType === "asyncThunk";
}
function isCaseReducerWithPrepareDefinition(reducerDefinition) {
  return reducerDefinition._reducerDefinitionType === "reducerWithPrepare";
}
function handleThunkCaseReducerDefinition({
  type: type2,
  reducerName
}, reducerDefinition, context, cAT) {
  if (!cAT) {
    throw new Error(formatProdErrorMessage(18));
  }
  const {
    payloadCreator,
    fulfilled,
    pending,
    rejected,
    settled,
    options
  } = reducerDefinition;
  const thunk = cAT(type2, payloadCreator, options);
  context.exposeAction(reducerName, thunk);
  if (fulfilled) {
    context.addCase(thunk.fulfilled, fulfilled);
  }
  if (pending) {
    context.addCase(thunk.pending, pending);
  }
  if (rejected) {
    context.addCase(thunk.rejected, rejected);
  }
  if (settled) {
    context.addMatcher(thunk.settled, settled);
  }
  context.exposeCaseReducer(reducerName, {
    fulfilled: fulfilled || noop$1,
    pending: pending || noop$1,
    rejected: rejected || noop$1,
    settled: settled || noop$1
  });
}
function noop$1() {
}
function formatProdErrorMessage(code) {
  return `Minified Redux Toolkit error #${code}; visit https://redux-toolkit.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
}
var QueryStatus = /* @__PURE__ */ ((QueryStatus2) => {
  QueryStatus2["uninitialized"] = "uninitialized";
  QueryStatus2["pending"] = "pending";
  QueryStatus2["fulfilled"] = "fulfilled";
  QueryStatus2["rejected"] = "rejected";
  return QueryStatus2;
})(QueryStatus || {});
function getRequestStatusFlags(status) {
  return {
    status,
    isUninitialized: status === "uninitialized",
    isLoading: status === "pending",
    isSuccess: status === "fulfilled",
    isError: status === "rejected"
    /* rejected */
  };
}
var isPlainObject2 = isPlainObject$1;
function copyWithStructuralSharing(oldObj, newObj) {
  if (oldObj === newObj || !(isPlainObject2(oldObj) && isPlainObject2(newObj) || Array.isArray(oldObj) && Array.isArray(newObj))) {
    return newObj;
  }
  const newKeys = Object.keys(newObj);
  const oldKeys = Object.keys(oldObj);
  let isSameObject = newKeys.length === oldKeys.length;
  const mergeObj = Array.isArray(newObj) ? [] : {};
  for (const key of newKeys) {
    mergeObj[key] = copyWithStructuralSharing(oldObj[key], newObj[key]);
    if (isSameObject) isSameObject = oldObj[key] === mergeObj[key];
  }
  return isSameObject ? oldObj : mergeObj;
}
function countObjectKeys$1(obj) {
  let count = 0;
  for (const _key in obj) {
    count++;
  }
  return count;
}
var flatten = (arr) => [].concat(...arr);
function isAbsoluteUrl(url) {
  return new RegExp(`(^|:)//`).test(url);
}
function isDocumentVisible() {
  if (typeof document === "undefined") {
    return true;
  }
  return document.visibilityState !== "hidden";
}
function isNotNullish(v) {
  return v != null;
}
function isOnline() {
  return typeof navigator === "undefined" ? true : navigator.onLine === void 0 ? true : navigator.onLine;
}
var withoutTrailingSlash = (url) => url.replace(/\/$/, "");
var withoutLeadingSlash = (url) => url.replace(/^\//, "");
function joinUrls(base, url) {
  if (!base) {
    return url;
  }
  if (!url) {
    return base;
  }
  if (isAbsoluteUrl(url)) {
    return url;
  }
  const delimiter = base.endsWith("/") || !url.startsWith("?") ? "/" : "";
  base = withoutTrailingSlash(base);
  url = withoutLeadingSlash(url);
  return `${base}${delimiter}${url}`;
}
function getOrInsert(map, key, value) {
  if (map.has(key)) return map.get(key);
  return map.set(key, value).get(key);
}
var defaultFetchFn = (...args) => fetch(...args);
var defaultValidateStatus = (response) => response.status >= 200 && response.status <= 299;
var defaultIsJsonContentType = (headers) => (
  /*applicat*/
  /ion\/(vnd\.api\+)?json/.test(headers.get("content-type") || "")
);
function stripUndefined(obj) {
  if (!isPlainObject$1(obj)) {
    return obj;
  }
  const copy2 = {
    ...obj
  };
  for (const [k, v] of Object.entries(copy2)) {
    if (v === void 0) delete copy2[k];
  }
  return copy2;
}
function fetchBaseQuery({
  baseUrl,
  prepareHeaders: prepareHeaders2 = (x) => x,
  fetchFn = defaultFetchFn,
  paramsSerializer,
  isJsonContentType = defaultIsJsonContentType,
  jsonContentType = "application/json",
  jsonReplacer,
  timeout: defaultTimeout,
  responseHandler: globalResponseHandler,
  validateStatus: globalValidateStatus,
  ...baseFetchOptions
} = {}) {
  if (typeof fetch === "undefined" && fetchFn === defaultFetchFn) {
    console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments.");
  }
  return async (arg, api, extraOptions) => {
    const {
      getState,
      extra,
      endpoint,
      forced,
      type: type2
    } = api;
    let meta;
    let {
      url,
      headers = new Headers(baseFetchOptions.headers),
      params = void 0,
      responseHandler = globalResponseHandler ?? "json",
      validateStatus: validateStatus2 = globalValidateStatus ?? defaultValidateStatus,
      timeout = defaultTimeout,
      ...rest
    } = typeof arg == "string" ? {
      url: arg
    } : arg;
    let abortController, signal = api.signal;
    if (timeout) {
      abortController = new AbortController();
      api.signal.addEventListener("abort", abortController.abort);
      signal = abortController.signal;
    }
    let config = {
      ...baseFetchOptions,
      signal,
      ...rest
    };
    headers = new Headers(stripUndefined(headers));
    config.headers = await prepareHeaders2(headers, {
      getState,
      arg,
      extra,
      endpoint,
      forced,
      type: type2,
      extraOptions
    }) || headers;
    const isJsonifiable = (body) => typeof body === "object" && (isPlainObject$1(body) || Array.isArray(body) || typeof body.toJSON === "function");
    if (!config.headers.has("content-type") && isJsonifiable(config.body)) {
      config.headers.set("content-type", jsonContentType);
    }
    if (isJsonifiable(config.body) && isJsonContentType(config.headers)) {
      config.body = JSON.stringify(config.body, jsonReplacer);
    }
    if (params) {
      const divider = ~url.indexOf("?") ? "&" : "?";
      const query = paramsSerializer ? paramsSerializer(params) : new URLSearchParams(stripUndefined(params));
      url += divider + query;
    }
    url = joinUrls(baseUrl, url);
    const request = new Request(url, config);
    const requestClone = new Request(url, config);
    meta = {
      request: requestClone
    };
    let response, timedOut = false, timeoutId = abortController && setTimeout(() => {
      timedOut = true;
      abortController.abort();
    }, timeout);
    try {
      response = await fetchFn(request);
    } catch (e) {
      return {
        error: {
          status: timedOut ? "TIMEOUT_ERROR" : "FETCH_ERROR",
          error: String(e)
        },
        meta
      };
    } finally {
      if (timeoutId) clearTimeout(timeoutId);
      abortController == null ? void 0 : abortController.signal.removeEventListener("abort", abortController.abort);
    }
    const responseClone = response.clone();
    meta.response = responseClone;
    let resultData;
    let responseText = "";
    try {
      let handleResponseError;
      await Promise.all([
        handleResponse(response, responseHandler).then((r2) => resultData = r2, (e) => handleResponseError = e),
        // see https://github.com/node-fetch/node-fetch/issues/665#issuecomment-538995182
        // we *have* to "use up" both streams at the same time or they will stop running in node-fetch scenarios
        responseClone.text().then((r2) => responseText = r2, () => {
        })
      ]);
      if (handleResponseError) throw handleResponseError;
    } catch (e) {
      return {
        error: {
          status: "PARSING_ERROR",
          originalStatus: response.status,
          data: responseText,
          error: String(e)
        },
        meta
      };
    }
    return validateStatus2(response, resultData) ? {
      data: resultData,
      meta
    } : {
      error: {
        status: response.status,
        data: resultData
      },
      meta
    };
  };
  async function handleResponse(response, responseHandler) {
    if (typeof responseHandler === "function") {
      return responseHandler(response);
    }
    if (responseHandler === "content-type") {
      responseHandler = isJsonContentType(response.headers) ? "json" : "text";
    }
    if (responseHandler === "json") {
      const text = await response.text();
      return text.length ? JSON.parse(text) : null;
    }
    return response.text();
  }
}
var HandledError = class {
  constructor(value, meta = void 0) {
    this.value = value;
    this.meta = meta;
  }
};
var onFocus = /* @__PURE__ */ createAction("__rtkq/focused");
var onFocusLost = /* @__PURE__ */ createAction("__rtkq/unfocused");
var onOnline = /* @__PURE__ */ createAction("__rtkq/online");
var onOffline = /* @__PURE__ */ createAction("__rtkq/offline");
function isQueryDefinition$1(e) {
  return e.type === "query";
}
function isMutationDefinition$1(e) {
  return e.type === "mutation";
}
function calculateProvidedBy(description, result, error, queryArg, meta, assertTagTypes) {
  if (isFunction$2(description)) {
    return description(result, error, queryArg, meta).filter(isNotNullish).map(expandTagDescription).map(assertTagTypes);
  }
  if (Array.isArray(description)) {
    return description.map(expandTagDescription).map(assertTagTypes);
  }
  return [];
}
function isFunction$2(t2) {
  return typeof t2 === "function";
}
function expandTagDescription(description) {
  return typeof description === "string" ? {
    type: description
  } : description;
}
function asSafePromise(promise, fallback) {
  return promise.catch(fallback);
}
var forceQueryFnSymbol = Symbol("forceQueryFn");
var isUpsertQuery = (arg) => typeof arg[forceQueryFnSymbol] === "function";
function buildInitiate({
  serializeQueryArgs,
  queryThunk,
  mutationThunk,
  api,
  context
}) {
  const runningQueries = /* @__PURE__ */ new Map();
  const runningMutations = /* @__PURE__ */ new Map();
  const {
    unsubscribeQueryResult,
    removeMutationResult,
    updateSubscriptionOptions
  } = api.internalActions;
  return {
    buildInitiateQuery,
    buildInitiateMutation,
    getRunningQueryThunk,
    getRunningMutationThunk,
    getRunningQueriesThunk,
    getRunningMutationsThunk
  };
  function getRunningQueryThunk(endpointName, queryArgs) {
    return (dispatch) => {
      var _a2;
      const endpointDefinition = context.endpointDefinitions[endpointName];
      const queryCacheKey = serializeQueryArgs({
        queryArgs,
        endpointDefinition,
        endpointName
      });
      return (_a2 = runningQueries.get(dispatch)) == null ? void 0 : _a2[queryCacheKey];
    };
  }
  function getRunningMutationThunk(_endpointName, fixedCacheKeyOrRequestId) {
    return (dispatch) => {
      var _a2;
      return (_a2 = runningMutations.get(dispatch)) == null ? void 0 : _a2[fixedCacheKeyOrRequestId];
    };
  }
  function getRunningQueriesThunk() {
    return (dispatch) => Object.values(runningQueries.get(dispatch) || {}).filter(isNotNullish);
  }
  function getRunningMutationsThunk() {
    return (dispatch) => Object.values(runningMutations.get(dispatch) || {}).filter(isNotNullish);
  }
  function buildInitiateQuery(endpointName, endpointDefinition) {
    const queryAction = (arg, {
      subscribe = true,
      forceRefetch,
      subscriptionOptions,
      [forceQueryFnSymbol]: forceQueryFn,
      ...rest
    } = {}) => (dispatch, getState) => {
      var _a2;
      const queryCacheKey = serializeQueryArgs({
        queryArgs: arg,
        endpointDefinition,
        endpointName
      });
      const thunk = queryThunk({
        ...rest,
        type: "query",
        subscribe,
        forceRefetch,
        subscriptionOptions,
        endpointName,
        originalArgs: arg,
        queryCacheKey,
        [forceQueryFnSymbol]: forceQueryFn
      });
      const selector = api.endpoints[endpointName].select(arg);
      const thunkResult = dispatch(thunk);
      const stateAfter = selector(getState());
      const {
        requestId,
        abort
      } = thunkResult;
      const skippedSynchronously = stateAfter.requestId !== requestId;
      const runningQuery = (_a2 = runningQueries.get(dispatch)) == null ? void 0 : _a2[queryCacheKey];
      const selectFromState = () => selector(getState());
      const statePromise = Object.assign(forceQueryFn ? (
        // a query has been forced (upsertQueryData)
        // -> we want to resolve it once data has been written with the data that will be written
        thunkResult.then(selectFromState)
      ) : skippedSynchronously && !runningQuery ? (
        // a query has been skipped due to a condition and we do not have any currently running query
        // -> we want to resolve it immediately with the current data
        Promise.resolve(stateAfter)
      ) : (
        // query just started or one is already in flight
        // -> wait for the running query, then resolve with data from after that
        Promise.all([runningQuery, thunkResult]).then(selectFromState)
      ), {
        arg,
        requestId,
        subscriptionOptions,
        queryCacheKey,
        abort,
        async unwrap() {
          const result = await statePromise;
          if (result.isError) {
            throw result.error;
          }
          return result.data;
        },
        refetch: () => dispatch(queryAction(arg, {
          subscribe: false,
          forceRefetch: true
        })),
        unsubscribe() {
          if (subscribe) dispatch(unsubscribeQueryResult({
            queryCacheKey,
            requestId
          }));
        },
        updateSubscriptionOptions(options) {
          statePromise.subscriptionOptions = options;
          dispatch(updateSubscriptionOptions({
            endpointName,
            requestId,
            queryCacheKey,
            options
          }));
        }
      });
      if (!runningQuery && !skippedSynchronously && !forceQueryFn) {
        const running = getOrInsert(runningQueries, dispatch, {});
        running[queryCacheKey] = statePromise;
        statePromise.then(() => {
          delete running[queryCacheKey];
          if (!countObjectKeys$1(running)) {
            runningQueries.delete(dispatch);
          }
        });
      }
      return statePromise;
    };
    return queryAction;
  }
  function buildInitiateMutation(endpointName) {
    return (arg, {
      track = true,
      fixedCacheKey
    } = {}) => (dispatch, getState) => {
      const thunk = mutationThunk({
        type: "mutation",
        endpointName,
        originalArgs: arg,
        track,
        fixedCacheKey
      });
      const thunkResult = dispatch(thunk);
      const {
        requestId,
        abort,
        unwrap
      } = thunkResult;
      const returnValuePromise = asSafePromise(thunkResult.unwrap().then((data) => ({
        data
      })), (error) => ({
        error
      }));
      const reset2 = () => {
        dispatch(removeMutationResult({
          requestId,
          fixedCacheKey
        }));
      };
      const ret = Object.assign(returnValuePromise, {
        arg: thunkResult.arg,
        requestId,
        abort,
        unwrap,
        reset: reset2
      });
      const running = runningMutations.get(dispatch) || {};
      runningMutations.set(dispatch, running);
      running[requestId] = ret;
      ret.then(() => {
        delete running[requestId];
        if (!countObjectKeys$1(running)) {
          runningMutations.delete(dispatch);
        }
      });
      if (fixedCacheKey) {
        running[fixedCacheKey] = ret;
        ret.then(() => {
          if (running[fixedCacheKey] === ret) {
            delete running[fixedCacheKey];
            if (!countObjectKeys$1(running)) {
              runningMutations.delete(dispatch);
            }
          }
        });
      }
      return ret;
    };
  }
}
function defaultTransformResponse(baseQueryReturnValue) {
  return baseQueryReturnValue;
}
function buildThunks({
  reducerPath,
  baseQuery,
  context: {
    endpointDefinitions
  },
  serializeQueryArgs,
  api,
  assertTagType
}) {
  const patchQueryData = (endpointName, arg, patches, updateProvided) => (dispatch, getState) => {
    const endpointDefinition = endpointDefinitions[endpointName];
    const queryCacheKey = serializeQueryArgs({
      queryArgs: arg,
      endpointDefinition,
      endpointName
    });
    dispatch(api.internalActions.queryResultPatched({
      queryCacheKey,
      patches
    }));
    if (!updateProvided) {
      return;
    }
    const newValue = api.endpoints[endpointName].select(arg)(
      // Work around TS 4.1 mismatch
      getState()
    );
    const providedTags = calculateProvidedBy(endpointDefinition.providesTags, newValue.data, void 0, arg, {}, assertTagType);
    dispatch(api.internalActions.updateProvidedBy({
      queryCacheKey,
      providedTags
    }));
  };
  const updateQueryData = (endpointName, arg, updateRecipe, updateProvided = true) => (dispatch, getState) => {
    const endpointDefinition = api.endpoints[endpointName];
    const currentState = endpointDefinition.select(arg)(
      // Work around TS 4.1 mismatch
      getState()
    );
    const ret = {
      patches: [],
      inversePatches: [],
      undo: () => dispatch(api.util.patchQueryData(endpointName, arg, ret.inversePatches, updateProvided))
    };
    if (currentState.status === "uninitialized") {
      return ret;
    }
    let newValue;
    if ("data" in currentState) {
      if (isDraftable(currentState.data)) {
        const [value, patches, inversePatches] = produceWithPatches(currentState.data, updateRecipe);
        ret.patches.push(...patches);
        ret.inversePatches.push(...inversePatches);
        newValue = value;
      } else {
        newValue = updateRecipe(currentState.data);
        ret.patches.push({
          op: "replace",
          path: [],
          value: newValue
        });
        ret.inversePatches.push({
          op: "replace",
          path: [],
          value: currentState.data
        });
      }
    }
    if (ret.patches.length === 0) {
      return ret;
    }
    dispatch(api.util.patchQueryData(endpointName, arg, ret.patches, updateProvided));
    return ret;
  };
  const upsertQueryData = (endpointName, arg, value) => (dispatch) => {
    return dispatch(api.endpoints[endpointName].initiate(arg, {
      subscribe: false,
      forceRefetch: true,
      [forceQueryFnSymbol]: () => ({
        data: value
      })
    }));
  };
  const executeEndpoint = async (arg, {
    signal,
    abort,
    rejectWithValue,
    fulfillWithValue,
    dispatch,
    getState,
    extra
  }) => {
    const endpointDefinition = endpointDefinitions[arg.endpointName];
    try {
      let transformResponse2 = defaultTransformResponse;
      let result;
      const baseQueryApi = {
        signal,
        abort,
        dispatch,
        getState,
        extra,
        endpoint: arg.endpointName,
        type: arg.type,
        forced: arg.type === "query" ? isForcedQuery(arg, getState()) : void 0,
        queryCacheKey: arg.type === "query" ? arg.queryCacheKey : void 0
      };
      const forceQueryFn = arg.type === "query" ? arg[forceQueryFnSymbol] : void 0;
      if (forceQueryFn) {
        result = forceQueryFn();
      } else if (endpointDefinition.query) {
        result = await baseQuery(endpointDefinition.query(arg.originalArgs), baseQueryApi, endpointDefinition.extraOptions);
        if (endpointDefinition.transformResponse) {
          transformResponse2 = endpointDefinition.transformResponse;
        }
      } else {
        result = await endpointDefinition.queryFn(arg.originalArgs, baseQueryApi, endpointDefinition.extraOptions, (arg2) => baseQuery(arg2, baseQueryApi, endpointDefinition.extraOptions));
      }
      if (typeof process !== "undefined" && false) ;
      if (result.error) throw new HandledError(result.error, result.meta);
      return fulfillWithValue(await transformResponse2(result.data, result.meta, arg.originalArgs), {
        fulfilledTimeStamp: Date.now(),
        baseQueryMeta: result.meta,
        [SHOULD_AUTOBATCH]: true
      });
    } catch (error) {
      let catchedError = error;
      if (catchedError instanceof HandledError) {
        let transformErrorResponse = defaultTransformResponse;
        if (endpointDefinition.query && endpointDefinition.transformErrorResponse) {
          transformErrorResponse = endpointDefinition.transformErrorResponse;
        }
        try {
          return rejectWithValue(await transformErrorResponse(catchedError.value, catchedError.meta, arg.originalArgs), {
            baseQueryMeta: catchedError.meta,
            [SHOULD_AUTOBATCH]: true
          });
        } catch (e) {
          catchedError = e;
        }
      }
      {
        console.error(catchedError);
      }
      throw catchedError;
    }
  };
  function isForcedQuery(arg, state) {
    var _a2, _b, _c;
    const requestState = (_b = (_a2 = state[reducerPath]) == null ? void 0 : _a2.queries) == null ? void 0 : _b[arg.queryCacheKey];
    const baseFetchOnMountOrArgChange = (_c = state[reducerPath]) == null ? void 0 : _c.config.refetchOnMountOrArgChange;
    const fulfilledVal = requestState == null ? void 0 : requestState.fulfilledTimeStamp;
    const refetchVal = arg.forceRefetch ?? (arg.subscribe && baseFetchOnMountOrArgChange);
    if (refetchVal) {
      return refetchVal === true || (Number(/* @__PURE__ */ new Date()) - Number(fulfilledVal)) / 1e3 >= refetchVal;
    }
    return false;
  }
  const queryThunk = createAsyncThunk(`${reducerPath}/executeQuery`, executeEndpoint, {
    getPendingMeta() {
      return {
        startedTimeStamp: Date.now(),
        [SHOULD_AUTOBATCH]: true
      };
    },
    condition(queryThunkArgs, {
      getState
    }) {
      var _a2, _b, _c;
      const state = getState();
      const requestState = (_b = (_a2 = state[reducerPath]) == null ? void 0 : _a2.queries) == null ? void 0 : _b[queryThunkArgs.queryCacheKey];
      const fulfilledVal = requestState == null ? void 0 : requestState.fulfilledTimeStamp;
      const currentArg = queryThunkArgs.originalArgs;
      const previousArg = requestState == null ? void 0 : requestState.originalArgs;
      const endpointDefinition = endpointDefinitions[queryThunkArgs.endpointName];
      if (isUpsertQuery(queryThunkArgs)) {
        return true;
      }
      if ((requestState == null ? void 0 : requestState.status) === "pending") {
        return false;
      }
      if (isForcedQuery(queryThunkArgs, state)) {
        return true;
      }
      if (isQueryDefinition$1(endpointDefinition) && ((_c = endpointDefinition == null ? void 0 : endpointDefinition.forceRefetch) == null ? void 0 : _c.call(endpointDefinition, {
        currentArg,
        previousArg,
        endpointState: requestState,
        state
      }))) {
        return true;
      }
      if (fulfilledVal) {
        return false;
      }
      return true;
    },
    dispatchConditionRejection: true
  });
  const mutationThunk = createAsyncThunk(`${reducerPath}/executeMutation`, executeEndpoint, {
    getPendingMeta() {
      return {
        startedTimeStamp: Date.now(),
        [SHOULD_AUTOBATCH]: true
      };
    }
  });
  const hasTheForce = (options) => "force" in options;
  const hasMaxAge = (options) => "ifOlderThan" in options;
  const prefetch = (endpointName, arg, options) => (dispatch, getState) => {
    const force = hasTheForce(options) && options.force;
    const maxAge = hasMaxAge(options) && options.ifOlderThan;
    const queryAction = (force2 = true) => {
      const options2 = {
        forceRefetch: force2,
        isPrefetch: true
      };
      return api.endpoints[endpointName].initiate(arg, options2);
    };
    const latestStateValue = api.endpoints[endpointName].select(arg)(getState());
    if (force) {
      dispatch(queryAction());
    } else if (maxAge) {
      const lastFulfilledTs = latestStateValue == null ? void 0 : latestStateValue.fulfilledTimeStamp;
      if (!lastFulfilledTs) {
        dispatch(queryAction());
        return;
      }
      const shouldRetrigger = (Number(/* @__PURE__ */ new Date()) - Number(new Date(lastFulfilledTs))) / 1e3 >= maxAge;
      if (shouldRetrigger) {
        dispatch(queryAction());
      }
    } else {
      dispatch(queryAction(false));
    }
  };
  function matchesEndpoint(endpointName) {
    return (action) => {
      var _a2, _b;
      return ((_b = (_a2 = action == null ? void 0 : action.meta) == null ? void 0 : _a2.arg) == null ? void 0 : _b.endpointName) === endpointName;
    };
  }
  function buildMatchThunkActions(thunk, endpointName) {
    return {
      matchPending: isAllOf(isPending(thunk), matchesEndpoint(endpointName)),
      matchFulfilled: isAllOf(isFulfilled(thunk), matchesEndpoint(endpointName)),
      matchRejected: isAllOf(isRejected(thunk), matchesEndpoint(endpointName))
    };
  }
  return {
    queryThunk,
    mutationThunk,
    prefetch,
    updateQueryData,
    upsertQueryData,
    patchQueryData,
    buildMatchThunkActions
  };
}
function calculateProvidedByThunk(action, type2, endpointDefinitions, assertTagType) {
  return calculateProvidedBy(endpointDefinitions[action.meta.arg.endpointName][type2], isFulfilled(action) ? action.payload : void 0, isRejectedWithValue(action) ? action.payload : void 0, action.meta.arg.originalArgs, "baseQueryMeta" in action.meta ? action.meta.baseQueryMeta : void 0, assertTagType);
}
function updateQuerySubstateIfExists(state, queryCacheKey, update) {
  const substate = state[queryCacheKey];
  if (substate) {
    update(substate);
  }
}
function getMutationCacheKey(id) {
  return ("arg" in id ? id.arg.fixedCacheKey : id.fixedCacheKey) ?? id.requestId;
}
function updateMutationSubstateIfExists(state, id, update) {
  const substate = state[getMutationCacheKey(id)];
  if (substate) {
    update(substate);
  }
}
var initialState$c = {};
function buildSlice({
  reducerPath,
  queryThunk,
  mutationThunk,
  serializeQueryArgs,
  context: {
    endpointDefinitions: definitions,
    apiUid,
    extractRehydrationInfo,
    hasRehydrationInfo
  },
  assertTagType,
  config
}) {
  const resetApiState = createAction(`${reducerPath}/resetApiState`);
  function writePendingCacheEntry(draft, arg, upserting, meta) {
    var _a2;
    draft[_a2 = arg.queryCacheKey] ?? (draft[_a2] = {
      status: "uninitialized",
      endpointName: arg.endpointName
    });
    updateQuerySubstateIfExists(draft, arg.queryCacheKey, (substate) => {
      substate.status = "pending";
      substate.requestId = upserting && substate.requestId ? (
        // for `upsertQuery` **updates**, keep the current `requestId`
        substate.requestId
      ) : (
        // for normal queries or `upsertQuery` **inserts** always update the `requestId`
        meta.requestId
      );
      if (arg.originalArgs !== void 0) {
        substate.originalArgs = arg.originalArgs;
      }
      substate.startedTimeStamp = meta.startedTimeStamp;
    });
  }
  function writeFulfilledCacheEntry(draft, meta, payload) {
    updateQuerySubstateIfExists(draft, meta.arg.queryCacheKey, (substate) => {
      if (substate.requestId !== meta.requestId && !isUpsertQuery(meta.arg)) return;
      const {
        merge: merge2
      } = definitions[meta.arg.endpointName];
      substate.status = "fulfilled";
      if (merge2) {
        if (substate.data !== void 0) {
          const {
            fulfilledTimeStamp,
            arg,
            baseQueryMeta,
            requestId
          } = meta;
          let newData = produce(substate.data, (draftSubstateData) => {
            return merge2(draftSubstateData, payload, {
              arg: arg.originalArgs,
              baseQueryMeta,
              fulfilledTimeStamp,
              requestId
            });
          });
          substate.data = newData;
        } else {
          substate.data = payload;
        }
      } else {
        substate.data = definitions[meta.arg.endpointName].structuralSharing ?? true ? copyWithStructuralSharing(isDraft(substate.data) ? original(substate.data) : substate.data, payload) : payload;
      }
      delete substate.error;
      substate.fulfilledTimeStamp = meta.fulfilledTimeStamp;
    });
  }
  const querySlice = createSlice({
    name: `${reducerPath}/queries`,
    initialState: initialState$c,
    reducers: {
      removeQueryResult: {
        reducer(draft, {
          payload: {
            queryCacheKey
          }
        }) {
          delete draft[queryCacheKey];
        },
        prepare: prepareAutoBatched()
      },
      cacheEntriesUpserted: {
        reducer(draft, action) {
          for (const entry of action.payload) {
            const {
              queryDescription: arg,
              value
            } = entry;
            writePendingCacheEntry(draft, arg, true, {
              requestId: action.meta.requestId,
              startedTimeStamp: action.meta.timestamp
            });
            writeFulfilledCacheEntry(draft, {
              arg,
              requestId: action.meta.requestId,
              fulfilledTimeStamp: action.meta.timestamp,
              baseQueryMeta: {}
            }, value);
          }
        },
        prepare: (payload) => {
          const queryDescriptions = payload.map((entry) => {
            const {
              endpointName,
              arg,
              value
            } = entry;
            const endpointDefinition = definitions[endpointName];
            const queryDescription = {
              type: "query",
              endpointName,
              originalArgs: entry.arg,
              queryCacheKey: serializeQueryArgs({
                queryArgs: arg,
                endpointDefinition,
                endpointName
              })
            };
            return {
              queryDescription,
              value
            };
          });
          const result = {
            payload: queryDescriptions,
            meta: {
              [SHOULD_AUTOBATCH]: true,
              requestId: nanoid(),
              timestamp: Date.now()
            }
          };
          return result;
        }
      },
      queryResultPatched: {
        reducer(draft, {
          payload: {
            queryCacheKey,
            patches
          }
        }) {
          updateQuerySubstateIfExists(draft, queryCacheKey, (substate) => {
            substate.data = applyPatches(substate.data, patches.concat());
          });
        },
        prepare: prepareAutoBatched()
      }
    },
    extraReducers(builder) {
      builder.addCase(queryThunk.pending, (draft, {
        meta,
        meta: {
          arg
        }
      }) => {
        const upserting = isUpsertQuery(arg);
        writePendingCacheEntry(draft, arg, upserting, meta);
      }).addCase(queryThunk.fulfilled, (draft, {
        meta,
        payload
      }) => {
        writeFulfilledCacheEntry(draft, meta, payload);
      }).addCase(queryThunk.rejected, (draft, {
        meta: {
          condition,
          arg,
          requestId
        },
        error,
        payload
      }) => {
        updateQuerySubstateIfExists(draft, arg.queryCacheKey, (substate) => {
          if (condition) ;
          else {
            if (substate.requestId !== requestId) return;
            substate.status = "rejected";
            substate.error = payload ?? error;
          }
        });
      }).addMatcher(hasRehydrationInfo, (draft, action) => {
        const {
          queries
        } = extractRehydrationInfo(action);
        for (const [key, entry] of Object.entries(queries)) {
          if (
            // do not rehydrate entries that were currently in flight.
            (entry == null ? void 0 : entry.status) === "fulfilled" || (entry == null ? void 0 : entry.status) === "rejected"
          ) {
            draft[key] = entry;
          }
        }
      });
    }
  });
  const mutationSlice = createSlice({
    name: `${reducerPath}/mutations`,
    initialState: initialState$c,
    reducers: {
      removeMutationResult: {
        reducer(draft, {
          payload
        }) {
          const cacheKey = getMutationCacheKey(payload);
          if (cacheKey in draft) {
            delete draft[cacheKey];
          }
        },
        prepare: prepareAutoBatched()
      }
    },
    extraReducers(builder) {
      builder.addCase(mutationThunk.pending, (draft, {
        meta,
        meta: {
          requestId,
          arg,
          startedTimeStamp
        }
      }) => {
        if (!arg.track) return;
        draft[getMutationCacheKey(meta)] = {
          requestId,
          status: "pending",
          endpointName: arg.endpointName,
          startedTimeStamp
        };
      }).addCase(mutationThunk.fulfilled, (draft, {
        payload,
        meta
      }) => {
        if (!meta.arg.track) return;
        updateMutationSubstateIfExists(draft, meta, (substate) => {
          if (substate.requestId !== meta.requestId) return;
          substate.status = "fulfilled";
          substate.data = payload;
          substate.fulfilledTimeStamp = meta.fulfilledTimeStamp;
        });
      }).addCase(mutationThunk.rejected, (draft, {
        payload,
        error,
        meta
      }) => {
        if (!meta.arg.track) return;
        updateMutationSubstateIfExists(draft, meta, (substate) => {
          if (substate.requestId !== meta.requestId) return;
          substate.status = "rejected";
          substate.error = payload ?? error;
        });
      }).addMatcher(hasRehydrationInfo, (draft, action) => {
        const {
          mutations
        } = extractRehydrationInfo(action);
        for (const [key, entry] of Object.entries(mutations)) {
          if (
            // do not rehydrate entries that were currently in flight.
            ((entry == null ? void 0 : entry.status) === "fulfilled" || (entry == null ? void 0 : entry.status) === "rejected") && // only rehydrate endpoints that were persisted using a `fixedCacheKey`
            key !== (entry == null ? void 0 : entry.requestId)
          ) {
            draft[key] = entry;
          }
        }
      });
    }
  });
  const invalidationSlice = createSlice({
    name: `${reducerPath}/invalidation`,
    initialState: initialState$c,
    reducers: {
      updateProvidedBy: {
        reducer(draft, action) {
          var _a2, _b;
          const {
            queryCacheKey,
            providedTags
          } = action.payload;
          for (const tagTypeSubscriptions of Object.values(draft)) {
            for (const idSubscriptions of Object.values(tagTypeSubscriptions)) {
              const foundAt = idSubscriptions.indexOf(queryCacheKey);
              if (foundAt !== -1) {
                idSubscriptions.splice(foundAt, 1);
              }
            }
          }
          for (const {
            type: type2,
            id
          } of providedTags) {
            const subscribedQueries = (_a2 = draft[type2] ?? (draft[type2] = {}))[_b = id || "__internal_without_id"] ?? (_a2[_b] = []);
            const alreadySubscribed = subscribedQueries.includes(queryCacheKey);
            if (!alreadySubscribed) {
              subscribedQueries.push(queryCacheKey);
            }
          }
        },
        prepare: prepareAutoBatched()
      }
    },
    extraReducers(builder) {
      builder.addCase(querySlice.actions.removeQueryResult, (draft, {
        payload: {
          queryCacheKey
        }
      }) => {
        for (const tagTypeSubscriptions of Object.values(draft)) {
          for (const idSubscriptions of Object.values(tagTypeSubscriptions)) {
            const foundAt = idSubscriptions.indexOf(queryCacheKey);
            if (foundAt !== -1) {
              idSubscriptions.splice(foundAt, 1);
            }
          }
        }
      }).addMatcher(hasRehydrationInfo, (draft, action) => {
        var _a2, _b;
        const {
          provided
        } = extractRehydrationInfo(action);
        for (const [type2, incomingTags] of Object.entries(provided)) {
          for (const [id, cacheKeys] of Object.entries(incomingTags)) {
            const subscribedQueries = (_a2 = draft[type2] ?? (draft[type2] = {}))[_b = id || "__internal_without_id"] ?? (_a2[_b] = []);
            for (const queryCacheKey of cacheKeys) {
              const alreadySubscribed = subscribedQueries.includes(queryCacheKey);
              if (!alreadySubscribed) {
                subscribedQueries.push(queryCacheKey);
              }
            }
          }
        }
      }).addMatcher(isAnyOf(isFulfilled(queryThunk), isRejectedWithValue(queryThunk)), (draft, action) => {
        const providedTags = calculateProvidedByThunk(action, "providesTags", definitions, assertTagType);
        const {
          queryCacheKey
        } = action.meta.arg;
        invalidationSlice.caseReducers.updateProvidedBy(draft, invalidationSlice.actions.updateProvidedBy({
          queryCacheKey,
          providedTags
        }));
      });
    }
  });
  const subscriptionSlice = createSlice({
    name: `${reducerPath}/subscriptions`,
    initialState: initialState$c,
    reducers: {
      updateSubscriptionOptions(d, a) {
      },
      unsubscribeQueryResult(d, a) {
      },
      internal_getRTKQSubscriptions() {
      }
    }
  });
  const internalSubscriptionsSlice = createSlice({
    name: `${reducerPath}/internalSubscriptions`,
    initialState: initialState$c,
    reducers: {
      subscriptionsUpdated: {
        reducer(state, action) {
          return applyPatches(state, action.payload);
        },
        prepare: prepareAutoBatched()
      }
    }
  });
  const configSlice = createSlice({
    name: `${reducerPath}/config`,
    initialState: {
      online: isOnline(),
      focused: isDocumentVisible(),
      middlewareRegistered: false,
      ...config
    },
    reducers: {
      middlewareRegistered(state, {
        payload
      }) {
        state.middlewareRegistered = state.middlewareRegistered === "conflict" || apiUid !== payload ? "conflict" : true;
      }
    },
    extraReducers: (builder) => {
      builder.addCase(onOnline, (state) => {
        state.online = true;
      }).addCase(onOffline, (state) => {
        state.online = false;
      }).addCase(onFocus, (state) => {
        state.focused = true;
      }).addCase(onFocusLost, (state) => {
        state.focused = false;
      }).addMatcher(hasRehydrationInfo, (draft) => ({
        ...draft
      }));
    }
  });
  const combinedReducer = combineReducers({
    queries: querySlice.reducer,
    mutations: mutationSlice.reducer,
    provided: invalidationSlice.reducer,
    subscriptions: internalSubscriptionsSlice.reducer,
    config: configSlice.reducer
  });
  const reducer = (state, action) => combinedReducer(resetApiState.match(action) ? void 0 : state, action);
  const actions2 = {
    ...configSlice.actions,
    ...querySlice.actions,
    ...subscriptionSlice.actions,
    ...internalSubscriptionsSlice.actions,
    ...mutationSlice.actions,
    ...invalidationSlice.actions,
    resetApiState
  };
  return {
    reducer,
    actions: actions2
  };
}
var skipToken = /* @__PURE__ */ Symbol.for("RTKQ/skipToken");
var initialSubState = {
  status: "uninitialized"
  /* uninitialized */
};
var defaultQuerySubState = /* @__PURE__ */ produce(initialSubState, () => {
});
var defaultMutationSubState = /* @__PURE__ */ produce(initialSubState, () => {
});
function buildSelectors({
  serializeQueryArgs,
  reducerPath,
  createSelector: createSelector2
}) {
  const selectSkippedQuery = (state) => defaultQuerySubState;
  const selectSkippedMutation = (state) => defaultMutationSubState;
  return {
    buildQuerySelector,
    buildMutationSelector,
    selectInvalidatedBy,
    selectCachedArgsForQuery
  };
  function withRequestFlags(substate) {
    return {
      ...substate,
      ...getRequestStatusFlags(substate.status)
    };
  }
  function selectInternalState(rootState) {
    const state = rootState[reducerPath];
    return state;
  }
  function buildQuerySelector(endpointName, endpointDefinition) {
    return (queryArgs) => {
      if (queryArgs === skipToken) {
        return createSelector2(selectSkippedQuery, withRequestFlags);
      }
      const serializedArgs = serializeQueryArgs({
        queryArgs,
        endpointDefinition,
        endpointName
      });
      const selectQuerySubstate = (state) => {
        var _a2, _b;
        return ((_b = (_a2 = selectInternalState(state)) == null ? void 0 : _a2.queries) == null ? void 0 : _b[serializedArgs]) ?? defaultQuerySubState;
      };
      return createSelector2(selectQuerySubstate, withRequestFlags);
    };
  }
  function buildMutationSelector() {
    return (id) => {
      let mutationId;
      if (typeof id === "object") {
        mutationId = getMutationCacheKey(id) ?? skipToken;
      } else {
        mutationId = id;
      }
      const selectMutationSubstate = (state) => {
        var _a2, _b;
        return ((_b = (_a2 = selectInternalState(state)) == null ? void 0 : _a2.mutations) == null ? void 0 : _b[mutationId]) ?? defaultMutationSubState;
      };
      const finalSelectMutationSubstate = mutationId === skipToken ? selectSkippedMutation : selectMutationSubstate;
      return createSelector2(finalSelectMutationSubstate, withRequestFlags);
    };
  }
  function selectInvalidatedBy(state, tags) {
    const apiState = state[reducerPath];
    const toInvalidate = /* @__PURE__ */ new Set();
    for (const tag of tags.filter(isNotNullish).map(expandTagDescription)) {
      const provided = apiState.provided[tag.type];
      if (!provided) {
        continue;
      }
      let invalidateSubscriptions = (tag.id !== void 0 ? (
        // id given: invalidate all queries that provide this type & id
        provided[tag.id]
      ) : (
        // no id: invalidate all queries that provide this type
        flatten(Object.values(provided))
      )) ?? [];
      for (const invalidate of invalidateSubscriptions) {
        toInvalidate.add(invalidate);
      }
    }
    return flatten(Array.from(toInvalidate.values()).map((queryCacheKey) => {
      const querySubState = apiState.queries[queryCacheKey];
      return querySubState ? [{
        queryCacheKey,
        endpointName: querySubState.endpointName,
        originalArgs: querySubState.originalArgs
      }] : [];
    }));
  }
  function selectCachedArgsForQuery(state, queryName) {
    return Object.values(state[reducerPath].queries).filter(
      (entry) => (entry == null ? void 0 : entry.endpointName) === queryName && entry.status !== "uninitialized"
      /* uninitialized */
    ).map((entry) => entry.originalArgs);
  }
}
var cache$1 = WeakMap ? /* @__PURE__ */ new WeakMap() : void 0;
var defaultSerializeQueryArgs$1 = ({
  endpointName,
  queryArgs
}) => {
  let serialized = "";
  const cached = cache$1 == null ? void 0 : cache$1.get(queryArgs);
  if (typeof cached === "string") {
    serialized = cached;
  } else {
    const stringified = JSON.stringify(queryArgs, (key, value) => {
      value = typeof value === "bigint" ? {
        $bigint: value.toString()
      } : value;
      value = isPlainObject$1(value) ? Object.keys(value).sort().reduce((acc, key2) => {
        acc[key2] = value[key2];
        return acc;
      }, {}) : value;
      return value;
    });
    if (isPlainObject$1(queryArgs)) {
      cache$1 == null ? void 0 : cache$1.set(queryArgs, stringified);
    }
    serialized = stringified;
  }
  return `${endpointName}(${serialized})`;
};
function buildCreateApi(...modules2) {
  return function baseCreateApi(options) {
    const extractRehydrationInfo = weakMapMemoize((action) => {
      var _a2;
      return (_a2 = options.extractRehydrationInfo) == null ? void 0 : _a2.call(options, action, {
        reducerPath: options.reducerPath ?? "api"
      });
    });
    const optionsWithDefaults = {
      reducerPath: "api",
      keepUnusedDataFor: 60,
      refetchOnMountOrArgChange: false,
      refetchOnFocus: false,
      refetchOnReconnect: false,
      invalidationBehavior: "delayed",
      ...options,
      extractRehydrationInfo,
      serializeQueryArgs(queryArgsApi) {
        let finalSerializeQueryArgs = defaultSerializeQueryArgs$1;
        if ("serializeQueryArgs" in queryArgsApi.endpointDefinition) {
          const endpointSQA = queryArgsApi.endpointDefinition.serializeQueryArgs;
          finalSerializeQueryArgs = (queryArgsApi2) => {
            const initialResult = endpointSQA(queryArgsApi2);
            if (typeof initialResult === "string") {
              return initialResult;
            } else {
              return defaultSerializeQueryArgs$1({
                ...queryArgsApi2,
                queryArgs: initialResult
              });
            }
          };
        } else if (options.serializeQueryArgs) {
          finalSerializeQueryArgs = options.serializeQueryArgs;
        }
        return finalSerializeQueryArgs(queryArgsApi);
      },
      tagTypes: [...options.tagTypes || []]
    };
    const context = {
      endpointDefinitions: {},
      batch(fn) {
        fn();
      },
      apiUid: nanoid(),
      extractRehydrationInfo,
      hasRehydrationInfo: weakMapMemoize((action) => extractRehydrationInfo(action) != null)
    };
    const api = {
      injectEndpoints,
      enhanceEndpoints({
        addTagTypes,
        endpoints
      }) {
        if (addTagTypes) {
          for (const eT of addTagTypes) {
            if (!optionsWithDefaults.tagTypes.includes(eT)) {
              optionsWithDefaults.tagTypes.push(eT);
            }
          }
        }
        if (endpoints) {
          for (const [endpointName, partialDefinition] of Object.entries(endpoints)) {
            if (typeof partialDefinition === "function") {
              partialDefinition(context.endpointDefinitions[endpointName]);
            } else {
              Object.assign(context.endpointDefinitions[endpointName] || {}, partialDefinition);
            }
          }
        }
        return api;
      }
    };
    const initializedModules = modules2.map((m) => m.init(api, optionsWithDefaults, context));
    function injectEndpoints(inject) {
      const evaluatedEndpoints = inject.endpoints({
        query: (x) => ({
          ...x,
          type: "query"
          /* query */
        }),
        mutation: (x) => ({
          ...x,
          type: "mutation"
          /* mutation */
        })
      });
      for (const [endpointName, definition] of Object.entries(evaluatedEndpoints)) {
        if (inject.overrideExisting !== true && endpointName in context.endpointDefinitions) {
          if (inject.overrideExisting === "throw") {
            throw new Error(formatProdErrorMessage(39));
          }
          continue;
        }
        context.endpointDefinitions[endpointName] = definition;
        for (const m of initializedModules) {
          m.injectEndpoint(endpointName, definition);
        }
      }
      return api;
    }
    return api.injectEndpoints({
      endpoints: options.endpoints
    });
  };
}
function safeAssign$1(target, ...args) {
  return Object.assign(target, ...args);
}
var buildBatchedActionsHandler = ({
  api,
  queryThunk,
  internalState
}) => {
  const subscriptionsPrefix = `${api.reducerPath}/subscriptions`;
  let previousSubscriptions = null;
  let updateSyncTimer = null;
  const {
    updateSubscriptionOptions,
    unsubscribeQueryResult
  } = api.internalActions;
  const actuallyMutateSubscriptions = (mutableState, action) => {
    var _a2, _b, _c;
    if (updateSubscriptionOptions.match(action)) {
      const {
        queryCacheKey,
        requestId,
        options
      } = action.payload;
      if ((_a2 = mutableState == null ? void 0 : mutableState[queryCacheKey]) == null ? void 0 : _a2[requestId]) {
        mutableState[queryCacheKey][requestId] = options;
      }
      return true;
    }
    if (unsubscribeQueryResult.match(action)) {
      const {
        queryCacheKey,
        requestId
      } = action.payload;
      if (mutableState[queryCacheKey]) {
        delete mutableState[queryCacheKey][requestId];
      }
      return true;
    }
    if (api.internalActions.removeQueryResult.match(action)) {
      delete mutableState[action.payload.queryCacheKey];
      return true;
    }
    if (queryThunk.pending.match(action)) {
      const {
        meta: {
          arg,
          requestId
        }
      } = action;
      const substate = mutableState[_b = arg.queryCacheKey] ?? (mutableState[_b] = {});
      substate[`${requestId}_running`] = {};
      if (arg.subscribe) {
        substate[requestId] = arg.subscriptionOptions ?? substate[requestId] ?? {};
      }
      return true;
    }
    let mutated = false;
    if (queryThunk.fulfilled.match(action) || queryThunk.rejected.match(action)) {
      const state = mutableState[action.meta.arg.queryCacheKey] || {};
      const key = `${action.meta.requestId}_running`;
      mutated || (mutated = !!state[key]);
      delete state[key];
    }
    if (queryThunk.rejected.match(action)) {
      const {
        meta: {
          condition,
          arg,
          requestId
        }
      } = action;
      if (condition && arg.subscribe) {
        const substate = mutableState[_c = arg.queryCacheKey] ?? (mutableState[_c] = {});
        substate[requestId] = arg.subscriptionOptions ?? substate[requestId] ?? {};
        mutated = true;
      }
    }
    return mutated;
  };
  const getSubscriptions = () => internalState.currentSubscriptions;
  const getSubscriptionCount = (queryCacheKey) => {
    const subscriptions = getSubscriptions();
    const subscriptionsForQueryArg = subscriptions[queryCacheKey] ?? {};
    return countObjectKeys$1(subscriptionsForQueryArg);
  };
  const isRequestSubscribed = (queryCacheKey, requestId) => {
    var _a2;
    const subscriptions = getSubscriptions();
    return !!((_a2 = subscriptions == null ? void 0 : subscriptions[queryCacheKey]) == null ? void 0 : _a2[requestId]);
  };
  const subscriptionSelectors = {
    getSubscriptions,
    getSubscriptionCount,
    isRequestSubscribed
  };
  return (action, mwApi) => {
    if (!previousSubscriptions) {
      previousSubscriptions = JSON.parse(JSON.stringify(internalState.currentSubscriptions));
    }
    if (api.util.resetApiState.match(action)) {
      previousSubscriptions = internalState.currentSubscriptions = {};
      updateSyncTimer = null;
      return [true, false];
    }
    if (api.internalActions.internal_getRTKQSubscriptions.match(action)) {
      return [false, subscriptionSelectors];
    }
    const didMutate = actuallyMutateSubscriptions(internalState.currentSubscriptions, action);
    let actionShouldContinue = true;
    if (didMutate) {
      if (!updateSyncTimer) {
        updateSyncTimer = setTimeout(() => {
          const newSubscriptions = JSON.parse(JSON.stringify(internalState.currentSubscriptions));
          const [, patches] = produceWithPatches(previousSubscriptions, () => newSubscriptions);
          mwApi.next(api.internalActions.subscriptionsUpdated(patches));
          previousSubscriptions = newSubscriptions;
          updateSyncTimer = null;
        }, 500);
      }
      const isSubscriptionSliceAction = typeof action.type == "string" && !!action.type.startsWith(subscriptionsPrefix);
      const isAdditionalSubscriptionAction = queryThunk.rejected.match(action) && action.meta.condition && !!action.meta.arg.subscribe;
      actionShouldContinue = !isSubscriptionSliceAction && !isAdditionalSubscriptionAction;
    }
    return [actionShouldContinue, false];
  };
};
function isObjectEmpty(obj) {
  for (const k in obj) {
    return false;
  }
  return true;
}
var THIRTY_TWO_BIT_MAX_TIMER_SECONDS = 2147483647 / 1e3 - 1;
var buildCacheCollectionHandler = ({
  reducerPath,
  api,
  queryThunk,
  context,
  internalState
}) => {
  const {
    removeQueryResult,
    unsubscribeQueryResult,
    cacheEntriesUpserted
  } = api.internalActions;
  const canTriggerUnsubscribe = isAnyOf(unsubscribeQueryResult.match, queryThunk.fulfilled, queryThunk.rejected, cacheEntriesUpserted.match);
  function anySubscriptionsRemainingForKey(queryCacheKey) {
    const subscriptions = internalState.currentSubscriptions[queryCacheKey];
    return !!subscriptions && !isObjectEmpty(subscriptions);
  }
  const currentRemovalTimeouts = {};
  const handler = (action, mwApi, internalState2) => {
    var _a2;
    if (canTriggerUnsubscribe(action)) {
      const state = mwApi.getState()[reducerPath];
      let queryCacheKeys;
      if (cacheEntriesUpserted.match(action)) {
        queryCacheKeys = action.payload.map((entry) => entry.queryDescription.queryCacheKey);
      } else {
        const {
          queryCacheKey
        } = unsubscribeQueryResult.match(action) ? action.payload : action.meta.arg;
        queryCacheKeys = [queryCacheKey];
      }
      for (const queryCacheKey of queryCacheKeys) {
        handleUnsubscribe(queryCacheKey, (_a2 = state.queries[queryCacheKey]) == null ? void 0 : _a2.endpointName, mwApi, state.config);
      }
    }
    if (api.util.resetApiState.match(action)) {
      for (const [key, timeout] of Object.entries(currentRemovalTimeouts)) {
        if (timeout) clearTimeout(timeout);
        delete currentRemovalTimeouts[key];
      }
    }
    if (context.hasRehydrationInfo(action)) {
      const state = mwApi.getState()[reducerPath];
      const {
        queries
      } = context.extractRehydrationInfo(action);
      for (const [queryCacheKey, queryState] of Object.entries(queries)) {
        handleUnsubscribe(queryCacheKey, queryState == null ? void 0 : queryState.endpointName, mwApi, state.config);
      }
    }
  };
  function handleUnsubscribe(queryCacheKey, endpointName, api2, config) {
    const endpointDefinition = context.endpointDefinitions[endpointName];
    const keepUnusedDataFor = (endpointDefinition == null ? void 0 : endpointDefinition.keepUnusedDataFor) ?? config.keepUnusedDataFor;
    if (keepUnusedDataFor === Infinity) {
      return;
    }
    const finalKeepUnusedDataFor = Math.max(0, Math.min(keepUnusedDataFor, THIRTY_TWO_BIT_MAX_TIMER_SECONDS));
    if (!anySubscriptionsRemainingForKey(queryCacheKey)) {
      const currentTimeout = currentRemovalTimeouts[queryCacheKey];
      if (currentTimeout) {
        clearTimeout(currentTimeout);
      }
      currentRemovalTimeouts[queryCacheKey] = setTimeout(() => {
        if (!anySubscriptionsRemainingForKey(queryCacheKey)) {
          api2.dispatch(removeQueryResult({
            queryCacheKey
          }));
        }
        delete currentRemovalTimeouts[queryCacheKey];
      }, finalKeepUnusedDataFor * 1e3);
    }
  }
  return handler;
};
var neverResolvedError = new Error("Promise never resolved before cacheEntryRemoved.");
var buildCacheLifecycleHandler = ({
  api,
  reducerPath,
  context,
  queryThunk,
  mutationThunk,
  internalState
}) => {
  const isQueryThunk = isAsyncThunkAction(queryThunk);
  const isMutationThunk = isAsyncThunkAction(mutationThunk);
  const isFulfilledThunk = isFulfilled(queryThunk, mutationThunk);
  const lifecycleMap = {};
  function resolveLifecycleEntry(cacheKey, data, meta) {
    const lifecycle = lifecycleMap[cacheKey];
    if (lifecycle == null ? void 0 : lifecycle.valueResolved) {
      lifecycle.valueResolved({
        data,
        meta
      });
      delete lifecycle.valueResolved;
    }
  }
  function removeLifecycleEntry(cacheKey) {
    const lifecycle = lifecycleMap[cacheKey];
    if (lifecycle) {
      delete lifecycleMap[cacheKey];
      lifecycle.cacheEntryRemoved();
    }
  }
  const handler = (action, mwApi, stateBefore) => {
    const cacheKey = getCacheKey(action);
    function checkForNewCacheKey(endpointName, cacheKey2, requestId, originalArgs) {
      const oldState = stateBefore[reducerPath].queries[cacheKey2];
      const state = mwApi.getState()[reducerPath].queries[cacheKey2];
      if (!oldState && state) {
        handleNewKey(endpointName, originalArgs, cacheKey2, mwApi, requestId);
      }
    }
    if (queryThunk.pending.match(action)) {
      checkForNewCacheKey(action.meta.arg.endpointName, cacheKey, action.meta.requestId, action.meta.arg.originalArgs);
    } else if (api.internalActions.cacheEntriesUpserted.match(action)) {
      for (const {
        queryDescription,
        value
      } of action.payload) {
        const {
          endpointName,
          originalArgs,
          queryCacheKey
        } = queryDescription;
        checkForNewCacheKey(endpointName, queryCacheKey, action.meta.requestId, originalArgs);
        resolveLifecycleEntry(queryCacheKey, value, {});
      }
    } else if (mutationThunk.pending.match(action)) {
      const state = mwApi.getState()[reducerPath].mutations[cacheKey];
      if (state) {
        handleNewKey(action.meta.arg.endpointName, action.meta.arg.originalArgs, cacheKey, mwApi, action.meta.requestId);
      }
    } else if (isFulfilledThunk(action)) {
      resolveLifecycleEntry(cacheKey, action.payload, action.meta.baseQueryMeta);
    } else if (api.internalActions.removeQueryResult.match(action) || api.internalActions.removeMutationResult.match(action)) {
      removeLifecycleEntry(cacheKey);
    } else if (api.util.resetApiState.match(action)) {
      for (const cacheKey2 of Object.keys(lifecycleMap)) {
        removeLifecycleEntry(cacheKey2);
      }
    }
  };
  function getCacheKey(action) {
    if (isQueryThunk(action)) return action.meta.arg.queryCacheKey;
    if (isMutationThunk(action)) {
      return action.meta.arg.fixedCacheKey ?? action.meta.requestId;
    }
    if (api.internalActions.removeQueryResult.match(action)) return action.payload.queryCacheKey;
    if (api.internalActions.removeMutationResult.match(action)) return getMutationCacheKey(action.payload);
    return "";
  }
  function handleNewKey(endpointName, originalArgs, queryCacheKey, mwApi, requestId) {
    const endpointDefinition = context.endpointDefinitions[endpointName];
    const onCacheEntryAdded = endpointDefinition == null ? void 0 : endpointDefinition.onCacheEntryAdded;
    if (!onCacheEntryAdded) return;
    const lifecycle = {};
    const cacheEntryRemoved = new Promise((resolve) => {
      lifecycle.cacheEntryRemoved = resolve;
    });
    const cacheDataLoaded = Promise.race([new Promise((resolve) => {
      lifecycle.valueResolved = resolve;
    }), cacheEntryRemoved.then(() => {
      throw neverResolvedError;
    })]);
    cacheDataLoaded.catch(() => {
    });
    lifecycleMap[queryCacheKey] = lifecycle;
    const selector = api.endpoints[endpointName].select(endpointDefinition.type === "query" ? originalArgs : queryCacheKey);
    const extra = mwApi.dispatch((_, __, extra2) => extra2);
    const lifecycleApi = {
      ...mwApi,
      getCacheEntry: () => selector(mwApi.getState()),
      requestId,
      extra,
      updateCachedData: endpointDefinition.type === "query" ? (updateRecipe) => mwApi.dispatch(api.util.updateQueryData(endpointName, originalArgs, updateRecipe)) : void 0,
      cacheDataLoaded,
      cacheEntryRemoved
    };
    const runningHandler = onCacheEntryAdded(originalArgs, lifecycleApi);
    Promise.resolve(runningHandler).catch((e) => {
      if (e === neverResolvedError) return;
      throw e;
    });
  }
  return handler;
};
var buildDevCheckHandler = ({
  api,
  context: {
    apiUid
  },
  reducerPath
}) => {
  return (action, mwApi) => {
    if (api.util.resetApiState.match(action)) {
      mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid));
    }
  };
};
var buildInvalidationByTagsHandler = ({
  reducerPath,
  context,
  context: {
    endpointDefinitions
  },
  mutationThunk,
  queryThunk,
  api,
  assertTagType,
  refetchQuery,
  internalState
}) => {
  const {
    removeQueryResult
  } = api.internalActions;
  const isThunkActionWithTags = isAnyOf(isFulfilled(mutationThunk), isRejectedWithValue(mutationThunk));
  const isQueryEnd = isAnyOf(isFulfilled(mutationThunk, queryThunk), isRejected(mutationThunk, queryThunk));
  let pendingTagInvalidations = [];
  const handler = (action, mwApi) => {
    if (isThunkActionWithTags(action)) {
      invalidateTags(calculateProvidedByThunk(action, "invalidatesTags", endpointDefinitions, assertTagType), mwApi);
    } else if (isQueryEnd(action)) {
      invalidateTags([], mwApi);
    } else if (api.util.invalidateTags.match(action)) {
      invalidateTags(calculateProvidedBy(action.payload, void 0, void 0, void 0, void 0, assertTagType), mwApi);
    }
  };
  function hasPendingRequests(state) {
    var _a2, _b;
    for (const key in state.queries) {
      if (((_a2 = state.queries[key]) == null ? void 0 : _a2.status) === "pending") return true;
    }
    for (const key in state.mutations) {
      if (((_b = state.mutations[key]) == null ? void 0 : _b.status) === "pending") return true;
    }
    return false;
  }
  function invalidateTags(newTags, mwApi) {
    const rootState = mwApi.getState();
    const state = rootState[reducerPath];
    pendingTagInvalidations.push(...newTags);
    if (state.config.invalidationBehavior === "delayed" && hasPendingRequests(state)) {
      return;
    }
    const tags = pendingTagInvalidations;
    pendingTagInvalidations = [];
    if (tags.length === 0) return;
    const toInvalidate = api.util.selectInvalidatedBy(rootState, tags);
    context.batch(() => {
      const valuesArray = Array.from(toInvalidate.values());
      for (const {
        queryCacheKey
      } of valuesArray) {
        const querySubState = state.queries[queryCacheKey];
        const subscriptionSubState = internalState.currentSubscriptions[queryCacheKey] ?? {};
        if (querySubState) {
          if (countObjectKeys$1(subscriptionSubState) === 0) {
            mwApi.dispatch(removeQueryResult({
              queryCacheKey
            }));
          } else if (querySubState.status !== "uninitialized") {
            mwApi.dispatch(refetchQuery(querySubState));
          }
        }
      }
    });
  }
  return handler;
};
var buildPollingHandler = ({
  reducerPath,
  queryThunk,
  api,
  refetchQuery,
  internalState
}) => {
  const currentPolls = {};
  const handler = (action, mwApi) => {
    if (api.internalActions.updateSubscriptionOptions.match(action) || api.internalActions.unsubscribeQueryResult.match(action)) {
      updatePollingInterval(action.payload, mwApi);
    }
    if (queryThunk.pending.match(action) || queryThunk.rejected.match(action) && action.meta.condition) {
      updatePollingInterval(action.meta.arg, mwApi);
    }
    if (queryThunk.fulfilled.match(action) || queryThunk.rejected.match(action) && !action.meta.condition) {
      startNextPoll(action.meta.arg, mwApi);
    }
    if (api.util.resetApiState.match(action)) {
      clearPolls();
    }
  };
  function startNextPoll({
    queryCacheKey
  }, api2) {
    const state = api2.getState()[reducerPath];
    const querySubState = state.queries[queryCacheKey];
    const subscriptions = internalState.currentSubscriptions[queryCacheKey];
    if (!querySubState || querySubState.status === "uninitialized") return;
    const {
      lowestPollingInterval,
      skipPollingIfUnfocused
    } = findLowestPollingInterval(subscriptions);
    if (!Number.isFinite(lowestPollingInterval)) return;
    const currentPoll = currentPolls[queryCacheKey];
    if (currentPoll == null ? void 0 : currentPoll.timeout) {
      clearTimeout(currentPoll.timeout);
      currentPoll.timeout = void 0;
    }
    const nextPollTimestamp = Date.now() + lowestPollingInterval;
    currentPolls[queryCacheKey] = {
      nextPollTimestamp,
      pollingInterval: lowestPollingInterval,
      timeout: setTimeout(() => {
        if (state.config.focused || !skipPollingIfUnfocused) {
          api2.dispatch(refetchQuery(querySubState));
        }
        startNextPoll({
          queryCacheKey
        }, api2);
      }, lowestPollingInterval)
    };
  }
  function updatePollingInterval({
    queryCacheKey
  }, api2) {
    const state = api2.getState()[reducerPath];
    const querySubState = state.queries[queryCacheKey];
    const subscriptions = internalState.currentSubscriptions[queryCacheKey];
    if (!querySubState || querySubState.status === "uninitialized") {
      return;
    }
    const {
      lowestPollingInterval
    } = findLowestPollingInterval(subscriptions);
    if (!Number.isFinite(lowestPollingInterval)) {
      cleanupPollForKey(queryCacheKey);
      return;
    }
    const currentPoll = currentPolls[queryCacheKey];
    const nextPollTimestamp = Date.now() + lowestPollingInterval;
    if (!currentPoll || nextPollTimestamp < currentPoll.nextPollTimestamp) {
      startNextPoll({
        queryCacheKey
      }, api2);
    }
  }
  function cleanupPollForKey(key) {
    const existingPoll = currentPolls[key];
    if (existingPoll == null ? void 0 : existingPoll.timeout) {
      clearTimeout(existingPoll.timeout);
    }
    delete currentPolls[key];
  }
  function clearPolls() {
    for (const key of Object.keys(currentPolls)) {
      cleanupPollForKey(key);
    }
  }
  function findLowestPollingInterval(subscribers = {}) {
    let skipPollingIfUnfocused = false;
    let lowestPollingInterval = Number.POSITIVE_INFINITY;
    for (let key in subscribers) {
      if (!!subscribers[key].pollingInterval) {
        lowestPollingInterval = Math.min(subscribers[key].pollingInterval, lowestPollingInterval);
        skipPollingIfUnfocused = subscribers[key].skipPollingIfUnfocused || skipPollingIfUnfocused;
      }
    }
    return {
      lowestPollingInterval,
      skipPollingIfUnfocused
    };
  }
  return handler;
};
var buildQueryLifecycleHandler = ({
  api,
  context,
  queryThunk,
  mutationThunk
}) => {
  const isPendingThunk = isPending(queryThunk, mutationThunk);
  const isRejectedThunk = isRejected(queryThunk, mutationThunk);
  const isFullfilledThunk = isFulfilled(queryThunk, mutationThunk);
  const lifecycleMap = {};
  const handler = (action, mwApi) => {
    var _a2, _b;
    if (isPendingThunk(action)) {
      const {
        requestId,
        arg: {
          endpointName,
          originalArgs
        }
      } = action.meta;
      const endpointDefinition = context.endpointDefinitions[endpointName];
      const onQueryStarted = endpointDefinition == null ? void 0 : endpointDefinition.onQueryStarted;
      if (onQueryStarted) {
        const lifecycle = {};
        const queryFulfilled = new Promise((resolve, reject) => {
          lifecycle.resolve = resolve;
          lifecycle.reject = reject;
        });
        queryFulfilled.catch(() => {
        });
        lifecycleMap[requestId] = lifecycle;
        const selector = api.endpoints[endpointName].select(endpointDefinition.type === "query" ? originalArgs : requestId);
        const extra = mwApi.dispatch((_, __, extra2) => extra2);
        const lifecycleApi = {
          ...mwApi,
          getCacheEntry: () => selector(mwApi.getState()),
          requestId,
          extra,
          updateCachedData: endpointDefinition.type === "query" ? (updateRecipe) => mwApi.dispatch(api.util.updateQueryData(endpointName, originalArgs, updateRecipe)) : void 0,
          queryFulfilled
        };
        onQueryStarted(originalArgs, lifecycleApi);
      }
    } else if (isFullfilledThunk(action)) {
      const {
        requestId,
        baseQueryMeta
      } = action.meta;
      (_a2 = lifecycleMap[requestId]) == null ? void 0 : _a2.resolve({
        data: action.payload,
        meta: baseQueryMeta
      });
      delete lifecycleMap[requestId];
    } else if (isRejectedThunk(action)) {
      const {
        requestId,
        rejectedWithValue,
        baseQueryMeta
      } = action.meta;
      (_b = lifecycleMap[requestId]) == null ? void 0 : _b.reject({
        error: action.payload ?? action.error,
        isUnhandledError: !rejectedWithValue,
        meta: baseQueryMeta
      });
      delete lifecycleMap[requestId];
    }
  };
  return handler;
};
var buildWindowEventHandler = ({
  reducerPath,
  context,
  api,
  refetchQuery,
  internalState
}) => {
  const {
    removeQueryResult
  } = api.internalActions;
  const handler = (action, mwApi) => {
    if (onFocus.match(action)) {
      refetchValidQueries(mwApi, "refetchOnFocus");
    }
    if (onOnline.match(action)) {
      refetchValidQueries(mwApi, "refetchOnReconnect");
    }
  };
  function refetchValidQueries(api2, type2) {
    const state = api2.getState()[reducerPath];
    const queries = state.queries;
    const subscriptions = internalState.currentSubscriptions;
    context.batch(() => {
      for (const queryCacheKey of Object.keys(subscriptions)) {
        const querySubState = queries[queryCacheKey];
        const subscriptionSubState = subscriptions[queryCacheKey];
        if (!subscriptionSubState || !querySubState) continue;
        const shouldRefetch = Object.values(subscriptionSubState).some((sub) => sub[type2] === true) || Object.values(subscriptionSubState).every((sub) => sub[type2] === void 0) && state.config[type2];
        if (shouldRefetch) {
          if (countObjectKeys$1(subscriptionSubState) === 0) {
            api2.dispatch(removeQueryResult({
              queryCacheKey
            }));
          } else if (querySubState.status !== "uninitialized") {
            api2.dispatch(refetchQuery(querySubState));
          }
        }
      }
    });
  }
  return handler;
};
function buildMiddleware(input) {
  const {
    reducerPath,
    queryThunk,
    api,
    context
  } = input;
  const {
    apiUid
  } = context;
  const actions2 = {
    invalidateTags: createAction(`${reducerPath}/invalidateTags`)
  };
  const isThisApiSliceAction = (action) => action.type.startsWith(`${reducerPath}/`);
  const handlerBuilders = [buildDevCheckHandler, buildCacheCollectionHandler, buildInvalidationByTagsHandler, buildPollingHandler, buildCacheLifecycleHandler, buildQueryLifecycleHandler];
  const middleware = (mwApi) => {
    let initialized2 = false;
    const internalState = {
      currentSubscriptions: {}
    };
    const builderArgs = {
      ...input,
      internalState,
      refetchQuery,
      isThisApiSliceAction
    };
    const handlers = handlerBuilders.map((build) => build(builderArgs));
    const batchedActionsHandler = buildBatchedActionsHandler(builderArgs);
    const windowEventsHandler = buildWindowEventHandler(builderArgs);
    return (next) => {
      return (action) => {
        if (!isAction(action)) {
          return next(action);
        }
        if (!initialized2) {
          initialized2 = true;
          mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid));
        }
        const mwApiWithNext = {
          ...mwApi,
          next
        };
        const stateBefore = mwApi.getState();
        const [actionShouldContinue, internalProbeResult] = batchedActionsHandler(action, mwApiWithNext, stateBefore);
        let res;
        if (actionShouldContinue) {
          res = next(action);
        } else {
          res = internalProbeResult;
        }
        if (!!mwApi.getState()[reducerPath]) {
          windowEventsHandler(action, mwApiWithNext, stateBefore);
          if (isThisApiSliceAction(action) || context.hasRehydrationInfo(action)) {
            for (const handler of handlers) {
              handler(action, mwApiWithNext, stateBefore);
            }
          }
        }
        return res;
      };
    };
  };
  return {
    middleware,
    actions: actions2
  };
  function refetchQuery(querySubState) {
    return input.api.endpoints[querySubState.endpointName].initiate(querySubState.originalArgs, {
      subscribe: false,
      forceRefetch: true
    });
  }
}
var coreModuleName = /* @__PURE__ */ Symbol();
var coreModule = ({
  createSelector: createSelector2 = createSelector
} = {}) => ({
  name: coreModuleName,
  init(api, {
    baseQuery,
    tagTypes: tagTypes2,
    reducerPath,
    serializeQueryArgs,
    keepUnusedDataFor,
    refetchOnMountOrArgChange,
    refetchOnFocus,
    refetchOnReconnect,
    invalidationBehavior
  }, context) {
    enablePatches();
    const assertTagType = (tag) => {
      return tag;
    };
    Object.assign(api, {
      reducerPath,
      endpoints: {},
      internalActions: {
        onOnline,
        onOffline,
        onFocus,
        onFocusLost
      },
      util: {}
    });
    const {
      queryThunk,
      mutationThunk,
      patchQueryData,
      updateQueryData,
      upsertQueryData,
      prefetch,
      buildMatchThunkActions
    } = buildThunks({
      baseQuery,
      reducerPath,
      context,
      api,
      serializeQueryArgs,
      assertTagType
    });
    const {
      reducer,
      actions: sliceActions
    } = buildSlice({
      context,
      queryThunk,
      mutationThunk,
      serializeQueryArgs,
      reducerPath,
      assertTagType,
      config: {
        refetchOnFocus,
        refetchOnReconnect,
        refetchOnMountOrArgChange,
        keepUnusedDataFor,
        reducerPath,
        invalidationBehavior
      }
    });
    safeAssign$1(api.util, {
      patchQueryData,
      updateQueryData,
      upsertQueryData,
      prefetch,
      resetApiState: sliceActions.resetApiState,
      upsertQueryEntries: sliceActions.cacheEntriesUpserted
    });
    safeAssign$1(api.internalActions, sliceActions);
    const {
      middleware,
      actions: middlewareActions
    } = buildMiddleware({
      reducerPath,
      context,
      queryThunk,
      mutationThunk,
      api,
      assertTagType
    });
    safeAssign$1(api.util, middlewareActions);
    safeAssign$1(api, {
      reducer,
      middleware
    });
    const {
      buildQuerySelector,
      buildMutationSelector,
      selectInvalidatedBy,
      selectCachedArgsForQuery
    } = buildSelectors({
      serializeQueryArgs,
      reducerPath,
      createSelector: createSelector2
    });
    safeAssign$1(api.util, {
      selectInvalidatedBy,
      selectCachedArgsForQuery
    });
    const {
      buildInitiateQuery,
      buildInitiateMutation,
      getRunningMutationThunk,
      getRunningMutationsThunk,
      getRunningQueriesThunk,
      getRunningQueryThunk
    } = buildInitiate({
      queryThunk,
      mutationThunk,
      api,
      serializeQueryArgs,
      context
    });
    safeAssign$1(api.util, {
      getRunningMutationThunk,
      getRunningMutationsThunk,
      getRunningQueryThunk,
      getRunningQueriesThunk
    });
    return {
      name: coreModuleName,
      injectEndpoint(endpointName, definition) {
        var _a2;
        const anyApi = api;
        (_a2 = anyApi.endpoints)[endpointName] ?? (_a2[endpointName] = {});
        if (isQueryDefinition$1(definition)) {
          safeAssign$1(anyApi.endpoints[endpointName], {
            name: endpointName,
            select: buildQuerySelector(endpointName, definition),
            initiate: buildInitiateQuery(endpointName, definition)
          }, buildMatchThunkActions(queryThunk, endpointName));
        } else if (isMutationDefinition$1(definition)) {
          safeAssign$1(anyApi.endpoints[endpointName], {
            name: endpointName,
            select: buildMutationSelector(),
            initiate: buildInitiateMutation(endpointName)
          }, buildMatchThunkActions(mutationThunk, endpointName));
        }
      }
    };
  }
});
const BASE_URL$2 = "/api";
const MOCK_BASE_URL$1 = "http://localhost:3050";
const prepareHeaders$1 = async (headers) => {
  headers.set("Content-Type", "application/json");
  return headers;
};
const resolveBaseUrl$1 = ({
  url,
  baseUrl,
  isMockEndpoint,
  isMock
}) => {
  const useMock = isMockEndpoint !== void 0 ? isMockEndpoint : isMock;
  const resolvedBaseUrl = useMock ? MOCK_BASE_URL$1 : baseUrl || BASE_URL$2;
  return `${resolvedBaseUrl}${url}`;
};
const createBaseQuery$1 = (url, options = { isMock: false }) => {
  const { baseUrl, isMock } = options || {};
  return async (args, api, extraOptions) => {
    var _a2;
    const resolvedBaseUrl = resolveBaseUrl$1({
      url,
      baseUrl,
      isMockEndpoint: (_a2 = api.meta) == null ? void 0 : _a2.isMock,
      isMock
    });
    const baseQuery = fetchBaseQuery({
      baseUrl: resolvedBaseUrl,
      prepareHeaders: prepareHeaders$1
    });
    return baseQuery(args, api, extraOptions);
  };
};
var duration$4 = { exports: {} };
var duration$3 = duration$4.exports;
var hasRequiredDuration;
function requireDuration() {
  if (hasRequiredDuration) return duration$4.exports;
  hasRequiredDuration = 1;
  (function(module2, exports$1) {
    !function(t2, s2) {
      module2.exports = s2();
    }(duration$3, function() {
      var t2, s2, n2 = 1e3, i = 6e4, e = 36e5, r2 = 864e5, o = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, u = 31536e6, d = 2628e6, a = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, h = { years: u, months: d, days: r2, hours: e, minutes: i, seconds: n2, milliseconds: 1, weeks: 6048e5 }, c = function(t3) {
        return t3 instanceof g;
      }, f2 = function(t3, s3, n22) {
        return new g(t3, n22, s3.$l);
      }, m = function(t3) {
        return s2.p(t3) + "s";
      }, l2 = function(t3) {
        return t3 < 0;
      }, $ = function(t3) {
        return l2(t3) ? Math.ceil(t3) : Math.floor(t3);
      }, y = function(t3) {
        return Math.abs(t3);
      }, v = function(t3, s3) {
        return t3 ? l2(t3) ? { negative: true, format: "" + y(t3) + s3 } : { negative: false, format: "" + t3 + s3 } : { negative: false, format: "" };
      }, g = function() {
        function l22(t3, s3, n22) {
          var i2 = this;
          if (this.$d = {}, this.$l = n22, void 0 === t3 && (this.$ms = 0, this.parseFromMilliseconds()), s3) return f2(t3 * h[m(s3)], this);
          if ("number" == typeof t3) return this.$ms = t3, this.parseFromMilliseconds(), this;
          if ("object" == typeof t3) return Object.keys(t3).forEach(function(s4) {
            i2.$d[m(s4)] = t3[s4];
          }), this.calMilliseconds(), this;
          if ("string" == typeof t3) {
            var e2 = t3.match(a);
            if (e2) {
              var r22 = e2.slice(2).map(function(t4) {
                return null != t4 ? Number(t4) : 0;
              });
              return this.$d.years = r22[0], this.$d.months = r22[1], this.$d.weeks = r22[2], this.$d.days = r22[3], this.$d.hours = r22[4], this.$d.minutes = r22[5], this.$d.seconds = r22[6], this.calMilliseconds(), this;
            }
          }
          return this;
        }
        var y2 = l22.prototype;
        return y2.calMilliseconds = function() {
          var t3 = this;
          this.$ms = Object.keys(this.$d).reduce(function(s3, n22) {
            return s3 + (t3.$d[n22] || 0) * h[n22];
          }, 0);
        }, y2.parseFromMilliseconds = function() {
          var t3 = this.$ms;
          this.$d.years = $(t3 / u), t3 %= u, this.$d.months = $(t3 / d), t3 %= d, this.$d.days = $(t3 / r2), t3 %= r2, this.$d.hours = $(t3 / e), t3 %= e, this.$d.minutes = $(t3 / i), t3 %= i, this.$d.seconds = $(t3 / n2), t3 %= n2, this.$d.milliseconds = t3;
        }, y2.toISOString = function() {
          var t3 = v(this.$d.years, "Y"), s3 = v(this.$d.months, "M"), n22 = +this.$d.days || 0;
          this.$d.weeks && (n22 += 7 * this.$d.weeks);
          var i2 = v(n22, "D"), e2 = v(this.$d.hours, "H"), r22 = v(this.$d.minutes, "M"), o2 = this.$d.seconds || 0;
          this.$d.milliseconds && (o2 += this.$d.milliseconds / 1e3, o2 = Math.round(1e3 * o2) / 1e3);
          var u2 = v(o2, "S"), d2 = t3.negative || s3.negative || i2.negative || e2.negative || r22.negative || u2.negative, a2 = e2.format || r22.format || u2.format ? "T" : "", h2 = (d2 ? "-" : "") + "P" + t3.format + s3.format + i2.format + a2 + e2.format + r22.format + u2.format;
          return "P" === h2 || "-P" === h2 ? "P0D" : h2;
        }, y2.toJSON = function() {
          return this.toISOString();
        }, y2.format = function(t3) {
          var n22 = t3 || "YYYY-MM-DDTHH:mm:ss", i2 = { Y: this.$d.years, YY: s2.s(this.$d.years, 2, "0"), YYYY: s2.s(this.$d.years, 4, "0"), M: this.$d.months, MM: s2.s(this.$d.months, 2, "0"), D: this.$d.days, DD: s2.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: s2.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: s2.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: s2.s(this.$d.seconds, 2, "0"), SSS: s2.s(this.$d.milliseconds, 3, "0") };
          return n22.replace(o, function(t4, s3) {
            return s3 || String(i2[t4]);
          });
        }, y2.as = function(t3) {
          return this.$ms / h[m(t3)];
        }, y2.get = function(t3) {
          var s3 = this.$ms, n22 = m(t3);
          return "milliseconds" === n22 ? s3 %= 1e3 : s3 = "weeks" === n22 ? $(s3 / h[n22]) : this.$d[n22], s3 || 0;
        }, y2.add = function(t3, s3, n22) {
          var i2;
          return i2 = s3 ? t3 * h[m(s3)] : c(t3) ? t3.$ms : f2(t3, this).$ms, f2(this.$ms + i2 * (n22 ? -1 : 1), this);
        }, y2.subtract = function(t3, s3) {
          return this.add(t3, s3, true);
        }, y2.locale = function(t3) {
          var s3 = this.clone();
          return s3.$l = t3, s3;
        }, y2.clone = function() {
          return f2(this.$ms, this);
        }, y2.humanize = function(s3) {
          return t2().add(this.$ms, "ms").locale(this.$l).fromNow(!s3);
        }, y2.valueOf = function() {
          return this.asMilliseconds();
        }, y2.milliseconds = function() {
          return this.get("milliseconds");
        }, y2.asMilliseconds = function() {
          return this.as("milliseconds");
        }, y2.seconds = function() {
          return this.get("seconds");
        }, y2.asSeconds = function() {
          return this.as("seconds");
        }, y2.minutes = function() {
          return this.get("minutes");
        }, y2.asMinutes = function() {
          return this.as("minutes");
        }, y2.hours = function() {
          return this.get("hours");
        }, y2.asHours = function() {
          return this.as("hours");
        }, y2.days = function() {
          return this.get("days");
        }, y2.asDays = function() {
          return this.as("days");
        }, y2.weeks = function() {
          return this.get("weeks");
        }, y2.asWeeks = function() {
          return this.as("weeks");
        }, y2.months = function() {
          return this.get("months");
        }, y2.asMonths = function() {
          return this.as("months");
        }, y2.years = function() {
          return this.get("years");
        }, y2.asYears = function() {
          return this.as("years");
        }, l22;
      }(), p = function(t3, s3, n22) {
        return t3.add(s3.years() * n22, "y").add(s3.months() * n22, "M").add(s3.days() * n22, "d").add(s3.hours() * n22, "h").add(s3.minutes() * n22, "m").add(s3.seconds() * n22, "s").add(s3.milliseconds() * n22, "ms");
      };
      return function(n22, i2, e2) {
        t2 = e2, s2 = e2().$utils(), e2.duration = function(t3, s3) {
          var n3 = e2.locale();
          return f2(t3, { $l: n3 }, s3);
        }, e2.isDuration = c;
        var r22 = i2.prototype.add, o2 = i2.prototype.subtract;
        i2.prototype.add = function(t3, s3) {
          return c(t3) ? p(this, t3, 1) : r22.bind(this)(t3, s3);
        }, i2.prototype.subtract = function(t3, s3) {
          return c(t3) ? p(this, t3, -1) : o2.bind(this)(t3, s3);
        };
      };
    });
  })(duration$4);
  return duration$4.exports;
}
var durationExports = requireDuration();
const duration$2 = /* @__PURE__ */ getDefaultExportFromCjs(durationExports);
dayjs.extend(duration$2);
const formatDuration = (value, t2) => {
  let totalSeconds;
  if (typeof value === "string") {
    if (!value) return value;
    const startDate = new Date(value);
    const now2 = /* @__PURE__ */ new Date();
    if (isNaN(startDate.getTime())) {
      console.warn("Invalid date format for duration formatter:", value);
      return value;
    }
    const diffMs = startDate.getTime() - now2.getTime();
    if (diffMs <= 0) {
      return t2 ? t2("ds:notifications.duration.started", { defaultValue: "Started" }) : "Started";
    }
    totalSeconds = Math.floor(diffMs / 1e3);
  } else {
    if (typeof value !== "number" || value <= 0) {
      return t2 ? t2("ds:notifications.duration.started", { defaultValue: "Started" }) : "Started";
    }
    totalSeconds = Math.floor(value);
  }
  const dur = dayjs.duration(totalSeconds, "seconds");
  const weeks = dur.weeks();
  const days = dur.days();
  const hoursFromRemainder = dur.hours();
  const minutesFromRemainder = dur.minutes();
  if (t2) {
    try {
      if (weeks > 0) {
        return t2("ds:notifications.duration.week", { count: weeks });
      }
      if (days > 0) {
        return t2("ds:notifications.duration.day", { count: days });
      }
      if (hoursFromRemainder > 0 && minutesFromRemainder > 0) {
        const hourPart = t2("ds:notifications.duration.hour", { count: hoursFromRemainder });
        const minutePart = t2("ds:notifications.duration.minute", { count: minutesFromRemainder });
        return `${hourPart} ${minutePart}`;
      }
      if (hoursFromRemainder > 0) {
        return t2("ds:notifications.duration.hour", { count: hoursFromRemainder });
      }
      if (minutesFromRemainder > 0) {
        return t2("ds:notifications.duration.minute", { count: minutesFromRemainder });
      }
      return t2("ds:notifications.duration.lessThanMinute");
    } catch (error) {
      console.warn("UI Kit duration translation failed, falling back to English:", error);
    }
  }
  if (weeks > 0) {
    return `${weeks}w`;
  }
  if (days > 0) {
    return `${days}d`;
  }
  if (hoursFromRemainder > 0 && minutesFromRemainder > 0) {
    return `${hoursFromRemainder}:${minutesFromRemainder.toString().padStart(2, "0")}`;
  }
  if (hoursFromRemainder > 0) {
    return `${hoursFromRemainder}:00`;
  }
  if (minutesFromRemainder > 0) {
    return `${minutesFromRemainder}m`;
  }
  return "<1m";
};
const formatDefaultValue = (value, options) => {
  if (!value || typeof value === "string" && value.trim() === "") {
    return (options == null ? void 0 : options.fallback) || (options == null ? void 0 : options[0]);
  }
  return value;
};
const formatEventStatusDescription = (timeUntilStart, t2) => {
  if (timeUntilStart <= 0) {
    return t2 ? t2("ds:notifications.CalendarEventUpcoming.started", { defaultValue: "started" }) : "started";
  } else {
    const duration2 = formatDuration(timeUntilStart, t2);
    const willStartInText = t2 ? t2("ds:notifications.CalendarEventUpcoming.willStartIn", { defaultValue: "will start in" }) : "will start in";
    return `${willStartInText} <strong>${duration2}</strong>`;
  }
};
const NotificationHeader = ({ title: title2, date, isMobile }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { justify: "space-between", pr: "xs", children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "primary", size: isMobile ? "sm" : "md", fw: 600, children: title2 }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "sm", c: "grey.5", children: formatNotificationDate(date) })
  ] });
};
const NotificationDescription = ({ children, isMobile }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Text,
    {
      size: isMobile ? "xs" : "sm",
      c: "primary",
      lineClamp: 4,
      style: { wordBreak: "break-word" },
      children
    }
  );
};
const NotificationQuote = ({ children }) => {
  const { isDark } = useTheme();
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Paper,
    {
      p: "xs",
      radius: "lg",
      bg: isDark ? "gray.7" : "gray.1",
      c: "grey.6",
      style: { borderTopLeftRadius: 0 },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "xs", fs: "italic", fw: 400, lineClamp: 2, style: { wordBreak: "break-word" }, children })
    }
  );
};
const NotificationFooter = ({ source, subject, isMobile }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Text,
    {
      style: { fontSize: isMobile ? "10px" : "12px", wordBreak: "break-all" },
      c: "secondary",
      lineClamp: 1,
      children: [
        source,
        " • ",
        subject
      ]
    }
  ) });
};
const getNotificationTypeKey = (type2) => {
  const typeMap = {
    // Disk
    [NotificationType.DiskFileShared]: "DiskFileShared",
    [NotificationType.DiskFileCommented]: "DiskFileCommented",
    [NotificationType.DiskFileMentioned]: "DiskFileMentioned",
    [NotificationType.DiskFileUploaded]: "DiskFileUploaded",
    [NotificationType.DiskFilePermissionGranted]: "DiskFilePermissionGranted",
    [NotificationType.DiskFileDownloadReady]: "DiskFileDownloadReady",
    [NotificationType.DiskLinkGenerated]: "DiskLinkGenerated",
    [NotificationType.DiskDirectoryShared]: "DiskDirectoryShared",
    [NotificationType.DiskRoomShared]: "DiskRoomShared",
    // Project
    [NotificationType.ProjectShared]: "ProjectShared",
    [NotificationType.ProjectTaskCreated]: "ProjectTaskCreated",
    [NotificationType.ProjectTaskDeleted]: "ProjectTaskDeleted",
    [NotificationType.ProjectTaskUpdated]: "ProjectTaskUpdated",
    [NotificationType.ProjectTaskMoved]: "ProjectTaskMoved",
    [NotificationType.ProjectTaskStatusChanged]: "ProjectTaskStatusChanged",
    [NotificationType.ProjectTaskCommented]: "ProjectTaskCommented",
    [NotificationType.ProjectMyTaskDeleted]: "ProjectMyTaskDeleted",
    [NotificationType.ProjectMyTaskUpdated]: "ProjectMyTaskUpdated",
    [NotificationType.ProjectMyTaskMoved]: "ProjectMyTaskMoved",
    [NotificationType.ProjectMyTaskStatusChanged]: "ProjectMyTaskStatusChanged",
    [NotificationType.ProjectMyTaskCommented]: "ProjectMyTaskCommented",
    [NotificationType.ProjectTaskUnassigned]: "ProjectTaskUnassigned",
    [NotificationType.ProjectTaskAssigned]: "ProjectTaskAssigned",
    [NotificationType.ProjectTaskMentioned]: "ProjectTaskMentioned",
    [NotificationType.ProjectTaskAttachmentAdded]: "ProjectTaskAttachmentAdded",
    [NotificationType.ProjectSprintCreated]: "ProjectSprintCreated",
    // Admin
    [NotificationType.AdminRoleAssigned]: "AdminRoleAssigned",
    [NotificationType.AdminRoleDeleted]: "AdminRoleDeleted",
    // Mail
    [NotificationType.MailMessageImportant]: "MailMessageImportant",
    [NotificationType.MailMessageReceived]: "MailMessageReceived",
    // Calendar
    [NotificationType.CalendarShared]: "CalendarShared",
    [NotificationType.CalendarEventCanceled]: "CalendarEventCanceled",
    [NotificationType.CalendarEventInvited]: "CalendarEventInvited",
    [NotificationType.CalendarEventUpdated]: "CalendarEventUpdated",
    [NotificationType.CalendarEventUpcoming]: "CalendarEventUpcoming"
  };
  return typeMap[type2] || "unknown";
};
const SimpleNotification = ({ notification, isMobile }) => {
  const { t: t2 } = useTranslation();
  const typeKey = getNotificationTypeKey(notification.type);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(NotificationLayout, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      NotificationHeader,
      {
        title: t2(`ds:notifications.${typeKey}.title`),
        date: notification.date,
        isMobile
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationDescription, { isMobile, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Trans,
      {
        i18nKey: `ds:notifications.${typeKey}.description`,
        values: notification,
        components: { strong: /* @__PURE__ */ jsxRuntimeExports.jsx("strong", {}, "strong"), br: /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}, "br") }
      }
    ) }),
    notification.action.description && /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationQuote, { children: notification.action.description }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      NotificationFooter,
      {
        source: notification.source.title,
        subject: notification.action.subject,
        isMobile
      }
    )
  ] });
};
var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
  HttpMethod2["GET"] = "GET";
  HttpMethod2["POST"] = "POST";
  HttpMethod2["PUT"] = "PUT";
  HttpMethod2["PATCH"] = "PATCH";
  HttpMethod2["DELETE"] = "DELETE";
  return HttpMethod2;
})(HttpMethod || {});
const Module$1 = {
  System: 0,
  Disk: 1,
  Projects: 2,
  Calendar: 3,
  Mail: 4,
  Contacts: 5,
  Admin: 6,
  // Needs to be checked with the server
  Forms: 7,
  Draw: 8,
  Payments: 9,
  Team: 10,
  Pages: 11
};
const AccessType$1 = {
  Deny: -4096,
  OnlyUpload: -1024,
  FreeBusy: -64,
  CanDownload: -16,
  Read: 0,
  Comment: 1,
  Review: 2,
  Write: 4,
  Delete: 8,
  FullInternal: 256,
  Full: 512,
  Lock: 4096,
  LockPrint: 8192,
  LockCopy: 16384,
  LockDownload: 32768
};
const DlpCheckStatus = {
  Completed: 2,
  Blocked: 3,
  Error: 4
};
const translations$4 = {
  en: {
    success: {
      title: "File link generated",
      description: "Your file <a><strong>«{{fileName}}»</strong></a> has been successfully validated."
    },
    error: {
      title: "Failed to generate link",
      description: "Your file <strong>«{{fileName}}»</strong> didn't pass validation. Try again."
    }
  },
  ru: {
    success: {
      title: "Ссылка на файл сгенерирована",
      description: "Ваш файл <a><strong>«{{fileName}}»</strong></a> успешно прошёл проверку."
    },
    error: {
      title: "Ссылка не создана",
      description: "Ваш файл <strong>«{{fileName}}»</strong> не прошёл проверку. Поробуйте снова."
    }
  }
};
const LinkGenerationComplete = ({ notification, isMobile }) => {
  const { i18n: i18n2 } = useTranslation();
  const lang = i18n2.language === "ru" ? "ru" : "en";
  const isSuccess = notification.action.dlpCheckStatus === DlpCheckStatus.Completed;
  const t2 = translations$4[lang][isSuccess ? "success" : "error"];
  const translationData = {
    fileName: notification.action.subject
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(NotificationLayout, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationHeader, { title: t2.title, date: notification.date, isMobile }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationDescription, { isMobile, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Trans,
      {
        i18nKey: t2.description,
        values: translationData,
        components: {
          strong: /* @__PURE__ */ jsxRuntimeExports.jsx("strong", {}, "strong"),
          a: /* @__PURE__ */ jsxRuntimeExports.jsx(
            "a",
            {
              href: notification.action.externalLinkUrl,
              target: "_blank",
              rel: "noopener noreferrer"
            },
            "link"
          )
        }
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      NotificationFooter,
      {
        source: notification.source.title,
        subject: notification.action.subject,
        isMobile
      }
    )
  ] });
};
const translations$3 = {
  en: {
    completed: {
      title: "File Uploaded",
      description: "The file <strong>«{{fileName}}»</strong> has been uploaded and checked successfully."
    },
    blocked: {
      title: "File Upload Blocked",
      description: "The file <strong>«{{fileName}}»</strong> was blocked by DLP policy."
    },
    error: {
      title: "File Upload Error",
      description: "An error occurred while checking the file <strong>«{{fileName}}»</strong>."
    }
  },
  ru: {
    completed: {
      title: "Файл загружен",
      description: "Файл <strong>«{{fileName}}»</strong> был загружен и успешно проверен."
    },
    blocked: {
      title: "Загрузка файла отклонена",
      description: "Файл <strong>«{{fileName}}»</strong> был заблокирован политикой DLP."
    },
    error: {
      title: "Ошибка при загрузке файла",
      description: "Произошла ошибка при проверке файла <strong>«{{fileName}}»</strong>."
    }
  }
};
const FileUploadComplete = ({ notification, isMobile }) => {
  const { i18n: i18n2 } = useTranslation();
  const lang = i18n2.language === "ru" ? "ru" : "en";
  const status = notification.action.dlpCheckStatus;
  let translationKey = "completed";
  if (status) {
    if (status === DlpCheckStatus.Blocked) {
      translationKey = "blocked";
    } else if (status === DlpCheckStatus.Error) {
      translationKey = "error";
    }
  }
  const t2 = translations$3[lang][translationKey];
  const translationData = {
    fileName: notification.action.subject
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(NotificationLayout, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationHeader, { title: t2.title, date: notification.date, isMobile }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationDescription, { isMobile, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Trans,
      {
        i18nKey: t2.description,
        values: translationData,
        components: { strong: /* @__PURE__ */ jsxRuntimeExports.jsx("strong", {}, "strong") }
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      NotificationFooter,
      {
        source: notification.source.title,
        subject: notification.action.subject,
        isMobile
      }
    )
  ] });
};
const translations$2 = {
  en: {
    success: {
      title: "Permissions granted",
      description: "<strong>«{{roleName}}»</strong> permissions granted to user <strong>{{userName}}</strong>. Your file has been successfully validated."
    },
    error: {
      title: "Failed to grant permissions",
      description: "Failed to grant permissions to user. Your file didn't pass validation. Try again."
    }
  },
  ru: {
    success: {
      title: "Права выданы",
      description: "Права <strong>«{{roleName}}»</strong> пользователю <strong>{{userName}}</strong> выданы. Ваш файл успешно прошёл проверку."
    },
    error: {
      title: "Доступ не выдан",
      description: "Ваш файл не прошёл проверку. Попробуйте снова."
    }
  }
};
const DiskFilePermissionGranted = ({
  notification,
  isMobile
}) => {
  const { i18n: i18n2 } = useTranslation();
  const lang = i18n2.language === "ru" ? "ru" : "en";
  const isSuccess = notification.action.dlpCheckStatus === DlpCheckStatus.Completed;
  const t2 = translations$2[lang][isSuccess ? "success" : "error"];
  const translationData = {
    roleName: notification.action.roleName || "",
    userName: notification.action.targetUserName || ""
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(NotificationLayout, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationHeader, { title: t2.title, date: notification.date, isMobile }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationDescription, { isMobile, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Trans,
      {
        i18nKey: t2.description,
        values: translationData,
        components: { strong: /* @__PURE__ */ jsxRuntimeExports.jsx("strong", {}, "strong") }
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      NotificationFooter,
      {
        source: notification.source.title,
        subject: notification.action.subject,
        isMobile
      }
    )
  ] });
};
const translations$1 = {
  en: {
    success: {
      title: "File is ready to download",
      description: "Your file <a><strong>«{{fileName}}»</strong></a> has been successfully validated and is ready to download."
    },
    error: {
      title: "Unable to download file",
      description: "Your file didn't pass validation. Try again."
    }
  },
  ru: {
    success: {
      title: "Файл готов к скачиванию",
      description: "Ваш файл <a><strong>«{{fileName}}»</strong></a> успешно прошёл проверку и готов к скачиванию."
    },
    error: {
      title: "Не удаётся скачать файл",
      description: "Ваш файл не прошёл проверку. Попробуйте снова."
    }
  }
};
const DiskFileDownloadReady = ({ notification, isMobile }) => {
  const { i18n: i18n2 } = useTranslation();
  const lang = i18n2.language === "ru" ? "ru" : "en";
  const isSuccess = notification.action.dlpCheckStatus === DlpCheckStatus.Completed;
  const t2 = translations$1[lang][isSuccess ? "success" : "error"];
  const titleText = t2.title.replace("{{fileName}}", notification.action.subject);
  const translationData = {
    fileName: notification.action.subject
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(NotificationLayout, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationHeader, { title: titleText, date: notification.date, isMobile }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationDescription, { isMobile, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Trans,
      {
        values: translationData,
        i18nKey: t2.description,
        components: {
          strong: /* @__PURE__ */ jsxRuntimeExports.jsx("strong", {}, "strong"),
          a: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: notification.action.downloadUrl, target: "_blank", rel: "noopener noreferrer" }, "link")
        }
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      NotificationFooter,
      {
        source: notification.source.title,
        subject: notification.action.subject,
        isMobile
      }
    )
  ] });
};
const customNotificationComponents = {
  [NotificationType.DiskLinkGenerated]: LinkGenerationComplete,
  [NotificationType.DiskFileUploaded]: FileUploadComplete,
  [NotificationType.DiskFilePermissionGranted]: DiskFilePermissionGranted,
  [NotificationType.DiskFileDownloadReady]: DiskFileDownloadReady
  // Add more custom components here as needed
};
const getNotificationComponent = (type2) => {
  return customNotificationComponents[type2] || SimpleNotification;
};
const NotificationItem = ({
  notification,
  indicatorSlot: IndicatorSlot,
  avatarSlot: AvatarSlot,
  onClick
}) => {
  const { isDark } = useTheme();
  const containerRef = reactExports.useRef(null);
  const { hovered, ref } = useHover();
  const [isMobile, setIsMobile] = reactExports.useState(true);
  const NotificationComponent = reactExports.useMemo(
    () => getNotificationComponent(notification.type),
    [notification.type]
  );
  reactExports.useEffect(() => {
    var _a2;
    setIsMobile((((_a2 = containerRef == null ? void 0 : containerRef.current) == null ? void 0 : _a2.offsetWidth) || 0) < 576);
  }, [containerRef]);
  const handleOnClick = () => {
    if (onClick) {
      onClick(notification);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "a",
    {
      href: notification.action.subjectUrl,
      style: { textDecoration: "none" },
      target: "_blank",
      onClick: handleOnClick,
      ref: containerRef,
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
        Flex,
        {
          gap: "xs",
          p: "sm",
          style: (theme2) => ({
            backgroundColor: hovered ? isDark ? theme2.colors.gray[8] : theme2.colors.gray[0] : "transparent"
          }),
          ref,
          children: [
            AvatarSlot ? /* @__PURE__ */ jsxRuntimeExports.jsx(AvatarSlot, { notification, size: isMobile ? 30 : 40 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
              Avatar,
              {
                title: notification.actor,
                src: notification.imageUrl,
                color: "cyan",
                size: isMobile ? 30 : 40
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              NotificationComponent,
              {
                notification,
                isMobile
              },
              notification.id
            ),
            IndicatorSlot && /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mt: isMobile ? 1 : 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IndicatorSlot, { hovered, notification }) })
          ]
        }
      )
    }
  );
};
const NEW_NOTIFICATIONS_EVENT = "notifications:new";
const dispatchNewNotificationsEvent = (notifications2) => {
  const event = new CustomEvent(NEW_NOTIFICATIONS_EVENT, {
    detail: { notifications: notifications2 }
  });
  window.dispatchEvent(event);
};
var withSelector = { exports: {} };
var useSyncExternalStoreWithSelector_production = {};
/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hasRequiredUseSyncExternalStoreWithSelector_production;
function requireUseSyncExternalStoreWithSelector_production() {
  if (hasRequiredUseSyncExternalStoreWithSelector_production) return useSyncExternalStoreWithSelector_production;
  hasRequiredUseSyncExternalStoreWithSelector_production = 1;
  var React2 = r;
  function is2(x, y) {
    return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
  }
  var objectIs = "function" === typeof Object.is ? Object.is : is2, useSyncExternalStore = React2.useSyncExternalStore, useRef2 = React2.useRef, useEffect2 = React2.useEffect, useMemo2 = React2.useMemo, useDebugValue2 = React2.useDebugValue;
  useSyncExternalStoreWithSelector_production.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
    var instRef = useRef2(null);
    if (null === instRef.current) {
      var inst = { hasValue: false, value: null };
      instRef.current = inst;
    } else inst = instRef.current;
    instRef = useMemo2(
      function() {
        function memoizedSelector(nextSnapshot) {
          if (!hasMemo) {
            hasMemo = true;
            memoizedSnapshot = nextSnapshot;
            nextSnapshot = selector(nextSnapshot);
            if (void 0 !== isEqual && inst.hasValue) {
              var currentSelection = inst.value;
              if (isEqual(currentSelection, nextSnapshot))
                return memoizedSelection = currentSelection;
            }
            return memoizedSelection = nextSnapshot;
          }
          currentSelection = memoizedSelection;
          if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
          var nextSelection = selector(nextSnapshot);
          if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
            return memoizedSnapshot = nextSnapshot, currentSelection;
          memoizedSnapshot = nextSnapshot;
          return memoizedSelection = nextSelection;
        }
        var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
        return [
          function() {
            return memoizedSelector(getSnapshot());
          },
          null === maybeGetServerSnapshot ? void 0 : function() {
            return memoizedSelector(maybeGetServerSnapshot());
          }
        ];
      },
      [getSnapshot, getServerSnapshot, selector, isEqual]
    );
    var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
    useEffect2(
      function() {
        inst.hasValue = true;
        inst.value = value;
      },
      [value]
    );
    useDebugValue2(value);
    return value;
  };
  return useSyncExternalStoreWithSelector_production;
}
var hasRequiredWithSelector;
function requireWithSelector() {
  if (hasRequiredWithSelector) return withSelector.exports;
  hasRequiredWithSelector = 1;
  {
    withSelector.exports = requireUseSyncExternalStoreWithSelector_production();
  }
  return withSelector.exports;
}
var withSelectorExports = requireWithSelector();
function defaultNoopBatch(callback) {
  callback();
}
function is(x, y) {
  if (x === y) {
    return x !== 0 || y !== 0 || 1 / x === 1 / y;
  } else {
    return x !== x && y !== y;
  }
}
function shallowEqual(objA, objB) {
  if (is(objA, objB)) return true;
  if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
    return false;
  }
  const keysA = Object.keys(objA);
  const keysB = Object.keys(objB);
  if (keysA.length !== keysB.length) return false;
  for (let i = 0; i < keysA.length; i++) {
    if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
      return false;
    }
  }
  return true;
}
var ContextKey = /* @__PURE__ */ Symbol.for(`react-redux-context`);
var gT = typeof globalThis !== "undefined" ? globalThis : (
  /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */
  {}
);
function getContext() {
  if (!reactExports.createContext) return {};
  const contextMap = gT[ContextKey] ?? (gT[ContextKey] = /* @__PURE__ */ new Map());
  let realContext = contextMap.get(reactExports.createContext);
  if (!realContext) {
    realContext = reactExports.createContext(
      null
    );
    contextMap.set(reactExports.createContext, realContext);
  }
  return realContext;
}
var ReactReduxContext = /* @__PURE__ */ getContext();
function createReduxContextHook(context = ReactReduxContext) {
  return function useReduxContext2() {
    const contextValue = reactExports.useContext(context);
    return contextValue;
  };
}
var useReduxContext = /* @__PURE__ */ createReduxContextHook();
function createStoreHook(context = ReactReduxContext) {
  const useReduxContext2 = context === ReactReduxContext ? useReduxContext : (
    // @ts-ignore
    createReduxContextHook(context)
  );
  const useStore2 = () => {
    const { store: store2 } = useReduxContext2();
    return store2;
  };
  Object.assign(useStore2, {
    withTypes: () => useStore2
  });
  return useStore2;
}
var useStore = /* @__PURE__ */ createStoreHook();
function createDispatchHook(context = ReactReduxContext) {
  const useStore2 = context === ReactReduxContext ? useStore : createStoreHook(context);
  const useDispatch2 = () => {
    const store2 = useStore2();
    return store2.dispatch;
  };
  Object.assign(useDispatch2, {
    withTypes: () => useDispatch2
  });
  return useDispatch2;
}
var useDispatch = /* @__PURE__ */ createDispatchHook();
var refEquality = (a, b) => a === b;
function createSelectorHook(context = ReactReduxContext) {
  const useReduxContext2 = context === ReactReduxContext ? useReduxContext : createReduxContextHook(context);
  const useSelector2 = (selector, equalityFnOrOptions = {}) => {
    const { equalityFn = refEquality } = typeof equalityFnOrOptions === "function" ? { equalityFn: equalityFnOrOptions } : equalityFnOrOptions;
    const reduxContext = useReduxContext2();
    const { store: store2, subscription, getServerState } = reduxContext;
    reactExports.useRef(true);
    const wrappedSelector = reactExports.useCallback(
      {
        [selector.name](state) {
          const selected = selector(state);
          return selected;
        }
      }[selector.name],
      [selector]
    );
    const selectedState = withSelectorExports.useSyncExternalStoreWithSelector(
      subscription.addNestedSub,
      store2.getState,
      getServerState || store2.getState,
      wrappedSelector,
      equalityFn
    );
    reactExports.useDebugValue(selectedState);
    return selectedState;
  };
  Object.assign(useSelector2, {
    withTypes: () => useSelector2
  });
  return useSelector2;
}
var useSelector = /* @__PURE__ */ createSelectorHook();
var batch = defaultNoopBatch;
function capitalize(str) {
  return str.replace(str[0], str[0].toUpperCase());
}
function isQueryDefinition(e) {
  return e.type === "query";
}
function isMutationDefinition(e) {
  return e.type === "mutation";
}
function safeAssign(target, ...args) {
  return Object.assign(target, ...args);
}
var cache = WeakMap ? /* @__PURE__ */ new WeakMap() : void 0;
var defaultSerializeQueryArgs = ({
  endpointName,
  queryArgs
}) => {
  let serialized = "";
  const cached = cache == null ? void 0 : cache.get(queryArgs);
  if (typeof cached === "string") {
    serialized = cached;
  } else {
    const stringified = JSON.stringify(queryArgs, (key, value) => {
      value = typeof value === "bigint" ? {
        $bigint: value.toString()
      } : value;
      value = isPlainObject$1(value) ? Object.keys(value).sort().reduce((acc, key2) => {
        acc[key2] = value[key2];
        return acc;
      }, {}) : value;
      return value;
    });
    if (isPlainObject$1(queryArgs)) {
      cache == null ? void 0 : cache.set(queryArgs, stringified);
    }
    serialized = stringified;
  }
  return `${endpointName}(${serialized})`;
};
var UNINITIALIZED_VALUE = Symbol();
function useStableQueryArgs(queryArgs, serialize, endpointDefinition, endpointName) {
  const incoming = reactExports.useMemo(() => ({
    queryArgs,
    serialized: typeof queryArgs == "object" ? serialize({
      queryArgs,
      endpointDefinition,
      endpointName
    }) : queryArgs
  }), [queryArgs, serialize, endpointDefinition, endpointName]);
  const cache2 = reactExports.useRef(incoming);
  reactExports.useEffect(() => {
    if (cache2.current.serialized !== incoming.serialized) {
      cache2.current = incoming;
    }
  }, [incoming]);
  return cache2.current.serialized === incoming.serialized ? cache2.current.queryArgs : queryArgs;
}
function useShallowStableValue(value) {
  const cache2 = reactExports.useRef(value);
  reactExports.useEffect(() => {
    if (!shallowEqual(cache2.current, value)) {
      cache2.current = value;
    }
  }, [value]);
  return shallowEqual(cache2.current, value) ? cache2.current : value;
}
var canUseDOM = () => !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
var isDOM = /* @__PURE__ */ canUseDOM();
var isRunningInReactNative = () => typeof navigator !== "undefined" && navigator.product === "ReactNative";
var isReactNative = /* @__PURE__ */ isRunningInReactNative();
var getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? reactExports.useLayoutEffect : reactExports.useEffect;
var useIsomorphicLayoutEffect = /* @__PURE__ */ getUseIsomorphicLayoutEffect();
var noPendingQueryStateSelector = (selected) => {
  if (selected.isUninitialized) {
    return {
      ...selected,
      isUninitialized: false,
      isFetching: true,
      isLoading: selected.data !== void 0 ? false : true,
      status: QueryStatus.pending
    };
  }
  return selected;
};
function buildHooks({
  api,
  moduleOptions: {
    batch: batch2,
    hooks: {
      useDispatch: useDispatch2,
      useSelector: useSelector2,
      useStore: useStore2
    },
    unstable__sideEffectsInRender,
    createSelector: createSelector2
  },
  serializeQueryArgs,
  context
}) {
  const usePossiblyImmediateEffect = unstable__sideEffectsInRender ? (cb) => cb() : reactExports.useEffect;
  return {
    buildQueryHooks,
    buildMutationHook,
    usePrefetch
  };
  function queryStatePreSelector(currentState, lastResult, queryArgs) {
    if ((lastResult == null ? void 0 : lastResult.endpointName) && currentState.isUninitialized) {
      const {
        endpointName
      } = lastResult;
      const endpointDefinition = context.endpointDefinitions[endpointName];
      if (queryArgs !== skipToken && serializeQueryArgs({
        queryArgs: lastResult.originalArgs,
        endpointDefinition,
        endpointName
      }) === serializeQueryArgs({
        queryArgs,
        endpointDefinition,
        endpointName
      })) lastResult = void 0;
    }
    let data = currentState.isSuccess ? currentState.data : lastResult == null ? void 0 : lastResult.data;
    if (data === void 0) data = currentState.data;
    const hasData = data !== void 0;
    const isFetching = currentState.isLoading;
    const isLoading = (!lastResult || lastResult.isLoading || lastResult.isUninitialized) && !hasData && isFetching;
    const isSuccess = currentState.isSuccess || hasData && (isFetching && !(lastResult == null ? void 0 : lastResult.isError) || currentState.isUninitialized);
    return {
      ...currentState,
      data,
      currentData: currentState.data,
      isFetching,
      isLoading,
      isSuccess
    };
  }
  function usePrefetch(endpointName, defaultOptions) {
    const dispatch = useDispatch2();
    const stableDefaultOptions = useShallowStableValue(defaultOptions);
    return reactExports.useCallback((arg, options) => dispatch(api.util.prefetch(endpointName, arg, {
      ...stableDefaultOptions,
      ...options
    })), [endpointName, dispatch, stableDefaultOptions]);
  }
  function buildQueryHooks(name2) {
    const useQuerySubscription = (arg, {
      refetchOnReconnect,
      refetchOnFocus,
      refetchOnMountOrArgChange,
      skip = false,
      pollingInterval = 0,
      skipPollingIfUnfocused = false
    } = {}) => {
      const {
        initiate
      } = api.endpoints[name2];
      const dispatch = useDispatch2();
      const subscriptionSelectorsRef = reactExports.useRef(void 0);
      if (!subscriptionSelectorsRef.current) {
        const returnedValue = dispatch(api.internalActions.internal_getRTKQSubscriptions());
        subscriptionSelectorsRef.current = returnedValue;
      }
      const stableArg = useStableQueryArgs(
        skip ? skipToken : arg,
        // Even if the user provided a per-endpoint `serializeQueryArgs` with
        // a consistent return value, _here_ we want to use the default behavior
        // so we can tell if _anything_ actually changed. Otherwise, we can end up
        // with a case where the query args did change but the serialization doesn't,
        // and then we never try to initiate a refetch.
        defaultSerializeQueryArgs,
        context.endpointDefinitions[name2],
        name2
      );
      const stableSubscriptionOptions = useShallowStableValue({
        refetchOnReconnect,
        refetchOnFocus,
        pollingInterval,
        skipPollingIfUnfocused
      });
      const lastRenderHadSubscription = reactExports.useRef(false);
      const promiseRef = reactExports.useRef(void 0);
      let {
        queryCacheKey,
        requestId
      } = promiseRef.current || {};
      let currentRenderHasSubscription = false;
      if (queryCacheKey && requestId) {
        currentRenderHasSubscription = subscriptionSelectorsRef.current.isRequestSubscribed(queryCacheKey, requestId);
      }
      const subscriptionRemoved = !currentRenderHasSubscription && lastRenderHadSubscription.current;
      usePossiblyImmediateEffect(() => {
        lastRenderHadSubscription.current = currentRenderHasSubscription;
      });
      usePossiblyImmediateEffect(() => {
        if (subscriptionRemoved) {
          promiseRef.current = void 0;
        }
      }, [subscriptionRemoved]);
      usePossiblyImmediateEffect(() => {
        var _a2;
        const lastPromise = promiseRef.current;
        if (stableArg === skipToken) {
          lastPromise == null ? void 0 : lastPromise.unsubscribe();
          promiseRef.current = void 0;
          return;
        }
        const lastSubscriptionOptions = (_a2 = promiseRef.current) == null ? void 0 : _a2.subscriptionOptions;
        if (!lastPromise || lastPromise.arg !== stableArg) {
          lastPromise == null ? void 0 : lastPromise.unsubscribe();
          const promise = dispatch(initiate(stableArg, {
            subscriptionOptions: stableSubscriptionOptions,
            forceRefetch: refetchOnMountOrArgChange
          }));
          promiseRef.current = promise;
        } else if (stableSubscriptionOptions !== lastSubscriptionOptions) {
          lastPromise.updateSubscriptionOptions(stableSubscriptionOptions);
        }
      }, [dispatch, initiate, refetchOnMountOrArgChange, stableArg, stableSubscriptionOptions, subscriptionRemoved]);
      reactExports.useEffect(() => {
        return () => {
          var _a2;
          (_a2 = promiseRef.current) == null ? void 0 : _a2.unsubscribe();
          promiseRef.current = void 0;
        };
      }, []);
      return reactExports.useMemo(() => ({
        /**
         * A method to manually refetch data for the query
         */
        refetch: () => {
          var _a2;
          if (!promiseRef.current) throw new Error(formatProdErrorMessage(38));
          return (_a2 = promiseRef.current) == null ? void 0 : _a2.refetch();
        }
      }), []);
    };
    const useLazyQuerySubscription = ({
      refetchOnReconnect,
      refetchOnFocus,
      pollingInterval = 0,
      skipPollingIfUnfocused = false
    } = {}) => {
      const {
        initiate
      } = api.endpoints[name2];
      const dispatch = useDispatch2();
      const [arg, setArg] = reactExports.useState(UNINITIALIZED_VALUE);
      const promiseRef = reactExports.useRef(void 0);
      const stableSubscriptionOptions = useShallowStableValue({
        refetchOnReconnect,
        refetchOnFocus,
        pollingInterval,
        skipPollingIfUnfocused
      });
      usePossiblyImmediateEffect(() => {
        var _a2, _b;
        const lastSubscriptionOptions = (_a2 = promiseRef.current) == null ? void 0 : _a2.subscriptionOptions;
        if (stableSubscriptionOptions !== lastSubscriptionOptions) {
          (_b = promiseRef.current) == null ? void 0 : _b.updateSubscriptionOptions(stableSubscriptionOptions);
        }
      }, [stableSubscriptionOptions]);
      const subscriptionOptionsRef = reactExports.useRef(stableSubscriptionOptions);
      usePossiblyImmediateEffect(() => {
        subscriptionOptionsRef.current = stableSubscriptionOptions;
      }, [stableSubscriptionOptions]);
      const trigger = reactExports.useCallback(function(arg2, preferCacheValue = false) {
        let promise;
        batch2(() => {
          var _a2;
          (_a2 = promiseRef.current) == null ? void 0 : _a2.unsubscribe();
          promiseRef.current = promise = dispatch(initiate(arg2, {
            subscriptionOptions: subscriptionOptionsRef.current,
            forceRefetch: !preferCacheValue
          }));
          setArg(arg2);
        });
        return promise;
      }, [dispatch, initiate]);
      const reset2 = reactExports.useCallback(() => {
        var _a2, _b;
        if ((_a2 = promiseRef.current) == null ? void 0 : _a2.queryCacheKey) {
          dispatch(api.internalActions.removeQueryResult({
            queryCacheKey: (_b = promiseRef.current) == null ? void 0 : _b.queryCacheKey
          }));
        }
      }, [dispatch]);
      reactExports.useEffect(() => {
        return () => {
          var _a2;
          (_a2 = promiseRef == null ? void 0 : promiseRef.current) == null ? void 0 : _a2.unsubscribe();
        };
      }, []);
      reactExports.useEffect(() => {
        if (arg !== UNINITIALIZED_VALUE && !promiseRef.current) {
          trigger(arg, true);
        }
      }, [arg, trigger]);
      return reactExports.useMemo(() => [trigger, arg, {
        reset: reset2
      }], [trigger, arg, reset2]);
    };
    const useQueryState = (arg, {
      skip = false,
      selectFromResult
    } = {}) => {
      const {
        select: select2
      } = api.endpoints[name2];
      const stableArg = useStableQueryArgs(skip ? skipToken : arg, serializeQueryArgs, context.endpointDefinitions[name2], name2);
      const lastValue = reactExports.useRef(void 0);
      const selectDefaultResult = reactExports.useMemo(() => createSelector2([select2(stableArg), (_, lastResult) => lastResult, (_) => stableArg], queryStatePreSelector, {
        memoizeOptions: {
          resultEqualityCheck: shallowEqual
        }
      }), [select2, stableArg]);
      const querySelector = reactExports.useMemo(() => selectFromResult ? createSelector2([selectDefaultResult], selectFromResult, {
        devModeChecks: {
          identityFunctionCheck: "never"
        }
      }) : selectDefaultResult, [selectDefaultResult, selectFromResult]);
      const currentState = useSelector2((state) => querySelector(state, lastValue.current), shallowEqual);
      const store2 = useStore2();
      const newLastValue = selectDefaultResult(store2.getState(), lastValue.current);
      useIsomorphicLayoutEffect(() => {
        lastValue.current = newLastValue;
      }, [newLastValue]);
      return currentState;
    };
    return {
      useQueryState,
      useQuerySubscription,
      useLazyQuerySubscription,
      useLazyQuery(options) {
        const [trigger, arg, {
          reset: reset2
        }] = useLazyQuerySubscription(options);
        const queryStateResults = useQueryState(arg, {
          ...options,
          skip: arg === UNINITIALIZED_VALUE
        });
        const info = reactExports.useMemo(() => ({
          lastArg: arg
        }), [arg]);
        return reactExports.useMemo(() => [trigger, {
          ...queryStateResults,
          reset: reset2
        }, info], [trigger, queryStateResults, reset2, info]);
      },
      useQuery(arg, options) {
        const querySubscriptionResults = useQuerySubscription(arg, options);
        const queryStateResults = useQueryState(arg, {
          selectFromResult: arg === skipToken || (options == null ? void 0 : options.skip) ? void 0 : noPendingQueryStateSelector,
          ...options
        });
        const {
          data,
          status,
          isLoading,
          isSuccess,
          isError: isError2,
          error
        } = queryStateResults;
        reactExports.useDebugValue({
          data,
          status,
          isLoading,
          isSuccess,
          isError: isError2,
          error
        });
        return reactExports.useMemo(() => ({
          ...queryStateResults,
          ...querySubscriptionResults
        }), [queryStateResults, querySubscriptionResults]);
      }
    };
  }
  function buildMutationHook(name2) {
    return ({
      selectFromResult,
      fixedCacheKey
    } = {}) => {
      const {
        select: select2,
        initiate
      } = api.endpoints[name2];
      const dispatch = useDispatch2();
      const [promise, setPromise] = reactExports.useState();
      reactExports.useEffect(() => () => {
        if (!(promise == null ? void 0 : promise.arg.fixedCacheKey)) {
          promise == null ? void 0 : promise.reset();
        }
      }, [promise]);
      const triggerMutation = reactExports.useCallback(function(arg) {
        const promise2 = dispatch(initiate(arg, {
          fixedCacheKey
        }));
        setPromise(promise2);
        return promise2;
      }, [dispatch, initiate, fixedCacheKey]);
      const {
        requestId
      } = promise || {};
      const selectDefaultResult = reactExports.useMemo(() => select2({
        fixedCacheKey,
        requestId: promise == null ? void 0 : promise.requestId
      }), [fixedCacheKey, promise, select2]);
      const mutationSelector = reactExports.useMemo(() => selectFromResult ? createSelector2([selectDefaultResult], selectFromResult) : selectDefaultResult, [selectFromResult, selectDefaultResult]);
      const currentState = useSelector2(mutationSelector, shallowEqual);
      const originalArgs = fixedCacheKey == null ? promise == null ? void 0 : promise.arg.originalArgs : void 0;
      const reset2 = reactExports.useCallback(() => {
        batch2(() => {
          if (promise) {
            setPromise(void 0);
          }
          if (fixedCacheKey) {
            dispatch(api.internalActions.removeMutationResult({
              requestId,
              fixedCacheKey
            }));
          }
        });
      }, [dispatch, fixedCacheKey, promise, requestId]);
      const {
        endpointName,
        data,
        status,
        isLoading,
        isSuccess,
        isError: isError2,
        error
      } = currentState;
      reactExports.useDebugValue({
        endpointName,
        data,
        status,
        isLoading,
        isSuccess,
        isError: isError2,
        error
      });
      const finalState = reactExports.useMemo(() => ({
        ...currentState,
        originalArgs,
        reset: reset2
      }), [currentState, originalArgs, reset2]);
      return reactExports.useMemo(() => [triggerMutation, finalState], [triggerMutation, finalState]);
    };
  }
}
var reactHooksModuleName = /* @__PURE__ */ Symbol();
var reactHooksModule = ({
  batch: batch$1 = batch,
  hooks = {
    useDispatch,
    useSelector,
    useStore
  },
  createSelector: createSelector2 = createSelector,
  unstable__sideEffectsInRender = false,
  ...rest
} = {}) => {
  return {
    name: reactHooksModuleName,
    init(api, {
      serializeQueryArgs
    }, context) {
      const anyApi = api;
      const {
        buildQueryHooks,
        buildMutationHook,
        usePrefetch
      } = buildHooks({
        api,
        moduleOptions: {
          batch: batch$1,
          hooks,
          unstable__sideEffectsInRender,
          createSelector: createSelector2
        },
        serializeQueryArgs,
        context
      });
      safeAssign(anyApi, {
        usePrefetch
      });
      safeAssign(context, {
        batch: batch$1
      });
      return {
        injectEndpoint(endpointName, definition) {
          if (isQueryDefinition(definition)) {
            const {
              useQuery,
              useLazyQuery,
              useLazyQuerySubscription,
              useQueryState,
              useQuerySubscription
            } = buildQueryHooks(endpointName);
            safeAssign(anyApi.endpoints[endpointName], {
              useQuery,
              useLazyQuery,
              useLazyQuerySubscription,
              useQueryState,
              useQuerySubscription
            });
            api[`use${capitalize(endpointName)}Query`] = useQuery;
            api[`useLazy${capitalize(endpointName)}Query`] = useLazyQuery;
          } else if (isMutationDefinition(definition)) {
            const useMutation = buildMutationHook(endpointName);
            safeAssign(anyApi.endpoints[endpointName], {
              useMutation
            });
            api[`use${capitalize(endpointName)}Mutation`] = useMutation;
          }
        }
      };
    }
  };
};
var createApi = /* @__PURE__ */ buildCreateApi(coreModule(), reactHooksModule());
let Dictionary$1 = class Dictionary {
  constructor(enumObj, t2, translationKey) {
    __publicField(this, "data");
    __publicField(this, "t");
    this.t = t2;
    this.data = Object.keys(enumObj).reduce(
      (acc, key) => {
        const value = enumObj[key];
        if (typeof value === "number" || typeof value === "string") {
          acc[value] = { id: value, title: t2(`${translationKey}.${key}`) };
        }
        return acc;
      },
      {}
    );
  }
  get(value) {
    return this.data[value] || { id: value, title: this.t("dictionary:unknown") };
  }
  getAll() {
    return Object.values(this.data);
  }
};
class AccessTypeDictionary extends Dictionary$1 {
  constructor() {
    super(AccessType$1, t, "ds:dictionary.accessType");
  }
}
class ModuleDictionary extends Dictionary$1 {
  constructor() {
    super(Module$1, t, "ds:dictionary.module");
  }
}
const dtoToNotification = (dto) => {
  var _a2;
  const moduleDictionary = new ModuleDictionary();
  const accessTypeDictionary = new AccessTypeDictionary();
  return {
    id: dto.Id,
    date: dto.Date,
    type: dto.NotificationType,
    title: dto.Name,
    imageUrl: dto.ImageUrl,
    source: moduleDictionary.get(dto.Source),
    actor: dto.Name,
    userId: dto.UserId,
    action: {
      title: dto.Payload.Title,
      subject: dto.Payload.Subject,
      accessType: accessTypeDictionary.get(dto.Payload.AccessType),
      subjectUrl: dto.Payload.SubjectUrl,
      status: dto.Payload.Status,
      dlpCheckStatus: dto.Payload.Status,
      externalLinkUrl: dto.Payload.ExternalLinkUrl,
      downloadUrl: dto.Payload.DownloadUrl || void 0,
      roleName: dto.Payload.RoleName,
      targetUserName: dto.Payload.TargetUserName,
      movedTo: dto.Payload.MoveTo,
      description: (_a2 = dto.Payload.Description) == null ? void 0 : _a2.replace(/<[^>]+>/g, "").trim(),
      // Remove tags from string
      project: dto.Payload.Project,
      customerName: dto.Payload.CustomerName,
      timeUntilStart: dto.Payload.TimeUntilStart ? timeToSeconds(dto.Payload.TimeUntilStart) : void 0,
      startsAt: dto.Payload.StartsAt
    },
    isRead: dto.State,
    isNew: false
  };
};
const notificationApi = createApi({
  reducerPath: "DCNotificationApi",
  baseQuery: createBaseQuery$1("/v1/notifications"),
  tagTypes: ["Notifications", "UnreadNotifications"],
  endpoints: (builder) => ({
    getNotifications: builder.query({
      query: ({ count = 10, offset: offset2 = 0, isAll = false } = { count: 10, offset: 0, isAll: false }) => ({
        method: "POST",
        url: "/",
        body: {
          FilterConditions: [],
          Count: count,
          Offset: offset2,
          IsAll: isAll
        }
      }),
      transformResponse: (response) => {
        return {
          notifications: response.Items.map((item) => dtoToNotification(item)),
          lastSeenAt: response.ReadDate,
          count: response.Items.length || 0,
          unreadCount: response.UnreadCount
        };
      },
      serializeQueryArgs: ({ endpointName }) => {
        return endpointName;
      },
      forceRefetch({ currentArg, previousArg }) {
        return currentArg !== previousArg;
      },
      merge: (cache2, result) => {
        const newNotifications = new Map(
          cache2.notifications.map((n2) => [n2.id, n2])
        );
        result.notifications.forEach((n2) => {
          newNotifications.set(n2.id, n2);
        });
        return {
          notifications: Array.from(newNotifications.values()),
          lastSeenAt: result.lastSeenAt,
          count: result.notifications.length,
          unreadCount: result.unreadCount
        };
      },
      providesTags: ["Notifications"]
      // providesTags: (result, ...args) => {
      //   console.log('PROVIDE TAGS', result, args);
      //   return result
      //     ? result.notifications.map((n) => ({ type: 'Notification', id: n.id }))
      //     : [{ type: 'Notification', id: 'LIST' }];
      // }
    }),
    getUnreadNotifications: builder.query({
      query: ({ count = 10, offset: offset2 = 0, isAll = false } = { count: 10, offset: 0, isAll: false }) => ({
        method: "POST",
        url: "/",
        body: {
          FilterConditions: [
            {
              Type: 20,
              NumValues: [0]
            }
          ],
          Count: count,
          Offset: offset2,
          IsAll: isAll
        }
      }),
      transformResponse: (response) => {
        return {
          notifications: response.Items.map((item) => dtoToNotification(item)),
          lastSeenAt: response.ReadDate,
          count: response.Items.length,
          unreadCount: response.UnreadCount
        };
      },
      serializeQueryArgs: ({ endpointName }) => {
        return endpointName;
      },
      forceRefetch({ currentArg, previousArg }) {
        return currentArg !== previousArg;
      },
      merge: (cache2, result) => {
        const newNotifications = new Map(
          cache2.notifications.map((n2) => [n2.id, n2])
        );
        result.notifications.forEach((n2) => {
          newNotifications.set(n2.id, n2);
        });
        return {
          notifications: Array.from(newNotifications.values()),
          lastSeenAt: result.lastSeenAt,
          count: result.notifications.length,
          unreadCount: result.unreadCount
        };
      },
      providesTags: ["UnreadNotifications"]
    }),
    markAsRead: builder.mutation({
      query: ({ id, value }) => ({
        url: `/mark`,
        method: "POST",
        body: { Id: id, State: value }
      }),
      async onQueryStarted({ id, value }, { dispatch, queryFulfilled, getState }) {
        const patchResult = dispatch(
          notificationApi.util.updateQueryData("getNotifications", {}, (draft) => {
            if (!id) {
              draft.notifications.forEach((n2) => {
                n2.isRead = NotificationState.Read;
              });
            }
            const targetNotification = draft.notifications.find((n2) => n2.id === id);
            if (targetNotification) {
              targetNotification.isRead = targetNotification.isRead ? NotificationState.Unread : NotificationState.Read;
            }
          })
        );
        const patchUnreadResult = dispatch(
          notificationApi.util.updateQueryData("getUnreadNotifications", {}, (draft) => {
            var _a2;
            if (!id) {
              draft.notifications = [];
              draft.unreadCount = 0;
            }
            const targetNotification = draft.notifications.find((n2) => n2.id === id);
            if (targetNotification) {
              draft.notifications = draft.notifications.filter((n2) => n2.id !== id);
              draft.unreadCount -= 1;
            } else if (value === NotificationState.Unread) {
              const allSelector = notificationApi.endpoints.getNotifications.select({});
              const allCache = allSelector(getState());
              const newNotification = (_a2 = allCache.data) == null ? void 0 : _a2.notifications.find((n2) => n2.id === id);
              if (newNotification) {
                draft.notifications.push(newNotification);
                draft.unreadCount += 1;
              }
            }
          })
        );
        try {
          await queryFulfilled;
        } catch (err) {
          patchResult.undo();
          patchUnreadResult.undo();
        }
      }
    }),
    markAsSeen: builder.mutation({
      query: () => ({
        url: "/setreaddate",
        method: "POST",
        body: { Date: (/* @__PURE__ */ new Date()).toISOString() }
      })
      // invalidatesTags: ['Notifications', 'UnreadNotifications']
    })
  })
});
const {
  useGetNotificationsQuery,
  useGetUnreadNotificationsQuery,
  useMarkAsReadMutation,
  useMarkAsSeenMutation
} = notificationApi;
const useNotificationsPolling = ({ interval = 1e4 } = { interval: 1e4 }) => {
  const [pollingInterval, setPollingInterval] = reactExports.useState(interval);
  const [haveNew, setHaveNew] = reactExports.useState(false);
  const { data: { notifications: notifications2 = [], lastSeenAt = "" } = {}, isLoading } = useGetNotificationsQuery(
    {
      count: 20
    },
    {
      pollingInterval
    }
  );
  reactExports.useEffect(() => {
    const newNotificationExists = notifications2.some(
      (notification) => new Date(notification.date) > new Date(lastSeenAt)
    );
    setHaveNew(newNotificationExists);
    setPollingInterval(!newNotificationExists ? interval : 0);
    if (newNotificationExists) {
      const newNotifications = notifications2.filter(
        (notification) => new Date(notification.date) > new Date(lastSeenAt)
      );
      dispatchNewNotificationsEvent(newNotifications);
    }
  }, [notifications2, lastSeenAt]);
  return { notifications: notifications2, haveNew, isLoading };
};
const useGroupedNotifications = (notifications2, lastSeenAt = Date.now().toString()) => {
  const { t: t2 } = useTranslation();
  const byDateDescending = (a, b) => new Date(b.date).getTime() - new Date(a.date).getTime();
  const groupedNotifications = reactExports.useMemo(() => {
    const newNotifications = notifications2.filter((notification) => new Date(notification.date) > new Date(lastSeenAt)).sort(byDateDescending);
    const oldNotifications = notifications2.filter((notification) => new Date(notification.date) <= new Date(lastSeenAt)).sort(byDateDescending);
    return [
      {
        id: 1,
        title: t2("ds:notifications.modal.groups.new"),
        items: newNotifications
      },
      {
        id: 2,
        title: t2("ds:notifications.modal.groups.older"),
        items: oldNotifications
      }
    ];
  }, [notifications2, lastSeenAt, t2]);
  return groupedNotifications;
};
const ReadIndicator = ({ hovered, notification }) => {
  const CheckboxIcon = ({ ...others }) => /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { ...others, size: 8 });
  const [markAsRead] = useMarkAsReadMutation();
  const onChangeHandler = (event) => {
    markAsRead({
      id: notification.id,
      value: !event.target.checked ? NotificationState.Read : NotificationState.Unread
    });
  };
  const isRead = reactExports.useMemo(() => notification.isRead, [notification.isRead]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Checkbox,
    {
      checked: !isRead,
      onChange: onChangeHandler,
      onClick: (event) => event.stopPropagation(),
      radius: "xl",
      size: "xs",
      icon: CheckboxIcon,
      iconColor: hovered ? "white" : "blue.4",
      color: hovered ? "blue.5" : "blue.4",
      styles: (theme2) => ({
        input: {
          borderColor: hovered ? theme2.colors.grey[5] : theme2.colors.grey[3]
        }
      })
    }
  );
};
const TitledList = ({ title: title2, children, ...props }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { ...props, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { style: { fontSize: "10px" }, ml: "sm", c: "secondary", tt: "uppercase", children: title2 }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(List, { listStyleType: "none", children })
  ] });
};
TitledList.Item = List.Item;
const NotificationsList = ({
  notifications: notifications2,
  lastSeenAt,
  avatarSlot,
  ...others
}) => {
  const groups = useGroupedNotifications(notifications2, lastSeenAt);
  const [markAsRead] = useMarkAsReadMutation();
  const handleOnClick = (notification) => {
    if (notification.isRead === NotificationState.Unread) {
      markAsRead({
        id: notification.id,
        value: NotificationState.Read
      });
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { gap: "sm", ...others, children: groups.map(
    (group) => group.items.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(TitledList, { title: group.title, maw: "900px", children: group.items.map((notification) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      NotificationItem,
      {
        notification,
        avatarSlot,
        indicatorSlot: ReadIndicator,
        onClick: handleOnClick
      }
    ) }, notification.id)) }, group.id) : null
  ) });
};
const MarkAllAsReadButton = () => {
  const { t: t2 } = useTranslation(["ds"]);
  const [markAsRead] = useMarkAsReadMutation();
  const onReadAllHandler = () => {
    markAsRead({ id: null, value: NotificationState.Read });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Button,
    {
      variant: "subtle",
      size: "xs",
      fw: 400,
      leftSection: /* @__PURE__ */ jsxRuntimeExports.jsx(IconChecks, { size: 14 }),
      onClick: onReadAllHandler,
      children: t2("notifications.modal.allAsReadButton")
    }
  );
};
const root$1 = "_root_16nkv_1";
const list = "_list_16nkv_7";
const tab = "_tab_16nkv_12";
const header = "_header_16nkv_26";
const headerDark = "_headerDark_16nkv_30";
const shrink = "_shrink_16nkv_35";
const classes = {
  root: root$1,
  list,
  tab,
  header,
  headerDark,
  shrink
};
function InfiniteScroll({
  children,
  isLoading = false,
  height = 500,
  threshold = 250,
  disabled = false,
  onLoadMore
}) {
  const containerRef = reactExports.useRef(null);
  const handleScroll = reactExports.useCallback(
    ({ y }) => {
      var _a2;
      const viewport2 = (_a2 = containerRef.current) == null ? void 0 : _a2.querySelector(".mantine-ScrollArea-viewport");
      if (!(viewport2 == null ? void 0 : viewport2.clientHeight) || !(viewport2 == null ? void 0 : viewport2.scrollHeight)) return;
      const hasReachedThreshold = y + viewport2.clientHeight + threshold >= viewport2.scrollHeight;
      if (hasReachedThreshold && onLoadMore && !isLoading && !disabled) {
        onLoadMore();
      }
    },
    [threshold, onLoadMore, isLoading, disabled]
  );
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { ref: containerRef, h: height, scrollbars: "y", onScrollPositionChange: handleScroll, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { gap: "md", children: [
    children,
    isLoading && !disabled && /* @__PURE__ */ jsxRuntimeExports.jsx(Center, { py: "md", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, { size: "sm" }) })
  ] }) });
}
function useNotificationsLoader({ initialCount = 10 }) {
  const [offset2, setOffset] = reactExports.useState(0);
  const [count] = reactExports.useState(initialCount);
  const [hasMore, setHasMore] = reactExports.useState(true);
  const { data, isFetching, isLoading } = useGetNotificationsQuery({
    count,
    offset: offset2
  });
  reactExports.useEffect(() => {
    if (!(data == null ? void 0 : data.count) || data.count < count) {
      setHasMore(false);
    }
  }, [data == null ? void 0 : data.notifications, count]);
  const loadMore = () => {
    if (!isFetching && !isLoading && hasMore) {
      setOffset((prev) => prev + count);
    }
  };
  return {
    loadMore,
    isLoading: isFetching || isLoading,
    notifications: (data == null ? void 0 : data.notifications) ?? [],
    hasMore,
    lastSeenAt: (data == null ? void 0 : data.lastSeenAt) ?? ""
  };
}
function useUnreadNotificationsLoader({ initialCount = 10 }) {
  const [offset2, setOffset] = reactExports.useState(0);
  const [count] = reactExports.useState(initialCount);
  const [hasMore, setHasMore] = reactExports.useState(true);
  const { data, isFetching, isLoading, refetch } = useGetUnreadNotificationsQuery(
    {
      count,
      offset: offset2
    },
    {
      refetchOnMountOrArgChange: true
    }
  );
  const unreadCountFormatted = ((data == null ? void 0 : data.unreadCount) || 0) > 999 ? "999+" : data == null ? void 0 : data.unreadCount;
  reactExports.useEffect(() => {
    if (!(data == null ? void 0 : data.count) || data.count < count) {
      setHasMore(false);
    }
  }, [data == null ? void 0 : data.notifications, count]);
  const loadMore = () => {
    if (!isFetching && !isLoading && hasMore) {
      setOffset((prev) => prev + count);
    }
  };
  return {
    loadMore,
    isLoading: isFetching || isLoading,
    hasMore,
    refetch,
    notifications: (data == null ? void 0 : data.notifications) ?? [],
    lastSeenAt: (data == null ? void 0 : data.lastSeenAt) ?? "",
    unreadCount: unreadCountFormatted
  };
}
const bellEmptyState = "data:image/svg+xml,%3csvg%20width='126'%20height='114'%20viewBox='0%200%20126%20114'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M84.885%2041.6769C75.9426%2041.6769%2066.8399%2041.3136%2058.3249%2038.9418C49.9701%2036.6234%2042.2991%2032.1255%2035.4615%2026.9225C30.9849%2023.5357%2026.9144%2020.8434%2021.1024%2021.2493C15.4153%2021.5518%209.97646%2023.6757%205.5894%2027.3071C-1.80382%2033.7815%20-0.692703%2045.7688%202.26672%2054.177C6.71121%2066.8587%2020.237%2075.6836%2031.7328%2081.4101C45.0128%2088.0448%2059.607%2091.891%2074.2332%2094.1132C87.0538%2096.0577%20103.528%2097.4786%20114.639%2089.1025C124.843%2081.4101%20127.642%2063.8459%20125.142%2051.9868C124.536%2048.4802%20122.67%2045.3155%20119.896%2043.0871C112.727%2037.8521%20102.033%2041.3457%2093.9769%2041.5273C90.9854%2041.5914%2087.9406%2041.6555%2084.885%2041.6769Z'%20fill='%23F3F6FA'/%3e%3cpath%20d='M63.004%20111.502C84.6649%20111.502%20102.224%20110.406%20102.224%20109.055C102.224%20107.704%2084.6649%20106.609%2063.004%20106.609C41.3432%20106.609%2023.7836%20107.704%2023.7836%20109.055C23.7836%20110.406%2041.3432%20111.502%2063.004%20111.502Z'%20fill='%23F3F6FA'/%3e%3cpath%20d='M111.946%2014.8919C112.525%2014.8919%20112.993%2014.4231%20112.993%2013.8449C112.993%2013.2666%20112.525%2012.7979%20111.946%2012.7979C111.368%2012.7979%20110.899%2013.2666%20110.899%2013.8449C110.899%2014.4231%20111.368%2014.8919%20111.946%2014.8919Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M42.2992%206.12162C42.8774%206.12162%2043.3462%205.65286%2043.3462%205.07461C43.3462%204.49636%2042.8774%204.02759%2042.2992%204.02759C41.7209%204.02759%2041.2521%204.49636%2041.2521%205.07461C41.2521%205.65286%2041.7209%206.12162%2042.2992%206.12162Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M84.5803%2037.3028C85.1586%2037.3028%2085.6274%2036.834%2085.6274%2036.2558C85.6274%2035.6775%2085.1586%2035.2087%2084.5803%2035.2087C84.0021%2035.2087%2083.5333%2035.6775%2083.5333%2036.2558C83.5333%2036.834%2084.0021%2037.3028%2084.5803%2037.3028Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M82.7137%20102.169C83.2919%20102.169%2083.7607%20101.701%2083.7607%20101.122C83.7607%20100.544%2083.2919%20100.075%2082.7137%20100.075C82.1354%20100.075%2081.6667%20100.544%2081.6667%20101.122C81.6667%20101.701%2082.1354%20102.169%2082.7137%20102.169Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M82.9076%201.14111V5.73517'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M80.6112%203.43896H85.2053'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.97446%2012.342V16.9361'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.66666%2014.6372H9.2714'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.519%2084.4858V89.0906'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9.21118%2086.7837H13.8159'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M111.963%2030.542V35.1361'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M109.667%2032.8398H114.261'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M54.3083%2023.6459C54.3083%2021.2668%2055.2486%2018.9852%2056.9224%2017.3029C58.5962%2015.6206%2060.8663%2014.6755%2063.2333%2014.6755C65.6004%2014.6755%2067.8705%2015.6206%2069.5443%2017.3029C71.218%2018.9852%2072.1583%2021.2668%2072.1583%2023.6459C77.2831%2026.0815%2081.6519%2029.8728%2084.7964%2034.6135C87.9408%2039.3543%2089.7425%2044.8657%2090.0083%2050.557V64.0126C90.3442%2066.801%2091.3267%2069.4713%2092.8769%2071.8084C94.4271%2074.1455%2096.5015%2076.0841%2098.9333%2077.4681H27.5333C29.9651%2076.0841%2032.0396%2074.1455%2033.5898%2071.8084C35.1399%2069.4713%2036.1225%2066.801%2036.4583%2064.0126V50.557C36.7241%2044.8657%2038.5258%2039.3543%2041.6703%2034.6135C44.8148%2029.8728%2049.1835%2026.0815%2054.3083%2023.6459Z'%20fill='white'/%3e%3cpath%20d='M49.8458%2077.4681V81.9533C49.8458%2085.522%2051.2563%2088.9444%2053.7669%2091.4678C56.2776%2093.9912%2059.6827%2095.4089%2063.2333%2095.4089C66.7839%2095.4089%2070.1891%2093.9912%2072.6997%2091.4678C75.2104%2088.9444%2076.6208%2085.522%2076.6208%2081.9533V77.4681'%20fill='white'/%3e%3cpath%20d='M49.8458%2077.4681V81.9533C49.8458%2085.522%2051.2563%2088.9444%2053.7669%2091.4678C56.2776%2093.9912%2059.6827%2095.4089%2063.2333%2095.4089C66.7839%2095.4089%2070.1891%2093.9912%2072.6997%2091.4678C75.2104%2088.9444%2076.6208%2085.522%2076.6208%2081.9533V77.4681M54.3083%2023.6459C54.3083%2021.2668%2055.2486%2018.9852%2056.9224%2017.3029C58.5962%2015.6206%2060.8663%2014.6755%2063.2333%2014.6755C65.6004%2014.6755%2067.8705%2015.6206%2069.5443%2017.3029C71.218%2018.9852%2072.1583%2021.2668%2072.1583%2023.6459C77.2831%2026.0815%2081.6519%2029.8728%2084.7964%2034.6135C87.9408%2039.3543%2089.7425%2044.8657%2090.0083%2050.557V64.0126C90.3442%2066.801%2091.3267%2069.4713%2092.8769%2071.8084C94.4271%2074.1455%2096.5015%2076.0841%2098.9333%2077.4681H27.5333C29.9651%2076.0841%2032.0396%2074.1455%2033.5898%2071.8084C35.1399%2069.4713%2036.1225%2066.801%2036.4583%2064.0126V50.557C36.7241%2044.8657%2038.5258%2039.3543%2041.6703%2034.6135C44.8148%2029.8728%2049.1835%2026.0815%2054.3083%2023.6459Z'%20stroke='%23C9D3E0'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M56%2031.9421C48.3%2033.3421%2041.86%2045.8488%2042.2333%2058.5421M82.3667%2046.1755C84.2334%2051.5421%2084.2334%2053.6421%2084.2334%2058.5421M48.7667%2046.1755C46.9%2051.5421%2046.9%2053.6421%2046.9%2058.5421'%20stroke='%23C9D3E0'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e";
const NotificationModalEmpty = ({ title: title2, description }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "center", align: "center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { gap: "md", justify: "center", align: "center", w: "350", children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Image, { src: bellEmptyState, alt: "Bell", w: "126" }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { justify: "center", align: "center", gap: 0, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "primary", size: "lg", fw: 500, children: title2 }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "secondary", size: "sm", ta: "center", children: description })
    ] })
  ] }) });
};
const IconLink = ({ url, children, tooltip }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: url, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { disabled: !tooltip, label: tooltip, position: "bottom", withArrow: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActionIcon, { size: "lg", variant: "subtle", c: "grey.6", children }) }) });
};
const dtoToSettings = (dto) => {
  const availableModules = dto.ModuleSettings.ModuleUrls.filter((item) => item.HasAccess);
  return {
    userId: dto.UserId,
    modules: availableModules.reduce(
      (acc, item) => {
        acc[Module$1[item.Name]] = {
          url: item.Url
        };
        return acc;
      },
      {}
    )
  };
};
const settingsApi = createApi({
  reducerPath: "DCSettingsApi",
  baseQuery: createBaseQuery$1("/v1"),
  tagTypes: ["Settings", "User"],
  endpoints: (builder) => ({
    getSettings: builder.query({
      query: () => {
        return {
          method: HttpMethod.GET,
          url: `/settings`
        };
      },
      transformResponse: (response) => {
        return dtoToSettings(response);
      },
      providesTags: ["Settings"]
    })
  })
});
const { useGetSettingsQuery } = settingsApi;
const useGetModules = () => {
  const { data, isLoading } = useGetSettingsQuery();
  return {
    modules: (data == null ? void 0 : data.modules) || null,
    isLoading
  };
};
const useGetModule = (module2) => {
  var _a2;
  const { data, isLoading } = useGetSettingsQuery();
  return {
    module: ((_a2 = data == null ? void 0 : data.modules) == null ? void 0 : _a2[module2]) || null,
    isLoading
  };
};
const dtoToUser = (dto) => {
  return {
    id: dto.Id,
    fullName: `${dto.Surname} ${dto.FirstName} ${dto.MiddleName}`.trim(),
    firstName: dto.FirstName,
    lastName: dto.Surname,
    middleName: dto.MiddleName,
    email: dto.Email,
    avatarUrl: dto.Avatar,
    organization: {
      id: dto.Customer.Id,
      title: dto.Customer.Title
    }
  };
};
const userApi$1 = createApi({
  reducerPath: "DCUserApi",
  baseQuery: createBaseQuery$1("/v1"),
  tagTypes: ["User"],
  endpoints: (builder) => ({
    getCurrentUser: builder.query({
      query: () => {
        return {
          method: HttpMethod.GET,
          url: `/user`
        };
      },
      transformResponse: (response) => dtoToUser(response),
      providesTags: ["User"]
    })
  })
});
const { useGetCurrentUserQuery } = userApi$1;
const useGetCurrentUser = () => {
  const { data } = useGetCurrentUserQuery();
  return data ?? {};
};
const useUrls = () => {
  const { module: module2 } = useGetModule(Module$1.Admin);
  const { id } = useGetCurrentUser();
  return {
    settingsUrl: `${module2 == null ? void 0 : module2.url}/profile/${id}/notification-settings`,
    archiveUrl: `${module2 == null ? void 0 : module2.url}/profile/${id}/notifications`
  };
};
const userAvatarPlaceholder = "data:image/svg+xml,%3csvg%20width='18'%20height='22'%20viewBox='0%200%2018%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.98198%200.544189C5.59973%200.544189%202.85786%203.21918%202.85786%206.51896C2.85786%209.81867%205.59973%2012.4937%208.98198%2012.4937C12.3642%2012.4937%2015.1061%209.81867%2015.1061%206.51896C15.1061%203.21918%2012.3642%200.544189%208.98198%200.544189ZM16.808%2015.4772C17.9682%2016.2061%2017.9116%2017.795%2016.855%2018.6609C14.7261%2020.4052%2011.9801%2021.4559%208.98229%2021.4559C6.00442%2021.4559%203.27467%2020.4191%201.15175%2018.6952C0.0857694%2017.8296%200.0292887%2016.2327%201.19454%2015.499C1.55729%2015.2706%201.95233%2015.0705%202.38106%2014.8981C4.10603%2014.2043%206.30925%2013.9874%208.98213%2013.9874C11.6685%2013.9874%2013.8842%2014.1904%2015.6137%2014.8768C16.0457%2015.0482%2016.4435%2015.2482%2016.808%2015.4772Z'%20fill='white'/%3e%3c/svg%3e";
function getDeterministicElement(key, array) {
  if (!key || array.length === 0) return array[0];
  let hash = 0;
  for (let i = 0; i < key.length; i++) {
    hash = key.charCodeAt(i) + ((hash << 5) - hash);
  }
  const index = Math.abs(hash) % array.length;
  return array[index];
}
function extractInitials(input) {
  if (!(input == null ? void 0 : input.trim())) return null;
  const parts = input.trim().split(/\s+/);
  const initials = parts.slice(0, 2).map((p) => {
    var _a2;
    return (_a2 = p[0]) == null ? void 0 : _a2.toUpperCase();
  }).filter(Boolean).join("");
  return initials || null;
}
const Colors = [
  "#FFA94D",
  "#FFD43B",
  "#A9E34B",
  "#69DB7C",
  "#38D9A9",
  "#3BC9DB",
  "#4DABF7",
  "#748FFC",
  "#9775FA",
  "#DA77F2",
  "#F783AC",
  "#FF8787"
];
function useAvatarData(user, fallbackTitle) {
  return reactExports.useMemo(() => {
    const idKey = String(user == null ? void 0 : user.id) || fallbackTitle || "";
    const color = !(user == null ? void 0 : user.id) && !fallbackTitle ? "var(--mantine-color-gray-4)" : getDeterministicElement(idKey, Colors);
    const initials = (user == null ? void 0 : user.id) && getInitials(user) || extractInitials(fallbackTitle);
    return {
      color,
      initials
    };
  }, [user, fallbackTitle]);
}
function getInitials({ fullName, firstName, middleName, lastName, email }) {
  const f2 = lastName == null ? void 0 : lastName[0];
  const i = firstName == null ? void 0 : firstName[0];
  const o = middleName == null ? void 0 : middleName[0];
  if (lastName && firstName) return `${f2}${i}`.toUpperCase();
  if (fullName) {
    return extractInitials(fullName);
  }
  if (firstName && middleName) return `${i}`.toUpperCase();
  if (lastName && middleName) return `${f2}`.toUpperCase();
  if (middleName) return `${o}`.toUpperCase();
  if (email) return email[0].toUpperCase();
  return null;
}
const UserAvatar$1 = reactExports.forwardRef(
  ({ user, fallbackSrc, fallback, avatarProps, ...props }, ref) => {
    const { color, initials } = useAvatarData(user, fallback);
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      Avatar,
      {
        src: (user == null ? void 0 : user.avatarUrl) || fallbackSrc,
        radius: 60,
        tt: "uppercase",
        color,
        styles: {
          placeholder: {
            color: "white",
            backgroundColor: color,
            fontWeight: 500
          }
        },
        ref,
        ...props,
        ...avatarProps,
        children: initials || /* @__PURE__ */ jsxRuntimeExports.jsx(
          Image,
          {
            src: userAvatarPlaceholder,
            alt: "User avatar placeholder",
            w: "60%",
            h: "60%",
            fit: "contain"
          }
        )
      }
    );
  }
);
const dtoToContact = (dto) => {
  return {
    id: dto.Id,
    contactId: dto.Contact.Id,
    userId: dto.Contact.UserId,
    fullName: dto.Contact.FullName,
    firstName: dto.Contact.FirstName,
    lastName: dto.Contact.Surname,
    middleName: dto.Contact.MiddleName,
    email: dto.Contact.Email,
    position: dto.Contact.Position,
    organization: dto.Contact.Company,
    isFavourite: dto.IsFavorite,
    haveAvatar: dto.Contact.HasAvatar,
    isPersonal: dto.IsPersonal
  };
};
const contactToDto = (contact) => {
  return {
    Id: contact.id,
    IsFavorite: contact.isFavourite,
    IsPersonal: contact.isPersonal,
    Contact: {
      Id: contact.contactId,
      FullName: contact.fullName,
      FirstName: contact.firstName,
      Email: contact.email,
      Position: contact.position,
      Company: contact.organization,
      HasAvatar: contact.haveAvatar || false
    }
  };
};
const contactApi = createApi({
  reducerPath: "DCContactApi",
  baseQuery: createBaseQuery$1("/v1"),
  tagTypes: ["Contacts"],
  endpoints: (builder) => ({
    getContact: builder.query({
      query: ({ name: name2, phone, email, contactId }) => {
        return {
          method: "POST",
          url: `/addressbook/Links`,
          body: {
            ContactIds: contactId ? [contactId] : [],
            Like: name2,
            Email: email,
            Phone: phone
          }
        };
      },
      transformResponse: (response, _, { id }) => {
        var _a2;
        if (id) {
          const contact = response.Items.find((item) => item.Contact.UserId === id);
          if (contact) {
            return dtoToContact(contact);
          }
        }
        return ((_a2 = response == null ? void 0 : response.Items) == null ? void 0 : _a2[0]) ? dtoToContact(response.Items[0]) : null;
      },
      providesTags: ["Contacts"]
    }),
    addContact: builder.mutation({
      query: (contact) => {
        return {
          method: "POST",
          url: `/addressbook/SaveLink`,
          body: contactToDto(contact)
        };
      },
      invalidatesTags: ["Contacts"]
    }),
    addToFavourite: builder.mutation({
      query: ({ id }) => {
        return {
          method: "POST",
          url: `/Favorites/Add`,
          body: {
            EntityIds: [id],
            Type: 15
          }
        };
      },
      invalidatesTags: ["Contacts"]
    }),
    removeFromFavourite: builder.mutation({
      query: ({ id }) => {
        return {
          method: "POST",
          url: `/Favorites/Delete`,
          body: {
            EntityIds: [id],
            Type: 15
          }
        };
      },
      invalidatesTags: ["Contacts"]
    })
  })
});
const {
  useGetContactQuery,
  useAddContactMutation,
  useAddToFavouriteMutation,
  useRemoveFromFavouriteMutation
} = contactApi;
const s$1 = [
  "#FFA94D",
  "#FFD43B",
  "#A9E34B",
  "#69DB7C",
  "#38D9A9",
  "#3BC9DB",
  "#4DABF7",
  "#748FFC",
  "#9775FA",
  "#DA77F2",
  "#F783AC",
  "#FF8787"
], f = (e) => {
  if (typeof e != "string")
    throw new Error("Input must be a string");
  const n2 = (r2) => r2.trim() === "" ? 0 : Array.from(r2).reduce(
    (t2, o) => t2 + o.charCodeAt(0),
    0
  ) % s$1.length;
  return (() => {
    try {
      const r2 = n2(e);
      return s$1[r2];
    } catch (r2) {
      return console.error("Error generating color:", r2), "#FFFFFF";
    }
  })();
};
const useGetUserFromContact = (contact) => {
  if (!contact || !contact.userId) return null;
  return {
    id: contact.userId,
    fullName: contact.fullName || "",
    firstName: contact.firstName || "",
    lastName: contact.lastName || "",
    middleName: contact.middleName || "",
    email: contact.email || "",
    avatarUrl: contact.haveAvatar ? `/api/v2/profile/getAvatar?&id=${contact.contactId}&type=Contact` : ""
  };
};
const ContactCard = ({ contact, fallbackSrc, actions: actions2 }) => {
  var _a2, _b;
  const user = useGetUserFromContact(contact);
  const AvatarColorById = f(
    ((_a2 = contact == null ? void 0 : contact.userId) == null ? void 0 : _a2.toString()) || ((_b = contact == null ? void 0 : contact.contactId) == null ? void 0 : _b.toString()) || ""
  );
  const textQueue = reactExports.useMemo(() => {
    return [contact.fullName, contact.position, contact.email].filter(Boolean);
  }, [contact]);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { gap: 0, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { gap: 10, align: "stretch", wrap: "nowrap", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        UserAvatar$1,
        {
          user,
          fallbackSrc,
          avatarProps: { size: 48, color: AvatarColorById }
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { gap: 0, w: "100%", justify: "center", children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "lg", c: "primary", truncate: true, w: 290, children: textQueue.length ? textQueue[0] : contact.phone }),
        textQueue[1] && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "sm", c: "secondary", truncate: true, w: 290, children: textQueue[1] })
      ] })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { gap: 0, ml: 58, children: [
      textQueue[2] && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "sm", c: "primary", mt: 4, truncate: true, w: 290, children: textQueue[2] }),
      !!actions2 && /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mt: "sm", children: actions2 })
    ] })
  ] });
};
const AddContactButton = ({ baseUrl, contact }) => {
  const [addToContacts] = useAddContactMutation();
  const icon = reactExports.useMemo(() => {
    if (!contact.id) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(IconUserPlus, { stroke: 1.2, size: 18 });
    }
    if (contact.organization) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBuildingSkyscraper, { stroke: 1.2, size: 18 });
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(IconUsers, { stroke: 1.4, size: 18 });
  }, [contact, contact == null ? void 0 : contact.isPersonal]);
  const onClickHandler = () => {
    const contactsUrl = baseUrl;
    if (contact == null ? void 0 : contact.id) {
      window.open(`${contactsUrl}/contact/${contact.id}/`, "_blank");
    } else {
      addToContacts(contact);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Button,
    {
      size: "compact-md",
      radius: "sm",
      variant: "light",
      color: "accent",
      leftSection: icon,
      fw: 400,
      onClick: onClickHandler,
      disabled: !contact.id && !contact.email,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "xs", children: contact.id ? contact.organization ? t("ds:contact.card.actions.addToContacts.organization") : t("ds:contact.card.actions.addToContacts.inContacts") : t("ds:contact.card.actions.addToContacts.add") })
    }
  );
};
const CreateEventButton = ({ baseUrl, email }) => {
  const handleOnClick = () => {
    const calendarUrl = baseUrl;
    const formattedDate = dayjs().format("YYYY-MM-DD");
    window.open(`${calendarUrl}/event/new/${formattedDate}/?add=${email}`, "_blank");
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ActionIcon, { size: 30, variant: "light", color: "accent", onClick: handleOnClick, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconCalendarEvent, { stroke: 1.2, size: 22 }) });
};
const CreateNewMailButton = ({ baseUrl, email, name: name2 }) => {
  const handleOnClick = () => {
    const mailUrl = baseUrl;
    const receiver = name2 ? `${name2}<${email}>` : email;
    window.open(`${mailUrl}/inbox?to=${receiver}`, "_blank");
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ActionIcon, { size: 30, variant: "light", color: "accent", onClick: handleOnClick, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconMail, { stroke: 1.2, size: 22 }) });
};
const FavouriteIndicator = ({ contact }) => {
  const [value, setValue] = reactExports.useState(contact.isFavourite);
  const [add2] = useAddToFavouriteMutation();
  const [remove] = useRemoveFromFavouriteMutation();
  const handleOnClick = () => {
    setValue((prev) => !prev);
    if (value) {
      remove({ id: contact.contactId });
    } else {
      add2({ id: contact.contactId });
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    ActionIcon,
    {
      size: 30,
      variant: "subtle",
      color: value ? "yellow.4" : "gray.6",
      onClick: handleOnClick,
      children: value ? /* @__PURE__ */ jsxRuntimeExports.jsx(IconStarFilled, { size: 22 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(IconStar, { stroke: 1.2, size: 22 })
    }
  );
};
const ContactCardActions = ({ contact }) => {
  const { modules: modules2 } = useGetModules();
  if (!modules2) {
    return null;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { justify: "space-between", children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { gap: "xs", children: [
      contact.email && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        modules2[Module$1.Mail] && /* @__PURE__ */ jsxRuntimeExports.jsx(
          CreateNewMailButton,
          {
            baseUrl: modules2[Module$1.Mail].url,
            email: contact.email,
            name: contact.fullName
          }
        ),
        modules2[Module$1.Calendar] && /* @__PURE__ */ jsxRuntimeExports.jsx(CreateEventButton, { baseUrl: modules2[Module$1.Calendar].url, email: contact.email })
      ] }),
      modules2[Module$1.Contacts] && /* @__PURE__ */ jsxRuntimeExports.jsx(AddContactButton, { baseUrl: modules2[Module$1.Contacts].url, contact })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(FavouriteIndicator, { contact })
  ] });
};
const ContactCardWidget = ({
  id,
  contactId,
  name: name2,
  email,
  phone,
  fallbackSrc,
  nameFallback,
  actions: actions2
}) => {
  const { data: contact, isLoading } = useGetContactQuery({
    id,
    contactId,
    name: name2,
    email,
    phone
  });
  const { module: module2, isLoading: isSettingsLoading } = useGetModule(Module$1.Contacts);
  if (isLoading || isSettingsLoading) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "center", align: "center", h: 100, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, { size: "sm", color: "gray.5" }) }) });
  }
  if (!contact) {
    const emptyContact = {
      fullName: name2 || nameFallback,
      email,
      phone
    };
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      ContactCard,
      {
        contact: emptyContact,
        fallbackSrc,
        actions: emptyContact.email && (module2 == null ? void 0 : module2.url) && /* @__PURE__ */ jsxRuntimeExports.jsx(AddContactButton, { baseUrl: module2.url, contact: emptyContact })
      }
    );
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    ContactCard,
    {
      fallbackSrc,
      contact,
      actions: actions2 ? actions2({ contact }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ContactCardActions, { contact })
    }
  ) });
};
const ContactHoverCardWidget = ({
  children,
  actions: actions2,
  hoverCardProps = {},
  fallbackSrc,
  nameFallback,
  ...searchParams
}) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(HoverCard, { openDelay: 700, radius: "md", shadow: "lg", width: 380, trapFocus: true, ...hoverCardProps, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(HoverCard.Target, { children }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      HoverCard.Dropdown,
      {
        p: "sm",
        onMouseDown: (e) => {
          e.stopPropagation();
        },
        onClick: (e) => {
          e.stopPropagation();
          e.preventDefault();
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          ContactCardWidget,
          {
            ...searchParams,
            actions: actions2,
            fallbackSrc,
            nameFallback
          }
        )
      }
    )
  ] });
};
const AvatarCardWidget = ({ notification, ...other }) => {
  const user = reactExports.useMemo(() => {
    if (!notification.userId) return null;
    return {
      id: notification.userId,
      fullName: notification.actor,
      avatarUrl: notification.imageUrl || ""
    };
  }, [notification]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Box,
    {
      onClick: (e) => {
        e.stopPropagation();
        e.preventDefault();
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(ContactHoverCardWidget, { id: notification.userId, name: notification.actor, children: /* @__PURE__ */ jsxRuntimeExports.jsx(UserAvatar$1, { user, avatarProps: { size: 30, ...other } }) })
    }
  );
};
const NotificationModalWidget = () => {
  var _a2;
  const { t: t2 } = useTranslation(["ds"]);
  const [activeTab, setActiveTab] = reactExports.useState("all");
  const { loadMore, isLoading, notifications: notifications2, hasMore, lastSeenAt } = useNotificationsLoader({
    initialCount: 20
  });
  const { settingsUrl, archiveUrl } = useUrls();
  const {
    loadMore: loadMoreUnread,
    isLoading: isLoadingUnread,
    notifications: notificationsUnread,
    hasMore: hasMoreUnread,
    lastSeenAt: lastSeenAtUnread,
    refetch: refetchUnreadNotifications,
    unreadCount
  } = useUnreadNotificationsLoader({
    initialCount: 20
  });
  const { data: user, isLoading: isUserLoading } = useGetCurrentUserQuery();
  const serviceName = (_a2 = user == null ? void 0 : user.organization) == null ? void 0 : _a2.title;
  reactExports.useEffect(() => {
    if (activeTab === "unread") {
      refetchUnreadNotifications();
    }
  }, [activeTab, refetchUnreadNotifications]);
  const isNotReadEmpty = !notificationsUnread.length;
  const isEmpty = !notifications2.length;
  const isCurrentTabEmpty = activeTab === "all" ? isEmpty : isNotReadEmpty;
  const { colorScheme } = useMantineColorScheme();
  const isDark = colorScheme === "dark";
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { h: "100%", gap: 0, style: { overflow: "hidden" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { justify: "space-between", px: "sm", mt: "sm", mb: "xs", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "primary", fw: 500, children: t2("notifications.modal.title") }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { gap: "0", children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(IconLink, { url: archiveUrl, tooltip: t2("notifications.modal.archiveButton"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconArchive, { size: 18, stroke: 1 }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(IconLink, { url: settingsUrl, tooltip: t2("notifications.modal.settingsButton"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSettings, { size: 18, stroke: 1 }) })
      ] })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs, { value: activeTab, onChange: setActiveTab, classNames: classes, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { gap: 0, h: "100%", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs(
        Group,
        {
          justify: "space-between",
          wrap: "nowrap",
          gap: 0,
          px: "sm",
          className: isDark ? classes.headerDark : classes.header,
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(Tabs.List, { style: { flexWrap: "nowrap" }, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs.Tab, { value: "all", children: t2("notifications.modal.tabs.all") }),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(Tabs.Tab, { value: "unread", disabled: isEmpty, children: [
                t2("notifications.modal.tabs.unread"),
                " ",
                unreadCount || ""
              ] })
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(MarkAllAsReadButton, {})
          ]
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsxs(
        Stack,
        {
          gap: 0,
          h: "100%",
          style: { justifyContent: isCurrentTabEmpty ? "center" : "flex-start" },
          className: classes.shrink,
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs.Panel, { value: "all", className: classes.shrink, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              InfiniteScroll,
              {
                height: "100%",
                onLoadMore: loadMore,
                isLoading: isLoading || isUserLoading,
                disabled: !hasMore || isEmpty,
                children: isEmpty ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                  NotificationModalEmpty,
                  {
                    title: t2("ds:notifications.modal.empty.title"),
                    description: t2("ds:notifications.modal.empty.description", { serviceName })
                  }
                ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
                  NotificationsList,
                  {
                    avatarSlot: AvatarCardWidget,
                    notifications: notifications2,
                    lastSeenAt,
                    py: "sm"
                  }
                )
              }
            ) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs.Panel, { value: "unread", className: classes.shrink, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              InfiniteScroll,
              {
                height: "100%",
                onLoadMore: loadMoreUnread,
                isLoading: isLoadingUnread,
                disabled: !hasMoreUnread || isNotReadEmpty,
                children: isNotReadEmpty ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                  NotificationModalEmpty,
                  {
                    title: t2("ds:notifications.modal.emptyUnread.title"),
                    description: t2("ds:notifications.modal.emptyUnread.description", {
                      serviceName
                    })
                  }
                ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
                  NotificationsList,
                  {
                    avatarSlot: AvatarCardWidget,
                    notifications: notificationsUnread,
                    lastSeenAt: lastSeenAtUnread,
                    py: "sm"
                  }
                )
              }
            ) })
          ]
        }
      )
    ] }) })
  ] });
};
const NotificationBellWidget = ({ actionIconProps = {} }) => {
  const [isDirty, setIsDirty] = reactExports.useState(false);
  const { haveNew } = useNotificationsPolling();
  const [markAsSeen] = useMarkAsSeenMutation();
  const handleOnChange = (value) => {
    if (value) {
      setIsDirty(true);
    }
    markAsSeen();
  };
  reactExports.useEffect(() => {
    setIsDirty(false);
  }, [haveNew]);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Menu,
    {
      position: "bottom-end",
      shadow: "sm",
      offset: 15,
      radius: 16,
      keepMounted: false,
      onChange: handleOnChange,
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Target, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActionIcon, { size: "lg", ...actionIconProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Indicator,
          {
            size: 12,
            color: "red",
            withBorder: true,
            offset: 3,
            disabled: !haveNew || isDirty,
            style: { borderColor: "transparent" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconBell, { size: 22 })
          }
        ) }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Dropdown, { w: 400, h: 565, p: 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationModalWidget, {}) })
      ]
    }
  );
};
const uiKitApiReducers = {
  [notificationApi.reducerPath]: notificationApi.reducer,
  [contactApi.reducerPath]: contactApi.reducer,
  [settingsApi.reducerPath]: settingsApi.reducer,
  [userApi$1.reducerPath]: userApi$1.reducer
};
const uiKitApiMiddlewares = [
  notificationApi.middleware,
  contactApi.middleware,
  settingsApi.middleware,
  userApi$1.middleware
];
const modal$1 = { "title": "Уведомления", "tabs": { "all": "Все", "unread": "Непрочитанные" }, "groups": { "new": "Новые", "older": "Полученные ранее" }, "empty": { "title": "Новых уведомлений нет", "description": "Здесь отображаются все важные уведомления сервисов {{serviceName}}" }, "emptyUnread": { "title": "Непрочитанных уведомлений нет", "description": "Здесь отображаются непрочитанные уведомления сервисов {{serviceName}}" }, "allAsReadButton": "Все как прочитанные", "archiveButton": "Архив уведомлений", "settingsButton": "Настройки уведомлений" };
const settingsPage$1 = { "title": "Настройка уведомлений", "modules": { "admin": { "roleChange": "Изменение группы", "login": "Авторизация с другого устройства" }, "project": { "taskChange": "Изменения задач в спринте", "assignedTaskChanged": "Изменения задач назначенных на тебя", "taskAssign": "Назначение на задачу", "commentMention": "Упоминание в комментариях", "projectAccess": "Выдача доступа к проекту", "newSprint": "Новый спринт создан" } } };
const DiskFileShared$1 = { "title": "Изменен доступ к файлу", "description": "<strong>{{actor}}</strong> изменил настройки доступа к файлу <strong>«{{action.subject}}»</strong>.<br />Текущий уровень доступа: <strong>«{{action.accessType.title}}»</strong>." };
const DiskFileCommented$1 = { "title": "Новый комментарий к файлу", "description": "<strong>{{actor}}</strong> оставил новый комментарий к файлу <strong>«{{action.subject}}»</strong>." };
const DiskFileMentioned$1 = { "title": "Вас упомянули в комментарии", "description": "<strong>{{actor}}</strong> упомянул вас в комментарии к файлу <strong>«{{action.subject}}»</strong>." };
const DiskFileUploaded$1 = { "title": "Файл загружен", "description": "Файл <strong>«{{action.subject}}»</strong> был загружен и успешно проверен." };
const DiskFileUploadedBlocked$1 = { "title": "Загрузка файла заблокирована", "description": "Файл <strong>«{{action.subject}}»</strong> был заблокирован политикой DLP." };
const DiskFileUploadedError$1 = { "title": "Ошибка при загрузке файла", "description": "Произошла ошибка при проверке файла <strong>«{{action.subject}}»</strong>." };
const DiskLinkGenerated$1 = { "title": "Ссылка на файл сгенерирована", "description": 'Ваш файл <strong>«{{action.subject}}»</strong> успешно прошёл проверку. <a href="{{action.externalLinkUrl}}" target="_blank" rel="noopener noreferrer">Ссылка</a>' };
const DiskLinkGeneratedError$1 = { "title": "Не удалось сгенерировать ссылку на файл", "description": "Ваш файл <strong>«{{action.subject}}»</strong> не прошёл проверку. Попробуйте снова." };
const DiskDirectoryShared$1 = { "title": "Изменен доступ к папке", "description": "<strong>{{actor}}</strong> изменил настройки доступа к папке <strong>«{{action.subject}}»</strong>. Текущий уровень доступа: <strong>«{{action.accessType.title}}»</strong>." };
const DiskRoomShared$1 = { "title": "Доступ к комнате", "description": "Теперь у вас есть доступ уровня <strong>«{{action.accessType.title}}»</strong> к комнате <strong>«{{action.subject}}»</strong>." };
const ProjectShared$1 = { "title": "Доступ к проекту", "description": "Теперь у вас есть доступ уровня <strong>«{{action.accessType.title}}»</strong> к проекту <strong>«{{action.subject}}»</strong>." };
const ProjectTaskCreated$1 = { "title": "Новая задача создана", "description": "<strong>{{actor}}</strong> создал(а) новую задачу <strong>«{{action.title}}»</strong>." };
const ProjectTaskDeleted$1 = { "title": "Задача удалена", "description": "<strong>{{actor}}</strong> удалил задачу <strong>«{{action.title}}»</strong>." };
const ProjectTaskUpdated$1 = { "title": "Детали задачи обновлены", "description": "<strong>{{actor}}</strong> обновил(а) задачу <strong>«{{action.title}}»</strong>." };
const ProjectTaskMoved$1 = { "title": "Задача перемещена", "description": "<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в <strong>«{{action.movedTo}}»</strong>." };
const ProjectTaskStatusChanged$1 = { "title": "Статус задачи изменен", "description": "<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в статус <strong>«{{action.status}}»</strong>." };
const ProjectTaskCommented$1 = { "title": "Новый комментарий к задаче", "description": "<strong>{{actor}}</strong> оставил(а) новый комментарий к задаче <strong>«{{action.title}}»</strong>." };
const ProjectMyTaskDeleted$1 = { "title": "Задача удалена", "description": "<strong>{{actor}}</strong> удалил задачу <strong>«{{action.title}}»</strong>." };
const ProjectMyTaskUpdated$1 = { "title": "Детали задачи обновлены", "description": "<strong>{{actor}}</strong> обновил(а) задачу <strong>«{{action.title}}»</strong>." };
const ProjectMyTaskMoved$1 = { "title": "Задача перемещена", "description": "<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в <strong>«{{action.movedTo}}»</strong>." };
const ProjectMyTaskStatusChanged$1 = { "title": "Статус задачи изменен", "description": "<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в статус <strong>«{{action.status}}»</strong>." };
const ProjectMyTaskCommented$1 = { "title": "Новый комментарий к задаче", "description": "<strong>{{actor}}</strong> оставил(а) новый комментарий к задаче <strong>«{{action.title}}»</strong>." };
const ProjectTaskUnassigned$1 = { "title": "Вы исключены из задачи", "description": "<strong>{{actor}}</strong> исключил(а) вас из задачи <strong>«{{action.title}}»</strong>." };
const ProjectTaskAssigned$1 = { "title": "Вам назначена задача", "description": "<strong>{{actor}}</strong> назначил(а) вас на задачу <strong>«{{action.title}}»</strong>." };
const ProjectTaskMentioned$1 = { "title": "Вас упомянули в комментарии", "description": "<strong>{{actor}}</strong> упомянул(а) вас в комментарии к задаче <strong>«{{action.title}}»</strong>." };
const ProjectTaskAttachmentAdded$1 = { "title": "Новое вложение в задаче", "description": "<strong>{{actor}}</strong> добавил(а) новое вложение к задаче <strong>«{{action.title}}»</strong>." };
const ProjectSprintCreated$1 = { "title": "Новый спринт создан", "description": "Новый спринт <strong>«{{action.subject}}»</strong> был создан в проекте <strong>«{{action.project}}»</strong>." };
const AdminRoleAssigned$1 = { "title": "Вам назначена новая группа", "description": "Вам назначена группа <strong>«{{action.subject}}»</strong> в проекте <strong>«{{action.customerName}}»</strong>." };
const AdminRoleDeleted$1 = { "title": "Ваша группа удалена", "description": "Вас удалили из группы <strong>«{{action.subject}}»</strong> в проекте <strong>«{{action.customerName}}»</strong>." };
const MailMessageImportant$1 = { "title": "Сообщение с флагом «Важное»", "description": "<strong>{{actor}}</strong> отправил(а) новое сообщение с флагом «Важное»" };
const MailMessageReceived$1 = { "title": "Новое сообщение", "description": "<strong>{{actor}}</strong> отправил(а) новое сообщение" };
const CalendarShared$1 = { "title": "Доступ к календарю", "description": "Теперь у вас есть доступ уровня <strong>«{{action.accessType.title}}»</strong> к календарю <strong>«{{action.subject}}»</strong>." };
const CalendarEventCanceled$1 = { "title": "Событие отменено", "description": "Событие <strong>«{{action.title}}»</strong> было отменено <strong>{{actor}}</strong>." };
const CalendarEventInvited$1 = { "title": "Вы приглашены на событие", "description": "<strong>{{actor}}</strong> пригласил(а) вас на событие <strong>«{{action.title}}»</strong>." };
const CalendarEventUpdated$1 = { "title": "Детали события обновлены", "description": "<strong>{{actor}}</strong> обновил(а) детали события <strong>«{{action.title}}»</strong>." };
const CalendarEventUpcoming$1 = { "title": "Запланированное событие", "description": "Событие <strong>«{{action.title, defaultValue(fallback:Без заголовка)}}»</strong> {{action.timeUntilStart, eventStatusDescription}}.", "started": "началось", "willStartIn": "начнется через" };
const duration$1 = { "week_one": "{{count}} неделю", "week_few": "{{count}} недели", "week_many": "{{count}} недель", "day_one": "{{count}} день", "day_few": "{{count}} дня", "day_many": "{{count}} дней", "hour_one": "{{count}} час", "hour_few": "{{count}} часа", "hour_many": "{{count}} часов", "minute_one": "{{count}} минуту", "minute_few": "{{count}} минуты", "minute_many": "{{count}} минут", "second_one": "{{count}} секунду", "second_few": "{{count}} секунды", "second_many": "{{count}} секунд", "lessThanMinute": "меньше минуты", "started": "началось" };
const notificationRU = {
  modal: modal$1,
  settingsPage: settingsPage$1,
  DiskFileShared: DiskFileShared$1,
  DiskFileCommented: DiskFileCommented$1,
  DiskFileMentioned: DiskFileMentioned$1,
  DiskFileUploaded: DiskFileUploaded$1,
  DiskFileUploadedBlocked: DiskFileUploadedBlocked$1,
  DiskFileUploadedError: DiskFileUploadedError$1,
  DiskLinkGenerated: DiskLinkGenerated$1,
  DiskLinkGeneratedError: DiskLinkGeneratedError$1,
  DiskDirectoryShared: DiskDirectoryShared$1,
  DiskRoomShared: DiskRoomShared$1,
  ProjectShared: ProjectShared$1,
  ProjectTaskCreated: ProjectTaskCreated$1,
  ProjectTaskDeleted: ProjectTaskDeleted$1,
  ProjectTaskUpdated: ProjectTaskUpdated$1,
  ProjectTaskMoved: ProjectTaskMoved$1,
  ProjectTaskStatusChanged: ProjectTaskStatusChanged$1,
  ProjectTaskCommented: ProjectTaskCommented$1,
  ProjectMyTaskDeleted: ProjectMyTaskDeleted$1,
  ProjectMyTaskUpdated: ProjectMyTaskUpdated$1,
  ProjectMyTaskMoved: ProjectMyTaskMoved$1,
  ProjectMyTaskStatusChanged: ProjectMyTaskStatusChanged$1,
  ProjectMyTaskCommented: ProjectMyTaskCommented$1,
  ProjectTaskUnassigned: ProjectTaskUnassigned$1,
  ProjectTaskAssigned: ProjectTaskAssigned$1,
  ProjectTaskMentioned: ProjectTaskMentioned$1,
  ProjectTaskAttachmentAdded: ProjectTaskAttachmentAdded$1,
  ProjectSprintCreated: ProjectSprintCreated$1,
  AdminRoleAssigned: AdminRoleAssigned$1,
  AdminRoleDeleted: AdminRoleDeleted$1,
  MailMessageImportant: MailMessageImportant$1,
  MailMessageReceived: MailMessageReceived$1,
  CalendarShared: CalendarShared$1,
  CalendarEventCanceled: CalendarEventCanceled$1,
  CalendarEventInvited: CalendarEventInvited$1,
  CalendarEventUpdated: CalendarEventUpdated$1,
  CalendarEventUpcoming: CalendarEventUpcoming$1,
  duration: duration$1
};
const modal = { "title": "Notifications", "tabs": { "all": "All", "unread": "Unread" }, "groups": { "new": "New", "older": "Received earlier" }, "empty": { "title": "No new notifications", "description": "All important notifications from {{serviceName}} services are collected here" }, "emptyUnread": { "title": "No unread notifications", "description": "Here are displayed unread notifications from {{serviceName}} services" }, "allAsReadButton": "Mark all as read", "archiveButton": "All notifications", "settingsButton": "Notification Settings" };
const settingsPage = { "title": "Notification Settings", "modules": { "admin": { "roleChange": "Group Change", "login": "Login from Another Device" }, "project": { "taskChange": "Task Changes in Sprint", "assignedTaskChanged": "Assigned Task Changes", "taskAssign": "Task Assignment", "commentMention": "Mention in Comments", "projectAccess": "Project Access Granted", "newSprint": "New Sprint Created" } } };
const DiskFileShared = { "title": "File Access Changed", "description": "<strong>{{actor}}</strong> changed access settings for the file <strong>«{{action.subject}}»</strong>.<br />Current access level: <strong>«{{action.accessType.title}}»</strong>." };
const DiskFileCommented = { "title": "New Comment on File", "description": "<strong>{{actor}}</strong> left a new comment on the file <strong>«{{action.subject}}»</strong>." };
const DiskFileMentioned = { "title": "You've Been Mentioned", "description": "<strong>{{actor}}</strong> mentioned you in a comment on the file <strong>«{{action.subject}}»</strong>." };
const DiskFileUploaded = { "title": "File Uploaded", "description": "The file <strong>«{{action.subject}}»</strong> has been uploaded and checked successfully." };
const DiskFileUploadedBlocked = { "title": "File Upload Blocked", "description": "The file <strong>«{{action.subject}}»</strong> was blocked by DLP policy." };
const DiskFileUploadedError = { "title": "File Upload Error", "description": "An error occurred while checking the file <strong>«{{action.subject}}»</strong>." };
const DiskLinkGenerated = { "title": "File link generated", "description": 'Your file <strong>«{{action.subject}}»</strong> has been successfully validated. <a href="{{action.externalLinkUrl}}" target="_blank" rel="noopener noreferrer">Link</a>' };
const DiskLinkGeneratedError = { "title": "Failed to generate file link", "description": "Your file <strong>«{{action.subject}}»</strong> didn't pass validation. Try again." };
const DiskDirectoryShared = { "title": "Folder Access Changed", "description": "<strong>{{actor}}</strong> changed access settings for the folder <strong>«{{action.subject}}»</strong>. Current access level: <strong>«{{action.accessType.title}}»</strong>." };
const DiskRoomShared = { "title": "Access Granted to Room", "description": "You now have <strong>«{{action.accessType.title}}»</strong> access to the room <strong>«{{action.subject}}»</strong>." };
const ProjectShared = { "title": "Access Granted to Project", "description": "You now have <strong>«{{action.accessType.title}}»</strong> access to the project <strong>«{{action.subject}}»</strong>." };
const ProjectTaskCreated = { "title": "New Task Created", "description": "<strong>{{actor}}</strong> created a new task <strong>«{{action.title}}»</strong>." };
const ProjectTaskDeleted = { "title": "Task Deleted", "description": "The task <strong>«{{action.title}}»</strong> was deleted by <strong>{{actor}}</strong>." };
const ProjectTaskUpdated = { "title": "Task Details Updated", "description": "<strong>{{actor}}</strong> updated the task <strong>«{{action.title}}»</strong>." };
const ProjectTaskMoved = { "title": "Task Moved", "description": "<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.movedTo}}»</strong>." };
const ProjectTaskStatusChanged = { "title": "Task Status Changed", "description": "<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.status}}»</strong>." };
const ProjectTaskCommented = { "title": "New Comment on Task", "description": "<strong>{{actor}}</strong> left a new comment on the task <strong>«{{action.title}}»</strong>." };
const ProjectMyTaskDeleted = { "title": "Task Deleted", "description": "The task <strong>«{{action.title}}»</strong> was deleted by <strong>{{actor}}</strong>." };
const ProjectMyTaskUpdated = { "title": "Task Details Updated", "description": "<strong>{{actor}}</strong> updated the task <strong>«{{action.title}}»</strong>." };
const ProjectMyTaskMoved = { "title": "Task Moved", "description": "<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.movedTo}}»</strong>." };
const ProjectMyTaskStatusChanged = { "title": "Task Status Changed", "description": "<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.status}}»</strong>." };
const ProjectMyTaskCommented = { "title": "New Comment on Task", "description": "<strong>{{actor}}</strong> left a new comment on the task <strong>«{{action.title}}»</strong>." };
const ProjectTaskUnassigned = { "title": "Unassigned from Task", "description": "<strong>{{actor}}</strong> unassigned you from the task <strong>«{{action.title}}»</strong>." };
const ProjectTaskAssigned = { "title": "Assigned a Task", "description": "<strong>{{actor}}</strong> assigned you to the task <strong>«{{action.title}}»</strong>." };
const ProjectTaskMentioned = { "title": "You've Been Mentioned", "description": "<strong>{{actor}}</strong> mentioned you in a comment on the task <strong>«{{action.title}}»</strong>." };
const ProjectTaskAttachmentAdded = { "title": "New Attachment in Task", "description": "<strong>{{actor}}</strong> added a new attachment to the task <strong>«{{action.title}}»</strong>." };
const ProjectSprintCreated = { "title": "New Sprint Created", "description": "A new sprint <strong>«{{action.subject}}»</strong> has been created in the project <strong>«{{action.project}}»</strong>." };
const AdminRoleAssigned = { "title": "Assigned to a New Group", "description": "You have been assigned to the group <strong>«{{action.subject}}»</strong> in <strong>«{{action.customerName}}»</strong>." };
const AdminRoleDeleted = { "title": "Group Has Been Removed", "description": "You have been removed from the <strong>«{{action.subject}}»</strong> group in <strong>«{{action.customerName}}»</strong>." };
const MailMessageImportant = { "title": 'Message with "Important" Tag', "description": '<strong>{{actor}}</strong> sent a new message tagged as "Important"' };
const MailMessageReceived = { "title": "New Message", "description": "<strong>{{actor}}</strong> sent a new message" };
const CalendarShared = { "title": "Access Granted to Calendar", "description": "You now have <strong>«{{action.accessType.title}}»</strong> access to the calendar <strong>«{{action.subject}}»</strong>." };
const CalendarEventCanceled = { "title": "Event Canceled", "description": "The event <strong>«{{action.title}}»</strong> was canceled by <strong>{{actor}}</strong>." };
const CalendarEventInvited = { "title": "Invite to Event", "description": "<strong>{{actor}}</strong> invited you to the event <strong>«{{action.title}}»</strong>." };
const CalendarEventUpdated = { "title": "Event Details Updated", "description": "<strong>{{actor}}</strong> updated the event <strong>«{{action.title}}»</strong>." };
const CalendarEventUpcoming = { "title": "Upcoming Event", "description": "Event <strong>«{{action.title, defaultValue(fallback: Untitled)}}»</strong> {{action.timeUntilStart, eventStatusDescription}}.", "started": "started", "willStartIn": "will start in" };
const duration = { "week_one": "{{count}} week", "week_other": "{{count}} weeks", "day_one": "{{count}} day", "day_other": "{{count}} days", "hour_one": "{{count}} hour", "hour_other": "{{count}} hours", "minute_one": "{{count}} minute", "minute_other": "{{count}} minutes", "second_one": "{{count}} second", "second_other": "{{count}} seconds", "lessThanMinute": "less than a minute", "started": "started" };
const notificationEN = {
  modal,
  settingsPage,
  DiskFileShared,
  DiskFileCommented,
  DiskFileMentioned,
  DiskFileUploaded,
  DiskFileUploadedBlocked,
  DiskFileUploadedError,
  DiskLinkGenerated,
  DiskLinkGeneratedError,
  DiskDirectoryShared,
  DiskRoomShared,
  ProjectShared,
  ProjectTaskCreated,
  ProjectTaskDeleted,
  ProjectTaskUpdated,
  ProjectTaskMoved,
  ProjectTaskStatusChanged,
  ProjectTaskCommented,
  ProjectMyTaskDeleted,
  ProjectMyTaskUpdated,
  ProjectMyTaskMoved,
  ProjectMyTaskStatusChanged,
  ProjectMyTaskCommented,
  ProjectTaskUnassigned,
  ProjectTaskAssigned,
  ProjectTaskMentioned,
  ProjectTaskAttachmentAdded,
  ProjectSprintCreated,
  AdminRoleAssigned,
  AdminRoleDeleted,
  MailMessageImportant,
  MailMessageReceived,
  CalendarShared,
  CalendarEventCanceled,
  CalendarEventInvited,
  CalendarEventUpdated,
  CalendarEventUpcoming,
  duration
};
const unknown$1 = "Неизвестно";
const notificationSetting$1 = { "Off": "Отключено", "All": "Все модули", "Self": "Этот модуль" };
const accessType$1 = { "Deny": "Запретить", "OnlyUpload": "Только загрузка", "FreeBusy": "Свободен/Занят", "CanDownload": "Можно скачать", "Read": "Чтение", "Comment": "Комментировать", "Review": "Рецензировать", "Write": "Запись", "Delete": "Удалить", "FullInternal": "Полный внутренний", "Full": "Полный", "Lock": "Заблокировать", "LockPrint": "Заблокировать печать", "LockCopy": "Заблокировать копирование", "LockDownload": "Заблокировать скачивание" };
const module$1 = { "System": "Система", "Disk": "Диск", "Projects": "Проекты", "Calendar": "Календарь", "Mail": "Почта", "Contacts": "Контакты", "Admin": "Управление" };
const notificationSettingType = { "RoleChange": "Изменения ролей", "Login": "Авторизация с другого устройства", "TaskChange": "Изменения задач в спринте", "AssignedTaskChange": "Изменения задач назначенных на тебя", "TaskAssign": "Назначение на задачу", "CommentMention": "Упоминание в комментариях", "ProjectAccess": "Выдача доступа к проекту", "SprintCreated": "Новый спринт создан", "NewMessage": "Новое входящее сообщение", "ReplyToImportantMessage": "Ответ на важное сообщение", "DiskCommentMention": "Упоминание в комментариях", "DiskAccess": "Выдача доступа", "DiskFull": "Заканчивается место на диске", "AvailableDocumentChange": "Изменения доступным мне документов", "MyDocumentChange": "Изменения моих документов", "UpcomingEvent": "Уведомление о предстоящем событии", "EventInvite": "Приглашение в событие", "EventChange": "Изменение событий в твоем календаре или где ты участник", "SharedEventChange": "Изменение событий в пошареных тебе календарях", "CalendarShared": "Выдача доступа к каленадрю" };
const fileUploadStatus$1 = { "Completed": "Завершено", "Blocked": "Заблокировано", "Error": "Ошибка" };
const dictionaryRU = {
  unknown: unknown$1,
  notificationSetting: notificationSetting$1,
  accessType: accessType$1,
  module: module$1,
  notificationSettingType,
  fileUploadStatus: fileUploadStatus$1
};
const unknown = "Unknown";
const notificationSetting = { "Off": "Off", "All": "All modules", "Self": "This module" };
const accessType = { "Deny": "Deny", "OnlyUpload": "Upload Only", "FreeBusy": "Free/Busy", "CanDownload": "Can Download", "Read": "Read", "Comment": "Comment", "Review": "Review", "Write": "Write", "Delete": "Delete", "FullInternal": "Full Internal", "Full": "Full", "Lock": "Lock", "LockPrint": "Lock Print", "LockCopy": "Lock Copy", "LockDownload": "Lock Download" };
const module$2 = { "System": "System", "Disk": "Disk", "Projects": "Projects", "Calendar": "Calendar", "Mail": "Mail", "Contacts": "Contacts", "Admin": "Admin" };
const fileUploadStatus = { "Completed": "Completed", "Blocked": "Blocked", "Error": "Error" };
const dictionaryEN = {
  unknown,
  notificationSetting,
  accessType,
  module: module$2,
  fileUploadStatus
};
const card$1 = { "actions": { "addToContacts": { "inContacts": "Личные", "add": "Добавить", "organization": "Организация" } } };
const contactRU = {
  card: card$1
};
const card = { "actions": { "addToContacts": { "inContacts": "Personal", "add": "Add", "organization": "Organization" } } };
const contactEN = {
  card
};
const translations = {
  ru: {
    notifications: notificationRU,
    dictionary: dictionaryRU,
    contact: contactRU
  },
  en: {
    notifications: notificationEN,
    dictionary: dictionaryEN,
    contact: contactEN
  }
};
const uiKitResourcePlugin = {
  type: "3rdParty",
  init(services) {
    setTimeout(() => {
      try {
        let addResourceMethod = null;
        if (services.resourceStore && services.resourceStore.addResourceBundle) {
          addResourceMethod = services.resourceStore.addResourceBundle.bind(services.resourceStore);
        } else if (services.addResourceBundle) {
          addResourceMethod = services.addResourceBundle.bind(services);
        }
        if (!addResourceMethod) {
          console.error("No resource add method available");
          return;
        }
        Object.entries(translations).forEach(([language, resources2]) => {
          addResourceMethod(language, "ds", resources2, true, true);
        });
      } catch (error) {
        console.error("Failed to add UI Kit translations:", error);
      }
    }, 100);
  }
};
const uiKitFormatterPlugin = {
  type: "formatter",
  init(services) {
    var _a2;
    try {
      if ((_a2 = services == null ? void 0 : services.services) == null ? void 0 : _a2.formatter) {
        services.services.formatter.add("duration", (value) => {
          return formatDuration(value, services == null ? void 0 : services.t);
        });
        services.services.formatter.add("upper", (value) => {
          return value ? value.toUpperCase() : value;
        });
        services.services.formatter.add(
          "defaultValue",
          (value, _, options) => {
            return formatDefaultValue(value, options);
          }
        );
        services.services.formatter.add("eventStatusDescription", (timeUntilStart) => {
          return formatEventStatusDescription(timeUntilStart, services == null ? void 0 : services.t);
        });
      }
    } catch (error) {
      console.error("Failed to register UI Kit formatters:", error);
    }
  }
};
const uiKitPlugin = {
  type: "3rdParty",
  init(services) {
    uiKitResourcePlugin.init(services);
    uiKitFormatterPlugin.init(services);
  }
};
const resources = {
  en: {
    translation: en
  },
  ru: {
    translation: ru$2
  }
};
const browserLanguage = (_a = navigator.language) == null ? void 0 : _a.split("-")[0];
const localLanguage = localStorage.getItem("lng");
const defaultLang = localLanguage || browserLanguage;
instance$1.use(initReactI18next).use(uiKitPlugin).init({
  resources,
  lng: defaultLang,
  fallbackLng: "ru",
  interpolation: {
    escapeValue: false
  }
});
class ErrorBoundaryInner extends reactExports.Component {
  constructor(props) {
    super(props);
    this.retry = () => {
      this.setState({
        hasError: false
      });
      location.reload();
    };
    this.state = {
      hasError: props.hasError === void 0 ? false : props.hasError,
      error: null,
      errorInfo: null
    };
  }
  static getDerivedStateFromError() {
    return {
      hasError: true
    };
  }
  componentDidCatch(error, errorInfo) {
    console.error(`PageBlockRenderFail: ${this.props.componentTitle}`, error, {
      componentStack: errorInfo.componentStack,
      componentTitle: this.props.componentTitle
    });
    this.setState({
      error,
      errorInfo: `${error.name}: ${error.message}`
    });
  }
  render() {
    var _a2, _b, _c;
    if (this.state.hasError || this.props.hasError) {
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { className: (_a2 = this.props.classes) == null ? void 0 : _a2.errorContainer, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { className: (_b = this.props.classes) == null ? void 0 : _b.errorInfo, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: instance$1.t("errors.somethingHappened") }),
          null,
          /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "md", className: (_c = this.props.classes) == null ? void 0 : _c.button, onClick: this.retry, children: instance$1.t("refresh") })
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("br", {})
      ] });
    } else if (this.props.additionalError) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundaryPage, {});
    }
    return this.props.children;
  }
}
const ErrorBoundary = (props) => {
  const $ = compilerRuntimeExports.c(3);
  const {
    classes: classes2
  } = useStyles$9();
  let t0;
  if ($[0] !== classes2 || $[1] !== props) {
    t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundaryInner, { ...props, classes: classes2 });
    $[0] = classes2;
    $[1] = props;
    $[2] = t0;
  } else {
    t0 = $[2];
  }
  return t0;
};
const useCreateUseState = (selectorCallback, setAction, localStoreName) => {
  const $ = compilerRuntimeExports.c(11);
  const state = useSelector$1(selectorCallback);
  const dispatch = useAppDispatch();
  let t0;
  if ($[0] !== dispatch || $[1] !== localStoreName || $[2] !== setAction || $[3] !== state) {
    t0 = (value) => {
      if (typeof value === "function") {
        const prevState = state;
        const stateUpdater = value;
        const callbackValue = stateUpdater(prevState);
        localStoreName && window.localStorage.setItem(localStoreName, JSON.stringify(callbackValue));
        dispatch(setAction(callbackValue));
      } else {
        localStoreName && window.localStorage.setItem(localStoreName, JSON.stringify(value));
        dispatch(setAction(value));
      }
    };
    $[0] = dispatch;
    $[1] = localStoreName;
    $[2] = setAction;
    $[3] = state;
    $[4] = t0;
  } else {
    t0 = $[4];
  }
  const setState = t0;
  let t1;
  if ($[5] !== setState || $[6] !== state) {
    t1 = () => [state, setState];
    $[5] = setState;
    $[6] = state;
    $[7] = t1;
  } else {
    t1 = $[7];
  }
  let t2;
  if ($[8] !== setState || $[9] !== t1) {
    t2 = {
      useState: t1,
      setState
    };
    $[8] = setState;
    $[9] = t1;
    $[10] = t2;
  } else {
    t2 = $[10];
  }
  return t2;
};
const useAppDispatch = () => {
  return useDispatch$1();
};
const useAppSelector = useSelector$1;
var RoleTypesEnum$1 = /* @__PURE__ */ ((RoleTypesEnum2) => {
  RoleTypesEnum2[RoleTypesEnum2["User"] = 0] = "User";
  RoleTypesEnum2[RoleTypesEnum2["Admin"] = 1] = "Admin";
  RoleTypesEnum2[RoleTypesEnum2["SuperUser"] = 2] = "SuperUser";
  RoleTypesEnum2[RoleTypesEnum2["Guest"] = 3] = "Guest";
  RoleTypesEnum2[RoleTypesEnum2["All"] = 4] = "All";
  RoleTypesEnum2[RoleTypesEnum2["Support"] = 5] = "Support";
  return RoleTypesEnum2;
})(RoleTypesEnum$1 || {});
var UserStatusEnum = /* @__PURE__ */ ((UserStatusEnum2) => {
  UserStatusEnum2[UserStatusEnum2["Ban"] = -2] = "Ban";
  UserStatusEnum2[UserStatusEnum2["Deleted"] = -1] = "Deleted";
  UserStatusEnum2[UserStatusEnum2["Disabled"] = 0] = "Disabled";
  UserStatusEnum2[UserStatusEnum2["Active"] = 1] = "Active";
  UserStatusEnum2[UserStatusEnum2["Invited"] = 2] = "Invited";
  return UserStatusEnum2;
})(UserStatusEnum || {});
var PanelsEnum$1 = /* @__PURE__ */ ((PanelsEnum2) => {
  PanelsEnum2["generalInformation"] = "general-information";
  PanelsEnum2["additionalInformation"] = "additional-information";
  PanelsEnum2["fullName"] = "full-name";
  PanelsEnum2["authorization"] = "authorization";
  PanelsEnum2["linkedEmails"] = "linked-emails";
  PanelsEnum2["groups"] = "groups";
  PanelsEnum2["notes"] = "notes";
  PanelsEnum2["subscriptions"] = "subscriptions";
  PanelsEnum2["activeConnections"] = "active-connections";
  PanelsEnum2["dataStorageQuota"] = "data-storage-quota";
  PanelsEnum2["company"] = "company";
  PanelsEnum2["positions"] = "positions";
  PanelsEnum2["roles"] = "roles";
  PanelsEnum2["ldap"] = "ldap";
  PanelsEnum2["credentials"] = "credentials";
  PanelsEnum2["personalData"] = "personal-data";
  PanelsEnum2["filialData"] = "filial-data";
  PanelsEnum2["mailAccount"] = "mail-account";
  PanelsEnum2["disk"] = "disk";
  PanelsEnum2["status"] = "status";
  PanelsEnum2["login"] = "login";
  PanelsEnum2["email"] = "email";
  return PanelsEnum2;
})(PanelsEnum$1 || {});
const AppFeature = (value) => {
  localStorage.setItem("showFeatures", value);
};
const isFeature = () => {
  return localStorage.getItem("showFeatures") === "true";
};
const isAdmin = (user) => {
  const adminRoles = [RoleTypesEnum$1.Admin, RoleTypesEnum$1.SuperUser, RoleTypesEnum$1.Support];
  return !!(user == null ? void 0 : user.Roles.some((role) => (role == null ? void 0 : role.Type) && adminRoles.includes(role == null ? void 0 : role.Type)));
};
const isSuperAdmin = (user) => {
  const superAdminRoles = [RoleTypesEnum$1.SuperUser];
  return !!(user == null ? void 0 : user.Roles.some((role) => (role == null ? void 0 : role.Type) && superAdminRoles.includes(role == null ? void 0 : role.Type)));
};
const parseUrlParameters = () => {
  const parameters = {};
  window.location.search.replace(new RegExp("([^?=&]+)(=([^&]*))?", "g"), function(_match, key, _equal, value) {
    parameters[key] = value;
    return "";
  });
  return parameters;
};
const urlParams = parseUrlParameters();
const isSaaS = (settings2) => {
  if (isFeature() && urlParams.appType) {
    return urlParams.appType === "saas";
  }
  return (settings2 == null ? void 0 : settings2.AppType) === "saas";
};
const isCrypt = (settings2) => {
  return Boolean(settings2 == null ? void 0 : settings2.IsCrypt);
};
const canEditRole = (Type) => {
  return Type !== RoleTypesEnum$1.Admin && Type !== RoleTypesEnum$1.SuperUser && Type !== RoleTypesEnum$1.All && Type !== RoleTypesEnum$1.Support;
};
const HEADER_HEIGHT = 64;
const useStyles$6 = createStyles((theme2, _, utils2) => ({
  root: {
    borderBottom: "1px solid var(--mantine-color-gray-2)",
    width: "100%",
    position: "fixed",
    top: 0,
    zIndex: 1001,
    backgroundColor: theme2.white
  },
  dashboard: {
    backgroundColor: "#F5F6F8",
    borderBottom: "none"
  },
  header: {
    display: "flex",
    justifyContent: "space-between",
    alignItems: "center",
    height: "100%"
  },
  inner: {
    height: HEADER_HEIGHT,
    flexGrow: 1,
    display: "flex",
    alignItems: "center",
    justifyContent: "space-between",
    paddingLeft: theme2.spacing.sm,
    paddingRight: theme2.spacing.sm,
    gap: theme2.spacing.xs,
    [utils2.smallerThan("xs")]: {
      paddingLeft: rem(8),
      paddingRight: rem(8),
      gap: rem(4)
    }
  },
  burger: {
    [utils2.largerThan("lg")]: {
      display: "none"
    }
  },
  logo: {
    display: "flex",
    alignItems: "center",
    margin: 0,
    flexShrink: 1,
    minWidth: 0,
    "& img": {
      display: "block"
    },
    [utils2.smallerThan("xs")]: {
      width: "150px",
      maxWidth: "150px",
      img: {
        maxWidth: "100%"
      }
    },
    "@media (max-width: 35.9937em)": {
      width: "100px",
      maxWidth: "150px"
    }
  },
  links: {
    height: HEADER_HEIGHT,
    display: "flex",
    flexDirection: "row",
    justifyContent: "space-between",
    alignItems: "center",
    width: `calc(100% - 400px)`,
    [utils2.smallerThan("lg")]: {
      display: "none"
    }
  },
  link: {
    lineHeight: 1,
    padding: `${rem(8)} ${rem(12)}`,
    borderBottom: "2px solid transparent",
    transition: "border-color 100ms ease, color 100ms ease",
    textDecoration: "none",
    borderRadius: theme2.radius.sm,
    display: "block",
    fontSize: theme2.fontSizes.sm,
    fontWeight: 400,
    [utils2.dark]: {
      color: theme2.colors.dark[1]
    },
    [utils2.light]: {
      color: theme2.colors.gray[6]
    },
    "&:hover": {
      [utils2.dark]: {
        backgroundColor: theme2.colors.dark[6],
        color: theme2.white
      },
      [utils2.light]: {
        backgroundColor: theme2.colors.gray[0],
        color: theme2.black
      },
      textDecoration: "none"
    },
    [utils2.smallerThan("lg")]: {
      height: rem(42),
      display: "flex",
      alignItems: "center",
      width: "100%",
      borderRadius: 0,
      padding: theme2.spacing.md
    },
    "@media (hover: hover)": {
      "&:hover": {
        [utils2.dark]: {
          backgroundColor: theme2.colors.dark[6]
        },
        [utils2.light]: {
          backgroundColor: theme2.colors.gray[0]
        }
      }
    },
    "@media (hover: none)": {
      "&:active": {
        [utils2.dark]: {
          backgroundColor: theme2.colors.dark[6]
        },
        [utils2.light]: {
          backgroundColor: theme2.colors.gray[0]
        }
      }
    }
  },
  linkActive: {
    [utils2.dark]: {
      backgroundColor: theme2.colors.blue[0],
      color: theme2.colors.blue[6]
    },
    [utils2.light]: {
      backgroundColor: theme2.colors.blue[0],
      color: theme2.colors.blue[6]
    }
    // '&, &:hover': {
    //   backgroundColor: theme.fn.variant({
    //     variant: 'light',
    //     color: theme.primaryColor
    //   }).background,
    //   color: theme.fn.variant({ variant: 'light', color: theme.primaryColor }).color
    // }
  },
  linksGroup: {
    flexWrap: "nowrap"
  },
  dropdown: {
    position: "absolute",
    top: HEADER_HEIGHT,
    left: 0,
    right: 0,
    zIndex: 0,
    borderTopRightRadius: 0,
    borderTopLeftRadius: 0,
    borderTopWidth: 0,
    overflow: "hidden",
    [utils2.largerThan("lg")]: {
      display: "none"
    }
  }
}));
const logoManagementRU = "/assets/r7-management_RU-C4MQ53mj.svg";
const logoManagementEN = "/assets/r7-management_EN-CeZhY6-e.svg";
const ManagementLogo = () => {
  const $ = compilerRuntimeExports.c(5);
  const {
    i18n,
    t: t2
  } = useTranslation();
  const currentLanguage = i18n.language;
  const logoAdmin = currentLanguage === "ru" ? logoManagementRU : logoManagementEN;
  let t0;
  if ($[0] !== t2) {
    t0 = t2("managementLogoAlt");
    $[0] = t2;
    $[1] = t0;
  } else {
    t0 = $[1];
  }
  let t1;
  if ($[2] !== logoAdmin || $[3] !== t0) {
    t1 = /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: logoAdmin, alt: t0, height: 30 });
    $[2] = logoAdmin;
    $[3] = t0;
    $[4] = t1;
  } else {
    t1 = $[4];
  }
  return t1;
};
const officeLogoRU = "/assets/r7-office_Light_RU-DWnv6Yr2.svg";
const officeLogoEN = "/assets/r7_office_Light_EN-Dp9YF9vz.svg";
const OfficeLogo = (t0) => {
  const $ = compilerRuntimeExports.c(7);
  const {
    height: t1,
    className: t2
  } = t0;
  const height = t1 === void 0 ? 30 : t1;
  const className = t2 === void 0 ? "" : t2;
  const {
    i18n,
    t: t3
  } = useTranslation();
  const currentLanguage = i18n.language;
  const officeLogo = currentLanguage === "ru" ? officeLogoRU : officeLogoEN;
  let t32;
  if ($[0] !== t3) {
    t32 = t3("officeLogoAlt");
    $[0] = t3;
    $[1] = t32;
  } else {
    t32 = $[1];
  }
  let t4;
  if ($[2] !== className || $[3] !== height || $[4] !== officeLogo || $[5] !== t32) {
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className, src: officeLogo, alt: t32, height });
    $[2] = className;
    $[3] = height;
    $[4] = officeLogo;
    $[5] = t32;
    $[6] = t4;
  } else {
    t4 = $[6];
  }
  return t4;
};
const spaceLogoRU = "/assets/r7-space-dark_RU-CYUQhUvM.svg";
const spaceLogoEN = "data:image/svg+xml,%3csvg%20width='218'%20height='22'%20viewBox='0%200%20218%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M75.0854%2021.065C70.7609%2021.0368%2068.5563%2018.606%2068.5563%2013.8293V13.4619H74.0113V13.8293C74.0113%2014.7621%2074.6331%2015.2143%2075.0288%2015.2143H75.0854C75.6224%2015.2143%2075.9333%2014.9317%2075.9616%2014.5077V14.4229C75.9616%2013.9141%2075.255%2013.4336%2073.5873%2012.727C71.3827%2011.7943%2068.6693%2010.2115%2068.6411%206.48058V6.39579C68.6693%202.29744%2071.0435%200.545044%2075.0288%200.545044H75.1136C78.1379%200.545044%2081.6992%201.70389%2081.6992%207.15893V8.00686H76.2725V7.66769C76.2725%207.07414%2076.0464%206.39579%2075.2832%206.39579H75.2267C74.7745%206.39579%2074.4353%206.67843%2074.4353%207.07414V7.13066C74.4353%207.5829%2075.0854%207.95033%2076.6116%208.68521C78.788%209.70273%2081.7275%2011.2007%2081.7558%2014.9599V15.0164C81.7275%2018.9735%2079.325%2021.0368%2075.1702%2021.065H75.0854Z'%20fill='%2331394A'/%3e%3cpath%20d='M83.1624%2020.7259V0.940746H96.9272C100.997%200.940746%20103.371%203.42802%20103.371%207.66769V8.43083C103.371%2012.7553%20101.082%2015.1578%2096.9554%2015.1578H88.5892V20.7259H83.1624ZM88.5892%209.731H96.6728C97.4359%209.731%2097.8599%209.22223%2097.8599%208.34604V8.11992C97.8599%207.69595%2097.6338%206.7067%2096.6163%206.7067H88.5892V9.731Z'%20fill='%2331394A'/%3e%3cpath%20d='M99.0881%2020.7259L110.394%200.940746H117.517L128.794%2020.7259H121.954L120.286%2017.8146H107.539L105.872%2020.7259H99.0881ZM110.196%2012.9249L110.309%2013.0662L110.394%2013.0379C110.507%2012.9814%20110.705%2012.9814%20110.818%2012.9814H116.979C117.121%2012.9814%20117.375%2012.9814%20117.488%2013.0379L117.573%2013.0662L117.686%2012.9249L117.573%2012.7836L117.403%2012.4444L114.436%207.24372C114.266%206.96108%20113.983%206.48058%20113.983%206.31099H113.87C113.87%206.48058%20113.588%206.93281%20113.418%207.24372L110.479%2012.4444C110.422%2012.5009%20110.309%2012.727%20110.253%2012.8118L110.196%2012.9249Z'%20fill='%2331394A'/%3e%3cpath%20d='M134.162%2021.065C128%2021.065%20128%2015.6665%20128%2013.0945V8.54389C128%205.97182%20128.029%200.545044%20134.162%200.545044H159.176C165.479%200.545044%20165.507%205.77397%20165.507%208.54389L160.024%208.57215C160.024%206.7067%20159.911%206.14141%20158.611%206.14141H134.869C133.681%206.14141%20133.568%206.79149%20133.568%208.62868V13.0379C133.568%2014.8469%20133.681%2015.4687%20134.869%2015.4687H158.639C159.939%2015.4687%20160.024%2014.9317%20160.024%2013.0945H165.507C165.507%2015.8644%20165.507%2021.065%20159.176%2021.065H134.162Z'%20fill='%2331394A'/%3e%3cpath%20d='M166.619%2020.7259V0.940746H217.434V6.50885H172.046V8.28951H217.434V13.3206H172.046V15.1578H217.434V20.7259H166.619Z'%20fill='%2331394A'/%3e%3c/g%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%200.949341H28.4077C32.4705%200.949341%2034.843%203.43738%2034.843%207.6681V8.43445C34.843%2012.7492%2032.5545%2015.1532%2028.4392%2015.1532H27.7351L34.8215%2020.7067H25.3523L18.2921%2015.1532H5.417V20.7067H0V0.949341ZM28.1558%209.86219C28.9221%209.86219%2029.3421%209.35828%2029.3421%208.47644V7.97254C29.3421%207.55262%2029.1216%206.5658%2028.1033%206.5658H5.417V9.86219H28.1558Z'%20fill='%2331394A'/%3e%3cpath%20d='M47.9761%2020.6962H38.5068L56.511%206.58679H37.9714V0.949341H65.9802V6.53431L47.9761%2020.6962Z'%20fill='%2331394A'/%3e%3c/svg%3e";
const spaceLogoLightRU = "/assets/r7-space-light_RU-DXERLWGu.svg";
const spaceLogoLightEN = "data:image/svg+xml,%3csvg%20width='218'%20height='21'%20viewBox='0%200%20218%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M75.0854%2020.52C70.7609%2020.4917%2068.5563%2018.061%2068.5563%2013.2843V12.9169H74.0113V13.2843C74.0113%2014.217%2074.6331%2014.6693%2075.0288%2014.6693H75.0854C75.6224%2014.6693%2075.9333%2014.3866%2075.9616%2013.9626V13.8779C75.9616%2013.3691%2075.255%2012.8886%2073.5873%2012.182C71.3827%2011.2493%2068.6693%209.66645%2068.6411%205.93554V5.85074C68.6693%201.7524%2071.0435%200%2075.0288%200H75.1136C78.1379%200%2081.6992%201.15884%2081.6992%206.61388V7.46182H76.2725V7.12264C76.2725%206.52909%2076.0464%205.85074%2075.2832%205.85074H75.2267C74.7745%205.85074%2074.4353%206.13339%2074.4353%206.52909V6.58562C74.4353%207.03785%2075.0854%207.40529%2076.6116%208.14017C78.788%209.15769%2081.7275%2010.6557%2081.7558%2014.4149V14.4714C81.7275%2018.4284%2079.325%2020.4917%2075.1702%2020.52H75.0854Z'%20fill='white'/%3e%3cpath%20d='M83.1624%2020.1808V0.395702H96.9272C100.997%200.395702%20103.371%202.88298%20103.371%207.12264V7.88579C103.371%2012.2102%20101.082%2014.6127%2096.9554%2014.6127H88.5892V20.1808H83.1624ZM88.5892%209.18595H96.6728C97.4359%209.18595%2097.8599%208.67719%2097.8599%207.80099V7.57488C97.8599%207.15091%2097.6338%206.16165%2096.6163%206.16165H88.5892V9.18595Z'%20fill='white'/%3e%3cpath%20d='M99.0881%2020.1808L110.394%200.395702H117.517L128.794%2020.1808H121.954L120.286%2017.2696H107.539L105.872%2020.1808H99.0881ZM110.196%2012.3798L110.309%2012.5212L110.394%2012.4929C110.507%2012.4364%20110.705%2012.4364%20110.818%2012.4364H116.979C117.121%2012.4364%20117.375%2012.4364%20117.488%2012.4929L117.573%2012.5212L117.686%2012.3798L117.573%2012.2385L117.403%2011.8993L114.436%206.69868C114.266%206.41603%20113.983%205.93554%20113.983%205.76595H113.87C113.87%205.93554%20113.588%206.38777%20113.418%206.69868L110.479%2011.8993C110.422%2011.9559%20110.309%2012.182%20110.253%2012.2668L110.196%2012.3798Z'%20fill='white'/%3e%3cpath%20d='M134.162%2020.52C128%2020.52%20128%2015.1215%20128%2012.5494V7.99884C128%205.42678%20128.029%200%20134.162%200H159.176C165.479%200%20165.507%205.22893%20165.507%207.99884L160.024%208.02711C160.024%206.16165%20159.911%205.59636%20158.611%205.59636H134.869C133.681%205.59636%20133.568%206.24645%20133.568%208.08364V12.4929C133.568%2014.3018%20133.681%2014.9236%20134.869%2014.9236H158.639C159.939%2014.9236%20160.024%2014.3866%20160.024%2012.5494H165.507C165.507%2015.3193%20165.507%2020.52%20159.176%2020.52H134.162Z'%20fill='white'/%3e%3cpath%20d='M166.619%2020.1808V0.395702H217.434V5.9638H172.046V7.74446H217.434V12.7755H172.046V14.6127H217.434V20.1808H166.619Z'%20fill='white'/%3e%3c/g%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%200.404297H28.4077C32.4705%200.404297%2034.843%202.89234%2034.843%207.12305V7.88941C34.843%2012.2041%2032.5545%2014.6082%2028.4392%2014.6082H27.7351L34.8215%2020.1616H25.3523L18.2921%2014.6082H5.417V20.1616H0V0.404297ZM28.1558%209.31714C28.9221%209.31714%2029.3421%208.81324%2029.3421%207.9314V7.42749C29.3421%207.00757%2029.1216%206.02076%2028.1033%206.02076H5.417V9.31714H28.1558Z'%20fill='white'/%3e%3cpath%20d='M47.9761%2020.1511H38.5068L56.511%206.04175H37.9714V0.404297H65.9802V5.98926L47.9761%2020.1511Z'%20fill='white'/%3e%3c/svg%3e";
const SpaceLogo = (t0) => {
  const $ = compilerRuntimeExports.c(7);
  const {
    height: t1,
    className: t2,
    theme: t3
  } = t0;
  const height = t1 === void 0 ? 30 : t1;
  const className = t2 === void 0 ? "" : t2;
  const theme2 = t3 === void 0 ? "dark" : t3;
  const {
    i18n,
    t: t4
  } = useTranslation();
  const currentLanguage = i18n.language;
  let spaceLogo;
  if (currentLanguage === "ru") {
    spaceLogo = theme2 === "light" ? spaceLogoLightRU : spaceLogoRU;
  } else {
    spaceLogo = theme2 === "light" ? spaceLogoLightEN : spaceLogoEN;
  }
  const t42 = spaceLogo;
  let t5;
  if ($[0] !== t4) {
    t5 = t4("spaceLogoAlt");
    $[0] = t4;
    $[1] = t5;
  } else {
    t5 = $[1];
  }
  let t6;
  if ($[2] !== className || $[3] !== height || $[4] !== spaceLogo || $[5] !== t5) {
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className, src: t42, alt: t5, height });
    $[2] = className;
    $[3] = height;
    $[4] = spaceLogo;
    $[5] = t5;
    $[6] = t6;
  } else {
    t6 = $[6];
  }
  return t6;
};
const MainHeader = (t0) => {
  const $ = compilerRuntimeExports.c(53);
  const {
    list: list2,
    height: t1,
    rightSection,
    dashboardPage
  } = t0;
  const height = t1 === void 0 ? HEADER_HEIGHT : t1;
  const location2 = useLocation();
  const {
    Settings: Settings2
  } = useAppSelector(_temp$b);
  const currentUser = useAppSelector(_temp2$5);
  const [opened, t2] = useDisclosure(false);
  const {
    toggle
  } = t2;
  const {
    classes: classes2,
    cx
  } = useStyles$6();
  let t3;
  if ($[0] !== classes2.link || $[1] !== classes2.linkActive || $[2] !== cx || $[3] !== list2 || $[4] !== location2) {
    let t42;
    if ($[6] !== classes2.link || $[7] !== classes2.linkActive || $[8] !== cx || $[9] !== location2) {
      t42 = (item) => /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: item.link, "data-link": item.link, "data-cy": `${item.link.slice(1)}Tab`, className: cx(classes2.link, {
        [classes2.linkActive]: item.link === `${"/" + location2.pathname.split("/")[1]}`
      }), children: item.label }, item.link);
      $[6] = classes2.link;
      $[7] = classes2.linkActive;
      $[8] = cx;
      $[9] = location2;
      $[10] = t42;
    } else {
      t42 = $[10];
    }
    t3 = list2.map(t42);
    $[0] = classes2.link;
    $[1] = classes2.linkActive;
    $[2] = cx;
    $[3] = list2;
    $[4] = location2;
    $[5] = t3;
  } else {
    t3 = $[5];
  }
  const mainItems = t3;
  let t4;
  if ($[11] !== classes2.dashboard || $[12] !== classes2.root || $[13] !== cx || $[14] !== dashboardPage) {
    t4 = cx(classes2.root, {
      [classes2.dashboard]: dashboardPage
    });
    $[11] = classes2.dashboard;
    $[12] = classes2.root;
    $[13] = cx;
    $[14] = dashboardPage;
    $[15] = t4;
  } else {
    t4 = $[15];
  }
  let t5;
  if ($[16] !== classes2.burger || $[17] !== currentUser || $[18] !== dashboardPage || $[19] !== opened || $[20] !== toggle) {
    t5 = isAdmin(currentUser) && !dashboardPage && /* @__PURE__ */ jsxRuntimeExports.jsx(Burger, { opened, onClick: toggle, className: classes2.burger, size: "sm" });
    $[16] = classes2.burger;
    $[17] = currentUser;
    $[18] = dashboardPage;
    $[19] = opened;
    $[20] = toggle;
    $[21] = t5;
  } else {
    t5 = $[21];
  }
  let t6;
  if ($[22] !== Settings2 || $[23] !== dashboardPage) {
    t6 = dashboardPage ? isSaaS(Settings2) ? /* @__PURE__ */ jsxRuntimeExports.jsx(SpaceLogo, { height: 15 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(OfficeLogo, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: "/", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ManagementLogo, {}) });
    $[22] = Settings2;
    $[23] = dashboardPage;
    $[24] = t6;
  } else {
    t6 = $[24];
  }
  let t7;
  if ($[25] !== classes2.logo || $[26] !== t6) {
    t7 = /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { className: classes2.logo, children: t6 });
    $[25] = classes2.logo;
    $[26] = t6;
    $[27] = t7;
  } else {
    t7 = $[27];
  }
  let t8;
  if ($[28] !== t5 || $[29] !== t7) {
    t8 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { children: [
      t5,
      t7
    ] });
    $[28] = t5;
    $[29] = t7;
    $[30] = t8;
  } else {
    t8 = $[30];
  }
  let t9;
  if ($[31] !== classes2.links || $[32] !== classes2.linksGroup || $[33] !== currentUser || $[34] !== dashboardPage || $[35] !== mainItems) {
    t9 = isAdmin(currentUser) && !dashboardPage && /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { className: classes2.links, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { gap: 0, justify: "flex-start", className: classes2.linksGroup, children: mainItems }) });
    $[31] = classes2.links;
    $[32] = classes2.linksGroup;
    $[33] = currentUser;
    $[34] = dashboardPage;
    $[35] = mainItems;
    $[36] = t9;
  } else {
    t9 = $[36];
  }
  const t10 = Boolean(rightSection) && rightSection;
  let t11;
  if ($[37] !== classes2.dropdown || $[38] !== mainItems) {
    t11 = (styles) => /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { className: classes2.dropdown, withBorder: true, style: styles, children: mainItems });
    $[37] = classes2.dropdown;
    $[38] = mainItems;
    $[39] = t11;
  } else {
    t11 = $[39];
  }
  let t12;
  if ($[40] !== opened || $[41] !== t11) {
    t12 = /* @__PURE__ */ jsxRuntimeExports.jsx(Transition, { transition: "pop-top-left", duration: 200, mounted: opened, children: t11 });
    $[40] = opened;
    $[41] = t11;
    $[42] = t12;
  } else {
    t12 = $[42];
  }
  let t13;
  if ($[43] !== classes2.inner || $[44] !== t10 || $[45] !== t12 || $[46] !== t8 || $[47] !== t9) {
    t13 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { className: classes2.inner, children: [
      t8,
      t9,
      t10,
      t12
    ] });
    $[43] = classes2.inner;
    $[44] = t10;
    $[45] = t12;
    $[46] = t8;
    $[47] = t9;
    $[48] = t13;
  } else {
    t13 = $[48];
  }
  let t14;
  if ($[49] !== height || $[50] !== t13 || $[51] !== t4) {
    t14 = /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { h: height, className: t4, children: t13 });
    $[49] = height;
    $[50] = t13;
    $[51] = t4;
    $[52] = t14;
  } else {
    t14 = $[52];
  }
  return t14;
};
function _temp$b(state) {
  return state.userInfo;
}
function _temp2$5(state_0) {
  return state_0.userInfo.User;
}
const ROUTES = {
  users: {
    path: "/users",
    fullPath: "/users/:id?",
    roles: {
      path: "/roles",
      fullPath: "/roles"
    }
  },
  roles: {
    path: "/roles",
    fullPath: "/roles/:id?"
  },
  filials: {
    path: "/organizations",
    fullPath: "/organizations/:id?",
    edit: {
      path: "edit/:id",
      fullPath: "/organizations/edit/:id",
      clearPath: "/organizations/edit",
      pages: {
        common: {
          settings: "",
          security: "security",
          modules: "modules",
          smtp: "smtp",
          importUsers: "import-users",
          mailServers: "mail-servers",
          mailingSetup: "mailing-setup",
          locale: "locale",
          diskSpace: "disk-space"
        },
        subRoutes: {
          quotas: {
            path: "quotas",
            fullPath: "disk-space/quotas"
          }
        },
        auth: {
          ldap: "ldap",
          invite: "invite"
        },
        modules: {
          // drive: 'drive',
          email: "email",
          calendar: "calendar",
          draw: "draw",
          contacts: "contacts",
          projects: "projects",
          pages: "pages",
          forms: "forms"
        }
      }
    }
  },
  profile: {
    path: "/profile",
    fullPath: "/profile/:id",
    pages: {
      personalData: "",
      filials: "filials",
      safety: "safety",
      mailAccount: "mail-account",
      disk: "disk",
      licenses: "licenses",
      locale: "locale",
      notifications: "notifications",
      notificationSettings: "notification-settings"
    }
  },
  dashboard: {
    fullPath: "/dashboard"
  },
  home: {
    fullPath: "/home"
  },
  statistics: {
    path: "/statistics",
    fullPath: "/statistics",
    links: {
      activity: "",
      diskSpace: "disk-space",
      audit: "audit"
    }
  },
  commonSettings: {
    path: "/settings",
    fullPath: "/settings",
    pages: {
      branding: "branding",
      customisation: "customisation",
      auditTrail: "trail",
      storage: "storage",
      integrations: "",
      notifications: "notifications",
      sso: "sso"
    }
  },
  activations: {
    path: "/activations",
    fullPath: "/activations"
  },
  subscriptions: {
    path: " subscriptions",
    fullPath: "/subscriptions"
  }
};
const getMenu = (modules2) => {
  return modules2.ModuleUrls.filter((module) => module && module.HasAccess && module.ShowItem).map((module) => ({
    label: module.Title,
    iconSrc: module.Icon,
    tailType: module.TailType,
    url: module.Url
  }));
};
const useStyles$5 = createStyles(() => ({
  dropdown: {
    padding: "8px",
    marginTop: "10px"
  },
  menuItem: {
    padding: "6px 0",
    alignItems: "center"
  },
  itemLabel: {
    fontSize: "16px",
    alignItems: "center"
  },
  itemIcon: {
    marginRight: "11px"
  }
}));
const UsersIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const RocketIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M15.59 14.37a6 6 0 01-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 006.16-12.12A14.98 14.98 0 009.631 8.41m5.959 5.96a14.922 14.922 0 01-5.84 2.58m0 0a15.53 15.53 0 01-.311.06 15.091 15.091 0 01-2.448-2.448 14.9 14.9 0 01.059-.312m2.581-5.84a6 6 0 00-7.381 5.84h4.8m2.581-5.84a14.928 14.928 0 00-2.581 5.84m-2.239 2.39a4.493 4.493 0 00-1.757 4.306 4.493 4.493 0 004.306-1.758M16.5 9a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const SettingsIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M4.5 12a7.5 7.5 0 0015 0m-15 0a7.5 7.5 0 0115 0m-15 0H3m16.5 0H21m-1.5 0H12L7.5 4.205M3.543 15.077l1.41-.513m14.095-5.13l1.41-.513M5.106 17.785l1.15-.964m11.49-9.642l1.149-.964M7.501 19.795l.75-1.3L12.002 12m3.749-6.495l.75-1.3m-6.063 16.658l.26-1.477m2.605-14.772l.26-1.477m0 17.726l-.26-1.477M10.698 4.614l-.26-1.477M16.5 19.794l-.75-1.3m3.144-.71l-1.149-.963M6.256 7.178l-1.15-.964m15.352 8.864l-1.41-.513M4.954 9.435l-1.41-.514" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const TimezonesIcon = (t0) => {
  const $ = compilerRuntimeExports.c(10);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  let t3;
  let t4;
  let t5;
  let t6;
  let t7;
  let t8;
  let t9;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" });
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M20.884 10.554a9 9 0 1 0 -10.337 10.328" });
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3.6 9h16.8" });
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3.6 15h6.9" });
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M11.5 3a17 17 0 0 0 -1.502 14.954" });
    t7 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12.5 3a17 17 0 0 1 2.52 7.603" });
    t8 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M18 18m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" });
    t9 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M18 16.5v1.5l.5 .5" });
    $[0] = t2;
    $[1] = t3;
    $[2] = t4;
    $[3] = t5;
    $[4] = t6;
    $[5] = t7;
    $[6] = t8;
    $[7] = t9;
  } else {
    t2 = $[0];
    t3 = $[1];
    t4 = $[2];
    t5 = $[3];
    t6 = $[4];
    t7 = $[5];
    t8 = $[6];
    t9 = $[7];
  }
  let t10;
  if ($[8] !== stroke) {
    t10 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke, strokeWidth: "1.7", strokeLinecap: "round", strokeLinejoin: "round", className: "icon icon-tabler icons-tabler-outline icon-tabler-timezone", children: [
      t2,
      t3,
      t4,
      t5,
      t6,
      t7,
      t8,
      t9
    ] });
    $[8] = stroke;
    $[9] = t10;
  } else {
    t10 = $[9];
  }
  return t10;
};
const inviteUserIcon = ({
  stroke = "#101828"
}) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M19 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 1112.75 0v.109A12.318 12.318 0 0110.374 21C8.043 21 5.862 20.355 4 19.234v.001z" }) });
};
const FilialsIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2.25 21H21.75M3.75 3V21M14.25 3V21M20.25 7.5V21M6.75 6.75H7.5M6.75 9.75H7.5M6.75 12.75H7.5M10.5 6.75H11.25M10.5 9.75H11.25M10.5 12.75H11.25M6.75 21V17.625C6.75 17.004 7.254 16.5 7.875 16.5H10.125C10.746 16.5 11.25 17.004 11.25 17.625V21M3 3H15M14.25 7.5H21M17.25 11.25H17.258V11.258H17.25V11.25ZM17.25 14.25H17.258V14.258H17.25V14.25ZM17.25 17.25H17.258V17.258H17.25V17.25Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const WarningCircleIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 8V12M12 16H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const CloseIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    fill: t1
  } = t0;
  const fill = t1 === void 0 ? "#98A2B3" : t1;
  let t2;
  if ($[0] !== fill) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "16", height: "17", viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2.27984 2.72051C2.65296 2.34739 3.2577 2.34739 3.63062 2.72051L8.13333 7.22322L12.636 2.72051C13.0092 2.34739 13.6139 2.34739 13.9868 2.72051C14.3599 3.09363 14.3599 3.69838 13.9868 4.0713L9.48412 8.57401L13.9868 13.0767C14.3599 13.4498 14.3599 14.0546 13.9868 14.4275C13.6137 14.8006 13.009 14.8004 12.636 14.4275L8.13333 9.92479L3.63062 14.4275C3.25751 14.8004 2.65276 14.8004 2.27984 14.4275C1.90672 14.0544 1.90672 13.4496 2.27984 13.0767L6.78255 8.57401L2.27984 4.0713C1.90672 3.69818 1.90672 3.09343 2.27984 2.72051Z", fill }) });
    $[0] = fill;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const PlusIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 5V19M5 12H19", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const SearchIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#98A2B3" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const DriveIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M22 12H2M22 12V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V12M22 12L18.55 5.11C18.3844 4.77679 18.1292 4.49637 17.813 4.30028C17.4967 4.10419 17.1321 4.0002 16.76 4H7.24C6.86792 4.0002 6.50326 4.10419 6.18704 4.30028C5.87083 4.49637 5.61558 4.77679 5.45 5.11L2 12M6 16H6.01M10 16H10.01", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const ChecklistIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9.615 20H7C6.46957 20 5.96086 19.7893 5.58579 19.4142C5.21071 19.0391 5 18.5304 5 18V6C5 5.46957 5.21071 4.96086 5.58579 4.58579C5.96086 4.21071 6.46957 4 7 4H15C15.5304 4 16.0391 4.21071 16.4142 4.58579C16.7893 4.96086 17 5.46957 17 6V14M14 19L16 21L20 17M9 8H13M9 12H11", stroke, strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const DrawIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959a.641.641 0 01-.657.643c-1.391-.04-2.78-.14-4.163-.3a48.44 48.44 0 01.315 4.907.656.656 0 01-.658.663c-.355 0-.676-.186-.959-.401a1.647 1.647 0 00-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401.31 0 .555.26.532.57a48.042 48.042 0 01-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 00.657-.643c0-.355-.186-.676-.401-.959a1.647 1.647 0 01-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959 0 .333.277.599.61.58a48.086 48.086 0 005.427-.63c.272-1.562.466-3.136.582-4.717a.533.533 0 00-.533-.57c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401a.655.655 0 00.658-.663 48.42 48.42 0 00-.37-5.36 48.14 48.14 0 01-5.766.689.578.578 0 01-.61-.579z" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const ContactsIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M3 21v-2a4 4 0 014-4h4a4 4 0 014 4v2m1-17.87a4 4 0 010 7.75M21 21v-2a4 4 0 00-3-3.85M5 7a4 4 0 108 0 4 4 0 00-8 0z" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const ProjectsIcon = (t0) => {
  const $ = compilerRuntimeExports.c(5);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#98A2B3" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsxs("g", { clipPath: "url(#clip0_27_12)", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke, strokeWidth: "1.5", d: "M3.25.9h17.5c1.535 0 2.75 1.199 2.75 2.642v16.916c0 1.443-1.215 2.642-2.75 2.642H3.25C1.715 23.1.5 21.901.5 20.458V3.542C.5 2.099 1.715.9 3.25.9z" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M6.69 12l3.792 3.667 7.587-7.334" })
    ] });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  let t3;
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("defs", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("clipPath", { id: "clip0_27_12", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "#fff", d: "M0 0H24V24H0z" }) }) });
    $[2] = t3;
  } else {
    t3 = $[2];
  }
  let t4;
  if ($[3] !== t2) {
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: [
      t2,
      t3
    ] });
    $[3] = t2;
    $[4] = t4;
  } else {
    t4 = $[4];
  }
  return t4;
};
const CalendarIcon = (t0) => {
  const $ = compilerRuntimeExports.c(3);
  const {
    color: t1
  } = t0;
  const color = t1 === void 0 ? "#98A2B3" : t1;
  let t2;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M16 2V6M8 2V6M3 10H21M5 4H19C20.1046 4 21 4.89543 21 6V20C21 21.1046 20.1046 22 19 22H5C3.89543 22 3 21.1046 3 20V6C3 4.89543 3.89543 4 5 4Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" });
    $[0] = t2;
  } else {
    t2 = $[0];
  }
  let t3;
  if ($[1] !== color) {
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", color, children: t2 });
    $[1] = color;
    $[2] = t3;
  } else {
    t3 = $[2];
  }
  return t3;
};
const CalendarExtraIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M4.75 1V3.25M15.25 1V3.25M1 16.75V5.5C1 4.90326 1.23705 4.33097 1.65901 3.90901C2.08097 3.48705 2.65326 3.25 3.25 3.25H16.75C17.3467 3.25 17.919 3.48705 18.341 3.90901C18.7629 4.33097 19 4.90326 19 5.5V16.75M1 16.75C1 17.3467 1.23705 17.919 1.65901 18.341C2.08097 18.7629 2.65326 19 3.25 19H16.75C17.3467 19 17.919 18.7629 18.341 18.341C18.7629 17.919 19 17.3467 19 16.75M1 16.75V9.25C1 8.65326 1.23705 8.08097 1.65901 7.65901C2.08097 7.23705 2.65326 7 3.25 7H16.75C17.3467 7 17.919 7.23705 18.341 7.65901C18.7629 8.08097 19 8.65326 19 9.25V16.75M10 10.75H10.008V10.758H10V10.75ZM10 13H10.008V13.008H10V13ZM10 15.25H10.008V15.258H10V15.25ZM7.75 13H7.758V13.008H7.75V13ZM7.75 15.25H7.758V15.258H7.75V15.25ZM5.5 13H5.508V13.008H5.5V13ZM5.5 15.25H5.508V15.258H5.5V15.25ZM12.25 10.75H12.258V10.758H12.25V10.75ZM12.25 13H12.258V13.008H12.25V13ZM12.25 15.25H12.258V15.258H12.25V15.25ZM14.5 10.75H14.508V10.758H14.5V10.75ZM14.5 13H14.508V13.008H14.5V13Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const NotificationNavIcon = (t0) => {
  const $ = compilerRuntimeExports.c(6);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M10 6H7a2 2 0 00-2 2v9a2 2 0 002 2h9a2 2 0 002-2v-3M14 7a3 3 0 106 0 3 3 0 00-6 0z" });
    $[0] = t2;
  } else {
    t2 = $[0];
  }
  let t3;
  if ($[1] !== stroke) {
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("g", { stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", clipPath: "url(#clip0_5599_36798)", children: t2 });
    $[1] = stroke;
    $[2] = t3;
  } else {
    t3 = $[2];
  }
  let t4;
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("defs", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("clipPath", { id: "clip0_5599_36798", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "#fff", d: "M0 0H24V24H0z" }) }) });
    $[3] = t4;
  } else {
    t4 = $[3];
  }
  let t5;
  if ($[4] !== t3) {
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: [
      t3,
      t4
    ] });
    $[4] = t3;
    $[5] = t5;
  } else {
    t5 = $[5];
  }
  return t5;
};
const ArrowLeftIcon = (t0) => {
  const $ = compilerRuntimeExports.c(3);
  const {
    color: t1
  } = t0;
  const color = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19 12H5M5 12L12 19M5 12L12 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" });
    $[0] = t2;
  } else {
    t2 = $[0];
  }
  let t3;
  if ($[1] !== color) {
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", color, children: t2 });
    $[1] = color;
    $[2] = t3;
  } else {
    t3 = $[2];
  }
  return t3;
};
const EditIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M11 4.00023H4C3.46957 4.00023 2.96086 4.21094 2.58579 4.58601C2.21071 4.96109 2 5.46979 2 6.00023V20.0002C2 20.5307 2.21071 21.0394 2.58579 21.4144C2.96086 21.7895 3.46957 22.0002 4 22.0002H18C18.5304 22.0002 19.0391 21.7895 19.4142 21.4144C19.7893 21.0394 20 20.5307 20 20.0002V13.0002M18.5 2.50023C18.8978 2.1024 19.4374 1.87891 20 1.87891C20.5626 1.87891 21.1022 2.1024 21.5 2.50023C21.8978 2.89805 22.1213 3.43762 22.1213 4.00023C22.1213 4.56284 21.8978 5.1024 21.5 5.50023L12 15.0002L8 16.0002L9 12.0002L18.5 2.50023Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const MailIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6M22 6V18C22 19.1 21.1 20 20 20H4C2.9 20 2 19.1 2 18V6M22 6L12 13L2 6", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const SendIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M5.99955 12L3.26855 3.12598C9.80136 5.02565 15.9619 8.02677 21.4846 12C15.9623 15.9738 9.80213 18.9755 3.26955 20.876L5.99955 12ZM5.99955 12H13.4996", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const ServerIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M6 6H6.01M6 18H6.01M4 2H20C21.1046 2 22 2.89543 22 4V8C22 9.10457 21.1046 10 20 10H4C2.89543 10 2 9.10457 2 8V4C2 2.89543 2.89543 2 4 2ZM4 14H20C21.1046 14 22 14.8954 22 16V20C22 21.1046 21.1046 22 20 22H4C2.89543 22 2 21.1046 2 20V16C2 14.8954 2.89543 14 4 14Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const DatabaseIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M21 5C21 6.65685 16.9706 8 12 8C7.02944 8 3 6.65685 3 5M21 5C21 3.34315 16.9706 2 12 2C7.02944 2 3 3.34315 3 5M21 5V19C21 20.66 17 22 12 22C7 22 3 20.66 3 19V5M21 12C21 13.66 17 15 12 15C7 15 3 13.66 3 12", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const InfoIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#C01048" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM9.3 5.30001C9.3 6.01798 8.71797 6.60001 8 6.60001C7.28203 6.60001 6.7 6.01798 6.7 5.30001C6.7 4.58204 7.28203 4.00001 8 4.00001C8.71797 4.00001 9.3 4.58204 9.3 5.30001ZM7.97594 12C7.53635 12 7.18 11.6437 7.18 11.2041V8.29595C7.18 7.85636 7.53635 7.50001 7.97594 7.50001C8.41553 7.50001 8.77188 7.85636 8.77188 8.29595V11.2041C8.77188 11.6437 8.41553 12 7.97594 12Z", fill: stroke }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const CircleCloseIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    fill: t1
  } = t0;
  const fill = t1 === void 0 ? "#D0D5DD" : t1;
  let t2;
  if ($[0] !== fill) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM4.64124 4.6413C4.93413 4.34841 5.40901 4.34841 5.7019 4.6413L8 6.9394L10.2981 4.6413C10.591 4.34841 11.0659 4.34841 11.3588 4.6413C11.6516 4.93419 11.6516 5.40907 11.3588 5.70196L9.06066 8.00006L11.3588 10.2982C11.6516 10.591 11.6516 11.0659 11.3588 11.3588C11.0659 11.6517 10.591 11.6517 10.2981 11.3588L8 9.06072L5.7019 11.3588C5.40901 11.6517 4.93413 11.6517 4.64124 11.3588C4.34835 11.0659 4.34835 10.591 4.64124 10.2982L6.93934 8.00006L4.64124 5.70196C4.34835 5.40907 4.34835 4.93419 4.64124 4.6413Z", fill }) });
    $[0] = fill;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const FileIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9M13 2L20 9M13 2V9H20", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const CompanyPlaceholder = (t0) => {
  const $ = compilerRuntimeExports.c(5);
  const {
    size,
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z" });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  let t3;
  if ($[2] !== size || $[3] !== t2) {
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, fill: "none", viewBox: "0 0 24 24", children: t2 });
    $[2] = size;
    $[3] = t2;
    $[4] = t3;
  } else {
    t3 = $[4];
  }
  return t3;
};
const RolesPlaceholder = (t0) => {
  const $ = compilerRuntimeExports.c(3);
  const {
    size
  } = t0;
  let t1;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t1 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke: "#667085", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2m22 0v-2a4 4 0 00-3-3.87m-4-12a4 4 0 010 7.75M13 7a4 4 0 11-8 0 4 4 0 018 0z" });
    $[0] = t1;
  } else {
    t1 = $[0];
  }
  let t2;
  if ($[1] !== size) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, fill: "none", viewBox: "0 0 24 24", children: t1 });
    $[1] = size;
    $[2] = t2;
  } else {
    t2 = $[2];
  }
  return t2;
};
const ShieldIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#101828" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9 12.7508L11.25 15.0008L15 9.75084M12 2.71484C9.73574 4.86508 6.72026 6.04442 3.598 6.00084C3.20084 7.21082 2.99898 8.47635 3 9.74984C3 15.3418 6.824 20.0398 12 21.3728C17.176 20.0408 21 15.3428 21 9.75084C21 8.44084 20.79 7.17984 20.402 5.99984H20.25C17.054 5.99984 14.15 4.75184 12 2.71484Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const ActivityIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M15.042 21.6723L13.684 16.6003M13.684 16.6003L11.174 18.8253L11.743 9.35526L16.97 17.2723L13.684 16.6003ZM6.166 16.3333C5.20672 15.3739 4.49886 14.1927 4.1051 12.8944C3.71135 11.5961 3.64386 10.2207 3.90861 8.89006C4.17337 7.55943 4.76219 6.31464 5.62293 5.26593C6.48367 4.21722 7.58976 3.39698 8.84322 2.87785C10.0967 2.35872 11.4588 2.15672 12.809 2.28976C14.1592 2.4228 15.4557 2.88677 16.5837 3.64056C17.7118 4.39435 18.6365 5.41471 19.276 6.61124C19.9155 7.80777 20.25 9.14355 20.25 10.5003M8.288 14.2123C7.67742 13.6018 7.22684 12.8502 6.97615 12.0239C6.72547 11.1977 6.68243 10.3224 6.85084 9.47559C7.01926 8.62876 7.39393 7.83654 7.94167 7.16911C8.48941 6.50168 9.1933 5.97964 9.991 5.64924C10.7887 5.31884 11.6556 5.19028 12.5148 5.27495C13.3741 5.35961 14.1992 5.65489 14.917 6.13463C15.6349 6.61436 16.2234 7.26374 16.6303 8.02524C17.0373 8.78674 17.2501 9.63685 17.25 10.5003", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const GearIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085 " : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9.59372 3.94C9.68372 3.398 10.1537 3 10.7037 3H13.2967C13.8467 3 14.3167 3.398 14.4067 3.94L14.6197 5.221C14.6827 5.595 14.9327 5.907 15.2647 6.091C15.3387 6.131 15.4117 6.174 15.4847 6.218C15.8087 6.414 16.2047 6.475 16.5597 6.342L17.7767 5.886C18.0261 5.79221 18.3007 5.78998 18.5516 5.87971C18.8025 5.96945 19.0134 6.14531 19.1467 6.376L20.4427 8.623C20.5758 8.8537 20.6227 9.12413 20.5751 9.38617C20.5275 9.6482 20.3884 9.88485 20.1827 10.054L19.1797 10.881C18.8867 11.121 18.7417 11.494 18.7487 11.873C18.7503 11.958 18.7503 12.043 18.7487 12.128C18.7417 12.506 18.8867 12.878 19.1787 13.118L20.1837 13.946C20.6077 14.296 20.7177 14.9 20.4437 15.376L19.1457 17.623C19.0126 17.8536 18.8019 18.0296 18.5512 18.1195C18.3005 18.2094 18.0261 18.2074 17.7767 18.114L16.5597 17.658C16.2047 17.525 15.8097 17.586 15.4837 17.782C15.4112 17.8261 15.3379 17.8688 15.2637 17.91C14.9327 18.093 14.6827 18.405 14.6197 18.779L14.4067 20.059C14.3167 20.602 13.8467 21 13.2967 21H10.7027C10.1527 21 9.68272 20.602 9.59272 20.06L9.37972 18.779C9.31772 18.405 9.06772 18.093 8.73572 17.909C8.66157 17.8681 8.58822 17.8258 8.51572 17.782C8.19072 17.586 7.79572 17.525 7.43972 17.658L6.22272 18.114C5.97345 18.2075 5.69908 18.2096 5.44842 18.1199C5.19775 18.0302 4.98703 17.8545 4.85372 17.624L3.55672 15.377C3.42366 15.1463 3.37676 14.8759 3.42437 14.6138C3.47198 14.3518 3.61101 14.1152 3.81672 13.946L4.82072 13.119C5.11272 12.879 5.25772 12.506 5.25072 12.127C5.24915 12.042 5.24915 11.957 5.25072 11.872C5.25772 11.494 5.11272 11.122 4.82072 10.882L3.81672 10.054C3.61126 9.88489 3.47239 9.64843 3.42479 9.38662C3.37719 9.12481 3.42393 8.8546 3.55672 8.624L4.85372 6.377C4.9869 6.14614 5.19773 5.97006 5.44863 5.88014C5.69953 5.79021 5.97421 5.79229 6.22372 5.886L7.43972 6.342C7.79572 6.475 8.19072 6.414 8.51572 6.218C8.58772 6.174 8.66172 6.131 8.73572 6.09C9.06772 5.907 9.31772 5.595 9.37972 5.221L9.59372 3.94Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M15 12C15 12.7956 14.6839 13.5587 14.1213 14.1213C13.5587 14.6839 12.7956 15 12 15C11.2044 15 10.4413 14.6839 9.87868 14.1213C9.31607 13.5587 9 12.7956 9 12C9 11.2044 9.31607 10.4413 9.87868 9.87868C10.4413 9.31607 11.2044 9 12 9C12.7956 9 13.5587 9.31607 14.1213 9.87868C14.6839 10.4413 15 11.2044 15 12Z", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
    ] });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const LoginAsIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M13.125 7.5V4.375C13.125 3.87772 12.9275 3.40081 12.5758 3.04917C12.2242 2.69754 11.7473 2.5 11.25 2.5H6.25C5.75272 2.5 5.27581 2.69754 4.92417 3.04917C4.57254 3.40081 4.375 3.87772 4.375 4.375V15.625C4.375 16.1223 4.57254 16.5992 4.92417 16.9508C5.27581 17.3025 5.75272 17.5 6.25 17.5H11.25C11.7473 17.5 12.2242 17.3025 12.5758 16.9508C12.9275 16.5992 13.125 16.1223 13.125 15.625V12.5M15.625 12.5L18.125 10M18.125 10L15.625 7.5M18.125 10H7.5", stroke, strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const BlockIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M13.75 8.75V5.625C13.75 4.63044 13.3549 3.67661 12.6516 2.97335C11.9484 2.27009 10.9946 1.875 10 1.875C9.00544 1.875 8.05161 2.27009 7.34835 2.97335C6.64509 3.67661 6.25 4.63044 6.25 5.625V8.75M5.625 18.125H14.375C14.8723 18.125 15.3492 17.9275 15.7008 17.5758C16.0525 17.2242 16.25 16.7473 16.25 16.25V10.625C16.25 10.1277 16.0525 9.65081 15.7008 9.29917C15.3492 8.94754 14.8723 8.75 14.375 8.75H5.625C5.12772 8.75 4.65081 8.94754 4.29917 9.29917C3.94754 9.65081 3.75 10.1277 3.75 10.625V16.25C3.75 16.7473 3.94754 17.2242 4.29917 17.5758C4.65081 17.9275 5.12772 18.125 5.625 18.125Z", stroke, strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const LockOpenIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M11.25 8.75V5.625C11.25 4.63044 11.6451 3.67661 12.3483 2.97335C13.0516 2.27009 14.0054 1.875 15 1.875C15.9946 1.875 16.9484 2.27009 17.6516 2.97335C18.3549 3.67661 18.75 4.63044 18.75 5.625V8.75M3.125 18.125H11.875C12.3723 18.125 12.8492 17.9275 13.2008 17.5758C13.5525 17.2242 13.75 16.7473 13.75 16.25V10.625C13.75 10.1277 13.5525 9.65081 13.2008 9.29917C12.8492 8.94754 12.3723 8.75 11.875 8.75H3.125C2.62772 8.75 2.15081 8.94754 1.79917 9.29917C1.44754 9.65081 1.25 10.1277 1.25 10.625V16.25C1.25 16.7473 1.44754 17.2242 1.79917 17.5758C2.15081 17.9275 2.62772 18.125 3.125 18.125Z", stroke, strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const EditProfileIcon = (t0) => {
  const $ = compilerRuntimeExports.c(5);
  const {
    stroke: t1,
    size: t2
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  const size = t2 === void 0 ? "20" : t2;
  let t3;
  if ($[0] !== stroke) {
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14.0517 3.73937L15.4575 2.33271C15.7506 2.03964 16.148 1.875 16.5625 1.875C16.977 1.875 17.3744 2.03964 17.6675 2.33271C17.9606 2.62577 18.1252 3.02325 18.1252 3.43771C18.1252 3.85216 17.9606 4.24964 17.6675 4.54271L8.81833 13.3919C8.37777 13.8322 7.83447 14.1558 7.2375 14.3335L5 15.0002L5.66667 12.7627C5.8444 12.1657 6.16803 11.6224 6.60833 11.1819L14.0517 3.73937ZM14.0517 3.73937L16.25 5.93771M15 11.6669V15.6252C15 16.1225 14.8025 16.5994 14.4508 16.951C14.0992 17.3027 13.6223 17.5002 13.125 17.5002H4.375C3.87772 17.5002 3.40081 17.3027 3.04917 16.951C2.69754 16.5994 2.5 16.1225 2.5 15.6252V6.87521C2.5 6.37793 2.69754 5.90101 3.04917 5.54938C3.40081 5.19775 3.87772 5.00021 4.375 5.00021H8.33333", stroke, strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" });
    $[0] = stroke;
    $[1] = t3;
  } else {
    t3 = $[1];
  }
  let t4;
  if ($[2] !== size || $[3] !== t3) {
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: size, height: size, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: t3 });
    $[2] = size;
    $[3] = t3;
    $[4] = t4;
  } else {
    t4 = $[4];
  }
  return t4;
};
const ConfirmMailIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M10.0001 7.50043V10.6254M2.2476 13.4388C1.52593 14.6888 2.42843 16.2504 3.87093 16.2504H16.1293C17.5709 16.2504 18.4734 14.6888 17.7526 13.4388L11.6243 2.81543C10.9026 1.56543 9.09759 1.56543 8.37593 2.81543L2.2476 13.4388ZM10.0001 13.1254H10.0059V13.1321H10.0001V13.1254Z", stroke, strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const AddRoleIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M15.8333 6.25V8.75M15.8333 8.75V11.25M15.8333 8.75H18.3333M15.8333 8.75H13.3333M11.4583 5.3125C11.4583 5.68184 11.3855 6.04757 11.2442 6.3888C11.1028 6.73003 10.8957 7.04007 10.6345 7.30124C10.3733 7.5624 10.0633 7.76957 9.72205 7.91091C9.38082 8.05225 9.01509 8.125 8.64575 8.125C8.27641 8.125 7.91068 8.05225 7.56945 7.91091C7.22823 7.76957 6.91818 7.5624 6.65701 7.30124C6.39585 7.04007 6.18868 6.73003 6.04734 6.3888C5.906 6.04757 5.83325 5.68184 5.83325 5.3125C5.83325 4.56658 6.12957 3.85121 6.65701 3.32376C7.18446 2.79632 7.89983 2.5 8.64575 2.5C9.39167 2.5 10.107 2.79632 10.6345 3.32376C11.1619 3.85121 11.4583 4.56658 11.4583 5.3125ZM3.33325 16.0292V15.9375C3.33325 14.5285 3.89296 13.1773 4.88925 12.181C5.88553 11.1847 7.23679 10.625 8.64575 10.625C10.0547 10.625 11.406 11.1847 12.4023 12.181C13.3985 13.1773 13.9583 14.5285 13.9583 15.9375V16.0283C12.3545 16.9942 10.5171 17.5032 8.64492 17.5C6.70242 17.5 4.88492 16.9625 3.33325 16.0283V16.0292Z", stroke, strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const WriteMailIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M18.125 5.625V14.375C18.125 14.8723 17.9275 15.3492 17.5758 15.7008C17.2242 16.0525 16.7473 16.25 16.25 16.25H3.75C3.25272 16.25 2.77581 16.0525 2.42417 15.7008C2.07254 15.3492 1.875 14.8723 1.875 14.375V5.625M18.125 5.625C18.125 5.12772 17.9275 4.65081 17.5758 4.29917C17.2242 3.94754 16.7473 3.75 16.25 3.75H3.75C3.25272 3.75 2.77581 3.94754 2.42417 4.29917C2.07254 4.65081 1.875 5.12772 1.875 5.625M18.125 5.625V5.8275C18.125 6.14762 18.0431 6.46242 17.887 6.74191C17.7309 7.0214 17.5059 7.25628 17.2333 7.42417L10.9833 11.27C10.6877 11.4521 10.3472 11.5485 10 11.5485C9.65275 11.5485 9.31233 11.4521 9.01667 11.27L2.76667 7.425C2.4941 7.25711 2.26906 7.02224 2.11297 6.74275C1.95689 6.46325 1.87496 6.14845 1.875 5.82833V5.625", stroke, strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const DelIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== stroke) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12.2833 7.50043L11.995 15.0004M8.005 15.0004L7.71667 7.50043M16.0233 4.82543C16.3083 4.86877 16.5917 4.9146 16.875 4.96377M16.0233 4.82543L15.1333 16.3946C15.097 16.8656 14.8842 17.3056 14.5375 17.6265C14.1908 17.9474 13.7358 18.1256 13.2633 18.1254H6.73667C6.26425 18.1256 5.80919 17.9474 5.46248 17.6265C5.11578 17.3056 4.90299 16.8656 4.86667 16.3946L3.97667 4.82543M16.0233 4.82543C15.0616 4.68003 14.0948 4.56968 13.125 4.4946M3.97667 4.82543C3.69167 4.86793 3.40833 4.91377 3.125 4.96293M3.97667 4.82543C4.93844 4.68003 5.9052 4.56968 6.875 4.4946M13.125 4.4946V3.73127C13.125 2.74793 12.3667 1.92793 11.3833 1.8971C10.4613 1.86763 9.53865 1.86763 8.61667 1.8971C7.63333 1.92793 6.875 2.74877 6.875 3.73127V4.4946M13.125 4.4946C11.0448 4.33383 8.95523 4.33383 6.875 4.4946", stroke, strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) });
    $[0] = stroke;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const XIcon = (t0) => {
  const $ = compilerRuntimeExports.c(2);
  const {
    fill: t1
  } = t0;
  const fill = t1 === void 0 ? "#667085" : t1;
  let t2;
  if ($[0] !== fill) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M6.27991 5.21985C6.13773 5.08737 5.94969 5.01524 5.75539 5.01867C5.56109 5.0221 5.3757 5.10081 5.23829 5.23822C5.10087 5.37564 5.02216 5.56102 5.01873 5.75532C5.01531 5.94963 5.08743 6.13767 5.21991 6.27985L8.93991 9.99985L5.21991 13.7198C5.14622 13.7885 5.08712 13.8713 5.04613 13.9633C5.00514 14.0553 4.98309 14.1546 4.98132 14.2553C4.97954 14.356 4.99807 14.4561 5.03579 14.5494C5.07351 14.6428 5.12965 14.7277 5.20087 14.7989C5.27209 14.8701 5.35692 14.9262 5.45031 14.964C5.5437 15.0017 5.64373 15.0202 5.74443 15.0184C5.84513 15.0167 5.94445 14.9946 6.03645 14.9536C6.12845 14.9126 6.21125 14.8535 6.27991 14.7798L9.99991 11.0598L13.7199 14.7798C13.7886 14.8535 13.8714 14.9126 13.9634 14.9536C14.0554 14.9946 14.1547 15.0167 14.2554 15.0184C14.3561 15.0202 14.4561 15.0017 14.5495 14.964C14.6429 14.9262 14.7277 14.8701 14.7989 14.7989C14.8702 14.7277 14.9263 14.6428 14.964 14.5494C15.0018 14.4561 15.0203 14.356 15.0185 14.2553C15.0167 14.1546 14.9947 14.0553 14.9537 13.9633C14.9127 13.8713 14.8536 13.7885 14.7799 13.7198L11.0599 9.99985L14.7799 6.27985C14.9124 6.13767 14.9845 5.94963 14.9811 5.75532C14.9777 5.56102 14.8989 5.37564 14.7615 5.23822C14.6241 5.10081 14.4387 5.0221 14.2444 5.01867C14.0501 5.01524 13.8621 5.08737 13.7199 5.21985L9.99991 8.93985L6.27991 5.21985Z", fill }) });
    $[0] = fill;
    $[1] = t2;
  } else {
    t2 = $[1];
  }
  return t2;
};
const NoImage = (t0) => {
  const $ = compilerRuntimeExports.c(7);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#667085" : t1;
  let t2;
  let t3;
  let t4;
  let t5;
  let t6;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" });
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M15 8h.01" });
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z" });
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5" });
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3" });
    $[0] = t2;
    $[1] = t3;
    $[2] = t4;
    $[3] = t5;
    $[4] = t6;
  } else {
    t2 = $[0];
    t3 = $[1];
    t4 = $[2];
    t5 = $[3];
    t6 = $[4];
  }
  let t7;
  if ($[5] !== stroke) {
    t7 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
      t2,
      t3,
      t4,
      t5,
      t6
    ] });
    $[5] = stroke;
    $[6] = t7;
  } else {
    t7 = $[6];
  }
  return t7;
};
const PagesIcon = (t0) => {
  const $ = compilerRuntimeExports.c(6);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#98A2B3" : t1;
  let t2;
  let t3;
  let t4;
  let t5;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" });
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" });
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M13.5 6.5l4 4" });
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M16 19h6" });
    $[0] = t2;
    $[1] = t3;
    $[2] = t4;
    $[3] = t5;
  } else {
    t2 = $[0];
    t3 = $[1];
    t4 = $[2];
    t5 = $[3];
  }
  let t6;
  if ($[4] !== stroke) {
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
      t2,
      t3,
      t4,
      t5
    ] });
    $[4] = stroke;
    $[5] = t6;
  } else {
    t6 = $[5];
  }
  return t6;
};
const FormsIcon = (t0) => {
  const $ = compilerRuntimeExports.c(9);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#98A2B3" : t1;
  let t2;
  let t3;
  let t4;
  let t5;
  let t6;
  let t7;
  let t8;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9.30005 5.9998C9.30005 5.61321 9.61345 5.2998 10 5.2998H17C17.3866 5.2998 17.7 5.61321 17.7 5.9998C17.7 6.3864 17.3866 6.6998 17 6.6998H10C9.61345 6.6998 9.30005 6.3864 9.30005 5.9998Z", fill: "#98A2B3" });
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M10 9.2998C9.61345 9.2998 9.30005 9.6132 9.30005 9.9998C9.30005 10.3864 9.61345 10.6998 10 10.6998H17C17.3866 10.6998 17.7 10.3864 17.7 9.9998C17.7 9.6132 17.3866 9.2998 17 9.2998H10Z", fill: "#98A2B3" });
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9.30005 13.9998C9.30005 13.6132 9.61345 13.2998 10 13.2998H17C17.3866 13.2998 17.7 13.6132 17.7 13.9998C17.7 14.3864 17.3866 14.6998 17 14.6998H10C9.61345 14.6998 9.30005 14.3864 9.30005 13.9998Z", fill: "#98A2B3" });
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6 4.49982C5.17157 4.49982 4.5 5.17139 4.5 5.99982C4.5 6.82824 5.17157 7.49982 6 7.49982C6.82843 7.49982 7.5 6.82824 7.5 5.99982C7.5 5.17139 6.82843 4.49982 6 4.49982ZM5.5 5.99982C5.5 5.72367 5.72386 5.49982 6 5.49982C6.27614 5.49982 6.5 5.72367 6.5 5.99982C6.5 6.27596 6.27614 6.49982 6 6.49982C5.72386 6.49982 5.5 6.27596 5.5 5.99982Z", fill: "white" });
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.5 9.99982C4.5 9.17139 5.17157 8.49982 6 8.49982C6.82843 8.49982 7.5 9.17139 7.5 9.99982C7.5 10.8282 6.82843 11.4998 6 11.4998C5.17157 11.4998 4.5 10.8282 4.5 9.99982ZM6 9.49982C5.72386 9.49982 5.5 9.72367 5.5 9.99982C5.5 10.276 5.72386 10.4998 6 10.4998C6.27614 10.4998 6.5 10.276 6.5 9.99982C6.5 9.72367 6.27614 9.49982 6 9.49982Z", fill: "#98A2B3" });
    t7 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6 12.4998C5.17157 12.4998 4.5 13.1714 4.5 13.9998C4.5 14.8282 5.17157 15.4998 6 15.4998C6.82843 15.4998 7.5 14.8282 7.5 13.9998C7.5 13.1714 6.82843 12.4998 6 12.4998ZM5.5 13.9998C5.5 13.7237 5.72386 13.4998 6 13.4998C6.27614 13.4998 6.5 13.7237 6.5 13.9998C6.5 14.276 6.27614 14.4998 6 14.4998C5.72386 14.4998 5.5 14.276 5.5 13.9998Z", fill: "#98A2B3" });
    t8 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.300049 2.4998C0.300049 1.28478 1.28502 0.299805 2.50005 0.299805H19.5C20.7151 0.299805 21.7001 1.28478 21.7001 2.4998V17.4998C21.7001 18.7148 20.7151 19.6998 19.5 19.6998H2.50005C1.28502 19.6998 0.300049 18.7148 0.300049 17.4998V2.4998ZM2.50005 1.6998C2.05822 1.6998 1.70005 2.05798 1.70005 2.4998V17.4998C1.70005 17.9416 2.05822 18.2998 2.50005 18.2998H19.5C19.9419 18.2998 20.3 17.9416 20.3 17.4998V2.4998C20.3 2.05798 19.9419 1.6998 19.5 1.6998H2.50005Z", fill: "#98A2B3" });
    $[0] = t2;
    $[1] = t3;
    $[2] = t4;
    $[3] = t5;
    $[4] = t6;
    $[5] = t7;
    $[6] = t8;
  } else {
    t2 = $[0];
    t3 = $[1];
    t4 = $[2];
    t5 = $[3];
    t6 = $[4];
    t7 = $[5];
    t8 = $[6];
  }
  let t9;
  if ($[7] !== stroke) {
    t9 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { stroke, width: "24", height: "24", viewBox: "0 0 22 20", fill: "#98A2B3", xmlns: "http://www.w3.org/2000/svg", children: [
      t2,
      t3,
      t4,
      t5,
      t6,
      t7,
      t8
    ] });
    $[7] = stroke;
    $[8] = t9;
  } else {
    t9 = $[8];
  }
  return t9;
};
const BellIcon = (t0) => {
  const $ = compilerRuntimeExports.c(5);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#98A2B3" : t1;
  let t2;
  let t3;
  let t4;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" });
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" });
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9 17v1a3 3 0 0 0 6 0v-1" });
    $[0] = t2;
    $[1] = t3;
    $[2] = t4;
  } else {
    t2 = $[0];
    t3 = $[1];
    t4 = $[2];
  }
  let t5;
  if ($[3] !== stroke) {
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
      t2,
      t3,
      t4
    ] });
    $[3] = stroke;
    $[4] = t5;
  } else {
    t5 = $[4];
  }
  return t5;
};
const BellCogIcon = (t0) => {
  const $ = compilerRuntimeExports.c(12);
  const {
    stroke: t1
  } = t0;
  const stroke = t1 === void 0 ? "#98A2B3" : t1;
  let t10;
  let t11;
  let t2;
  let t3;
  let t4;
  let t5;
  let t6;
  let t7;
  let t8;
  let t9;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" });
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 17h-8a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6a2 2 0 1 1 4 0a7 7 0 0 1 4 6v.5" });
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" });
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19.001 15.5v1.5" });
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19.001 21v1.5" });
    t7 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M22.032 17.25l-1.299 .75" });
    t8 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M17.27 20l-1.3 .75" });
    t9 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M15.97 17.25l1.3 .75" });
    t10 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M20.733 20l1.3 .75" });
    t11 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9 17v1a3 3 0 0 0 3 3" });
    $[0] = t10;
    $[1] = t11;
    $[2] = t2;
    $[3] = t3;
    $[4] = t4;
    $[5] = t5;
    $[6] = t6;
    $[7] = t7;
    $[8] = t8;
    $[9] = t9;
  } else {
    t10 = $[0];
    t11 = $[1];
    t2 = $[2];
    t3 = $[3];
    t4 = $[4];
    t5 = $[5];
    t6 = $[6];
    t7 = $[7];
    t8 = $[8];
    t9 = $[9];
  }
  let t12;
  if ($[10] !== stroke) {
    t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
      t2,
      t3,
      t4,
      t5,
      t6,
      t7,
      t8,
      t9,
      t10,
      t11
    ] });
    $[10] = stroke;
    $[11] = t12;
  } else {
    t12 = $[11];
  }
  return t12;
};
const themeColors = {
  main: ["#e2f8ff", "#ceeaff", "#9fd1fb", "#6db8f5", "#43a2f1", "#2894ef", "#118eef", "#007ad6", "#006dc1", "#005dac"],
  mainBlue: [
    "#ebf1fb",
    "#84a9e8",
    "#779fe5",
    "#6996e3",
    "#5b8ce0",
    "#4e82dd",
    "#4079db",
    "#326fd8",
    "#0000ee",
    //links
    "#175cd3"
  ],
  backgroundGray: ["#f9fafb", "#f2f3f4", "#ebeced", "#e4e4e5", "#ddddde", "#d5d6d7", "#f2f4f7", "#c7c8c8", "#c0c1c1", "#b9b9ba"],
  indigo: ["#4e5ba6", "#5865ab", "#636eb0", "#6d78b6", "#7882bb", "#828bc0", "#8c95c5", "#979fcb", "#a1a8d0", "#e0e2ef"],
  brandOrange: ["#f79009", "#f79717", "#f89d26", "#f8a434", "#f9aa43", "#f9b151", "#fab760", "#fabe6e", "#fbc47d", "#feebd4"],
  brandGray: [
    "#667085",
    "#EAECF0",
    // button, border, bg
    "#eff0f4",
    // disabled button
    "#81899b",
    "#8a92a2",
    "#939aa9",
    "#9ca2b0",
    "#a5abb7",
    "#aeb3be",
    "#b7bcc6"
  ],
  brandRed: [
    "#C01048",
    // text
    "#C23939",
    // button
    "#c72c5e",
    "#cb3a68",
    "#cf4873",
    "#d3567e",
    "#d66489",
    "#da7293",
    "#de809e",
    "#e18fa9"
  ],
  // Update to new UI
  accent: colorsTuple("#339AF0"),
  primary: colorsTuple("#31394A"),
  secondary: colorsTuple("#818DA1"),
  warning: colorsTuple("#FA5252"),
  grey: ["#F7F9FB", "#EEF3F9", "#E6EDF5", "#DAE3ED", "#C9D3E0", "#A9B4C6", "#818DA1", "#4C576A", "#31394A", "#1E232E"],
  grey05: ["#F3F6FA", "#EAF0F7", "#E0E8F1", "#D3DBE7", "#BAC5D4", "#95A1B4", "#636E82", "#3B4557", "#272E3C", "#1C212B"]
};
var TailType = /* @__PURE__ */ ((TailType2) => {
  TailType2[TailType2["Module"] = 0] = "Module";
  TailType2[TailType2["Integration"] = 1] = "Integration";
  TailType2[TailType2["Link"] = 2] = "Link";
  return TailType2;
})(TailType || {});
var Modules = /* @__PURE__ */ ((Modules2) => {
  Modules2[Modules2["None"] = 0] = "None";
  Modules2[Modules2["Mail"] = 1] = "Mail";
  Modules2[Modules2["Calendar"] = 2] = "Calendar";
  Modules2[Modules2["Disk"] = 3] = "Disk";
  Modules2[Modules2["Admin"] = 4] = "Admin";
  Modules2[Modules2["Draw"] = 5] = "Draw";
  Modules2[Modules2["Commands"] = 6] = "Commands";
  Modules2[Modules2["Payments"] = 7] = "Payments";
  Modules2[Modules2["Contacts"] = 8] = "Contacts";
  Modules2[Modules2["Team"] = 9] = "Team";
  Modules2[Modules2["Projects"] = 10] = "Projects";
  Modules2[Modules2["Pages"] = 11] = "Pages";
  Modules2[Modules2["Forms"] = 12] = "Forms";
  return Modules2;
})(Modules || {});
var AccessType = /* @__PURE__ */ ((AccessType2) => {
  AccessType2[AccessType2["Deny"] = -4096] = "Deny";
  AccessType2[AccessType2["OnlyUpload"] = -1024] = "OnlyUpload";
  AccessType2[AccessType2["FreeBusy"] = -64] = "FreeBusy";
  AccessType2[AccessType2["CanDownload"] = -16] = "CanDownload";
  AccessType2[AccessType2["Read"] = 0] = "Read";
  AccessType2[AccessType2["Comment"] = 1] = "Comment";
  AccessType2[AccessType2["Review"] = 2] = "Review";
  AccessType2[AccessType2["Write"] = 4] = "Write";
  AccessType2[AccessType2["Delete"] = 8] = "Delete";
  AccessType2[AccessType2["FullInternal"] = 256] = "FullInternal";
  AccessType2[AccessType2["Full"] = 512] = "Full";
  AccessType2[AccessType2["Lock"] = 4096] = "Lock";
  AccessType2[AccessType2["LockPrint"] = 8192] = "LockPrint";
  AccessType2[AccessType2["LockCopy"] = 16384] = "LockCopy";
  AccessType2[AccessType2["LockDownload"] = 32768] = "LockDownload";
  AccessType2[AccessType2["Guest"] = 65536] = "Guest";
  return AccessType2;
})(AccessType || {});
function bind(fn, thisArg) {
  return function wrap() {
    return fn.apply(thisArg, arguments);
  };
}
const { toString } = Object.prototype;
const { getPrototypeOf } = Object;
const { iterator, toStringTag } = Symbol;
const kindOf = /* @__PURE__ */ ((cache2) => (thing) => {
  const str = toString.call(thing);
  return cache2[str] || (cache2[str] = str.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null));
const kindOfTest = (type2) => {
  type2 = type2.toLowerCase();
  return (thing) => kindOf(thing) === type2;
};
const typeOfTest = (type2) => (thing) => typeof thing === type2;
const { isArray } = Array;
const isUndefined$1 = typeOfTest("undefined");
function isBuffer(val) {
  return val !== null && !isUndefined$1(val) && val.constructor !== null && !isUndefined$1(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
}
const isArrayBuffer = kindOfTest("ArrayBuffer");
function isArrayBufferView(val) {
  let result;
  if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
    result = ArrayBuffer.isView(val);
  } else {
    result = val && val.buffer && isArrayBuffer(val.buffer);
  }
  return result;
}
const isString$1 = typeOfTest("string");
const isFunction$1 = typeOfTest("function");
const isNumber$1 = typeOfTest("number");
const isObject = (thing) => thing !== null && typeof thing === "object";
const isBoolean = (thing) => thing === true || thing === false;
const isPlainObject = (val) => {
  if (kindOf(val) !== "object") {
    return false;
  }
  const prototype2 = getPrototypeOf(val);
  return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
};
const isEmptyObject = (val) => {
  if (!isObject(val) || isBuffer(val)) {
    return false;
  }
  try {
    return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
  } catch (e) {
    return false;
  }
};
const isDate$1 = kindOfTest("Date");
const isFile = kindOfTest("File");
const isBlob = kindOfTest("Blob");
const isFileList = kindOfTest("FileList");
const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
const isFormData = (thing) => {
  let kind;
  return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
  kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
};
const isURLSearchParams = kindOfTest("URLSearchParams");
const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function forEach(obj, fn, { allOwnKeys = false } = {}) {
  if (obj === null || typeof obj === "undefined") {
    return;
  }
  let i;
  let l2;
  if (typeof obj !== "object") {
    obj = [obj];
  }
  if (isArray(obj)) {
    for (i = 0, l2 = obj.length; i < l2; i++) {
      fn.call(null, obj[i], i, obj);
    }
  } else {
    if (isBuffer(obj)) {
      return;
    }
    const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
    const len = keys.length;
    let key;
    for (i = 0; i < len; i++) {
      key = keys[i];
      fn.call(null, obj[key], key, obj);
    }
  }
}
function findKey(obj, key) {
  if (isBuffer(obj)) {
    return null;
  }
  key = key.toLowerCase();
  const keys = Object.keys(obj);
  let i = keys.length;
  let _key;
  while (i-- > 0) {
    _key = keys[i];
    if (key === _key.toLowerCase()) {
      return _key;
    }
  }
  return null;
}
const _global = (() => {
  if (typeof globalThis !== "undefined") return globalThis;
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
})();
const isContextDefined = (context) => !isUndefined$1(context) && context !== _global;
function merge() {
  const { caseless, skipUndefined } = isContextDefined(this) && this || {};
  const result = {};
  const assignValue = (val, key) => {
    const targetKey = caseless && findKey(result, key) || key;
    if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
      result[targetKey] = merge(result[targetKey], val);
    } else if (isPlainObject(val)) {
      result[targetKey] = merge({}, val);
    } else if (isArray(val)) {
      result[targetKey] = val.slice();
    } else if (!skipUndefined || !isUndefined$1(val)) {
      result[targetKey] = val;
    }
  };
  for (let i = 0, l2 = arguments.length; i < l2; i++) {
    arguments[i] && forEach(arguments[i], assignValue);
  }
  return result;
}
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
  forEach(b, (val, key) => {
    if (thisArg && isFunction$1(val)) {
      Object.defineProperty(a, key, {
        value: bind(val, thisArg),
        writable: true,
        enumerable: true,
        configurable: true
      });
    } else {
      Object.defineProperty(a, key, {
        value: val,
        writable: true,
        enumerable: true,
        configurable: true
      });
    }
  }, { allOwnKeys });
  return a;
};
const stripBOM = (content) => {
  if (content.charCodeAt(0) === 65279) {
    content = content.slice(1);
  }
  return content;
};
const inherits = (constructor, superConstructor, props, descriptors) => {
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
  Object.defineProperty(constructor.prototype, "constructor", {
    value: constructor,
    writable: true,
    enumerable: false,
    configurable: true
  });
  Object.defineProperty(constructor, "super", {
    value: superConstructor.prototype
  });
  props && Object.assign(constructor.prototype, props);
};
const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
  let props;
  let i;
  let prop;
  const merged = {};
  destObj = destObj || {};
  if (sourceObj == null) return destObj;
  do {
    props = Object.getOwnPropertyNames(sourceObj);
    i = props.length;
    while (i-- > 0) {
      prop = props[i];
      if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
        destObj[prop] = sourceObj[prop];
        merged[prop] = true;
      }
    }
    sourceObj = filter2 !== false && getPrototypeOf(sourceObj);
  } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);
  return destObj;
};
const endsWith = (str, searchString, position) => {
  str = String(str);
  if (position === void 0 || position > str.length) {
    position = str.length;
  }
  position -= searchString.length;
  const lastIndex = str.indexOf(searchString, position);
  return lastIndex !== -1 && lastIndex === position;
};
const toArray = (thing) => {
  if (!thing) return null;
  if (isArray(thing)) return thing;
  let i = thing.length;
  if (!isNumber$1(i)) return null;
  const arr = new Array(i);
  while (i-- > 0) {
    arr[i] = thing[i];
  }
  return arr;
};
const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
  return (thing) => {
    return TypedArray && thing instanceof TypedArray;
  };
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
const forEachEntry = (obj, fn) => {
  const generator = obj && obj[iterator];
  const _iterator = generator.call(obj);
  let result;
  while ((result = _iterator.next()) && !result.done) {
    const pair = result.value;
    fn.call(obj, pair[0], pair[1]);
  }
};
const matchAll = (regExp, str) => {
  let matches2;
  const arr = [];
  while ((matches2 = regExp.exec(str)) !== null) {
    arr.push(matches2);
  }
  return arr;
};
const isHTMLForm = kindOfTest("HTMLFormElement");
const toCamelCase = (str) => {
  return str.toLowerCase().replace(
    /[-_\s]([a-z\d])(\w*)/g,
    function replacer(m, p1, p2) {
      return p1.toUpperCase() + p2;
    }
  );
};
const hasOwnProperty$1 = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
const isRegExp = kindOfTest("RegExp");
const reduceDescriptors = (obj, reducer) => {
  const descriptors = Object.getOwnPropertyDescriptors(obj);
  const reducedDescriptors = {};
  forEach(descriptors, (descriptor, name2) => {
    let ret;
    if ((ret = reducer(descriptor, name2, obj)) !== false) {
      reducedDescriptors[name2] = ret || descriptor;
    }
  });
  Object.defineProperties(obj, reducedDescriptors);
};
const freezeMethods = (obj) => {
  reduceDescriptors(obj, (descriptor, name2) => {
    if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name2) !== -1) {
      return false;
    }
    const value = obj[name2];
    if (!isFunction$1(value)) return;
    descriptor.enumerable = false;
    if ("writable" in descriptor) {
      descriptor.writable = false;
      return;
    }
    if (!descriptor.set) {
      descriptor.set = () => {
        throw Error("Can not rewrite read-only method '" + name2 + "'");
      };
    }
  });
};
const toObjectSet = (arrayOrString, delimiter) => {
  const obj = {};
  const define = (arr) => {
    arr.forEach((value) => {
      obj[value] = true;
    });
  };
  isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
  return obj;
};
const noop = () => {
};
const toFiniteNumber = (value, defaultValue) => {
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
};
function isSpecCompliantForm(thing) {
  return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
}
const toJSONObject = (obj) => {
  const stack = new Array(10);
  const visit = (source, i) => {
    if (isObject(source)) {
      if (stack.indexOf(source) >= 0) {
        return;
      }
      if (isBuffer(source)) {
        return source;
      }
      if (!("toJSON" in source)) {
        stack[i] = source;
        const target = isArray(source) ? [] : {};
        forEach(source, (value, key) => {
          const reducedValue = visit(value, i + 1);
          !isUndefined$1(reducedValue) && (target[key] = reducedValue);
        });
        stack[i] = void 0;
        return target;
      }
    }
    return source;
  };
  return visit(obj, 0);
};
const isAsyncFn = kindOfTest("AsyncFunction");
const isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
  if (setImmediateSupported) {
    return setImmediate;
  }
  return postMessageSupported ? ((token, callbacks) => {
    _global.addEventListener("message", ({ source, data }) => {
      if (source === _global && data === token) {
        callbacks.length && callbacks.shift()();
      }
    }, false);
    return (cb) => {
      callbacks.push(cb);
      _global.postMessage(token, "*");
    };
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
})(
  typeof setImmediate === "function",
  isFunction$1(_global.postMessage)
);
const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
const utils$1 = {
  isArray,
  isArrayBuffer,
  isBuffer,
  isFormData,
  isArrayBufferView,
  isString: isString$1,
  isNumber: isNumber$1,
  isBoolean,
  isObject,
  isPlainObject,
  isEmptyObject,
  isReadableStream,
  isRequest,
  isResponse,
  isHeaders,
  isUndefined: isUndefined$1,
  isDate: isDate$1,
  isFile,
  isBlob,
  isRegExp,
  isFunction: isFunction$1,
  isStream,
  isURLSearchParams,
  isTypedArray,
  isFileList,
  forEach,
  merge,
  extend,
  trim,
  stripBOM,
  inherits,
  toFlatObject,
  kindOf,
  kindOfTest,
  endsWith,
  toArray,
  forEachEntry,
  matchAll,
  isHTMLForm,
  hasOwnProperty: hasOwnProperty$1,
  hasOwnProp: hasOwnProperty$1,
  // an alias to avoid ESLint no-prototype-builtins detection
  reduceDescriptors,
  freezeMethods,
  toObjectSet,
  toCamelCase,
  noop,
  toFiniteNumber,
  findKey,
  global: _global,
  isContextDefined,
  isSpecCompliantForm,
  toJSONObject,
  isAsyncFn,
  isThenable,
  setImmediate: _setImmediate,
  asap,
  isIterable
};
let AxiosError$1 = class AxiosError extends Error {
  static from(error, code, config, request, response, customProps) {
    const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
    axiosError.cause = error;
    axiosError.name = error.name;
    customProps && Object.assign(axiosError, customProps);
    return axiosError;
  }
  /**
   * Create an Error with the specified message, config, error code, request and response.
   *
   * @param {string} message The error message.
   * @param {string} [code] The error code (for example, 'ECONNABORTED').
   * @param {Object} [config] The config.
   * @param {Object} [request] The request.
   * @param {Object} [response] The response.
   *
   * @returns {Error} The created error.
   */
  constructor(message, code, config, request, response) {
    super(message);
    this.name = "AxiosError";
    this.isAxiosError = true;
    code && (this.code = code);
    config && (this.config = config);
    request && (this.request = request);
    if (response) {
      this.response = response;
      this.status = response.status;
    }
  }
  toJSON() {
    return {
      // Standard
      message: this.message,
      name: this.name,
      // Microsoft
      description: this.description,
      number: this.number,
      // Mozilla
      fileName: this.fileName,
      lineNumber: this.lineNumber,
      columnNumber: this.columnNumber,
      stack: this.stack,
      // Axios
      config: utils$1.toJSONObject(this.config),
      code: this.code,
      status: this.status
    };
  }
};
AxiosError$1.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
AxiosError$1.ERR_BAD_OPTION = "ERR_BAD_OPTION";
AxiosError$1.ECONNABORTED = "ECONNABORTED";
AxiosError$1.ETIMEDOUT = "ETIMEDOUT";
AxiosError$1.ERR_NETWORK = "ERR_NETWORK";
AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
AxiosError$1.ERR_DEPRECATED = "ERR_DEPRECATED";
AxiosError$1.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
AxiosError$1.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
AxiosError$1.ERR_CANCELED = "ERR_CANCELED";
AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL";
const httpAdapter = null;
function isVisitable(thing) {
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
}
function removeBrackets(key) {
  return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
}
function renderKey(path, key, dots) {
  if (!path) return key;
  return path.concat(key).map(function each2(token, i) {
    token = removeBrackets(token);
    return !dots && i ? "[" + token + "]" : token;
  }).join(dots ? "." : "");
}
function isFlatArray(arr) {
  return utils$1.isArray(arr) && !arr.some(isVisitable);
}
const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
  return /^is[A-Z]/.test(prop);
});
function toFormData$1(obj, formData, options) {
  if (!utils$1.isObject(obj)) {
    throw new TypeError("target must be an object");
  }
  formData = formData || new FormData();
  options = utils$1.toFlatObject(options, {
    metaTokens: true,
    dots: false,
    indexes: false
  }, false, function defined(option, source) {
    return !utils$1.isUndefined(source[option]);
  });
  const metaTokens = options.metaTokens;
  const visitor = options.visitor || defaultVisitor;
  const dots = options.dots;
  const indexes = options.indexes;
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
  if (!utils$1.isFunction(visitor)) {
    throw new TypeError("visitor must be a function");
  }
  function convertValue(value) {
    if (value === null) return "";
    if (utils$1.isDate(value)) {
      return value.toISOString();
    }
    if (utils$1.isBoolean(value)) {
      return value.toString();
    }
    if (!useBlob && utils$1.isBlob(value)) {
      throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
    }
    if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
      return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
    }
    return value;
  }
  function defaultVisitor(value, key, path) {
    let arr = value;
    if (value && !path && typeof value === "object") {
      if (utils$1.endsWith(key, "{}")) {
        key = metaTokens ? key : key.slice(0, -2);
        value = JSON.stringify(value);
      } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
        key = removeBrackets(key);
        arr.forEach(function each2(el, index) {
          !(utils$1.isUndefined(el) || el === null) && formData.append(
            // eslint-disable-next-line no-nested-ternary
            indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
            convertValue(el)
          );
        });
        return false;
      }
    }
    if (isVisitable(value)) {
      return true;
    }
    formData.append(renderKey(path, key, dots), convertValue(value));
    return false;
  }
  const stack = [];
  const exposedHelpers = Object.assign(predicates, {
    defaultVisitor,
    convertValue,
    isVisitable
  });
  function build(value, path) {
    if (utils$1.isUndefined(value)) return;
    if (stack.indexOf(value) !== -1) {
      throw Error("Circular reference detected in " + path.join("."));
    }
    stack.push(value);
    utils$1.forEach(value, function each2(el, key) {
      const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
        formData,
        el,
        utils$1.isString(key) ? key.trim() : key,
        path,
        exposedHelpers
      );
      if (result === true) {
        build(el, path ? path.concat(key) : [key]);
      }
    });
    stack.pop();
  }
  if (!utils$1.isObject(obj)) {
    throw new TypeError("data must be an object");
  }
  build(obj);
  return formData;
}
function encode$1(str) {
  const charMap = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
    "%00": "\0"
  };
  return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match2) {
    return charMap[match2];
  });
}
function AxiosURLSearchParams(params, options) {
  this._pairs = [];
  params && toFormData$1(params, this, options);
}
const prototype = AxiosURLSearchParams.prototype;
prototype.append = function append(name2, value) {
  this._pairs.push([name2, value]);
};
prototype.toString = function toString2(encoder) {
  const _encode = encoder ? function(value) {
    return encoder.call(this, value, encode$1);
  } : encode$1;
  return this._pairs.map(function each2(pair) {
    return _encode(pair[0]) + "=" + _encode(pair[1]);
  }, "").join("&");
};
function encode(val) {
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
}
function buildURL(url, params, options) {
  if (!params) {
    return url;
  }
  const _encode = options && options.encode || encode;
  const _options = utils$1.isFunction(options) ? {
    serialize: options
  } : options;
  const serializeFn = _options && _options.serialize;
  let serializedParams;
  if (serializeFn) {
    serializedParams = serializeFn(params, _options);
  } else {
    serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
  }
  if (serializedParams) {
    const hashmarkIndex = url.indexOf("#");
    if (hashmarkIndex !== -1) {
      url = url.slice(0, hashmarkIndex);
    }
    url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  }
  return url;
}
class InterceptorManager {
  constructor() {
    this.handlers = [];
  }
  /**
   * Add a new interceptor to the stack
   *
   * @param {Function} fulfilled The function to handle `then` for a `Promise`
   * @param {Function} rejected The function to handle `reject` for a `Promise`
   * @param {Object} options The options for the interceptor, synchronous and runWhen
   *
   * @return {Number} An ID used to remove interceptor later
   */
  use(fulfilled, rejected, options) {
    this.handlers.push({
      fulfilled,
      rejected,
      synchronous: options ? options.synchronous : false,
      runWhen: options ? options.runWhen : null
    });
    return this.handlers.length - 1;
  }
  /**
   * Remove an interceptor from the stack
   *
   * @param {Number} id The ID that was returned by `use`
   *
   * @returns {void}
   */
  eject(id) {
    if (this.handlers[id]) {
      this.handlers[id] = null;
    }
  }
  /**
   * Clear all interceptors from the stack
   *
   * @returns {void}
   */
  clear() {
    if (this.handlers) {
      this.handlers = [];
    }
  }
  /**
   * Iterate over all the registered interceptors
   *
   * This method is particularly useful for skipping over any
   * interceptors that may have become `null` calling `eject`.
   *
   * @param {Function} fn The function to call for each interceptor
   *
   * @returns {void}
   */
  forEach(fn) {
    utils$1.forEach(this.handlers, function forEachHandler(h) {
      if (h !== null) {
        fn(h);
      }
    });
  }
}
const transitionalDefaults = {
  silentJSONParsing: true,
  forcedJSONParsing: true,
  clarifyTimeoutError: false
};
const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
const platform$1 = {
  isBrowser: true,
  classes: {
    URLSearchParams: URLSearchParams$1,
    FormData: FormData$1,
    Blob: Blob$1
  },
  protocols: ["http", "https", "file", "blob", "url", "data"]
};
const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
const _navigator = typeof navigator === "object" && navigator || void 0;
const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
const hasStandardBrowserWebWorkerEnv = (() => {
  return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
  self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
})();
const origin = hasBrowserEnv && window.location.href || "http://localhost";
const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  hasBrowserEnv,
  hasStandardBrowserEnv,
  hasStandardBrowserWebWorkerEnv,
  navigator: _navigator,
  origin
}, Symbol.toStringTag, { value: "Module" }));
const platform = {
  ...utils,
  ...platform$1
};
function toURLEncodedForm(data, options) {
  return toFormData$1(data, new platform.classes.URLSearchParams(), {
    visitor: function(value, key, path, helpers) {
      if (platform.isNode && utils$1.isBuffer(value)) {
        this.append(key, value.toString("base64"));
        return false;
      }
      return helpers.defaultVisitor.apply(this, arguments);
    },
    ...options
  });
}
function parsePropPath(name2) {
  return utils$1.matchAll(/\w+|\[(\w*)]/g, name2).map((match2) => {
    return match2[0] === "[]" ? "" : match2[1] || match2[0];
  });
}
function arrayToObject(arr) {
  const obj = {};
  const keys = Object.keys(arr);
  let i;
  const len = keys.length;
  let key;
  for (i = 0; i < len; i++) {
    key = keys[i];
    obj[key] = arr[key];
  }
  return obj;
}
function formDataToJSON(formData) {
  function buildPath(path, value, target, index) {
    let name2 = path[index++];
    if (name2 === "__proto__") return true;
    const isNumericKey = Number.isFinite(+name2);
    const isLast = index >= path.length;
    name2 = !name2 && utils$1.isArray(target) ? target.length : name2;
    if (isLast) {
      if (utils$1.hasOwnProp(target, name2)) {
        target[name2] = [target[name2], value];
      } else {
        target[name2] = value;
      }
      return !isNumericKey;
    }
    if (!target[name2] || !utils$1.isObject(target[name2])) {
      target[name2] = [];
    }
    const result = buildPath(path, value, target[name2], index);
    if (result && utils$1.isArray(target[name2])) {
      target[name2] = arrayToObject(target[name2]);
    }
    return !isNumericKey;
  }
  if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
    const obj = {};
    utils$1.forEachEntry(formData, (name2, value) => {
      buildPath(parsePropPath(name2), value, obj, 0);
    });
    return obj;
  }
  return null;
}
function stringifySafely(rawValue, parser, encoder) {
  if (utils$1.isString(rawValue)) {
    try {
      (parser || JSON.parse)(rawValue);
      return utils$1.trim(rawValue);
    } catch (e) {
      if (e.name !== "SyntaxError") {
        throw e;
      }
    }
  }
  return (encoder || JSON.stringify)(rawValue);
}
const defaults = {
  transitional: transitionalDefaults,
  adapter: ["xhr", "http", "fetch"],
  transformRequest: [function transformRequest(data, headers) {
    const contentType = headers.getContentType() || "";
    const hasJSONContentType = contentType.indexOf("application/json") > -1;
    const isObjectPayload = utils$1.isObject(data);
    if (isObjectPayload && utils$1.isHTMLForm(data)) {
      data = new FormData(data);
    }
    const isFormData2 = utils$1.isFormData(data);
    if (isFormData2) {
      return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
    }
    if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
      return data;
    }
    if (utils$1.isArrayBufferView(data)) {
      return data.buffer;
    }
    if (utils$1.isURLSearchParams(data)) {
      headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
      return data.toString();
    }
    let isFileList2;
    if (isObjectPayload) {
      if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
        return toURLEncodedForm(data, this.formSerializer).toString();
      }
      if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
        const _FormData = this.env && this.env.FormData;
        return toFormData$1(
          isFileList2 ? { "files[]": data } : data,
          _FormData && new _FormData(),
          this.formSerializer
        );
      }
    }
    if (isObjectPayload || hasJSONContentType) {
      headers.setContentType("application/json", false);
      return stringifySafely(data);
    }
    return data;
  }],
  transformResponse: [function transformResponse(data) {
    const transitional2 = this.transitional || defaults.transitional;
    const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
    const JSONRequested = this.responseType === "json";
    if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
      return data;
    }
    if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
      const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
      const strictJSONParsing = !silentJSONParsing && JSONRequested;
      try {
        return JSON.parse(data, this.parseReviver);
      } catch (e) {
        if (strictJSONParsing) {
          if (e.name === "SyntaxError") {
            throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
          }
          throw e;
        }
      }
    }
    return data;
  }],
  /**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */
  timeout: 0,
  xsrfCookieName: "XSRF-TOKEN",
  xsrfHeaderName: "X-XSRF-TOKEN",
  maxContentLength: -1,
  maxBodyLength: -1,
  env: {
    FormData: platform.classes.FormData,
    Blob: platform.classes.Blob
  },
  validateStatus: function validateStatus(status) {
    return status >= 200 && status < 300;
  },
  headers: {
    common: {
      "Accept": "application/json, text/plain, */*",
      "Content-Type": void 0
    }
  }
};
utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
  defaults.headers[method] = {};
});
const ignoreDuplicateOf = utils$1.toObjectSet([
  "age",
  "authorization",
  "content-length",
  "content-type",
  "etag",
  "expires",
  "from",
  "host",
  "if-modified-since",
  "if-unmodified-since",
  "last-modified",
  "location",
  "max-forwards",
  "proxy-authorization",
  "referer",
  "retry-after",
  "user-agent"
]);
const parseHeaders = (rawHeaders) => {
  const parsed = {};
  let key;
  let val;
  let i;
  rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
    i = line.indexOf(":");
    key = line.substring(0, i).trim().toLowerCase();
    val = line.substring(i + 1).trim();
    if (!key || parsed[key] && ignoreDuplicateOf[key]) {
      return;
    }
    if (key === "set-cookie") {
      if (parsed[key]) {
        parsed[key].push(val);
      } else {
        parsed[key] = [val];
      }
    } else {
      parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
    }
  });
  return parsed;
};
const $internals = Symbol("internals");
function normalizeHeader(header2) {
  return header2 && String(header2).trim().toLowerCase();
}
function normalizeValue(value) {
  if (value === false || value == null) {
    return value;
  }
  return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
}
function parseTokens(str) {
  const tokens = /* @__PURE__ */ Object.create(null);
  const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  let match2;
  while (match2 = tokensRE.exec(str)) {
    tokens[match2[1]] = match2[2];
  }
  return tokens;
}
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
function matchHeaderValue(context, value, header2, filter2, isHeaderNameFilter) {
  if (utils$1.isFunction(filter2)) {
    return filter2.call(this, value, header2);
  }
  if (isHeaderNameFilter) {
    value = header2;
  }
  if (!utils$1.isString(value)) return;
  if (utils$1.isString(filter2)) {
    return value.indexOf(filter2) !== -1;
  }
  if (utils$1.isRegExp(filter2)) {
    return filter2.test(value);
  }
}
function formatHeader(header2) {
  return header2.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
    return char.toUpperCase() + str;
  });
}
function buildAccessors(obj, header2) {
  const accessorName = utils$1.toCamelCase(" " + header2);
  ["get", "set", "has"].forEach((methodName) => {
    Object.defineProperty(obj, methodName + accessorName, {
      value: function(arg1, arg2, arg3) {
        return this[methodName].call(this, header2, arg1, arg2, arg3);
      },
      configurable: true
    });
  });
}
let AxiosHeaders$1 = class AxiosHeaders {
  constructor(headers) {
    headers && this.set(headers);
  }
  set(header2, valueOrRewrite, rewrite) {
    const self2 = this;
    function setHeader(_value, _header, _rewrite) {
      const lHeader = normalizeHeader(_header);
      if (!lHeader) {
        throw new Error("header name must be a non-empty string");
      }
      const key = utils$1.findKey(self2, lHeader);
      if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
        self2[key || _header] = normalizeValue(_value);
      }
    }
    const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
    if (utils$1.isPlainObject(header2) || header2 instanceof this.constructor) {
      setHeaders(header2, valueOrRewrite);
    } else if (utils$1.isString(header2) && (header2 = header2.trim()) && !isValidHeaderName(header2)) {
      setHeaders(parseHeaders(header2), valueOrRewrite);
    } else if (utils$1.isObject(header2) && utils$1.isIterable(header2)) {
      let obj = {}, dest, key;
      for (const entry of header2) {
        if (!utils$1.isArray(entry)) {
          throw TypeError("Object iterator must return a key-value pair");
        }
        obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
      }
      setHeaders(obj, valueOrRewrite);
    } else {
      header2 != null && setHeader(valueOrRewrite, header2, rewrite);
    }
    return this;
  }
  get(header2, parser) {
    header2 = normalizeHeader(header2);
    if (header2) {
      const key = utils$1.findKey(this, header2);
      if (key) {
        const value = this[key];
        if (!parser) {
          return value;
        }
        if (parser === true) {
          return parseTokens(value);
        }
        if (utils$1.isFunction(parser)) {
          return parser.call(this, value, key);
        }
        if (utils$1.isRegExp(parser)) {
          return parser.exec(value);
        }
        throw new TypeError("parser must be boolean|regexp|function");
      }
    }
  }
  has(header2, matcher) {
    header2 = normalizeHeader(header2);
    if (header2) {
      const key = utils$1.findKey(this, header2);
      return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
    }
    return false;
  }
  delete(header2, matcher) {
    const self2 = this;
    let deleted2 = false;
    function deleteHeader(_header) {
      _header = normalizeHeader(_header);
      if (_header) {
        const key = utils$1.findKey(self2, _header);
        if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
          delete self2[key];
          deleted2 = true;
        }
      }
    }
    if (utils$1.isArray(header2)) {
      header2.forEach(deleteHeader);
    } else {
      deleteHeader(header2);
    }
    return deleted2;
  }
  clear(matcher) {
    const keys = Object.keys(this);
    let i = keys.length;
    let deleted2 = false;
    while (i--) {
      const key = keys[i];
      if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
        delete this[key];
        deleted2 = true;
      }
    }
    return deleted2;
  }
  normalize(format) {
    const self2 = this;
    const headers = {};
    utils$1.forEach(this, (value, header2) => {
      const key = utils$1.findKey(headers, header2);
      if (key) {
        self2[key] = normalizeValue(value);
        delete self2[header2];
        return;
      }
      const normalized = format ? formatHeader(header2) : String(header2).trim();
      if (normalized !== header2) {
        delete self2[header2];
      }
      self2[normalized] = normalizeValue(value);
      headers[normalized] = true;
    });
    return this;
  }
  concat(...targets) {
    return this.constructor.concat(this, ...targets);
  }
  toJSON(asStrings) {
    const obj = /* @__PURE__ */ Object.create(null);
    utils$1.forEach(this, (value, header2) => {
      value != null && value !== false && (obj[header2] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
    });
    return obj;
  }
  [Symbol.iterator]() {
    return Object.entries(this.toJSON())[Symbol.iterator]();
  }
  toString() {
    return Object.entries(this.toJSON()).map(([header2, value]) => header2 + ": " + value).join("\n");
  }
  getSetCookie() {
    return this.get("set-cookie") || [];
  }
  get [Symbol.toStringTag]() {
    return "AxiosHeaders";
  }
  static from(thing) {
    return thing instanceof this ? thing : new this(thing);
  }
  static concat(first, ...targets) {
    const computed = new this(first);
    targets.forEach((target) => computed.set(target));
    return computed;
  }
  static accessor(header2) {
    const internals = this[$internals] = this[$internals] = {
      accessors: {}
    };
    const accessors = internals.accessors;
    const prototype2 = this.prototype;
    function defineAccessor(_header) {
      const lHeader = normalizeHeader(_header);
      if (!accessors[lHeader]) {
        buildAccessors(prototype2, _header);
        accessors[lHeader] = true;
      }
    }
    utils$1.isArray(header2) ? header2.forEach(defineAccessor) : defineAccessor(header2);
    return this;
  }
};
AxiosHeaders$1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
  let mapped = key[0].toUpperCase() + key.slice(1);
  return {
    get: () => value,
    set(headerValue) {
      this[mapped] = headerValue;
    }
  };
});
utils$1.freezeMethods(AxiosHeaders$1);
function transformData(fns, response) {
  const config = this || defaults;
  const context = response || config;
  const headers = AxiosHeaders$1.from(context.headers);
  let data = context.data;
  utils$1.forEach(fns, function transform(fn) {
    data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
  });
  headers.normalize();
  return data;
}
function isCancel$1(value) {
  return !!(value && value.__CANCEL__);
}
let CanceledError$1 = class CanceledError extends AxiosError$1 {
  /**
   * A `CanceledError` is an object that is thrown when an operation is canceled.
   *
   * @param {string=} message The message.
   * @param {Object=} config The config.
   * @param {Object=} request The request.
   *
   * @returns {CanceledError} The created error.
   */
  constructor(message, config, request) {
    super(message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
    this.name = "CanceledError";
    this.__CANCEL__ = true;
  }
};
function settle(resolve, reject, response) {
  const validateStatus2 = response.config.validateStatus;
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
    resolve(response);
  } else {
    reject(new AxiosError$1(
      "Request failed with status code " + response.status,
      [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
      response.config,
      response.request,
      response
    ));
  }
}
function parseProtocol(url) {
  const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  return match2 && match2[1] || "";
}
function speedometer(samplesCount, min) {
  samplesCount = samplesCount || 10;
  const bytes = new Array(samplesCount);
  const timestamps = new Array(samplesCount);
  let head = 0;
  let tail = 0;
  let firstSampleTS;
  min = min !== void 0 ? min : 1e3;
  return function push(chunkLength) {
    const now2 = Date.now();
    const startedAt = timestamps[tail];
    if (!firstSampleTS) {
      firstSampleTS = now2;
    }
    bytes[head] = chunkLength;
    timestamps[head] = now2;
    let i = tail;
    let bytesCount = 0;
    while (i !== head) {
      bytesCount += bytes[i++];
      i = i % samplesCount;
    }
    head = (head + 1) % samplesCount;
    if (head === tail) {
      tail = (tail + 1) % samplesCount;
    }
    if (now2 - firstSampleTS < min) {
      return;
    }
    const passed = startedAt && now2 - startedAt;
    return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
  };
}
function throttle(fn, freq) {
  let timestamp = 0;
  let threshold = 1e3 / freq;
  let lastArgs;
  let timer;
  const invoke = (args, now2 = Date.now()) => {
    timestamp = now2;
    lastArgs = null;
    if (timer) {
      clearTimeout(timer);
      timer = null;
    }
    fn(...args);
  };
  const throttled = (...args) => {
    const now2 = Date.now();
    const passed = now2 - timestamp;
    if (passed >= threshold) {
      invoke(args, now2);
    } else {
      lastArgs = args;
      if (!timer) {
        timer = setTimeout(() => {
          timer = null;
          invoke(lastArgs);
        }, threshold - passed);
      }
    }
  };
  const flush = () => lastArgs && invoke(lastArgs);
  return [throttled, flush];
}
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
  let bytesNotified = 0;
  const _speedometer = speedometer(50, 250);
  return throttle((e) => {
    const loaded = e.loaded;
    const total = e.lengthComputable ? e.total : void 0;
    const progressBytes = loaded - bytesNotified;
    const rate = _speedometer(progressBytes);
    const inRange = loaded <= total;
    bytesNotified = loaded;
    const data = {
      loaded,
      total,
      progress: total ? loaded / total : void 0,
      bytes: progressBytes,
      rate: rate ? rate : void 0,
      estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
      event: e,
      lengthComputable: total != null,
      [isDownloadStream ? "download" : "upload"]: true
    };
    listener(data);
  }, freq);
};
const progressEventDecorator = (total, throttled) => {
  const lengthComputable = total != null;
  return [(loaded) => throttled[0]({
    lengthComputable,
    total,
    loaded
  }), throttled[1]];
};
const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {
  url = new URL(url, platform.origin);
  return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);
})(
  new URL(platform.origin),
  platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
) : () => true;
const cookies = platform.hasStandardBrowserEnv ? (
  // Standard browser envs support document.cookie
  {
    write(name2, value, expires, path, domain, secure, sameSite) {
      if (typeof document === "undefined") return;
      const cookie = [`${name2}=${encodeURIComponent(value)}`];
      if (utils$1.isNumber(expires)) {
        cookie.push(`expires=${new Date(expires).toUTCString()}`);
      }
      if (utils$1.isString(path)) {
        cookie.push(`path=${path}`);
      }
      if (utils$1.isString(domain)) {
        cookie.push(`domain=${domain}`);
      }
      if (secure === true) {
        cookie.push("secure");
      }
      if (utils$1.isString(sameSite)) {
        cookie.push(`SameSite=${sameSite}`);
      }
      document.cookie = cookie.join("; ");
    },
    read(name2) {
      if (typeof document === "undefined") return null;
      const match2 = document.cookie.match(new RegExp("(?:^|; )" + name2 + "=([^;]*)"));
      return match2 ? decodeURIComponent(match2[1]) : null;
    },
    remove(name2) {
      this.write(name2, "", Date.now() - 864e5, "/");
    }
  }
) : (
  // Non-standard browser env (web workers, react-native) lack needed support.
  {
    write() {
    },
    read() {
      return null;
    },
    remove() {
    }
  }
);
function isAbsoluteURL(url) {
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}
function combineURLs(baseURL, relativeURL) {
  return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
}
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
    return combineURLs(baseURL, requestedURL);
  }
  return requestedURL;
}
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
function mergeConfig$1(config1, config2) {
  config2 = config2 || {};
  const config = {};
  function getMergedValue(target, source, prop, caseless) {
    if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
      return utils$1.merge.call({ caseless }, target, source);
    } else if (utils$1.isPlainObject(source)) {
      return utils$1.merge({}, source);
    } else if (utils$1.isArray(source)) {
      return source.slice();
    }
    return source;
  }
  function mergeDeepProperties(a, b, prop, caseless) {
    if (!utils$1.isUndefined(b)) {
      return getMergedValue(a, b, prop, caseless);
    } else if (!utils$1.isUndefined(a)) {
      return getMergedValue(void 0, a, prop, caseless);
    }
  }
  function valueFromConfig2(a, b) {
    if (!utils$1.isUndefined(b)) {
      return getMergedValue(void 0, b);
    }
  }
  function defaultToConfig2(a, b) {
    if (!utils$1.isUndefined(b)) {
      return getMergedValue(void 0, b);
    } else if (!utils$1.isUndefined(a)) {
      return getMergedValue(void 0, a);
    }
  }
  function mergeDirectKeys(a, b, prop) {
    if (prop in config2) {
      return getMergedValue(a, b);
    } else if (prop in config1) {
      return getMergedValue(void 0, a);
    }
  }
  const mergeMap = {
    url: valueFromConfig2,
    method: valueFromConfig2,
    data: valueFromConfig2,
    baseURL: defaultToConfig2,
    transformRequest: defaultToConfig2,
    transformResponse: defaultToConfig2,
    paramsSerializer: defaultToConfig2,
    timeout: defaultToConfig2,
    timeoutMessage: defaultToConfig2,
    withCredentials: defaultToConfig2,
    withXSRFToken: defaultToConfig2,
    adapter: defaultToConfig2,
    responseType: defaultToConfig2,
    xsrfCookieName: defaultToConfig2,
    xsrfHeaderName: defaultToConfig2,
    onUploadProgress: defaultToConfig2,
    onDownloadProgress: defaultToConfig2,
    decompress: defaultToConfig2,
    maxContentLength: defaultToConfig2,
    maxBodyLength: defaultToConfig2,
    beforeRedirect: defaultToConfig2,
    transport: defaultToConfig2,
    httpAgent: defaultToConfig2,
    httpsAgent: defaultToConfig2,
    cancelToken: defaultToConfig2,
    socketPath: defaultToConfig2,
    responseEncoding: defaultToConfig2,
    validateStatus: mergeDirectKeys,
    headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
  };
  utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
    const merge2 = mergeMap[prop] || mergeDeepProperties;
    const configValue = merge2(config1[prop], config2[prop], prop);
    utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
  });
  return config;
}
const resolveConfig = (config) => {
  const newConfig = mergeConfig$1({}, config);
  let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
  newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
  if (auth) {
    headers.set(
      "Authorization",
      "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
    );
  }
  if (utils$1.isFormData(data)) {
    if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
      headers.setContentType(void 0);
    } else if (utils$1.isFunction(data.getHeaders)) {
      const formHeaders = data.getHeaders();
      const allowedHeaders = ["content-type", "content-length"];
      Object.entries(formHeaders).forEach(([key, val]) => {
        if (allowedHeaders.includes(key.toLowerCase())) {
          headers.set(key, val);
        }
      });
    }
  }
  if (platform.hasStandardBrowserEnv) {
    withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
    if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
      const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
      if (xsrfValue) {
        headers.set(xsrfHeaderName, xsrfValue);
      }
    }
  }
  return newConfig;
};
const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
const xhrAdapter = isXHRAdapterSupported && function(config) {
  return new Promise(function dispatchXhrRequest(resolve, reject) {
    const _config = resolveConfig(config);
    let requestData = _config.data;
    const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
    let { responseType, onUploadProgress, onDownloadProgress } = _config;
    let onCanceled;
    let uploadThrottled, downloadThrottled;
    let flushUpload, flushDownload;
    function done() {
      flushUpload && flushUpload();
      flushDownload && flushDownload();
      _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
      _config.signal && _config.signal.removeEventListener("abort", onCanceled);
    }
    let request = new XMLHttpRequest();
    request.open(_config.method.toUpperCase(), _config.url, true);
    request.timeout = _config.timeout;
    function onloadend() {
      if (!request) {
        return;
      }
      const responseHeaders = AxiosHeaders$1.from(
        "getAllResponseHeaders" in request && request.getAllResponseHeaders()
      );
      const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
      const response = {
        data: responseData,
        status: request.status,
        statusText: request.statusText,
        headers: responseHeaders,
        config,
        request
      };
      settle(function _resolve(value) {
        resolve(value);
        done();
      }, function _reject(err) {
        reject(err);
        done();
      }, response);
      request = null;
    }
    if ("onloadend" in request) {
      request.onloadend = onloadend;
    } else {
      request.onreadystatechange = function handleLoad() {
        if (!request || request.readyState !== 4) {
          return;
        }
        if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
          return;
        }
        setTimeout(onloadend);
      };
    }
    request.onabort = function handleAbort() {
      if (!request) {
        return;
      }
      reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
      request = null;
    };
    request.onerror = function handleError(event) {
      const msg = event && event.message ? event.message : "Network Error";
      const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
      err.event = event || null;
      reject(err);
      request = null;
    };
    request.ontimeout = function handleTimeout() {
      let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
      const transitional2 = _config.transitional || transitionalDefaults;
      if (_config.timeoutErrorMessage) {
        timeoutErrorMessage = _config.timeoutErrorMessage;
      }
      reject(new AxiosError$1(
        timeoutErrorMessage,
        transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
        config,
        request
      ));
      request = null;
    };
    requestData === void 0 && requestHeaders.setContentType(null);
    if ("setRequestHeader" in request) {
      utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
        request.setRequestHeader(key, val);
      });
    }
    if (!utils$1.isUndefined(_config.withCredentials)) {
      request.withCredentials = !!_config.withCredentials;
    }
    if (responseType && responseType !== "json") {
      request.responseType = _config.responseType;
    }
    if (onDownloadProgress) {
      [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
      request.addEventListener("progress", downloadThrottled);
    }
    if (onUploadProgress && request.upload) {
      [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
      request.upload.addEventListener("progress", uploadThrottled);
      request.upload.addEventListener("loadend", flushUpload);
    }
    if (_config.cancelToken || _config.signal) {
      onCanceled = (cancel2) => {
        if (!request) {
          return;
        }
        reject(!cancel2 || cancel2.type ? new CanceledError$1(null, config, request) : cancel2);
        request.abort();
        request = null;
      };
      _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
      if (_config.signal) {
        _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
      }
    }
    const protocol = parseProtocol(_config.url);
    if (protocol && platform.protocols.indexOf(protocol) === -1) {
      reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
      return;
    }
    request.send(requestData || null);
  });
};
const composeSignals = (signals, timeout) => {
  const { length } = signals = signals ? signals.filter(Boolean) : [];
  if (timeout || length) {
    let controller = new AbortController();
    let aborted;
    const onabort = function(reason) {
      if (!aborted) {
        aborted = true;
        unsubscribe();
        const err = reason instanceof Error ? reason : this.reason;
        controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
      }
    };
    let timer = timeout && setTimeout(() => {
      timer = null;
      onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
    }, timeout);
    const unsubscribe = () => {
      if (signals) {
        timer && clearTimeout(timer);
        timer = null;
        signals.forEach((signal2) => {
          signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
        });
        signals = null;
      }
    };
    signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
    const { signal } = controller;
    signal.unsubscribe = () => utils$1.asap(unsubscribe);
    return signal;
  }
};
const streamChunk = function* (chunk, chunkSize) {
  let len = chunk.byteLength;
  if (len < chunkSize) {
    yield chunk;
    return;
  }
  let pos = 0;
  let end;
  while (pos < len) {
    end = pos + chunkSize;
    yield chunk.slice(pos, end);
    pos = end;
  }
};
const readBytes = async function* (iterable, chunkSize) {
  for await (const chunk of readStream(iterable)) {
    yield* streamChunk(chunk, chunkSize);
  }
};
const readStream = async function* (stream) {
  if (stream[Symbol.asyncIterator]) {
    yield* stream;
    return;
  }
  const reader = stream.getReader();
  try {
    for (; ; ) {
      const { done, value } = await reader.read();
      if (done) {
        break;
      }
      yield value;
    }
  } finally {
    await reader.cancel();
  }
};
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
  const iterator2 = readBytes(stream, chunkSize);
  let bytes = 0;
  let done;
  let _onFinish = (e) => {
    if (!done) {
      done = true;
      onFinish && onFinish(e);
    }
  };
  return new ReadableStream({
    async pull(controller) {
      try {
        const { done: done2, value } = await iterator2.next();
        if (done2) {
          _onFinish();
          controller.close();
          return;
        }
        let len = value.byteLength;
        if (onProgress) {
          let loadedBytes = bytes += len;
          onProgress(loadedBytes);
        }
        controller.enqueue(new Uint8Array(value));
      } catch (err) {
        _onFinish(err);
        throw err;
      }
    },
    cancel(reason) {
      _onFinish(reason);
      return iterator2.return();
    }
  }, {
    highWaterMark: 2
  });
};
const DEFAULT_CHUNK_SIZE = 64 * 1024;
const { isFunction } = utils$1;
const globalFetchAPI = (({ Request: Request2, Response }) => ({
  Request: Request2,
  Response
}))(utils$1.global);
const {
  ReadableStream: ReadableStream$1,
  TextEncoder
} = utils$1.global;
const test = (fn, ...args) => {
  try {
    return !!fn(...args);
  } catch (e) {
    return false;
  }
};
const factory = (env) => {
  env = utils$1.merge.call({
    skipUndefined: true
  }, globalFetchAPI, env);
  const { fetch: envFetch, Request: Request2, Response } = env;
  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
  const isRequestSupported = isFunction(Request2);
  const isResponseSupported = isFunction(Response);
  if (!isFetchSupported) {
    return false;
  }
  const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
  const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request2(str).arrayBuffer()));
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
    let duplexAccessed = false;
    const hasContentType = new Request2(platform.origin, {
      body: new ReadableStream$1(),
      method: "POST",
      get duplex() {
        duplexAccessed = true;
        return "half";
      }
    }).headers.has("Content-Type");
    return duplexAccessed && !hasContentType;
  });
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
  const resolvers = {
    stream: supportsResponseStream && ((res) => res.body)
  };
  isFetchSupported && (() => {
    ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => {
      !resolvers[type2] && (resolvers[type2] = (res, config) => {
        let method = res && res[type2];
        if (method) {
          return method.call(res);
        }
        throw new AxiosError$1(`Response type '${type2}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
      });
    });
  })();
  const getBodyLength = async (body) => {
    if (body == null) {
      return 0;
    }
    if (utils$1.isBlob(body)) {
      return body.size;
    }
    if (utils$1.isSpecCompliantForm(body)) {
      const _request = new Request2(platform.origin, {
        method: "POST",
        body
      });
      return (await _request.arrayBuffer()).byteLength;
    }
    if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
      return body.byteLength;
    }
    if (utils$1.isURLSearchParams(body)) {
      body = body + "";
    }
    if (utils$1.isString(body)) {
      return (await encodeText(body)).byteLength;
    }
  };
  const resolveBodyLength = async (headers, body) => {
    const length = utils$1.toFiniteNumber(headers.getContentLength());
    return length == null ? getBodyLength(body) : length;
  };
  return async (config) => {
    let {
      url,
      method,
      data,
      signal,
      cancelToken,
      timeout,
      onDownloadProgress,
      onUploadProgress,
      responseType,
      headers,
      withCredentials = "same-origin",
      fetchOptions
    } = resolveConfig(config);
    let _fetch = envFetch || fetch;
    responseType = responseType ? (responseType + "").toLowerCase() : "text";
    let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
    let request = null;
    const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
      composedSignal.unsubscribe();
    });
    let requestContentLength;
    try {
      if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
        let _request = new Request2(url, {
          method: "POST",
          body: data,
          duplex: "half"
        });
        let contentTypeHeader;
        if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
          headers.setContentType(contentTypeHeader);
        }
        if (_request.body) {
          const [onProgress, flush] = progressEventDecorator(
            requestContentLength,
            progressEventReducer(asyncDecorator(onUploadProgress))
          );
          data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
        }
      }
      if (!utils$1.isString(withCredentials)) {
        withCredentials = withCredentials ? "include" : "omit";
      }
      const isCredentialsSupported = isRequestSupported && "credentials" in Request2.prototype;
      const resolvedOptions = {
        ...fetchOptions,
        signal: composedSignal,
        method: method.toUpperCase(),
        headers: headers.normalize().toJSON(),
        body: data,
        duplex: "half",
        credentials: isCredentialsSupported ? withCredentials : void 0
      };
      request = isRequestSupported && new Request2(url, resolvedOptions);
      let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
      const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
      if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
        const options = {};
        ["status", "statusText", "headers"].forEach((prop) => {
          options[prop] = response[prop];
        });
        const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
        const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
          responseContentLength,
          progressEventReducer(asyncDecorator(onDownloadProgress), true)
        ) || [];
        response = new Response(
          trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
            flush && flush();
            unsubscribe && unsubscribe();
          }),
          options
        );
      }
      responseType = responseType || "text";
      let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
      !isStreamResponse && unsubscribe && unsubscribe();
      return await new Promise((resolve, reject) => {
        settle(resolve, reject, {
          data: responseData,
          headers: AxiosHeaders$1.from(response.headers),
          status: response.status,
          statusText: response.statusText,
          config,
          request
        });
      });
    } catch (err) {
      unsubscribe && unsubscribe();
      if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
        throw Object.assign(
          new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
          {
            cause: err.cause || err
          }
        );
      }
      throw AxiosError$1.from(err, err && err.code, config, request);
    }
  };
};
const seedCache = /* @__PURE__ */ new Map();
const getFetch = (config) => {
  let env = config && config.env || {};
  const { fetch: fetch2, Request: Request2, Response } = env;
  const seeds = [
    Request2,
    Response,
    fetch2
  ];
  let len = seeds.length, i = len, seed, target, map = seedCache;
  while (i--) {
    seed = seeds[i];
    target = map.get(seed);
    target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
    map = target;
  }
  return target;
};
getFetch();
const knownAdapters = {
  http: httpAdapter,
  xhr: xhrAdapter,
  fetch: {
    get: getFetch
  }
};
utils$1.forEach(knownAdapters, (fn, value) => {
  if (fn) {
    try {
      Object.defineProperty(fn, "name", { value });
    } catch (e) {
    }
    Object.defineProperty(fn, "adapterName", { value });
  }
});
const renderReason = (reason) => `- ${reason}`;
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
function getAdapter$1(adapters2, config) {
  adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
  const { length } = adapters2;
  let nameOrAdapter;
  let adapter;
  const rejectedReasons = {};
  for (let i = 0; i < length; i++) {
    nameOrAdapter = adapters2[i];
    let id;
    adapter = nameOrAdapter;
    if (!isResolvedHandle(nameOrAdapter)) {
      adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
      if (adapter === void 0) {
        throw new AxiosError$1(`Unknown adapter '${id}'`);
      }
    }
    if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
      break;
    }
    rejectedReasons[id || "#" + i] = adapter;
  }
  if (!adapter) {
    const reasons = Object.entries(rejectedReasons).map(
      ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
    );
    let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
    throw new AxiosError$1(
      `There is no suitable adapter to dispatch the request ` + s2,
      "ERR_NOT_SUPPORT"
    );
  }
  return adapter;
}
const adapters = {
  /**
   * Resolve an adapter from a list of adapter names or functions.
   * @type {Function}
   */
  getAdapter: getAdapter$1,
  /**
   * Exposes all known adapters
   * @type {Object<string, Function|Object>}
   */
  adapters: knownAdapters
};
function throwIfCancellationRequested(config) {
  if (config.cancelToken) {
    config.cancelToken.throwIfRequested();
  }
  if (config.signal && config.signal.aborted) {
    throw new CanceledError$1(null, config);
  }
}
function dispatchRequest(config) {
  throwIfCancellationRequested(config);
  config.headers = AxiosHeaders$1.from(config.headers);
  config.data = transformData.call(
    config,
    config.transformRequest
  );
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
    config.headers.setContentType("application/x-www-form-urlencoded", false);
  }
  const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
  return adapter(config).then(function onAdapterResolution(response) {
    throwIfCancellationRequested(config);
    response.data = transformData.call(
      config,
      config.transformResponse,
      response
    );
    response.headers = AxiosHeaders$1.from(response.headers);
    return response;
  }, function onAdapterRejection(reason) {
    if (!isCancel$1(reason)) {
      throwIfCancellationRequested(config);
      if (reason && reason.response) {
        reason.response.data = transformData.call(
          config,
          config.transformResponse,
          reason.response
        );
        reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
      }
    }
    return Promise.reject(reason);
  });
}
const VERSION$1 = "1.13.4";
const validators$1 = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i) => {
  validators$1[type2] = function validator2(thing) {
    return typeof thing === type2 || "a" + (i < 1 ? "n " : " ") + type2;
  };
});
const deprecatedWarnings = {};
validators$1.transitional = function transitional(validator2, version, message) {
  function formatMessage(opt, desc) {
    return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
  }
  return (value, opt, opts) => {
    if (validator2 === false) {
      throw new AxiosError$1(
        formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
        AxiosError$1.ERR_DEPRECATED
      );
    }
    if (version && !deprecatedWarnings[opt]) {
      deprecatedWarnings[opt] = true;
      console.warn(
        formatMessage(
          opt,
          " has been deprecated since v" + version + " and will be removed in the near future"
        )
      );
    }
    return validator2 ? validator2(value, opt, opts) : true;
  };
};
validators$1.spelling = function spelling(correctSpelling) {
  return (value, opt) => {
    console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
    return true;
  };
};
function assertOptions(options, schema, allowUnknown) {
  if (typeof options !== "object") {
    throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
  }
  const keys = Object.keys(options);
  let i = keys.length;
  while (i-- > 0) {
    const opt = keys[i];
    const validator2 = schema[opt];
    if (validator2) {
      const value = options[opt];
      const result = value === void 0 || validator2(value, opt, options);
      if (result !== true) {
        throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
      }
      continue;
    }
    if (allowUnknown !== true) {
      throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
    }
  }
}
const validator = {
  assertOptions,
  validators: validators$1
};
const validators = validator.validators;
let Axios$1 = class Axios {
  constructor(instanceConfig) {
    this.defaults = instanceConfig || {};
    this.interceptors = {
      request: new InterceptorManager(),
      response: new InterceptorManager()
    };
  }
  /**
   * Dispatch a request
   *
   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
   * @param {?Object} config
   *
   * @returns {Promise} The Promise to be fulfilled
   */
  async request(configOrUrl, config) {
    try {
      return await this._request(configOrUrl, config);
    } catch (err) {
      if (err instanceof Error) {
        let dummy = {};
        Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
        const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
        try {
          if (!err.stack) {
            err.stack = stack;
          } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
            err.stack += "\n" + stack;
          }
        } catch (e) {
        }
      }
      throw err;
    }
  }
  _request(configOrUrl, config) {
    if (typeof configOrUrl === "string") {
      config = config || {};
      config.url = configOrUrl;
    } else {
      config = configOrUrl || {};
    }
    config = mergeConfig$1(this.defaults, config);
    const { transitional: transitional2, paramsSerializer, headers } = config;
    if (transitional2 !== void 0) {
      validator.assertOptions(transitional2, {
        silentJSONParsing: validators.transitional(validators.boolean),
        forcedJSONParsing: validators.transitional(validators.boolean),
        clarifyTimeoutError: validators.transitional(validators.boolean)
      }, false);
    }
    if (paramsSerializer != null) {
      if (utils$1.isFunction(paramsSerializer)) {
        config.paramsSerializer = {
          serialize: paramsSerializer
        };
      } else {
        validator.assertOptions(paramsSerializer, {
          encode: validators.function,
          serialize: validators.function
        }, true);
      }
    }
    if (config.allowAbsoluteUrls !== void 0) ;
    else if (this.defaults.allowAbsoluteUrls !== void 0) {
      config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
    } else {
      config.allowAbsoluteUrls = true;
    }
    validator.assertOptions(config, {
      baseUrl: validators.spelling("baseURL"),
      withXsrfToken: validators.spelling("withXSRFToken")
    }, true);
    config.method = (config.method || this.defaults.method || "get").toLowerCase();
    let contextHeaders = headers && utils$1.merge(
      headers.common,
      headers[config.method]
    );
    headers && utils$1.forEach(
      ["delete", "get", "head", "post", "put", "patch", "common"],
      (method) => {
        delete headers[method];
      }
    );
    config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
    const requestInterceptorChain = [];
    let synchronousRequestInterceptors = true;
    this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
      if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
        return;
      }
      synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
      requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
    });
    const responseInterceptorChain = [];
    this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
      responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
    });
    let promise;
    let i = 0;
    let len;
    if (!synchronousRequestInterceptors) {
      const chain = [dispatchRequest.bind(this), void 0];
      chain.unshift(...requestInterceptorChain);
      chain.push(...responseInterceptorChain);
      len = chain.length;
      promise = Promise.resolve(config);
      while (i < len) {
        promise = promise.then(chain[i++], chain[i++]);
      }
      return promise;
    }
    len = requestInterceptorChain.length;
    let newConfig = config;
    while (i < len) {
      const onFulfilled = requestInterceptorChain[i++];
      const onRejected = requestInterceptorChain[i++];
      try {
        newConfig = onFulfilled(newConfig);
      } catch (error) {
        onRejected.call(this, error);
        break;
      }
    }
    try {
      promise = dispatchRequest.call(this, newConfig);
    } catch (error) {
      return Promise.reject(error);
    }
    i = 0;
    len = responseInterceptorChain.length;
    while (i < len) {
      promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
    }
    return promise;
  }
  getUri(config) {
    config = mergeConfig$1(this.defaults, config);
    const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
    return buildURL(fullPath, config.params, config.paramsSerializer);
  }
};
utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
  Axios$1.prototype[method] = function(url, config) {
    return this.request(mergeConfig$1(config || {}, {
      method,
      url,
      data: (config || {}).data
    }));
  };
});
utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
  function generateHTTPMethod(isForm) {
    return function httpMethod(url, data, config) {
      return this.request(mergeConfig$1(config || {}, {
        method,
        headers: isForm ? {
          "Content-Type": "multipart/form-data"
        } : {},
        url,
        data
      }));
    };
  }
  Axios$1.prototype[method] = generateHTTPMethod();
  Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
});
let CancelToken$1 = class CancelToken {
  constructor(executor) {
    if (typeof executor !== "function") {
      throw new TypeError("executor must be a function.");
    }
    let resolvePromise;
    this.promise = new Promise(function promiseExecutor(resolve) {
      resolvePromise = resolve;
    });
    const token = this;
    this.promise.then((cancel2) => {
      if (!token._listeners) return;
      let i = token._listeners.length;
      while (i-- > 0) {
        token._listeners[i](cancel2);
      }
      token._listeners = null;
    });
    this.promise.then = (onfulfilled) => {
      let _resolve;
      const promise = new Promise((resolve) => {
        token.subscribe(resolve);
        _resolve = resolve;
      }).then(onfulfilled);
      promise.cancel = function reject() {
        token.unsubscribe(_resolve);
      };
      return promise;
    };
    executor(function cancel2(message, config, request) {
      if (token.reason) {
        return;
      }
      token.reason = new CanceledError$1(message, config, request);
      resolvePromise(token.reason);
    });
  }
  /**
   * Throws a `CanceledError` if cancellation has been requested.
   */
  throwIfRequested() {
    if (this.reason) {
      throw this.reason;
    }
  }
  /**
   * Subscribe to the cancel signal
   */
  subscribe(listener) {
    if (this.reason) {
      listener(this.reason);
      return;
    }
    if (this._listeners) {
      this._listeners.push(listener);
    } else {
      this._listeners = [listener];
    }
  }
  /**
   * Unsubscribe from the cancel signal
   */
  unsubscribe(listener) {
    if (!this._listeners) {
      return;
    }
    const index = this._listeners.indexOf(listener);
    if (index !== -1) {
      this._listeners.splice(index, 1);
    }
  }
  toAbortSignal() {
    const controller = new AbortController();
    const abort = (err) => {
      controller.abort(err);
    };
    this.subscribe(abort);
    controller.signal.unsubscribe = () => this.unsubscribe(abort);
    return controller.signal;
  }
  /**
   * Returns an object that contains a new `CancelToken` and a function that, when called,
   * cancels the `CancelToken`.
   */
  static source() {
    let cancel2;
    const token = new CancelToken(function executor(c) {
      cancel2 = c;
    });
    return {
      token,
      cancel: cancel2
    };
  }
};
function spread$1(callback) {
  return function wrap(arr) {
    return callback.apply(null, arr);
  };
}
function isAxiosError$1(payload) {
  return utils$1.isObject(payload) && payload.isAxiosError === true;
}
const HttpStatusCode$1 = {
  Continue: 100,
  SwitchingProtocols: 101,
  Processing: 102,
  EarlyHints: 103,
  Ok: 200,
  Created: 201,
  Accepted: 202,
  NonAuthoritativeInformation: 203,
  NoContent: 204,
  ResetContent: 205,
  PartialContent: 206,
  MultiStatus: 207,
  AlreadyReported: 208,
  ImUsed: 226,
  MultipleChoices: 300,
  MovedPermanently: 301,
  Found: 302,
  SeeOther: 303,
  NotModified: 304,
  UseProxy: 305,
  Unused: 306,
  TemporaryRedirect: 307,
  PermanentRedirect: 308,
  BadRequest: 400,
  Unauthorized: 401,
  PaymentRequired: 402,
  Forbidden: 403,
  NotFound: 404,
  MethodNotAllowed: 405,
  NotAcceptable: 406,
  ProxyAuthenticationRequired: 407,
  RequestTimeout: 408,
  Conflict: 409,
  Gone: 410,
  LengthRequired: 411,
  PreconditionFailed: 412,
  PayloadTooLarge: 413,
  UriTooLong: 414,
  UnsupportedMediaType: 415,
  RangeNotSatisfiable: 416,
  ExpectationFailed: 417,
  ImATeapot: 418,
  MisdirectedRequest: 421,
  UnprocessableEntity: 422,
  Locked: 423,
  FailedDependency: 424,
  TooEarly: 425,
  UpgradeRequired: 426,
  PreconditionRequired: 428,
  TooManyRequests: 429,
  RequestHeaderFieldsTooLarge: 431,
  UnavailableForLegalReasons: 451,
  InternalServerError: 500,
  NotImplemented: 501,
  BadGateway: 502,
  ServiceUnavailable: 503,
  GatewayTimeout: 504,
  HttpVersionNotSupported: 505,
  VariantAlsoNegotiates: 506,
  InsufficientStorage: 507,
  LoopDetected: 508,
  NotExtended: 510,
  NetworkAuthenticationRequired: 511,
  WebServerIsDown: 521,
  ConnectionTimedOut: 522,
  OriginIsUnreachable: 523,
  TimeoutOccurred: 524,
  SslHandshakeFailed: 525,
  InvalidSslCertificate: 526
};
Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
  HttpStatusCode$1[value] = key;
});
function createInstance(defaultConfig) {
  const context = new Axios$1(defaultConfig);
  const instance2 = bind(Axios$1.prototype.request, context);
  utils$1.extend(instance2, Axios$1.prototype, context, { allOwnKeys: true });
  utils$1.extend(instance2, context, null, { allOwnKeys: true });
  instance2.create = function create2(instanceConfig) {
    return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
  };
  return instance2;
}
const axios = createInstance(defaults);
axios.Axios = Axios$1;
axios.CanceledError = CanceledError$1;
axios.CancelToken = CancelToken$1;
axios.isCancel = isCancel$1;
axios.VERSION = VERSION$1;
axios.toFormData = toFormData$1;
axios.AxiosError = AxiosError$1;
axios.Cancel = axios.CanceledError;
axios.all = function all(promises) {
  return Promise.all(promises);
};
axios.spread = spread$1;
axios.isAxiosError = isAxiosError$1;
axios.mergeConfig = mergeConfig$1;
axios.AxiosHeaders = AxiosHeaders$1;
axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
axios.getAdapter = adapters.getAdapter;
axios.HttpStatusCode = HttpStatusCode$1;
axios.default = axios;
const {
  Axios: Axios2,
  AxiosError: AxiosError2,
  CanceledError: CanceledError2,
  isCancel,
  CancelToken: CancelToken2,
  VERSION,
  all: all2,
  Cancel,
  isAxiosError,
  spread,
  toFormData,
  AxiosHeaders: AxiosHeaders2,
  HttpStatusCode,
  formToJSON,
  getAdapter,
  mergeConfig
} = axios;
const BASE_URL$1 = "/api";
const ssoRedirectLink = "/api/v1/OAuth20/Code?type=mail";
const kerberosRedirectLink = "/api/v2/auth/kerberos";
const filtersLabelsKeys = {
  1: "roleFilter",
  2: "userStatusFilter",
  3: "filialFilter",
  4: "positionFilter",
  5: "supervisorFilter",
  6: "roleTypeFilter",
  7: "UserTypeFilter",
  8: "genderFilter",
  9: "emailStatusFilter",
  10: "addressFilter",
  11: "birthDateFilter",
  12: "dateOfCreateFilter",
  13: "lastVisitDateFilter",
  14: "quotaFilter",
  15: "usingQuotaSizeFilter",
  16: "userFilter",
  17: "authActionTypeFilter"
};
const isDev = false;
const isMob = void 0;
const customBaseQuery = (url) => fetchBaseQuery$1({
  baseUrl: url,
  prepareHeaders: async (headers) => {
    headers.set("Content-Type", "application/json");
    if (isDev && isMob) ;
    return headers;
  }
});
const userApi = createApi$1({
  reducerPath: "api/user",
  baseQuery: customBaseQuery(`${BASE_URL$1}`),
  refetchOnFocus: false,
  tagTypes: ["UserInfo", "CurrentUser", "Settings"],
  endpoints: (build) => ({
    currentUser: build.query({
      query: () => ({
        url: "v1/user"
      }),
      providesTags: ["CurrentUser"]
    }),
    settings: build.query({
      query: () => ({
        url: "v1/settings"
      }),
      providesTags: ["Settings"]
    }),
    add: build.mutation({
      query: (payload) => ({
        url: `v2/userprofile`,
        body: {
          Data: payload,
          Type: 1
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data
    }),
    changeStatuses: build.mutation({
      query: (payload) => ({
        url: `v1/User/ChangeStatuses`,
        body: {
          ...payload
        },
        method: "post"
      }),
      invalidatesTags: (result, error, arg) => [...arg.Ids.map((id) => ({
        type: "UserInfo",
        id
      }))]
    }),
    changeRoles: build.mutation({
      query: (payload) => ({
        url: `v1/User/BulkChangeRoles`,
        body: {
          ...payload
        },
        method: "post"
      })
    }),
    bulkAddRoles: build.mutation({
      query: (payload) => ({
        url: `v1/User/BulkAddRoles`,
        body: payload,
        method: "post"
      }),
      invalidatesTags: (result, error, arg) => [...arg.UserIds.map((id) => ({
        type: "UserInfo",
        id
      }))]
    }),
    bulkChangeFilial: build.mutation({
      query: (payload) => ({
        url: `v1/User/changecustomer`,
        body: payload,
        method: "post"
      }),
      invalidatesTags: (result, error, arg) => [...arg.UserIds.map((id) => ({
        type: "UserInfo",
        id
      }))]
    }),
    deleteAvatar: build.mutation({
      query: (id) => ({
        url: `v2/Profile/DeleteAvatar?UserId=${id}`,
        method: "delete"
      })
    }),
    getUserInfoCommon: build.query({
      query: (id) => ({
        url: `v2/UserInfo/Common?UserId=${id}`
      }),
      providesTags: (response, error, arg) => response ? [{
        type: "UserInfo",
        id: arg
      }] : ["UserInfo"],
      transformResponse: (response) => response.Response.Data
    }),
    closeseSsions: build.mutation({
      query: (payload) => ({
        url: `v2/auth/CloseseSsions`,
        body: payload,
        method: "post"
      }),
      invalidatesTags: ["UserInfo"]
    }),
    logout: build.query({
      query: () => ({
        url: `v2/auth/Logout`
      })
    }),
    changePassword: build.mutation({
      query: (payload) => ({
        url: `v2/auth/ChangePassword`,
        body: payload,
        method: "post"
      })
    }),
    resetPassword: build.mutation({
      query: (payload) => ({
        url: "v2/Auth/loginresetpassword",
        body: payload,
        method: "post"
      })
    }),
    updateUser: build.mutation({
      query: (payload) => ({
        url: `v2/UserInfo/Update`,
        body: payload,
        method: "post"
      }),
      invalidatesTags: (result, error, arg) => [{
        type: "UserInfo",
        id: arg.UserId
      }]
    }),
    deleteRole: build.mutation({
      query: (payload) => ({
        url: `v1/user/removerole?userid=${payload.UserId}&roleid=${payload.RoleId}`,
        method: "delete"
      })
    }),
    getUserInfo: build.query({
      query: (id) => ({
        url: `v2/userprofile?id=${id}`,
        method: "get"
      }),
      providesTags: (response, error, arg) => response ? [{
        type: "UserInfo",
        id: arg
      }] : ["UserInfo"],
      transformResponse: (response) => response.Response.Data
    }),
    updateUserInfo: build.mutation({
      query: (payload) => ({
        url: `v2/userprofile`,
        body: payload,
        method: "post"
      }),
      invalidatesTags: (result, error, arg) => [{
        type: "UserInfo",
        id: arg.Data.Id
      }]
    }),
    getUserTariff: build.query({
      query: ({
        id,
        paymentsDate
      }) => ({
        url: `Tariff/getUserTariff?userId${id}`,
        //&timeStamp=${paymentsDate}
        method: "get",
        cache: paymentsDate ? "no-cache" : "default"
      })
    }),
    getServices: build.query({
      query: (id) => ({
        url: `v1/serviceshealth?customerId=${id}`,
        method: "get"
      }),
      transformResponse: (response) => response.Services
    }),
    updateSetting: build.mutation({
      query: (payload) => ({
        url: "v1/settings",
        body: payload,
        method: "post"
      })
    })
  })
});
const {
  useCurrentUserQuery,
  useSettingsQuery,
  useLazySettingsQuery,
  useLazyCurrentUserQuery,
  useChangeStatusesMutation,
  useChangeRolesMutation,
  useBulkChangeFilialMutation,
  useBulkAddRolesMutation,
  useDeleteAvatarMutation,
  useGetUserInfoCommonQuery,
  useCloseseSsionsMutation,
  useLazyLogoutQuery,
  useChangePasswordMutation,
  useResetPasswordMutation,
  useUpdateUserMutation,
  useAddMutation,
  useDeleteRoleMutation,
  useGetUserInfoQuery,
  useUpdateUserInfoMutation,
  useLazyGetUserInfoQuery,
  useGetUserTariffQuery,
  useGetServicesQuery,
  useUpdateSettingMutation
} = userApi;
const initialState$b = {
  Tokens: {},
  State: "",
  User: {},
  Settings: {
    UserId: -1
  }
};
const userInfoSlice = createSlice$1({
  name: "userInfo",
  initialState: initialState$b,
  reducers: {
    setUserTokens(state, action) {
      state.Tokens = action.payload;
    },
    setUserInfo(state, action) {
      state.User = action.payload;
    },
    setGlobalSettings(state, action) {
      state.Settings = action.payload;
    },
    setTimezoneSettings(state, action) {
      if (state == null ? void 0 : state.Settings) {
        state.Settings.Timezone = action.payload;
      }
    }
  }
});
const userInfoActions = userInfoSlice.actions;
const userInfoReducer = userInfoSlice.reducer;
var GenderEnum = /* @__PURE__ */ ((GenderEnum2) => {
  GenderEnum2[GenderEnum2["male"] = 1] = "male";
  GenderEnum2[GenderEnum2["female"] = 2] = "female";
  return GenderEnum2;
})(GenderEnum || {});
var IFiltersEnumType = /* @__PURE__ */ ((IFiltersEnumType2) => {
  IFiltersEnumType2[IFiltersEnumType2["RoleFilter"] = 1] = "RoleFilter";
  IFiltersEnumType2[IFiltersEnumType2["UserStatusFilter"] = 2] = "UserStatusFilter";
  IFiltersEnumType2[IFiltersEnumType2["FilialFilter"] = 3] = "FilialFilter";
  IFiltersEnumType2[IFiltersEnumType2["PositionFilter"] = 4] = "PositionFilter";
  IFiltersEnumType2[IFiltersEnumType2["SupervisorFilter"] = 5] = "SupervisorFilter";
  IFiltersEnumType2[IFiltersEnumType2["RoleTypeFilter"] = 6] = "RoleTypeFilter";
  IFiltersEnumType2[IFiltersEnumType2["UserTypeFilter"] = 7] = "UserTypeFilter";
  IFiltersEnumType2[IFiltersEnumType2["GenderFilter"] = 8] = "GenderFilter";
  IFiltersEnumType2[IFiltersEnumType2["EmailStatusFilter"] = 9] = "EmailStatusFilter";
  IFiltersEnumType2[IFiltersEnumType2["AddressFilter"] = 10] = "AddressFilter";
  IFiltersEnumType2[IFiltersEnumType2["BirthDateFilter"] = 11] = "BirthDateFilter";
  IFiltersEnumType2[IFiltersEnumType2["DateOfCreateFilter"] = 12] = "DateOfCreateFilter";
  IFiltersEnumType2[IFiltersEnumType2["LastVisitDateFilter"] = 13] = "LastVisitDateFilter";
  IFiltersEnumType2[IFiltersEnumType2["QuotaFilter"] = 14] = "QuotaFilter";
  IFiltersEnumType2[IFiltersEnumType2["UsingQuotaSizeFilter"] = 15] = "UsingQuotaSizeFilter";
  IFiltersEnumType2[IFiltersEnumType2["UserFilter"] = 16] = "UserFilter";
  IFiltersEnumType2[IFiltersEnumType2["AuthActionTypeFilter"] = 17] = "AuthActionTypeFilter";
  IFiltersEnumType2[IFiltersEnumType2["ObjectRoleFilter"] = 18] = "ObjectRoleFilter";
  return IFiltersEnumType2;
})(IFiltersEnumType || {});
var ErrorsEnum = /* @__PURE__ */ ((ErrorsEnum2) => {
  ErrorsEnum2[ErrorsEnum2["ObjectNotFound"] = 51001] = "ObjectNotFound";
  ErrorsEnum2[ErrorsEnum2["ObjectIsNotActive"] = 51003] = "ObjectIsNotActive";
  ErrorsEnum2[ErrorsEnum2["NoRights"] = 51006] = "NoRights";
  ErrorsEnum2[ErrorsEnum2["UserIsExists"] = 51010] = "UserIsExists";
  ErrorsEnum2[ErrorsEnum2["CustomerIsExists"] = 51011] = "CustomerIsExists";
  ErrorsEnum2[ErrorsEnum2["EmptyParameter"] = 51012] = "EmptyParameter";
  ErrorsEnum2[ErrorsEnum2["InternalError"] = 51013] = "InternalError";
  ErrorsEnum2[ErrorsEnum2["EmptyCustomerName"] = 51014] = "EmptyCustomerName";
  ErrorsEnum2[ErrorsEnum2["CustomerIsNotExists"] = 51015] = "CustomerIsNotExists";
  ErrorsEnum2[ErrorsEnum2["PasswordNotChanges"] = 51016] = "PasswordNotChanges";
  ErrorsEnum2[ErrorsEnum2["UserIsNotExists"] = 51017] = "UserIsNotExists";
  ErrorsEnum2[ErrorsEnum2["ParentNotSet"] = 51018] = "ParentNotSet";
  ErrorsEnum2[ErrorsEnum2["NotFoundAll"] = 51019] = "NotFoundAll";
  ErrorsEnum2[ErrorsEnum2["EmptyOrWhiteSpaceLogin"] = 51020] = "EmptyOrWhiteSpaceLogin";
  ErrorsEnum2[ErrorsEnum2["EmptyCustomer"] = 51021] = "EmptyCustomer";
  ErrorsEnum2[ErrorsEnum2["NotRightsForSuperAdmin"] = 51025] = "NotRightsForSuperAdmin";
  ErrorsEnum2[ErrorsEnum2["NotRightsForSelf"] = 51026] = "NotRightsForSelf";
  ErrorsEnum2[ErrorsEnum2["InvalidLoginOrPassword"] = 52001] = "InvalidLoginOrPassword";
  ErrorsEnum2[ErrorsEnum2["InvalidPassword"] = 52006] = "InvalidPassword";
  ErrorsEnum2[ErrorsEnum2["InvalidEmailFormat"] = 52007] = "InvalidEmailFormat";
  ErrorsEnum2[ErrorsEnum2["ToManyRequests"] = 52008] = "ToManyRequests";
  ErrorsEnum2[ErrorsEnum2["NotConfiguredCustomersEmail"] = 54001] = "NotConfiguredCustomersEmail";
  ErrorsEnum2[ErrorsEnum2["NotSendEmail"] = 54002] = "NotSendEmail";
  ErrorsEnum2[ErrorsEnum2["DontHaveEmail"] = 54003] = "DontHaveEmail";
  ErrorsEnum2[ErrorsEnum2["EmailAlreadyActivated"] = 54004] = "EmailAlreadyActivated";
  ErrorsEnum2[ErrorsEnum2["EmailNotActivated"] = 54005] = "EmailNotActivated";
  ErrorsEnum2[ErrorsEnum2["InputEmptyEmail"] = 54006] = "InputEmptyEmail";
  ErrorsEnum2[ErrorsEnum2["NotExistsMxRecords"] = 54007] = "NotExistsMxRecords";
  ErrorsEnum2[ErrorsEnum2["CantCreateDomain"] = 54008] = "CantCreateDomain";
  ErrorsEnum2[ErrorsEnum2["NotFoundEmailServer"] = 54009] = "NotFoundEmailServer";
  ErrorsEnum2[ErrorsEnum2["EmailAlreadyLinked"] = 54010] = "EmailAlreadyLinked";
  ErrorsEnum2[ErrorsEnum2["EmailIsNotExists"] = 54011] = "EmailIsNotExists";
  ErrorsEnum2[ErrorsEnum2["NotFoundImapFolder"] = 54012] = "NotFoundImapFolder";
  ErrorsEnum2[ErrorsEnum2["CantCreateEmail"] = 54013] = "CantCreateEmail";
  ErrorsEnum2[ErrorsEnum2["CantLinkEmail"] = 54014] = "CantLinkEmail";
  ErrorsEnum2[ErrorsEnum2["EmailExists"] = 54015] = "EmailExists";
  ErrorsEnum2[ErrorsEnum2["InvalidEmail"] = 54016] = "InvalidEmail";
  ErrorsEnum2[ErrorsEnum2["InvalidPasswordRegister"] = 54019] = "InvalidPasswordRegister";
  ErrorsEnum2[ErrorsEnum2["EmailServerError"] = 54017] = "EmailServerError";
  ErrorsEnum2[ErrorsEnum2["AdditionalEmailEqualsEmail"] = 54018] = "AdditionalEmailEqualsEmail";
  ErrorsEnum2[ErrorsEnum2["NotConfiguredPasswordSecurity"] = 55001] = "NotConfiguredPasswordSecurity";
  ErrorsEnum2[ErrorsEnum2["IncorrectPasswordSecurityMinLength"] = 55002] = "IncorrectPasswordSecurityMinLength";
  ErrorsEnum2[ErrorsEnum2["NotConfiguredCanRegisterCustomer"] = 55003] = "NotConfiguredCanRegisterCustomer";
  ErrorsEnum2[ErrorsEnum2["SetupEmailSshIntegration"] = 55004] = "SetupEmailSshIntegration";
  ErrorsEnum2[ErrorsEnum2["NoPackInstance"] = 55005] = "NoPackInstance";
  ErrorsEnum2[ErrorsEnum2["NotExistsEmailConfirmTemplate"] = 55006] = "NotExistsEmailConfirmTemplate";
  ErrorsEnum2[ErrorsEnum2["NotSetCommandUrl"] = 55007] = "NotSetCommandUrl";
  ErrorsEnum2[ErrorsEnum2["WrongCommonViewSettingsName"] = 55008] = "WrongCommonViewSettingsName";
  ErrorsEnum2[ErrorsEnum2["NotFoundLdapField"] = 55009] = "NotFoundLdapField";
  ErrorsEnum2[ErrorsEnum2["FailLdapAuth"] = 55010] = "FailLdapAuth";
  ErrorsEnum2[ErrorsEnum2["RoleNotFound"] = 56001] = "RoleNotFound";
  ErrorsEnum2[ErrorsEnum2["CanNotDeleteAdminSuperAdmin"] = 56002] = "CanNotDeleteAdminSuperAdmin";
  ErrorsEnum2[ErrorsEnum2["CanNotHaveParent"] = 56003] = "CanNotHaveParent";
  ErrorsEnum2[ErrorsEnum2["SelectCustomer"] = 56004] = "SelectCustomer";
  ErrorsEnum2[ErrorsEnum2["CanNotSelfParent"] = 56005] = "CanNotSelfParent";
  ErrorsEnum2[ErrorsEnum2["EmptyQuotaName"] = 57001] = "EmptyQuotaName";
  ErrorsEnum2[ErrorsEnum2["ZeroQuotaSize"] = 57002] = "ZeroQuotaSize";
  ErrorsEnum2[ErrorsEnum2["LongQuotaName"] = 5700] = "LongQuotaName";
  ErrorsEnum2[ErrorsEnum2["NotFoundQuota"] = 57004] = "NotFoundQuota";
  ErrorsEnum2[ErrorsEnum2["CustomerHasUsers"] = 58001] = "CustomerHasUsers";
  ErrorsEnum2[ErrorsEnum2["UserExistsByPhone"] = 51024] = "UserExistsByPhone";
  ErrorsEnum2[ErrorsEnum2["UserExistsByLogin"] = 51023] = "UserExistsByLogin";
  ErrorsEnum2[ErrorsEnum2["UserExistsByEmail"] = 51022] = "UserExistsByEmail";
  ErrorsEnum2[ErrorsEnum2["MaxFilialQuota"] = 58002] = "MaxFilialQuota";
  ErrorsEnum2[ErrorsEnum2["QuotaRelationExists"] = 57005] = "QuotaRelationExists";
  ErrorsEnum2[ErrorsEnum2["QuotaRelationInvalidUrl"] = 57006] = "QuotaRelationInvalidUrl";
  ErrorsEnum2[ErrorsEnum2["NotFoundDirectory"] = 57007] = "NotFoundDirectory";
  ErrorsEnum2[ErrorsEnum2["NotFoundRole"] = 57008] = "NotFoundRole";
  ErrorsEnum2[ErrorsEnum2["NotFoundRoom"] = 57009] = "NotFoundRoom";
  ErrorsEnum2[ErrorsEnum2["NotFoundUser"] = 57010] = "NotFoundUser";
  ErrorsEnum2[ErrorsEnum2["NoEqualsCustomers"] = 57011] = "NoEqualsCustomers";
  return ErrorsEnum2;
})(ErrorsEnum || {});
var QuotaRulesEnum = /* @__PURE__ */ ((QuotaRulesEnum2) => {
  QuotaRulesEnum2[QuotaRulesEnum2["None"] = 0] = "None";
  QuotaRulesEnum2[QuotaRulesEnum2["Large"] = 1] = "Large";
  QuotaRulesEnum2[QuotaRulesEnum2["Lower"] = 2] = "Lower";
  QuotaRulesEnum2[QuotaRulesEnum2["Summary"] = 3] = "Summary";
  return QuotaRulesEnum2;
})(QuotaRulesEnum || {});
const objectToString = (obj) => {
  let result = "";
  for (const [key, value] of Object.entries(obj)) {
    result += `${key}: ${value};
`;
  }
  return result;
};
const getGenderString = ({
  gender,
  t: t2
}) => {
  switch (gender) {
    case GenderEnum.male:
      return t2("male");
    case GenderEnum.female:
      return t2("female");
    default:
      return t2("noInformation");
  }
};
const numberToUserStatus = ({
  value,
  t: t2
}) => {
  return value === -2 ? t2("users.actionList.locked") : value === -1 ? t2("users.actionList.deleted") : t2("users.actionList.active");
};
const calculatePercentage = (total, chunk) => {
  if (total && chunk) {
    return parseFloat((chunk / total * 100).toFixed(2));
  }
  return 0;
};
const generateUUID = () => {
  if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
    return crypto.randomUUID();
  }
  if (typeof crypto !== "undefined" && typeof crypto.getRandomValues === "function") {
    return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
      const n2 = Number(c);
      return (n2 ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n2 / 4).toString(16);
    });
  }
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
    const r2 = Math.random() * 16 | 0;
    return (c === "x" ? r2 : r2 & 3 | 8).toString(16);
  });
};
const tagTypes$8 = ["Role", "Departments", "Address", "RolesWithCounter"];
const directoriesApi = createApi$1({
  reducerPath: "api/directories",
  baseQuery: customBaseQuery(`${BASE_URL$1}`),
  refetchOnFocus: false,
  tagTypes: tagTypes$8,
  endpoints: (build) => ({
    getRolesList: build.query({
      query: () => ({
        url: `v1/Role/List`
      }),
      transformResponse: (response) => response,
      providesTags: ["Role"]
    }),
    getDepartmentsList: build.query({
      query: () => ({
        url: `v1/Departments/All`
      }),
      transformResponse: (response) => response,
      providesTags: ["Departments"]
    }),
    getAddressList: build.query({
      query: (payload) => ({
        url: `v2/Address/Search`,
        body: {
          Search: payload
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data.Result.map((item) => ({
        label: item.Name,
        value: item.Name,
        id: item.Id
      })),
      providesTags: ["Address"]
    }),
    getRolesWithCounter: build.query({
      query: () => ({
        url: `v1/role/ListWithCounter`
      }),
      transformResponse: (response) => response,
      providesTags: ["RolesWithCounter"]
    }),
    getRolesForUser: build.query({
      query: (payload) => ({
        url: `v2/roles/list`,
        body: payload,
        method: "post"
      }),
      transformResponse: (response) => {
        return response.Response.Data;
      }
    }),
    createRole: build.mutation({
      query: (payload) => ({
        url: `v1/role`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => response
    })
  })
});
const {
  useGetRolesListQuery,
  useGetDepartmentsListQuery,
  useGetRolesWithCounterQuery,
  useCreateRoleMutation,
  useLazyGetAddressListQuery,
  useGetRolesForUserQuery
} = directoriesApi;
const emailApi = createApi$1({
  reducerPath: "api/email",
  baseQuery: customBaseQuery(`${BASE_URL$1}`),
  refetchOnFocus: false,
  endpoints: (build) => ({
    sendMail: build.query({
      query: (payload) => ({
        url: `/v1/Email/Send`,
        body: {
          ...payload
        },
        method: "post"
      })
    }),
    emailActivation: build.query({
      query: (payload) => ({
        url: `v2/Confirm/EmailConfirm`,
        body: payload,
        method: "post"
      })
    }),
    getEmailServer: build.query({
      query: (payload) => ({
        params: {
          customerId: payload == null ? void 0 : payload.Id
        },
        url: `v1/EmailServer`,
        method: "get"
      })
    }),
    getUserEmails: build.query({
      query: (payload) => ({
        params: {
          userId: payload == null ? void 0 : payload.Id
        },
        url: `v1/email/items`,
        method: "get"
      })
    }),
    sendEmailServer: build.query({
      query: (payload) => ({
        body: payload,
        url: `v1/emailserver/send`,
        method: "post"
      })
    }),
    verifyEmailServers: build.query({
      query: (payload) => ({
        body: payload,
        url: `v2/customer/hasemailsettings`,
        method: "post"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    // Проверка почты перед привязкой
    checkExistsEmailForLink: build.query({
      query: (payload) => ({
        params: {
          email: payload == null ? void 0 : payload.Email,
          login: payload == null ? void 0 : payload.Login,
          customerId: payload == null ? void 0 : payload.CustomerId,
          serverId: payload == null ? void 0 : payload.ServerId
        },
        url: `v1/email/checkemailbyserver`,
        method: "get"
      })
    }),
    //Отвязка почты от пользователя
    deleteLinkedUserEmail: build.query({
      query: (payload) => ({
        params: {
          emailId: payload
        },
        url: `v1/Email/DeleteUserEmail`,
        method: "delete"
      })
    }),
    // Смена пароля привязанной почты
    changePasswordLinkedUserEmail: build.query({
      query: (payload) => ({
        body: payload,
        url: `v1/Email/ChangePassword`,
        method: "post"
      })
    }),
    // Смена логина (переименование) привязанной почты
    changeEmailLogin: build.query({
      query: (payload) => ({
        body: payload,
        url: `v1/Email/ChangeEmail`,
        method: "post"
      })
    }),
    // Добавление почты без привязки к пользователю
    createEmailWithoutLinkedUser: build.query({
      query: (payload) => ({
        body: payload,
        url: `v1/Email/SaveEmail`,
        method: "post"
      })
    }),
    // Запрос на список серверов для созднаия почты
    checkEmailIntegratedList: build.query({
      query: (payload) => ({
        params: {
          customerId: payload == null ? void 0 : payload.customerId,
          onlyIntergrated: payload.onlyIntergrated
        },
        url: `v1/EmailServer`,
        method: "get"
      })
    }),
    emailServerDomains: build.query({
      query: (id) => ({
        url: `v1/emailserver/domains?customerId=${id}`,
        method: "get"
      }),
      transformResponse: (response) => response.Domains
    }),
    /////////////////////////////////////////////////////
    updateEmailServer: build.query({
      query: (payload) => ({
        url: `v1/EmailServer/Save`,
        body: payload,
        method: "post"
      })
    }),
    deleteEmailServer: build.query({
      query: (payload) => ({
        params: {
          id: payload == null ? void 0 : payload.Id
        },
        url: `v1/EmailServer`,
        method: "delete"
      })
    }),
    confirmEmailActivation: build.query({
      query: (payload) => ({
        url: `v2/confirm/emailbyform`,
        params: {
          code: payload == null ? void 0 : payload.Code
        },
        method: "get"
      })
    }),
    //Domains
    getDomains: build.query({
      query: (payload) => ({
        url: `v1/emaildomain/list?serverid=${payload.ServerId}&customerid=${payload.CustomerId}`,
        method: "get"
      }),
      transformResponse: (response) => response.Domains
    }),
    getLinkRecord: build.query({
      query: (payload) => ({
        params: {
          serverid: payload == null ? void 0 : payload.serverid
        },
        url: `v1/emaildomain/linkinfo?`,
        method: "get"
      })
    }),
    checkDomain: build.query({
      query: (payload) => ({
        params: {
          domain: payload == null ? void 0 : payload.domain,
          customerid: payload == null ? void 0 : payload.customerId,
          serverid: payload == null ? void 0 : payload.serverId
        },
        url: `v1/emaildomain/link?isCheck=true`,
        method: "get"
      })
    }),
    addDomain: build.query({
      query: (payload) => ({
        body: payload,
        url: `v1/emaildomain`,
        method: "post"
      })
    }),
    domainSettings: build.query({
      query: (payload) => ({
        params: {
          id: payload == null ? void 0 : payload.id
        },
        url: `v1/emaildomain`,
        method: "get"
      })
    }),
    deleteDomain: build.query({
      query: (payload) => ({
        params: {
          id: payload == null ? void 0 : payload.id
        },
        url: `v1/emaildomain`,
        method: "delete"
      })
    }),
    getPasswordRules: build.query({
      query: (payload) => ({
        params: {
          serverId: payload.serverId
        },
        url: `v1/EmailServer/passwordrules`,
        method: "get"
      })
    })
  })
});
const {
  useLazySendMailQuery,
  useLazyEmailActivationQuery,
  useLazyDeleteEmailServerQuery,
  useLazyUpdateEmailServerQuery,
  useLazySendEmailServerQuery,
  useGetEmailServerQuery,
  useLazyGetEmailServerQuery,
  useGetUserEmailsQuery,
  useLazyCheckExistsEmailForLinkQuery,
  useLazyChangePasswordLinkedUserEmailQuery,
  useLazyChangeEmailLoginQuery,
  useLazyDeleteLinkedUserEmailQuery,
  useCheckEmailIntegratedListQuery,
  useLazyCreateEmailWithoutLinkedUserQuery,
  useLazyConfirmEmailActivationQuery,
  useGetDomainsQuery,
  useLazyGetDomainsQuery,
  useGetLinkRecordQuery,
  useLazyGetLinkRecordQuery,
  useLazyCheckDomainQuery,
  useAddDomainQuery,
  useLazyAddDomainQuery,
  useDomainSettingsQuery,
  useLazyDomainSettingsQuery,
  useDeleteDomainQuery,
  useLazyDeleteDomainQuery,
  useLazyVerifyEmailServersQuery,
  useEmailServerDomainsQuery,
  useLazyEmailServerDomainsQuery,
  useLazyGetPasswordRulesQuery
} = emailApi;
const tagTypes$7 = ["Groups"];
const groupsApi = createApi$1({
  reducerPath: "api/homeWidget",
  baseQuery: customBaseQuery(`${BASE_URL$1}`),
  refetchOnFocus: false,
  tagTypes: tagTypes$7,
  endpoints: (build) => ({
    getGroups: build.query({
      query: (payload) => ({
        url: `/v1/Role/FilteredList`,
        body: payload,
        method: "post"
      }),
      transformResponse: (response) => response,
      providesTags: ["Groups"]
    }),
    bulkAddUsers: build.mutation({
      query: (payload) => ({
        url: `v1/User/BulkAddRoles`,
        body: payload,
        method: "post"
      })
    }),
    deleteGroup: build.mutation({
      query: (payload) => ({
        url: `v1/Role/Delete`,
        body: payload,
        method: "post"
      })
    }),
    changeParent: build.mutation({
      query: (payload) => ({
        url: `v1/Role/ChangeParent`,
        body: payload,
        method: "post"
      })
    })
  })
});
const {
  useGetGroupsQuery,
  useLazyGetGroupsQuery,
  useBulkAddUsersMutation,
  useDeleteGroupMutation,
  useChangeParentMutation
} = groupsApi;
class Dictionary2 {
  constructor(enumObj, t2, translationKey) {
    this.t = t2;
    this.data = Object.keys(enumObj).reduce((acc, key) => {
      const value = enumObj[key];
      if (typeof value === "number" || typeof value === "string") {
        acc[value] = {
          id: value,
          title: t2(`${translationKey}.${key}`)
        };
      }
      return acc;
    }, {});
  }
  get(value) {
    return this.data[value] || {
      id: value,
      title: this.t("unknown")
    };
  }
  getAll() {
    return Object.values(this.data);
  }
}
const Module = {
  Disk: 1,
  Projects: 2,
  Calendar: 3,
  Mail: 4,
  Admin: 6
};
const UserStatus = {
  Active: 1,
  Blocked: -2
};
const RoleType = {
  User: 0,
  Admin: 1,
  SuperUser: 2,
  Guest: 3,
  All: 4,
  Support: 5
};
const FilterType = {
  UserStatus: 2,
  RoleType: 6,
  UserGender: 8
};
const UserGender = {
  NotSpecified: 0,
  Male: 1,
  Female: 2
};
class RoleTypeDictionary extends Dictionary2 {
  constructor(t2) {
    super(RoleType, t2, "roleType");
  }
}
class UserStatusDictionary extends Dictionary2 {
  constructor(t2) {
    super(UserStatus, t2, "userStatus");
  }
}
class UserGenderDictionary extends Dictionary2 {
  constructor(t2) {
    super(UserGender, t2, "userGender");
  }
}
const tagTypes$6 = ["Users", "Filters", "UsersList", "DefaultFilters"];
const usersApi = createApi$1({
  reducerPath: "api/users",
  baseQuery: customBaseQuery(`${BASE_URL$1}/v2/Profile/`),
  refetchOnFocus: false,
  tagTypes: tagTypes$6,
  endpoints: (build) => ({
    getUsers: build.query({
      query: (payload) => ({
        url: `Users`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data,
      providesTags: ["Users"]
    }),
    getUsersList: build.query({
      query: (payload) => ({
        url: `Users`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => ({
        TotalCount: response.Response.Data.TotalCount,
        Users: response.Response.Data.Users.map((user) => ({
          label: `${user.FirstName ?? ""} ${user.Surname ?? ""} ${user.MiddleName ?? ""}`.trim(),
          value: user.Id,
          checked: false
        }))
      }),
      providesTags: ["UsersList"]
    }),
    getFilterListItems: build.query({
      query: (payload) => ({
        url: `Filters`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => {
        return response.Response.Data;
      }
    }),
    getDefaultUserFilters: build.query({
      query: (count) => ({
        url: `defaultuserfilters?count=${count}`,
        method: "get"
      }),
      transformResponse: (response) => {
        const data = response.Response.Data.DefaultFilters;
        const userStatusDictionary = new UserStatusDictionary(t);
        const userGenderDictionary = new UserGenderDictionary(t);
        data.forEach((filterMenu) => {
          if (filterMenu.Type === FilterType.UserStatus) {
            if (filterMenu.Items) {
              filterMenu.Items = filterMenu.Items.map((item) => {
                const label = userStatusDictionary.get(item.Id);
                return {
                  ...item,
                  Name: label.title
                };
              });
            }
          } else if (filterMenu.Type === FilterType.UserGender) {
            if (filterMenu.Items) {
              filterMenu.Items = filterMenu.Items.map((item) => {
                const label = userGenderDictionary.get(item.Id);
                return {
                  ...item,
                  Name: label.title
                };
              });
            }
          }
        });
        return data;
      },
      providesTags: ["DefaultFilters"]
    }),
    removeUsers: build.mutation({
      query: (body) => ({
        url: `safedeleteusers`,
        method: "post",
        body: {
          Users: body
        }
      }),
      transformResponse: (response) => {
        return response.Response.Data;
      }
    }),
    checkRemoveStatus: build.mutation({
      query: (body) => ({
        url: `safedeleteusersstatus`,
        method: "post",
        body
      }),
      transformResponse: (response) => {
        return response.Response.Data.Results;
      }
    })
  })
});
const {
  useGetUsersQuery,
  useLazyGetUsersQuery,
  useRemoveUsersMutation,
  useCheckRemoveStatusMutation,
  useGetFilterListItemsQuery: useGetFilterListItemsQuery$1,
  useGetDefaultUserFiltersQuery
} = usersApi;
const tagTypes$5 = ["Roles", "Add Roles", "Filters", "RolesList", "DefaultFilters", "RoleInfo"];
const rolesApi = createApi$1({
  reducerPath: "api/roles",
  baseQuery: customBaseQuery(`${BASE_URL$1}/v2/roles/`),
  refetchOnFocus: false,
  tagTypes: tagTypes$5,
  endpoints: (build) => ({
    // [REQ]-[POST]-(api/v2/roles/list)
    getRoles: build.query({
      query: (payload) => ({
        url: `list`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data,
      providesTags: ["Roles"]
    }),
    // [REQ]-[GET]-(api/v2/roles/filters/default?count=10)
    getDefaultRolesFilters: build.query({
      query: (count) => ({
        url: `filters/default?count=${count}`,
        method: "get"
      }),
      transformResponse: (response) => {
        const data = response.Response.Data.DefaultFilters;
        const roleTypeDictionary = new RoleTypeDictionary(t);
        data.forEach((filterMenu) => {
          if (filterMenu.Type === FilterType.RoleType) {
            if (filterMenu.Items) {
              filterMenu.Items = filterMenu.Items.map((item) => {
                const label = roleTypeDictionary.get(item.Id);
                return {
                  ...item,
                  Name: label.title
                };
              });
            }
          }
        });
        return data;
      },
      providesTags: ["DefaultFilters"]
    }),
    // [REQ]-[POST]-(api/v2/roles/filter)
    getFilters: build.query({
      query: (payload) => ({
        url: ``,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => {
        return response.Response.Data.FilterItems;
      }
    }),
    getFilterListItems: build.query({
      query: (payload) => ({
        url: `filter`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => {
        return response.Response.Data;
      }
    }),
    // [REQ]-[DELETE]-(api/v2/roles?id=108)
    deleteRoles: build.mutation({
      query: (id) => ({
        url: `?id=${id}`,
        method: "delete"
      }),
      invalidatesTags: ["Roles"]
    }),
    // [REQ]-[POST]-(api/v2/roles)
    addRoles: build.mutation({
      query: (payload) => ({
        url: `/`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data,
      invalidatesTags: ["Roles"]
    }),
    // [REQ]-[DELETE]-(api/v2/roles?id=2)
    getRolesInfoCommon: build.query({
      query: (id) => ({
        url: `?id=${id}`
      }),
      transformResponse: (response) => response.Response.Data,
      providesTags: ["RoleInfo"]
    }),
    editRoles: build.mutation({
      query(payload) {
        return {
          url: "/",
          method: "PUT",
          body: {
            ...payload
          }
        };
      },
      transformResponse: (response) => response.Response.Data,
      invalidatesTags: ["Roles", "RoleInfo"]
    })
  })
});
const {
  useGetRolesQuery,
  useAddRolesMutation,
  useEditRolesMutation,
  useLazyGetRolesQuery,
  useDeleteRolesMutation,
  useGetFiltersQuery,
  useGetDefaultRolesFiltersQuery,
  useGetFilterListItemsQuery,
  useGetRolesInfoCommonQuery
} = rolesApi;
const tagTypes$4 = ["Quotas", "FilialQuota", "QuotasRelations"];
const quotasApi = createApi$1({
  reducerPath: "api/quotas",
  baseQuery: customBaseQuery(`${BASE_URL$1}`),
  refetchOnFocus: false,
  tagTypes: tagTypes$4,
  endpoints: (build) => ({
    getQuotas: build.query({
      query: (payload) => ({
        url: "/v2/userquotas/list",
        body: payload,
        method: "post"
      }),
      transformResponse: (response) => {
        const {
          Data
        } = response.Response;
        const defaultItem = Data.Items.find((quota2) => quota2 == null ? void 0 : quota2.IsDefault);
        return {
          TotalCount: Data.TotalCount,
          DefaultItemId: defaultItem == null ? void 0 : defaultItem.Id,
          Quotas: Data.Items.map((quota2) => ({
            id: quota2.Id,
            name: quota2.Name,
            size: quota2.Size,
            users: quota2.UserCount
          }))
        };
      },
      providesTags: ["Quotas"]
    }),
    getFilialQuota: build.query({
      query: (id) => ({
        params: {
          id
        },
        url: "v2/customer/quota",
        method: "get"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      }),
      providesTags: ["FilialQuota"]
    }),
    updateFilialQuota: build.mutation({
      query: (payload) => ({
        body: payload,
        url: "v2/customer/quota",
        method: "POST"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      }),
      invalidatesTags: ["Quotas", "FilialQuota"]
    }),
    createQuota: build.mutation({
      query: (payload) => ({
        url: "/v2/userquotas",
        body: payload,
        method: "post"
      }),
      transformResponse: (response) => {
        const {
          Data
        } = response.Response;
        return {
          id: Data.Id,
          name: Data.Name,
          size: Data.Size,
          users: null
        };
      },
      invalidatesTags: ["Quotas"]
    }),
    updateQuota: build.mutation({
      query: (payload) => ({
        url: "/v2/userquotas",
        body: payload,
        method: "put"
      }),
      transformResponse: (response) => {
        const {
          Data
        } = response.Response;
        return {
          id: Data.Id,
          name: Data.Name,
          size: Data.Size,
          users: null
        };
      },
      invalidatesTags: ["Quotas"]
    }),
    setQuotaByRole: build.mutation({
      query: (payload) => ({
        url: "/v2/userquotas/setbyrole",
        body: payload,
        method: "post"
      }),
      invalidatesTags: ["Quotas"]
    }),
    deleteQuota: build.mutation({
      query: (quotaId) => ({
        url: `/v2/userquotas?id=${quotaId}`,
        method: "delete"
      }),
      invalidatesTags: ["Quotas"]
    }),
    // Relation
    addQuotaRelations: build.mutation({
      query: (payload) => ({
        url: "/v1/quotarelations",
        body: payload,
        method: "post"
      }),
      invalidatesTags: ["Quotas", "QuotasRelations"]
    }),
    editQuotaRelations: build.mutation({
      query: (payload) => ({
        url: "/v1/quotarelations",
        body: payload,
        method: "put"
      }),
      invalidatesTags: ["Quotas", "QuotasRelations"]
    }),
    getQuotasRelations: build.query({
      query: (payload) => ({
        url: "/v1/quotarelations/list",
        method: "post",
        body: payload
      }),
      providesTags: ["QuotasRelations"]
    }),
    deleteQuotaRelation: build.mutation({
      query: ({
        entityType,
        entityId
      }) => ({
        url: `/v1/quotarelations?entitytype=${entityType}&entityid=${entityId}`,
        method: "delete"
      }),
      invalidatesTags: ["Quotas", "QuotasRelations"]
    }),
    getDefaultQuotaRelationFilters: build.query({
      query: ({
        count,
        customerId
      }) => ({
        url: `/v1/quotarelations/filters/default?count=${count}&customerId=${customerId}`,
        method: "get"
      }),
      transformResponse: (response) => {
        return response.DefaultFilters.map((item) => {
          var _a2;
          return {
            ...item,
            Items: (_a2 = item.Items) == null ? void 0 : _a2.map((filterItem) => ({
              ...filterItem,
              Count: void 0,
              checked: false
            })),
            hideSearch: false
          };
        }).sort((a, b) => a.Type - b.Type);
      },
      providesTags: ["QuotasRelations"]
    })
  })
});
const {
  useGetQuotasQuery,
  useLazyGetQuotasQuery,
  useLazyGetFilialQuotaQuery,
  useGetFilialQuotaQuery,
  useUpdateFilialQuotaMutation,
  useCreateQuotaMutation,
  useUpdateQuotaMutation,
  useDeleteQuotaMutation,
  useSetQuotaByRoleMutation,
  // Relation
  useAddQuotaRelationsMutation,
  useEditQuotaRelationsMutation,
  useGetQuotasRelationsQuery,
  useDeleteQuotaRelationMutation,
  useGetDefaultQuotaRelationFiltersQuery
} = quotasApi;
var FilialInfoPanelsEnum = /* @__PURE__ */ ((FilialInfoPanelsEnum2) => {
  FilialInfoPanelsEnum2["ipSecurityUsers"] = "ip-security-users";
  FilialInfoPanelsEnum2["ipSecurityAdm"] = "ip-security-adm";
  FilialInfoPanelsEnum2["sessionDuration"] = "session-duration";
  FilialInfoPanelsEnum2["passwordLimit"] = "password-limit";
  FilialInfoPanelsEnum2["passwordSecurity"] = "password-security";
  return FilialInfoPanelsEnum2;
})(FilialInfoPanelsEnum || {});
var ModulesEnum = /* @__PURE__ */ ((ModulesEnum2) => {
  ModulesEnum2[ModulesEnum2["Mail"] = 1] = "Mail";
  ModulesEnum2[ModulesEnum2["Calendar"] = 2] = "Calendar";
  ModulesEnum2[ModulesEnum2["Draw"] = 5] = "Draw";
  ModulesEnum2[ModulesEnum2["None"] = 0] = "None";
  ModulesEnum2[ModulesEnum2["Disk"] = 3] = "Disk";
  ModulesEnum2[ModulesEnum2["Admin"] = 4] = "Admin";
  ModulesEnum2[ModulesEnum2["Payments"] = 7] = "Payments";
  ModulesEnum2[ModulesEnum2["Contacts"] = 8] = "Contacts";
  ModulesEnum2[ModulesEnum2["Team"] = 9] = "Team";
  ModulesEnum2[ModulesEnum2["Projects"] = 10] = "Projects";
  ModulesEnum2[ModulesEnum2["Pages"] = 11] = "Pages";
  ModulesEnum2[ModulesEnum2["Forms"] = 12] = "Forms";
  return ModulesEnum2;
})(ModulesEnum || {});
var TagEnum = /* @__PURE__ */ ((TagEnum2) => {
  TagEnum2["emailRoles"] = "EmailRoles";
  TagEnum2["calendarRoles"] = "CalendarRoles";
  TagEnum2["emailUsers"] = "EmailUsers";
  TagEnum2["calendarUsers"] = "CalendarUsers";
  return TagEnum2;
})(TagEnum || {});
const tagTypes$3 = Object.values(TagEnum);
const modulesApi = createApi$1({
  reducerPath: "api/modules",
  baseQuery: customBaseQuery(`${BASE_URL$1}`),
  refetchOnFocus: false,
  tagTypes: tagTypes$3,
  endpoints: (build) => ({
    getModuleRoles: build.query({
      query: (payload) => ({
        url: `/v2/moduleaccess/roles?module=${payload.module}&customerId=${payload.id}`,
        method: "get"
      }),
      transformResponse: (response) => {
        const {
          Items
        } = response.Response.Data;
        return Items.map((role) => ({
          id: role.Id,
          name: role.Name
        }));
      },
      providesTags: (result, err, arg) => [arg.module === ModulesEnum.Mail ? TagEnum.emailRoles : TagEnum.calendarRoles]
    }),
    getModuleUsers: build.query({
      query: (payload) => ({
        url: `/v2/moduleaccess/users?module=${payload.module}&customerId=${payload.id}`,
        method: "get"
      }),
      transformResponse: (response) => {
        const {
          Items
        } = response.Response.Data;
        return Items.map((role) => ({
          id: role.Id,
          name: role.Name
        }));
      },
      providesTags: (result, err, arg) => [arg.module === ModulesEnum.Mail ? TagEnum.emailUsers : TagEnum.calendarUsers]
    }),
    addModuleRole: build.mutation({
      query: ({
        module,
        roleId
      }) => ({
        url: "/v2/moduleaccess/roles",
        body: {
          Module: module,
          Ids: [roleId]
        },
        method: "post"
      }),
      invalidatesTags: (result, error, arg) => [arg.module === ModulesEnum.Mail ? TagEnum.emailRoles : TagEnum.calendarRoles]
    }),
    addModuleUser: build.mutation({
      query: ({
        module,
        userId
      }) => ({
        url: "/v2/moduleaccess/users",
        body: {
          Module: module,
          Ids: [userId]
        },
        method: "post"
      }),
      invalidatesTags: (result, error, arg) => [arg.module === ModulesEnum.Mail ? TagEnum.emailUsers : TagEnum.calendarUsers]
    }),
    deleteModuleRole: build.mutation({
      query: ({
        module,
        roleId
      }) => ({
        url: "/v2/moduleaccess/roles",
        body: {
          Module: module,
          Ids: [roleId]
        },
        method: "delete"
      }),
      invalidatesTags: (result, error, arg) => [arg.module === ModulesEnum.Mail ? TagEnum.emailRoles : TagEnum.calendarRoles]
    }),
    deleteModuleUser: build.mutation({
      query: ({
        module,
        userId
      }) => ({
        url: "/v2/moduleaccess/users",
        body: {
          Module: module,
          Ids: [userId]
        },
        method: "delete"
      }),
      invalidatesTags: (result, error, arg) => [arg.module === ModulesEnum.Mail ? TagEnum.emailUsers : TagEnum.calendarUsers]
    })
  })
});
const {
  useGetModuleRolesQuery,
  useGetModuleUsersQuery,
  useAddModuleRoleMutation,
  useAddModuleUserMutation,
  useDeleteModuleRoleMutation,
  useDeleteModuleUserMutation
} = modulesApi;
const tagTypes$2 = ["Statistics", "Filters", "StatisticsList"];
const statisticsApi = createApi$1({
  reducerPath: "api/statistics",
  baseQuery: customBaseQuery(`${BASE_URL$1}/v2/`),
  refetchOnFocus: false,
  tagTypes: tagTypes$2,
  endpoints: (build) => ({
    getStatistics: build.query({
      query: (payload) => ({
        url: `Data`,
        body: {
          ...payload
        },
        method: "post"
      })
    }),
    getUsersActionsList: build.query({
      query: (payload) => ({
        url: `/useractions/list`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data
    }),
    getDefaultUsersActionsFilters: build.query({
      query: (count) => ({
        url: `useractions/filters/default?count=${count}`,
        method: "get"
      }),
      transformResponse: (response) => response.Response.Data.DefaultFilters
    }),
    getUsersActionsFilter: build.query({
      query: (payload) => ({
        url: `useractions/filter`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => {
        const {
          Data: data
        } = response.Response;
        data.FilterItems.forEach((item) => {
          delete item.Count;
        });
        return data;
      }
    }),
    getUsersActionsReport: build.query({
      query: (payload) => ({
        url: `useractions/export`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data
    }),
    getDiskSpace: build.query({
      query: (payload) => ({
        url: `statistics/userspace`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data
    }),
    getUserActivity: build.query({
      query: (payload) => ({
        url: `statistics/useractivity`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data
    })
  })
});
const {
  useGetStatisticsQuery,
  useGetUsersActionsListQuery,
  useLazyGetUsersActionsReportQuery,
  useGetDefaultUsersActionsFiltersQuery,
  useGetUsersActionsFilterQuery,
  useGetDiskSpaceQuery,
  useLazyGetDiskSpaceQuery,
  useGetUserActivityQuery,
  useLazyGetUserActivityQuery
} = statisticsApi;
const tagTypes$1 = ["Filials", "Filters"];
const filialsApi = createApi$1({
  reducerPath: "api/filials",
  baseQuery: customBaseQuery(`${BASE_URL$1}/v2/customer/`),
  refetchOnFocus: false,
  tagTypes: tagTypes$1,
  endpoints: (build) => ({
    getFilials: build.query({
      query: (payload) => ({
        url: `list`,
        body: {
          ...payload
        },
        method: "post"
      }),
      transformResponse: (response) => response.Response.Data,
      providesTags: ["Filials"]
    }),
    getFilialsTree: build.query({
      query: (payload) => ({
        url: `tree`,
        params: {
          ...payload
        },
        method: "get"
      }),
      transformResponse: (response) => response.Response.Data,
      providesTags: ["Filials"]
    }),
    createFilial: build.mutation({
      query(payload) {
        return {
          url: "",
          method: "POST",
          body: {
            ...payload
          }
        };
      },
      transformResponse: (response) => response.Response.Data,
      invalidatesTags: ["Filials"]
    }),
    updateFilial: build.mutation({
      query(payload) {
        return {
          url: "",
          method: "PUT",
          body: {
            ...payload
          }
        };
      },
      transformResponse: (response) => response.Response.Data,
      invalidatesTags: ["Filials"]
    }),
    getFilialsInfoCommon: build.query({
      query: ({
        id,
        extended
      }) => ({
        params: {
          id,
          extended: extended || void 0
        },
        url: ``
      }),
      transformResponse: (response) => response.Response.Data,
      providesTags: ["Filials"]
    }),
    updateFilialSettings: build.mutation({
      query: ({
        id,
        type: type2,
        ...rest
      }) => ({
        url: "settings",
        method: "post",
        body: {
          CustomerId: id,
          Type: type2,
          Settings: rest
        }
      })
    }),
    ldapSettingsSync: build.mutation({
      query: ({
        id
      }) => ({
        params: {
          customerid: id
        },
        url: "startldapSync",
        method: "get"
      })
    }),
    deleteFilials: build.mutation({
      query: (id) => ({
        url: `?id=${id}`,
        method: "delete"
      })
    }),
    updateFilialTimezone: build.mutation({
      query: (payload) => ({
        url: "settings",
        method: "post",
        body: payload
      })
    })
  })
});
const {
  useGetFilialsQuery,
  useGetFilialsTreeQuery,
  useCreateFilialMutation,
  useUpdateFilialMutation,
  useGetFilialsInfoCommonQuery,
  useLazyGetFilialsInfoCommonQuery,
  useUpdateFilialSettingsMutation,
  useLdapSettingsSyncMutation,
  useDeleteFilialsMutation,
  useLazyGetFilialsQuery,
  useUpdateFilialTimezoneMutation
  // useGetFiltersQuery,
  // useRemoveFilialsMutation,
  // useCheckRemoveStatusMutation
} = filialsApi;
const clearApiCacheByTags = (api, tags) => store.dispatch(api.util.invalidateTags(tags));
const resetAllApiState = () => {
  [directoriesApi, emailApi, groupsApi, userApi, usersApi, rolesApi, quotasApi, modulesApi, statisticsApi, filialsApi].forEach((api) => {
    store.dispatch(api.util.resetApiState());
  });
};
function getCookieByName(cookieName) {
  try {
    const cookies2 = document.cookie.split("; ").reduce((acc, pair) => {
      const [key, value] = pair.split("=");
      acc[key.trim()] = decodeURIComponent(value);
      return acc;
    }, {});
    return cookies2[cookieName] || null;
  } catch (error) {
    console.error("Error retrieving cookie:", error);
    return null;
  }
}
const authApi = createApi$1({
  reducerPath: "api/auth",
  baseQuery: customBaseQuery(`${BASE_URL$1}`),
  refetchOnFocus: false,
  endpoints: (build) => ({
    login: build.query({
      query: (payload) => ({
        url: `/v2/Auth/login`,
        body: {
          DeviceId: getCookieByName(
            "_DeviceUid"
            /* DeviceId */
          ) || generateUUID(),
          Login: payload == null ? void 0 : payload.Login,
          Password: payload == null ? void 0 : payload.Password,
          CustomerCode: payload == null ? void 0 : payload.CustomerCode,
          CryptedPassword: payload == null ? void 0 : payload.CryptedPassword,
          SystemName: "admin-app"
        },
        method: "post"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    crypt: build.query({
      query: () => ({
        url: "v1/crypt"
      })
    }),
    loginAs: build.query({
      query: (payload) => ({
        url: `/v2/Auth/login`,
        body: {
          DeviceId: getCookieByName(
            "_DeviceUid"
            /* DeviceId */
          ) || generateUUID(),
          Login: payload == null ? void 0 : payload.Login,
          LoginAs: payload == null ? void 0 : payload.LoginAs,
          Password: payload == null ? void 0 : payload.Password,
          SystemName: "admin-app"
        },
        method: "post"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    bulkForgot: build.query({
      query: (payload) => ({
        url: `/v2/Auth/BulkForgot`,
        body: {
          ids: payload
        },
        method: "post"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    checkUserExistField: build.query({
      query: (payload) => ({
        params: {
          ...payload
        },
        url: `/v2/Auth/userexists`,
        method: "get"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    resetPassword: build.query({
      query: (payload) => ({
        url: `/v2/Auth/resetpassword`,
        body: payload,
        method: "post"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    updatePasswordWithCode: build.query({
      query: (payload) => ({
        url: `/v2/Auth/checkcodewithsetpasswordbyuser`,
        body: payload,
        method: "post"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    checkUserWithCode: build.query({
      query: (payload) => ({
        url: `/v2/Auth/CheckSetPasswordCode?code=${payload.Code}`,
        method: "get"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    checkInvitationLinkCode: build.query({
      query: (payload) => ({
        params: {
          code: payload.Code
        },
        url: `/v2/invitation/validate`,
        method: "get"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    createInvitationLink: build.query({
      query: (payload) => ({
        body: payload,
        url: `/v2/invitation/link`,
        method: "POST"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    updateInvitationLink: build.query({
      query: (payload) => ({
        url: `/v2/invitation`,
        body: payload,
        method: "post"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    deleteInvitationLink: build.mutation({
      query: (code) => ({
        params: {
          code
        },
        url: `/v2/invitation`,
        method: "delete"
      }),
      transformResponse: (response) => {
        var _a2;
        return (_a2 = response.Response) == null ? void 0 : _a2.Data;
      }
    }),
    getInvitationLinksList: build.query({
      query: (customerId) => ({
        params: {
          customerId
        },
        url: `/v2/invitation`,
        method: "get"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    checkEmailExists: build.query({
      query: (payload) => ({
        url: `/v2/Auth/emailexists?email=${payload == null ? void 0 : payload.email}`,
        method: "get"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    }),
    checkCanCreateUser: build.query({
      query: (payload) => ({
        params: {
          Customerid: payload == null ? void 0 : payload.Customerid
        },
        url: `/v2/customer/iscanadduser`,
        method: "get"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    })
  })
});
const {
  useLazyLoginQuery,
  useLazyCryptQuery,
  useLazyBulkForgotQuery,
  useLazyCheckUserExistFieldQuery,
  useLazyResetPasswordQuery,
  useLazyUpdatePasswordWithCodeQuery,
  useLazyCheckUserWithCodeQuery,
  useLazyLoginAsQuery,
  useGetInvitationLinksListQuery,
  useLazyGetInvitationLinksListQuery,
  useDeleteInvitationLinkMutation,
  useLazyCreateInvitationLinkQuery,
  useLazyUpdateInvitationLinkQuery,
  useLazyCheckInvitationLinkCodeQuery,
  useLazyCheckEmailExistsQuery,
  useLazyCheckCanCreateUserQuery
} = authApi;
const initialState$a = {
  roles: [],
  departments: []
};
const directoriesSlice = createSlice$1({
  name: "directories",
  initialState: initialState$a,
  reducers: {
    setRoles(state, action) {
      state.roles = action.payload;
    },
    setDepartments(state, action) {
      state.departments = action.payload;
    }
  }
});
const directoriesActions = directoriesSlice.actions;
const directoriesReducer = directoriesSlice.reducer;
const initialState$9 = {
  groups: [],
  total: 0,
  filters: {
    Count: 20,
    Offset: 0,
    SortOrder: 0,
    SortField: 0,
    Filters: {},
    Query: ""
  },
  selectedGroupId: 0,
  selected: []
};
const groupsSlice = createSlice$1({
  name: "groups",
  initialState: initialState$9,
  reducers: {
    setGroups(state, action) {
      state.groups = action.payload.Roles;
      state.total = action.payload.TotalCount;
    },
    setGroupsTableFilters(state, action) {
      state.filters = action.payload;
    },
    setSelectedGroupId(state, action) {
      state.selectedGroupId = action.payload;
    },
    setSelectedGroupsIds(state, action) {
      state.selected.includes(action.payload) ? state.selected = state.selected.filter((state2) => state2 !== action.payload) : state.selected = [...state.selected, action.payload];
    },
    setSelectedAllGroups(state, action) {
      state.selected = state.selected.length === action.payload.length ? [] : action.payload;
    },
    clearGroupsSelected(state) {
      state.selected = [];
    }
  }
});
const groupsActions = groupsSlice.actions;
const groupsReducer = groupsSlice.reducer;
const defaultUsersColumnsVisibility = {
  Checkbox: false,
  Name: false,
  Login: true,
  Type: false,
  Email: false,
  PostClientEmails: false,
  Phone: false,
  Customer: false,
  ParentUserName: true,
  BirthDate: true,
  DateOfCreate: true,
  LastVisitDate: true,
  Status: true,
  QuotaName: true,
  QuotaSize: true,
  UsingQuotaSize: true,
  Action: false
};
const getSavedColumnVisibility$1 = (localStorageKey, initialValues) => {
  try {
    const saved2 = localStorage == null ? void 0 : localStorage.getItem(`${localStorageKey}`);
    return saved2 ? JSON.parse(saved2) : initialValues;
  } catch (error) {
    console.error("Error accessing cookies:", error);
    return initialValues;
  }
};
const initialState$8 = {
  users: [],
  total: 0,
  filters: {
    Count: 20,
    Offset: 0,
    SortOrder: 0,
    SortField: 0,
    Filters: {},
    Query: "",
    FilterConditions: []
  },
  selectedUserId: 0,
  // for show UserInfoMain when selectedUserId !== 0
  selected: [],
  columnVisibility: getSavedColumnVisibility$1("columnVisibility", defaultUsersColumnsVisibility)
};
const usersSlice = createSlice$1({
  name: "users",
  initialState: initialState$8,
  reducers: {
    setUsers(state, action) {
      state.users = action.payload.Users;
      state.total = action.payload.TotalCount;
    },
    setUsersTableFilters(state, action) {
      state.filters = action.payload;
    },
    setSelectedUserId(state, action) {
      state.selectedUserId = action.payload;
    },
    setSelectedUsersIds(state, action) {
      state.selected.includes(action.payload) ? state.selected = state.selected.filter((state2) => state2 !== action.payload) : state.selected = [...state.selected, action.payload];
    },
    setSelectedAllUsers(state, action) {
      state.selected = state.selected.length === action.payload.length ? [] : action.payload;
    },
    clearUsersSelected(state) {
      state.selected = [];
    },
    setColumnVisibility(state, action) {
      try {
        localStorage.setItem("columnVisibility", JSON.stringify(action.payload));
        state.columnVisibility = action.payload;
      } catch (error) {
        console.error("Error saving in cookies:", error);
      }
    }
  }
});
const usersActions = usersSlice.actions;
const usersReducer = usersSlice.reducer;
var RoleTypesEnum = /* @__PURE__ */ ((RoleTypesEnum2) => {
  RoleTypesEnum2[RoleTypesEnum2["User"] = 0] = "User";
  RoleTypesEnum2[RoleTypesEnum2["Admin"] = 1] = "Admin";
  RoleTypesEnum2[RoleTypesEnum2["SuperUser"] = 2] = "SuperUser";
  RoleTypesEnum2[RoleTypesEnum2["Guest"] = 3] = "Guest";
  RoleTypesEnum2[RoleTypesEnum2["All"] = 4] = "All";
  RoleTypesEnum2[RoleTypesEnum2["Support"] = 5] = "Support";
  return RoleTypesEnum2;
})(RoleTypesEnum || {});
var PanelsEnum = /* @__PURE__ */ ((PanelsEnum2) => {
  PanelsEnum2["generalInformation"] = "general-information";
  PanelsEnum2["editInformation"] = "edit-information";
  return PanelsEnum2;
})(PanelsEnum || {});
const initialState$7 = {
  items: [],
  total: 0,
  filters: {
    Count: 20,
    Offset: 0,
    SortOrder: 0,
    SortField: 0,
    Filters: {},
    Query: "",
    FilterConditions: []
  },
  selectedRolesId: 0,
  // for show UserInfoMain when selectedRolesId !== 0
  selected: [],
  selectedPanel: PanelsEnum.generalInformation
};
const rolesSlice = createSlice$1({
  name: "roles",
  initialState: initialState$7,
  reducers: {
    setRoles(state, action) {
      state.items = action.payload.Items;
      state.total = action.payload.TotalCount;
    },
    setRolesTableFilters(state, action) {
      state.filters = action.payload;
    },
    setSelectedRolesId(state, action) {
      state.selectedRolesId = action.payload;
    },
    setSelectedRolesIds(state, action) {
      state.selected.includes(action.payload) ? state.selected = state.selected.filter((state2) => state2 !== action.payload) : state.selected = [...state.selected, action.payload];
    },
    setSelectedAllRoles(state, action) {
      state.selected = state.selected.length === action.payload.length ? [] : action.payload;
    },
    setSelectedPanel(state, action) {
      state.selectedPanel = action.payload;
    },
    clearRolesSelected(state) {
      state.selected = [];
    }
  }
});
const rolesActions = rolesSlice.actions;
const rolesReducer = rolesSlice.reducer;
const initialState$6 = {
  quotas: [],
  filialQuota: {},
  totalQuotas: 0,
  quotasFilters: {
    Count: 25,
    Offset: 0,
    Query: "",
    FilterConditions: []
  },
  selectedQuota: null,
  // Relation
  quotaRelations: [],
  totalQuotaRelations: 0,
  quotaRelationFilters: {
    Count: 25,
    Offset: 0,
    Query: "",
    FilterConditions: []
  },
  selectedQuotaRelation: null
};
const quotasSlice = createSlice$1({
  name: "quotas",
  initialState: initialState$6,
  reducers: {
    setQuotas(state, action) {
      state.quotas = action.payload.Quotas;
      state.totalQuotas = action.payload.TotalCount;
    },
    setFilialQuota(state, action) {
      state.filialQuota = action.payload;
    },
    setQuotasFilters(state, action) {
      state.quotasFilters = action.payload;
    },
    setSelectedQuota(state, action) {
      state.selectedQuota = action.payload;
    },
    // Relations
    setQuotaRelations(state, action) {
      state.quotaRelations = action.payload.Items;
      state.totalQuotaRelations = action.payload.TotalCount;
    },
    setQuotaRelationFilters(state, action) {
      state.quotaRelationFilters = action.payload;
    },
    setSelectedQuotaRelation(state, action) {
      state.selectedQuotaRelation = action.payload;
    }
  }
});
const quotasActions = quotasSlice.actions;
const quotasReducer = quotasSlice.reducer;
const listSizes = [25, 50, 100];
const initialStatisticFilter = {
  Offset: 0,
  SortOrder: 1,
  SortField: 0,
  FilterConditions: [],
  Query: "",
  Count: listSizes[0]
};
const defaultAuditColumnsVisibility = {
  UserName: false,
  ActionType: false,
  Date: false,
  Description: false,
  Ip: true,
  NewValue: true,
  OldValue: true
};
const getSavedColumnVisibility = (localStorageKey, initialValues) => {
  try {
    const saved2 = localStorage == null ? void 0 : localStorage.getItem(`${localStorageKey}`);
    return saved2 ? JSON.parse(saved2) : initialValues;
  } catch (error) {
    console.error("Error accessing cookies:", error);
    return initialValues;
  }
};
const initialState$5 = {
  files: [],
  total: 0,
  filters: initialStatisticFilter,
  selectedStatisticId: 0,
  // for show UserInfoMain when selectedUserId !== 0
  selected: [],
  usersActionsList: {
    TotalCount: 0,
    Items: [],
    filters: initialStatisticFilter,
    columnVisibility: getSavedColumnVisibility("UsersActionsColumnVisibility", defaultAuditColumnsVisibility)
  },
  diskSpace: {
    Total: {
      Name: "",
      Space: 0,
      DocsCount: 0,
      FilesCount: 0
    },
    TotalCount: 0,
    Items: [],
    filters: initialStatisticFilter
  },
  userActivity: {
    Total: {
      Date: "",
      Visitors: 0,
      Auths: 0,
      Documents: 0,
      Files: 0
    },
    TotalCount: 0,
    Items: [],
    filters: initialStatisticFilter
  }
};
const StatisticsSlice = createSlice$1({
  name: "statistics",
  initialState: initialState$5,
  reducers: {
    setStatistics(state, action) {
      state.files = action.payload.files;
      state.total = action.payload.total;
    },
    setUsersActionsList(state, action) {
      state.usersActionsList.Items = action.payload.Items;
      state.usersActionsList.TotalCount = action.payload.TotalCount;
    },
    setUsersActionsFilters(state, action) {
      state.usersActionsList.filters = action.payload;
    },
    setDiskSpace(state, action) {
      state.diskSpace.Items = action.payload.Items;
      state.diskSpace.TotalCount = action.payload.TotalCount;
      state.diskSpace.Total = action.payload.Total;
    },
    setDiskSpaceFilters(state, action) {
      state.diskSpace.filters = action.payload;
    },
    setUserActivity(state, action) {
      state.userActivity.Items = action.payload.Items;
      state.userActivity.TotalCount = action.payload.TotalCount;
      state.userActivity.Total = action.payload.Total;
    },
    setUserActivityFilters(state, action) {
      state.userActivity.filters = action.payload;
    },
    setSelectedAllStatistics(state, action) {
      state.selected = state.selected.length === action.payload.length ? [] : action.payload;
    },
    clearStatisticsSelected(state) {
      state.selected = [];
    },
    setUsersActionsColumnVisibility(state, action) {
      try {
        localStorage.setItem("UsersActionsColumnVisibility", JSON.stringify(action.payload));
        state.usersActionsList.columnVisibility = action.payload;
      } catch (error) {
        console.error("Error saving in cookies:", error);
      }
    }
  }
});
const statisticsActions = StatisticsSlice.actions;
const statisticsReducer = StatisticsSlice.reducer;
const initialState$4 = {
  filial: null,
  filials: [],
  total: 0,
  filters: {
    Count: 10,
    Offset: 0,
    Query: ""
  },
  selectedFilialsId: 0,
  selected: []
};
const filialsSlice = createSlice$1({
  name: "filials",
  initialState: initialState$4,
  reducers: {
    setFilial(state, action) {
      state.filial = action.payload;
    },
    setFilials(state, action) {
      state.filials = action.payload.Items;
      state.total = action.payload.TotalCount;
    },
    setFilialsTableFilters(state, action) {
      state.filters = action.payload;
    },
    setSelectedFilialsId(state, action) {
      state.selectedFilialsId = action.payload;
    },
    setSelectedFilialsIds(state, action) {
      state.selected.includes(action.payload) ? state.selected = state.selected.filter((state2) => state2 !== action.payload) : state.selected = [...state.selected, action.payload];
    },
    setSelectedAllFilials(state, action) {
      state.selected = state.selected.length === action.payload.length ? [] : action.payload;
    },
    setFilialTimezone(state, action) {
      var _a2;
      if ((_a2 = state == null ? void 0 : state.filial) == null ? void 0 : _a2.Settings) {
        state.filial.Settings.TimeZone = action.payload;
      }
    },
    clearFilialsSelected(state) {
      state.selected = [];
    }
  }
});
const filialsActions = filialsSlice.actions;
const filialsReducer = filialsSlice.reducer;
const registerApi = createApi$1({
  baseQuery: customBaseQuery(`${BASE_URL$1}/v2/customer`),
  refetchOnFocus: false,
  endpoints: (build) => ({
    createClient: build.mutation({
      query: (payload) => ({
        url: `/register`,
        body: payload,
        method: "post"
      }),
      transformResponse: (response) => ({
        ...response.Response.Data
      })
    })
  })
});
const {
  useCreateClientMutation
} = registerApi;
function extractErrorCode(errorResponse) {
  var _a2, _b, _c, _d;
  if ((errorResponse == null ? void 0 : errorResponse.data) && ((_a2 = errorResponse == null ? void 0 : errorResponse.data) == null ? void 0 : _a2.Code) !== void 0) {
    return (_b = errorResponse == null ? void 0 : errorResponse.data) == null ? void 0 : _b.Code;
  } else if ((errorResponse == null ? void 0 : errorResponse.data) && ((_c = errorResponse == null ? void 0 : errorResponse.data) == null ? void 0 : _c.Response)) {
    const response = ((_d = errorResponse == null ? void 0 : errorResponse.data) == null ? void 0 : _d.Response) || {};
    const data = (response == null ? void 0 : response.Data) || {};
    return (data == null ? void 0 : data.Code) || null;
  }
  return null;
}
function pascalToCamel(pascalCaseString) {
  if (!pascalCaseString) {
    return pascalCaseString;
  }
  return (pascalCaseString == null ? void 0 : pascalCaseString.charAt(0).toLowerCase()) + (pascalCaseString == null ? void 0 : pascalCaseString.slice(1));
}
const generateErrorMessage = (errorCode) => {
  if (typeof errorCode === "number" && errorCode in ErrorsEnum) {
    const camelCaseKey = pascalToCamel(ErrorsEnum[errorCode]);
    return t(`requestsErrors.${camelCaseKey}`);
  } else {
    if (errorCode) {
      return `${t(`requestsErrors.error`)} ${errorCode || ""}`;
    } else {
      return `${t(`requestsErrors.unknownError`)}`;
    }
  }
};
const universalNotification = ({
  error,
  isSuccess,
  isError,
  successMessage,
  successTitle,
  errorTitle,
  errorMessage,
  ...props
}) => {
  try {
    if (isSuccess && (successMessage || successTitle)) {
      showNotification({
        ...props,
        title: successTitle,
        message: successMessage,
        autoClose: true,
        color: "green",
        style: {
          zIndex: 1003
        }
      });
    } else if (isError) {
      const codeError = extractErrorCode(error);
      showNotification({
        ...props,
        title: (errorTitle == null ? void 0 : errorTitle.length) ? errorTitle : codeError ? generateErrorMessage(codeError) : t(`requestsErrors.unknownError`),
        message: (errorMessage == null ? void 0 : errorMessage.length) ? errorMessage : "",
        autoClose: true,
        color: "red",
        style: {
          zIndex: 1003
        }
      });
    }
  } catch (e) {
    const error2 = e;
    showNotification({
      ...props,
      title: `${error2 == null ? void 0 : error2.name}`,
      message: error2 == null ? void 0 : error2.message,
      autoClose: true,
      color: "yellow",
      style: {
        zIndex: 1003
      }
    });
  }
};
const statusErrorExceptions = {
  406: ["changePasswordLinkedUserEmail", "commonSettings", "getFilialsInfoCommon", "changeStatuses", "removeUsers", "deleteFilials", "resetPassword", "updateUserInfo", "getFilialsInfoCommon", "getFilialQuota", "getModuleRoles", "getModuleUsers", "editRoles"],
  429: ["login"],
  500: ["add", "ldapSettingsSync", "setQuotaByRole", "addQuotaRelations"],
  504: ["ldapSettingsSync"]
};
const errorHandlingMiddleware = (store2) => (next) => (action) => {
  if (isRejectedWithValue$1(action)) {
    const {
      payload,
      meta
    } = action;
    const {
      status,
      originalStatus
    } = payload;
    const {
      arg: {
        originalArgs
      }
    } = meta;
    const isValidStatus = (status2) => {
      return typeof status2 === "number";
    };
    const validStatus = isValidStatus(status) ? status : isValidStatus(originalStatus) ? originalStatus : null;
    switch (validStatus) {
      case 401:
        if (!(originalArgs == null ? void 0 : originalArgs.LoginAs)) {
          store2.dispatch(userInfoActions.setUserTokens({}));
          store2.dispatch(userInfoActions.setUserInfo({}));
          universalNotification({
            error: payload,
            errorTitle: instance$1.t("login.errors.loginError"),
            errorMessage: instance$1.t("login.errors.incorrectNamePassword"),
            isError: true,
            isSuccess: false
          });
        }
        break;
      case 403:
        universalNotification({
          error: payload,
          errorTitle: instance$1.t("login.errors.blockedAccount"),
          isError: true,
          isSuccess: false
        });
        break;
      case 406:
        if (!statusErrorExceptions[406].includes(action.meta.arg.endpointName)) {
          universalNotification({
            error: payload,
            errorTitle: instance$1.t("login.errors.incorrectNamePassword"),
            isError: true,
            isSuccess: false
          });
        }
        break;
      case 429:
        if (statusErrorExceptions[429].includes(action.meta.arg.endpointName)) {
          universalNotification({
            error: payload,
            errorTitle: instance$1.t("login.errors.toManyRequests"),
            isError: true,
            isSuccess: false
          });
        } else if (action.meta.arg.endpointName !== "loginAs") {
          universalNotification({
            error: payload,
            isError: true,
            isSuccess: false
          });
        }
        break;
      case 404:
        universalNotification({
          error: payload,
          errorTitle: instance$1.t("login.errors.notFound"),
          isError: true,
          isSuccess: false
        });
        break;
      case 400:
        break;
      case 500:
        if (!statusErrorExceptions[500].includes(action.meta.arg.endpointName)) {
          universalNotification({
            error: payload,
            errorTitle: instance$1.t("login.errors.internalError"),
            errorMessage: instance$1.t("login.errors.tryLater"),
            isError: true,
            isSuccess: false
          });
        }
        break;
      case 502:
        universalNotification({
          error: payload,
          errorTitle: instance$1.t("requestsErrors.badGateway"),
          errorMessage: instance$1.t("login.errors.tryLater"),
          isError: true,
          isSuccess: false
        });
        break;
      case 504:
        if (!statusErrorExceptions[504].includes(action.meta.arg.endpointName)) {
          universalNotification({
            error: payload,
            errorTitle: instance$1.t("errors.serverNoResponse"),
            errorMessage: instance$1.t("login.errors.tryLater"),
            isError: true,
            isSuccess: false
          });
        }
        break;
    }
  }
  return next(action);
};
const tagTypes = ["ProductNotification"];
const commonSettingsApi = createApi$1({
  reducerPath: "api/commonSettings",
  baseQuery: customBaseQuery(`${BASE_URL$1}`),
  refetchOnFocus: false,
  tagTypes,
  endpoints: (build) => ({
    commonSettings: build.query({
      query: () => ({
        url: "v1/settings/common"
      })
      // transformResponse: (response: IFullResponse<ICommonSettings>) => response.Response.Data
    }),
    changeCommonSettings: build.mutation({
      query: (payload) => ({
        url: `v1/settings/common`,
        body: {
          ...payload
        },
        method: "post"
      })
    }),
    uploadFile: build.mutation({
      query: (payload) => ({
        url: `v1/Files/Upload`,
        body: payload,
        method: "post"
      })
    }),
    syncTeamSettings: build.query({
      query: () => ({
        url: "v2/userprofile/StartExportUser"
      })
    }),
    getProductNotification: build.query({
      query: () => ({
        url: "v1/productnotification"
      }),
      transformResponse: (response) => {
        var _a2;
        return {
          ...(_a2 = response.Response.Data) == null ? void 0 : _a2.UpdateInfo
        };
      },
      providesTags: ["ProductNotification"]
    }),
    updateProductNotification: build.mutation({
      query: (payload) => ({
        url: `v1/productnotification`,
        body: payload,
        method: "post"
      })
    }),
    getTimezones: build.query({
      query: () => ({
        url: "v1/calendars/timezones"
      })
    })
  })
});
const {
  useCommonSettingsQuery,
  useChangeCommonSettingsMutation,
  useLazyCommonSettingsQuery,
  useLazySyncTeamSettingsQuery,
  useUploadFileMutation,
  useGetProductNotificationQuery,
  useUpdateProductNotificationMutation,
  useGetTimezonesQuery,
  useLazyGetTimezonesQuery
} = commonSettingsApi;
class LuxonError extends Error {
}
class InvalidDateTimeError extends LuxonError {
  constructor(reason) {
    super(`Invalid DateTime: ${reason.toMessage()}`);
  }
}
class InvalidIntervalError extends LuxonError {
  constructor(reason) {
    super(`Invalid Interval: ${reason.toMessage()}`);
  }
}
class InvalidDurationError extends LuxonError {
  constructor(reason) {
    super(`Invalid Duration: ${reason.toMessage()}`);
  }
}
class ConflictingSpecificationError extends LuxonError {
}
class InvalidUnitError extends LuxonError {
  constructor(unit2) {
    super(`Invalid unit ${unit2}`);
  }
}
class InvalidArgumentError extends LuxonError {
}
class ZoneIsAbstractError extends LuxonError {
  constructor() {
    super("Zone is an abstract class");
  }
}
const n = "numeric", s = "short", l = "long";
const DATE_SHORT = {
  year: n,
  month: n,
  day: n
};
const DATE_MED = {
  year: n,
  month: s,
  day: n
};
const DATE_MED_WITH_WEEKDAY = {
  year: n,
  month: s,
  day: n,
  weekday: s
};
const DATE_FULL = {
  year: n,
  month: l,
  day: n
};
const DATE_HUGE = {
  year: n,
  month: l,
  day: n,
  weekday: l
};
const TIME_SIMPLE = {
  hour: n,
  minute: n
};
const TIME_WITH_SECONDS = {
  hour: n,
  minute: n,
  second: n
};
const TIME_WITH_SHORT_OFFSET = {
  hour: n,
  minute: n,
  second: n,
  timeZoneName: s
};
const TIME_WITH_LONG_OFFSET = {
  hour: n,
  minute: n,
  second: n,
  timeZoneName: l
};
const TIME_24_SIMPLE = {
  hour: n,
  minute: n,
  hourCycle: "h23"
};
const TIME_24_WITH_SECONDS = {
  hour: n,
  minute: n,
  second: n,
  hourCycle: "h23"
};
const TIME_24_WITH_SHORT_OFFSET = {
  hour: n,
  minute: n,
  second: n,
  hourCycle: "h23",
  timeZoneName: s
};
const TIME_24_WITH_LONG_OFFSET = {
  hour: n,
  minute: n,
  second: n,
  hourCycle: "h23",
  timeZoneName: l
};
const DATETIME_SHORT = {
  year: n,
  month: n,
  day: n,
  hour: n,
  minute: n
};
const DATETIME_SHORT_WITH_SECONDS = {
  year: n,
  month: n,
  day: n,
  hour: n,
  minute: n,
  second: n
};
const DATETIME_MED = {
  year: n,
  month: s,
  day: n,
  hour: n,
  minute: n
};
const DATETIME_MED_WITH_SECONDS = {
  year: n,
  month: s,
  day: n,
  hour: n,
  minute: n,
  second: n
};
const DATETIME_MED_WITH_WEEKDAY = {
  year: n,
  month: s,
  day: n,
  weekday: s,
  hour: n,
  minute: n
};
const DATETIME_FULL = {
  year: n,
  month: l,
  day: n,
  hour: n,
  minute: n,
  timeZoneName: s
};
const DATETIME_FULL_WITH_SECONDS = {
  year: n,
  month: l,
  day: n,
  hour: n,
  minute: n,
  second: n,
  timeZoneName: s
};
const DATETIME_HUGE = {
  year: n,
  month: l,
  day: n,
  weekday: l,
  hour: n,
  minute: n,
  timeZoneName: l
};
const DATETIME_HUGE_WITH_SECONDS = {
  year: n,
  month: l,
  day: n,
  weekday: l,
  hour: n,
  minute: n,
  second: n,
  timeZoneName: l
};
class Zone {
  /**
   * The type of zone
   * @abstract
   * @type {string}
   */
  get type() {
    throw new ZoneIsAbstractError();
  }
  /**
   * The name of this zone.
   * @abstract
   * @type {string}
   */
  get name() {
    throw new ZoneIsAbstractError();
  }
  /**
   * The IANA name of this zone.
   * Defaults to `name` if not overwritten by a subclass.
   * @abstract
   * @type {string}
   */
  get ianaName() {
    return this.name;
  }
  /**
   * Returns whether the offset is known to be fixed for the whole year.
   * @abstract
   * @type {boolean}
   */
  get isUniversal() {
    throw new ZoneIsAbstractError();
  }
  /**
   * Returns the offset's common name (such as EST) at the specified timestamp
   * @abstract
   * @param {number} ts - Epoch milliseconds for which to get the name
   * @param {Object} opts - Options to affect the format
   * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
   * @param {string} opts.locale - What locale to return the offset name in.
   * @return {string}
   */
  offsetName(ts, opts) {
    throw new ZoneIsAbstractError();
  }
  /**
   * Returns the offset's value as a string
   * @abstract
   * @param {number} ts - Epoch milliseconds for which to get the offset
   * @param {string} format - What style of offset to return.
   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
   * @return {string}
   */
  formatOffset(ts, format) {
    throw new ZoneIsAbstractError();
  }
  /**
   * Return the offset in minutes for this zone at the specified timestamp.
   * @abstract
   * @param {number} ts - Epoch milliseconds for which to compute the offset
   * @return {number}
   */
  offset(ts) {
    throw new ZoneIsAbstractError();
  }
  /**
   * Return whether this Zone is equal to another zone
   * @abstract
   * @param {Zone} otherZone - the zone to compare
   * @return {boolean}
   */
  equals(otherZone) {
    throw new ZoneIsAbstractError();
  }
  /**
   * Return whether this Zone is valid.
   * @abstract
   * @type {boolean}
   */
  get isValid() {
    throw new ZoneIsAbstractError();
  }
}
let singleton$1 = null;
class SystemZone extends Zone {
  /**
   * Get a singleton instance of the local zone
   * @return {SystemZone}
   */
  static get instance() {
    if (singleton$1 === null) {
      singleton$1 = new SystemZone();
    }
    return singleton$1;
  }
  /** @override **/
  get type() {
    return "system";
  }
  /** @override **/
  get name() {
    return new Intl.DateTimeFormat().resolvedOptions().timeZone;
  }
  /** @override **/
  get isUniversal() {
    return false;
  }
  /** @override **/
  offsetName(ts, { format, locale }) {
    return parseZoneInfo(ts, format, locale);
  }
  /** @override **/
  formatOffset(ts, format) {
    return formatOffset(this.offset(ts), format);
  }
  /** @override **/
  offset(ts) {
    return -new Date(ts).getTimezoneOffset();
  }
  /** @override **/
  equals(otherZone) {
    return otherZone.type === "system";
  }
  /** @override **/
  get isValid() {
    return true;
  }
}
const dtfCache = /* @__PURE__ */ new Map();
function makeDTF(zoneName) {
  let dtf = dtfCache.get(zoneName);
  if (dtf === void 0) {
    dtf = new Intl.DateTimeFormat("en-US", {
      hour12: false,
      timeZone: zoneName,
      year: "numeric",
      month: "2-digit",
      day: "2-digit",
      hour: "2-digit",
      minute: "2-digit",
      second: "2-digit",
      era: "short"
    });
    dtfCache.set(zoneName, dtf);
  }
  return dtf;
}
const typeToPos = {
  year: 0,
  month: 1,
  day: 2,
  era: 3,
  hour: 4,
  minute: 5,
  second: 6
};
function hackyOffset(dtf, date) {
  const formatted = dtf.format(date).replace(/\u200E/g, ""), parsed = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(formatted), [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;
  return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];
}
function partsOffset(dtf, date) {
  const formatted = dtf.formatToParts(date);
  const filled = [];
  for (let i = 0; i < formatted.length; i++) {
    const { type: type2, value } = formatted[i];
    const pos = typeToPos[type2];
    if (type2 === "era") {
      filled[pos] = value;
    } else if (!isUndefined(pos)) {
      filled[pos] = parseInt(value, 10);
    }
  }
  return filled;
}
const ianaZoneCache = /* @__PURE__ */ new Map();
class IANAZone extends Zone {
  /**
   * @param {string} name - Zone name
   * @return {IANAZone}
   */
  static create(name2) {
    let zone = ianaZoneCache.get(name2);
    if (zone === void 0) {
      ianaZoneCache.set(name2, zone = new IANAZone(name2));
    }
    return zone;
  }
  /**
   * Reset local caches. Should only be necessary in testing scenarios.
   * @return {void}
   */
  static resetCache() {
    ianaZoneCache.clear();
    dtfCache.clear();
  }
  /**
   * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.
   * @param {string} s - The string to check validity on
   * @example IANAZone.isValidSpecifier("America/New_York") //=> true
   * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false
   * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.
   * @return {boolean}
   */
  static isValidSpecifier(s2) {
    return this.isValidZone(s2);
  }
  /**
   * Returns whether the provided string identifies a real zone
   * @param {string} zone - The string to check
   * @example IANAZone.isValidZone("America/New_York") //=> true
   * @example IANAZone.isValidZone("Fantasia/Castle") //=> false
   * @example IANAZone.isValidZone("Sport~~blorp") //=> false
   * @return {boolean}
   */
  static isValidZone(zone) {
    if (!zone) {
      return false;
    }
    try {
      new Intl.DateTimeFormat("en-US", { timeZone: zone }).format();
      return true;
    } catch (e) {
      return false;
    }
  }
  constructor(name2) {
    super();
    this.zoneName = name2;
    this.valid = IANAZone.isValidZone(name2);
  }
  /**
   * The type of zone. `iana` for all instances of `IANAZone`.
   * @override
   * @type {string}
   */
  get type() {
    return "iana";
  }
  /**
   * The name of this zone (i.e. the IANA zone name).
   * @override
   * @type {string}
   */
  get name() {
    return this.zoneName;
  }
  /**
   * Returns whether the offset is known to be fixed for the whole year:
   * Always returns false for all IANA zones.
   * @override
   * @type {boolean}
   */
  get isUniversal() {
    return false;
  }
  /**
   * Returns the offset's common name (such as EST) at the specified timestamp
   * @override
   * @param {number} ts - Epoch milliseconds for which to get the name
   * @param {Object} opts - Options to affect the format
   * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
   * @param {string} opts.locale - What locale to return the offset name in.
   * @return {string}
   */
  offsetName(ts, { format, locale }) {
    return parseZoneInfo(ts, format, locale, this.name);
  }
  /**
   * Returns the offset's value as a string
   * @override
   * @param {number} ts - Epoch milliseconds for which to get the offset
   * @param {string} format - What style of offset to return.
   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
   * @return {string}
   */
  formatOffset(ts, format) {
    return formatOffset(this.offset(ts), format);
  }
  /**
   * Return the offset in minutes for this zone at the specified timestamp.
   * @override
   * @param {number} ts - Epoch milliseconds for which to compute the offset
   * @return {number}
   */
  offset(ts) {
    if (!this.valid) return NaN;
    const date = new Date(ts);
    if (isNaN(date)) return NaN;
    const dtf = makeDTF(this.name);
    let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date);
    if (adOrBc === "BC") {
      year = -Math.abs(year) + 1;
    }
    const adjustedHour = hour === 24 ? 0 : hour;
    const asUTC = objToLocalTS({
      year,
      month,
      day,
      hour: adjustedHour,
      minute,
      second,
      millisecond: 0
    });
    let asTS = +date;
    const over = asTS % 1e3;
    asTS -= over >= 0 ? over : 1e3 + over;
    return (asUTC - asTS) / (60 * 1e3);
  }
  /**
   * Return whether this Zone is equal to another zone
   * @override
   * @param {Zone} otherZone - the zone to compare
   * @return {boolean}
   */
  equals(otherZone) {
    return otherZone.type === "iana" && otherZone.name === this.name;
  }
  /**
   * Return whether this Zone is valid.
   * @override
   * @type {boolean}
   */
  get isValid() {
    return this.valid;
  }
}
let intlLFCache = {};
function getCachedLF(locString, opts = {}) {
  const key = JSON.stringify([locString, opts]);
  let dtf = intlLFCache[key];
  if (!dtf) {
    dtf = new Intl.ListFormat(locString, opts);
    intlLFCache[key] = dtf;
  }
  return dtf;
}
const intlDTCache = /* @__PURE__ */ new Map();
function getCachedDTF(locString, opts = {}) {
  const key = JSON.stringify([locString, opts]);
  let dtf = intlDTCache.get(key);
  if (dtf === void 0) {
    dtf = new Intl.DateTimeFormat(locString, opts);
    intlDTCache.set(key, dtf);
  }
  return dtf;
}
const intlNumCache = /* @__PURE__ */ new Map();
function getCachedINF(locString, opts = {}) {
  const key = JSON.stringify([locString, opts]);
  let inf = intlNumCache.get(key);
  if (inf === void 0) {
    inf = new Intl.NumberFormat(locString, opts);
    intlNumCache.set(key, inf);
  }
  return inf;
}
const intlRelCache = /* @__PURE__ */ new Map();
function getCachedRTF(locString, opts = {}) {
  const { base, ...cacheKeyOpts } = opts;
  const key = JSON.stringify([locString, cacheKeyOpts]);
  let inf = intlRelCache.get(key);
  if (inf === void 0) {
    inf = new Intl.RelativeTimeFormat(locString, opts);
    intlRelCache.set(key, inf);
  }
  return inf;
}
let sysLocaleCache = null;
function systemLocale() {
  if (sysLocaleCache) {
    return sysLocaleCache;
  } else {
    sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;
    return sysLocaleCache;
  }
}
const intlResolvedOptionsCache = /* @__PURE__ */ new Map();
function getCachedIntResolvedOptions(locString) {
  let opts = intlResolvedOptionsCache.get(locString);
  if (opts === void 0) {
    opts = new Intl.DateTimeFormat(locString).resolvedOptions();
    intlResolvedOptionsCache.set(locString, opts);
  }
  return opts;
}
const weekInfoCache = /* @__PURE__ */ new Map();
function getCachedWeekInfo(locString) {
  let data = weekInfoCache.get(locString);
  if (!data) {
    const locale = new Intl.Locale(locString);
    data = "getWeekInfo" in locale ? locale.getWeekInfo() : locale.weekInfo;
    if (!("minimalDays" in data)) {
      data = { ...fallbackWeekSettings, ...data };
    }
    weekInfoCache.set(locString, data);
  }
  return data;
}
function parseLocaleString(localeStr) {
  const xIndex = localeStr.indexOf("-x-");
  if (xIndex !== -1) {
    localeStr = localeStr.substring(0, xIndex);
  }
  const uIndex = localeStr.indexOf("-u-");
  if (uIndex === -1) {
    return [localeStr];
  } else {
    let options;
    let selectedStr;
    try {
      options = getCachedDTF(localeStr).resolvedOptions();
      selectedStr = localeStr;
    } catch (e) {
      const smaller = localeStr.substring(0, uIndex);
      options = getCachedDTF(smaller).resolvedOptions();
      selectedStr = smaller;
    }
    const { numberingSystem, calendar } = options;
    return [selectedStr, numberingSystem, calendar];
  }
}
function intlConfigString(localeStr, numberingSystem, outputCalendar) {
  if (outputCalendar || numberingSystem) {
    if (!localeStr.includes("-u-")) {
      localeStr += "-u";
    }
    if (outputCalendar) {
      localeStr += `-ca-${outputCalendar}`;
    }
    if (numberingSystem) {
      localeStr += `-nu-${numberingSystem}`;
    }
    return localeStr;
  } else {
    return localeStr;
  }
}
function mapMonths(f2) {
  const ms = [];
  for (let i = 1; i <= 12; i++) {
    const dt = DateTime.utc(2009, i, 1);
    ms.push(f2(dt));
  }
  return ms;
}
function mapWeekdays(f2) {
  const ms = [];
  for (let i = 1; i <= 7; i++) {
    const dt = DateTime.utc(2016, 11, 13 + i);
    ms.push(f2(dt));
  }
  return ms;
}
function listStuff(loc, length, englishFn, intlFn) {
  const mode = loc.listingMode();
  if (mode === "error") {
    return null;
  } else if (mode === "en") {
    return englishFn(length);
  } else {
    return intlFn(length);
  }
}
function supportsFastNumbers(loc) {
  if (loc.numberingSystem && loc.numberingSystem !== "latn") {
    return false;
  } else {
    return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || getCachedIntResolvedOptions(loc.locale).numberingSystem === "latn";
  }
}
class PolyNumberFormatter {
  constructor(intl, forceSimple, opts) {
    this.padTo = opts.padTo || 0;
    this.floor = opts.floor || false;
    const { padTo, floor, ...otherOpts } = opts;
    if (!forceSimple || Object.keys(otherOpts).length > 0) {
      const intlOpts = { useGrouping: false, ...opts };
      if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;
      this.inf = getCachedINF(intl, intlOpts);
    }
  }
  format(i) {
    if (this.inf) {
      const fixed = this.floor ? Math.floor(i) : i;
      return this.inf.format(fixed);
    } else {
      const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);
      return padStart(fixed, this.padTo);
    }
  }
}
class PolyDateFormatter {
  constructor(dt, intl, opts) {
    this.opts = opts;
    this.originalZone = void 0;
    let z = void 0;
    if (this.opts.timeZone) {
      this.dt = dt;
    } else if (dt.zone.type === "fixed") {
      const gmtOffset = -1 * (dt.offset / 60);
      const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
      if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
        z = offsetZ;
        this.dt = dt;
      } else {
        z = "UTC";
        this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ minutes: dt.offset });
        this.originalZone = dt.zone;
      }
    } else if (dt.zone.type === "system") {
      this.dt = dt;
    } else if (dt.zone.type === "iana") {
      this.dt = dt;
      z = dt.zone.name;
    } else {
      z = "UTC";
      this.dt = dt.setZone("UTC").plus({ minutes: dt.offset });
      this.originalZone = dt.zone;
    }
    const intlOpts = { ...this.opts };
    intlOpts.timeZone = intlOpts.timeZone || z;
    this.dtf = getCachedDTF(intl, intlOpts);
  }
  format() {
    if (this.originalZone) {
      return this.formatToParts().map(({ value }) => value).join("");
    }
    return this.dtf.format(this.dt.toJSDate());
  }
  formatToParts() {
    const parts = this.dtf.formatToParts(this.dt.toJSDate());
    if (this.originalZone) {
      return parts.map((part) => {
        if (part.type === "timeZoneName") {
          const offsetName = this.originalZone.offsetName(this.dt.ts, {
            locale: this.dt.locale,
            format: this.opts.timeZoneName
          });
          return {
            ...part,
            value: offsetName
          };
        } else {
          return part;
        }
      });
    }
    return parts;
  }
  resolvedOptions() {
    return this.dtf.resolvedOptions();
  }
}
class PolyRelFormatter {
  constructor(intl, isEnglish, opts) {
    this.opts = { style: "long", ...opts };
    if (!isEnglish && hasRelative()) {
      this.rtf = getCachedRTF(intl, opts);
    }
  }
  format(count, unit2) {
    if (this.rtf) {
      return this.rtf.format(count, unit2);
    } else {
      return formatRelativeTime(unit2, count, this.opts.numeric, this.opts.style !== "long");
    }
  }
  formatToParts(count, unit2) {
    if (this.rtf) {
      return this.rtf.formatToParts(count, unit2);
    } else {
      return [];
    }
  }
}
const fallbackWeekSettings = {
  firstDay: 1,
  minimalDays: 4,
  weekend: [6, 7]
};
class Locale {
  static fromOpts(opts) {
    return Locale.create(
      opts.locale,
      opts.numberingSystem,
      opts.outputCalendar,
      opts.weekSettings,
      opts.defaultToEN
    );
  }
  static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {
    const specifiedLocale = locale || Settings.defaultLocale;
    const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale());
    const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;
    const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;
    const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;
    return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);
  }
  static resetCache() {
    sysLocaleCache = null;
    intlDTCache.clear();
    intlNumCache.clear();
    intlRelCache.clear();
    intlResolvedOptionsCache.clear();
    weekInfoCache.clear();
  }
  static fromObject({ locale, numberingSystem, outputCalendar, weekSettings } = {}) {
    return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);
  }
  constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {
    const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);
    this.locale = parsedLocale;
    this.numberingSystem = numbering || parsedNumberingSystem || null;
    this.outputCalendar = outputCalendar || parsedOutputCalendar || null;
    this.weekSettings = weekSettings;
    this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);
    this.weekdaysCache = { format: {}, standalone: {} };
    this.monthsCache = { format: {}, standalone: {} };
    this.meridiemCache = null;
    this.eraCache = {};
    this.specifiedLocale = specifiedLocale;
    this.fastNumbersCached = null;
  }
  get fastNumbers() {
    if (this.fastNumbersCached == null) {
      this.fastNumbersCached = supportsFastNumbers(this);
    }
    return this.fastNumbersCached;
  }
  listingMode() {
    const isActuallyEn = this.isEnglish();
    const hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
    return isActuallyEn && hasNoWeirdness ? "en" : "intl";
  }
  clone(alts) {
    if (!alts || Object.getOwnPropertyNames(alts).length === 0) {
      return this;
    } else {
      return Locale.create(
        alts.locale || this.specifiedLocale,
        alts.numberingSystem || this.numberingSystem,
        alts.outputCalendar || this.outputCalendar,
        validateWeekSettings(alts.weekSettings) || this.weekSettings,
        alts.defaultToEN || false
      );
    }
  }
  redefaultToEN(alts = {}) {
    return this.clone({ ...alts, defaultToEN: true });
  }
  redefaultToSystem(alts = {}) {
    return this.clone({ ...alts, defaultToEN: false });
  }
  months(length, format = false) {
    return listStuff(this, length, months, () => {
      const monthSpecialCase = this.intl === "ja" || this.intl.startsWith("ja-");
      format &= !monthSpecialCase;
      const intl = format ? { month: length, day: "numeric" } : { month: length }, formatStr = format ? "format" : "standalone";
      if (!this.monthsCache[formatStr][length]) {
        const mapper = !monthSpecialCase ? (dt) => this.extract(dt, intl, "month") : (dt) => this.dtFormatter(dt, intl).format();
        this.monthsCache[formatStr][length] = mapMonths(mapper);
      }
      return this.monthsCache[formatStr][length];
    });
  }
  weekdays(length, format = false) {
    return listStuff(this, length, weekdays, () => {
      const intl = format ? { weekday: length, year: "numeric", month: "long", day: "numeric" } : { weekday: length }, formatStr = format ? "format" : "standalone";
      if (!this.weekdaysCache[formatStr][length]) {
        this.weekdaysCache[formatStr][length] = mapWeekdays(
          (dt) => this.extract(dt, intl, "weekday")
        );
      }
      return this.weekdaysCache[formatStr][length];
    });
  }
  meridiems() {
    return listStuff(
      this,
      void 0,
      () => meridiems,
      () => {
        if (!this.meridiemCache) {
          const intl = { hour: "numeric", hourCycle: "h12" };
          this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(
            (dt) => this.extract(dt, intl, "dayperiod")
          );
        }
        return this.meridiemCache;
      }
    );
  }
  eras(length) {
    return listStuff(this, length, eras, () => {
      const intl = { era: length };
      if (!this.eraCache[length]) {
        this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(
          (dt) => this.extract(dt, intl, "era")
        );
      }
      return this.eraCache[length];
    });
  }
  extract(dt, intlOpts, field) {
    const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m) => m.type.toLowerCase() === field);
    return matching ? matching.value : null;
  }
  numberFormatter(opts = {}) {
    return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);
  }
  dtFormatter(dt, intlOpts = {}) {
    return new PolyDateFormatter(dt, this.intl, intlOpts);
  }
  relFormatter(opts = {}) {
    return new PolyRelFormatter(this.intl, this.isEnglish(), opts);
  }
  listFormatter(opts = {}) {
    return getCachedLF(this.intl, opts);
  }
  isEnglish() {
    return this.locale === "en" || this.locale.toLowerCase() === "en-us" || getCachedIntResolvedOptions(this.intl).locale.startsWith("en-us");
  }
  getWeekSettings() {
    if (this.weekSettings) {
      return this.weekSettings;
    } else if (!hasLocaleWeekInfo()) {
      return fallbackWeekSettings;
    } else {
      return getCachedWeekInfo(this.locale);
    }
  }
  getStartOfWeek() {
    return this.getWeekSettings().firstDay;
  }
  getMinDaysInFirstWeek() {
    return this.getWeekSettings().minimalDays;
  }
  getWeekendDays() {
    return this.getWeekSettings().weekend;
  }
  equals(other) {
    return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;
  }
  toString() {
    return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;
  }
}
let singleton = null;
class FixedOffsetZone extends Zone {
  /**
   * Get a singleton instance of UTC
   * @return {FixedOffsetZone}
   */
  static get utcInstance() {
    if (singleton === null) {
      singleton = new FixedOffsetZone(0);
    }
    return singleton;
  }
  /**
   * Get an instance with a specified offset
   * @param {number} offset - The offset in minutes
   * @return {FixedOffsetZone}
   */
  static instance(offset2) {
    return offset2 === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset2);
  }
  /**
   * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6"
   * @param {string} s - The offset string to parse
   * @example FixedOffsetZone.parseSpecifier("UTC+6")
   * @example FixedOffsetZone.parseSpecifier("UTC+06")
   * @example FixedOffsetZone.parseSpecifier("UTC-6:00")
   * @return {FixedOffsetZone}
   */
  static parseSpecifier(s2) {
    if (s2) {
      const r2 = s2.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
      if (r2) {
        return new FixedOffsetZone(signedOffset(r2[1], r2[2]));
      }
    }
    return null;
  }
  constructor(offset2) {
    super();
    this.fixed = offset2;
  }
  /**
   * The type of zone. `fixed` for all instances of `FixedOffsetZone`.
   * @override
   * @type {string}
   */
  get type() {
    return "fixed";
  }
  /**
   * The name of this zone.
   * All fixed zones' names always start with "UTC" (plus optional offset)
   * @override
   * @type {string}
   */
  get name() {
    return this.fixed === 0 ? "UTC" : `UTC${formatOffset(this.fixed, "narrow")}`;
  }
  /**
   * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`
   *
   * @override
   * @type {string}
   */
  get ianaName() {
    if (this.fixed === 0) {
      return "Etc/UTC";
    } else {
      return `Etc/GMT${formatOffset(-this.fixed, "narrow")}`;
    }
  }
  /**
   * Returns the offset's common name at the specified timestamp.
   *
   * For fixed offset zones this equals to the zone name.
   * @override
   */
  offsetName() {
    return this.name;
  }
  /**
   * Returns the offset's value as a string
   * @override
   * @param {number} ts - Epoch milliseconds for which to get the offset
   * @param {string} format - What style of offset to return.
   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
   * @return {string}
   */
  formatOffset(ts, format) {
    return formatOffset(this.fixed, format);
  }
  /**
   * Returns whether the offset is known to be fixed for the whole year:
   * Always returns true for all fixed offset zones.
   * @override
   * @type {boolean}
   */
  get isUniversal() {
    return true;
  }
  /**
   * Return the offset in minutes for this zone at the specified timestamp.
   *
   * For fixed offset zones, this is constant and does not depend on a timestamp.
   * @override
   * @return {number}
   */
  offset() {
    return this.fixed;
  }
  /**
   * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)
   * @override
   * @param {Zone} otherZone - the zone to compare
   * @return {boolean}
   */
  equals(otherZone) {
    return otherZone.type === "fixed" && otherZone.fixed === this.fixed;
  }
  /**
   * Return whether this Zone is valid:
   * All fixed offset zones are valid.
   * @override
   * @type {boolean}
   */
  get isValid() {
    return true;
  }
}
class InvalidZone extends Zone {
  constructor(zoneName) {
    super();
    this.zoneName = zoneName;
  }
  /** @override **/
  get type() {
    return "invalid";
  }
  /** @override **/
  get name() {
    return this.zoneName;
  }
  /** @override **/
  get isUniversal() {
    return false;
  }
  /** @override **/
  offsetName() {
    return null;
  }
  /** @override **/
  formatOffset() {
    return "";
  }
  /** @override **/
  offset() {
    return NaN;
  }
  /** @override **/
  equals() {
    return false;
  }
  /** @override **/
  get isValid() {
    return false;
  }
}
function normalizeZone(input, defaultZone2) {
  if (isUndefined(input) || input === null) {
    return defaultZone2;
  } else if (input instanceof Zone) {
    return input;
  } else if (isString(input)) {
    const lowered = input.toLowerCase();
    if (lowered === "default") return defaultZone2;
    else if (lowered === "local" || lowered === "system") return SystemZone.instance;
    else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;
    else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);
  } else if (isNumber(input)) {
    return FixedOffsetZone.instance(input);
  } else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") {
    return input;
  } else {
    return new InvalidZone(input);
  }
}
const numberingSystems = {
  arab: "[٠-٩]",
  arabext: "[۰-۹]",
  bali: "[᭐-᭙]",
  beng: "[০-৯]",
  deva: "[०-९]",
  fullwide: "[０-９]",
  gujr: "[૦-૯]",
  hanidec: "[〇|一|二|三|四|五|六|七|八|九]",
  khmr: "[០-៩]",
  knda: "[೦-೯]",
  laoo: "[໐-໙]",
  limb: "[᥆-᥏]",
  mlym: "[൦-൯]",
  mong: "[᠐-᠙]",
  mymr: "[၀-၉]",
  orya: "[୦-୯]",
  tamldec: "[௦-௯]",
  telu: "[౦-౯]",
  thai: "[๐-๙]",
  tibt: "[༠-༩]",
  latn: "\\d"
};
const numberingSystemsUTF16 = {
  arab: [1632, 1641],
  arabext: [1776, 1785],
  bali: [6992, 7001],
  beng: [2534, 2543],
  deva: [2406, 2415],
  fullwide: [65296, 65303],
  gujr: [2790, 2799],
  khmr: [6112, 6121],
  knda: [3302, 3311],
  laoo: [3792, 3801],
  limb: [6470, 6479],
  mlym: [3430, 3439],
  mong: [6160, 6169],
  mymr: [4160, 4169],
  orya: [2918, 2927],
  tamldec: [3046, 3055],
  telu: [3174, 3183],
  thai: [3664, 3673],
  tibt: [3872, 3881]
};
const hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split("");
function parseDigits(str) {
  let value = parseInt(str, 10);
  if (isNaN(value)) {
    value = "";
    for (let i = 0; i < str.length; i++) {
      const code = str.charCodeAt(i);
      if (str[i].search(numberingSystems.hanidec) !== -1) {
        value += hanidecChars.indexOf(str[i]);
      } else {
        for (const key in numberingSystemsUTF16) {
          const [min, max] = numberingSystemsUTF16[key];
          if (code >= min && code <= max) {
            value += code - min;
          }
        }
      }
    }
    return parseInt(value, 10);
  } else {
    return value;
  }
}
const digitRegexCache = /* @__PURE__ */ new Map();
function resetDigitRegexCache() {
  digitRegexCache.clear();
}
function digitRegex({ numberingSystem }, append2 = "") {
  const ns = numberingSystem || "latn";
  let appendCache = digitRegexCache.get(ns);
  if (appendCache === void 0) {
    appendCache = /* @__PURE__ */ new Map();
    digitRegexCache.set(ns, appendCache);
  }
  let regex = appendCache.get(append2);
  if (regex === void 0) {
    regex = new RegExp(`${numberingSystems[ns]}${append2}`);
    appendCache.set(append2, regex);
  }
  return regex;
}
let now = () => Date.now(), defaultZone = "system", defaultLocale = null, defaultNumberingSystem = null, defaultOutputCalendar = null, twoDigitCutoffYear = 60, throwOnInvalid, defaultWeekSettings = null;
class Settings {
  /**
   * Get the callback for returning the current timestamp.
   * @type {function}
   */
  static get now() {
    return now;
  }
  /**
   * Set the callback for returning the current timestamp.
   * The function should return a number, which will be interpreted as an Epoch millisecond count
   * @type {function}
   * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future
   * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
   */
  static set now(n2) {
    now = n2;
  }
  /**
   * Set the default time zone to create DateTimes in. Does not affect existing instances.
   * Use the value "system" to reset this value to the system's time zone.
   * @type {string}
   */
  static set defaultZone(zone) {
    defaultZone = zone;
  }
  /**
   * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
   * The default value is the system's time zone (the one set on the machine that runs this code).
   * @type {Zone}
   */
  static get defaultZone() {
    return normalizeZone(defaultZone, SystemZone.instance);
  }
  /**
   * Get the default locale to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static get defaultLocale() {
    return defaultLocale;
  }
  /**
   * Set the default locale to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static set defaultLocale(locale) {
    defaultLocale = locale;
  }
  /**
   * Get the default numbering system to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static get defaultNumberingSystem() {
    return defaultNumberingSystem;
  }
  /**
   * Set the default numbering system to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static set defaultNumberingSystem(numberingSystem) {
    defaultNumberingSystem = numberingSystem;
  }
  /**
   * Get the default output calendar to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static get defaultOutputCalendar() {
    return defaultOutputCalendar;
  }
  /**
   * Set the default output calendar to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static set defaultOutputCalendar(outputCalendar) {
    defaultOutputCalendar = outputCalendar;
  }
  /**
   * @typedef {Object} WeekSettings
   * @property {number} firstDay
   * @property {number} minimalDays
   * @property {number[]} weekend
   */
  /**
   * @return {WeekSettings|null}
   */
  static get defaultWeekSettings() {
    return defaultWeekSettings;
  }
  /**
   * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and
   * how many days are required in the first week of a year.
   * Does not affect existing instances.
   *
   * @param {WeekSettings|null} weekSettings
   */
  static set defaultWeekSettings(weekSettings) {
    defaultWeekSettings = validateWeekSettings(weekSettings);
  }
  /**
   * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
   * @type {number}
   */
  static get twoDigitCutoffYear() {
    return twoDigitCutoffYear;
  }
  /**
   * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
   * @type {number}
   * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century
   * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century
   * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950
   * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50
   * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
   */
  static set twoDigitCutoffYear(cutoffYear) {
    twoDigitCutoffYear = cutoffYear % 100;
  }
  /**
   * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
   * @type {boolean}
   */
  static get throwOnInvalid() {
    return throwOnInvalid;
  }
  /**
   * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
   * @type {boolean}
   */
  static set throwOnInvalid(t2) {
    throwOnInvalid = t2;
  }
  /**
   * Reset Luxon's global caches. Should only be necessary in testing scenarios.
   * @return {void}
   */
  static resetCaches() {
    Locale.resetCache();
    IANAZone.resetCache();
    DateTime.resetCache();
    resetDigitRegexCache();
  }
}
class Invalid {
  constructor(reason, explanation) {
    this.reason = reason;
    this.explanation = explanation;
  }
  toMessage() {
    if (this.explanation) {
      return `${this.reason}: ${this.explanation}`;
    } else {
      return this.reason;
    }
  }
}
const nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
function unitOutOfRange(unit2, value) {
  return new Invalid(
    "unit out of range",
    `you specified ${value} (of type ${typeof value}) as a ${unit2}, which is invalid`
  );
}
function dayOfWeek(year, month, day) {
  const d = new Date(Date.UTC(year, month - 1, day));
  if (year < 100 && year >= 0) {
    d.setUTCFullYear(d.getUTCFullYear() - 1900);
  }
  const js = d.getUTCDay();
  return js === 0 ? 7 : js;
}
function computeOrdinal(year, month, day) {
  return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];
}
function uncomputeOrdinal(year, ordinal) {
  const table = isLeapYear(year) ? leapLadder : nonLeapLadder, month0 = table.findIndex((i) => i < ordinal), day = ordinal - table[month0];
  return { month: month0 + 1, day };
}
function isoWeekdayToLocal(isoWeekday, startOfWeek) {
  return (isoWeekday - startOfWeek + 7) % 7 + 1;
}
function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) {
  const { year, month, day } = gregObj, ordinal = computeOrdinal(year, month, day), weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);
  let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7), weekYear;
  if (weekNumber < 1) {
    weekYear = year - 1;
    weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);
  } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {
    weekYear = year + 1;
    weekNumber = 1;
  } else {
    weekYear = year;
  }
  return { weekYear, weekNumber, weekday, ...timeObject(gregObj) };
}
function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) {
  const { weekYear, weekNumber, weekday } = weekData, weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek), yearInDays = daysInYear(weekYear);
  let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek, year;
  if (ordinal < 1) {
    year = weekYear - 1;
    ordinal += daysInYear(year);
  } else if (ordinal > yearInDays) {
    year = weekYear + 1;
    ordinal -= daysInYear(weekYear);
  } else {
    year = weekYear;
  }
  const { month, day } = uncomputeOrdinal(year, ordinal);
  return { year, month, day, ...timeObject(weekData) };
}
function gregorianToOrdinal(gregData) {
  const { year, month, day } = gregData;
  const ordinal = computeOrdinal(year, month, day);
  return { year, ordinal, ...timeObject(gregData) };
}
function ordinalToGregorian(ordinalData) {
  const { year, ordinal } = ordinalData;
  const { month, day } = uncomputeOrdinal(year, ordinal);
  return { year, month, day, ...timeObject(ordinalData) };
}
function usesLocalWeekValues(obj, loc) {
  const hasLocaleWeekData = !isUndefined(obj.localWeekday) || !isUndefined(obj.localWeekNumber) || !isUndefined(obj.localWeekYear);
  if (hasLocaleWeekData) {
    const hasIsoWeekData = !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);
    if (hasIsoWeekData) {
      throw new ConflictingSpecificationError(
        "Cannot mix locale-based week fields with ISO-based week fields"
      );
    }
    if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;
    if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;
    if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;
    delete obj.localWeekday;
    delete obj.localWeekNumber;
    delete obj.localWeekYear;
    return {
      minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),
      startOfWeek: loc.getStartOfWeek()
    };
  } else {
    return { minDaysInFirstWeek: 4, startOfWeek: 1 };
  }
}
function hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) {
  const validYear = isInteger(obj.weekYear), validWeek = integerBetween(
    obj.weekNumber,
    1,
    weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)
  ), validWeekday = integerBetween(obj.weekday, 1, 7);
  if (!validYear) {
    return unitOutOfRange("weekYear", obj.weekYear);
  } else if (!validWeek) {
    return unitOutOfRange("week", obj.weekNumber);
  } else if (!validWeekday) {
    return unitOutOfRange("weekday", obj.weekday);
  } else return false;
}
function hasInvalidOrdinalData(obj) {
  const validYear = isInteger(obj.year), validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));
  if (!validYear) {
    return unitOutOfRange("year", obj.year);
  } else if (!validOrdinal) {
    return unitOutOfRange("ordinal", obj.ordinal);
  } else return false;
}
function hasInvalidGregorianData(obj) {
  const validYear = isInteger(obj.year), validMonth = integerBetween(obj.month, 1, 12), validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));
  if (!validYear) {
    return unitOutOfRange("year", obj.year);
  } else if (!validMonth) {
    return unitOutOfRange("month", obj.month);
  } else if (!validDay) {
    return unitOutOfRange("day", obj.day);
  } else return false;
}
function hasInvalidTimeData(obj) {
  const { hour, minute, second, millisecond } = obj;
  const validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, validMinute = integerBetween(minute, 0, 59), validSecond = integerBetween(second, 0, 59), validMillisecond = integerBetween(millisecond, 0, 999);
  if (!validHour) {
    return unitOutOfRange("hour", hour);
  } else if (!validMinute) {
    return unitOutOfRange("minute", minute);
  } else if (!validSecond) {
    return unitOutOfRange("second", second);
  } else if (!validMillisecond) {
    return unitOutOfRange("millisecond", millisecond);
  } else return false;
}
function isUndefined(o) {
  return typeof o === "undefined";
}
function isNumber(o) {
  return typeof o === "number";
}
function isInteger(o) {
  return typeof o === "number" && o % 1 === 0;
}
function isString(o) {
  return typeof o === "string";
}
function isDate(o) {
  return Object.prototype.toString.call(o) === "[object Date]";
}
function hasRelative() {
  try {
    return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat;
  } catch (e) {
    return false;
  }
}
function hasLocaleWeekInfo() {
  try {
    return typeof Intl !== "undefined" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype);
  } catch (e) {
    return false;
  }
}
function maybeArray(thing) {
  return Array.isArray(thing) ? thing : [thing];
}
function bestBy(arr, by, compare) {
  if (arr.length === 0) {
    return void 0;
  }
  return arr.reduce((best, next) => {
    const pair = [by(next), next];
    if (!best) {
      return pair;
    } else if (compare(best[0], pair[0]) === best[0]) {
      return best;
    } else {
      return pair;
    }
  }, null)[1];
}
function pick(obj, keys) {
  return keys.reduce((a, k) => {
    a[k] = obj[k];
    return a;
  }, {});
}
function hasOwnProperty(obj, prop) {
  return Object.prototype.hasOwnProperty.call(obj, prop);
}
function validateWeekSettings(settings2) {
  if (settings2 == null) {
    return null;
  } else if (typeof settings2 !== "object") {
    throw new InvalidArgumentError("Week settings must be an object");
  } else {
    if (!integerBetween(settings2.firstDay, 1, 7) || !integerBetween(settings2.minimalDays, 1, 7) || !Array.isArray(settings2.weekend) || settings2.weekend.some((v) => !integerBetween(v, 1, 7))) {
      throw new InvalidArgumentError("Invalid week settings");
    }
    return {
      firstDay: settings2.firstDay,
      minimalDays: settings2.minimalDays,
      weekend: Array.from(settings2.weekend)
    };
  }
}
function integerBetween(thing, bottom, top) {
  return isInteger(thing) && thing >= bottom && thing <= top;
}
function floorMod(x, n2) {
  return x - n2 * Math.floor(x / n2);
}
function padStart(input, n2 = 2) {
  const isNeg = input < 0;
  let padded;
  if (isNeg) {
    padded = "-" + ("" + -input).padStart(n2, "0");
  } else {
    padded = ("" + input).padStart(n2, "0");
  }
  return padded;
}
function parseInteger(string) {
  if (isUndefined(string) || string === null || string === "") {
    return void 0;
  } else {
    return parseInt(string, 10);
  }
}
function parseFloating(string) {
  if (isUndefined(string) || string === null || string === "") {
    return void 0;
  } else {
    return parseFloat(string);
  }
}
function parseMillis(fraction) {
  if (isUndefined(fraction) || fraction === null || fraction === "") {
    return void 0;
  } else {
    const f2 = parseFloat("0." + fraction) * 1e3;
    return Math.floor(f2);
  }
}
function roundTo(number, digits, rounding = "round") {
  const factor = 10 ** digits;
  switch (rounding) {
    case "expand":
      return number > 0 ? Math.ceil(number * factor) / factor : Math.floor(number * factor) / factor;
    case "trunc":
      return Math.trunc(number * factor) / factor;
    case "round":
      return Math.round(number * factor) / factor;
    case "floor":
      return Math.floor(number * factor) / factor;
    case "ceil":
      return Math.ceil(number * factor) / factor;
    default:
      throw new RangeError(`Value rounding ${rounding} is out of range`);
  }
}
function isLeapYear(year) {
  return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
function daysInYear(year) {
  return isLeapYear(year) ? 366 : 365;
}
function daysInMonth(year, month) {
  const modMonth = floorMod(month - 1, 12) + 1, modYear = year + (month - modMonth) / 12;
  if (modMonth === 2) {
    return isLeapYear(modYear) ? 29 : 28;
  } else {
    return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];
  }
}
function objToLocalTS(obj) {
  let d = Date.UTC(
    obj.year,
    obj.month - 1,
    obj.day,
    obj.hour,
    obj.minute,
    obj.second,
    obj.millisecond
  );
  if (obj.year < 100 && obj.year >= 0) {
    d = new Date(d);
    d.setUTCFullYear(obj.year, obj.month - 1, obj.day);
  }
  return +d;
}
function firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {
  const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);
  return -fwdlw + minDaysInFirstWeek - 1;
}
function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) {
  const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);
  const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);
  return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;
}
function untruncateYear(year) {
  if (year > 99) {
    return year;
  } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2e3 + year;
}
function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {
  const date = new Date(ts), intlOpts = {
    hourCycle: "h23",
    year: "numeric",
    month: "2-digit",
    day: "2-digit",
    hour: "2-digit",
    minute: "2-digit"
  };
  if (timeZone) {
    intlOpts.timeZone = timeZone;
  }
  const modified = { timeZoneName: offsetFormat, ...intlOpts };
  const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find((m) => m.type.toLowerCase() === "timezonename");
  return parsed ? parsed.value : null;
}
function signedOffset(offHourStr, offMinuteStr) {
  let offHour = parseInt(offHourStr, 10);
  if (Number.isNaN(offHour)) {
    offHour = 0;
  }
  const offMin = parseInt(offMinuteStr, 10) || 0, offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;
  return offHour * 60 + offMinSigned;
}
function asNumber(value) {
  const numericValue = Number(value);
  if (typeof value === "boolean" || value === "" || !Number.isFinite(numericValue))
    throw new InvalidArgumentError(`Invalid unit value ${value}`);
  return numericValue;
}
function normalizeObject(obj, normalizer) {
  const normalized = {};
  for (const u in obj) {
    if (hasOwnProperty(obj, u)) {
      const v = obj[u];
      if (v === void 0 || v === null) continue;
      normalized[normalizer(u)] = asNumber(v);
    }
  }
  return normalized;
}
function formatOffset(offset2, format) {
  const hours = Math.trunc(Math.abs(offset2 / 60)), minutes = Math.trunc(Math.abs(offset2 % 60)), sign = offset2 >= 0 ? "+" : "-";
  switch (format) {
    case "short":
      return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;
    case "narrow":
      return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`;
    case "techie":
      return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;
    default:
      throw new RangeError(`Value format ${format} is out of range for property format`);
  }
}
function timeObject(obj) {
  return pick(obj, ["hour", "minute", "second", "millisecond"]);
}
const monthsLong = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
];
const monthsShort = [
  "Jan",
  "Feb",
  "Mar",
  "Apr",
  "May",
  "Jun",
  "Jul",
  "Aug",
  "Sep",
  "Oct",
  "Nov",
  "Dec"
];
const monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
function months(length) {
  switch (length) {
    case "narrow":
      return [...monthsNarrow];
    case "short":
      return [...monthsShort];
    case "long":
      return [...monthsLong];
    case "numeric":
      return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
    case "2-digit":
      return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
    default:
      return null;
  }
}
const weekdaysLong = [
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday",
  "Sunday"
];
const weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
const weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"];
function weekdays(length) {
  switch (length) {
    case "narrow":
      return [...weekdaysNarrow];
    case "short":
      return [...weekdaysShort];
    case "long":
      return [...weekdaysLong];
    case "numeric":
      return ["1", "2", "3", "4", "5", "6", "7"];
    default:
      return null;
  }
}
const meridiems = ["AM", "PM"];
const erasLong = ["Before Christ", "Anno Domini"];
const erasShort = ["BC", "AD"];
const erasNarrow = ["B", "A"];
function eras(length) {
  switch (length) {
    case "narrow":
      return [...erasNarrow];
    case "short":
      return [...erasShort];
    case "long":
      return [...erasLong];
    default:
      return null;
  }
}
function meridiemForDateTime(dt) {
  return meridiems[dt.hour < 12 ? 0 : 1];
}
function weekdayForDateTime(dt, length) {
  return weekdays(length)[dt.weekday - 1];
}
function monthForDateTime(dt, length) {
  return months(length)[dt.month - 1];
}
function eraForDateTime(dt, length) {
  return eras(length)[dt.year < 0 ? 0 : 1];
}
function formatRelativeTime(unit2, count, numeric = "always", narrow = false) {
  const units = {
    years: ["year", "yr."],
    quarters: ["quarter", "qtr."],
    months: ["month", "mo."],
    weeks: ["week", "wk."],
    days: ["day", "day", "days"],
    hours: ["hour", "hr."],
    minutes: ["minute", "min."],
    seconds: ["second", "sec."]
  };
  const lastable = ["hours", "minutes", "seconds"].indexOf(unit2) === -1;
  if (numeric === "auto" && lastable) {
    const isDay = unit2 === "days";
    switch (count) {
      case 1:
        return isDay ? "tomorrow" : `next ${units[unit2][0]}`;
      case -1:
        return isDay ? "yesterday" : `last ${units[unit2][0]}`;
      case 0:
        return isDay ? "today" : `this ${units[unit2][0]}`;
    }
  }
  const isInPast = Object.is(count, -0) || count < 0, fmtValue = Math.abs(count), singular = fmtValue === 1, lilUnits = units[unit2], fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit2][0] : unit2;
  return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;
}
function stringifyTokens(splits, tokenToString) {
  let s2 = "";
  for (const token of splits) {
    if (token.literal) {
      s2 += token.val;
    } else {
      s2 += tokenToString(token.val);
    }
  }
  return s2;
}
const macroTokenToFormatOpts = {
  D: DATE_SHORT,
  DD: DATE_MED,
  DDD: DATE_FULL,
  DDDD: DATE_HUGE,
  t: TIME_SIMPLE,
  tt: TIME_WITH_SECONDS,
  ttt: TIME_WITH_SHORT_OFFSET,
  tttt: TIME_WITH_LONG_OFFSET,
  T: TIME_24_SIMPLE,
  TT: TIME_24_WITH_SECONDS,
  TTT: TIME_24_WITH_SHORT_OFFSET,
  TTTT: TIME_24_WITH_LONG_OFFSET,
  f: DATETIME_SHORT,
  ff: DATETIME_MED,
  fff: DATETIME_FULL,
  ffff: DATETIME_HUGE,
  F: DATETIME_SHORT_WITH_SECONDS,
  FF: DATETIME_MED_WITH_SECONDS,
  FFF: DATETIME_FULL_WITH_SECONDS,
  FFFF: DATETIME_HUGE_WITH_SECONDS
};
class Formatter {
  static create(locale, opts = {}) {
    return new Formatter(locale, opts);
  }
  static parseFormat(fmt) {
    let current2 = null, currentFull = "", bracketed = false;
    const splits = [];
    for (let i = 0; i < fmt.length; i++) {
      const c = fmt.charAt(i);
      if (c === "'") {
        if (currentFull.length > 0 || bracketed) {
          splits.push({
            literal: bracketed || /^\s+$/.test(currentFull),
            val: currentFull === "" ? "'" : currentFull
          });
        }
        current2 = null;
        currentFull = "";
        bracketed = !bracketed;
      } else if (bracketed) {
        currentFull += c;
      } else if (c === current2) {
        currentFull += c;
      } else {
        if (currentFull.length > 0) {
          splits.push({ literal: /^\s+$/.test(currentFull), val: currentFull });
        }
        currentFull = c;
        current2 = c;
      }
    }
    if (currentFull.length > 0) {
      splits.push({ literal: bracketed || /^\s+$/.test(currentFull), val: currentFull });
    }
    return splits;
  }
  static macroTokenToFormatOpts(token) {
    return macroTokenToFormatOpts[token];
  }
  constructor(locale, formatOpts) {
    this.opts = formatOpts;
    this.loc = locale;
    this.systemLoc = null;
  }
  formatWithSystemDefault(dt, opts) {
    if (this.systemLoc === null) {
      this.systemLoc = this.loc.redefaultToSystem();
    }
    const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });
    return df.format();
  }
  dtFormatter(dt, opts = {}) {
    return this.loc.dtFormatter(dt, { ...this.opts, ...opts });
  }
  formatDateTime(dt, opts) {
    return this.dtFormatter(dt, opts).format();
  }
  formatDateTimeParts(dt, opts) {
    return this.dtFormatter(dt, opts).formatToParts();
  }
  formatInterval(interval, opts) {
    const df = this.dtFormatter(interval.start, opts);
    return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());
  }
  resolvedOptions(dt, opts) {
    return this.dtFormatter(dt, opts).resolvedOptions();
  }
  num(n2, p = 0, signDisplay = void 0) {
    if (this.opts.forceSimple) {
      return padStart(n2, p);
    }
    const opts = { ...this.opts };
    if (p > 0) {
      opts.padTo = p;
    }
    if (signDisplay) {
      opts.signDisplay = signDisplay;
    }
    return this.loc.numberFormatter(opts).format(n2);
  }
  formatDateTimeFromString(dt, fmt) {
    const knownEnglish = this.loc.listingMode() === "en", useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", string = (opts, extract) => this.loc.extract(dt, opts, extract), formatOffset2 = (opts) => {
      if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {
        return "Z";
      }
      return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : "";
    }, meridiem = () => knownEnglish ? meridiemForDateTime(dt) : string({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), month = (length, standalone) => knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { month: length } : { month: length, day: "numeric" }, "month"), weekday = (length, standalone) => knownEnglish ? weekdayForDateTime(dt, length) : string(
      standalone ? { weekday: length } : { weekday: length, month: "long", day: "numeric" },
      "weekday"
    ), maybeMacro = (token) => {
      const formatOpts = Formatter.macroTokenToFormatOpts(token);
      if (formatOpts) {
        return this.formatWithSystemDefault(dt, formatOpts);
      } else {
        return token;
      }
    }, era = (length) => knownEnglish ? eraForDateTime(dt, length) : string({ era: length }, "era"), tokenToString = (token) => {
      switch (token) {
        case "S":
          return this.num(dt.millisecond);
        case "u":
        case "SSS":
          return this.num(dt.millisecond, 3);
        case "s":
          return this.num(dt.second);
        case "ss":
          return this.num(dt.second, 2);
        case "uu":
          return this.num(Math.floor(dt.millisecond / 10), 2);
        case "uuu":
          return this.num(Math.floor(dt.millisecond / 100));
        case "m":
          return this.num(dt.minute);
        case "mm":
          return this.num(dt.minute, 2);
        case "h":
          return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);
        case "hh":
          return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);
        case "H":
          return this.num(dt.hour);
        case "HH":
          return this.num(dt.hour, 2);
        case "Z":
          return formatOffset2({ format: "narrow", allowZ: this.opts.allowZ });
        case "ZZ":
          return formatOffset2({ format: "short", allowZ: this.opts.allowZ });
        case "ZZZ":
          return formatOffset2({ format: "techie", allowZ: this.opts.allowZ });
        case "ZZZZ":
          return dt.zone.offsetName(dt.ts, { format: "short", locale: this.loc.locale });
        case "ZZZZZ":
          return dt.zone.offsetName(dt.ts, { format: "long", locale: this.loc.locale });
        case "z":
          return dt.zoneName;
        case "a":
          return meridiem();
        case "d":
          return useDateTimeFormatter ? string({ day: "numeric" }, "day") : this.num(dt.day);
        case "dd":
          return useDateTimeFormatter ? string({ day: "2-digit" }, "day") : this.num(dt.day, 2);
        case "c":
          return this.num(dt.weekday);
        case "ccc":
          return weekday("short", true);
        case "cccc":
          return weekday("long", true);
        case "ccccc":
          return weekday("narrow", true);
        case "E":
          return this.num(dt.weekday);
        case "EEE":
          return weekday("short", false);
        case "EEEE":
          return weekday("long", false);
        case "EEEEE":
          return weekday("narrow", false);
        case "L":
          return useDateTimeFormatter ? string({ month: "numeric", day: "numeric" }, "month") : this.num(dt.month);
        case "LL":
          return useDateTimeFormatter ? string({ month: "2-digit", day: "numeric" }, "month") : this.num(dt.month, 2);
        case "LLL":
          return month("short", true);
        case "LLLL":
          return month("long", true);
        case "LLLLL":
          return month("narrow", true);
        case "M":
          return useDateTimeFormatter ? string({ month: "numeric" }, "month") : this.num(dt.month);
        case "MM":
          return useDateTimeFormatter ? string({ month: "2-digit" }, "month") : this.num(dt.month, 2);
        case "MMM":
          return month("short", false);
        case "MMMM":
          return month("long", false);
        case "MMMMM":
          return month("narrow", false);
        case "y":
          return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year);
        case "yy":
          return useDateTimeFormatter ? string({ year: "2-digit" }, "year") : this.num(dt.year.toString().slice(-2), 2);
        case "yyyy":
          return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year, 4);
        case "yyyyyy":
          return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year, 6);
        case "G":
          return era("short");
        case "GG":
          return era("long");
        case "GGGGG":
          return era("narrow");
        case "kk":
          return this.num(dt.weekYear.toString().slice(-2), 2);
        case "kkkk":
          return this.num(dt.weekYear, 4);
        case "W":
          return this.num(dt.weekNumber);
        case "WW":
          return this.num(dt.weekNumber, 2);
        case "n":
          return this.num(dt.localWeekNumber);
        case "nn":
          return this.num(dt.localWeekNumber, 2);
        case "ii":
          return this.num(dt.localWeekYear.toString().slice(-2), 2);
        case "iiii":
          return this.num(dt.localWeekYear, 4);
        case "o":
          return this.num(dt.ordinal);
        case "ooo":
          return this.num(dt.ordinal, 3);
        case "q":
          return this.num(dt.quarter);
        case "qq":
          return this.num(dt.quarter, 2);
        case "X":
          return this.num(Math.floor(dt.ts / 1e3));
        case "x":
          return this.num(dt.ts);
        default:
          return maybeMacro(token);
      }
    };
    return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);
  }
  formatDurationFromString(dur, fmt) {
    const invertLargest = this.opts.signMode === "negativeLargestOnly" ? -1 : 1;
    const tokenToField = (token) => {
      switch (token[0]) {
        case "S":
          return "milliseconds";
        case "s":
          return "seconds";
        case "m":
          return "minutes";
        case "h":
          return "hours";
        case "d":
          return "days";
        case "w":
          return "weeks";
        case "M":
          return "months";
        case "y":
          return "years";
        default:
          return null;
      }
    }, tokenToString = (lildur, info) => (token) => {
      const mapped = tokenToField(token);
      if (mapped) {
        const inversionFactor = info.isNegativeDuration && mapped !== info.largestUnit ? invertLargest : 1;
        let signDisplay;
        if (this.opts.signMode === "negativeLargestOnly" && mapped !== info.largestUnit) {
          signDisplay = "never";
        } else if (this.opts.signMode === "all") {
          signDisplay = "always";
        } else {
          signDisplay = "auto";
        }
        return this.num(lildur.get(mapped) * inversionFactor, token.length, signDisplay);
      } else {
        return token;
      }
    }, tokens = Formatter.parseFormat(fmt), realTokens = tokens.reduce(
      (found, { literal, val }) => literal ? found : found.concat(val),
      []
    ), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t2) => t2)), durationInfo = {
      isNegativeDuration: collapsed < 0,
      // this relies on "collapsed" being based on "shiftTo", which builds up the object
      // in order
      largestUnit: Object.keys(collapsed.values)[0]
    };
    return stringifyTokens(tokens, tokenToString(collapsed, durationInfo));
  }
}
const ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
function combineRegexes(...regexes) {
  const full = regexes.reduce((f2, r2) => f2 + r2.source, "");
  return RegExp(`^${full}$`);
}
function combineExtractors(...extractors) {
  return (m) => extractors.reduce(
    ([mergedVals, mergedZone, cursor], ex) => {
      const [val, zone, next] = ex(m, cursor);
      return [{ ...mergedVals, ...val }, zone || mergedZone, next];
    },
    [{}, null, 1]
  ).slice(0, 2);
}
function parse(s2, ...patterns) {
  if (s2 == null) {
    return [null, null];
  }
  for (const [regex, extractor] of patterns) {
    const m = regex.exec(s2);
    if (m) {
      return extractor(m);
    }
  }
  return [null, null];
}
function simpleParse(...keys) {
  return (match2, cursor) => {
    const ret = {};
    let i;
    for (i = 0; i < keys.length; i++) {
      ret[keys[i]] = parseInteger(match2[cursor + i]);
    }
    return [ret, null, cursor + i];
  };
}
const offsetRegex = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/;
const isoExtendedZone = `(?:${offsetRegex.source}?(?:\\[(${ianaRegex.source})\\])?)?`;
const isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/;
const isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);
const isoTimeExtensionRegex = RegExp(`(?:[Tt]${isoTimeRegex.source})?`);
const isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/;
const isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/;
const isoOrdinalRegex = /(\d{4})-?(\d{3})/;
const extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay");
const extractISOOrdinalData = simpleParse("year", "ordinal");
const sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/;
const sqlTimeRegex = RegExp(
  `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`
);
const sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);
function int(match2, pos, fallback) {
  const m = match2[pos];
  return isUndefined(m) ? fallback : parseInteger(m);
}
function extractISOYmd(match2, cursor) {
  const item = {
    year: int(match2, cursor),
    month: int(match2, cursor + 1, 1),
    day: int(match2, cursor + 2, 1)
  };
  return [item, null, cursor + 3];
}
function extractISOTime(match2, cursor) {
  const item = {
    hours: int(match2, cursor, 0),
    minutes: int(match2, cursor + 1, 0),
    seconds: int(match2, cursor + 2, 0),
    milliseconds: parseMillis(match2[cursor + 3])
  };
  return [item, null, cursor + 4];
}
function extractISOOffset(match2, cursor) {
  const local = !match2[cursor] && !match2[cursor + 1], fullOffset = signedOffset(match2[cursor + 1], match2[cursor + 2]), zone = local ? null : FixedOffsetZone.instance(fullOffset);
  return [{}, zone, cursor + 3];
}
function extractIANAZone(match2, cursor) {
  const zone = match2[cursor] ? IANAZone.create(match2[cursor]) : null;
  return [{}, zone, cursor + 1];
}
const isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);
const isoDuration = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
function extractISODuration(match2) {
  const [s2, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match2;
  const hasNegativePrefix = s2[0] === "-";
  const negativeSeconds = secondStr && secondStr[0] === "-";
  const maybeNegate = (num, force = false) => num !== void 0 && (force || num && hasNegativePrefix) ? -num : num;
  return [
    {
      years: maybeNegate(parseFloating(yearStr)),
      months: maybeNegate(parseFloating(monthStr)),
      weeks: maybeNegate(parseFloating(weekStr)),
      days: maybeNegate(parseFloating(dayStr)),
      hours: maybeNegate(parseFloating(hourStr)),
      minutes: maybeNegate(parseFloating(minuteStr)),
      seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"),
      milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds)
    }
  ];
}
const obsOffsets = {
  GMT: 0,
  EDT: -4 * 60,
  EST: -5 * 60,
  CDT: -5 * 60,
  CST: -6 * 60,
  MDT: -6 * 60,
  MST: -7 * 60,
  PDT: -7 * 60,
  PST: -8 * 60
};
function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
  const result = {
    year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),
    month: monthsShort.indexOf(monthStr) + 1,
    day: parseInteger(dayStr),
    hour: parseInteger(hourStr),
    minute: parseInteger(minuteStr)
  };
  if (secondStr) result.second = parseInteger(secondStr);
  if (weekdayStr) {
    result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1;
  }
  return result;
}
const rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
function extractRFC2822(match2) {
  const [
    ,
    weekdayStr,
    dayStr,
    monthStr,
    yearStr,
    hourStr,
    minuteStr,
    secondStr,
    obsOffset,
    milOffset,
    offHourStr,
    offMinuteStr
  ] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
  let offset2;
  if (obsOffset) {
    offset2 = obsOffsets[obsOffset];
  } else if (milOffset) {
    offset2 = 0;
  } else {
    offset2 = signedOffset(offHourStr, offMinuteStr);
  }
  return [result, new FixedOffsetZone(offset2)];
}
function preprocessRFC2822(s2) {
  return s2.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
}
const rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
function extractRFC1123Or850(match2) {
  const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
  return [result, FixedOffsetZone.utcInstance];
}
function extractASCII(match2) {
  const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
  return [result, FixedOffsetZone.utcInstance];
}
const isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);
const isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);
const isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);
const isoTimeCombinedRegex = combineRegexes(isoTimeRegex);
const extractISOYmdTimeAndOffset = combineExtractors(
  extractISOYmd,
  extractISOTime,
  extractISOOffset,
  extractIANAZone
);
const extractISOWeekTimeAndOffset = combineExtractors(
  extractISOWeekData,
  extractISOTime,
  extractISOOffset,
  extractIANAZone
);
const extractISOOrdinalDateAndTime = combineExtractors(
  extractISOOrdinalData,
  extractISOTime,
  extractISOOffset,
  extractIANAZone
);
const extractISOTimeAndOffset = combineExtractors(
  extractISOTime,
  extractISOOffset,
  extractIANAZone
);
function parseISODate(s2) {
  return parse(
    s2,
    [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],
    [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],
    [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime],
    [isoTimeCombinedRegex, extractISOTimeAndOffset]
  );
}
function parseRFC2822Date(s2) {
  return parse(preprocessRFC2822(s2), [rfc2822, extractRFC2822]);
}
function parseHTTPDate(s2) {
  return parse(
    s2,
    [rfc1123, extractRFC1123Or850],
    [rfc850, extractRFC1123Or850],
    [ascii, extractASCII]
  );
}
function parseISODuration(s2) {
  return parse(s2, [isoDuration, extractISODuration]);
}
const extractISOTimeOnly = combineExtractors(extractISOTime);
function parseISOTimeOnly(s2) {
  return parse(s2, [isoTimeOnly, extractISOTimeOnly]);
}
const sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);
const sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);
const extractISOTimeOffsetAndIANAZone = combineExtractors(
  extractISOTime,
  extractISOOffset,
  extractIANAZone
);
function parseSQL(s2) {
  return parse(
    s2,
    [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],
    [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]
  );
}
const INVALID$2 = "Invalid Duration";
const lowOrderMatrix = {
  weeks: {
    days: 7,
    hours: 7 * 24,
    minutes: 7 * 24 * 60,
    seconds: 7 * 24 * 60 * 60,
    milliseconds: 7 * 24 * 60 * 60 * 1e3
  },
  days: {
    hours: 24,
    minutes: 24 * 60,
    seconds: 24 * 60 * 60,
    milliseconds: 24 * 60 * 60 * 1e3
  },
  hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1e3 },
  minutes: { seconds: 60, milliseconds: 60 * 1e3 },
  seconds: { milliseconds: 1e3 }
}, casualMatrix = {
  years: {
    quarters: 4,
    months: 12,
    weeks: 52,
    days: 365,
    hours: 365 * 24,
    minutes: 365 * 24 * 60,
    seconds: 365 * 24 * 60 * 60,
    milliseconds: 365 * 24 * 60 * 60 * 1e3
  },
  quarters: {
    months: 3,
    weeks: 13,
    days: 91,
    hours: 91 * 24,
    minutes: 91 * 24 * 60,
    seconds: 91 * 24 * 60 * 60,
    milliseconds: 91 * 24 * 60 * 60 * 1e3
  },
  months: {
    weeks: 4,
    days: 30,
    hours: 30 * 24,
    minutes: 30 * 24 * 60,
    seconds: 30 * 24 * 60 * 60,
    milliseconds: 30 * 24 * 60 * 60 * 1e3
  },
  ...lowOrderMatrix
}, daysInYearAccurate = 146097 / 400, daysInMonthAccurate = 146097 / 4800, accurateMatrix = {
  years: {
    quarters: 4,
    months: 12,
    weeks: daysInYearAccurate / 7,
    days: daysInYearAccurate,
    hours: daysInYearAccurate * 24,
    minutes: daysInYearAccurate * 24 * 60,
    seconds: daysInYearAccurate * 24 * 60 * 60,
    milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3
  },
  quarters: {
    months: 3,
    weeks: daysInYearAccurate / 28,
    days: daysInYearAccurate / 4,
    hours: daysInYearAccurate * 24 / 4,
    minutes: daysInYearAccurate * 24 * 60 / 4,
    seconds: daysInYearAccurate * 24 * 60 * 60 / 4,
    milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 / 4
  },
  months: {
    weeks: daysInMonthAccurate / 7,
    days: daysInMonthAccurate,
    hours: daysInMonthAccurate * 24,
    minutes: daysInMonthAccurate * 24 * 60,
    seconds: daysInMonthAccurate * 24 * 60 * 60,
    milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1e3
  },
  ...lowOrderMatrix
};
const orderedUnits$1 = [
  "years",
  "quarters",
  "months",
  "weeks",
  "days",
  "hours",
  "minutes",
  "seconds",
  "milliseconds"
];
const reverseUnits = orderedUnits$1.slice(0).reverse();
function clone$1(dur, alts, clear = false) {
  const conf = {
    values: clear ? alts.values : { ...dur.values, ...alts.values || {} },
    loc: dur.loc.clone(alts.loc),
    conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,
    matrix: alts.matrix || dur.matrix
  };
  return new Duration(conf);
}
function durationToMillis(matrix, vals) {
  let sum = vals.milliseconds ?? 0;
  for (const unit2 of reverseUnits.slice(1)) {
    if (vals[unit2]) {
      sum += vals[unit2] * matrix[unit2]["milliseconds"];
    }
  }
  return sum;
}
function normalizeValues(matrix, vals) {
  const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;
  orderedUnits$1.reduceRight((previous, current2) => {
    if (!isUndefined(vals[current2])) {
      if (previous) {
        const previousVal = vals[previous] * factor;
        const conv = matrix[current2][previous];
        const rollUp = Math.floor(previousVal / conv);
        vals[current2] += rollUp * factor;
        vals[previous] -= rollUp * conv * factor;
      }
      return current2;
    } else {
      return previous;
    }
  }, null);
  orderedUnits$1.reduce((previous, current2) => {
    if (!isUndefined(vals[current2])) {
      if (previous) {
        const fraction = vals[previous] % 1;
        vals[previous] -= fraction;
        vals[current2] += fraction * matrix[previous][current2];
      }
      return current2;
    } else {
      return previous;
    }
  }, null);
}
function removeZeroes(vals) {
  const newVals = {};
  for (const [key, value] of Object.entries(vals)) {
    if (value !== 0) {
      newVals[key] = value;
    }
  }
  return newVals;
}
class Duration {
  /**
   * @private
   */
  constructor(config) {
    const accurate = config.conversionAccuracy === "longterm" || false;
    let matrix = accurate ? accurateMatrix : casualMatrix;
    if (config.matrix) {
      matrix = config.matrix;
    }
    this.values = config.values;
    this.loc = config.loc || Locale.create();
    this.conversionAccuracy = accurate ? "longterm" : "casual";
    this.invalid = config.invalid || null;
    this.matrix = matrix;
    this.isLuxonDuration = true;
  }
  /**
   * Create Duration from a number of milliseconds.
   * @param {number} count of milliseconds
   * @param {Object} opts - options for parsing
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @return {Duration}
   */
  static fromMillis(count, opts) {
    return Duration.fromObject({ milliseconds: count }, opts);
  }
  /**
   * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.
   * If this object is empty then a zero milliseconds duration is returned.
   * @param {Object} obj - the object to create the DateTime from
   * @param {number} obj.years
   * @param {number} obj.quarters
   * @param {number} obj.months
   * @param {number} obj.weeks
   * @param {number} obj.days
   * @param {number} obj.hours
   * @param {number} obj.minutes
   * @param {number} obj.seconds
   * @param {number} obj.milliseconds
   * @param {Object} [opts=[]] - options for creating this Duration
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
   * @param {string} [opts.matrix=Object] - the custom conversion system to use
   * @return {Duration}
   */
  static fromObject(obj, opts = {}) {
    if (obj == null || typeof obj !== "object") {
      throw new InvalidArgumentError(
        `Duration.fromObject: argument expected to be an object, got ${obj === null ? "null" : typeof obj}`
      );
    }
    return new Duration({
      values: normalizeObject(obj, Duration.normalizeUnit),
      loc: Locale.fromObject(opts),
      conversionAccuracy: opts.conversionAccuracy,
      matrix: opts.matrix
    });
  }
  /**
   * Create a Duration from DurationLike.
   *
   * @param {Object | number | Duration} durationLike
   * One of:
   * - object with keys like 'years' and 'hours'.
   * - number representing milliseconds
   * - Duration instance
   * @return {Duration}
   */
  static fromDurationLike(durationLike) {
    if (isNumber(durationLike)) {
      return Duration.fromMillis(durationLike);
    } else if (Duration.isDuration(durationLike)) {
      return durationLike;
    } else if (typeof durationLike === "object") {
      return Duration.fromObject(durationLike);
    } else {
      throw new InvalidArgumentError(
        `Unknown duration argument ${durationLike} of type ${typeof durationLike}`
      );
    }
  }
  /**
   * Create a Duration from an ISO 8601 duration string.
   * @param {string} text - text to parse
   * @param {Object} opts - options for parsing
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
   * @param {string} [opts.matrix=Object] - the preset conversion system to use
   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations
   * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }
   * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }
   * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }
   * @return {Duration}
   */
  static fromISO(text, opts) {
    const [parsed] = parseISODuration(text);
    if (parsed) {
      return Duration.fromObject(parsed, opts);
    } else {
      return Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
    }
  }
  /**
   * Create a Duration from an ISO 8601 time string.
   * @param {string} text - text to parse
   * @param {Object} opts - options for parsing
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
   * @param {string} [opts.matrix=Object] - the conversion system to use
   * @see https://en.wikipedia.org/wiki/ISO_8601#Times
   * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }
   * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @return {Duration}
   */
  static fromISOTime(text, opts) {
    const [parsed] = parseISOTimeOnly(text);
    if (parsed) {
      return Duration.fromObject(parsed, opts);
    } else {
      return Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
    }
  }
  /**
   * Create an invalid Duration.
   * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent
   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
   * @return {Duration}
   */
  static invalid(reason, explanation = null) {
    if (!reason) {
      throw new InvalidArgumentError("need to specify a reason the Duration is invalid");
    }
    const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);
    if (Settings.throwOnInvalid) {
      throw new InvalidDurationError(invalid);
    } else {
      return new Duration({ invalid });
    }
  }
  /**
   * @private
   */
  static normalizeUnit(unit2) {
    const normalized = {
      year: "years",
      years: "years",
      quarter: "quarters",
      quarters: "quarters",
      month: "months",
      months: "months",
      week: "weeks",
      weeks: "weeks",
      day: "days",
      days: "days",
      hour: "hours",
      hours: "hours",
      minute: "minutes",
      minutes: "minutes",
      second: "seconds",
      seconds: "seconds",
      millisecond: "milliseconds",
      milliseconds: "milliseconds"
    }[unit2 ? unit2.toLowerCase() : unit2];
    if (!normalized) throw new InvalidUnitError(unit2);
    return normalized;
  }
  /**
   * Check if an object is a Duration. Works across context boundaries
   * @param {object} o
   * @return {boolean}
   */
  static isDuration(o) {
    return o && o.isLuxonDuration || false;
  }
  /**
   * Get  the locale of a Duration, such 'en-GB'
   * @type {string}
   */
  get locale() {
    return this.isValid ? this.loc.locale : null;
  }
  /**
   * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration
   *
   * @type {string}
   */
  get numberingSystem() {
    return this.isValid ? this.loc.numberingSystem : null;
  }
  /**
   * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:
   * * `S` for milliseconds
   * * `s` for seconds
   * * `m` for minutes
   * * `h` for hours
   * * `d` for days
   * * `w` for weeks
   * * `M` for months
   * * `y` for years
   * Notes:
   * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits
   * * Tokens can be escaped by wrapping with single quotes.
   * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.
   * @param {string} fmt - the format string
   * @param {Object} opts - options
   * @param {boolean} [opts.floor=true] - floor numerical values
   * @param {'negative'|'all'|'negativeLargestOnly'} [opts.signMode=negative] - How to handle signs
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2"
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002"
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000"
   * @example Duration.fromObject({ days: 6, seconds: 2 }).toFormat("d s", { signMode: "all" }) //=> "+6 +2"
   * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat("d s", { signMode: "all" }) //=> "-6 -2"
   * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat("d s", { signMode: "negativeLargestOnly" }) //=> "-6 2"
   * @return {string}
   */
  toFormat(fmt, opts = {}) {
    const fmtOpts = {
      ...opts,
      floor: opts.round !== false && opts.floor !== false
    };
    return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;
  }
  /**
   * Returns a string representation of a Duration with all units included.
   * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options
   * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.
   * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.
   * @param {boolean} [opts.showZeros=true] - Show all units previously used by the duration even if they are zero
   * @example
   * ```js
   * var dur = Duration.fromObject({ months: 1, weeks: 0, hours: 5, minutes: 6 })
   * dur.toHuman() //=> '1 month, 0 weeks, 5 hours, 6 minutes'
   * dur.toHuman({ listStyle: "long" }) //=> '1 month, 0 weeks, 5 hours, and 6 minutes'
   * dur.toHuman({ unitDisplay: "short" }) //=> '1 mth, 0 wks, 5 hr, 6 min'
   * dur.toHuman({ showZeros: false }) //=> '1 month, 5 hours, 6 minutes'
   * ```
   */
  toHuman(opts = {}) {
    if (!this.isValid) return INVALID$2;
    const showZeros = opts.showZeros !== false;
    const l2 = orderedUnits$1.map((unit2) => {
      const val = this.values[unit2];
      if (isUndefined(val) || val === 0 && !showZeros) {
        return null;
      }
      return this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...opts, unit: unit2.slice(0, -1) }).format(val);
    }).filter((n2) => n2);
    return this.loc.listFormatter({ type: "conjunction", style: opts.listStyle || "narrow", ...opts }).format(l2);
  }
  /**
   * Returns a JavaScript object with this Duration's values.
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }
   * @return {Object}
   */
  toObject() {
    if (!this.isValid) return {};
    return { ...this.values };
  }
  /**
   * Returns an ISO 8601-compliant string representation of this Duration.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations
   * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'
   * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'
   * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'
   * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'
   * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'
   * @return {string}
   */
  toISO() {
    if (!this.isValid) return null;
    let s2 = "P";
    if (this.years !== 0) s2 += this.years + "Y";
    if (this.months !== 0 || this.quarters !== 0) s2 += this.months + this.quarters * 3 + "M";
    if (this.weeks !== 0) s2 += this.weeks + "W";
    if (this.days !== 0) s2 += this.days + "D";
    if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)
      s2 += "T";
    if (this.hours !== 0) s2 += this.hours + "H";
    if (this.minutes !== 0) s2 += this.minutes + "M";
    if (this.seconds !== 0 || this.milliseconds !== 0)
      s2 += roundTo(this.seconds + this.milliseconds / 1e3, 3) + "S";
    if (s2 === "P") s2 += "T0S";
    return s2;
  }
  /**
   * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
   * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Times
   * @param {Object} opts - options
   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'
   * @return {string}
   */
  toISOTime(opts = {}) {
    if (!this.isValid) return null;
    const millis = this.toMillis();
    if (millis < 0 || millis >= 864e5) return null;
    opts = {
      suppressMilliseconds: false,
      suppressSeconds: false,
      includePrefix: false,
      format: "extended",
      ...opts,
      includeOffset: false
    };
    const dateTime = DateTime.fromMillis(millis, { zone: "UTC" });
    return dateTime.toISOTime(opts);
  }
  /**
   * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.
   * @return {string}
   */
  toJSON() {
    return this.toISO();
  }
  /**
   * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.
   * @return {string}
   */
  toString() {
    return this.toISO();
  }
  /**
   * Returns a string representation of this Duration appropriate for the REPL.
   * @return {string}
   */
  [Symbol.for("nodejs.util.inspect.custom")]() {
    if (this.isValid) {
      return `Duration { values: ${JSON.stringify(this.values)} }`;
    } else {
      return `Duration { Invalid, reason: ${this.invalidReason} }`;
    }
  }
  /**
   * Returns an milliseconds value of this Duration.
   * @return {number}
   */
  toMillis() {
    if (!this.isValid) return NaN;
    return durationToMillis(this.matrix, this.values);
  }
  /**
   * Returns an milliseconds value of this Duration. Alias of {@link toMillis}
   * @return {number}
   */
  valueOf() {
    return this.toMillis();
  }
  /**
   * Make this Duration longer by the specified amount. Return a newly-constructed Duration.
   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   * @return {Duration}
   */
  plus(duration2) {
    if (!this.isValid) return this;
    const dur = Duration.fromDurationLike(duration2), result = {};
    for (const k of orderedUnits$1) {
      if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {
        result[k] = dur.get(k) + this.get(k);
      }
    }
    return clone$1(this, { values: result }, true);
  }
  /**
   * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.
   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   * @return {Duration}
   */
  minus(duration2) {
    if (!this.isValid) return this;
    const dur = Duration.fromDurationLike(duration2);
    return this.plus(dur.negate());
  }
  /**
   * Scale this Duration by the specified amount. Return a newly-constructed Duration.
   * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.
   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }
   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 }
   * @return {Duration}
   */
  mapUnits(fn) {
    if (!this.isValid) return this;
    const result = {};
    for (const k of Object.keys(this.values)) {
      result[k] = asNumber(fn(this.values[k], k));
    }
    return clone$1(this, { values: result }, true);
  }
  /**
   * Get the value of unit.
   * @param {string} unit - a unit such as 'minute' or 'day'
   * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2
   * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0
   * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3
   * @return {number}
   */
  get(unit2) {
    return this[Duration.normalizeUnit(unit2)];
  }
  /**
   * "Set" the values of specified units. Return a newly-constructed Duration.
   * @param {Object} values - a mapping of units to numbers
   * @example dur.set({ years: 2017 })
   * @example dur.set({ hours: 8, minutes: 30 })
   * @return {Duration}
   */
  set(values) {
    if (!this.isValid) return this;
    const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) };
    return clone$1(this, { values: mixed });
  }
  /**
   * "Set" the locale and/or numberingSystem.  Returns a newly-constructed Duration.
   * @example dur.reconfigure({ locale: 'en-GB' })
   * @return {Duration}
   */
  reconfigure({ locale, numberingSystem, conversionAccuracy, matrix } = {}) {
    const loc = this.loc.clone({ locale, numberingSystem });
    const opts = { loc, matrix, conversionAccuracy };
    return clone$1(this, opts);
  }
  /**
   * Return the length of the duration in the specified unit.
   * @param {string} unit - a unit such as 'minutes' or 'days'
   * @example Duration.fromObject({years: 1}).as('days') //=> 365
   * @example Duration.fromObject({years: 1}).as('months') //=> 12
   * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5
   * @return {number}
   */
  as(unit2) {
    return this.isValid ? this.shiftTo(unit2).get(unit2) : NaN;
  }
  /**
   * Reduce this Duration to its canonical representation in its current units.
   * Assuming the overall value of the Duration is positive, this means:
   * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)
   * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise
   *   the overall value would be negative, see third example)
   * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)
   *
   * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.
   * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }
   * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }
   * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }
   * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }
   * @return {Duration}
   */
  normalize() {
    if (!this.isValid) return this;
    const vals = this.toObject();
    normalizeValues(this.matrix, vals);
    return clone$1(this, { values: vals }, true);
  }
  /**
   * Rescale units to its largest representation
   * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }
   * @return {Duration}
   */
  rescale() {
    if (!this.isValid) return this;
    const vals = removeZeroes(this.normalize().shiftToAll().toObject());
    return clone$1(this, { values: vals }, true);
  }
  /**
   * Convert this Duration into its representation in a different set of units.
   * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }
   * @return {Duration}
   */
  shiftTo(...units) {
    if (!this.isValid) return this;
    if (units.length === 0) {
      return this;
    }
    units = units.map((u) => Duration.normalizeUnit(u));
    const built = {}, accumulated = {}, vals = this.toObject();
    let lastUnit;
    for (const k of orderedUnits$1) {
      if (units.indexOf(k) >= 0) {
        lastUnit = k;
        let own = 0;
        for (const ak in accumulated) {
          own += this.matrix[ak][k] * accumulated[ak];
          accumulated[ak] = 0;
        }
        if (isNumber(vals[k])) {
          own += vals[k];
        }
        const i = Math.trunc(own);
        built[k] = i;
        accumulated[k] = (own * 1e3 - i * 1e3) / 1e3;
      } else if (isNumber(vals[k])) {
        accumulated[k] = vals[k];
      }
    }
    for (const key in accumulated) {
      if (accumulated[key] !== 0) {
        built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];
      }
    }
    normalizeValues(this.matrix, built);
    return clone$1(this, { values: built }, true);
  }
  /**
   * Shift this Duration to all available units.
   * Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds")
   * @return {Duration}
   */
  shiftToAll() {
    if (!this.isValid) return this;
    return this.shiftTo(
      "years",
      "months",
      "weeks",
      "days",
      "hours",
      "minutes",
      "seconds",
      "milliseconds"
    );
  }
  /**
   * Return the negative of this Duration.
   * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }
   * @return {Duration}
   */
  negate() {
    if (!this.isValid) return this;
    const negated = {};
    for (const k of Object.keys(this.values)) {
      negated[k] = this.values[k] === 0 ? 0 : -this.values[k];
    }
    return clone$1(this, { values: negated }, true);
  }
  /**
   * Removes all units with values equal to 0 from this Duration.
   * @example Duration.fromObject({ years: 2, days: 0, hours: 0, minutes: 0 }).removeZeros().toObject() //=> { years: 2 }
   * @return {Duration}
   */
  removeZeros() {
    if (!this.isValid) return this;
    const vals = removeZeroes(this.values);
    return clone$1(this, { values: vals }, true);
  }
  /**
   * Get the years.
   * @type {number}
   */
  get years() {
    return this.isValid ? this.values.years || 0 : NaN;
  }
  /**
   * Get the quarters.
   * @type {number}
   */
  get quarters() {
    return this.isValid ? this.values.quarters || 0 : NaN;
  }
  /**
   * Get the months.
   * @type {number}
   */
  get months() {
    return this.isValid ? this.values.months || 0 : NaN;
  }
  /**
   * Get the weeks
   * @type {number}
   */
  get weeks() {
    return this.isValid ? this.values.weeks || 0 : NaN;
  }
  /**
   * Get the days.
   * @type {number}
   */
  get days() {
    return this.isValid ? this.values.days || 0 : NaN;
  }
  /**
   * Get the hours.
   * @type {number}
   */
  get hours() {
    return this.isValid ? this.values.hours || 0 : NaN;
  }
  /**
   * Get the minutes.
   * @type {number}
   */
  get minutes() {
    return this.isValid ? this.values.minutes || 0 : NaN;
  }
  /**
   * Get the seconds.
   * @return {number}
   */
  get seconds() {
    return this.isValid ? this.values.seconds || 0 : NaN;
  }
  /**
   * Get the milliseconds.
   * @return {number}
   */
  get milliseconds() {
    return this.isValid ? this.values.milliseconds || 0 : NaN;
  }
  /**
   * Returns whether the Duration is invalid. Invalid durations are returned by diff operations
   * on invalid DateTimes or Intervals.
   * @return {boolean}
   */
  get isValid() {
    return this.invalid === null;
  }
  /**
   * Returns an error code if this Duration became invalid, or null if the Duration is valid
   * @return {string}
   */
  get invalidReason() {
    return this.invalid ? this.invalid.reason : null;
  }
  /**
   * Returns an explanation of why this Duration became invalid, or null if the Duration is valid
   * @type {string}
   */
  get invalidExplanation() {
    return this.invalid ? this.invalid.explanation : null;
  }
  /**
   * Equality check
   * Two Durations are equal iff they have the same units and the same values for each unit.
   * @param {Duration} other
   * @return {boolean}
   */
  equals(other) {
    if (!this.isValid || !other.isValid) {
      return false;
    }
    if (!this.loc.equals(other.loc)) {
      return false;
    }
    function eq(v1, v2) {
      if (v1 === void 0 || v1 === 0) return v2 === void 0 || v2 === 0;
      return v1 === v2;
    }
    for (const u of orderedUnits$1) {
      if (!eq(this.values[u], other.values[u])) {
        return false;
      }
    }
    return true;
  }
}
const INVALID$1 = "Invalid Interval";
function validateStartEnd(start, end) {
  if (!start || !start.isValid) {
    return Interval.invalid("missing or invalid start");
  } else if (!end || !end.isValid) {
    return Interval.invalid("missing or invalid end");
  } else if (end < start) {
    return Interval.invalid(
      "end before start",
      `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`
    );
  } else {
    return null;
  }
}
class Interval {
  /**
   * @private
   */
  constructor(config) {
    this.s = config.start;
    this.e = config.end;
    this.invalid = config.invalid || null;
    this.isLuxonInterval = true;
  }
  /**
   * Create an invalid Interval.
   * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent
   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
   * @return {Interval}
   */
  static invalid(reason, explanation = null) {
    if (!reason) {
      throw new InvalidArgumentError("need to specify a reason the Interval is invalid");
    }
    const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);
    if (Settings.throwOnInvalid) {
      throw new InvalidIntervalError(invalid);
    } else {
      return new Interval({ invalid });
    }
  }
  /**
   * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.
   * @param {DateTime|Date|Object} start
   * @param {DateTime|Date|Object} end
   * @return {Interval}
   */
  static fromDateTimes(start, end) {
    const builtStart = friendlyDateTime(start), builtEnd = friendlyDateTime(end);
    const validateError = validateStartEnd(builtStart, builtEnd);
    if (validateError == null) {
      return new Interval({
        start: builtStart,
        end: builtEnd
      });
    } else {
      return validateError;
    }
  }
  /**
   * Create an Interval from a start DateTime and a Duration to extend to.
   * @param {DateTime|Date|Object} start
   * @param {Duration|Object|number} duration - the length of the Interval.
   * @return {Interval}
   */
  static after(start, duration2) {
    const dur = Duration.fromDurationLike(duration2), dt = friendlyDateTime(start);
    return Interval.fromDateTimes(dt, dt.plus(dur));
  }
  /**
   * Create an Interval from an end DateTime and a Duration to extend backwards to.
   * @param {DateTime|Date|Object} end
   * @param {Duration|Object|number} duration - the length of the Interval.
   * @return {Interval}
   */
  static before(end, duration2) {
    const dur = Duration.fromDurationLike(duration2), dt = friendlyDateTime(end);
    return Interval.fromDateTimes(dt.minus(dur), dt);
  }
  /**
   * Create an Interval from an ISO 8601 string.
   * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.
   * @param {string} text - the ISO string to parse
   * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @return {Interval}
   */
  static fromISO(text, opts) {
    const [s2, e] = (text || "").split("/", 2);
    if (s2 && e) {
      let start, startIsValid;
      try {
        start = DateTime.fromISO(s2, opts);
        startIsValid = start.isValid;
      } catch (e2) {
        startIsValid = false;
      }
      let end, endIsValid;
      try {
        end = DateTime.fromISO(e, opts);
        endIsValid = end.isValid;
      } catch (e2) {
        endIsValid = false;
      }
      if (startIsValid && endIsValid) {
        return Interval.fromDateTimes(start, end);
      }
      if (startIsValid) {
        const dur = Duration.fromISO(e, opts);
        if (dur.isValid) {
          return Interval.after(start, dur);
        }
      } else if (endIsValid) {
        const dur = Duration.fromISO(s2, opts);
        if (dur.isValid) {
          return Interval.before(end, dur);
        }
      }
    }
    return Interval.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
  }
  /**
   * Check if an object is an Interval. Works across context boundaries
   * @param {object} o
   * @return {boolean}
   */
  static isInterval(o) {
    return o && o.isLuxonInterval || false;
  }
  /**
   * Returns the start of the Interval
   * @type {DateTime}
   */
  get start() {
    return this.isValid ? this.s : null;
  }
  /**
   * Returns the end of the Interval. This is the first instant which is not part of the interval
   * (Interval is half-open).
   * @type {DateTime}
   */
  get end() {
    return this.isValid ? this.e : null;
  }
  /**
   * Returns the last DateTime included in the interval (since end is not part of the interval)
   * @type {DateTime}
   */
  get lastDateTime() {
    return this.isValid ? this.e ? this.e.minus(1) : null : null;
  }
  /**
   * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.
   * @type {boolean}
   */
  get isValid() {
    return this.invalidReason === null;
  }
  /**
   * Returns an error code if this Interval is invalid, or null if the Interval is valid
   * @type {string}
   */
  get invalidReason() {
    return this.invalid ? this.invalid.reason : null;
  }
  /**
   * Returns an explanation of why this Interval became invalid, or null if the Interval is valid
   * @type {string}
   */
  get invalidExplanation() {
    return this.invalid ? this.invalid.explanation : null;
  }
  /**
   * Returns the length of the Interval in the specified unit.
   * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.
   * @return {number}
   */
  length(unit2 = "milliseconds") {
    return this.isValid ? this.toDuration(...[unit2]).get(unit2) : NaN;
  }
  /**
   * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.
   * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'
   * asks 'what dates are included in this interval?', not 'how many days long is this interval?'
   * @param {string} [unit='milliseconds'] - the unit of time to count.
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime
   * @return {number}
   */
  count(unit2 = "milliseconds", opts) {
    if (!this.isValid) return NaN;
    const start = this.start.startOf(unit2, opts);
    let end;
    if (opts == null ? void 0 : opts.useLocaleWeeks) {
      end = this.end.reconfigure({ locale: start.locale });
    } else {
      end = this.end;
    }
    end = end.startOf(unit2, opts);
    return Math.floor(end.diff(start, unit2).get(unit2)) + (end.valueOf() !== this.end.valueOf());
  }
  /**
   * Returns whether this Interval's start and end are both in the same unit of time
   * @param {string} unit - the unit of time to check sameness on
   * @return {boolean}
   */
  hasSame(unit2) {
    return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit2) : false;
  }
  /**
   * Return whether this Interval has the same start and end DateTimes.
   * @return {boolean}
   */
  isEmpty() {
    return this.s.valueOf() === this.e.valueOf();
  }
  /**
   * Return whether this Interval's start is after the specified DateTime.
   * @param {DateTime} dateTime
   * @return {boolean}
   */
  isAfter(dateTime) {
    if (!this.isValid) return false;
    return this.s > dateTime;
  }
  /**
   * Return whether this Interval's end is before the specified DateTime.
   * @param {DateTime} dateTime
   * @return {boolean}
   */
  isBefore(dateTime) {
    if (!this.isValid) return false;
    return this.e <= dateTime;
  }
  /**
   * Return whether this Interval contains the specified DateTime.
   * @param {DateTime} dateTime
   * @return {boolean}
   */
  contains(dateTime) {
    if (!this.isValid) return false;
    return this.s <= dateTime && this.e > dateTime;
  }
  /**
   * "Sets" the start and/or end dates. Returns a newly-constructed Interval.
   * @param {Object} values - the values to set
   * @param {DateTime} values.start - the starting DateTime
   * @param {DateTime} values.end - the ending DateTime
   * @return {Interval}
   */
  set({ start, end } = {}) {
    if (!this.isValid) return this;
    return Interval.fromDateTimes(start || this.s, end || this.e);
  }
  /**
   * Split this Interval at each of the specified DateTimes
   * @param {...DateTime} dateTimes - the unit of time to count.
   * @return {Array}
   */
  splitAt(...dateTimes) {
    if (!this.isValid) return [];
    const sorted = dateTimes.map(friendlyDateTime).filter((d) => this.contains(d)).sort((a, b) => a.toMillis() - b.toMillis()), results = [];
    let { s: s2 } = this, i = 0;
    while (s2 < this.e) {
      const added = sorted[i] || this.e, next = +added > +this.e ? this.e : added;
      results.push(Interval.fromDateTimes(s2, next));
      s2 = next;
      i += 1;
    }
    return results;
  }
  /**
   * Split this Interval into smaller Intervals, each of the specified length.
   * Left over time is grouped into a smaller interval
   * @param {Duration|Object|number} duration - The length of each resulting interval.
   * @return {Array}
   */
  splitBy(duration2) {
    const dur = Duration.fromDurationLike(duration2);
    if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) {
      return [];
    }
    let { s: s2 } = this, idx = 1, next;
    const results = [];
    while (s2 < this.e) {
      const added = this.start.plus(dur.mapUnits((x) => x * idx));
      next = +added > +this.e ? this.e : added;
      results.push(Interval.fromDateTimes(s2, next));
      s2 = next;
      idx += 1;
    }
    return results;
  }
  /**
   * Split this Interval into the specified number of smaller intervals.
   * @param {number} numberOfParts - The number of Intervals to divide the Interval into.
   * @return {Array}
   */
  divideEqually(numberOfParts) {
    if (!this.isValid) return [];
    return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);
  }
  /**
   * Return whether this Interval overlaps with the specified Interval
   * @param {Interval} other
   * @return {boolean}
   */
  overlaps(other) {
    return this.e > other.s && this.s < other.e;
  }
  /**
   * Return whether this Interval's end is adjacent to the specified Interval's start.
   * @param {Interval} other
   * @return {boolean}
   */
  abutsStart(other) {
    if (!this.isValid) return false;
    return +this.e === +other.s;
  }
  /**
   * Return whether this Interval's start is adjacent to the specified Interval's end.
   * @param {Interval} other
   * @return {boolean}
   */
  abutsEnd(other) {
    if (!this.isValid) return false;
    return +other.e === +this.s;
  }
  /**
   * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.
   * @param {Interval} other
   * @return {boolean}
   */
  engulfs(other) {
    if (!this.isValid) return false;
    return this.s <= other.s && this.e >= other.e;
  }
  /**
   * Return whether this Interval has the same start and end as the specified Interval.
   * @param {Interval} other
   * @return {boolean}
   */
  equals(other) {
    if (!this.isValid || !other.isValid) {
      return false;
    }
    return this.s.equals(other.s) && this.e.equals(other.e);
  }
  /**
   * Return an Interval representing the intersection of this Interval and the specified Interval.
   * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.
   * Returns null if the intersection is empty, meaning, the intervals don't intersect.
   * @param {Interval} other
   * @return {Interval}
   */
  intersection(other) {
    if (!this.isValid) return this;
    const s2 = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e;
    if (s2 >= e) {
      return null;
    } else {
      return Interval.fromDateTimes(s2, e);
    }
  }
  /**
   * Return an Interval representing the union of this Interval and the specified Interval.
   * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.
   * @param {Interval} other
   * @return {Interval}
   */
  union(other) {
    if (!this.isValid) return this;
    const s2 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e;
    return Interval.fromDateTimes(s2, e);
  }
  /**
   * Merge an array of Intervals into an equivalent minimal set of Intervals.
   * Combines overlapping and adjacent Intervals.
   * The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval
   * and ending with the latest.
   *
   * @param {Array} intervals
   * @return {Array}
   */
  static merge(intervals) {
    const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(
      ([sofar, current2], item) => {
        if (!current2) {
          return [sofar, item];
        } else if (current2.overlaps(item) || current2.abutsStart(item)) {
          return [sofar, current2.union(item)];
        } else {
          return [sofar.concat([current2]), item];
        }
      },
      [[], null]
    );
    if (final) {
      found.push(final);
    }
    return found;
  }
  /**
   * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.
   * @param {Array} intervals
   * @return {Array}
   */
  static xor(intervals) {
    let start = null, currentCount = 0;
    const results = [], ends = intervals.map((i) => [
      { time: i.s, type: "s" },
      { time: i.e, type: "e" }
    ]), flattened = Array.prototype.concat(...ends), arr = flattened.sort((a, b) => a.time - b.time);
    for (const i of arr) {
      currentCount += i.type === "s" ? 1 : -1;
      if (currentCount === 1) {
        start = i.time;
      } else {
        if (start && +start !== +i.time) {
          results.push(Interval.fromDateTimes(start, i.time));
        }
        start = null;
      }
    }
    return Interval.merge(results);
  }
  /**
   * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.
   * @param {...Interval} intervals
   * @return {Array}
   */
  difference(...intervals) {
    return Interval.xor([this].concat(intervals)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty());
  }
  /**
   * Returns a string representation of this Interval appropriate for debugging.
   * @return {string}
   */
  toString() {
    if (!this.isValid) return INVALID$1;
    return `[${this.s.toISO()} – ${this.e.toISO()})`;
  }
  /**
   * Returns a string representation of this Interval appropriate for the REPL.
   * @return {string}
   */
  [Symbol.for("nodejs.util.inspect.custom")]() {
    if (this.isValid) {
      return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;
    } else {
      return `Interval { Invalid, reason: ${this.invalidReason} }`;
    }
  }
  /**
   * Returns a localized string representing this Interval. Accepts the same options as the
   * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as
   * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method
   * is browser-specific, but in general it will return an appropriate representation of the
   * Interval in the assigned locale. Defaults to the system's locale if no locale has been
   * specified.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or
   * Intl.DateTimeFormat constructor options.
   * @param {Object} opts - Options to override the configuration of the start DateTime.
   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022
   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022
   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022
   * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM
   * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p
   * @return {string}
   */
  toLocaleString(formatOpts = DATE_SHORT, opts = {}) {
    return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID$1;
  }
  /**
   * Returns an ISO 8601-compliant string representation of this Interval.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @param {Object} opts - The same options as {@link DateTime#toISO}
   * @return {string}
   */
  toISO(opts) {
    if (!this.isValid) return INVALID$1;
    return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;
  }
  /**
   * Returns an ISO 8601-compliant string representation of date of this Interval.
   * The time components are ignored.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @return {string}
   */
  toISODate() {
    if (!this.isValid) return INVALID$1;
    return `${this.s.toISODate()}/${this.e.toISODate()}`;
  }
  /**
   * Returns an ISO 8601-compliant string representation of time of this Interval.
   * The date components are ignored.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @param {Object} opts - The same options as {@link DateTime#toISO}
   * @return {string}
   */
  toISOTime(opts) {
    if (!this.isValid) return INVALID$1;
    return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;
  }
  /**
   * Returns a string representation of this Interval formatted according to the specified format
   * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible
   * formatting tool.
   * @param {string} dateFormat - The format string. This string formats the start and end time.
   * See {@link DateTime#toFormat} for details.
   * @param {Object} opts - Options.
   * @param {string} [opts.separator =  ' – '] - A separator to place between the start and end
   * representations.
   * @return {string}
   */
  toFormat(dateFormat, { separator = " – " } = {}) {
    if (!this.isValid) return INVALID$1;
    return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;
  }
  /**
   * Return a Duration representing the time spanned by this interval.
   * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.
   * @param {Object} opts - options that affect the creation of the Duration
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }
   * @return {Duration}
   */
  toDuration(unit2, opts) {
    if (!this.isValid) {
      return Duration.invalid(this.invalidReason);
    }
    return this.e.diff(this.s, unit2, opts);
  }
  /**
   * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes
   * @param {function} mapFn
   * @return {Interval}
   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())
   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))
   */
  mapEndpoints(mapFn) {
    return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));
  }
}
class Info {
  /**
   * Return whether the specified zone contains a DST.
   * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
   * @return {boolean}
   */
  static hasDST(zone = Settings.defaultZone) {
    const proto = DateTime.now().setZone(zone).set({ month: 12 });
    return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;
  }
  /**
   * Return whether the specified zone is a valid IANA specifier.
   * @param {string} zone - Zone to check
   * @return {boolean}
   */
  static isValidIANAZone(zone) {
    return IANAZone.isValidZone(zone);
  }
  /**
   * Converts the input into a {@link Zone} instance.
   *
   * * If `input` is already a Zone instance, it is returned unchanged.
   * * If `input` is a string containing a valid time zone name, a Zone instance
   *   with that name is returned.
   * * If `input` is a string that doesn't refer to a known time zone, a Zone
   *   instance with {@link Zone#isValid} == false is returned.
   * * If `input is a number, a Zone instance with the specified fixed offset
   *   in minutes is returned.
   * * If `input` is `null` or `undefined`, the default zone is returned.
   * @param {string|Zone|number} [input] - the value to be converted
   * @return {Zone}
   */
  static normalizeZone(input) {
    return normalizeZone(input, Settings.defaultZone);
  }
  /**
   * Get the weekday on which the week starts according to the given locale.
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @returns {number} the start of the week, 1 for Monday through 7 for Sunday
   */
  static getStartOfWeek({ locale = null, locObj = null } = {}) {
    return (locObj || Locale.create(locale)).getStartOfWeek();
  }
  /**
   * Get the minimum number of days necessary in a week before it is considered part of the next year according
   * to the given locale.
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @returns {number}
   */
  static getMinimumDaysInFirstWeek({ locale = null, locObj = null } = {}) {
    return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();
  }
  /**
   * Get the weekdays, which are considered the weekend according to the given locale
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday
   */
  static getWeekendWeekdays({ locale = null, locObj = null } = {}) {
    return (locObj || Locale.create(locale)).getWeekendDays().slice();
  }
  /**
   * Return an array of standalone month names.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @param {string} [opts.outputCalendar='gregory'] - the calendar
   * @example Info.months()[0] //=> 'January'
   * @example Info.months('short')[0] //=> 'Jan'
   * @example Info.months('numeric')[0] //=> '1'
   * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'
   * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'
   * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'
   * @return {Array}
   */
  static months(length = "long", { locale = null, numberingSystem = null, locObj = null, outputCalendar = "gregory" } = {}) {
    return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);
  }
  /**
   * Return an array of format month names.
   * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that
   * changes the string.
   * See {@link Info#months}
   * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @param {string} [opts.outputCalendar='gregory'] - the calendar
   * @return {Array}
   */
  static monthsFormat(length = "long", { locale = null, numberingSystem = null, locObj = null, outputCalendar = "gregory" } = {}) {
    return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);
  }
  /**
   * Return an array of standalone week names.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long".
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @example Info.weekdays()[0] //=> 'Monday'
   * @example Info.weekdays('short')[0] //=> 'Mon'
   * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'
   * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'
   * @return {Array}
   */
  static weekdays(length = "long", { locale = null, numberingSystem = null, locObj = null } = {}) {
    return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);
  }
  /**
   * Return an array of format week names.
   * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that
   * changes the string.
   * See {@link Info#weekdays}
   * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long".
   * @param {Object} opts - options
   * @param {string} [opts.locale=null] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @return {Array}
   */
  static weekdaysFormat(length = "long", { locale = null, numberingSystem = null, locObj = null } = {}) {
    return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);
  }
  /**
   * Return an array of meridiems.
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @example Info.meridiems() //=> [ 'AM', 'PM' ]
   * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]
   * @return {Array}
   */
  static meridiems({ locale = null } = {}) {
    return Locale.create(locale).meridiems();
  }
  /**
   * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.
   * @param {string} [length='short'] - the length of the era representation, such as "short" or "long".
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @example Info.eras() //=> [ 'BC', 'AD' ]
   * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]
   * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]
   * @return {Array}
   */
  static eras(length = "short", { locale = null } = {}) {
    return Locale.create(locale, null, "gregory").eras(length);
  }
  /**
   * Return the set of available features in this environment.
   * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.
   * Keys:
   * * `relative`: whether this environment supports relative time formatting
   * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale
   * @example Info.features() //=> { relative: false, localeWeek: true }
   * @return {Object}
   */
  static features() {
    return { relative: hasRelative(), localeWeek: hasLocaleWeekInfo() };
  }
}
function dayDiff(earlier, later) {
  const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf("day").valueOf(), ms = utcDayStart(later) - utcDayStart(earlier);
  return Math.floor(Duration.fromMillis(ms).as("days"));
}
function highOrderDiffs(cursor, later, units) {
  const differs = [
    ["years", (a, b) => b.year - a.year],
    ["quarters", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4],
    ["months", (a, b) => b.month - a.month + (b.year - a.year) * 12],
    [
      "weeks",
      (a, b) => {
        const days = dayDiff(a, b);
        return (days - days % 7) / 7;
      }
    ],
    ["days", dayDiff]
  ];
  const results = {};
  const earlier = cursor;
  let lowestOrder, highWater;
  for (const [unit2, differ] of differs) {
    if (units.indexOf(unit2) >= 0) {
      lowestOrder = unit2;
      results[unit2] = differ(cursor, later);
      highWater = earlier.plus(results);
      if (highWater > later) {
        results[unit2]--;
        cursor = earlier.plus(results);
        if (cursor > later) {
          highWater = cursor;
          results[unit2]--;
          cursor = earlier.plus(results);
        }
      } else {
        cursor = highWater;
      }
    }
  }
  return [cursor, results, highWater, lowestOrder];
}
function diff(earlier, later, units, opts) {
  let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);
  const remainingMillis = later - cursor;
  const lowerOrderUnits = units.filter(
    (u) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0
  );
  if (lowerOrderUnits.length === 0) {
    if (highWater < later) {
      highWater = cursor.plus({ [lowestOrder]: 1 });
    }
    if (highWater !== cursor) {
      results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
    }
  }
  const duration2 = Duration.fromObject(results, opts);
  if (lowerOrderUnits.length > 0) {
    return Duration.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration2);
  } else {
    return duration2;
  }
}
const MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support";
function intUnit(regex, post = (i) => i) {
  return { regex, deser: ([s2]) => post(parseDigits(s2)) };
}
const NBSP = String.fromCharCode(160);
const spaceOrNBSP = `[ ${NBSP}]`;
const spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g");
function fixListRegex(s2) {
  return s2.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP);
}
function stripInsensitivities(s2) {
  return s2.replace(/\./g, "").replace(spaceOrNBSPRegExp, " ").toLowerCase();
}
function oneOf(strings, startIndex) {
  if (strings === null) {
    return null;
  } else {
    return {
      regex: RegExp(strings.map(fixListRegex).join("|")),
      deser: ([s2]) => strings.findIndex((i) => stripInsensitivities(s2) === stripInsensitivities(i)) + startIndex
    };
  }
}
function offset(regex, groups) {
  return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };
}
function simple(regex) {
  return { regex, deser: ([s2]) => s2 };
}
function escapeToken(value) {
  return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
function unitForToken(token, loc) {
  const one = digitRegex(loc), two = digitRegex(loc, "{2}"), three = digitRegex(loc, "{3}"), four = digitRegex(loc, "{4}"), six = digitRegex(loc, "{6}"), oneOrTwo = digitRegex(loc, "{1,2}"), oneToThree = digitRegex(loc, "{1,3}"), oneToSix = digitRegex(loc, "{1,6}"), oneToNine = digitRegex(loc, "{1,9}"), twoToFour = digitRegex(loc, "{2,4}"), fourToSix = digitRegex(loc, "{4,6}"), literal = (t2) => ({ regex: RegExp(escapeToken(t2.val)), deser: ([s2]) => s2, literal: true }), unitate = (t2) => {
    if (token.literal) {
      return literal(t2);
    }
    switch (t2.val) {
      case "G":
        return oneOf(loc.eras("short"), 0);
      case "GG":
        return oneOf(loc.eras("long"), 0);
      case "y":
        return intUnit(oneToSix);
      case "yy":
        return intUnit(twoToFour, untruncateYear);
      case "yyyy":
        return intUnit(four);
      case "yyyyy":
        return intUnit(fourToSix);
      case "yyyyyy":
        return intUnit(six);
      case "M":
        return intUnit(oneOrTwo);
      case "MM":
        return intUnit(two);
      case "MMM":
        return oneOf(loc.months("short", true), 1);
      case "MMMM":
        return oneOf(loc.months("long", true), 1);
      case "L":
        return intUnit(oneOrTwo);
      case "LL":
        return intUnit(two);
      case "LLL":
        return oneOf(loc.months("short", false), 1);
      case "LLLL":
        return oneOf(loc.months("long", false), 1);
      case "d":
        return intUnit(oneOrTwo);
      case "dd":
        return intUnit(two);
      case "o":
        return intUnit(oneToThree);
      case "ooo":
        return intUnit(three);
      case "HH":
        return intUnit(two);
      case "H":
        return intUnit(oneOrTwo);
      case "hh":
        return intUnit(two);
      case "h":
        return intUnit(oneOrTwo);
      case "mm":
        return intUnit(two);
      case "m":
        return intUnit(oneOrTwo);
      case "q":
        return intUnit(oneOrTwo);
      case "qq":
        return intUnit(two);
      case "s":
        return intUnit(oneOrTwo);
      case "ss":
        return intUnit(two);
      case "S":
        return intUnit(oneToThree);
      case "SSS":
        return intUnit(three);
      case "u":
        return simple(oneToNine);
      case "uu":
        return simple(oneOrTwo);
      case "uuu":
        return intUnit(one);
      case "a":
        return oneOf(loc.meridiems(), 0);
      case "kkkk":
        return intUnit(four);
      case "kk":
        return intUnit(twoToFour, untruncateYear);
      case "W":
        return intUnit(oneOrTwo);
      case "WW":
        return intUnit(two);
      case "E":
      case "c":
        return intUnit(one);
      case "EEE":
        return oneOf(loc.weekdays("short", false), 1);
      case "EEEE":
        return oneOf(loc.weekdays("long", false), 1);
      case "ccc":
        return oneOf(loc.weekdays("short", true), 1);
      case "cccc":
        return oneOf(loc.weekdays("long", true), 1);
      case "Z":
      case "ZZ":
        return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);
      case "ZZZ":
        return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);
      case "z":
        return simple(/[a-z_+-/]{1,256}?/i);
      case " ":
        return simple(/[^\S\n\r]/);
      default:
        return literal(t2);
    }
  };
  const unit2 = unitate(token) || {
    invalidReason: MISSING_FTP
  };
  unit2.token = token;
  return unit2;
}
const partTypeStyleToTokenVal = {
  year: {
    "2-digit": "yy",
    numeric: "yyyyy"
  },
  month: {
    numeric: "M",
    "2-digit": "MM",
    short: "MMM",
    long: "MMMM"
  },
  day: {
    numeric: "d",
    "2-digit": "dd"
  },
  weekday: {
    short: "EEE",
    long: "EEEE"
  },
  dayperiod: "a",
  dayPeriod: "a",
  hour12: {
    numeric: "h",
    "2-digit": "hh"
  },
  hour24: {
    numeric: "H",
    "2-digit": "HH"
  },
  minute: {
    numeric: "m",
    "2-digit": "mm"
  },
  second: {
    numeric: "s",
    "2-digit": "ss"
  },
  timeZoneName: {
    long: "ZZZZZ",
    short: "ZZZ"
  }
};
function tokenForPart(part, formatOpts, resolvedOpts) {
  const { type: type2, value } = part;
  if (type2 === "literal") {
    const isSpace = /^\s+$/.test(value);
    return {
      literal: !isSpace,
      val: isSpace ? " " : value
    };
  }
  const style = formatOpts[type2];
  let actualType = type2;
  if (type2 === "hour") {
    if (formatOpts.hour12 != null) {
      actualType = formatOpts.hour12 ? "hour12" : "hour24";
    } else if (formatOpts.hourCycle != null) {
      if (formatOpts.hourCycle === "h11" || formatOpts.hourCycle === "h12") {
        actualType = "hour12";
      } else {
        actualType = "hour24";
      }
    } else {
      actualType = resolvedOpts.hour12 ? "hour12" : "hour24";
    }
  }
  let val = partTypeStyleToTokenVal[actualType];
  if (typeof val === "object") {
    val = val[style];
  }
  if (val) {
    return {
      literal: false,
      val
    };
  }
  return void 0;
}
function buildRegex(units) {
  const re = units.map((u) => u.regex).reduce((f2, r2) => `${f2}(${r2.source})`, "");
  return [`^${re}$`, units];
}
function match(input, regex, handlers) {
  const matches2 = input.match(regex);
  if (matches2) {
    const all3 = {};
    let matchIndex = 1;
    for (const i in handlers) {
      if (hasOwnProperty(handlers, i)) {
        const h = handlers[i], groups = h.groups ? h.groups + 1 : 1;
        if (!h.literal && h.token) {
          all3[h.token.val[0]] = h.deser(matches2.slice(matchIndex, matchIndex + groups));
        }
        matchIndex += groups;
      }
    }
    return [matches2, all3];
  } else {
    return [matches2, {}];
  }
}
function dateTimeFromMatches(matches2) {
  const toField = (token) => {
    switch (token) {
      case "S":
        return "millisecond";
      case "s":
        return "second";
      case "m":
        return "minute";
      case "h":
      case "H":
        return "hour";
      case "d":
        return "day";
      case "o":
        return "ordinal";
      case "L":
      case "M":
        return "month";
      case "y":
        return "year";
      case "E":
      case "c":
        return "weekday";
      case "W":
        return "weekNumber";
      case "k":
        return "weekYear";
      case "q":
        return "quarter";
      default:
        return null;
    }
  };
  let zone = null;
  let specificOffset;
  if (!isUndefined(matches2.z)) {
    zone = IANAZone.create(matches2.z);
  }
  if (!isUndefined(matches2.Z)) {
    if (!zone) {
      zone = new FixedOffsetZone(matches2.Z);
    }
    specificOffset = matches2.Z;
  }
  if (!isUndefined(matches2.q)) {
    matches2.M = (matches2.q - 1) * 3 + 1;
  }
  if (!isUndefined(matches2.h)) {
    if (matches2.h < 12 && matches2.a === 1) {
      matches2.h += 12;
    } else if (matches2.h === 12 && matches2.a === 0) {
      matches2.h = 0;
    }
  }
  if (matches2.G === 0 && matches2.y) {
    matches2.y = -matches2.y;
  }
  if (!isUndefined(matches2.u)) {
    matches2.S = parseMillis(matches2.u);
  }
  const vals = Object.keys(matches2).reduce((r2, k) => {
    const f2 = toField(k);
    if (f2) {
      r2[f2] = matches2[k];
    }
    return r2;
  }, {});
  return [vals, zone, specificOffset];
}
let dummyDateTimeCache = null;
function getDummyDateTime() {
  if (!dummyDateTimeCache) {
    dummyDateTimeCache = DateTime.fromMillis(1555555555555);
  }
  return dummyDateTimeCache;
}
function maybeExpandMacroToken(token, locale) {
  if (token.literal) {
    return token;
  }
  const formatOpts = Formatter.macroTokenToFormatOpts(token.val);
  const tokens = formatOptsToTokens(formatOpts, locale);
  if (tokens == null || tokens.includes(void 0)) {
    return token;
  }
  return tokens;
}
function expandMacroTokens(tokens, locale) {
  return Array.prototype.concat(...tokens.map((t2) => maybeExpandMacroToken(t2, locale)));
}
class TokenParser {
  constructor(locale, format) {
    this.locale = locale;
    this.format = format;
    this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);
    this.units = this.tokens.map((t2) => unitForToken(t2, locale));
    this.disqualifyingUnit = this.units.find((t2) => t2.invalidReason);
    if (!this.disqualifyingUnit) {
      const [regexString, handlers] = buildRegex(this.units);
      this.regex = RegExp(regexString, "i");
      this.handlers = handlers;
    }
  }
  explainFromTokens(input) {
    if (!this.isValid) {
      return { input, tokens: this.tokens, invalidReason: this.invalidReason };
    } else {
      const [rawMatches, matches2] = match(input, this.regex, this.handlers), [result, zone, specificOffset] = matches2 ? dateTimeFromMatches(matches2) : [null, null, void 0];
      if (hasOwnProperty(matches2, "a") && hasOwnProperty(matches2, "H")) {
        throw new ConflictingSpecificationError(
          "Can't include meridiem when specifying 24-hour format"
        );
      }
      return {
        input,
        tokens: this.tokens,
        regex: this.regex,
        rawMatches,
        matches: matches2,
        result,
        zone,
        specificOffset
      };
    }
  }
  get isValid() {
    return !this.disqualifyingUnit;
  }
  get invalidReason() {
    return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;
  }
}
function explainFromTokens(locale, input, format) {
  const parser = new TokenParser(locale, format);
  return parser.explainFromTokens(input);
}
function parseFromTokens(locale, input, format) {
  const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);
  return [result, zone, specificOffset, invalidReason];
}
function formatOptsToTokens(formatOpts, locale) {
  if (!formatOpts) {
    return null;
  }
  const formatter = Formatter.create(locale, formatOpts);
  const df = formatter.dtFormatter(getDummyDateTime());
  const parts = df.formatToParts();
  const resolvedOpts = df.resolvedOptions();
  return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts));
}
const INVALID = "Invalid DateTime";
const MAX_DATE = 864e13;
function unsupportedZone(zone) {
  return new Invalid("unsupported zone", `the zone "${zone.name}" is not supported`);
}
function possiblyCachedWeekData(dt) {
  if (dt.weekData === null) {
    dt.weekData = gregorianToWeek(dt.c);
  }
  return dt.weekData;
}
function possiblyCachedLocalWeekData(dt) {
  if (dt.localWeekData === null) {
    dt.localWeekData = gregorianToWeek(
      dt.c,
      dt.loc.getMinDaysInFirstWeek(),
      dt.loc.getStartOfWeek()
    );
  }
  return dt.localWeekData;
}
function clone(inst, alts) {
  const current2 = {
    ts: inst.ts,
    zone: inst.zone,
    c: inst.c,
    o: inst.o,
    loc: inst.loc,
    invalid: inst.invalid
  };
  return new DateTime({ ...current2, ...alts, old: current2 });
}
function fixOffset(localTS, o, tz) {
  let utcGuess = localTS - o * 60 * 1e3;
  const o2 = tz.offset(utcGuess);
  if (o === o2) {
    return [utcGuess, o];
  }
  utcGuess -= (o2 - o) * 60 * 1e3;
  const o3 = tz.offset(utcGuess);
  if (o2 === o3) {
    return [utcGuess, o2];
  }
  return [localTS - Math.min(o2, o3) * 60 * 1e3, Math.max(o2, o3)];
}
function tsToObj(ts, offset2) {
  ts += offset2 * 60 * 1e3;
  const d = new Date(ts);
  return {
    year: d.getUTCFullYear(),
    month: d.getUTCMonth() + 1,
    day: d.getUTCDate(),
    hour: d.getUTCHours(),
    minute: d.getUTCMinutes(),
    second: d.getUTCSeconds(),
    millisecond: d.getUTCMilliseconds()
  };
}
function objToTS(obj, offset2, zone) {
  return fixOffset(objToLocalTS(obj), offset2, zone);
}
function adjustTime(inst, dur) {
  const oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = {
    ...inst.c,
    year,
    month,
    day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7
  }, millisToAdd = Duration.fromObject({
    years: dur.years - Math.trunc(dur.years),
    quarters: dur.quarters - Math.trunc(dur.quarters),
    months: dur.months - Math.trunc(dur.months),
    weeks: dur.weeks - Math.trunc(dur.weeks),
    days: dur.days - Math.trunc(dur.days),
    hours: dur.hours,
    minutes: dur.minutes,
    seconds: dur.seconds,
    milliseconds: dur.milliseconds
  }).as("milliseconds"), localTS = objToLocalTS(c);
  let [ts, o] = fixOffset(localTS, oPre, inst.zone);
  if (millisToAdd !== 0) {
    ts += millisToAdd;
    o = inst.zone.offset(ts);
  }
  return { ts, o };
}
function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
  const { setZone, zone } = opts;
  if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {
    const interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, {
      ...opts,
      zone: interpretationZone,
      specificOffset
    });
    return setZone ? inst : inst.setZone(zone);
  } else {
    return DateTime.invalid(
      new Invalid("unparsable", `the input "${text}" can't be parsed as ${format}`)
    );
  }
}
function toTechFormat(dt, format, allowZ = true) {
  return dt.isValid ? Formatter.create(Locale.create("en-US"), {
    allowZ,
    forceSimple: true
  }).formatDateTimeFromString(dt, format) : null;
}
function toISODate(o, extended, precision) {
  const longFormat = o.c.year > 9999 || o.c.year < 0;
  let c = "";
  if (longFormat && o.c.year >= 0) c += "+";
  c += padStart(o.c.year, longFormat ? 6 : 4);
  if (precision === "year") return c;
  if (extended) {
    c += "-";
    c += padStart(o.c.month);
    if (precision === "month") return c;
    c += "-";
  } else {
    c += padStart(o.c.month);
    if (precision === "month") return c;
  }
  c += padStart(o.c.day);
  return c;
}
function toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision) {
  let showSeconds = !suppressSeconds || o.c.millisecond !== 0 || o.c.second !== 0, c = "";
  switch (precision) {
    case "day":
    case "month":
    case "year":
      break;
    default:
      c += padStart(o.c.hour);
      if (precision === "hour") break;
      if (extended) {
        c += ":";
        c += padStart(o.c.minute);
        if (precision === "minute") break;
        if (showSeconds) {
          c += ":";
          c += padStart(o.c.second);
        }
      } else {
        c += padStart(o.c.minute);
        if (precision === "minute") break;
        if (showSeconds) {
          c += padStart(o.c.second);
        }
      }
      if (precision === "second") break;
      if (showSeconds && (!suppressMilliseconds || o.c.millisecond !== 0)) {
        c += ".";
        c += padStart(o.c.millisecond, 3);
      }
  }
  if (includeOffset) {
    if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {
      c += "Z";
    } else if (o.o < 0) {
      c += "-";
      c += padStart(Math.trunc(-o.o / 60));
      c += ":";
      c += padStart(Math.trunc(-o.o % 60));
    } else {
      c += "+";
      c += padStart(Math.trunc(o.o / 60));
      c += ":";
      c += padStart(Math.trunc(o.o % 60));
    }
  }
  if (extendedZone) {
    c += "[" + o.zone.ianaName + "]";
  }
  return c;
}
const defaultUnitValues = {
  month: 1,
  day: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, defaultWeekUnitValues = {
  weekNumber: 1,
  weekday: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, defaultOrdinalUnitValues = {
  ordinal: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
};
const orderedUnits = ["year", "month", "day", "hour", "minute", "second", "millisecond"], orderedWeekUnits = [
  "weekYear",
  "weekNumber",
  "weekday",
  "hour",
  "minute",
  "second",
  "millisecond"
], orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
function normalizeUnit(unit2) {
  const normalized = {
    year: "year",
    years: "year",
    month: "month",
    months: "month",
    day: "day",
    days: "day",
    hour: "hour",
    hours: "hour",
    minute: "minute",
    minutes: "minute",
    quarter: "quarter",
    quarters: "quarter",
    second: "second",
    seconds: "second",
    millisecond: "millisecond",
    milliseconds: "millisecond",
    weekday: "weekday",
    weekdays: "weekday",
    weeknumber: "weekNumber",
    weeksnumber: "weekNumber",
    weeknumbers: "weekNumber",
    weekyear: "weekYear",
    weekyears: "weekYear",
    ordinal: "ordinal"
  }[unit2.toLowerCase()];
  if (!normalized) throw new InvalidUnitError(unit2);
  return normalized;
}
function normalizeUnitWithLocalWeeks(unit2) {
  switch (unit2.toLowerCase()) {
    case "localweekday":
    case "localweekdays":
      return "localWeekday";
    case "localweeknumber":
    case "localweeknumbers":
      return "localWeekNumber";
    case "localweekyear":
    case "localweekyears":
      return "localWeekYear";
    default:
      return normalizeUnit(unit2);
  }
}
function guessOffsetForZone(zone) {
  if (zoneOffsetTs === void 0) {
    zoneOffsetTs = Settings.now();
  }
  if (zone.type !== "iana") {
    return zone.offset(zoneOffsetTs);
  }
  const zoneName = zone.name;
  let offsetGuess = zoneOffsetGuessCache.get(zoneName);
  if (offsetGuess === void 0) {
    offsetGuess = zone.offset(zoneOffsetTs);
    zoneOffsetGuessCache.set(zoneName, offsetGuess);
  }
  return offsetGuess;
}
function quickDT(obj, opts) {
  const zone = normalizeZone(opts.zone, Settings.defaultZone);
  if (!zone.isValid) {
    return DateTime.invalid(unsupportedZone(zone));
  }
  const loc = Locale.fromObject(opts);
  let ts, o;
  if (!isUndefined(obj.year)) {
    for (const u of orderedUnits) {
      if (isUndefined(obj[u])) {
        obj[u] = defaultUnitValues[u];
      }
    }
    const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);
    if (invalid) {
      return DateTime.invalid(invalid);
    }
    const offsetProvis = guessOffsetForZone(zone);
    [ts, o] = objToTS(obj, offsetProvis, zone);
  } else {
    ts = Settings.now();
  }
  return new DateTime({ ts, zone, loc, o });
}
function diffRelative(start, end, opts) {
  const round = isUndefined(opts.round) ? true : opts.round, rounding = isUndefined(opts.rounding) ? "trunc" : opts.rounding, format = (c, unit2) => {
    c = roundTo(c, round || opts.calendary ? 0 : 2, opts.calendary ? "round" : rounding);
    const formatter = end.loc.clone(opts).relFormatter(opts);
    return formatter.format(c, unit2);
  }, differ = (unit2) => {
    if (opts.calendary) {
      if (!end.hasSame(start, unit2)) {
        return end.startOf(unit2).diff(start.startOf(unit2), unit2).get(unit2);
      } else return 0;
    } else {
      return end.diff(start, unit2).get(unit2);
    }
  };
  if (opts.unit) {
    return format(differ(opts.unit), opts.unit);
  }
  for (const unit2 of opts.units) {
    const count = differ(unit2);
    if (Math.abs(count) >= 1) {
      return format(count, unit2);
    }
  }
  return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);
}
function lastOpts(argList) {
  let opts = {}, args;
  if (argList.length > 0 && typeof argList[argList.length - 1] === "object") {
    opts = argList[argList.length - 1];
    args = Array.from(argList).slice(0, argList.length - 1);
  } else {
    args = Array.from(argList);
  }
  return [opts, args];
}
let zoneOffsetTs;
const zoneOffsetGuessCache = /* @__PURE__ */ new Map();
class DateTime {
  /**
   * @access private
   */
  constructor(config) {
    const zone = config.zone || Settings.defaultZone;
    let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null);
    this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;
    let c = null, o = null;
    if (!invalid) {
      const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);
      if (unchanged) {
        [c, o] = [config.old.c, config.old.o];
      } else {
        const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts);
        c = tsToObj(this.ts, ot);
        invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null;
        c = invalid ? null : c;
        o = invalid ? null : ot;
      }
    }
    this._zone = zone;
    this.loc = config.loc || Locale.create();
    this.invalid = invalid;
    this.weekData = null;
    this.localWeekData = null;
    this.c = c;
    this.o = o;
    this.isLuxonDateTime = true;
  }
  // CONSTRUCT
  /**
   * Create a DateTime for the current instant, in the system's time zone.
   *
   * Use Settings to override these default values if needed.
   * @example DateTime.now().toISO() //~> now in the ISO format
   * @return {DateTime}
   */
  static now() {
    return new DateTime({});
  }
  /**
   * Create a local DateTime
   * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used
   * @param {number} [month=1] - The month, 1-indexed
   * @param {number} [day=1] - The day of the month, 1-indexed
   * @param {number} [hour=0] - The hour of the day, in 24-hour time
   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
   * @example DateTime.local()                                  //~> now
   * @example DateTime.local({ zone: "America/New_York" })      //~> now, in US east coast time
   * @example DateTime.local(2017)                              //~> 2017-01-01T00:00:00
   * @example DateTime.local(2017, 3)                           //~> 2017-03-01T00:00:00
   * @example DateTime.local(2017, 3, 12, { locale: "fr" })     //~> 2017-03-12T00:00:00, with a French locale
   * @example DateTime.local(2017, 3, 12, 5)                    //~> 2017-03-12T05:00:00
   * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" })   //~> 2017-03-12T05:00:00, in UTC
   * @example DateTime.local(2017, 3, 12, 5, 45)                //~> 2017-03-12T05:45:00
   * @example DateTime.local(2017, 3, 12, 5, 45, 10)            //~> 2017-03-12T05:45:10
   * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765)       //~> 2017-03-12T05:45:10.765
   * @return {DateTime}
   */
  static local() {
    const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args;
    return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);
  }
  /**
   * Create a DateTime in UTC
   * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used
   * @param {number} [month=1] - The month, 1-indexed
   * @param {number} [day=1] - The day of the month
   * @param {number} [hour=0] - The hour of the day, in 24-hour time
   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
   * @param {Object} options - configuration options for the DateTime
   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
   * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance
   * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance
   * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance
   * @example DateTime.utc()                                              //~> now
   * @example DateTime.utc(2017)                                          //~> 2017-01-01T00:00:00Z
   * @example DateTime.utc(2017, 3)                                       //~> 2017-03-01T00:00:00Z
   * @example DateTime.utc(2017, 3, 12)                                   //~> 2017-03-12T00:00:00Z
   * @example DateTime.utc(2017, 3, 12, 5)                                //~> 2017-03-12T05:00:00Z
   * @example DateTime.utc(2017, 3, 12, 5, 45)                            //~> 2017-03-12T05:45:00Z
   * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" })          //~> 2017-03-12T05:45:00Z with a French locale
   * @example DateTime.utc(2017, 3, 12, 5, 45, 10)                        //~> 2017-03-12T05:45:10Z
   * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale
   * @return {DateTime}
   */
  static utc() {
    const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args;
    opts.zone = FixedOffsetZone.utcInstance;
    return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);
  }
  /**
   * Create a DateTime from a JavaScript Date object. Uses the default zone.
   * @param {Date} date - a JavaScript Date object
   * @param {Object} options - configuration options for the DateTime
   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
   * @return {DateTime}
   */
  static fromJSDate(date, options = {}) {
    const ts = isDate(date) ? date.valueOf() : NaN;
    if (Number.isNaN(ts)) {
      return DateTime.invalid("invalid input");
    }
    const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);
    if (!zoneToUse.isValid) {
      return DateTime.invalid(unsupportedZone(zoneToUse));
    }
    return new DateTime({
      ts,
      zone: zoneToUse,
      loc: Locale.fromObject(options)
    });
  }
  /**
   * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
   * @param {number} milliseconds - a number of milliseconds since 1970 UTC
   * @param {Object} options - configuration options for the DateTime
   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
   * @return {DateTime}
   */
  static fromMillis(milliseconds, options = {}) {
    if (!isNumber(milliseconds)) {
      throw new InvalidArgumentError(
        `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`
      );
    } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {
      return DateTime.invalid("Timestamp out of range");
    } else {
      return new DateTime({
        ts: milliseconds,
        zone: normalizeZone(options.zone, Settings.defaultZone),
        loc: Locale.fromObject(options)
      });
    }
  }
  /**
   * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
   * @param {number} seconds - a number of seconds since 1970 UTC
   * @param {Object} options - configuration options for the DateTime
   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
   * @return {DateTime}
   */
  static fromSeconds(seconds, options = {}) {
    if (!isNumber(seconds)) {
      throw new InvalidArgumentError("fromSeconds requires a numerical input");
    } else {
      return new DateTime({
        ts: seconds * 1e3,
        zone: normalizeZone(options.zone, Settings.defaultZone),
        loc: Locale.fromObject(options)
      });
    }
  }
  /**
   * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.
   * @param {Object} obj - the object to create the DateTime from
   * @param {number} obj.year - a year, such as 1987
   * @param {number} obj.month - a month, 1-12
   * @param {number} obj.day - a day of the month, 1-31, depending on the month
   * @param {number} obj.ordinal - day of the year, 1-365 or 366
   * @param {number} obj.weekYear - an ISO week year
   * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year
   * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday
   * @param {number} obj.localWeekYear - a week year, according to the locale
   * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale
   * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale
   * @param {number} obj.hour - hour of the day, 0-23
   * @param {number} obj.minute - minute of the hour, 0-59
   * @param {number} obj.second - second of the minute, 0-59
   * @param {number} obj.millisecond - millisecond of the second, 0-999
   * @param {Object} opts - options for creating this DateTime
   * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()
   * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'
   * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })
   * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'
   * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26'
   * @return {DateTime}
   */
  static fromObject(obj, opts = {}) {
    obj = obj || {};
    const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);
    if (!zoneToUse.isValid) {
      return DateTime.invalid(unsupportedZone(zoneToUse));
    }
    const loc = Locale.fromObject(opts);
    const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);
    const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, loc);
    const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
    if ((containsGregor || containsOrdinal) && definiteWeekDef) {
      throw new ConflictingSpecificationError(
        "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
      );
    }
    if (containsGregorMD && containsOrdinal) {
      throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");
    }
    const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor;
    let units, defaultValues, objNow = tsToObj(tsNow, offsetProvis);
    if (useWeekData) {
      units = orderedWeekUnits;
      defaultValues = defaultWeekUnitValues;
      objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);
    } else if (containsOrdinal) {
      units = orderedOrdinalUnits;
      defaultValues = defaultOrdinalUnitValues;
      objNow = gregorianToOrdinal(objNow);
    } else {
      units = orderedUnits;
      defaultValues = defaultUnitValues;
    }
    let foundFirst = false;
    for (const u of units) {
      const v = normalized[u];
      if (!isUndefined(v)) {
        foundFirst = true;
      } else if (foundFirst) {
        normalized[u] = defaultValues[u];
      } else {
        normalized[u] = objNow[u];
      }
    }
    const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized);
    if (invalid) {
      return DateTime.invalid(invalid);
    }
    const gregorian = useWeekData ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new DateTime({
      ts: tsFinal,
      zone: zoneToUse,
      o: offsetFinal,
      loc
    });
    if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {
      return DateTime.invalid(
        "mismatched weekday",
        `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`
      );
    }
    if (!inst.isValid) {
      return DateTime.invalid(inst.invalid);
    }
    return inst;
  }
  /**
   * Create a DateTime from an ISO 8601 string
   * @param {string} text - the ISO string
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone
   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
   * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance
   * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance
   * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromISO('2016-05-25T09:08:34.123')
   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')
   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})
   * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})
   * @example DateTime.fromISO('2016-W05-4')
   * @return {DateTime}
   */
  static fromISO(text, opts = {}) {
    const [vals, parsedZone] = parseISODate(text);
    return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text);
  }
  /**
   * Create a DateTime from an RFC 2822 string
   * @param {string} text - the RFC 2822 string
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')
   * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')
   * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')
   * @return {DateTime}
   */
  static fromRFC2822(text, opts = {}) {
    const [vals, parsedZone] = parseRFC2822Date(text);
    return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text);
  }
  /**
   * Create a DateTime from an HTTP header date
   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
   * @param {string} text - the HTTP header date
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
   * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.
   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')
   * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')
   * @example DateTime.fromHTTP('Sun Nov  6 08:49:37 1994')
   * @return {DateTime}
   */
  static fromHTTP(text, opts = {}) {
    const [vals, parsedZone] = parseHTTPDate(text);
    return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts);
  }
  /**
   * Create a DateTime from an input string and format string.
   * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).
   * @param {string} text - the string to parse
   * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @return {DateTime}
   */
  static fromFormat(text, fmt, opts = {}) {
    if (isUndefined(text) || isUndefined(fmt)) {
      throw new InvalidArgumentError("fromFormat requires an input string and a format");
    }
    const { locale = null, numberingSystem = null } = opts, localeToUse = Locale.fromOpts({
      locale,
      numberingSystem,
      defaultToEN: true
    }), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);
    if (invalid) {
      return DateTime.invalid(invalid);
    } else {
      return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);
    }
  }
  /**
   * @deprecated use fromFormat instead
   */
  static fromString(text, fmt, opts = {}) {
    return DateTime.fromFormat(text, fmt, opts);
  }
  /**
   * Create a DateTime from a SQL date, time, or datetime
   * Defaults to en-US if no locale has been specified, regardless of the system's locale
   * @param {string} text - the string to parse
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @example DateTime.fromSQL('2017-05-15')
   * @example DateTime.fromSQL('2017-05-15 09:12:34')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })
   * @example DateTime.fromSQL('09:12:34.342')
   * @return {DateTime}
   */
  static fromSQL(text, opts = {}) {
    const [vals, parsedZone] = parseSQL(text);
    return parseDataToDateTime(vals, parsedZone, opts, "SQL", text);
  }
  /**
   * Create an invalid DateTime.
   * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.
   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
   * @return {DateTime}
   */
  static invalid(reason, explanation = null) {
    if (!reason) {
      throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");
    }
    const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);
    if (Settings.throwOnInvalid) {
      throw new InvalidDateTimeError(invalid);
    } else {
      return new DateTime({ invalid });
    }
  }
  /**
   * Check if an object is an instance of DateTime. Works across context boundaries
   * @param {object} o
   * @return {boolean}
   */
  static isDateTime(o) {
    return o && o.isLuxonDateTime || false;
  }
  /**
   * Produce the format string for a set of options
   * @param formatOpts
   * @param localeOpts
   * @returns {string}
   */
  static parseFormatForOpts(formatOpts, localeOpts = {}) {
    const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));
    return !tokenList ? null : tokenList.map((t2) => t2 ? t2.val : null).join("");
  }
  /**
   * Produce the the fully expanded format token for the locale
   * Does NOT quote characters, so quoted tokens will not round trip correctly
   * @param fmt
   * @param localeOpts
   * @returns {string}
   */
  static expandFormat(fmt, localeOpts = {}) {
    const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));
    return expanded.map((t2) => t2.val).join("");
  }
  static resetCache() {
    zoneOffsetTs = void 0;
    zoneOffsetGuessCache.clear();
  }
  // INFO
  /**
   * Get the value of unit.
   * @param {string} unit - a unit such as 'minute' or 'day'
   * @example DateTime.local(2017, 7, 4).get('month'); //=> 7
   * @example DateTime.local(2017, 7, 4).get('day'); //=> 4
   * @return {number}
   */
  get(unit2) {
    return this[unit2];
  }
  /**
   * Returns whether the DateTime is valid. Invalid DateTimes occur when:
   * * The DateTime was created from invalid calendar information, such as the 13th month or February 30
   * * The DateTime was created by an operation on another invalid date
   * @type {boolean}
   */
  get isValid() {
    return this.invalid === null;
  }
  /**
   * Returns an error code if this DateTime is invalid, or null if the DateTime is valid
   * @type {string}
   */
  get invalidReason() {
    return this.invalid ? this.invalid.reason : null;
  }
  /**
   * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid
   * @type {string}
   */
  get invalidExplanation() {
    return this.invalid ? this.invalid.explanation : null;
  }
  /**
   * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime
   *
   * @type {string}
   */
  get locale() {
    return this.isValid ? this.loc.locale : null;
  }
  /**
   * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime
   *
   * @type {string}
   */
  get numberingSystem() {
    return this.isValid ? this.loc.numberingSystem : null;
  }
  /**
   * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime
   *
   * @type {string}
   */
  get outputCalendar() {
    return this.isValid ? this.loc.outputCalendar : null;
  }
  /**
   * Get the time zone associated with this DateTime.
   * @type {Zone}
   */
  get zone() {
    return this._zone;
  }
  /**
   * Get the name of the time zone.
   * @type {string}
   */
  get zoneName() {
    return this.isValid ? this.zone.name : null;
  }
  /**
   * Get the year
   * @example DateTime.local(2017, 5, 25).year //=> 2017
   * @type {number}
   */
  get year() {
    return this.isValid ? this.c.year : NaN;
  }
  /**
   * Get the quarter
   * @example DateTime.local(2017, 5, 25).quarter //=> 2
   * @type {number}
   */
  get quarter() {
    return this.isValid ? Math.ceil(this.c.month / 3) : NaN;
  }
  /**
   * Get the month (1-12).
   * @example DateTime.local(2017, 5, 25).month //=> 5
   * @type {number}
   */
  get month() {
    return this.isValid ? this.c.month : NaN;
  }
  /**
   * Get the day of the month (1-30ish).
   * @example DateTime.local(2017, 5, 25).day //=> 25
   * @type {number}
   */
  get day() {
    return this.isValid ? this.c.day : NaN;
  }
  /**
   * Get the hour of the day (0-23).
   * @example DateTime.local(2017, 5, 25, 9).hour //=> 9
   * @type {number}
   */
  get hour() {
    return this.isValid ? this.c.hour : NaN;
  }
  /**
   * Get the minute of the hour (0-59).
   * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30
   * @type {number}
   */
  get minute() {
    return this.isValid ? this.c.minute : NaN;
  }
  /**
   * Get the second of the minute (0-59).
   * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52
   * @type {number}
   */
  get second() {
    return this.isValid ? this.c.second : NaN;
  }
  /**
   * Get the millisecond of the second (0-999).
   * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654
   * @type {number}
   */
  get millisecond() {
    return this.isValid ? this.c.millisecond : NaN;
  }
  /**
   * Get the week year
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2014, 12, 31).weekYear //=> 2015
   * @type {number}
   */
  get weekYear() {
    return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;
  }
  /**
   * Get the week number of the week year (1-52ish).
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2017, 5, 25).weekNumber //=> 21
   * @type {number}
   */
  get weekNumber() {
    return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;
  }
  /**
   * Get the day of the week.
   * 1 is Monday and 7 is Sunday
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2014, 11, 31).weekday //=> 4
   * @type {number}
   */
  get weekday() {
    return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;
  }
  /**
   * Returns true if this date is on a weekend according to the locale, false otherwise
   * @returns {boolean}
   */
  get isWeekend() {
    return this.isValid && this.loc.getWeekendDays().includes(this.weekday);
  }
  /**
   * Get the day of the week according to the locale.
   * 1 is the first day of the week and 7 is the last day of the week.
   * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,
   * @returns {number}
   */
  get localWeekday() {
    return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;
  }
  /**
   * Get the week number of the week year according to the locale. Different locales assign week numbers differently,
   * because the week can start on different days of the week (see localWeekday) and because a different number of days
   * is required for a week to count as the first week of a year.
   * @returns {number}
   */
  get localWeekNumber() {
    return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;
  }
  /**
   * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)
   * differently, see localWeekNumber.
   * @returns {number}
   */
  get localWeekYear() {
    return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;
  }
  /**
   * Get the ordinal (meaning the day of the year)
   * @example DateTime.local(2017, 5, 25).ordinal //=> 145
   * @type {number|DateTime}
   */
  get ordinal() {
    return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;
  }
  /**
   * Get the human readable short month name, such as 'Oct'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).monthShort //=> Oct
   * @type {string}
   */
  get monthShort() {
    return this.isValid ? Info.months("short", { locObj: this.loc })[this.month - 1] : null;
  }
  /**
   * Get the human readable long month name, such as 'October'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).monthLong //=> October
   * @type {string}
   */
  get monthLong() {
    return this.isValid ? Info.months("long", { locObj: this.loc })[this.month - 1] : null;
  }
  /**
   * Get the human readable short weekday, such as 'Mon'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon
   * @type {string}
   */
  get weekdayShort() {
    return this.isValid ? Info.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
  }
  /**
   * Get the human readable long weekday, such as 'Monday'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday
   * @type {string}
   */
  get weekdayLong() {
    return this.isValid ? Info.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
  }
  /**
   * Get the UTC offset of this DateTime in minutes
   * @example DateTime.now().offset //=> -240
   * @example DateTime.utc().offset //=> 0
   * @type {number}
   */
  get offset() {
    return this.isValid ? +this.o : NaN;
  }
  /**
   * Get the short human name for the zone's current offset, for example "EST" or "EDT".
   * Defaults to the system's locale if no locale has been specified
   * @type {string}
   */
  get offsetNameShort() {
    if (this.isValid) {
      return this.zone.offsetName(this.ts, {
        format: "short",
        locale: this.locale
      });
    } else {
      return null;
    }
  }
  /**
   * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time".
   * Defaults to the system's locale if no locale has been specified
   * @type {string}
   */
  get offsetNameLong() {
    if (this.isValid) {
      return this.zone.offsetName(this.ts, {
        format: "long",
        locale: this.locale
      });
    } else {
      return null;
    }
  }
  /**
   * Get whether this zone's offset ever changes, as in a DST.
   * @type {boolean}
   */
  get isOffsetFixed() {
    return this.isValid ? this.zone.isUniversal : null;
  }
  /**
   * Get whether the DateTime is in a DST.
   * @type {boolean}
   */
  get isInDST() {
    if (this.isOffsetFixed) {
      return false;
    } else {
      return this.offset > this.set({ month: 1, day: 1 }).offset || this.offset > this.set({ month: 5 }).offset;
    }
  }
  /**
   * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC
   * in this DateTime's zone. During DST changes local time can be ambiguous, for example
   * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.
   * This method will return both possible DateTimes if this DateTime's local time is ambiguous.
   * @returns {DateTime[]}
   */
  getPossibleOffsets() {
    if (!this.isValid || this.isOffsetFixed) {
      return [this];
    }
    const dayMs = 864e5;
    const minuteMs = 6e4;
    const localTS = objToLocalTS(this.c);
    const oEarlier = this.zone.offset(localTS - dayMs);
    const oLater = this.zone.offset(localTS + dayMs);
    const o1 = this.zone.offset(localTS - oEarlier * minuteMs);
    const o2 = this.zone.offset(localTS - oLater * minuteMs);
    if (o1 === o2) {
      return [this];
    }
    const ts1 = localTS - o1 * minuteMs;
    const ts2 = localTS - o2 * minuteMs;
    const c1 = tsToObj(ts1, o1);
    const c2 = tsToObj(ts2, o2);
    if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) {
      return [clone(this, { ts: ts1 }), clone(this, { ts: ts2 })];
    }
    return [this];
  }
  /**
   * Returns true if this DateTime is in a leap year, false otherwise
   * @example DateTime.local(2016).isInLeapYear //=> true
   * @example DateTime.local(2013).isInLeapYear //=> false
   * @type {boolean}
   */
  get isInLeapYear() {
    return isLeapYear(this.year);
  }
  /**
   * Returns the number of days in this DateTime's month
   * @example DateTime.local(2016, 2).daysInMonth //=> 29
   * @example DateTime.local(2016, 3).daysInMonth //=> 31
   * @type {number}
   */
  get daysInMonth() {
    return daysInMonth(this.year, this.month);
  }
  /**
   * Returns the number of days in this DateTime's year
   * @example DateTime.local(2016).daysInYear //=> 366
   * @example DateTime.local(2013).daysInYear //=> 365
   * @type {number}
   */
  get daysInYear() {
    return this.isValid ? daysInYear(this.year) : NaN;
  }
  /**
   * Returns the number of weeks in this DateTime's year
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2004).weeksInWeekYear //=> 53
   * @example DateTime.local(2013).weeksInWeekYear //=> 52
   * @type {number}
   */
  get weeksInWeekYear() {
    return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;
  }
  /**
   * Returns the number of weeks in this DateTime's local week year
   * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52
   * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53
   * @type {number}
   */
  get weeksInLocalWeekYear() {
    return this.isValid ? weeksInWeekYear(
      this.localWeekYear,
      this.loc.getMinDaysInFirstWeek(),
      this.loc.getStartOfWeek()
    ) : NaN;
  }
  /**
   * Returns the resolved Intl options for this DateTime.
   * This is useful in understanding the behavior of formatting methods
   * @param {Object} opts - the same options as toLocaleString
   * @return {Object}
   */
  resolvedLocaleOptions(opts = {}) {
    const { locale, numberingSystem, calendar } = Formatter.create(
      this.loc.clone(opts),
      opts
    ).resolvedOptions(this);
    return { locale, numberingSystem, outputCalendar: calendar };
  }
  // TRANSFORM
  /**
   * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime.
   *
   * Equivalent to {@link DateTime#setZone}('utc')
   * @param {number} [offset=0] - optionally, an offset from UTC in minutes
   * @param {Object} [opts={}] - options to pass to `setZone()`
   * @return {DateTime}
   */
  toUTC(offset2 = 0, opts = {}) {
    return this.setZone(FixedOffsetZone.instance(offset2), opts);
  }
  /**
   * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.
   *
   * Equivalent to `setZone('local')`
   * @return {DateTime}
   */
  toLocal() {
    return this.setZone(Settings.defaultZone);
  }
  /**
   * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.
   *
   * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.
   * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.
   * @param {Object} opts - options
   * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.
   * @return {DateTime}
   */
  setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {
    zone = normalizeZone(zone, Settings.defaultZone);
    if (zone.equals(this.zone)) {
      return this;
    } else if (!zone.isValid) {
      return DateTime.invalid(unsupportedZone(zone));
    } else {
      let newTS = this.ts;
      if (keepLocalTime || keepCalendarTime) {
        const offsetGuess = zone.offset(this.ts);
        const asObj = this.toObject();
        [newTS] = objToTS(asObj, offsetGuess, zone);
      }
      return clone(this, { ts: newTS, zone });
    }
  }
  /**
   * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
   * @param {Object} properties - the properties to set
   * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })
   * @return {DateTime}
   */
  reconfigure({ locale, numberingSystem, outputCalendar } = {}) {
    const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });
    return clone(this, { loc });
  }
  /**
   * "Set" the locale. Returns a newly-constructed DateTime.
   * Just a convenient alias for reconfigure({ locale })
   * @example DateTime.local(2017, 5, 25).setLocale('en-GB')
   * @return {DateTime}
   */
  setLocale(locale) {
    return this.reconfigure({ locale });
  }
  /**
   * "Set" the values of specified units. Returns a newly-constructed DateTime.
   * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.
   *
   * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.
   * They cannot be mixed with ISO-week units like `weekday`.
   * @param {Object} values - a mapping of units to numbers
   * @example dt.set({ year: 2017 })
   * @example dt.set({ hour: 8, minute: 30 })
   * @example dt.set({ weekday: 5 })
   * @example dt.set({ year: 2005, ordinal: 234 })
   * @return {DateTime}
   */
  set(values) {
    if (!this.isValid) return this;
    const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);
    const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, this.loc);
    const settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
    if ((containsGregor || containsOrdinal) && definiteWeekDef) {
      throw new ConflictingSpecificationError(
        "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
      );
    }
    if (containsGregorMD && containsOrdinal) {
      throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");
    }
    let mixed;
    if (settingWeekStuff) {
      mixed = weekToGregorian(
        { ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), ...normalized },
        minDaysInFirstWeek,
        startOfWeek
      );
    } else if (!isUndefined(normalized.ordinal)) {
      mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized });
    } else {
      mixed = { ...this.toObject(), ...normalized };
      if (isUndefined(normalized.day)) {
        mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);
      }
    }
    const [ts, o] = objToTS(mixed, this.o, this.zone);
    return clone(this, { ts, o });
  }
  /**
   * Add a period of time to this DateTime and return the resulting DateTime
   *
   * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.
   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   * @example DateTime.now().plus(123) //~> in 123 milliseconds
   * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes
   * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow
   * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday
   * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min
   * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min
   * @return {DateTime}
   */
  plus(duration2) {
    if (!this.isValid) return this;
    const dur = Duration.fromDurationLike(duration2);
    return clone(this, adjustTime(this, dur));
  }
  /**
   * Subtract a period of time to this DateTime and return the resulting DateTime
   * See {@link DateTime#plus}
   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   @return {DateTime}
   */
  minus(duration2) {
    if (!this.isValid) return this;
    const dur = Duration.fromDurationLike(duration2).negate();
    return clone(this, adjustTime(this, dur));
  }
  /**
   * "Set" this DateTime to the beginning of a unit of time.
   * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
   * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'
   * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'
   * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays
   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'
   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'
   * @return {DateTime}
   */
  startOf(unit2, { useLocaleWeeks = false } = {}) {
    if (!this.isValid) return this;
    const o = {}, normalizedUnit = Duration.normalizeUnit(unit2);
    switch (normalizedUnit) {
      case "years":
        o.month = 1;
      case "quarters":
      case "months":
        o.day = 1;
      case "weeks":
      case "days":
        o.hour = 0;
      case "hours":
        o.minute = 0;
      case "minutes":
        o.second = 0;
      case "seconds":
        o.millisecond = 0;
        break;
    }
    if (normalizedUnit === "weeks") {
      if (useLocaleWeeks) {
        const startOfWeek = this.loc.getStartOfWeek();
        const { weekday } = this;
        if (weekday < startOfWeek) {
          o.weekNumber = this.weekNumber - 1;
        }
        o.weekday = startOfWeek;
      } else {
        o.weekday = 1;
      }
    }
    if (normalizedUnit === "quarters") {
      const q = Math.ceil(this.month / 3);
      o.month = (q - 1) * 3 + 1;
    }
    return this.set(o);
  }
  /**
   * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time
   * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
   * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'
   * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'
   * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays
   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'
   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'
   * @return {DateTime}
   */
  endOf(unit2, opts) {
    return this.isValid ? this.plus({ [unit2]: 1 }).startOf(unit2, opts).minus(1) : this;
  }
  // OUTPUT
  /**
   * Returns a string representation of this DateTime formatted according to the specified format string.
   * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
   * Defaults to en-US if no locale has been specified, regardless of the system's locale.
   * @param {string} fmt - the format string
   * @param {Object} opts - opts to override the configuration options on this DateTime
   * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'
   * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'
   * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22'
   * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes'
   * @return {string}
   */
  toFormat(fmt, opts = {}) {
    return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID;
  }
  /**
   * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.
   * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation
   * of the DateTime in the assigned locale.
   * Defaults to the system's locale if no locale has been specified
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options
   * @param {Object} opts - opts to override the configuration options on this DateTime
   * @example DateTime.now().toLocaleString(); //=> 4/20/2017
   * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'
   * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'
   * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'
   * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'
   * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'
   * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'
   * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'
   * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'
   * @return {string}
   */
  toLocaleString(formatOpts = DATE_SHORT, opts = {}) {
    return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID;
  }
  /**
   * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.
   * Defaults to the system's locale if no locale has been specified
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts
   * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.
   * @example DateTime.now().toLocaleParts(); //=> [
   *                                   //=>   { type: 'day', value: '25' },
   *                                   //=>   { type: 'literal', value: '/' },
   *                                   //=>   { type: 'month', value: '05' },
   *                                   //=>   { type: 'literal', value: '/' },
   *                                   //=>   { type: 'year', value: '1982' }
   *                                   //=> ]
   */
  toLocaleParts(opts = {}) {
    return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : [];
  }
  /**
   * Returns an ISO 8601-compliant string representation of this DateTime
   * @param {Object} opts - options
   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.extendedZone=false] - add the time zone format extension
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'years', 'months', 'days', 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.
   * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
   * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
   * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'
   * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'
   * @example DateTime.now().toISO({ precision: 'day' }) //=> '2017-04-22Z'
   * @example DateTime.now().toISO({ precision: 'minute' }) //=> '2017-04-22T20:47Z'
   * @return {string|null}
   */
  toISO({
    format = "extended",
    suppressSeconds = false,
    suppressMilliseconds = false,
    includeOffset = true,
    extendedZone = false,
    precision = "milliseconds"
  } = {}) {
    if (!this.isValid) {
      return null;
    }
    precision = normalizeUnit(precision);
    const ext = format === "extended";
    let c = toISODate(this, ext, precision);
    if (orderedUnits.indexOf(precision) >= 3) c += "T";
    c += toISOTime(
      this,
      ext,
      suppressSeconds,
      suppressMilliseconds,
      includeOffset,
      extendedZone,
      precision
    );
    return c;
  }
  /**
   * Returns an ISO 8601-compliant string representation of this DateTime's date component
   * @param {Object} opts - options
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @param {string} [opts.precision='day'] - truncate output to desired precision: 'years', 'months', or 'days'.
   * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'
   * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'
   * @example DateTime.utc(1982, 5, 25).toISODate({ precision: 'month' }) //=> '1982-05'
   * @return {string|null}
   */
  toISODate({ format = "extended", precision = "day" } = {}) {
    if (!this.isValid) {
      return null;
    }
    return toISODate(this, format === "extended", normalizeUnit(precision));
  }
  /**
   * Returns an ISO 8601-compliant string representation of this DateTime's week date
   * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'
   * @return {string}
   */
  toISOWeekDate() {
    return toTechFormat(this, "kkkk-'W'WW-c");
  }
  /**
   * Returns an ISO 8601-compliant string representation of this DateTime's time component
   * @param {Object} opts - options
   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.extendedZone=true] - add the time zone format extension
   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.
   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34, second: 56 }).toISOTime({ precision: 'minute' }) //=> '07:34Z'
   * @return {string}
   */
  toISOTime({
    suppressMilliseconds = false,
    suppressSeconds = false,
    includeOffset = true,
    includePrefix = false,
    extendedZone = false,
    format = "extended",
    precision = "milliseconds"
  } = {}) {
    if (!this.isValid) {
      return null;
    }
    precision = normalizeUnit(precision);
    let c = includePrefix && orderedUnits.indexOf(precision) >= 3 ? "T" : "";
    return c + toISOTime(
      this,
      format === "extended",
      suppressSeconds,
      suppressMilliseconds,
      includeOffset,
      extendedZone,
      precision
    );
  }
  /**
   * Returns an RFC 2822-compatible string representation of this DateTime
   * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'
   * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'
   * @return {string}
   */
  toRFC2822() {
    return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false);
  }
  /**
   * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
   * Specifically, the string conforms to RFC 1123.
   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
   * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'
   * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'
   * @return {string}
   */
  toHTTP() {
    return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
  }
  /**
   * Returns a string representation of this DateTime appropriate for use in SQL Date
   * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'
   * @return {string|null}
   */
  toSQLDate() {
    if (!this.isValid) {
      return null;
    }
    return toISODate(this, true);
  }
  /**
   * Returns a string representation of this DateTime appropriate for use in SQL Time
   * @param {Object} opts - options
   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
   * @example DateTime.utc().toSQL() //=> '05:15:16.345'
   * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'
   * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'
   * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'
   * @return {string}
   */
  toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {
    let fmt = "HH:mm:ss.SSS";
    if (includeZone || includeOffset) {
      if (includeOffsetSpace) {
        fmt += " ";
      }
      if (includeZone) {
        fmt += "z";
      } else if (includeOffset) {
        fmt += "ZZ";
      }
    }
    return toTechFormat(this, fmt, true);
  }
  /**
   * Returns a string representation of this DateTime appropriate for use in SQL DateTime
   * @param {Object} opts - options
   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
   * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'
   * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'
   * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'
   * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'
   * @return {string}
   */
  toSQL(opts = {}) {
    if (!this.isValid) {
      return null;
    }
    return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;
  }
  /**
   * Returns a string representation of this DateTime appropriate for debugging
   * @return {string}
   */
  toString() {
    return this.isValid ? this.toISO() : INVALID;
  }
  /**
   * Returns a string representation of this DateTime appropriate for the REPL.
   * @return {string}
   */
  [Symbol.for("nodejs.util.inspect.custom")]() {
    if (this.isValid) {
      return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;
    } else {
      return `DateTime { Invalid, reason: ${this.invalidReason} }`;
    }
  }
  /**
   * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}
   * @return {number}
   */
  valueOf() {
    return this.toMillis();
  }
  /**
   * Returns the epoch milliseconds of this DateTime.
   * @return {number}
   */
  toMillis() {
    return this.isValid ? this.ts : NaN;
  }
  /**
   * Returns the epoch seconds (including milliseconds in the fractional part) of this DateTime.
   * @return {number}
   */
  toSeconds() {
    return this.isValid ? this.ts / 1e3 : NaN;
  }
  /**
   * Returns the epoch seconds (as a whole number) of this DateTime.
   * @return {number}
   */
  toUnixInteger() {
    return this.isValid ? Math.floor(this.ts / 1e3) : NaN;
  }
  /**
   * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.
   * @return {string}
   */
  toJSON() {
    return this.toISO();
  }
  /**
   * Returns a BSON serializable equivalent to this DateTime.
   * @return {Date}
   */
  toBSON() {
    return this.toJSDate();
  }
  /**
   * Returns a JavaScript object with this DateTime's year, month, day, and so on.
   * @param opts - options for generating the object
   * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output
   * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }
   * @return {Object}
   */
  toObject(opts = {}) {
    if (!this.isValid) return {};
    const base = { ...this.c };
    if (opts.includeConfig) {
      base.outputCalendar = this.outputCalendar;
      base.numberingSystem = this.loc.numberingSystem;
      base.locale = this.loc.locale;
    }
    return base;
  }
  /**
   * Returns a JavaScript Date equivalent to this DateTime.
   * @return {Date}
   */
  toJSDate() {
    return new Date(this.isValid ? this.ts : NaN);
  }
  // COMPARE
  /**
   * Return the difference between two DateTimes as a Duration.
   * @param {DateTime} otherDateTime - the DateTime to compare this one to
   * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.
   * @param {Object} opts - options that affect the creation of the Duration
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @example
   * var i1 = DateTime.fromISO('1982-05-25T09:45'),
   *     i2 = DateTime.fromISO('1983-10-14T10:30');
   * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }
   * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }
   * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }
   * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }
   * @return {Duration}
   */
  diff(otherDateTime, unit2 = "milliseconds", opts = {}) {
    if (!this.isValid || !otherDateTime.isValid) {
      return Duration.invalid("created by diffing an invalid DateTime");
    }
    const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };
    const units = maybeArray(unit2).map(Duration.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = diff(earlier, later, units, durOpts);
    return otherIsLater ? diffed.negate() : diffed;
  }
  /**
   * Return the difference between this DateTime and right now.
   * See {@link DateTime#diff}
   * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration
   * @param {Object} opts - options that affect the creation of the Duration
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @return {Duration}
   */
  diffNow(unit2 = "milliseconds", opts = {}) {
    return this.diff(DateTime.now(), unit2, opts);
  }
  /**
   * Return an Interval spanning between this DateTime and another DateTime
   * @param {DateTime} otherDateTime - the other end point of the Interval
   * @return {Interval|DateTime}
   */
  until(otherDateTime) {
    return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;
  }
  /**
   * Return whether this DateTime is in the same unit of time as another DateTime.
   * Higher-order units must also be identical for this function to return `true`.
   * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.
   * @param {DateTime} otherDateTime - the other DateTime
   * @param {string} unit - the unit of time to check sameness on
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used
   * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day
   * @return {boolean}
   */
  hasSame(otherDateTime, unit2, opts) {
    if (!this.isValid) return false;
    const inputMs = otherDateTime.valueOf();
    const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });
    return adjustedToZone.startOf(unit2, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit2, opts);
  }
  /**
   * Equality check
   * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.
   * To compare just the millisecond values, use `+dt1 === +dt2`.
   * @param {DateTime} other - the other DateTime
   * @return {boolean}
   */
  equals(other) {
    return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc);
  }
  /**
   * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your
   * platform supports Intl.RelativeTimeFormat. Rounds towards zero by default.
   * @param {Object} options - options that affect the output
   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
   * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow"
   * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds"
   * @param {boolean} [options.round=true] - whether to round the numbers in the output.
   * @param {string} [options.rounding="trunc"] - rounding method to use when rounding the numbers in the output. Can be "trunc" (toward zero), "expand" (away from zero), "round", "floor", or "ceil".
   * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.
   * @param {string} options.locale - override the locale of this DateTime
   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
   * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day"
   * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día"
   * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures"
   * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago"
   * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago"
   * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago"
   */
  toRelative(options = {}) {
    if (!this.isValid) return null;
    const base = options.base || DateTime.fromObject({}, { zone: this.zone }), padding = options.padding ? this < base ? -options.padding : options.padding : 0;
    let units = ["years", "months", "days", "hours", "minutes", "seconds"];
    let unit2 = options.unit;
    if (Array.isArray(options.unit)) {
      units = options.unit;
      unit2 = void 0;
    }
    return diffRelative(base, this.plus(padding), {
      ...options,
      numeric: "always",
      units,
      unit: unit2
    });
  }
  /**
   * Returns a string representation of this date relative to today, such as "yesterday" or "next month".
   * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.
   * @param {Object} options - options that affect the output
   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
   * @param {string} options.locale - override the locale of this DateTime
   * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days"
   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow"
   * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana"
   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain"
   * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
   */
  toRelativeCalendar(options = {}) {
    if (!this.isValid) return null;
    return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, {
      ...options,
      numeric: "auto",
      units: ["years", "months", "days"],
      calendary: true
    });
  }
  /**
   * Return the min of several date times
   * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum
   * @return {DateTime} the min DateTime, or undefined if called with no argument
   */
  static min(...dateTimes) {
    if (!dateTimes.every(DateTime.isDateTime)) {
      throw new InvalidArgumentError("min requires all arguments be DateTimes");
    }
    return bestBy(dateTimes, (i) => i.valueOf(), Math.min);
  }
  /**
   * Return the max of several date times
   * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum
   * @return {DateTime} the max DateTime, or undefined if called with no argument
   */
  static max(...dateTimes) {
    if (!dateTimes.every(DateTime.isDateTime)) {
      throw new InvalidArgumentError("max requires all arguments be DateTimes");
    }
    return bestBy(dateTimes, (i) => i.valueOf(), Math.max);
  }
  // MISC
  /**
   * Explain how a string would be parsed by fromFormat()
   * @param {string} text - the string to parse
   * @param {string} fmt - the format the string is expected to be in (see description)
   * @param {Object} options - options taken by fromFormat()
   * @return {Object}
   */
  static fromFormatExplain(text, fmt, options = {}) {
    const { locale = null, numberingSystem = null } = options, localeToUse = Locale.fromOpts({
      locale,
      numberingSystem,
      defaultToEN: true
    });
    return explainFromTokens(localeToUse, text, fmt);
  }
  /**
   * @deprecated use fromFormatExplain instead
   */
  static fromStringExplain(text, fmt, options = {}) {
    return DateTime.fromFormatExplain(text, fmt, options);
  }
  /**
   * Build a parser for `fmt` using the given locale. This parser can be passed
   * to {@link DateTime.fromFormatParser} to a parse a date in this format. This
   * can be used to optimize cases where many dates need to be parsed in a
   * specific format.
   *
   * @param {String} fmt - the format the string is expected to be in (see
   * description)
   * @param {Object} options - options used to set locale and numberingSystem
   * for parser
   * @returns {TokenParser} - opaque object to be used
   */
  static buildFormatParser(fmt, options = {}) {
    const { locale = null, numberingSystem = null } = options, localeToUse = Locale.fromOpts({
      locale,
      numberingSystem,
      defaultToEN: true
    });
    return new TokenParser(localeToUse, fmt);
  }
  /**
   * Create a DateTime from an input string and format parser.
   *
   * The format parser must have been created with the same locale as this call.
   *
   * @param {String} text - the string to parse
   * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}
   * @param {Object} opts - options taken by fromFormat()
   * @returns {DateTime}
   */
  static fromFormatParser(text, formatParser, opts = {}) {
    if (isUndefined(text) || isUndefined(formatParser)) {
      throw new InvalidArgumentError(
        "fromFormatParser requires an input string and a format parser"
      );
    }
    const { locale = null, numberingSystem = null } = opts, localeToUse = Locale.fromOpts({
      locale,
      numberingSystem,
      defaultToEN: true
    });
    if (!localeToUse.equals(formatParser.locale)) {
      throw new InvalidArgumentError(
        `fromFormatParser called with a locale of ${localeToUse}, but the format parser was created for ${formatParser.locale}`
      );
    }
    const { result, zone, specificOffset, invalidReason } = formatParser.explainFromTokens(text);
    if (invalidReason) {
      return DateTime.invalid(invalidReason);
    } else {
      return parseDataToDateTime(
        result,
        zone,
        opts,
        `format ${formatParser.format}`,
        text,
        specificOffset
      );
    }
  }
  // FORMAT PRESETS
  /**
   * {@link DateTime#toLocaleString} format like 10/14/1983
   * @type {Object}
   */
  static get DATE_SHORT() {
    return DATE_SHORT;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
   * @type {Object}
   */
  static get DATE_MED() {
    return DATE_MED;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
   * @type {Object}
   */
  static get DATE_MED_WITH_WEEKDAY() {
    return DATE_MED_WITH_WEEKDAY;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'October 14, 1983'
   * @type {Object}
   */
  static get DATE_FULL() {
    return DATE_FULL;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
   * @type {Object}
   */
  static get DATE_HUGE() {
    return DATE_HUGE;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get TIME_SIMPLE() {
    return TIME_SIMPLE;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get TIME_WITH_SECONDS() {
    return TIME_WITH_SECONDS;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get TIME_WITH_SHORT_OFFSET() {
    return TIME_WITH_SHORT_OFFSET;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get TIME_WITH_LONG_OFFSET() {
    return TIME_WITH_LONG_OFFSET;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
   * @type {Object}
   */
  static get TIME_24_SIMPLE() {
    return TIME_24_SIMPLE;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
   * @type {Object}
   */
  static get TIME_24_WITH_SECONDS() {
    return TIME_24_WITH_SECONDS;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.
   * @type {Object}
   */
  static get TIME_24_WITH_SHORT_OFFSET() {
    return TIME_24_WITH_SHORT_OFFSET;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
   * @type {Object}
   */
  static get TIME_24_WITH_LONG_OFFSET() {
    return TIME_24_WITH_LONG_OFFSET;
  }
  /**
   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_SHORT() {
    return DATETIME_SHORT;
  }
  /**
   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_SHORT_WITH_SECONDS() {
    return DATETIME_SHORT_WITH_SECONDS;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_MED() {
    return DATETIME_MED;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_MED_WITH_SECONDS() {
    return DATETIME_MED_WITH_SECONDS;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_MED_WITH_WEEKDAY() {
    return DATETIME_MED_WITH_WEEKDAY;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_FULL() {
    return DATETIME_FULL;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_FULL_WITH_SECONDS() {
    return DATETIME_FULL_WITH_SECONDS;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_HUGE() {
    return DATETIME_HUGE;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_HUGE_WITH_SECONDS() {
    return DATETIME_HUGE_WITH_SECONDS;
  }
}
function friendlyDateTime(dateTimeish) {
  if (DateTime.isDateTime(dateTimeish)) {
    return dateTimeish;
  } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {
    return DateTime.fromJSDate(dateTimeish);
  } else if (dateTimeish && typeof dateTimeish === "object") {
    return DateTime.fromObject(dateTimeish);
  } else {
    throw new InvalidArgumentError(
      `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`
    );
  }
}
const transformTimeZones = (data) => {
  const timeZones = {};
  const browserUtcId = 0;
  data.forEach((timeZone, index) => {
    const dt = DateTime.now().setZone(timeZone.TzIdName);
    const offsetInMinutes = dt.offset;
    const sign = offsetInMinutes >= 0 ? "+" : "-";
    const absOffset = Math.abs(offsetInMinutes);
    const hours = Math.floor(absOffset / 60);
    const minutes = absOffset % 60;
    const offsetFormatted = `UTC${sign}${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
    timeZones[timeZone.Id || index] = {
      value: String(timeZone.Id || index),
      label: `(${offsetFormatted}) ${t(`timezones.${timeZone.TzIdName}`)}`,
      utc: timeZone.UtcOffset,
      utcOffsetMinutes: timeZone.UtcOffsetMinutes,
      tzName: timeZone.TzIdName
    };
  });
  return {
    timeZones,
    browserUtcId
  };
};
const initialState$3 = {
  TeamSettings: {
    IsEnabled: false,
    Url: null,
    ClientId: null,
    ClientSecret: null,
    RabbitData: null
  },
  CommonViewSettings: {
    Name: "Р7-Офис",
    MainLogoId: 4553,
    BrandColor: "#118eef",
    MainLogoUrl: "https://cddisk.r7-office.ru/api/v1/files/stream?id=4553"
  },
  TimezoneSettings: {
    Timezones: {}
  },
  LanguageSettings: {
    Languages: {
      ru: {
        Id: "ru",
        Name: "Русский"
      },
      en: {
        Id: "en",
        Name: "English"
      }
    }
  }
};
const commonSettingsSlice = createSlice$1({
  name: "commonSettings",
  initialState: initialState$3,
  reducers: {
    setCommonSettings(state, action) {
      state.CommonViewSettings = action.payload.CommonViewSettings;
      state.TeamSettings = action.payload.TeamSettings;
    },
    setTimeZones(state, action) {
      const data = action.payload;
      const {
        timeZones
      } = transformTimeZones(data);
      state.TimezoneSettings.Timezones = timeZones;
    }
  }
});
const commonSettingsActions = commonSettingsSlice.actions;
const commonSettingsReducer = commonSettingsSlice.reducer;
var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
  LicenseStatus2[LicenseStatus2["Active"] = 1] = "Active";
  LicenseStatus2[LicenseStatus2["Deactivate"] = 2] = "Deactivate";
  return LicenseStatus2;
})(LicenseStatus || {});
const licensesApi = createApi$1({
  reducerPath: "api/licenses",
  baseQuery: customBaseQuery(BASE_URL$1),
  tagTypes: ["Licenses"],
  refetchOnMountOrArgChange: true,
  endpoints: (build) => ({
    getLicenses: build.query({
      query: (params) => ({
        url: "v1/Licenses",
        params
      }),
      providesTags: ["Licenses"]
    }),
    activateLicense: build.mutation({
      query: (body) => ({
        url: "v1/Licenses/Activate",
        method: "POST",
        body
      }),
      invalidatesTags: ["Licenses"]
    }),
    deactivateLicense: build.mutation({
      query: (id) => ({
        url: "v1/Licenses/Deactivate",
        method: "PUT",
        params: {
          id
        }
      }),
      invalidatesTags: ["Licenses"]
    })
  })
});
const {
  useGetLicensesQuery,
  useActivateLicenseMutation,
  useDeactivateLicenseMutation
} = licensesApi;
const initialState$2 = {
  activationParams: {
    offset: 0,
    count: 10,
    status: LicenseStatus.Active
  },
  deactivationParams: {
    offset: 0,
    count: 10,
    status: LicenseStatus.Deactivate
  }
};
const licensesSlice = createSlice$1({
  name: "licenses",
  initialState: initialState$2,
  reducers: {
    setLicenseActivationParams: (state, action) => {
      state.activationParams = action.payload;
    },
    setLicenseDeactivationParams: (state, action) => {
      state.deactivationParams = action.payload;
    }
  }
});
const licensesReducer = licensesSlice.reducer;
const licensesActions = licensesSlice.actions;
const selectActivationParams = (state) => state.licenses.activationParams;
const selectDeactivationParams = (state) => state.licenses.deactivationParams;
class UserService {
  async LoadUsersForWidgetSection() {
    const params = {
      Count: 20,
      Offset: 0,
      SortOrder: 0,
      SortField: 0,
      Filters: {},
      Query: "",
      FilterConditions: []
    };
    try {
      const res = await axiosInstance.post("v2/Profile/Users", params);
      return res.data.Response.Data;
    } catch (e) {
      throw new Error(`Error: ${e}`);
    }
  }
  async GetUserList(params) {
    try {
      const res = await axiosInstance.post("v1/User/search", params);
      return res.data;
    } catch (e) {
      throw new Error(`Error: ${e}`);
    }
  }
  async GetUserListByQuery(params) {
    const paramsToRequest = {
      Query: params.query,
      SortOrder: 0,
      SortOrderField: "Email",
      Size: 5,
      Offset: 0
    };
    try {
      const res = await axiosInstance.post("v1/User/search", paramsToRequest);
      return res.data;
    } catch (e) {
      throw new Error(`Error: ${e}`);
    }
  }
  async GetUserListByIds(params) {
    try {
      const res = await axiosInstance.post("v1/User/get", params);
      return res.data;
    } catch (e) {
      throw new Error(`Error: ${e}`);
    }
  }
}
const userApiArea = () => new UserService();
class HomeFactoryService {
  constructor() {
    this.LoadDashboardWidgets = async (id, paymentsDate) => {
      const results = await Promise.all([this.LoadUsersSection(id), this.LoadMailSection(id), this.LoadRoleSection({
        Count: 10,
        Offset: 0,
        Query: "",
        FilterConditions: []
      }), this.LoadPaymentSection({
        id: id ?? 0,
        paymentsDate
      }), this.LoadServicesSection(id), this.LoadDiskSpaceSection(id), this.LoadFilialSection({
        Count: 10,
        Offset: 0,
        Query: "",
        SkipCustomers: []
      })]);
      return {
        usersWidget: results[0],
        mailWidget: results[1],
        roleWidget: results[2],
        paymentWidget: results[3],
        servicesWidget: results[4],
        diskSpaceWidget: results[5],
        filialWidget: results[6]
      };
    };
    this.LoadUsersSection = async (id) => {
      try {
        return await userApiArea().LoadUsersForWidgetSection(id);
      } catch (e) {
        throw new Error(`Error in LoadUsersSection: ${e}`);
      }
    };
    this.LoadMailSection = async (id) => {
      try {
        const {
          data
        } = await axiosInstance.get("v1/EmailServer", {
          params: {
            customerId: id
          }
        });
        return data;
      } catch (e) {
        throw new Error(`Error in LoadMailSection: ${e}`);
      }
    };
    this.LoadRoleSection = async (params) => {
      try {
        const response = await axiosInstance.post("v2/roles/list", {
          Count: params.Count || 10,
          Offset: params.Offset || 0,
          Query: params.Query || "",
          FilterConditions: params.FilterConditions || []
        });
        return response.data.Response.Data;
      } catch (e) {
        throw new Error(`Error in LoadRoleSection: ${e}`);
      }
    };
    this.LoadPaymentSection = async (params) => {
      const {
        id,
        paymentsDate
      } = params;
      try {
        const {
          data
        } = await axiosInstance.get(`Tariff/getUserTariff`, {
          params: {
            userId: id,
            timeStamp: paymentsDate
          },
          headers: paymentsDate ? {
            "Cache-Control": "no-cache"
          } : {
            "Cache-Control": "default"
          }
        });
        return data;
      } catch (e) {
        throw new Error(`Error in LoadPaymentSection: ${e}`);
      }
    };
    this.LoadServicesSection = async (id) => {
      try {
        const response = await axiosInstance.get(`v1/serviceshealth`, {
          params: {
            customerId: id
          }
        });
        return response.data.Services;
      } catch (e) {
        throw new Error(`Error in LoadServicesSection: ${e}`);
      }
    };
    this.LoadDiskSpaceSection = async (id) => {
      try {
        const response = await axiosInstance.get("v2/customer/quota", {
          params: {
            id
          }
        });
        return response.data.Response.Data;
      } catch (e) {
        throw new Error(`Error in GetFilialQuota: ${e}`);
      }
    };
    this.LoadFilialSection = async (payload) => {
      try {
        const response = await axiosInstance.post("/v2/customer/list", {
          ...payload
        });
        return response.data.Response.Data;
      } catch (e) {
        throw new Error(`Error in GetFilials: ${e}`);
      }
    };
  }
}
const instance = new HomeFactoryService();
const homeFactory = () => instance;
const listOfWidgets = ["usersWidget", "mailWidget", "roleWidget", "paymentWidget", "servicesWidget", "diskSpaceWidget", "filialWidget"];
const LOCAL_STORE$1 = {
  usersWidget: listOfWidgets[0],
  mailWidget: listOfWidgets[1],
  roleWidget: listOfWidgets[2],
  paymentWidget: listOfWidgets[3],
  servicesWidget: listOfWidgets[4],
  diskSpaceWidget: listOfWidgets[5],
  filialWidget: listOfWidgets[6]
};
const getLocalStorageData$1 = (key, value) => {
  const data = window.localStorage.getItem(key);
  return data ? JSON.parse(data) : value;
};
const initialState$1 = {
  usersWidget: {
    data: getLocalStorageData$1(LOCAL_STORE$1.usersWidget),
    isLoading: false
  },
  mailWidget: {
    data: getLocalStorageData$1(LOCAL_STORE$1.mailWidget),
    isLoading: false
  },
  roleWidget: {
    data: getLocalStorageData$1(LOCAL_STORE$1.roleWidget),
    isLoading: false
  },
  paymentWidget: {
    data: getLocalStorageData$1(LOCAL_STORE$1.paymentWidget),
    isLoading: false
  },
  servicesWidget: {
    data: getLocalStorageData$1(LOCAL_STORE$1.servicesWidget),
    isLoading: false
  },
  diskSpaceWidget: {
    data: getLocalStorageData$1(LOCAL_STORE$1.diskSpaceWidget),
    isLoading: false
  },
  filialWidget: {
    data: getLocalStorageData$1(LOCAL_STORE$1.filialWidget),
    isLoading: false
  }
};
const homeWidget = createSlice$1({
  name: "homeWidget",
  initialState: initialState$1,
  reducers: {
    setWidgetData(state, action) {
      const {
        key,
        data
      } = action.payload;
      state[key].data = data;
    },
    setWidgetLoading(state, action) {
      const {
        key,
        isLoading
      } = action.payload;
      state[key].isLoading = isLoading;
    }
  }
});
const {
  setWidgetData,
  setWidgetLoading
} = homeWidget.actions;
const LoadWidgetData = async (filialId, paymentsDate) => {
  listOfWidgets.forEach((key) => store.dispatch(setWidgetLoading({
    key,
    isLoading: true
  })));
  const data = await homeFactory().LoadDashboardWidgets(filialId, paymentsDate);
  if (data) {
    listOfWidgets.forEach((key) => {
      store.dispatch(setWidgetData({
        key,
        data: data[key] || void 0
      }));
    });
  }
  listOfWidgets.forEach((key) => store.dispatch(setWidgetLoading({
    key,
    isLoading: false
  })));
};
const LoadUsersSection = async (id) => {
  store.dispatch(setWidgetLoading({
    key: "usersWidget",
    isLoading: true
  }));
  homeFactory().LoadUsersSection(id).then((data) => store.dispatch(setWidgetData({
    key: "usersWidget",
    data
  }))).finally(() => store.dispatch(setWidgetLoading({
    key: "usersWidget",
    isLoading: false
  })));
};
const LoadMailSection = async (id) => {
  store.dispatch(setWidgetLoading({
    key: "usersWidget",
    isLoading: true
  }));
  homeFactory().LoadMailSection(id).then((data) => store.dispatch(setWidgetData({
    key: "mailWidget",
    data
  }))).finally(() => store.dispatch(setWidgetLoading({
    key: "mailWidget",
    isLoading: false
  })));
};
const LoadRoleSection = async () => {
  store.dispatch(setWidgetLoading({
    key: "roleWidget",
    isLoading: true
  }));
  homeFactory().LoadRoleSection({
    Count: 10,
    Offset: 0,
    Query: "",
    FilterConditions: []
  }).then((data) => store.dispatch(setWidgetData({
    key: "roleWidget",
    data
  }))).finally(() => store.dispatch(setWidgetLoading({
    key: "roleWidget",
    isLoading: false
  })));
};
const LoadPaymentSection = async ({
  id,
  paymentsDate
}) => {
  store.dispatch(setWidgetLoading({
    key: "paymentWidget",
    isLoading: true
  }));
  homeFactory().LoadPaymentSection({
    id: id ?? 0,
    paymentsDate
  }).then((data) => store.dispatch(setWidgetData({
    key: "paymentWidget",
    data
  }))).finally(() => store.dispatch(setWidgetLoading({
    key: "paymentWidget",
    isLoading: false
  })));
};
const LoadServicesSection = async (id) => {
  store.dispatch(setWidgetLoading({
    key: "servicesWidget",
    isLoading: true
  }));
  homeFactory().LoadServicesSection(id).then((data) => store.dispatch(setWidgetData({
    key: "servicesWidget",
    data
  }))).finally(() => store.dispatch(setWidgetLoading({
    key: "servicesWidget",
    isLoading: false
  })));
};
const LoadDiskSpaceSection = async (id) => {
  store.dispatch(setWidgetLoading({
    key: "diskSpaceWidget",
    isLoading: true
  }));
  homeFactory().LoadDiskSpaceSection(id).then((data) => store.dispatch(setWidgetData({
    key: "diskSpaceWidget",
    data
  }))).finally(() => store.dispatch(setWidgetLoading({
    key: "diskSpaceWidget",
    isLoading: false
  })));
};
const LoadFilialSection = async () => {
  store.dispatch(setWidgetLoading({
    key: "filialWidget",
    isLoading: true
  }));
  homeFactory().LoadFilialSection({
    Count: 10,
    Offset: 0,
    Query: "",
    SkipCustomers: []
  }).then((data) => store.dispatch(setWidgetData({
    key: "filialWidget",
    data
  }))).finally(() => store.dispatch(setWidgetLoading({
    key: "filialWidget",
    isLoading: false
  })));
};
const actions$2 = {
  ...homeWidget.actions,
  LoadWidgetData,
  LoadUsersSection,
  LoadMailSection,
  LoadRoleSection,
  LoadPaymentSection,
  LoadServicesSection,
  LoadDiskSpaceSection,
  LoadFilialSection
};
const useHomeWidgetSlice = () => {
  return {
    actions: actions$2,
    useUsersWidget: () => useCreateUseState((state) => state.homeWidget.usersWidget, (data) => setWidgetData({
      key: LOCAL_STORE$1.usersWidget,
      data
    }), LOCAL_STORE$1.usersWidget),
    useMailWidget: () => useCreateUseState((state) => state.homeWidget.mailWidget, (data) => setWidgetData({
      key: LOCAL_STORE$1.mailWidget,
      data
    }), LOCAL_STORE$1.mailWidget),
    useRoleWidget: () => useCreateUseState((state) => state.homeWidget.roleWidget, (data) => setWidgetData({
      key: LOCAL_STORE$1.roleWidget,
      data
    }), LOCAL_STORE$1.roleWidget),
    usePaymentWidget: () => useCreateUseState((state) => state.homeWidget.paymentWidget, (data) => setWidgetData({
      key: LOCAL_STORE$1.paymentWidget,
      data
    }), LOCAL_STORE$1.paymentWidget),
    useServicesWidget: () => useCreateUseState((state) => state.homeWidget.servicesWidget, (data) => setWidgetData({
      key: LOCAL_STORE$1.servicesWidget,
      data
    }), LOCAL_STORE$1.servicesWidget),
    useDiskSpaceWidget: () => useCreateUseState((state) => state.homeWidget.diskSpaceWidget, (data) => setWidgetData({
      key: LOCAL_STORE$1.diskSpaceWidget,
      data
    }), LOCAL_STORE$1.diskSpaceWidget),
    useFilialWidget: () => useCreateUseState((state) => state.homeWidget.filialWidget, (data) => setWidgetData({
      key: LOCAL_STORE$1.filialWidget,
      data
    }), LOCAL_STORE$1.filialWidget)
  };
};
const homeWidgetReducer = homeWidget.reducer;
const BASE_URL = "/api";
const MOCK_BASE_URL = "http://localhost:3050";
const prepareHeaders = async (headers) => {
  headers.set("Content-Type", "application/json");
  return headers;
};
const resolveBaseUrl = ({
  url,
  baseUrl,
  isMockEndpoint,
  isMock
}) => {
  const useMock = isMockEndpoint !== void 0 ? isMockEndpoint : isMock;
  const resolvedBaseUrl = useMock ? MOCK_BASE_URL : baseUrl || BASE_URL;
  return `${resolvedBaseUrl}${url}`;
};
const createBaseQuery = (url, options = {
  isMock: false
}) => {
  const {
    baseUrl,
    isMock
  } = options || {};
  return async (args, api, extraOptions) => {
    var _a2;
    const resolvedBaseUrl = resolveBaseUrl({
      url,
      baseUrl,
      isMockEndpoint: (_a2 = api.meta) == null ? void 0 : _a2.isMock,
      isMock
    });
    const baseQuery = fetchBaseQuery$1({
      baseUrl: resolvedBaseUrl,
      prepareHeaders
    });
    return baseQuery(args, api, extraOptions);
  };
};
const dtoToNotificationSetting = (dto) => {
  return dto.map((item) => ({
    id: item.NotificationType,
    notificationType: item.NotificationType,
    value: item.NotificationEnableType,
    source: item.Source
  }));
};
const notificationSettingToDTO = (notificationSetting2) => {
  return {
    NotificationType: notificationSetting2.notificationType,
    NotificationEnableType: notificationSetting2.value,
    Source: notificationSetting2.source
  };
};
const notificationSettingsApi = createApi$1({
  reducerPath: "notificationSettingApi",
  baseQuery: createBaseQuery("/v1/notifications/settings", {
    isMock: false
  }),
  tagTypes: ["NotificationSettings"],
  endpoints: (builder) => ({
    getNotificationSettings: builder.query({
      query: ({
        userId
      }) => ({
        method: "GET",
        url: "/",
        params: {
          userId
        }
      }),
      transformResponse: (response) => {
        return dtoToNotificationSetting(response.Items);
      },
      providesTags: ["NotificationSettings"]
    }),
    updateNotificationSettings: builder.mutation({
      query: ({
        userId,
        settings: settings2
      }) => ({
        method: "POST",
        url: "/",
        body: {
          UserId: userId,
          Items: settings2.map(notificationSettingToDTO)
        }
      }),
      invalidatesTags: ["NotificationSettings"]
    })
  })
});
const {
  useGetNotificationSettingsQuery,
  useUpdateNotificationSettingsMutation
} = notificationSettingsApi;
class CommonSettingsService {
  async GetSettings() {
    try {
      const res = await axiosInstance.get("v1/settings/common");
      return res.data;
    } catch (e) {
      throw new Error(`Error: ${e}`);
    }
  }
  async SaveSettings(params) {
    try {
      const res = await axiosInstance.post("v1/settings/common", params);
      return res.data;
    } catch (e) {
      throw new Error(`Error: ${e}`);
    }
  }
}
const commonSettingsApiArea = () => new CommonSettingsService();
const DEFAULT_MODULE_ID = "0";
const LOCAL_STORE = {
  events: "events",
  filters: "filters"
};
const getLocalStorageData = (key, value) => {
  const data = window.localStorage.getItem(key);
  return data ? JSON.parse(data) : value;
};
const initialState = {
  isLoading: true,
  events: getLocalStorageData(LOCAL_STORE.events, []),
  filters: getLocalStorageData(LOCAL_STORE.filters, {
    name: "",
    module: DEFAULT_MODULE_ID
  })
};
const eventsTrail = createSlice$1({
  name: "eventsTrail",
  initialState,
  reducers: {
    setIsLoading(state, action) {
      state.isLoading = action.payload;
    },
    setEvents(state, action) {
      state.events = action.payload;
    },
    setFilters(state, action) {
      state.filters = action.payload;
    }
  }
});
const {
  setEvents,
  setFilters,
  setIsLoading
} = eventsTrail.actions;
const LoadEvents = async () => {
  commonSettingsApiArea().GetSettings().then((data) => store.dispatch(setEvents(data))).finally(() => store.dispatch(setIsLoading(false)));
};
const LoadEventsWithOutLoadingStatus = async () => {
  commonSettingsApiArea().GetSettings().then((data) => store.dispatch(setEvents(data)));
};
const actions$1 = {
  ...eventsTrail.actions,
  LoadEventsWithOutLoadingStatus,
  LoadEvents
};
const useEventsTrailSlice = () => {
  return {
    actions: actions$1,
    useIsLoading: () => useCreateUseState((state) => state.eventsTrail.isLoading, (isLoading) => setIsLoading(isLoading)),
    useEvents: () => useCreateUseState((state) => state.eventsTrail.events, (events) => setEvents(events), LOCAL_STORE.events),
    useFilters: () => useCreateUseState((state) => state.eventsTrail.filters, (filters2) => setFilters(filters2), LOCAL_STORE.filters)
  };
};
const eventsTrailReducer = eventsTrail.reducer;
const store = configureStore({
  reducer: {
    [authApi.reducerPath]: authApi.reducer,
    [registerApi.reducerPath]: registerApi.reducer,
    [usersApi.reducerPath]: usersApi.reducer,
    [userApi.reducerPath]: userApi.reducer,
    [directoriesApi.reducerPath]: directoriesApi.reducer,
    [emailApi.reducerPath]: emailApi.reducer,
    [groupsApi.reducerPath]: groupsApi.reducer,
    [quotasApi.reducerPath]: quotasApi.reducer,
    [modulesApi.reducerPath]: modulesApi.reducer,
    [statisticsApi.reducerPath]: statisticsApi.reducer,
    [filialsApi.reducerPath]: filialsApi.reducer,
    [rolesApi.reducerPath]: rolesApi.reducer,
    [commonSettingsApi.reducerPath]: commonSettingsApi.reducer,
    [licensesApi.reducerPath]: licensesApi.reducer,
    ...uiKitApiReducers,
    // src-new
    [notificationSettingsApi.reducerPath]: notificationSettingsApi.reducer,
    userInfo: userInfoReducer,
    users: usersReducer,
    filials: filialsReducer,
    roles: rolesReducer,
    directories: directoriesReducer,
    groups: groupsReducer,
    quotas: quotasReducer,
    statistics: statisticsReducer,
    commonSettings: commonSettingsReducer,
    licenses: licensesReducer,
    homeWidget: homeWidgetReducer,
    eventsTrail: eventsTrailReducer
  },
  middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(
    authApi.middleware,
    registerApi.middleware,
    usersApi.middleware,
    userApi.middleware,
    directoriesApi.middleware,
    emailApi.middleware,
    groupsApi.middleware,
    quotasApi.middleware,
    modulesApi.middleware,
    statisticsApi.middleware,
    errorHandlingMiddleware,
    filialsApi.middleware,
    rolesApi.middleware,
    commonSettingsApi.middleware,
    licensesApi.middleware,
    ...uiKitApiMiddlewares,
    // src-new
    notificationSettingsApi.middleware
  )
});
setupListeners(store.dispatch);
const axiosInstance = axios.create({
  baseURL: BASE_URL$1
});
axiosInstance.interceptors.request.use((config) => {
  var _a2;
  const token = (_a2 = store.getState().userInfo.Tokens) == null ? void 0 : _a2.AuthToken;
  config.headers.authorization = token;
  return config;
});
axiosInstance.interceptors.response.use((response) => response, (error) => {
  if (error.response) {
    const {
      statusText,
      status,
      data: {
        Response
      }
    } = error.response;
    switch (status) {
      case 400:
        showNotification({
          title: `${statusText} ${status}`,
          message: objectToString(Response),
          autoClose: true,
          color: "red"
        });
        break;
      case 401:
        store.dispatch(userInfoActions.setUserTokens({}));
        store.dispatch(userInfoActions.setUserInfo({}));
        if (window.location.pathname !== "/login") {
          window.location.href = "/login";
        }
        break;
      case 502:
        showNotification({
          title: "Ошибка",
          message: "Технические работы на сервере",
          autoClose: true,
          color: "red"
        });
        break;
    }
  }
  return Promise.reject(error);
});
const useImageUrl = (url) => {
  const [blobUrl, setBlobUrl] = reactExports.useState(null);
  reactExports.useEffect(() => {
    if (!url || url.startsWith("data:") || url.startsWith("blob:")) {
      setBlobUrl(url || null);
      return;
    }
    if (!url.includes("/api/")) {
      setBlobUrl(url);
      return;
    }
    let objectUrl = null;
    let isCancelled = false;
    const loadImage = async () => {
      try {
        let urlPath = url.includes("://") ? new URL(url).pathname + new URL(url).search : url;
        if (urlPath.startsWith("/api/")) {
          urlPath = urlPath.substring(4);
        }
        const response = await axiosInstance.get(urlPath, {
          responseType: "blob"
        });
        if (isCancelled) return;
        const blobText = await response.data.slice(0, 500).text();
        const isSVG = blobText.trim().startsWith("<svg");
        const isImage = response.data.type.startsWith("image/") || isSVG || response.data.type === "application/octet-stream";
        if (!isImage) {
          setBlobUrl(null);
          return;
        }
        let finalBlob = response.data;
        if (isSVG && response.data.type !== "image/svg+xml") {
          const fullText = await response.data.text();
          finalBlob = new Blob([fullText], {
            type: "image/svg+xml"
          });
        }
        objectUrl = URL.createObjectURL(finalBlob);
        setBlobUrl(objectUrl);
      } catch (error) {
        setBlobUrl(null);
      }
    };
    loadImage();
    return () => {
      isCancelled = true;
      if (objectUrl) {
        URL.revokeObjectURL(objectUrl);
      }
    };
  }, [url]);
  return blobUrl;
};
const LinkItem = (t0) => {
  const $ = compilerRuntimeExports.c(19);
  const {
    item,
    index
  } = t0;
  const iconUrl = useImageUrl(item.iconSrc || null);
  const isLoading = !!item.iconSrc && !iconUrl;
  const spanRef = reactExports.useRef(null);
  const [tooltipOpened, setTooltipOpened] = reactExports.useState(false);
  let t1;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t1 = () => {
      const el = spanRef.current;
      if (el) {
        setTooltipOpened(el.scrollWidth > el.offsetWidth);
      }
    };
    $[0] = t1;
  } else {
    t1 = $[0];
  }
  const handleMouseEnter = t1;
  const t2 = item.url || void 0;
  const t3 = !item.url;
  let t4;
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
    t4 = {
      itemLabel: {
        minWidth: 0,
        overflow: "hidden"
      }
    };
    $[1] = t4;
  } else {
    t4 = $[1];
  }
  let t5;
  if ($[2] !== iconUrl || $[3] !== isLoading) {
    t5 = isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, { size: 20 }) : iconUrl ? /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "img", src: iconUrl, w: 24, h: 24, style: {
      objectFit: "contain",
      flexShrink: 0
    } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(NoImage, { stroke: themeColors.brandGray[0] });
    $[2] = iconUrl;
    $[3] = isLoading;
    $[4] = t5;
  } else {
    t5 = $[4];
  }
  let t6;
  let t7;
  if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
    t6 = () => setTooltipOpened(false);
    t7 = {
      overflow: "hidden",
      textOverflow: "ellipsis",
      whiteSpace: "nowrap",
      display: "block"
    };
    $[5] = t6;
    $[6] = t7;
  } else {
    t6 = $[5];
    t7 = $[6];
  }
  let t8;
  if ($[7] !== item.label) {
    t8 = /* @__PURE__ */ jsxRuntimeExports.jsx("span", { ref: spanRef, onMouseEnter: handleMouseEnter, onMouseLeave: t6, style: t7, children: item.label });
    $[7] = item.label;
    $[8] = t8;
  } else {
    t8 = $[8];
  }
  let t9;
  if ($[9] !== item.label || $[10] !== t8 || $[11] !== tooltipOpened) {
    t9 = /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { label: item.label, opened: tooltipOpened, withinPortal: true, zIndex: 1003, withArrow: true, multiline: true, maw: 240, children: t8 });
    $[9] = item.label;
    $[10] = t8;
    $[11] = tooltipOpened;
    $[12] = t9;
  } else {
    t9 = $[12];
  }
  let t10;
  if ($[13] !== index || $[14] !== t2 || $[15] !== t3 || $[16] !== t5 || $[17] !== t9) {
    t10 = /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { component: "a", href: t2, fz: 16, px: "sm", my: "4px", target: "_blank", disabled: t3, styles: t4, leftSection: t5, children: t9 }, index);
    $[13] = index;
    $[14] = t2;
    $[15] = t3;
    $[16] = t5;
    $[17] = t9;
    $[18] = t10;
  } else {
    t10 = $[18];
  }
  return t10;
};
const LinksDialog = (props) => {
  const $ = compilerRuntimeExports.c(4);
  let t0;
  if ($[0] !== props.links) {
    t0 = props.links.filter(_temp$a).map(_temp2$4);
    $[0] = props.links;
    $[1] = t0;
  } else {
    t0 = $[1];
  }
  let t1;
  if ($[2] !== t0) {
    t1 = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: t0 });
    $[2] = t0;
    $[3] = t1;
  } else {
    t1 = $[3];
  }
  return t1;
};
function _temp$a(item) {
  return item.label;
}
function _temp2$4(item_0, index) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(LinkItem, { item: item_0, index }, index);
}
const AppsMenu = () => {
  const $ = compilerRuntimeExports.c(42);
  const {
    t: t2
  } = useTranslation();
  const {
    classes: classes2
  } = useStyles$5();
  const [linksOpen, setLinksOpen] = r.useState(false);
  const closeTimerRef = r.useRef(null);
  let t0;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t0 = () => {
      if (closeTimerRef.current) {
        clearTimeout(closeTimerRef.current);
        closeTimerRef.current = null;
      }
      setLinksOpen(true);
    };
    $[0] = t0;
  } else {
    t0 = $[0];
  }
  const handleLinksEnter = t0;
  let t1;
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
    t1 = () => {
      closeTimerRef.current = setTimeout(() => setLinksOpen(false), 150);
    };
    $[1] = t1;
  } else {
    t1 = $[1];
  }
  const handleLinksLeave = t1;
  const modules2 = useAppSelector(_temp$9);
  let T0;
  let T1;
  let hasLinks;
  let links;
  let t10;
  let t22;
  let t3;
  let t4;
  let t5;
  let t6;
  let t7;
  let t8;
  let t9;
  if ($[2] !== classes2 || $[3] !== modules2) {
    t10 = Symbol.for("react.early_return_sentinel");
    bb0: {
      const menu2 = modules2 ? getMenu(modules2) : [];
      if (!menu2) {
        t10 = null;
        break bb0;
      }
      const modulesItems = menu2.filter(_temp2$3);
      hasLinks = menu2.some(_temp3$1);
      links = menu2.filter(_temp4);
      T1 = Menu;
      t4 = "bottom-end";
      t5 = "sm";
      t6 = 1001;
      t7 = 8;
      if ($[17] !== classes2.dropdown || $[18] !== classes2.itemIcon || $[19] !== classes2.itemLabel || $[20] !== classes2.menuItem) {
        t8 = {
          dropdown: classes2.dropdown,
          item: classes2.menuItem,
          itemLabel: classes2.itemLabel,
          itemSection: classes2.itemIcon
        };
        $[17] = classes2.dropdown;
        $[18] = classes2.itemIcon;
        $[19] = classes2.itemLabel;
        $[20] = classes2.menuItem;
        $[21] = t8;
      } else {
        t8 = $[21];
      }
      if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
        t9 = /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Target, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActionIcon, { size: 26, children: /* @__PURE__ */ jsxRuntimeExports.jsx(g5, { size: 26 }) }) });
        $[22] = t9;
      } else {
        t9 = $[22];
      }
      T0 = Menu.Dropdown;
      t22 = 260;
      t3 = modulesItems.filter(_temp5).map(_temp6);
    }
    $[2] = classes2;
    $[3] = modules2;
    $[4] = T0;
    $[5] = T1;
    $[6] = hasLinks;
    $[7] = links;
    $[8] = t10;
    $[9] = t22;
    $[10] = t3;
    $[11] = t4;
    $[12] = t5;
    $[13] = t6;
    $[14] = t7;
    $[15] = t8;
    $[16] = t9;
  } else {
    T0 = $[4];
    T1 = $[5];
    hasLinks = $[6];
    links = $[7];
    t10 = $[8];
    t22 = $[9];
    t3 = $[10];
    t4 = $[11];
    t5 = $[12];
    t6 = $[13];
    t7 = $[14];
    t8 = $[15];
    t9 = $[16];
  }
  if (t10 !== Symbol.for("react.early_return_sentinel")) {
    return t10;
  }
  let t11;
  if ($[23] !== hasLinks || $[24] !== links || $[25] !== linksOpen || $[26] !== t2) {
    t11 = hasLinks && /* @__PURE__ */ jsxRuntimeExports.jsxs(Popover, { opened: linksOpen, position: "left-start", withinPortal: true, zIndex: 1002, shadow: "xs", offset: {
      mainAxis: 10,
      crossAxis: 0
    }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Popover.Target, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: {
        width: "100%"
      }, onMouseEnter: handleLinksEnter, onMouseLeave: handleLinksLeave, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { fz: 16, px: "sm", w: "100%", my: "4px", leftSection: /* @__PURE__ */ jsxRuntimeExports.jsx(IconLayersLinked, { stroke: themeColors.brandGray[0] }), children: t2("appsMenu.links") }) }) }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Popover.Dropdown, { style: {
        padding: 0,
        maxWidth: 250
      }, onMouseEnter: handleLinksEnter, onMouseLeave: handleLinksLeave, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LinksDialog, { links }) })
    ] });
    $[23] = hasLinks;
    $[24] = links;
    $[25] = linksOpen;
    $[26] = t2;
    $[27] = t11;
  } else {
    t11 = $[27];
  }
  let t12;
  if ($[28] !== T0 || $[29] !== t11 || $[30] !== t22 || $[31] !== t3) {
    t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(T0, { w: t22, children: [
      t3,
      t11
    ] });
    $[28] = T0;
    $[29] = t11;
    $[30] = t22;
    $[31] = t3;
    $[32] = t12;
  } else {
    t12 = $[32];
  }
  let t13;
  if ($[33] !== T1 || $[34] !== t12 || $[35] !== t4 || $[36] !== t5 || $[37] !== t6 || $[38] !== t7 || $[39] !== t8 || $[40] !== t9) {
    t13 = /* @__PURE__ */ jsxRuntimeExports.jsxs(T1, { position: t4, shadow: t5, zIndex: t6, radius: t7, classNames: t8, children: [
      t9,
      t12
    ] });
    $[33] = T1;
    $[34] = t12;
    $[35] = t4;
    $[36] = t5;
    $[37] = t6;
    $[38] = t7;
    $[39] = t8;
    $[40] = t9;
    $[41] = t13;
  } else {
    t13 = $[41];
  }
  return t13;
};
function _temp$9(state) {
  var _a2;
  return (_a2 = state.userInfo.Settings) == null ? void 0 : _a2.ModuleSettings;
}
function _temp2$3(i) {
  return i.tailType === TailType.Module || i.tailType === TailType.Integration;
}
function _temp3$1(i_0) {
  return i_0.tailType === TailType.Link;
}
function _temp4(i_1) {
  return i_1.tailType === TailType.Link;
}
function _temp5(item) {
  return item.label;
}
function _temp6(item_0, index) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { component: "a", href: item_0.url || void 0, fz: 16, px: "sm", my: "4px", target: "_blank", leftSection: item_0.iconSrc ? /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "img", src: item_0.iconSrc, height: 24 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(NoImage, { stroke: themeColors.brandGray[0] }), children: item_0.label }, index);
}
const actions = {
  ...userInfoActions,
  ...usersActions,
  ...directoriesActions,
  ...groupsActions,
  ...quotasActions,
  ...statisticsActions,
  ...filialsActions,
  ...rolesActions,
  ...commonSettingsActions,
  ...licensesActions
};
const useActions = () => {
  const $ = compilerRuntimeExports.c(2);
  const dispatch = useDispatch$1();
  let t0;
  if ($[0] !== dispatch) {
    t0 = bindActionCreators(actions, dispatch);
    $[0] = dispatch;
    $[1] = t0;
  } else {
    t0 = $[1];
  }
  return t0;
};
const useStyles$4 = createStyles(() => ({
  truncate: {
    maxWidth: "250px",
    whiteSpace: "nowrap",
    overflow: "hidden",
    textOverflow: "ellipsis",
    wordWrap: "break-word"
  },
  dropdown: {
    padding: 0,
    marginTop: "5px"
  },
  menuItem: {
    padding: "6px 0",
    alignItems: "center"
  },
  itemLabel: {
    fontSize: "16px",
    alignItems: "center"
  },
  itemIcon: {
    marginRight: "11px"
  }
}));
function mapUser(user, userId, src) {
  if (!user) return null;
  if (!userId && !(user == null ? void 0 : user.Id)) return null;
  return {
    id: user.Id || Number(userId),
    email: user.Email || "",
    fullName: user.Name || "",
    firstName: user.FirstName || "",
    middleName: user.MiddleName || "",
    lastName: user.SurName || user.Surname || "",
    avatarUrl: src || ""
  };
}
const UserAvatar = ({
  user,
  src,
  userId,
  notClickable,
  ref,
  ...props
}) => {
  const mappedUser = mapUser(user, userId == null ? void 0 : userId.toString(), src || "") || null;
  const fallback = `${(user == null ? void 0 : user.SurName) || (user == null ? void 0 : user.Surname) || ""} ${(user == null ? void 0 : user.FirstName) || ""}`.trim();
  return /* @__PURE__ */ jsxRuntimeExports.jsx(UserAvatar$1, { user: mappedUser, fallback, fallbackSrc: src || "", ref, avatarProps: {
    style: {
      cursor: notClickable ? "default" : "pointer"
    },
    ...props
  } });
};
UserAvatar.displayName = "UserAvatar";
const UserMenu = (t0) => {
  const $ = compilerRuntimeExports.c(65);
  const {
    user
  } = t0;
  const navigate = useNavigate();
  const {
    classes: classes2
  } = useStyles$4();
  const {
    t: t2
  } = useTranslation();
  const {
    setUserInfo,
    setUserTokens,
    setSelectedAllUsers
  } = useActions();
  const [fetchLogout] = useLazyLogoutQuery();
  const {
    Settings: Settings2
  } = useAppSelector(_temp$8);
  const currentUser = useAppSelector(_temp2$2);
  let t1;
  if ($[0] !== fetchLogout || $[1] !== navigate || $[2] !== setSelectedAllUsers || $[3] !== setUserInfo || $[4] !== setUserTokens) {
    t1 = async () => {
      setUserInfo({});
      setUserTokens({});
      setSelectedAllUsers([]);
      navigate("/login");
      await fetchLogout();
    };
    $[0] = fetchLogout;
    $[1] = navigate;
    $[2] = setSelectedAllUsers;
    $[3] = setUserInfo;
    $[4] = setUserTokens;
    $[5] = t1;
  } else {
    t1 = $[5];
  }
  const handleLogout = t1;
  const avatarSrc = (user == null ? void 0 : user.HasAvatar) ? `/api/v2/profile/getAvatar?id=${user.Id}${user.AvatarKey ? `&key=${user.AvatarKey}` : ""}` : "";
  let t22;
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
    t22 = {
      transition: "pop-top-right",
      duration: 150
    };
    $[6] = t22;
  } else {
    t22 = $[6];
  }
  let t3;
  if ($[7] !== classes2.dropdown || $[8] !== classes2.itemIcon || $[9] !== classes2.itemLabel || $[10] !== classes2.menuItem) {
    t3 = {
      dropdown: classes2.dropdown,
      item: classes2.menuItem,
      itemLabel: classes2.itemLabel,
      itemSection: classes2.itemIcon
    };
    $[7] = classes2.dropdown;
    $[8] = classes2.itemIcon;
    $[9] = classes2.itemLabel;
    $[10] = classes2.menuItem;
    $[11] = t3;
  } else {
    t3 = $[11];
  }
  let t4;
  if ($[12] !== avatarSrc || $[13] !== user) {
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Target, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(UserAvatar, { "data-cy": "profileAvatar", user, src: avatarSrc, size: 36 }) });
    $[12] = avatarSrc;
    $[13] = user;
    $[14] = t4;
  } else {
    t4 = $[14];
  }
  const t5 = (user == null ? void 0 : user.HasAvatar) ? `/api/v2/profile/getAvatar?id=${user.Id}` : null;
  let t6;
  if ($[15] !== t5 || $[16] !== user) {
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsx(UserAvatar, { user, src: t5, size: 50 });
    $[15] = t5;
    $[16] = user;
    $[17] = t6;
  } else {
    t6 = $[17];
  }
  const t7 = user.Surname ?? "-";
  const t8 = user.FirstName ?? "-";
  let t9;
  if ($[18] !== classes2.truncate || $[19] !== t7 || $[20] !== t8) {
    t9 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { fz: 18, className: classes2.truncate, children: [
      t7,
      " ",
      t8
    ] });
    $[18] = classes2.truncate;
    $[19] = t7;
    $[20] = t8;
    $[21] = t9;
  } else {
    t9 = $[21];
  }
  let t10;
  if ($[22] !== classes2.truncate || $[23] !== user.Email) {
    t10 = /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { fz: 14, c: "dimmed", className: classes2.truncate, children: user.Email });
    $[22] = classes2.truncate;
    $[23] = user.Email;
    $[24] = t10;
  } else {
    t10 = $[24];
  }
  let t11;
  if ($[25] !== t10 || $[26] !== t9) {
    t11 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { gap: 0, children: [
      t9,
      t10
    ] });
    $[25] = t10;
    $[26] = t9;
    $[27] = t11;
  } else {
    t11 = $[27];
  }
  let t12;
  if ($[28] !== t11 || $[29] !== t6) {
    t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { p: "8px 12px 0 24px", pt: 6, gap: 12, children: [
      t6,
      t11
    ] });
    $[28] = t11;
    $[29] = t6;
    $[30] = t12;
  } else {
    t12 = $[30];
  }
  let t13;
  if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
    t13 = /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Divider, { m: "12px 0", color: "#DEE2E6" });
    $[31] = t13;
  } else {
    t13 = $[31];
  }
  let t14;
  if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
    t14 = /* @__PURE__ */ jsxRuntimeExports.jsx(LHe, { stroke: 1.2, size: 24 });
    $[32] = t14;
  } else {
    t14 = $[32];
  }
  let t15;
  if ($[33] !== t2) {
    t15 = t2("home");
    $[33] = t2;
    $[34] = t15;
  } else {
    t15 = $[34];
  }
  let t16;
  if ($[35] !== t15) {
    t16 = /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { component: "a", "data-cy": "homePageBtn", leftSection: t14, px: "sm", my: "4px", href: ROUTES.dashboard.fullPath, target: "_blank", children: t15 });
    $[35] = t15;
    $[36] = t16;
  } else {
    t16 = $[36];
  }
  let t17;
  if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
    t17 = /* @__PURE__ */ jsxRuntimeExports.jsx(RQe, { stroke: 1.2, size: 24 });
    $[37] = t17;
  } else {
    t17 = $[37];
  }
  const t18 = `/profile/${user.Id}`;
  let t19;
  if ($[38] !== t2) {
    t19 = t2("profil");
    $[38] = t2;
    $[39] = t19;
  } else {
    t19 = $[39];
  }
  let t20;
  if ($[40] !== t18 || $[41] !== t19) {
    t20 = /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { component: "a", "data-cy": "profileBtn", leftSection: t17, px: "sm", my: "4px", href: t18, target: "_blank", children: t19 });
    $[40] = t18;
    $[41] = t19;
    $[42] = t20;
  } else {
    t20 = $[42];
  }
  let t21;
  if ($[43] !== Settings2 || $[44] !== currentUser || $[45] !== t2) {
    t21 = isSaaS(Settings2) && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      isAdmin(currentUser) && /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { component: "a", "data-cy": "paymentBtn", leftSection: /* @__PURE__ */ jsxRuntimeExports.jsx(xN, { stroke: 1.2, size: 24 }), px: "sm", my: "4px", target: "_blank", href: "https://payments.r7.ru", children: t2("tarif") }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { component: "a", "data-cy": "downloadBtn", leftSection: /* @__PURE__ */ jsxRuntimeExports.jsx(GT, { stroke: 1.2, size: 24 }), px: "sm", my: "4px", target: "_blank", href: "https://preview.r7.ru", children: t2("download") }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { component: "a", "data-cy": "feedbackBtn", leftSection: /* @__PURE__ */ jsxRuntimeExports.jsx(qC, { stroke: 1.2, size: 24 }), px: "sm", my: "4px", target: "_blank", href: "https://r7.ru/feedback", children: t2("reportError") })
    ] });
    $[43] = Settings2;
    $[44] = currentUser;
    $[45] = t2;
    $[46] = t21;
  } else {
    t21 = $[46];
  }
  let t222;
  if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
    t222 = /* @__PURE__ */ jsxRuntimeExports.jsx(Gie, { stroke: 1.2, size: 24 });
    $[47] = t222;
  } else {
    t222 = $[47];
  }
  let t23;
  if ($[48] !== t2) {
    t23 = t2("exit");
    $[48] = t2;
    $[49] = t23;
  } else {
    t23 = $[49];
  }
  let t24;
  if ($[50] !== handleLogout || $[51] !== t23) {
    t24 = /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Item, { component: "a", "data-cy": "logoutBtn", onClick: handleLogout, leftSection: t222, px: "sm", my: "4px", children: t23 });
    $[50] = handleLogout;
    $[51] = t23;
    $[52] = t24;
  } else {
    t24 = $[52];
  }
  let t25;
  if ($[53] !== t16 || $[54] !== t20 || $[55] !== t21 || $[56] !== t24) {
    t25 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { px: "8px", pb: "8px", children: [
      t16,
      t20,
      t21,
      t24
    ] });
    $[53] = t16;
    $[54] = t20;
    $[55] = t21;
    $[56] = t24;
    $[57] = t25;
  } else {
    t25 = $[57];
  }
  let t26;
  if ($[58] !== t12 || $[59] !== t25) {
    t26 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu.Dropdown, { miw: 320, maw: 400, children: [
      t12,
      t13,
      t25
    ] });
    $[58] = t12;
    $[59] = t25;
    $[60] = t26;
  } else {
    t26 = $[60];
  }
  let t27;
  if ($[61] !== t26 || $[62] !== t3 || $[63] !== t4) {
    t27 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu, { position: "bottom-end", shadow: "sm", transitionProps: t22, zIndex: 10001, radius: 8, classNames: t3, children: [
      t4,
      t26
    ] });
    $[61] = t26;
    $[62] = t3;
    $[63] = t4;
    $[64] = t27;
  } else {
    t27 = $[64];
  }
  return t27;
};
function _temp$8(state) {
  return state.userInfo;
}
function _temp2$2(state_0) {
  return state_0.userInfo.User;
}
var IUsersSortField = /* @__PURE__ */ ((IUsersSortField2) => {
  IUsersSortField2[IUsersSortField2["None"] = 0] = "None";
  IUsersSortField2[IUsersSortField2["Name"] = 1] = "Name";
  IUsersSortField2[IUsersSortField2["UserType"] = 2] = "UserType";
  IUsersSortField2[IUsersSortField2["Department"] = 3] = "Department";
  IUsersSortField2[IUsersSortField2["Email"] = 4] = "Email";
  IUsersSortField2[IUsersSortField2["Phone"] = 5] = "Phone";
  IUsersSortField2[IUsersSortField2["BirthDate"] = 6] = "BirthDate";
  IUsersSortField2[IUsersSortField2["DateOfCreate"] = 7] = "DateOfCreate";
  IUsersSortField2[IUsersSortField2["LastVisitDate"] = 8] = "LastVisitDate";
  IUsersSortField2[IUsersSortField2["Status"] = 9] = "Status";
  IUsersSortField2[IUsersSortField2["QuotaName"] = 10] = "QuotaName";
  IUsersSortField2[IUsersSortField2["QuotaSize"] = 11] = "QuotaSize";
  IUsersSortField2[IUsersSortField2["UsingQuotaSize"] = 12] = "UsingQuotaSize";
  IUsersSortField2[IUsersSortField2["Login"] = 13] = "Login";
  IUsersSortField2[IUsersSortField2["Customer"] = 14] = "Customer";
  IUsersSortField2[IUsersSortField2["LDAP"] = 20] = "LDAP";
  IUsersSortField2[IUsersSortField2["SSO"] = 21] = "SSO";
  return IUsersSortField2;
})(IUsersSortField || {});
var IDiskSpaceSortField = /* @__PURE__ */ ((IDiskSpaceSortField2) => {
  IDiskSpaceSortField2[IDiskSpaceSortField2["None"] = 0] = "None";
  IDiskSpaceSortField2[IDiskSpaceSortField2["Name"] = 1] = "Name";
  IDiskSpaceSortField2[IDiskSpaceSortField2["Space"] = 4] = "Space";
  IDiskSpaceSortField2[IDiskSpaceSortField2["DocsCount"] = 3] = "DocsCount";
  IDiskSpaceSortField2[IDiskSpaceSortField2["FilesCount"] = 2] = "FilesCount";
  return IDiskSpaceSortField2;
})(IDiskSpaceSortField || {});
var IUserActivitySortField = /* @__PURE__ */ ((IUserActivitySortField2) => {
  IUserActivitySortField2[IUserActivitySortField2["None"] = 0] = "None";
  IUserActivitySortField2[IUserActivitySortField2["Date"] = 1] = "Date";
  IUserActivitySortField2[IUserActivitySortField2["Visitors"] = 2] = "Visitors";
  IUserActivitySortField2[IUserActivitySortField2["Auths"] = 3] = "Auths";
  IUserActivitySortField2[IUserActivitySortField2["Documents"] = 4] = "Documents";
  IUserActivitySortField2[IUserActivitySortField2["Files"] = 5] = "Files";
  return IUserActivitySortField2;
})(IUserActivitySortField || {});
var SettingsEnum = /* @__PURE__ */ ((SettingsEnum2) => {
  SettingsEnum2[SettingsEnum2["None"] = 0] = "None";
  SettingsEnum2[SettingsEnum2["UserIp"] = 1] = "UserIp";
  SettingsEnum2[SettingsEnum2["AdminIp"] = 2] = "AdminIp";
  SettingsEnum2[SettingsEnum2["SessionDuration"] = 3] = "SessionDuration";
  SettingsEnum2[SettingsEnum2["PassEnterCount"] = 4] = "PassEnterCount";
  SettingsEnum2[SettingsEnum2["Ldap"] = 5] = "Ldap";
  SettingsEnum2[SettingsEnum2["Smtp"] = 6] = "Smtp";
  SettingsEnum2[SettingsEnum2["PasswordSecurity"] = 7] = "PasswordSecurity";
  SettingsEnum2[SettingsEnum2["QuotaRules"] = 8] = "QuotaRules";
  SettingsEnum2[SettingsEnum2["Culture"] = 9] = "Culture";
  SettingsEnum2[SettingsEnum2["ExternalLinkRules"] = 10] = "ExternalLinkRules";
  SettingsEnum2[SettingsEnum2["RoomsAccess"] = 11] = "RoomsAccess";
  SettingsEnum2[SettingsEnum2["ExportUserActionsSettings"] = 12] = "ExportUserActionsSettings";
  SettingsEnum2[SettingsEnum2["StorageConfigurationSettings"] = 13] = "StorageConfigurationSettings";
  SettingsEnum2[SettingsEnum2["DocVersionsLimit"] = 14] = "DocVersionsLimit";
  return SettingsEnum2;
})(SettingsEnum || {});
function setToEndOFDate(date) {
  return new Date(date.setHours(23, 59, 59, 999)).toISOString();
}
const limitsLengthFilialFields = {
  Title: 128,
  Company: 30
};
const getFilialEditRoutes = () => {
  const {
    fullPath,
    pages
  } = ROUTES.filials.edit;
  return Object.values(pages).map((page) => {
    return Object.values(page).map((route) => ({
      path: `${fullPath}/${route}`,
      chunk: route
    }));
  }).flat();
};
const getIndicatorByUserStatus = (status, t2) => {
  let color, label, fullLabel, colorBadge;
  switch (status) {
    case UserStatusEnum.Ban:
      color = "red";
      label = "B";
      fullLabel = t2("users.indicatorItems.blocked");
      colorBadge = "red";
      break;
    case UserStatusEnum.Deleted:
      color = "transparent";
      label = "🚫";
      fullLabel = t2("users.indicatorItems.deleted");
      colorBadge = "red";
      break;
    case UserStatusEnum.Disabled:
      color = "#6a655f";
      label = "D";
      fullLabel = t2("users.indicatorItems.disabled");
      colorBadge = "dark";
      break;
    case UserStatusEnum.Active:
      color = "#228be6";
      label = "A";
      fullLabel = t2("users.indicatorItems.active");
      colorBadge = "";
      break;
    case UserStatusEnum.Invited:
      color = "#fab005";
      label = "I";
      fullLabel = t2("users.indicatorItems.invited");
      colorBadge = "yellow";
      break;
    default:
      color = "";
      label = "";
      fullLabel = "";
      colorBadge = "";
  }
  return {
    color,
    label,
    fullLabel,
    colorBadge
  };
};
const getColorsByRole = (role) => {
  let color, status;
  switch (role) {
    case RoleTypesEnum$1.User:
      color = "orange";
      status = "USR";
      break;
    case RoleTypesEnum$1.Admin:
      color = "violet";
      status = "ADM";
      break;
    case RoleTypesEnum$1.SuperUser:
      color = "green";
      status = "SUP";
      break;
    case RoleTypesEnum$1.Guest:
      color = "cyan";
      status = "GST";
      break;
    case RoleTypesEnum$1.All:
      color = "indigo";
      status = "ALL";
      break;
    default:
      color = "";
      status = "";
  }
  return {
    color,
    status
  };
};
const getHeaderListByRole = (t2, isSuperAdmin2, isSaaSProduct, isPaymentsAvailable) => {
  const mainHeaderList = [{
    label: t2("review"),
    link: ROUTES.home.fullPath,
    active: false
  }, {
    label: t2("navigation.users"),
    link: ROUTES.users.path,
    active: false
  }, {
    label: t2("navigation.roles"),
    link: ROUTES.roles.path,
    active: false
  }, {
    label: t2("navigation.units"),
    link: ROUTES.filials.path,
    active: false
  }, {
    label: t2("navigation.statistics"),
    link: ROUTES.statistics.fullPath,
    active: false
  }];
  if (isSaaSProduct) {
    mainHeaderList.push({
      label: t2("license.activations"),
      link: ROUTES.activations.fullPath,
      active: false
    });
  }
  if (isSuperAdmin2) {
    mainHeaderList.push({
      label: t2("navigation.commonSettings"),
      link: ROUTES.commonSettings.fullPath,
      active: false
    });
  }
  if (isSaaSProduct && isPaymentsAvailable) {
    mainHeaderList.push({
      label: t2("navigation.manageSubscription"),
      link: ROUTES.subscriptions.fullPath,
      active: false
    });
  }
  return mainHeaderList;
};
const convertToFilterConditions = (activeFilters) => {
  const filterObjects = [];
  for (const [key, value] of Object.entries(activeFilters)) {
    const filterObject = {
      Type: Number(key)
    };
    if (key === "11" || key === "12" || key === "13") {
      const [from, to] = value;
      filterObject.DateRange = {
        From: from.toISOString(),
        To: setToEndOFDate(new Date(to))
      };
    } else if (key === "15") {
      const [from, to] = value;
      filterObject.NumRange = {
        From: from,
        To: to
      };
    } else {
      filterObject.NumValues = value;
    }
    filterObjects.push(filterObject);
  }
  return filterObjects;
};
const transformConditionals = (filters2) => {
  const transformedFilters = {};
  filters2.forEach((filter2) => {
    const {
      Type,
      NumValues,
      DateRange,
      NumRange
    } = filter2;
    if (NumValues) {
      transformedFilters[Type] = NumValues;
    } else if (DateRange) {
      transformedFilters[Type] = [new Date(DateRange == null ? void 0 : DateRange.From), new Date(DateRange == null ? void 0 : DateRange.To)];
    } else if (NumRange) {
      transformedFilters[Type] = [NumRange.From, NumRange.To];
    }
  });
  return transformedFilters;
};
const getActiveFiltersLengths = (activeFilters) => {
  let totalLength = 0;
  Object.entries(activeFilters).forEach(([key, values]) => {
    if (parseInt(key) === 11 || parseInt(key) === 12 || parseInt(key) === 13 || parseInt(key) === 15) {
      totalLength += 1;
    } else {
      totalLength += values.length;
    }
  });
  return totalLength;
};
const transformNumberToUsersSortField = (value) => {
  return value in IUsersSortField ? IUsersSortField[value] : IUsersSortField[IUsersSortField == null ? void 0 : IUsersSortField.None];
};
const transformUsersSortFieldToNumber = (value) => {
  return getValueByKeyForNumberEnum(value);
};
function getValueByKeyForNumberEnum(value) {
  var _a2;
  const valueFromKey = (_a2 = Object.entries(IUsersSortField).find(([key]) => key === value)) == null ? void 0 : _a2[1];
  return typeof valueFromKey === "number" && valueFromKey in IUsersSortField ? valueFromKey : IUsersSortField.None;
}
function getUsersIdBySelect(data) {
  const userIds = [];
  data.forEach((customer) => {
    if (customer.HasSettings) {
      customer.Users.forEach((user) => {
        if (user.isChecked && !user.isDisabled) {
          userIds.push(user.id);
        }
      });
    }
  });
  return userIds;
}
const getFilterAttributeByKey = (value) => {
  const keys = Object.keys(IFiltersEnumType);
  for (const key of keys) {
    if (IFiltersEnumType[key] === value) {
      return pascalToCamel(key);
    }
  }
};
const useStyles$3 = createStyles((theme2, _, utils2) => ({
  root: {
    height: "100%",
    width: "100%",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    flexDirection: "column",
    margin: 0,
    marginTop: HEADER_HEIGHT,
    backgroundColor: theme2.colors.backgroundGray[0]
  },
  main: {
    width: "100%",
    display: "flex",
    alignItems: "flex-start",
    justifyContent: "space-between",
    flexDirection: "row",
    backgroundColor: theme2.colors.backgroundGray[0]
  },
  avatar: {
    cursor: "pointer"
  },
  user: {
    [utils2.dark]: {
      color: theme2.colors.dark[0]
    },
    [utils2.light]: {
      color: theme2.black
    },
    borderRadius: theme2.radius.sm,
    transition: "background-color 100ms ease",
    "&:hover": {
      [utils2.dark]: {
        backgroundColor: theme2.colors.dark[8]
      },
      [utils2.light]: {
        backgroundColor: theme2.white
      }
    }
  },
  userActive: {
    [utils2.dark]: {
      backgroundColor: theme2.colors.dark[8]
    },
    [utils2.light]: {
      backgroundColor: theme2.white
    }
  },
  account: {
    cursor: "pointer"
  },
  nickname: {
    [utils2.smallerThan("xs")]: {
      display: "none"
    }
  }
}));
const Layout = (t0) => {
  const $ = compilerRuntimeExports.c(16);
  const {
    children,
    withoutNavigation: t1,
    leftNavbarContent,
    rightNavbarContent
  } = t0;
  const withoutNavigation = t1 === void 0 ? false : t1;
  const {
    t: t2
  } = useTranslation();
  const {
    classes: classes2
  } = useStyles$3();
  const {
    User,
    Settings: Settings2
  } = useAppSelector(_temp$7);
  const isSuperUser = isSuperAdmin(User);
  const isSaaSProduct = isSaaS(Settings2);
  const modules2 = useAppSelector(_temp2$1);
  const paymentModule = Array.isArray(modules2) ? modules2.find(_temp3) : void 0;
  const isPaymentsAvailable = (paymentModule == null ? void 0 : paymentModule.HasAccess) ?? false;
  let t22;
  if ($[0] !== User) {
    t22 = !User ? null : /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { gap: "xs", style: {
      flexShrink: 0
    }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationBellWidget, {}),
      /* @__PURE__ */ jsxRuntimeExports.jsx(AppsMenu, {}),
      /* @__PURE__ */ jsxRuntimeExports.jsx(UserMenu, { user: User })
    ] });
    $[0] = User;
    $[1] = t22;
  } else {
    t22 = $[1];
  }
  const rightSection = t22;
  const T0 = Box;
  const T1 = MainHeader;
  const t3 = withoutNavigation ? [] : getHeaderListByRole(t2, isSuperUser, isSaaSProduct, isPaymentsAvailable);
  let t4;
  if ($[2] !== T1 || $[3] !== rightSection || $[4] !== t3) {
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(T1, { list: t3, rightSection });
    $[2] = T1;
    $[3] = rightSection;
    $[4] = t3;
    $[5] = t4;
  } else {
    t4 = $[5];
  }
  let t5;
  if ($[6] !== children || $[7] !== classes2.main || $[8] !== leftNavbarContent || $[9] !== rightNavbarContent) {
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { className: classes2.main, children: [
      leftNavbarContent,
      children,
      rightNavbarContent
    ] });
    $[6] = children;
    $[7] = classes2.main;
    $[8] = leftNavbarContent;
    $[9] = rightNavbarContent;
    $[10] = t5;
  } else {
    t5 = $[10];
  }
  let t6;
  if ($[11] !== T0 || $[12] !== classes2.root || $[13] !== t4 || $[14] !== t5) {
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsxs(T0, { className: classes2.root, children: [
      t4,
      t5
    ] });
    $[11] = T0;
    $[12] = classes2.root;
    $[13] = t4;
    $[14] = t5;
    $[15] = t6;
  } else {
    t6 = $[15];
  }
  return t6;
};
function _temp$7(state) {
  return state.userInfo;
}
function _temp2$1(state_0) {
  var _a2, _b;
  return (_b = (_a2 = state_0.userInfo.Settings) == null ? void 0 : _a2.ModuleSettings) == null ? void 0 : _b.ModuleUrls;
}
function _temp3(module) {
  return module.Name === "Payments";
}
const styleScroll = {
  scrollbar: {
    "&, &:hover": {
      background: "transparent"
    },
    '&[data-orientation="vertical"] .mantine-ScrollArea-thumb': {
      backgroundColor: "#98A2B3"
    },
    '&[data-orientation="horizontal"] .mantine-ScrollArea-thumb': {
      backgroundColor: "#98A2B3"
    }
  }
};
const ScrollContainer = (t0) => {
  const $ = compilerRuntimeExports.c(6);
  let children;
  let props;
  if ($[0] !== t0) {
    ({
      children,
      ...props
    } = t0);
    $[0] = t0;
    $[1] = children;
    $[2] = props;
  } else {
    children = $[1];
    props = $[2];
  }
  let t1;
  if ($[3] !== children || $[4] !== props) {
    t1 = /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { ...props, styles: styleScroll, children });
    $[3] = children;
    $[4] = props;
    $[5] = t1;
  } else {
    t1 = $[5];
  }
  return t1;
};
const useStyles$2 = createStyles(() => ({
  root: {
    minHeight: `calc(100dvh - ${HEADER_HEIGHT}px)`,
    padding: "40px 0",
    width: "100%",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    wordBreak: "keep-all",
    maxWidth: "510px"
  }
}));
const defaultIcon = "data:image/svg+xml,%3csvg%20width='270'%20height='242'%20viewBox='0%200%20270%20242'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M135.009%20238.485C181.425%20238.485%20219.052%20236.138%20219.052%20233.243C219.052%20230.347%20181.425%20228%20135.009%20228C88.5925%20228%2050.9648%20230.347%2050.9648%20233.243C50.9648%20236.138%2088.5925%20238.485%20135.009%20238.485Z'%20fill='%23F2F2F2'/%3e%3cpath%20d='M239.885%2031.4638C241.124%2031.4638%20242.129%2030.4593%20242.129%2029.2202C242.129%2027.9811%20241.124%2026.9766%20239.885%2026.9766C238.646%2026.9766%20237.642%2027.9811%20237.642%2029.2202C237.642%2030.4593%20238.646%2031.4638%20239.885%2031.4638Z'%20fill='%23CFCFCF'/%3e%3cpath%20d='M90.6411%2012.6708C91.8802%2012.6708%2092.8847%2011.6663%2092.8847%2010.4272C92.8847%209.1881%2091.8802%208.18359%2090.6411%208.18359C89.402%208.18359%2088.3975%209.1881%2088.3975%2010.4272C88.3975%2011.6663%2089.402%2012.6708%2090.6411%2012.6708Z'%20fill='%23CFCFCF'/%3e%3cpath%20d='M114.244%20218.487C115.483%20218.487%20116.487%20217.483%20116.487%20216.244C116.487%20215.004%20115.483%20214%20114.244%20214C113.005%20214%20112%20215.004%20112%20216.244C112%20217.483%20113.005%20218.487%20114.244%20218.487Z'%20fill='%23CFCFCF'/%3e%3cpath%20d='M177.659%201.99805V11.8425'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M172.738%206.92188H182.583'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.9453%2029V38.8444'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12%2033.918H21.8673'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M24.6836%20180.594V190.461'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.7383%20185.518H29.6056'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M243.921%2068V77.8444'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M239%2072.9219H248.844'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M181.899%2098.5964C162.715%2098.5964%20143.233%2097.818%20124.987%2092.7358C107.085%2087.768%2090.6477%2078.13%2075.9962%2066.9811C66.3811%2059.724%2057.6818%2053.9321%2045.2051%2054.802C33.0198%2055.4777%2021.3744%2060.0523%2011.9873%2067.8511C-3.87759%2081.7242%20-1.47382%20107.387%204.84466%20125.427C14.391%20152.601%2043.3507%20171.488%2068.0065%20183.781C96.4625%20197.998%20127.712%20206.194%20159.075%20211.001C186.547%20215.191%20221.825%20218.212%20245.633%20200.287C267.519%20183.804%20273.517%20146.145%20268.16%20120.734C266.853%20113.224%20262.847%20106.451%20256.897%20101.687C241.536%2090.4465%20218.62%2097.9554%20201.358%2098.3217C194.948%2098.5964%20188.447%2098.5964%20181.899%2098.5964Z'%20fill='%23F2F2F2'/%3e%3cpath%20d='M226.483%2051H44.5169C39.8131%2051%2036%2054.8171%2036%2059.5257V184.474C36%20189.183%2039.8131%20193%2044.5169%20193H226.483C231.187%20193%20235%20189.183%20235%20184.474V59.5257C235%2054.8171%20231.187%2051%20226.483%2051Z'%20fill='white'%20stroke='%23BABABA'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M100.598%20129.52H107.798V134.8H100.598V146H94.9984V134.8H65.3984V129.52L86.1984%2090H92.3584L71.5584%20129.52H94.9984V112.4H100.598V129.52ZM150.605%20139.12C146.925%20144.347%20141.725%20146.96%20135.005%20146.96C128.338%20146.96%20123.111%20144.347%20119.325%20139.12C115.645%20133.84%20113.805%20126.8%20113.805%20118C113.805%20109.147%20115.645%20102.133%20119.325%2096.96C123.111%2091.68%20128.338%2089.04%20135.005%2089.04C141.725%2089.04%20146.925%2091.68%20150.605%2096.96C154.338%20102.133%20156.205%20109.147%20156.205%20118C156.205%20126.853%20154.338%20133.893%20150.605%20139.12ZM123.485%20135.36C126.311%20139.467%20130.151%20141.52%20135.005%20141.52C139.911%20141.52%20143.725%20139.467%20146.445%20135.36C149.218%20131.307%20150.605%20125.52%20150.605%20118C150.605%20110.48%20149.218%20104.693%20146.445%20100.64C143.725%2096.5333%20139.911%2094.48%20135.005%2094.48C130.151%2094.48%20126.311%2096.5333%20123.485%20100.64C120.765%20104.747%20119.405%20110.533%20119.405%20118C119.405%20125.467%20120.765%20131.253%20123.485%20135.36ZM197.395%20129.52H204.595V134.8H197.395V146H191.795V134.8H162.195V129.52L182.995%2090H189.155L168.355%20129.52H191.795V112.4H197.395V129.52Z'%20fill='%23D2D2D2'/%3e%3c/svg%3e";
const NotFoundSection = () => {
  const $ = compilerRuntimeExports.c(21);
  const navigate = useNavigate();
  const {
    t: t2
  } = useTranslation();
  const {
    classes: classes2
  } = useStyles$2();
  let t0;
  if ($[0] !== navigate) {
    t0 = () => navigate("/");
    $[0] = navigate;
    $[1] = t0;
  } else {
    t0 = $[1];
  }
  const goMainPage = t0;
  let t1;
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
    t1 = {
      height: "100%",
      width: "100%"
    };
    $[2] = t1;
  } else {
    t1 = $[2];
  }
  const t22 = classes2.root;
  let t3;
  if ($[3] !== t2) {
    t3 = t2("notFound.somethingWrong");
    $[3] = t2;
    $[4] = t3;
  } else {
    t3 = $[4];
  }
  let t4;
  if ($[5] !== t2) {
    t4 = t2("notFound.404");
    $[5] = t2;
    $[6] = t4;
  } else {
    t4 = $[6];
  }
  let t5;
  if ($[7] !== t2) {
    t5 = t2("backMain");
    $[7] = t2;
    $[8] = t5;
  } else {
    t5 = $[8];
  }
  let t6;
  if ($[9] !== goMainPage) {
    t6 = () => goMainPage();
    $[9] = goMainPage;
    $[10] = t6;
  } else {
    t6 = $[10];
  }
  let t7;
  if ($[11] !== t5 || $[12] !== t6) {
    t7 = [{
      buttonText: t5,
      handleClick: t6
    }];
    $[11] = t5;
    $[12] = t6;
    $[13] = t7;
  } else {
    t7 = $[13];
  }
  let t8;
  if ($[14] !== t3 || $[15] !== t4 || $[16] !== t7) {
    t8 = /* @__PURE__ */ jsxRuntimeExports.jsx(NoDataContainer, { title: t3, description: t4, illustration: defaultIcon, buttons: t7 });
    $[14] = t3;
    $[15] = t4;
    $[16] = t7;
    $[17] = t8;
  } else {
    t8 = $[17];
  }
  let t9;
  if ($[18] !== classes2.root || $[19] !== t8) {
    t9 = /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollContainer, { sx: t1, type: "auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { className: t22, children: t8 }) });
    $[18] = classes2.root;
    $[19] = t8;
    $[20] = t9;
  } else {
    t9 = $[20];
  }
  return t9;
};
function NotFound() {
  const $ = compilerRuntimeExports.c(2);
  const currentUser = useAppSelector(_temp$6);
  const isAuthenticated = !!(currentUser == null ? void 0 : currentUser.Id);
  let t0;
  if ($[0] !== isAuthenticated) {
    t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { componentTitle: "404 page", children: isAuthenticated ? /* @__PURE__ */ jsxRuntimeExports.jsx(Layout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(NotFoundSection, {}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(NotFoundSection, {}) });
    $[0] = isAuthenticated;
    $[1] = t0;
  } else {
    t0 = $[1];
  }
  return t0;
}
function _temp$6(state) {
  return state.userInfo.User;
}
const RequireAuth = () => {
  const $ = compilerRuntimeExports.c(5);
  const location2 = useLocation();
  const currentUser = useAppSelector(_temp$5);
  if (!(currentUser == null ? void 0 : currentUser.Id)) {
    let t02;
    if ($[0] !== location2) {
      t02 = /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: "/login", state: {
        from: location2
      }, replace: true });
      $[0] = location2;
      $[1] = t02;
    } else {
      t02 = $[1];
    }
    return t02;
  }
  if (!isAdmin(currentUser) && !location2.pathname.startsWith(ROUTES.profile.path)) {
    let t02;
    if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
      t02 = /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {});
      $[2] = t02;
    } else {
      t02 = $[2];
    }
    let t1;
    if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
      t1 = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        t02,
        " ",
        /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: ROUTES.dashboard.fullPath })
      ] });
      $[3] = t1;
    } else {
      t1 = $[3];
    }
    return t1;
  }
  let t0;
  if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
    t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {});
    $[4] = t0;
  } else {
    t0 = $[4];
  }
  return t0;
};
function _temp$5(state) {
  return state.userInfo.User;
}
const MainPageRote = () => {
  const $ = compilerRuntimeExports.c(3);
  const location2 = useLocation();
  const currentUser = useAppSelector(_temp$4);
  const {
    Settings: Settings2
  } = useAppSelector(_temp2);
  const isFirstLogin = localStorage.getItem("isFirstLogin") === "true";
  const RedirectToDashboard = isFirstLogin && isSaaS(Settings2);
  const RedirectToHome = location2.pathname === "/" && isAdmin(currentUser);
  if (RedirectToDashboard) {
    localStorage.setItem("isFirstLogin", "false");
  }
  if (!isAdmin(currentUser) || RedirectToDashboard) {
    let t02;
    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
      t02 = /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: ROUTES.dashboard.fullPath });
      $[0] = t02;
    } else {
      t02 = $[0];
    }
    return t02;
  } else {
    if (RedirectToHome) {
      let t02;
      if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
        t02 = /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: ROUTES.home.fullPath });
        $[1] = t02;
      } else {
        t02 = $[1];
      }
      return t02;
    }
  }
  let t0;
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
    t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {});
    $[2] = t0;
  } else {
    t0 = $[2];
  }
  return t0;
};
function _temp$4(state) {
  return state.userInfo.User;
}
function _temp2(state_0) {
  return state_0.userInfo;
}
const RedirectIFAuth = () => {
  const $ = compilerRuntimeExports.c(3);
  const location2 = useLocation();
  const currentUser = useAppSelector(_temp$3);
  let t0;
  if ($[0] !== (currentUser == null ? void 0 : currentUser.Id) || $[1] !== location2) {
    t0 = !(currentUser == null ? void 0 : currentUser.Id) ? /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: "/", state: {
      from: location2
    }, replace: true });
    $[0] = currentUser == null ? void 0 : currentUser.Id;
    $[1] = location2;
    $[2] = t0;
  } else {
    t0 = $[2];
  }
  return t0;
};
function _temp$3(state) {
  return state.userInfo.User;
}
const ProfilePageRoute = () => {
  const $ = compilerRuntimeExports.c(3);
  const currentUser = useAppSelector(_temp$2);
  let t0;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {});
    $[0] = t0;
  } else {
    t0 = $[0];
  }
  const t1 = "/profile/" + (currentUser == null ? void 0 : currentUser.Id);
  let t2;
  if ($[1] !== t1) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
      t0,
      /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: t1 })
    ] });
    $[1] = t1;
    $[2] = t2;
  } else {
    t2 = $[2];
  }
  return t2;
};
function _temp$2(state) {
  return state.userInfo.User;
}
const Login = reactExports.lazy(() => __vitePreload(() => import("./index-DDtKBkCy.js"), true ? __vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]) : void 0).then((m) => ({
  default: m.Login
})));
const Register = reactExports.lazy(() => __vitePreload(() => import("./index-EN60obZ7.js"), true ? __vite__mapDeps([11,1,2,3,4,12,13,10,14,8,15,9,6]) : void 0).then((m) => ({
  default: m.Register
})));
const Users = reactExports.lazy(() => __vitePreload(() => import("./index-1TpVQR3a.js"), true ? __vite__mapDeps([16,1,3,4,17,18,10,19,20,21,22,8,23,24,25,26,27,28,29,30,31,7,32,33,34,35,36,37,38,39,40,41,6,9,42,43,44,45,46,47,48,49,50,51,15,14,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,13,70]) : void 0).then((m) => ({
  default: m.Users
})));
const Filials = reactExports.lazy(() => __vitePreload(() => import("./index-DYQg5Zv2.js"), true ? __vite__mapDeps([71,1,44,22,45,3,4,46,10,8,60,42,33,34,61,62,37,36,18,72,20,21,6,73,9,25,26]) : void 0).then((m) => ({
  default: m.Filials
})));
const Roles = reactExports.lazy(() => __vitePreload(() => import("./index-t2CI3gBu.js"), true ? __vite__mapDeps([74,1,3,4,10,63,20,21,22,8,64,36,37,25,39,26,18,19,27,40,58,59,41,6,9,65,43,33,34,61,42,75,44,45,46,24,70]) : void 0).then((m) => ({
  default: m.Roles
})));
const Profile = reactExports.lazy(() => __vitePreload(() => import("./index-TL41xEJi.js").then((n2) => n2.a), true ? __vite__mapDeps([29,1,30,3,4,31,7,8]) : void 0).then((m) => ({
  default: m.Profile
})));
const Dashboard = reactExports.lazy(() => __vitePreload(() => import("./index-dNCk3QFy.js"), true ? __vite__mapDeps([76,1,3,4,36,37,8,10]) : void 0).then((m) => ({
  default: m.Dashboard
})));
const Statistics = reactExports.lazy(() => __vitePreload(() => import("./index--1rmaIap.js"), true ? __vite__mapDeps([77,1,30,3,4,8,78,10]) : void 0).then((m) => ({
  default: m.Statistics
})));
const Home = reactExports.lazy(() => __vitePreload(() => import("./index-DUqj3r8B.js"), true ? __vite__mapDeps([79,1,80,10,50,37,3,4,36,29,30,31,7,8,6,51,15,14,9,17,18,19,20,21,22,23,24,25,26,27,28,52,53,32,33,34,35,38,39,40,41,42,43,48,54,55,56,57,58,59,60,61,62,63,64,65,47,66,67,68,69,13,75,72,73,81,82,83,84,85,86]) : void 0).then((m) => ({
  default: m.Home
})));
const Activations = reactExports.lazy(() => __vitePreload(() => import("./index-CV2nvQ4Y.js"), true ? __vite__mapDeps([87,1,88,25,3,4,10,8,34,86]) : void 0).then((m) => ({
  default: m.Activations
})));
const Subscription = reactExports.lazy(() => __vitePreload(() => import("./index-DM5_T2JW.js"), true ? __vite__mapDeps([89,1,3,4,80,10,50,37,36,29,30,31,7,8,6,51,15,14,9,17,18,19,20,21,22,23,24,25,26,27,28,52,53,32,33,34,35,38,39,40,41,42,43,48,54,55,56,57,58,59,60,61,62,63,64,65,47,66,67,68,69,13]) : void 0).then((m) => ({
  default: m.Subscription
})));
const Licenses = reactExports.lazy(() => __vitePreload(() => import("./index-BmZnwe2q.js"), true ? __vite__mapDeps([88,1,25,3,4,10,8,34,86]) : void 0).then((m) => ({
  default: m.Licenses
})));
const ResetPassword = reactExports.lazy(() => __vitePreload(() => import("./index-7NP-GXLT.js"), true ? __vite__mapDeps([90,1,91,3,4,8,14,5,2,7,92,10,34,15,9,13]) : void 0).then((m) => ({
  default: m.ResetPassword
})));
const RequestResetPassword = reactExports.lazy(() => __vitePreload(() => import("./index-BCxEOlV-.js"), true ? __vite__mapDeps([93,1,92,94,2,3,4,6,8,9,10]) : void 0).then((m) => ({
  default: m.RequestResetPassword
})));
const ConfirmEmail = reactExports.lazy(() => __vitePreload(() => import("./index-CtFaoOYp.js"), true ? __vite__mapDeps([95,1,3,4,2,92,94,8,10]) : void 0).then((m) => ({
  default: m.ConfirmEmail
})));
const InviteRegister = reactExports.lazy(() => __vitePreload(() => import("./index-BIIcHhad.js"), true ? __vite__mapDeps([96,1,2,3,4,91,8,12,13,10,14,15,9,6,52]) : void 0).then((m) => ({
  default: m.InviteRegister
})));
const ProfileLocale = reactExports.lazy(() => __vitePreload(() => import("./index-BxZsfbZq.js"), true ? __vite__mapDeps([97,1,98,10,8,3,4,99,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,7,32,33,34,35,36,37,38,39,40,41,6,9,42,43,48,14,54,55,56,57,58,59,60,61,62,63,64,65,100]) : void 0).then((m) => ({
  default: m.ProfileLocale
})));
const EventsTrailPage = reactExports.lazy(() => __vitePreload(() => import("./index-FLmifAIL.js"), true ? __vite__mapDeps([101,1,8,25,3,4,10,102]) : void 0).then((m) => ({
  default: m.EventsTrailPage
})));
const FilialEdit = reactExports.lazy(() => __vitePreload(() => import("./index-DpSc2s9t.js"), true ? __vite__mapDeps([103,1,30,3,4,8,10,62,37]) : void 0));
const FilialSettings = reactExports.lazy(() => __vitePreload(() => import("./index-DRm13RDQ.js"), true ? __vite__mapDeps([104,1,20,21,3,4,22,10,8,82,37,6,73,9]) : void 0));
const FilialSecurity = reactExports.lazy(() => __vitePreload(() => import("./index-UG854A7p.js"), true ? __vite__mapDeps([105,1,106,8,10,58,3,4,59,82,37,9,6,107,108,26,109,36,110]) : void 0));
const FilialSMTP = reactExports.lazy(() => __vitePreload(() => import("./index-CUoIuKcD.js"), true ? __vite__mapDeps([111,1,6,82,37,3,4,9,8,10]) : void 0));
const FilialLDAP = reactExports.lazy(() => __vitePreload(() => import("./index-BLmUkvkI.js"), true ? __vite__mapDeps([112,1,106,8,6,82,37,3,4,10,9]) : void 0));
const EmailModule = reactExports.lazy(() => __vitePreload(() => import("./index-Bo08Q_Mg.js"), true ? __vite__mapDeps([113,1,114,115,39,36,37,3,4,25,10,22,8,26,18,19,27,64,82,58,59]) : void 0));
const CalendarModule = reactExports.lazy(() => __vitePreload(() => import("./index-CHSpKsOm.js"), true ? __vite__mapDeps([116,1,114,115,39,36,37,3,4,25,10,22,8,26,18,19,27,64,82,58,59]) : void 0));
const DrawModule = reactExports.lazy(() => __vitePreload(() => import("./index-DRc8D7K-.js"), true ? __vite__mapDeps([117,1,114,115,39,36,37,3,4,25,10,22,8,26,18,19,27,64,82,58,59]) : void 0));
const MailServersPage = reactExports.lazy(() => __vitePreload(() => import("./index-BPIuUjBu.js"), true ? __vite__mapDeps([118,1,82,37,3,4,58,10,59,81,36,83,8,84,9,6,22,107,119,38,120]) : void 0));
const MailingSetupPage = reactExports.lazy(() => __vitePreload(() => import("./index-CrwcKuxe.js"), true ? __vite__mapDeps([121,1,82,37,3,4,39,36,25,10,22,8,26,18,19,27,58,59,106,6,9]) : void 0));
const LocaleTimezonePage = reactExports.lazy(() => __vitePreload(() => import("./index-CArnrf6K.js"), true ? __vite__mapDeps([122,1,8,3,4,98,10,99,123]) : void 0));
const DiskSpasePage = reactExports.lazy(() => __vitePreload(() => import("./index-DLeCAHzh.js"), true ? __vite__mapDeps([124,1,115,46,10,3,4,8,43,32,33,34,18,35,36,37,38,39,25,22,26,19,27,40,41,6,9,42,56,57,82,125,58,59,126,65,21,73,84,64,106]) : void 0));
const SetupQuota = reactExports.lazy(() => __vitePreload(() => import("./index-wbXPwO45.js"), true ? __vite__mapDeps([127,1,25,3,4,10,128,45,46,8,49,84,43,27,24,22,26,126,36,37,56,57,65,21,6,73,9]) : void 0));
const InviteLinksList = reactExports.lazy(() => __vitePreload(() => import("./index-d-f5nm7J.js"), true ? __vite__mapDeps([129,1,82,37,3,4,10,31,7,42,6,8,9,36,58,59]) : void 0));
const ContactsModule = reactExports.lazy(() => __vitePreload(() => import("./index-CuQrAARb.js"), true ? __vite__mapDeps([130,1,114,115,39,36,37,3,4,25,10,22,8,26,18,19,27,64,82,58,59]) : void 0));
const ProjectsModule = reactExports.lazy(() => __vitePreload(() => import("./index-MU215kbw.js"), true ? __vite__mapDeps([131,1,114,115,39,36,37,3,4,25,10,22,8,26,18,19,27,64,82,58,59]) : void 0));
const PagesModule = reactExports.lazy(() => __vitePreload(() => import("./index-D1V9bFNj.js"), true ? __vite__mapDeps([132,1,114,115,39,36,37,3,4,25,10,22,8,26,18,19,27,64,82,58,59]) : void 0));
const FormsModule = reactExports.lazy(() => __vitePreload(() => import("./index-lnjoUqiy.js"), true ? __vite__mapDeps([133,1,114,115,39,36,37,3,4,25,10,22,8,26,18,19,27,64,82,58,59]) : void 0));
const CustomPage = reactExports.lazy(() => __vitePreload(() => import("./index-BQFpm4P_.js"), true ? __vite__mapDeps([134,1,82,37,3,4,18,8,107,10,58,59,36,85,86,108,26,19,135]) : void 0));
const PersonalData = reactExports.lazy(() => __vitePreload(() => import("./index-CQqoUH6l.js"), true ? __vite__mapDeps([136,1,3,4,36,37,53,17,18,10,19,20,21,22,8,23,24,25,26,27,28,29,30,31,7,32,33,34,35,38,39,40,41,6,9,42,43,48,14,54,55,56,57,58,59,60,61,62,63,64,65,47,109,68,51,15,67]) : void 0));
const FilialData = reactExports.lazy(() => __vitePreload(() => import("./index-Bn6PTY2_.js"), true ? __vite__mapDeps([137,1,20,21,3,4,22,10,8,109,29,30,31,7,6,51,15,14,9,23,55,56,57,58,59,39,36,37,25,26,18,19,27,69,41]) : void 0));
const Safety = reactExports.lazy(() => __vitePreload(() => import("./index-BrPxVWEo.js"), true ? __vite__mapDeps([138,1,29,30,3,4,31,7,8,109,10,36,37,67,57,35,38,26,42]) : void 0));
const MailAccount = reactExports.lazy(() => __vitePreload(() => import("./index-Cg5pRT9x.js"), true ? __vite__mapDeps([139,1,29,30,3,4,31,7,8,109,119,37,10,36,6,83,15,14,9,13,23,107,58,59]) : void 0));
const DiskData = reactExports.lazy(() => __vitePreload(() => import("./index-9yT4-U2s.js"), true ? __vite__mapDeps([140,1,65,3,4,21,10,22,43,8,109,17,18,19,20,23,24,25,26,27,28,29,30,31,7,32,33,34,35,36,37,38,39,40,41,6,9,42,48,51,15,14,54,55,56,57,58,59,60,61,62,63,64]) : void 0));
const CommonSettingsPage = reactExports.lazy(() => __vitePreload(() => import("./index-C17ZigX9.js"), true ? __vite__mapDeps([141,1,30,3,4,142,10,8]) : void 0));
const IntegrationsPage = reactExports.lazy(() => __vitePreload(() => import("./index-BcFqSuPN.js"), true ? __vite__mapDeps([143,1,142,3,4,6,144,145,10,31,7,8,9]) : void 0));
const BrandingPage = reactExports.lazy(() => __vitePreload(() => import("./index-DeA4DjbJ.js"), true ? __vite__mapDeps([146,1,142,3,4,6,145,144,36,37,8,10,47,48,66,147,9]) : void 0));
const SsoSettingsPage = reactExports.lazy(() => __vitePreload(() => import("./index-CtVsydR1.js"), true ? __vite__mapDeps([148,1,142,3,4,6,145,10,8,9]) : void 0));
const ProductNotificationsPage = reactExports.lazy(() => __vitePreload(() => import("./index-CXiJUPid.js"), true ? __vite__mapDeps([149,1,142,3,4,6,145,147,8,9,68,54,56,57,10]) : void 0));
const StoragePage = reactExports.lazy(() => __vitePreload(() => import("./index-BDxz8DSx.js"), true ? __vite__mapDeps([150,1,125,107,3,4,10,8,58,59,151]) : void 0));
const Activity = reactExports.lazy(() => __vitePreload(() => import("./index-CsGJaTP-.js"), true ? __vite__mapDeps([152,1,128,45,3,4,46,10,8,49,153,28,24,22,25,26,27,154,42,78]) : void 0));
const DiskSpace = reactExports.lazy(() => __vitePreload(() => import("./index-Ds6tAxUN.js"), true ? __vite__mapDeps([155,1,128,45,3,4,46,10,8,49,153,28,24,22,25,26,27,43,78,154,42]) : void 0));
const Audit = reactExports.lazy(() => __vitePreload(() => import("./index-D1z3qsw1.js"), true ? __vite__mapDeps([156,1,8,42,3,4,18,26,25,10,153,28,24,22,27,128,45,46,49,78]) : void 0));
const NotificationsPage = reactExports.lazy(() => __vitePreload(() => import("./notifications.page-BxPNbMCF.js"), true ? __vite__mapDeps([157,1,8,10,3,4]) : void 0));
const NotificationSettingsPage = reactExports.lazy(() => __vitePreload(() => import("./notification-settings.page-DmRC7Fwx.js"), true ? __vite__mapDeps([158,1,8,3,4,10]) : void 0));
const basenameOption = "";
const PageLoader = () => {
  const $ = compilerRuntimeExports.c(1);
  let t0;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(Center, { h: "100vh", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, { size: "md" }) });
    $[0] = t0;
  } else {
    t0 = $[0];
  }
  return t0;
};
const MainRoutes = () => {
  const $ = compilerRuntimeExports.c(77);
  const {
    Settings: Settings2
  } = useAppSelector(_temp$1);
  let t0;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(PageLoader, {});
    $[0] = t0;
  } else {
    t0 = $[0];
  }
  let t1;
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
    t1 = /* @__PURE__ */ jsxRuntimeExports.jsx(RequireAuth, {});
    $[1] = t1;
  } else {
    t1 = $[1];
  }
  let t2;
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = /* @__PURE__ */ jsxRuntimeExports.jsx(MainPageRote, {});
    $[2] = t2;
  } else {
    t2 = $[2];
  }
  let t3;
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/", element: t2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.users.fullPath, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Users, {}) }) });
    $[3] = t3;
  } else {
    t3 = $[3];
  }
  let t4;
  if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/profile", element: /* @__PURE__ */ jsxRuntimeExports.jsx(ProfilePageRoute, {}) });
    $[4] = t4;
  } else {
    t4 = $[4];
  }
  let t5;
  if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
    t5 = /* @__PURE__ */ jsxRuntimeExports.jsx(Profile, {});
    $[5] = t5;
  } else {
    t5 = $[5];
  }
  let t6;
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
    t6 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.profile.pages.personalData, element: /* @__PURE__ */ jsxRuntimeExports.jsx(PersonalData, {}) });
    $[6] = t6;
  } else {
    t6 = $[6];
  }
  let t7;
  if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
    t7 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.profile.pages.filials, element: /* @__PURE__ */ jsxRuntimeExports.jsx(FilialData, {}) });
    $[7] = t7;
  } else {
    t7 = $[7];
  }
  let t8;
  if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
    t8 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.profile.pages.safety, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Safety, {}) });
    $[8] = t8;
  } else {
    t8 = $[8];
  }
  let t9;
  if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
    t9 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.profile.pages.mailAccount, element: /* @__PURE__ */ jsxRuntimeExports.jsx(MailAccount, {}) });
    $[9] = t9;
  } else {
    t9 = $[9];
  }
  let t10;
  if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
    t10 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.profile.pages.disk, element: /* @__PURE__ */ jsxRuntimeExports.jsx(DiskData, {}) });
    $[10] = t10;
  } else {
    t10 = $[10];
  }
  let t11;
  if ($[11] !== Settings2) {
    t11 = isSaaS(Settings2) && /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.profile.pages.licenses, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Licenses, {}) });
    $[11] = Settings2;
    $[12] = t11;
  } else {
    t11 = $[12];
  }
  let t12;
  if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
    t12 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.profile.pages.locale, element: /* @__PURE__ */ jsxRuntimeExports.jsx(ProfileLocale, {}) });
    $[13] = t12;
  } else {
    t12 = $[13];
  }
  let t13;
  if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
    t13 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.profile.pages.notifications, element: /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationsPage, {}) });
    $[14] = t13;
  } else {
    t13 = $[14];
  }
  let t14;
  if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
    t14 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.profile.pages.notificationSettings, element: /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationSettingsPage, {}) });
    $[15] = t14;
  } else {
    t14 = $[15];
  }
  let t15;
  if ($[16] !== t11) {
    t15 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Route, { path: ROUTES.profile.fullPath, element: t5, children: [
      t6,
      t7,
      t8,
      t9,
      t10,
      t11,
      t12,
      t13,
      t14
    ] });
    $[16] = t11;
    $[17] = t15;
  } else {
    t15 = $[17];
  }
  let t16;
  let t17;
  if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
    t16 = /* @__PURE__ */ jsxRuntimeExports.jsx(CommonSettingsPage, {});
    t17 = isFeature() && /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.commonSettings.pages.branding, element: /* @__PURE__ */ jsxRuntimeExports.jsx(BrandingPage, {}) });
    $[18] = t16;
    $[19] = t17;
  } else {
    t16 = $[18];
    t17 = $[19];
  }
  let t18;
  if ($[20] !== Settings2) {
    t18 = isSaaS(Settings2) && /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.commonSettings.pages.notifications, element: /* @__PURE__ */ jsxRuntimeExports.jsx(ProductNotificationsPage, {}) });
    $[20] = Settings2;
    $[21] = t18;
  } else {
    t18 = $[21];
  }
  let t19;
  if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
    t19 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.commonSettings.pages.integrations, element: /* @__PURE__ */ jsxRuntimeExports.jsx(IntegrationsPage, {}) });
    $[22] = t19;
  } else {
    t19 = $[22];
  }
  let t20;
  if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
    t20 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.commonSettings.pages.sso, element: /* @__PURE__ */ jsxRuntimeExports.jsx(SsoSettingsPage, {}) });
    $[23] = t20;
  } else {
    t20 = $[23];
  }
  let t21;
  if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
    t21 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.commonSettings.pages.auditTrail, element: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTrailPage, {}) });
    $[24] = t21;
  } else {
    t21 = $[24];
  }
  let t22;
  if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
    t22 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.commonSettings.pages.storage, element: /* @__PURE__ */ jsxRuntimeExports.jsx(StoragePage, {}) });
    $[25] = t22;
  } else {
    t22 = $[25];
  }
  let t23;
  if ($[26] !== t18) {
    t23 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Route, { path: ROUTES.commonSettings.fullPath, element: t16, children: [
      t17,
      t18,
      t19,
      t20,
      t21,
      t22
    ] });
    $[26] = t18;
    $[27] = t23;
  } else {
    t23 = $[27];
  }
  let t24;
  if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
    t24 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.dashboard.fullPath, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Dashboard, {}) });
    $[28] = t24;
  } else {
    t24 = $[28];
  }
  let t25;
  if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
    t25 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.home.fullPath, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Home, {}) });
    $[29] = t25;
  } else {
    t25 = $[29];
  }
  let t26;
  if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
    t26 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.roles.fullPath, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Roles, {}) });
    $[30] = t26;
  } else {
    t26 = $[30];
  }
  let t27;
  if ($[31] !== Settings2) {
    t27 = isSaaS(Settings2) && /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.activations.fullPath, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Activations, {}) });
    $[31] = Settings2;
    $[32] = t27;
  } else {
    t27 = $[32];
  }
  let t28;
  if ($[33] !== Settings2) {
    t28 = isSaaS(Settings2) && /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.subscriptions.fullPath, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Subscription, {}) });
    $[33] = Settings2;
    $[34] = t28;
  } else {
    t28 = $[34];
  }
  let t29;
  if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
    t29 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { index: true, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Filials, {}) });
    $[35] = t29;
  } else {
    t29 = $[35];
  }
  let t30;
  if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
    t30 = /* @__PURE__ */ jsxRuntimeExports.jsx(FilialEdit, {});
    $[36] = t30;
  } else {
    t30 = $[36];
  }
  let t31;
  if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
    t31 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { index: true, element: /* @__PURE__ */ jsxRuntimeExports.jsx(FilialSettings, {}) });
    $[37] = t31;
  } else {
    t31 = $[37];
  }
  let t32;
  if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
    t32 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.common.security, element: /* @__PURE__ */ jsxRuntimeExports.jsx(FilialSecurity, {}) });
    $[38] = t32;
  } else {
    t32 = $[38];
  }
  let t33;
  if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
    t33 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.common.modules, element: /* @__PURE__ */ jsxRuntimeExports.jsx(CustomPage, {}) });
    $[39] = t33;
  } else {
    t33 = $[39];
  }
  let t34;
  if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
    t34 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.common.smtp, element: /* @__PURE__ */ jsxRuntimeExports.jsx(FilialSMTP, {}) });
    $[40] = t34;
  } else {
    t34 = $[40];
  }
  let t35;
  if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
    t35 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.common.mailServers, element: /* @__PURE__ */ jsxRuntimeExports.jsx(MailServersPage, {}) });
    $[41] = t35;
  } else {
    t35 = $[41];
  }
  let t36;
  if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
    t36 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.common.mailingSetup, element: /* @__PURE__ */ jsxRuntimeExports.jsx(MailingSetupPage, {}) });
    $[42] = t36;
  } else {
    t36 = $[42];
  }
  let t37;
  if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
    t37 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.common.locale, element: /* @__PURE__ */ jsxRuntimeExports.jsx(LocaleTimezonePage, {}) });
    $[43] = t37;
  } else {
    t37 = $[43];
  }
  let t38;
  if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
    t38 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.common.diskSpace, element: /* @__PURE__ */ jsxRuntimeExports.jsx(DiskSpasePage, {}) });
    $[44] = t38;
  } else {
    t38 = $[44];
  }
  let t39;
  if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
    t39 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.subRoutes.quotas.fullPath, element: /* @__PURE__ */ jsxRuntimeExports.jsx(SetupQuota, {}) });
    $[45] = t39;
  } else {
    t39 = $[45];
  }
  let t40;
  if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
    t40 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.auth.ldap, element: /* @__PURE__ */ jsxRuntimeExports.jsx(FilialLDAP, {}) });
    $[46] = t40;
  } else {
    t40 = $[46];
  }
  let t41;
  if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
    t41 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.auth.invite, element: /* @__PURE__ */ jsxRuntimeExports.jsx(InviteLinksList, {}) });
    $[47] = t41;
  } else {
    t41 = $[47];
  }
  let t42;
  if ($[48] === Symbol.for("react.memo_cache_sentinel")) {
    t42 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.modules.email, element: /* @__PURE__ */ jsxRuntimeExports.jsx(EmailModule, {}) });
    $[48] = t42;
  } else {
    t42 = $[48];
  }
  let t43;
  if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
    t43 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.modules.calendar, element: /* @__PURE__ */ jsxRuntimeExports.jsx(CalendarModule, {}) });
    $[49] = t43;
  } else {
    t43 = $[49];
  }
  let t44;
  if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
    t44 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.modules.draw, element: /* @__PURE__ */ jsxRuntimeExports.jsx(DrawModule, {}) });
    $[50] = t44;
  } else {
    t44 = $[50];
  }
  let t45;
  if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
    t45 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.modules.projects, element: /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectsModule, {}) });
    $[51] = t45;
  } else {
    t45 = $[51];
  }
  let t46;
  if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
    t46 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.modules.contacts, element: /* @__PURE__ */ jsxRuntimeExports.jsx(ContactsModule, {}) });
    $[52] = t46;
  } else {
    t46 = $[52];
  }
  let t47;
  if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
    t47 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.modules.pages, element: /* @__PURE__ */ jsxRuntimeExports.jsx(PagesModule, {}) });
    $[53] = t47;
  } else {
    t47 = $[53];
  }
  let t48;
  if ($[54] === Symbol.for("react.memo_cache_sentinel")) {
    t48 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Route, { path: ROUTES.filials.fullPath, children: [
      t29,
      /* @__PURE__ */ jsxRuntimeExports.jsxs(Route, { path: ROUTES.filials.edit.path, element: t30, children: [
        t31,
        t32,
        t33,
        t34,
        t35,
        t36,
        t37,
        t38,
        t39,
        t40,
        t41,
        t42,
        t43,
        t44,
        t45,
        t46,
        t47,
        /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.filials.edit.pages.modules.forms, element: /* @__PURE__ */ jsxRuntimeExports.jsx(FormsModule, {}) })
      ] })
    ] });
    $[54] = t48;
  } else {
    t48 = $[54];
  }
  let t49;
  if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
    t49 = /* @__PURE__ */ jsxRuntimeExports.jsx(Statistics, {});
    $[55] = t49;
  } else {
    t49 = $[55];
  }
  let t50;
  if ($[56] === Symbol.for("react.memo_cache_sentinel")) {
    t50 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.statistics.links.activity, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Activity, {}) });
    $[56] = t50;
  } else {
    t50 = $[56];
  }
  let t51;
  if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
    t51 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.statistics.links.diskSpace, element: /* @__PURE__ */ jsxRuntimeExports.jsx(DiskSpace, {}) });
    $[57] = t51;
  } else {
    t51 = $[57];
  }
  let t52;
  if ($[58] === Symbol.for("react.memo_cache_sentinel")) {
    t52 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Route, { path: ROUTES.statistics.fullPath, element: t49, children: [
      t50,
      t51,
      /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: ROUTES.statistics.links.audit, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Audit, {}) })
    ] });
    $[58] = t52;
  } else {
    t52 = $[58];
  }
  let t53;
  if ($[59] !== t15 || $[60] !== t23 || $[61] !== t27 || $[62] !== t28) {
    t53 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Route, { element: t1, children: [
      t3,
      t4,
      t15,
      t23,
      t24,
      t25,
      t26,
      t27,
      t28,
      t48,
      t52
    ] });
    $[59] = t15;
    $[60] = t23;
    $[61] = t27;
    $[62] = t28;
    $[63] = t53;
  } else {
    t53 = $[63];
  }
  let t54;
  if ($[64] !== Settings2) {
    t54 = isSaaS(Settings2) && /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/register", element: /* @__PURE__ */ jsxRuntimeExports.jsx(RedirectIFAuth, {}), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/register", element: /* @__PURE__ */ jsxRuntimeExports.jsx(Register, {}) }) });
    $[64] = Settings2;
    $[65] = t54;
  } else {
    t54 = $[65];
  }
  let t55;
  if ($[66] === Symbol.for("react.memo_cache_sentinel")) {
    t55 = /* @__PURE__ */ jsxRuntimeExports.jsx(RedirectIFAuth, {});
    $[66] = t55;
  } else {
    t55 = $[66];
  }
  let t56;
  if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
    t56 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/register/:code", element: t55, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/register/:code", element: /* @__PURE__ */ jsxRuntimeExports.jsx(InviteRegister, {}) }) });
    $[67] = t56;
  } else {
    t56 = $[67];
  }
  let t57;
  if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
    t57 = /* @__PURE__ */ jsxRuntimeExports.jsx(RedirectIFAuth, {});
    $[68] = t57;
  } else {
    t57 = $[68];
  }
  let t58;
  if ($[69] === Symbol.for("react.memo_cache_sentinel")) {
    t58 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/login", element: t57, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/login", element: /* @__PURE__ */ jsxRuntimeExports.jsx(Login, {}) }) });
    $[69] = t58;
  } else {
    t58 = $[69];
  }
  let t59;
  if ($[70] === Symbol.for("react.memo_cache_sentinel")) {
    t59 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/confirm-email/:code", element: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfirmEmail, {}) });
    $[70] = t59;
  } else {
    t59 = $[70];
  }
  let t60;
  if ($[71] === Symbol.for("react.memo_cache_sentinel")) {
    t60 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/password-reset/:code", element: /* @__PURE__ */ jsxRuntimeExports.jsx(ResetPassword, {}) });
    $[71] = t60;
  } else {
    t60 = $[71];
  }
  let t61;
  if ($[72] === Symbol.for("react.memo_cache_sentinel")) {
    t61 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/password-reset", element: /* @__PURE__ */ jsxRuntimeExports.jsx(RequestResetPassword, {}) });
    $[72] = t61;
  } else {
    t61 = $[72];
  }
  let t62;
  if ($[73] === Symbol.for("react.memo_cache_sentinel")) {
    t62 = /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "*", element: /* @__PURE__ */ jsxRuntimeExports.jsx(NotFound, {}) });
    $[73] = t62;
  } else {
    t62 = $[73];
  }
  let t63;
  if ($[74] !== t53 || $[75] !== t54) {
    t63 = /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserRouter, { basename: basenameOption, children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: t0, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Routes, { children: [
      t53,
      t54,
      t56,
      t58,
      t59,
      t60,
      t61,
      t62
    ] }) }) });
    $[74] = t53;
    $[75] = t54;
    $[76] = t63;
  } else {
    t63 = $[76];
  }
  return t63;
};
function _temp$1(state) {
  return state.userInfo;
}
const theme = {
  cursorType: "pointer",
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
  headings: {
    fontFamily: "Roboto, Helvetica, Arial, sans-serif",
    fontWeight: "400",
    sizes: {
      h1: {
        fontSize: "34px",
        fontWeight: "600",
        lineHeight: "17px"
      },
      h2: {
        fontSize: "32px",
        fontWeight: "600",
        lineHeight: "32px"
      },
      h3: {
        fontSize: "22px",
        fontWeight: "500",
        lineHeight: "22px"
      },
      h4: {
        fontSize: "18px",
        fontWeight: "500",
        lineHeight: "18px"
      },
      h5: {
        fontSize: "16px",
        fontWeight: "400",
        lineHeight: "16px"
      },
      h6: {
        fontSize: "14px",
        fontWeight: "400",
        lineHeight: "14px"
      }
    }
  },
  primaryColor: "main",
  spacing: {
    xs: "8px",
    sm: "16px",
    md: "24px",
    lg: "32px",
    xl: "40px"
  },
  colors: themeColors,
  shadows: {
    md: "1px 1px 3px rgba(0, 0, 0, .25)",
    xl: "5px 5px 3px rgba(0, 0, 0, .25)"
  },
  components: {
    ActionIcon: {
      defaultProps: {
        variant: "subtle",
        color: "gray"
      }
    },
    Button: {
      defaultProps: {
        radius: "8px"
      }
    },
    Checkbox: {
      styles: {
        label: {
          fontSize: "14px"
        }
      }
    },
    Select: {
      defaultProps: {
        withCheckIcon: false
      },
      styles: {
        option: {
          "&[data-checked]": {
            backgroundColor: "var(--mantine-color-blue-5)",
            color: "#FFF",
            "&:hover": {
              backgroundColor: "var(--mantine-color-blue-6)"
            }
          }
        }
      }
    },
    List: List.extend({
      styles: {
        root: {
          paddingInlineStart: 0
        }
      }
    })
  }
};
const AppVersion = "PROD-1775034545[01.04.2026, 12:09:05]-893e0702";
const useStyles$1 = createStyles((theme2) => ({
  root: {
    display: "flex",
    alignItems: "flex-start",
    flexDirection: "column",
    justifyContent: "center",
    width: "100%"
  },
  footer: {
    display: "flex",
    alignItems: "center",
    flexDirection: "row",
    justifyContent: "space-between",
    width: "100%"
  },
  header: {
    display: "flex",
    alignItems: "center",
    flexDirection: "row",
    justifyContent: "space-between",
    width: "100%",
    marginBottom: theme2.spacing.md
  },
  headerText: {
    fontSize: "18px",
    fontWeight: 600,
    lineHeight: "22px"
  }
}));
const defaultButtonSx = (sxProps) => {
  const defaultValue = {
    borderRadius: "8px",
    "&:hover": {
      backgroundColor: sxProps == null ? void 0 : sxProps.backgroundColor,
      opacity: 0.8
    }
  };
  return defaultValue;
};
const ContextModal = (t0) => {
  const $ = compilerRuntimeExports.c(60);
  const {
    context,
    id,
    innerProps
  } = t0;
  const {
    classes: classes2,
    cx
  } = useStyles$1();
  const {
    closeModal
  } = context;
  const {
    onCancel,
    title: title2,
    modalBodyProps,
    modalBody,
    labels,
    confirmProps,
    cancelProps,
    modalFooterProps,
    onConfirm
  } = innerProps;
  let t1;
  if ($[0] !== closeModal || $[1] !== id || $[2] !== onCancel) {
    t1 = async () => {
      if (onCancel) {
        await onCancel();
      }
      closeModal(id);
    };
    $[0] = closeModal;
    $[1] = id;
    $[2] = onCancel;
    $[3] = t1;
  } else {
    t1 = $[3];
  }
  const handleClose = t1;
  let t2;
  if ($[4] !== closeModal || $[5] !== id || $[6] !== onConfirm) {
    t2 = async () => {
      if (onConfirm) {
        await onConfirm();
      }
      closeModal(id);
    };
    $[4] = closeModal;
    $[5] = id;
    $[6] = onConfirm;
    $[7] = t2;
  } else {
    t2 = $[7];
  }
  const handleConfirm = t2;
  let styleConfirmBtn;
  let t3;
  let t4;
  if ($[8] !== cancelProps || $[9] !== confirmProps) {
    const {
      sx: cancelPropsSx
    } = {
      ...cancelProps
    };
    let t52;
    let t62;
    if ($[13] !== confirmProps) {
      const {
        sx: confirmPropsSx
      } = {
        ...confirmProps
      };
      t52 = confirmPropsSx;
      t62 = defaultButtonSx(confirmPropsSx);
      $[13] = confirmProps;
      $[14] = t52;
      $[15] = t62;
    } else {
      t52 = $[14];
      t62 = $[15];
    }
    let t72;
    if ($[16] !== t52 || $[17] !== t62) {
      t72 = {
        ...t52,
        ...t62
      };
      $[16] = t52;
      $[17] = t62;
      $[18] = t72;
    } else {
      t72 = $[18];
    }
    styleConfirmBtn = t72;
    t3 = cancelPropsSx;
    t4 = defaultButtonSx(cancelPropsSx);
    $[8] = cancelProps;
    $[9] = confirmProps;
    $[10] = styleConfirmBtn;
    $[11] = t3;
    $[12] = t4;
  } else {
    styleConfirmBtn = $[10];
    t3 = $[11];
    t4 = $[12];
  }
  let t5;
  if ($[19] !== t3 || $[20] !== t4) {
    t5 = {
      ...t3,
      ...t4
    };
    $[19] = t3;
    $[20] = t4;
    $[21] = t5;
  } else {
    t5 = $[21];
  }
  const styleCancelBtn = t5;
  const t6 = modalBodyProps == null ? void 0 : modalBodyProps.className;
  let t7;
  if ($[22] !== classes2.root || $[23] !== cx || $[24] !== t6) {
    t7 = cx(classes2.root, t6);
    $[22] = classes2.root;
    $[23] = cx;
    $[24] = t6;
    $[25] = t7;
  } else {
    t7 = $[25];
  }
  let t8;
  if ($[26] !== classes2.headerText || $[27] !== title2) {
    t8 = /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: classes2.headerText, children: title2 });
    $[26] = classes2.headerText;
    $[27] = title2;
    $[28] = t8;
  } else {
    t8 = $[28];
  }
  let t9;
  if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
    t9 = /* @__PURE__ */ jsxRuntimeExports.jsx(CloseIcon, { fill: "#667085" });
    $[29] = t9;
  } else {
    t9 = $[29];
  }
  let t10;
  if ($[30] !== handleClose) {
    t10 = /* @__PURE__ */ jsxRuntimeExports.jsx(ActionIcon, { variant: "transparent", onClick: handleClose, children: t9 });
    $[30] = handleClose;
    $[31] = t10;
  } else {
    t10 = $[31];
  }
  let t11;
  if ($[32] !== classes2.header || $[33] !== t10 || $[34] !== t8) {
    t11 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { className: classes2.header, children: [
      t8,
      t10
    ] });
    $[32] = classes2.header;
    $[33] = t10;
    $[34] = t8;
    $[35] = t11;
  } else {
    t11 = $[35];
  }
  const t12 = modalFooterProps == null ? void 0 : modalFooterProps.className;
  let t13;
  if ($[36] !== classes2.footer || $[37] !== cx || $[38] !== t12) {
    t13 = cx(classes2.footer, t12);
    $[36] = classes2.footer;
    $[37] = cx;
    $[38] = t12;
    $[39] = t13;
  } else {
    t13 = $[39];
  }
  let t14;
  if ($[40] !== cancelProps || $[41] !== handleClose || $[42] !== labels.cancel || $[43] !== styleCancelBtn) {
    t14 = labels.cancel && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { ...cancelProps, sx: styleCancelBtn, onClick: handleClose, children: labels.cancel });
    $[40] = cancelProps;
    $[41] = handleClose;
    $[42] = labels.cancel;
    $[43] = styleCancelBtn;
    $[44] = t14;
  } else {
    t14 = $[44];
  }
  let t15;
  if ($[45] !== confirmProps || $[46] !== handleConfirm || $[47] !== labels.confirm || $[48] !== styleConfirmBtn) {
    t15 = labels.confirm && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { ...confirmProps, sx: styleConfirmBtn, onClick: handleConfirm, children: labels.confirm });
    $[45] = confirmProps;
    $[46] = handleConfirm;
    $[47] = labels.confirm;
    $[48] = styleConfirmBtn;
    $[49] = t15;
  } else {
    t15 = $[49];
  }
  let t16;
  if ($[50] !== t13 || $[51] !== t14 || $[52] !== t15) {
    t16 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { className: t13, children: [
      t14,
      t15
    ] });
    $[50] = t13;
    $[51] = t14;
    $[52] = t15;
    $[53] = t16;
  } else {
    t16 = $[53];
  }
  let t17;
  if ($[54] !== modalBody || $[55] !== modalBodyProps || $[56] !== t11 || $[57] !== t16 || $[58] !== t7) {
    t17 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { ...modalBodyProps, className: t7, children: [
      t11,
      modalBody,
      t16
    ] });
    $[54] = modalBody;
    $[55] = modalBodyProps;
    $[56] = t11;
    $[57] = t16;
    $[58] = t7;
    $[59] = t17;
  } else {
    t17 = $[59];
  }
  return t17;
};
const useStyles = createStyles((theme2) => ({
  modal: {
    padding: `${theme2.spacing.md} !important`
  },
  header: {
    display: "none"
  }
}));
const ModalProvider = (t0) => {
  const $ = compilerRuntimeExports.c(7);
  const {
    children
  } = t0;
  const {
    classes: classes2
  } = useStyles();
  let t1;
  if ($[0] !== classes2.header || $[1] !== classes2.modal) {
    t1 = {
      zIndex: 1400,
      classNames: {
        body: classes2.modal,
        header: classes2.header
      }
    };
    $[0] = classes2.header;
    $[1] = classes2.modal;
    $[2] = t1;
  } else {
    t1 = $[2];
  }
  const modalProps = t1;
  let t2;
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = {
      context: ContextModal
    };
    $[3] = t2;
  } else {
    t2 = $[3];
  }
  let t3;
  if ($[4] !== children || $[5] !== modalProps) {
    t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(ModalsProvider, { modalProps, modals: t2, children });
    $[4] = children;
    $[5] = modalProps;
    $[6] = t3;
  } else {
    t3 = $[6];
  }
  return t3;
};
const CustomFonts = () => {
  const $ = compilerRuntimeExports.c(1);
  let t0;
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
    t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(Global, { styles: [{
      "@font-face": {
        fontFamily: "Roboto",
        fontStyle: "normal",
        fontWeight: 500,
        src: "url('/fonts/subset-Roboto-Medium.woff2') format('woff2'), url('/fonts/subset-Roboto-Medium.woff') format('woff'), url('/fonts/subset-Roboto-Medium.ttf') format('truetype')",
        fontDisplay: "swap"
      }
    }, {
      "@font-face": {
        fontFamily: "Roboto",
        fontStyle: "normal",
        fontWeight: "bold",
        src: "url('/fonts/subset-Roboto-Bold.woff2') format('woff2'), url('/fonts/subset-Roboto-Bold.woff') format('woff'), url('/fonts/subset-Roboto-Bold.ttf') format('truetype')",
        fontDisplay: "swap"
      }
    }, {
      "@font-face": {
        fontFamily: "Roboto",
        fontStyle: "normal",
        fontWeight: "normal",
        src: "url('/fonts/subset-Roboto-Regular.woff2') format('woff2'), url('/fonts/subset-Roboto-Regular.woff') format('woff'), url('/fonts/subset-Roboto-Regular.ttf') format('truetype')",
        fontDisplay: "swap"
      }
    }] });
    $[0] = t0;
  } else {
    t0 = $[0];
  }
  return t0;
};
const redirectIfAuth = () => {
  const requestParams = new URL(document.location.href).searchParams;
  const redirect_uri = requestParams.get("redirect_uri");
  if (redirect_uri) {
    const redirectUrl = "/auth.html?response_type=" + requestParams.get("response_type") + "&client_id=" + requestParams.get("client_id") + "&scope=" + requestParams.get("scope") + "&state=" + requestParams.get("state") + "&redirect_uri=" + requestParams.get("redirect_uri");
    window.location.href = redirectUrl;
    return;
  }
};
const useCurrentUser = () => {
  const $ = compilerRuntimeExports.c(4);
  const currentUser = useAppSelector(_temp);
  const t0 = (currentUser == null ? void 0 : currentUser.Id) ?? null;
  const t1 = !!(currentUser == null ? void 0 : currentUser.Id);
  let t2;
  if ($[0] !== currentUser || $[1] !== t0 || $[2] !== t1) {
    t2 = {
      currentUser,
      userId: t0,
      isAuthenticated: t1
    };
    $[0] = currentUser;
    $[1] = t0;
    $[2] = t1;
    $[3] = t2;
  } else {
    t2 = $[3];
  }
  return t2;
};
function _temp(state) {
  return state.userInfo.User;
}
const useInitLocale = () => {
  const $ = compilerRuntimeExports.c(6);
  const {
    userId
  } = useCurrentUser();
  const t0 = !userId;
  let t1;
  if ($[0] !== t0) {
    t1 = {
      skip: t0
    };
    $[0] = t0;
    $[1] = t1;
  } else {
    t1 = $[1];
  }
  const {
    data
  } = useGetUserInfoQuery(userId, t1);
  let t2;
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
    t2 = localStorage.getItem("lng");
    $[2] = t2;
  } else {
    t2 = $[2];
  }
  const localLanguage2 = t2;
  let t3;
  let t4;
  if ($[3] !== data) {
    t3 = () => {
      if ((data == null ? void 0 : data.Culture) && data.Culture !== localLanguage2) {
        localStorage.setItem("lng", data.Culture);
        instance$1.changeLanguage(data.Culture);
      }
    };
    t4 = [data];
    $[3] = data;
    $[4] = t3;
    $[5] = t4;
  } else {
    t3 = $[4];
    t4 = $[5];
  }
  reactExports.useEffect(t3, t4);
};
const useDocumentTitle = () => {
  const $ = compilerRuntimeExports.c(4);
  const {
    t: t2,
    i18n
  } = useTranslation();
  let t0;
  let t1;
  if ($[0] !== i18n || $[1] !== t2) {
    t0 = () => {
      const updateTitle = () => {
        document.title = t2("documentTitle");
      };
      updateTitle();
      i18n.on("languageChanged", updateTitle);
      return () => {
        i18n.off("languageChanged", updateTitle);
      };
    };
    t1 = [t2, i18n];
    $[0] = i18n;
    $[1] = t2;
    $[2] = t0;
    $[3] = t1;
  } else {
    t0 = $[2];
    t1 = $[3];
  }
  reactExports.useEffect(t0, t1);
};
window.appVersion = AppVersion;
window.appFeature = AppFeature;
const App = () => {
  const $ = compilerRuntimeExports.c(32);
  const [isLoaded, setIsLoaded] = reactExports.useState(false);
  const {
    data: dataSetting,
    status: statusSettings
  } = useSettingsQuery();
  const [fetchUserInfo, t0] = useLazyCurrentUserQuery();
  const {
    data: dataUser,
    status: statusUser
  } = t0;
  const isAuthorized = Number((dataSetting == null ? void 0 : dataSetting.UserId) || -1) > 0;
  const [fetchTimezones, t1] = useLazyGetTimezonesQuery();
  const {
    data: dataTimezones,
    status: statusTimezones
  } = t1;
  const {
    setTimeZones
  } = useActions();
  useInitLocale();
  useDocumentTitle();
  let t2;
  if ($[0] !== dataTimezones || $[1] !== setTimeZones) {
    t2 = () => {
      if (dataTimezones == null ? void 0 : dataTimezones.length) {
        setTimeZones(dataTimezones);
      }
    };
    $[0] = dataTimezones;
    $[1] = setTimeZones;
    $[2] = t2;
  } else {
    t2 = $[2];
  }
  let t3;
  if ($[3] !== dataTimezones) {
    t3 = [dataTimezones];
    $[3] = dataTimezones;
    $[4] = t3;
  } else {
    t3 = $[4];
  }
  reactExports.useEffect(t2, t3);
  let t4;
  let t5;
  if ($[5] !== dataSetting) {
    t4 = () => {
      if (dataSetting) {
        store.dispatch(userInfoActions.setGlobalSettings(dataSetting));
      }
    };
    t5 = [dataSetting];
    $[5] = dataSetting;
    $[6] = t4;
    $[7] = t5;
  } else {
    t4 = $[6];
    t5 = $[7];
  }
  reactExports.useEffect(t4, t5);
  let t6;
  if ($[8] !== fetchTimezones || $[9] !== fetchUserInfo || $[10] !== isAuthorized) {
    t6 = () => {
      if (isAuthorized) {
        redirectIfAuth();
        fetchUserInfo();
        fetchTimezones();
      }
    };
    $[8] = fetchTimezones;
    $[9] = fetchUserInfo;
    $[10] = isAuthorized;
    $[11] = t6;
  } else {
    t6 = $[11];
  }
  let t7;
  if ($[12] !== isAuthorized) {
    t7 = [isAuthorized];
    $[12] = isAuthorized;
    $[13] = t7;
  } else {
    t7 = $[13];
  }
  reactExports.useEffect(t6, t7);
  let t8;
  let t9;
  if ($[14] !== dataUser) {
    t8 = () => {
      if (dataUser) {
        store.dispatch(userInfoActions.setUserInfo(dataUser));
      }
    };
    t9 = [dataUser];
    $[14] = dataUser;
    $[15] = t8;
    $[16] = t9;
  } else {
    t8 = $[15];
    t9 = $[16];
  }
  reactExports.useEffect(t8, t9);
  let t10;
  if ($[17] !== isAuthorized || $[18] !== statusSettings || $[19] !== statusTimezones || $[20] !== statusUser) {
    t10 = () => {
      if (isAuthorized && statusUser === "fulfilled" || statusUser === "rejected" || !isAuthorized && statusSettings === "fulfilled" || statusSettings === "rejected" || isAuthorized && statusTimezones === "fulfilled" || statusTimezones === "rejected") {
        setIsLoaded(true);
      }
    };
    $[17] = isAuthorized;
    $[18] = statusSettings;
    $[19] = statusTimezones;
    $[20] = statusUser;
    $[21] = t10;
  } else {
    t10 = $[21];
  }
  let t11;
  if ($[22] !== statusSettings || $[23] !== statusUser) {
    t11 = [statusSettings, statusUser];
    $[22] = statusSettings;
    $[23] = statusUser;
    $[24] = t11;
  } else {
    t11 = $[24];
  }
  reactExports.useEffect(t10, t11);
  let t12;
  if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
    t12 = /* @__PURE__ */ jsxRuntimeExports.jsx(Notifications, { position: "top-right", zIndex: 1450 });
    $[25] = t12;
  } else {
    t12 = $[25];
  }
  const t13 = statusSettings === "rejected" || statusUser === "rejected";
  let t14;
  if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
    t14 = /* @__PURE__ */ jsxRuntimeExports.jsx(CustomFonts, {});
    $[26] = t14;
  } else {
    t14 = $[26];
  }
  let t15;
  if ($[27] !== isLoaded) {
    t15 = isLoaded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ModalProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(MainRoutes, {}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "center", align: "center", w: "100vw", h: "100vh", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, {}) });
    $[27] = isLoaded;
    $[28] = t15;
  } else {
    t15 = $[28];
  }
  let t16;
  if ($[29] !== t13 || $[30] !== t15) {
    t16 = /* @__PURE__ */ jsxRuntimeExports.jsx(DirectionProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(MantineProvider, { theme, stylesTransform: emotionTransform, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(MantineEmotionProvider, { children: [
      t12,
      /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorBoundary, { componentTitle: "Settings", additionalError: t13, children: [
        t14,
        t15
      ] })
    ] }) }) });
    $[29] = t13;
    $[30] = t15;
    $[31] = t16;
  } else {
    t16 = $[31];
  }
  return t16;
};
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(/* @__PURE__ */ jsxRuntimeExports.jsx(Provider, { store, children: /* @__PURE__ */ jsxRuntimeExports.jsx(App, {}) }));
export {
  MainHeader as $,
  useGetUsersQuery as A,
  convertToFilterConditions as B,
  transformNumberToUsersSortField as C,
  transformUsersSortFieldToNumber as D,
  ErrorBoundary as E,
  CompanyPlaceholder as F,
  useGetFilialsTreeQuery as G,
  HEADER_HEIGHT as H,
  IFiltersEnumType as I,
  useGetDefaultRolesFiltersQuery as J,
  IUsersSortField as K,
  Layout as L,
  RolesPlaceholder as M,
  getFilterAttributeByKey as N,
  themeColors as O,
  PanelsEnum$1 as P,
  useGetFilterListItemsQuery as Q,
  ROUTES as R,
  ScrollContainer as S,
  useGetRolesQuery as T,
  UserStatusEnum as U,
  PanelsEnum as V,
  useLazyLogoutQuery as W,
  AppsMenu as X,
  UserMenu as Y,
  getMenu as Z,
  TailType as _,
  useLazySettingsQuery as a,
  useLazyAddDomainQuery as a$,
  UserAvatar as a0,
  ActivityIcon as a1,
  DriveIcon as a2,
  FileIcon as a3,
  useHomeWidgetSlice as a4,
  useCreateFilialMutation as a5,
  clearApiCacheByTags as a6,
  rolesApi as a7,
  useAddRolesMutation as a8,
  FilialInfoPanelsEnum as a9,
  commonSettingsApiArea as aA,
  DEFAULT_MODULE_ID as aB,
  GearIcon as aC,
  UsersIcon as aD,
  ShieldIcon as aE,
  MailIcon as aF,
  SendIcon as aG,
  TimezonesIcon as aH,
  inviteUserIcon as aI,
  CalendarExtraIcon as aJ,
  DrawIcon as aK,
  ContactsIcon as aL,
  ProjectsIcon as aM,
  PagesIcon as aN,
  FormsIcon as aO,
  getFilialEditRoutes as aP,
  useGetFilialsInfoCommonQuery as aQ,
  NotFound as aR,
  useUpdateFilialMutation as aS,
  SettingsEnum as aT,
  axiosInstance as aU,
  EditIcon as aV,
  useLdapSettingsSyncMutation as aW,
  ModulesEnum as aX,
  defaultIcon$1 as aY,
  defaultIcon as aZ,
  useLazyCheckDomainQuery as a_,
  useLazyEmailServerDomainsQuery as aa,
  useLazyCheckCanCreateUserQuery as ab,
  useLazyGetFilialsInfoCommonQuery as ac,
  useAddMutation as ad,
  usersApi as ae,
  LicenseStatus as af,
  selectActivationParams as ag,
  selectDeactivationParams as ah,
  useGetLicensesQuery as ai,
  useActivateLicenseMutation as aj,
  useDeactivateLicenseMutation as ak,
  useLazyUpdatePasswordWithCodeQuery as al,
  useLazyCheckUserWithCodeQuery as am,
  useLazyCryptQuery as an,
  useResetPasswordMutation as ao,
  useLazyConfirmEmailActivationQuery as ap,
  useLazyCheckInvitationLinkCodeQuery as aq,
  useCreateClientMutation as ar,
  useLazyCheckEmailExistsQuery as as,
  SpaceLogo as at,
  OfficeLogo as au,
  useAppDispatch as av,
  useUpdateSettingMutation as aw,
  defaultLang as ax,
  userApi as ay,
  useEventsTrailSlice as az,
  useActions as b,
  pascalToCamel as b$,
  useLazyGetLinkRecordQuery as b0,
  useLazyDomainSettingsQuery as b1,
  useLazyDeleteDomainQuery as b2,
  useLazyGetDomainsQuery as b3,
  useLazyDeleteEmailServerQuery as b4,
  useLazyGetEmailServerQuery as b5,
  useGetUserEmailsQuery as b6,
  useUpdateFilialTimezoneMutation as b7,
  useUpdateFilialQuotaMutation as b8,
  useGetFilialQuotaQuery as b9,
  BlockIcon as bA,
  LockOpenIcon as bB,
  DelIcon as bC,
  WarningCircleIcon as bD,
  ServerIcon as bE,
  DatabaseIcon as bF,
  getIndicatorByUserStatus as bG,
  getGenderString as bH,
  CircleCloseIcon as bI,
  InfoIcon as bJ,
  calculatePercentage as bK,
  useGetUserInfoQuery as bL,
  useChangeStatusesMutation as bM,
  useRemoveUsersMutation as bN,
  useCheckRemoveStatusMutation as bO,
  RoleTypesEnum$1 as bP,
  useLazyLoginAsQuery as bQ,
  useLazySendEmailServerQuery as bR,
  useUpdateUserInfoMutation as bS,
  isAdmin as bT,
  ErrorsEnum as bU,
  useCreateRoleMutation as bV,
  directoriesApi as bW,
  RoleTypesEnum as bX,
  useGetRolesForUserQuery as bY,
  useGetRolesWithCounterQuery as bZ,
  useBulkAddRolesMutation as b_,
  useUpdateFilialSettingsMutation as ba,
  useDeleteQuotaMutation as bb,
  useCreateQuotaMutation as bc,
  useUpdateQuotaMutation as bd,
  useGetQuotasQuery as be,
  useSetQuotaByRoleMutation as bf,
  QuotaRulesEnum as bg,
  isSuperAdmin as bh,
  useDeleteQuotaRelationMutation as bi,
  canEditRole as bj,
  EditProfileIcon as bk,
  useGetDefaultQuotaRelationFiltersQuery as bl,
  listSizes as bm,
  useGetQuotasRelationsQuery as bn,
  useGetUsersActionsFilterQuery as bo,
  useAddQuotaRelationsMutation as bp,
  useEditQuotaRelationsMutation as bq,
  limitsLengthFilialFields as br,
  theme as bs,
  getActiveFiltersLengths as bt,
  useGetFilterListItemsQuery$1 as bu,
  ConfirmMailIcon as bv,
  WriteMailIcon as bw,
  AddRoleIcon as bx,
  XIcon as by,
  LoginAsIcon as bz,
  useAppSelector as c,
  useGetDefaultUsersActionsFiltersQuery as c$,
  CalendarIcon as c0,
  ContactHoverCardWidget as c1,
  useLazyEmailActivationQuery as c2,
  useCloseseSsionsMutation as c3,
  ArrowLeftIcon as c4,
  useGetFilialsQuery as c5,
  FilialsIcon as c6,
  BellIcon as c7,
  BellCogIcon as c8,
  ChecklistIcon as c9,
  generateUUID as cA,
  useDeleteAvatarMutation as cB,
  useLazyResetPasswordQuery as cC,
  useLazyCheckExistsEmailForLinkQuery as cD,
  useGetEmailServerQuery as cE,
  useLazyGetPasswordRulesQuery as cF,
  useLazyCreateEmailWithoutLinkedUserQuery as cG,
  useLazyChangeEmailLoginQuery as cH,
  useLazyChangePasswordLinkedUserEmailQuery as cI,
  isFeature as cJ,
  SettingsIcon as cK,
  NotificationNavIcon as cL,
  RocketIcon as cM,
  useCommonSettingsQuery as cN,
  useLazySyncTeamSettingsQuery as cO,
  useChangeCommonSettingsMutation as cP,
  useLazyCommonSettingsQuery as cQ,
  useUpdateProductNotificationMutation as cR,
  commonSettingsApi as cS,
  useGetProductNotificationQuery as cT,
  IUserActivitySortField as cU,
  useGetUserActivityQuery as cV,
  useLazyGetUserActivityQuery as cW,
  IDiskSpaceSortField as cX,
  useGetDiskSpaceQuery as cY,
  useLazyGetDiskSpaceQuery as cZ,
  initialStatisticFilter as c_,
  useLazyCheckUserExistFieldQuery as ca,
  GenderEnum as cb,
  useDeleteFilialsMutation as cc,
  filialsApi as cd,
  useDeleteRolesMutation as ce,
  useDeleteRoleMutation as cf,
  PlusIcon as cg,
  useEditRolesMutation as ch,
  useGetRolesInfoCommonQuery as ci,
  useLazyGetQuotasQuery as cj,
  useGetModuleRolesQuery as ck,
  useGetModuleUsersQuery as cl,
  useAddModuleRoleMutation as cm,
  useAddModuleUserMutation as cn,
  useDeleteModuleRoleMutation as co,
  useDeleteModuleUserMutation as cp,
  useLazyUpdateInvitationLinkQuery as cq,
  setToEndOFDate as cr,
  useDeleteInvitationLinkMutation as cs,
  useLazyCreateInvitationLinkQuery as ct,
  useLazyGetInvitationLinksListQuery as cu,
  useImageUrl as cv,
  Modules as cw,
  AccessType as cx,
  useLazyCurrentUserQuery as cy,
  useLazyGetUserInfoQuery as cz,
  resetAllApiState as d,
  useLazyGetUsersActionsReportQuery as d0,
  useGetUsersActionsListQuery as d1,
  notificationApi as d2,
  UserAvatar$1 as d3,
  userApi$1 as d4,
  NotificationsList as d5,
  Dictionary2 as d6,
  Module as d7,
  useCurrentUser as d8,
  useGetNotificationSettingsQuery as d9,
  useUpdateNotificationSettingsMutation as da,
  isCrypt as e,
  useGetDefaultUserFiltersQuery as f,
  getColorsByRole as g,
  filtersLabelsKeys as h,
  isSaaS as i,
  useChangeRolesMutation as j,
  kerberosRedirectLink as k,
  useLazyGetUsersQuery as l,
  universalNotification as m,
  numberToUserStatus as n,
  useLazyBulkForgotQuery as o,
  useBulkChangeFilialMutation as p,
  useLazyVerifyEmailServersQuery as q,
  redirectIfAuth as r,
  ssoRedirectLink as s,
  extractErrorCode as t,
  useLazyLoginQuery as u,
  generateErrorMessage as v,
  getUsersIdBySelect as w,
  styleScroll as x,
  SearchIcon as y,
  transformConditionals as z
};
//# sourceMappingURL=index-DfebxkL9.js.map
