react-luminus-components 2.0.30 → 2.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/.vite/manifest.json +40 -40
  2. package/dist/{FormDisabledProvider-BdVAJaqG.js → FormDisabledProvider-CknAF8EI.js} +1 -1
  3. package/dist/{FormDisabledProvider-DyO7R2kE.cjs → FormDisabledProvider-DoGy2C4j.cjs} +1 -1
  4. package/dist/components/common/NotificationCenter/Actions/NotificationActions.d.ts +23 -0
  5. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/ActionTemplates.d.ts +1 -1
  6. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/comps/Recipients/NotificationRecipients.d.ts +1 -1
  7. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/comps/modals/NotificationTargetModal.d.ts +1 -1
  8. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/HistoryTable/NotificationHistoryTable.d.ts +3 -3
  9. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/modals/NotificationActionAddModal.d.ts +1 -1
  10. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/modals/NotificationTemplateAddModal.d.ts +2 -2
  11. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/modals/NotificationTemplateEditModal.d.ts +2 -2
  12. package/dist/components/common/NotificationCenter/NotifStyles/NotifStyles.d.ts +8 -0
  13. package/dist/components/common/NotificationCenter/Users/NotificationUsers.d.ts +12 -0
  14. package/dist/components/{NotifCenter → common/NotificationCenter}/Users/components/EmployeeNotifTable/EmployeeNotifHistoryTable.d.ts +2 -2
  15. package/dist/components/{NotifCenter → common/NotificationCenter}/index.d.ts +1 -1
  16. package/dist/components/common/index.d.ts +3 -0
  17. package/dist/contexts.cjs.js +1 -1
  18. package/dist/contexts.es.js +598 -598
  19. package/dist/hooks.cjs.js +1 -1
  20. package/dist/hooks.es.js +31 -31
  21. package/dist/layout.cjs.js +1 -1
  22. package/dist/layout.es.js +216 -210
  23. package/dist/{localStorageUtils-D2opn367.js → localStorageUtils-CZ4HDRzi.js} +2 -2
  24. package/dist/main.cjs.js +8 -8
  25. package/dist/main.d.ts +1 -3
  26. package/dist/main.es.js +8616 -8582
  27. package/dist/{nivo-bar-CdrSgzV1.cjs → nivo-bar-BkpPCncR.cjs} +1 -1
  28. package/dist/{nivo-bar-BsmDtzXw.js → nivo-bar-wBsr2P1t.js} +65 -65
  29. package/dist/style.css +1 -1
  30. package/dist/{useIsFormDirty-Pdd8CdTQ.js → useIsFormDirty-CTuj9_Nd.js} +1 -1
  31. package/dist/{useIsFormDirty-CzwHpad1.cjs → useIsFormDirty-Cb4GEBID.cjs} +1 -1
  32. package/dist/{useLocalStorageState-Byzo2ssr.js → useLocalStorageState-DBd2vOH1.js} +1 -1
  33. package/dist/{useLocalStorageState-CbsbIUSp.cjs → useLocalStorageState-gKbms6va.cjs} +1 -1
  34. package/dist/utils.cjs.js +1 -1
  35. package/dist/utils.es.js +16 -16
  36. package/package.json +1 -1
  37. package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +0 -22
  38. package/dist/components/NotifCenter/NotifStyles/NotifStyles.d.ts +0 -10
  39. package/dist/components/NotifCenter/NotifStyles/hooks/useNotifStyleFormSchema.d.ts +0 -20
  40. package/dist/components/NotifCenter/NotifStyles/hooks/useNotifStyleTableColumns.d.ts +0 -7
  41. package/dist/components/NotifCenter/Users/NotificationUsers.d.ts +0 -10
  42. /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/comps/index.d.ts +0 -0
  43. /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/index.d.ts +0 -0
  44. /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/hooks/useNotifTemplateUtils.d.ts +0 -0
  45. /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/types/NotificationKindFullModel.d.ts +0 -0
  46. /package/dist/components/{NotifCenter → common/NotificationCenter}/Users/components/index.d.ts +0 -0
