wcz-test 6.24.1 → 6.24.3

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.
Files changed (282) hide show
  1. package/dist/chunks/ApprovalStatus-BtAVFn5p.js +8 -0
  2. package/dist/chunks/ApprovalStatus-BtAVFn5p.js.map +1 -0
  3. package/dist/{contexts/DialogsContext.js → chunks/DialogsContext-DoU_8Eeu.js} +2 -2
  4. package/dist/chunks/DialogsContext-DoU_8Eeu.js.map +1 -0
  5. package/dist/{hooks/DialogsHooks.js → chunks/DialogsHooks-DOT0O_b4.js} +18 -20
  6. package/dist/chunks/DialogsHooks-DOT0O_b4.js.map +1 -0
  7. package/dist/{queries/FileHooks.js → chunks/FileHooks-CF1bPDoe.js} +23 -23
  8. package/dist/chunks/FileHooks-CF1bPDoe.js.map +1 -0
  9. package/dist/{models/file/FileMeta.js → chunks/FileMeta-G1oT3mYK.js} +2 -2
  10. package/dist/chunks/FileMeta-G1oT3mYK.js.map +1 -0
  11. package/dist/chunks/RouterListItemButton-DTYXk1kh.js +35 -0
  12. package/dist/chunks/RouterListItemButton-DTYXk1kh.js.map +1 -0
  13. package/dist/{env.js → chunks/env-gsqZ6zZD.js} +3 -3
  14. package/dist/chunks/env-gsqZ6zZD.js.map +1 -0
  15. package/dist/{lib/queryClient.js → chunks/queryClient-CNvC95mU.js} +2 -2
  16. package/dist/chunks/queryClient-CNvC95mU.js.map +1 -0
  17. package/dist/{lib/auth/session.js → chunks/session-vW7WZadj.js} +23 -8
  18. package/dist/chunks/session-vW7WZadj.js.map +1 -0
  19. package/dist/{lib/utils.js → chunks/utils-MD9YwOtu.js} +9 -9
  20. package/dist/chunks/utils-MD9YwOtu.js.map +1 -0
  21. package/dist/client.js +4 -4
  22. package/dist/components.js +1486 -15
  23. package/dist/components.js.map +1 -1
  24. package/dist/exports/client.d.ts +17 -4
  25. package/dist/exports/components.d.ts +44 -14
  26. package/dist/exports/hooks.d.ts +23 -4
  27. package/dist/exports/index.d.ts +17 -4
  28. package/dist/exports/models.d.ts +107 -25
  29. package/dist/exports/queries.d.ts +95 -4
  30. package/dist/exports/server.d.ts +14 -4
  31. package/dist/exports/utils.d.ts +11 -3
  32. package/dist/exports/vite.d.ts +5 -1
  33. package/dist/hooks.js +1000 -3
  34. package/dist/hooks.js.map +1 -1
  35. package/dist/index.js +3327 -4
  36. package/dist/index.js.map +1 -1
  37. package/dist/models.js +159 -10
  38. package/dist/models.js.map +1 -1
  39. package/dist/queries.js +935 -14
  40. package/dist/queries.js.map +1 -1
  41. package/dist/server.js +84 -1
  42. package/dist/server.js.map +1 -1
  43. package/dist/utils.js +2 -2
  44. package/dist/vite.js +61 -1
  45. package/dist/vite.js.map +1 -1
  46. package/package.json +5 -6
  47. package/dist/_virtual/compiler-runtime.js +0 -6
  48. package/dist/_virtual/compiler-runtime.js.map +0 -1
  49. package/dist/_virtual/compiler-runtime2.js +0 -5
  50. package/dist/_virtual/compiler-runtime2.js.map +0 -1
  51. package/dist/_virtual/jsx-runtime.js +0 -6
  52. package/dist/_virtual/jsx-runtime.js.map +0 -1
  53. package/dist/_virtual/jsx-runtime2.js +0 -5
  54. package/dist/_virtual/jsx-runtime2.js.map +0 -1
  55. package/dist/_virtual/react-compiler-runtime.development.js +0 -5
  56. package/dist/_virtual/react-compiler-runtime.development.js.map +0 -1
  57. package/dist/_virtual/react-compiler-runtime.production.js +0 -5
  58. package/dist/_virtual/react-compiler-runtime.production.js.map +0 -1
  59. package/dist/_virtual/react-jsx-runtime.development.js +0 -5
  60. package/dist/_virtual/react-jsx-runtime.development.js.map +0 -1
  61. package/dist/_virtual/react-jsx-runtime.production.js +0 -5
  62. package/dist/_virtual/react-jsx-runtime.production.js.map +0 -1
  63. package/dist/components/core/AppTitle.d.ts +0 -2
  64. package/dist/components/core/AppTitle.js +0 -23
  65. package/dist/components/core/AppTitle.js.map +0 -1
  66. package/dist/components/core/Fullscreen.d.ts +0 -3
  67. package/dist/components/core/Fullscreen.js +0 -104
  68. package/dist/components/core/Fullscreen.js.map +0 -1
  69. package/dist/components/core/Layout.d.ts +0 -8
  70. package/dist/components/core/Layout.js +0 -214
  71. package/dist/components/core/Layout.js.map +0 -1
  72. package/dist/components/core/ToolbarAccount.d.ts +0 -2
  73. package/dist/components/core/ToolbarAccount.js +0 -582
  74. package/dist/components/core/ToolbarAccount.js.map +0 -1
  75. package/dist/components/core/TypographyWithIcon.d.ts +0 -7
  76. package/dist/components/core/TypographyWithIcon.js +0 -117
  77. package/dist/components/core/TypographyWithIcon.js.map +0 -1
  78. package/dist/components/core/navigation/NavigationList.d.ts +0 -22
  79. package/dist/components/core/navigation/NavigationList.js +0 -166
  80. package/dist/components/core/navigation/NavigationList.js.map +0 -1
  81. package/dist/components/core/navigation/NavigationListItem.d.ts +0 -16
  82. package/dist/components/core/navigation/NavigationListItem.js +0 -467
  83. package/dist/components/core/navigation/NavigationListItem.js.map +0 -1
  84. package/dist/components/core/navigation/NavigationRail.d.ts +0 -12
  85. package/dist/components/core/navigation/NavigationRail.js +0 -141
  86. package/dist/components/core/navigation/NavigationRail.js.map +0 -1
  87. package/dist/components/data-grid/ChipInputCell.d.ts +0 -9
  88. package/dist/components/data-grid/ChipInputCell.js +0 -95
  89. package/dist/components/data-grid/ChipInputCell.js.map +0 -1
  90. package/dist/components/data-grid/EditableColumnHeader.d.ts +0 -2
  91. package/dist/components/data-grid/EditableColumnHeader.js +0 -30
  92. package/dist/components/data-grid/EditableColumnHeader.js.map +0 -1
  93. package/dist/components/file/Dropzone.d.ts +0 -8
  94. package/dist/components/file/Dropzone.js +0 -151
  95. package/dist/components/file/Dropzone.js.map +0 -1
  96. package/dist/components/file/FileViewer.d.ts +0 -20
  97. package/dist/components/file/FileViewer.js +0 -127
  98. package/dist/components/file/FileViewer.js.map +0 -1
  99. package/dist/components/file/fileViewer/FileViewerGrid.d.ts +0 -17
  100. package/dist/components/file/fileViewer/FileViewerGrid.js +0 -282
  101. package/dist/components/file/fileViewer/FileViewerGrid.js.map +0 -1
  102. package/dist/components/file/fileViewer/FileViewerList.d.ts +0 -12
  103. package/dist/components/file/fileViewer/FileViewerList.js +0 -191
  104. package/dist/components/file/fileViewer/FileViewerList.js.map +0 -1
  105. package/dist/components/file/fileViewer/ImageViewer.d.ts +0 -6
  106. package/dist/components/file/fileViewer/ImageViewer.js +0 -75
  107. package/dist/components/file/fileViewer/ImageViewer.js.map +0 -1
  108. package/dist/components/file/fileViewer/common/ActionsMenu.d.ts +0 -15
  109. package/dist/components/file/fileViewer/common/ActionsMenu.js +0 -159
  110. package/dist/components/file/fileViewer/common/ActionsMenu.js.map +0 -1
  111. package/dist/components/form/FormAutocomplete.d.ts +0 -7
  112. package/dist/components/form/FormAutocomplete.js +0 -80
  113. package/dist/components/form/FormAutocomplete.js.map +0 -1
  114. package/dist/components/form/FormCheckbox.d.ts +0 -7
  115. package/dist/components/form/FormCheckbox.js +0 -81
  116. package/dist/components/form/FormCheckbox.js.map +0 -1
  117. package/dist/components/form/FormDatePicker.d.ts +0 -8
  118. package/dist/components/form/FormDatePicker.js +0 -77
  119. package/dist/components/form/FormDatePicker.js.map +0 -1
  120. package/dist/components/form/FormDateRangePicker.d.ts +0 -8
  121. package/dist/components/form/FormDateRangePicker.js +0 -77
  122. package/dist/components/form/FormDateRangePicker.js.map +0 -1
  123. package/dist/components/form/FormDateTimePicker.d.ts +0 -8
  124. package/dist/components/form/FormDateTimePicker.js +0 -77
  125. package/dist/components/form/FormDateTimePicker.js.map +0 -1
  126. package/dist/components/form/FormDateTimeRangePicker.d.ts +0 -8
  127. package/dist/components/form/FormDateTimeRangePicker.js +0 -77
  128. package/dist/components/form/FormDateTimeRangePicker.js.map +0 -1
  129. package/dist/components/form/FormNumberField.d.ts +0 -9
  130. package/dist/components/form/FormNumberField.js +0 -73
  131. package/dist/components/form/FormNumberField.js.map +0 -1
  132. package/dist/components/form/FormRadioGroup.d.ts +0 -13
  133. package/dist/components/form/FormRadioGroup.js +0 -113
  134. package/dist/components/form/FormRadioGroup.js.map +0 -1
  135. package/dist/components/form/FormSlider.d.ts +0 -7
  136. package/dist/components/form/FormSlider.js +0 -94
  137. package/dist/components/form/FormSlider.js.map +0 -1
  138. package/dist/components/form/FormSubmitButton.d.ts +0 -4
  139. package/dist/components/form/FormSubmitButton.js +0 -50
  140. package/dist/components/form/FormSubmitButton.js.map +0 -1
  141. package/dist/components/form/FormSwitch.d.ts +0 -7
  142. package/dist/components/form/FormSwitch.js +0 -81
  143. package/dist/components/form/FormSwitch.js.map +0 -1
  144. package/dist/components/form/FormTextField.d.ts +0 -7
  145. package/dist/components/form/FormTextField.js +0 -52
  146. package/dist/components/form/FormTextField.js.map +0 -1
  147. package/dist/components/form/FormTimePicker.d.ts +0 -8
  148. package/dist/components/form/FormTimePicker.js +0 -77
  149. package/dist/components/form/FormTimePicker.js.map +0 -1
  150. package/dist/components/form/FormTimeRangePicker.d.ts +0 -8
  151. package/dist/components/form/FormTimeRangePicker.js +0 -77
  152. package/dist/components/form/FormTimeRangePicker.js.map +0 -1
  153. package/dist/components/router/RouterButton.d.ts +0 -6
  154. package/dist/components/router/RouterButton.js +0 -35
  155. package/dist/components/router/RouterButton.js.map +0 -1
  156. package/dist/components/router/RouterError.d.ts +0 -7
  157. package/dist/components/router/RouterError.js +0 -62
  158. package/dist/components/router/RouterError.js.map +0 -1
  159. package/dist/components/router/RouterGridActionsCellItem.d.ts +0 -6
  160. package/dist/components/router/RouterGridActionsCellItem.js +0 -35
  161. package/dist/components/router/RouterGridActionsCellItem.js.map +0 -1
  162. package/dist/components/router/RouterIconButton.d.ts +0 -6
  163. package/dist/components/router/RouterIconButton.js +0 -35
  164. package/dist/components/router/RouterIconButton.js.map +0 -1
  165. package/dist/components/router/RouterLink.d.ts +0 -6
  166. package/dist/components/router/RouterLink.js +0 -35
  167. package/dist/components/router/RouterLink.js.map +0 -1
  168. package/dist/components/router/RouterListItemButton.d.ts +0 -6
  169. package/dist/components/router/RouterListItemButton.js +0 -35
  170. package/dist/components/router/RouterListItemButton.js.map +0 -1
  171. package/dist/components/router/RouterNotFound.d.ts +0 -1
  172. package/dist/components/router/RouterNotFound.js +0 -53
  173. package/dist/components/router/RouterNotFound.js.map +0 -1
  174. package/dist/components/router/RouterTab.d.ts +0 -6
  175. package/dist/components/router/RouterTab.js +0 -35
  176. package/dist/components/router/RouterTab.js.map +0 -1
  177. package/dist/contexts/DialogsContext.d.ts +0 -6
  178. package/dist/contexts/DialogsContext.js.map +0 -1
  179. package/dist/contexts/FileContext.d.ts +0 -13
  180. package/dist/contexts/FileContext.js +0 -14
  181. package/dist/contexts/FileContext.js.map +0 -1
  182. package/dist/env.d.ts +0 -13
  183. package/dist/env.js.map +0 -1
  184. package/dist/hooks/DialogsHooks.d.ts +0 -42
  185. package/dist/hooks/DialogsHooks.js.map +0 -1
  186. package/dist/hooks/FormHooks.d.ts +0 -52
  187. package/dist/hooks/FormHooks.js +0 -55
  188. package/dist/hooks/FormHooks.js.map +0 -1
  189. package/dist/lib/auth/api.d.ts +0 -3
  190. package/dist/lib/auth/api.js +0 -91
  191. package/dist/lib/auth/api.js.map +0 -1
  192. package/dist/lib/auth/entra.d.ts +0 -2
  193. package/dist/lib/auth/entra.js +0 -7
  194. package/dist/lib/auth/entra.js.map +0 -1
  195. package/dist/lib/auth/graph.d.ts +0 -17
  196. package/dist/lib/auth/graph.js +0 -72
  197. package/dist/lib/auth/graph.js.map +0 -1
  198. package/dist/lib/auth/session.d.ts +0 -24
  199. package/dist/lib/auth/session.js.map +0 -1
  200. package/dist/lib/queryClient.d.ts +0 -2
  201. package/dist/lib/queryClient.js.map +0 -1
  202. package/dist/lib/utils.d.ts +0 -52
  203. package/dist/lib/utils.js.map +0 -1
  204. package/dist/lib/vite-plugin.d.ts +0 -2
  205. package/dist/lib/vite-plugin.js +0 -65
  206. package/dist/lib/vite-plugin.js.map +0 -1
  207. package/dist/middleware/auth.d.ts +0 -22
  208. package/dist/models/Navigation.d.ts +0 -18
  209. package/dist/models/User.d.ts +0 -16
  210. package/dist/models/User.js +0 -18
  211. package/dist/models/User.js.map +0 -1
  212. package/dist/models/approval/Approval.d.ts +0 -177
  213. package/dist/models/approval/Approval.js +0 -81
  214. package/dist/models/approval/Approval.js.map +0 -1
  215. package/dist/models/approval/ApprovalEmployee.d.ts +0 -7
  216. package/dist/models/approval/ApprovalEmployee.js +0 -10
  217. package/dist/models/approval/ApprovalEmployee.js.map +0 -1
  218. package/dist/models/approval/ApprovalFlow.d.ts +0 -49
  219. package/dist/models/approval/ApprovalFlow.js +0 -15
  220. package/dist/models/approval/ApprovalFlow.js.map +0 -1
  221. package/dist/models/approval/ApprovalFlowStep.d.ts +0 -29
  222. package/dist/models/approval/ApprovalFlowStep.js +0 -17
  223. package/dist/models/approval/ApprovalFlowStep.js.map +0 -1
  224. package/dist/models/approval/ApprovalRequestType.d.ts +0 -5
  225. package/dist/models/approval/ApprovalRequestType.js +0 -6
  226. package/dist/models/approval/ApprovalRequestType.js.map +0 -1
  227. package/dist/models/approval/ApprovalStatus.d.ts +0 -9
  228. package/dist/models/approval/ApprovalStatus.js +0 -6
  229. package/dist/models/approval/ApprovalStatus.js.map +0 -1
  230. package/dist/models/approval/ApprovalStepResult.d.ts +0 -11
  231. package/dist/models/approval/ApprovalStepResult.js +0 -6
  232. package/dist/models/approval/ApprovalStepResult.js.map +0 -1
  233. package/dist/models/approval/StepApprovalOrder.d.ts +0 -6
  234. package/dist/models/approval/StepApprovalOrder.js +0 -6
  235. package/dist/models/approval/StepApprovalOrder.js.map +0 -1
  236. package/dist/models/email/Email.d.ts +0 -13
  237. package/dist/models/email/Email.js +0 -14
  238. package/dist/models/email/Email.js.map +0 -1
  239. package/dist/models/email/EmailAttachment.d.ts +0 -6
  240. package/dist/models/email/EmailAttachment.js +0 -9
  241. package/dist/models/email/EmailAttachment.js.map +0 -1
  242. package/dist/models/file/FileActions.d.ts +0 -6
  243. package/dist/models/file/FileMeta.d.ts +0 -15
  244. package/dist/models/file/FileMeta.js.map +0 -1
  245. package/dist/models/peoplesoft/Department.d.ts +0 -58
  246. package/dist/models/peoplesoft/Department.js +0 -19
  247. package/dist/models/peoplesoft/Department.js.map +0 -1
  248. package/dist/models/peoplesoft/Employee.d.ts +0 -46
  249. package/dist/models/peoplesoft/Employee.js +0 -43
  250. package/dist/models/peoplesoft/Employee.js.map +0 -1
  251. package/dist/models/peoplesoft/EmployeeCategoryGroup.d.ts +0 -6
  252. package/dist/models/peoplesoft/EmployeeCategoryGroup.js +0 -6
  253. package/dist/models/peoplesoft/EmployeeCategoryGroup.js.map +0 -1
  254. package/dist/models/peoplesoft/EmployeeStatus.d.ts +0 -6
  255. package/dist/models/peoplesoft/EmployeeStatus.js +0 -6
  256. package/dist/models/peoplesoft/EmployeeStatus.js.map +0 -1
  257. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +0 -22
  258. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js.map +0 -1
  259. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +0 -16
  260. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js.map +0 -1
  261. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -262
  262. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +0 -1
  263. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -33
  264. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js.map +0 -1
  265. package/dist/node_modules/react/compiler-runtime.js +0 -18
  266. package/dist/node_modules/react/compiler-runtime.js.map +0 -1
  267. package/dist/node_modules/react/jsx-runtime.js +0 -18
  268. package/dist/node_modules/react/jsx-runtime.js.map +0 -1
  269. package/dist/providers/DialogsProvider.d.ts +0 -5
  270. package/dist/providers/DialogsProvider.js +0 -79
  271. package/dist/providers/DialogsProvider.js.map +0 -1
  272. package/dist/providers/LayoutProvider.d.ts +0 -11
  273. package/dist/providers/LayoutProvider.js +0 -94
  274. package/dist/providers/LayoutProvider.js.map +0 -1
  275. package/dist/queries/ApprovalHooks.d.ts +0 -338
  276. package/dist/queries/ApprovalHooks.js +0 -326
  277. package/dist/queries/ApprovalHooks.js.map +0 -1
  278. package/dist/queries/FileHooks.d.ts +0 -151
  279. package/dist/queries/FileHooks.js.map +0 -1
  280. package/dist/queries/PeopleSoftHooks.d.ts +0 -537
  281. package/dist/queries/PeopleSoftHooks.js +0 -628
  282. package/dist/queries/PeopleSoftHooks.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,10 +1,3333 @@
