wcz-layout 6.7.2 → 8.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Approval-BTJTexDo.js +143 -0
- package/dist/Approval-BTJTexDo.js.map +1 -0
- package/dist/DialogsContext-DLqA8RJ_.js +7 -0
- package/dist/DialogsContext-DLqA8RJ_.js.map +1 -0
- package/dist/Email-C9qwj7GD.js +20 -0
- package/dist/Email-C9qwj7GD.js.map +1 -0
- package/dist/FileMeta-DDqUju1Y.js +19 -0
- package/dist/FileMeta-DDqUju1Y.js.map +1 -0
- package/dist/FileMeta-ILLTOjaM.d.ts +20 -0
- package/dist/NotificationContext-CgwUOeW0.js +7 -0
- package/dist/NotificationContext-CgwUOeW0.js.map +1 -0
- package/dist/RouterListItemButton-owZVvuC_.js +78 -0
- package/dist/RouterListItemButton-owZVvuC_.js.map +1 -0
- package/dist/User-CT_IDGuG.d.ts +15 -0
- package/dist/apiMiddleware-CtY4rOFU.js +23 -0
- package/dist/apiMiddleware-CtY4rOFU.js.map +1 -0
- package/dist/components.d.ts +118 -0
- package/dist/components.js +1554 -0
- package/dist/components.js.map +1 -0
- package/dist/data/client.d.ts +3111 -0
- package/dist/data/client.js +188 -0
- package/dist/data/client.js.map +1 -0
- package/dist/data/server.d.ts +19 -0
- package/dist/data/server.js +16 -0
- package/dist/data/server.js.map +1 -0
- package/dist/data.d.ts +7 -0
- package/dist/data.js +2 -0
- package/dist/env-ON-cyE3N.js +31 -0
- package/dist/env-ON-cyE3N.js.map +1 -0
- package/dist/file-BUdLb7H1.js +148 -0
- package/dist/file-BUdLb7H1.js.map +1 -0
- package/dist/file-Dsht7yOP.js +100 -0
- package/dist/file-Dsht7yOP.js.map +1 -0
- package/dist/hooks.d.ts +226 -0
- package/dist/hooks.js +1180 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +2106 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware.d.ts +47 -0
- package/dist/middleware.js +80 -0
- package/dist/middleware.js.map +1 -0
- package/dist/models.d.ts +474 -0
- package/dist/models.js +74 -0
- package/dist/models.js.map +1 -0
- package/dist/msalClient-CYiQAFnY.d.ts +15 -0
- package/dist/msalServer-B9sVqpQ2.js +47 -0
- package/dist/msalServer-B9sVqpQ2.js.map +1 -0
- package/dist/peoplesoft-BCjRje6b.js +240 -0
- package/dist/peoplesoft-BCjRje6b.js.map +1 -0
- package/dist/peoplesoft-Cze2ngGd.d.ts +1150 -0
- package/dist/queryClient-D64McLhZ.js +7 -0
- package/dist/queryClient-D64McLhZ.js.map +1 -0
- package/dist/useDialogs-BJVhBr8S.js +248 -0
- package/dist/useDialogs-BJVhBr8S.js.map +1 -0
- package/dist/utils-BMUmv2ws.js +191 -0
- package/dist/utils-BMUmv2ws.js.map +1 -0
- package/dist/utils-CvvyM8Xw.d.ts +56 -0
- package/dist/utils.d.ts +21 -0
- package/dist/utils.js +6 -0
- package/dist/vite.d.ts +7 -0
- package/dist/vite.js +147 -0
- package/dist/vite.js.map +1 -0
- package/package.json +158 -62
- package/skills/client-db/SKILL.md +107 -0
- package/skills/data-grid/SKILL.md +147 -0
- package/skills/db-schema/SKILL.md +68 -0
- package/skills/dialogs/SKILL.md +79 -0
- package/skills/forms/SKILL.md +82 -0
- package/skills/general/SKILL.md +17 -0
- package/skills/notifications/SKILL.md +43 -0
- package/skills/routing/SKILL.md +123 -0
- package/skills/server-functions/SKILL.md +109 -0
- package/skills/services/SKILL.md +28 -0
- package/skills/services/docs/approval.md +204 -0
- package/skills/services/docs/email.md +32 -0
- package/skills/services/docs/file.md +85 -0
- package/skills/services/docs/peoplesoft.md +110 -0
- package/skills/start/SKILL.md +46 -0
- package/skills/start/steps/01-git-setup.md +10 -0
- package/skills/start/steps/02-project-name-setup.md +14 -0
- package/skills/start/steps/03-apm-setup.md +208 -0
- package/skills/start/steps/04-database-setup.md +37 -0
- package/skills/start/steps/05-entra-setup.md +59 -0
- package/skills/start/steps/06-vault-setup.md +53 -0
- package/skills/start/steps/07-generate-favicon.md +10 -0
- package/skills/start/steps/08-commit.md +15 -0
- package/dist/src/components/Layout.d.ts +0 -16
- package/dist/src/components/Layout.js +0 -122
- package/dist/src/components/Layout.js.map +0 -1
- package/dist/src/components/dataGrid/ChipInputCell.d.ts +0 -9
- package/dist/src/components/dataGrid/ChipInputCell.js +0 -17
- package/dist/src/components/dataGrid/ChipInputCell.js.map +0 -1
- package/dist/src/components/dataGrid/EditableColumnHeader.d.ts +0 -2
- package/dist/src/components/dataGrid/EditableColumnHeader.js +0 -7
- package/dist/src/components/dataGrid/EditableColumnHeader.js.map +0 -1
- package/dist/src/components/dataGrid/GridToolbar.d.ts +0 -8
- package/dist/src/components/dataGrid/GridToolbar.js +0 -40
- package/dist/src/components/dataGrid/GridToolbar.js.map +0 -1
- package/dist/src/components/dataGrid/TableContainer.d.ts +0 -3
- package/dist/src/components/dataGrid/TableContainer.js +0 -32
- package/dist/src/components/dataGrid/TableContainer.js.map +0 -1
- package/dist/src/components/form/FormAutocomplete.d.ts +0 -7
- package/dist/src/components/form/FormAutocomplete.js +0 -10
- package/dist/src/components/form/FormAutocomplete.js.map +0 -1
- package/dist/src/components/form/FormCheckbox.d.ts +0 -7
- package/dist/src/components/form/FormCheckbox.js +0 -11
- package/dist/src/components/form/FormCheckbox.js.map +0 -1
- package/dist/src/components/form/FormDatePicker.d.ts +0 -9
- package/dist/src/components/form/FormDatePicker.js +0 -19
- package/dist/src/components/form/FormDatePicker.js.map +0 -1
- package/dist/src/components/form/FormDateTimePicker.d.ts +0 -9
- package/dist/src/components/form/FormDateTimePicker.js +0 -19
- package/dist/src/components/form/FormDateTimePicker.js.map +0 -1
- package/dist/src/components/form/FormNumberField.d.ts +0 -12
- package/dist/src/components/form/FormNumberField.js +0 -12
- package/dist/src/components/form/FormNumberField.js.map +0 -1
- package/dist/src/components/form/FormRadioGroup.d.ts +0 -13
- package/dist/src/components/form/FormRadioGroup.js +0 -11
- package/dist/src/components/form/FormRadioGroup.js.map +0 -1
- package/dist/src/components/form/FormSlider.d.ts +0 -7
- package/dist/src/components/form/FormSlider.js +0 -11
- package/dist/src/components/form/FormSlider.js.map +0 -1
- package/dist/src/components/form/FormSubmitButton.d.ts +0 -5
- package/dist/src/components/form/FormSubmitButton.js +0 -13
- package/dist/src/components/form/FormSubmitButton.js.map +0 -1
- package/dist/src/components/form/FormSwitch.d.ts +0 -7
- package/dist/src/components/form/FormSwitch.js +0 -11
- package/dist/src/components/form/FormSwitch.js.map +0 -1
- package/dist/src/components/form/FormTextField.d.ts +0 -7
- package/dist/src/components/form/FormTextField.js +0 -11
- package/dist/src/components/form/FormTextField.js.map +0 -1
- package/dist/src/components/layout/AccountMenu.d.ts +0 -9
- package/dist/src/components/layout/AccountMenu.js +0 -44
- package/dist/src/components/layout/AccountMenu.js.map +0 -1
- package/dist/src/components/layout/DevelopmentBanner.d.ts +0 -7
- package/dist/src/components/layout/DevelopmentBanner.js +0 -29
- package/dist/src/components/layout/DevelopmentBanner.js.map +0 -1
- package/dist/src/components/layout/ErrorPage.d.ts +0 -2
- package/dist/src/components/layout/ErrorPage.js +0 -25
- package/dist/src/components/layout/ErrorPage.js.map +0 -1
- package/dist/src/components/layout/LayoutDialog.d.ts +0 -12
- package/dist/src/components/layout/LayoutDialog.js +0 -12
- package/dist/src/components/layout/LayoutDialog.js.map +0 -1
- package/dist/src/components/layout/LayoutSnackbar.d.ts +0 -8
- package/dist/src/components/layout/LayoutSnackbar.js +0 -25
- package/dist/src/components/layout/LayoutSnackbar.js.map +0 -1
- package/dist/src/components/layout/NavigationDrawer.d.ts +0 -11
- package/dist/src/components/layout/NavigationDrawer.js +0 -70
- package/dist/src/components/layout/NavigationDrawer.js.map +0 -1
- package/dist/src/components/layout/NotificationMenu.d.ts +0 -8
- package/dist/src/components/layout/NotificationMenu.js +0 -26
- package/dist/src/components/layout/NotificationMenu.js.map +0 -1
- package/dist/src/components/layout/TypographyWithIcon.d.ts +0 -7
- package/dist/src/components/layout/TypographyWithIcon.js +0 -22
- package/dist/src/components/layout/TypographyWithIcon.js.map +0 -1
- package/dist/src/components/layout/Unauthorized.d.ts +0 -2
- package/dist/src/components/layout/Unauthorized.js +0 -26
- package/dist/src/components/layout/Unauthorized.js.map +0 -1
- package/dist/src/contexts/LayoutContext.d.ts +0 -40
- package/dist/src/contexts/LayoutContext.js +0 -60
- package/dist/src/contexts/LayoutContext.js.map +0 -1
- package/dist/src/contexts/UserContext.d.ts +0 -24
- package/dist/src/contexts/UserContext.js +0 -55
- package/dist/src/contexts/UserContext.js.map +0 -1
- package/dist/src/hooks/FormHooks.d.ts +0 -46
- package/dist/src/hooks/FormHooks.js +0 -31
- package/dist/src/hooks/FormHooks.js.map +0 -1
- package/dist/src/hooks/UseSnackbar.d.ts +0 -10
- package/dist/src/hooks/UseSnackbar.js +0 -23
- package/dist/src/hooks/UseSnackbar.js.map +0 -1
- package/dist/src/hooks/UseUser.d.ts +0 -10
- package/dist/src/hooks/UseUser.js +0 -25
- package/dist/src/hooks/UseUser.js.map +0 -1
- package/dist/src/index.d.ts +0 -20
- package/dist/src/index.js +0 -15
- package/dist/src/index.js.map +0 -1
- package/dist/src/models/Error.d.ts +0 -6
- package/dist/src/models/Error.js +0 -2
- package/dist/src/models/Error.js.map +0 -1
- package/dist/src/models/KeycloakSettings.d.ts +0 -8
- package/dist/src/models/KeycloakSettings.js +0 -2
- package/dist/src/models/KeycloakSettings.js.map +0 -1
- package/dist/src/models/LayoutPaletteColorOptions.d.ts +0 -6
- package/dist/src/models/LayoutPaletteColorOptions.js +0 -2
- package/dist/src/models/LayoutPaletteColorOptions.js.map +0 -1
- package/dist/src/models/LayoutRoute.d.ts +0 -14
- package/dist/src/models/LayoutRoute.js +0 -2
- package/dist/src/models/LayoutRoute.js.map +0 -1
- package/dist/src/models/Notification.d.ts +0 -9
- package/dist/src/models/Notification.js +0 -2
- package/dist/src/models/Notification.js.map +0 -1
- package/dist/src/models/PeoplesoftDepartment.d.ts +0 -14
- package/dist/src/models/PeoplesoftDepartment.js +0 -2
- package/dist/src/models/PeoplesoftDepartment.js.map +0 -1
- package/dist/src/models/PeoplesoftEmployee.d.ts +0 -34
- package/dist/src/models/PeoplesoftEmployee.js +0 -2
- package/dist/src/models/PeoplesoftEmployee.js.map +0 -1
- package/dist/src/models/Snackbar.d.ts +0 -15
- package/dist/src/models/Snackbar.js +0 -2
- package/dist/src/models/Snackbar.js.map +0 -1
- package/dist/src/models/User.d.ts +0 -27
- package/dist/src/models/User.js +0 -11
- package/dist/src/models/User.js.map +0 -1
- package/dist/src/models/types/EmployeeCategoryGroup.d.ts +0 -1
- package/dist/src/models/types/EmployeeCategoryGroup.js +0 -2
- package/dist/src/models/types/EmployeeCategoryGroup.js.map +0 -1
- package/dist/src/models/types/EmployeeStatus.d.ts +0 -1
- package/dist/src/models/types/EmployeeStatus.js +0 -2
- package/dist/src/models/types/EmployeeStatus.js.map +0 -1
- package/dist/src/utils/Auth.d.ts +0 -12
- package/dist/src/utils/Auth.js +0 -49
- package/dist/src/utils/Auth.js.map +0 -1
- package/dist/src/utils/Fetches.d.ts +0 -5
- package/dist/src/utils/Fetches.js +0 -66
- package/dist/src/utils/Fetches.js.map +0 -1
- package/dist/src/utils/FormUtils.d.ts +0 -7
- package/dist/src/utils/FormUtils.js +0 -9
- package/dist/src/utils/FormUtils.js.map +0 -1
- package/dist/src/utils/Helpers.d.ts +0 -11
- package/dist/src/utils/Helpers.js +0 -26
- package/dist/src/utils/Helpers.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/components/Layout.tsx +0 -183
- package/src/components/dataGrid/ChipInputCell.tsx +0 -31
- package/src/components/dataGrid/EditableColumnHeader.tsx +0 -7
- package/src/components/dataGrid/GridToolbar.tsx +0 -63
- package/src/components/dataGrid/TableContainer.tsx +0 -39
- package/src/components/form/FormAutocomplete.tsx +0 -34
- package/src/components/form/FormCheckbox.tsx +0 -32
- package/src/components/form/FormDatePicker.tsx +0 -34
- package/src/components/form/FormDateTimePicker.tsx +0 -34
- package/src/components/form/FormNumberField.tsx +0 -33
- package/src/components/form/FormRadioGroup.tsx +0 -43
- package/src/components/form/FormSlider.tsx +0 -28
- package/src/components/form/FormSubmitButton.tsx +0 -29
- package/src/components/form/FormSwitch.tsx +0 -32
- package/src/components/form/FormTextField.tsx +0 -26
- package/src/components/layout/AccountMenu.tsx +0 -160
- package/src/components/layout/DevelopmentBanner.tsx +0 -54
- package/src/components/layout/ErrorPage.tsx +0 -34
- package/src/components/layout/LayoutDialog.tsx +0 -50
- package/src/components/layout/LayoutSnackbar.tsx +0 -44
- package/src/components/layout/NavigationDrawer.tsx +0 -131
- package/src/components/layout/NotificationMenu.tsx +0 -76
- package/src/components/layout/TypographyWithIcon.tsx +0 -35
- package/src/components/layout/Unauthorized.tsx +0 -37
- package/src/contexts/LayoutContext.tsx +0 -127
- package/src/contexts/UserContext.tsx +0 -88
- package/src/hooks/FormHooks.ts +0 -33
- package/src/hooks/UseSnackbar.tsx +0 -28
- package/src/hooks/UseUser.tsx +0 -29
- package/src/index.ts +0 -27
- package/src/models/Error.tsx +0 -6
- package/src/models/KeycloakSettings.ts +0 -8
- package/src/models/LayoutPaletteColorOptions.tsx +0 -7
- package/src/models/LayoutRoute.ts +0 -15
- package/src/models/Notification.ts +0 -10
- package/src/models/PeoplesoftDepartment.ts +0 -15
- package/src/models/PeoplesoftEmployee.ts +0 -35
- package/src/models/Snackbar.ts +0 -16
- package/src/models/User.ts +0 -13
- package/src/models/types/EmployeeCategoryGroup.ts +0 -1
- package/src/models/types/EmployeeStatus.ts +0 -1
- package/src/utils/Auth.ts +0 -58
- package/src/utils/Fetches.ts +0 -83
- package/src/utils/FormUtils.ts +0 -22
- package/src/utils/Helpers.ts +0 -27
- package/tsconfig.json +0 -29
package/dist/index.js
ADDED
|
@@ -0,0 +1,2106 @@
|
|
|
1
|
+
import { t as clientEnv } from "./env-ON-cyE3N.js";
|
|
2
|
+
import { c as TanStackNavigationClient, d as pca, l as getAccessToken, n as WISTRON_PRIMARY_COLOR, r as WISTRON_SECONDARY_COLOR, s as rootRouteHead, t as Platform, u as getUser } from "./utils-BMUmv2ws.js";
|
|
3
|
+
import { t as queryClient } from "./queryClient-D64McLhZ.js";
|
|
4
|
+
import { n as RouterIconButton, t as RouterListItemButton } from "./RouterListItemButton-owZVvuC_.js";
|
|
5
|
+
import { t as DialogsContext } from "./DialogsContext-DLqA8RJ_.js";
|
|
6
|
+
import { t as NotificationContext } from "./NotificationContext-CgwUOeW0.js";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { AppBar, Avatar, Box, Chip, Collapse, CssBaseline, Grow, IconButton, InitColorSchemeScript, List, ListItem, ListItemButton, ListItemIcon, ListItemText, ListSubheader, Menu, Stack, ThemeProvider, Toolbar, Typography, useColorScheme } from "@mui/material";
|
|
9
|
+
import { LocalizationProvider } from "@mui/x-date-pickers";
|
|
10
|
+
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
11
|
+
import dayjs from "dayjs";
|
|
12
|
+
import i18n from "i18next";
|
|
13
|
+
import LanguageDetector from "i18next-browser-languagedetector";
|
|
14
|
+
import { Fragment, useEffect, useId, useRef, useState } from "react";
|
|
15
|
+
import { initReactI18next, useTranslation } from "react-i18next";
|
|
16
|
+
import { resources } from "virtual:wcz-layout";
|
|
17
|
+
import * as z$2 from "zod";
|
|
18
|
+
import z$1 from "zod";
|
|
19
|
+
import { EventType, InteractionStatus, InteractionType } from "@azure/msal-browser";
|
|
20
|
+
import { AuthenticatedTemplate, MsalAuthenticationTemplate, MsalProvider, UnauthenticatedTemplate, useMsal } from "@azure/msal-react";
|
|
21
|
+
import Menu$1 from "@mui/icons-material/Menu";
|
|
22
|
+
import MenuOpen from "@mui/icons-material/MenuOpen";
|
|
23
|
+
import { styled } from "@mui/material/styles";
|
|
24
|
+
import { rootRouteId, useLocation, useMatch, useMatches, useNavigate, useRouter } from "@tanstack/react-router";
|
|
25
|
+
import AccountCircle from "@mui/icons-material/AccountCircle";
|
|
26
|
+
import ArrowBack from "@mui/icons-material/ArrowBack";
|
|
27
|
+
import Brightness4 from "@mui/icons-material/Brightness4";
|
|
28
|
+
import ChevronRight from "@mui/icons-material/ChevronRight";
|
|
29
|
+
import DarkMode from "@mui/icons-material/DarkMode";
|
|
30
|
+
import Done from "@mui/icons-material/Done";
|
|
31
|
+
import LightMode from "@mui/icons-material/LightMode";
|
|
32
|
+
import Login from "@mui/icons-material/Login";
|
|
33
|
+
import Logout from "@mui/icons-material/Logout";
|
|
34
|
+
import SettingsBrightness from "@mui/icons-material/SettingsBrightness";
|
|
35
|
+
import Translate from "@mui/icons-material/Translate";
|
|
36
|
+
import { createCollection, useLiveSuspenseQuery } from "@tanstack/react-db";
|
|
37
|
+
import { queryCollectionOptions } from "@tanstack/query-db-collection";
|
|
38
|
+
import axios from "axios";
|
|
39
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
40
|
+
import Drawer from "@mui/material/Drawer";
|
|
41
|
+
import Box$1 from "@mui/material/Box";
|
|
42
|
+
import Divider$1 from "@mui/material/Divider";
|
|
43
|
+
import List$1 from "@mui/material/List";
|
|
44
|
+
import ListSubheader$1 from "@mui/material/ListSubheader";
|
|
45
|
+
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
46
|
+
import Avatar$1 from "@mui/material/Avatar";
|
|
47
|
+
import ListItem$1 from "@mui/material/ListItem";
|
|
48
|
+
import ListItemButton$1 from "@mui/material/ListItemButton";
|
|
49
|
+
import ListItemIcon$1 from "@mui/material/ListItemIcon";
|
|
50
|
+
import ListItemText$1 from "@mui/material/ListItemText";
|
|
51
|
+
import Paper from "@mui/material/Paper";
|
|
52
|
+
import Typography$1 from "@mui/material/Typography";
|
|
53
|
+
import useEventCallback$1 from "@mui/utils/useEventCallback";
|
|
54
|
+
import Alert from "@mui/material/Alert";
|
|
55
|
+
import Snackbar from "@mui/material/Snackbar";
|
|
56
|
+
//#region src/hooks/useIsPublicRoute.ts
|
|
57
|
+
function useIsPublicRoute(publicRoutes) {
|
|
58
|
+
const $ = c(5);
|
|
59
|
+
if ($[0] !== "2b14d21a0227e1b288d0a1b84aa716ca71cddc80700f78740c3db9c95bbea547") {
|
|
60
|
+
for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
61
|
+
$[0] = "2b14d21a0227e1b288d0a1b84aa716ca71cddc80700f78740c3db9c95bbea547";
|
|
62
|
+
}
|
|
63
|
+
const matches = useMatches();
|
|
64
|
+
let t0;
|
|
65
|
+
let t1;
|
|
66
|
+
if ($[1] !== matches || $[2] !== publicRoutes) {
|
|
67
|
+
t1 = Symbol.for("react.early_return_sentinel");
|
|
68
|
+
bb0: {
|
|
69
|
+
const currentRoutePath = matches.at(-1)?.fullPath;
|
|
70
|
+
if (currentRoutePath === void 0) {
|
|
71
|
+
t1 = false;
|
|
72
|
+
break bb0;
|
|
73
|
+
}
|
|
74
|
+
t0 = publicRoutes?.includes(currentRoutePath) ?? false;
|
|
75
|
+
}
|
|
76
|
+
$[1] = matches;
|
|
77
|
+
$[2] = publicRoutes;
|
|
78
|
+
$[3] = t0;
|
|
79
|
+
$[4] = t1;
|
|
80
|
+
} else {
|
|
81
|
+
t0 = $[3];
|
|
82
|
+
t1 = $[4];
|
|
83
|
+
}
|
|
84
|
+
if (t1 !== Symbol.for("react.early_return_sentinel")) return t1;
|
|
85
|
+
return t0;
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/lib/db/collections/userCollection.ts
|
|
89
|
+
const api = axios.create({ baseURL: "https://graph.microsoft.com/v1.0" });
|
|
90
|
+
api.interceptors.request.use(async (config) => {
|
|
91
|
+
const accessToken = await getAccessToken("graph");
|
|
92
|
+
config.headers.set("Authorization", `Bearer ${accessToken}`);
|
|
93
|
+
return config;
|
|
94
|
+
});
|
|
95
|
+
const userPhotoSchema = z$2.object({
|
|
96
|
+
id: z$2.string(),
|
|
97
|
+
photoUrl: z$2.string()
|
|
98
|
+
});
|
|
99
|
+
const fetchProfilePhoto = async () => {
|
|
100
|
+
const response = await api.get("/me/photo/$value", { responseType: "arraybuffer" });
|
|
101
|
+
return [{
|
|
102
|
+
id: "me",
|
|
103
|
+
photoUrl: `data:image/jpeg;base64,${btoa(new Uint8Array(response.data).reduce((data, byte) => data + String.fromCodePoint(byte), ""))}`
|
|
104
|
+
}];
|
|
105
|
+
};
|
|
106
|
+
const userPhotoCollection = createCollection(queryCollectionOptions({
|
|
107
|
+
queryKey: [
|
|
108
|
+
"graph",
|
|
109
|
+
"me",
|
|
110
|
+
"photo"
|
|
111
|
+
],
|
|
112
|
+
schema: userPhotoSchema,
|
|
113
|
+
queryFn: fetchProfilePhoto,
|
|
114
|
+
getKey: (item) => item.id,
|
|
115
|
+
queryClient,
|
|
116
|
+
staleTime: Infinity,
|
|
117
|
+
gcTime: Infinity
|
|
118
|
+
}));
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/components/core/account/UserAvatar.tsx
|
|
121
|
+
const UserAvatar = () => {
|
|
122
|
+
const $ = c(4);
|
|
123
|
+
if ($[0] !== "fe87d0a8f8e6330656e92b7b39ef1fd103fc722be844f8e953943b9b908d05c3") {
|
|
124
|
+
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
125
|
+
$[0] = "fe87d0a8f8e6330656e92b7b39ef1fd103fc722be844f8e953943b9b908d05c3";
|
|
126
|
+
}
|
|
127
|
+
const { data } = useLiveSuspenseQuery(_temp$5);
|
|
128
|
+
const t0 = data?.photoUrl;
|
|
129
|
+
let t1;
|
|
130
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
131
|
+
t1 = {
|
|
132
|
+
width: {
|
|
133
|
+
xs: 32,
|
|
134
|
+
sm: 40
|
|
135
|
+
},
|
|
136
|
+
height: {
|
|
137
|
+
xs: 32,
|
|
138
|
+
sm: 40
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
$[1] = t1;
|
|
142
|
+
} else t1 = $[1];
|
|
143
|
+
let t2;
|
|
144
|
+
if ($[2] !== t0) {
|
|
145
|
+
t2 = /* @__PURE__ */ jsx(Avatar, {
|
|
146
|
+
src: t0,
|
|
147
|
+
sx: t1
|
|
148
|
+
});
|
|
149
|
+
$[2] = t0;
|
|
150
|
+
$[3] = t2;
|
|
151
|
+
} else t2 = $[3];
|
|
152
|
+
return t2;
|
|
153
|
+
};
|
|
154
|
+
function _temp$5(q) {
|
|
155
|
+
return q.from({ todo: userPhotoCollection }).findOne();
|
|
156
|
+
}
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/components/core/account/UserMenu.tsx
|
|
159
|
+
const capitalize = (value) => value && value.charAt(0).toUpperCase() + value.slice(1);
|
|
160
|
+
const ToolbarAccount = () => {
|
|
161
|
+
const $ = c(144);
|
|
162
|
+
if ($[0] !== "84c87a6825af128ab10aa41db6c5cf025ed10410a455a71c2f9541b09b66a67c") {
|
|
163
|
+
for (let $i = 0; $i < 144; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
164
|
+
$[0] = "84c87a6825af128ab10aa41db6c5cf025ed10410a455a71c2f9541b09b66a67c";
|
|
165
|
+
}
|
|
166
|
+
const [anchorElement, setAnchorElement] = useState();
|
|
167
|
+
const [tab, setTab] = useState("settings");
|
|
168
|
+
const open = Boolean(anchorElement);
|
|
169
|
+
const { t, i18n } = useTranslation();
|
|
170
|
+
const { mode, setMode } = useColorScheme();
|
|
171
|
+
const { instance } = useMsal();
|
|
172
|
+
let t0;
|
|
173
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
174
|
+
t0 = { from: rootRouteId };
|
|
175
|
+
$[1] = t0;
|
|
176
|
+
} else t0 = $[1];
|
|
177
|
+
const user = useMatch(t0).context.user;
|
|
178
|
+
let T0;
|
|
179
|
+
let closeMenu;
|
|
180
|
+
let openMenu;
|
|
181
|
+
let settings;
|
|
182
|
+
let t1;
|
|
183
|
+
let t2;
|
|
184
|
+
let theme;
|
|
185
|
+
if ($[2] !== i18n || $[3] !== mode || $[4] !== setMode || $[5] !== t) {
|
|
186
|
+
const supportedLanguages = (Array.isArray(i18n.options.supportedLngs) ? i18n.options.supportedLngs : []).filter(_temp$4);
|
|
187
|
+
const languageDisplayNames = new Intl.DisplayNames([i18n.language], { type: "language" });
|
|
188
|
+
let t3;
|
|
189
|
+
if ($[13] !== t) {
|
|
190
|
+
t3 = t("Layout.Light");
|
|
191
|
+
$[13] = t;
|
|
192
|
+
$[14] = t3;
|
|
193
|
+
} else t3 = $[14];
|
|
194
|
+
let t4;
|
|
195
|
+
if ($[15] !== t3) {
|
|
196
|
+
t4 = {
|
|
197
|
+
mode: "light",
|
|
198
|
+
icon: LightMode,
|
|
199
|
+
label: t3
|
|
200
|
+
};
|
|
201
|
+
$[15] = t3;
|
|
202
|
+
$[16] = t4;
|
|
203
|
+
} else t4 = $[16];
|
|
204
|
+
let t5;
|
|
205
|
+
if ($[17] !== t) {
|
|
206
|
+
t5 = t("Layout.Dark");
|
|
207
|
+
$[17] = t;
|
|
208
|
+
$[18] = t5;
|
|
209
|
+
} else t5 = $[18];
|
|
210
|
+
let t6;
|
|
211
|
+
if ($[19] !== t5) {
|
|
212
|
+
t6 = {
|
|
213
|
+
mode: "dark",
|
|
214
|
+
icon: DarkMode,
|
|
215
|
+
label: t5
|
|
216
|
+
};
|
|
217
|
+
$[19] = t5;
|
|
218
|
+
$[20] = t6;
|
|
219
|
+
} else t6 = $[20];
|
|
220
|
+
let t7;
|
|
221
|
+
if ($[21] !== t) {
|
|
222
|
+
t7 = t("Layout.System");
|
|
223
|
+
$[21] = t;
|
|
224
|
+
$[22] = t7;
|
|
225
|
+
} else t7 = $[22];
|
|
226
|
+
let t8;
|
|
227
|
+
if ($[23] !== t7) {
|
|
228
|
+
t8 = {
|
|
229
|
+
mode: "system",
|
|
230
|
+
icon: SettingsBrightness,
|
|
231
|
+
label: t7
|
|
232
|
+
};
|
|
233
|
+
$[23] = t7;
|
|
234
|
+
$[24] = t8;
|
|
235
|
+
} else t8 = $[24];
|
|
236
|
+
let t9;
|
|
237
|
+
if ($[25] !== t4 || $[26] !== t6 || $[27] !== t8) {
|
|
238
|
+
t9 = [
|
|
239
|
+
t4,
|
|
240
|
+
t6,
|
|
241
|
+
t8
|
|
242
|
+
];
|
|
243
|
+
$[25] = t4;
|
|
244
|
+
$[26] = t6;
|
|
245
|
+
$[27] = t8;
|
|
246
|
+
$[28] = t9;
|
|
247
|
+
} else t9 = $[28];
|
|
248
|
+
const colorModes = t9;
|
|
249
|
+
let t10;
|
|
250
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
251
|
+
t10 = (event) => setAnchorElement(event.currentTarget);
|
|
252
|
+
$[29] = t10;
|
|
253
|
+
} else t10 = $[29];
|
|
254
|
+
openMenu = t10;
|
|
255
|
+
let t11;
|
|
256
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
257
|
+
t11 = () => {
|
|
258
|
+
setAnchorElement(void 0);
|
|
259
|
+
setTimeout(() => setTab("settings"), 300);
|
|
260
|
+
};
|
|
261
|
+
$[30] = t11;
|
|
262
|
+
} else t11 = $[30];
|
|
263
|
+
closeMenu = t11;
|
|
264
|
+
let t12;
|
|
265
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
266
|
+
t12 = (newTab) => () => setTab(newTab);
|
|
267
|
+
$[31] = t12;
|
|
268
|
+
} else t12 = $[31];
|
|
269
|
+
const changeTab = t12;
|
|
270
|
+
let t13;
|
|
271
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
272
|
+
t13 = { backgroundColor: "transparent" };
|
|
273
|
+
$[32] = t13;
|
|
274
|
+
} else t13 = $[32];
|
|
275
|
+
let t14;
|
|
276
|
+
if ($[33] !== t) {
|
|
277
|
+
t14 = t("Layout.Settings");
|
|
278
|
+
$[33] = t;
|
|
279
|
+
$[34] = t14;
|
|
280
|
+
} else t14 = $[34];
|
|
281
|
+
let t15;
|
|
282
|
+
if ($[35] !== t14) {
|
|
283
|
+
t15 = /* @__PURE__ */ jsx(ListSubheader, {
|
|
284
|
+
sx: t13,
|
|
285
|
+
children: t14
|
|
286
|
+
});
|
|
287
|
+
$[35] = t14;
|
|
288
|
+
$[36] = t15;
|
|
289
|
+
} else t15 = $[36];
|
|
290
|
+
let t16;
|
|
291
|
+
let t17;
|
|
292
|
+
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
293
|
+
t16 = changeTab("theme");
|
|
294
|
+
t17 = { py: .3 };
|
|
295
|
+
$[37] = t16;
|
|
296
|
+
$[38] = t17;
|
|
297
|
+
} else {
|
|
298
|
+
t16 = $[37];
|
|
299
|
+
t17 = $[38];
|
|
300
|
+
}
|
|
301
|
+
let t18;
|
|
302
|
+
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
303
|
+
t18 = /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Brightness4, {}) });
|
|
304
|
+
$[39] = t18;
|
|
305
|
+
} else t18 = $[39];
|
|
306
|
+
let t19;
|
|
307
|
+
if ($[40] !== t) {
|
|
308
|
+
t19 = t("Layout.Appearance");
|
|
309
|
+
$[40] = t;
|
|
310
|
+
$[41] = t19;
|
|
311
|
+
} else t19 = $[41];
|
|
312
|
+
let t20;
|
|
313
|
+
if ($[42] !== colorModes || $[43] !== mode || $[44] !== t) {
|
|
314
|
+
t20 = colorModes.find((m) => m.mode === mode)?.label ?? t("Layout.System");
|
|
315
|
+
$[42] = colorModes;
|
|
316
|
+
$[43] = mode;
|
|
317
|
+
$[44] = t;
|
|
318
|
+
$[45] = t20;
|
|
319
|
+
} else t20 = $[45];
|
|
320
|
+
let t21;
|
|
321
|
+
if ($[46] !== t19 || $[47] !== t20) {
|
|
322
|
+
t21 = /* @__PURE__ */ jsx(ListItemText, {
|
|
323
|
+
primary: t19,
|
|
324
|
+
secondary: t20
|
|
325
|
+
});
|
|
326
|
+
$[46] = t19;
|
|
327
|
+
$[47] = t20;
|
|
328
|
+
$[48] = t21;
|
|
329
|
+
} else t21 = $[48];
|
|
330
|
+
let t22;
|
|
331
|
+
if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
|
|
332
|
+
t22 = /* @__PURE__ */ jsx(ChevronRight, {});
|
|
333
|
+
$[49] = t22;
|
|
334
|
+
} else t22 = $[49];
|
|
335
|
+
let t23;
|
|
336
|
+
if ($[50] !== t21) {
|
|
337
|
+
t23 = /* @__PURE__ */ jsxs(ListItemButton, {
|
|
338
|
+
onClick: t16,
|
|
339
|
+
sx: t17,
|
|
340
|
+
children: [
|
|
341
|
+
t18,
|
|
342
|
+
t21,
|
|
343
|
+
t22
|
|
344
|
+
]
|
|
345
|
+
});
|
|
346
|
+
$[50] = t21;
|
|
347
|
+
$[51] = t23;
|
|
348
|
+
} else t23 = $[51];
|
|
349
|
+
let t24;
|
|
350
|
+
let t25;
|
|
351
|
+
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
352
|
+
t24 = changeTab("language");
|
|
353
|
+
t25 = { py: .3 };
|
|
354
|
+
$[52] = t24;
|
|
355
|
+
$[53] = t25;
|
|
356
|
+
} else {
|
|
357
|
+
t24 = $[52];
|
|
358
|
+
t25 = $[53];
|
|
359
|
+
}
|
|
360
|
+
let t26;
|
|
361
|
+
if ($[54] === Symbol.for("react.memo_cache_sentinel")) {
|
|
362
|
+
t26 = /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Translate, {}) });
|
|
363
|
+
$[54] = t26;
|
|
364
|
+
} else t26 = $[54];
|
|
365
|
+
let t27;
|
|
366
|
+
if ($[55] !== t) {
|
|
367
|
+
t27 = t("Layout.Language");
|
|
368
|
+
$[55] = t;
|
|
369
|
+
$[56] = t27;
|
|
370
|
+
} else t27 = $[56];
|
|
371
|
+
let t28;
|
|
372
|
+
if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
|
|
373
|
+
t28 = /* @__PURE__ */ jsx(ChevronRight, {});
|
|
374
|
+
$[57] = t28;
|
|
375
|
+
} else t28 = $[57];
|
|
376
|
+
const t29 = /* @__PURE__ */ jsxs(ListItemButton, {
|
|
377
|
+
onClick: t24,
|
|
378
|
+
sx: t25,
|
|
379
|
+
children: [
|
|
380
|
+
t26,
|
|
381
|
+
/* @__PURE__ */ jsx(ListItemText, {
|
|
382
|
+
primary: t27,
|
|
383
|
+
secondary: capitalize(languageDisplayNames.of(i18n.language))
|
|
384
|
+
}),
|
|
385
|
+
t28
|
|
386
|
+
]
|
|
387
|
+
});
|
|
388
|
+
let t30;
|
|
389
|
+
if ($[58] !== t15 || $[59] !== t23 || $[60] !== t29) {
|
|
390
|
+
t30 = /* @__PURE__ */ jsxs(List, {
|
|
391
|
+
component: "nav",
|
|
392
|
+
subheader: t15,
|
|
393
|
+
children: [t23, t29]
|
|
394
|
+
});
|
|
395
|
+
$[58] = t15;
|
|
396
|
+
$[59] = t23;
|
|
397
|
+
$[60] = t29;
|
|
398
|
+
$[61] = t30;
|
|
399
|
+
} else t30 = $[61];
|
|
400
|
+
settings = t30;
|
|
401
|
+
let t31;
|
|
402
|
+
let t32;
|
|
403
|
+
if ($[62] === Symbol.for("react.memo_cache_sentinel")) {
|
|
404
|
+
t31 = changeTab("settings");
|
|
405
|
+
t32 = {
|
|
406
|
+
backgroundColor: "transparent",
|
|
407
|
+
display: "flex",
|
|
408
|
+
alignItems: "center",
|
|
409
|
+
px: 1,
|
|
410
|
+
cursor: "pointer"
|
|
411
|
+
};
|
|
412
|
+
$[62] = t31;
|
|
413
|
+
$[63] = t32;
|
|
414
|
+
} else {
|
|
415
|
+
t31 = $[62];
|
|
416
|
+
t32 = $[63];
|
|
417
|
+
}
|
|
418
|
+
let t33;
|
|
419
|
+
if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
|
|
420
|
+
t33 = /* @__PURE__ */ jsx(IconButton, {
|
|
421
|
+
size: "small",
|
|
422
|
+
sx: { mr: .5 },
|
|
423
|
+
children: /* @__PURE__ */ jsx(ArrowBack, { fontSize: "small" })
|
|
424
|
+
});
|
|
425
|
+
$[64] = t33;
|
|
426
|
+
} else t33 = $[64];
|
|
427
|
+
let t34;
|
|
428
|
+
if ($[65] !== t) {
|
|
429
|
+
t34 = t("Layout.Appearance");
|
|
430
|
+
$[65] = t;
|
|
431
|
+
$[66] = t34;
|
|
432
|
+
} else t34 = $[66];
|
|
433
|
+
let t35;
|
|
434
|
+
if ($[67] !== t34) {
|
|
435
|
+
t35 = /* @__PURE__ */ jsxs(ListSubheader, {
|
|
436
|
+
onClick: t31,
|
|
437
|
+
sx: t32,
|
|
438
|
+
children: [
|
|
439
|
+
t33,
|
|
440
|
+
" ",
|
|
441
|
+
t34
|
|
442
|
+
]
|
|
443
|
+
});
|
|
444
|
+
$[67] = t34;
|
|
445
|
+
$[68] = t35;
|
|
446
|
+
} else t35 = $[68];
|
|
447
|
+
let t36;
|
|
448
|
+
if ($[69] !== colorModes || $[70] !== mode || $[71] !== setMode) {
|
|
449
|
+
t36 = colorModes.map((t37) => {
|
|
450
|
+
const { mode: modeValue, icon: Icon, label } = t37;
|
|
451
|
+
return /* @__PURE__ */ jsxs(ListItemButton, {
|
|
452
|
+
onClick: () => {
|
|
453
|
+
setMode(modeValue);
|
|
454
|
+
closeMenu();
|
|
455
|
+
},
|
|
456
|
+
selected: mode === modeValue,
|
|
457
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Icon, {}) }), /* @__PURE__ */ jsx(ListItemText, { primary: label })]
|
|
458
|
+
}, modeValue);
|
|
459
|
+
});
|
|
460
|
+
$[69] = colorModes;
|
|
461
|
+
$[70] = mode;
|
|
462
|
+
$[71] = setMode;
|
|
463
|
+
$[72] = t36;
|
|
464
|
+
} else t36 = $[72];
|
|
465
|
+
let t37;
|
|
466
|
+
if ($[73] !== t35 || $[74] !== t36) {
|
|
467
|
+
t37 = /* @__PURE__ */ jsx(List, {
|
|
468
|
+
subheader: t35,
|
|
469
|
+
children: t36
|
|
470
|
+
});
|
|
471
|
+
$[73] = t35;
|
|
472
|
+
$[74] = t36;
|
|
473
|
+
$[75] = t37;
|
|
474
|
+
} else t37 = $[75];
|
|
475
|
+
theme = t37;
|
|
476
|
+
T0 = List;
|
|
477
|
+
let t38;
|
|
478
|
+
let t39;
|
|
479
|
+
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
|
480
|
+
t38 = changeTab("settings");
|
|
481
|
+
t39 = {
|
|
482
|
+
backgroundColor: "transparent",
|
|
483
|
+
display: "flex",
|
|
484
|
+
alignItems: "center",
|
|
485
|
+
px: 1,
|
|
486
|
+
cursor: "pointer"
|
|
487
|
+
};
|
|
488
|
+
$[76] = t38;
|
|
489
|
+
$[77] = t39;
|
|
490
|
+
} else {
|
|
491
|
+
t38 = $[76];
|
|
492
|
+
t39 = $[77];
|
|
493
|
+
}
|
|
494
|
+
let t40;
|
|
495
|
+
if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
|
|
496
|
+
t40 = /* @__PURE__ */ jsx(IconButton, {
|
|
497
|
+
size: "small",
|
|
498
|
+
sx: { mr: .5 },
|
|
499
|
+
children: /* @__PURE__ */ jsx(ArrowBack, { fontSize: "small" })
|
|
500
|
+
});
|
|
501
|
+
$[78] = t40;
|
|
502
|
+
} else t40 = $[78];
|
|
503
|
+
let t41;
|
|
504
|
+
if ($[79] !== t) {
|
|
505
|
+
t41 = t("Layout.Language");
|
|
506
|
+
$[79] = t;
|
|
507
|
+
$[80] = t41;
|
|
508
|
+
} else t41 = $[80];
|
|
509
|
+
if ($[81] !== t41) {
|
|
510
|
+
t1 = /* @__PURE__ */ jsxs(ListSubheader, {
|
|
511
|
+
onClick: t38,
|
|
512
|
+
sx: t39,
|
|
513
|
+
children: [
|
|
514
|
+
t40,
|
|
515
|
+
" ",
|
|
516
|
+
t41
|
|
517
|
+
]
|
|
518
|
+
});
|
|
519
|
+
$[81] = t41;
|
|
520
|
+
$[82] = t1;
|
|
521
|
+
} else t1 = $[82];
|
|
522
|
+
t2 = supportedLanguages.map((languageCode) => /* @__PURE__ */ jsxs(ListItemButton, {
|
|
523
|
+
onClick: () => i18n.changeLanguage(languageCode).finally(() => closeMenu()),
|
|
524
|
+
selected: i18n.resolvedLanguage === languageCode,
|
|
525
|
+
children: [/* @__PURE__ */ jsx(ListItemIcon, { children: i18n.resolvedLanguage === languageCode && /* @__PURE__ */ jsx(Done, {}) }), /* @__PURE__ */ jsx(ListItemText, { primary: capitalize(languageDisplayNames.of(languageCode)) })]
|
|
526
|
+
}, languageCode));
|
|
527
|
+
$[2] = i18n;
|
|
528
|
+
$[3] = mode;
|
|
529
|
+
$[4] = setMode;
|
|
530
|
+
$[5] = t;
|
|
531
|
+
$[6] = T0;
|
|
532
|
+
$[7] = closeMenu;
|
|
533
|
+
$[8] = openMenu;
|
|
534
|
+
$[9] = settings;
|
|
535
|
+
$[10] = t1;
|
|
536
|
+
$[11] = t2;
|
|
537
|
+
$[12] = theme;
|
|
538
|
+
} else {
|
|
539
|
+
T0 = $[6];
|
|
540
|
+
closeMenu = $[7];
|
|
541
|
+
openMenu = $[8];
|
|
542
|
+
settings = $[9];
|
|
543
|
+
t1 = $[10];
|
|
544
|
+
t2 = $[11];
|
|
545
|
+
theme = $[12];
|
|
546
|
+
}
|
|
547
|
+
let t3;
|
|
548
|
+
if ($[83] !== T0 || $[84] !== t1 || $[85] !== t2) {
|
|
549
|
+
t3 = /* @__PURE__ */ jsx(T0, {
|
|
550
|
+
subheader: t1,
|
|
551
|
+
children: t2
|
|
552
|
+
});
|
|
553
|
+
$[83] = T0;
|
|
554
|
+
$[84] = t1;
|
|
555
|
+
$[85] = t2;
|
|
556
|
+
$[86] = t3;
|
|
557
|
+
} else t3 = $[86];
|
|
558
|
+
const language = t3;
|
|
559
|
+
let t4;
|
|
560
|
+
if ($[87] === Symbol.for("react.memo_cache_sentinel")) {
|
|
561
|
+
t4 = /* @__PURE__ */ jsx(AuthenticatedTemplate, { children: /* @__PURE__ */ jsx(UserAvatar, {}) });
|
|
562
|
+
$[87] = t4;
|
|
563
|
+
} else t4 = $[87];
|
|
564
|
+
let t5;
|
|
565
|
+
if ($[88] === Symbol.for("react.memo_cache_sentinel")) {
|
|
566
|
+
t5 = /* @__PURE__ */ jsx(UnauthenticatedTemplate, { children: /* @__PURE__ */ jsx(AccountCircle, { sx: {
|
|
567
|
+
width: {
|
|
568
|
+
xs: 32,
|
|
569
|
+
sm: 40
|
|
570
|
+
},
|
|
571
|
+
height: {
|
|
572
|
+
xs: 32,
|
|
573
|
+
sm: 40
|
|
574
|
+
}
|
|
575
|
+
} }) });
|
|
576
|
+
$[88] = t5;
|
|
577
|
+
} else t5 = $[88];
|
|
578
|
+
let t6;
|
|
579
|
+
if ($[89] !== openMenu) {
|
|
580
|
+
t6 = /* @__PURE__ */ jsxs(IconButton, {
|
|
581
|
+
size: "small",
|
|
582
|
+
edge: "end",
|
|
583
|
+
onClick: openMenu,
|
|
584
|
+
children: [t4, t5]
|
|
585
|
+
});
|
|
586
|
+
$[89] = openMenu;
|
|
587
|
+
$[90] = t6;
|
|
588
|
+
} else t6 = $[90];
|
|
589
|
+
let t7;
|
|
590
|
+
if ($[91] === Symbol.for("react.memo_cache_sentinel")) {
|
|
591
|
+
t7 = { width: 240 };
|
|
592
|
+
$[91] = t7;
|
|
593
|
+
} else t7 = $[91];
|
|
594
|
+
const t8 = user?.name;
|
|
595
|
+
let t9;
|
|
596
|
+
if ($[92] !== user) {
|
|
597
|
+
t9 = user?.employeeId && /* @__PURE__ */ jsx("span", { children: user.employeeId });
|
|
598
|
+
$[92] = user;
|
|
599
|
+
$[93] = t9;
|
|
600
|
+
} else t9 = $[93];
|
|
601
|
+
let t10;
|
|
602
|
+
if ($[94] !== user?.employeeId) {
|
|
603
|
+
t10 = user?.employeeId && /* @__PURE__ */ jsx("br", {});
|
|
604
|
+
$[94] = user?.employeeId;
|
|
605
|
+
$[95] = t10;
|
|
606
|
+
} else t10 = $[95];
|
|
607
|
+
let t11;
|
|
608
|
+
if ($[96] !== user) {
|
|
609
|
+
t11 = user?.department && /* @__PURE__ */ jsx("span", { children: user.department });
|
|
610
|
+
$[96] = user;
|
|
611
|
+
$[97] = t11;
|
|
612
|
+
} else t11 = $[97];
|
|
613
|
+
let t12;
|
|
614
|
+
if ($[98] !== t10 || $[99] !== t11 || $[100] !== t9) {
|
|
615
|
+
t12 = /* @__PURE__ */ jsxs("span", { children: [
|
|
616
|
+
t9,
|
|
617
|
+
t10,
|
|
618
|
+
t11
|
|
619
|
+
] });
|
|
620
|
+
$[98] = t10;
|
|
621
|
+
$[99] = t11;
|
|
622
|
+
$[100] = t9;
|
|
623
|
+
$[101] = t12;
|
|
624
|
+
} else t12 = $[101];
|
|
625
|
+
let t13;
|
|
626
|
+
if ($[102] !== t12 || $[103] !== t8) {
|
|
627
|
+
t13 = /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(ListItemText, {
|
|
628
|
+
primary: t8,
|
|
629
|
+
secondary: t12
|
|
630
|
+
}) });
|
|
631
|
+
$[102] = t12;
|
|
632
|
+
$[103] = t8;
|
|
633
|
+
$[104] = t13;
|
|
634
|
+
} else t13 = $[104];
|
|
635
|
+
let t14;
|
|
636
|
+
if ($[105] !== instance) {
|
|
637
|
+
t14 = () => instance.logoutRedirect({ postLogoutRedirectUri: "/" });
|
|
638
|
+
$[105] = instance;
|
|
639
|
+
$[106] = t14;
|
|
640
|
+
} else t14 = $[106];
|
|
641
|
+
let t15;
|
|
642
|
+
if ($[107] === Symbol.for("react.memo_cache_sentinel")) {
|
|
643
|
+
t15 = /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Logout, { color: "error" }) });
|
|
644
|
+
$[107] = t15;
|
|
645
|
+
} else t15 = $[107];
|
|
646
|
+
let t16;
|
|
647
|
+
if ($[108] !== t) {
|
|
648
|
+
t16 = t("Layout.Logout");
|
|
649
|
+
$[108] = t;
|
|
650
|
+
$[109] = t16;
|
|
651
|
+
} else t16 = $[109];
|
|
652
|
+
let t17;
|
|
653
|
+
if ($[110] !== t16) {
|
|
654
|
+
t17 = /* @__PURE__ */ jsx(ListItemText, { primary: t16 });
|
|
655
|
+
$[110] = t16;
|
|
656
|
+
$[111] = t17;
|
|
657
|
+
} else t17 = $[111];
|
|
658
|
+
let t18;
|
|
659
|
+
if ($[112] !== t14 || $[113] !== t17) {
|
|
660
|
+
t18 = /* @__PURE__ */ jsxs(ListItemButton, {
|
|
661
|
+
onClick: t14,
|
|
662
|
+
children: [t15, t17]
|
|
663
|
+
});
|
|
664
|
+
$[112] = t14;
|
|
665
|
+
$[113] = t17;
|
|
666
|
+
$[114] = t18;
|
|
667
|
+
} else t18 = $[114];
|
|
668
|
+
let t19;
|
|
669
|
+
if ($[115] !== t13 || $[116] !== t18) {
|
|
670
|
+
t19 = /* @__PURE__ */ jsxs(AuthenticatedTemplate, { children: [t13, t18] });
|
|
671
|
+
$[115] = t13;
|
|
672
|
+
$[116] = t18;
|
|
673
|
+
$[117] = t19;
|
|
674
|
+
} else t19 = $[117];
|
|
675
|
+
let t20;
|
|
676
|
+
if ($[118] !== instance) {
|
|
677
|
+
t20 = () => instance.loginRedirect();
|
|
678
|
+
$[118] = instance;
|
|
679
|
+
$[119] = t20;
|
|
680
|
+
} else t20 = $[119];
|
|
681
|
+
let t21;
|
|
682
|
+
if ($[120] === Symbol.for("react.memo_cache_sentinel")) {
|
|
683
|
+
t21 = /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Login, { color: "success" }) });
|
|
684
|
+
$[120] = t21;
|
|
685
|
+
} else t21 = $[120];
|
|
686
|
+
let t22;
|
|
687
|
+
if ($[121] !== t) {
|
|
688
|
+
t22 = t("Layout.LogIn");
|
|
689
|
+
$[121] = t;
|
|
690
|
+
$[122] = t22;
|
|
691
|
+
} else t22 = $[122];
|
|
692
|
+
let t23;
|
|
693
|
+
if ($[123] !== t22) {
|
|
694
|
+
t23 = /* @__PURE__ */ jsx(ListItemText, { primary: t22 });
|
|
695
|
+
$[123] = t22;
|
|
696
|
+
$[124] = t23;
|
|
697
|
+
} else t23 = $[124];
|
|
698
|
+
let t24;
|
|
699
|
+
if ($[125] !== t20 || $[126] !== t23) {
|
|
700
|
+
t24 = /* @__PURE__ */ jsx(UnauthenticatedTemplate, { children: /* @__PURE__ */ jsxs(ListItemButton, {
|
|
701
|
+
onClick: t20,
|
|
702
|
+
children: [t21, t23]
|
|
703
|
+
}) });
|
|
704
|
+
$[125] = t20;
|
|
705
|
+
$[126] = t23;
|
|
706
|
+
$[127] = t24;
|
|
707
|
+
} else t24 = $[127];
|
|
708
|
+
let t25;
|
|
709
|
+
if ($[128] !== t19 || $[129] !== t24) {
|
|
710
|
+
t25 = /* @__PURE__ */ jsxs(List, {
|
|
711
|
+
disablePadding: true,
|
|
712
|
+
children: [t19, t24]
|
|
713
|
+
});
|
|
714
|
+
$[128] = t19;
|
|
715
|
+
$[129] = t24;
|
|
716
|
+
$[130] = t25;
|
|
717
|
+
} else t25 = $[130];
|
|
718
|
+
const t26 = tab === "settings" && settings;
|
|
719
|
+
const t27 = tab === "theme" && theme;
|
|
720
|
+
const t28 = tab === "language" && language;
|
|
721
|
+
let t29;
|
|
722
|
+
if ($[131] !== t25 || $[132] !== t26 || $[133] !== t27 || $[134] !== t28) {
|
|
723
|
+
t29 = /* @__PURE__ */ jsxs(Box, {
|
|
724
|
+
sx: t7,
|
|
725
|
+
children: [
|
|
726
|
+
t25,
|
|
727
|
+
t26,
|
|
728
|
+
t27,
|
|
729
|
+
t28
|
|
730
|
+
]
|
|
731
|
+
});
|
|
732
|
+
$[131] = t25;
|
|
733
|
+
$[132] = t26;
|
|
734
|
+
$[133] = t27;
|
|
735
|
+
$[134] = t28;
|
|
736
|
+
$[135] = t29;
|
|
737
|
+
} else t29 = $[135];
|
|
738
|
+
let t30;
|
|
739
|
+
if ($[136] !== anchorElement || $[137] !== closeMenu || $[138] !== open || $[139] !== t29) {
|
|
740
|
+
t30 = /* @__PURE__ */ jsx(Menu, {
|
|
741
|
+
anchorEl: anchorElement,
|
|
742
|
+
open,
|
|
743
|
+
onClose: closeMenu,
|
|
744
|
+
children: t29
|
|
745
|
+
});
|
|
746
|
+
$[136] = anchorElement;
|
|
747
|
+
$[137] = closeMenu;
|
|
748
|
+
$[138] = open;
|
|
749
|
+
$[139] = t29;
|
|
750
|
+
$[140] = t30;
|
|
751
|
+
} else t30 = $[140];
|
|
752
|
+
let t31;
|
|
753
|
+
if ($[141] !== t30 || $[142] !== t6) {
|
|
754
|
+
t31 = /* @__PURE__ */ jsxs(Fragment, { children: [t6, t30] });
|
|
755
|
+
$[141] = t30;
|
|
756
|
+
$[142] = t6;
|
|
757
|
+
$[143] = t31;
|
|
758
|
+
} else t31 = $[143];
|
|
759
|
+
return t31;
|
|
760
|
+
};
|
|
761
|
+
function _temp$4(lng) {
|
|
762
|
+
return lng !== "cimode";
|
|
763
|
+
}
|
|
764
|
+
//#endregion
|
|
765
|
+
//#region src/components/core/AppTitle.tsx
|
|
766
|
+
const PRODUCTION_ENV = "PRD";
|
|
767
|
+
const getEnv = (url) => z$1.string().refine((u) => u.split("-").length > 2).transform((u) => u.split("-")[2].toUpperCase()).catch("LOCALHOST").parse(url);
|
|
768
|
+
const AppTitle = () => {
|
|
769
|
+
const $ = c(11);
|
|
770
|
+
if ($[0] !== "e6e033280dc7acffefe12faaa57be31c45d47ad2cb19f709755e27b07998830a") {
|
|
771
|
+
for (let $i = 0; $i < 11; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
772
|
+
$[0] = "e6e033280dc7acffefe12faaa57be31c45d47ad2cb19f709755e27b07998830a";
|
|
773
|
+
}
|
|
774
|
+
const router = useRouter();
|
|
775
|
+
let t0;
|
|
776
|
+
if ($[1] !== router.origin) {
|
|
777
|
+
t0 = getEnv(router.origin);
|
|
778
|
+
$[1] = router.origin;
|
|
779
|
+
$[2] = t0;
|
|
780
|
+
} else t0 = $[2];
|
|
781
|
+
const env = t0;
|
|
782
|
+
const isProduction = env === PRODUCTION_ENV;
|
|
783
|
+
let t1;
|
|
784
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
785
|
+
t1 = {
|
|
786
|
+
alignItems: "center",
|
|
787
|
+
flexGrow: 1
|
|
788
|
+
};
|
|
789
|
+
$[3] = t1;
|
|
790
|
+
} else t1 = $[3];
|
|
791
|
+
let t2;
|
|
792
|
+
let t3;
|
|
793
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
794
|
+
t2 = /* @__PURE__ */ jsx(RouterIconButton, {
|
|
795
|
+
to: "/",
|
|
796
|
+
size: "small",
|
|
797
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
798
|
+
src: "/favicon-32x32.png",
|
|
799
|
+
alt: "app-logo",
|
|
800
|
+
loading: "lazy"
|
|
801
|
+
})
|
|
802
|
+
});
|
|
803
|
+
t3 = /* @__PURE__ */ jsx(Typography, {
|
|
804
|
+
variant: "h6",
|
|
805
|
+
children: clientEnv.VITE_APP_TITLE
|
|
806
|
+
});
|
|
807
|
+
$[4] = t2;
|
|
808
|
+
$[5] = t3;
|
|
809
|
+
} else {
|
|
810
|
+
t2 = $[4];
|
|
811
|
+
t3 = $[5];
|
|
812
|
+
}
|
|
813
|
+
let t4;
|
|
814
|
+
if ($[6] !== env || $[7] !== isProduction) {
|
|
815
|
+
t4 = !isProduction && /* @__PURE__ */ jsx(Chip, {
|
|
816
|
+
size: "small",
|
|
817
|
+
label: env,
|
|
818
|
+
color: "primary"
|
|
819
|
+
});
|
|
820
|
+
$[6] = env;
|
|
821
|
+
$[7] = isProduction;
|
|
822
|
+
$[8] = t4;
|
|
823
|
+
} else t4 = $[8];
|
|
824
|
+
let t5;
|
|
825
|
+
if ($[9] !== t4) {
|
|
826
|
+
t5 = /* @__PURE__ */ jsxs(Stack, {
|
|
827
|
+
direction: "row",
|
|
828
|
+
spacing: 1,
|
|
829
|
+
sx: t1,
|
|
830
|
+
children: [
|
|
831
|
+
t2,
|
|
832
|
+
t3,
|
|
833
|
+
t4
|
|
834
|
+
]
|
|
835
|
+
});
|
|
836
|
+
$[9] = t4;
|
|
837
|
+
$[10] = t5;
|
|
838
|
+
} else t5 = $[10];
|
|
839
|
+
return t5;
|
|
840
|
+
};
|
|
841
|
+
//#endregion
|
|
842
|
+
//#region src/models/Navigation.ts
|
|
843
|
+
const isPageItem = (item) => item.kind === "item";
|
|
844
|
+
const isPageGroup = (item) => item.kind === "group";
|
|
845
|
+
const isDivider = (item) => item.kind === "divider";
|
|
846
|
+
const isHeader = (item) => item.kind === "header";
|
|
847
|
+
//#endregion
|
|
848
|
+
//#region src/components/core/navigation/NavigationListItem.tsx
|
|
849
|
+
const ICON_SIZE = 34;
|
|
850
|
+
const getSelectedColor = (theme) => theme.vars?.palette.primary.dark ?? theme.palette.primary.dark;
|
|
851
|
+
const getActionActiveColor = (theme) => theme.vars?.palette.action.active ?? theme.palette.action.active;
|
|
852
|
+
const StyledNavButton = styled(ListItemButton$1)(({ theme }) => ({
|
|
853
|
+
borderRadius: Number(theme.shape.borderRadius) * 2,
|
|
854
|
+
"&.Mui-selected": {
|
|
855
|
+
"& .MuiListItemIcon-root, & .MuiTypography-root, & .MuiSvgIcon-root": { color: getSelectedColor(theme) },
|
|
856
|
+
"& .MuiAvatar-root": { backgroundColor: getSelectedColor(theme) },
|
|
857
|
+
"& .MuiTouchRipple-child": { backgroundColor: getSelectedColor(theme) }
|
|
858
|
+
},
|
|
859
|
+
"& .MuiSvgIcon-root": { color: getActionActiveColor(theme) },
|
|
860
|
+
"& .MuiAvatar-root": { backgroundColor: getActionActiveColor(theme) }
|
|
861
|
+
}));
|
|
862
|
+
const routerButtonSx = (theme) => ({
|
|
863
|
+
borderRadius: 2,
|
|
864
|
+
"&.Mui-selected": {
|
|
865
|
+
"& .MuiListItemIcon-root, & .MuiTypography-root, & .MuiSvgIcon-root": { color: getSelectedColor(theme) },
|
|
866
|
+
"& .MuiAvatar-root": { backgroundColor: getSelectedColor(theme) },
|
|
867
|
+
"& .MuiTouchRipple-child": { backgroundColor: getSelectedColor(theme) }
|
|
868
|
+
},
|
|
869
|
+
"& .MuiSvgIcon-root": { color: getActionActiveColor(theme) },
|
|
870
|
+
"& .MuiAvatar-root": { backgroundColor: getActionActiveColor(theme) }
|
|
871
|
+
});
|
|
872
|
+
const IconOrAvatar = (t0) => {
|
|
873
|
+
const $ = c(18);
|
|
874
|
+
if ($[0] !== "a5a2437d20ca7e62fe542d3943ca8a6b2a0b22122396667ddebffe138510b1d9") {
|
|
875
|
+
for (let $i = 0; $i < 18; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
876
|
+
$[0] = "a5a2437d20ca7e62fe542d3943ca8a6b2a0b22122396667ddebffe138510b1d9";
|
|
877
|
+
}
|
|
878
|
+
const { item, collapsed } = t0;
|
|
879
|
+
if (item.icon || collapsed) {
|
|
880
|
+
let t1;
|
|
881
|
+
if ($[1] !== collapsed) {
|
|
882
|
+
t1 = collapsed ? {
|
|
883
|
+
position: "absolute",
|
|
884
|
+
left: "50%",
|
|
885
|
+
top: "calc(50% - 6px)",
|
|
886
|
+
transform: "translate(-50%, -50%)"
|
|
887
|
+
} : {};
|
|
888
|
+
$[1] = collapsed;
|
|
889
|
+
$[2] = t1;
|
|
890
|
+
} else t1 = $[2];
|
|
891
|
+
let t2;
|
|
892
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
893
|
+
t2 = {
|
|
894
|
+
display: "flex",
|
|
895
|
+
alignItems: "center",
|
|
896
|
+
justifyContent: "center",
|
|
897
|
+
minWidth: ICON_SIZE
|
|
898
|
+
};
|
|
899
|
+
$[3] = t2;
|
|
900
|
+
} else t2 = $[3];
|
|
901
|
+
const t3 = item.icon ?? null;
|
|
902
|
+
let t4;
|
|
903
|
+
if ($[4] !== collapsed || $[5] !== item.icon || $[6] !== item.title) {
|
|
904
|
+
t4 = !item.icon && collapsed ? /* @__PURE__ */ jsx(Avatar$1, {
|
|
905
|
+
sx: {
|
|
906
|
+
width: ICON_SIZE - 7,
|
|
907
|
+
height: ICON_SIZE - 7,
|
|
908
|
+
fontSize: 12
|
|
909
|
+
},
|
|
910
|
+
children: item.title.split(" ").slice(0, 2).map(_temp$3).join("")
|
|
911
|
+
}) : null;
|
|
912
|
+
$[4] = collapsed;
|
|
913
|
+
$[5] = item.icon;
|
|
914
|
+
$[6] = item.title;
|
|
915
|
+
$[7] = t4;
|
|
916
|
+
} else t4 = $[7];
|
|
917
|
+
let t5;
|
|
918
|
+
if ($[8] !== t3 || $[9] !== t4) {
|
|
919
|
+
t5 = /* @__PURE__ */ jsxs(ListItemIcon$1, {
|
|
920
|
+
sx: t2,
|
|
921
|
+
children: [t3, t4]
|
|
922
|
+
});
|
|
923
|
+
$[8] = t3;
|
|
924
|
+
$[9] = t4;
|
|
925
|
+
$[10] = t5;
|
|
926
|
+
} else t5 = $[10];
|
|
927
|
+
let t6;
|
|
928
|
+
if ($[11] !== collapsed || $[12] !== item.title) {
|
|
929
|
+
t6 = collapsed ? /* @__PURE__ */ jsx(Typography$1, {
|
|
930
|
+
variant: "caption",
|
|
931
|
+
sx: {
|
|
932
|
+
position: "absolute",
|
|
933
|
+
bottom: -18,
|
|
934
|
+
left: "50%",
|
|
935
|
+
transform: "translateX(-50%)",
|
|
936
|
+
fontSize: 10,
|
|
937
|
+
fontWeight: 500,
|
|
938
|
+
textAlign: "center",
|
|
939
|
+
whiteSpace: "nowrap",
|
|
940
|
+
overflow: "hidden",
|
|
941
|
+
textOverflow: "ellipsis",
|
|
942
|
+
maxWidth: 56
|
|
943
|
+
},
|
|
944
|
+
children: item.title
|
|
945
|
+
}) : null;
|
|
946
|
+
$[11] = collapsed;
|
|
947
|
+
$[12] = item.title;
|
|
948
|
+
$[13] = t6;
|
|
949
|
+
} else t6 = $[13];
|
|
950
|
+
let t7;
|
|
951
|
+
if ($[14] !== t1 || $[15] !== t5 || $[16] !== t6) {
|
|
952
|
+
t7 = /* @__PURE__ */ jsxs(Box$1, {
|
|
953
|
+
sx: t1,
|
|
954
|
+
children: [t5, t6]
|
|
955
|
+
});
|
|
956
|
+
$[14] = t1;
|
|
957
|
+
$[15] = t5;
|
|
958
|
+
$[16] = t6;
|
|
959
|
+
$[17] = t7;
|
|
960
|
+
} else t7 = $[17];
|
|
961
|
+
return t7;
|
|
962
|
+
}
|
|
963
|
+
return null;
|
|
964
|
+
};
|
|
965
|
+
const MiniPopover = (t0) => {
|
|
966
|
+
const $ = c(8);
|
|
967
|
+
if ($[0] !== "a5a2437d20ca7e62fe542d3943ca8a6b2a0b22122396667ddebffe138510b1d9") {
|
|
968
|
+
for (let $i = 0; $i < 8; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
969
|
+
$[0] = "a5a2437d20ca7e62fe542d3943ca8a6b2a0b22122396667ddebffe138510b1d9";
|
|
970
|
+
}
|
|
971
|
+
const { open, children } = t0;
|
|
972
|
+
let t1;
|
|
973
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
974
|
+
t1 = {
|
|
975
|
+
position: "fixed",
|
|
976
|
+
left: 84,
|
|
977
|
+
pl: "2px",
|
|
978
|
+
pb: "10px"
|
|
979
|
+
};
|
|
980
|
+
$[1] = t1;
|
|
981
|
+
} else t1 = $[1];
|
|
982
|
+
let t2;
|
|
983
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
984
|
+
t2 = {
|
|
985
|
+
pt: .5,
|
|
986
|
+
pb: .5,
|
|
987
|
+
transform: "translateY(calc(50% - 30px))",
|
|
988
|
+
maxHeight: "min(calc(100vh - 100px), 560px)",
|
|
989
|
+
overflowY: "auto",
|
|
990
|
+
overscrollBehavior: "contain"
|
|
991
|
+
};
|
|
992
|
+
$[2] = t2;
|
|
993
|
+
} else t2 = $[2];
|
|
994
|
+
let t3;
|
|
995
|
+
if ($[3] !== children) {
|
|
996
|
+
t3 = /* @__PURE__ */ jsx(Box$1, {
|
|
997
|
+
sx: t1,
|
|
998
|
+
children: /* @__PURE__ */ jsx(Paper, {
|
|
999
|
+
sx: t2,
|
|
1000
|
+
children
|
|
1001
|
+
})
|
|
1002
|
+
});
|
|
1003
|
+
$[3] = children;
|
|
1004
|
+
$[4] = t3;
|
|
1005
|
+
} else t3 = $[4];
|
|
1006
|
+
let t4;
|
|
1007
|
+
if ($[5] !== open || $[6] !== t3) {
|
|
1008
|
+
t4 = /* @__PURE__ */ jsx(Grow, {
|
|
1009
|
+
in: open,
|
|
1010
|
+
children: t3
|
|
1011
|
+
});
|
|
1012
|
+
$[5] = open;
|
|
1013
|
+
$[6] = t3;
|
|
1014
|
+
$[7] = t4;
|
|
1015
|
+
} else t4 = $[7];
|
|
1016
|
+
return t4;
|
|
1017
|
+
};
|
|
1018
|
+
const NavigationListItem = (t0) => {
|
|
1019
|
+
const $ = c(62);
|
|
1020
|
+
if ($[0] !== "a5a2437d20ca7e62fe542d3943ca8a6b2a0b22122396667ddebffe138510b1d9") {
|
|
1021
|
+
for (let $i = 0; $i < 62; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1022
|
+
$[0] = "a5a2437d20ca7e62fe542d3943ca8a6b2a0b22122396667ddebffe138510b1d9";
|
|
1023
|
+
}
|
|
1024
|
+
const { item, isOpen, selected, disabled, collapsed, isSidebarFullyExpanded: t1, isSidebarFullyCollapsed, onClick, renderNested, onClose } = t0;
|
|
1025
|
+
const isSidebarFullyExpanded = t1 === void 0 ? true : t1;
|
|
1026
|
+
const [hoveredMiniItemId, setHoveredMiniItemId] = useState(null);
|
|
1027
|
+
let t2;
|
|
1028
|
+
if ($[1] !== item) {
|
|
1029
|
+
t2 = isPageGroup(item);
|
|
1030
|
+
$[1] = item;
|
|
1031
|
+
$[2] = t2;
|
|
1032
|
+
} else t2 = $[2];
|
|
1033
|
+
const groupItem = t2;
|
|
1034
|
+
const itemId = groupItem ? `group-${item.title}` : `item-${item.to ?? item.href ?? item.title}`;
|
|
1035
|
+
let t3;
|
|
1036
|
+
if ($[3] !== collapsed || $[4] !== groupItem || $[5] !== isOpen || $[6] !== isSidebarFullyCollapsed || $[7] !== isSidebarFullyExpanded) {
|
|
1037
|
+
t3 = (theme) => {
|
|
1038
|
+
if (collapsed && isSidebarFullyCollapsed && groupItem) return {
|
|
1039
|
+
fontSize: 18,
|
|
1040
|
+
position: "absolute",
|
|
1041
|
+
top: "41.5%",
|
|
1042
|
+
right: "2px",
|
|
1043
|
+
transform: "translateY(-50%) rotate(-90deg)"
|
|
1044
|
+
};
|
|
1045
|
+
if (!collapsed && isSidebarFullyExpanded && groupItem) return {
|
|
1046
|
+
ml: .5,
|
|
1047
|
+
transform: `rotate(${isOpen ? 0 : -90}deg)`,
|
|
1048
|
+
transition: theme.transitions.create("transform", {
|
|
1049
|
+
easing: theme.transitions.easing.sharp,
|
|
1050
|
+
duration: 100
|
|
1051
|
+
})
|
|
1052
|
+
};
|
|
1053
|
+
return { display: "none" };
|
|
1054
|
+
};
|
|
1055
|
+
$[3] = collapsed;
|
|
1056
|
+
$[4] = groupItem;
|
|
1057
|
+
$[5] = isOpen;
|
|
1058
|
+
$[6] = isSidebarFullyCollapsed;
|
|
1059
|
+
$[7] = isSidebarFullyExpanded;
|
|
1060
|
+
$[8] = t3;
|
|
1061
|
+
} else t3 = $[8];
|
|
1062
|
+
const chevronSx = t3;
|
|
1063
|
+
const shouldJustExpand = groupItem && !collapsed;
|
|
1064
|
+
const t4 = collapsed ? 60 : 48;
|
|
1065
|
+
let t5;
|
|
1066
|
+
if ($[9] !== t4) {
|
|
1067
|
+
t5 = {
|
|
1068
|
+
px: 1.4,
|
|
1069
|
+
height: t4
|
|
1070
|
+
};
|
|
1071
|
+
$[9] = t4;
|
|
1072
|
+
$[10] = t5;
|
|
1073
|
+
} else t5 = $[10];
|
|
1074
|
+
let t6;
|
|
1075
|
+
if ($[11] !== disabled || $[12] !== selected || $[13] !== t5) {
|
|
1076
|
+
t6 = {
|
|
1077
|
+
selected,
|
|
1078
|
+
disabled,
|
|
1079
|
+
sx: t5
|
|
1080
|
+
};
|
|
1081
|
+
$[11] = disabled;
|
|
1082
|
+
$[12] = selected;
|
|
1083
|
+
$[13] = t5;
|
|
1084
|
+
$[14] = t6;
|
|
1085
|
+
} else t6 = $[14];
|
|
1086
|
+
const buttonProps = t6;
|
|
1087
|
+
let t7;
|
|
1088
|
+
if ($[15] !== collapsed || $[16] !== item) {
|
|
1089
|
+
t7 = /* @__PURE__ */ jsx(IconOrAvatar, {
|
|
1090
|
+
item,
|
|
1091
|
+
collapsed
|
|
1092
|
+
});
|
|
1093
|
+
$[15] = collapsed;
|
|
1094
|
+
$[16] = item;
|
|
1095
|
+
$[17] = t7;
|
|
1096
|
+
} else t7 = $[17];
|
|
1097
|
+
let t8;
|
|
1098
|
+
if ($[18] !== collapsed || $[19] !== item.title) {
|
|
1099
|
+
t8 = !collapsed && /* @__PURE__ */ jsx(ListItemText$1, {
|
|
1100
|
+
primary: item.title,
|
|
1101
|
+
slotProps: { primary: {
|
|
1102
|
+
noWrap: true,
|
|
1103
|
+
title: item.title
|
|
1104
|
+
} },
|
|
1105
|
+
sx: {
|
|
1106
|
+
ml: 1.2,
|
|
1107
|
+
flex: 1,
|
|
1108
|
+
minWidth: 0,
|
|
1109
|
+
"& .MuiTypography-root": {
|
|
1110
|
+
whiteSpace: "nowrap",
|
|
1111
|
+
overflow: "hidden",
|
|
1112
|
+
textOverflow: "ellipsis"
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
});
|
|
1116
|
+
$[18] = collapsed;
|
|
1117
|
+
$[19] = item.title;
|
|
1118
|
+
$[20] = t8;
|
|
1119
|
+
} else t8 = $[20];
|
|
1120
|
+
let t9;
|
|
1121
|
+
if ($[21] !== chevronSx || $[22] !== groupItem) {
|
|
1122
|
+
t9 = groupItem ? /* @__PURE__ */ jsx(ExpandMoreIcon, { sx: chevronSx }) : null;
|
|
1123
|
+
$[21] = chevronSx;
|
|
1124
|
+
$[22] = groupItem;
|
|
1125
|
+
$[23] = t9;
|
|
1126
|
+
} else t9 = $[23];
|
|
1127
|
+
let t10;
|
|
1128
|
+
if ($[24] !== t7 || $[25] !== t8 || $[26] !== t9) {
|
|
1129
|
+
t10 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1130
|
+
t7,
|
|
1131
|
+
t8,
|
|
1132
|
+
t9
|
|
1133
|
+
] });
|
|
1134
|
+
$[24] = t7;
|
|
1135
|
+
$[25] = t8;
|
|
1136
|
+
$[26] = t9;
|
|
1137
|
+
$[27] = t10;
|
|
1138
|
+
} else t10 = $[27];
|
|
1139
|
+
const buttonContent = t10;
|
|
1140
|
+
let t11;
|
|
1141
|
+
if ($[28] !== collapsed || $[29] !== groupItem || $[30] !== itemId) {
|
|
1142
|
+
t11 = groupItem && collapsed ? {
|
|
1143
|
+
onMouseEnter: () => {
|
|
1144
|
+
setHoveredMiniItemId(itemId);
|
|
1145
|
+
},
|
|
1146
|
+
onMouseLeave: () => {
|
|
1147
|
+
setHoveredMiniItemId(null);
|
|
1148
|
+
}
|
|
1149
|
+
} : {};
|
|
1150
|
+
$[28] = collapsed;
|
|
1151
|
+
$[29] = groupItem;
|
|
1152
|
+
$[30] = itemId;
|
|
1153
|
+
$[31] = t11;
|
|
1154
|
+
} else t11 = $[31];
|
|
1155
|
+
let t12;
|
|
1156
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1157
|
+
t12 = {
|
|
1158
|
+
py: 0,
|
|
1159
|
+
px: 1,
|
|
1160
|
+
overflowX: "hidden"
|
|
1161
|
+
};
|
|
1162
|
+
$[32] = t12;
|
|
1163
|
+
} else t12 = $[32];
|
|
1164
|
+
let t13;
|
|
1165
|
+
if ($[33] !== buttonContent || $[34] !== buttonProps || $[35] !== groupItem || $[36] !== item || $[37] !== onClick || $[38] !== onClose || $[39] !== shouldJustExpand) {
|
|
1166
|
+
t13 = groupItem ? /* @__PURE__ */ jsx(StyledNavButton, {
|
|
1167
|
+
...buttonProps,
|
|
1168
|
+
onClick: shouldJustExpand ? () => onClick?.(item) : void 0,
|
|
1169
|
+
children: buttonContent
|
|
1170
|
+
}) : /* @__PURE__ */ jsx(RouterListItemButton, {
|
|
1171
|
+
...buttonProps,
|
|
1172
|
+
to: item.to,
|
|
1173
|
+
href: item.href,
|
|
1174
|
+
params: item.params,
|
|
1175
|
+
search: item.search,
|
|
1176
|
+
onClick: onClose,
|
|
1177
|
+
sx: [buttonProps.sx, routerButtonSx],
|
|
1178
|
+
children: buttonContent
|
|
1179
|
+
});
|
|
1180
|
+
$[33] = buttonContent;
|
|
1181
|
+
$[34] = buttonProps;
|
|
1182
|
+
$[35] = groupItem;
|
|
1183
|
+
$[36] = item;
|
|
1184
|
+
$[37] = onClick;
|
|
1185
|
+
$[38] = onClose;
|
|
1186
|
+
$[39] = shouldJustExpand;
|
|
1187
|
+
$[40] = t13;
|
|
1188
|
+
} else t13 = $[40];
|
|
1189
|
+
let t14;
|
|
1190
|
+
if ($[41] !== collapsed || $[42] !== groupItem || $[43] !== hoveredMiniItemId || $[44] !== item.children || $[45] !== itemId || $[46] !== renderNested) {
|
|
1191
|
+
t14 = groupItem && collapsed ? /* @__PURE__ */ jsx(MiniPopover, {
|
|
1192
|
+
open: itemId === hoveredMiniItemId,
|
|
1193
|
+
children: renderNested?.(item.children)
|
|
1194
|
+
}) : null;
|
|
1195
|
+
$[41] = collapsed;
|
|
1196
|
+
$[42] = groupItem;
|
|
1197
|
+
$[43] = hoveredMiniItemId;
|
|
1198
|
+
$[44] = item.children;
|
|
1199
|
+
$[45] = itemId;
|
|
1200
|
+
$[46] = renderNested;
|
|
1201
|
+
$[47] = t14;
|
|
1202
|
+
} else t14 = $[47];
|
|
1203
|
+
let t15;
|
|
1204
|
+
if ($[48] !== t11 || $[49] !== t13 || $[50] !== t14) {
|
|
1205
|
+
t15 = /* @__PURE__ */ jsxs(ListItem$1, {
|
|
1206
|
+
...t11,
|
|
1207
|
+
sx: t12,
|
|
1208
|
+
children: [t13, t14]
|
|
1209
|
+
});
|
|
1210
|
+
$[48] = t11;
|
|
1211
|
+
$[49] = t13;
|
|
1212
|
+
$[50] = t14;
|
|
1213
|
+
$[51] = t15;
|
|
1214
|
+
} else t15 = $[51];
|
|
1215
|
+
const listItem = t15;
|
|
1216
|
+
let t16;
|
|
1217
|
+
if ($[52] !== collapsed || $[53] !== groupItem || $[54] !== isOpen || $[55] !== item.children || $[56] !== renderNested) {
|
|
1218
|
+
t16 = groupItem && !collapsed ? /* @__PURE__ */ jsx(Collapse, {
|
|
1219
|
+
in: isOpen,
|
|
1220
|
+
timeout: "auto",
|
|
1221
|
+
unmountOnExit: true,
|
|
1222
|
+
children: renderNested?.(item.children)
|
|
1223
|
+
}) : null;
|
|
1224
|
+
$[52] = collapsed;
|
|
1225
|
+
$[53] = groupItem;
|
|
1226
|
+
$[54] = isOpen;
|
|
1227
|
+
$[55] = item.children;
|
|
1228
|
+
$[56] = renderNested;
|
|
1229
|
+
$[57] = t16;
|
|
1230
|
+
} else t16 = $[57];
|
|
1231
|
+
let t17;
|
|
1232
|
+
if ($[58] !== itemId || $[59] !== listItem || $[60] !== t16) {
|
|
1233
|
+
t17 = /* @__PURE__ */ jsxs(Fragment, { children: [listItem, t16] }, itemId);
|
|
1234
|
+
$[58] = itemId;
|
|
1235
|
+
$[59] = listItem;
|
|
1236
|
+
$[60] = t16;
|
|
1237
|
+
$[61] = t17;
|
|
1238
|
+
} else t17 = $[61];
|
|
1239
|
+
return t17;
|
|
1240
|
+
};
|
|
1241
|
+
function _temp$3(word) {
|
|
1242
|
+
return word.charAt(0).toUpperCase();
|
|
1243
|
+
}
|
|
1244
|
+
//#endregion
|
|
1245
|
+
//#region src/components/core/navigation/NavigationList.tsx
|
|
1246
|
+
const NavigationList = (t0) => {
|
|
1247
|
+
const $ = c(29);
|
|
1248
|
+
if ($[0] !== "4dbd114545118530db002b7c781f97683277f7b721a30074e8778a8e4ea56119") {
|
|
1249
|
+
for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1250
|
+
$[0] = "4dbd114545118530db002b7c781f97683277f7b721a30074e8778a8e4ea56119";
|
|
1251
|
+
}
|
|
1252
|
+
const { subNavigation, depth: t1, collapsed, isPopover, isSidebarFullyExpanded: t2, isSidebarFullyCollapsed, renderItem, activePath, onClose } = t0;
|
|
1253
|
+
const depth = t1 === void 0 ? 0 : t1;
|
|
1254
|
+
const isSidebarFullyExpanded = t2 === void 0 ? true : t2;
|
|
1255
|
+
let t3;
|
|
1256
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1257
|
+
t3 = [];
|
|
1258
|
+
$[1] = t3;
|
|
1259
|
+
} else t3 = $[1];
|
|
1260
|
+
const [openKeys, setOpenKeys] = useState(t3);
|
|
1261
|
+
let t4;
|
|
1262
|
+
let t5;
|
|
1263
|
+
if ($[2] !== collapsed) {
|
|
1264
|
+
t4 = () => {
|
|
1265
|
+
if (collapsed) setOpenKeys([]);
|
|
1266
|
+
};
|
|
1267
|
+
t5 = [collapsed];
|
|
1268
|
+
$[2] = collapsed;
|
|
1269
|
+
$[3] = t4;
|
|
1270
|
+
$[4] = t5;
|
|
1271
|
+
} else {
|
|
1272
|
+
t4 = $[3];
|
|
1273
|
+
t5 = $[4];
|
|
1274
|
+
}
|
|
1275
|
+
useEffect(t4, t5);
|
|
1276
|
+
let t6;
|
|
1277
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1278
|
+
t6 = (key) => setOpenKeys((previous) => previous.includes(key) ? previous.filter((k) => k !== key) : [...previous, key]);
|
|
1279
|
+
$[5] = t6;
|
|
1280
|
+
} else t6 = $[5];
|
|
1281
|
+
const toggleKey = t6;
|
|
1282
|
+
let t7;
|
|
1283
|
+
if ($[6] !== activePath || $[7] !== collapsed || $[8] !== depth || $[9] !== onClose) {
|
|
1284
|
+
t7 = (children) => /* @__PURE__ */ jsx(NavigationList, {
|
|
1285
|
+
subNavigation: children,
|
|
1286
|
+
depth: depth + 1,
|
|
1287
|
+
isPopover: collapsed,
|
|
1288
|
+
activePath,
|
|
1289
|
+
onClose
|
|
1290
|
+
});
|
|
1291
|
+
$[6] = activePath;
|
|
1292
|
+
$[7] = collapsed;
|
|
1293
|
+
$[8] = depth;
|
|
1294
|
+
$[9] = onClose;
|
|
1295
|
+
$[10] = t7;
|
|
1296
|
+
} else t7 = $[10];
|
|
1297
|
+
const renderNested = t7;
|
|
1298
|
+
let t8;
|
|
1299
|
+
if ($[11] !== activePath || $[12] !== collapsed || $[13] !== depth || $[14] !== isPopover || $[15] !== isSidebarFullyCollapsed || $[16] !== isSidebarFullyExpanded || $[17] !== onClose || $[18] !== openKeys || $[19] !== renderItem || $[20] !== renderNested || $[21] !== subNavigation) {
|
|
1300
|
+
const filteredNavigation = subNavigation.filter(_temp$2);
|
|
1301
|
+
const t9 = isPopover && depth === 1 ? .5 : 0;
|
|
1302
|
+
const t10 = depth === 0 && !isPopover ? 4 : .5;
|
|
1303
|
+
const t11 = (isPopover ? 1 : 2) * (isPopover ? depth - 1 : depth);
|
|
1304
|
+
const t12 = isPopover && depth === 1 ? 240 : "auto";
|
|
1305
|
+
const t13 = collapsed ? 84 : "auto";
|
|
1306
|
+
let t14;
|
|
1307
|
+
if ($[23] !== t10 || $[24] !== t11 || $[25] !== t12 || $[26] !== t13 || $[27] !== t9) {
|
|
1308
|
+
t14 = {
|
|
1309
|
+
padding: 0,
|
|
1310
|
+
mt: t9,
|
|
1311
|
+
mb: t10,
|
|
1312
|
+
pl: t11,
|
|
1313
|
+
minWidth: t12,
|
|
1314
|
+
width: t13
|
|
1315
|
+
};
|
|
1316
|
+
$[23] = t10;
|
|
1317
|
+
$[24] = t11;
|
|
1318
|
+
$[25] = t12;
|
|
1319
|
+
$[26] = t13;
|
|
1320
|
+
$[27] = t9;
|
|
1321
|
+
$[28] = t14;
|
|
1322
|
+
} else t14 = $[28];
|
|
1323
|
+
t8 = /* @__PURE__ */ jsx(List$1, {
|
|
1324
|
+
sx: t14,
|
|
1325
|
+
children: filteredNavigation.map((navItem, index) => {
|
|
1326
|
+
if (isHeader(navItem)) return /* @__PURE__ */ jsx(ListSubheader$1, {
|
|
1327
|
+
sx: {
|
|
1328
|
+
fontSize: 12,
|
|
1329
|
+
fontWeight: "700",
|
|
1330
|
+
height: collapsed ? 0 : 40,
|
|
1331
|
+
px: 2,
|
|
1332
|
+
overflow: "hidden",
|
|
1333
|
+
textOverflow: "ellipsis",
|
|
1334
|
+
whiteSpace: "nowrap",
|
|
1335
|
+
zIndex: 2,
|
|
1336
|
+
bgcolor: "transparent",
|
|
1337
|
+
position: "static"
|
|
1338
|
+
},
|
|
1339
|
+
children: navItem.title
|
|
1340
|
+
}, `subheader-${depth}-${index}`);
|
|
1341
|
+
if (isDivider(navItem)) {
|
|
1342
|
+
const nextItem = filteredNavigation[index + 1];
|
|
1343
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Divider$1, { sx: {
|
|
1344
|
+
mx: 1,
|
|
1345
|
+
mt: 1,
|
|
1346
|
+
mb: nextItem && isHeader(nextItem) && !collapsed ? 0 : 1
|
|
1347
|
+
} }) }, `divider-${depth}-${index}`);
|
|
1348
|
+
}
|
|
1349
|
+
if (!isPageItem(navItem) && !isPageGroup(navItem)) return null;
|
|
1350
|
+
const key_0 = `item-${depth}-${index}`;
|
|
1351
|
+
const uniqueItemKey = `${depth}-${index}-${navItem.title}`;
|
|
1352
|
+
const selected = isPageItem(navItem) && navItem.to === activePath;
|
|
1353
|
+
if (renderItem) return /* @__PURE__ */ jsx(Fragment, { children: renderItem(navItem, { collapsed: !!collapsed }) }, key_0);
|
|
1354
|
+
return /* @__PURE__ */ jsx(NavigationListItem, {
|
|
1355
|
+
item: navItem,
|
|
1356
|
+
isOpen: openKeys.includes(uniqueItemKey),
|
|
1357
|
+
selected,
|
|
1358
|
+
collapsed,
|
|
1359
|
+
isSidebarFullyExpanded,
|
|
1360
|
+
isSidebarFullyCollapsed,
|
|
1361
|
+
onClick: isPageGroup(navItem) && !collapsed ? () => toggleKey(uniqueItemKey) : void 0,
|
|
1362
|
+
renderNested,
|
|
1363
|
+
onClose
|
|
1364
|
+
}, key_0);
|
|
1365
|
+
})
|
|
1366
|
+
});
|
|
1367
|
+
$[11] = activePath;
|
|
1368
|
+
$[12] = collapsed;
|
|
1369
|
+
$[13] = depth;
|
|
1370
|
+
$[14] = isPopover;
|
|
1371
|
+
$[15] = isSidebarFullyCollapsed;
|
|
1372
|
+
$[16] = isSidebarFullyExpanded;
|
|
1373
|
+
$[17] = onClose;
|
|
1374
|
+
$[18] = openKeys;
|
|
1375
|
+
$[19] = renderItem;
|
|
1376
|
+
$[20] = renderNested;
|
|
1377
|
+
$[21] = subNavigation;
|
|
1378
|
+
$[22] = t8;
|
|
1379
|
+
} else t8 = $[22];
|
|
1380
|
+
return t8;
|
|
1381
|
+
};
|
|
1382
|
+
function _temp$2(nav) {
|
|
1383
|
+
return !nav.hidden;
|
|
1384
|
+
}
|
|
1385
|
+
//#endregion
|
|
1386
|
+
//#region src/components/core/navigation/NavigationContent.tsx
|
|
1387
|
+
const NavigationContent = (t0) => {
|
|
1388
|
+
const $ = c(17);
|
|
1389
|
+
if ($[0] !== "8e18ca51999228f0bb12ab188e0dd8177eed75d44b84d25a0355fb537f5fdbd1") {
|
|
1390
|
+
for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1391
|
+
$[0] = "8e18ca51999228f0bb12ab188e0dd8177eed75d44b84d25a0355fb537f5fdbd1";
|
|
1392
|
+
}
|
|
1393
|
+
const { navigation, collapsed, expanded, setExpanded, showPermanent } = t0;
|
|
1394
|
+
const location = useLocation();
|
|
1395
|
+
const t1 = collapsed ? "stable" : "auto";
|
|
1396
|
+
const t2 = navigation[0] && isHeader(navigation[0]) && !collapsed ? 0 : 2;
|
|
1397
|
+
let t3;
|
|
1398
|
+
if ($[1] !== t1 || $[2] !== t2) {
|
|
1399
|
+
t3 = {
|
|
1400
|
+
height: "100%",
|
|
1401
|
+
display: "flex",
|
|
1402
|
+
flexDirection: "column",
|
|
1403
|
+
justifyContent: "space-between",
|
|
1404
|
+
overflow: "auto",
|
|
1405
|
+
scrollbarGutter: t1,
|
|
1406
|
+
overflowX: "hidden",
|
|
1407
|
+
pt: t2
|
|
1408
|
+
};
|
|
1409
|
+
$[1] = t1;
|
|
1410
|
+
$[2] = t2;
|
|
1411
|
+
$[3] = t3;
|
|
1412
|
+
} else t3 = $[3];
|
|
1413
|
+
const t4 = !expanded;
|
|
1414
|
+
let t5;
|
|
1415
|
+
if ($[4] !== setExpanded || $[5] !== showPermanent) {
|
|
1416
|
+
t5 = showPermanent ? void 0 : () => setExpanded(false);
|
|
1417
|
+
$[4] = setExpanded;
|
|
1418
|
+
$[5] = showPermanent;
|
|
1419
|
+
$[6] = t5;
|
|
1420
|
+
} else t5 = $[6];
|
|
1421
|
+
let t6;
|
|
1422
|
+
if ($[7] !== collapsed || $[8] !== expanded || $[9] !== location.pathname || $[10] !== navigation || $[11] !== t4 || $[12] !== t5) {
|
|
1423
|
+
t6 = /* @__PURE__ */ jsx(NavigationList, {
|
|
1424
|
+
subNavigation: navigation,
|
|
1425
|
+
collapsed,
|
|
1426
|
+
isSidebarFullyExpanded: expanded,
|
|
1427
|
+
isSidebarFullyCollapsed: t4,
|
|
1428
|
+
activePath: location.pathname,
|
|
1429
|
+
onClose: t5
|
|
1430
|
+
});
|
|
1431
|
+
$[7] = collapsed;
|
|
1432
|
+
$[8] = expanded;
|
|
1433
|
+
$[9] = location.pathname;
|
|
1434
|
+
$[10] = navigation;
|
|
1435
|
+
$[11] = t4;
|
|
1436
|
+
$[12] = t5;
|
|
1437
|
+
$[13] = t6;
|
|
1438
|
+
} else t6 = $[13];
|
|
1439
|
+
let t7;
|
|
1440
|
+
if ($[14] !== t3 || $[15] !== t6) {
|
|
1441
|
+
t7 = /* @__PURE__ */ jsx(Box$1, {
|
|
1442
|
+
component: "nav",
|
|
1443
|
+
sx: t3,
|
|
1444
|
+
children: t6
|
|
1445
|
+
});
|
|
1446
|
+
$[14] = t3;
|
|
1447
|
+
$[15] = t6;
|
|
1448
|
+
$[16] = t7;
|
|
1449
|
+
} else t7 = $[16];
|
|
1450
|
+
return t7;
|
|
1451
|
+
};
|
|
1452
|
+
const NavigationRail = (t0) => {
|
|
1453
|
+
const $ = c(29);
|
|
1454
|
+
if ($[0] !== "49d079c05318eb36fa341a571be66f2c7d983f06018386e081b42f162f58e4e6") {
|
|
1455
|
+
for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1456
|
+
$[0] = "49d079c05318eb36fa341a571be66f2c7d983f06018386e081b42f162f58e4e6";
|
|
1457
|
+
}
|
|
1458
|
+
const { navigation, expanded, setExpanded } = t0;
|
|
1459
|
+
let t1;
|
|
1460
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1461
|
+
t1 = {
|
|
1462
|
+
xs: "none",
|
|
1463
|
+
sm: "block"
|
|
1464
|
+
};
|
|
1465
|
+
$[1] = t1;
|
|
1466
|
+
} else t1 = $[1];
|
|
1467
|
+
const t2 = expanded ? 320 : 84;
|
|
1468
|
+
let t3;
|
|
1469
|
+
if ($[2] !== expanded) {
|
|
1470
|
+
t3 = (theme) => ({
|
|
1471
|
+
position: "absolute",
|
|
1472
|
+
top: `64px`,
|
|
1473
|
+
height: `calc(100% - 64px)`,
|
|
1474
|
+
width: expanded ? 320 : 84,
|
|
1475
|
+
background: "transparent",
|
|
1476
|
+
borderTop: "1px solid",
|
|
1477
|
+
borderColor: theme.vars?.palette.divider ?? theme.palette.divider,
|
|
1478
|
+
boxShadow: "none"
|
|
1479
|
+
});
|
|
1480
|
+
$[2] = expanded;
|
|
1481
|
+
$[3] = t3;
|
|
1482
|
+
} else t3 = $[3];
|
|
1483
|
+
let t4;
|
|
1484
|
+
if ($[4] !== t2 || $[5] !== t3) {
|
|
1485
|
+
t4 = {
|
|
1486
|
+
display: t1,
|
|
1487
|
+
width: t2,
|
|
1488
|
+
"& .MuiDrawer-paper": t3
|
|
1489
|
+
};
|
|
1490
|
+
$[4] = t2;
|
|
1491
|
+
$[5] = t3;
|
|
1492
|
+
$[6] = t4;
|
|
1493
|
+
} else t4 = $[6];
|
|
1494
|
+
const t5 = !expanded;
|
|
1495
|
+
let t6;
|
|
1496
|
+
if ($[7] !== expanded || $[8] !== navigation || $[9] !== setExpanded || $[10] !== t5) {
|
|
1497
|
+
t6 = /* @__PURE__ */ jsx(NavigationContent, {
|
|
1498
|
+
navigation,
|
|
1499
|
+
collapsed: t5,
|
|
1500
|
+
expanded,
|
|
1501
|
+
setExpanded,
|
|
1502
|
+
showPermanent: true
|
|
1503
|
+
});
|
|
1504
|
+
$[7] = expanded;
|
|
1505
|
+
$[8] = navigation;
|
|
1506
|
+
$[9] = setExpanded;
|
|
1507
|
+
$[10] = t5;
|
|
1508
|
+
$[11] = t6;
|
|
1509
|
+
} else t6 = $[11];
|
|
1510
|
+
let t7;
|
|
1511
|
+
if ($[12] !== t4 || $[13] !== t6) {
|
|
1512
|
+
t7 = /* @__PURE__ */ jsx(Drawer, {
|
|
1513
|
+
variant: "permanent",
|
|
1514
|
+
sx: t4,
|
|
1515
|
+
children: t6
|
|
1516
|
+
});
|
|
1517
|
+
$[12] = t4;
|
|
1518
|
+
$[13] = t6;
|
|
1519
|
+
$[14] = t7;
|
|
1520
|
+
} else t7 = $[14];
|
|
1521
|
+
let t8;
|
|
1522
|
+
if ($[15] !== setExpanded) {
|
|
1523
|
+
t8 = () => setExpanded(false);
|
|
1524
|
+
$[15] = setExpanded;
|
|
1525
|
+
$[16] = t8;
|
|
1526
|
+
} else t8 = $[16];
|
|
1527
|
+
let t9;
|
|
1528
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1529
|
+
t9 = {
|
|
1530
|
+
display: {
|
|
1531
|
+
xs: "block",
|
|
1532
|
+
sm: "none"
|
|
1533
|
+
},
|
|
1534
|
+
"& .MuiDrawer-paper": { width: "min(280px, calc(100vw - 56px))" }
|
|
1535
|
+
};
|
|
1536
|
+
$[17] = t9;
|
|
1537
|
+
} else t9 = $[17];
|
|
1538
|
+
let t10;
|
|
1539
|
+
if ($[18] !== expanded || $[19] !== navigation || $[20] !== setExpanded) {
|
|
1540
|
+
t10 = /* @__PURE__ */ jsx(NavigationContent, {
|
|
1541
|
+
navigation,
|
|
1542
|
+
collapsed: false,
|
|
1543
|
+
expanded,
|
|
1544
|
+
setExpanded,
|
|
1545
|
+
showPermanent: false
|
|
1546
|
+
});
|
|
1547
|
+
$[18] = expanded;
|
|
1548
|
+
$[19] = navigation;
|
|
1549
|
+
$[20] = setExpanded;
|
|
1550
|
+
$[21] = t10;
|
|
1551
|
+
} else t10 = $[21];
|
|
1552
|
+
let t11;
|
|
1553
|
+
if ($[22] !== expanded || $[23] !== t10 || $[24] !== t8) {
|
|
1554
|
+
t11 = /* @__PURE__ */ jsx(Drawer, {
|
|
1555
|
+
open: expanded,
|
|
1556
|
+
onClose: t8,
|
|
1557
|
+
sx: t9,
|
|
1558
|
+
children: t10
|
|
1559
|
+
});
|
|
1560
|
+
$[22] = expanded;
|
|
1561
|
+
$[23] = t10;
|
|
1562
|
+
$[24] = t8;
|
|
1563
|
+
$[25] = t11;
|
|
1564
|
+
} else t11 = $[25];
|
|
1565
|
+
let t12;
|
|
1566
|
+
if ($[26] !== t11 || $[27] !== t7) {
|
|
1567
|
+
t12 = /* @__PURE__ */ jsxs(Fragment, { children: [t7, t11] });
|
|
1568
|
+
$[26] = t11;
|
|
1569
|
+
$[27] = t7;
|
|
1570
|
+
$[28] = t12;
|
|
1571
|
+
} else t12 = $[28];
|
|
1572
|
+
return t12;
|
|
1573
|
+
};
|
|
1574
|
+
//#endregion
|
|
1575
|
+
//#region src/components/core/Layout.tsx
|
|
1576
|
+
const NAVIGATION_STORAGE_KEY = "navigation-open";
|
|
1577
|
+
const getInitialNavigationOpen = () => {
|
|
1578
|
+
if (Platform.isWindows || Platform.isMacOS) return localStorage.getItem(NAVIGATION_STORAGE_KEY) === "true";
|
|
1579
|
+
return false;
|
|
1580
|
+
};
|
|
1581
|
+
const saveNavigationState = (value) => {
|
|
1582
|
+
if (Platform.isWindows || Platform.isMacOS) localStorage.setItem(NAVIGATION_STORAGE_KEY, String(value));
|
|
1583
|
+
};
|
|
1584
|
+
const DrawerHeader = styled("div")(({ theme }) => ({
|
|
1585
|
+
display: "flex",
|
|
1586
|
+
alignItems: "center",
|
|
1587
|
+
justifyContent: "flex-end",
|
|
1588
|
+
padding: theme.spacing(0, 1),
|
|
1589
|
+
...theme.mixins.toolbar
|
|
1590
|
+
}));
|
|
1591
|
+
const Layout = (t0) => {
|
|
1592
|
+
const $ = c(28);
|
|
1593
|
+
if ($[0] !== "3886edcc966444439fecbaa66c12bd0739605e2755c9d97ea08aaa691ee89b53") {
|
|
1594
|
+
for (let $i = 0; $i < 28; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1595
|
+
$[0] = "3886edcc966444439fecbaa66c12bd0739605e2755c9d97ea08aaa691ee89b53";
|
|
1596
|
+
}
|
|
1597
|
+
const { navigation, options, children } = t0;
|
|
1598
|
+
const [navigationOpen, setNavigationOpen] = useState(getInitialNavigationOpen);
|
|
1599
|
+
const isPublicRoute = useIsPublicRoute(options?.publicRoutes);
|
|
1600
|
+
const showShell = options?.showShell ?? true;
|
|
1601
|
+
let t1;
|
|
1602
|
+
let t2;
|
|
1603
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1604
|
+
t1 = /* @__PURE__ */ jsx(InitColorSchemeScript, {});
|
|
1605
|
+
t2 = /* @__PURE__ */ jsx(CssBaseline, {});
|
|
1606
|
+
$[1] = t1;
|
|
1607
|
+
$[2] = t2;
|
|
1608
|
+
} else {
|
|
1609
|
+
t1 = $[1];
|
|
1610
|
+
t2 = $[2];
|
|
1611
|
+
}
|
|
1612
|
+
let t3;
|
|
1613
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1614
|
+
t3 = {
|
|
1615
|
+
display: "flex",
|
|
1616
|
+
height: "100dvh",
|
|
1617
|
+
maxHeight: "100dvh",
|
|
1618
|
+
overflow: "hidden",
|
|
1619
|
+
width: "100%"
|
|
1620
|
+
};
|
|
1621
|
+
$[3] = t3;
|
|
1622
|
+
} else t3 = $[3];
|
|
1623
|
+
let t4;
|
|
1624
|
+
if ($[4] !== navigation || $[5] !== navigationOpen || $[6] !== showShell) {
|
|
1625
|
+
t4 = showShell && /* @__PURE__ */ jsx(AppBar, {
|
|
1626
|
+
color: "transparent",
|
|
1627
|
+
position: "fixed",
|
|
1628
|
+
sx: {
|
|
1629
|
+
borderBottom: "1px solid",
|
|
1630
|
+
borderColor: "var(--mui-palette-divider)",
|
|
1631
|
+
boxShadow: "none"
|
|
1632
|
+
},
|
|
1633
|
+
children: /* @__PURE__ */ jsxs(Toolbar, { children: [
|
|
1634
|
+
navigation && /* @__PURE__ */ jsx(IconButton, {
|
|
1635
|
+
onClick: () => {
|
|
1636
|
+
setNavigationOpen(_temp$1);
|
|
1637
|
+
},
|
|
1638
|
+
sx: { marginRight: 2 },
|
|
1639
|
+
children: navigationOpen ? /* @__PURE__ */ jsx(MenuOpen, {}) : /* @__PURE__ */ jsx(Menu$1, {})
|
|
1640
|
+
}),
|
|
1641
|
+
/* @__PURE__ */ jsx(AppTitle, {}),
|
|
1642
|
+
/* @__PURE__ */ jsx(ToolbarAccount, {})
|
|
1643
|
+
] })
|
|
1644
|
+
});
|
|
1645
|
+
$[4] = navigation;
|
|
1646
|
+
$[5] = navigationOpen;
|
|
1647
|
+
$[6] = showShell;
|
|
1648
|
+
$[7] = t4;
|
|
1649
|
+
} else t4 = $[7];
|
|
1650
|
+
let t5;
|
|
1651
|
+
if ($[8] !== navigation || $[9] !== navigationOpen || $[10] !== showShell) {
|
|
1652
|
+
t5 = navigation && showShell && /* @__PURE__ */ jsx(NavigationRail, {
|
|
1653
|
+
navigation,
|
|
1654
|
+
expanded: navigationOpen,
|
|
1655
|
+
setExpanded: (newValue_0) => {
|
|
1656
|
+
setNavigationOpen(newValue_0);
|
|
1657
|
+
saveNavigationState(newValue_0);
|
|
1658
|
+
}
|
|
1659
|
+
});
|
|
1660
|
+
$[8] = navigation;
|
|
1661
|
+
$[9] = navigationOpen;
|
|
1662
|
+
$[10] = showShell;
|
|
1663
|
+
$[11] = t5;
|
|
1664
|
+
} else t5 = $[11];
|
|
1665
|
+
let t6;
|
|
1666
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1667
|
+
t6 = {
|
|
1668
|
+
flexGrow: 1,
|
|
1669
|
+
display: "flex",
|
|
1670
|
+
flexDirection: "column",
|
|
1671
|
+
minWidth: 0,
|
|
1672
|
+
height: "100%",
|
|
1673
|
+
overflow: "hidden"
|
|
1674
|
+
};
|
|
1675
|
+
$[12] = t6;
|
|
1676
|
+
} else t6 = $[12];
|
|
1677
|
+
let t7;
|
|
1678
|
+
if ($[13] !== showShell) {
|
|
1679
|
+
t7 = showShell && /* @__PURE__ */ jsx(DrawerHeader, {});
|
|
1680
|
+
$[13] = showShell;
|
|
1681
|
+
$[14] = t7;
|
|
1682
|
+
} else t7 = $[14];
|
|
1683
|
+
let t8;
|
|
1684
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1685
|
+
t8 = {
|
|
1686
|
+
flex: 1,
|
|
1687
|
+
overflow: "auto",
|
|
1688
|
+
position: "relative"
|
|
1689
|
+
};
|
|
1690
|
+
$[15] = t8;
|
|
1691
|
+
} else t8 = $[15];
|
|
1692
|
+
let t9;
|
|
1693
|
+
if ($[16] !== children || $[17] !== isPublicRoute) {
|
|
1694
|
+
t9 = isPublicRoute ? children : /* @__PURE__ */ jsx(MsalAuthenticationTemplate, {
|
|
1695
|
+
interactionType: InteractionType.Redirect,
|
|
1696
|
+
children
|
|
1697
|
+
});
|
|
1698
|
+
$[16] = children;
|
|
1699
|
+
$[17] = isPublicRoute;
|
|
1700
|
+
$[18] = t9;
|
|
1701
|
+
} else t9 = $[18];
|
|
1702
|
+
let t10;
|
|
1703
|
+
if ($[19] !== t9) {
|
|
1704
|
+
t10 = /* @__PURE__ */ jsx(Box, {
|
|
1705
|
+
sx: t8,
|
|
1706
|
+
children: t9
|
|
1707
|
+
});
|
|
1708
|
+
$[19] = t9;
|
|
1709
|
+
$[20] = t10;
|
|
1710
|
+
} else t10 = $[20];
|
|
1711
|
+
let t11;
|
|
1712
|
+
if ($[21] !== t10 || $[22] !== t7) {
|
|
1713
|
+
t11 = /* @__PURE__ */ jsxs(Box, {
|
|
1714
|
+
component: "main",
|
|
1715
|
+
sx: t6,
|
|
1716
|
+
children: [t7, t10]
|
|
1717
|
+
});
|
|
1718
|
+
$[21] = t10;
|
|
1719
|
+
$[22] = t7;
|
|
1720
|
+
$[23] = t11;
|
|
1721
|
+
} else t11 = $[23];
|
|
1722
|
+
let t12;
|
|
1723
|
+
if ($[24] !== t11 || $[25] !== t4 || $[26] !== t5) {
|
|
1724
|
+
t12 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1725
|
+
t1,
|
|
1726
|
+
t2,
|
|
1727
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
1728
|
+
sx: t3,
|
|
1729
|
+
children: [
|
|
1730
|
+
t4,
|
|
1731
|
+
t5,
|
|
1732
|
+
t11
|
|
1733
|
+
]
|
|
1734
|
+
})
|
|
1735
|
+
] });
|
|
1736
|
+
$[24] = t11;
|
|
1737
|
+
$[25] = t4;
|
|
1738
|
+
$[26] = t5;
|
|
1739
|
+
$[27] = t12;
|
|
1740
|
+
} else t12 = $[27];
|
|
1741
|
+
return t12;
|
|
1742
|
+
};
|
|
1743
|
+
function _temp$1(previous) {
|
|
1744
|
+
const newValue = !previous;
|
|
1745
|
+
saveNavigationState(newValue);
|
|
1746
|
+
return newValue;
|
|
1747
|
+
}
|
|
1748
|
+
//#endregion
|
|
1749
|
+
//#region src/providers/DialogsProvider.tsx
|
|
1750
|
+
function DialogsProvider({ children }) {
|
|
1751
|
+
const [stack, setStack] = useState([]);
|
|
1752
|
+
const keyPrefix = useId();
|
|
1753
|
+
const nextId = useRef(0);
|
|
1754
|
+
const dialogMetadata = useRef(/* @__PURE__ */ new WeakMap());
|
|
1755
|
+
const requestDialog = useEventCallback$1(function open(Component, payload, options = {}) {
|
|
1756
|
+
const { onClose = async () => {} } = options;
|
|
1757
|
+
let resolve;
|
|
1758
|
+
const promise = new Promise((resolveImpl) => {
|
|
1759
|
+
resolve = resolveImpl;
|
|
1760
|
+
});
|
|
1761
|
+
const key = `${keyPrefix}-${nextId.current}`;
|
|
1762
|
+
nextId.current += 1;
|
|
1763
|
+
const newEntry = {
|
|
1764
|
+
key,
|
|
1765
|
+
open: true,
|
|
1766
|
+
promise,
|
|
1767
|
+
Component,
|
|
1768
|
+
payload,
|
|
1769
|
+
onClose,
|
|
1770
|
+
resolve
|
|
1771
|
+
};
|
|
1772
|
+
dialogMetadata.current.set(promise, newEntry);
|
|
1773
|
+
setStack((previousStack) => [...previousStack, newEntry]);
|
|
1774
|
+
return promise;
|
|
1775
|
+
});
|
|
1776
|
+
const removeDialogFromStack = (dialog) => {
|
|
1777
|
+
setStack((previousStack_0) => previousStack_0.filter((entry) => entry.promise !== dialog));
|
|
1778
|
+
dialogMetadata.current.delete(dialog);
|
|
1779
|
+
};
|
|
1780
|
+
const closeDialogUi = useEventCallback$1(function closeDialogUi(dialog_0) {
|
|
1781
|
+
setStack((previousStack_1) => previousStack_1.map((entry_0) => entry_0.promise === dialog_0 ? {
|
|
1782
|
+
...entry_0,
|
|
1783
|
+
open: false
|
|
1784
|
+
} : entry_0));
|
|
1785
|
+
setTimeout(() => removeDialogFromStack(dialog_0), 1e3);
|
|
1786
|
+
});
|
|
1787
|
+
const closeDialog = useEventCallback$1(async function closeDialog(dialog_1, result) {
|
|
1788
|
+
const entryToClose = dialogMetadata.current.get(dialog_1);
|
|
1789
|
+
if (!entryToClose) throw new Error("Dialog not found in stack");
|
|
1790
|
+
try {
|
|
1791
|
+
await entryToClose.onClose(result);
|
|
1792
|
+
} finally {
|
|
1793
|
+
entryToClose.resolve(result);
|
|
1794
|
+
closeDialogUi(dialog_1);
|
|
1795
|
+
}
|
|
1796
|
+
return dialog_1;
|
|
1797
|
+
});
|
|
1798
|
+
return /* @__PURE__ */ jsxs(DialogsContext.Provider, {
|
|
1799
|
+
value: {
|
|
1800
|
+
open: requestDialog,
|
|
1801
|
+
close: closeDialog
|
|
1802
|
+
},
|
|
1803
|
+
children: [children, stack.map(({ key: key_0, open, Component: Component_0, payload: payload_0, promise: promise_0 }) => /* @__PURE__ */ jsx(Component_0, {
|
|
1804
|
+
payload: payload_0,
|
|
1805
|
+
open,
|
|
1806
|
+
onClose: async (result_0) => {
|
|
1807
|
+
await closeDialog(promise_0, result_0);
|
|
1808
|
+
}
|
|
1809
|
+
}, key_0))]
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
//#endregion
|
|
1813
|
+
//#region src/providers/MsalAuthProvider.tsx
|
|
1814
|
+
const MsalAuthEffects = () => {
|
|
1815
|
+
const $ = c(12);
|
|
1816
|
+
if ($[0] !== "67cb9b81df44ca8f126c014d72bff33c094a5c91732f1ddb4102b3b19a004f84") {
|
|
1817
|
+
for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1818
|
+
$[0] = "67cb9b81df44ca8f126c014d72bff33c094a5c91732f1ddb4102b3b19a004f84";
|
|
1819
|
+
}
|
|
1820
|
+
const { inProgress, instance } = useMsal();
|
|
1821
|
+
const router = useRouter();
|
|
1822
|
+
const previousInProgress = useRef(inProgress);
|
|
1823
|
+
const navigate = useNavigate();
|
|
1824
|
+
let t0;
|
|
1825
|
+
let t1;
|
|
1826
|
+
if ($[1] !== navigate) {
|
|
1827
|
+
t0 = () => {
|
|
1828
|
+
pca.setNavigationClient(new TanStackNavigationClient(navigate));
|
|
1829
|
+
};
|
|
1830
|
+
t1 = [navigate];
|
|
1831
|
+
$[1] = navigate;
|
|
1832
|
+
$[2] = t0;
|
|
1833
|
+
$[3] = t1;
|
|
1834
|
+
} else {
|
|
1835
|
+
t0 = $[2];
|
|
1836
|
+
t1 = $[3];
|
|
1837
|
+
}
|
|
1838
|
+
useEffect(t0, t1);
|
|
1839
|
+
let t2;
|
|
1840
|
+
let t3;
|
|
1841
|
+
if ($[4] !== instance || $[5] !== router) {
|
|
1842
|
+
t2 = () => {
|
|
1843
|
+
const callbackId = instance.addEventCallback((event) => {
|
|
1844
|
+
if (event.eventType === EventType.LOGIN_SUCCESS || event.eventType === EventType.ACQUIRE_TOKEN_SUCCESS || event.eventType === EventType.LOGOUT_SUCCESS) router.invalidate();
|
|
1845
|
+
});
|
|
1846
|
+
return () => {
|
|
1847
|
+
if (callbackId) instance.removeEventCallback(callbackId);
|
|
1848
|
+
};
|
|
1849
|
+
};
|
|
1850
|
+
t3 = [instance, router];
|
|
1851
|
+
$[4] = instance;
|
|
1852
|
+
$[5] = router;
|
|
1853
|
+
$[6] = t2;
|
|
1854
|
+
$[7] = t3;
|
|
1855
|
+
} else {
|
|
1856
|
+
t2 = $[6];
|
|
1857
|
+
t3 = $[7];
|
|
1858
|
+
}
|
|
1859
|
+
useEffect(t2, t3);
|
|
1860
|
+
let t4;
|
|
1861
|
+
let t5;
|
|
1862
|
+
if ($[8] !== inProgress || $[9] !== router) {
|
|
1863
|
+
t4 = () => {
|
|
1864
|
+
const wasInteracting = previousInProgress.current !== InteractionStatus.None;
|
|
1865
|
+
previousInProgress.current = inProgress;
|
|
1866
|
+
if (wasInteracting && inProgress === InteractionStatus.None) router.invalidate();
|
|
1867
|
+
};
|
|
1868
|
+
t5 = [inProgress, router];
|
|
1869
|
+
$[8] = inProgress;
|
|
1870
|
+
$[9] = router;
|
|
1871
|
+
$[10] = t4;
|
|
1872
|
+
$[11] = t5;
|
|
1873
|
+
} else {
|
|
1874
|
+
t4 = $[10];
|
|
1875
|
+
t5 = $[11];
|
|
1876
|
+
}
|
|
1877
|
+
useEffect(t4, t5);
|
|
1878
|
+
return null;
|
|
1879
|
+
};
|
|
1880
|
+
const MsalAuthProvider = (t0) => {
|
|
1881
|
+
const $ = c(4);
|
|
1882
|
+
if ($[0] !== "67cb9b81df44ca8f126c014d72bff33c094a5c91732f1ddb4102b3b19a004f84") {
|
|
1883
|
+
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1884
|
+
$[0] = "67cb9b81df44ca8f126c014d72bff33c094a5c91732f1ddb4102b3b19a004f84";
|
|
1885
|
+
}
|
|
1886
|
+
const { children } = t0;
|
|
1887
|
+
let t1;
|
|
1888
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1889
|
+
t1 = /* @__PURE__ */ jsx(MsalAuthEffects, {});
|
|
1890
|
+
$[1] = t1;
|
|
1891
|
+
} else t1 = $[1];
|
|
1892
|
+
let t2;
|
|
1893
|
+
if ($[2] !== children) {
|
|
1894
|
+
t2 = /* @__PURE__ */ jsxs(MsalProvider, {
|
|
1895
|
+
instance: pca,
|
|
1896
|
+
children: [t1, children]
|
|
1897
|
+
});
|
|
1898
|
+
$[2] = children;
|
|
1899
|
+
$[3] = t2;
|
|
1900
|
+
} else t2 = $[3];
|
|
1901
|
+
return t2;
|
|
1902
|
+
};
|
|
1903
|
+
//#endregion
|
|
1904
|
+
//#region src/providers/NotificationProvider.tsx
|
|
1905
|
+
const STACK_INTERVAL = 1e3;
|
|
1906
|
+
const NotificationProvider = (t0) => {
|
|
1907
|
+
const $ = c(22);
|
|
1908
|
+
if ($[0] !== "aeeb800673c818aa8dd113658f5d8c31d4fe124c64515dc70b2cce8523de5a50") {
|
|
1909
|
+
for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1910
|
+
$[0] = "aeeb800673c818aa8dd113658f5d8c31d4fe124c64515dc70b2cce8523de5a50";
|
|
1911
|
+
}
|
|
1912
|
+
const { children, snackbarOrigin } = t0;
|
|
1913
|
+
let t1;
|
|
1914
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1915
|
+
t1 = [];
|
|
1916
|
+
$[1] = t1;
|
|
1917
|
+
} else t1 = $[1];
|
|
1918
|
+
const [queue, setQueue] = useState(t1);
|
|
1919
|
+
const [current, setCurrent] = useState(null);
|
|
1920
|
+
const open = Boolean(current);
|
|
1921
|
+
const processingTimeout = useRef(null);
|
|
1922
|
+
let t2;
|
|
1923
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1924
|
+
t2 = () => {
|
|
1925
|
+
setQueue((prevQueue) => {
|
|
1926
|
+
if (prevQueue.length === 0) return prevQueue;
|
|
1927
|
+
const [next, ...rest] = prevQueue;
|
|
1928
|
+
setCurrent(next);
|
|
1929
|
+
return rest;
|
|
1930
|
+
});
|
|
1931
|
+
};
|
|
1932
|
+
$[2] = t2;
|
|
1933
|
+
} else t2 = $[2];
|
|
1934
|
+
const processQueue = t2;
|
|
1935
|
+
let t3;
|
|
1936
|
+
let t4;
|
|
1937
|
+
if ($[3] !== current || $[4] !== open || $[5] !== queue.length) {
|
|
1938
|
+
t3 = () => {
|
|
1939
|
+
if (!open && queue.length > 0) processingTimeout.current = setTimeout(processQueue, current ? STACK_INTERVAL : 0);
|
|
1940
|
+
return () => {
|
|
1941
|
+
if (processingTimeout.current) clearTimeout(processingTimeout.current);
|
|
1942
|
+
};
|
|
1943
|
+
};
|
|
1944
|
+
t4 = [
|
|
1945
|
+
open,
|
|
1946
|
+
queue.length,
|
|
1947
|
+
current
|
|
1948
|
+
];
|
|
1949
|
+
$[3] = current;
|
|
1950
|
+
$[4] = open;
|
|
1951
|
+
$[5] = queue.length;
|
|
1952
|
+
$[6] = t3;
|
|
1953
|
+
$[7] = t4;
|
|
1954
|
+
} else {
|
|
1955
|
+
t3 = $[6];
|
|
1956
|
+
t4 = $[7];
|
|
1957
|
+
}
|
|
1958
|
+
useEffect(t3, t4);
|
|
1959
|
+
let t5;
|
|
1960
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1961
|
+
t5 = (message, options) => {
|
|
1962
|
+
const notification = {
|
|
1963
|
+
message,
|
|
1964
|
+
severity: options?.severity,
|
|
1965
|
+
autoHideDuration: options?.autoHideDuration ?? 5e3
|
|
1966
|
+
};
|
|
1967
|
+
setQueue((prev) => [...prev, notification]);
|
|
1968
|
+
};
|
|
1969
|
+
$[8] = t5;
|
|
1970
|
+
} else t5 = $[8];
|
|
1971
|
+
const notify = t5;
|
|
1972
|
+
let t6;
|
|
1973
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1974
|
+
t6 = { notify };
|
|
1975
|
+
$[9] = t6;
|
|
1976
|
+
} else t6 = $[9];
|
|
1977
|
+
const t7 = current?.autoHideDuration;
|
|
1978
|
+
let t8;
|
|
1979
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1980
|
+
t8 = (_event, reason) => {
|
|
1981
|
+
if (reason === "clickaway") return;
|
|
1982
|
+
setCurrent(null);
|
|
1983
|
+
};
|
|
1984
|
+
$[10] = t8;
|
|
1985
|
+
} else t8 = $[10];
|
|
1986
|
+
const t9 = current?.message;
|
|
1987
|
+
let t10;
|
|
1988
|
+
if ($[11] !== current) {
|
|
1989
|
+
t10 = current?.severity ? /* @__PURE__ */ jsx(Alert, {
|
|
1990
|
+
onClose: () => setCurrent(null),
|
|
1991
|
+
severity: current.severity,
|
|
1992
|
+
variant: "filled",
|
|
1993
|
+
children: current.message
|
|
1994
|
+
}) : void 0;
|
|
1995
|
+
$[11] = current;
|
|
1996
|
+
$[12] = t10;
|
|
1997
|
+
} else t10 = $[12];
|
|
1998
|
+
let t11;
|
|
1999
|
+
if ($[13] !== open || $[14] !== snackbarOrigin || $[15] !== t10 || $[16] !== t7 || $[17] !== t9) {
|
|
2000
|
+
t11 = /* @__PURE__ */ jsx(Snackbar, {
|
|
2001
|
+
open,
|
|
2002
|
+
autoHideDuration: t7,
|
|
2003
|
+
onClose: t8,
|
|
2004
|
+
anchorOrigin: snackbarOrigin,
|
|
2005
|
+
message: t9,
|
|
2006
|
+
children: t10
|
|
2007
|
+
});
|
|
2008
|
+
$[13] = open;
|
|
2009
|
+
$[14] = snackbarOrigin;
|
|
2010
|
+
$[15] = t10;
|
|
2011
|
+
$[16] = t7;
|
|
2012
|
+
$[17] = t9;
|
|
2013
|
+
$[18] = t11;
|
|
2014
|
+
} else t11 = $[18];
|
|
2015
|
+
let t12;
|
|
2016
|
+
if ($[19] !== children || $[20] !== t11) {
|
|
2017
|
+
t12 = /* @__PURE__ */ jsxs(NotificationContext, {
|
|
2018
|
+
value: t6,
|
|
2019
|
+
children: [children, t11]
|
|
2020
|
+
});
|
|
2021
|
+
$[19] = children;
|
|
2022
|
+
$[20] = t11;
|
|
2023
|
+
$[21] = t12;
|
|
2024
|
+
} else t12 = $[21];
|
|
2025
|
+
return t12;
|
|
2026
|
+
};
|
|
2027
|
+
//#endregion
|
|
2028
|
+
//#region src/providers/LayoutProvider.tsx
|
|
2029
|
+
const YEAR_IN_MINUTES = 1440 * 365;
|
|
2030
|
+
const setLocale = (language) => {
|
|
2031
|
+
z$1.config(z$1.core.locales[language]());
|
|
2032
|
+
dayjs.locale(language);
|
|
2033
|
+
};
|
|
2034
|
+
await i18n.use(LanguageDetector).use(initReactI18next).init({
|
|
2035
|
+
resources,
|
|
2036
|
+
fallbackLng: "en",
|
|
2037
|
+
supportedLngs: Object.keys(resources),
|
|
2038
|
+
detection: {
|
|
2039
|
+
caches: ["cookie"],
|
|
2040
|
+
cookieMinutes: YEAR_IN_MINUTES
|
|
2041
|
+
},
|
|
2042
|
+
interpolation: { escapeValue: false }
|
|
2043
|
+
});
|
|
2044
|
+
setLocale(i18n.resolvedLanguage ?? i18n.language);
|
|
2045
|
+
i18n.on("languageChanged", (language) => {
|
|
2046
|
+
setLocale(language);
|
|
2047
|
+
});
|
|
2048
|
+
const LayoutProvider = (t0) => {
|
|
2049
|
+
const $ = c(12);
|
|
2050
|
+
if ($[0] !== "7d53a8f475a1db0d90470b3e6f4eb7def00335ac04ea3deb04c263c20cfc27ec") {
|
|
2051
|
+
for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
2052
|
+
$[0] = "7d53a8f475a1db0d90470b3e6f4eb7def00335ac04ea3deb04c263c20cfc27ec";
|
|
2053
|
+
}
|
|
2054
|
+
const { options, navigation, theme, children } = t0;
|
|
2055
|
+
let t1;
|
|
2056
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2057
|
+
t1 = [];
|
|
2058
|
+
$[1] = t1;
|
|
2059
|
+
} else t1 = $[1];
|
|
2060
|
+
useEffect(_temp, t1);
|
|
2061
|
+
const t2 = options?.snackbarOrigin;
|
|
2062
|
+
let t3;
|
|
2063
|
+
if ($[2] !== children || $[3] !== navigation || $[4] !== options) {
|
|
2064
|
+
t3 = /* @__PURE__ */ jsx(DialogsProvider, { children: /* @__PURE__ */ jsx(MsalAuthProvider, { children: /* @__PURE__ */ jsx(Layout, {
|
|
2065
|
+
navigation,
|
|
2066
|
+
options,
|
|
2067
|
+
children
|
|
2068
|
+
}) }) });
|
|
2069
|
+
$[2] = children;
|
|
2070
|
+
$[3] = navigation;
|
|
2071
|
+
$[4] = options;
|
|
2072
|
+
$[5] = t3;
|
|
2073
|
+
} else t3 = $[5];
|
|
2074
|
+
let t4;
|
|
2075
|
+
if ($[6] !== t2 || $[7] !== t3) {
|
|
2076
|
+
t4 = /* @__PURE__ */ jsx(LocalizationProvider, {
|
|
2077
|
+
dateAdapter: AdapterDayjs,
|
|
2078
|
+
adapterLocale: i18n.language,
|
|
2079
|
+
children: /* @__PURE__ */ jsx(NotificationProvider, {
|
|
2080
|
+
snackbarOrigin: t2,
|
|
2081
|
+
children: t3
|
|
2082
|
+
})
|
|
2083
|
+
});
|
|
2084
|
+
$[6] = t2;
|
|
2085
|
+
$[7] = t3;
|
|
2086
|
+
$[8] = t4;
|
|
2087
|
+
} else t4 = $[8];
|
|
2088
|
+
let t5;
|
|
2089
|
+
if ($[9] !== t4 || $[10] !== theme) {
|
|
2090
|
+
t5 = /* @__PURE__ */ jsx(ThemeProvider, {
|
|
2091
|
+
theme,
|
|
2092
|
+
children: t4
|
|
2093
|
+
});
|
|
2094
|
+
$[9] = t4;
|
|
2095
|
+
$[10] = theme;
|
|
2096
|
+
$[11] = t5;
|
|
2097
|
+
} else t5 = $[11];
|
|
2098
|
+
return t5;
|
|
2099
|
+
};
|
|
2100
|
+
function _temp() {
|
|
2101
|
+
if ("serviceWorker" in navigator) navigator.serviceWorker.register("/sw.js");
|
|
2102
|
+
}
|
|
2103
|
+
//#endregion
|
|
2104
|
+
export { LayoutProvider, WISTRON_PRIMARY_COLOR, WISTRON_SECONDARY_COLOR, getUser, rootRouteHead };
|
|
2105
|
+
|
|
2106
|
+
//# sourceMappingURL=index.js.map
|