sevago-sso-fe 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,14 +1,13 @@
1
1
  import * as React from "react";
2
- import React__default, { createContext, useState, useContext, useCallback, useEffect, useMemo, forwardRef, useImperativeHandle, createElement, Children, useRef, useLayoutEffect, Fragment, useId, useInsertionEffect, Component as Component$1 } from "react";
3
- import { Alert, Stack as Stack$1, styled as styled$2, TableCell, tableCellClasses, LinearProgress, linearProgressClasses, useTheme as useTheme$2, Skeleton, Box, Icon, Tooltip, tooltipClasses, Avatar, Typography, ClickAwayListener as ClickAwayListener$1, Fade, Badge, List, ListItem, FormControl, InputLabel, RadioGroup, FormControlLabel, Radio, Menu, Divider, MenuItem, Button, IconButton, TextField, InputAdornment } from "@mui/material";
2
+ import React__default, { createContext, useContext, useCallback, useEffect, useState, useMemo, forwardRef, useImperativeHandle, createElement, Children, useRef, useLayoutEffect, Fragment, useId, useInsertionEffect, Component as Component$1 } from "react";
3
+ import { Stack as Stack$1, styled as styled$2, TableCell, tableCellClasses, LinearProgress, linearProgressClasses, useTheme as useTheme$2, Skeleton, Box, Icon, Tooltip, tooltipClasses, Avatar, Typography, ClickAwayListener, Fade, Badge, List, ListItem, FormControl, InputLabel, RadioGroup, FormControlLabel, Radio, Menu, Divider, MenuItem, Button, IconButton, TextField, InputAdornment, createTheme as createTheme$2, ThemeProvider } from "@mui/material";
4
4
  import { useDispatch, useSelector } from "react-redux";
5
- import { useLocation, useNavigate, Outlet, Route, Navigate } from "react-router-dom";
6
- import { createSlice, createAsyncThunk, configureStore, combineReducers } from "@reduxjs/toolkit";
5
+ import { useLocation, useNavigate, Outlet, Route, Navigate, Routes } from "react-router-dom";
7
6
  import { persistReducer, FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER, persistStore } from "redux-persist";
8
- import { unstable_createGetCssVar, createSpacing as createSpacing$1, useTheme as useTheme$1, unstable_memoTheme, Stack as Stack$2, css, keyframes as keyframes$1 } from "@mui/system";
9
- import emStyled from "@emotion/styled";
7
+ import { createAsyncThunk, createSlice, configureStore, combineReducers } from "@reduxjs/toolkit";
8
+ import { unstable_createGetCssVar, createSpacing as createSpacing$1, useTheme as useTheme$1, GlobalStyles as GlobalStyles$2, unstable_memoTheme, Stack as Stack$2, css, keyframes as keyframes$1 } from "@mui/system";
10
9
  import "@emotion/react";
11
- import ReactDOM from "react-dom";
10
+ import emStyled from "@emotion/styled";
12
11
  const accountActions = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13
12
  __proto__: null,