1
- import { LayoutProvider, setSSRLanguage } from "./providers/LayoutProvider.js";
2
- import { rootRouteHead } from "./lib/utils.js";
3
- import { getSessionUser } from "./lib/auth/graph.js";
1
+ import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
3
+ import { Stack, Typography, Collapse, useMediaQuery, useColorScheme, ListItemButton as ListItemButton$1, ListItemText as ListItemText$1, ListItemIcon as ListItemIcon$1, ListItem as ListItem$1, Avatar as Avatar$1, ListSubheader as ListSubheader$1, List as List$1, IconButton, Box as Box$1, Menu, InitColorSchemeScript, CssBaseline, AppBar, Toolbar, LinearProgress, ThemeProvider } from "@mui/material";
4
+ import { createServerFn, createIsomorphicFn } from "@tanstack/react-start";
5
+ import { getCookie } from "@tanstack/react-start/server";
6
+ import dayjs from "dayjs";
7
+ import i18n from "i18next";
8
+ import LanguageDetector from "i18next-browser-languagedetector";
9
+ import * as React from "react";
10
+ import { useState, useId, useRef, Fragment, useEffect, Suspense, useEffectEvent } from "react";
11
+ import { useTranslation, initReactI18next } from "react-i18next";
12
+ import { resources } from "virtual:wcz-layout";
13
+ import z__default from "zod";
14
+ import { D as DialogsContext } from "./chunks/DialogsContext-DoU_8Eeu.js";
15
+ import Menu$1 from "@mui/icons-material/Menu";
16
+ import MenuOpen from "@mui/icons-material/MenuOpen";
17
+ import { useThemeProps, styled, useTheme } from "@mui/material/styles";
18
+ import { useIsFetching, useIsMutating } from "@tanstack/react-query";
19
+ import { c as clientEnv } from "./chunks/env-gsqZ6zZD.js";
20
+ import Box from "@mui/material/Box";
21
+ import Drawer from "@mui/material/Drawer";
22
+ import { useNavigate, useRouterState, Await } from "@tanstack/react-router";
23
+ import Divider from "@mui/material/Divider";
24
+ import List from "@mui/material/List";
25
+ import ListSubheader from "@mui/material/ListSubheader";
26
+ import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
27
+ import Avatar from "@mui/material/Avatar";
28
+ import ListItem from "@mui/material/ListItem";
29
+ import ListItemButton from "@mui/material/ListItemButton";
30
+ import ListItemIcon from "@mui/material/ListItemIcon";
31
+ import ListItemText from "@mui/material/ListItemText";
32
+ import MuiPaper from "@mui/material/Paper";
33
+ import MuiPopper from "@mui/material/Popper";
34
+ import Typography$1 from "@mui/material/Typography";
35
+ import { R as RouterListItemButton } from "./chunks/RouterListItemButton-DTYXk1kh.js";
36
+ import AccountCircle from "@mui/icons-material/AccountCircle";
37
+ import ArrowBack from "@mui/icons-material/ArrowBack";
38
+ import Brightness4 from "@mui/icons-material/Brightness4";
39
+ import ChevronRight from "@mui/icons-material/ChevronRight";
40
+ import DarkMode from "@mui/icons-material/DarkMode";
41
+ import Done from "@mui/icons-material/Done";
42
+ import LightMode from "@mui/icons-material/LightMode";
43
+ import Logout from "@mui/icons-material/Logout";
44
+ import SettingsBrightness from "@mui/icons-material/SettingsBrightness";
45
+ import Translate from "@mui/icons-material/Translate";
46
+ import axios from "axios";
47
+ import { q as queryClient } from "./chunks/queryClient-CNvC95mU.js";
48
+ import { r as requireSession, g as getAccessToken } from "./chunks/session-vW7WZadj.js";
49
+ import weekOfYearPlugin from "dayjs/plugin/weekOfYear.js";
50
+ import customParseFormatPlugin from "dayjs/plugin/customParseFormat.js";
51
+ import localizedFormatPlugin from "dayjs/plugin/localizedFormat.js";
52
+ import isBetweenPlugin from "dayjs/plugin/isBetween.js";
53
+ import advancedFormatPlugin from "dayjs/plugin/advancedFormat.js";
54
+ import { r } from "./chunks/utils-MD9YwOtu.js";
55
+ function _extends() {
56
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
57
+ for (var e = 1; e < arguments.length; e++) {
58
+ var t = arguments[e];
59
+ for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
60
+ }
61
+ return n;
62
+ }, _extends.apply(null, arguments);
63
+ }
64
+ function _objectWithoutPropertiesLoose(r2, e) {
65
+ if (null == r2) return {};
66
+ var t = {};
67
+ for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
68
+ if (-1 !== e.indexOf(n)) continue;
69
+ t[n] = r2[n];
70
+ }
71
+ return t;
72
+ }
73
+ var propTypes = { exports: {} };
74
+ var reactIs = { exports: {} };
75
+ var reactIs_production_min = {};
76
+ var hasRequiredReactIs_production_min;
77
+ function requireReactIs_production_min() {
78
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
79
+ hasRequiredReactIs_production_min = 1;
80
+ var b = "function" === typeof Symbol && Symbol.for, c2 = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103, d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, r2 = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121, w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
81
+ function z(a) {
82
+ if ("object" === typeof a && null !== a) {
83
+ var u = a.$$typeof;
84
+ switch (u) {
85
+ case c2:
86
+ switch (a = a.type, a) {
87
+ case l:
88
+ case m:
89
+ case e:
90
+ case g:
91
+ case f:
92
+ case p:
93
+ return a;
94
+ default:
95
+ switch (a = a && a.$$typeof, a) {
96
+ case k:
97
+ case n:
98
+ case t:
99
+ case r2:
100
+ case h:
101
+ return a;
102
+ default:
103
+ return u;
104
+ }
105
+ }
106
+ case d:
107
+ return u;
108
+ }
109
+ }
110
+ }
111
+ function A(a) {
112
+ return z(a) === m;
113
+ }
114
+ reactIs_production_min.AsyncMode = l;
115
+ reactIs_production_min.ConcurrentMode = m;
116
+ reactIs_production_min.ContextConsumer = k;
117
+ reactIs_production_min.ContextProvider = h;
118
+ reactIs_production_min.Element = c2;
119
+ reactIs_production_min.ForwardRef = n;
120
+ reactIs_production_min.Fragment = e;
121
+ reactIs_production_min.Lazy = t;
122
+ reactIs_production_min.Memo = r2;
123
+ reactIs_production_min.Portal = d;
124
+ reactIs_production_min.Profiler = g;
125
+ reactIs_production_min.StrictMode = f;
126
+ reactIs_production_min.Suspense = p;
127
+ reactIs_production_min.isAsyncMode = function(a) {
128
+ return A(a) || z(a) === l;
129
+ };
130
+ reactIs_production_min.isConcurrentMode = A;
131
+ reactIs_production_min.isContextConsumer = function(a) {
132
+ return z(a) === k;
133
+ };
134
+ reactIs_production_min.isContextProvider = function(a) {
135
+ return z(a) === h;
136
+ };
137
+ reactIs_production_min.isElement = function(a) {
138
+ return "object" === typeof a && null !== a && a.$$typeof === c2;
139
+ };
140
+ reactIs_production_min.isForwardRef = function(a) {
141
+ return z(a) === n;
142
+ };
143
+ reactIs_production_min.isFragment = function(a) {
144
+ return z(a) === e;
145
+ };
146
+ reactIs_production_min.isLazy = function(a) {
147
+ return z(a) === t;
148
+ };
149
+ reactIs_production_min.isMemo = function(a) {
150
+ return z(a) === r2;
151
+ };
152
+ reactIs_production_min.isPortal = function(a) {
153
+ return z(a) === d;
154
+ };
155
+ reactIs_production_min.isProfiler = function(a) {
156
+ return z(a) === g;
157
+ };
158
+ reactIs_production_min.isStrictMode = function(a) {
159
+ return z(a) === f;
160
+ };
161
+ reactIs_production_min.isSuspense = function(a) {
162
+ return z(a) === p;
163
+ };
164
+ reactIs_production_min.isValidElementType = function(a) {
165
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
166
+ };
167
+ reactIs_production_min.typeOf = z;
168
+ return reactIs_production_min;
169
+ }
170
+ var reactIs_development = {};
171
+ var hasRequiredReactIs_development;
172
+ function requireReactIs_development() {
173
+ if (hasRequiredReactIs_development) return reactIs_development;
174
+ hasRequiredReactIs_development = 1;
175
+ if (process.env.NODE_ENV !== "production") {
176
+ (function() {
177
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
178
+ var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
179
+ var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
180
+ var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
181
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
182
+ var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
183
+ var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
184
+ var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
185
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
186
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
187
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
188
+ var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
189
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
190
+ var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
191
+ var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
192
+ var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
193
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
194
+ var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
195
+ var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
196
+ function isValidElementType(type) {
197
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
198
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
199
+ }
200
+ function typeOf(object) {
201
+ if (typeof object === "object" && object !== null) {
202
+ var $$typeof = object.$$typeof;
203
+ switch ($$typeof) {
204
+ case REACT_ELEMENT_TYPE:
205
+ var type = object.type;
206
+ switch (type) {
207
+ case REACT_ASYNC_MODE_TYPE:
208
+ case REACT_CONCURRENT_MODE_TYPE:
209
+ case REACT_FRAGMENT_TYPE:
210
+ case REACT_PROFILER_TYPE:
211
+ case REACT_STRICT_MODE_TYPE:
212
+ case REACT_SUSPENSE_TYPE:
213
+ return type;
214
+ default:
215
+ var $$typeofType = type && type.$$typeof;
216
+ switch ($$typeofType) {
217
+ case REACT_CONTEXT_TYPE:
218
+ case REACT_FORWARD_REF_TYPE:
219
+ case REACT_LAZY_TYPE:
220
+ case REACT_MEMO_TYPE:
221
+ case REACT_PROVIDER_TYPE:
222
+ return $$typeofType;
223
+ default:
224
+ return $$typeof;
225
+ }
226
+ }
227
+ case REACT_PORTAL_TYPE:
228
+ return $$typeof;
229
+ }
230
+ }
231
+ return void 0;
232
+ }
233
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
234
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
235
+ var ContextConsumer = REACT_CONTEXT_TYPE;
236
+ var ContextProvider = REACT_PROVIDER_TYPE;
237
+ var Element = REACT_ELEMENT_TYPE;
238
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
239
+ var Fragment2 = REACT_FRAGMENT_TYPE;
240
+ var Lazy = REACT_LAZY_TYPE;
241
+ var Memo = REACT_MEMO_TYPE;
242
+ var Portal = REACT_PORTAL_TYPE;
243
+ var Profiler = REACT_PROFILER_TYPE;
244
+ var StrictMode = REACT_STRICT_MODE_TYPE;
245
+ var Suspense2 = REACT_SUSPENSE_TYPE;
246
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
247
+ function isAsyncMode(object) {
248
+ {
249
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
250
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
251
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
252
+ }
253
+ }
254
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
255
+ }
256
+ function isConcurrentMode(object) {
257
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
258
+ }
259
+ function isContextConsumer(object) {
260
+ return typeOf(object) === REACT_CONTEXT_TYPE;
261
+ }
262
+ function isContextProvider(object) {
263
+ return typeOf(object) === REACT_PROVIDER_TYPE;
264
+ }
265
+ function isElement(object) {
266
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
267
+ }
268
+ function isForwardRef(object) {
269
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
270
+ }
271
+ function isFragment(object) {
272
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
273
+ }
274
+ function isLazy(object) {
275
+ return typeOf(object) === REACT_LAZY_TYPE;
276
+ }
277
+ function isMemo(object) {
278
+ return typeOf(object) === REACT_MEMO_TYPE;
279
+ }
280
+ function isPortal(object) {
281
+ return typeOf(object) === REACT_PORTAL_TYPE;
282
+ }
283
+ function isProfiler(object) {
284
+ return typeOf(object) === REACT_PROFILER_TYPE;
285
+ }
286
+ function isStrictMode(object) {
287
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
288
+ }
289
+ function isSuspense(object) {
290
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
291
+ }
292
+ reactIs_development.AsyncMode = AsyncMode;
293
+ reactIs_development.ConcurrentMode = ConcurrentMode;
294
+ reactIs_development.ContextConsumer = ContextConsumer;
295
+ reactIs_development.ContextProvider = ContextProvider;
296
+ reactIs_development.Element = Element;
297
+ reactIs_development.ForwardRef = ForwardRef;
298
+ reactIs_development.Fragment = Fragment2;
299
+ reactIs_development.Lazy = Lazy;
300
+ reactIs_development.Memo = Memo;
301
+ reactIs_development.Portal = Portal;
302
+ reactIs_development.Profiler = Profiler;
303
+ reactIs_development.StrictMode = StrictMode;
304
+ reactIs_development.Suspense = Suspense2;
305
+ reactIs_development.isAsyncMode = isAsyncMode;
306
+ reactIs_development.isConcurrentMode = isConcurrentMode;
307
+ reactIs_development.isContextConsumer = isContextConsumer;
308
+ reactIs_development.isContextProvider = isContextProvider;
309
+ reactIs_development.isElement = isElement;
310
+ reactIs_development.isForwardRef = isForwardRef;
311
+ reactIs_development.isFragment = isFragment;
312
+ reactIs_development.isLazy = isLazy;
313
+ reactIs_development.isMemo = isMemo;
314
+ reactIs_development.isPortal = isPortal;
315
+ reactIs_development.isProfiler = isProfiler;
316
+ reactIs_development.isStrictMode = isStrictMode;
317
+ reactIs_development.isSuspense = isSuspense;
318
+ reactIs_development.isValidElementType = isValidElementType;
319
+ reactIs_development.typeOf = typeOf;
320
+ })();
321
+ }
322
+ return reactIs_development;
323
+ }
324
+ var hasRequiredReactIs;
325
+ function requireReactIs() {
326
+ if (hasRequiredReactIs) return reactIs.exports;
327
+ hasRequiredReactIs = 1;
328
+ if (process.env.NODE_ENV === "production") {
329
+ reactIs.exports = requireReactIs_production_min();
330
+ } else {
331
+ reactIs.exports = requireReactIs_development();
332
+ }
333
+ return reactIs.exports;
334
+ }
335
+ var objectAssign;
336
+ var hasRequiredObjectAssign;
337
+ function requireObjectAssign() {
338
+ if (hasRequiredObjectAssign) return objectAssign;
339
+ hasRequiredObjectAssign = 1;
340
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
341
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
342
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
343
+ function toObject(val) {
344
+ if (val === null || val === void 0) {
345
+ throw new TypeError("Object.assign cannot be called with null or undefined");
346
+ }
347
+ return Object(val);
348
+ }
349
+ function shouldUseNative() {
350
+ try {
351
+ if (!Object.assign) {
352
+ return false;
353
+ }
354
+ var test1 = new String("abc");
355
+ test1[5] = "de";
356
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
357
+ return false;
358
+ }
359
+ var test2 = {};
360
+ for (var i = 0; i < 10; i++) {
361
+ test2["_" + String.fromCharCode(i)] = i;
362
+ }
363
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
364
+ return test2[n];
365
+ });
366
+ if (order2.join("") !== "0123456789") {
367
+ return false;
368
+ }
369
+ var test3 = {};
370
+ "abcdefghijklmnopqrst".split("").forEach(function(letter) {
371
+ test3[letter] = letter;
372
+ });
373
+ if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
374
+ return false;
375
+ }
376
+ return true;
377
+ } catch (err) {
378
+ return false;
379
+ }
380
+ }
381
+ objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
382
+ var from;
383
+ var to = toObject(target);
384
+ var symbols;
385
+ for (var s = 1; s < arguments.length; s++) {
386
+ from = Object(arguments[s]);
387
+ for (var key in from) {
388
+ if (hasOwnProperty.call(from, key)) {
389
+ to[key] = from[key];
390
+ }
391
+ }
392
+ if (getOwnPropertySymbols) {
393
+ symbols = getOwnPropertySymbols(from);
394
+ for (var i = 0; i < symbols.length; i++) {
395
+ if (propIsEnumerable.call(from, symbols[i])) {
396
+ to[symbols[i]] = from[symbols[i]];
397
+ }
398
+ }
399
+ }
400
+ }
401
+ return to;
402
+ };
403
+ return objectAssign;
404
+ }
405
+ var ReactPropTypesSecret_1;
406
+ var hasRequiredReactPropTypesSecret;
407
+ function requireReactPropTypesSecret() {
408
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
409
+ hasRequiredReactPropTypesSecret = 1;
410
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
411
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
412
+ return ReactPropTypesSecret_1;
413
+ }
414
+ var has;
415
+ var hasRequiredHas;
416
+ function requireHas() {
417
+ if (hasRequiredHas) return has;
418
+ hasRequiredHas = 1;
419
+ has = Function.call.bind(Object.prototype.hasOwnProperty);
420
+ return has;
421
+ }
422
+ var checkPropTypes_1;
423
+ var hasRequiredCheckPropTypes;
424
+ function requireCheckPropTypes() {
425
+ if (hasRequiredCheckPropTypes) return checkPropTypes_1;
426
+ hasRequiredCheckPropTypes = 1;
427
+ var printWarning = function() {
428
+ };
429
+ if (process.env.NODE_ENV !== "production") {
430
+ var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
431
+ var loggedTypeFailures = {};
432
+ var has2 = /* @__PURE__ */ requireHas();
433
+ printWarning = function(text) {
434
+ var message = "Warning: " + text;
435
+ if (typeof console !== "undefined") {
436
+ console.error(message);
437
+ }
438
+ try {
439
+ throw new Error(message);
440
+ } catch (x) {
441
+ }
442
+ };
443
+ }
444
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
445
+ if (process.env.NODE_ENV !== "production") {
446
+ for (var typeSpecName in typeSpecs) {
447
+ if (has2(typeSpecs, typeSpecName)) {
448
+ var error;
449
+ try {
450
+ if (typeof typeSpecs[typeSpecName] !== "function") {
451
+ var err = Error(
452
+ (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
453
+ );
454
+ err.name = "Invariant Violation";
455
+ throw err;
456
+ }
457
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
458
+ } catch (ex) {
459
+ error = ex;
460
+ }
461
+ if (error && !(error instanceof Error)) {
462
+ printWarning(
463
+ (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
464
+ );
465
+ }
466
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
467
+ loggedTypeFailures[error.message] = true;
468
+ var stack = getStack ? getStack() : "";
469
+ printWarning(
470
+ "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
471
+ );
472
+ }
473
+ }
474
+ }
475
+ }
476
+ }
477
+ checkPropTypes.resetWarningCache = function() {
478
+ if (process.env.NODE_ENV !== "production") {
479
+ loggedTypeFailures = {};
480
+ }
481
+ };
482
+ checkPropTypes_1 = checkPropTypes;
483
+ return checkPropTypes_1;
484
+ }
485
+ var factoryWithTypeCheckers;
486
+ var hasRequiredFactoryWithTypeCheckers;
487
+ function requireFactoryWithTypeCheckers() {
488
+ if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
489
+ hasRequiredFactoryWithTypeCheckers = 1;
490
+ var ReactIs = requireReactIs();
491
+ var assign = requireObjectAssign();
492
+ var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
493
+ var has2 = /* @__PURE__ */ requireHas();
494
+ var checkPropTypes = /* @__PURE__ */ requireCheckPropTypes();
495
+ var printWarning = function() {
496
+ };
497
+ if (process.env.NODE_ENV !== "production") {
498
+ printWarning = function(text) {
499
+ var message = "Warning: " + text;
500
+ if (typeof console !== "undefined") {
501
+ console.error(message);
502
+ }
503
+ try {
504
+ throw new Error(message);
505
+ } catch (x) {
506
+ }
507
+ };
508
+ }
509
+ function emptyFunctionThatReturnsNull() {
510
+ return null;
511
+ }
512
+ factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
513
+ var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
514
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
515
+ function getIteratorFn(maybeIterable) {
516
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
517
+ if (typeof iteratorFn === "function") {
518
+ return iteratorFn;
519
+ }
520
+ }
521
+ var ANONYMOUS = "<<anonymous>>";
522
+ var ReactPropTypes = {
523
+ array: createPrimitiveTypeChecker("array"),
524
+ bigint: createPrimitiveTypeChecker("bigint"),
525
+ bool: createPrimitiveTypeChecker("boolean"),
526
+ func: createPrimitiveTypeChecker("function"),
527
+ number: createPrimitiveTypeChecker("number"),
528
+ object: createPrimitiveTypeChecker("object"),
529
+ string: createPrimitiveTypeChecker("string"),
530
+ symbol: createPrimitiveTypeChecker("symbol"),
531
+ any: createAnyTypeChecker(),
532
+ arrayOf: createArrayOfTypeChecker,
533
+ element: createElementTypeChecker(),
534
+ elementType: createElementTypeTypeChecker(),
535
+ instanceOf: createInstanceTypeChecker,
536
+ node: createNodeChecker(),
537
+ objectOf: createObjectOfTypeChecker,
538
+ oneOf: createEnumTypeChecker,
539
+ oneOfType: createUnionTypeChecker,
540
+ shape: createShapeTypeChecker,
541
+ exact: createStrictShapeTypeChecker
542
+ };
543
+ function is(x, y) {
544
+ if (x === y) {
545
+ return x !== 0 || 1 / x === 1 / y;
546
+ } else {
547
+ return x !== x && y !== y;
548
+ }
549
+ }
550
+ function PropTypeError(message, data) {
551
+ this.message = message;
552
+ this.data = data && typeof data === "object" ? data : {};
553
+ this.stack = "";
554
+ }
555
+ PropTypeError.prototype = Error.prototype;
556
+ function createChainableTypeChecker(validate) {
557
+ if (process.env.NODE_ENV !== "production") {
558
+ var manualPropTypeCallCache = {};
559
+ var manualPropTypeWarningCount = 0;
560
+ }
561
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
562
+ componentName = componentName || ANONYMOUS;
563
+ propFullName = propFullName || propName;
564
+ if (secret !== ReactPropTypesSecret) {
565
+ if (throwOnDirectAccess) {
566
+ var err = new Error(
567
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
568
+ );
569
+ err.name = "Invariant Violation";
570
+ throw err;
571
+ } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
572
+ var cacheKey = componentName + ":" + propName;
573
+ if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
574
+ manualPropTypeWarningCount < 3) {
575
+ printWarning(
576
+ "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
577
+ );
578
+ manualPropTypeCallCache[cacheKey] = true;
579
+ manualPropTypeWarningCount++;
580
+ }
581
+ }
582
+ }
583
+ if (props[propName] == null) {
584
+ if (isRequired) {
585
+ if (props[propName] === null) {
586
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
587
+ }
588
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
589
+ }
590
+ return null;
591
+ } else {
592
+ return validate(props, propName, componentName, location, propFullName);
593
+ }
594
+ }
595
+ var chainedCheckType = checkType.bind(null, false);
596
+ chainedCheckType.isRequired = checkType.bind(null, true);
597
+ return chainedCheckType;
598
+ }
599
+ function createPrimitiveTypeChecker(expectedType) {
600
+ function validate(props, propName, componentName, location, propFullName, secret) {
601
+ var propValue = props[propName];
602
+ var propType = getPropType(propValue);
603
+ if (propType !== expectedType) {
604
+ var preciseType = getPreciseType(propValue);
605
+ return new PropTypeError(
606
+ "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
607
+ { expectedType }
608
+ );
609
+ }
610
+ return null;
611
+ }
612
+ return createChainableTypeChecker(validate);
613
+ }
614
+ function createAnyTypeChecker() {
615
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
616
+ }
617
+ function createArrayOfTypeChecker(typeChecker) {
618
+ function validate(props, propName, componentName, location, propFullName) {
619
+ if (typeof typeChecker !== "function") {
620
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
621
+ }
622
+ var propValue = props[propName];
623
+ if (!Array.isArray(propValue)) {
624
+ var propType = getPropType(propValue);
625
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
626
+ }
627
+ for (var i = 0; i < propValue.length; i++) {
628
+ var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
629
+ if (error instanceof Error) {
630
+ return error;
631
+ }
632
+ }
633
+ return null;
634
+ }
635
+ return createChainableTypeChecker(validate);
636
+ }
637
+ function createElementTypeChecker() {
638
+ function validate(props, propName, componentName, location, propFullName) {
639
+ var propValue = props[propName];
640
+ if (!isValidElement(propValue)) {
641
+ var propType = getPropType(propValue);
642
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
643
+ }
644
+ return null;
645
+ }
646
+ return createChainableTypeChecker(validate);
647
+ }
648
+ function createElementTypeTypeChecker() {
649
+ function validate(props, propName, componentName, location, propFullName) {
650
+ var propValue = props[propName];
651
+ if (!ReactIs.isValidElementType(propValue)) {
652
+ var propType = getPropType(propValue);
653
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
654
+ }
655
+ return null;
656
+ }
657
+ return createChainableTypeChecker(validate);
658
+ }
659
+ function createInstanceTypeChecker(expectedClass) {
660
+ function validate(props, propName, componentName, location, propFullName) {
661
+ if (!(props[propName] instanceof expectedClass)) {
662
+ var expectedClassName = expectedClass.name || ANONYMOUS;
663
+ var actualClassName = getClassName(props[propName]);
664
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
665
+ }
666
+ return null;
667
+ }
668
+ return createChainableTypeChecker(validate);
669
+ }
670
+ function createEnumTypeChecker(expectedValues) {
671
+ if (!Array.isArray(expectedValues)) {
672
+ if (process.env.NODE_ENV !== "production") {
673
+ if (arguments.length > 1) {
674
+ printWarning(
675
+ "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
676
+ );
677
+ } else {
678
+ printWarning("Invalid argument supplied to oneOf, expected an array.");
679
+ }
680
+ }
681
+ return emptyFunctionThatReturnsNull;
682
+ }
683
+ function validate(props, propName, componentName, location, propFullName) {
684
+ var propValue = props[propName];
685
+ for (var i = 0; i < expectedValues.length; i++) {
686
+ if (is(propValue, expectedValues[i])) {
687
+ return null;
688
+ }
689
+ }
690
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
691
+ var type = getPreciseType(value);
692
+ if (type === "symbol") {
693
+ return String(value);
694
+ }
695
+ return value;
696
+ });
697
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
698
+ }
699
+ return createChainableTypeChecker(validate);
700
+ }
701
+ function createObjectOfTypeChecker(typeChecker) {
702
+ function validate(props, propName, componentName, location, propFullName) {
703
+ if (typeof typeChecker !== "function") {
704
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
705
+ }
706
+ var propValue = props[propName];
707
+ var propType = getPropType(propValue);
708
+ if (propType !== "object") {
709
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
710
+ }
711
+ for (var key in propValue) {
712
+ if (has2(propValue, key)) {
713
+ var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
714
+ if (error instanceof Error) {
715
+ return error;
716
+ }
717
+ }
718
+ }
719
+ return null;
720
+ }
721
+ return createChainableTypeChecker(validate);
722
+ }
723
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
724
+ if (!Array.isArray(arrayOfTypeCheckers)) {
725
+ process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
726
+ return emptyFunctionThatReturnsNull;
727
+ }
728
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
729
+ var checker = arrayOfTypeCheckers[i];
730
+ if (typeof checker !== "function") {
731
+ printWarning(
732
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
733
+ );
734
+ return emptyFunctionThatReturnsNull;
735
+ }
736
+ }
737
+ function validate(props, propName, componentName, location, propFullName) {
738
+ var expectedTypes = [];
739
+ for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
740
+ var checker2 = arrayOfTypeCheckers[i2];
741
+ var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
742
+ if (checkerResult == null) {
743
+ return null;
744
+ }
745
+ if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
746
+ expectedTypes.push(checkerResult.data.expectedType);
747
+ }
748
+ }
749
+ var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
750
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
751
+ }
752
+ return createChainableTypeChecker(validate);
753
+ }
754
+ function createNodeChecker() {
755
+ function validate(props, propName, componentName, location, propFullName) {
756
+ if (!isNode(props[propName])) {
757
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
758
+ }
759
+ return null;
760
+ }
761
+ return createChainableTypeChecker(validate);
762
+ }
763
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
764
+ return new PropTypeError(
765
+ (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
766
+ );
767
+ }
768
+ function createShapeTypeChecker(shapeTypes) {
769
+ function validate(props, propName, componentName, location, propFullName) {
770
+ var propValue = props[propName];
771
+ var propType = getPropType(propValue);
772
+ if (propType !== "object") {
773
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
774
+ }
775
+ for (var key in shapeTypes) {
776
+ var checker = shapeTypes[key];
777
+ if (typeof checker !== "function") {
778
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
779
+ }
780
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
781
+ if (error) {
782
+ return error;
783
+ }
784
+ }
785
+ return null;
786
+ }
787
+ return createChainableTypeChecker(validate);
788
+ }
789
+ function createStrictShapeTypeChecker(shapeTypes) {
790
+ function validate(props, propName, componentName, location, propFullName) {
791
+ var propValue = props[propName];
792
+ var propType = getPropType(propValue);
793
+ if (propType !== "object") {
794
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
795
+ }
796
+ var allKeys = assign({}, props[propName], shapeTypes);
797
+ for (var key in allKeys) {
798
+ var checker = shapeTypes[key];
799
+ if (has2(shapeTypes, key) && typeof checker !== "function") {
800
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
801
+ }
802
+ if (!checker) {
803
+ return new PropTypeError(
804
+ "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
805
+ );
806
+ }
807
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
808
+ if (error) {
809
+ return error;
810
+ }
811
+ }
812
+ return null;
813
+ }
814
+ return createChainableTypeChecker(validate);
815
+ }
816
+ function isNode(propValue) {
817
+ switch (typeof propValue) {
818
+ case "number":
819
+ case "string":
820
+ case "undefined":
821
+ return true;
822
+ case "boolean":
823
+ return !propValue;
824
+ case "object":
825
+ if (Array.isArray(propValue)) {
826
+ return propValue.every(isNode);
827
+ }
828
+ if (propValue === null || isValidElement(propValue)) {
829
+ return true;
830
+ }
831
+ var iteratorFn = getIteratorFn(propValue);
832
+ if (iteratorFn) {
833
+ var iterator = iteratorFn.call(propValue);
834
+ var step;
835
+ if (iteratorFn !== propValue.entries) {
836
+ while (!(step = iterator.next()).done) {
837
+ if (!isNode(step.value)) {
838
+ return false;
839
+ }
840
+ }
841
+ } else {
842
+ while (!(step = iterator.next()).done) {
843
+ var entry = step.value;
844
+ if (entry) {
845
+ if (!isNode(entry[1])) {
846
+ return false;
847
+ }
848
+ }
849
+ }
850
+ }
851
+ } else {
852
+ return false;
853
+ }
854
+ return true;
855
+ default:
856
+ return false;
857
+ }
858
+ }
859
+ function isSymbol(propType, propValue) {
860
+ if (propType === "symbol") {
861
+ return true;
862
+ }
863
+ if (!propValue) {
864
+ return false;
865
+ }
866
+ if (propValue["@@toStringTag"] === "Symbol") {
867
+ return true;
868
+ }
869
+ if (typeof Symbol === "function" && propValue instanceof Symbol) {
870
+ return true;
871
+ }
872
+ return false;
873
+ }
874
+ function getPropType(propValue) {
875
+ var propType = typeof propValue;
876
+ if (Array.isArray(propValue)) {
877
+ return "array";
878
+ }
879
+ if (propValue instanceof RegExp) {
880
+ return "object";
881
+ }
882
+ if (isSymbol(propType, propValue)) {
883
+ return "symbol";
884
+ }
885
+ return propType;
886
+ }
887
+ function getPreciseType(propValue) {
888
+ if (typeof propValue === "undefined" || propValue === null) {
889
+ return "" + propValue;
890
+ }
891
+ var propType = getPropType(propValue);
892
+ if (propType === "object") {
893
+ if (propValue instanceof Date) {
894
+ return "date";
895
+ } else if (propValue instanceof RegExp) {
896
+ return "regexp";
897
+ }
898
+ }
899
+ return propType;
900
+ }
901
+ function getPostfixForTypeWarning(value) {
902
+ var type = getPreciseType(value);
903
+ switch (type) {
904
+ case "array":
905
+ case "object":
906
+ return "an " + type;
907
+ case "boolean":
908
+ case "date":
909
+ case "regexp":
910
+ return "a " + type;
911
+ default:
912
+ return type;
913
+ }
914
+ }
915
+ function getClassName(propValue) {
916
+ if (!propValue.constructor || !propValue.constructor.name) {
917
+ return ANONYMOUS;
918
+ }
919
+ return propValue.constructor.name;
920
+ }
921
+ ReactPropTypes.checkPropTypes = checkPropTypes;
922
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
923
+ ReactPropTypes.PropTypes = ReactPropTypes;
924
+ return ReactPropTypes;
925
+ };
926
+ return factoryWithTypeCheckers;
927
+ }
928
+ var factoryWithThrowingShims;
929
+ var hasRequiredFactoryWithThrowingShims;
930
+ function requireFactoryWithThrowingShims() {
931
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
932
+ hasRequiredFactoryWithThrowingShims = 1;
933
+ var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
934
+ function emptyFunction() {
935
+ }
936
+ function emptyFunctionWithReset() {
937
+ }
938
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
939
+ factoryWithThrowingShims = function() {
940
+ function shim(props, propName, componentName, location, propFullName, secret) {
941
+ if (secret === ReactPropTypesSecret) {
942
+ return;
943
+ }
944
+ var err = new Error(
945
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
946
+ );
947
+ err.name = "Invariant Violation";
948
+ throw err;
949
+ }
950
+ shim.isRequired = shim;
951
+ function getShim() {
952
+ return shim;
953
+ }
954
+ var ReactPropTypes = {
955
+ array: shim,
956
+ bigint: shim,
957
+ bool: shim,
958
+ func: shim,
959
+ number: shim,
960
+ object: shim,
961
+ string: shim,
962
+ symbol: shim,
963
+ any: shim,
964
+ arrayOf: getShim,
965
+ element: shim,
966
+ elementType: shim,
967
+ instanceOf: getShim,
968
+ node: shim,
969
+ objectOf: getShim,
970
+ oneOf: getShim,
971
+ oneOfType: getShim,
972
+ shape: getShim,
973
+ exact: getShim,
974
+ checkPropTypes: emptyFunctionWithReset,
975
+ resetWarningCache: emptyFunction
976
+ };
977
+ ReactPropTypes.PropTypes = ReactPropTypes;
978
+ return ReactPropTypes;
979
+ };
980
+ return factoryWithThrowingShims;
981
+ }
982
+ var hasRequiredPropTypes;
983
+ function requirePropTypes() {
984
+ if (hasRequiredPropTypes) return propTypes.exports;
985
+ hasRequiredPropTypes = 1;
986
+ if (process.env.NODE_ENV !== "production") {
987
+ var ReactIs = requireReactIs();
988
+ var throwOnDirectAccess = true;
989
+ propTypes.exports = /* @__PURE__ */ requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
990
+ } else {
991
+ propTypes.exports = /* @__PURE__ */ requireFactoryWithThrowingShims()();
992
+ }
993
+ return propTypes.exports;
994
+ }
995
+ var propTypesExports = /* @__PURE__ */ requirePropTypes();
996
+ const _excluded = ["localeText"];
997
+ const PickerAdapterContext = /* @__PURE__ */ React.createContext(null);
998
+ if (process.env.NODE_ENV !== "production") PickerAdapterContext.displayName = "PickerAdapterContext";
999
+ const LocalizationProvider = function LocalizationProvider2(inProps) {
1000
+ const {
1001
+ localeText: inLocaleText
1002
+ } = inProps, otherInProps = _objectWithoutPropertiesLoose(inProps, _excluded);
1003
+ const {
1004
+ adapter: parentAdapter,
1005
+ localeText: parentLocaleText
1006
+ } = React.useContext(PickerAdapterContext) ?? {
1007
+ adapter: void 0,
1008
+ localeText: void 0
1009
+ };
1010
+ const props = useThemeProps({
1011
+ // We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,
1012
+ // We will then merge this theme value with our value manually
1013
+ props: otherInProps,
1014
+ name: "MuiLocalizationProvider"
1015
+ });
1016
+ const {
1017
+ children,
1018
+ dateAdapter: DateAdapter,
1019
+ dateFormats,
1020
+ dateLibInstance,
1021
+ adapterLocale,
1022
+ localeText: themeLocaleText
1023
+ } = props;
1024
+ const localeText = React.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);
1025
+ const adapter = React.useMemo(() => {
1026
+ if (!DateAdapter) {
1027
+ if (parentAdapter) {
1028
+ return parentAdapter;
1029
+ }
1030
+ return null;
1031
+ }
1032
+ const dateAdapter = new DateAdapter({
1033
+ locale: adapterLocale,
1034
+ formats: dateFormats,
1035
+ instance: dateLibInstance
1036
+ });
1037
+ if (!dateAdapter.isMUIAdapter) {
1038
+ throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`", "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", "More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation"].join(`
1039
+ `));
1040
+ }
1041
+ return dateAdapter;
1042
+ }, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentAdapter]);
1043
+ const defaultDates = React.useMemo(() => {
1044
+ if (!adapter) {
1045
+ return null;
1046
+ }
1047
+ return {
1048
+ minDate: adapter.date("1900-01-01T00:00:00.000"),
1049
+ maxDate: adapter.date("2099-12-31T00:00:00.000")
1050
+ };
1051
+ }, [adapter]);
1052
+ const contextValue = React.useMemo(() => {
1053
+ return {
1054
+ utils: adapter,
1055
+ adapter,
1056
+ defaultDates,
1057
+ localeText
1058
+ };
1059
+ }, [defaultDates, adapter, localeText]);
1060
+ return /* @__PURE__ */ jsx(PickerAdapterContext.Provider, {
1061
+ value: contextValue,
1062
+ children
1063
+ });
1064
+ };
1065
+ if (process.env.NODE_ENV !== "production") LocalizationProvider.displayName = "LocalizationProvider";
1066
+ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
1067
+ // ----------------------------- Warning --------------------------------
1068
+ // | These PropTypes are generated from the TypeScript type definitions |
1069
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
1070
+ // ----------------------------------------------------------------------
1071
+ /**
1072
+ * Locale for the date library you are using
1073
+ */
1074
+ adapterLocale: propTypesExports.any,
1075
+ children: propTypesExports.node,
1076
+ /**
1077
+ * Date library adapter class function.
1078
+ * @see See the localization provider {@link https://mui.com/x/react-date-pickers/quickstart/#integrate-provider-and-adapter date adapter setup section} for more details.
1079
+ */
1080
+ dateAdapter: propTypesExports.func,
1081
+ /**
1082
+ * Formats that are used for any child pickers
1083
+ */
1084
+ dateFormats: propTypesExports.shape({
1085
+ dayOfMonth: propTypesExports.string,
1086
+ dayOfMonthFull: propTypesExports.string,
1087
+ fullDate: propTypesExports.string,
1088
+ fullTime12h: propTypesExports.string,
1089
+ fullTime24h: propTypesExports.string,
1090
+ hours12h: propTypesExports.string,
1091
+ hours24h: propTypesExports.string,
1092
+ keyboardDate: propTypesExports.string,
1093
+ keyboardDateTime12h: propTypesExports.string,
1094
+ keyboardDateTime24h: propTypesExports.string,
1095
+ meridiem: propTypesExports.string,
1096
+ minutes: propTypesExports.string,
1097
+ month: propTypesExports.string,
1098
+ monthShort: propTypesExports.string,
1099
+ normalDate: propTypesExports.string,
1100
+ normalDateWithWeekday: propTypesExports.string,
1101
+ seconds: propTypesExports.string,
1102
+ shortDate: propTypesExports.string,
1103
+ weekday: propTypesExports.string,
1104
+ weekdayShort: propTypesExports.string,
1105
+ year: propTypesExports.string
1106
+ }),
1107
+ /**
1108
+ * Date library instance you are using, if it has some global overrides
1109
+ * ```jsx
1110
+ * dateLibInstance={momentTimeZone}
1111
+ * ```
1112
+ */
1113
+ dateLibInstance: propTypesExports.any,
1114
+ /**
1115
+ * Locale for components texts
1116
+ */
1117
+ localeText: propTypesExports.object
1118
+ } : void 0;
1119
+ const useEnhancedEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
1120
+ function useEventCallback(fn) {
1121
+ const ref = React.useRef(fn);
1122
+ useEnhancedEffect(() => {
1123
+ ref.current = fn;
1124
+ });
1125
+ return React.useRef((...args) => (
1126
+ // @ts-expect-error hide `this`
1127
+ (0, ref.current)(...args)
1128
+ )).current;
1129
+ }
1130
+ const warnedOnceCache = /* @__PURE__ */ new Set();
1131
+ function warnOnce(message, gravity = "warning") {
1132
+ if (process.env.NODE_ENV === "production") {
1133
+ return;
1134
+ }
1135
+ const cleanMessage = Array.isArray(message) ? message.join("\n") : message;
1136
+ if (!warnedOnceCache.has(cleanMessage)) {
1137
+ warnedOnceCache.add(cleanMessage);
1138
+ if (gravity === "error") {
1139
+ console.error(cleanMessage);
1140
+ } else {
1141
+ console.warn(cleanMessage);
1142
+ }
1143
+ }
1144
+ }
1145
+ dayjs.extend(localizedFormatPlugin);
1146
+ dayjs.extend(weekOfYearPlugin);
1147
+ dayjs.extend(isBetweenPlugin);
1148
+ dayjs.extend(advancedFormatPlugin);
1149
+ const formatTokenMap = {
1150
+ // Year
1151
+ YY: "year",
1152
+ YYYY: {
1153
+ sectionType: "year",
1154
+ contentType: "digit",
1155
+ maxLength: 4
1156
+ },
1157
+ // Month
1158
+ M: {
1159
+ sectionType: "month",
1160
+ contentType: "digit",
1161
+ maxLength: 2
1162
+ },
1163
+ MM: "month",
1164
+ MMM: {
1165
+ sectionType: "month",
1166
+ contentType: "letter"
1167
+ },
1168
+ MMMM: {
1169
+ sectionType: "month",
1170
+ contentType: "letter"
1171
+ },
1172
+ // Day of the month
1173
+ D: {
1174
+ sectionType: "day",
1175
+ contentType: "digit",
1176
+ maxLength: 2
1177
+ },
1178
+ DD: "day",
1179
+ Do: {
1180
+ sectionType: "day",
1181
+ contentType: "digit-with-letter"
1182
+ },
1183
+ // Day of the week
1184
+ d: {
1185
+ sectionType: "weekDay",
1186
+ contentType: "digit",
1187
+ maxLength: 2
1188
+ },
1189
+ dd: {
1190
+ sectionType: "weekDay",
1191
+ contentType: "letter"
1192
+ },
1193
+ ddd: {
1194
+ sectionType: "weekDay",
1195
+ contentType: "letter"
1196
+ },
1197
+ dddd: {
1198
+ sectionType: "weekDay",
1199
+ contentType: "letter"
1200
+ },
1201
+ // Meridiem
1202
+ A: "meridiem",
1203
+ a: "meridiem",
1204
+ // Hours
1205
+ H: {
1206
+ sectionType: "hours",
1207
+ contentType: "digit",
1208
+ maxLength: 2
1209
+ },
1210
+ HH: "hours",
1211
+ h: {
1212
+ sectionType: "hours",
1213
+ contentType: "digit",
1214
+ maxLength: 2
1215
+ },
1216
+ hh: "hours",
1217
+ // Minutes
1218
+ m: {
1219
+ sectionType: "minutes",
1220
+ contentType: "digit",
1221
+ maxLength: 2
1222
+ },
1223
+ mm: "minutes",
1224
+ // Seconds
1225
+ s: {
1226
+ sectionType: "seconds",
1227
+ contentType: "digit",
1228
+ maxLength: 2
1229
+ },
1230
+ ss: "seconds"
1231
+ };
1232
+ const defaultFormats = {
1233
+ year: "YYYY",
1234
+ month: "MMMM",
1235
+ monthShort: "MMM",
1236
+ dayOfMonth: "D",
1237
+ dayOfMonthFull: "Do",
1238
+ weekday: "dddd",
1239
+ weekdayShort: "dd",
1240
+ hours24h: "HH",
1241
+ hours12h: "hh",
1242
+ meridiem: "A",
1243
+ minutes: "mm",
1244
+ seconds: "ss",
1245
+ fullDate: "ll",
1246
+ keyboardDate: "L",
1247
+ shortDate: "MMM D",
1248
+ normalDate: "D MMMM",
1249
+ normalDateWithWeekday: "ddd, MMM D",
1250
+ fullTime12h: "hh:mm A",
1251
+ fullTime24h: "HH:mm",
1252
+ keyboardDateTime12h: "L hh:mm A",
1253
+ keyboardDateTime24h: "L HH:mm"
1254
+ };
1255
+ const MISSING_UTC_PLUGIN = ["Missing UTC plugin", "To be able to use UTC or timezones, you have to enable the `utc` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n");
1256
+ const MISSING_TIMEZONE_PLUGIN = ["Missing timezone plugin", "To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");
1257
+ class AdapterDayjs {
1258
+ isMUIAdapter = true;
1259
+ isTimezoneCompatible = true;
1260
+ lib = "dayjs";
1261
+ escapedCharacters = {
1262
+ start: "[",
1263
+ end: "]"
1264
+ };
1265
+ formatTokenMap = /* @__PURE__ */ (() => formatTokenMap)();
1266
+ constructor({
1267
+ locale,
1268
+ formats
1269
+ } = {}) {
1270
+ this.locale = locale;
1271
+ this.formats = _extends({}, defaultFormats, formats);
1272
+ dayjs.extend(customParseFormatPlugin);
1273
+ }
1274
+ setLocaleToValue = (value) => {
1275
+ const expectedLocale = this.getCurrentLocaleCode();
1276
+ if (expectedLocale === value.locale()) {
1277
+ return value;
1278
+ }
1279
+ return value.locale(expectedLocale);
1280
+ };
1281
+ hasUTCPlugin = () => typeof dayjs.utc !== "undefined";
1282
+ hasTimezonePlugin = () => typeof dayjs.tz !== "undefined";
1283
+ isSame = (value, comparing, comparisonTemplate) => {
1284
+ const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));
1285
+ return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);
1286
+ };
1287
+ /**
1288
+ * Replaces "default" by undefined and "system" by the system timezone before passing it to `dayjs`.
1289
+ */
1290
+ cleanTimezone = (timezone) => {
1291
+ switch (timezone) {
1292
+ case "default": {
1293
+ return void 0;
1294
+ }
1295
+ case "system": {
1296
+ return dayjs.tz.guess();
1297
+ }
1298
+ default: {
1299
+ return timezone;
1300
+ }
1301
+ }
1302
+ };
1303
+ createSystemDate = (value) => {
1304
+ let date;
1305
+ if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
1306
+ const timezone = dayjs.tz.guess();
1307
+ if (timezone === "UTC") {
1308
+ date = dayjs(value);
1309
+ } else {
1310
+ date = dayjs.tz(value, timezone);
1311
+ }
1312
+ } else {
1313
+ date = dayjs(value);
1314
+ }
1315
+ return this.setLocaleToValue(date);
1316
+ };
1317
+ createUTCDate = (value) => {
1318
+ if (!this.hasUTCPlugin()) {
1319
+ throw new Error(MISSING_UTC_PLUGIN);
1320
+ }
1321
+ return this.setLocaleToValue(dayjs.utc(value));
1322
+ };
1323
+ createTZDate = (value, timezone) => {
1324
+ if (!this.hasUTCPlugin()) {
1325
+ throw new Error(MISSING_UTC_PLUGIN);
1326
+ }
1327
+ if (!this.hasTimezonePlugin()) {
1328
+ throw new Error(MISSING_TIMEZONE_PLUGIN);
1329
+ }
1330
+ const keepLocalTime = value !== void 0 && !value.endsWith("Z");
1331
+ return this.setLocaleToValue(dayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime));
1332
+ };
1333
+ getLocaleFormats = () => {
1334
+ const locales = dayjs.Ls;
1335
+ const locale = this.locale || "en";
1336
+ let localeObject = locales[locale];
1337
+ if (localeObject === void 0) {
1338
+ if (process.env.NODE_ENV !== "production") {
1339
+ warnOnce(["MUI X: Your locale has not been found.", "Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.", "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", "fallback on English locale."]);
1340
+ }
1341
+ localeObject = locales.en;
1342
+ }
1343
+ return localeObject.formats;
1344
+ };
1345
+ /**
1346
+ * If the new day does not have the same offset as the old one (when switching to summer day time for example),
1347
+ * Then dayjs will not automatically adjust the offset (moment does).
1348
+ * We have to parse again the value to make sure the `fixOffset` method is applied.
1349
+ * See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72
1350
+ */
1351
+ adjustOffset = (value) => {
1352
+ if (!this.hasTimezonePlugin()) {
1353
+ return value;
1354
+ }
1355
+ const timezone = this.getTimezone(value);
1356
+ if (timezone !== "UTC") {
1357
+ const fixedValue = value.tz(this.cleanTimezone(timezone), true);
1358
+ if (fixedValue.$offset === (value.$offset ?? 0)) {
1359
+ return value;
1360
+ }
1361
+ value.$offset = fixedValue.$offset;
1362
+ }
1363
+ return value;
1364
+ };
1365
+ date = (value, timezone = "default") => {
1366
+ if (value === null) {
1367
+ return null;
1368
+ }
1369
+ if (timezone === "UTC") {
1370
+ return this.createUTCDate(value);
1371
+ }
1372
+ if (timezone === "system" || timezone === "default" && !this.hasTimezonePlugin()) {
1373
+ return this.createSystemDate(value);
1374
+ }
1375
+ return this.createTZDate(value, timezone);
1376
+ };
1377
+ getInvalidDate = () => dayjs(/* @__PURE__ */ new Date("Invalid date"));
1378
+ getTimezone = (value) => {
1379
+ if (this.hasTimezonePlugin()) {
1380
+ const zone = value.$x?.$timezone;
1381
+ if (zone) {
1382
+ return zone;
1383
+ }
1384
+ }
1385
+ if (this.hasUTCPlugin() && value.isUTC()) {
1386
+ return "UTC";
1387
+ }
1388
+ return "system";
1389
+ };
1390
+ setTimezone = (value, timezone) => {
1391
+ if (this.getTimezone(value) === timezone) {
1392
+ return value;
1393
+ }
1394
+ if (timezone === "UTC") {
1395
+ if (!this.hasUTCPlugin()) {
1396
+ throw new Error(MISSING_UTC_PLUGIN);
1397
+ }
1398
+ return value.utc();
1399
+ }
1400
+ if (timezone === "system") {
1401
+ return value.local();
1402
+ }
1403
+ if (!this.hasTimezonePlugin()) {
1404
+ if (timezone === "default") {
1405
+ return value;
1406
+ }
1407
+ throw new Error(MISSING_TIMEZONE_PLUGIN);
1408
+ }
1409
+ return this.setLocaleToValue(dayjs.tz(value, this.cleanTimezone(timezone)));
1410
+ };
1411
+ toJsDate = (value) => {
1412
+ return value.toDate();
1413
+ };
1414
+ parse = (value, format) => {
1415
+ if (value === "") {
1416
+ return null;
1417
+ }
1418
+ return dayjs(value, format, this.locale, true);
1419
+ };
1420
+ getCurrentLocaleCode = () => {
1421
+ return this.locale || "en";
1422
+ };
1423
+ is12HourCycleInCurrentLocale = () => {
1424
+ return /A|a/.test(this.getLocaleFormats().LT || "");
1425
+ };
1426
+ expandFormat = (format) => {
1427
+ const localeFormats = this.getLocaleFormats();
1428
+ const t = (formatBis) => formatBis.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));
1429
+ return format.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {
1430
+ const B = b && b.toUpperCase();
1431
+ return a || localeFormats[b] || t(localeFormats[B]);
1432
+ });
1433
+ };
1434
+ isValid = (value) => {
1435
+ if (value == null) {
1436
+ return false;
1437
+ }
1438
+ return value.isValid();
1439
+ };
1440
+ format = (value, formatKey) => {
1441
+ return this.formatByString(value, this.formats[formatKey]);
1442
+ };
1443
+ formatByString = (value, formatString) => {
1444
+ return this.setLocaleToValue(value).format(formatString);
1445
+ };
1446
+ formatNumber = (numberToFormat) => {
1447
+ return numberToFormat;
1448
+ };
1449
+ isEqual = (value, comparing) => {
1450
+ if (value === null && comparing === null) {
1451
+ return true;
1452
+ }
1453
+ if (value === null || comparing === null) {
1454
+ return false;
1455
+ }
1456
+ return value.toDate().getTime() === comparing.toDate().getTime();
1457
+ };
1458
+ isSameYear = (value, comparing) => {
1459
+ return this.isSame(value, comparing, "YYYY");
1460
+ };
1461
+ isSameMonth = (value, comparing) => {
1462
+ return this.isSame(value, comparing, "YYYY-MM");
1463
+ };
1464
+ isSameDay = (value, comparing) => {
1465
+ return this.isSame(value, comparing, "YYYY-MM-DD");
1466
+ };
1467
+ isSameHour = (value, comparing) => {
1468
+ return value.isSame(comparing, "hour");
1469
+ };
1470
+ isAfter = (value, comparing) => {
1471
+ return value > comparing;
1472
+ };
1473
+ isAfterYear = (value, comparing) => {
1474
+ if (!this.hasUTCPlugin()) {
1475
+ return value.isAfter(comparing, "year");
1476
+ }
1477
+ return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();
1478
+ };
1479
+ isAfterDay = (value, comparing) => {
1480
+ if (!this.hasUTCPlugin()) {
1481
+ return value.isAfter(comparing, "day");
1482
+ }
1483
+ return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();
1484
+ };
1485
+ isBefore = (value, comparing) => {
1486
+ return value < comparing;
1487
+ };
1488
+ isBeforeYear = (value, comparing) => {
1489
+ if (!this.hasUTCPlugin()) {
1490
+ return value.isBefore(comparing, "year");
1491
+ }
1492
+ return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();
1493
+ };
1494
+ isBeforeDay = (value, comparing) => {
1495
+ if (!this.hasUTCPlugin()) {
1496
+ return value.isBefore(comparing, "day");
1497
+ }
1498
+ return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();
1499
+ };
1500
+ isWithinRange = (value, [start, end]) => {
1501
+ return value >= start && value <= end;
1502
+ };
1503
+ startOfYear = (value) => {
1504
+ return this.adjustOffset(value.startOf("year"));
1505
+ };
1506
+ startOfMonth = (value) => {
1507
+ return this.adjustOffset(value.startOf("month"));
1508
+ };
1509
+ startOfWeek = (value) => {
1510
+ return this.adjustOffset(this.setLocaleToValue(value).startOf("week"));
1511
+ };
1512
+ startOfDay = (value) => {
1513
+ return this.adjustOffset(value.startOf("day"));
1514
+ };
1515
+ endOfYear = (value) => {
1516
+ return this.adjustOffset(value.endOf("year"));
1517
+ };
1518
+ endOfMonth = (value) => {
1519
+ return this.adjustOffset(value.endOf("month"));
1520
+ };
1521
+ endOfWeek = (value) => {
1522
+ return this.adjustOffset(this.setLocaleToValue(value).endOf("week"));
1523
+ };
1524
+ endOfDay = (value) => {
1525
+ return this.adjustOffset(value.endOf("day"));
1526
+ };
1527
+ addYears = (value, amount) => {
1528
+ return this.adjustOffset(value.add(amount, "year"));
1529
+ };
1530
+ addMonths = (value, amount) => {
1531
+ return this.adjustOffset(value.add(amount, "month"));
1532
+ };
1533
+ addWeeks = (value, amount) => {
1534
+ return this.adjustOffset(value.add(amount, "week"));
1535
+ };
1536
+ addDays = (value, amount) => {
1537
+ return this.adjustOffset(value.add(amount, "day"));
1538
+ };
1539
+ addHours = (value, amount) => {
1540
+ return this.adjustOffset(value.add(amount, "hour"));
1541
+ };
1542
+ addMinutes = (value, amount) => {
1543
+ return this.adjustOffset(value.add(amount, "minute"));
1544
+ };
1545
+ addSeconds = (value, amount) => {
1546
+ return this.adjustOffset(value.add(amount, "second"));
1547
+ };
1548
+ getYear = (value) => {
1549
+ return value.year();
1550
+ };
1551
+ getMonth = (value) => {
1552
+ return value.month();
1553
+ };
1554
+ getDate = (value) => {
1555
+ return value.date();
1556
+ };
1557
+ getHours = (value) => {
1558
+ return value.hour();
1559
+ };
1560
+ getMinutes = (value) => {
1561
+ return value.minute();
1562
+ };
1563
+ getSeconds = (value) => {
1564
+ return value.second();
1565
+ };
1566
+ getMilliseconds = (value) => {
1567
+ return value.millisecond();
1568
+ };
1569
+ setYear = (value, year) => {
1570
+ return this.adjustOffset(value.set("year", year));
1571
+ };
1572
+ setMonth = (value, month) => {
1573
+ return this.adjustOffset(value.set("month", month));
1574
+ };
1575
+ setDate = (value, date) => {
1576
+ return this.adjustOffset(value.set("date", date));
1577
+ };
1578
+ setHours = (value, hours) => {
1579
+ return this.adjustOffset(value.set("hour", hours));
1580
+ };
1581
+ setMinutes = (value, minutes) => {
1582
+ return this.adjustOffset(value.set("minute", minutes));
1583
+ };
1584
+ setSeconds = (value, seconds) => {
1585
+ return this.adjustOffset(value.set("second", seconds));
1586
+ };
1587
+ setMilliseconds = (value, milliseconds) => {
1588
+ return this.adjustOffset(value.set("millisecond", milliseconds));
1589
+ };
1590
+ getDaysInMonth = (value) => {
1591
+ return value.daysInMonth();
1592
+ };
1593
+ getWeekArray = (value) => {
1594
+ const start = this.startOfWeek(this.startOfMonth(value));
1595
+ const end = this.endOfWeek(this.endOfMonth(value));
1596
+ let count = 0;
1597
+ let current = start;
1598
+ const nestedWeeks = [];
1599
+ while (current < end) {
1600
+ const weekNumber = Math.floor(count / 7);
1601
+ nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
1602
+ nestedWeeks[weekNumber].push(current);
1603
+ current = this.addDays(current, 1);
1604
+ count += 1;
1605
+ }
1606
+ return nestedWeeks;
1607
+ };
1608
+ getWeekNumber = (value) => {
1609
+ return value.week();
1610
+ };
1611
+ getDayOfWeek(value) {
1612
+ return value.day() + 1;
1613
+ }
1614
+ getYearRange = ([start, end]) => {
1615
+ const startDate = this.startOfYear(start);
1616
+ const endDate = this.endOfYear(end);
1617
+ const years = [];
1618
+ let current = startDate;
1619
+ while (this.isBefore(current, endDate)) {
1620
+ years.push(current);
1621
+ current = this.addYears(current, 1);
1622
+ }
1623
+ return years;
1624
+ };
1625
+ }
1626
+ function DialogsProvider({
1627
+ children
1628
+ }) {
1629
+ const [stack, setStack] = useState([]);
1630
+ const keyPrefix = useId();
1631
+ const nextId = useRef(0);
1632
+ const dialogMetadata = useRef(/* @__PURE__ */ new WeakMap());
1633
+ const requestDialog = useEventCallback(function open(Component, payload, options = {}) {
1634
+ const {
1635
+ onClose = async () => {
1636
+ }
1637
+ } = options;
1638
+ let resolve;
1639
+ const promise = new Promise((resolveImpl) => {
1640
+ resolve = resolveImpl;
1641
+ });
1642
+ const key = `${keyPrefix}-${nextId.current}`;
1643
+ nextId.current += 1;
1644
+ const newEntry = {
1645
+ key,
1646
+ open: true,
1647
+ promise,
1648
+ Component,
1649
+ payload,
1650
+ onClose,
1651
+ resolve
1652
+ };
1653
+ dialogMetadata.current.set(promise, newEntry);
1654
+ setStack((previousStack) => [...previousStack, newEntry]);
1655
+ return promise;
1656
+ });
1657
+ const removeDialogFromStack = (dialog) => {
1658
+ setStack((previousStack_0) => previousStack_0.filter((entry) => entry.promise !== dialog));
1659
+ dialogMetadata.current.delete(dialog);
1660
+ };
1661
+ const closeDialogUi = useEventCallback(function closeDialogUi2(dialog_0) {
1662
+ setStack((previousStack_1) => previousStack_1.map((entry_0) => entry_0.promise === dialog_0 ? {
1663
+ ...entry_0,
1664
+ open: false
1665
+ } : entry_0));
1666
+ setTimeout(() => removeDialogFromStack(dialog_0), 1e3);
1667
+ });
1668
+ const closeDialog = useEventCallback(async function closeDialog2(dialog_1, result) {
1669
+ const entryToClose = dialogMetadata.current.get(dialog_1);
1670
+ if (!entryToClose) {
1671
+ throw new Error("Dialog not found in stack");
1672
+ }
1673
+ try {
1674
+ await entryToClose.onClose(result);
1675
+ } finally {
1676
+ entryToClose.resolve(result);
1677
+ closeDialogUi(dialog_1);
1678
+ }
1679
+ return dialog_1;
1680
+ });
1681
+ return /* @__PURE__ */ jsxs(DialogsContext.Provider, { value: {
1682
+ open: requestDialog,
1683
+ close: closeDialog
1684
+ }, children: [
1685
+ children,
1686
+ stack.map(({
1687
+ key: key_0,
1688
+ open,
1689
+ Component: Component_0,
1690
+ payload: payload_0,
1691
+ promise: promise_0
1692
+ }) => /* @__PURE__ */ jsx(Component_0, { payload: payload_0, open, onClose: async (result_0) => {
1693
+ await closeDialog(promise_0, result_0);
1694
+ } }, key_0))
1695
+ ] });
1696
+ }
1697
+ const AppTitle = () => {
1698
+ const $ = c(1);
1699
+ let t0;
1700
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1701
+ t0 = /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", spacing: 2, flexGrow: 1, children: [
1702
+ /* @__PURE__ */ jsx("img", { src: "/favicon-32x32.png", alt: "app-logo", loading: "lazy" }),
1703
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", children: clientEnv.VITE_APP_TITLE }),
1704
+ false
1705
+ ] });
1706
+ $[0] = t0;
1707
+ } else {
1708
+ t0 = $[0];
1709
+ }
1710
+ return t0;
1711
+ };
1712
+ const ICON_SIZE = 34;
1713
+ const StyledNavButton = styled(ListItemButton)(({
1714
+ theme
1715
+ }) => ({
1716
+ borderRadius: 8,
1717
+ "&.Mui-selected": {
1718
+ "& .MuiListItemIcon-root, & .MuiTypography-root, & .MuiSvgIcon-root": {
1719
+ color: (theme.vars ?? theme).palette.primary.dark
1720
+ },
1721
+ "& .MuiAvatar-root": {
1722
+ backgroundColor: (theme.vars ?? theme).palette.primary.dark
1723
+ },
1724
+ "& .MuiTouchRipple-child": {
1725
+ backgroundColor: (theme.vars ?? theme).palette.primary.dark
1726
+ }
1727
+ },
1728
+ "& .MuiSvgIcon-root": {
1729
+ color: (theme.vars ?? theme).palette.action.active
1730
+ },
1731
+ "& .MuiAvatar-root": {
1732
+ backgroundColor: (theme.vars ?? theme).palette.action.active
1733
+ }
1734
+ }));
1735
+ const StyledRouterButton = styled(RouterListItemButton)(({
1736
+ theme
1737
+ }) => ({
1738
+ borderRadius: 8,
1739
+ "&.Mui-selected": {
1740
+ "& .MuiListItemIcon-root, & .MuiTypography-root, & .MuiSvgIcon-root": {
1741
+ color: (theme.vars ?? theme).palette.primary.dark
1742
+ },
1743
+ "& .MuiAvatar-root": {
1744
+ backgroundColor: (theme.vars ?? theme).palette.primary.dark
1745
+ },
1746
+ "& .MuiTouchRipple-child": {
1747
+ backgroundColor: (theme.vars ?? theme).palette.primary.dark
1748
+ }
1749
+ },
1750
+ "& .MuiSvgIcon-root": {
1751
+ color: (theme.vars ?? theme).palette.action.active
1752
+ },
1753
+ "& .MuiAvatar-root": {
1754
+ backgroundColor: (theme.vars ?? theme).palette.action.active
1755
+ }
1756
+ }));
1757
+ const IconOrAvatar = (t0) => {
1758
+ const $ = c(17);
1759
+ const {
1760
+ item,
1761
+ collapsed
1762
+ } = t0;
1763
+ if (item.icon || collapsed) {
1764
+ let t1;
1765
+ if ($[0] !== collapsed) {
1766
+ t1 = collapsed ? {
1767
+ position: "absolute",
1768
+ left: "50%",
1769
+ top: "calc(50% - 6px)",
1770
+ transform: "translate(-50%, -50%)"
1771
+ } : {};
1772
+ $[0] = collapsed;
1773
+ $[1] = t1;
1774
+ } else {
1775
+ t1 = $[1];
1776
+ }
1777
+ let t2;
1778
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1779
+ t2 = {
1780
+ display: "flex",
1781
+ alignItems: "center",
1782
+ justifyContent: "center",
1783
+ minWidth: ICON_SIZE
1784
+ };
1785
+ $[2] = t2;
1786
+ } else {
1787
+ t2 = $[2];
1788
+ }
1789
+ const t3 = item.icon ?? null;
1790
+ let t4;
1791
+ if ($[3] !== collapsed || $[4] !== item.icon || $[5] !== item.title) {
1792
+ t4 = !item.icon && collapsed ? /* @__PURE__ */ jsx(Avatar, { sx: {
1793
+ width: ICON_SIZE - 7,
1794
+ height: ICON_SIZE - 7,
1795
+ fontSize: 12
1796
+ }, children: item.title }) : null;
1797
+ $[3] = collapsed;
1798
+ $[4] = item.icon;
1799
+ $[5] = item.title;
1800
+ $[6] = t4;
1801
+ } else {
1802
+ t4 = $[6];
1803
+ }
1804
+ let t5;
1805
+ if ($[7] !== t3 || $[8] !== t4) {
1806
+ t5 = /* @__PURE__ */ jsxs(ListItemIcon, { sx: t2, children: [
1807
+ t3,
1808
+ t4
1809
+ ] });
1810
+ $[7] = t3;
1811
+ $[8] = t4;
1812
+ $[9] = t5;
1813
+ } else {
1814
+ t5 = $[9];
1815
+ }
1816
+ let t6;
1817
+ if ($[10] !== collapsed || $[11] !== item.title) {
1818
+ t6 = collapsed ? /* @__PURE__ */ jsx(Typography$1, { variant: "caption", sx: {
1819
+ position: "absolute",
1820
+ bottom: -18,
1821
+ left: "50%",
1822
+ transform: "translateX(-50%)",
1823
+ fontSize: 10,
1824
+ fontWeight: 500,
1825
+ textAlign: "center",
1826
+ whiteSpace: "nowrap",
1827
+ overflow: "hidden",
1828
+ textOverflow: "ellipsis",
1829
+ maxWidth: MINI_WIDTH - 28
1830
+ }, children: item.title }) : null;
1831
+ $[10] = collapsed;
1832
+ $[11] = item.title;
1833
+ $[12] = t6;
1834
+ } else {
1835
+ t6 = $[12];
1836
+ }
1837
+ let t7;
1838
+ if ($[13] !== t1 || $[14] !== t5 || $[15] !== t6) {
1839
+ t7 = /* @__PURE__ */ jsxs(Box, { sx: t1, children: [
1840
+ t5,
1841
+ t6
1842
+ ] });
1843
+ $[13] = t1;
1844
+ $[14] = t5;
1845
+ $[15] = t6;
1846
+ $[16] = t7;
1847
+ } else {
1848
+ t7 = $[16];
1849
+ }
1850
+ return t7;
1851
+ }
1852
+ return null;
1853
+ };
1854
+ const MiniPopover = (t0) => {
1855
+ const $ = c(10);
1856
+ const {
1857
+ open,
1858
+ anchorEl,
1859
+ children
1860
+ } = t0;
1861
+ let t1;
1862
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1863
+ t1 = {
1864
+ name: "offset",
1865
+ options: {
1866
+ offset: [6, 0]
1867
+ }
1868
+ };
1869
+ $[0] = t1;
1870
+ } else {
1871
+ t1 = $[0];
1872
+ }
1873
+ let t2;
1874
+ if ($[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1875
+ t2 = {
1876
+ name: "preventOverflow",
1877
+ options: {
1878
+ padding: 8
1879
+ }
1880
+ };
1881
+ $[1] = t2;
1882
+ } else {
1883
+ t2 = $[1];
1884
+ }
1885
+ let t3;
1886
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1887
+ t3 = [t1, t2, {
1888
+ name: "flip",
1889
+ options: {
1890
+ fallbackPlacements: ["right-end", "left-start"]
1891
+ }
1892
+ }];
1893
+ $[2] = t3;
1894
+ } else {
1895
+ t3 = $[2];
1896
+ }
1897
+ let t4;
1898
+ if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1899
+ t4 = {
1900
+ pt: 0.5,
1901
+ pb: 0.5,
1902
+ maxHeight: "min(calc(100vh - 100px), 560px)",
1903
+ overflowY: "auto",
1904
+ overscrollBehavior: "contain"
1905
+ };
1906
+ $[3] = t4;
1907
+ } else {
1908
+ t4 = $[3];
1909
+ }
1910
+ let t5;
1911
+ if ($[4] !== children) {
1912
+ t5 = /* @__PURE__ */ jsx(MuiPaper, { sx: t4, children });
1913
+ $[4] = children;
1914
+ $[5] = t5;
1915
+ } else {
1916
+ t5 = $[5];
1917
+ }
1918
+ let t6;
1919
+ if ($[6] !== anchorEl || $[7] !== open || $[8] !== t5) {
1920
+ t6 = /* @__PURE__ */ jsx(MuiPopper, { open, anchorEl, placement: "right-start", modifiers: t3, children: t5 });
1921
+ $[6] = anchorEl;
1922
+ $[7] = open;
1923
+ $[8] = t5;
1924
+ $[9] = t6;
1925
+ } else {
1926
+ t6 = $[9];
1927
+ }
1928
+ return t6;
1929
+ };
1930
+ const NavigationListItem = (t0) => {
1931
+ const $ = c(57);
1932
+ const {
1933
+ item,
1934
+ isOpen,
1935
+ selected,
1936
+ disabled,
1937
+ collapsed,
1938
+ isSidebarFullyExpanded: t1,
1939
+ isSidebarFullyCollapsed,
1940
+ onClick,
1941
+ renderNested,
1942
+ onClose
1943
+ } = t0;
1944
+ const isSidebarFullyExpanded = t1 === void 0 ? true : t1;
1945
+ const [hoveredPopoverItem, setHoveredPopoverItem] = useState(null);
1946
+ const [anchorElement, setAnchorElement] = useState(null);
1947
+ let t2;
1948
+ if ($[0] !== collapsed || $[1] !== isOpen || $[2] !== isSidebarFullyCollapsed || $[3] !== isSidebarFullyExpanded || $[4] !== item.children) {
1949
+ t2 = () => {
1950
+ if (collapsed && isSidebarFullyCollapsed && item.children) {
1951
+ return {
1952
+ fontSize: 18,
1953
+ position: "absolute",
1954
+ top: "41.5%",
1955
+ right: "2px",
1956
+ transform: "translateY(-50%) rotate(-90deg)"
1957
+ };
1958
+ }
1959
+ if (!collapsed && isSidebarFullyExpanded && item.children) {
1960
+ return {
1961
+ ml: 0.5,
1962
+ transform: `rotate(${isOpen ? 0 : -90}deg)`
1963
+ };
1964
+ }
1965
+ return {
1966
+ display: "none"
1967
+ };
1968
+ };
1969
+ $[0] = collapsed;
1970
+ $[1] = isOpen;
1971
+ $[2] = isSidebarFullyCollapsed;
1972
+ $[3] = isSidebarFullyExpanded;
1973
+ $[4] = item.children;
1974
+ $[5] = t2;
1975
+ } else {
1976
+ t2 = $[5];
1977
+ }
1978
+ const chevronSx = t2;
1979
+ const shouldJustExpand = item.children && !collapsed;
1980
+ const t3 = collapsed ? 60 : 48;
1981
+ let t4;
1982
+ if ($[6] !== t3) {
1983
+ t4 = {
1984
+ px: 1.4,
1985
+ height: t3
1986
+ };
1987
+ $[6] = t3;
1988
+ $[7] = t4;
1989
+ } else {
1990
+ t4 = $[7];
1991
+ }
1992
+ let t5;
1993
+ if ($[8] !== disabled || $[9] !== selected || $[10] !== t4) {
1994
+ t5 = {
1995
+ selected,
1996
+ disabled,
1997
+ sx: t4
1998
+ };
1999
+ $[8] = disabled;
2000
+ $[9] = selected;
2001
+ $[10] = t4;
2002
+ $[11] = t5;
2003
+ } else {
2004
+ t5 = $[11];
2005
+ }
2006
+ const buttonProps = t5;
2007
+ let t6;
2008
+ if ($[12] !== collapsed || $[13] !== item) {
2009
+ t6 = /* @__PURE__ */ jsx(IconOrAvatar, { item, collapsed });
2010
+ $[12] = collapsed;
2011
+ $[13] = item;
2012
+ $[14] = t6;
2013
+ } else {
2014
+ t6 = $[14];
2015
+ }
2016
+ let t7;
2017
+ if ($[15] !== collapsed || $[16] !== item.title) {
2018
+ t7 = !collapsed && /* @__PURE__ */ jsx(ListItemText, { primary: item.title, slotProps: {
2019
+ primary: {
2020
+ noWrap: true,
2021
+ title: item.title
2022
+ }
2023
+ }, sx: {
2024
+ ml: 1.2,
2025
+ flex: 1,
2026
+ minWidth: 0,
2027
+ "& .MuiTypography-root": {
2028
+ whiteSpace: "nowrap",
2029
+ overflow: "hidden",
2030
+ textOverflow: "ellipsis"
2031
+ }
2032
+ } });
2033
+ $[15] = collapsed;
2034
+ $[16] = item.title;
2035
+ $[17] = t7;
2036
+ } else {
2037
+ t7 = $[17];
2038
+ }
2039
+ let t8;
2040
+ if ($[18] !== chevronSx || $[19] !== item.children) {
2041
+ t8 = item.children ? /* @__PURE__ */ jsx(ExpandMoreIcon, { sx: chevronSx }) : null;
2042
+ $[18] = chevronSx;
2043
+ $[19] = item.children;
2044
+ $[20] = t8;
2045
+ } else {
2046
+ t8 = $[20];
2047
+ }
2048
+ let t9;
2049
+ if ($[21] !== t6 || $[22] !== t7 || $[23] !== t8) {
2050
+ t9 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
2051
+ t6,
2052
+ t7,
2053
+ t8
2054
+ ] });
2055
+ $[21] = t6;
2056
+ $[22] = t7;
2057
+ $[23] = t8;
2058
+ $[24] = t9;
2059
+ } else {
2060
+ t9 = $[24];
2061
+ }
2062
+ const buttonContent = t9;
2063
+ let t10;
2064
+ if ($[25] !== collapsed || $[26] !== item.children || $[27] !== item.title) {
2065
+ t10 = item.children && collapsed ? {
2066
+ onMouseEnter: (event) => {
2067
+ setAnchorElement(event.currentTarget);
2068
+ setHoveredPopoverItem(item.title);
2069
+ },
2070
+ onMouseLeave: () => {
2071
+ setHoveredPopoverItem(null);
2072
+ }
2073
+ } : {};
2074
+ $[25] = collapsed;
2075
+ $[26] = item.children;
2076
+ $[27] = item.title;
2077
+ $[28] = t10;
2078
+ } else {
2079
+ t10 = $[28];
2080
+ }
2081
+ let t11;
2082
+ if ($[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2083
+ t11 = {
2084
+ py: 0,
2085
+ px: 1,
2086
+ overflowX: "hidden"
2087
+ };
2088
+ $[29] = t11;
2089
+ } else {
2090
+ t11 = $[29];
2091
+ }
2092
+ let t12;
2093
+ if ($[30] !== buttonContent || $[31] !== buttonProps || $[32] !== item || $[33] !== onClick || $[34] !== onClose || $[35] !== shouldJustExpand) {
2094
+ t12 = shouldJustExpand ? /* @__PURE__ */ jsx(StyledNavButton, { ...buttonProps, onClick: () => onClick?.(item), children: buttonContent }) : /* @__PURE__ */ jsx(StyledRouterButton, { ...buttonProps, to: item.to, href: item.href, params: item.params, search: item.search, onClick: onClose, children: buttonContent });
2095
+ $[30] = buttonContent;
2096
+ $[31] = buttonProps;
2097
+ $[32] = item;
2098
+ $[33] = onClick;
2099
+ $[34] = onClose;
2100
+ $[35] = shouldJustExpand;
2101
+ $[36] = t12;
2102
+ } else {
2103
+ t12 = $[36];
2104
+ }
2105
+ let t13;
2106
+ if ($[37] !== anchorElement || $[38] !== collapsed || $[39] !== hoveredPopoverItem || $[40] !== item.children || $[41] !== item.title || $[42] !== renderNested) {
2107
+ t13 = item.children && collapsed ? /* @__PURE__ */ jsx(MiniPopover, { open: item.title === hoveredPopoverItem, anchorEl: anchorElement, children: renderNested?.(item.children) }) : null;
2108
+ $[37] = anchorElement;
2109
+ $[38] = collapsed;
2110
+ $[39] = hoveredPopoverItem;
2111
+ $[40] = item.children;
2112
+ $[41] = item.title;
2113
+ $[42] = renderNested;
2114
+ $[43] = t13;
2115
+ } else {
2116
+ t13 = $[43];
2117
+ }
2118
+ let t14;
2119
+ if ($[44] !== t10 || $[45] !== t12 || $[46] !== t13) {
2120
+ t14 = /* @__PURE__ */ jsxs(ListItem, { ...t10, sx: t11, children: [
2121
+ t12,
2122
+ t13
2123
+ ] });
2124
+ $[44] = t10;
2125
+ $[45] = t12;
2126
+ $[46] = t13;
2127
+ $[47] = t14;
2128
+ } else {
2129
+ t14 = $[47];
2130
+ }
2131
+ const listItem = t14;
2132
+ let t15;
2133
+ if ($[48] !== collapsed || $[49] !== isOpen || $[50] !== item.children || $[51] !== renderNested) {
2134
+ t15 = item.children && !collapsed ? /* @__PURE__ */ jsx(Collapse, { in: isOpen, timeout: "auto", unmountOnExit: true, children: renderNested?.(item.children) }) : null;
2135
+ $[48] = collapsed;
2136
+ $[49] = isOpen;
2137
+ $[50] = item.children;
2138
+ $[51] = renderNested;
2139
+ $[52] = t15;
2140
+ } else {
2141
+ t15 = $[52];
2142
+ }
2143
+ let t16;
2144
+ if ($[53] !== item.to || $[54] !== listItem || $[55] !== t15) {
2145
+ t16 = /* @__PURE__ */ jsxs(Fragment, { children: [
2146
+ listItem,
2147
+ t15
2148
+ ] }, item.to);
2149
+ $[53] = item.to;
2150
+ $[54] = listItem;
2151
+ $[55] = t15;
2152
+ $[56] = t16;
2153
+ } else {
2154
+ t16 = $[56];
2155
+ }
2156
+ return t16;
2157
+ };
2158
+ const isPageItem = (item) => !("kind" in item);
2159
+ const isDivider = (item) => "kind" in item && item.kind === "divider";
2160
+ const isHeader = (item) => "kind" in item && item.kind === "header";
2161
+ const NavigationList = (t0) => {
2162
+ const $ = c(31);
2163
+ const {
2164
+ subNavigation,
2165
+ depth: t1,
2166
+ collapsed,
2167
+ isPopover,
2168
+ isSidebarFullyExpanded: t2,
2169
+ isSidebarFullyCollapsed,
2170
+ expandedWidth,
2171
+ renderItem,
2172
+ activePath,
2173
+ onNavigate,
2174
+ onClose
2175
+ } = t0;
2176
+ const depth = t1 === void 0 ? 0 : t1;
2177
+ const isSidebarFullyExpanded = t2 === void 0 ? true : t2;
2178
+ let t3;
2179
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2180
+ t3 = [];
2181
+ $[0] = t3;
2182
+ } else {
2183
+ t3 = $[0];
2184
+ }
2185
+ const [openKeys, setOpenKeys] = useState(t3);
2186
+ let t4;
2187
+ let t5;
2188
+ if ($[1] !== collapsed) {
2189
+ t4 = () => {
2190
+ if (collapsed) {
2191
+ setOpenKeys([]);
2192
+ }
2193
+ };
2194
+ t5 = [collapsed];
2195
+ $[1] = collapsed;
2196
+ $[2] = t4;
2197
+ $[3] = t5;
2198
+ } else {
2199
+ t4 = $[2];
2200
+ t5 = $[3];
2201
+ }
2202
+ useEffect(t4, t5);
2203
+ let t6;
2204
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2205
+ t6 = (key) => setOpenKeys((previous) => previous.includes(key) ? previous.filter((k) => k !== key) : [...previous, key]);
2206
+ $[4] = t6;
2207
+ } else {
2208
+ t6 = $[4];
2209
+ }
2210
+ const toggleKey = t6;
2211
+ let t7;
2212
+ if ($[5] !== activePath || $[6] !== collapsed || $[7] !== depth || $[8] !== expandedWidth || $[9] !== onClose || $[10] !== onNavigate) {
2213
+ t7 = (children) => /* @__PURE__ */ jsx(NavigationList, { subNavigation: children, depth: depth + 1, isPopover: collapsed, expandedWidth, activePath, onNavigate, onClose });
2214
+ $[5] = activePath;
2215
+ $[6] = collapsed;
2216
+ $[7] = depth;
2217
+ $[8] = expandedWidth;
2218
+ $[9] = onClose;
2219
+ $[10] = onNavigate;
2220
+ $[11] = t7;
2221
+ } else {
2222
+ t7 = $[11];
2223
+ }
2224
+ const renderNested = t7;
2225
+ let t8;
2226
+ if ($[12] !== activePath || $[13] !== collapsed || $[14] !== depth || $[15] !== expandedWidth || $[16] !== isPopover || $[17] !== isSidebarFullyCollapsed || $[18] !== isSidebarFullyExpanded || $[19] !== onClose || $[20] !== openKeys || $[21] !== renderItem || $[22] !== renderNested || $[23] !== subNavigation) {
2227
+ const filteredNavigation = subNavigation.filter(_temp$3);
2228
+ const t9 = isPopover && depth === 1 ? 0.5 : 0;
2229
+ const t10 = depth === 0 && !isPopover ? 4 : 0.5;
2230
+ const t11 = (isPopover ? 1 : 2) * (isPopover ? depth - 1 : depth);
2231
+ const t12 = isPopover && depth === 1 ? EXPANDED_WIDTH : "auto";
2232
+ const t13 = collapsed ? MINI_WIDTH : "auto";
2233
+ let t14;
2234
+ if ($[25] !== t10 || $[26] !== t11 || $[27] !== t12 || $[28] !== t13 || $[29] !== t9) {
2235
+ t14 = {
2236
+ padding: 0,
2237
+ mt: t9,
2238
+ mb: t10,
2239
+ pl: t11,
2240
+ minWidth: t12,
2241
+ width: t13
2242
+ };
2243
+ $[25] = t10;
2244
+ $[26] = t11;
2245
+ $[27] = t12;
2246
+ $[28] = t13;
2247
+ $[29] = t9;
2248
+ $[30] = t14;
2249
+ } else {
2250
+ t14 = $[30];
2251
+ }
2252
+ t8 = /* @__PURE__ */ jsx(List, { sx: t14, children: filteredNavigation.map((navItem, index) => {
2253
+ if (isHeader(navItem)) {
2254
+ return /* @__PURE__ */ jsx(ListSubheader, { sx: {
2255
+ fontSize: 12,
2256
+ fontWeight: "700",
2257
+ height: collapsed ? 0 : 40,
2258
+ px: 2,
2259
+ minWidth: expandedWidth,
2260
+ overflow: "hidden",
2261
+ textOverflow: "ellipsis",
2262
+ whiteSpace: "nowrap",
2263
+ zIndex: 2,
2264
+ bgcolor: "transparent",
2265
+ position: "static"
2266
+ }, children: navItem.title }, `subheader-${depth}-${index}`);
2267
+ }
2268
+ if (isDivider(navItem)) {
2269
+ const nextItem = filteredNavigation[index + 1];
2270
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Divider, { sx: {
2271
+ mx: 1,
2272
+ mt: 1,
2273
+ mb: isHeader(nextItem) && !collapsed ? 0 : 1
2274
+ } }) }, `divider-${depth}-${index}`);
2275
+ }
2276
+ if (!isPageItem(navItem)) {
2277
+ return null;
2278
+ }
2279
+ const key_0 = `item-${depth}-${index}`;
2280
+ const uniqueItemKey = `${depth}-${index}-${navItem.title}`;
2281
+ if (renderItem) {
2282
+ return /* @__PURE__ */ jsx(Fragment, { children: renderItem(navItem, {
2283
+ collapsed: !!collapsed
2284
+ }) }, key_0);
2285
+ }
2286
+ return /* @__PURE__ */ jsx(NavigationListItem, { item: navItem, isOpen: openKeys.includes(uniqueItemKey), selected: activePath === navItem.to, collapsed, isSidebarFullyExpanded, isSidebarFullyCollapsed, onClick: navItem.children && !collapsed ? () => toggleKey(uniqueItemKey) : void 0, renderNested, onClose }, key_0);
2287
+ }) });
2288
+ $[12] = activePath;
2289
+ $[13] = collapsed;
2290
+ $[14] = depth;
2291
+ $[15] = expandedWidth;
2292
+ $[16] = isPopover;
2293
+ $[17] = isSidebarFullyCollapsed;
2294
+ $[18] = isSidebarFullyExpanded;
2295
+ $[19] = onClose;
2296
+ $[20] = openKeys;
2297
+ $[21] = renderItem;
2298
+ $[22] = renderNested;
2299
+ $[23] = subNavigation;
2300
+ $[24] = t8;
2301
+ } else {
2302
+ t8 = $[24];
2303
+ }
2304
+ return t8;
2305
+ };
2306
+ function _temp$3(nav) {
2307
+ return !nav.hidden;
2308
+ }
2309
+ const MINI_WIDTH = 84;
2310
+ const EXPANDED_WIDTH = 320;
2311
+ const TOOLBAR_HEIGHT = 64;
2312
+ const NavigationRail = (t0) => {
2313
+ const $ = c(29);
2314
+ const {
2315
+ navigation,
2316
+ expanded,
2317
+ setExpanded
2318
+ } = t0;
2319
+ const navigate = useNavigate();
2320
+ const routerState = useRouterState();
2321
+ const theme = useTheme();
2322
+ let t1;
2323
+ if ($[0] !== theme.breakpoints) {
2324
+ t1 = theme.breakpoints.up("sm");
2325
+ $[0] = theme.breakpoints;
2326
+ $[1] = t1;
2327
+ } else {
2328
+ t1 = $[1];
2329
+ }
2330
+ const showPermanent = useMediaQuery(t1);
2331
+ let t2;
2332
+ if ($[2] !== expanded || $[3] !== navigate || $[4] !== navigation || $[5] !== routerState.location.pathname || $[6] !== setExpanded || $[7] !== showPermanent) {
2333
+ t2 = (collapsed) => /* @__PURE__ */ jsx(Box, { component: "nav", sx: {
2334
+ height: "100%",
2335
+ display: "flex",
2336
+ flexDirection: "column",
2337
+ justifyContent: "space-between",
2338
+ overflow: "auto",
2339
+ scrollbarGutter: collapsed ? "stable" : "auto",
2340
+ overflowX: "hidden",
2341
+ pt: navigation[0] && isHeader(navigation[0]) && !collapsed ? 0 : 2
2342
+ }, children: /* @__PURE__ */ jsx(NavigationList, { subNavigation: navigation, collapsed, isSidebarFullyExpanded: expanded, isSidebarFullyCollapsed: !expanded, expandedWidth: EXPANDED_WIDTH, activePath: routerState.location.pathname, onNavigate: navigate, onClose: !showPermanent ? () => setExpanded(false) : void 0 }) });
2343
+ $[2] = expanded;
2344
+ $[3] = navigate;
2345
+ $[4] = navigation;
2346
+ $[5] = routerState.location.pathname;
2347
+ $[6] = setExpanded;
2348
+ $[7] = showPermanent;
2349
+ $[8] = t2;
2350
+ } else {
2351
+ t2 = $[8];
2352
+ }
2353
+ const drawerContent = t2;
2354
+ if (showPermanent) {
2355
+ const t32 = expanded ? EXPANDED_WIDTH : MINI_WIDTH;
2356
+ const t42 = expanded ? EXPANDED_WIDTH : MINI_WIDTH;
2357
+ let t52;
2358
+ if ($[9] !== t42) {
2359
+ t52 = {
2360
+ position: "absolute",
2361
+ top: `${TOOLBAR_HEIGHT}px`,
2362
+ height: `calc(100% - ${TOOLBAR_HEIGHT}px)`,
2363
+ width: t42,
2364
+ borderTop: "1px solid",
2365
+ borderColor: "var(--mui-palette-divider)"
2366
+ };
2367
+ $[9] = t42;
2368
+ $[10] = t52;
2369
+ } else {
2370
+ t52 = $[10];
2371
+ }
2372
+ let t62;
2373
+ if ($[11] !== t32 || $[12] !== t52) {
2374
+ t62 = {
2375
+ width: t32,
2376
+ "& .MuiDrawer-paper": t52
2377
+ };
2378
+ $[11] = t32;
2379
+ $[12] = t52;
2380
+ $[13] = t62;
2381
+ } else {
2382
+ t62 = $[13];
2383
+ }
2384
+ const t7 = !expanded;
2385
+ let t8;
2386
+ if ($[14] !== drawerContent || $[15] !== t7) {
2387
+ t8 = drawerContent(t7);
2388
+ $[14] = drawerContent;
2389
+ $[15] = t7;
2390
+ $[16] = t8;
2391
+ } else {
2392
+ t8 = $[16];
2393
+ }
2394
+ let t9;
2395
+ if ($[17] !== t62 || $[18] !== t8) {
2396
+ t9 = /* @__PURE__ */ jsx(Drawer, { variant: "permanent", sx: t62, children: t8 });
2397
+ $[17] = t62;
2398
+ $[18] = t8;
2399
+ $[19] = t9;
2400
+ } else {
2401
+ t9 = $[19];
2402
+ }
2403
+ return t9;
2404
+ }
2405
+ let t3;
2406
+ if ($[20] !== setExpanded) {
2407
+ t3 = () => setExpanded(false);
2408
+ $[20] = setExpanded;
2409
+ $[21] = t3;
2410
+ } else {
2411
+ t3 = $[21];
2412
+ }
2413
+ const t4 = !expanded;
2414
+ let t5;
2415
+ if ($[22] !== drawerContent || $[23] !== t4) {
2416
+ t5 = drawerContent(t4);
2417
+ $[22] = drawerContent;
2418
+ $[23] = t4;
2419
+ $[24] = t5;
2420
+ } else {
2421
+ t5 = $[24];
2422
+ }
2423
+ let t6;
2424
+ if ($[25] !== expanded || $[26] !== t3 || $[27] !== t5) {
2425
+ t6 = /* @__PURE__ */ jsx(Drawer, { open: expanded, onClose: t3, children: t5 });
2426
+ $[25] = expanded;
2427
+ $[26] = t3;
2428
+ $[27] = t5;
2429
+ $[28] = t6;
2430
+ } else {
2431
+ t6 = $[28];
2432
+ }
2433
+ return t6;
2434
+ };
2435
+ const getSessionUser = createServerFn().inputValidator(z__default.object({
2436
+ redirectUri: z__default.string()
2437
+ })).handler(async ({
2438
+ data
2439
+ }) => {
2440
+ const session = await requireSession(data.redirectUri);
2441
+ const groups = await queryClient.fetchQuery({
2442
+ queryKey: ["graph", "me", "memberOf"],
2443
+ queryFn: async () => axios.request({
2444
+ method: "GET",
2445
+ url: "https://graph.microsoft.com/v1.0/me/memberOf?$select=displayName",
2446
+ headers: {
2447
+ Authorization: `Bearer ${await getAccessToken()}`
2448
+ }
2449
+ }).then((response) => response.data.value.map((group) => group.displayName)),
2450
+ staleTime: Infinity,
2451
+ gcTime: Infinity
2452
+ });
2453
+ return {
2454
+ ...session.user,
2455
+ groups
2456
+ };
2457
+ });
2458
+ const getSessionUserDetail = createServerFn({
2459
+ method: "GET"
2460
+ }).handler(async () => {
2461
+ return await queryClient.fetchQuery({
2462
+ queryKey: ["graph", "me"],
2463
+ queryFn: async () => await axios.request({
2464
+ method: "GET",
2465
+ url: "https://graph.microsoft.com/v1.0/me?$select=id,displayName,jobTitle,mail,mobilePhone",
2466
+ headers: {
2467
+ Authorization: `Bearer ${await getAccessToken()}`
2468
+ }
2469
+ }).then((response) => response.data),
2470
+ staleTime: Infinity,
2471
+ gcTime: Infinity
2472
+ });
2473
+ });
2474
+ const getSessionUserPhoto = createServerFn({
2475
+ method: "GET"
2476
+ }).handler(async () => {
2477
+ return await queryClient.fetchQuery({
2478
+ queryKey: ["graph", "me", "photo"],
2479
+ queryFn: async () => {
2480
+ const response = await axios.request({
2481
+ method: "GET",
2482
+ url: "https://graph.microsoft.com/v1.0/me/photo/$value",
2483
+ headers: {
2484
+ Authorization: `Bearer ${await getAccessToken()}`
2485
+ },
2486
+ responseType: "arraybuffer"
2487
+ });
2488
+ const contentType = response.headers["content-type"] ?? "image/jpeg";
2489
+ const base64 = Buffer.from(response.data).toString("base64");
2490
+ return `data:${contentType};base64,${base64}`;
2491
+ },
2492
+ staleTime: Infinity,
2493
+ gcTime: Infinity
2494
+ });
2495
+ });
2496
+ const capitalize = (value) => value && value.charAt(0).toUpperCase() + value.slice(1);
2497
+ const ToolbarAccount = () => {
2498
+ const $ = c(105);
2499
+ const [anchorElement, setAnchorElement] = useState();
2500
+ const [tab, setTab] = useState("settings");
2501
+ const open = Boolean(anchorElement);
2502
+ const {
2503
+ t,
2504
+ i18n: i18n2
2505
+ } = useTranslation();
2506
+ const {
2507
+ mode,
2508
+ setMode
2509
+ } = useColorScheme();
2510
+ let T0;
2511
+ let closeMenu;
2512
+ let openMenu;
2513
+ let settings;
2514
+ let t0;
2515
+ let t1;
2516
+ let theme;
2517
+ if ($[0] !== i18n2 || $[1] !== mode || $[2] !== setMode || $[3] !== t) {
2518
+ const supportedLanguages = (Array.isArray(i18n2.options.supportedLngs) ? i18n2.options.supportedLngs : []).filter(_temp$2);
2519
+ const languageDisplayNames = new Intl.DisplayNames([i18n2.language], {
2520
+ type: "language"
2521
+ });
2522
+ let t22;
2523
+ if ($[11] !== t) {
2524
+ t22 = t("Layout.Light");
2525
+ $[11] = t;
2526
+ $[12] = t22;
2527
+ } else {
2528
+ t22 = $[12];
2529
+ }
2530
+ let t32;
2531
+ if ($[13] !== t22) {
2532
+ t32 = {
2533
+ mode: "light",
2534
+ icon: LightMode,
2535
+ label: t22
2536
+ };
2537
+ $[13] = t22;
2538
+ $[14] = t32;
2539
+ } else {
2540
+ t32 = $[14];
2541
+ }
2542
+ let t42;
2543
+ if ($[15] !== t) {
2544
+ t42 = t("Layout.Dark");
2545
+ $[15] = t;
2546
+ $[16] = t42;
2547
+ } else {
2548
+ t42 = $[16];
2549
+ }
2550
+ let t52;
2551
+ if ($[17] !== t42) {
2552
+ t52 = {
2553
+ mode: "dark",
2554
+ icon: DarkMode,
2555
+ label: t42
2556
+ };
2557
+ $[17] = t42;
2558
+ $[18] = t52;
2559
+ } else {
2560
+ t52 = $[18];
2561
+ }
2562
+ let t62;
2563
+ if ($[19] !== t) {
2564
+ t62 = t("Layout.System");
2565
+ $[19] = t;
2566
+ $[20] = t62;
2567
+ } else {
2568
+ t62 = $[20];
2569
+ }
2570
+ let t72;
2571
+ if ($[21] !== t62) {
2572
+ t72 = {
2573
+ mode: "system",
2574
+ icon: SettingsBrightness,
2575
+ label: t62
2576
+ };
2577
+ $[21] = t62;
2578
+ $[22] = t72;
2579
+ } else {
2580
+ t72 = $[22];
2581
+ }
2582
+ let t82;
2583
+ if ($[23] !== t32 || $[24] !== t52 || $[25] !== t72) {
2584
+ t82 = [t32, t52, t72];
2585
+ $[23] = t32;
2586
+ $[24] = t52;
2587
+ $[25] = t72;
2588
+ $[26] = t82;
2589
+ } else {
2590
+ t82 = $[26];
2591
+ }
2592
+ const colorModes = t82;
2593
+ let t92;
2594
+ if ($[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2595
+ t92 = (event) => setAnchorElement(event.currentTarget);
2596
+ $[27] = t92;
2597
+ } else {
2598
+ t92 = $[27];
2599
+ }
2600
+ openMenu = t92;
2601
+ let t102;
2602
+ if ($[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2603
+ t102 = () => {
2604
+ setAnchorElement(void 0);
2605
+ setTimeout(() => setTab("settings"), 300);
2606
+ };
2607
+ $[28] = t102;
2608
+ } else {
2609
+ t102 = $[28];
2610
+ }
2611
+ closeMenu = t102;
2612
+ let t112;
2613
+ if ($[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2614
+ t112 = (newTab) => () => setTab(newTab);
2615
+ $[29] = t112;
2616
+ } else {
2617
+ t112 = $[29];
2618
+ }
2619
+ const changeTab = t112;
2620
+ let t122;
2621
+ if ($[30] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2622
+ t122 = {
2623
+ backgroundColor: "transparent"
2624
+ };
2625
+ $[30] = t122;
2626
+ } else {
2627
+ t122 = $[30];
2628
+ }
2629
+ let t132;
2630
+ if ($[31] !== t) {
2631
+ t132 = t("Layout.Settings");
2632
+ $[31] = t;
2633
+ $[32] = t132;
2634
+ } else {
2635
+ t132 = $[32];
2636
+ }
2637
+ let t142;
2638
+ if ($[33] !== t132) {
2639
+ t142 = /* @__PURE__ */ jsx(ListSubheader$1, { sx: t122, children: t132 });
2640
+ $[33] = t132;
2641
+ $[34] = t142;
2642
+ } else {
2643
+ t142 = $[34];
2644
+ }
2645
+ let t152;
2646
+ let t162;
2647
+ if ($[35] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2648
+ t152 = changeTab("theme");
2649
+ t162 = {
2650
+ py: 0.3
2651
+ };
2652
+ $[35] = t152;
2653
+ $[36] = t162;
2654
+ } else {
2655
+ t152 = $[35];
2656
+ t162 = $[36];
2657
+ }
2658
+ let t17;
2659
+ if ($[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2660
+ t17 = /* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(Brightness4, {}) });
2661
+ $[37] = t17;
2662
+ } else {
2663
+ t17 = $[37];
2664
+ }
2665
+ let t18;
2666
+ if ($[38] !== t) {
2667
+ t18 = t("Layout.Appearance");
2668
+ $[38] = t;
2669
+ $[39] = t18;
2670
+ } else {
2671
+ t18 = $[39];
2672
+ }
2673
+ const t19 = colorModes.find((m) => m.mode === mode)?.label;
2674
+ let t20;
2675
+ if ($[40] !== t18 || $[41] !== t19) {
2676
+ t20 = /* @__PURE__ */ jsx(ListItemText$1, { primary: t18, secondary: t19 });
2677
+ $[40] = t18;
2678
+ $[41] = t19;
2679
+ $[42] = t20;
2680
+ } else {
2681
+ t20 = $[42];
2682
+ }
2683
+ let t21;
2684
+ if ($[43] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2685
+ t21 = /* @__PURE__ */ jsx(ChevronRight, {});
2686
+ $[43] = t21;
2687
+ } else {
2688
+ t21 = $[43];
2689
+ }
2690
+ let t222;
2691
+ if ($[44] !== t20) {
2692
+ t222 = /* @__PURE__ */ jsxs(ListItemButton$1, { onClick: t152, sx: t162, children: [
2693
+ t17,
2694
+ t20,
2695
+ t21
2696
+ ] });
2697
+ $[44] = t20;
2698
+ $[45] = t222;
2699
+ } else {
2700
+ t222 = $[45];
2701
+ }
2702
+ let t23;
2703
+ let t24;
2704
+ if ($[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2705
+ t23 = changeTab("language");
2706
+ t24 = {
2707
+ py: 0.3
2708
+ };
2709
+ $[46] = t23;
2710
+ $[47] = t24;
2711
+ } else {
2712
+ t23 = $[46];
2713
+ t24 = $[47];
2714
+ }
2715
+ let t25;
2716
+ if ($[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2717
+ t25 = /* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(Translate, {}) });
2718
+ $[48] = t25;
2719
+ } else {
2720
+ t25 = $[48];
2721
+ }
2722
+ let t26;
2723
+ if ($[49] !== t) {
2724
+ t26 = t("Layout.Language");
2725
+ $[49] = t;
2726
+ $[50] = t26;
2727
+ } else {
2728
+ t26 = $[50];
2729
+ }
2730
+ let t27;
2731
+ if ($[51] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2732
+ t27 = /* @__PURE__ */ jsx(ChevronRight, {});
2733
+ $[51] = t27;
2734
+ } else {
2735
+ t27 = $[51];
2736
+ }
2737
+ const t28 = /* @__PURE__ */ jsxs(ListItemButton$1, { onClick: t23, sx: t24, children: [
2738
+ t25,
2739
+ /* @__PURE__ */ jsx(ListItemText$1, { primary: t26, secondary: capitalize(languageDisplayNames.of(i18n2.language)) }),
2740
+ t27
2741
+ ] });
2742
+ let t29;
2743
+ if ($[52] !== t142 || $[53] !== t222 || $[54] !== t28) {
2744
+ t29 = /* @__PURE__ */ jsxs(List$1, { component: "nav", subheader: t142, children: [
2745
+ t222,
2746
+ t28
2747
+ ] });
2748
+ $[52] = t142;
2749
+ $[53] = t222;
2750
+ $[54] = t28;
2751
+ $[55] = t29;
2752
+ } else {
2753
+ t29 = $[55];
2754
+ }
2755
+ settings = t29;
2756
+ let t30;
2757
+ let t31;
2758
+ if ($[56] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2759
+ t30 = changeTab("settings");
2760
+ t31 = {
2761
+ backgroundColor: "transparent",
2762
+ display: "flex",
2763
+ alignItems: "center",
2764
+ px: 1,
2765
+ cursor: "pointer"
2766
+ };
2767
+ $[56] = t30;
2768
+ $[57] = t31;
2769
+ } else {
2770
+ t30 = $[56];
2771
+ t31 = $[57];
2772
+ }
2773
+ let t322;
2774
+ if ($[58] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2775
+ t322 = /* @__PURE__ */ jsx(IconButton, { size: "small", sx: {
2776
+ mr: 0.5
2777
+ }, children: /* @__PURE__ */ jsx(ArrowBack, { fontSize: "small" }) });
2778
+ $[58] = t322;
2779
+ } else {
2780
+ t322 = $[58];
2781
+ }
2782
+ let t33;
2783
+ if ($[59] !== t) {
2784
+ t33 = t("Layout.Appearance");
2785
+ $[59] = t;
2786
+ $[60] = t33;
2787
+ } else {
2788
+ t33 = $[60];
2789
+ }
2790
+ let t34;
2791
+ if ($[61] !== t33) {
2792
+ t34 = /* @__PURE__ */ jsxs(ListSubheader$1, { onClick: t30, sx: t31, children: [
2793
+ t322,
2794
+ " ",
2795
+ t33
2796
+ ] });
2797
+ $[61] = t33;
2798
+ $[62] = t34;
2799
+ } else {
2800
+ t34 = $[62];
2801
+ }
2802
+ let t35;
2803
+ if ($[63] !== colorModes || $[64] !== mode || $[65] !== setMode) {
2804
+ t35 = colorModes.map((t362) => {
2805
+ const {
2806
+ mode: modeValue,
2807
+ icon: Icon,
2808
+ label
2809
+ } = t362;
2810
+ return /* @__PURE__ */ jsxs(ListItemButton$1, { onClick: () => {
2811
+ setMode(modeValue);
2812
+ closeMenu();
2813
+ }, selected: mode === modeValue, children: [
2814
+ /* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(Icon, {}) }),
2815
+ /* @__PURE__ */ jsx(ListItemText$1, { primary: label })
2816
+ ] }, modeValue);
2817
+ });
2818
+ $[63] = colorModes;
2819
+ $[64] = mode;
2820
+ $[65] = setMode;
2821
+ $[66] = t35;
2822
+ } else {
2823
+ t35 = $[66];
2824
+ }
2825
+ let t36;
2826
+ if ($[67] !== t34 || $[68] !== t35) {
2827
+ t36 = /* @__PURE__ */ jsx(List$1, { subheader: t34, children: t35 });
2828
+ $[67] = t34;
2829
+ $[68] = t35;
2830
+ $[69] = t36;
2831
+ } else {
2832
+ t36 = $[69];
2833
+ }
2834
+ theme = t36;
2835
+ T0 = List$1;
2836
+ let t37;
2837
+ let t38;
2838
+ if ($[70] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2839
+ t37 = changeTab("settings");
2840
+ t38 = {
2841
+ backgroundColor: "transparent",
2842
+ display: "flex",
2843
+ alignItems: "center",
2844
+ px: 1,
2845
+ cursor: "pointer"
2846
+ };
2847
+ $[70] = t37;
2848
+ $[71] = t38;
2849
+ } else {
2850
+ t37 = $[70];
2851
+ t38 = $[71];
2852
+ }
2853
+ let t39;
2854
+ if ($[72] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2855
+ t39 = /* @__PURE__ */ jsx(IconButton, { size: "small", sx: {
2856
+ mr: 0.5
2857
+ }, children: /* @__PURE__ */ jsx(ArrowBack, { fontSize: "small" }) });
2858
+ $[72] = t39;
2859
+ } else {
2860
+ t39 = $[72];
2861
+ }
2862
+ let t40;
2863
+ if ($[73] !== t) {
2864
+ t40 = t("Layout.Language");
2865
+ $[73] = t;
2866
+ $[74] = t40;
2867
+ } else {
2868
+ t40 = $[74];
2869
+ }
2870
+ if ($[75] !== t40) {
2871
+ t0 = /* @__PURE__ */ jsxs(ListSubheader$1, { onClick: t37, sx: t38, children: [
2872
+ t39,
2873
+ " ",
2874
+ t40
2875
+ ] });
2876
+ $[75] = t40;
2877
+ $[76] = t0;
2878
+ } else {
2879
+ t0 = $[76];
2880
+ }
2881
+ t1 = supportedLanguages.map((languageCode) => /* @__PURE__ */ jsxs(ListItemButton$1, { onClick: () => i18n2.changeLanguage(languageCode).finally(() => closeMenu()), selected: i18n2.resolvedLanguage === languageCode, children: [
2882
+ /* @__PURE__ */ jsx(ListItemIcon$1, { children: i18n2.resolvedLanguage === languageCode && /* @__PURE__ */ jsx(Done, {}) }),
2883
+ /* @__PURE__ */ jsx(ListItemText$1, { primary: capitalize(languageDisplayNames.of(languageCode)) })
2884
+ ] }, languageCode));
2885
+ $[0] = i18n2;
2886
+ $[1] = mode;
2887
+ $[2] = setMode;
2888
+ $[3] = t;
2889
+ $[4] = T0;
2890
+ $[5] = closeMenu;
2891
+ $[6] = openMenu;
2892
+ $[7] = settings;
2893
+ $[8] = t0;
2894
+ $[9] = t1;
2895
+ $[10] = theme;
2896
+ } else {
2897
+ T0 = $[4];
2898
+ closeMenu = $[5];
2899
+ openMenu = $[6];
2900
+ settings = $[7];
2901
+ t0 = $[8];
2902
+ t1 = $[9];
2903
+ theme = $[10];
2904
+ }
2905
+ let t2;
2906
+ if ($[77] !== T0 || $[78] !== t0 || $[79] !== t1) {
2907
+ t2 = /* @__PURE__ */ jsx(T0, { subheader: t0, children: t1 });
2908
+ $[77] = T0;
2909
+ $[78] = t0;
2910
+ $[79] = t1;
2911
+ $[80] = t2;
2912
+ } else {
2913
+ t2 = $[80];
2914
+ }
2915
+ const language = t2;
2916
+ let t3;
2917
+ if ($[81] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2918
+ t3 = /* @__PURE__ */ jsx(AccountCircle, { sx: {
2919
+ width: {
2920
+ xs: 32,
2921
+ sm: 40
2922
+ },
2923
+ height: {
2924
+ xs: 32,
2925
+ sm: 40
2926
+ }
2927
+ } });
2928
+ $[81] = t3;
2929
+ } else {
2930
+ t3 = $[81];
2931
+ }
2932
+ let t4;
2933
+ if ($[82] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2934
+ t4 = /* @__PURE__ */ jsx(Suspense, { fallback: t3, children: /* @__PURE__ */ jsx(Await, { promise: getSessionUserPhoto(), children: _temp2 }) });
2935
+ $[82] = t4;
2936
+ } else {
2937
+ t4 = $[82];
2938
+ }
2939
+ let t5;
2940
+ if ($[83] !== openMenu) {
2941
+ t5 = /* @__PURE__ */ jsx(IconButton, { size: "small", edge: "end", onClick: openMenu, children: t4 });
2942
+ $[83] = openMenu;
2943
+ $[84] = t5;
2944
+ } else {
2945
+ t5 = $[84];
2946
+ }
2947
+ let t6;
2948
+ if ($[85] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2949
+ t6 = {
2950
+ width: 240
2951
+ };
2952
+ $[85] = t6;
2953
+ } else {
2954
+ t6 = $[85];
2955
+ }
2956
+ let t7;
2957
+ if ($[86] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2958
+ t7 = /* @__PURE__ */ jsx(ListItem$1, { children: /* @__PURE__ */ jsx(Await, { promise: getSessionUserDetail(), children: _temp3 }) });
2959
+ $[86] = t7;
2960
+ } else {
2961
+ t7 = $[86];
2962
+ }
2963
+ let t8;
2964
+ if ($[87] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2965
+ t8 = /* @__PURE__ */ jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsx(Logout, { color: "error" }) });
2966
+ $[87] = t8;
2967
+ } else {
2968
+ t8 = $[87];
2969
+ }
2970
+ let t9;
2971
+ if ($[88] !== t) {
2972
+ t9 = t("Layout.Logout");
2973
+ $[88] = t;
2974
+ $[89] = t9;
2975
+ } else {
2976
+ t9 = $[89];
2977
+ }
2978
+ let t10;
2979
+ if ($[90] !== t9) {
2980
+ t10 = /* @__PURE__ */ jsxs(List$1, { disablePadding: true, children: [
2981
+ t7,
2982
+ /* @__PURE__ */ jsxs(ListItemButton$1, { onClick: _temp4, children: [
2983
+ t8,
2984
+ /* @__PURE__ */ jsx(ListItemText$1, { primary: t9 })
2985
+ ] })
2986
+ ] });
2987
+ $[90] = t9;
2988
+ $[91] = t10;
2989
+ } else {
2990
+ t10 = $[91];
2991
+ }
2992
+ const t11 = tab === "settings" && settings;
2993
+ const t12 = tab === "theme" && theme;
2994
+ const t13 = tab === "language" && language;
2995
+ let t14;
2996
+ if ($[92] !== t10 || $[93] !== t11 || $[94] !== t12 || $[95] !== t13) {
2997
+ t14 = /* @__PURE__ */ jsxs(Box$1, { sx: t6, children: [
2998
+ t10,
2999
+ t11,
3000
+ t12,
3001
+ t13
3002
+ ] });
3003
+ $[92] = t10;
3004
+ $[93] = t11;
3005
+ $[94] = t12;
3006
+ $[95] = t13;
3007
+ $[96] = t14;
3008
+ } else {
3009
+ t14 = $[96];
3010
+ }
3011
+ let t15;
3012
+ if ($[97] !== anchorElement || $[98] !== closeMenu || $[99] !== open || $[100] !== t14) {
3013
+ t15 = /* @__PURE__ */ jsx(Menu, { anchorEl: anchorElement, open, onClose: closeMenu, children: t14 });
3014
+ $[97] = anchorElement;
3015
+ $[98] = closeMenu;
3016
+ $[99] = open;
3017
+ $[100] = t14;
3018
+ $[101] = t15;
3019
+ } else {
3020
+ t15 = $[101];
3021
+ }
3022
+ let t16;
3023
+ if ($[102] !== t15 || $[103] !== t5) {
3024
+ t16 = /* @__PURE__ */ jsxs(Fragment, { children: [
3025
+ t5,
3026
+ t15
3027
+ ] });
3028
+ $[102] = t15;
3029
+ $[103] = t5;
3030
+ $[104] = t16;
3031
+ } else {
3032
+ t16 = $[104];
3033
+ }
3034
+ return t16;
3035
+ };
3036
+ function _temp$2(lng) {
3037
+ return lng !== "cimode";
3038
+ }
3039
+ function _temp2(data) {
3040
+ return /* @__PURE__ */ jsx(Avatar$1, { src: data, sx: {
3041
+ width: {
3042
+ xs: 32,
3043
+ sm: 40
3044
+ },
3045
+ height: {
3046
+ xs: 32,
3047
+ sm: 40
3048
+ }
3049
+ } });
3050
+ }
3051
+ function _temp3(data_0) {
3052
+ return /* @__PURE__ */ jsx(ListItemText$1, { primary: data_0.displayName.split("/")[0], secondary: data_0.jobTitle });
3053
+ }
3054
+ function _temp4() {
3055
+ return console.log("Logout clicked");
3056
+ }
3057
+ const YEAR_IN_SECONDS = 60 * 60 * 24 * 365;
3058
+ const getNavigationOpenStatus = createIsomorphicFn().server(() => {
3059
+ const cookie = getCookie("navigationOpen");
3060
+ return cookie === "true";
3061
+ }).client(() => {
3062
+ const cookie = document.cookie.split("; ").find((row) => row.startsWith("navigationOpen="));
3063
+ return cookie ? cookie.split("=")[1] === "true" : false;
3064
+ });
3065
+ const DrawerHeader = styled("div")(({
3066
+ theme
3067
+ }) => ({
3068
+ display: "flex",
3069
+ alignItems: "center",
3070
+ justifyContent: "flex-end",
3071
+ padding: theme.spacing(0, 1),
3072
+ ...theme.mixins.toolbar
3073
+ }));
3074
+ const Layout = (props) => {
3075
+ const $ = c(29);
3076
+ const [navigationOpen, setNavigationOpen] = useState(getNavigationOpenStatus);
3077
+ const isFetching = !!useIsFetching();
3078
+ const isMutating = !!useIsMutating();
3079
+ let t0;
3080
+ let t1;
3081
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
3082
+ t0 = /* @__PURE__ */ jsx(InitColorSchemeScript, {});
3083
+ t1 = /* @__PURE__ */ jsx(CssBaseline, {});
3084
+ $[0] = t0;
3085
+ $[1] = t1;
3086
+ } else {
3087
+ t0 = $[0];
3088
+ t1 = $[1];
3089
+ }
3090
+ let t2;
3091
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
3092
+ t2 = {
3093
+ display: "flex",
3094
+ height: "100dvh",
3095
+ maxHeight: "100dvh",
3096
+ overflow: "hidden",
3097
+ width: "100%"
3098
+ };
3099
+ $[2] = t2;
3100
+ } else {
3101
+ t2 = $[2];
3102
+ }
3103
+ let t3;
3104
+ if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
3105
+ t3 = {
3106
+ borderBottom: "1px solid",
3107
+ borderColor: "var(--mui-palette-divider)",
3108
+ boxShadow: "none"
3109
+ };
3110
+ $[3] = t3;
3111
+ } else {
3112
+ t3 = $[3];
3113
+ }
3114
+ let t4;
3115
+ if ($[4] !== navigationOpen || $[5] !== props.navigation) {
3116
+ t4 = props.navigation && /* @__PURE__ */ jsx(IconButton, { onClick: () => {
3117
+ setNavigationOpen(_temp$1);
3118
+ }, sx: {
3119
+ marginRight: 2
3120
+ }, children: navigationOpen ? /* @__PURE__ */ jsx(MenuOpen, {}) : /* @__PURE__ */ jsx(Menu$1, {}) });
3121
+ $[4] = navigationOpen;
3122
+ $[5] = props.navigation;
3123
+ $[6] = t4;
3124
+ } else {
3125
+ t4 = $[6];
3126
+ }
3127
+ let t5;
3128
+ let t6;
3129
+ if ($[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
3130
+ t5 = /* @__PURE__ */ jsx(AppTitle, {});
3131
+ t6 = /* @__PURE__ */ jsx(ToolbarAccount, {});
3132
+ $[7] = t5;
3133
+ $[8] = t6;
3134
+ } else {
3135
+ t5 = $[7];
3136
+ t6 = $[8];
3137
+ }
3138
+ let t7;
3139
+ if ($[9] !== t4) {
3140
+ t7 = /* @__PURE__ */ jsx(AppBar, { color: "transparent", position: "fixed", sx: t3, children: /* @__PURE__ */ jsxs(Toolbar, { children: [
3141
+ t4,
3142
+ t5,
3143
+ t6
3144
+ ] }) });
3145
+ $[9] = t4;
3146
+ $[10] = t7;
3147
+ } else {
3148
+ t7 = $[10];
3149
+ }
3150
+ let t8;
3151
+ if ($[11] !== navigationOpen || $[12] !== props.navigation) {
3152
+ t8 = props.navigation && /* @__PURE__ */ jsx(NavigationRail, { navigation: props.navigation, expanded: navigationOpen, setExpanded: (newValue_0) => {
3153
+ setNavigationOpen(newValue_0);
3154
+ document.cookie = `navigationOpen=${newValue_0}; max-age=${YEAR_IN_SECONDS}; path=/`;
3155
+ } });
3156
+ $[11] = navigationOpen;
3157
+ $[12] = props.navigation;
3158
+ $[13] = t8;
3159
+ } else {
3160
+ t8 = $[13];
3161
+ }
3162
+ let t10;
3163
+ let t9;
3164
+ if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
3165
+ t9 = {
3166
+ flexGrow: 1,
3167
+ display: "flex",
3168
+ flexDirection: "column",
3169
+ minWidth: 0,
3170
+ height: "100%",
3171
+ overflow: "hidden"
3172
+ };
3173
+ t10 = /* @__PURE__ */ jsx(DrawerHeader, {});
3174
+ $[14] = t10;
3175
+ $[15] = t9;
3176
+ } else {
3177
+ t10 = $[14];
3178
+ t9 = $[15];
3179
+ }
3180
+ let t11;
3181
+ if ($[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
3182
+ t11 = {
3183
+ flex: 1,
3184
+ overflow: "auto",
3185
+ position: "relative"
3186
+ };
3187
+ $[16] = t11;
3188
+ } else {
3189
+ t11 = $[16];
3190
+ }
3191
+ let t12;
3192
+ if ($[17] !== props.children) {
3193
+ t12 = /* @__PURE__ */ jsxs(Box$1, { component: "main", sx: t9, children: [
3194
+ t10,
3195
+ /* @__PURE__ */ jsx(Box$1, { sx: t11, children: props.children })
3196
+ ] });
3197
+ $[17] = props.children;
3198
+ $[18] = t12;
3199
+ } else {
3200
+ t12 = $[18];
3201
+ }
3202
+ let t13;
3203
+ if ($[19] !== t12 || $[20] !== t7 || $[21] !== t8) {
3204
+ t13 = /* @__PURE__ */ jsxs(Box$1, { sx: t2, children: [
3205
+ t7,
3206
+ t8,
3207
+ t12
3208
+ ] });
3209
+ $[19] = t12;
3210
+ $[20] = t7;
3211
+ $[21] = t8;
3212
+ $[22] = t13;
3213
+ } else {
3214
+ t13 = $[22];
3215
+ }
3216
+ let t14;
3217
+ if ($[23] !== isFetching || $[24] !== isMutating) {
3218
+ t14 = (isFetching || isMutating) && /* @__PURE__ */ jsx(LinearProgress, { sx: {
3219
+ position: "fixed",
3220
+ top: {
3221
+ xs: 56,
3222
+ sm: 64
3223
+ },
3224
+ left: 0,
3225
+ right: 0
3226
+ } });
3227
+ $[23] = isFetching;
3228
+ $[24] = isMutating;
3229
+ $[25] = t14;
3230
+ } else {
3231
+ t14 = $[25];
3232
+ }
3233
+ let t15;
3234
+ if ($[26] !== t13 || $[27] !== t14) {
3235
+ t15 = /* @__PURE__ */ jsxs(Fragment, { children: [
3236
+ t0,
3237
+ t1,
3238
+ t13,
3239
+ t14
3240
+ ] });
3241
+ $[26] = t13;
3242
+ $[27] = t14;
3243
+ $[28] = t15;
3244
+ } else {
3245
+ t15 = $[28];
3246
+ }
3247
+ return t15;
3248
+ };
3249
+ function _temp$1(previous) {
3250
+ const newValue = !previous;
3251
+ document.cookie = `navigationOpen=${newValue}; max-age=${YEAR_IN_SECONDS}; path=/`;
3252
+ return newValue;
3253
+ }
3254
+ const YEAR_IN_MINUTES = 60 * 24 * 365;
3255
+ i18n.use(LanguageDetector).use(initReactI18next).init({
3256
+ resources,
3257
+ fallbackLng: "en",
3258
+ supportedLngs: Object.keys(resources),
3259
+ detection: {
3260
+ caches: ["cookie"],
3261
+ cookieMinutes: YEAR_IN_MINUTES
3262
+ },
3263
+ interpolation: {
3264
+ escapeValue: false
3265
+ }
3266
+ });
3267
+ const LayoutProvider = (t0) => {
3268
+ const $ = c(9);
3269
+ const {
3270
+ navigation,
3271
+ theme,
3272
+ children
3273
+ } = t0;
3274
+ const languageChangedHandler = useEffectEvent(_temp);
3275
+ let t1;
3276
+ if ($[0] !== languageChangedHandler) {
3277
+ t1 = () => {
3278
+ languageChangedHandler();
3279
+ i18n.on("languageChanged", languageChangedHandler);
3280
+ return () => {
3281
+ i18n.off("languageChanged", languageChangedHandler);
3282
+ };
3283
+ };
3284
+ $[0] = languageChangedHandler;
3285
+ $[1] = t1;
3286
+ } else {
3287
+ t1 = $[1];
3288
+ }
3289
+ let t2;
3290
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
3291
+ t2 = [];
3292
+ $[2] = t2;
3293
+ } else {
3294
+ t2 = $[2];
3295
+ }
3296
+ useEffect(t1, t2);
3297
+ let t3;
3298
+ if ($[3] !== children || $[4] !== navigation) {
3299
+ t3 = /* @__PURE__ */ jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.language, children: /* @__PURE__ */ jsx(DialogsProvider, { children: /* @__PURE__ */ jsx(Layout, { navigation, children }) }) }, i18n.language);
3300
+ $[3] = children;
3301
+ $[4] = navigation;
3302
+ $[5] = t3;
3303
+ } else {
3304
+ t3 = $[5];
3305
+ }
3306
+ let t4;
3307
+ if ($[6] !== t3 || $[7] !== theme) {
3308
+ t4 = /* @__PURE__ */ jsx(ThemeProvider, { theme, children: t3 });
3309
+ $[6] = t3;
3310
+ $[7] = theme;
3311
+ $[8] = t4;
3312
+ } else {
3313
+ t4 = $[8];
3314
+ }
3315
+ return t4;
3316
+ };
3317
+ const setSSRLanguage = createServerFn().handler(async () => {
3318
+ const language = getCookie(i18n.services.languageDetector.options.lookupCookie) || "en";
3319
+ z__default.config(z__default.core.locales[language]());
3320
+ dayjs.locale(language);
3321
+ await i18n.changeLanguage(language);
3322
+ });
3323
+ function _temp() {
3324
+ z__default.config(z__default.core.locales[i18n.language]());
3325
+ dayjs.locale(i18n.language);
3326
+ }
4
3327
  export {
5
3328
  LayoutProvider,
6
3329
  getSessionUser,
7
- rootRouteHead,
3330
+ r as rootRouteHead,
8
3331
  setSSRLanguage
9
3332
  };
10
3333
  //# sourceMappingURL=index.js.map