@@ -1,32 +1,32 @@
1
1
  {
2
- "_FormDisabledProvider-BdVAJaqG.js": {
3
- "file": "FormDisabledProvider-BdVAJaqG.js",
2
+ "_FormDisabledProvider-CknAF8EI.js": {
3
+ "file": "FormDisabledProvider-CknAF8EI.js",
4
4
  "name": "FormDisabledProvider",
5
5
  "imports": [
6
- "_nivo-bar-BsmDtzXw.js"
6
+ "_nivo-bar-wBsr2P1t.js"
7
7
  ]
8
8
  },
9
- "_FormDisabledProvider-DyO7R2kE.cjs": {
10
- "file": "FormDisabledProvider-DyO7R2kE.cjs",
9
+ "_FormDisabledProvider-DoGy2C4j.cjs": {
10
+ "file": "FormDisabledProvider-DoGy2C4j.cjs",
11
11
  "name": "FormDisabledProvider",
12
12
  "imports": [
13
- "_nivo-bar-CdrSgzV1.cjs"
13
+ "_nivo-bar-BkpPCncR.cjs"
14
14
  ]
15
15
  },
16
- "_localStorageUtils-CkZslzIU.cjs": {
17
- "file": "localStorageUtils-CkZslzIU.cjs",
16
+ "_localStorageUtils-CZ4HDRzi.js": {
17
+ "file": "localStorageUtils-CZ4HDRzi.js",
18
18
  "name": "localStorageUtils"
19
19
  },
20
- "_localStorageUtils-D2opn367.js": {
21
- "file": "localStorageUtils-D2opn367.js",
20
+ "_localStorageUtils-CkZslzIU.cjs": {
21
+ "file": "localStorageUtils-CkZslzIU.cjs",
22
22
  "name": "localStorageUtils"
23
23
  },
24
- "_nivo-bar-BsmDtzXw.js": {
25
- "file": "nivo-bar-BsmDtzXw.js",
24
+ "_nivo-bar-BkpPCncR.cjs": {
25
+ "file": "nivo-bar-BkpPCncR.cjs",
26
26
  "name": "nivo-bar"
27
27
  },
28
- "_nivo-bar-CdrSgzV1.cjs": {
29
- "file": "nivo-bar-CdrSgzV1.cjs",
28
+ "_nivo-bar-wBsr2P1t.js": {
29
+ "file": "nivo-bar-wBsr2P1t.js",
30
30
  "name": "nivo-bar"
31
31
  },
32
32
  "_queryStorage-C8e71gxx.js": {
@@ -37,34 +37,34 @@
37
37
  "file": "queryStorage-Dk70bkj7.cjs",
38
38
  "name": "queryStorage"
39
39
  },
40
- "_useIsFormDirty-CzwHpad1.cjs": {
41
- "file": "useIsFormDirty-CzwHpad1.cjs",
40
+ "_useIsFormDirty-CTuj9_Nd.js": {
41
+ "file": "useIsFormDirty-CTuj9_Nd.js",
42
42
  "name": "useIsFormDirty",
43
43
  "imports": [
44
- "_nivo-bar-CdrSgzV1.cjs",
45
- "_queryStorage-Dk70bkj7.cjs"
44
+ "_nivo-bar-wBsr2P1t.js",
45
+ "_queryStorage-C8e71gxx.js"
46
46
  ]
47
47
  },
48
- "_useIsFormDirty-Pdd8CdTQ.js": {
49
- "file": "useIsFormDirty-Pdd8CdTQ.js",
48
+ "_useIsFormDirty-Cb4GEBID.cjs": {
49
+ "file": "useIsFormDirty-Cb4GEBID.cjs",
50
50
  "name": "useIsFormDirty",
51
51
  "imports": [
52
- "_nivo-bar-BsmDtzXw.js",
53
- "_queryStorage-C8e71gxx.js"
52
+ "_nivo-bar-BkpPCncR.cjs",
53
+ "_queryStorage-Dk70bkj7.cjs"
54
54
  ]
55
55
  },
56
- "_useLocalStorageState-Byzo2ssr.js": {
57
- "file": "useLocalStorageState-Byzo2ssr.js",
56
+ "_useLocalStorageState-DBd2vOH1.js": {
57
+ "file": "useLocalStorageState-DBd2vOH1.js",
58
58
  "name": "useLocalStorageState",
59
59
  "imports": [
60
- "_nivo-bar-BsmDtzXw.js"
60
+ "_nivo-bar-wBsr2P1t.js"
61
61
  ]
62
62
  },
63
- "_useLocalStorageState-CbsbIUSp.cjs": {
64
- "file": "useLocalStorageState-CbsbIUSp.cjs",
63
+ "_useLocalStorageState-gKbms6va.cjs": {
64
+ "file": "useLocalStorageState-gKbms6va.cjs",
65
65
  "name": "useLocalStorageState",
66
66
  "imports": [
67
- "_nivo-bar-CdrSgzV1.cjs"
67
+ "_nivo-bar-BkpPCncR.cjs"
68
68
  ]
69
69
  },
70
70
  "src/contexts/index.ts": {
@@ -73,9 +73,9 @@
73
73
  "src": "src/contexts/index.ts",
74
74
  "isEntry": true,
75
75
  "imports": [
76
- "_nivo-bar-CdrSgzV1.cjs",
77
- "_FormDisabledProvider-DyO7R2kE.cjs",
78
- "_useLocalStorageState-CbsbIUSp.cjs"
76
+ "_nivo-bar-BkpPCncR.cjs",
77
+ "_FormDisabledProvider-DoGy2C4j.cjs",
78
+ "_useLocalStorageState-gKbms6va.cjs"
79
79
  ]
80
80
  },
81
81
  "src/hooks/index.ts": {
@@ -84,9 +84,9 @@
84
84
  "src": "src/hooks/index.ts",
85
85
  "isEntry": true,
86
86
  "imports": [
87
- "_nivo-bar-CdrSgzV1.cjs",
88
- "_useLocalStorageState-CbsbIUSp.cjs",
89
- "_useIsFormDirty-CzwHpad1.cjs"
87
+ "_nivo-bar-BkpPCncR.cjs",
88
+ "_useLocalStorageState-gKbms6va.cjs",
89
+ "_useIsFormDirty-Cb4GEBID.cjs"
90
90
  ]
91
91
  },
92
92
  "src/layout/index.ts": {
@@ -95,7 +95,7 @@
95
95
  "src": "src/layout/index.ts",
96
96
  "isEntry": true,
97
97
  "imports": [
98
- "_nivo-bar-CdrSgzV1.cjs"
98
+ "_nivo-bar-BkpPCncR.cjs"
99
99
  ]
100
100
  },
101
101
  "src/main.ts": {
@@ -104,11 +104,11 @@
104
104
  "src": "src/main.ts",
105
105
  "isEntry": true,
106
106
  "imports": [
107
- "_nivo-bar-CdrSgzV1.cjs",
108
- "_FormDisabledProvider-DyO7R2kE.cjs",
107
+ "_nivo-bar-BkpPCncR.cjs",
108
+ "_FormDisabledProvider-DoGy2C4j.cjs",
109
109
  "_localStorageUtils-CkZslzIU.cjs",
110
- "_useIsFormDirty-CzwHpad1.cjs",
111
- "_useLocalStorageState-CbsbIUSp.cjs"
110
+ "_useIsFormDirty-Cb4GEBID.cjs",
111
+ "_useLocalStorageState-gKbms6va.cjs"
112
112
  ]
113
113
  },
114
114
  "src/utils/index.ts": {
@@ -117,7 +117,7 @@
117
117
  "src": "src/utils/index.ts",
118
118
  "isEntry": true,
119
119
  "imports": [
120
- "_nivo-bar-CdrSgzV1.cjs",
120
+ "_nivo-bar-BkpPCncR.cjs",
121
121
  "_localStorageUtils-CkZslzIU.cjs",
122
122
  "_queryStorage-Dk70bkj7.cjs"
123
123
  ]
@@ -1,5 +1,5 @@
1
1
  import { jsxs as _, jsx as a } from "react/jsx-runtime";
2
- import { c as l, a as i, t as h, b as c, ck as m } from "./nivo-bar-BsmDtzXw.js";
2
+ import { c as l, a as i, t as h, b as c, ck as m } from "./nivo-bar-wBsr2P1t.js";
3
3
  const g = "_loading_obchl_1", p = "_spinner-grow_obchl_10", u = "_second_obchl_14", b = "_third_obchl_17", f = "_loadingBlock_obchl_21", w = "_sizeLine_obchl_29", F = "_sizeFill_obchl_36", r = {
4
4
  loading: g,
5
5
  spinnerGrow: p,
@@ -1 +1 @@
1
- "use strict";const c=require("react/jsx-runtime"),t=require("./nivo-bar-CdrSgzV1.cjs"),d="_loading_obchl_1",m="_spinner-grow_obchl_10",_="_second_obchl_14",u="_third_obchl_17",h="_loadingBlock_obchl_21",g="_sizeLine_obchl_29",p="_sizeFill_obchl_36",r={loading:d,spinnerGrow:m,second:_,third:u,loadingBlock:h,sizeLine:g,sizeFill:p},b=()=>{const e=t.compilerRuntimeExports.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=c.jsxs("div",{className:t.classNames("luminus-loading",r.loading),children:[c.jsx("div",{className:t.classNames("spinner-grow",r.spinnerGrow,"text-primary"),role:"status"}),c.jsx("div",{className:t.classNames("spinner-grow",r.spinnerGrow,"text-primary",r.second),role:"status"}),c.jsx("div",{className:t.classNames("spinner-grow",r.spinnerGrow,"text-primary",r.third),role:"status"})]}),e[0]=s):s=e[0],s};function l(e,s){const n=t.toDate(e);if(isNaN(s))return t.constructFrom(e,NaN);if(!s)return n;const i=n.getDate(),o=t.constructFrom(e,n.getTime());o.setMonth(n.getMonth()+s+1,0);const a=o.getDate();return i>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function x(e,s){return l(e,s*12)}const N=e=>{const s=t.compilerRuntimeExports.c(3),{children:n,disabled:i}=e;let o;return s[0]!==n||s[1]!==i?(o=c.jsx(t.FormDisabledContext.Provider,{value:i,children:n}),s[0]=n,s[1]=i,s[2]=o):o=s[2],o};exports.FormDisabledProvider=N;exports.Loading=b;exports.addMonths=l;exports.addYears=x;exports.classes=r;
1
+ "use strict";const c=require("react/jsx-runtime"),t=require("./nivo-bar-BkpPCncR.cjs"),d="_loading_obchl_1",m="_spinner-grow_obchl_10",_="_second_obchl_14",u="_third_obchl_17",h="_loadingBlock_obchl_21",g="_sizeLine_obchl_29",p="_sizeFill_obchl_36",r={loading:d,spinnerGrow:m,second:_,third:u,loadingBlock:h,sizeLine:g,sizeFill:p},b=()=>{const e=t.compilerRuntimeExports.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=c.jsxs("div",{className:t.classNames("luminus-loading",r.loading),children:[c.jsx("div",{className:t.classNames("spinner-grow",r.spinnerGrow,"text-primary"),role:"status"}),c.jsx("div",{className:t.classNames("spinner-grow",r.spinnerGrow,"text-primary",r.second),role:"status"}),c.jsx("div",{className:t.classNames("spinner-grow",r.spinnerGrow,"text-primary",r.third),role:"status"})]}),e[0]=s):s=e[0],s};function l(e,s){const n=t.toDate(e);if(isNaN(s))return t.constructFrom(e,NaN);if(!s)return n;const i=n.getDate(),o=t.constructFrom(e,n.getTime());o.setMonth(n.getMonth()+s+1,0);const a=o.getDate();return i>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function x(e,s){return l(e,s*12)}const N=e=>{const s=t.compilerRuntimeExports.c(3),{children:n,disabled:i}=e;let o;return s[0]!==n||s[1]!==i?(o=c.jsx(t.FormDisabledContext.Provider,{value:i,children:n}),s[0]=n,s[1]=i,s[2]=o):o=s[2],o};exports.FormDisabledProvider=N;exports.Loading=b;exports.addMonths=l;exports.addYears=x;exports.classes=r;
@@ -0,0 +1,23 @@
1
+ import { default as NotificationKindFullModel } from './types/NotificationKindFullModel';
2
+
3
+ export type Props = {
4
+ kinds: NotificationKindFullModel[];
5
+ targetSystem: 1 | 2 | 4;
6
+ apiUrl?: {
7
+ apiGetActionsUrl?: (kindId: number) => string;
8
+ apiGetActionHistoryUrl?: (actionId: number, templateId: number, searchString: string | null) => string;
9
+ apiGetActionRolesUrl?: (actionId: number) => string;
10
+ apiDeleteActionTargetUrl?: (id: number) => string;
11
+ apiPostActionTargetUrl?: string;
12
+ apiPutEditTemplateUrl?: string;
13
+ apiPostActionUrl?: string;
14
+ apiPostTemplateUrl?: string;
15
+ apiDeleteTemplateUrl?: (id: number) => string;
16
+ apiPostShowPreviewUrl?: string;
17
+ apiGetEntitiesUrl?: string;
18
+ apiGetStylesUrl?: string;
19
+ };
20
+ EmployeePicker: React.ElementType;
21
+ };
22
+ declare const NotificationActions: ({ kinds, targetSystem, EmployeePicker, apiUrl: { apiGetActionsUrl, apiGetActionHistoryUrl, apiGetActionRolesUrl, apiDeleteActionTargetUrl, apiPostActionTargetUrl, apiPutEditTemplateUrl, apiPostActionUrl, apiPostTemplateUrl, apiDeleteTemplateUrl, apiPostShowPreviewUrl, apiGetEntitiesUrl, apiGetStylesUrl, }, }: Props) => import("react").JSX.Element;
23
+ export default NotificationActions;
@@ -1,4 +1,4 @@
1
- import { NotificationTemplate, NotifTargetModel } from '../../../../../models/index';
1
+ import { NotificationTemplate, NotifTargetModel } from '../../../../../../models/index';
2
2
  import { Dispatch, SetStateAction } from 'react';
3
3
 
4
4
  type Props = {
@@ -1,4 +1,4 @@
1
- import { NotificationTarget } from '../../../../../../../models/index';
1
+ import { NotificationTarget } from '../../../../../../../../models/index';
2
2
 
3
3
  type Props = {
4
4
  targets: NotificationTarget[] | null;
@@ -1,4 +1,4 @@
1
- import { NotifTargetModel } from '../../../../../../../models/index';
1
+ import { NotifTargetModel } from '../../../../../../../../models/index';
2
2
 
3
3
  type Props = {
4
4
  show: boolean;
@@ -1,6 +1,6 @@
1
- import { default as BnfTableWrappedProps } from '../../../../../models/bnfTable/BnfTableWrappedProps';
2
- import { NotificationHistoryModel } from '../../../../../models/index';
3
- import { default as NotificationHistoryTableModel } from '../../../../../models/ui/notifications/NotificationHistoryTableModel';
1
+ import { default as BnfTableWrappedProps } from '../../../../../../models/bnfTable/BnfTableWrappedProps';
2
+ import { NotificationHistoryModel } from '../../../../../../models/index';
3
+ import { default as NotificationHistoryTableModel } from '../../../../../../models/ui/notifications/NotificationHistoryTableModel';
4
4
 
5
5
  type Props<T> = {
6
6
  data: NotificationHistoryModel[];
@@ -1,4 +1,4 @@
1
- import { NameIdIntModel, NotificationModel } from '../../../../../models/index';
1
+ import { NameIdIntModel, NotificationModel } from '../../../../../../models/index';
2
2
 
3
3
  type Props = {
4
4
  show: boolean;
@@ -1,5 +1,5 @@
1
- import { NameIdIntModel } from '../../../../../models/index';
2
- import { default as NotifTemplateCreateModel } from '../../../../../models/types/notifCenter/NotifTemplateCreateModel';
1
+ import { NameIdIntModel } from '../../../../../../models/index';
2
+ import { default as NotifTemplateCreateModel } from '../../../../../../models/types/notifCenter/NotifTemplateCreateModel';
3
3
 
4
4
  type Props = {
5
5
  show: boolean;
@@ -1,5 +1,5 @@
1
- import { EmailViewModel, NameIdIntModel, NameIdStringModel, NotificationPreviewModel, NotificationTemplate } from '../../../../../models/index';
2
- import { default as NotifTemplateEditModel } from '../../../../../models/types/notifCenter/NotifTemplateEditModel';
1
+ import { EmailViewModel, NameIdIntModel, NameIdStringModel, NotificationPreviewModel, NotificationTemplate } from '../../../../../../models/index';
2
+ import { default as NotifTemplateEditModel } from '../../../../../../models/types/notifCenter/NotifTemplateEditModel';
3
3
 
4
4
  type Props = {
5
5
  show: boolean;
@@ -0,0 +1,8 @@
1
+ type Props = {
2
+ urls?: {
3
+ apiGetStylesUrl?: string;
4
+ apiPostStyleUrl?: string;
5
+ };
6
+ };
7
+ declare const NotifStyles: ({ urls: { apiGetStylesUrl, apiPostStyleUrl, }, }: Props) => import("react").JSX.Element;
8
+ export default NotifStyles;
@@ -0,0 +1,12 @@
1
+ import { default as BnfTableWrappedProps } from '../../../../models/bnfTable/BnfTableWrappedProps';
2
+ import { NotificationHistoryUserDto } from '../../../../models/index';
3
+
4
+ type Props<T> = {
5
+ apiUrls?: {
6
+ apiGetUserHistoryUrl?: (employeeId: number) => string;
7
+ };
8
+ EmployeePicker: React.ElementType;
9
+ BnfTableComponent: React.ComponentType<BnfTableWrappedProps<T>>;
10
+ };
11
+ declare const NotificationUsers: ({ apiUrls: { apiGetUserHistoryUrl }, EmployeePicker, BnfTableComponent, }: Props<NotificationHistoryUserDto>) => import("react").JSX.Element;
12
+ export default NotificationUsers;
@@ -1,5 +1,5 @@
1
- import { default as BnfTableWrappedProps } from '../../../../../models/bnfTable/BnfTableWrappedProps';
2
- import { NotificationHistoryUserDto } from '../../../../../models/index';
1
+ import { default as BnfTableWrappedProps } from '../../../../../../models/bnfTable/BnfTableWrappedProps';
2
+ import { NotificationHistoryUserDto } from '../../../../../../models/index';
3
3
 
4
4
  type Props<T> = {
5
5
  history: NotificationHistoryUserDto[];
@@ -1,3 +1,3 @@
1
1
  export { default as NotificationActions } from './Actions/NotificationActions';
2
2
  export { default as NotificationUsers } from './Users/NotificationUsers';
3
- export { default as NotifStyles } from './NotifStyles/NotifStyles';
3
+ export { default as NotificationStyles } from './NotifStyles/NotifStyles';
@@ -58,3 +58,6 @@ export { default as GdprOverview } from './GdprOverview/GdprOverview';
58
58
  export { default as BatchSetOverview } from './BatchSet/Overview/BatchSetOverview';
59
59
  export { default as BatchSetDetail } from './BatchSet/Detail/BatchSetDetail';
60
60
  export { default as BatchSetCreate } from './BatchSet/Create/BatchSetCreate';
61
+ export { default as NotificationActions } from './NotificationCenter/Actions/NotificationActions';
62
+ export { default as NotificationUsers } from './NotificationCenter/Users/NotificationUsers';
63
+ export { default as NotificationStyles } from './NotificationCenter/NotifStyles/NotifStyles';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./nivo-bar-CdrSgzV1.cjs"),b=require("react/jsx-runtime"),S=require("react"),j=require("@azure/msal-browser"),Q=require("@azure/msal-react");require("react-router");require("react-dom");require("react-hook-form");require("react-flexmonster");const K=require("./FormDisabledProvider-DyO7R2kE.cjs"),Y=require("./useLocalStorageState-CbsbIUSp.cjs");function ae(t){const e=o.toDate(t);return e.setHours(23,59,59,999),e}function le(){return ae(Date.now())}function ce(t,e){const n=+o.toDate(t),[r,s]=[+o.toDate(e.start),+o.toDate(e.end)].sort((i,a)=>i-a);return n>=r&&n<=s}function ue(){return o.startOfDay(Date.now())}const he=t=>{const e=o.compilerRuntimeExports.c(10),{children:n}=t,[r,s]=S.useState(!1),[i,a]=S.useState(""),[l,c]=S.useState(void 0);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=(v,m)=>{s(!0),a(v),c(m)},e[0]=h):h=e[0];const u=h;let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{s(!1)},e[1]=f):f=e[1];const p=f;let d;e[2]!==r||e[3]!==i||e[4]!==l?(d={show:r,text:i,showConfirm:u,hideConfirm:p,textSm:l},e[2]=r,e[3]=i,e[4]=l,e[5]=d):d=e[5];const _=d;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=b.jsx(Ge,{}),e[6]=w):w=e[6];let g;return e[7]!==n||e[8]!==_?(g=b.jsxs(o.ConfirmContext.Provider,{value:_,children:[w,n]}),e[7]=n,e[8]=_,e[9]=g):g=e[9],g},ge=()=>{const t=o.compilerRuntimeExports.c(43),{texts:e}=S.useContext(o.LuminusComponentsContext),{confirm:n}=e,{isShown:r,text:s,onFinish:i}=o.usePrompt(),{options:a}=S.useContext(o.PromptContext),[l,c]=S.useState(a.defaultValue??"");let h;t[0]!==i?(h=()=>{i(null)},t[0]=i,t[1]=h):h=t[1];const u=h;let f;t[2]!==i||t[3]!==a.required||t[4]!==l?(f=$=>{$.preventDefault(),!(a.required&&!l)&&(i(l),c(""))},t[2]=i,t[3]=a.required,t[4]=l,t[5]=f):f=t[5];const p=f;let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=$=>c($.currentTarget.value),t[6]=d):d=t[6];let _;t[7]!==l?(_={value:l,onChange:d,className:"w-100",autoFocus:!0,tabIndex:0},t[7]=l,t[8]=_):_=t[8];const w=_;let g,v;t[9]!==r||t[10]!==a.defaultValue?(g=()=>{r===!0&&c(a.defaultValue??"")},v=[r,a.defaultValue],t[9]=r,t[10]=a.defaultValue,t[11]=g,t[12]=v):(g=t[11],v=t[12]),S.useEffect(g,v);let m;t[13]!==s?(m=b.jsx(o.Modal.Header,{className:"justify-content-center",children:b.jsx(o.Modal.Title,{children:s})}),t[13]=s,t[14]=m):m=t[14];let L;t[15]!==w||t[16]!==a.input?(L=a.input==="textarea"?b.jsx("textarea",{...w,rows:5}):void 0,t[15]=w,t[16]=a.input,t[17]=L):L=t[17];let C;t[18]!==w||t[19]!==a.input||t[20]!==a.type?(C=a.input==="input"?b.jsx(o.FormControl,{...w,type:a.type}):void 0,t[18]=w,t[19]=a.input,t[20]=a.type,t[21]=C):C=t[21];let y;t[22]!==L||t[23]!==C?(y=b.jsxs(o.Modal.Body,{children:[L,C]}),t[22]=L,t[23]=C,t[24]=y):y=t[24];let E;t[25]!==n.cancel||t[26]!==u?(E=b.jsx(o.PrimaryButton,{variant:"outlined",color:"secondary",onClick:u,className:"flex-grow-1",children:n.cancel}),t[25]=n.cancel,t[26]=u,t[27]=E):E=t[27];const I=a.required&&!l;let k;t[28]!==n.confirm||t[29]!==I?(k=b.jsx(o.PrimaryButton,{color:"primary",disabled:I,type:"submit",className:"flex-grow-1",children:n.confirm}),t[28]=n.confirm,t[29]=I,t[30]=k):k=t[30];let D;t[31]!==E||t[32]!==k?(D=b.jsxs(o.Modal.Footer,{className:"w-100 d-flex gap-5",children:[E,k]}),t[31]=E,t[32]=k,t[33]=D):D=t[33];let x;t[34]!==p||t[35]!==y||t[36]!==D?(x=b.jsxs("form",{onSubmit:p,onKeyDown:de,children:[y,D]}),t[34]=p,t[35]=y,t[36]=D,t[37]=x):x=t[37];let R;return t[38]!==r||t[39]!==u||t[40]!==x||t[41]!==m?(R=b.jsxs(o.Modal,{show:r,size:"sm",centered:!0,onHide:u,children:[m,x]}),t[38]=r,t[39]=u,t[40]=x,t[41]=m,t[42]=R):R=t[42],R};function de(t){return t.stopPropagation()}const fe=t=>{const e=o.compilerRuntimeExports.c(11),{children:n}=t,[r,s]=S.useState(!1),[i,a]=S.useState("");let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={input:"textarea",type:"text"},e[0]=l):l=e[0];const[c,h]=S.useState(l),u=S.useRef(pe);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=L=>{a(L),s(!0)},e[1]=f):f=e[1];const p=f;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{s(!1)},e[2]=d):d=e[2];const _=d;let w;e[3]!==r||e[4]!==c||e[5]!==i?(w={isShown:r,text:i,showPrompt:p,hidePrompt:_,resolveRef:u,options:c,setOptions:h},e[3]=r,e[4]=c,e[5]=i,e[6]=w):w=e[6];const g=w;let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=b.jsx(ge,{}),e[7]=v):v=e[7];let m;return e[8]!==n||e[9]!==g?(m=b.jsxs(o.PromptContext.Provider,{value:g,children:[n,v]}),e[8]=n,e[9]=g,e[10]=m):m=e[10],m};function pe(){}const _e=t=>{const e=o.compilerRuntimeExports.c(14),{cookieDomain:n,axiosOptions:r,language:s,texts:i,ProjectIconComponent:a,localizationContext:l,chartColorPalette:c,children:h}=t;let u;e[0]!==a||e[1]!==r||e[2]!==c||e[3]!==n||e[4]!==s||e[5]!==l||e[6]!==i?(u={axiosOptions:r,cookieDomain:n,language:s,texts:i,ProjectIconComponent:a,localizationContext:l,chartColorPalette:c},e[0]=a,e[1]=r,e[2]=c,e[3]=n,e[4]=s,e[5]=l,e[6]=i,e[7]=u):u=e[7];const f=u;let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=b.jsx(o.Fe,{}),e[8]=p):p=e[8];let d;e[9]!==h?(d=b.jsx(he,{children:b.jsxs(fe,{children:[p,h]})}),e[9]=h,e[10]=d):d=e[10];let _;return e[11]!==f||e[12]!==d?(_=b.jsx(o.LuminusComponentsContext.Provider,{value:f,children:d}),e[11]=f,e[12]=d,e[13]=_):_=e[13],_},me=t=>{const e=o.compilerRuntimeExports.c(15),{children:n}=t,[r,s]=S.useState(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=new Set,e[0]=i):i=e[0];const[a]=S.useState(i);let l;e[1]!==a?(l=w=>{a.add(w),s(!0)},e[1]=a,e[2]=l):l=e[2];const c=l;let h;e[3]!==a?(h=w=>{a.delete(w),a.size===0&&s(!1)},e[3]=a,e[4]=h):h=e[4];const u=h;let f;e[5]!==r||e[6]!==c||e[7]!==u?(f={isLoading:r,startLoading:c,stopLoading:u},e[5]=r,e[6]=c,e[7]=u,e[8]=f):f=e[8];const p=f;let d;e[9]!==r?(d=r&&b.jsx(K.Loading,{}),e[9]=r,e[10]=d):d=e[10];let _;return e[11]!==n||e[12]!==p||e[13]!==d?(_=b.jsxs(o.LoadingContext.Provider,{value:p,children:[d,n]}),e[11]=n,e[12]=p,e[13]=d,e[14]=_):_=e[14],_},we=t=>{const e=o.compilerRuntimeExports.c(39),{children:n}=t,r=o.useAxios(),{msalInstance:s,getToken:i}=S.useContext(o.AuthContext),{delegation:a,setDelegation:l,setAvailableDelegations:c,refreshAvailableDelegations:h}=S.useContext(o.DelegationContext),[u,f]=S.useState(null);let p;e[0]!==i?(p=async()=>{const P=await i();P&&f(P.token)},e[0]=i,e[1]=p):p=e[1];const d=p;let _,w;e[2]!==d?(_=()=>{d()},w=[d],e[2]=d,e[3]=_,e[4]=w):(_=e[3],w=e[4]),S.useEffect(_,w);let g;if(e[5]===Symbol.for("react.memo_cache_sentinel")){e:{const P=localStorage.getItem("user")??null;if(!P){g=null;break e}g=JSON.parse(P??"")}e[5]=g}else g=e[5];const v=g;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={state:v?o.LoginState.LOGGED_IN:o.LoginState.LOGGED_OUT,user:v},e[6]=m):m=e[6];const[L,C]=S.useState(m);let y;e[7]!==r?(y=async P=>{let M=null;return await r.get("/user/detail",P?{headers:{Authorization:`Bearer ${P}`}}:void 0).then(X=>{M=X.data}).catch(()=>{M=null}),M},e[7]=r,e[8]=y):y=e[8];const E=y;let I;e[9]!==c||e[10]!==l?(I=()=>{localStorage.removeItem("user"),C({state:o.LoginState.LOGGED_OUT,user:null}),l(null),c(null)},e[9]=c,e[10]=l,e[11]=I):I=e[11];const k=I;let D;e[12]!==E||e[13]!==h?(D=async P=>{C({state:o.LoginState.LOGGING_IN,user:null});const M=await E(P);return M?(C({state:o.LoginState.LOGGED_IN,user:M}),localStorage.setItem("user",JSON.stringify(M)),await h(),!0):(C({state:o.LoginState.LOGIN_FAILED,user:null}),!1)},e[12]=E,e[13]=h,e[14]=D):D=e[14];const x=D;let R;e[15]!==s?(R=()=>{if(s){const P=s.addEventCallback(M=>{if(M.eventType===j.EventType.LOGIN_SUCCESS&&M.payload){const X=M.payload;f(X.accessToken)}});return()=>{P&&s.removeEventCallback(P)}}return Se},e[15]=s,e[16]=R):R=e[16];let $;e[17]!==x||e[18]!==k||e[19]!==s?($=[s,x,k],e[17]=x,e[18]=k,e[19]=s,e[20]=$):$=e[20],S.useEffect(R,$);let O;e[21]!==x||e[22]!==k||e[23]!==l?(O=async P=>{P&&await x(P).catch(()=>{k(),l(null)})},e[21]=x,e[22]=k,e[23]=l,e[24]=O):O=e[24];const H=O;let U;e[25]!==u||e[26]!==H?(U=()=>{H(u)},e[25]=u,e[26]=H,e[27]=U):U=e[27];const q=a==null?void 0:a.id;let W;e[28]!==u||e[29]!==H||e[30]!==q?(W=[u,q,H],e[28]=u,e[29]=H,e[30]=q,e[31]=W):W=e[31],S.useEffect(U,W);let F;e[32]!==x||e[33]!==k||e[34]!==L?(F={user:L.user,userLoginState:L,loginUser:x,logoutUser:k},e[32]=x,e[33]=k,e[34]=L,e[35]=F):F=e[35];const V=F;let B;return e[36]!==n||e[37]!==V?(B=b.jsx(o.UserContext.Provider,{value:V,children:n}),e[36]=n,e[37]=V,e[38]=B):B=e[38],B};function Se(){}const Z=()=>{const t=o.compilerRuntimeExports.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("p",{children:"Redirecting..."}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=b.jsxs("div",{children:[e,b.jsxs("p",{children:["If you are not redirected within 10 seconds, please click"," ",b.jsx("a",{href:window.location.href.replace("/blank","/"),children:"here"})]})]}),t[1]=n):n=t[1],n},ve=t=>{const e=t==null?void 0:t.getActiveAccount();console.log("getTokenMsal activeAccount",e);const n=t==null?void 0:t.getAllAccounts();console.log("getTokenMsal allAccounts",n);const r=(n==null?void 0:n.at(0))??void 0;return console.log("getTokenMsal account",r),r?(e||t==null||t.setActiveAccount(r),r):null},be=({...t})=>{const{inProgress:e}=Q.useMsal(),{cookieDomain:n}=S.useContext(o.LuminusComponentsContext),[,r]=o.useCookies(["Authorization"]),s=S.useMemo(()=>t.useMsal?t.msalInstance:null,[t.useMsal,t.useMsal?t.msalInstance:null]),i=S.useMemo(()=>t.useMsal?t.msalScopes:[],[t.useMsal,t.useMsal?t.msalScopes:null]),a=S.useMemo(()=>t.useMsal?t.msalExtraScopes:[],[t.useMsal,t.useMsal?t.msalExtraScopes:null]),l=S.useRef(null),c=S.useRef(!1),h=S.useCallback(()=>{const g=localStorage.getItem("token");return g?{token:g,expiresOn:K.addYears(new Date(Date.now()),1)}:null},[]),u=S.useCallback(async()=>{if(console.log("getTokenMsal"),s==null)throw console.log("getTokenMsal throwing error because msalInstance is null"),new Error("getTokenMsal: msalInstance is null");if(l.current)return console.log("getTokenMsal returning tokenRequestPromise.current",l.current),l.current;const g=new Promise((v,m)=>{const L=C=>{const y=ve(s);if(!y){console.log("getTokenMsal no account found. Redirecting to login"),s==null||s.loginRedirect({scopes:i,extraScopesToConsent:a});return}s==null||s.acquireTokenSilent({scopes:i,account:y,redirectUri:t.useMsal?t.msalSilentRedirectUri:void 0}).then(E=>{C(),v({token:E.accessToken,expiresOn:E.expiresOn??new Date(Date.now())})}).catch(E=>{console.error("Error acquiring token",E),E instanceof j.InteractionRequiredAuthError&&(console.log("Silent token acquisition failed. Acquiring token using redirect"),s==null||s.acquireTokenRedirect({scopes:i,extraScopesToConsent:a}),C(),v(null)),C(),m(E)}).finally(()=>{C(),m(new Error("No access token returned from handleRedirectPromise"))})};if(console.log("getTokenMsal promise"),e!==j.InteractionStatus.None){console.log("getTokenMsal rejecting because inProgress !== InteractionStatus.None",e),m(new Error("Authentication in progress"));return}c.current?L(()=>{l.current=null}):s.handleRedirectPromise().then(C=>{if(console.log("getTokenMsal tokenResponse",C),!(C!=null&&C.accessToken)){L(()=>{l.current=null,c.current=!0});return}l.current=null,c.current=!0,v({token:C.accessToken,expiresOn:C.expiresOn??new Date(Date.now())})})});return l.current=g,g},[e,a,s,i,t.msalSilentRedirectUri,t.useMsal]),f=S.useCallback(async()=>t.useMsal?u():h(),[h,u,t.useMsal]),p=S.useCallback(g=>t.useMsal?()=>{}:(window.addEventListener("storage",g),window.addEventListener("dev-auth-change",g),()=>{window.removeEventListener("storage",g),window.removeEventListener("dev-auth-change",g)}),[t.useMsal]),d=S.useSyncExternalStore(p,()=>localStorage.getItem("token")!==null?"AUTH_OK":"NO_AUTH"),_=S.useMemo(()=>{var g;return t.useMsal?e!==j.InteractionStatus.None?"AUTH_IN_PROGRESS":(s==null?void 0:s.getActiveAccount())??((g=s==null?void 0:s.getAllAccounts())==null?void 0:g[0])??null?"AUTH_OK":"NO_AUTH":d},[d,e,s,t.useMsal]),w=S.useMemo(()=>({useMsal:t.useMsal??!1,msalInstance:s,msalScopes:i,msalExtraScopes:a,getToken:f,authState:_}),[t.useMsal,s,i,a,f,_]);return S.useEffect(()=>{if(t.useMsal&&s){const g=s.addEventCallback(v=>{if(v.eventType===j.EventType.LOGIN_SUCCESS||v.eventType===j.EventType.ACQUIRE_TOKEN_SUCCESS&&v.payload){const m=v.payload,L=m.account;s.setActiveAccount(L);const C=m.accessToken,y=m.expiresOn;r("Authorization",C,{path:"/",secure:!0,sameSite:"none",domain:n,expires:y??void 0})}v.error&&console.error("AuthProvider MSAL Error",v)});return()=>{g&&s.removeEventCallback(g)}}return()=>{}},[t.useMsal,s,r,n]),b.jsx(o.AuthContext.Provider,{value:w,children:t.useMsal?b.jsx(Q.MsalProvider,{instance:t.msalInstance,children:window.location.pathname==="/blank"?b.jsx(Z,{}):t.children}):window.location.pathname==="/blank"?b.jsx(Z,{}):t.children})},Ce=t=>{const e=o.compilerRuntimeExports.c(18),{children:n,relativeEndpoint:r}=t,[s,i,a]=Y.useLocalStorageState("user-delegation",null);let l;e:{if(!s){l=null;break e}const y=s.from?o.parseISO(s.from):ue(),E=s.to?o.parseISO(s.to):le();if(!ce(new Date(Date.now()),{start:y,end:E})){i(null),l=null;break e}l=s}const c=l;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={nullStateBeforeLoad:!1,nullStateOnFail:!0},e[0]=h):h=e[0];const{data:u,setData:f,reloadData:p}=Y.useGetApiData(r,h),d=S.useRef(null);let _,w;e[1]!==p?(_=()=>{const y=()=>{p(),d.current=window.setTimeout(y,o.msToStartOfNextDay()+5e3)};return y(),()=>{d.current!==null&&window.clearTimeout(d.current)}},w=[p],e[1]=p,e[2]=_,e[3]=w):(_=e[2],w=e[3]),S.useEffect(_,w);let g;e[4]!==a?(g=()=>{const y=()=>{a()};return window.addEventListener("focus",y),()=>{window.removeEventListener("focus",y)}},e[4]=a,e[5]=g):g=e[5];let v;e[6]!==a||e[7]!==p?(v=[a,p],e[6]=a,e[7]=p,e[8]=v):v=e[8],S.useEffect(g,v);let m;e[9]!==u||e[10]!==p||e[11]!==f||e[12]!==i||e[13]!==c?(m={delegation:c,setDelegation:i,availableDelegations:u,setAvailableDelegations:f,refreshAvailableDelegations:p},e[9]=u,e[10]=p,e[11]=f,e[12]=i,e[13]=c,e[14]=m):m=e[14];const L=m;let C;return e[15]!==n||e[16]!==L?(C=b.jsx(o.DelegationContext.Provider,{value:L,children:n}),e[15]=n,e[16]=L,e[17]=C):C=e[17],C},ee=(t,e)=>t?`${t} | ${e}`:e,ye=t=>{const e=o.compilerRuntimeExports.c(18),{defaultHelmet:n,children:r,helmetPrefix:s}=t,i=s??"";let a;e[0]!==n||e[1]!==i?(a=ee(i,n),e[0]=n,e[1]=i,e[2]=a):a=e[2];let l;e[3]!==a?(l=[a],e[3]=a,e[4]=l):l=e[4];const[c,h]=S.useState(l);let u;e[5]!==s?(u=C=>{h(y=>[...y,ee(s??"",C)])},e[5]=s,e[6]=u):u=e[6];const f=u;let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{h(Le)},e[7]=p):p=e[7];const d=p;let _;e[8]!==c?(_=c.at(-1)??"",e[8]=c,e[9]=_):_=e[9];const w=_;let g;e[10]!==f?(g={addHelmet:f,removeHelmet:d},e[10]=f,e[11]=g):g=e[11];const v=g;let m;e[12]!==w?(m=b.jsx("title",{children:w}),e[12]=w,e[13]=m):m=e[13];let L;return e[14]!==r||e[15]!==v||e[16]!==m?(L=b.jsxs(o.HelmetContext.Provider,{value:v,children:[m,r]}),e[14]=r,e[15]=v,e[16]=m,e[17]=L):L=e[17],L};function Le(t){return t.length>1?t.slice(0,-1):t}class ie{constructor(e,n,r){this.statusCode=e,this.statusText=n,this.content=r}}class G{get(e,n){return this.send({...n,method:"GET",url:e})}post(e,n){return this.send({...n,method:"POST",url:e})}delete(e,n){return this.send({...n,method:"DELETE",url:e})}getCookieString(e){return""}}class Ee extends G{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||o.Platform.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(o.getGlobalThis());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new o.AbortError;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),r=new o.AbortError});let s=null;if(e.timeout){const c=e.timeout;s=setTimeout(()=>{n.abort(),this._logger.log(o.LogLevel.Warning,"Timeout from HTTP request."),r=new o.TimeoutError},c)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},o.isArrayBuffer(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let i;try{i=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(c){throw r||(this._logger.log(o.LogLevel.Warning,`Error from HTTP request. ${c}.`),c)}finally{s&&clearTimeout(s),e.abortSignal&&(e.abortSignal.onabort=null)}if(!i.ok){const c=await te(i,"text");throw new o.HttpError(c||i.statusText,i.status)}const l=await te(i,e.responseType);return new ie(i.status,i.statusText,l)}getCookieString(e){let n="";return o.Platform.isNode&&this._jar&&this._jar.getCookies(e,(r,s)=>n=s.join("; ")),n}}function te(t,e){let n;switch(e){case"arraybuffer":n=t.arrayBuffer();break;case"text":n=t.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:n=t.text();break}return n}class Te extends G{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new o.AbortError):e.method?e.url?new Promise((n,r)=>{const s=new XMLHttpRequest;s.open(e.method,e.url,!0),s.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,s.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(o.isArrayBuffer(e.content)?s.setRequestHeader("Content-Type","application/octet-stream"):s.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=e.headers;i&&Object.keys(i).forEach(a=>{s.setRequestHeader(a,i[a])}),e.responseType&&(s.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{s.abort(),r(new o.AbortError)}),e.timeout&&(s.timeout=e.timeout),s.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),s.status>=200&&s.status<300?n(new ie(s.status,s.statusText,s.response||s.responseText)):r(new o.HttpError(s.response||s.responseText||s.statusText,s.status))},s.onerror=()=>{this._logger.log(o.LogLevel.Warning,`Error from HTTP request. ${s.status}: ${s.statusText}.`),r(new o.HttpError(s.statusText,s.status))},s.ontimeout=()=>{this._logger.log(o.LogLevel.Warning,"Timeout from HTTP request."),r(new o.TimeoutError)},s.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class ke extends G{constructor(e){if(super(),typeof fetch<"u"||o.Platform.isNode)this._httpClient=new Ee(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new Te(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new o.AbortError):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}const xe=[0,2e3,1e4,3e4,null];class oe{constructor(e){this._retryDelays=e!==void 0?[...e,null]:xe}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class N{}N.Authorization="Authorization";N.Cookie="Cookie";class Pe extends G{constructor(e,n){super(),this._innerClient=e,this._accessTokenFactory=n}async send(e){let n=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const r=await this._innerClient.send(e);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):r}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[N.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[N.Authorization]&&delete e.headers[N.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var T;(function(t){t[t.None=0]="None",t[t.WebSockets=1]="WebSockets",t[t.ServerSentEvents=2]="ServerSentEvents",t[t.LongPolling=4]="LongPolling"})(T||(T={}));var A;(function(t){t[t.Text=1]="Text",t[t.Binary=2]="Binary"})(A||(A={}));let Ae=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class ne{get pollAborted(){return this._pollAbort.aborted}constructor(e,n,r){this._httpClient=e,this._logger=n,this._pollAbort=new Ae,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,n){if(o.Arg.isRequired(e,"url"),o.Arg.isRequired(n,"transferFormat"),o.Arg.isIn(n,A,"transferFormat"),this._url=e,this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Connecting."),n===A.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,s]=o.getUserAgentHeader(),i={[r]:s,...this._options.headers},a={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};n===A.Binary&&(a.responseType="arraybuffer");const l=`${e}&_=${Date.now()}`;this._logger.log(o.LogLevel.Trace,`(LongPolling transport) polling: ${l}.`);const c=await this._httpClient.get(l,a);c.statusCode!==200?(this._logger.log(o.LogLevel.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new o.HttpError(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,a)}async _poll(e,n){try{for(;this._running;)try{const r=`${e}&_=${Date.now()}`;this._logger.log(o.LogLevel.Trace,`(LongPolling transport) polling: ${r}.`);const s=await this._httpClient.get(r,n);s.statusCode===204?(this._logger.log(o.LogLevel.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):s.statusCode!==200?(this._logger.log(o.LogLevel.Error,`(LongPolling transport) Unexpected response code: ${s.statusCode}.`),this._closeError=new o.HttpError(s.statusText||"",s.statusCode),this._running=!1):s.content?(this._logger.log(o.LogLevel.Trace,`(LongPolling transport) data received. ${o.getDataDetail(s.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(s.content)):this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof o.TimeoutError?this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(o.LogLevel.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?o.sendMessage(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(o.LogLevel.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[n,r]=o.getUserAgentHeader();e[n]=r;const s={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let i;try{await this._httpClient.delete(this._url,s)}catch(a){i=a}i?i instanceof o.HttpError&&(i.statusCode===404?this._logger.log(o.LogLevel.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(o.LogLevel.Trace,`(LongPolling transport) Error sending a DELETE request: ${i}`)):this._logger.log(o.LogLevel.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(o.LogLevel.Trace,e),this.onclose(this._closeError)}}}class De{constructor(e,n,r,s){this._httpClient=e,this._accessToken=n,this._logger=r,this._options=s,this.onreceive=null,this.onclose=null}async connect(e,n){return o.Arg.isRequired(e,"url"),o.Arg.isRequired(n,"transferFormat"),o.Arg.isIn(n,A,"transferFormat"),this._logger.log(o.LogLevel.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,s)=>{let i=!1;if(n!==A.Text){s(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let a;if(o.Platform.isBrowser||o.Platform.isWebWorker)a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const l=this._httpClient.getCookieString(e),c={};c.Cookie=l;const[h,u]=o.getUserAgentHeader();c[h]=u,a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{a.onmessage=l=>{if(this.onreceive)try{this._logger.log(o.LogLevel.Trace,`(SSE transport) data received. ${o.getDataDetail(l.data,this._options.logMessageContent)}.`),this.onreceive(l.data)}catch(c){this._close(c);return}},a.onerror=l=>{i?this._close():s(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},a.onopen=()=>{this._logger.log(o.LogLevel.Information,`SSE connected to ${this._url}`),this._eventSource=a,i=!0,r()}}catch(l){s(l);return}})}async send(e){return this._eventSource?o.sendMessage(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class Me{constructor(e,n,r,s,i,a){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=s,this._webSocketConstructor=i,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=a}async connect(e,n){o.Arg.isRequired(e,"url"),o.Arg.isRequired(n,"transferFormat"),o.Arg.isIn(n,A,"transferFormat"),this._logger.log(o.LogLevel.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((s,i)=>{e=e.replace(/^http/,"ws");let a;const l=this._httpClient.getCookieString(e);let c=!1;if(o.Platform.isNode||o.Platform.isReactNative){const h={},[u,f]=o.getUserAgentHeader();h[u]=f,r&&(h[N.Authorization]=`Bearer ${r}`),l&&(h[N.Cookie]=l),a=new this._webSocketConstructor(e,void 0,{headers:{...h,...this._headers}})}else r&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);a||(a=new this._webSocketConstructor(e)),n===A.Binary&&(a.binaryType="arraybuffer"),a.onopen=h=>{this._logger.log(o.LogLevel.Information,`WebSocket connected to ${e}.`),this._webSocket=a,c=!0,s()},a.onerror=h=>{let u=null;typeof ErrorEvent<"u"&&h instanceof ErrorEvent?u=h.error:u="There was an error with the transport",this._logger.log(o.LogLevel.Information,`(WebSockets transport) ${u}.`)},a.onmessage=h=>{if(this._logger.log(o.LogLevel.Trace,`(WebSockets transport) data received. ${o.getDataDetail(h.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(h.data)}catch(u){this._close(u);return}},a.onclose=h=>{if(c)this._close(h);else{let u=null;typeof ErrorEvent<"u"&&h instanceof ErrorEvent?u=h.error:u="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(u))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(o.LogLevel.Trace,`(WebSockets transport) sending data. ${o.getDataDetail(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(o.LogLevel.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}const se=100;class Re{constructor(e,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,o.Arg.isRequired(e,"url"),this._logger=o.createLogger(n.logger),this.baseUrl=this._resolveUrl(e),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,s=null;if(o.Platform.isNode&&typeof require<"u"){const i=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=i("ws"),s=i("eventsource")}!o.Platform.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:o.Platform.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!o.Platform.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:o.Platform.isNode&&!n.EventSource&&typeof s<"u"&&(n.EventSource=s),this._httpClient=new Pe(n.httpClient||new ke(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(e){if(e=e||A.Binary,o.Arg.isIn(e,A,"transferFormat"),this._logger.log(o.LogLevel.Debug,`Starting connection with transfer format '${A[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(o.LogLevel.Error,n),await this._stopPromise,Promise.reject(new o.AbortError(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(o.LogLevel.Error,n),Promise.reject(new o.AbortError(n))}this._connectionStarted=!0}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new J(this.transport)),this._sendQueue.send(e))}async stop(e){if(this._connectionState==="Disconnected")return this._logger.log(o.LogLevel.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(o.LogLevel.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(e),await this._stopPromise}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(o.LogLevel.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(o.LogLevel.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===T.WebSockets)this.transport=this._constructTransport(T.WebSockets),await this._startTransport(n,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,s=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new o.AbortError("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(n=r.url),r.accessToken){const i=r.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}s++}while(r.url&&s<se);if(s===se&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,e)}this.transport instanceof ne&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(o.LogLevel.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(o.LogLevel.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(e){const n={},[r,s]=o.getUserAgentHeader();n[r]=s;const i=this._resolveNegotiateUrl(e);this._logger.log(o.LogLevel.Debug,`Sending negotiation request: ${i}.`);try{const a=await this._httpClient.post(i,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(a.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${a.statusCode}'`));const l=JSON.parse(a.content);return(!l.negotiateVersion||l.negotiateVersion<1)&&(l.connectionToken=l.connectionId),l.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new o.FailedToNegotiateWithServerError("Client didn't negotiate Stateful Reconnect but the server did.")):l}catch(a){let l="Failed to complete negotiation with the server: "+a;return a instanceof o.HttpError&&a.statusCode===404&&(l=l+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(o.LogLevel.Error,l),Promise.reject(new o.FailedToNegotiateWithServerError(l))}}_createConnectUrl(e,n){return n?e+(e.indexOf("?")===-1?"?":"&")+`id=${n}`:e}async _createTransport(e,n,r,s){let i=this._createConnectUrl(e,r.connectionToken);if(this._isITransport(n)){this._logger.log(o.LogLevel.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(i,s),this.connectionId=r.connectionId;return}const a=[],l=r.availableTransports||[];let c=r;for(const h of l){const u=this._resolveTransportOrError(h,n,s,(c==null?void 0:c.useStatefulReconnect)===!0);if(u instanceof Error)a.push(`${h.transport} failed:`),a.push(u);else if(this._isITransport(u)){if(this.transport=u,!c){try{c=await this._getNegotiationResponse(e)}catch(f){return Promise.reject(f)}i=this._createConnectUrl(e,c.connectionToken)}try{await this._startTransport(i,s),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(o.LogLevel.Error,`Failed to start the transport '${h.transport}': ${f}`),c=void 0,a.push(new o.FailedToStartTransportError(`${h.transport} failed: ${f}`,T[h.transport])),this._connectionState!=="Connecting"){const p="Failed to select transport before stop() was called.";return this._logger.log(o.LogLevel.Debug,p),Promise.reject(new o.AbortError(p))}}}}return a.length>0?Promise.reject(new o.AggregateErrors(`Unable to connect to the server with any of the available transports. ${a.join(" ")}`,a)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case T.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Me(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case T.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new De(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case T.LongPolling:return new ne(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let s=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(e,n),await this.features.resend()}catch{s=!0}else{this._stopConnection(r);return}s&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(e,n)}_resolveTransportOrError(e,n,r,s){const i=T[e.transport];if(i==null)return this._logger.log(o.LogLevel.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(Ie(n,i))if(e.transferFormats.map(l=>A[l]).indexOf(r)>=0){if(i===T.WebSockets&&!this._options.WebSocket||i===T.ServerSentEvents&&!this._options.EventSource)return this._logger.log(o.LogLevel.Debug,`Skipping transport '${T[i]}' because it is not supported in your environment.'`),new o.UnsupportedTransportError(`'${T[i]}' is not supported in your environment.`,i);this._logger.log(o.LogLevel.Debug,`Selecting transport '${T[i]}'.`);try{return this.features.reconnect=i===T.WebSockets?s:void 0,this._constructTransport(i)}catch(l){return l}}else return this._logger.log(o.LogLevel.Debug,`Skipping transport '${T[i]}' because it does not support the requested transfer format '${A[r]}'.`),new Error(`'${T[i]}' does not support ${A[r]}.`);else return this._logger.log(o.LogLevel.Debug,`Skipping transport '${T[i]}' because it was disabled by the client.`),new o.DisabledTransportError(`'${T[i]}' is disabled by the client.`,i)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(o.LogLevel.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(o.LogLevel.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(o.LogLevel.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(o.LogLevel.Error,`Connection disconnected with error '${e}'.`):this._logger.log(o.LogLevel.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(o.LogLevel.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(n){this._logger.log(o.LogLevel.Error,`HttpConnection.onclose(${e}) threw error '${n}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!o.Platform.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const n=window.document.createElement("a");return n.href=e,this._logger.log(o.LogLevel.Information,`Normalizing '${e}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(e){const n=new URL(e);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function Ie(t,e){return!t||(e&t)!==0}class J{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new z,this._transportResult=new z,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new z),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new z;const e=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):J._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),e.resolve()}catch(r){e.reject(r)}}}static _concatBuffers(e){const n=e.map(i=>i.byteLength).reduce((i,a)=>i+a),r=new Uint8Array(n);let s=0;for(const i of e)r.set(new Uint8Array(i),s),s+=i.byteLength;return r.buffer}}class z{constructor(){this.promise=new Promise((e,n)=>[this._resolver,this._rejecter]=[e,n])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}const $e="json";class Ne{constructor(){this.name=$e,this.version=2,this.transferFormat=A.Text}parseMessages(e,n){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];n===null&&(n=o.NullLogger.instance);const r=o.TextMessageFormat.parse(e),s=[];for(const i of r){const a=JSON.parse(i);if(typeof a.type!="number")throw new Error("Invalid payload.");switch(a.type){case o.MessageType.Invocation:this._isInvocationMessage(a);break;case o.MessageType.StreamItem:this._isStreamItemMessage(a);break;case o.MessageType.Completion:this._isCompletionMessage(a);break;case o.MessageType.Ping:break;case o.MessageType.Close:break;case o.MessageType.Ack:this._isAckMessage(a);break;case o.MessageType.Sequence:this._isSequenceMessage(a);break;default:n.log(o.LogLevel.Information,"Unknown message type '"+a.type+"' ignored.");continue}s.push(a)}return s}writeMessage(e){return o.TextMessageFormat.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,n){if(typeof e!="string"||e==="")throw new Error(n)}}const He={trace:o.LogLevel.Trace,debug:o.LogLevel.Debug,info:o.LogLevel.Information,information:o.LogLevel.Information,warn:o.LogLevel.Warning,warning:o.LogLevel.Warning,error:o.LogLevel.Error,critical:o.LogLevel.Critical,none:o.LogLevel.None};function je(t){const e=He[t.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${t}`)}class Oe{configureLogging(e){if(o.Arg.isRequired(e,"logging"),Ue(e))this.logger=e;else if(typeof e=="string"){const n=je(e);this.logger=new o.ConsoleLogger(n)}else this.logger=new o.ConsoleLogger(e);return this}withUrl(e,n){return o.Arg.isRequired(e,"url"),o.Arg.isNotEmpty(e,"url"),this.url=e,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(e){return o.Arg.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new oe(e):this.reconnectPolicy=e:this.reconnectPolicy=new oe,this}withServerTimeout(e){return o.Arg.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return o.Arg.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e==null?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new Re(this.url,e);return o.HubConnection.create(n,this.logger||o.NullLogger.instance,this.protocol||new Ne,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function Ue(t){return t.log!==void 0}const We=15*1e3,Fe=t=>{const e=o.compilerRuntimeExports.c(19),{children:n,apiUrl:r,endpoint:s}=t,{authState:i}=S.useContext(o.AuthContext);let a;e[0]!==r||e[1]!==s?(a=new Oe().withUrl(`${r}/${s}`).withAutomaticReconnect({nextRetryDelayInMilliseconds:Be}).build(),e[0]=r,e[1]=s,e[2]=a):a=e[2];const[l]=S.useState(a),[c,h]=S.useState(l.state),[u,f]=S.useState(!1);let p,d;e[3]!==i||e[4]!==l?(p=()=>{if(i!=="AUTH_OK")return;const y=()=>h(l.state);l.on("Connected",ze),l.onreconnecting(E=>{console.log("Reconnecting...",E),y(),f(!0)}),l.onreconnected(()=>{console.log("Reconnected"),y(),f(!1)}),l.onclose(E=>{console.log("Connection closed",E),y(),f(!0)}),l.start().then(()=>{console.log("Connection started"),y(),f(!1)}).catch(E=>{console.log("Error starting connection:",E),y(),f(!0)})},d=[i,l],e[3]=i,e[4]=l,e[5]=p,e[6]=d):(p=e[5],d=e[6]),S.useEffect(p,d);let _,w;e[7]!==i||e[8]!==l?(_=()=>{i!=="AUTH_OK"&&l.stop()},w=[i,l],e[7]=i,e[8]=l,e[9]=_,e[10]=w):(_=e[9],w=e[10]),S.useEffect(_,w);const g=c===o.HubConnectionState.Connected,v=i==="AUTH_OK";let m;e[11]!==c||e[12]!==u||e[13]!==g||e[14]!==v?(m={isAlive:g,shouldBeAlive:v,connectionState:c,hasLastConnectionEnded:u},e[11]=c,e[12]=u,e[13]=g,e[14]=v,e[15]=m):m=e[15];const L=m;let C;return e[16]!==n||e[17]!==L?(C=b.jsx(o.ApiWebSocketContext.Provider,{value:L,children:n}),e[16]=n,e[17]=L,e[18]=C):C=e[18],C};function Be(t){return Math.min(1e3*2**t.previousRetryCount,We)}function ze(t){console.log("Server says:",t)}const re=50,Ge=()=>{const t=o.compilerRuntimeExports.c(22),{texts:e}=S.useContext(o.LuminusComponentsContext),{confirm:n}=e,{onConfirm:r,onCancel:s,text:i,show:a,textSm:l}=o.useConfirm(),c=l===void 0?i.length>re:l,h=i.length>re;let u;t[0]!==s||t[1]!==r||t[2]!==a?(u=m=>{if(a)e:switch(m.key){case"Enter":{m.preventDefault(),m.stopPropagation(),r();break e}case"Escape":{m.preventDefault(),m.stopPropagation(),s();break e}}},t[0]=s,t[1]=r,t[2]=a,t[3]=u):u=t[3];const f=u;o.useKeyPress(f);const p=h?void 0:"sm";let d;t[4]!==c||t[5]!==i?(d=b.jsx(o.Modal.Header,{className:"justify-content-center",children:c?b.jsx(o.Typography,{variant:"body",children:i}):b.jsx(o.Modal.Title,{children:i})}),t[4]=c,t[5]=i,t[6]=d):d=t[6];let _;t[7]!==n.no||t[8]!==s?(_=b.jsx(o.PrimaryButton,{type:"button",variant:"outlined",color:"secondary",className:"w-100",onClick:s,children:n.no}),t[7]=n.no,t[8]=s,t[9]=_):_=t[9];let w;t[10]!==n.yes||t[11]!==r?(w=b.jsx(o.PrimaryButton,{type:"button",color:"primary",onClick:r,className:"w-100 ml",children:n.yes}),t[10]=n.yes,t[11]=r,t[12]=w):w=t[12];let g;t[13]!==_||t[14]!==w?(g=b.jsx(o.Modal.Body,{children:b.jsxs("div",{className:"w-100 d-flex gap-5",children:[_,w]})}),t[13]=_,t[14]=w,t[15]=g):g=t[15];let v;return t[16]!==s||t[17]!==a||t[18]!==p||t[19]!==d||t[20]!==g?(v=b.jsxs(o.Modal,{show:a,size:p,centered:!0,onHide:s,children:[d,g]}),t[16]=s,t[17]=a,t[18]=p,t[19]=d,t[20]=g,t[21]=v):v=t[21],v};exports.ApiWebSocketContext=o.ApiWebSocketContext;exports.AuthContext=o.AuthContext;exports.DelegationContext=o.DelegationContext;exports.FormDisabledContext=o.FormDisabledContext;exports.HelmetContext=o.HelmetContext;exports.LoadingContext=o.LoadingContext;exports.LuminusComponentsContext=o.LuminusComponentsContext;exports.UserContext=o.UserContext;exports.useFormDisabledContext=o.useFormDisabledContext;exports.FormDisabledProvider=K.FormDisabledProvider;exports.ApiWebSocketProvider=Fe;exports.AuthProvider=be;exports.DelegationProvider=Ce;exports.HelmetProvider=ye;exports.LoadingProvider=me;exports.LuminusComponentsProvider=_e;exports.UserProvider=we;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./nivo-bar-BkpPCncR.cjs"),b=require("react/jsx-runtime"),m=require("react"),j=require("@azure/msal-browser"),Q=require("@azure/msal-react");require("react-router");require("react-dom");require("react-hook-form");require("react-flexmonster");const K=require("./FormDisabledProvider-DoGy2C4j.cjs"),Y=require("./useLocalStorageState-gKbms6va.cjs");function ae(t){const e=o.toDate(t);return e.setHours(23,59,59,999),e}function le(){return ae(Date.now())}function ce(t,e){const n=+o.toDate(t),[r,s]=[+o.toDate(e.start),+o.toDate(e.end)].sort((a,i)=>a-i);return n>=r&&n<=s}function ue(){return o.startOfDay(Date.now())}const he=t=>{const e=o.compilerRuntimeExports.c(10),{children:n}=t,[r,s]=m.useState(!1),[a,i]=m.useState(""),[l,c]=m.useState(void 0);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=(w,v)=>{s(!0),i(w),c(v)},e[0]=u):u=e[0];const h=u;let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{s(!1)},e[1]=d):d=e[1];const _=d;let p;e[2]!==r||e[3]!==a||e[4]!==l?(p={show:r,text:a,showConfirm:h,hideConfirm:_,textSm:l},e[2]=r,e[3]=a,e[4]=l,e[5]=p):p=e[5];const S=p;let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(ze,{}),e[6]=f):f=e[6];let g;return e[7]!==n||e[8]!==S?(g=b.jsxs(o.ConfirmContext.Provider,{value:S,children:[f,n]}),e[7]=n,e[8]=S,e[9]=g):g=e[9],g},ge=()=>{const t=o.compilerRuntimeExports.c(43),{texts:e}=m.useContext(o.LuminusComponentsContext),{confirm:n}=e,{isShown:r,text:s,onFinish:a}=o.usePrompt(),{options:i}=m.useContext(o.PromptContext),[l,c]=m.useState(i.defaultValue??"");let u;t[0]!==a?(u=()=>{a(null)},t[0]=a,t[1]=u):u=t[1];const h=u;let d;t[2]!==a||t[3]!==i.required||t[4]!==l?(d=$=>{$.preventDefault(),!(i.required&&!l)&&(a(l),c(""))},t[2]=a,t[3]=i.required,t[4]=l,t[5]=d):d=t[5];const _=d;let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=$=>c($.currentTarget.value),t[6]=p):p=t[6];let S;t[7]!==l?(S={value:l,onChange:p,className:"w-100",autoFocus:!0,tabIndex:0},t[7]=l,t[8]=S):S=t[8];const f=S;let g,w;t[9]!==r||t[10]!==i.defaultValue?(g=()=>{r===!0&&c(i.defaultValue??"")},w=[r,i.defaultValue],t[9]=r,t[10]=i.defaultValue,t[11]=g,t[12]=w):(g=t[11],w=t[12]),m.useEffect(g,w);let v;t[13]!==s?(v=b.jsx(o.Modal.Header,{className:"justify-content-center",children:b.jsx(o.Modal.Title,{children:s})}),t[13]=s,t[14]=v):v=t[14];let C;t[15]!==f||t[16]!==i.input?(C=i.input==="textarea"?b.jsx("textarea",{...f,rows:5}):void 0,t[15]=f,t[16]=i.input,t[17]=C):C=t[17];let y;t[18]!==f||t[19]!==i.input||t[20]!==i.type?(y=i.input==="input"?b.jsx(o.FormControl,{...f,type:i.type}):void 0,t[18]=f,t[19]=i.input,t[20]=i.type,t[21]=y):y=t[21];let L;t[22]!==C||t[23]!==y?(L=b.jsxs(o.Modal.Body,{children:[C,y]}),t[22]=C,t[23]=y,t[24]=L):L=t[24];let E;t[25]!==n.cancel||t[26]!==h?(E=b.jsx(o.PrimaryButton,{variant:"outlined",color:"secondary",onClick:h,className:"flex-grow-1",children:n.cancel}),t[25]=n.cancel,t[26]=h,t[27]=E):E=t[27];const I=i.required&&!l;let k;t[28]!==n.confirm||t[29]!==I?(k=b.jsx(o.PrimaryButton,{color:"primary",disabled:I,type:"submit",className:"flex-grow-1",children:n.confirm}),t[28]=n.confirm,t[29]=I,t[30]=k):k=t[30];let D;t[31]!==E||t[32]!==k?(D=b.jsxs(o.Modal.Footer,{className:"w-100 d-flex gap-5",children:[E,k]}),t[31]=E,t[32]=k,t[33]=D):D=t[33];let x;t[34]!==_||t[35]!==L||t[36]!==D?(x=b.jsxs("form",{onSubmit:_,onKeyDown:de,children:[L,D]}),t[34]=_,t[35]=L,t[36]=D,t[37]=x):x=t[37];let M;return t[38]!==r||t[39]!==h||t[40]!==x||t[41]!==v?(M=b.jsxs(o.Modal,{show:r,size:"sm",centered:!0,onHide:h,children:[v,x]}),t[38]=r,t[39]=h,t[40]=x,t[41]=v,t[42]=M):M=t[42],M};function de(t){return t.stopPropagation()}const fe=t=>{const e=o.compilerRuntimeExports.c(11),{children:n}=t,[r,s]=m.useState(!1),[a,i]=m.useState("");let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={input:"textarea",type:"text"},e[0]=l):l=e[0];const[c,u]=m.useState(l),h=m.useRef(pe);let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=C=>{i(C),s(!0)},e[1]=d):d=e[1];const _=d;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{s(!1)},e[2]=p):p=e[2];const S=p;let f;e[3]!==r||e[4]!==c||e[5]!==a?(f={isShown:r,text:a,showPrompt:_,hidePrompt:S,resolveRef:h,options:c,setOptions:u},e[3]=r,e[4]=c,e[5]=a,e[6]=f):f=e[6];const g=f;let w;e[7]===Symbol.for("react.memo_cache_sentinel")?(w=b.jsx(ge,{}),e[7]=w):w=e[7];let v;return e[8]!==n||e[9]!==g?(v=b.jsxs(o.PromptContext.Provider,{value:g,children:[n,w]}),e[8]=n,e[9]=g,e[10]=v):v=e[10],v};function pe(){}const _e=t=>{const e=o.compilerRuntimeExports.c(14),{cookieDomain:n,axiosOptions:r,language:s,texts:a,ProjectIconComponent:i,localizationContext:l,chartColorPalette:c,children:u}=t;let h;e[0]!==i||e[1]!==r||e[2]!==c||e[3]!==n||e[4]!==s||e[5]!==l||e[6]!==a?(h={axiosOptions:r,cookieDomain:n,language:s,texts:a,ProjectIconComponent:i,localizationContext:l,chartColorPalette:c},e[0]=i,e[1]=r,e[2]=c,e[3]=n,e[4]=s,e[5]=l,e[6]=a,e[7]=h):h=e[7];const d=h;let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=b.jsx(o.Fe,{}),e[8]=_):_=e[8];let p;e[9]!==u?(p=b.jsx(he,{children:b.jsxs(fe,{children:[_,u]})}),e[9]=u,e[10]=p):p=e[10];let S;return e[11]!==d||e[12]!==p?(S=b.jsx(o.LuminusComponentsContext.Provider,{value:d,children:p}),e[11]=d,e[12]=p,e[13]=S):S=e[13],S},me=t=>{const e=o.compilerRuntimeExports.c(15),{children:n}=t,[r,s]=m.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=new Set,e[0]=a):a=e[0];const[i]=m.useState(a);let l;e[1]!==i?(l=f=>{i.add(f),s(!0)},e[1]=i,e[2]=l):l=e[2];const c=l;let u;e[3]!==i?(u=f=>{i.delete(f),i.size===0&&s(!1)},e[3]=i,e[4]=u):u=e[4];const h=u;let d;e[5]!==r||e[6]!==c||e[7]!==h?(d={isLoading:r,startLoading:c,stopLoading:h},e[5]=r,e[6]=c,e[7]=h,e[8]=d):d=e[8];const _=d;let p;e[9]!==r?(p=r&&b.jsx(K.Loading,{}),e[9]=r,e[10]=p):p=e[10];let S;return e[11]!==n||e[12]!==_||e[13]!==p?(S=b.jsxs(o.LoadingContext.Provider,{value:_,children:[p,n]}),e[11]=n,e[12]=_,e[13]=p,e[14]=S):S=e[14],S},we=t=>{const e=o.compilerRuntimeExports.c(39),{children:n}=t,r=o.useAxios(),{msalInstance:s,getToken:a}=m.useContext(o.AuthContext),{delegation:i,setDelegation:l,setAvailableDelegations:c,refreshAvailableDelegations:u}=m.useContext(o.DelegationContext),[h,d]=m.useState(null);let _;e[0]!==a?(_=async()=>{const P=await a();P&&d(P.token)},e[0]=a,e[1]=_):_=e[1];const p=_;let S,f;e[2]!==p?(S=()=>{p()},f=[p],e[2]=p,e[3]=S,e[4]=f):(S=e[3],f=e[4]),m.useEffect(S,f);let g;if(e[5]===Symbol.for("react.memo_cache_sentinel")){e:{const P=localStorage.getItem("user")??null;if(!P){g=null;break e}g=JSON.parse(P??"")}e[5]=g}else g=e[5];const w=g;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v={state:w?o.LoginState.LOGGED_IN:o.LoginState.LOGGED_OUT,user:w},e[6]=v):v=e[6];const[C,y]=m.useState(v);let L;e[7]!==r?(L=async P=>{let R=null;return await r.get("/user/detail",P?{headers:{Authorization:`Bearer ${P}`}}:void 0).then(X=>{R=X.data}).catch(()=>{R=null}),R},e[7]=r,e[8]=L):L=e[8];const E=L;let I;e[9]!==c||e[10]!==l?(I=()=>{localStorage.removeItem("user"),y({state:o.LoginState.LOGGED_OUT,user:null}),l(null),c(null)},e[9]=c,e[10]=l,e[11]=I):I=e[11];const k=I;let D;e[12]!==E||e[13]!==u?(D=async P=>{y({state:o.LoginState.LOGGING_IN,user:null});const R=await E(P);return R?(y({state:o.LoginState.LOGGED_IN,user:R}),localStorage.setItem("user",JSON.stringify(R)),await u(),!0):(y({state:o.LoginState.LOGIN_FAILED,user:null}),!1)},e[12]=E,e[13]=u,e[14]=D):D=e[14];const x=D;let M;e[15]!==s?(M=()=>{if(s){const P=s.addEventCallback(R=>{if(R.eventType===j.EventType.LOGIN_SUCCESS&&R.payload){const X=R.payload;d(X.accessToken)}});return()=>{P&&s.removeEventCallback(P)}}return Se},e[15]=s,e[16]=M):M=e[16];let $;e[17]!==x||e[18]!==k||e[19]!==s?($=[s,x,k],e[17]=x,e[18]=k,e[19]=s,e[20]=$):$=e[20],m.useEffect(M,$);let O;e[21]!==x||e[22]!==k||e[23]!==l?(O=async P=>{P&&await x(P).catch(()=>{k(),l(null)})},e[21]=x,e[22]=k,e[23]=l,e[24]=O):O=e[24];const H=O;let U;e[25]!==h||e[26]!==H?(U=()=>{H(h)},e[25]=h,e[26]=H,e[27]=U):U=e[27];const q=i==null?void 0:i.id;let W;e[28]!==h||e[29]!==H||e[30]!==q?(W=[h,q,H],e[28]=h,e[29]=H,e[30]=q,e[31]=W):W=e[31],m.useEffect(U,W);let F;e[32]!==x||e[33]!==k||e[34]!==C?(F={user:C.user,userLoginState:C,loginUser:x,logoutUser:k},e[32]=x,e[33]=k,e[34]=C,e[35]=F):F=e[35];const V=F;let B;return e[36]!==n||e[37]!==V?(B=b.jsx(o.UserContext.Provider,{value:V,children:n}),e[36]=n,e[37]=V,e[38]=B):B=e[38],B};function Se(){}const Z=()=>{const t=o.compilerRuntimeExports.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("p",{children:"Redirecting..."}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=b.jsxs("div",{children:[e,b.jsxs("p",{children:["If you are not redirected within 10 seconds, please click"," ",b.jsx("a",{href:window.location.href.replace("/blank","/"),children:"here"})]})]}),t[1]=n):n=t[1],n},ve=t=>{const e=t==null?void 0:t.getActiveAccount();console.log("getTokenMsal activeAccount",e);const n=t==null?void 0:t.getAllAccounts();console.log("getTokenMsal allAccounts",n);const r=(n==null?void 0:n.at(0))??void 0;return console.log("getTokenMsal account",r),r?(e||t==null||t.setActiveAccount(r),r):null},Ce=({...t})=>{const{inProgress:e}=Q.useMsal(),{cookieDomain:n}=m.useContext(o.LuminusComponentsContext),[,r]=o.useCookies(["Authorization"]),s=m.useMemo(()=>t.useMsal?t.msalInstance:null,[t.useMsal,t.useMsal?t.msalInstance:null]),a=m.useMemo(()=>t.useMsal?t.msalScopes:[],[t.useMsal,t.useMsal?t.msalScopes:null]),i=m.useMemo(()=>t.useMsal?t.msalExtraScopes:[],[t.useMsal,t.useMsal?t.msalExtraScopes:null]),l=m.useRef(null),c=m.useRef(!1),u=m.useCallback(()=>{const g=localStorage.getItem("token");return g?{token:g,expiresOn:K.addYears(new Date(Date.now()),1)}:null},[]),h=m.useCallback(async()=>{if(console.log("getTokenMsal"),s==null)throw console.log("getTokenMsal throwing error because msalInstance is null"),new Error("getTokenMsal: msalInstance is null");if(l.current)return console.log("getTokenMsal returning tokenRequestPromise.current",l.current),l.current;const g=new Promise((w,v)=>{const C=y=>{const L=ve(s);if(!L){console.log("getTokenMsal no account found. Redirecting to login"),s==null||s.loginRedirect({scopes:a,extraScopesToConsent:i});return}s==null||s.acquireTokenSilent({scopes:a,account:L,redirectUri:t.useMsal?t.msalSilentRedirectUri:void 0}).then(E=>{y(),w({token:E.accessToken,expiresOn:E.expiresOn??new Date(Date.now())})}).catch(E=>{console.error("Error acquiring token",E),E instanceof j.InteractionRequiredAuthError&&(console.log("Silent token acquisition failed. Acquiring token using redirect"),s==null||s.acquireTokenRedirect({scopes:a,extraScopesToConsent:i}),y(),w(null)),y(),v(E)}).finally(()=>{y(),v(new Error("No access token returned from handleRedirectPromise"))})};if(e!==j.InteractionStatus.None){console.log("getTokenMsal rejecting because inProgress !== InteractionStatus.None",e),v(new Error("Authentication in progress"));return}c.current?C(()=>{l.current=null}):s.handleRedirectPromise().then(y=>{if(console.log("getTokenMsal tokenResponse",y),!(y!=null&&y.accessToken)){C(()=>{l.current=null,c.current=!0});return}l.current=null,c.current=!0,w({token:y.accessToken,expiresOn:y.expiresOn??new Date(Date.now())})})});return l.current=g,g},[e,i,s,a,t.msalSilentRedirectUri,t.useMsal]),d=m.useCallback(async()=>t.useMsal?h():u(),[u,h,t.useMsal]),_=m.useCallback(g=>t.useMsal?()=>{}:(window.addEventListener("storage",g),window.addEventListener("dev-auth-change",g),()=>{window.removeEventListener("storage",g),window.removeEventListener("dev-auth-change",g)}),[t.useMsal]),p=m.useSyncExternalStore(_,()=>localStorage.getItem("token")!==null?"AUTH_OK":"NO_AUTH"),S=m.useMemo(()=>{var g;return t.useMsal?e!==j.InteractionStatus.None?"AUTH_IN_PROGRESS":(s==null?void 0:s.getActiveAccount())??((g=s==null?void 0:s.getAllAccounts())==null?void 0:g[0])??null?"AUTH_OK":"NO_AUTH":p},[p,e,s,t.useMsal]),f=m.useMemo(()=>({useMsal:t.useMsal??!1,msalInstance:s,msalScopes:a,msalExtraScopes:i,getToken:d,authState:S}),[t.useMsal,s,a,i,d,S]);return m.useEffect(()=>{if(t.useMsal&&s){const g=s.addEventCallback(w=>{if(w.eventType===j.EventType.LOGIN_SUCCESS||w.eventType===j.EventType.ACQUIRE_TOKEN_SUCCESS&&w.payload){const v=w.payload,C=v.account;s.setActiveAccount(C);const y=v.accessToken,L=v.expiresOn;r("Authorization",y,{path:"/",secure:!0,sameSite:"none",domain:n,expires:L??void 0})}w.error&&console.error("AuthProvider MSAL Error",w)});return()=>{g&&s.removeEventCallback(g)}}return()=>{}},[t.useMsal,s,r,n]),b.jsx(o.AuthContext.Provider,{value:f,children:t.useMsal?b.jsx(Q.MsalProvider,{instance:t.msalInstance,children:window.location.pathname==="/blank"?b.jsx(Z,{}):t.children}):window.location.pathname==="/blank"?b.jsx(Z,{}):t.children})},be=t=>{const e=o.compilerRuntimeExports.c(18),{children:n,relativeEndpoint:r}=t,[s,a,i]=Y.useLocalStorageState("user-delegation",null);let l;e:{if(!s){l=null;break e}const L=s.from?o.parseISO(s.from):ue(),E=s.to?o.parseISO(s.to):le();if(!ce(new Date(Date.now()),{start:L,end:E})){a(null),l=null;break e}l=s}const c=l;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={nullStateBeforeLoad:!1,nullStateOnFail:!0},e[0]=u):u=e[0];const{data:h,setData:d,reloadData:_}=Y.useGetApiData(r,u),p=m.useRef(null);let S,f;e[1]!==_?(S=()=>{const L=()=>{_(),p.current=window.setTimeout(L,o.msToStartOfNextDay()+5e3)};return L(),()=>{p.current!==null&&window.clearTimeout(p.current)}},f=[_],e[1]=_,e[2]=S,e[3]=f):(S=e[2],f=e[3]),m.useEffect(S,f);let g;e[4]!==i?(g=()=>{const L=()=>{i()};return window.addEventListener("focus",L),()=>{window.removeEventListener("focus",L)}},e[4]=i,e[5]=g):g=e[5];let w;e[6]!==i||e[7]!==_?(w=[i,_],e[6]=i,e[7]=_,e[8]=w):w=e[8],m.useEffect(g,w);let v;e[9]!==h||e[10]!==_||e[11]!==d||e[12]!==a||e[13]!==c?(v={delegation:c,setDelegation:a,availableDelegations:h,setAvailableDelegations:d,refreshAvailableDelegations:_},e[9]=h,e[10]=_,e[11]=d,e[12]=a,e[13]=c,e[14]=v):v=e[14];const C=v;let y;return e[15]!==n||e[16]!==C?(y=b.jsx(o.DelegationContext.Provider,{value:C,children:n}),e[15]=n,e[16]=C,e[17]=y):y=e[17],y},ee=(t,e)=>t?`${t} | ${e}`:e,ye=t=>{const e=o.compilerRuntimeExports.c(18),{defaultHelmet:n,children:r,helmetPrefix:s}=t,a=s??"";let i;e[0]!==n||e[1]!==a?(i=ee(a,n),e[0]=n,e[1]=a,e[2]=i):i=e[2];let l;e[3]!==i?(l=[i],e[3]=i,e[4]=l):l=e[4];const[c,u]=m.useState(l);let h;e[5]!==s?(h=y=>{u(L=>[...L,ee(s??"",y)])},e[5]=s,e[6]=h):h=e[6];const d=h;let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{u(Le)},e[7]=_):_=e[7];const p=_;let S;e[8]!==c?(S=c.at(-1)??"",e[8]=c,e[9]=S):S=e[9];const f=S;let g;e[10]!==d?(g={addHelmet:d,removeHelmet:p},e[10]=d,e[11]=g):g=e[11];const w=g;let v;e[12]!==f?(v=b.jsx("title",{children:f}),e[12]=f,e[13]=v):v=e[13];let C;return e[14]!==r||e[15]!==w||e[16]!==v?(C=b.jsxs(o.HelmetContext.Provider,{value:w,children:[v,r]}),e[14]=r,e[15]=w,e[16]=v,e[17]=C):C=e[17],C};function Le(t){return t.length>1?t.slice(0,-1):t}class ie{constructor(e,n,r){this.statusCode=e,this.statusText=n,this.content=r}}class G{get(e,n){return this.send({...n,method:"GET",url:e})}post(e,n){return this.send({...n,method:"POST",url:e})}delete(e,n){return this.send({...n,method:"DELETE",url:e})}getCookieString(e){return""}}class Ee extends G{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||o.Platform.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(o.getGlobalThis());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new o.AbortError;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),r=new o.AbortError});let s=null;if(e.timeout){const c=e.timeout;s=setTimeout(()=>{n.abort(),this._logger.log(o.LogLevel.Warning,"Timeout from HTTP request."),r=new o.TimeoutError},c)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},o.isArrayBuffer(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let a;try{a=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(c){throw r||(this._logger.log(o.LogLevel.Warning,`Error from HTTP request. ${c}.`),c)}finally{s&&clearTimeout(s),e.abortSignal&&(e.abortSignal.onabort=null)}if(!a.ok){const c=await te(a,"text");throw new o.HttpError(c||a.statusText,a.status)}const l=await te(a,e.responseType);return new ie(a.status,a.statusText,l)}getCookieString(e){let n="";return o.Platform.isNode&&this._jar&&this._jar.getCookies(e,(r,s)=>n=s.join("; ")),n}}function te(t,e){let n;switch(e){case"arraybuffer":n=t.arrayBuffer();break;case"text":n=t.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:n=t.text();break}return n}class Te extends G{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new o.AbortError):e.method?e.url?new Promise((n,r)=>{const s=new XMLHttpRequest;s.open(e.method,e.url,!0),s.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,s.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(o.isArrayBuffer(e.content)?s.setRequestHeader("Content-Type","application/octet-stream"):s.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const a=e.headers;a&&Object.keys(a).forEach(i=>{s.setRequestHeader(i,a[i])}),e.responseType&&(s.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{s.abort(),r(new o.AbortError)}),e.timeout&&(s.timeout=e.timeout),s.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),s.status>=200&&s.status<300?n(new ie(s.status,s.statusText,s.response||s.responseText)):r(new o.HttpError(s.response||s.responseText||s.statusText,s.status))},s.onerror=()=>{this._logger.log(o.LogLevel.Warning,`Error from HTTP request. ${s.status}: ${s.statusText}.`),r(new o.HttpError(s.statusText,s.status))},s.ontimeout=()=>{this._logger.log(o.LogLevel.Warning,"Timeout from HTTP request."),r(new o.TimeoutError)},s.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class ke extends G{constructor(e){if(super(),typeof fetch<"u"||o.Platform.isNode)this._httpClient=new Ee(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new Te(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new o.AbortError):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}const xe=[0,2e3,1e4,3e4,null];class oe{constructor(e){this._retryDelays=e!==void 0?[...e,null]:xe}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class N{}N.Authorization="Authorization";N.Cookie="Cookie";class Pe extends G{constructor(e,n){super(),this._innerClient=e,this._accessTokenFactory=n}async send(e){let n=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const r=await this._innerClient.send(e);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):r}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[N.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[N.Authorization]&&delete e.headers[N.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var T;(function(t){t[t.None=0]="None",t[t.WebSockets=1]="WebSockets",t[t.ServerSentEvents=2]="ServerSentEvents",t[t.LongPolling=4]="LongPolling"})(T||(T={}));var A;(function(t){t[t.Text=1]="Text",t[t.Binary=2]="Binary"})(A||(A={}));let Ae=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class ne{get pollAborted(){return this._pollAbort.aborted}constructor(e,n,r){this._httpClient=e,this._logger=n,this._pollAbort=new Ae,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,n){if(o.Arg.isRequired(e,"url"),o.Arg.isRequired(n,"transferFormat"),o.Arg.isIn(n,A,"transferFormat"),this._url=e,this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Connecting."),n===A.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,s]=o.getUserAgentHeader(),a={[r]:s,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:a,timeout:1e5,withCredentials:this._options.withCredentials};n===A.Binary&&(i.responseType="arraybuffer");const l=`${e}&_=${Date.now()}`;this._logger.log(o.LogLevel.Trace,`(LongPolling transport) polling: ${l}.`);const c=await this._httpClient.get(l,i);c.statusCode!==200?(this._logger.log(o.LogLevel.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new o.HttpError(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(e,n){try{for(;this._running;)try{const r=`${e}&_=${Date.now()}`;this._logger.log(o.LogLevel.Trace,`(LongPolling transport) polling: ${r}.`);const s=await this._httpClient.get(r,n);s.statusCode===204?(this._logger.log(o.LogLevel.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):s.statusCode!==200?(this._logger.log(o.LogLevel.Error,`(LongPolling transport) Unexpected response code: ${s.statusCode}.`),this._closeError=new o.HttpError(s.statusText||"",s.statusCode),this._running=!1):s.content?(this._logger.log(o.LogLevel.Trace,`(LongPolling transport) data received. ${o.getDataDetail(s.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(s.content)):this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof o.TimeoutError?this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(o.LogLevel.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?o.sendMessage(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(o.LogLevel.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[n,r]=o.getUserAgentHeader();e[n]=r;const s={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let a;try{await this._httpClient.delete(this._url,s)}catch(i){a=i}a?a instanceof o.HttpError&&(a.statusCode===404?this._logger.log(o.LogLevel.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(o.LogLevel.Trace,`(LongPolling transport) Error sending a DELETE request: ${a}`)):this._logger.log(o.LogLevel.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(o.LogLevel.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(o.LogLevel.Trace,e),this.onclose(this._closeError)}}}class De{constructor(e,n,r,s){this._httpClient=e,this._accessToken=n,this._logger=r,this._options=s,this.onreceive=null,this.onclose=null}async connect(e,n){return o.Arg.isRequired(e,"url"),o.Arg.isRequired(n,"transferFormat"),o.Arg.isIn(n,A,"transferFormat"),this._logger.log(o.LogLevel.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,s)=>{let a=!1;if(n!==A.Text){s(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let i;if(o.Platform.isBrowser||o.Platform.isWebWorker)i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const l=this._httpClient.getCookieString(e),c={};c.Cookie=l;const[u,h]=o.getUserAgentHeader();c[u]=h,i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{i.onmessage=l=>{if(this.onreceive)try{this._logger.log(o.LogLevel.Trace,`(SSE transport) data received. ${o.getDataDetail(l.data,this._options.logMessageContent)}.`),this.onreceive(l.data)}catch(c){this._close(c);return}},i.onerror=l=>{a?this._close():s(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(o.LogLevel.Information,`SSE connected to ${this._url}`),this._eventSource=i,a=!0,r()}}catch(l){s(l);return}})}async send(e){return this._eventSource?o.sendMessage(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class Re{constructor(e,n,r,s,a,i){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=s,this._webSocketConstructor=a,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=i}async connect(e,n){o.Arg.isRequired(e,"url"),o.Arg.isRequired(n,"transferFormat"),o.Arg.isIn(n,A,"transferFormat"),this._logger.log(o.LogLevel.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((s,a)=>{e=e.replace(/^http/,"ws");let i;const l=this._httpClient.getCookieString(e);let c=!1;if(o.Platform.isNode||o.Platform.isReactNative){const u={},[h,d]=o.getUserAgentHeader();u[h]=d,r&&(u[N.Authorization]=`Bearer ${r}`),l&&(u[N.Cookie]=l),i=new this._webSocketConstructor(e,void 0,{headers:{...u,...this._headers}})}else r&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);i||(i=new this._webSocketConstructor(e)),n===A.Binary&&(i.binaryType="arraybuffer"),i.onopen=u=>{this._logger.log(o.LogLevel.Information,`WebSocket connected to ${e}.`),this._webSocket=i,c=!0,s()},i.onerror=u=>{let h=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?h=u.error:h="There was an error with the transport",this._logger.log(o.LogLevel.Information,`(WebSockets transport) ${h}.`)},i.onmessage=u=>{if(this._logger.log(o.LogLevel.Trace,`(WebSockets transport) data received. ${o.getDataDetail(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(h){this._close(h);return}},i.onclose=u=>{if(c)this._close(u);else{let h=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?h=u.error:h="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",a(new Error(h))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(o.LogLevel.Trace,`(WebSockets transport) sending data. ${o.getDataDetail(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(o.LogLevel.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}const se=100;class Me{constructor(e,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,o.Arg.isRequired(e,"url"),this._logger=o.createLogger(n.logger),this.baseUrl=this._resolveUrl(e),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,s=null;if(o.Platform.isNode&&typeof require<"u"){const a=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=a("ws"),s=a("eventsource")}!o.Platform.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:o.Platform.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!o.Platform.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:o.Platform.isNode&&!n.EventSource&&typeof s<"u"&&(n.EventSource=s),this._httpClient=new Pe(n.httpClient||new ke(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(e){if(e=e||A.Binary,o.Arg.isIn(e,A,"transferFormat"),this._logger.log(o.LogLevel.Debug,`Starting connection with transfer format '${A[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(o.LogLevel.Error,n),await this._stopPromise,Promise.reject(new o.AbortError(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(o.LogLevel.Error,n),Promise.reject(new o.AbortError(n))}this._connectionStarted=!0}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new J(this.transport)),this._sendQueue.send(e))}async stop(e){if(this._connectionState==="Disconnected")return this._logger.log(o.LogLevel.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(o.LogLevel.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(e),await this._stopPromise}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(o.LogLevel.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(o.LogLevel.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===T.WebSockets)this.transport=this._constructTransport(T.WebSockets),await this._startTransport(n,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,s=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new o.AbortError("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(n=r.url),r.accessToken){const a=r.accessToken;this._accessTokenFactory=()=>a,this._httpClient._accessToken=a,this._httpClient._accessTokenFactory=void 0}s++}while(r.url&&s<se);if(s===se&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,e)}this.transport instanceof ne&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(o.LogLevel.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(o.LogLevel.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(e){const n={},[r,s]=o.getUserAgentHeader();n[r]=s;const a=this._resolveNegotiateUrl(e);this._logger.log(o.LogLevel.Debug,`Sending negotiation request: ${a}.`);try{const i=await this._httpClient.post(a,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(i.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${i.statusCode}'`));const l=JSON.parse(i.content);return(!l.negotiateVersion||l.negotiateVersion<1)&&(l.connectionToken=l.connectionId),l.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new o.FailedToNegotiateWithServerError("Client didn't negotiate Stateful Reconnect but the server did.")):l}catch(i){let l="Failed to complete negotiation with the server: "+i;return i instanceof o.HttpError&&i.statusCode===404&&(l=l+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(o.LogLevel.Error,l),Promise.reject(new o.FailedToNegotiateWithServerError(l))}}_createConnectUrl(e,n){return n?e+(e.indexOf("?")===-1?"?":"&")+`id=${n}`:e}async _createTransport(e,n,r,s){let a=this._createConnectUrl(e,r.connectionToken);if(this._isITransport(n)){this._logger.log(o.LogLevel.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(a,s),this.connectionId=r.connectionId;return}const i=[],l=r.availableTransports||[];let c=r;for(const u of l){const h=this._resolveTransportOrError(u,n,s,(c==null?void 0:c.useStatefulReconnect)===!0);if(h instanceof Error)i.push(`${u.transport} failed:`),i.push(h);else if(this._isITransport(h)){if(this.transport=h,!c){try{c=await this._getNegotiationResponse(e)}catch(d){return Promise.reject(d)}a=this._createConnectUrl(e,c.connectionToken)}try{await this._startTransport(a,s),this.connectionId=c.connectionId;return}catch(d){if(this._logger.log(o.LogLevel.Error,`Failed to start the transport '${u.transport}': ${d}`),c=void 0,i.push(new o.FailedToStartTransportError(`${u.transport} failed: ${d}`,T[u.transport])),this._connectionState!=="Connecting"){const _="Failed to select transport before stop() was called.";return this._logger.log(o.LogLevel.Debug,_),Promise.reject(new o.AbortError(_))}}}}return i.length>0?Promise.reject(new o.AggregateErrors(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case T.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Re(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case T.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new De(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case T.LongPolling:return new ne(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let s=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(e,n),await this.features.resend()}catch{s=!0}else{this._stopConnection(r);return}s&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(e,n)}_resolveTransportOrError(e,n,r,s){const a=T[e.transport];if(a==null)return this._logger.log(o.LogLevel.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(Ie(n,a))if(e.transferFormats.map(l=>A[l]).indexOf(r)>=0){if(a===T.WebSockets&&!this._options.WebSocket||a===T.ServerSentEvents&&!this._options.EventSource)return this._logger.log(o.LogLevel.Debug,`Skipping transport '${T[a]}' because it is not supported in your environment.'`),new o.UnsupportedTransportError(`'${T[a]}' is not supported in your environment.`,a);this._logger.log(o.LogLevel.Debug,`Selecting transport '${T[a]}'.`);try{return this.features.reconnect=a===T.WebSockets?s:void 0,this._constructTransport(a)}catch(l){return l}}else return this._logger.log(o.LogLevel.Debug,`Skipping transport '${T[a]}' because it does not support the requested transfer format '${A[r]}'.`),new Error(`'${T[a]}' does not support ${A[r]}.`);else return this._logger.log(o.LogLevel.Debug,`Skipping transport '${T[a]}' because it was disabled by the client.`),new o.DisabledTransportError(`'${T[a]}' is disabled by the client.`,a)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(o.LogLevel.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(o.LogLevel.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(o.LogLevel.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(o.LogLevel.Error,`Connection disconnected with error '${e}'.`):this._logger.log(o.LogLevel.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(o.LogLevel.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(n){this._logger.log(o.LogLevel.Error,`HttpConnection.onclose(${e}) threw error '${n}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!o.Platform.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const n=window.document.createElement("a");return n.href=e,this._logger.log(o.LogLevel.Information,`Normalizing '${e}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(e){const n=new URL(e);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function Ie(t,e){return!t||(e&t)!==0}class J{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new z,this._transportResult=new z,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new z),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new z;const e=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):J._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),e.resolve()}catch(r){e.reject(r)}}}static _concatBuffers(e){const n=e.map(a=>a.byteLength).reduce((a,i)=>a+i),r=new Uint8Array(n);let s=0;for(const a of e)r.set(new Uint8Array(a),s),s+=a.byteLength;return r.buffer}}class z{constructor(){this.promise=new Promise((e,n)=>[this._resolver,this._rejecter]=[e,n])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}const $e="json";class Ne{constructor(){this.name=$e,this.version=2,this.transferFormat=A.Text}parseMessages(e,n){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];n===null&&(n=o.NullLogger.instance);const r=o.TextMessageFormat.parse(e),s=[];for(const a of r){const i=JSON.parse(a);if(typeof i.type!="number")throw new Error("Invalid payload.");switch(i.type){case o.MessageType.Invocation:this._isInvocationMessage(i);break;case o.MessageType.StreamItem:this._isStreamItemMessage(i);break;case o.MessageType.Completion:this._isCompletionMessage(i);break;case o.MessageType.Ping:break;case o.MessageType.Close:break;case o.MessageType.Ack:this._isAckMessage(i);break;case o.MessageType.Sequence:this._isSequenceMessage(i);break;default:n.log(o.LogLevel.Information,"Unknown message type '"+i.type+"' ignored.");continue}s.push(i)}return s}writeMessage(e){return o.TextMessageFormat.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,n){if(typeof e!="string"||e==="")throw new Error(n)}}const He={trace:o.LogLevel.Trace,debug:o.LogLevel.Debug,info:o.LogLevel.Information,information:o.LogLevel.Information,warn:o.LogLevel.Warning,warning:o.LogLevel.Warning,error:o.LogLevel.Error,critical:o.LogLevel.Critical,none:o.LogLevel.None};function je(t){const e=He[t.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${t}`)}class Oe{configureLogging(e){if(o.Arg.isRequired(e,"logging"),Ue(e))this.logger=e;else if(typeof e=="string"){const n=je(e);this.logger=new o.ConsoleLogger(n)}else this.logger=new o.ConsoleLogger(e);return this}withUrl(e,n){return o.Arg.isRequired(e,"url"),o.Arg.isNotEmpty(e,"url"),this.url=e,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(e){return o.Arg.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new oe(e):this.reconnectPolicy=e:this.reconnectPolicy=new oe,this}withServerTimeout(e){return o.Arg.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return o.Arg.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e==null?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new Me(this.url,e);return o.HubConnection.create(n,this.logger||o.NullLogger.instance,this.protocol||new Ne,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function Ue(t){return t.log!==void 0}const We=10*1e3,Fe=15*1e3,Be=({children:t,apiUrl:e,endpoint:n})=>{const{authState:r,getToken:s}=m.useContext(o.AuthContext),[a,i]=m.useState(o.HubConnectionState.Disconnected),[l,c]=m.useState(!1),u=m.useRef(null),h=m.useRef(s);h.current=s;const d=m.useCallback(()=>{var f;return i(((f=u.current)==null?void 0:f.state)??o.HubConnectionState.Disconnected)},[]);m.useEffect(()=>{if(r!=="AUTH_OK")return;let f=!1,g=null;const w=new Oe().withUrl(`${e}/${n}`,{accessTokenFactory:()=>h.current().then(C=>(C==null?void 0:C.token)??"")}).withAutomaticReconnect({nextRetryDelayInMilliseconds:C=>Math.min(1e3*2**C.previousRetryCount,Fe)}).build();u.current=w,w.on("Connected",C=>{console.log("Server says:",C)}),w.onreconnecting(C=>{f||(console.log("Reconnecting...",C),d(),c(!0))}),w.onreconnected(()=>{f||(console.log("Reconnected"),d(),c(!1))}),w.onclose(C=>{f||(console.log("Connection closed",C),d(),c(!0))});const v=()=>{w.start().then(()=>{f||(console.log("Connection started"),d(),c(!1))}).catch(C=>{f||(console.log("Error starting connection:",C),d(),c(!0),g=window.setTimeout(v,We))})};return v(),()=>{f=!0,g!==null&&window.clearTimeout(g),u.current=null,w.stop().catch(C=>{console.log("Error stopping connection:",C)})}},[e,r,n,d]);const _=m.useMemo(()=>a===o.HubConnectionState.Connected,[a]),p=m.useMemo(()=>r==="AUTH_OK",[r]),S=m.useMemo(()=>({isAlive:_,shouldBeAlive:p,connectionState:a,hasLastConnectionEnded:l}),[_,p,a,l]);return b.jsx(o.ApiWebSocketContext.Provider,{value:S,children:t})},re=50,ze=()=>{const t=o.compilerRuntimeExports.c(22),{texts:e}=m.useContext(o.LuminusComponentsContext),{confirm:n}=e,{onConfirm:r,onCancel:s,text:a,show:i,textSm:l}=o.useConfirm(),c=l===void 0?a.length>re:l,u=a.length>re;let h;t[0]!==s||t[1]!==r||t[2]!==i?(h=v=>{if(i)e:switch(v.key){case"Enter":{v.preventDefault(),v.stopPropagation(),r();break e}case"Escape":{v.preventDefault(),v.stopPropagation(),s();break e}}},t[0]=s,t[1]=r,t[2]=i,t[3]=h):h=t[3];const d=h;o.useKeyPress(d);const _=u?void 0:"sm";let p;t[4]!==c||t[5]!==a?(p=b.jsx(o.Modal.Header,{className:"justify-content-center",children:c?b.jsx(o.Typography,{variant:"body",children:a}):b.jsx(o.Modal.Title,{children:a})}),t[4]=c,t[5]=a,t[6]=p):p=t[6];let S;t[7]!==n.no||t[8]!==s?(S=b.jsx(o.PrimaryButton,{type:"button",variant:"outlined",color:"secondary",className:"w-100",onClick:s,children:n.no}),t[7]=n.no,t[8]=s,t[9]=S):S=t[9];let f;t[10]!==n.yes||t[11]!==r?(f=b.jsx(o.PrimaryButton,{type:"button",color:"primary",onClick:r,className:"w-100 ml",children:n.yes}),t[10]=n.yes,t[11]=r,t[12]=f):f=t[12];let g;t[13]!==S||t[14]!==f?(g=b.jsx(o.Modal.Body,{children:b.jsxs("div",{className:"w-100 d-flex gap-5",children:[S,f]})}),t[13]=S,t[14]=f,t[15]=g):g=t[15];let w;return t[16]!==s||t[17]!==i||t[18]!==_||t[19]!==p||t[20]!==g?(w=b.jsxs(o.Modal,{show:i,size:_,centered:!0,onHide:s,children:[p,g]}),t[16]=s,t[17]=i,t[18]=_,t[19]=p,t[20]=g,t[21]=w):w=t[21],w};exports.ApiWebSocketContext=o.ApiWebSocketContext;exports.AuthContext=o.AuthContext;exports.DelegationContext=o.DelegationContext;exports.FormDisabledContext=o.FormDisabledContext;exports.HelmetContext=o.HelmetContext;exports.LoadingContext=o.LoadingContext;exports.LuminusComponentsContext=o.LuminusComponentsContext;exports.UserContext=o.UserContext;exports.useFormDisabledContext=o.useFormDisabledContext;exports.FormDisabledProvider=K.FormDisabledProvider;exports.ApiWebSocketProvider=Be;exports.AuthProvider=Ce;exports.DelegationProvider=be;exports.HelmetProvider=ye;exports.LoadingProvider=me;exports.LuminusComponentsProvider=_e;exports.UserProvider=we;