14
13
  get changeNotificationCount() {
@@ -67,21 +66,21 @@ function requireReactJsxRuntime_production() {
67
66
  if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
68
67
  hasRequiredReactJsxRuntime_production = 1;
69
68
  var REACT_ELEMENT_TYPE2 = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
70
- function jsxProd(type, config2, maybeKey) {
69
+ function jsxProd(type, config, maybeKey) {
71
70
  var key = null;
72
71
  void 0 !== maybeKey && (key = "" + maybeKey);
73
- void 0 !== config2.key && (key = "" + config2.key);
74
- if ("key" in config2) {
72
+ void 0 !== config.key && (key = "" + config.key);
73
+ if ("key" in config) {
75
74
  maybeKey = {};
76
- for (var propName in config2)
77
- "key" !== propName && (maybeKey[propName] = config2[propName]);
78
- } else maybeKey = config2;
79
- config2 = maybeKey.ref;
75
+ for (var propName in config)
76
+ "key" !== propName && (maybeKey[propName] = config[propName]);
77
+ } else maybeKey = config;
78
+ config = maybeKey.ref;
80
79
  return {
81
80
  $$typeof: REACT_ELEMENT_TYPE2,
82
81
  type,
83
82
  key,
84
- ref: void 0 !== config2 ? config2 : null,
83
+ ref: void 0 !== config ? config : null,
85
84
  props: maybeKey
86
85
  };
87
86
  }
@@ -191,12 +190,12 @@ function requireReactJsxRuntime_development() {
191
190
  function UnknownOwner() {
192
191
  return Error("react-stack-top-frame");
193
192
  }
194
- function hasValidKey(config2) {
195
- if (hasOwnProperty2.call(config2, "key")) {
196
- var getter = Object.getOwnPropertyDescriptor(config2, "key").get;
193
+ function hasValidKey(config) {
194
+ if (hasOwnProperty2.call(config, "key")) {
195
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
197
196
  if (getter && getter.isReactWarning) return false;
198
197
  }
199
- return void 0 !== config2.key;
198
+ return void 0 !== config.key;
200
199
  }
201
200
  function defineKeyPropWarningGetter(props, displayName) {
202
201
  function warnAboutAccessingKey() {
@@ -260,8 +259,8 @@ function requireReactJsxRuntime_development() {
260
259
  Object.freeze && (Object.freeze(type.props), Object.freeze(type));
261
260
  return type;
262
261
  }
263
- function jsxDEVImpl(type, config2, maybeKey, isStaticChildren, debugStack, debugTask) {
264
- var children = config2.children;
262
+ function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
263
+ var children = config.children;
265
264
  if (void 0 !== children)
266
265
  if (isStaticChildren)
267
266
  if (isArrayImpl(children)) {
@@ -273,9 +272,9 @@ function requireReactJsxRuntime_development() {
273
272
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
274
273
  );
275
274
  else validateChildKeys(children);
276
- if (hasOwnProperty2.call(config2, "key")) {
275
+ if (hasOwnProperty2.call(config, "key")) {
277
276
  children = getComponentNameFromType(type);
278
- var keys2 = Object.keys(config2).filter(function(k) {
277
+ var keys2 = Object.keys(config).filter(function(k) {
279
278
  return "key" !== k;
280
279
  });
281
280
  isStaticChildren = 0 < keys2.length ? "{key: someKey, " + keys2.join(": ..., ") + ": ...}" : "{key: someKey}";
@@ -289,12 +288,12 @@ function requireReactJsxRuntime_development() {
289
288
  }
290
289
  children = null;
291
290
  void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
292
- hasValidKey(config2) && (checkKeyStringCoercion(config2.key), children = "" + config2.key);
293
- if ("key" in config2) {
291
+ hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
292
+ if ("key" in config) {
294
293
  maybeKey = {};
295
- for (var propName in config2)
296
- "key" !== propName && (maybeKey[propName] = config2[propName]);
297
- } else maybeKey = config2;
294
+ for (var propName in config)
295
+ "key" !== propName && (maybeKey[propName] = config[propName]);
296
+ } else maybeKey = config;
298
297
  children && defineKeyPropWarningGetter(
299
298
  maybeKey,
300
299
  "function" === typeof type ? type.displayName || type.name || "Unknown" : type
@@ -331,22 +330,22 @@ function requireReactJsxRuntime_development() {
331
330
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
332
331
  var didWarnAboutKeySpread = {};
333
332
  reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
334
- reactJsxRuntime_development.jsx = function(type, config2, maybeKey) {
333
+ reactJsxRuntime_development.jsx = function(type, config, maybeKey) {
335
334
  var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
336
335
  return jsxDEVImpl(
337
336
  type,
338
- config2,
337
+ config,
339
338
  maybeKey,
340
339
  false,
341
340
  trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
342
341
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
343
342
  );
344
343
  };
345
- reactJsxRuntime_development.jsxs = function(type, config2, maybeKey) {
344
+ reactJsxRuntime_development.jsxs = function(type, config, maybeKey) {
346
345
  var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
347
346
  return jsxDEVImpl(
348
347
  type,
349
- config2,
348
+ config,
350
349
  maybeKey,
351
350
  true,
352
351
  trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
@@ -2450,12 +2449,12 @@ function callIfFn(maybeFn, arg) {
2450
2449
  return typeof maybeFn === "function" ? maybeFn(arg) : maybeFn;
2451
2450
  }
2452
2451
  function unstable_createStyleFunctionSx() {
2453
- function getThemeValue(prop, val, theme, config2) {
2452
+ function getThemeValue(prop, val, theme, config) {
2454
2453
  const props = {
2455
2454
  [prop]: val,
2456
2455
  theme
2457
2456
  };
2458
- const options = config2[prop];
2457
+ const options = config[prop];
2459
2458
  if (!options) {
2460
2459
  return {
2461
2460
  [prop]: val
@@ -2502,7 +2501,7 @@ function unstable_createStyleFunctionSx() {
2502
2501
  if (!sx) {
2503
2502
  return null;
2504
2503
  }
2505
- const config2 = theme.unstable_sxConfig ?? defaultSxConfig;
2504
+ const config = theme.unstable_sxConfig ?? defaultSxConfig;
2506
2505
  function traverse(sxInput) {
2507
2506
  let sxObject = sxInput;
2508
2507
  if (typeof sxInput === "function") {
@@ -2520,8 +2519,8 @@ function unstable_createStyleFunctionSx() {
2520
2519
  const value2 = callIfFn(sxObject[styleKey], theme);
2521
2520
  if (value2 !== null && value2 !== void 0) {
2522
2521
  if (typeof value2 === "object") {
2523
- if (config2[styleKey]) {
2524
- css2 = merge$1(css2, getThemeValue(styleKey, value2, theme, config2));
2522
+ if (config[styleKey]) {
2523
+ css2 = merge$1(css2, getThemeValue(styleKey, value2, theme, config));
2525
2524
  } else {
2526
2525
  const breakpointsValues = handleBreakpoints({
2527
2526
  theme
@@ -2539,7 +2538,7 @@ function unstable_createStyleFunctionSx() {
2539
2538
  }
2540
2539
  }
2541
2540
  } else {
2542
- css2 = merge$1(css2, getThemeValue(styleKey, value2, theme, config2));
2541
+ css2 = merge$1(css2, getThemeValue(styleKey, value2, theme, config));
2543
2542
  }
2544
2543
  }
2545
2544
  });
@@ -3432,23 +3431,6 @@ function internal_serializeStyles(styles2) {
3432
3431
  wrapper[0] = styles2;
3433
3432
  return serializeStyles(wrapper);
3434
3433
  }
3435
- const specialProperty = "exact-prop: ​";
3436
- function exactProp(propTypes2) {
3437
- if (process.env.NODE_ENV === "production") {
3438
- return propTypes2;
3439
- }
3440
- return {
3441
- ...propTypes2,
3442
- [specialProperty]: (props) => {
3443
- const unsupportedProps = Object.keys(props).filter((prop) => !propTypes2.hasOwnProperty(prop));
3444
- if (unsupportedProps.length > 0) {
3445
- return new Error(`The following props are not supported: ${unsupportedProps.map((prop) => `\`${prop}\``).join(", ")}. Please remove them.`);
3446
- }
3447
- return null;
3448
- }
3449
- };
3450
- }
3451
- const useEnhancedEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
3452
3434
  function r(e) {
3453
3435
  var t, f, n = "";
3454
3436
  if ("string" == typeof e || "number" == typeof e) n += e;
@@ -3530,12 +3512,12 @@ function getThemeProps(params) {
3530
3512
  if (!theme || !theme.components || !theme.components[name2]) {
3531
3513
  return props;
3532
3514
  }
3533
- const config2 = theme.components[name2];
3534
- if (config2.defaultProps) {
3535
- return resolveProps(config2.defaultProps, props, theme.components.mergeClassNameAndStyle);
3515
+ const config = theme.components[name2];
3516
+ if (config.defaultProps) {
3517
+ return resolveProps(config.defaultProps, props, theme.components.mergeClassNameAndStyle);
3536
3518
  }
3537
- if (!config2.styleOverrides && !config2.variants) {
3538
- return resolveProps(config2, props, theme.components.mergeClassNameAndStyle);
3519
+ if (!config.styleOverrides && !config.variants) {
3520
+ return resolveProps(config, props, theme.components.mergeClassNameAndStyle);
3539
3521
  }
3540
3522
  return props;
3541
3523
  }
@@ -4951,6 +4933,23 @@ function useTheme() {
4951
4933
  }
4952
4934
  return theme[THEME_ID] || theme;
4953
4935
  }
4936
+ function GlobalStyles$1(props) {
4937
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles$2, {
4938
+ ...props,
4939
+ defaultTheme,
4940
+ themeId: THEME_ID
4941
+ });
4942
+ }
4943
+ process.env.NODE_ENV !== "production" ? GlobalStyles$1.propTypes = {
4944
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
4945
+ // │ These PropTypes are generated from the TypeScript type definitions. │
4946
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
4947
+ // └─────────────────────────────────────────────────────────────────────┘
4948
+ /**
4949
+ * The styles you want to apply globally.
4950
+ */
4951
+ styles: PropTypes.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool])
4952
+ } : void 0;
4954
4953
  function getFunctionComponentName(Component2, fallback = "") {
4955
4954
  return Component2.displayName || Component2.name || fallback;
4956
4955
  }
@@ -5241,6 +5240,19 @@ const styled = createStyled({
5241
5240
  defaultTheme,
5242
5241
  rootShouldForwardProp
5243
5242
  });
5243
+ function globalCss(styles2) {
5244
+ return function GlobalStylesWrapper(props) {
5245
+ return (
5246
+ // Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a callback value.
5247
+ /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles$1, {
5248
+ styles: typeof styles2 === "function" ? (theme) => styles2({
5249
+ theme,
5250
+ ...props
5251
+ }) : styles2
5252
+ })
5253
+ );
5254
+ };
5255
+ }
5244
5256
  process.env.NODE_ENV !== "production" ? {
5245
5257
  // ┌────────────────────────────── Warning ──────────────────────────────┐
5246
5258
  // │ These PropTypes are generated from the TypeScript type definitions. │
@@ -5258,6 +5270,147 @@ process.env.NODE_ENV !== "production" ? {
5258
5270
  function useDefaultProps(params) {
5259
5271
  return useDefaultProps$1(params);
5260
5272
  }
5273
+ const isDynamicSupport = typeof globalCss({}) === "function";
5274
+ const html = (theme, enableColorScheme) => ({
5275
+ WebkitFontSmoothing: "antialiased",
5276
+ // Antialiasing.
5277
+ MozOsxFontSmoothing: "grayscale",
5278
+ // Antialiasing.
5279
+ // Change from `box-sizing: content-box` so that `width`
5280
+ // is not affected by `padding` or `border`.
5281
+ boxSizing: "border-box",
5282
+ // Fix font resize problem in iOS
5283
+ WebkitTextSizeAdjust: "100%",
5284
+ // When used under CssVarsProvider, colorScheme should not be applied dynamically because it will generate the stylesheet twice for server-rendered applications.
5285
+ ...enableColorScheme && !theme.vars && {
5286
+ colorScheme: theme.palette.mode
5287
+ }
5288
+ });
5289
+ const body = (theme) => ({
5290
+ color: (theme.vars || theme).palette.text.primary,
5291
+ ...theme.typography.body1,
5292
+ backgroundColor: (theme.vars || theme).palette.background.default,
5293
+ "@media print": {
5294
+ // Save printer ink.
5295
+ backgroundColor: (theme.vars || theme).palette.common.white
5296
+ }
5297
+ });
5298
+ const styles = (theme, enableColorScheme = false) => {
5299
+ const colorSchemeStyles = {};
5300
+ if (enableColorScheme && theme.colorSchemes && typeof theme.getColorSchemeSelector === "function") {
5301
+ Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
5302
+ const selector = theme.getColorSchemeSelector(key);
5303
+ if (selector.startsWith("@")) {
5304
+ colorSchemeStyles[selector] = {
5305
+ ":root": {
5306
+ colorScheme: scheme.palette?.mode
5307
+ }
5308
+ };
5309
+ } else {
5310
+ colorSchemeStyles[selector.replace(/\s*&/, "")] = {
5311
+ colorScheme: scheme.palette?.mode
5312
+ };
5313
+ }
5314
+ });
5315
+ }
5316
+ let defaultStyles = {
5317
+ html: html(theme, enableColorScheme),
5318
+ "*, *::before, *::after": {
5319
+ boxSizing: "inherit"
5320
+ },
5321
+ "strong, b": {
5322
+ fontWeight: theme.typography.fontWeightBold
5323
+ },
5324
+ body: {
5325
+ margin: 0,
5326
+ // Remove the margin in all browsers.
5327
+ ...body(theme),
5328
+ // Add support for document.body.requestFullScreen().
5329
+ // Other elements, if background transparent, are not supported.
5330
+ "&::backdrop": {
5331
+ backgroundColor: (theme.vars || theme).palette.background.default
5332
+ }
5333
+ },
5334
+ ...colorSchemeStyles
5335
+ };
5336
+ const themeOverrides = theme.components?.MuiCssBaseline?.styleOverrides;
5337
+ if (themeOverrides) {
5338
+ defaultStyles = [defaultStyles, themeOverrides];
5339
+ }
5340
+ return defaultStyles;
5341
+ };
5342
+ const SELECTOR = "mui-ecs";
5343
+ const staticStyles = (theme) => {
5344
+ const result = styles(theme, false);
5345
+ const baseStyles = Array.isArray(result) ? result[0] : result;
5346
+ if (!theme.vars && baseStyles) {
5347
+ baseStyles.html[`:root:has(${SELECTOR})`] = {
5348
+ colorScheme: theme.palette.mode
5349
+ };
5350
+ }
5351
+ if (theme.colorSchemes) {
5352
+ Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
5353
+ const selector = theme.getColorSchemeSelector(key);
5354
+ if (selector.startsWith("@")) {
5355
+ baseStyles[selector] = {
5356
+ [`:root:not(:has(.${SELECTOR}))`]: {
5357
+ colorScheme: scheme.palette?.mode
5358
+ }
5359
+ };
5360
+ } else {
5361
+ baseStyles[selector.replace(/\s*&/, "")] = {
5362
+ [`&:not(:has(.${SELECTOR}))`]: {
5363
+ colorScheme: scheme.palette?.mode
5364
+ }
5365
+ };
5366
+ }
5367
+ });
5368
+ }
5369
+ return result;
5370
+ };
5371
+ const GlobalStyles = globalCss(isDynamicSupport ? ({
5372
+ theme,
5373
+ enableColorScheme
5374
+ }) => styles(theme, enableColorScheme) : ({
5375
+ theme
5376
+ }) => staticStyles(theme));
5377
+ function CssBaseline(inProps) {
5378
+ const props = useDefaultProps({
5379
+ props: inProps,
5380
+ name: "MuiCssBaseline"
5381
+ });
5382
+ const {
5383
+ children,
5384
+ enableColorScheme = false
5385
+ } = props;
5386
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(React.Fragment, {
5387
+ children: [isDynamicSupport && /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles, {
5388
+ enableColorScheme
5389
+ }), !isDynamicSupport && !enableColorScheme && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
5390
+ className: SELECTOR,
5391
+ style: {
5392
+ display: "none"
5393
+ }
5394
+ }), children]
5395
+ });
5396
+ }
5397
+ process.env.NODE_ENV !== "production" ? CssBaseline.propTypes = {
5398
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
5399
+ // │ These PropTypes are generated from the TypeScript type definitions. │
5400
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
5401
+ // └─────────────────────────────────────────────────────────────────────┘
5402
+ /**
5403
+ * You can wrap a node.
5404
+ */
5405
+ children: PropTypes.node,
5406
+ /**
5407
+ * Enable `color-scheme` CSS property to use `theme.palette.mode`.
5408
+ * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
5409
+ * For browser support, check out https://caniuse.com/?search=color-scheme
5410
+ * @default false
5411
+ */
5412
+ enableColorScheme: PropTypes.bool
5413
+ } : void 0;
5261
5414
  const getDefaultsFromPostinstall = () => void 0;
5262
5415
  /**
5263
5416
  * @license
@@ -6728,12 +6881,12 @@ const ERROR_FACTORY$2 = new ErrorFactory("app", "Firebase", ERRORS);
6728
6881
  * limitations under the License.
6729
6882
  */
6730
6883
  class FirebaseAppImpl {
6731
- constructor(options, config2, container) {
6884
+ constructor(options, config, container) {
6732
6885
  this._isDeleted = false;
6733
6886
  this._options = { ...options };
6734
- this._config = { ...config2 };
6735
- this._name = config2.name;
6736
- this._automaticDataCollectionEnabled = config2.automaticDataCollectionEnabled;
6887
+ this._config = { ...config };
6888
+ this._name = config.name;
6889
+ this._automaticDataCollectionEnabled = config.automaticDataCollectionEnabled;
6737
6890
  this._container = container;
6738
6891
  this.container.addComponent(new Component(
6739
6892
  "app",
@@ -6787,12 +6940,12 @@ function initializeApp(_options, rawConfig = {}) {
6787
6940
  const name3 = rawConfig;
6788
6941
  rawConfig = { name: name3 };
6789
6942
  }
6790
- const config2 = {
6943
+ const config = {
6791
6944
  name: DEFAULT_ENTRY_NAME,
6792
6945
  automaticDataCollectionEnabled: true,
6793
6946
  ...rawConfig
6794
6947
  };
6795
- const name2 = config2.name;
6948
+ const name2 = config.name;
6796
6949
  if (typeof name2 !== "string" || !name2) {
6797
6950
  throw ERROR_FACTORY$2.create("bad-app-name", {
6798
6951
  appName: String(name2)
@@ -6807,7 +6960,7 @@ function initializeApp(_options, rawConfig = {}) {
6807
6960
  }
6808
6961
  const existingApp = _apps.get(name2);
6809
6962
  if (existingApp) {
6810
- if (deepEqual(options, existingApp.options) && deepEqual(config2, existingApp.config)) {
6963
+ if (deepEqual(options, existingApp.options) && deepEqual(config, existingApp.config)) {
6811
6964
  return existingApp;
6812
6965
  } else {
6813
6966
  throw ERROR_FACTORY$2.create("duplicate-app", { appName: name2 });
@@ -6817,7 +6970,7 @@ function initializeApp(_options, rawConfig = {}) {
6817
6970
  for (const component of _components.values()) {
6818
6971
  container.addComponent(component);
6819
6972
  }
6820
- const newApp = new FirebaseAppImpl(options, config2, container);
6973
+ const newApp = new FirebaseAppImpl(options, config, container);
6821
6974
  _apps.set(name2, newApp);
6822
6975
  return newApp;
6823
6976
  }
@@ -7343,7 +7496,7 @@ async function createInstallationRequest({ appConfig, heartbeatServiceProvider }
7343
7496
  headers.append("x-firebase-client", heartbeatsHeader);
7344
7497
  }
7345
7498
  }
7346
- const body = {
7499
+ const body2 = {
7347
7500
  fid,
7348
7501
  authVersion: INTERNAL_AUTH_VERSION,
7349
7502
  appId: appConfig.appId,
@@ -7352,7 +7505,7 @@ async function createInstallationRequest({ appConfig, heartbeatServiceProvider }
7352
7505
  const request = {
7353
7506
  method: "POST",
7354
7507
  headers,
7355
- body: JSON.stringify(body)
7508
+ body: JSON.stringify(body2)
7356
7509
  };
7357
7510
  const response = await retryIfServerError(() => fetch(endpoint, request));
7358
7511
  if (response.ok) {
@@ -7740,7 +7893,7 @@ async function generateAuthTokenRequest({ appConfig, heartbeatServiceProvider },
7740
7893
  headers.append("x-firebase-client", heartbeatsHeader);
7741
7894
  }
7742
7895
  }
7743
- const body = {
7896
+ const body2 = {
7744
7897
  installation: {
7745
7898
  sdkVersion: PACKAGE_VERSION,
7746
7899
  appId: appConfig.appId
@@ -7749,7 +7902,7 @@ async function generateAuthTokenRequest({ appConfig, heartbeatServiceProvider },
7749
7902
  const request = {
7750
7903
  method: "POST",
7751
7904
  headers,
7752
- body: JSON.stringify(body)
7905
+ body: JSON.stringify(body2)
7753
7906
  };
7754
7907
  const response = await retryIfServerError(() => fetch(endpoint, request));
7755
7908
  if (response.ok) {
@@ -7933,7 +8086,7 @@ async function getId(installations) {
7933
8086
  * See the License for the specific language governing permissions and
7934
8087
  * limitations under the License.
7935
8088
  */
7936
- async function getToken(installations, forceRefresh = false) {
8089
+ async function getToken$2(installations, forceRefresh = false) {
7937
8090
  const installationsImpl = installations;
7938
8091
  await completeInstallationRegistration(installationsImpl);
7939
8092
  const authToken = await refreshAuthToken(installationsImpl, forceRefresh);
@@ -8025,7 +8178,7 @@ const internalFactory = (container) => {
8025
8178
  const installations = _getProvider(app2, INSTALLATIONS_NAME).getImmediate();
8026
8179
  const installationsInternal = {
8027
8180
  getId: () => getId(installations),
8028
- getToken: (forceRefresh) => getToken(installations, forceRefresh)
8181
+ getToken: (forceRefresh) => getToken$2(installations, forceRefresh)
8029
8182
  };
8030
8183
  return installationsInternal;
8031
8184
  };
@@ -8393,11 +8546,11 @@ const ERROR_FACTORY = new ErrorFactory("messaging", "Messaging", ERROR_MAP);
8393
8546
  */
8394
8547
  async function requestGetToken(firebaseDependencies, subscriptionOptions) {
8395
8548
  const headers = await getHeaders(firebaseDependencies);
8396
- const body = getBody(subscriptionOptions);
8549
+ const body2 = getBody(subscriptionOptions);
8397
8550
  const subscribeOptions = {
8398
8551
  method: "POST",
8399
8552
  headers,
8400
- body: JSON.stringify(body)
8553
+ body: JSON.stringify(body2)
8401
8554
  };
8402
8555
  let responseData;
8403
8556
  try {
@@ -8424,11 +8577,11 @@ async function requestGetToken(firebaseDependencies, subscriptionOptions) {
8424
8577
  }
8425
8578
  async function requestUpdateToken(firebaseDependencies, tokenDetails) {
8426
8579
  const headers = await getHeaders(firebaseDependencies);
8427
- const body = getBody(tokenDetails.subscriptionOptions);
8580
+ const body2 = getBody(tokenDetails.subscriptionOptions);
8428
8581
  const updateOptions = {
8429
8582
  method: "PATCH",
8430
8583
  headers,
8431
- body: JSON.stringify(body)
8584
+ body: JSON.stringify(body2)
8432
8585
  };
8433
8586
  let responseData;
8434
8587
  try {
@@ -8487,7 +8640,7 @@ async function getHeaders({ appConfig, installations }) {
8487
8640
  });
8488
8641
  }
8489
8642
  function getBody({ p256dh, auth, endpoint, vapidKey }) {
8490
- const body = {
8643
+ const body2 = {
8491
8644
  web: {
8492
8645
  endpoint,
8493
8646
  auth,
@@ -8495,9 +8648,9 @@ function getBody({ p256dh, auth, endpoint, vapidKey }) {
8495
8648
  }
8496
8649
  };
8497
8650
  if (vapidKey !== DEFAULT_VAPID_KEY) {
8498
- body.web.applicationPubKey = vapidKey;
8651
+ body2.web.applicationPubKey = vapidKey;
8499
8652
  }
8500
- return body;
8653
+ return body2;
8501
8654
  }
8502
8655
  /**
8503
8656
  * @license
@@ -8626,9 +8779,9 @@ function propagateNotificationPayload(payload, messagePayloadInternal) {
8626
8779
  if (!!title) {
8627
8780
  payload.notification.title = title;
8628
8781
  }
8629
- const body = messagePayloadInternal.notification.body;
8630
- if (!!body) {
8631
- payload.notification.body = body;
8782
+ const body2 = messagePayloadInternal.notification.body;
8783
+ if (!!body2) {
8784
+ payload.notification.body = body2;
8632
8785
  }
8633
8786
  const image = messagePayloadInternal.notification.image;
8634
8787
  if (!!image) {
@@ -9075,6 +9228,10 @@ function getMessagingInWindow(app2 = getApp()) {
9075
9228
  });
9076
9229
  return _getProvider(getModularInstance(app2), "messaging").getImmediate();
9077
9230
  }
9231
+ async function getToken(messaging2, options) {
9232
+ messaging2 = getModularInstance(messaging2);
9233
+ return getToken$1(messaging2, options);
9234
+ }
9078
9235
  registerMessagingInWindow();
9079
9236
  var name = "firebase";
9080
9237
  var version = "12.3.0";
@@ -9437,9 +9594,6 @@ var RouteType = /* @__PURE__ */ ((RouteType2) => {
9437
9594
  RouteType2["PROTECTED"] = "PROTECTED";
9438
9595
  return RouteType2;
9439
9596
  })(RouteType || {});
9440
- const DASHBOARD_BASE = "/dashboard";
9441
- const PREFIX_SETTING_JOB = "job-settings/";
9442
- const PREFIX_WORKFLOW_ENGINE = "/workflow";
9443
9597
  const ALLOW_USER_TYPES = [UserType.ADMIN, UserType.HR, UserType.User, UserType.C_B, UserType.ROOT];
9444
9598
  const PAGE = {
9445
9599
  // Public
@@ -9456,15 +9610,11 @@ const PAGE = {
9456
9610
  };
9457
9611
  const DASHBOARD_SCREEN = {
9458
9612
  DASHBOARD: {
9459
- path: "",
9460
- type: RouteType.PROTECTED,
9461
- allowUserTypes: ALLOW_USER_TYPES
9613
+ type: RouteType.PROTECTED
9462
9614
  },
9463
9615
  // dashboard
9464
9616
  PROJECT_DASHBOARD: {
9465
- path: "project-dashboard",
9466
- type: RouteType.PROTECTED,
9467
- allowUserTypes: ALLOW_USER_TYPES
9617
+ type: RouteType.PROTECTED
9468
9618
  },
9469
9619
  JOB_DASHBOARD: {
9470
9620
  path: "job-dashboard",
@@ -9472,208 +9622,151 @@ const DASHBOARD_SCREEN = {
9472
9622
  allowUserTypes: [UserType.ADMIN, UserType.HR, UserType.ROOT]
9473
9623
  },
9474
9624
  PROJECT_TASK_PROCESS: {
9475
- path: "process-dashboard",
9476
- type: RouteType.PROTECTED,
9477
- allowUserTypes: ALLOW_USER_TYPES
9625
+ type: RouteType.PROTECTED
9478
9626
  },
9479
9627
  // job
9480
9628
  JOB: {
9481
- path: "job-hr",
9482
9629
  type: RouteType.PROTECTED,
9483
9630
  allowUserTypes: [UserType.ADMIN, UserType.HR, UserType.ROOT]
9484
9631
  },
9485
9632
  JOB_RECRUITMENT: {
9486
- path: "job-recruitment",
9487
9633
  type: RouteType.PROTECTED,
9488
9634
  allowUserTypes: [UserType.ADMIN, UserType.User, UserType.C_B, UserType.ROOT]
9489
9635
  },
9490
9636
  JOB_RECRUITMENT_DETAIL: {
9491
- path: "job-recruitment/:id",
9492
9637
  type: RouteType.PROTECTED,
9493
9638
  allowUserTypes: [UserType.ADMIN, UserType.User, UserType.C_B, UserType.ROOT]
9494
9639
  },
9495
9640
  JOB_DETAIL: {
9496
- path: "job-hr/:id",
9497
9641
  type: RouteType.PROTECTED,
9498
9642
  allowUserTypes: [UserType.ADMIN, UserType.C_B, UserType.HR, UserType.ROOT]
9499
9643
  },
9500
9644
  //setting job parent
9501
9645
  JOB_TITLE: {
9502
- path: PREFIX_SETTING_JOB + "job-title",
9503
- type: RouteType.PROTECTED,
9504
- allowUserTypes: ALLOW_USER_TYPES
9646
+ type: RouteType.PROTECTED
9505
9647
  },
9506
9648
  JOB_BANNER: {
9507
- path: PREFIX_SETTING_JOB + "banner",
9508
9649
  type: RouteType.PROTECTED,
9509
9650
  allowUserTypes: [UserType.ADMIN, UserType.HR, UserType.ROOT]
9510
9651
  },
9511
9652
  JOB_SOCIAL: {
9512
- path: PREFIX_SETTING_JOB + "job-social",
9513
9653
  type: RouteType.PROTECTED,
9514
9654
  allowUserTypes: [UserType.ADMIN, UserType.HR, UserType.ROOT]
9515
9655
  },
9516
9656
  JOB_RECRUITMENT_HISTORY: {
9517
- path: PREFIX_SETTING_JOB + "history-recruitment",
9518
9657
  type: RouteType.PROTECTED,
9519
9658
  allowUserTypes: [UserType.ADMIN, UserType.User, UserType.C_B, UserType.ROOT]
9520
9659
  },
9521
9660
  INDUSTRY: {
9522
- path: PREFIX_SETTING_JOB + "industry",
9523
- type: RouteType.PROTECTED,
9524
- allowUserTypes: ALLOW_USER_TYPES
9661
+ type: RouteType.PROTECTED
9525
9662
  },
9526
9663
  EMAIL_TEMPLATE: {
9527
- path: PREFIX_SETTING_JOB + "email-template",
9528
9664
  type: RouteType.PROTECTED,
9529
9665
  allowUserTypes: [UserType.ADMIN, UserType.HR, UserType.ROOT]
9530
9666
  },
9531
9667
  FAQ: {
9532
- path: PREFIX_SETTING_JOB + "faq",
9533
9668
  type: RouteType.PROTECTED,
9534
9669
  allowUserTypes: [UserType.ADMIN, UserType.HR, UserType.ROOT]
9535
9670
  },
9536
9671
  SALARY: {
9537
- path: PREFIX_SETTING_JOB + "salary-range",
9538
- type: RouteType.PROTECTED,
9539
- allowUserTypes: ALLOW_USER_TYPES
9672
+ type: RouteType.PROTECTED
9540
9673
  },
9541
9674
  // application
9542
9675
  APPLICATION: {
9543
- path: "application-office",
9544
- type: RouteType.PROTECTED,
9545
- allowUserTypes: ALLOW_USER_TYPES
9676
+ type: RouteType.PROTECTED
9546
9677
  },
9547
9678
  APPLICATION_OPERATOR: {
9548
- path: "application-operator",
9549
9679
  type: RouteType.PROTECTED,
9550
9680
  allowUserTypes: [UserType.ADMIN, UserType.HR, UserType.ROOT]
9551
9681
  },
9552
9682
  // project - Phần này để tạm sẽ fix thêm 1 lần nữa
9553
9683
  PROJECT_TASK: {
9554
9684
  path: "project-task",
9555
- type: RouteType.PROTECTED,
9556
- allowUserTypes: ALLOW_USER_TYPES
9685
+ type: RouteType.PROTECTED
9557
9686
  },
9558
9687
  CREATE_PROJECT: {
9559
- path: "create-project",
9560
- type: RouteType.PROTECTED,
9561
- allowUserTypes: ALLOW_USER_TYPES
9688
+ type: RouteType.PROTECTED
9562
9689
  },
9563
9690
  DETAIL_PROJECT: {
9564
- path: "detail-project",
9565
- type: RouteType.PROTECTED,
9566
- allowUserTypes: ALLOW_USER_TYPES
9691
+ type: RouteType.PROTECTED
9567
9692
  },
9568
9693
  CREATE_TASK: {
9569
- path: "create-task",
9570
- type: RouteType.PROTECTED,
9571
- allowUserTypes: ALLOW_USER_TYPES
9694
+ type: RouteType.PROTECTED
9572
9695
  },
9573
9696
  ALL_PROJECT_OF_DIVISION: {
9574
- path: "all-project-of-division",
9575
- type: RouteType.PROTECTED,
9576
- allowUserTypes: ALLOW_USER_TYPES
9697
+ type: RouteType.PROTECTED
9577
9698
  },
9578
9699
  // org
9579
9700
  ORG_UNIT_TREE: {
9580
- path: "org-unit-tree",
9581
- type: RouteType.PROTECTED,
9582
- allowUserTypes: ALLOW_USER_TYPES
9701
+ type: RouteType.PROTECTED
9583
9702
  },
9584
9703
  ORG_UNIT_RESTORE: {
9585
- path: "org-unit-restore",
9586
- type: RouteType.PROTECTED,
9587
- allowUserTypes: ALLOW_USER_TYPES
9704
+ type: RouteType.PROTECTED
9588
9705
  },
9589
9706
  ORG_STRUCTURE: {
9590
9707
  path: "org-structure",
9591
- type: RouteType.PROTECTED,
9592
- allowUserTypes: ALLOW_USER_TYPES
9708
+ type: RouteType.PROTECTED
9593
9709
  },
9594
9710
  POSITION_TREE: {
9595
- path: "position-tree",
9596
- type: RouteType.PROTECTED,
9597
- allowUserTypes: ALLOW_USER_TYPES
9711
+ type: RouteType.PROTECTED
9598
9712
  },
9599
9713
  POSITION_RESTORE: {
9600
- path: "position-restore",
9601
- type: RouteType.PROTECTED,
9602
- allowUserTypes: ALLOW_USER_TYPES
9714
+ type: RouteType.PROTECTED
9603
9715
  },
9604
9716
  //user
9605
9717
  USER: {
9606
9718
  path: "user-list",
9607
- type: RouteType.PROTECTED,
9608
- allowUserTypes: ALLOW_USER_TYPES
9719
+ type: RouteType.PROTECTED
9609
9720
  },
9610
9721
  USER_RESTORE: {
9611
- path: "user-restore",
9612
- type: RouteType.PROTECTED,
9613
- allowUserTypes: ALLOW_USER_TYPES
9722
+ type: RouteType.PROTECTED
9614
9723
  },
9615
9724
  // other
9616
9725
  ACCOUNT: {
9617
9726
  path: "account",
9618
- type: RouteType.PROTECTED,
9619
- allowUserTypes: ALLOW_USER_TYPES
9727
+ type: RouteType.PROTECTED
9620
9728
  },
9621
9729
  NOTIFICATION: {
9622
- path: "notification",
9623
- type: RouteType.PROTECTED,
9624
- allowUserTypes: ALLOW_USER_TYPES
9730
+ type: RouteType.PROTECTED
9625
9731
  },
9626
9732
  // check in
9627
9733
  CHECK_IN: {
9628
9734
  path: "check-in",
9629
- type: RouteType.PROTECTED,
9630
- allowUserTypes: ALLOW_USER_TYPES
9735
+ type: RouteType.PROTECTED
9631
9736
  },
9632
9737
  // payroll
9633
9738
  PAYROLL: {
9634
9739
  path: "payroll",
9635
- type: RouteType.PROTECTED,
9636
- allowUserTypes: ALLOW_USER_TYPES
9740
+ type: RouteType.PROTECTED
9637
9741
  },
9638
9742
  // training
9639
9743
  TRAINING: {
9640
9744
  path: "training",
9641
- type: RouteType.PROTECTED,
9642
- allowUserTypes: ALLOW_USER_TYPES
9745
+ type: RouteType.PROTECTED
9643
9746
  },
9644
9747
  // truyền thông
9645
9748
  INSIDE: {
9646
9749
  path: "inside",
9647
- type: RouteType.PROTECTED,
9648
- allowUserTypes: ALLOW_USER_TYPES
9750
+ type: RouteType.PROTECTED
9649
9751
  },
9650
9752
  //list proposal
9651
9753
  PROPOSAL_SELECTOR: {
9652
- path: "proposal-selector",
9653
- type: RouteType.PROTECTED,
9654
- allowUserTypes: ALLOW_USER_TYPES
9754
+ type: RouteType.PROTECTED
9655
9755
  },
9656
9756
  // Các loại proposal workflow cụ thể
9657
9757
  PROPOSAL_WORKFLOW_PROJECT: {
9658
- path: "proposal-workflow/project-proposal",
9659
- type: RouteType.PROTECTED,
9660
- allowUserTypes: ALLOW_USER_TYPES
9758
+ type: RouteType.PROTECTED
9661
9759
  },
9662
9760
  PROPOSAL_WORKFLOW_JOB: {
9663
- path: "proposal-workflow/job-recruitment",
9664
- type: RouteType.PROTECTED,
9665
- allowUserTypes: ALLOW_USER_TYPES
9761
+ type: RouteType.PROTECTED
9666
9762
  },
9667
9763
  PROPOSAL_WORKFLOW_USER: {
9668
- path: "proposal-workflow/user-movement",
9669
- type: RouteType.PROTECTED,
9670
- allowUserTypes: ALLOW_USER_TYPES
9764
+ type: RouteType.PROTECTED
9671
9765
  },
9672
9766
  // Chat
9673
9767
  CHAT: {
9674
9768
  path: "chat",
9675
- type: RouteType.PROTECTED,
9676
- allowUserTypes: ALLOW_USER_TYPES
9769
+ type: RouteType.PROTECTED
9677
9770
  }
9678
9771
  };
9679
9772
  const BOOKING_SCREEN = {
@@ -9685,62 +9778,42 @@ const WORKFLOW_ENGINE_SCREEN = {
9685
9778
  //job
9686
9779
  PROPOSAL_JOB_RECRUITMENT: {
9687
9780
  path: "request-job",
9688
- type: RouteType.PROTECTED,
9689
- allowUserTypes: ALLOW_USER_TYPES
9781
+ type: RouteType.PROTECTED
9690
9782
  },
9691
9783
  PROPOSAL_WORKFLOW: {
9692
- path: ":type/:id",
9693
- type: RouteType.PROTECTED,
9694
- allowUserTypes: ALLOW_USER_TYPES
9784
+ type: RouteType.PROTECTED
9695
9785
  },
9696
9786
  // project
9697
9787
  PROPOSAL_PROJECT_TASK: {
9698
- path: "request-project",
9699
- type: RouteType.PROTECTED,
9700
- allowUserTypes: ALLOW_USER_TYPES
9788
+ type: RouteType.PROTECTED
9701
9789
  },
9702
9790
  //user
9703
9791
  PROPOSAL_USER_TRANSFER: {
9704
- path: "user-transfer",
9705
- type: RouteType.PROTECTED,
9706
- allowUserTypes: ALLOW_USER_TYPES
9792
+ type: RouteType.PROTECTED
9707
9793
  },
9708
9794
  PROPOSAL_USER_APPOINTMENT: {
9709
- path: "user-appointment",
9710
- type: RouteType.PROTECTED,
9711
- allowUserTypes: ALLOW_USER_TYPES
9795
+ type: RouteType.PROTECTED
9712
9796
  },
9713
9797
  PROPOSAL_USER_EXEMPTION: {
9714
- path: "user-exemption",
9715
- type: RouteType.PROTECTED,
9716
- allowUserTypes: ALLOW_USER_TYPES
9798
+ type: RouteType.PROTECTED
9717
9799
  },
9718
9800
  PROPOSAL_USER_WORKFLOW_APPOINTMENT: {
9719
- path: "user-appointment/:type",
9720
- type: RouteType.PROTECTED,
9721
- allowUserTypes: ALLOW_USER_TYPES
9801
+ type: RouteType.PROTECTED
9722
9802
  },
9723
9803
  PROPOSAL_USER_WORKFLOW_TRANSFER: {
9724
- path: "user-transfer/:type",
9725
- type: RouteType.PROTECTED,
9726
- allowUserTypes: ALLOW_USER_TYPES
9804
+ type: RouteType.PROTECTED
9727
9805
  },
9728
9806
  PROPOSAL_USER_WORKFLOW_DEMOTION: {
9729
- path: "user-exemption/:type",
9730
- type: RouteType.PROTECTED,
9731
- allowUserTypes: ALLOW_USER_TYPES
9807
+ type: RouteType.PROTECTED
9732
9808
  }
9733
9809
  };
9734
9810
  const WORKFLOW_TRACKING_SCREEN = {
9735
9811
  MY_TASK: {
9736
9812
  path: "my-task",
9737
- type: RouteType.PROTECTED,
9738
- allowUserTypes: ALLOW_USER_TYPES
9813
+ type: RouteType.PROTECTED
9739
9814
  },
9740
9815
  MY_WORK: {
9741
- path: "my-work",
9742
- type: RouteType.PROTECTED,
9743
- allowUserTypes: ALLOW_USER_TYPES
9816
+ type: RouteType.PROTECTED
9744
9817
  }
9745
9818
  };
9746
9819
  var AppCategory = /* @__PURE__ */ ((AppCategory2) => {
@@ -10983,6 +11056,24 @@ function requireStorage() {
10983
11056
  }
10984
11057
  var storageExports = requireStorage();
10985
11058
  const storage = /* @__PURE__ */ getDefaultExportFromCjs(storageExports);
11059
+ const changeMode = createAsyncThunk("CHANGE_MODE", (currentMode) => {
11060
+ return currentMode === Mode.LIGHT ? Mode.DARK : Mode.LIGHT;
11061
+ });
11062
+ const initialStateSystem = {
11063
+ mode: Mode.LIGHT
11064
+ };
11065
+ const slice$1 = createSlice({
11066
+ // Name Slice
11067
+ name: "system",
11068
+ initialState: initialStateSystem,
11069
+ reducers: {},
11070
+ extraReducers: (builder) => {
11071
+ builder.addCase(changeMode.fulfilled, (state, action) => {
11072
+ state.mode = action.payload;
11073
+ });
11074
+ }
11075
+ });
11076
+ const reducerSystem = slice$1.reducer;
10986
11077
  function bind(fn, thisArg) {
10987
11078
  return function wrap2() {
10988
11079
  return fn.apply(thisArg, arguments);
@@ -11255,7 +11346,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
11255
11346
  isArray$1(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
11256
11347
  return obj;
11257
11348
  };
11258
- const noop$2 = () => {
11349
+ const noop$1 = () => {
11259
11350
  };
11260
11351
  const toFiniteNumber = (value2, defaultValue) => {
11261
11352
  return value2 != null && Number.isFinite(value2 = +value2) ? value2 : defaultValue;
@@ -11358,7 +11449,7 @@ const utils$1 = {
11358
11449
  freezeMethods,
11359
11450
  toObjectSet,
11360
11451
  toCamelCase,
11361
- noop: noop$2,
11452
+ noop: noop$1,
11362
11453
  toFiniteNumber,
11363
11454
  findKey,
11364
11455
  global: _global,
@@ -11371,7 +11462,7 @@ const utils$1 = {
11371
11462
  asap,
11372
11463
  isIterable
11373
11464
  };
11374
- function AxiosError$1(message, code, config2, request, response) {
11465
+ function AxiosError$1(message, code, config, request, response) {
11375
11466
  Error.call(this);
11376
11467
  if (Error.captureStackTrace) {
11377
11468
  Error.captureStackTrace(this, this.constructor);
@@ -11381,7 +11472,7 @@ function AxiosError$1(message, code, config2, request, response) {
11381
11472
  this.message = message;
11382
11473
  this.name = "AxiosError";
11383
11474
  code && (this.code = code);
11384
- config2 && (this.config = config2);
11475
+ config && (this.config = config);
11385
11476
  request && (this.request = request);
11386
11477
  if (response) {
11387
11478
  this.response = response;
@@ -11430,7 +11521,7 @@ const descriptors = {};
11430
11521
  });
11431
11522
  Object.defineProperties(AxiosError$1, descriptors);
11432
11523
  Object.defineProperty(prototype$1, "isAxiosError", { value: true });
11433
- AxiosError$1.from = (error, code, config2, request, response, customProps) => {
11524
+ AxiosError$1.from = (error, code, config, request, response, customProps) => {
11434
11525
  const axiosError = Object.create(prototype$1);
11435
11526
  utils$1.toFlatObject(error, axiosError, function filter3(obj) {
11436
11527
  return obj !== Error.prototype;
@@ -11439,7 +11530,7 @@ AxiosError$1.from = (error, code, config2, request, response, customProps) => {
11439
11530
  });
11440
11531
  const msg = error && error.message ? error.message : "Error";
11441
11532
  const errCode = code == null && error ? error.code : code;
11442
- AxiosError$1.call(axiosError, msg, errCode, config2, request, response);
11533
+ AxiosError$1.call(axiosError, msg, errCode, config, request, response);
11443
11534
  if (error && axiosError.cause == null) {
11444
11535
  Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
11445
11536
  }
@@ -12155,12 +12246,12 @@ utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value: value2 }, key) =>
12155
12246
  });
12156
12247
  utils$1.freezeMethods(AxiosHeaders$1);
12157
12248
  function transformData(fns, response) {
12158
- const config2 = this || defaults;
12159
- const context = response || config2;
12249
+ const config = this || defaults;
12250
+ const context = response || config;
12160
12251
  const headers = AxiosHeaders$1.from(context.headers);
12161
12252
  let data = context.data;
12162
12253
  utils$1.forEach(fns, function transform(fn) {
12163
- data = fn.call(config2, data, headers.normalize(), response ? response.status : void 0);
12254
+ data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
12164
12255
  });
12165
12256
  headers.normalize();
12166
12257
  return data;
@@ -12168,8 +12259,8 @@ function transformData(fns, response) {
12168
12259
  function isCancel$1(value2) {
12169
12260
  return !!(value2 && value2.__CANCEL__);
12170
12261
  }
12171
- function CanceledError$1(message, config2, request) {
12172
- AxiosError$1.call(this, message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config2, request);
12262
+ function CanceledError$1(message, config, request) {
12263
+ AxiosError$1.call(this, message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
12173
12264
  this.name = "CanceledError";
12174
12265
  }
12175
12266
  utils$1.inherits(CanceledError$1, AxiosError$1, {
@@ -12345,7 +12436,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
12345
12436
  const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
12346
12437
  function mergeConfig$1(config1, config2) {
12347
12438
  config2 = config2 || {};
12348
- const config3 = {};
12439
+ const config = {};
12349
12440
  function getMergedValue(target, source, prop, caseless) {
12350
12441
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
12351
12442
  return utils$1.merge.call({ caseless }, target, source);
@@ -12416,15 +12507,15 @@ function mergeConfig$1(config1, config2) {
12416
12507
  utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
12417
12508
  const merge2 = mergeMap[prop] || mergeDeepProperties;
12418
12509
  const configValue = merge2(config1[prop], config2[prop], prop);
12419
- utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config3[prop] = configValue);
12510
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
12420
12511
  });
12421
- return config3;
12512
+ return config;
12422
12513
  }
12423
- const resolveConfig = (config2) => {
12424
- const newConfig = mergeConfig$1({}, config2);
12514
+ const resolveConfig = (config) => {
12515
+ const newConfig = mergeConfig$1({}, config);
12425
12516
  let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
12426
12517
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
12427
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config2.params, config2.paramsSerializer);
12518
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
12428
12519
  if (auth) {
12429
12520
  headers.set(
12430
12521
  "Authorization",
@@ -12456,9 +12547,9 @@ const resolveConfig = (config2) => {
12456
12547
  return newConfig;
12457
12548
  };
12458
12549
  const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
12459
- const xhrAdapter = isXHRAdapterSupported && function(config2) {
12550
+ const xhrAdapter = isXHRAdapterSupported && function(config) {
12460
12551
  return new Promise(function dispatchXhrRequest(resolve, reject) {
12461
- const _config = resolveConfig(config2);
12552
+ const _config = resolveConfig(config);
12462
12553
  let requestData = _config.data;
12463
12554
  const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
12464
12555
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
@@ -12487,7 +12578,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config2) {
12487
12578
  status: request.status,
12488
12579
  statusText: request.statusText,
12489
12580
  headers: responseHeaders,
12490
- config: config2,
12581
+ config,
12491
12582
  request
12492
12583
  };
12493
12584
  settle(function _resolve(value2) {
@@ -12516,12 +12607,12 @@ const xhrAdapter = isXHRAdapterSupported && function(config2) {
12516
12607
  if (!request) {
12517
12608
  return;
12518
12609
  }
12519
- reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config2, request));
12610
+ reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
12520
12611
  request = null;
12521
12612
  };
12522
12613
  request.onerror = function handleError(event) {
12523
12614
  const msg = event && event.message ? event.message : "Network Error";
12524
- const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config2, request);
12615
+ const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
12525
12616
  err.event = event || null;
12526
12617
  reject(err);
12527
12618
  request = null;
@@ -12535,7 +12626,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config2) {
12535
12626
  reject(new AxiosError$1(
12536
12627
  timeoutErrorMessage,
12537
12628
  transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
12538
- config2,
12629
+ config,
12539
12630
  request
12540
12631
  ));
12541
12632
  request = null;
@@ -12566,7 +12657,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config2) {
12566
12657
  if (!request) {
12567
12658
  return;
12568
12659
  }
12569
- reject(!cancel || cancel.type ? new CanceledError$1(null, config2, request) : cancel);
12660
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
12570
12661
  request.abort();
12571
12662
  request = null;
12572
12663
  };
@@ -12577,15 +12668,15 @@ const xhrAdapter = isXHRAdapterSupported && function(config2) {
12577
12668
  }
12578
12669
  const protocol2 = parseProtocol(_config.url);
12579
12670
  if (protocol2 && platform.protocols.indexOf(protocol2) === -1) {
12580
- reject(new AxiosError$1("Unsupported protocol " + protocol2 + ":", AxiosError$1.ERR_BAD_REQUEST, config2));
12671
+ reject(new AxiosError$1("Unsupported protocol " + protocol2 + ":", AxiosError$1.ERR_BAD_REQUEST, config));
12581
12672
  return;
12582
12673
  }
12583
12674
  request.send(requestData || null);
12584
12675
  });
12585
12676
  };
12586
- const composeSignals = (signals, timeout2) => {
12677
+ const composeSignals = (signals, timeout) => {
12587
12678
  const { length } = signals = signals ? signals.filter(Boolean) : [];
12588
- if (timeout2 || length) {
12679
+ if (timeout || length) {
12589
12680
  let controller = new AbortController();
12590
12681
  let aborted;
12591
12682
  const onabort = function(reason) {
@@ -12596,10 +12687,10 @@ const composeSignals = (signals, timeout2) => {
12596
12687
  controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
12597
12688
  }
12598
12689
  };
12599
- let timer = timeout2 && setTimeout(() => {
12690
+ let timer = timeout && setTimeout(() => {
12600
12691
  timer = null;
12601
- onabort(new AxiosError$1(`timeout ${timeout2} of ms exceeded`, AxiosError$1.ETIMEDOUT));
12602
- }, timeout2);
12692
+ onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
12693
+ }, timeout);
12603
12694
  const unsubscribe = () => {
12604
12695
  if (signals) {
12605
12696
  timer && clearTimeout(timer);
@@ -12739,61 +12830,61 @@ const factory = (env) => {
12739
12830
  };
12740
12831
  isFetchSupported && (() => {
12741
12832
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
12742
- !resolvers[type] && (resolvers[type] = (res, config2) => {
12833
+ !resolvers[type] && (resolvers[type] = (res, config) => {
12743
12834
  let method = res && res[type];
12744
12835
  if (method) {
12745
12836
  return method.call(res);
12746
12837
  }
12747
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config2);
12838
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
12748
12839
  });
12749
12840
  });
12750
12841
  })();
12751
- const getBodyLength = async (body) => {
12752
- if (body == null) {
12842
+ const getBodyLength = async (body2) => {
12843
+ if (body2 == null) {
12753
12844
  return 0;
12754
12845
  }
12755
- if (utils$1.isBlob(body)) {
12756
- return body.size;
12846
+ if (utils$1.isBlob(body2)) {
12847
+ return body2.size;
12757
12848
  }
12758
- if (utils$1.isSpecCompliantForm(body)) {
12849
+ if (utils$1.isSpecCompliantForm(body2)) {
12759
12850
  const _request = new Request2(platform.origin, {
12760
12851
  method: "POST",
12761
- body
12852
+ body: body2
12762
12853
  });
12763
12854
  return (await _request.arrayBuffer()).byteLength;
12764
12855
  }
12765
- if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
12766
- return body.byteLength;
12856
+ if (utils$1.isArrayBufferView(body2) || utils$1.isArrayBuffer(body2)) {
12857
+ return body2.byteLength;
12767
12858
  }
12768
- if (utils$1.isURLSearchParams(body)) {
12769
- body = body + "";
12859
+ if (utils$1.isURLSearchParams(body2)) {
12860
+ body2 = body2 + "";
12770
12861
  }
12771
- if (utils$1.isString(body)) {
12772
- return (await encodeText(body)).byteLength;
12862
+ if (utils$1.isString(body2)) {
12863
+ return (await encodeText(body2)).byteLength;
12773
12864
  }
12774
12865
  };
12775
- const resolveBodyLength = async (headers, body) => {
12866
+ const resolveBodyLength = async (headers, body2) => {
12776
12867
  const length = utils$1.toFiniteNumber(headers.getContentLength());
12777
- return length == null ? getBodyLength(body) : length;
12868
+ return length == null ? getBodyLength(body2) : length;
12778
12869
  };
12779
- return async (config2) => {
12870
+ return async (config) => {
12780
12871
  let {
12781
12872
  url: url2,
12782
12873
  method,
12783
12874
  data,
12784
12875
  signal,
12785
12876
  cancelToken,
12786
- timeout: timeout2,
12877
+ timeout,
12787
12878
  onDownloadProgress,
12788
12879
  onUploadProgress,
12789
12880
  responseType,
12790
12881
  headers,
12791
12882
  withCredentials = "same-origin",
12792
12883
  fetchOptions
12793
- } = resolveConfig(config2);
12884
+ } = resolveConfig(config);
12794
12885
  let _fetch = envFetch || fetch;
12795
12886
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
12796
- let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout2);
12887
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
12797
12888
  let request = null;
12798
12889
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
12799
12890
  composedSignal.unsubscribe();
@@ -12853,7 +12944,7 @@ const factory = (env) => {
12853
12944
  );
12854
12945
  }
12855
12946
  responseType = responseType || "text";
12856
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config2);
12947
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
12857
12948
  !isStreamResponse && unsubscribe && unsubscribe();
12858
12949
  return await new Promise((resolve, reject) => {
12859
12950
  settle(resolve, reject, {
@@ -12861,7 +12952,7 @@ const factory = (env) => {
12861
12952
  headers: AxiosHeaders$1.from(response.headers),
12862
12953
  status: response.status,
12863
12954
  statusText: response.statusText,
12864
- config: config2,
12955
+ config,
12865
12956
  request
12866
12957
  });
12867
12958
  });
@@ -12869,19 +12960,19 @@ const factory = (env) => {
12869
12960
  unsubscribe && unsubscribe();
12870
12961
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
12871
12962
  throw Object.assign(
12872
- new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config2, request),
12963
+ new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
12873
12964
  {
12874
12965
  cause: err.cause || err
12875
12966
  }
12876
12967
  );
12877
12968
  }
12878
- throw AxiosError$1.from(err, err && err.code, config2, request);
12969
+ throw AxiosError$1.from(err, err && err.code, config, request);
12879
12970
  }
12880
12971
  };
12881
12972
  };
12882
12973
  const seedCache = /* @__PURE__ */ new Map();
12883
- const getFetch = (config2) => {
12884
- let env = config2 ? config2.env : {};
12974
+ const getFetch = (config) => {
12975
+ let env = config ? config.env : {};
12885
12976
  const { fetch: fetch2, Request: Request2, Response } = env;
12886
12977
  const seeds = [
12887
12978
  Request2,
@@ -12917,7 +13008,7 @@ utils$1.forEach(knownAdapters, (fn, value2) => {
12917
13008
  const renderReason = (reason) => `- ${reason}`;
12918
13009
  const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
12919
13010
  const adapters = {
12920
- getAdapter: (adapters2, config2) => {
13011
+ getAdapter: (adapters2, config) => {
12921
13012
  adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
12922
13013
  const { length } = adapters2;
12923
13014
  let nameOrAdapter;
@@ -12933,7 +13024,7 @@ const adapters = {
12933
13024
  throw new AxiosError$1(`Unknown adapter '${id2}'`);
12934
13025
  }
12935
13026
  }
12936
- if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config2)))) {
13027
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
12937
13028
  break;
12938
13029
  }
12939
13030
  rejectedReasons[id2 || "#" + i] = adapter;
@@ -12952,41 +13043,41 @@ const adapters = {
12952
13043
  },
12953
13044
  adapters: knownAdapters
12954
13045
  };
12955
- function throwIfCancellationRequested(config2) {
12956
- if (config2.cancelToken) {
12957
- config2.cancelToken.throwIfRequested();
13046
+ function throwIfCancellationRequested(config) {
13047
+ if (config.cancelToken) {
13048
+ config.cancelToken.throwIfRequested();
12958
13049
  }
12959
- if (config2.signal && config2.signal.aborted) {
12960
- throw new CanceledError$1(null, config2);
13050
+ if (config.signal && config.signal.aborted) {
13051
+ throw new CanceledError$1(null, config);
12961
13052
  }
12962
13053
  }
12963
- function dispatchRequest(config2) {
12964
- throwIfCancellationRequested(config2);
12965
- config2.headers = AxiosHeaders$1.from(config2.headers);
12966
- config2.data = transformData.call(
12967
- config2,
12968
- config2.transformRequest
13054
+ function dispatchRequest(config) {
13055
+ throwIfCancellationRequested(config);
13056
+ config.headers = AxiosHeaders$1.from(config.headers);
13057
+ config.data = transformData.call(
13058
+ config,
13059
+ config.transformRequest
12969
13060
  );
12970
- if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
12971
- config2.headers.setContentType("application/x-www-form-urlencoded", false);
13061
+ if (["post", "put", "patch"].indexOf(config.method) !== -1) {
13062
+ config.headers.setContentType("application/x-www-form-urlencoded", false);
12972
13063
  }
12973
- const adapter = adapters.getAdapter(config2.adapter || defaults.adapter, config2);
12974
- return adapter(config2).then(function onAdapterResolution(response) {
12975
- throwIfCancellationRequested(config2);
13064
+ const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
13065
+ return adapter(config).then(function onAdapterResolution(response) {
13066
+ throwIfCancellationRequested(config);
12976
13067
  response.data = transformData.call(
12977
- config2,
12978
- config2.transformResponse,
13068
+ config,
13069
+ config.transformResponse,
12979
13070
  response
12980
13071
  );
12981
13072
  response.headers = AxiosHeaders$1.from(response.headers);
12982
13073
  return response;
12983
13074
  }, function onAdapterRejection(reason) {
12984
13075
  if (!isCancel$1(reason)) {
12985
- throwIfCancellationRequested(config2);
13076
+ throwIfCancellationRequested(config);
12986
13077
  if (reason && reason.response) {
12987
13078
  reason.response.data = transformData.call(
12988
- config2,
12989
- config2.transformResponse,
13079
+ config,
13080
+ config.transformResponse,
12990
13081
  reason.response
12991
13082
  );
12992
13083
  reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
@@ -13054,11 +13145,11 @@ function assertOptions(options, schema, allowUnknown) {
13054
13145
  }
13055
13146
  }
13056
13147
  }
13057
- const validator$1 = {
13148
+ const validator = {
13058
13149
  assertOptions,
13059
13150
  validators: validators$1
13060
13151
  };
13061
- const validators = validator$1.validators;
13152
+ const validators = validator.validators;
13062
13153
  let Axios$1 = class Axios {
13063
13154
  constructor(instanceConfig) {
13064
13155
  this.defaults = instanceConfig || {};
@@ -13075,9 +13166,9 @@ let Axios$1 = class Axios {
13075
13166
  *
13076
13167
  * @returns {Promise} The Promise to be fulfilled
13077
13168
  */
13078
- async request(configOrUrl, config2) {
13169
+ async request(configOrUrl, config) {
13079
13170
  try {
13080
- return await this._request(configOrUrl, config2);
13171
+ return await this._request(configOrUrl, config);
13081
13172
  } catch (err) {
13082
13173
  if (err instanceof Error) {
13083
13174
  let dummy = {};
@@ -13095,17 +13186,17 @@ let Axios$1 = class Axios {
13095
13186
  throw err;
13096
13187
  }
13097
13188
  }
13098
- _request(configOrUrl, config2) {
13189
+ _request(configOrUrl, config) {
13099
13190
  if (typeof configOrUrl === "string") {
13100
- config2 = config2 || {};
13101
- config2.url = configOrUrl;
13191
+ config = config || {};
13192
+ config.url = configOrUrl;
13102
13193
  } else {
13103
- config2 = configOrUrl || {};
13194
+ config = configOrUrl || {};
13104
13195
  }
13105
- config2 = mergeConfig$1(this.defaults, config2);
13106
- const { transitional: transitional2, paramsSerializer, headers } = config2;
13196
+ config = mergeConfig$1(this.defaults, config);
13197
+ const { transitional: transitional2, paramsSerializer, headers } = config;
13107
13198
  if (transitional2 !== void 0) {
13108
- validator$1.assertOptions(transitional2, {
13199
+ validator.assertOptions(transitional2, {
13109
13200
  silentJSONParsing: validators.transitional(validators.boolean),
13110
13201
  forcedJSONParsing: validators.transitional(validators.boolean),
13111
13202
  clarifyTimeoutError: validators.transitional(validators.boolean)
@@ -13113,30 +13204,30 @@ let Axios$1 = class Axios {
13113
13204
  }
13114
13205
  if (paramsSerializer != null) {
13115
13206
  if (utils$1.isFunction(paramsSerializer)) {
13116
- config2.paramsSerializer = {
13207
+ config.paramsSerializer = {
13117
13208
  serialize: paramsSerializer
13118
13209
  };
13119
13210
  } else {
13120
- validator$1.assertOptions(paramsSerializer, {
13211
+ validator.assertOptions(paramsSerializer, {
13121
13212
  encode: validators.function,
13122
13213
  serialize: validators.function
13123
13214
  }, true);
13124
13215
  }
13125
13216
  }
13126
- if (config2.allowAbsoluteUrls !== void 0) ;
13217
+ if (config.allowAbsoluteUrls !== void 0) ;
13127
13218
  else if (this.defaults.allowAbsoluteUrls !== void 0) {
13128
- config2.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
13219
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
13129
13220
  } else {
13130
- config2.allowAbsoluteUrls = true;
13221
+ config.allowAbsoluteUrls = true;
13131
13222
  }
13132
- validator$1.assertOptions(config2, {
13223
+ validator.assertOptions(config, {
13133
13224
  baseUrl: validators.spelling("baseURL"),
13134
13225
  withXsrfToken: validators.spelling("withXSRFToken")
13135
13226
  }, true);
13136
- config2.method = (config2.method || this.defaults.method || "get").toLowerCase();
13227
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
13137
13228
  let contextHeaders = headers && utils$1.merge(
13138
13229
  headers.common,
13139
- headers[config2.method]
13230
+ headers[config.method]
13140
13231
  );
13141
13232
  headers && utils$1.forEach(
13142
13233
  ["delete", "get", "head", "post", "put", "patch", "common"],
@@ -13144,11 +13235,11 @@ let Axios$1 = class Axios {
13144
13235
  delete headers[method];
13145
13236
  }
13146
13237
  );
13147
- config2.headers = AxiosHeaders$1.concat(contextHeaders, headers);
13238
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
13148
13239
  const requestInterceptorChain = [];
13149
13240
  let synchronousRequestInterceptors = true;
13150
13241
  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
13151
- if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) {
13242
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
13152
13243
  return;
13153
13244
  }
13154
13245
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
@@ -13166,14 +13257,14 @@ let Axios$1 = class Axios {
13166
13257
  chain.unshift(...requestInterceptorChain);
13167
13258
  chain.push(...responseInterceptorChain);
13168
13259
  len = chain.length;
13169
- promise = Promise.resolve(config2);
13260
+ promise = Promise.resolve(config);
13170
13261
  while (i < len) {
13171
13262
  promise = promise.then(chain[i++], chain[i++]);
13172
13263
  }
13173
13264
  return promise;
13174
13265
  }
13175
13266
  len = requestInterceptorChain.length;
13176
- let newConfig = config2;
13267
+ let newConfig = config;
13177
13268
  while (i < len) {
13178
13269
  const onFulfilled = requestInterceptorChain[i++];
13179
13270
  const onRejected = requestInterceptorChain[i++];
@@ -13196,25 +13287,25 @@ let Axios$1 = class Axios {
13196
13287
  }
13197
13288
  return promise;
13198
13289
  }
13199
- getUri(config2) {
13200
- config2 = mergeConfig$1(this.defaults, config2);
13201
- const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);
13202
- return buildURL(fullPath, config2.params, config2.paramsSerializer);
13290
+ getUri(config) {
13291
+ config = mergeConfig$1(this.defaults, config);
13292
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
13293
+ return buildURL(fullPath, config.params, config.paramsSerializer);
13203
13294
  }
13204
13295
  };
13205
13296
  utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
13206
- Axios$1.prototype[method] = function(url2, config2) {
13207
- return this.request(mergeConfig$1(config2 || {}, {
13297
+ Axios$1.prototype[method] = function(url2, config) {
13298
+ return this.request(mergeConfig$1(config || {}, {
13208
13299
  method,
13209
13300
  url: url2,
13210
- data: (config2 || {}).data
13301
+ data: (config || {}).data
13211
13302
  }));
13212
13303
  };
13213
13304
  });
13214
13305
  utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
13215
13306
  function generateHTTPMethod(isForm) {
13216
- return function httpMethod(url2, data, config2) {
13217
- return this.request(mergeConfig$1(config2 || {}, {
13307
+ return function httpMethod(url2, data, config) {
13308
+ return this.request(mergeConfig$1(config || {}, {
13218
13309
  method,
13219
13310
  headers: isForm ? {
13220
13311
  "Content-Type": "multipart/form-data"
@@ -13256,11 +13347,11 @@ let CancelToken$1 = class CancelToken {
13256
13347
  };
13257
13348
  return promise;
13258
13349
  };
13259
- executor(function cancel(message, config2, request) {
13350
+ executor(function cancel(message, config, request) {
13260
13351
  if (token.reason) {
13261
13352
  return;
13262
13353
  }
13263
- token.reason = new CanceledError$1(message, config2, request);
13354
+ token.reason = new CanceledError$1(message, config, request);
13264
13355
  resolvePromise(token.reason);
13265
13356
  });
13266
13357
  }
@@ -13468,35 +13559,17 @@ const remainingWeightSlice = createSlice({
13468
13559
  const { setRemainingWeight, updateRemainingWeight, resetRemainingWeight } = remainingWeightSlice.actions;
13469
13560
  const remainingWeightReducer = remainingWeightSlice.reducer;
13470
13561
  const ACTION_ACCOUNT = accountActions;
13471
- const changeMode = createAsyncThunk("CHANGE_MODE", (currentMode) => {
13472
- return currentMode === Mode.LIGHT ? Mode.DARK : Mode.LIGHT;
13473
- });
13474
- const initialStateSystem = {
13475
- mode: Mode.LIGHT
13476
- };
13477
- const slice$1 = createSlice({
13478
- // Name Slice
13479
- name: "system",
13480
- initialState: initialStateSystem,
13481
- reducers: {},
13482
- extraReducers: (builder) => {
13483
- builder.addCase(changeMode.fulfilled, (state, action) => {
13484
- state.mode = action.payload;
13485
- });
13486
- }
13487
- });
13488
- const reducerSystem = slice$1.reducer;
13489
13562
  const axiosRequest = axios.create({
13490
13563
  baseURL: "https://dev.be.office.sevago.local",
13491
13564
  timeout: 2e4,
13492
13565
  headers: { "Content-Type": "application/json", "X-CSRF-TOKEN": "CSRF-Token" },
13493
13566
  withCredentials: true
13494
13567
  });
13495
- axiosRequest.interceptors.request.use(async (config2) => {
13568
+ axiosRequest.interceptors.request.use(async (config) => {
13496
13569
  const { userUnitPositionId, accessToken } = store.getState().account;
13497
- if (accessToken) config2.headers.Authorization = `Bearer ${accessToken}`;
13498
- if (userUnitPositionId) config2.headers["userUnitPositionId"] = userUnitPositionId;
13499
- return config2;
13570
+ if (accessToken) config.headers.Authorization = `Bearer ${accessToken}`;
13571
+ if (userUnitPositionId) config.headers["userUnitPositionId"] = userUnitPositionId;
13572
+ return config;
13500
13573
  });
13501
13574
  let refreshingToken = null;
13502
13575
  axiosRequest.interceptors.response.use(
@@ -15828,8 +15901,8 @@ class Socket2 extends Emitter {
15828
15901
  */
15829
15902
  _registerAckCallback(id2, ack) {
15830
15903
  var _a;
15831
- const timeout2 = (_a = this.flags.timeout) !== null && _a !== void 0 ? _a : this._opts.ackTimeout;
15832
- if (timeout2 === void 0) {
15904
+ const timeout = (_a = this.flags.timeout) !== null && _a !== void 0 ? _a : this._opts.ackTimeout;
15905
+ if (timeout === void 0) {
15833
15906
  this.acks[id2] = ack;
15834
15907
  return;
15835
15908
  }
@@ -15841,7 +15914,7 @@ class Socket2 extends Emitter {
15841
15914
  }
15842
15915
  }
15843
15916
  ack.call(this, new Error("operation has timed out"));
15844
- }, timeout2);
15917
+ }, timeout);
15845
15918
  const fn = (...args) => {
15846
15919
  this.io.clearTimeoutFn(timer);
15847
15920
  ack.apply(this, args);
@@ -16239,8 +16312,8 @@ class Socket2 extends Emitter {
16239
16312
  *
16240
16313
  * @returns self
16241
16314
  */
16242
- timeout(timeout2) {
16243
- this.flags.timeout = timeout2;
16315
+ timeout(timeout) {
16316
+ this.flags.timeout = timeout;
16244
16317
  return this;
16245
16318
  }
16246
16319
  /**
@@ -16561,12 +16634,12 @@ class Manager extends Emitter {
16561
16634
  };
16562
16635
  const errorSub = on(socket, "error", onError);
16563
16636
  if (false !== this._timeout) {
16564
- const timeout2 = this._timeout;
16637
+ const timeout = this._timeout;
16565
16638
  const timer = this.setTimeoutFn(() => {
16566
16639
  openSubDestroy();
16567
16640
  onError(new Error("timeout"));
16568
16641
  socket.close();
16569
- }, timeout2);
16642
+ }, timeout);
16570
16643
  if (this.opts.autoUnref) {
16571
16644
  timer.unref();
16572
16645
  }
@@ -16876,14 +16949,14 @@ const socketConfig = (namespace, roomId) => {
16876
16949
  sockets[namespace] = socket;
16877
16950
  return socket;
16878
16951
  };
16879
- const login$1 = async (body) => await axiosRequest.post("auth/login", body);
16880
- const logout$1 = async (body) => await axiosRequest.post("auth/logout", body);
16881
- const forgotPassword = async (body) => await axiosRequest.post("auth/forgot-password", body);
16882
- const verifyOtp = async (body) => await axiosRequest.post("auth/verify-otp", body);
16883
- const resetPassword$1 = async (body) => await axiosRequest.post("auth/reset-password", body);
16884
- const refreshToken$1 = async (body) => await axiosRequest.post("auth/refresh-token", body);
16885
- const subscribeTopic$1 = async (body) => await axiosRequest.post("auth/subscribe-topic", body);
16886
- const unsubscribeTopic$1 = async (body) => await axiosRequest.post("auth/unsubscribe-topic", body);
16952
+ const login$1 = async (body2) => await axiosRequest.post("auth/login", body2);
16953
+ const logout$1 = async (body2) => await axiosRequest.post("auth/logout", body2);
16954
+ const forgotPassword = async (body2) => await axiosRequest.post("auth/forgot-password", body2);
16955
+ const verifyOtp = async (body2) => await axiosRequest.post("auth/verify-otp", body2);
16956
+ const resetPassword$1 = async (body2) => await axiosRequest.post("auth/reset-password", body2);
16957
+ const refreshToken$1 = async (body2) => await axiosRequest.post("auth/refresh-token", body2);
16958
+ const subscribeTopic$1 = async (body2) => await axiosRequest.post("auth/subscribe-topic", body2);
16959
+ const unsubscribeTopic$1 = async (body2) => await axiosRequest.post("auth/unsubscribe-topic", body2);
16887
16960
  const authApiMethods = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16888
16961
  __proto__: null,
16889
16962
  forgotPassword,
@@ -16916,18 +16989,18 @@ var ForgotPasswordType = /* @__PURE__ */ ((ForgotPasswordType2) => {
16916
16989
  return ForgotPasswordType2;
16917
16990
  })(ForgotPasswordType || {});
16918
16991
  const authApi = authApiMethods;
16919
- const createUser = async (body) => await axiosRequest.post("user", body);
16920
- const updateUser = async (id2, body) => await axiosRequest.put("user/" + id2, body);
16921
- const updateAccount$1 = async (body) => await axiosRequest.patch("user", body);
16992
+ const createUser = async (body2) => await axiosRequest.post("user", body2);
16993
+ const updateUser = async (id2, body2) => await axiosRequest.put("user/" + id2, body2);
16994
+ const updateAccount$1 = async (body2) => await axiosRequest.patch("user", body2);
16922
16995
  const deleteUser = async (id2) => await axiosRequest.delete("user/" + id2);
16923
- const getListUser = async (body) => await axiosRequest.post("user/list", body);
16924
- const getListUserRelations = async (body) => await axiosRequest.post("user/list/relations", body);
16996
+ const getListUser = async (body2) => await axiosRequest.post("user/list", body2);
16997
+ const getListUserRelations = async (body2) => await axiosRequest.post("user/list/relations", body2);
16925
16998
  const getUser = async (id2) => await axiosRequest.get("user/" + id2);
16926
16999
  const getUserInformationHistory = async (id2) => await axiosRequest.get("user/user-history/" + id2);
16927
17000
  const getUserOrgUnitPositionById = async (userId) => await axiosRequest.get("user/user-org-unit-position/" + userId);
16928
17001
  const getUserGenerateNextUserCode = async () => await axiosRequest.get("user/generate-next-user-code");
16929
17002
  const getUserNearestManagers = async () => await axiosRequest.get(`user/nearest-managers/current`);
16930
- const getUserByOrgUnit = async (body) => await axiosRequest.post(`/org-unit/users-by-org-units`, body);
17003
+ const getUserByOrgUnit = async (body2) => await axiosRequest.post(`/org-unit/users-by-org-units`, body2);
16931
17004
  const userApiMethods = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16932
17005
  __proto__: null,
16933
17006
  createUser,
@@ -16944,9 +17017,9 @@ const userApiMethods = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
16944
17017
  updateUser
16945
17018
  }, Symbol.toStringTag, { value: "Module" }));
16946
17019
  const userApi = userApiMethods;
16947
- const updateNotification = async (body) => await axiosRequest.put("notification", body);
17020
+ const updateNotification = async (body2) => await axiosRequest.put("notification", body2);
16948
17021
  const getListNotification = async (params) => await axiosRequest.get("notification", { params });
16949
- const updateNotificationSetting = async (id2, body) => await axiosRequest.put("notification-setting/" + id2, body);
17022
+ const updateNotificationSetting = async (id2, body2) => await axiosRequest.put("notification-setting/" + id2, body2);
16950
17023
  const getListNotificationSetting = async (params) => await axiosRequest.get("notification-setting", {
16951
17024
  params
16952
17025
  });
@@ -17068,9 +17141,9 @@ const changeSidebarCount = createAsyncThunk(
17068
17141
  );
17069
17142
  const updateAccount = createAsyncThunk(
17070
17143
  "UPDATE_ACCOUNT",
17071
- async (body, { rejectWithValue, getState }) => {
17144
+ async (body2, { rejectWithValue, getState }) => {
17072
17145
  try {
17073
- await userApi.updateAccount(body);
17146
+ await userApi.updateAccount(body2);
17074
17147
  const state = getState();
17075
17148
  if (!state.account.user) {
17076
17149
  throw new Error("User not found");
@@ -17203,10 +17276,7 @@ const persistConfig = {
17203
17276
  if (!state) return Promise.resolve(void 0);
17204
17277
  state.account = { ...initialStateAccount, ...state.account };
17205
17278
  state.system = { ...initialStateSystem, ...state.system };
17206
- state.remainingWeight = {
17207
- ...initialStateRemainingWeight,
17208
- ...state.remainingWeight
17209
- };
17279
+ state.remainingWeight = { ...initialStateRemainingWeight, ...state.remainingWeight };
17210
17280
  return Promise.resolve(state);
17211
17281
  }
17212
17282
  };
@@ -17246,2060 +17316,56 @@ function composeClasses(slots, getUtilityClass, classes = void 0) {
17246
17316
  }
17247
17317
  return output;
17248
17318
  }
17249
- function useEventCallback$1(fn) {
17250
- const ref = React.useRef(fn);
17251
- useEnhancedEffect(() => {
17252
- ref.current = fn;
17253
- });
17254
- return React.useRef((...args) => (
17255
- // @ts-expect-error hide `this`
17256
- (0, ref.current)(...args)
17257
- )).current;
17258
- }
17259
- const UNINITIALIZED = {};
17260
- function useLazyRef(init, initArg) {
17261
- const ref = React.useRef(UNINITIALIZED);
17262
- if (ref.current === UNINITIALIZED) {
17263
- ref.current = init(initArg);
17264
- }
17265
- return ref;
17266
- }
17267
- const EMPTY = [];
17268
- function useOnMount(fn) {
17269
- React.useEffect(fn, EMPTY);
17270
- }
17271
- class Timeout {
17272
- static create() {
17273
- return new Timeout();
17274
- }
17275
- currentId = null;
17276
- /**
17277
- * Executes `fn` after `delay`, clearing any previously scheduled call.
17278
- */
17279
- start(delay2, fn) {
17280
- this.clear();
17281
- this.currentId = setTimeout(() => {
17282
- this.currentId = null;
17283
- fn();
17284
- }, delay2);
17319
+ function chainPropTypes(propType1, propType2) {
17320
+ if (process.env.NODE_ENV === "production") {
17321
+ return () => null;
17285
17322
  }
17286
- clear = () => {
17287
- if (this.currentId !== null) {
17288
- clearTimeout(this.currentId);
17289
- this.currentId = null;
17290
- }
17291
- };
17292
- disposeEffect = () => {
17293
- return this.clear;
17323
+ return function validate(...args) {
17324
+ return propType1(...args) || propType2(...args);
17294
17325
  };
17295
17326
  }
17296
- function useTimeout() {
17297
- const timeout2 = useLazyRef(Timeout.create).current;
17298
- useOnMount(timeout2.disposeEffect);
17299
- return timeout2;
17300
- }
17301
- function extractEventHandlers(object2, excludeKeys = []) {
17302
- if (object2 === void 0) {
17303
- return {};
17304
- }
17327
+ const memoTheme = unstable_memoTheme;
17328
+ function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
17305
17329
  const result = {};
17306
- Object.keys(object2).filter((prop) => prop.match(/^on[A-Z]/) && typeof object2[prop] === "function" && !excludeKeys.includes(prop)).forEach((prop) => {
17307
- result[prop] = object2[prop];
17330
+ slots.forEach((slot) => {
17331
+ result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
17308
17332
  });
17309
17333
  return result;
17310
17334
  }
17311
- function useSnackbar$1(parameters = {}) {
17312
- const {
17313
- autoHideDuration = null,
17314
- disableWindowBlurListener = false,
17315
- onClose,
17316
- open,
17317
- resumeHideDuration
17318
- } = parameters;
17319
- const timerAutoHide = useTimeout();
17320
- React.useEffect(() => {
17321
- if (!open) {
17322
- return void 0;
17335
+ var SnackbarType = /* @__PURE__ */ ((SnackbarType2) => {
17336
+ SnackbarType2["INFO"] = "info";
17337
+ SnackbarType2["SUCCESS"] = "success";
17338
+ SnackbarType2["ERROR"] = "error";
17339
+ SnackbarType2["WARNING"] = "warning";
17340
+ return SnackbarType2;
17341
+ })(SnackbarType || {});
17342
+ const SnackbarContext = createContext(void 0);
17343
+ const useSnackbar = () => {
17344
+ const context = useContext(SnackbarContext);
17345
+ if (!context) throw new Error("useSnackbar must be used within a SnackbarProvider");
17346
+ return context;
17347
+ };
17348
+ const AuthLayout = ({ children }) => {
17349
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
17350
+ Stack$1,
17351
+ {
17352
+ sx: {
17353
+ height: "100vh",
17354
+ width: "100%",
17355
+ backgroundImage: `url(/images/login.jpg)`,
17356
+ backgroundSize: "cover",
17357
+ backgroundPosition: "center"
17358
+ },
17359
+ children
17323
17360
  }
17324
- function handleKeyDown(nativeEvent) {
17325
- if (!nativeEvent.defaultPrevented) {
17326
- if (nativeEvent.key === "Escape") {
17327
- onClose?.(nativeEvent, "escapeKeyDown");
17328
- }
17329
- }
17330
- }
17331
- document.addEventListener("keydown", handleKeyDown);
17332
- return () => {
17333
- document.removeEventListener("keydown", handleKeyDown);
17334
- };
17335
- }, [open, onClose]);
17336
- const handleClose = useEventCallback$1((event, reason) => {
17337
- onClose?.(event, reason);
17338
- });
17339
- const setAutoHideTimer = useEventCallback$1((autoHideDurationParam) => {
17340
- if (!onClose || autoHideDurationParam == null) {
17341
- return;
17342
- }
17343
- timerAutoHide.start(autoHideDurationParam, () => {
17344
- handleClose(null, "timeout");
17345
- });
17346
- });
17347
- React.useEffect(() => {
17348
- if (open) {
17349
- setAutoHideTimer(autoHideDuration);
17350
- }
17351
- return timerAutoHide.clear;
17352
- }, [open, autoHideDuration, setAutoHideTimer, timerAutoHide]);
17353
- const handleClickAway = (event) => {
17354
- onClose?.(event, "clickaway");
17355
- };
17356
- const handlePause = timerAutoHide.clear;
17357
- const handleResume = React.useCallback(() => {
17358
- if (autoHideDuration != null) {
17359
- setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);
17360
- }
17361
- }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);
17362
- const createHandleBlur = (otherHandlers) => (event) => {
17363
- const onBlurCallback = otherHandlers.onBlur;
17364
- onBlurCallback?.(event);
17365
- handleResume();
17366
- };
17367
- const createHandleFocus = (otherHandlers) => (event) => {
17368
- const onFocusCallback = otherHandlers.onFocus;
17369
- onFocusCallback?.(event);
17370
- handlePause();
17371
- };
17372
- const createMouseEnter = (otherHandlers) => (event) => {
17373
- const onMouseEnterCallback = otherHandlers.onMouseEnter;
17374
- onMouseEnterCallback?.(event);
17375
- handlePause();
17376
- };
17377
- const createMouseLeave = (otherHandlers) => (event) => {
17378
- const onMouseLeaveCallback = otherHandlers.onMouseLeave;
17379
- onMouseLeaveCallback?.(event);
17380
- handleResume();
17381
- };
17382
- React.useEffect(() => {
17383
- if (!disableWindowBlurListener && open) {
17384
- window.addEventListener("focus", handleResume);
17385
- window.addEventListener("blur", handlePause);
17386
- return () => {
17387
- window.removeEventListener("focus", handleResume);
17388
- window.removeEventListener("blur", handlePause);
17389
- };
17390
- }
17391
- return void 0;
17392
- }, [disableWindowBlurListener, open, handleResume, handlePause]);
17393
- const getRootProps = (externalProps = {}) => {
17394
- const externalEventHandlers = {
17395
- ...extractEventHandlers(parameters),
17396
- ...extractEventHandlers(externalProps)
17397
- };
17398
- return {
17399
- // ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
17400
- // See https://github.com/mui/material-ui/issues/29080
17401
- role: "presentation",
17402
- ...externalProps,
17403
- ...externalEventHandlers,
17404
- onBlur: createHandleBlur(externalEventHandlers),
17405
- onFocus: createHandleFocus(externalEventHandlers),
17406
- onMouseEnter: createMouseEnter(externalEventHandlers),
17407
- onMouseLeave: createMouseLeave(externalEventHandlers)
17408
- };
17409
- };
17410
- return {
17411
- getRootProps,
17412
- onClickAway: handleClickAway
17413
- };
17414
- }
17415
- function ownerDocument(node) {
17416
- return node && node.ownerDocument || document;
17417
- }
17418
- function useForkRef(...refs) {
17419
- const cleanupRef = React.useRef(void 0);
17420
- const refEffect = React.useCallback((instance) => {
17421
- const cleanups = refs.map((ref) => {
17422
- if (ref == null) {
17423
- return null;
17424
- }
17425
- if (typeof ref === "function") {
17426
- const refCallback = ref;
17427
- const refCleanup = refCallback(instance);
17428
- return typeof refCleanup === "function" ? refCleanup : () => {
17429
- refCallback(null);
17430
- };
17431
- }
17432
- ref.current = instance;
17433
- return () => {
17434
- ref.current = null;
17435
- };
17436
- });
17437
- return () => {
17438
- cleanups.forEach((refCleanup) => refCleanup?.());
17439
- };
17440
- }, refs);
17441
- return React.useMemo(() => {
17442
- if (refs.every((ref) => ref == null)) {
17443
- return null;
17444
- }
17445
- return (value2) => {
17446
- if (cleanupRef.current) {
17447
- cleanupRef.current();
17448
- cleanupRef.current = void 0;
17449
- }
17450
- if (value2 != null) {
17451
- cleanupRef.current = refEffect(value2);
17452
- }
17453
- };
17454
- }, refs);
17455
- }
17456
- function chainPropTypes(propType1, propType2) {
17457
- if (process.env.NODE_ENV === "production") {
17458
- return () => null;
17459
- }
17460
- return function validate(...args) {
17461
- return propType1(...args) || propType2(...args);
17462
- };
17463
- }
17464
- function isClassComponent(elementType) {
17465
- const {
17466
- prototype: prototype2 = {}
17467
- } = elementType;
17468
- return Boolean(prototype2.isReactComponent);
17469
- }
17470
- function acceptingRef(props, propName, componentName, location2, propFullName) {
17471
- const element = props[propName];
17472
- const safePropName = propFullName || propName;
17473
- if (element == null || // When server-side rendering React doesn't warn either.
17474
- // This is not an accurate check for SSR.
17475
- // This is only in place for Emotion compat.
17476
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
17477
- typeof window === "undefined") {
17478
- return null;
17479
- }
17480
- let warningHint;
17481
- const elementType = element.type;
17482
- if (typeof elementType === "function" && !isClassComponent(elementType)) {
17483
- warningHint = "Did you accidentally use a plain function component for an element instead?";
17484
- }
17485
- if (warningHint !== void 0) {
17486
- return new Error(`Invalid ${location2} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element that can hold a ref. ${warningHint} For more information see https://mui.com/r/caveat-with-refs-guide`);
17487
- }
17488
- return null;
17489
- }
17490
- const elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);
17491
- elementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);
17492
- function getReactElementRef(element) {
17493
- if (parseInt(React.version, 10) >= 19) {
17494
- return element?.props?.ref || null;
17495
- }
17496
- return element?.ref || null;
17497
- }
17498
- function mapEventPropToEvent(eventProp) {
17499
- return eventProp.substring(2).toLowerCase();
17500
- }
17501
- function clickedRootScrollbar(event, doc) {
17502
- return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;
17503
- }
17504
- function ClickAwayListener(props) {
17505
- const {
17506
- children,
17507
- disableReactTree = false,
17508
- mouseEvent = "onClick",
17509
- onClickAway,
17510
- touchEvent = "onTouchEnd"
17511
- } = props;
17512
- const movedRef = React.useRef(false);
17513
- const nodeRef = React.useRef(null);
17514
- const activatedRef = React.useRef(false);
17515
- const syntheticEventRef = React.useRef(false);
17516
- React.useEffect(() => {
17517
- setTimeout(() => {
17518
- activatedRef.current = true;
17519
- }, 0);
17520
- return () => {
17521
- activatedRef.current = false;
17522
- };
17523
- }, []);
17524
- const handleRef = useForkRef(getReactElementRef(children), nodeRef);
17525
- const handleClickAway = useEventCallback$1((event) => {
17526
- const insideReactTree = syntheticEventRef.current;
17527
- syntheticEventRef.current = false;
17528
- const doc = ownerDocument(nodeRef.current);
17529
- if (!activatedRef.current || !nodeRef.current || "clientX" in event && clickedRootScrollbar(event, doc)) {
17530
- return;
17531
- }
17532
- if (movedRef.current) {
17533
- movedRef.current = false;
17534
- return;
17535
- }
17536
- let insideDOM;
17537
- if (event.composedPath) {
17538
- insideDOM = event.composedPath().includes(nodeRef.current);
17539
- } else {
17540
- insideDOM = !doc.documentElement.contains(
17541
- // @ts-expect-error returns `false` as intended when not dispatched from a Node
17542
- event.target
17543
- ) || nodeRef.current.contains(
17544
- // @ts-expect-error returns `false` as intended when not dispatched from a Node
17545
- event.target
17546
- );
17547
- }
17548
- if (!insideDOM && (disableReactTree || !insideReactTree)) {
17549
- onClickAway(event);
17550
- }
17551
- });
17552
- const createHandleSynthetic = (handlerName) => (event) => {
17553
- syntheticEventRef.current = true;
17554
- const childrenPropsHandler = children.props[handlerName];
17555
- if (childrenPropsHandler) {
17556
- childrenPropsHandler(event);
17557
- }
17558
- };
17559
- const childrenProps = {
17560
- ref: handleRef
17561
- };
17562
- if (touchEvent !== false) {
17563
- childrenProps[touchEvent] = createHandleSynthetic(touchEvent);
17564
- }
17565
- React.useEffect(() => {
17566
- if (touchEvent !== false) {
17567
- const mappedTouchEvent = mapEventPropToEvent(touchEvent);
17568
- const doc = ownerDocument(nodeRef.current);
17569
- const handleTouchMove = () => {
17570
- movedRef.current = true;
17571
- };
17572
- doc.addEventListener(mappedTouchEvent, handleClickAway);
17573
- doc.addEventListener("touchmove", handleTouchMove);
17574
- return () => {
17575
- doc.removeEventListener(mappedTouchEvent, handleClickAway);
17576
- doc.removeEventListener("touchmove", handleTouchMove);
17577
- };
17578
- }
17579
- return void 0;
17580
- }, [handleClickAway, touchEvent]);
17581
- if (mouseEvent !== false) {
17582
- childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);
17583
- }
17584
- React.useEffect(() => {
17585
- if (mouseEvent !== false) {
17586
- const mappedMouseEvent = mapEventPropToEvent(mouseEvent);
17587
- const doc = ownerDocument(nodeRef.current);
17588
- doc.addEventListener(mappedMouseEvent, handleClickAway);
17589
- return () => {
17590
- doc.removeEventListener(mappedMouseEvent, handleClickAway);
17591
- };
17592
- }
17593
- return void 0;
17594
- }, [handleClickAway, mouseEvent]);
17595
- return /* @__PURE__ */ React.cloneElement(children, childrenProps);
17596
- }
17597
- process.env.NODE_ENV !== "production" ? ClickAwayListener.propTypes = {
17598
- // ┌────────────────────────────── Warning ──────────────────────────────┐
17599
- // │ These PropTypes are generated from the TypeScript type definitions. │
17600
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
17601
- // └─────────────────────────────────────────────────────────────────────┘
17602
- /**
17603
- * The wrapped element.
17604
- */
17605
- children: elementAcceptingRef.isRequired,
17606
- /**
17607
- * If `true`, the React tree is ignored and only the DOM tree is considered.
17608
- * This prop changes how portaled elements are handled.
17609
- * @default false
17610
- */
17611
- disableReactTree: PropTypes.bool,
17612
- /**
17613
- * The mouse event to listen to. You can disable the listener by providing `false`.
17614
- * @default 'onClick'
17615
- */
17616
- mouseEvent: PropTypes.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", false]),
17617
- /**
17618
- * Callback fired when a "click away" event is detected.
17619
- */
17620
- onClickAway: PropTypes.func.isRequired,
17621
- /**
17622
- * The touch event to listen to. You can disable the listener by providing `false`.
17623
- * @default 'onTouchEnd'
17624
- */
17625
- touchEvent: PropTypes.oneOf(["onTouchEnd", "onTouchStart", false])
17626
- } : void 0;
17627
- if (process.env.NODE_ENV !== "production") {
17628
- ClickAwayListener["propTypes"] = exactProp(ClickAwayListener.propTypes);
17629
- }
17630
- const memoTheme = unstable_memoTheme;
17631
- function _objectWithoutPropertiesLoose$1(r2, e) {
17632
- if (null == r2) return {};
17633
- var t = {};
17634
- for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
17635
- if (-1 !== e.indexOf(n)) continue;
17636
- t[n] = r2[n];
17637
- }
17638
- return t;
17639
- }
17640
- function _setPrototypeOf(t, e) {
17641
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
17642
- return t2.__proto__ = e2, t2;
17643
- }, _setPrototypeOf(t, e);
17644
- }
17645
- function _inheritsLoose(t, o) {
17646
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
17647
- }
17648
- const config = {
17649
- disabled: false
17650
- };
17651
- var timeoutsShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
17652
- enter: PropTypes.number,
17653
- exit: PropTypes.number,
17654
- appear: PropTypes.number
17655
- }).isRequired]) : null;
17656
- process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
17657
- enter: PropTypes.string,
17658
- exit: PropTypes.string,
17659
- active: PropTypes.string
17660
- }), PropTypes.shape({
17661
- enter: PropTypes.string,
17662
- enterDone: PropTypes.string,
17663
- enterActive: PropTypes.string,
17664
- exit: PropTypes.string,
17665
- exitDone: PropTypes.string,
17666
- exitActive: PropTypes.string
17667
- })]) : null;
17668
- const TransitionGroupContext = React__default.createContext(null);
17669
- var forceReflow = function forceReflow2(node) {
17670
- return node.scrollTop;
17671
- };
17672
- var UNMOUNTED = "unmounted";
17673
- var EXITED = "exited";
17674
- var ENTERING = "entering";
17675
- var ENTERED = "entered";
17676
- var EXITING = "exiting";
17677
- var Transition = /* @__PURE__ */ (function(_React$Component) {
17678
- _inheritsLoose(Transition2, _React$Component);
17679
- function Transition2(props, context) {
17680
- var _this;
17681
- _this = _React$Component.call(this, props, context) || this;
17682
- var parentGroup = context;
17683
- var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
17684
- var initialStatus;
17685
- _this.appearStatus = null;
17686
- if (props.in) {
17687
- if (appear) {
17688
- initialStatus = EXITED;
17689
- _this.appearStatus = ENTERING;
17690
- } else {
17691
- initialStatus = ENTERED;
17692
- }
17693
- } else {
17694
- if (props.unmountOnExit || props.mountOnEnter) {
17695
- initialStatus = UNMOUNTED;
17696
- } else {
17697
- initialStatus = EXITED;
17698
- }
17699
- }
17700
- _this.state = {
17701
- status: initialStatus
17702
- };
17703
- _this.nextCallback = null;
17704
- return _this;
17705
- }
17706
- Transition2.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
17707
- var nextIn = _ref.in;
17708
- if (nextIn && prevState.status === UNMOUNTED) {
17709
- return {
17710
- status: EXITED
17711
- };
17712
- }
17713
- return null;
17714
- };
17715
- var _proto = Transition2.prototype;
17716
- _proto.componentDidMount = function componentDidMount() {
17717
- this.updateStatus(true, this.appearStatus);
17718
- };
17719
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
17720
- var nextStatus = null;
17721
- if (prevProps !== this.props) {
17722
- var status = this.state.status;
17723
- if (this.props.in) {
17724
- if (status !== ENTERING && status !== ENTERED) {
17725
- nextStatus = ENTERING;
17726
- }
17727
- } else {
17728
- if (status === ENTERING || status === ENTERED) {
17729
- nextStatus = EXITING;
17730
- }
17731
- }
17732
- }
17733
- this.updateStatus(false, nextStatus);
17734
- };
17735
- _proto.componentWillUnmount = function componentWillUnmount() {
17736
- this.cancelNextCallback();
17737
- };
17738
- _proto.getTimeouts = function getTimeouts() {
17739
- var timeout2 = this.props.timeout;
17740
- var exit, enter, appear;
17741
- exit = enter = appear = timeout2;
17742
- if (timeout2 != null && typeof timeout2 !== "number") {
17743
- exit = timeout2.exit;
17744
- enter = timeout2.enter;
17745
- appear = timeout2.appear !== void 0 ? timeout2.appear : enter;
17746
- }
17747
- return {
17748
- exit,
17749
- enter,
17750
- appear
17751
- };
17752
- };
17753
- _proto.updateStatus = function updateStatus(mounting, nextStatus) {
17754
- if (mounting === void 0) {
17755
- mounting = false;
17756
- }
17757
- if (nextStatus !== null) {
17758
- this.cancelNextCallback();
17759
- if (nextStatus === ENTERING) {
17760
- if (this.props.unmountOnExit || this.props.mountOnEnter) {
17761
- var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
17762
- if (node) forceReflow(node);
17763
- }
17764
- this.performEnter(mounting);
17765
- } else {
17766
- this.performExit();
17767
- }
17768
- } else if (this.props.unmountOnExit && this.state.status === EXITED) {
17769
- this.setState({
17770
- status: UNMOUNTED
17771
- });
17772
- }
17773
- };
17774
- _proto.performEnter = function performEnter(mounting) {
17775
- var _this2 = this;
17776
- var enter = this.props.enter;
17777
- var appearing = this.context ? this.context.isMounting : mounting;
17778
- var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
17779
- var timeouts = this.getTimeouts();
17780
- var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
17781
- if (!mounting && !enter || config.disabled) {
17782
- this.safeSetState({
17783
- status: ENTERED
17784
- }, function() {
17785
- _this2.props.onEntered(maybeNode);
17786
- });
17787
- return;
17788
- }
17789
- this.props.onEnter(maybeNode, maybeAppearing);
17790
- this.safeSetState({
17791
- status: ENTERING
17792
- }, function() {
17793
- _this2.props.onEntering(maybeNode, maybeAppearing);
17794
- _this2.onTransitionEnd(enterTimeout, function() {
17795
- _this2.safeSetState({
17796
- status: ENTERED
17797
- }, function() {
17798
- _this2.props.onEntered(maybeNode, maybeAppearing);
17799
- });
17800
- });
17801
- });
17802
- };
17803
- _proto.performExit = function performExit() {
17804
- var _this3 = this;
17805
- var exit = this.props.exit;
17806
- var timeouts = this.getTimeouts();
17807
- var maybeNode = this.props.nodeRef ? void 0 : ReactDOM.findDOMNode(this);
17808
- if (!exit || config.disabled) {
17809
- this.safeSetState({
17810
- status: EXITED
17811
- }, function() {
17812
- _this3.props.onExited(maybeNode);
17813
- });
17814
- return;
17815
- }
17816
- this.props.onExit(maybeNode);
17817
- this.safeSetState({
17818
- status: EXITING
17819
- }, function() {
17820
- _this3.props.onExiting(maybeNode);
17821
- _this3.onTransitionEnd(timeouts.exit, function() {
17822
- _this3.safeSetState({
17823
- status: EXITED
17824
- }, function() {
17825
- _this3.props.onExited(maybeNode);
17826
- });
17827
- });
17828
- });
17829
- };
17830
- _proto.cancelNextCallback = function cancelNextCallback() {
17831
- if (this.nextCallback !== null) {
17832
- this.nextCallback.cancel();
17833
- this.nextCallback = null;
17834
- }
17835
- };
17836
- _proto.safeSetState = function safeSetState(nextState, callback) {
17837
- callback = this.setNextCallback(callback);
17838
- this.setState(nextState, callback);
17839
- };
17840
- _proto.setNextCallback = function setNextCallback(callback) {
17841
- var _this4 = this;
17842
- var active = true;
17843
- this.nextCallback = function(event) {
17844
- if (active) {
17845
- active = false;
17846
- _this4.nextCallback = null;
17847
- callback(event);
17848
- }
17849
- };
17850
- this.nextCallback.cancel = function() {
17851
- active = false;
17852
- };
17853
- return this.nextCallback;
17854
- };
17855
- _proto.onTransitionEnd = function onTransitionEnd(timeout2, handler) {
17856
- this.setNextCallback(handler);
17857
- var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
17858
- var doesNotHaveTimeoutOrListener = timeout2 == null && !this.props.addEndListener;
17859
- if (!node || doesNotHaveTimeoutOrListener) {
17860
- setTimeout(this.nextCallback, 0);
17861
- return;
17862
- }
17863
- if (this.props.addEndListener) {
17864
- var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback], maybeNode = _ref3[0], maybeNextCallback = _ref3[1];
17865
- this.props.addEndListener(maybeNode, maybeNextCallback);
17866
- }
17867
- if (timeout2 != null) {
17868
- setTimeout(this.nextCallback, timeout2);
17869
- }
17870
- };
17871
- _proto.render = function render() {
17872
- var status = this.state.status;
17873
- if (status === UNMOUNTED) {
17874
- return null;
17875
- }
17876
- var _this$props = this.props, children = _this$props.children;
17877
- _this$props.in;
17878
- _this$props.mountOnEnter;
17879
- _this$props.unmountOnExit;
17880
- _this$props.appear;
17881
- _this$props.enter;
17882
- _this$props.exit;
17883
- _this$props.timeout;
17884
- _this$props.addEndListener;
17885
- _this$props.onEnter;
17886
- _this$props.onEntering;
17887
- _this$props.onEntered;
17888
- _this$props.onExit;
17889
- _this$props.onExiting;
17890
- _this$props.onExited;
17891
- _this$props.nodeRef;
17892
- var childProps = _objectWithoutPropertiesLoose$1(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
17893
- return (
17894
- // allows for nested Transitions
17895
- /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
17896
- value: null
17897
- }, typeof children === "function" ? children(status, childProps) : React__default.cloneElement(React__default.Children.only(children), childProps))
17898
- );
17899
- };
17900
- return Transition2;
17901
- })(React__default.Component);
17902
- Transition.contextType = TransitionGroupContext;
17903
- Transition.propTypes = process.env.NODE_ENV !== "production" ? {
17904
- /**
17905
- * A React reference to DOM element that need to transition:
17906
- * https://stackoverflow.com/a/51127130/4671932
17907
- *
17908
- * - When `nodeRef` prop is used, `node` is not passed to callback functions
17909
- * (e.g. `onEnter`) because user already has direct access to the node.
17910
- * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
17911
- * `nodeRef` need to be provided to `Transition` with changed `key` prop
17912
- * (see
17913
- * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
17914
- */
17915
- nodeRef: PropTypes.shape({
17916
- current: typeof Element === "undefined" ? PropTypes.any : function(propValue, key, componentName, location2, propFullName, secret) {
17917
- var value2 = propValue[key];
17918
- return PropTypes.instanceOf(value2 && "ownerDocument" in value2 ? value2.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location2, propFullName, secret);
17919
- }
17920
- }),
17921
- /**
17922
- * A `function` child can be used instead of a React element. This function is
17923
- * called with the current transition status (`'entering'`, `'entered'`,
17924
- * `'exiting'`, `'exited'`), which can be used to apply context
17925
- * specific props to a component.
17926
- *
17927
- * ```jsx
17928
- * <Transition in={this.state.in} timeout={150}>
17929
- * {state => (
17930
- * <MyComponent className={`fade fade-${state}`} />
17931
- * )}
17932
- * </Transition>
17933
- * ```
17934
- */
17935
- children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
17936
- /**
17937
- * Show the component; triggers the enter or exit states
17938
- */
17939
- in: PropTypes.bool,
17940
- /**
17941
- * By default the child component is mounted immediately along with
17942
- * the parent `Transition` component. If you want to "lazy mount" the component on the
17943
- * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
17944
- * mounted, even on "exited", unless you also specify `unmountOnExit`.
17945
- */
17946
- mountOnEnter: PropTypes.bool,
17947
- /**
17948
- * By default the child component stays mounted after it reaches the `'exited'` state.
17949
- * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
17950
- */
17951
- unmountOnExit: PropTypes.bool,
17952
- /**
17953
- * By default the child component does not perform the enter transition when
17954
- * it first mounts, regardless of the value of `in`. If you want this
17955
- * behavior, set both `appear` and `in` to `true`.
17956
- *
17957
- * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
17958
- * > only adds an additional enter transition. However, in the
17959
- * > `<CSSTransition>` component that first enter transition does result in
17960
- * > additional `.appear-*` classes, that way you can choose to style it
17961
- * > differently.
17962
- */
17963
- appear: PropTypes.bool,
17964
- /**
17965
- * Enable or disable enter transitions.
17966
- */
17967
- enter: PropTypes.bool,
17968
- /**
17969
- * Enable or disable exit transitions.
17970
- */
17971
- exit: PropTypes.bool,
17972
- /**
17973
- * The duration of the transition, in milliseconds.
17974
- * Required unless `addEndListener` is provided.
17975
- *
17976
- * You may specify a single timeout for all transitions:
17977
- *
17978
- * ```jsx
17979
- * timeout={500}
17980
- * ```
17981
- *
17982
- * or individually:
17983
- *
17984
- * ```jsx
17985
- * timeout={{
17986
- * appear: 500,
17987
- * enter: 300,
17988
- * exit: 500,
17989
- * }}
17990
- * ```
17991
- *
17992
- * - `appear` defaults to the value of `enter`
17993
- * - `enter` defaults to `0`
17994
- * - `exit` defaults to `0`
17995
- *
17996
- * @type {number | { enter?: number, exit?: number, appear?: number }}
17997
- */
17998
- timeout: function timeout(props) {
17999
- var pt = timeoutsShape;
18000
- if (!props.addEndListener) pt = pt.isRequired;
18001
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
18002
- args[_key - 1] = arguments[_key];
18003
- }
18004
- return pt.apply(void 0, [props].concat(args));
18005
- },
18006
- /**
18007
- * Add a custom transition end trigger. Called with the transitioning
18008
- * DOM node and a `done` callback. Allows for more fine grained transition end
18009
- * logic. Timeouts are still used as a fallback if provided.
18010
- *
18011
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18012
- *
18013
- * ```jsx
18014
- * addEndListener={(node, done) => {
18015
- * // use the css transitionend event to mark the finish of a transition
18016
- * node.addEventListener('transitionend', done, false);
18017
- * }}
18018
- * ```
18019
- */
18020
- addEndListener: PropTypes.func,
18021
- /**
18022
- * Callback fired before the "entering" status is applied. An extra parameter
18023
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
18024
- *
18025
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18026
- *
18027
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
18028
- */
18029
- onEnter: PropTypes.func,
18030
- /**
18031
- * Callback fired after the "entering" status is applied. An extra parameter
18032
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
18033
- *
18034
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18035
- *
18036
- * @type Function(node: HtmlElement, isAppearing: bool)
18037
- */
18038
- onEntering: PropTypes.func,
18039
- /**
18040
- * Callback fired after the "entered" status is applied. An extra parameter
18041
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
18042
- *
18043
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18044
- *
18045
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
18046
- */
18047
- onEntered: PropTypes.func,
18048
- /**
18049
- * Callback fired before the "exiting" status is applied.
18050
- *
18051
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18052
- *
18053
- * @type Function(node: HtmlElement) -> void
18054
- */
18055
- onExit: PropTypes.func,
18056
- /**
18057
- * Callback fired after the "exiting" status is applied.
18058
- *
18059
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18060
- *
18061
- * @type Function(node: HtmlElement) -> void
18062
- */
18063
- onExiting: PropTypes.func,
18064
- /**
18065
- * Callback fired after the "exited" status is applied.
18066
- *
18067
- * **Note**: when `nodeRef` prop is passed, `node` is not passed
18068
- *
18069
- * @type Function(node: HtmlElement) -> void
18070
- */
18071
- onExited: PropTypes.func
18072
- } : {};
18073
- function noop$1() {
18074
- }
18075
- Transition.defaultProps = {
18076
- in: false,
18077
- mountOnEnter: false,
18078
- unmountOnExit: false,
18079
- appear: false,
18080
- enter: true,
18081
- exit: true,
18082
- onEnter: noop$1,
18083
- onEntering: noop$1,
18084
- onEntered: noop$1,
18085
- onExit: noop$1,
18086
- onExiting: noop$1,
18087
- onExited: noop$1
18088
- };
18089
- Transition.UNMOUNTED = UNMOUNTED;
18090
- Transition.EXITED = EXITED;
18091
- Transition.ENTERING = ENTERING;
18092
- Transition.ENTERED = ENTERED;
18093
- Transition.EXITING = EXITING;
18094
- const reflow = (node) => node.scrollTop;
18095
- function getTransitionProps(props, options) {
18096
- const {
18097
- timeout: timeout2,
18098
- easing: easing2,
18099
- style: style2 = {}
18100
- } = props;
18101
- return {
18102
- duration: style2.transitionDuration ?? (typeof timeout2 === "number" ? timeout2 : timeout2[options.mode] || 0),
18103
- easing: style2.transitionTimingFunction ?? (typeof easing2 === "object" ? easing2[options.mode] : easing2),
18104
- delay: style2.transitionDelay
18105
- };
18106
- }
18107
- function getScale(value2) {
18108
- return `scale(${value2}, ${value2 ** 2})`;
18109
- }
18110
- const styles = {
18111
- entering: {
18112
- opacity: 1,
18113
- transform: getScale(1)
18114
- },
18115
- entered: {
18116
- opacity: 1,
18117
- transform: "none"
18118
- }
18119
- };
18120
- const isWebKit154 = typeof navigator !== "undefined" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent);
18121
- const Grow = /* @__PURE__ */ React.forwardRef(function Grow2(props, ref) {
18122
- const {
18123
- addEndListener,
18124
- appear = true,
18125
- children,
18126
- easing: easing2,
18127
- in: inProp,
18128
- onEnter,
18129
- onEntered,
18130
- onEntering,
18131
- onExit,
18132
- onExited,
18133
- onExiting,
18134
- style: style2,
18135
- timeout: timeout2 = "auto",
18136
- // eslint-disable-next-line react/prop-types
18137
- TransitionComponent = Transition,
18138
- ...other
18139
- } = props;
18140
- const timer = useTimeout();
18141
- const autoTimeout = React.useRef();
18142
- const theme = useTheme();
18143
- const nodeRef = React.useRef(null);
18144
- const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
18145
- const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
18146
- if (callback) {
18147
- const node = nodeRef.current;
18148
- if (maybeIsAppearing === void 0) {
18149
- callback(node);
18150
- } else {
18151
- callback(node, maybeIsAppearing);
18152
- }
18153
- }
18154
- };
18155
- const handleEntering = normalizedTransitionCallback(onEntering);
18156
- const handleEnter = normalizedTransitionCallback((node, isAppearing) => {
18157
- reflow(node);
18158
- const {
18159
- duration: transitionDuration,
18160
- delay: delay2,
18161
- easing: transitionTimingFunction
18162
- } = getTransitionProps({
18163
- style: style2,
18164
- timeout: timeout2,
18165
- easing: easing2
18166
- }, {
18167
- mode: "enter"
18168
- });
18169
- let duration2;
18170
- if (timeout2 === "auto") {
18171
- duration2 = theme.transitions.getAutoHeightDuration(node.clientHeight);
18172
- autoTimeout.current = duration2;
18173
- } else {
18174
- duration2 = transitionDuration;
18175
- }
18176
- node.style.transition = [theme.transitions.create("opacity", {
18177
- duration: duration2,
18178
- delay: delay2
18179
- }), theme.transitions.create("transform", {
18180
- duration: isWebKit154 ? duration2 : duration2 * 0.666,
18181
- delay: delay2,
18182
- easing: transitionTimingFunction
18183
- })].join(",");
18184
- if (onEnter) {
18185
- onEnter(node, isAppearing);
18186
- }
18187
- });
18188
- const handleEntered = normalizedTransitionCallback(onEntered);
18189
- const handleExiting = normalizedTransitionCallback(onExiting);
18190
- const handleExit = normalizedTransitionCallback((node) => {
18191
- const {
18192
- duration: transitionDuration,
18193
- delay: delay2,
18194
- easing: transitionTimingFunction
18195
- } = getTransitionProps({
18196
- style: style2,
18197
- timeout: timeout2,
18198
- easing: easing2
18199
- }, {
18200
- mode: "exit"
18201
- });
18202
- let duration2;
18203
- if (timeout2 === "auto") {
18204
- duration2 = theme.transitions.getAutoHeightDuration(node.clientHeight);
18205
- autoTimeout.current = duration2;
18206
- } else {
18207
- duration2 = transitionDuration;
18208
- }
18209
- node.style.transition = [theme.transitions.create("opacity", {
18210
- duration: duration2,
18211
- delay: delay2
18212
- }), theme.transitions.create("transform", {
18213
- duration: isWebKit154 ? duration2 : duration2 * 0.666,
18214
- delay: isWebKit154 ? delay2 : delay2 || duration2 * 0.333,
18215
- easing: transitionTimingFunction
18216
- })].join(",");
18217
- node.style.opacity = 0;
18218
- node.style.transform = getScale(0.75);
18219
- if (onExit) {
18220
- onExit(node);
18221
- }
18222
- });
18223
- const handleExited = normalizedTransitionCallback(onExited);
18224
- const handleAddEndListener = (next) => {
18225
- if (timeout2 === "auto") {
18226
- timer.start(autoTimeout.current || 0, next);
18227
- }
18228
- if (addEndListener) {
18229
- addEndListener(nodeRef.current, next);
18230
- }
18231
- };
18232
- return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, {
18233
- appear,
18234
- in: inProp,
18235
- nodeRef,
18236
- onEnter: handleEnter,
18237
- onEntered: handleEntered,
18238
- onEntering: handleEntering,
18239
- onExit: handleExit,
18240
- onExited: handleExited,
18241
- onExiting: handleExiting,
18242
- addEndListener: handleAddEndListener,
18243
- timeout: timeout2 === "auto" ? null : timeout2,
18244
- ...other,
18245
- children: (state, {
18246
- ownerState,
18247
- ...restChildProps
18248
- }) => {
18249
- return /* @__PURE__ */ React.cloneElement(children, {
18250
- style: {
18251
- opacity: 0,
18252
- transform: getScale(0.75),
18253
- visibility: state === "exited" && !inProp ? "hidden" : void 0,
18254
- ...styles[state],
18255
- ...style2,
18256
- ...children.props.style
18257
- },
18258
- ref: handleRef,
18259
- ...restChildProps
18260
- });
18261
- }
18262
- });
18263
- });
18264
- process.env.NODE_ENV !== "production" ? Grow.propTypes = {
18265
- // ┌────────────────────────────── Warning ──────────────────────────────┐
18266
- // │ These PropTypes are generated from the TypeScript type definitions. │
18267
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
18268
- // └─────────────────────────────────────────────────────────────────────┘
18269
- /**
18270
- * Add a custom transition end trigger. Called with the transitioning DOM
18271
- * node and a done callback. Allows for more fine grained transition end
18272
- * logic. Note: Timeouts are still used as a fallback if provided.
18273
- */
18274
- addEndListener: PropTypes.func,
18275
- /**
18276
- * Perform the enter transition when it first mounts if `in` is also `true`.
18277
- * Set this to `false` to disable this behavior.
18278
- * @default true
18279
- */
18280
- appear: PropTypes.bool,
18281
- /**
18282
- * A single child content element.
18283
- */
18284
- children: elementAcceptingRef.isRequired,
18285
- /**
18286
- * The transition timing function.
18287
- * You may specify a single easing or a object containing enter and exit values.
18288
- */
18289
- easing: PropTypes.oneOfType([PropTypes.shape({
18290
- enter: PropTypes.string,
18291
- exit: PropTypes.string
18292
- }), PropTypes.string]),
18293
- /**
18294
- * If `true`, the component will transition in.
18295
- */
18296
- in: PropTypes.bool,
18297
- /**
18298
- * @ignore
18299
- */
18300
- onEnter: PropTypes.func,
18301
- /**
18302
- * @ignore
18303
- */
18304
- onEntered: PropTypes.func,
18305
- /**
18306
- * @ignore
18307
- */
18308
- onEntering: PropTypes.func,
18309
- /**
18310
- * @ignore
18311
- */
18312
- onExit: PropTypes.func,
18313
- /**
18314
- * @ignore
18315
- */
18316
- onExited: PropTypes.func,
18317
- /**
18318
- * @ignore
18319
- */
18320
- onExiting: PropTypes.func,
18321
- /**
18322
- * @ignore
18323
- */
18324
- style: PropTypes.object,
18325
- /**
18326
- * The duration for the transition, in milliseconds.
18327
- * You may specify a single timeout for all transitions, or individually with an object.
18328
- *
18329
- * Set to 'auto' to automatically calculate transition time based on height.
18330
- * @default 'auto'
18331
- */
18332
- timeout: PropTypes.oneOfType([PropTypes.oneOf(["auto"]), PropTypes.number, PropTypes.shape({
18333
- appear: PropTypes.number,
18334
- enter: PropTypes.number,
18335
- exit: PropTypes.number
18336
- })])
18337
- } : void 0;
18338
- if (Grow) {
18339
- Grow.muiSupportAuto = true;
18340
- }
18341
- function getTypeByValue(value2) {
18342
- const valueType = typeof value2;
18343
- switch (valueType) {
18344
- case "number":
18345
- if (Number.isNaN(value2)) {
18346
- return "NaN";
18347
- }
18348
- if (!Number.isFinite(value2)) {
18349
- return "Infinity";
18350
- }
18351
- if (value2 !== Math.floor(value2)) {
18352
- return "float";
18353
- }
18354
- return "number";
18355
- case "object":
18356
- if (value2 === null) {
18357
- return "null";
18358
- }
18359
- return value2.constructor.name;
18360
- default:
18361
- return valueType;
18362
- }
18363
- }
18364
- function requiredInteger(props, propName, componentName, location2) {
18365
- const propValue = props[propName];
18366
- if (propValue == null || !Number.isInteger(propValue)) {
18367
- const propType = getTypeByValue(propValue);
18368
- return new RangeError(`Invalid ${location2} \`${propName}\` of type \`${propType}\` supplied to \`${componentName}\`, expected \`integer\`.`);
18369
- }
18370
- return null;
18371
- }
18372
- function validator(props, propName, componentName, location2) {
18373
- const propValue = props[propName];
18374
- if (propValue === void 0) {
18375
- return null;
18376
- }
18377
- return requiredInteger(props, propName, componentName, location2);
18378
- }
18379
- function validatorNoop() {
18380
- return null;
18381
- }
18382
- validator.isRequired = requiredInteger;
18383
- validatorNoop.isRequired = validatorNoop;
18384
- const integerPropType = process.env.NODE_ENV === "production" ? validatorNoop : validator;
18385
- function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
18386
- const result = {};
18387
- slots.forEach((slot) => {
18388
- result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
18389
- });
18390
- return result;
18391
- }
18392
- function getPaperUtilityClass(slot) {
18393
- return generateUtilityClass("MuiPaper", slot);
18394
- }
18395
- generateUtilityClasses("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
18396
- const useUtilityClasses$3 = (ownerState) => {
18397
- const {
18398
- square,
18399
- elevation,
18400
- variant,
18401
- classes
18402
- } = ownerState;
18403
- const slots = {
18404
- root: ["root", variant, !square && "rounded", variant === "elevation" && `elevation${elevation}`]
18405
- };
18406
- return composeClasses(slots, getPaperUtilityClass, classes);
18407
- };
18408
- const PaperRoot = styled("div", {
18409
- name: "MuiPaper",
18410
- slot: "Root",
18411
- overridesResolver: (props, styles2) => {
18412
- const {
18413
- ownerState
18414
- } = props;
18415
- return [styles2.root, styles2[ownerState.variant], !ownerState.square && styles2.rounded, ownerState.variant === "elevation" && styles2[`elevation${ownerState.elevation}`]];
18416
- }
18417
- })(memoTheme(({
18418
- theme
18419
- }) => ({
18420
- backgroundColor: (theme.vars || theme).palette.background.paper,
18421
- color: (theme.vars || theme).palette.text.primary,
18422
- transition: theme.transitions.create("box-shadow"),
18423
- variants: [{
18424
- props: ({
18425
- ownerState
18426
- }) => !ownerState.square,
18427
- style: {
18428
- borderRadius: theme.shape.borderRadius
18429
- }
18430
- }, {
18431
- props: {
18432
- variant: "outlined"
18433
- },
18434
- style: {
18435
- border: `1px solid ${(theme.vars || theme).palette.divider}`
18436
- }
18437
- }, {
18438
- props: {
18439
- variant: "elevation"
18440
- },
18441
- style: {
18442
- boxShadow: "var(--Paper-shadow)",
18443
- backgroundImage: "var(--Paper-overlay)"
18444
- }
18445
- }]
18446
- })));
18447
- const Paper = /* @__PURE__ */ React.forwardRef(function Paper2(inProps, ref) {
18448
- const props = useDefaultProps({
18449
- props: inProps,
18450
- name: "MuiPaper"
18451
- });
18452
- const theme = useTheme();
18453
- const {
18454
- className,
18455
- component = "div",
18456
- elevation = 1,
18457
- square = false,
18458
- variant = "elevation",
18459
- ...other
18460
- } = props;
18461
- const ownerState = {
18462
- ...props,
18463
- component,
18464
- elevation,
18465
- square,
18466
- variant
18467
- };
18468
- const classes = useUtilityClasses$3(ownerState);
18469
- if (process.env.NODE_ENV !== "production") {
18470
- if (theme.shadows[elevation] === void 0) {
18471
- console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join("\n"));
18472
- }
18473
- }
18474
- return /* @__PURE__ */ jsxRuntimeExports.jsx(PaperRoot, {
18475
- as: component,
18476
- ownerState,
18477
- className: clsx(classes.root, className),
18478
- ref,
18479
- ...other,
18480
- style: {
18481
- ...variant === "elevation" && {
18482
- "--Paper-shadow": (theme.vars || theme).shadows[elevation],
18483
- ...theme.vars && {
18484
- "--Paper-overlay": theme.vars.overlays?.[elevation]
18485
- },
18486
- ...!theme.vars && theme.palette.mode === "dark" && {
18487
- "--Paper-overlay": `linear-gradient(${alpha$1("#fff", getOverlayAlpha(elevation))}, ${alpha$1("#fff", getOverlayAlpha(elevation))})`
18488
- }
18489
- },
18490
- ...other.style
18491
- }
18492
- });
18493
- });
18494
- process.env.NODE_ENV !== "production" ? Paper.propTypes = {
18495
- // ┌────────────────────────────── Warning ──────────────────────────────┐
18496
- // │ These PropTypes are generated from the TypeScript type definitions. │
18497
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
18498
- // └─────────────────────────────────────────────────────────────────────┘
18499
- /**
18500
- * The content of the component.
18501
- */
18502
- children: PropTypes.node,
18503
- /**
18504
- * Override or extend the styles applied to the component.
18505
- */
18506
- classes: PropTypes.object,
18507
- /**
18508
- * @ignore
18509
- */
18510
- className: PropTypes.string,
18511
- /**
18512
- * The component used for the root node.
18513
- * Either a string to use a HTML element or a component.
18514
- */
18515
- component: PropTypes.elementType,
18516
- /**
18517
- * Shadow depth, corresponds to `dp` in the spec.
18518
- * It accepts values between 0 and 24 inclusive.
18519
- * @default 1
18520
- */
18521
- elevation: chainPropTypes(integerPropType, (props) => {
18522
- const {
18523
- elevation,
18524
- variant
18525
- } = props;
18526
- if (elevation > 0 && variant === "outlined") {
18527
- return new Error(`MUI: Combining \`elevation={${elevation}}\` with \`variant="${variant}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`);
18528
- }
18529
- return null;
18530
- }),
18531
- /**
18532
- * If `true`, rounded corners are disabled.
18533
- * @default false
18534
- */
18535
- square: PropTypes.bool,
18536
- /**
18537
- * @ignore
18538
- */
18539
- style: PropTypes.object,
18540
- /**
18541
- * The system prop that allows defining system overrides as well as additional CSS styles.
18542
- */
18543
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
18544
- /**
18545
- * The variant to use.
18546
- * @default 'elevation'
18547
- */
18548
- variant: PropTypes.oneOfType([PropTypes.oneOf(["elevation", "outlined"]), PropTypes.string])
18549
- } : void 0;
18550
- function getSnackbarContentUtilityClass(slot) {
18551
- return generateUtilityClass("MuiSnackbarContent", slot);
18552
- }
18553
- generateUtilityClasses("MuiSnackbarContent", ["root", "message", "action"]);
18554
- const useUtilityClasses$2 = (ownerState) => {
18555
- const {
18556
- classes
18557
- } = ownerState;
18558
- const slots = {
18559
- root: ["root"],
18560
- action: ["action"],
18561
- message: ["message"]
18562
- };
18563
- return composeClasses(slots, getSnackbarContentUtilityClass, classes);
18564
- };
18565
- const SnackbarContentRoot = styled(Paper, {
18566
- name: "MuiSnackbarContent",
18567
- slot: "Root"
18568
- })(memoTheme(({
18569
- theme
18570
- }) => {
18571
- const emphasis = theme.palette.mode === "light" ? 0.8 : 0.98;
18572
- return {
18573
- ...theme.typography.body2,
18574
- color: theme.vars ? theme.vars.palette.SnackbarContent.color : theme.palette.getContrastText(emphasize(theme.palette.background.default, emphasis)),
18575
- backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : emphasize(theme.palette.background.default, emphasis),
18576
- display: "flex",
18577
- alignItems: "center",
18578
- flexWrap: "wrap",
18579
- padding: "6px 16px",
18580
- flexGrow: 1,
18581
- [theme.breakpoints.up("sm")]: {
18582
- flexGrow: "initial",
18583
- minWidth: 288
18584
- }
18585
- };
18586
- }));
18587
- const SnackbarContentMessage = styled("div", {
18588
- name: "MuiSnackbarContent",
18589
- slot: "Message"
18590
- })({
18591
- padding: "8px 0"
18592
- });
18593
- const SnackbarContentAction = styled("div", {
18594
- name: "MuiSnackbarContent",
18595
- slot: "Action"
18596
- })({
18597
- display: "flex",
18598
- alignItems: "center",
18599
- marginLeft: "auto",
18600
- paddingLeft: 16,
18601
- marginRight: -8
18602
- });
18603
- const SnackbarContent = /* @__PURE__ */ React.forwardRef(function SnackbarContent2(inProps, ref) {
18604
- const props = useDefaultProps({
18605
- props: inProps,
18606
- name: "MuiSnackbarContent"
18607
- });
18608
- const {
18609
- action,
18610
- className,
18611
- message,
18612
- role = "alert",
18613
- ...other
18614
- } = props;
18615
- const ownerState = props;
18616
- const classes = useUtilityClasses$2(ownerState);
18617
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(SnackbarContentRoot, {
18618
- role,
18619
- elevation: 6,
18620
- className: clsx(classes.root, className),
18621
- ownerState,
18622
- ref,
18623
- ...other,
18624
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(SnackbarContentMessage, {
18625
- className: classes.message,
18626
- ownerState,
18627
- children: message
18628
- }), action ? /* @__PURE__ */ jsxRuntimeExports.jsx(SnackbarContentAction, {
18629
- className: classes.action,
18630
- ownerState,
18631
- children: action
18632
- }) : null]
18633
- });
18634
- });
18635
- process.env.NODE_ENV !== "production" ? SnackbarContent.propTypes = {
18636
- // ┌────────────────────────────── Warning ──────────────────────────────┐
18637
- // │ These PropTypes are generated from the TypeScript type definitions. │
18638
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
18639
- // └─────────────────────────────────────────────────────────────────────┘
18640
- /**
18641
- * The action to display. It renders after the message, at the end of the snackbar.
18642
- */
18643
- action: PropTypes.node,
18644
- /**
18645
- * Override or extend the styles applied to the component.
18646
- */
18647
- classes: PropTypes.object,
18648
- /**
18649
- * @ignore
18650
- */
18651
- className: PropTypes.string,
18652
- /**
18653
- * The message to display.
18654
- */
18655
- message: PropTypes.node,
18656
- /**
18657
- * The ARIA role attribute of the element.
18658
- * @default 'alert'
18659
- */
18660
- role: PropTypes.string,
18661
- /**
18662
- * The system prop that allows defining system overrides as well as additional CSS styles.
18663
- */
18664
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
18665
- } : void 0;
18666
- function getSnackbarUtilityClass(slot) {
18667
- return generateUtilityClass("MuiSnackbar", slot);
18668
- }
18669
- generateUtilityClasses("MuiSnackbar", ["root", "anchorOriginTopCenter", "anchorOriginBottomCenter", "anchorOriginTopRight", "anchorOriginBottomRight", "anchorOriginTopLeft", "anchorOriginBottomLeft"]);
18670
- function isHostComponent(element) {
18671
- return typeof element === "string";
18672
- }
18673
- function appendOwnerState(elementType, otherProps, ownerState) {
18674
- if (elementType === void 0 || isHostComponent(elementType)) {
18675
- return otherProps;
18676
- }
18677
- return {
18678
- ...otherProps,
18679
- ownerState: {
18680
- ...otherProps.ownerState,
18681
- ...ownerState
18682
- }
18683
- };
18684
- }
18685
- function resolveComponentProps(componentProps, ownerState, slotState) {
18686
- if (typeof componentProps === "function") {
18687
- return componentProps(ownerState, slotState);
18688
- }
18689
- return componentProps;
18690
- }
18691
- function omitEventHandlers(object2) {
18692
- if (object2 === void 0) {
18693
- return {};
18694
- }
18695
- const result = {};
18696
- Object.keys(object2).filter((prop) => !(prop.match(/^on[A-Z]/) && typeof object2[prop] === "function")).forEach((prop) => {
18697
- result[prop] = object2[prop];
18698
- });
18699
- return result;
18700
- }
18701
- function mergeSlotProps(parameters) {
18702
- const {
18703
- getSlotProps,
18704
- additionalProps,
18705
- externalSlotProps,
18706
- externalForwardedProps,
18707
- className
18708
- } = parameters;
18709
- if (!getSlotProps) {
18710
- const joinedClasses2 = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
18711
- const mergedStyle2 = {
18712
- ...additionalProps?.style,
18713
- ...externalForwardedProps?.style,
18714
- ...externalSlotProps?.style
18715
- };
18716
- const props2 = {
18717
- ...additionalProps,
18718
- ...externalForwardedProps,
18719
- ...externalSlotProps
18720
- };
18721
- if (joinedClasses2.length > 0) {
18722
- props2.className = joinedClasses2;
18723
- }
18724
- if (Object.keys(mergedStyle2).length > 0) {
18725
- props2.style = mergedStyle2;
18726
- }
18727
- return {
18728
- props: props2,
18729
- internalRef: void 0
18730
- };
18731
- }
18732
- const eventHandlers = extractEventHandlers({
18733
- ...externalForwardedProps,
18734
- ...externalSlotProps
18735
- });
18736
- const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
18737
- const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
18738
- const internalSlotProps = getSlotProps(eventHandlers);
18739
- const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
18740
- const mergedStyle = {
18741
- ...internalSlotProps?.style,
18742
- ...additionalProps?.style,
18743
- ...externalForwardedProps?.style,
18744
- ...externalSlotProps?.style
18745
- };
18746
- const props = {
18747
- ...internalSlotProps,
18748
- ...additionalProps,
18749
- ...otherPropsWithoutEventHandlers,
18750
- ...componentsPropsWithoutEventHandlers
18751
- };
18752
- if (joinedClasses.length > 0) {
18753
- props.className = joinedClasses;
18754
- }
18755
- if (Object.keys(mergedStyle).length > 0) {
18756
- props.style = mergedStyle;
18757
- }
18758
- return {
18759
- props,
18760
- internalRef: internalSlotProps.ref
18761
- };
18762
- }
18763
- function useSlot(name2, parameters) {
18764
- const {
18765
- className,
18766
- elementType: initialElementType,
18767
- ownerState,
18768
- externalForwardedProps,
18769
- internalForwardedProps,
18770
- shouldForwardComponentProp = false,
18771
- ...useSlotPropsParams
18772
- } = parameters;
18773
- const {
18774
- component: rootComponent,
18775
- slots = {
18776
- [name2]: void 0
18777
- },
18778
- slotProps = {
18779
- [name2]: void 0
18780
- },
18781
- ...other
18782
- } = externalForwardedProps;
18783
- const elementType = slots[name2] || initialElementType;
18784
- const resolvedComponentsProps = resolveComponentProps(slotProps[name2], ownerState);
18785
- const {
18786
- props: {
18787
- component: slotComponent,
18788
- ...mergedProps
18789
- },
18790
- internalRef
18791
- } = mergeSlotProps({
18792
- className,
18793
- ...useSlotPropsParams,
18794
- externalForwardedProps: name2 === "root" ? other : void 0,
18795
- externalSlotProps: resolvedComponentsProps
18796
- });
18797
- const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);
18798
- const LeafComponent = name2 === "root" ? slotComponent || rootComponent : slotComponent;
18799
- const props = appendOwnerState(elementType, {
18800
- ...name2 === "root" && !rootComponent && !slots[name2] && internalForwardedProps,
18801
- ...name2 !== "root" && !slots[name2] && internalForwardedProps,
18802
- ...mergedProps,
18803
- ...LeafComponent && !shouldForwardComponentProp && {
18804
- as: LeafComponent
18805
- },
18806
- ...LeafComponent && shouldForwardComponentProp && {
18807
- component: LeafComponent
18808
- },
18809
- ref
18810
- }, ownerState);
18811
- return [elementType, props];
18812
- }
18813
- const useUtilityClasses$1 = (ownerState) => {
18814
- const {
18815
- classes,
18816
- anchorOrigin
18817
- } = ownerState;
18818
- const slots = {
18819
- root: ["root", `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}`]
18820
- };
18821
- return composeClasses(slots, getSnackbarUtilityClass, classes);
18822
- };
18823
- const SnackbarRoot = styled("div", {
18824
- name: "MuiSnackbar",
18825
- slot: "Root",
18826
- overridesResolver: (props, styles2) => {
18827
- const {
18828
- ownerState
18829
- } = props;
18830
- return [styles2.root, styles2[`anchorOrigin${capitalize(ownerState.anchorOrigin.vertical)}${capitalize(ownerState.anchorOrigin.horizontal)}`]];
18831
- }
18832
- })(memoTheme(({
18833
- theme
18834
- }) => ({
18835
- zIndex: (theme.vars || theme).zIndex.snackbar,
18836
- position: "fixed",
18837
- display: "flex",
18838
- left: 8,
18839
- right: 8,
18840
- justifyContent: "center",
18841
- alignItems: "center",
18842
- variants: [{
18843
- props: ({
18844
- ownerState
18845
- }) => ownerState.anchorOrigin.vertical === "top",
18846
- style: {
18847
- top: 8,
18848
- [theme.breakpoints.up("sm")]: {
18849
- top: 24
18850
- }
18851
- }
18852
- }, {
18853
- props: ({
18854
- ownerState
18855
- }) => ownerState.anchorOrigin.vertical !== "top",
18856
- style: {
18857
- bottom: 8,
18858
- [theme.breakpoints.up("sm")]: {
18859
- bottom: 24
18860
- }
18861
- }
18862
- }, {
18863
- props: ({
18864
- ownerState
18865
- }) => ownerState.anchorOrigin.horizontal === "left",
18866
- style: {
18867
- justifyContent: "flex-start",
18868
- [theme.breakpoints.up("sm")]: {
18869
- left: 24,
18870
- right: "auto"
18871
- }
18872
- }
18873
- }, {
18874
- props: ({
18875
- ownerState
18876
- }) => ownerState.anchorOrigin.horizontal === "right",
18877
- style: {
18878
- justifyContent: "flex-end",
18879
- [theme.breakpoints.up("sm")]: {
18880
- right: 24,
18881
- left: "auto"
18882
- }
18883
- }
18884
- }, {
18885
- props: ({
18886
- ownerState
18887
- }) => ownerState.anchorOrigin.horizontal === "center",
18888
- style: {
18889
- [theme.breakpoints.up("sm")]: {
18890
- left: "50%",
18891
- right: "auto",
18892
- transform: "translateX(-50%)"
18893
- }
18894
- }
18895
- }]
18896
- })));
18897
- const Snackbar = /* @__PURE__ */ React.forwardRef(function Snackbar2(inProps, ref) {
18898
- const props = useDefaultProps({
18899
- props: inProps,
18900
- name: "MuiSnackbar"
18901
- });
18902
- const theme = useTheme();
18903
- const defaultTransitionDuration = {
18904
- enter: theme.transitions.duration.enteringScreen,
18905
- exit: theme.transitions.duration.leavingScreen
18906
- };
18907
- const {
18908
- action,
18909
- anchorOrigin: {
18910
- vertical,
18911
- horizontal
18912
- } = {
18913
- vertical: "bottom",
18914
- horizontal: "left"
18915
- },
18916
- autoHideDuration = null,
18917
- children,
18918
- className,
18919
- ClickAwayListenerProps: ClickAwayListenerPropsProp,
18920
- ContentProps: ContentPropsProp,
18921
- disableWindowBlurListener = false,
18922
- message,
18923
- onBlur,
18924
- onClose,
18925
- onFocus,
18926
- onMouseEnter,
18927
- onMouseLeave,
18928
- open,
18929
- resumeHideDuration,
18930
- slots = {},
18931
- slotProps = {},
18932
- TransitionComponent: TransitionComponentProp,
18933
- transitionDuration = defaultTransitionDuration,
18934
- TransitionProps: {
18935
- onEnter,
18936
- onExited,
18937
- ...TransitionPropsProp
18938
- } = {},
18939
- ...other
18940
- } = props;
18941
- const ownerState = {
18942
- ...props,
18943
- anchorOrigin: {
18944
- vertical,
18945
- horizontal
18946
- },
18947
- autoHideDuration,
18948
- disableWindowBlurListener,
18949
- TransitionComponent: TransitionComponentProp,
18950
- transitionDuration
18951
- };
18952
- const classes = useUtilityClasses$1(ownerState);
18953
- const {
18954
- getRootProps,
18955
- onClickAway
18956
- } = useSnackbar$1({
18957
- ...ownerState
18958
- });
18959
- const [exited, setExited] = React.useState(true);
18960
- const handleExited = (node) => {
18961
- setExited(true);
18962
- if (onExited) {
18963
- onExited(node);
18964
- }
18965
- };
18966
- const handleEnter = (node, isAppearing) => {
18967
- setExited(false);
18968
- if (onEnter) {
18969
- onEnter(node, isAppearing);
18970
- }
18971
- };
18972
- const externalForwardedProps = {
18973
- slots: {
18974
- transition: TransitionComponentProp,
18975
- ...slots
18976
- },
18977
- slotProps: {
18978
- content: ContentPropsProp,
18979
- clickAwayListener: ClickAwayListenerPropsProp,
18980
- transition: TransitionPropsProp,
18981
- ...slotProps
18982
- }
18983
- };
18984
- const [Root, rootProps] = useSlot("root", {
18985
- ref,
18986
- className: [classes.root, className],
18987
- elementType: SnackbarRoot,
18988
- getSlotProps: getRootProps,
18989
- externalForwardedProps: {
18990
- ...externalForwardedProps,
18991
- ...other
18992
- },
18993
- ownerState
18994
- });
18995
- const [ClickAwaySlot, {
18996
- ownerState: clickAwayOwnerStateProp,
18997
- ...clickAwayListenerProps
18998
- }] = useSlot("clickAwayListener", {
18999
- elementType: ClickAwayListener,
19000
- externalForwardedProps,
19001
- getSlotProps: (handlers) => ({
19002
- onClickAway: (...params) => {
19003
- const event = params[0];
19004
- handlers.onClickAway?.(...params);
19005
- if (event?.defaultMuiPrevented) {
19006
- return;
19007
- }
19008
- onClickAway(...params);
19009
- }
19010
- }),
19011
- ownerState
19012
- });
19013
- const [ContentSlot, contentSlotProps] = useSlot("content", {
19014
- elementType: SnackbarContent,
19015
- shouldForwardComponentProp: true,
19016
- externalForwardedProps,
19017
- additionalProps: {
19018
- message,
19019
- action
19020
- },
19021
- ownerState
19022
- });
19023
- const [TransitionSlot, transitionProps] = useSlot("transition", {
19024
- elementType: Grow,
19025
- externalForwardedProps,
19026
- getSlotProps: (handlers) => ({
19027
- onEnter: (...params) => {
19028
- handlers.onEnter?.(...params);
19029
- handleEnter(...params);
19030
- },
19031
- onExited: (...params) => {
19032
- handlers.onExited?.(...params);
19033
- handleExited(...params);
19034
- }
19035
- }),
19036
- additionalProps: {
19037
- appear: true,
19038
- in: open,
19039
- timeout: transitionDuration,
19040
- direction: vertical === "top" ? "down" : "up"
19041
- },
19042
- ownerState
19043
- });
19044
- if (!open && exited) {
19045
- return null;
19046
- }
19047
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ClickAwaySlot, {
19048
- ...clickAwayListenerProps,
19049
- ...slots.clickAwayListener && {
19050
- ownerState: clickAwayOwnerStateProp
19051
- },
19052
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root, {
19053
- ...rootProps,
19054
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionSlot, {
19055
- ...transitionProps,
19056
- children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(ContentSlot, {
19057
- ...contentSlotProps
19058
- })
19059
- })
19060
- })
19061
- });
19062
- });
19063
- process.env.NODE_ENV !== "production" ? Snackbar.propTypes = {
19064
- // ┌────────────────────────────── Warning ──────────────────────────────┐
19065
- // │ These PropTypes are generated from the TypeScript type definitions. │
19066
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
19067
- // └─────────────────────────────────────────────────────────────────────┘
19068
- /**
19069
- * The action to display. It renders after the message, at the end of the snackbar.
19070
- */
19071
- action: PropTypes.node,
19072
- /**
19073
- * The anchor of the `Snackbar`.
19074
- * On smaller screens, the component grows to occupy all the available width,
19075
- * the horizontal alignment is ignored.
19076
- * @default { vertical: 'bottom', horizontal: 'left' }
19077
- */
19078
- anchorOrigin: PropTypes.shape({
19079
- horizontal: PropTypes.oneOf(["center", "left", "right"]).isRequired,
19080
- vertical: PropTypes.oneOf(["bottom", "top"]).isRequired
19081
- }),
19082
- /**
19083
- * The number of milliseconds to wait before automatically calling the
19084
- * `onClose` function. `onClose` should then set the state of the `open`
19085
- * prop to hide the Snackbar. This behavior is disabled by default with
19086
- * the `null` value.
19087
- * @default null
19088
- */
19089
- autoHideDuration: PropTypes.number,
19090
- /**
19091
- * Replace the `SnackbarContent` component.
19092
- */
19093
- children: PropTypes.element,
19094
- /**
19095
- * Override or extend the styles applied to the component.
19096
- */
19097
- classes: PropTypes.object,
19098
- /**
19099
- * @ignore
19100
- */
19101
- className: PropTypes.string,
19102
- /**
19103
- * Props applied to the `ClickAwayListener` element.
19104
- * @deprecated Use `slotProps.clickAwayListener` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19105
- */
19106
- ClickAwayListenerProps: PropTypes.object,
19107
- /**
19108
- * Props applied to the [`SnackbarContent`](https://mui.com/material-ui/api/snackbar-content/) element.
19109
- * @deprecated Use `slotProps.content` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19110
- */
19111
- ContentProps: PropTypes.object,
19112
- /**
19113
- * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.
19114
- * @default false
19115
- */
19116
- disableWindowBlurListener: PropTypes.bool,
19117
- /**
19118
- * When displaying multiple consecutive snackbars using a single parent-rendered
19119
- * `<Snackbar/>`, add the `key` prop to ensure independent treatment of each message.
19120
- * For instance, use `<Snackbar key={message} />`. Otherwise, messages might update
19121
- * in place, and features like `autoHideDuration` could be affected.
19122
- */
19123
- key: () => null,
19124
- /**
19125
- * The message to display.
19126
- */
19127
- message: PropTypes.node,
19128
- /**
19129
- * @ignore
19130
- */
19131
- onBlur: PropTypes.func,
19132
- /**
19133
- * Callback fired when the component requests to be closed.
19134
- * Typically `onClose` is used to set state in the parent component,
19135
- * which is used to control the `Snackbar` `open` prop.
19136
- * The `reason` parameter can optionally be used to control the response to `onClose`,
19137
- * for example ignoring `clickaway`.
19138
- *
19139
- * @param {React.SyntheticEvent<any> | Event} event The event source of the callback.
19140
- * @param {string} reason Can be: `"timeout"` (`autoHideDuration` expired), `"clickaway"`, or `"escapeKeyDown"`.
19141
- */
19142
- onClose: PropTypes.func,
19143
- /**
19144
- * @ignore
19145
- */
19146
- onFocus: PropTypes.func,
19147
- /**
19148
- * @ignore
19149
- */
19150
- onMouseEnter: PropTypes.func,
19151
- /**
19152
- * @ignore
19153
- */
19154
- onMouseLeave: PropTypes.func,
19155
- /**
19156
- * If `true`, the component is shown.
19157
- */
19158
- open: PropTypes.bool,
19159
- /**
19160
- * The number of milliseconds to wait before dismissing after user interaction.
19161
- * If `autoHideDuration` prop isn't specified, it does nothing.
19162
- * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,
19163
- * we default to `autoHideDuration / 2` ms.
19164
- */
19165
- resumeHideDuration: PropTypes.number,
19166
- /**
19167
- * The props used for each slot inside.
19168
- * @default {}
19169
- */
19170
- slotProps: PropTypes.shape({
19171
- clickAwayListener: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
19172
- content: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
19173
- root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
19174
- transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
19175
- }),
19176
- /**
19177
- * The components used for each slot inside.
19178
- * @default {}
19179
- */
19180
- slots: PropTypes.shape({
19181
- clickAwayListener: PropTypes.elementType,
19182
- content: PropTypes.elementType,
19183
- root: PropTypes.elementType,
19184
- transition: PropTypes.elementType
19185
- }),
19186
- /**
19187
- * The system prop that allows defining system overrides as well as additional CSS styles.
19188
- */
19189
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
19190
- /**
19191
- * The component used for the transition.
19192
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
19193
- * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19194
- * @default Grow
19195
- */
19196
- TransitionComponent: PropTypes.elementType,
19197
- /**
19198
- * The duration for the transition, in milliseconds.
19199
- * You may specify a single timeout for all transitions, or individually with an object.
19200
- * @default {
19201
- * enter: theme.transitions.duration.enteringScreen,
19202
- * exit: theme.transitions.duration.leavingScreen,
19203
- * }
19204
- */
19205
- transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
19206
- appear: PropTypes.number,
19207
- enter: PropTypes.number,
19208
- exit: PropTypes.number
19209
- })]),
19210
- /**
19211
- * Props applied to the transition element.
19212
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
19213
- * @deprecated Use `slotProps.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19214
- * @default {}
19215
- */
19216
- TransitionProps: PropTypes.object
19217
- } : void 0;
19218
- var SnackbarType = /* @__PURE__ */ ((SnackbarType2) => {
19219
- SnackbarType2["INFO"] = "info";
19220
- SnackbarType2["SUCCESS"] = "success";
19221
- SnackbarType2["ERROR"] = "error";
19222
- SnackbarType2["WARNING"] = "warning";
19223
- return SnackbarType2;
19224
- })(SnackbarType || {});
19225
- const SnackbarContext = createContext(
19226
- void 0
19227
- );
19228
- const SnackbarProvider = ({
19229
- children
19230
- }) => {
19231
- const [snackbar, setSnackbar] = useState(
19232
- {
19233
- open: false,
19234
- message: "",
19235
- type: "info"
19236
- /* INFO */
19237
- }
19238
- );
19239
- const showSnackbar = (params) => {
19240
- setSnackbar({
19241
- open: true,
19242
- ...params
19243
- });
19244
- };
19245
- const handleClose = () => {
19246
- setSnackbar({ ...snackbar, open: false });
19247
- };
19248
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(SnackbarContext.Provider, { value: { showSnackbar }, children: [
19249
- children,
19250
- /* @__PURE__ */ jsxRuntimeExports.jsx(
19251
- Snackbar,
19252
- {
19253
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
19254
- sx: {
19255
- "&.MuiSnackbar-root": {
19256
- bottom: STYLE.PADDING_GAP_LAYOUT,
19257
- right: STYLE.PADDING_GAP_LAYOUT
19258
- }
19259
- },
19260
- open: snackbar.open,
19261
- autoHideDuration: 6e3,
19262
- onClose: handleClose,
19263
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
19264
- Alert,
19265
- {
19266
- sx: { borderRadius: STYLE.BORDER_RADIUS_ELEMENT, boxShadow: 1 },
19267
- onClose: handleClose,
19268
- severity: snackbar.type,
19269
- children: snackbar.message
19270
- }
19271
- )
19272
- }
19273
- )
19274
- ] });
19275
- };
19276
- const useSnackbar = () => {
19277
- const context = useContext(SnackbarContext);
19278
- if (!context)
19279
- throw new Error("useSnackbar must be used within a SnackbarProvider");
19280
- return context;
19281
- };
19282
- const AuthLayout = ({ children }) => {
19283
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
19284
- Stack$1,
19285
- {
19286
- sx: {
19287
- height: "100vh",
19288
- width: "100%",
19289
- backgroundImage: `url(/images/login.jpg)`,
19290
- backgroundSize: "cover",
19291
- backgroundPosition: "center"
19292
- },
19293
- children
19294
- }
19295
- );
19296
- };
19297
- const findCurrentAccessByPath = (pathname) => {
19298
- const checkInChildren = (module2, children) => {
19299
- if (!children) return void 0;
19300
- for (const child of children) {
19301
- if (child.path && pathname.includes(child.path)) {
19302
- return module2.key;
17361
+ );
17362
+ };
17363
+ const findCurrentAccessByPath = (pathname) => {
17364
+ const checkInChildren = (module2, children) => {
17365
+ if (!children) return void 0;
17366
+ for (const child of children) {
17367
+ if (child.path && pathname.includes(child.path)) {
17368
+ return module2.key;
19303
17369
  }
19304
17370
  if (child.children) {
19305
17371
  const found = checkInChildren(module2, child.children);
@@ -19564,9 +17630,9 @@ const extractNumberAtStartString = (string2) => {
19564
17630
  const match = string2.match(/^\d+(\.\d+)?/);
19565
17631
  return match ? parseFloat(match[0]) : 0;
19566
17632
  };
19567
- const stripHtml = (html) => {
17633
+ const stripHtml = (html2) => {
19568
17634
  const tempDiv = document.createElement("div");
19569
- tempDiv.innerHTML = html;
17635
+ tempDiv.innerHTML = html2;
19570
17636
  return tempDiv.textContent || tempDiv.innerText || "";
19571
17637
  };
19572
17638
  const getErrorMessage = (e) => e?.message ?? "Đã xảy ra lỗi không xác định!";
@@ -20331,7 +18397,7 @@ const TooltipOnClickElement = ({
20331
18397
  }) => {
20332
18398
  return (
20333
18399
  // Chỗ này có thể là bug, onClickAway apply ngay cả khi component chưa được render
20334
- /* @__PURE__ */ jsxRuntimeExports.jsx(ClickAwayListener$1, { onClickAway, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18400
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ClickAwayListener, { onClickAway, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
20335
18401
  Tooltip,
20336
18402
  {
20337
18403
  PopperProps: { disablePortal: true },
@@ -20704,15 +18770,6 @@ const useIsSystemMonitor = () => {
20704
18770
  const normalize = (p) => p.replace(/\/+$/, "");
20705
18771
  return normalize(location2.pathname) === normalize(PAGE.DASHBOARD.path);
20706
18772
  };
20707
- const useAllApps = () => {
20708
- const userType = useSelector((state) => state.account.user?.type);
20709
- const allApps = useMemo(() => {
20710
- return SYSTEM_MODULES.filter((app2) => {
20711
- return app2.allowUserTypes.includes(userType);
20712
- });
20713
- }, [userType]);
20714
- return allApps;
20715
- };
20716
18773
  const useActiveSidebar = () => {
20717
18774
  const { user, current_access } = useSelector((state) => state.account);
20718
18775
  const activeSidebar = useMemo(() => {
@@ -20722,18 +18779,6 @@ const useActiveSidebar = () => {
20722
18779
  }, [current_access, user]);
20723
18780
  return activeSidebar;
20724
18781
  };
20725
- const useSidebarState = () => {
20726
- const [isSidebarOpen, setIsSidebarOpen] = useState(false);
20727
- const openSidebar = () => setIsSidebarOpen(true);
20728
- const closeSidebar = () => setIsSidebarOpen(false);
20729
- const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);
20730
- return {
20731
- isSidebarOpen,
20732
- openSidebar,
20733
- closeSidebar,
20734
- toggleSidebar
20735
- };
20736
- };
20737
18782
  const BellComponent = ({}) => {
20738
18783
  const isSystemMonitor = useIsSystemMonitor();
20739
18784
  const { notificationCount } = useSelector((state) => state.account);
@@ -21264,13 +19309,7 @@ const MonitorPart = ({ children }) => {
21264
19309
  },
21265
19310
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack$2, { p: { padding: STYLE.PADDING_GAP_LAYOUT }, children: [
21266
19311
  /* @__PURE__ */ jsxRuntimeExports.jsxs(StackRowJustBetween, { children: [
21267
- /* @__PURE__ */ jsxRuntimeExports.jsx(StackRowAlignCenter, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
21268
- LogoComponent,
21269
- {
21270
- url: "/images/logo/logo-sub-3.svg",
21271
- fillColor: "white"
21272
- }
21273
- ) }),
19312
+ /* @__PURE__ */ jsxRuntimeExports.jsx(StackRowAlignCenter, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(LogoComponent, { url: "/images/logo/logo-sub-3.svg", fillColor: "white" }) }),
21274
19313
  /* @__PURE__ */ jsxRuntimeExports.jsxs(StackRowAlignCenter, { children: [
21275
19314
  /* @__PURE__ */ jsxRuntimeExports.jsx(BellComponent, {}),
21276
19315
  /* @__PURE__ */ jsxRuntimeExports.jsx(AvatarUserComponent, {})
@@ -24160,13 +22199,13 @@ Object.assign(/* @__PURE__ */ Object.create(null), {
24160
22199
  });
24161
22200
  const isSchema = (obj) => obj && obj.__isYupSchema__;
24162
22201
  class Condition {
24163
- static fromOptions(refs, config2) {
24164
- if (!config2.then && !config2.otherwise) throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");
22202
+ static fromOptions(refs, config) {
22203
+ if (!config.then && !config.otherwise) throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");
24165
22204
  let {
24166
22205
  is,
24167
22206
  then,
24168
22207
  otherwise
24169
- } = config2;
22208
+ } = config;
24170
22209
  let check = typeof is === "function" ? is : (...values2) => values2.every((value2) => value2 === is);
24171
22210
  return new Condition(refs, (values2, schema) => {
24172
22211
  var _branch;
@@ -24252,7 +22291,7 @@ class Reference {
24252
22291
  }
24253
22292
  Reference.prototype.__isYupRef = true;
24254
22293
  const isAbsent = (value2) => value2 == null;
24255
- function createValidation(config2) {
22294
+ function createValidation(config) {
24256
22295
  function validate({
24257
22296
  value: value2,
24258
22297
  path = "",
@@ -24266,7 +22305,7 @@ function createValidation(config2) {
24266
22305
  params,
24267
22306
  message,
24268
22307
  skipAbsent
24269
- } = config2;
22308
+ } = config;
24270
22309
  let {
24271
22310
  parent,
24272
22311
  context,
@@ -24334,7 +22373,7 @@ function createValidation(config2) {
24334
22373
  }
24335
22374
  handleResult(result);
24336
22375
  }
24337
- validate.OPTIONS = config2;
22376
+ validate.OPTIONS = config;
24338
22377
  return validate;
24339
22378
  }
24340
22379
  function resolveParams(params, options) {
@@ -25940,17 +23979,11 @@ const AuthPage = ({}) => {
25940
23979
  resetForm();
25941
23980
  break;
25942
23981
  case AuthProcess.FORGOT_PASSWORD:
25943
- await authApi.forgotPassword({
25944
- phone: authDto.phone,
25945
- type: ForgotPasswordType.PHONE
25946
- });
23982
+ await authApi.forgotPassword({ phone: authDto.phone, type: ForgotPasswordType.PHONE });
25947
23983
  setAuthProcess(AuthProcess.VERIFY_OTP);
25948
23984
  break;
25949
23985
  case AuthProcess.VERIFY_OTP: {
25950
- const res = await authApi.verifyOtp({
25951
- otp: authDto.otp,
25952
- phone: authDto.phone
25953
- });
23986
+ const res = await authApi.verifyOtp({ otp: authDto.otp, phone: authDto.phone });
25954
23987
  setFieldValue("token", res.token);
25955
23988
  setAuthProcess(AuthProcess.RESET_PASSWORD);
25956
23989
  break;
@@ -25969,170 +24002,140 @@ const AuthPage = ({}) => {
25969
24002
  break;
25970
24003
  }
25971
24004
  } catch (error) {
25972
- showSnackbar({
25973
- message: getErrorMessage(error),
25974
- type: SnackbarType.ERROR
25975
- });
24005
+ showSnackbar({ message: getErrorMessage(error), type: SnackbarType.ERROR });
25976
24006
  } finally {
25977
24007
  if (showPassword) setShowPassword(false);
25978
24008
  setLoading(false);
25979
24009
  }
25980
24010
  };
25981
24011
  const [showPassword, setShowPassword] = useState(false);
25982
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
25983
- Stack$1,
24012
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Stack$1, { sx: { display: "flex", justifyContent: "center", alignItems: "center", position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24013
+ Formik,
25984
24014
  {
25985
- sx: {
25986
- display: "flex",
25987
- justifyContent: "center",
25988
- alignItems: "center",
25989
- position: "relative",
25990
- width: "100%",
25991
- height: "100%"
25992
- },
25993
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
25994
- Formik,
25995
- {
25996
- initialValues: {
25997
- emailOrPhone: "",
25998
- password: "",
25999
- token: "",
26000
- otp: "",
26001
- phone: ""
26002
- },
26003
- validationSchema: validationSchema(authProcess),
26004
- onSubmit,
26005
- validateOnChange: false,
26006
- enableReinitialize: true,
26007
- children: (formik) => {
26008
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Form, { noValidate: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
26009
- Stack$1,
26010
- {
26011
- sx: {
26012
- width: 400,
26013
- backgroundColor: `${palette.background.default}${OPACITY[80]}`,
26014
- backdropFilter: "blur(10px)",
26015
- borderRadius: 3.5,
26016
- padding: 3,
26017
- boxShadow: 1,
26018
- alignItems: "center"
26019
- },
26020
- gap: 3,
26021
- children: [
26022
- /* @__PURE__ */ jsxRuntimeExports.jsx(LogoComponent, { url: "/images/logo/logo-sub-4.svg" }),
26023
- authProcess === AuthProcess.LOGIN && /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
26024
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26025
- TextFieldElement,
26026
- {
26027
- iconLabel: "mail",
26028
- label: "Số điện thoại",
26029
- name: "emailOrPhone",
26030
- placeholder: "Nhập số điện thoại",
26031
- error: formik.errors.emailOrPhone,
26032
- value: formik.values.emailOrPhone,
26033
- onChange: formik.handleChange,
26034
- sx: {
26035
- "& fieldset": { borderColor: palette.primary.light }
26036
- },
26037
- required: true
26038
- }
26039
- ),
26040
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26041
- TextFieldElement,
24015
+ initialValues: { emailOrPhone: "", password: "", token: "", otp: "", phone: "" },
24016
+ validationSchema: validationSchema(authProcess),
24017
+ onSubmit,
24018
+ validateOnChange: false,
24019
+ enableReinitialize: true,
24020
+ children: (formik) => {
24021
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Form, { noValidate: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
24022
+ Stack$1,
24023
+ {
24024
+ sx: {
24025
+ width: 400,
24026
+ backgroundColor: `${palette.background.default}${OPACITY[80]}`,
24027
+ backdropFilter: "blur(10px)",
24028
+ borderRadius: 3.5,
24029
+ padding: 3,
24030
+ boxShadow: 1,
24031
+ alignItems: "center"
24032
+ },
24033
+ gap: 3,
24034
+ children: [
24035
+ /* @__PURE__ */ jsxRuntimeExports.jsx(LogoComponent, { url: "/images/logo/logo-sub-4.svg" }),
24036
+ authProcess === AuthProcess.LOGIN && /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
24037
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24038
+ TextFieldElement,
24039
+ {
24040
+ iconLabel: "mail",
24041
+ label: "Số điện thoại",
24042
+ name: "emailOrPhone",
24043
+ placeholder: "Nhập số điện thoại",
24044
+ error: formik.errors.emailOrPhone,
24045
+ value: formik.values.emailOrPhone,
24046
+ onChange: formik.handleChange,
24047
+ sx: { "& fieldset": { borderColor: palette.primary.light } },
24048
+ required: true
24049
+ }
24050
+ ),
24051
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24052
+ TextFieldElement,
24053
+ {
24054
+ iconLabel: "vpn_key",
24055
+ label: "Mật khẩu",
24056
+ name: "password",
24057
+ autoComplete: "current-password",
24058
+ placeholder: "Nhập mật khẩu",
24059
+ error: formik.errors.password,
24060
+ value: formik.values.password,
24061
+ onChange: formik.handleChange,
24062
+ type: showPassword ? "text" : "password",
24063
+ sx: { "& fieldset": { borderColor: palette.primary.light } },
24064
+ InputProps: {
24065
+ endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24066
+ IconElement,
24067
+ {
24068
+ icon: showPassword ? "visibility" : "visibility_off",
24069
+ onClick: () => setShowPassword(!showPassword)
24070
+ }
24071
+ ) })
24072
+ },
24073
+ required: true
24074
+ }
24075
+ )
24076
+ ] }),
24077
+ authProcess === AuthProcess.FORGOT_PASSWORD && /* @__PURE__ */ jsxRuntimeExports.jsx(
24078
+ TextFieldElement,
24079
+ {
24080
+ iconLabel: "mail",
24081
+ label: "Số điện thoại",
24082
+ name: "phone",
24083
+ placeholder: "Nhập số điện thoại",
24084
+ sx: { "& fieldset": { borderColor: palette.primary.light } },
24085
+ error: formik.errors.phone,
24086
+ value: formik.values.phone,
24087
+ onChange: formik.handleChange,
24088
+ required: true
24089
+ }
24090
+ ),
24091
+ authProcess === AuthProcess.VERIFY_OTP && /* @__PURE__ */ jsxRuntimeExports.jsx(OtpPart, { setAuthProcess }),
24092
+ authProcess === AuthProcess.RESET_PASSWORD && /* @__PURE__ */ jsxRuntimeExports.jsx(
24093
+ TextFieldElement,
24094
+ {
24095
+ label: "Mật khẩu",
24096
+ placeholder: "Nhập mật khẩu",
24097
+ name: "password",
24098
+ error: formik.errors.password,
24099
+ required: true,
24100
+ value: formik.values.password,
24101
+ onChange: formik.handleChange,
24102
+ sx: { "& fieldset": { borderColor: palette.primary.light } },
24103
+ type: showPassword ? "text" : "password",
24104
+ InputProps: {
24105
+ endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24106
+ IconElement,
26042
24107
  {
26043
- iconLabel: "vpn_key",
26044
- label: "Mật khẩu",
26045
- name: "password",
26046
- autoComplete: "current-password",
26047
- placeholder: "Nhập mật khẩu",
26048
- error: formik.errors.password,
26049
- value: formik.values.password,
26050
- onChange: formik.handleChange,
26051
- type: showPassword ? "text" : "password",
26052
- sx: {
26053
- "& fieldset": { borderColor: palette.primary.light }
26054
- },
26055
- InputProps: {
26056
- endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
26057
- IconElement,
26058
- {
26059
- icon: showPassword ? "visibility" : "visibility_off",
26060
- onClick: () => setShowPassword(!showPassword)
26061
- }
26062
- ) })
26063
- },
26064
- required: true
26065
- }
26066
- )
26067
- ] }),
26068
- authProcess === AuthProcess.FORGOT_PASSWORD && /* @__PURE__ */ jsxRuntimeExports.jsx(
26069
- TextFieldElement,
26070
- {
26071
- iconLabel: "mail",
26072
- label: "Số điện thoại",
26073
- name: "phone",
26074
- placeholder: "Nhập số điện thoại",
26075
- sx: {
26076
- "& fieldset": { borderColor: palette.primary.light }
26077
- },
26078
- error: formik.errors.phone,
26079
- value: formik.values.phone,
26080
- onChange: formik.handleChange,
26081
- required: true
26082
- }
26083
- ),
26084
- authProcess === AuthProcess.VERIFY_OTP && /* @__PURE__ */ jsxRuntimeExports.jsx(OtpPart, { setAuthProcess }),
26085
- authProcess === AuthProcess.RESET_PASSWORD && /* @__PURE__ */ jsxRuntimeExports.jsx(
26086
- TextFieldElement,
26087
- {
26088
- label: "Mật khẩu",
26089
- placeholder: "Nhập mật khẩu",
26090
- name: "password",
26091
- error: formik.errors.password,
26092
- required: true,
26093
- value: formik.values.password,
26094
- onChange: formik.handleChange,
26095
- sx: {
26096
- "& fieldset": { borderColor: palette.primary.light }
26097
- },
26098
- type: showPassword ? "text" : "password",
26099
- InputProps: {
26100
- endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
26101
- IconElement,
26102
- {
26103
- icon: showPassword ? "visibility" : "visibility_off",
26104
- onClick: () => setShowPassword(!showPassword)
26105
- }
26106
- ) })
24108
+ icon: showPassword ? "visibility" : "visibility_off",
24109
+ onClick: () => setShowPassword(!showPassword)
26107
24110
  }
26108
- }
26109
- ),
26110
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26111
- IconContentElement,
26112
- {
26113
- icon: BUTTON_BACK_ICON_CONTENT[authProcess].backIcon,
26114
- content: BUTTON_BACK_ICON_CONTENT[authProcess].backContent,
26115
- sx: { flexDirection: "row-reverse", width: "100%" },
26116
- onClick: () => authProcess === AuthProcess.LOGIN ? setAuthProcess(AuthProcess.FORGOT_PASSWORD) : setAuthProcess(AuthProcess.LOGIN)
26117
- }
26118
- ),
26119
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26120
- ButtonElement,
26121
- {
26122
- loading,
26123
- content: BUTTON_BACK_ICON_CONTENT[authProcess].button,
26124
- type: "submit",
26125
- disabled: authProcess === AuthProcess.VERIFY_OTP ? formik.values.otp.length < 4 : false
26126
- }
26127
- )
26128
- ]
26129
- }
26130
- ) });
24111
+ ) })
24112
+ }
24113
+ }
24114
+ ),
24115
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24116
+ IconContentElement,
24117
+ {
24118
+ icon: BUTTON_BACK_ICON_CONTENT[authProcess].backIcon,
24119
+ content: BUTTON_BACK_ICON_CONTENT[authProcess].backContent,
24120
+ sx: { flexDirection: "row-reverse", width: "100%" },
24121
+ onClick: () => authProcess === AuthProcess.LOGIN ? setAuthProcess(AuthProcess.FORGOT_PASSWORD) : setAuthProcess(AuthProcess.LOGIN)
24122
+ }
24123
+ ),
24124
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24125
+ ButtonElement,
24126
+ {
24127
+ loading,
24128
+ content: BUTTON_BACK_ICON_CONTENT[authProcess].button,
24129
+ type: "submit",
24130
+ disabled: authProcess === AuthProcess.VERIFY_OTP ? formik.values.otp.length < 4 : false
24131
+ }
24132
+ )
24133
+ ]
26131
24134
  }
26132
- }
26133
- )
24135
+ ) });
24136
+ }
26134
24137
  }
26135
- );
24138
+ ) });
26136
24139
  };
26137
24140
  const DashboardPage = () => {
26138
24141
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {});
@@ -29461,10 +27464,10 @@ function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
29461
27464
  }
29462
27465
  return values2;
29463
27466
  }
29464
- const makeUseVisualState = (config2) => (props, isStatic) => {
27467
+ const makeUseVisualState = (config) => (props, isStatic) => {
29465
27468
  const context = useContext(MotionContext);
29466
27469
  const presenceContext = useContext(PresenceContext);
29467
- const make = () => makeState(config2, props, context, presenceContext);
27470
+ const make = () => makeState(config, props, context, presenceContext);
29468
27471
  return isStatic ? make() : useConstant(make);
29469
27472
  };
29470
27473
  function scrapeMotionValuesFromProps$1(props, prevProps, visualElement) {
@@ -31796,13 +29799,13 @@ class FlatTree {
31796
29799
  this.children.forEach(callback);
31797
29800
  }
31798
29801
  }
31799
- function delay(callback, timeout2) {
29802
+ function delay(callback, timeout) {
31800
29803
  const start = time.now();
31801
29804
  const checkElapsed = ({ timestamp }) => {
31802
29805
  const elapsed = timestamp - start;
31803
- if (elapsed >= timeout2) {
29806
+ if (elapsed >= timeout) {
31804
29807
  cancelFrame(checkElapsed);
31805
- callback(elapsed - timeout2);
29808
+ callback(elapsed - timeout);
31806
29809
  }
31807
29810
  };
31808
29811
  frame.setup(checkElapsed, true);
@@ -32788,10 +30791,10 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
32788
30791
  }
32789
30792
  const stack = this.sharedNodes.get(layoutId);
32790
30793
  stack.add(node);
32791
- const config2 = node.options.initialPromotionConfig;
30794
+ const config = node.options.initialPromotionConfig;
32792
30795
  node.promote({
32793
- transition: config2 ? config2.transition : void 0,
32794
- preserveFollowOpacity: config2 && config2.shouldPreserveFollowOpacity ? config2.shouldPreserveFollowOpacity(node) : void 0
30796
+ transition: config ? config.transition : void 0,
30797
+ preserveFollowOpacity: config && config.shouldPreserveFollowOpacity ? config.shouldPreserveFollowOpacity(node) : void 0
32795
30798
  });
32796
30799
  }
32797
30800
  isLead() {
@@ -33758,18 +31761,10 @@ const routes = [
33758
31761
  }
33759
31762
  ];
33760
31763
  const renderRoutes = (routes2, account) => routes2.map((route) => {
33761
- const {
33762
- path,
33763
- layout: layout2,
33764
- element,
33765
- type,
33766
- allowUserTypes = [],
33767
- children
33768
- } = route;
31764
+ const { path, layout: layout2, element, type, allowUserTypes = [], children } = route;
33769
31765
  const Layout = layout2 || React__default.Fragment;
33770
31766
  let Element2 = element;
33771
- if (path === PAGE.AUTH.path && account.isLogin)
33772
- Element2 = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: PAGE.DASHBOARD.path });
31767
+ if (path === PAGE.AUTH.path && account.isLogin) Element2 = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: PAGE.DASHBOARD.path });
33773
31768
  if (type === RouteType.PROTECTED) {
33774
31769
  if (!account.isLogin) Element2 = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: PAGE.AUTH.path });
33775
31770
  else if (allowUserTypes.length && !allowUserTypes.includes(account.user.type) && account.user.type !== UserType.ROOT)
@@ -33785,7 +31780,184 @@ const renderRoutes = (routes2, account) => routes2.map((route) => {
33785
31780
  path
33786
31781
  );
33787
31782
  });
31783
+ function useVersionCheck(options) {
31784
+ useEffect(() => {
31785
+ let currentVersion = localStorage.getItem("app_version");
31786
+ const checkVersion = async () => {
31787
+ try {
31788
+ const res = await fetch("/version.json", { cache: "no-store" });
31789
+ const data = await res.json();
31790
+ if (!currentVersion) {
31791
+ localStorage.setItem("app_version", data.version);
31792
+ currentVersion = data.version;
31793
+ return;
31794
+ }
31795
+ if (currentVersion !== data.version) {
31796
+ localStorage.setItem("app_version", data.version);
31797
+ window.location.reload();
31798
+ }
31799
+ } catch (err) {
31800
+ console.error("Failed to check version", err);
31801
+ }
31802
+ };
31803
+ checkVersion();
31804
+ if (options?.interval && options.interval > 0) {
31805
+ const timer = setInterval(checkVersion, options.interval);
31806
+ return () => clearInterval(timer);
31807
+ }
31808
+ }, [options?.interval]);
31809
+ }
33788
31810
  initSockets(store);
31811
+ function App() {
31812
+ useVersionCheck({ interval: 5 * 60 * 1e3 });
31813
+ const dispatch = useAppDispatch();
31814
+ const account = useSelector((state) => state.account);
31815
+ const system = useSelector((state) => state.system);
31816
+ const { showSnackbar } = useSnackbar();
31817
+ const theme = createTheme$2({
31818
+ ...MODE[system.mode],
31819
+ ...MODE.OTHER,
31820
+ components: {
31821
+ MuiStack: {
31822
+ styleOverrides: {
31823
+ root: { gap: STYLE.PADDING_GAP_LAYOUT }
31824
+ }
31825
+ },
31826
+ MuiButton: {
31827
+ defaultProps: {
31828
+ size: "medium",
31829
+ fullWidth: true
31830
+ },
31831
+ styleOverrides: {
31832
+ root: {
31833
+ "&.Mui-disabled": {
31834
+ borderColor: MODE[system.mode].palette.divider
31835
+ },
31836
+ fontWeight: 400,
31837
+ lineHeight: "unset",
31838
+ height: STYLE.HEIGHT_DEFAULT_TEXT_FIELD_BUTTON
31839
+ }
31840
+ }
31841
+ },
31842
+ MuiTooltip: {
31843
+ styleOverrides: {
31844
+ tooltip: {
31845
+ backgroundColor: MODE[system.mode].palette.background.paper,
31846
+ color: MODE[system.mode].palette.text.primary,
31847
+ boxShadow: MODE[system.mode].shadows[1],
31848
+ padding: STYLE.PADDING_GAP_ITEM,
31849
+ margin: `5px !important`,
31850
+ borderRadius: STYLE.BORDER_RADIUS_ELEMENT_WRAPPER,
31851
+ maxWidth: "none"
31852
+ }
31853
+ }
31854
+ },
31855
+ MuiTextField: {
31856
+ defaultProps: {
31857
+ variant: "outlined",
31858
+ size: "small",
31859
+ fullWidth: true
31860
+ },
31861
+ styleOverrides: {
31862
+ root: {
31863
+ "& fieldset": {
31864
+ borderColor: MODE[system.mode].palette.divider,
31865
+ borderRadius: STYLE.BORDER_RADIUS_ELEMENT
31866
+ },
31867
+ "& .MuiFormHelperText-root": {
31868
+ ...getLimitLineCss(1)
31869
+ }
31870
+ }
31871
+ }
31872
+ },
31873
+ MuiDivider: {
31874
+ styleOverrides: {
31875
+ root: {
31876
+ borderColor: `${MODE[system.mode].palette.divider}${OPACITY[30]}`
31877
+ }
31878
+ }
31879
+ },
31880
+ MuiTableCell: {
31881
+ styleOverrides: {
31882
+ root: {
31883
+ fontWeight: "unset",
31884
+ boxShadow: "none",
31885
+ border: "none",
31886
+ "&:first-of-type": {
31887
+ borderTopLeftRadius: STYLE.BORDER_RADIUS_ELEMENT,
31888
+ borderBottomLeftRadius: STYLE.BORDER_RADIUS_ELEMENT
31889
+ },
31890
+ "&:last-of-type": {
31891
+ borderTopRightRadius: STYLE.BORDER_RADIUS_ELEMENT,
31892
+ borderBottomRightRadius: STYLE.BORDER_RADIUS_ELEMENT
31893
+ }
31894
+ }
31895
+ }
31896
+ }
31897
+ }
31898
+ });
31899
+ useEffect(() => {
31900
+ (async () => {
31901
+ try {
31902
+ account.user && await dispatch(ACTION_ACCOUNT.getAccount(account.user.id)).unwrap();
31903
+ } catch (error) {
31904
+ showSnackbar({
31905
+ message: getErrorMessage(error),
31906
+ type: SnackbarType.ERROR
31907
+ });
31908
+ }
31909
+ })();
31910
+ }, []);
31911
+ useEffect(() => {
31912
+ (async () => {
31913
+ try {
31914
+ if (!("serviceWorker" in navigator)) return;
31915
+ const registration = await navigator.serviceWorker.register(
31916
+ "/firebase-messaging-sw.js"
31917
+ );
31918
+ await navigator.serviceWorker.ready;
31919
+ const permission = await Notification.requestPermission();
31920
+ if (permission === "granted" && account.isLogin && !account.fcmToken) {
31921
+ const fcmToken = await getToken(messaging, {
31922
+ vapidKey: void 0,
31923
+ serviceWorkerRegistration: registration
31924
+ });
31925
+ if (fcmToken)
31926
+ await dispatch(
31927
+ ACTION_ACCOUNT.subscribeTopic({ fcmToken })
31928
+ ).unwrap();
31929
+ }
31930
+ } catch (error) {
31931
+ showSnackbar({
31932
+ message: getErrorMessage(error),
31933
+ type: SnackbarType.ERROR
31934
+ });
31935
+ }
31936
+ })();
31937
+ }, [account.isLogin]);
31938
+ useEffect(() => {
31939
+ const handler = async (event) => {
31940
+ if (!event.data) return;
31941
+ const { title, message } = event.data;
31942
+ const currentCount = store.getState().account.notificationCount;
31943
+ await dispatch(
31944
+ ACTION_ACCOUNT.changeNotificationCount(currentCount + 1)
31945
+ ).unwrap();
31946
+ showSnackbar({
31947
+ message: `${title}: ${message}`,
31948
+ type: SnackbarType.INFO
31949
+ });
31950
+ };
31951
+ navigator.serviceWorker.addEventListener("message", handler);
31952
+ return () => {
31953
+ navigator.serviceWorker.removeEventListener("message", handler);
31954
+ };
31955
+ }, []);
31956
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(ThemeProvider, { theme, children: [
31957
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CssBaseline, {}),
31958
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Routes, { children: renderRoutes(routes, account) })
31959
+ ] });
31960
+ }
33789
31961
  var Country = /* @__PURE__ */ ((Country2) => {
33790
31962
  Country2["VIETNAM"] = "Vietnam";
33791
31963
  Country2["USA"] = "USA";
@@ -33924,12 +32096,10 @@ const useTagSelector = (movementId) => {
33924
32096
  };
33925
32097
  };
33926
32098
  export {
33927
- ALLOW_USER_TYPES,
33928
32099
  ANIMATION_TIME,
33929
32100
  AppCategory,
33930
32101
  AppType,
33931
32102
  BACKGROUND_SYSTEM,
33932
- BOOKING_SCREEN,
33933
32103
  BORDER_COLOR,
33934
32104
  BORDER_COLOR_CARD,
33935
32105
  BORDER_COLOR_LAYOUT,
@@ -33940,8 +32110,6 @@ export {
33940
32110
  BORDER_RADIUS_ELEMENT_TAG,
33941
32111
  BORDER_RADIUS_ELEMENT_WRAPPER,
33942
32112
  Country,
33943
- DASHBOARD_BASE,
33944
- DASHBOARD_SCREEN,
33945
32113
  FONT_SIZE_ICON,
33946
32114
  FONT_SIZE_LOADING,
33947
32115
  FileTypeEnum,
@@ -33969,8 +32137,6 @@ export {
33969
32137
  PADDING_GAP_LAYOUT,
33970
32138
  PADDING_GAP_TAB,
33971
32139
  PADDING_LAYOUT_HEADER,
33972
- PAGE,
33973
- PREFIX_WORKFLOW_ENGINE,
33974
32140
  PaymentMethod,
33975
32141
  RefreshTokenStatus,
33976
32142
  RejectionReason,
@@ -33979,8 +32145,7 @@ export {
33979
32145
  SCALE_VALUE,
33980
32146
  STYLE,
33981
32147
  SYSTEM_MODULES,
33982
- SnackbarProvider,
33983
- SnackbarType,
32148
+ App as SevagoSSOApp,
33984
32149
  SocketNamespace,
33985
32150
  SocketSystemEvent,
33986
32151
  SocketSystemRoom,
@@ -34022,8 +32187,6 @@ export {
34022
32187
  WIDTH_SIDEBAR,
34023
32188
  WIDTH_SIDEBAR_EXPAND,
34024
32189
  WIDTH_TEXT_FIELD,
34025
- WORKFLOW_ENGINE_SCREEN,
34026
- WORKFLOW_TRACKING_SCREEN,
34027
32190
  authApi,
34028
32191
  axiosRequest,
34029
32192
  checkNowYear,
@@ -34067,7 +32230,7 @@ export {
34067
32230
  refreshToken$1 as refreshToken,
34068
32231
  renderRoutes,
34069
32232
  resetPassword$1 as resetPassword,
34070
- routes,
32233
+ PAGE as routeConstants,
34071
32234
  socketConfig,
34072
32235
  store,
34073
32236
  stringToColor,
@@ -34082,14 +32245,11 @@ export {
34082
32245
  updateNotification,
34083
32246
  updateNotificationSetting,
34084
32247
  updateUser,
34085
- useActiveSidebar,
34086
- useAllApps,
34087
32248
  useApps,
34088
- useIsSystemMonitor,
34089
- useSidebarState,
34090
32249
  useSnackbar,
34091
32250
  useTagSelector,
34092
32251
  useUpdateCurrentAccess,
32252
+ useVersionCheck,
34093
32253
  userApi,
34094
32254
  verifyOtp
34095
32255
  };