@pautena/react-design-system 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/cjs/index.js +4 -4
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/alerts/expandable-alert/expandable-alert.d.ts +4 -1
  4. package/dist/cjs/types/components/data-display/board/board.d.ts +1 -2
  5. package/dist/cjs/types/components/feedback/query-container/query-container.d.ts +7 -3
  6. package/dist/cjs/types/components/inputs/index.d.ts +1 -0
  7. package/dist/cjs/types/components/value-displays/group-value-card/group-value-card.mock.d.ts +3 -1
  8. package/dist/cjs/types/components/value-displays/value-base/value-edit.d.ts +7 -2
  9. package/dist/cjs/types/components/value-displays/value-content/value-content.d.ts +10 -1
  10. package/dist/esm/index.js +4 -4
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/types/components/alerts/expandable-alert/expandable-alert.d.ts +4 -1
  13. package/dist/esm/types/components/data-display/board/board.d.ts +1 -2
  14. package/dist/esm/types/components/feedback/query-container/query-container.d.ts +7 -3
  15. package/dist/esm/types/components/inputs/index.d.ts +1 -0
  16. package/dist/esm/types/components/value-displays/group-value-card/group-value-card.mock.d.ts +3 -1
  17. package/dist/esm/types/components/value-displays/value-base/value-edit.d.ts +7 -2
  18. package/dist/esm/types/components/value-displays/value-content/value-content.d.ts +10 -1
  19. package/dist/index.d.ts +26 -9
  20. package/package.json +2 -1
  21. package/src/components/alerts/expandable-alert/expandable-alert.stories.tsx +23 -1
  22. package/src/components/alerts/expandable-alert/expandable-alert.tsx +11 -4
  23. package/src/components/data-display/board/board.test.tsx +60 -43
  24. package/src/components/data-display/board/board.tsx +13 -16
  25. package/src/components/feedback/query-container/query-container.stories.tsx +19 -6
  26. package/src/components/feedback/query-container/query-container.test.tsx +41 -17
  27. package/src/components/feedback/query-container/query-container.tsx +17 -5
  28. package/src/components/inputs/index.ts +1 -0
  29. package/src/components/value-displays/group-value-card/group-value-card.mock.tsx +28 -8
  30. package/src/components/value-displays/group-value-card/group-value-card.stories.tsx +19 -2
  31. package/src/components/value-displays/group-value-card/group-value-card.test.tsx +16 -18
  32. package/src/components/value-displays/value-base/value-edit.test.tsx +88 -0
  33. package/src/components/value-displays/value-base/value-edit.tsx +28 -6
  34. package/src/components/value-displays/value-boolean/value-boolean.stories.tsx +9 -0
  35. package/src/components/value-displays/value-boolean/value-boolean.test.tsx +29 -15
  36. package/src/components/value-displays/value-boolean/value-boolean.tsx +18 -11
  37. package/src/components/value-displays/value-content/value-content.test.tsx +20 -6
  38. package/src/components/value-displays/value-content/value-content.tsx +24 -10
  39. package/src/components/value-displays/value-datetime/value-datetime.stories.tsx +11 -0
  40. package/src/components/value-displays/value-datetime/value-datetime.test.tsx +9 -9
  41. package/src/components/value-displays/value-datetime/value-datetime.tsx +14 -10
  42. package/src/components/value-displays/value-rating/value-rating.stories.tsx +10 -0
  43. package/src/components/value-displays/value-rating/value-rating.test.tsx +11 -11
  44. package/src/components/value-displays/value-rating/value-rating.tsx +10 -8
  45. package/src/components/value-displays/value-text/value-text.stories.tsx +9 -0
  46. package/src/components/value-displays/value-text/value-text.test.tsx +20 -9
  47. package/src/components/value-displays/value-text/value-text.tsx +23 -10
  48. package/src/generators/model-form/model-form.test.tsx +1 -1
  49. package/src/generators/model-router/model-router.test.tsx +3 -3
  50. package/src/layouts/header-layout/header-layout.stories.tsx +2 -2
  51. package/src/layouts/header-layout/header-layout.tsx +1 -7
@@ -1,4 +1,5 @@
1
- import { AlertColor } from "@mui/material";
1
+ import { AlertColor, SxProps, Theme } from "@mui/material";
2
+ import { ReactElement } from "react";
2
3
  import React from "react";
3
4
  export interface ExpandableAlertProps {
4
5
  severity: AlertColor;
@@ -6,6 +7,8 @@ export interface ExpandableAlertProps {
6
7
  title?: string;
7
8
  message: string;
8
9
  metadata?: string | string[];
10
+ metadataComponent?: ReactElement;
9
11
  onClose: () => void;
12
+ sx?: SxProps<Theme>;
10
13
  }
11
14
  export declare const ExpandableAlert: React.ForwardRefExoticComponent<ExpandableAlertProps & React.RefAttributes<any>>;
@@ -4,7 +4,6 @@ export type BoardProps = PropsWithChildren<{
4
4
  markdown?: string;
5
5
  content?: string | string[];
6
6
  spacing?: 0 | 1 | 2 | 3 | 4 | 5;
7
- timeoutCopyText?: number;
8
7
  sx?: SxProps<Theme>;
9
8
  }>;
10
- export declare const Board: ({ markdown: markdownProps, content: contentProp, spacing, timeoutCopyText, children, sx, }: BoardProps) => JSX.Element;
9
+ export declare const Board: ({ markdown: markdownProps, content: contentProp, spacing, children, sx, }: BoardProps) => JSX.Element;
@@ -21,9 +21,13 @@ export interface QueryContainerSuccess {
21
21
  }
22
22
  export type QueryContainerProps = PropsWithChildren<{
23
23
  /**
24
- * There is a query in progress
24
+ * There is a query in progress and we have available data
25
25
  */
26
- isFetching: boolean;
26
+ fetching: boolean;
27
+ /**
28
+ * There is a query in progress and we don't have available data
29
+ */
30
+ loading: boolean;
27
31
  /**
28
32
  * The query has returned an error
29
33
  */
@@ -36,4 +40,4 @@ export type QueryContainerProps = PropsWithChildren<{
36
40
  /**
37
41
  * Component to show different indicators based on the usual api query statuses
38
42
  */
39
- export declare function QueryContainer({ isFetching, error, success, children }: QueryContainerProps): JSX.Element;
43
+ export declare function QueryContainer({ fetching, loading, error, success, children, }: QueryContainerProps): JSX.Element;
@@ -1,3 +1,4 @@
1
1
  export * from "./select";
2
2
  export * from "./sign-in";
3
3
  export * from "./autocomplete";
4
+ export * from "./text-field";
@@ -1,2 +1,4 @@
1
1
  import { GroupValueCardProps } from "./group-value-card";
2
- export declare const GroupValueCardDummy: ({ dense, ...rest }: GroupValueCardProps) => JSX.Element;
2
+ export declare const GroupValueCardDummy: ({ dense, editable, ...rest }: GroupValueCardProps & {
3
+ editable?: boolean | undefined;
4
+ }) => JSX.Element;
@@ -2,10 +2,10 @@ import React from "react";
2
2
  import { SxProps, Theme } from "@mui/material";
3
3
  export interface ValueEditButtonsProps {
4
4
  onClickCancel: () => void;
5
- onSubmitEdit: () => void;
5
+ onClickSubmit: () => void;
6
6
  sx?: SxProps<Theme>;
7
7
  }
8
- export declare const ValueEditButtons: ({ onClickCancel, onSubmitEdit, sx }: ValueEditButtonsProps) => JSX.Element;
8
+ export declare const ValueEditButtons: ({ onClickCancel, onClickSubmit, sx }: ValueEditButtonsProps) => JSX.Element;
9
9
  /**
10
10
  * Hook to manage the editing behaviour
11
11
  */
@@ -17,3 +17,8 @@ export declare const useEditableValueDisplay: <T>(initialValue: T | undefined, o
17
17
  startEdit: () => void;
18
18
  submitEdit: () => void;
19
19
  };
20
+ export interface ValueEditButtonProps {
21
+ dense?: boolean;
22
+ onClick: () => void;
23
+ }
24
+ export declare const ValueEditButton: ({ dense, onClick }: ValueEditButtonProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { SxProps, Theme } from "@mui/material";
1
2
  import React from "react";
2
3
  export declare const getValueContentLabelId: (label: string) => string;
3
4
  export interface ValueContentProps {
@@ -5,6 +6,10 @@ export interface ValueContentProps {
5
6
  * Name of the displayed value
6
7
  */
7
8
  label: string;
9
+ /**
10
+ * If true, the label will not be shown
11
+ */
12
+ hideLabel?: boolean;
8
13
  /**
9
14
  * If defined, a tooltip is going to be added arround the children;
10
15
  */
@@ -22,8 +27,12 @@ export interface ValueContentProps {
22
27
  * False by default
23
28
  */
24
29
  dense?: boolean;
30
+ /**
31
+ * Custom styles for the root component
32
+ */
33
+ sx?: SxProps<Theme>;
25
34
  }
26
35
  /**
27
36
  * Displays a string value with a label
28
37
  */
29
- export declare const ValueContent: ({ label, tooltip, tooltipEnterDelay, children, dense, }: ValueContentProps) => JSX.Element;
38
+ export declare const ValueContent: ({ label, hideLabel, tooltip, tooltipEnterDelay, children, dense, sx, }: ValueContentProps) => JSX.Element;
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{InputAdornment as e,Button as t,useTheme as n,Box as r,Typography as o,Tooltip as a,TextField as i,IconButton as l,Paper as c,Switch as u,Grid as s,Rating as d,CircularProgress as m,Alert as f,AlertTitle as p,Badge as v,Link as y,Snackbar as h,Container as g,Breadcrumbs as E,Tabs as b,Tab as x,styled as w,drawerClasses as S,Drawer as C,Divider as k,paperClasses as O,ListSubheader as I,List as $,ListItemButton as T,ListItemIcon as P,ListItemText as j,Collapse as z,Popover as R,ListItemAvatar as N,Avatar as W,AppBar as A,Toolbar as M,FormControl as D,InputLabel as F,Select as V,LinearProgress as _,Stack as q,outlinedInputClasses as L,inputLabelClasses as B,circularProgressClasses as H,linearProgressClasses as U,autocompleteClasses as Y,iconButtonClasses as J,OutlinedInput as X,FormHelperText as G,Autocomplete as K,tabsClasses as Q,TableHead as Z,TableRow as ee,TableCell as te,TableSortLabel as ne,TableContainer as re,Table as oe,TableBody as ae,Skeleton as ie,alertClasses as le,Dialog as ce,DialogTitle as ue,DialogContent as se,DialogActions as de,FormControlLabel as me,Checkbox as fe,MenuItem as pe,Menu as ve}from"@mui/material";import*as ye from"react";import he,{useState as ge,forwardRef as Ee,useRef as be,useEffect as xe,createContext as we,useContext as Se,useId as Ce,useMemo as ke}from"react";import Oe from"@mui/icons-material/Check";import Ie from"@mui/icons-material/Clear";import $e from"@mui/icons-material/Edit";import Te from"@mui/icons-material/Close";import{format as Pe}from"date-fns";import{DateTimePicker as je,TimePicker as ze,DatePicker as Re,DesktopDatePicker as Ne}from"@mui/x-date-pickers";import{Link as We,useLocation as Ae,useNavigate as Me,useParams as De,Routes as Fe,Route as Ve}from"react-router-dom";import{blueGrey as _e}from"@mui/material/colors";import qe from"markdown-to-jsx";import Le from"@mui/icons-material/ChevronLeft";import Be from"@mui/icons-material/ExpandMore";import He from"@mui/icons-material/ChevronRight";import Ue from"@mui/icons-material/Menu";import{LoadingButton as Ye}from"@mui/lab";import Je from"@mui/icons-material/Search";import{loremIpsum as Xe}from"lorem-ipsum";import Ge from"@mui/icons-material/ExpandLess";import Ke from"@mui/icons-material/ReportProblem";import{DataGrid as Qe}from"@mui/x-data-grid";import Ze from"@mui/icons-material/MoreVert";var et=function(n){var r=n.onClickCancel,o=n.onSubmitEdit,a=n.sx;return he.createElement(e,{position:"end",sx:a},he.createElement(t,{variant:"contained",size:"small",color:"error",startIcon:he.createElement(Ie,null),onClick:r,sx:{paddingRight:0,minWidth:0,marginRight:1}}),he.createElement(t,{variant:"contained",size:"small",color:"primary",startIcon:he.createElement(Oe,null),onClick:o,sx:{paddingRight:0,minWidth:0}}))},tt=function(e,t){var n=ge(!1),r=n[0],o=n[1],a=ge(e),i=a[0],l=a[1],c=function(){o(!1),l(e)};return{isEditing:r,cancelEdit:c,editValue:i,setEditValue:l,startEdit:function(){o(!0)},submitEdit:function(){t(i),c()}}},nt="-",rt=function(e){return"label-".concat(e.replace(/ /g,"-"))},ot=function(e){var t=e.label,i=e.tooltip,l=e.tooltipEnterDelay,c=void 0===l?2e3:l,u=e.children,s=e.dense,d=n().typography,m=rt(t);return he.createElement(r,{width:1,lineHeight:s?0:void 0},he.createElement(o,{variant:s?"caption":"subtitle2",role:"label",id:m,lineHeight:s?d.pxToRem(15):void 0},t),i?he.createElement(a,{title:i,placement:"top",enterDelay:c},u):u)},at=function(e){var t=e.label,n=e.value,r=e.placeholder,a=void 0===r?nt:r,c=e.editable,u=e.dense,s=e.onEdit,d=void 0===s?function(){return null}:s,m=tt(null==n?void 0:n.toString(),d),f=m.isEditing,p=m.editValue,v=m.startEdit,y=m.cancelEdit,h=m.setEditValue,g=m.submitEdit,E=rt(t),b=(null==n?void 0:n.toString())||a;return he.createElement(ot,{label:t,tooltip:b,dense:u},f?he.createElement(i,{value:p,size:"small",onChange:function(e){return h(e.target.value)},InputProps:{endAdornment:he.createElement(et,{onClickCancel:y,onSubmitEdit:g})}}):he.createElement(o,{variant:u?"body1":"h5",noWrap:!0,"aria-labelledby":E},b,c&&he.createElement(l,{size:"small",onClick:v,sx:{ml:1}},he.createElement($e,null))))},it=function(e){var t=e.children;return he.createElement(c,{sx:{p:2}},t)},lt=function(e){var t=e.label,a=e.value,i=e.placeholder,c=void 0===i?nt:i,s=e.editable,d=e.dense,m=e.onEdit,f=void 0===m?function(){return null}:m,p=n().typography,v=tt(a,f),y=v.isEditing,h=v.editValue,g=v.startEdit,E=v.cancelEdit,b=v.setEditValue,x=v.submitEdit,w={fontSize:d?p.h6.fontSize:p.h5.fontSize};return he.createElement(ot,{label:t,dense:d},y?he.createElement(r,{display:"flex",alignItems:"center"},he.createElement(u,{checked:h,onChange:function(e){return b(e.target.checked)}}),he.createElement(et,{onClickCancel:E,onSubmitEdit:x})):he.createElement(r,{display:"flex",alignItems:"center"},void 0===a?he.createElement(o,{variant:"h5"},c):a?he.createElement(Oe,{color:"success",sx:w}):he.createElement(Te,{color:"error",sx:w}),s&&he.createElement(l,{size:"small",onClick:g,sx:{ml:1}},he.createElement($e,null))))},ct=function(){return ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ct.apply(this,arguments)};function ut(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function st(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var dt=function(e){var t=e.label,n=e.value,a=e.format,c=e.placeholder,u=void 0===c?nt:c,s=e.editable,d=e.editInputType,m=void 0===d?"datetime":d,f=e.dense,p=e.onEdit,v=tt(n,void 0===p?function(){return null}:p),y=v.isEditing,h=v.editValue,g=v.startEdit,E=v.cancelEdit,b=v.setEditValue,x=v.submitEdit,w=rt(t),S=n&&Pe(n,a)||u,C="datetime"===m?je:"time"===m?ze:Re;return he.createElement(ot,{label:t,tooltip:S,dense:f},y?he.createElement(C,{value:h,format:a,onChange:function(e){return b(e||void 0)},slots:{textField:function(e){var t;return he.createElement(i,ct({},e,{InputProps:ct(ct({},e.InputProps),{endAdornment:he.createElement(he.Fragment,null,null===(t=e.InputProps)||void 0===t?void 0:t.endAdornment,he.createElement(et,{onClickCancel:E,onSubmitEdit:x,sx:{ml:2}}))})}))}}}):he.createElement(r,{display:"flex",alignItems:"center"},he.createElement(o,{variant:f?"body1":"h5",noWrap:!0,"aria-labelledby":w},S),s&&he.createElement(l,{size:"small",onClick:g,sx:{ml:1}},he.createElement($e,null))))},mt=function(e){var t=void 0===e?{}:e,r=t.lightWeight,o=void 0===r?100:r,a=t.darkWeight,i=void 0===a?900:a,l=n().palette;return"light"===l.mode?l.grey[o]:l.grey[i]},ft=function(e){var t=e.title,a=e.subtitle,i=e.centered,l=e.children,u=e.dense,d=n().typography,m=mt({lightWeight:200,darkWeight:800});return he.createElement(c,{sx:{paddingBottom:u?0:1}},he.createElement(r,{bgcolor:m,px:u?1:2,py:u?.5:1,lineHeight:u?0:void 0},he.createElement(o,{variant:u?"body1":"h6",role:"heading","aria-level":1},t),a&&he.createElement(o,{variant:u?"caption":"body2",role:"heading","aria-level":2,lineHeight:u?d.pxToRem(15):void 0},a)),he.createElement(s,{container:!0,padding:1,rowSpacing:u?1:2,justifyContent:i?"center":"flex-start"},l))},pt=function(e){var t=e.label,n=e.value,o=void 0===n?0:n,a=e.maxRating,i=void 0===a?5:a,c=e.editable,u=e.dense,s=e.onEdit,m=tt(o,void 0===s?function(){return null}:s),f=m.isEditing,p=m.editValue,v=m.startEdit,y=m.cancelEdit,h=m.setEditValue,g=m.submitEdit,E=rt(t);return he.createElement(ot,{label:t,tooltip:o.toString(),dense:u},he.createElement(r,{display:"flex",alignItems:"center"},he.createElement(d,{"aria-labelledby":E,readOnly:!f,max:i,size:u?"small":"medium",value:f?p:o,onChange:function(e,t){return t&&h(t)}}),c&&!f&&he.createElement(l,{size:"small",onClick:v,sx:{ml:1}},he.createElement($e,null)),f&&he.createElement(et,{onClickCancel:y,onSubmitEdit:g})))},vt=function(e,t){return new Array(e).fill(t)},yt=function(e){var t=Math.floor(Math.random()*e.length);return{index:t,item:e[t]}},ht=function(e){void 0===e&&(e=12);var t=function(t,n,r){var o=t[n];return t[n]+=r,t[n]>e?(t[n]=r,!1):(t[n]==e&&(t[n]=0),o>0)};return{xs:0,sm:0,md:0,lg:0,xl:0,increment:function(e){var n=e.xs,r=void 0===n?0:n,o=e.sm,a=void 0===o?0:o,i=e.md,l=void 0===i?0:i,c=e.lg,u=void 0===c?0:c,s=e.xl,d=a||r,m=l||d,f=u||m,p=(void 0===s?0:s)||f;return{xs:t(this,"xs",r),sm:t(this,"sm",d),md:t(this,"md",m),lg:t(this,"lg",f),xl:t(this,"xl",p)}}}},gt=function(e){var t=new FormData(e.currentTarget),n={};return t.forEach((function(e,t){n[t]=e})),n},Et={root:"RdsValueItem-root",content:"RdsValueItem-content"},bt=function(e){var t=e.children,n=e.bordered,o=void 0===n||n,a=ut(e,["children","bordered"]),i=function(e,t){var n="solid ".concat(t," 1px"),r="none";if(e){if(Array.isArray(e))return e.map((function(e){return e?n:r}));if("object"==typeof e){var o={};return Object.entries(e).forEach((function(e){var t=e[0],a=e[1];o[t]=a?n:r})),o}return n}}(o,mt({lightWeight:200,darkWeight:800}));return he.createElement(s,ct({item:!0,className:Et.root},a),he.createElement(r,{className:Et.content,px:1,borderLeft:i},t))},xt=function(){return he.createElement(r,{width:1,height:1,display:"flex",justifyContent:"center",alignItems:"center"},he.createElement(m,null))};function wt(e){var t=e.isFetching,n=e.error,o=e.success,a=e.children;return t?he.createElement(xt,null):n?he.createElement(f,{severity:"error",role:"alert","aria-describedby":"error"},n.name&&he.createElement(p,{role:"heading"},n.name),n.message):he.createElement(r,null,o&&he.createElement(f,{severity:"success",role:"alert","aria-describedby":"success",sx:{mb:2}},o.name&&he.createElement(p,{role:"heading"},o.name),o.message),a)}var St={root:"RdsBullet-root"},Ct=function(e){var t=e.variant,n=void 0===t?"primary":t,r=e.sx;return he.createElement(v,{color:n,variant:"dot",className:St.root,role:"bullet","aria-describedby":n,sx:r})},kt={root:"RdsLabel-root"},Ot=function(e){var t=e.text,a=e.variant,i=void 0===a?"default":a,l=e.sx,c=n().palette,u={default:"light"===c.mode?c.grey[100]:c.grey[900],primary:c.primary.main,secondary:c.secondary.main,info:c.info.main,warning:c.warning.main,error:c.error.main},s={default:c.getContrastText(u.default),primary:c.primary.contrastText,secondary:c.secondary.contrastText,info:c.info.contrastText,warning:c.warning.contrastText,error:c.error.contrastText};return he.createElement(r,{px:1,sx:ct({backgroundColor:u[i]},l),borderRadius:1,color:s[i],className:kt.root,role:"label","aria-describedby":i},he.createElement(o,{variant:"caption",fontWeight:700},t.toUpperCase()))},It=Ee((function(e,t){var n=e.href,r=ut(e,["href"]);return he.createElement(We,ct({ref:t,to:n},r))})),$t=Ee((function(e,t){return he.createElement(y,ct({},e,{component:It}))})),Tt=new Error("NotificationCenterContext.Provider is required and was undefined"),Pt=he.createContext(void 0),jt=function(){var e=he.useContext(Pt);if(void 0===e)throw Tt;return e},zt=function(e){var t=e.children,n=e.autoHideDuration,r=void 0===n?6e3:n,o=ge(void 0),a=o[0],i=o[1],l=ge(!1),c=l[0],u=l[1],s=function(){u(!1)};return he.createElement(Pt.Provider,{value:{show:function(e){i(e),u(!0)},hide:s}},he.createElement(h,{open:c,autoHideDuration:r,onClose:s,anchorOrigin:{vertical:"top",horizontal:"right"}},he.createElement(f,{onClose:s,severity:null==a?void 0:a.severity,"aria-label":null==a?void 0:a.severity,sx:{width:"100%"}},(null==a?void 0:a.title)&&he.createElement(p,null,null==a?void 0:a.title),null==a?void 0:a.message)),t)},Rt=function(e,t,n){var r=n.from,o=n.to,a=be(),i=jt().show;xe((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},Nt=we([0,function(){return null}]),Wt=Nt.Provider,At=function(){return Se(Nt)},Mt=function(e){var t=e.children,n=e.initialValue,r=ge(void 0===n?0:n);return he.createElement(Wt,{value:r},t)},Dt=function(e){var a=e.title,i=e.subtitle,l=e.preset,c=void 0===l?"default":l,u=e.actionsVariant,s=void 0===u?"outlined":u,d=e.breadcrumbs,m=e.actions,f=e.tabs,p=e.tabsMode,v=void 0===p?"panel":p,y=e.navigationButton,h=Ae(),w=n().palette,S=mt(),C=At(),k=C[0],O=C[1],I={default:S,primary:w.primary.main,secondary:w.secondary.main,inherit:"inherit",transparent:"transparent"},$=I[c],T={default:w.getContrastText(I.default),primary:w.primary.contrastText,secondary:w.secondary.contrastText,inherit:"inherit",transparent:w.text.primary}[c],P="panel"===v?k:null==f?void 0:f.findIndex((function(e){return e.href===h.pathname}));return he.createElement(r,{bgcolor:$,color:T},he.createElement(g,null,he.createElement(r,{sx:{py:3,display:"flex",flexDirection:"row",justifyContent:"space-between"}},he.createElement(r,null,y&&he.createElement(t,{href:y.href,size:"small",color:"inherit",LinkComponent:$t,startIcon:y.icon,sx:{mb:1}},y.text),(null==d?void 0:d.length)&&he.createElement(E,{color:"inherit",separator:"›","aria-label":"breadcrumb",sx:{marginTop:1}},d.map((function(e){var t=e.id,n=e.link,r=e.text;return he.createElement($t,{key:t,underline:"hover",color:"inherit",href:n,variant:"body2",role:"link"},r)}))),he.createElement(o,{variant:"h4",role:"heading","aria-level":1},a),i&&he.createElement(o,{variant:"body1",role:"heading","aria-level":2},i)),m&&he.createElement(r,null,m.map((function(e,n){var r=e.disabled,o=e.id,a=e.href,i=e.onClick,l=e.text;return he.createElement(t,{component:a?$t:"button",role:"button",color:"inherit",disabled:r,key:o,variant:s,size:"small",href:a,onClick:i,sx:{mr:n!=m.length-1?1:0}},l)})))),f&&he.createElement(b,{value:P,textColor:"inherit",onChange:"panel"===v?function(e,t){return O(t)}:void 0},f.map((function(e){var t=e.id,n=e.label,r=e.disabled,o=e.href,a={label:n,disabled:r};return"panel"===v?he.createElement(x,ct({key:t},a)):he.createElement(x,ct({key:t},a,{component:$t,href:o}))})))))},Ft={overrides:{h1:{component:o,props:{gutterBottom:!0,variant:"h5"}},h2:{component:o,props:{gutterBottom:!0,variant:"h6"}},h3:{component:o,props:{gutterBottom:!0,variant:"subtitle1"}},h4:{component:o,props:{gutterBottom:!0,variant:"caption",paragraph:!0}},p:{component:o,props:{paragraph:!0}},a:{component:y},li:{component:"li"}}},Vt=function(e){var t=e.content,n=e.options,r=void 0===n?Ft:n;return he.createElement(qe,{options:r},t)},_t=function(e){var n,a,i=e.markdown,l=e.content,u=e.spacing,s=void 0===u?0:u,d=e.timeoutCopyText,m=void 0===d?2e3:d,f=e.children,p=e.sx,v=ge("Copy"),y=v[0],h=v[1];i?n=i||"":Array.isArray(l)?(a=l.map((function(e,t){return he.createElement(o,{key:t,sx:{pb:s}},e)})),n=l.join("\n")):(a=he.createElement(o,null,l),n=l||"");var g=i&&he.createElement(Vt,{content:i});return he.createElement(c,{sx:ct({p:2,backgroundColor:_e[800],color:"white"},p)},he.createElement(r,{display:"flex",flexDirection:"row"},he.createElement(r,{width:1},f||g||a),he.createElement(r,{width:100,sx:{ml:1}},n&&he.createElement(t,{fullWidth:!0,color:"inherit",size:"small",variant:"outlined",onClick:function(){navigator.clipboard.writeText(n),h("Copied!"),setTimeout((function(){return h("Copy")}),m)}},y))))},qt=function(e){var t=e.children;return he.createElement(g,{component:"main",sx:{py:3,flexGrow:1}},t)};function Lt(e){var t=e.children,n=e.centerVertical,o=void 0===n||n,a=e.centerHorizontal,i=void 0===a||a,l=e.sx;return he.createElement(r,{width:1,height:1,sx:ct(ct({},l),{display:"flex",flexDirection:"column",justifyContent:o?"center":"flex-start",alignItems:i?"center":"flex-start"})},t)}var Bt=we(void 0),Ht=new Error("DrawerContext.Provider is required and was undefined"),Ut=function(){var e=Se(Bt);if(void 0===e)throw Ht;return e},Yt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},Jt=function(e){var t;return(t={transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")})[e.breakpoints.up("sm")]={width:"calc(".concat(e.spacing(8)," + 1px)")},t},Xt=w("div")((function(e){var t=e.theme;return ct({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Gt={temporary:!0,mini:!0,persistent:!0,clipped:!1},Kt={temporary:"temporary",mini:"permanent",clipped:"permanent",persistent:"persistent"},Qt=function(){return{}},Zt={mini:function(e,t){var n;return(n={boxSizing:"border-box"})["& .".concat(O.root)]={zIndex:t.zIndex.drawer-1},n},temporary:Qt,clipped:Qt,persistent:Qt},en=function(e){var t,r,o=e.children,a=ut(e,["children"]),i=n(),c=Ut(),u=c.state,s=c.switchState,d=c.underAppBar,m=c.close,f=c.drawerWidth,p=c.variant,v=ct(ct(ct({width:f,flexShrink:0,whiteSpace:"nowrap"},"open"===u&&ct(ct({},Yt(i)),((t={})["& .".concat(S.paper)]=Yt(i),t))),"open"!==u&&ct(ct({},Jt(i)),((r={})["& .".concat(S.paper)]=Jt(i),r))),Zt[p](u,i));return he.createElement(C,ct({open:"open"===u,variant:Kt[p],role:"menu","aria-hidden":"close"===u,onClose:m,sx:v},a),he.createElement(Xt,null,!d&&Gt[p]&&he.createElement(l,{onClick:s},he.createElement(Le,null))),he.createElement(k,null),o)},tn={temporary:"close",mini:"collapse",clipped:"open",persistent:"close"},nn={temporary:["close","open"],mini:["collapse","open"],clipped:["open","open"],persistent:["close","open"]},rn=function(e){var t=e.children,n=e.initialState,r=e.variant,o=void 0===r?"temporary":r,a=e.drawerWidth,i=void 0===a?240:a,l=e.underAppBar,c=void 0!==l&&l,u=e.selectedItemId,s=e.onStateChange,d=void 0===s?function(){return null}:s,m=ge(n||tn[o]),f=m[0],p=m[1],v=function(e){d(e),p(e)};return he.createElement(Bt.Provider,{value:{state:f,variant:o,selectedItemId:u,underAppBar:c,drawerWidth:i,switchState:function(){return v(nn[o]["open"===f?0:1])},collapse:function(){return v("collapse")},close:function(){return v("close")},open:function(){return v("open")},setState:p}},t)},on=w(I,{shouldForwardProp:function(e){return"size"!==e}})((function(e){var t=e.size,n=e.theme;return{lineHeight:"small"===t?n.typography.pxToRem(40):void 0}})),an=function(e,t){return{color:t?e.palette.primary.main:void 0,fontWeight:t?e.typography.fontWeightBold:e.typography.fontWeightMedium}},ln=function(e){var t=e.text,r=e.icon,o=e.selected,a=e.items,i=e.size,l=void 0===i?"medium":i,c=e.level,u=e.sx,s=void 0===u?{}:u,d=Ut().state,m=be(null),f=n(),p=f.palette,v=f.spacing,y=ge(!1),h=y[0],g=y[1],E=an(n(),o),b=E.color,x=E.fontWeight,w=he.createElement($,{component:"div",disablePadding:!0},a.map((function(e){return he.createElement(dn,{key:e.id,level:c+1,item:e,size:l})}))),S="collapse"===d&&0===c?{position:"absolute",right:0}:{};return he.createElement(he.Fragment,null,he.createElement(T,{ref:m,selected:o,"aria-label":t,onClick:function(){return g((function(e){return!e}))},dense:"small"===l,sx:ct(ct({},s),{pl:"open"===d?v(2+1.5*c):void 0,backgroundColor:h?p.action.hover:void 0})},r&&he.createElement(P,{sx:{color:b}},r),he.createElement(j,{disableTypography:!0,primary:t,sx:{color:b,fontWeight:x,opacity:"collapse"===d&&0===c?0:void 0}}),h&&"open"===d?he.createElement(Be,{sx:[{color:b,ml:2},S]}):he.createElement(He,{sx:[{color:b,ml:2},S]})),"open"===d?he.createElement(z,{in:h,timeout:"auto",unmountOnExit:!0,"aria-label":"".concat(t," collapse submenu")},w):he.createElement(R,{open:h,PaperProps:{elevation:0,variant:"outlined"},"aria-label":"".concat(t," popover submenu"),anchorEl:m.current,onClose:function(){return g(!1)},anchorOrigin:{vertical:"top",horizontal:"right"}},w))},cn=w($t)((function(e){return{color:e.theme.palette.text.primary}})),un={minWidth:0,justifyContent:"center",marginRight:"auto"},sn=function(e){var t=e.text,r=e.icon,o=e.avatar,a=e.label,i=e.bullet,l=e.href,c=e.selected,u=e.size,s=void 0===u?"medium":u,d=e.level,m=e.sx,f=Ut().state,p=n(),v=an(p,c),y=v.color,h=v.fontWeight;return he.createElement(T,{LinkComponent:cn,dense:"small"===s,"aria-label":t,href:l,selected:c,sx:ct(ct(ct({},m),{pl:"open"===f?p.spacing(2+1.5*d):void 0}),"collapse"===f&&{paddingHorizontal:p.spacing(2.5),justifyContent:"center"})},r&&he.createElement(P,{sx:ct({color:y},"collapse"===f&&0===d&&un)},r),o&&he.createElement(N,{sx:ct({},"collapse"===f&&0===d&&un)},he.createElement(W,{alt:o.alt,src:o.src,sx:ct(ct({},"small"===s&&{width:24,height:24}),"collapse"===f&&{width:30,height:30})})),he.createElement(j,{disableTypography:!0,primary:t,sx:{color:y,fontWeight:h,opacity:"collapse"===f&&0===d?0:void 0}}),a&&"open"===f&&he.createElement(Ot,{text:a.text,variant:a.variant,sx:{ml:2}}),i&&"open"===f&&he.createElement(Ct,{variant:i.variant,sx:{ml:2}}))},dn=function(e){var t=e.item,n=e.size,r=void 0===n?"medium":n,o=e.level,a=void 0===o?0:o,i=Ut().selectedItemId;if("items"in t){var l=t.id,c=t.text,u=t.icon,s=t.items,d=s.some((function(e){return e.id===i}));return he.createElement(ln,{size:r,selected:l===i||d,text:c,icon:u,items:s,level:a})}l=t.id,c=t.text,u=t.icon;var m=t.avatar,f=t.label,p=t.bullet,v=t.href;return he.createElement(sn,{selected:l===i,size:r,text:c,icon:u,avatar:m,label:f,bullet:p,href:v,level:a})},mn=function(e){var t=e.title,r=e.items,o=e.size,a=void 0===o?"medium":o,i=Ut().state,l=n().spacing;return he.createElement(he.Fragment,null,t&&"open"===i&&he.createElement(on,{size:a,role:"heading"},t),he.createElement($,{sx:{paddingTop:"small"===a?l(0):void 0,paddingY:"collapse"===i?0:void 0}},r.map((function(e){return he.createElement(dn,{key:e.id,item:e,size:a})}))))},fn=function(e){var t=e.nav.items,n=e.size,r=void 0===n?"medium":n;return he.createElement(he.Fragment,null,t.map((function(e,t){var n=e.title,o=e.items;return he.createElement(mn,{key:t,title:n,items:o,size:r})})))},pn={temporary:!1,mini:!0,persistent:!0,clipped:!0},vn={temporary:function(){return!0},mini:function(e){return"open"!==e},persistent:function(){return!0},clipped:function(){return!1}},yn=function(e){var t=e.title,r=e.sx,a=e.children,i=ut(e,["title","sx","children"]),c=n(),u=Ut(),s=u.state,d=u.variant,m=u.switchState,f=u.drawerWidth,p=u.underAppBar,v=pn[d]&&!p&&ct({transition:c.transitions.create(["width","margin"],{easing:c.transitions.easing.sharp,duration:c.transitions.duration.leavingScreen})},"open"===s&&{marginLeft:f,width:"calc(100% - ".concat(f,"px)"),transition:c.transitions.create(["width","margin"],{easing:c.transitions.easing.sharp,duration:c.transitions.duration.enteringScreen})})||{};return ye.createElement(A,ct({position:p?"fixed":void 0},i,{sx:ct(ct(ct({},r),v),{zIndex:function(e){return e.zIndex.drawer+(p?1:0)}})}),ye.createElement(M,null,ye.createElement(l,{color:"inherit","aria-label":"open drawer",onClick:m,edge:"start",sx:{marginRight:5,display:vn[d](s)?void 0:"none"}},ye.createElement(Ue,null)),t&&ye.createElement(o,{variant:"h6",component:"h1",role:"heading","aria-level":1,noWrap:!0},t),a))},hn={temporary:!1,mini:!0,clipped:!0,persistent:!0},gn=w("div")((function(e){var t=e.theme,r=n().spacing,o=Ut(),a=o.drawerWidth,i=o.state,l=o.variant;return{marginLeft:hn[l]?"open"===i?a:"collapse"===i?r(8):0:0,transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})}})),En=function(e){var t=e.children;return he.createElement(gn,null,he.createElement(Xt,null),t)},bn={small:15,medium:20},xn=function(e){var t=e.label,n=e.value,o=e.loading,a=void 0!==o&&o,i=e.fetching,l=void 0!==i&&i,c=e.size,u=void 0===c?"medium":c,s=e.fullWidth,d=void 0!==s&&s,f=e.color,p=e.children,v=e.onChange,y=Ce(),h=w(D)((function(){return f?{label:{color:f},".MuiOutlinedInput-notchedOutline":{borderColor:"".concat(f," !important")},".MuiInputBase-root":{color:f},".MuiSelect-icon":{fill:f}}:{}}));return he.createElement(h,{fullWidth:d},he.createElement(F,{id:y},t),he.createElement(V,{labelId:y,id:y,value:n,label:t,onChange:v,disabled:l,size:u,renderValue:function(e){return l?he.createElement(Lt,{centerVertical:!0,centerHorizontal:!0},he.createElement(m,{color:"inherit",size:bn[u]})):a?he.createElement(r,{display:"flex",flexDirection:"column"},e,he.createElement(_,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}})):e}},p))},wn=function(e){var t=e.title,n=e.subtitle,a=e.loading,l=e.error,c=e.onSubmitSignIn,u=ge(""),s=u[0],d=u[1],m=ge(""),p=m[0],v=m[1];return he.createElement(he.Fragment,null,he.createElement(r,{marginBottom:2},he.createElement(o,{component:"h1",variant:"h4"},t),he.createElement(o,{variant:"body1"},n)),he.createElement(r,{component:"form",onSubmit:function(e){var t,n;e.preventDefault(),d(""),v("");var r=new FormData(e.currentTarget),o=null===(t=r.get("email"))||void 0===t?void 0:t.toString(),a=null===(n=r.get("password"))||void 0===n?void 0:n.toString();o||d("Please fill out this field"),a||v("Please fill out this field"),o&&a&&c(o,a)}},l&&he.createElement(q,{width:"100%",marginTop:1},he.createElement(f,{variant:"filled",severity:"error"},l.message)),he.createElement(i,{margin:"normal",fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,disabled:a,type:"email",inputProps:{role:"input"},error:!!s,helperText:s}),he.createElement(i,{margin:"normal",fullWidth:!0,role:"input",name:"password",label:"Password",type:"password",id:"password",disabled:a,autoComplete:"current-password",inputProps:{role:"input"},error:!!p,helperText:p}),he.createElement(Ye,{type:"submit",fullWidth:!0,variant:"contained",loading:a,disabled:a,role:"button",sx:{mt:2}},"Sign In")))};function Sn(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}var Cn,kn={exports:{}},On={exports:{}},In={};var $n,Tn,Pn,jn,zn,Rn,Nn,Wn,An,Mn,Dn,Fn,Vn,_n,qn={};
1
+ import{InputAdornment as e,Button as t,useTheme as n,IconButton as r,Box as o,Typography as a,Tooltip as i,TextField as l,Paper as c,Switch as u,Grid as s,Rating as d,CircularProgress as m,Alert as f,AlertTitle as p,LinearProgress as v,Badge as y,Link as h,Snackbar as b,Container as g,Breadcrumbs as E,Tabs as x,Tab as S,styled as w,drawerClasses as C,Drawer as k,Divider as O,paperClasses as I,ListSubheader as T,List as $,ListItemButton as P,ListItemIcon as j,ListItemText as z,Collapse as R,Popover as N,ListItemAvatar as W,Avatar as A,AppBar as M,Toolbar as D,FormControl as V,InputLabel as F,Select as _,Stack as L,outlinedInputClasses as q,inputLabelClasses as B,circularProgressClasses as H,linearProgressClasses as U,autocompleteClasses as Y,iconButtonClasses as J,OutlinedInput as X,FormHelperText as G,Autocomplete as K,tabsClasses as Q,TableHead as Z,TableRow as ee,TableCell as te,TableSortLabel as ne,TableContainer as re,Table as oe,TableBody as ae,Skeleton as ie,alertClasses as le,Dialog as ce,DialogTitle as ue,DialogContent as se,DialogActions as de,FormControlLabel as me,Checkbox as fe,MenuItem as pe,Menu as ve}from"@mui/material";import*as ye from"react";import he,{useState as be,useRef as ge,useEffect as Ee,forwardRef as xe,createContext as Se,useContext as we,useId as Ce,useMemo as ke}from"react";import Oe from"@mui/icons-material/Check";import Ie from"@mui/icons-material/Clear";import Te from"@mui/icons-material/Edit";import $e from"@mui/icons-material/Close";import{format as Pe}from"date-fns";import{DateTimePicker as je,TimePicker as ze,DatePicker as Re,DesktopDatePicker as Ne}from"@mui/x-date-pickers";import{Link as We,useLocation as Ae,useNavigate as Me,useParams as De,Routes as Ve,Route as Fe}from"react-router-dom";import{blueGrey as _e}from"@mui/material/colors";import Le from"markdown-to-jsx";import qe from"@mui/icons-material/ContentCopy";import Be from"@mui/icons-material/ChevronLeft";import He from"@mui/icons-material/ExpandMore";import Ue from"@mui/icons-material/ChevronRight";import Ye from"@mui/icons-material/Menu";import{LoadingButton as Je}from"@mui/lab";import Xe from"@mui/icons-material/Search";import{loremIpsum as Ge}from"lorem-ipsum";import Ke from"@mui/icons-material/ExpandLess";import Qe from"@mui/icons-material/ReportProblem";import{DataGrid as Ze}from"@mui/x-data-grid";import et from"@mui/icons-material/MoreVert";var tt=function(n){var r=n.onClickCancel,o=n.onClickSubmit,a=n.sx;return he.createElement(e,{position:"end",sx:a},he.createElement(t,{variant:"contained",size:"small",color:"error","aria-label":"cancel button",startIcon:he.createElement(Ie,{sx:{fontSize:12}}),onClick:r,sx:{paddingRight:0,minWidth:0,marginRight:1}}),he.createElement(t,{variant:"contained",size:"small",color:"primary","aria-label":"submit button",startIcon:he.createElement(Oe,{sx:{fontSize:12}}),onClick:o,sx:{paddingRight:0,minWidth:0}}))},nt=function(e,t){var n=be(!1),r=n[0],o=n[1],a=be(e),i=a[0],l=a[1],c=function(){o(!1),l(e)};return{isEditing:r,cancelEdit:c,editValue:i,setEditValue:l,startEdit:function(){o(!0)},submitEdit:function(){t(i),c()}}},rt=function(e){var t=e.dense,o=e.onClick,a=n().typography;return he.createElement(r,{size:"small",onClick:o,sx:{ml:t?.5:1},"aria-label":"edit button"},he.createElement(Te,{sx:{fontSize:a.pxToRem(t?18:24)}}))},ot="-",at=function(e){return"label-".concat(e.replace(/ /g,"-"))},it=function(e){var t=e.label,r=e.hideLabel,l=e.tooltip,c=e.tooltipEnterDelay,u=void 0===c?2e3:c,s=e.children,d=e.dense,m=e.sx,f=n().typography,p=at(t);return he.createElement(o,{width:1,lineHeight:d?0:void 0,sx:m},!r&&he.createElement(a,{variant:d?"caption":"subtitle2",role:"label",id:p,lineHeight:d?f.pxToRem(15):void 0},t),l?he.createElement(i,{title:l,placement:"top",enterDelay:u},s):s)},lt=function(e){var t=e.label,n=e.value,r=e.placeholder,o=void 0===r?ot:r,i=e.editable,c=e.dense,u=e.onEdit,s=void 0===u?function(){return null}:u,d=ge(null),m=nt(null==n?void 0:n.toString(),s),f=m.isEditing,p=m.editValue,v=m.startEdit,y=m.cancelEdit,h=m.setEditValue,b=m.submitEdit,g=at(t),E=(null==n?void 0:n.toString())||o,x=function(e){"Enter"===e.key&&s(e.target.value)};return Ee((function(){var e;return null===(e=d.current)||void 0===e||e.addEventListener("keypress",x),function(){var e;return null===(e=d.current)||void 0===e?void 0:e.removeEventListener("keypress",x)}}),[d.current]),he.createElement(it,{hideLabel:f,label:t,tooltip:E,dense:c},f?he.createElement(l,{inputRef:d,value:p,label:t,size:"small",onChange:function(e){return h(e.target.value)},InputProps:{endAdornment:he.createElement(tt,{onClickCancel:y,onClickSubmit:b})},sx:{marginY:c?0:1}}):he.createElement(a,{variant:c?"body1":"h5",noWrap:!0,"aria-labelledby":g},E,i&&he.createElement(rt,{dense:c,onClick:v})))},ct=function(e){var t=e.children;return he.createElement(c,{sx:{p:2}},t)},ut=function(e){var t=e.label,r=e.value,i=e.placeholder,l=void 0===i?ot:i,c=e.editable,s=e.dense,d=e.onEdit,m=void 0===d?function(){return null}:d,f=at(t),p=n().typography,v=nt(r,m),y=v.isEditing,h=v.editValue,b=v.startEdit,g=v.cancelEdit,E=v.setEditValue,x=v.submitEdit,S={fontSize:s?p.h6.fontSize:p.h5.fontSize};return he.createElement(it,{label:t,dense:s},y?he.createElement(o,{display:"flex",alignItems:"center"},he.createElement(u,{size:s?"small":"medium",checked:h,onChange:function(e){return E(e.target.checked)}}),he.createElement(tt,{onClickCancel:g,onClickSubmit:x})):he.createElement(o,{display:"flex",alignItems:"center","aria-labelledby":f,role:"checkbox","aria-checked":r},void 0===r?he.createElement(a,{variant:"h5"},l):r?he.createElement(Oe,{color:"success",sx:S}):he.createElement($e,{color:"error",sx:S}),c&&he.createElement(rt,{dense:s,onClick:b})))},st=function(){return st=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},st.apply(this,arguments)};function dt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function mt(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var ft=function(e){var t=e.label,n=e.value,r=e.format,i=e.placeholder,c=void 0===i?ot:i,u=e.editable,s=e.editInputType,d=void 0===s?"datetime":s,m=e.dense,f=e.onEdit,p=nt(n,void 0===f?function(){return null}:f),v=p.isEditing,y=p.editValue,h=p.startEdit,b=p.cancelEdit,g=p.setEditValue,E=p.submitEdit,x=at(t),S=n&&Pe(n,r)||c,w="datetime"===d?je:"time"===d?ze:Re;return he.createElement(it,{label:t,hideLabel:v,tooltip:S,dense:m,sx:{display:"flex",flexDirection:"column"}},v?he.createElement(w,{value:y,format:r,label:t,onChange:function(e){return g(e||void 0)},slots:{textField:function(e){var t;return he.createElement(l,st({},e,{size:"small",InputProps:st(st({},e.InputProps),{endAdornment:he.createElement(he.Fragment,null,null===(t=e.InputProps)||void 0===t?void 0:t.endAdornment,he.createElement(tt,{onClickCancel:b,onClickSubmit:E,sx:{ml:2}})),sx:{marginY:m?.2:1}})}))}}}):he.createElement(o,{display:"flex",alignItems:"center"},he.createElement(a,{variant:m?"body1":"h5",noWrap:!0,"aria-labelledby":x},S),u&&he.createElement(rt,{dense:m,onClick:h})))},pt=function(e){var t=void 0===e?{}:e,r=t.lightWeight,o=void 0===r?100:r,a=t.darkWeight,i=void 0===a?900:a,l=n().palette;return"light"===l.mode?l.grey[o]:l.grey[i]},vt=function(e){var t=e.title,r=e.subtitle,i=e.centered,l=e.children,u=e.dense,d=n().typography,m=pt({lightWeight:200,darkWeight:800});return he.createElement(c,{sx:{paddingBottom:u?0:1}},he.createElement(o,{bgcolor:m,px:u?1:2,py:u?.5:1,lineHeight:u?0:void 0},he.createElement(a,{variant:u?"body1":"h6",role:"heading","aria-level":1},t),r&&he.createElement(a,{variant:u?"caption":"body2",role:"heading","aria-level":2,lineHeight:u?d.pxToRem(15):void 0},r)),he.createElement(s,{container:!0,padding:1,rowSpacing:u?1:2,justifyContent:i?"center":"flex-start"},l))},yt=function(e){var t=e.label,n=e.value,r=void 0===n?0:n,a=e.maxRating,i=void 0===a?5:a,l=e.editable,c=e.dense,u=e.onEdit,s=nt(r,void 0===u?function(){return null}:u),m=s.isEditing,f=s.editValue,p=s.startEdit,v=s.cancelEdit,y=s.setEditValue,h=s.submitEdit,b=at(t);return he.createElement(it,{label:t,tooltip:r.toString(),dense:c},he.createElement(o,{display:"flex",alignItems:"center"},he.createElement(d,{"aria-labelledby":b,readOnly:!m,max:i,size:c?"small":"medium",value:m?f:r,onChange:function(e,t){Number.isNaN(t)&&e.currentTarget.value?y(parseInt(e.currentTarget.value,10)):t&&y(t)}}),l&&!m&&he.createElement(rt,{dense:c,onClick:p}),m&&he.createElement(tt,{onClickCancel:v,onClickSubmit:h})))},ht=function(e,t){return new Array(e).fill(t)},bt=function(e){var t=Math.floor(Math.random()*e.length);return{index:t,item:e[t]}},gt=function(e){void 0===e&&(e=12);var t=function(t,n,r){var o=t[n];return t[n]+=r,t[n]>e?(t[n]=r,!1):(t[n]==e&&(t[n]=0),o>0)};return{xs:0,sm:0,md:0,lg:0,xl:0,increment:function(e){var n=e.xs,r=void 0===n?0:n,o=e.sm,a=void 0===o?0:o,i=e.md,l=void 0===i?0:i,c=e.lg,u=void 0===c?0:c,s=e.xl,d=a||r,m=l||d,f=u||m,p=(void 0===s?0:s)||f;return{xs:t(this,"xs",r),sm:t(this,"sm",d),md:t(this,"md",m),lg:t(this,"lg",f),xl:t(this,"xl",p)}}}},Et=function(e){var t=new FormData(e.currentTarget),n={};return t.forEach((function(e,t){n[t]=e})),n},xt={root:"RdsValueItem-root",content:"RdsValueItem-content"},St=function(e){var t=e.children,n=e.bordered,r=void 0===n||n,a=dt(e,["children","bordered"]),i=function(e,t){var n="solid ".concat(t," 1px"),r="none";if(e){if(Array.isArray(e))return e.map((function(e){return e?n:r}));if("object"==typeof e){var o={};return Object.entries(e).forEach((function(e){var t=e[0],a=e[1];o[t]=a?n:r})),o}return n}}(r,pt({lightWeight:200,darkWeight:800}));return he.createElement(s,st({item:!0,className:xt.root},a),he.createElement(o,{className:xt.content,px:1,borderLeft:i},t))},wt=function(){return he.createElement(o,{width:1,height:1,display:"flex",justifyContent:"center",alignItems:"center"},he.createElement(m,null))};function Ct(e){var t=e.fetching,n=e.loading,r=e.error,a=e.success,i=e.children;return n?he.createElement(wt,null):r?he.createElement(f,{severity:"error",role:"alert","aria-describedby":"error"},r.name&&he.createElement(p,{role:"heading"},r.name),r.message):he.createElement(o,null,a&&he.createElement(f,{severity:"success",role:"alert","aria-describedby":"success",sx:{mb:2}},a.name&&he.createElement(p,{role:"heading"},a.name),a.message),t&&he.createElement(v,{sx:{width:1,mb:1}}),i)}var kt={root:"RdsBullet-root"},Ot=function(e){var t=e.variant,n=void 0===t?"primary":t,r=e.sx;return he.createElement(y,{color:n,variant:"dot",className:kt.root,role:"bullet","aria-describedby":n,sx:r})},It={root:"RdsLabel-root"},Tt=function(e){var t=e.text,r=e.variant,i=void 0===r?"default":r,l=e.sx,c=n().palette,u={default:"light"===c.mode?c.grey[100]:c.grey[900],primary:c.primary.main,secondary:c.secondary.main,info:c.info.main,warning:c.warning.main,error:c.error.main},s={default:c.getContrastText(u.default),primary:c.primary.contrastText,secondary:c.secondary.contrastText,info:c.info.contrastText,warning:c.warning.contrastText,error:c.error.contrastText};return he.createElement(o,{px:1,sx:st({backgroundColor:u[i]},l),borderRadius:1,color:s[i],className:It.root,role:"label","aria-describedby":i},he.createElement(a,{variant:"caption",fontWeight:700},t.toUpperCase()))},$t=xe((function(e,t){var n=e.href,r=dt(e,["href"]);return he.createElement(We,st({ref:t,to:n},r))})),Pt=xe((function(e,t){return he.createElement(h,st({},e,{component:$t}))})),jt=new Error("NotificationCenterContext.Provider is required and was undefined"),zt=he.createContext(void 0),Rt=function(){var e=he.useContext(zt);if(void 0===e)throw jt;return e},Nt=function(e){var t=e.children,n=e.autoHideDuration,r=void 0===n?6e3:n,o=be(void 0),a=o[0],i=o[1],l=be(!1),c=l[0],u=l[1],s=function(){u(!1)};return he.createElement(zt.Provider,{value:{show:function(e){i(e),u(!0)},hide:s}},he.createElement(b,{open:c,autoHideDuration:r,onClose:s,anchorOrigin:{vertical:"top",horizontal:"right"}},he.createElement(f,{onClose:s,severity:null==a?void 0:a.severity,"aria-label":null==a?void 0:a.severity,sx:{width:"100%"}},(null==a?void 0:a.title)&&he.createElement(p,null,null==a?void 0:a.title),null==a?void 0:a.message)),t)},Wt=function(e,t,n){var r=n.from,o=n.to,a=ge(),i=Rt().show;Ee((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},At=Se([0,function(){return null}]),Mt=At.Provider,Dt=function(){return we(At)},Vt=function(e){var t=e.children,n=e.initialValue,r=be(void 0===n?0:n);return he.createElement(Mt,{value:r},t)},Ft=function(e){var r=e.title,i=e.subtitle,l=e.preset,c=void 0===l?"default":l,u=e.actionsVariant,s=void 0===u?"outlined":u,d=e.breadcrumbs,m=e.actions,f=e.tabs,p=e.tabsMode,v=void 0===p?"panel":p,y=e.navigationButton,h=Ae(),b=n().palette,w=pt(),C=Dt(),k=C[0],O=C[1],I={default:w,primary:b.primary.main,secondary:b.secondary.main,inherit:"inherit",transparent:"transparent"},T=I[c],$={default:b.getContrastText(I.default),primary:b.primary.contrastText,secondary:b.secondary.contrastText,inherit:"inherit",transparent:b.text.primary}[c],P="panel"===v?k:null==f?void 0:f.findIndex((function(e){return e.href===h.pathname}));return he.createElement(o,{bgcolor:T,color:$},he.createElement(g,null,he.createElement(o,{sx:{py:3,display:"flex",flexDirection:"row",justifyContent:"space-between"}},he.createElement(o,null,y&&he.createElement(t,{href:y.href,size:"small",color:"inherit",LinkComponent:Pt,startIcon:y.icon,sx:{mb:1}},y.text),(null==d?void 0:d.length)&&he.createElement(E,{color:"inherit",separator:"›","aria-label":"breadcrumb",sx:{marginTop:1}},d.map((function(e){var t=e.id,n=e.link,r=e.text;return he.createElement(Pt,{key:t,underline:"hover",color:"inherit",href:n,variant:"body2",role:"link"},r)}))),he.createElement(a,{variant:"h4",role:"heading","aria-level":1},r),i&&he.createElement(a,{variant:"body1",role:"heading","aria-level":2},i)),m&&he.createElement(o,null,m.map((function(e,n){var r=e.disabled,o=e.id,a=e.href,i=e.onClick,l=e.text;return he.createElement(t,{component:a?Pt:"button",role:"button",color:"inherit",disabled:r,key:o,variant:s,size:"small",href:a,onClick:i,sx:{mr:n!=m.length-1?1:0}},l)})))),f&&he.createElement(x,{value:P,textColor:"inherit",onChange:"panel"===v?function(e,t){return O(t)}:void 0},f.map((function(e){var t=e.id,n=e.label,r=e.disabled,o=e.href,a={label:n,disabled:r};return"panel"===v?he.createElement(S,st({key:t},a)):he.createElement(S,st({key:t},a,{component:Pt,href:o}))})))))},_t={overrides:{h1:{component:a,props:{gutterBottom:!0,variant:"h5"}},h2:{component:a,props:{gutterBottom:!0,variant:"h6"}},h3:{component:a,props:{gutterBottom:!0,variant:"subtitle1"}},h4:{component:a,props:{gutterBottom:!0,variant:"caption",paragraph:!0}},p:{component:a,props:{paragraph:!0}},a:{component:h},li:{component:"li"}}},Lt=function(e){var t=e.content,n=e.options,r=void 0===n?_t:n;return he.createElement(Le,{options:r},t)},qt=function(e){var t,n,l=e.markdown,u=e.content,s=e.spacing,d=void 0===s?0:s,m=e.children,f=e.sx;l?t=l||"":Array.isArray(u)?(n=u.map((function(e,t){return he.createElement(a,{key:t,sx:{pb:d}},e)})),t=u.join("\n")):(n=he.createElement(a,null,u),t=u||"");var p=l&&he.createElement(Lt,{content:l});return he.createElement(c,{sx:st({p:2,backgroundColor:_e[800],color:"white"},f)},he.createElement(o,{display:"flex",flexDirection:"row"},he.createElement(o,{width:1},m||p||n),he.createElement(o,{sx:{ml:1}},t&&he.createElement(r,{"aria-label":"copy board content",color:"inherit",onClick:function(){return navigator.clipboard.writeText(t)}},he.createElement(i,{title:"Copy"},he.createElement(qe,null))))))},Bt=function(e){var t=e.children;return he.createElement(g,{component:"main",sx:{py:3,flexGrow:1}},t)};function Ht(e){var t=e.children,n=e.centerVertical,r=void 0===n||n,a=e.centerHorizontal,i=void 0===a||a,l=e.sx;return he.createElement(o,{width:1,height:1,sx:st(st({},l),{display:"flex",flexDirection:"column",justifyContent:r?"center":"flex-start",alignItems:i?"center":"flex-start"})},t)}var Ut=Se(void 0),Yt=new Error("DrawerContext.Provider is required and was undefined"),Jt=function(){var e=we(Ut);if(void 0===e)throw Yt;return e},Xt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},Gt=function(e){var t;return(t={transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")})[e.breakpoints.up("sm")]={width:"calc(".concat(e.spacing(8)," + 1px)")},t},Kt=w("div")((function(e){var t=e.theme;return st({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Qt={temporary:!0,mini:!0,persistent:!0,clipped:!1},Zt={temporary:"temporary",mini:"permanent",clipped:"permanent",persistent:"persistent"},en=function(){return{}},tn={mini:function(e,t){var n;return(n={boxSizing:"border-box"})["& .".concat(I.root)]={zIndex:t.zIndex.drawer-1},n},temporary:en,clipped:en,persistent:en},nn=function(e){var t,o,a=e.children,i=dt(e,["children"]),l=n(),c=Jt(),u=c.state,s=c.switchState,d=c.underAppBar,m=c.close,f=c.drawerWidth,p=c.variant,v=st(st(st({width:f,flexShrink:0,whiteSpace:"nowrap"},"open"===u&&st(st({},Xt(l)),((t={})["& .".concat(C.paper)]=Xt(l),t))),"open"!==u&&st(st({},Gt(l)),((o={})["& .".concat(C.paper)]=Gt(l),o))),tn[p](u,l));return he.createElement(k,st({open:"open"===u,variant:Zt[p],role:"menu","aria-hidden":"close"===u,onClose:m,sx:v},i),he.createElement(Kt,null,!d&&Qt[p]&&he.createElement(r,{onClick:s},he.createElement(Be,null))),he.createElement(O,null),a)},rn={temporary:"close",mini:"collapse",clipped:"open",persistent:"close"},on={temporary:["close","open"],mini:["collapse","open"],clipped:["open","open"],persistent:["close","open"]},an=function(e){var t=e.children,n=e.initialState,r=e.variant,o=void 0===r?"temporary":r,a=e.drawerWidth,i=void 0===a?240:a,l=e.underAppBar,c=void 0!==l&&l,u=e.selectedItemId,s=e.onStateChange,d=void 0===s?function(){return null}:s,m=be(n||rn[o]),f=m[0],p=m[1],v=function(e){d(e),p(e)};return he.createElement(Ut.Provider,{value:{state:f,variant:o,selectedItemId:u,underAppBar:c,drawerWidth:i,switchState:function(){return v(on[o]["open"===f?0:1])},collapse:function(){return v("collapse")},close:function(){return v("close")},open:function(){return v("open")},setState:p}},t)},ln=w(T,{shouldForwardProp:function(e){return"size"!==e}})((function(e){var t=e.size,n=e.theme;return{lineHeight:"small"===t?n.typography.pxToRem(40):void 0}})),cn=function(e,t){return{color:t?e.palette.primary.main:void 0,fontWeight:t?e.typography.fontWeightBold:e.typography.fontWeightMedium}},un=function(e){var t=e.text,r=e.icon,o=e.selected,a=e.items,i=e.size,l=void 0===i?"medium":i,c=e.level,u=e.sx,s=void 0===u?{}:u,d=Jt().state,m=ge(null),f=n(),p=f.palette,v=f.spacing,y=be(!1),h=y[0],b=y[1],g=cn(n(),o),E=g.color,x=g.fontWeight,S=he.createElement($,{component:"div",disablePadding:!0},a.map((function(e){return he.createElement(fn,{key:e.id,level:c+1,item:e,size:l})}))),w="collapse"===d&&0===c?{position:"absolute",right:0}:{};return he.createElement(he.Fragment,null,he.createElement(P,{ref:m,selected:o,"aria-label":t,onClick:function(){return b((function(e){return!e}))},dense:"small"===l,sx:st(st({},s),{pl:"open"===d?v(2+1.5*c):void 0,backgroundColor:h?p.action.hover:void 0})},r&&he.createElement(j,{sx:{color:E}},r),he.createElement(z,{disableTypography:!0,primary:t,sx:{color:E,fontWeight:x,opacity:"collapse"===d&&0===c?0:void 0}}),h&&"open"===d?he.createElement(He,{sx:[{color:E,ml:2},w]}):he.createElement(Ue,{sx:[{color:E,ml:2},w]})),"open"===d?he.createElement(R,{in:h,timeout:"auto",unmountOnExit:!0,"aria-label":"".concat(t," collapse submenu")},S):he.createElement(N,{open:h,PaperProps:{elevation:0,variant:"outlined"},"aria-label":"".concat(t," popover submenu"),anchorEl:m.current,onClose:function(){return b(!1)},anchorOrigin:{vertical:"top",horizontal:"right"}},S))},sn=w(Pt)((function(e){return{color:e.theme.palette.text.primary}})),dn={minWidth:0,justifyContent:"center",marginRight:"auto"},mn=function(e){var t=e.text,r=e.icon,o=e.avatar,a=e.label,i=e.bullet,l=e.href,c=e.selected,u=e.size,s=void 0===u?"medium":u,d=e.level,m=e.sx,f=Jt().state,p=n(),v=cn(p,c),y=v.color,h=v.fontWeight;return he.createElement(P,{LinkComponent:sn,dense:"small"===s,"aria-label":t,href:l,selected:c,sx:st(st(st({},m),{pl:"open"===f?p.spacing(2+1.5*d):void 0}),"collapse"===f&&{paddingHorizontal:p.spacing(2.5),justifyContent:"center"})},r&&he.createElement(j,{sx:st({color:y},"collapse"===f&&0===d&&dn)},r),o&&he.createElement(W,{sx:st({},"collapse"===f&&0===d&&dn)},he.createElement(A,{alt:o.alt,src:o.src,sx:st(st({},"small"===s&&{width:24,height:24}),"collapse"===f&&{width:30,height:30})})),he.createElement(z,{disableTypography:!0,primary:t,sx:{color:y,fontWeight:h,opacity:"collapse"===f&&0===d?0:void 0}}),a&&"open"===f&&he.createElement(Tt,{text:a.text,variant:a.variant,sx:{ml:2}}),i&&"open"===f&&he.createElement(Ot,{variant:i.variant,sx:{ml:2}}))},fn=function(e){var t=e.item,n=e.size,r=void 0===n?"medium":n,o=e.level,a=void 0===o?0:o,i=Jt().selectedItemId;if("items"in t){var l=t.id,c=t.text,u=t.icon,s=t.items,d=s.some((function(e){return e.id===i}));return he.createElement(un,{size:r,selected:l===i||d,text:c,icon:u,items:s,level:a})}l=t.id,c=t.text,u=t.icon;var m=t.avatar,f=t.label,p=t.bullet,v=t.href;return he.createElement(mn,{selected:l===i,size:r,text:c,icon:u,avatar:m,label:f,bullet:p,href:v,level:a})},pn=function(e){var t=e.title,r=e.items,o=e.size,a=void 0===o?"medium":o,i=Jt().state,l=n().spacing;return he.createElement(he.Fragment,null,t&&"open"===i&&he.createElement(ln,{size:a,role:"heading"},t),he.createElement($,{sx:{paddingTop:"small"===a?l(0):void 0,paddingY:"collapse"===i?0:void 0}},r.map((function(e){return he.createElement(fn,{key:e.id,item:e,size:a})}))))},vn=function(e){var t=e.nav.items,n=e.size,r=void 0===n?"medium":n;return he.createElement(he.Fragment,null,t.map((function(e,t){var n=e.title,o=e.items;return he.createElement(pn,{key:t,title:n,items:o,size:r})})))},yn={temporary:!1,mini:!0,persistent:!0,clipped:!0},hn={temporary:function(){return!0},mini:function(e){return"open"!==e},persistent:function(){return!0},clipped:function(){return!1}},bn=function(e){var t=e.title,o=e.sx,i=e.children,l=dt(e,["title","sx","children"]),c=n(),u=Jt(),s=u.state,d=u.variant,m=u.switchState,f=u.drawerWidth,p=u.underAppBar,v=yn[d]&&!p&&st({transition:c.transitions.create(["width","margin"],{easing:c.transitions.easing.sharp,duration:c.transitions.duration.leavingScreen})},"open"===s&&{marginLeft:f,width:"calc(100% - ".concat(f,"px)"),transition:c.transitions.create(["width","margin"],{easing:c.transitions.easing.sharp,duration:c.transitions.duration.enteringScreen})})||{};return ye.createElement(M,st({position:p?"fixed":void 0},l,{sx:st(st(st({},o),v),{zIndex:function(e){return e.zIndex.drawer+(p?1:0)}})}),ye.createElement(D,null,ye.createElement(r,{color:"inherit","aria-label":"open drawer",onClick:m,edge:"start",sx:{marginRight:5,display:hn[d](s)?void 0:"none"}},ye.createElement(Ye,null)),t&&ye.createElement(a,{variant:"h6",component:"h1",role:"heading","aria-level":1,noWrap:!0},t),i))},gn={temporary:!1,mini:!0,clipped:!0,persistent:!0},En=w("div")((function(e){var t=e.theme,r=n().spacing,o=Jt(),a=o.drawerWidth,i=o.state,l=o.variant;return{marginLeft:gn[l]?"open"===i?a:"collapse"===i?r(8):0:0,transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})}})),xn=function(e){var t=e.children;return he.createElement(En,null,he.createElement(Kt,null),t)},Sn={small:15,medium:20},wn=function(e){var t=e.label,n=e.value,r=e.loading,a=void 0!==r&&r,i=e.fetching,l=void 0!==i&&i,c=e.size,u=void 0===c?"medium":c,s=e.fullWidth,d=void 0!==s&&s,f=e.color,p=e.children,y=e.onChange,h=Ce(),b=w(V)((function(){return f?{label:{color:f},".MuiOutlinedInput-notchedOutline":{borderColor:"".concat(f," !important")},".MuiInputBase-root":{color:f},".MuiSelect-icon":{fill:f}}:{}}));return he.createElement(b,{fullWidth:d},he.createElement(F,{id:h},t),he.createElement(_,{labelId:h,id:h,value:n,label:t,onChange:y,disabled:l,size:u,renderValue:function(e){return l?he.createElement(Ht,{centerVertical:!0,centerHorizontal:!0},he.createElement(m,{color:"inherit",size:Sn[u]})):a?he.createElement(o,{display:"flex",flexDirection:"column"},e,he.createElement(v,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}})):e}},p))},Cn=function(e){var t=e.title,n=e.subtitle,r=e.loading,i=e.error,c=e.onSubmitSignIn,u=be(""),s=u[0],d=u[1],m=be(""),p=m[0],v=m[1];return he.createElement(he.Fragment,null,he.createElement(o,{marginBottom:2},he.createElement(a,{component:"h1",variant:"h4"},t),he.createElement(a,{variant:"body1"},n)),he.createElement(o,{component:"form",onSubmit:function(e){var t,n;e.preventDefault(),d(""),v("");var r=new FormData(e.currentTarget),o=null===(t=r.get("email"))||void 0===t?void 0:t.toString(),a=null===(n=r.get("password"))||void 0===n?void 0:n.toString();o||d("Please fill out this field"),a||v("Please fill out this field"),o&&a&&c(o,a)}},i&&he.createElement(L,{width:"100%",marginTop:1},he.createElement(f,{variant:"filled",severity:"error"},i.message)),he.createElement(l,{margin:"normal",fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,disabled:r,type:"email",inputProps:{role:"input"},error:!!s,helperText:s}),he.createElement(l,{margin:"normal",fullWidth:!0,role:"input",name:"password",label:"Password",type:"password",id:"password",disabled:r,autoComplete:"current-password",inputProps:{role:"input"},error:!!p,helperText:p}),he.createElement(Je,{type:"submit",fullWidth:!0,variant:"contained",loading:r,disabled:r,role:"button",sx:{mt:2}},"Sign In")))};function kn(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}var On,In={exports:{}},Tn={exports:{}},$n={};var Pn,jn,zn,Rn,Nn,Wn,An,Mn,Dn,Vn,Fn,_n,Ln,qn,Bn={};
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -6,12 +6,12 @@ import{InputAdornment as e,Button as t,useTheme as n,Box as r,Typography as o,To
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */function Ln(){return Tn||(Tn=1,e=On,"production"===process.env.NODE_ENV?e.exports=function(){if(Cn)return In;Cn=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case c:case u:case r:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case p:case f:case i:return e;default:return m}}case n:return m}}}function b(e){return E(e)===u}return In.AsyncMode=c,In.ConcurrentMode=u,In.ContextConsumer=l,In.ContextProvider=i,In.Element=t,In.ForwardRef=s,In.Fragment=r,In.Lazy=p,In.Memo=f,In.Portal=n,In.Profiler=a,In.StrictMode=o,In.Suspense=d,In.isAsyncMode=function(e){return b(e)||E(e)===c},In.isConcurrentMode=b,In.isContextConsumer=function(e){return E(e)===l},In.isContextProvider=function(e){return E(e)===i},In.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},In.isForwardRef=function(e){return E(e)===s},In.isFragment=function(e){return E(e)===r},In.isLazy=function(e){return E(e)===p},In.isMemo=function(e){return E(e)===f},In.isPortal=function(e){return E(e)===n},In.isProfiler=function(e){return E(e)===a},In.isStrictMode=function(e){return E(e)===o},In.isSuspense=function(e){return E(e)===d},In.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===g||e.$$typeof===v)},In.typeOf=E,In}():e.exports=($n||($n=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var v=e.type;switch(v){case c:case u:case r:case a:case o:case d:return v;default:var y=v&&v.$$typeof;switch(y){case l:case s:case p:case f:case i:return y;default:return m}}case n:return m}}}var b=c,x=u,w=l,S=i,C=t,k=s,O=r,I=p,$=f,T=n,P=a,j=o,z=d,R=!1;function N(e){return E(e)===u}qn.AsyncMode=b,qn.ConcurrentMode=x,qn.ContextConsumer=w,qn.ContextProvider=S,qn.Element=C,qn.ForwardRef=k,qn.Fragment=O,qn.Lazy=I,qn.Memo=$,qn.Portal=T,qn.Profiler=P,qn.StrictMode=j,qn.Suspense=z,qn.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||E(e)===c},qn.isConcurrentMode=N,qn.isContextConsumer=function(e){return E(e)===l},qn.isContextProvider=function(e){return E(e)===i},qn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},qn.isForwardRef=function(e){return E(e)===s},qn.isFragment=function(e){return E(e)===r},qn.isLazy=function(e){return E(e)===p},qn.isMemo=function(e){return E(e)===f},qn.isPortal=function(e){return E(e)===n},qn.isProfiler=function(e){return E(e)===a},qn.isStrictMode=function(e){return E(e)===o},qn.isSuspense=function(e){return E(e)===d},qn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===g||e.$$typeof===v)},qn.typeOf=E}()),qn)),On.exports;var e}
9
+ */function Hn(){return jn||(jn=1,e=Tn,"production"===process.env.NODE_ENV?e.exports=function(){if(On)return $n;On=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case c:case u:case r:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case p:case f:case i:return e;default:return m}}case n:return m}}}function E(e){return g(e)===u}return $n.AsyncMode=c,$n.ConcurrentMode=u,$n.ContextConsumer=l,$n.ContextProvider=i,$n.Element=t,$n.ForwardRef=s,$n.Fragment=r,$n.Lazy=p,$n.Memo=f,$n.Portal=n,$n.Profiler=a,$n.StrictMode=o,$n.Suspense=d,$n.isAsyncMode=function(e){return E(e)||g(e)===c},$n.isConcurrentMode=E,$n.isContextConsumer=function(e){return g(e)===l},$n.isContextProvider=function(e){return g(e)===i},$n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},$n.isForwardRef=function(e){return g(e)===s},$n.isFragment=function(e){return g(e)===r},$n.isLazy=function(e){return g(e)===p},$n.isMemo=function(e){return g(e)===f},$n.isPortal=function(e){return g(e)===n},$n.isProfiler=function(e){return g(e)===a},$n.isStrictMode=function(e){return g(e)===o},$n.isSuspense=function(e){return g(e)===d},$n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===b||e.$$typeof===v)},$n.typeOf=g,$n}():e.exports=(Pn||(Pn=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var v=e.type;switch(v){case c:case u:case r:case a:case o:case d:return v;default:var y=v&&v.$$typeof;switch(y){case l:case s:case p:case f:case i:return y;default:return m}}case n:return m}}}var E=c,x=u,S=l,w=i,C=t,k=s,O=r,I=p,T=f,$=n,P=a,j=o,z=d,R=!1;function N(e){return g(e)===u}Bn.AsyncMode=E,Bn.ConcurrentMode=x,Bn.ContextConsumer=S,Bn.ContextProvider=w,Bn.Element=C,Bn.ForwardRef=k,Bn.Fragment=O,Bn.Lazy=I,Bn.Memo=T,Bn.Portal=$,Bn.Profiler=P,Bn.StrictMode=j,Bn.Suspense=z,Bn.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||g(e)===c},Bn.isConcurrentMode=N,Bn.isContextConsumer=function(e){return g(e)===l},Bn.isContextProvider=function(e){return g(e)===i},Bn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Bn.isForwardRef=function(e){return g(e)===s},Bn.isFragment=function(e){return g(e)===r},Bn.isLazy=function(e){return g(e)===p},Bn.isMemo=function(e){return g(e)===f},Bn.isPortal=function(e){return g(e)===n},Bn.isProfiler=function(e){return g(e)===a},Bn.isStrictMode=function(e){return g(e)===o},Bn.isSuspense=function(e){return g(e)===d},Bn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===b||e.$$typeof===v)},Bn.typeOf=g}()),Bn)),Tn.exports;var e}
10
10
  /*
11
11
  object-assign
12
12
  (c) Sindre Sorhus
13
13
  @license MIT
14
- */function Bn(){if(jn)return Pn;jn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Pn=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var a,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))t.call(a,u)&&(l[u]=a[u]);if(e){i=e(a);for(var s=0;s<i.length;s++)n.call(a,i[s])&&(l[i[s]]=a[i[s]])}}return l},Pn}function Hn(){if(Rn)return zn;Rn=1;return zn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Un(){return Wn?Nn:(Wn=1,Nn=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Yn=Ln();kn.exports=function(){if(Fn)return Dn;Fn=1;var e=Ln(),t=Bn(),n=Hn(),r=Un(),o=function(){if(Mn)return An;Mn=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Hn(),n={},r=Un();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,a,i,l,c){if("production"!==process.env.NODE_ENV)for(var u in o)if(r(o,u)){var s;try{if("function"!=typeof o[u]){var d=Error((l||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}s=o[u](a,u,l,i,null,t)}catch(e){s=e}if(!s||s instanceof Error||e((l||"React class")+": type specification of "+i+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in n)){n[s.message]=!0;var m=c?c():"";e("Failed "+i+" type: "+s.message+(null!=m?m:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},An=o}(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Dn=function(l,c){var u="function"==typeof Symbol&&Symbol.iterator,s="@@iterator",d="<<anonymous>>",m={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(i),arrayOf:function(e){return v((function(t,r,o,a,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new p("Invalid "+a+" `"+i+"` of type `"+E(l)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<l.length;c++){var u=e(l,c,o,a,i+"["+c+"]",n);if(u instanceof Error)return u}return null}))},element:v((function(e,t,n,r,o){var a=e[t];return l(a)?null:new p("Invalid "+r+" `"+o+"` of type `"+E(a)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:v((function(t,n,r,o,a){var i=t[n];return e.isValidElementType(i)?null:new p("Invalid "+o+" `"+a+"` of type `"+E(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return v((function(t,n,r,o,a){if(!(t[n]instanceof e)){var i=e.name||d;return new p("Invalid "+o+" `"+a+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var l;return null}))},node:v((function(e,t,n,r,o){return g(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return v((function(t,o,a,i,l){if("function"!=typeof e)return new p("Property `"+l+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var c=t[o],u=E(c);if("object"!==u)return new p("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected an object.");for(var s in c)if(r(c,s)){var d=e(c,s,a,i,l+"."+s,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){return Array.isArray(e)?v((function(t,n,r,o,a){for(var i=t[n],l=0;l<e.length;l++)if(f(i,e[l]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===b(t)?String(t):t}));return new p("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+c+".")})):("production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),i}return v((function(t,o,a,i,l){for(var c=[],u=0;u<e.length;u++){var s=(0,e[u])(t,o,a,i,l,n);if(null==s)return null;s.data&&r(s.data,"expectedType")&&c.push(s.data.expectedType)}return new p("Invalid "+i+" `"+l+"` supplied to `"+a+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(e){return v((function(t,r,o,a,i){var l=t[r],c=E(l);if("object"!==c)return new p("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var u in e){var s=e[u];if("function"!=typeof s)return h(o,a,i,u,b(s));var d=s(l,u,o,a,i+"."+u,n);if(d)return d}return null}))},exact:function(e){return v((function(o,a,i,l,c){var u=o[a],s=E(u);if("object"!==s)return new p("Invalid "+l+" `"+c+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");var d=t({},o[a],e);for(var m in d){var f=e[m];if(r(e,m)&&"function"!=typeof f)return h(i,l,c,m,b(f));if(!f)return new p("Invalid "+l+" `"+c+"` key `"+m+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(o[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=f(u,m,i,l,c+"."+m,n);if(v)return v}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function v(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,l,u,s,m,f){if(u=u||d,m=m||l,f!==n){if(c){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var y=u+":"+l;!t[y]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+m+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[y]=!0,r++)}}return null==i[l]?o?null===i[l]?new p("The "+s+" `"+m+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+s+" `"+m+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(i,l,u,s,m)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function y(e){return v((function(t,n,r,o,a,i){var l=t[n];return E(l)!==e?new p("Invalid "+o+" `"+a+"` of type `"+b(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function h(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||l(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e[s]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!g(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!g(o[1]))return!1}return!0;default:return!1}}function E(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=E(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},Dn}()(Yn.isElement,!0)}else kn.exports=function(){if(_n)return Vn;_n=1;var e=Hn();function t(){}function n(){}return n.resetWarningCache=t,Vn=function(){function r(t,n,r,o,a,i){if(i!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function o(){return r}r.isRequired=r;var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}}()();function Jn(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;const c=a.type;return"function"!=typeof c||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(c)||(l="Did you accidentally use a plain function component for an element instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}Sn(kn.exports.element,Jn).isRequired=Sn(kn.exports.element.isRequired,Jn),Sn(kn.exports.elementType,(function(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;return"function"!=typeof a||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(a)||(l="Did you accidentally provide a plain function component instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}));var Xn,Gn={};var Kn,Qn,Zn={};
14
+ */function Un(){if(Rn)return zn;Rn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return zn=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var a,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))t.call(a,u)&&(l[u]=a[u]);if(e){i=e(a);for(var s=0;s<i.length;s++)n.call(a,i[s])&&(l[i[s]]=a[i[s]])}}return l},zn}function Yn(){if(Wn)return Nn;Wn=1;return Nn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Jn(){return Mn?An:(Mn=1,An=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Xn=Hn();In.exports=function(){if(_n)return Fn;_n=1;var e=Hn(),t=Un(),n=Yn(),r=Jn(),o=function(){if(Vn)return Dn;Vn=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Yn(),n={},r=Jn();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,a,i,l,c){if("production"!==process.env.NODE_ENV)for(var u in o)if(r(o,u)){var s;try{if("function"!=typeof o[u]){var d=Error((l||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}s=o[u](a,u,l,i,null,t)}catch(e){s=e}if(!s||s instanceof Error||e((l||"React class")+": type specification of "+i+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in n)){n[s.message]=!0;var m=c?c():"";e("Failed "+i+" type: "+s.message+(null!=m?m:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Dn=o}(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Fn=function(l,c){var u="function"==typeof Symbol&&Symbol.iterator,s="@@iterator",d="<<anonymous>>",m={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(i),arrayOf:function(e){return v((function(t,r,o,a,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new p("Invalid "+a+" `"+i+"` of type `"+g(l)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<l.length;c++){var u=e(l,c,o,a,i+"["+c+"]",n);if(u instanceof Error)return u}return null}))},element:v((function(e,t,n,r,o){var a=e[t];return l(a)?null:new p("Invalid "+r+" `"+o+"` of type `"+g(a)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:v((function(t,n,r,o,a){var i=t[n];return e.isValidElementType(i)?null:new p("Invalid "+o+" `"+a+"` of type `"+g(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return v((function(t,n,r,o,a){if(!(t[n]instanceof e)){var i=e.name||d;return new p("Invalid "+o+" `"+a+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var l;return null}))},node:v((function(e,t,n,r,o){return b(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return v((function(t,o,a,i,l){if("function"!=typeof e)return new p("Property `"+l+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var c=t[o],u=g(c);if("object"!==u)return new p("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected an object.");for(var s in c)if(r(c,s)){var d=e(c,s,a,i,l+"."+s,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){return Array.isArray(e)?v((function(t,n,r,o,a){for(var i=t[n],l=0;l<e.length;l++)if(f(i,e[l]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===E(t)?String(t):t}));return new p("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+c+".")})):("production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),i}return v((function(t,o,a,i,l){for(var c=[],u=0;u<e.length;u++){var s=(0,e[u])(t,o,a,i,l,n);if(null==s)return null;s.data&&r(s.data,"expectedType")&&c.push(s.data.expectedType)}return new p("Invalid "+i+" `"+l+"` supplied to `"+a+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(e){return v((function(t,r,o,a,i){var l=t[r],c=g(l);if("object"!==c)return new p("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var u in e){var s=e[u];if("function"!=typeof s)return h(o,a,i,u,E(s));var d=s(l,u,o,a,i+"."+u,n);if(d)return d}return null}))},exact:function(e){return v((function(o,a,i,l,c){var u=o[a],s=g(u);if("object"!==s)return new p("Invalid "+l+" `"+c+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");var d=t({},o[a],e);for(var m in d){var f=e[m];if(r(e,m)&&"function"!=typeof f)return h(i,l,c,m,E(f));if(!f)return new p("Invalid "+l+" `"+c+"` key `"+m+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(o[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=f(u,m,i,l,c+"."+m,n);if(v)return v}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function v(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,l,u,s,m,f){if(u=u||d,m=m||l,f!==n){if(c){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var y=u+":"+l;!t[y]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+m+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[y]=!0,r++)}}return null==i[l]?o?null===i[l]?new p("The "+s+" `"+m+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+s+" `"+m+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(i,l,u,s,m)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function y(e){return v((function(t,n,r,o,a,i){var l=t[n];return g(l)!==e?new p("Invalid "+o+" `"+a+"` of type `"+E(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function h(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||l(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e[s]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!b(o[1]))return!1}return!0;default:return!1}}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function E(e){if(null==e)return""+e;var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},Fn}()(Xn.isElement,!0)}else In.exports=function(){if(qn)return Ln;qn=1;var e=Yn();function t(){}function n(){}return n.resetWarningCache=t,Ln=function(){function r(t,n,r,o,a,i){if(i!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function o(){return r}r.isRequired=r;var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}}()();function Gn(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;const c=a.type;return"function"!=typeof c||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(c)||(l="Did you accidentally use a plain function component for an element instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}kn(In.exports.element,Gn).isRequired=kn(In.exports.element.isRequired,Gn),kn(In.exports.elementType,(function(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;return"function"!=typeof a||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(a)||(l="Did you accidentally provide a plain function component instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}));var Kn,Qn={};var Zn,er,tr={};
15
15
  /**
16
16
  * @license React
17
17
  * react-is.development.js
@@ -20,5 +20,5 @@ object-assign
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */Qn={exports:{}},"production"===process.env.NODE_ENV?Qn.exports=function(){if(Xn)return Gn;Xn=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case r:case a:case o:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case f:case m:case i:return e;default:return p}}case n:return p}}}return e=Symbol.for("react.module.reference"),Gn.ContextConsumer=l,Gn.ContextProvider=i,Gn.Element=t,Gn.ForwardRef=u,Gn.Fragment=r,Gn.Lazy=f,Gn.Memo=m,Gn.Portal=n,Gn.Profiler=a,Gn.StrictMode=o,Gn.Suspense=s,Gn.SuspenseList=d,Gn.isAsyncMode=function(){return!1},Gn.isConcurrentMode=function(){return!1},Gn.isContextConsumer=function(e){return v(e)===l},Gn.isContextProvider=function(e){return v(e)===i},Gn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Gn.isForwardRef=function(e){return v(e)===u},Gn.isFragment=function(e){return v(e)===r},Gn.isLazy=function(e){return v(e)===f},Gn.isMemo=function(e){return v(e)===m},Gn.isPortal=function(e){return v(e)===n},Gn.isProfiler=function(e){return v(e)===a},Gn.isStrictMode=function(e){return v(e)===o},Gn.isSuspense=function(e){return v(e)===s},Gn.isSuspenseList=function(e){return v(e)===d},Gn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},Gn.typeOf=v,Gn}():Qn.exports=(Kn||(Kn=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var v=e.type;switch(v){case r:case a:case o:case s:case d:return v;default:var y=v&&v.$$typeof;switch(y){case c:case l:case u:case f:case m:case i:return y;default:return p}}case n:return p}}}e=Symbol.for("react.module.reference");var y=l,h=i,g=t,E=u,b=r,x=f,w=m,S=n,C=a,k=o,O=s,I=d,$=!1,T=!1;Zn.ContextConsumer=y,Zn.ContextProvider=h,Zn.Element=g,Zn.ForwardRef=E,Zn.Fragment=b,Zn.Lazy=x,Zn.Memo=w,Zn.Portal=S,Zn.Profiler=C,Zn.StrictMode=k,Zn.Suspense=O,Zn.SuspenseList=I,Zn.isAsyncMode=function(e){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},Zn.isConcurrentMode=function(e){return T||(T=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},Zn.isContextConsumer=function(e){return v(e)===l},Zn.isContextProvider=function(e){return v(e)===i},Zn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Zn.isForwardRef=function(e){return v(e)===u},Zn.isFragment=function(e){return v(e)===r},Zn.isLazy=function(e){return v(e)===f},Zn.isMemo=function(e){return v(e)===m},Zn.isPortal=function(e){return v(e)===n},Zn.isProfiler=function(e){return v(e)===a},Zn.isStrictMode=function(e){return v(e)===o},Zn.isSuspense=function(e){return v(e)===s},Zn.isSuspenseList=function(e){return v(e)===d},Zn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},Zn.typeOf=v}()),Zn),"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),kn.exports.oneOfType([kn.exports.func,kn.exports.object]);let er=0;const tr=ye.useId;function nr(e){if(void 0!==tr){const t=tr();return null!=e?e:t}return function(e){const[t,n]=ye.useState(e),r=e||t;return ye.useEffect((()=>{null==t&&(er+=1,n(`mui-${er}`))}),[t]),r}(e)}const rr={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};const or=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function ar(e,t,n,r){const o=e[t];if(null==o||!or(o)){const e=function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return null===e?"null":e.constructor.name;default:return t}}(o);return new RangeError(`Invalid ${r} \`${t}\` of type \`${e}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function ir(e,t,...n){return void 0===e[t]?null:ar(e,t,...n)}function lr(){return null}ir.isRequired=ar,lr.isRequired=lr,process.env.NODE_ENV;var cr=function(t){var n,r=t.id,o=t.label,a=t.InputLabelProps,i=t.InputProps,l=t.fetching,c=t.loading,u=t.helperText,s=t.hexColor,d=t.size,f=t.fullWidth,p=t.sx,v=ut(t,["id","label","InputLabelProps","InputProps","fetching","loading","helperText","hexColor","size","fullWidth","sx"]),y=nr(r),h=u&&y?"".concat(y,"-helper-text"):void 0,g=o&&y?"".concat(y,"-label"):void 0,E=s?((n={})["& .".concat(L.notchedOutline)]={borderColor:"".concat(s," !important")},n["& .".concat(B.root)]={color:s},n["& .".concat(L.input)]={color:s},n["& .".concat(H.root)]={color:s},n["& .".concat(U.bar)]={backgroundColor:s},n["& .".concat(Y.endAdornment," .").concat(J.root)]={color:s},n):{};return he.createElement(D,{sx:E,fullWidth:f},he.createElement(F,ct({size:"small"===d?"small":"normal",id:g,htmlFor:y},a),o),he.createElement(X,ct({},i,{id:y,label:o,size:d,fullWidth:f,endAdornment:he.createElement(e,{position:"end"},null==i?void 0:i.endAdornment,l?he.createElement(m,{color:"inherit",size:20,sx:{ml:1}}):null),sx:p},v)),c&&he.createElement(_,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}}),u&&he.createElement(G,{id:h},u))},ur=function(e){var t=e.label,n=e.loading,r=e.fetching,o=e.options,a=e.helperText,i=e.color,l=e.onChangeValue,c=void 0===l?function(){return null}:l,u=e.sx,s=ut(e,["label","loading","fetching","options","helperText","color","onChangeValue","sx"]),d=n||r;return he.createElement(K,ct({loading:d,options:r?[]:o,onChange:function(e,t){return c(t)}},s,{renderInput:function(e){return he.createElement(cr,ct({},e,{label:t,fullWidth:!0,fetching:r,loading:n,hexColor:i,helperText:a}))},sx:u}))};function sr(e){var t=e.children,n=e.index,o=At()[0],a=o===n;return Array.isArray(n)&&(a=n.includes(o)),he.createElement("div",{role:"tabpanel",hidden:!a,id:"simple-tabpanel-".concat(n),"aria-labelledby":"simple-tab-".concat(n)},a&&he.createElement(r,{sx:{p:3}},t))}var dr=w(b)((function(e){var t,n=e.theme;return(t={})["&.".concat(Q.root)]={backgroundColor:n.palette.grey[100]},t})),mr=function(e){var t=e.children,n=e.tabs,r=At(),o=r[0],a=r[1];return he.createElement(c,null,he.createElement(dr,{value:o,onChange:function(e,t){return a(t)}},n.map((function(e){return he.createElement(x,{key:e,label:e})}))),t)},fr=function(e){var t=e.order,n=e.orderBy,o=e.headCells,a=e.onRequestSort;return he.createElement(Z,null,he.createElement(ee,null,o.map((function(e){return he.createElement(te,{variant:"head",key:String(e.id),padding:e.disablePadding?"none":"normal",sortDirection:n===e.id&&t,sx:{fontWeight:"bold"}},e.sort?he.createElement(ne,{active:n===e.id,direction:n===e.id?t:"asc",onClick:(o=e.id,function(){a(o)})},e.label,n===e.id?he.createElement(r,{component:"span",sx:rr},"desc"===t?"sorted descending":"sorted ascending"):null):e.label);var o}))))};function pr(e,t,n){return t[n]<e[n]?-1:t[n]>e[n]?1:0}var vr=function(t){var n=t.children,o=t.data,a=t.search,l=t.columns,c=t.defaultSort,u=t.defaultOrder,s=void 0===u?"asc":u,d=t.loading,f=void 0!==d&&d,p=ge(""),v=p[0],y=p[1],h=ge(s),g=h[0],E=h[1],b=ge(c),x=b[0],w=b[1],S=o.slice().filter(function(e,t){return function(n){return!t||e.some((function(e){var r=n[e.id];return(null==r?void 0:r.toLowerCase)&&(r=r.toLowerCase()),null==r?void 0:r.toString().includes(t.toLowerCase())}))}}(l,v)).sort(function(e,t){return"desc"===e?function(e,n){return pr(e,n,t)}:function(e,n){return-pr(e,n,t)}}(g,x));return he.createElement(he.Fragment,null,he.createElement(r,{sx:{paddingX:1,paddingBottom:2}},a&&he.createElement(r,{paddingY:2},he.createElement(i,{fullWidth:!0,placeholder:"Search",InputProps:{role:"search",startAdornment:he.createElement(e,{position:"start"},he.createElement(Je,null))},onChange:function(e){return y(e.target.value)}})),he.createElement(re,null,he.createElement(oe,null,he.createElement(fr,{order:g,orderBy:x,headCells:l,onRequestSort:function(e){E(x===e&&"asc"===g?"desc":"asc"),w(e)}}),he.createElement(ae,null,f?he.createElement(ee,null,he.createElement(te,{colSpan:l.length,sx:{textAlign:"center"}},he.createElement(m,null))):0===S.length?he.createElement(ee,null,he.createElement(te,{colSpan:l.length,sx:{textAlign:"center"}},"No data")):n(S))))))};vr.defaultProps={defaultOrder:"asc"};var yr,hr=function(e){var t=e.children,n=e.data,r=e.loading,o=e.columns,a=e.defaultSort,i=e.defaultOrder,l=e.onRequestSort,c=ge({orderBy:a,order:i||"asc"}),u=c[0],s=c[1];return he.createElement(he.Fragment,null,he.createElement(re,null,he.createElement(oe,null,he.createElement(fr,{order:u.order,orderBy:u.orderBy,headCells:o,onRequestSort:function(e){s((function(t){var n=t.orderBy,r=t.order,o=n===e&&"asc"===r?"desc":"asc";return l(e,o),{orderBy:e,order:o}}))}}),he.createElement(ae,null,r?he.createElement(ee,null,he.createElement(te,{colSpan:o.length,sx:{textAlign:"center"}},he.createElement(m,null))):n.map((function(e,n){return t(e,n)}))))))},gr=function(e){var n=e.title,a=e.subtitle,i=e.icon,l=e.iconSize,c=void 0===l?200:l,u=e.actions;return he.createElement(r,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"},i&&i({size:c,color:"primary"}),he.createElement(o,{variant:"h4",role:"heading","aria-level":1},n),he.createElement(o,{variant:"subtitle1",role:"heading","aria-level":2,sx:{mt:2}},a),u&&he.createElement(r,{sx:{pt:2}},u.map((function(e,n){var r=e.id,o=e.text,a=e.href,i=e.onClick;return he.createElement(t,{key:r,role:"button",variant:"contained",href:a,onClick:i,sx:{mr:n<u.length-1?2:0}},o)}))))},Er=function(e){var t=e.width,n=void 0===t?"100%":t,o=e.animation,a=void 0!==o&&o;return he.createElement(r,{width:n},he.createElement(ie,{animation:a,variant:"rectangular",height:118}),he.createElement(ie,{animation:a,variant:"rectangular",height:16,sx:{my:1}}),he.createElement(ie,{animation:a,variant:"rectangular",width:"80%",height:16}))},br=function(e){var t=e.size,n=void 0===t?20:t;return he.createElement(s,{container:!0,spacing:2},vt(n,0).map((function(e,t){return he.createElement(s,{item:!0,key:t,xs:4},he.createElement(Er,{width:1}))})))},xr=function(e){var t=e.size,n=void 0===t?20:t,r=e.children,o=e.p;return he.createElement(g,{component:"main",sx:{p:o},"data-testid":"content-placeholder-test"},r,he.createElement(br,{size:n}))},wr=function(e){var t=e.count,n=void 0===t?3:t,r=e.units,a=void 0===r?"paragraph":r,i=e.variant,l=void 0===i?"body1":i;return he.createElement(o,{variant:l},Xe({count:n,units:a}))},Sr=((yr={})["& .".concat(le.message)]={width:1},yr),Cr=Ee((function(e,t){var n=e.severity,o=e.iconMapping,a=e.title,i=e.message,c=e.metadata,u=e.onClose,s=ge(!1),d=s[0],m=s[1];return he.createElement(f,{ref:t,severity:n,iconMapping:o,onClose:u,action:he.createElement(r,{display:"flex",flexDirection:"column"},he.createElement(l,{color:"inherit",onClick:u},he.createElement(Te,{fontSize:"small"})),c&&he.createElement(l,{color:"inherit",onClick:function(){return m((function(e){return!e}))}},d?he.createElement(Ge,{fontSize:"small"}):he.createElement(Be,{fontSize:"small"}))),sx:Sr},he.createElement(r,{sx:{w:1}},a&&he.createElement(p,null,a),i,c&&he.createElement(z,{in:d,sx:{mt:2}},he.createElement(_t,{content:c}))))})),kr=function(e){var n=e.open,o=e.title,a=e.component,i=e.componentProps,c=void 0===i?{}:i,u=e.disabled,s=e.actions,d=void 0===s?[]:s,f=e.children,p=e.loading,v=e.cancelable,y=e.callCloseWhenCancel,h=void 0===y||y,g=e.acceptable,E=e.acceptText,b=void 0===E?"Accept":E,x=e.cancelText,w=void 0===x?"Cancel":x,S=e.onAccept,C=e.onCancel,k=void 0===C?function(){return null}:C,O=e.onClose,I=e.acceptType,$=void 0===I?"button":I,T=d.length>0||g||v;return he.createElement(ce,{open:n,onClose:O},he.createElement(ue,{sx:{display:"flex",alignItems:"center"}},o,p&&!g&&he.createElement(m,{size:20,sx:{ml:2,color:function(e){return e.palette.grey[500]}}}),he.createElement(l,{disabled:u,"aria-label":"close",onClick:O,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}}},he.createElement(Te,null))),he.createElement(r,ct({component:a},c),he.createElement(se,{dividers:!0},f),T&&he.createElement(de,null,d.map((function(e){var n=e.id,r=e.text,o=e.type,a=void 0===o?"button":o,i=e.onClick,l=e.color,c=void 0===l?"primary":l;return he.createElement(t,{key:n,type:a,disabled:u,onClick:i,color:c},r)})),v&&he.createElement(t,{color:"error",disabled:u,onClick:function(){k(),h&&O()}},w),g&&he.createElement(Ye,{type:$,loading:p,disabled:u,onClick:S},b))))},Or=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.confirmText,i=void 0===a?"Confirm":a,l=e.cancelText,c=void 0===l?"Cancel":l,u=e.children,s=e.onConfirm,d=e.onCancel;return he.createElement(kr,{title:n,loading:r,disabled:r||o,open:t,onClose:d,acceptable:!0,cancelable:!0,callCloseWhenCancel:!1,acceptText:i,cancelText:c,onCancel:d,onAccept:s},u)},Ir=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.submitText,i=void 0===a?"Submit":a,l=e.cancelText,c=void 0===l?"Cancel":l,u=e.children,s=e.onSubmit,d=e.onCancel;return he.createElement(kr,{component:"form",componentProps:{onSubmit:function(e){e.preventDefault(),s(gt(e))}},title:n,loading:r,disabled:r||o,open:t,onClose:d,callCloseWhenCancel:!1,cancelable:!0,acceptable:!0,cancelText:c,onCancel:d,acceptText:i,acceptType:"submit"},u)},$r=function(e){void 0===e&&(e=!1);var t=ge(e),n=t[0],r=t[1];return{isOpen:n,open:function(){return r(!0)},close:function(){return r(!1)},setIsOpen:r}},Tr=function(e){var t=e.drawerProviderProps,n=e.children,r=n[0],o=n[1],a=n[2];return he.createElement(rn,ct({},t),r,o,he.createElement(En,null,a))},Pr=function(){return he.createElement(Ke,{color:"error",sx:{width:200,height:200}})},jr=function(e){var t=e.loading,n=e.children,o=e.fetching,a=e.error,i=n[0],l=n[1];return he.createElement(Mt,null,he.createElement(r,{display:"flex",flexDirection:"column",height:1},i,o&&he.createElement(r,{width:1},he.createElement(_,null)),t&&he.createElement(xt,null),a&&he.createElement(r,{mt:4},he.createElement(gr,{icon:a.icon||Pr,title:a.title||"There has been an error",subtitle:a.message})),!t&&!a&&l))},zr=function(e,t,n){var r=(void 0===n?{}:n).dense,o=e.id,a=e.name,i=e.type,l=t[o];return"boolean"===i?he.createElement(lt,{dense:r,label:a,value:l}):"date"===i||"time"===i||"datetime"===i?he.createElement(dt,{dense:r,label:a,value:l,format:e.format}):"object"!=typeof l||Array.isArray(l)?he.createElement(at,{dense:r,label:a,value:null==l?void 0:l.toString()}):he.createElement(at,{dense:r,label:a,value:JSON.stringify(l)})},Rr=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance,i=e.dense,l=[{field:"id",headerName:"ID",width:70}];o.forEach((function(e){l.push({field:e.id,headerName:e.name})}));var c=a.map((function(e,t){return ct({id:t},e)}));return he.createElement(ft,{title:n,subtitle:r,dense:i},he.createElement(s,{item:!0,xs:12},he.createElement(Qe,{rows:c,columns:l,density:i?"compact":"standard",disableRowSelectionOnClick:!0,pageSizeOptions:[5],initialState:{pagination:{paginationModel:{pageSize:5}}},sx:{height:400}})))},Nr=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance,i=e.dense,l=ht();return he.createElement(ft,{title:n,subtitle:r,dense:i},o.map((function(e){var t=e.id,n=e.xs,r=e.sm,o=e.md,c=e.lg,u=e.xl,s=l.increment(e);return he.createElement(bt,{key:t,xs:n,sm:r,md:o,lg:c,xl:u,bordered:s},zr(e,a,{dense:i}))})))},Wr=function(e){var t=e.model,n=e.instance,r=e.dense,o=ht();return he.createElement(s,{container:!0,spacing:r?1:2},t.fields.map((function(e){var t=e.id,a=e.type,i=e.xs,l=void 0===i?3:i,c=e.sm,u=void 0===c?0:c,d=e.md,m=void 0===d?0:d,f=e.lg,p=void 0===f?0:f,v=e.xl,y=void 0===v?0:v;if("group"===a)return o.increment({xs:12}),he.createElement(s,{item:!0,key:t,xs:12},he.createElement(Nr,{field:e,instance:n[t],dense:r}));if("group[]"===a)return o.increment({xs:12}),he.createElement(s,{item:!0,key:t,xs:12},he.createElement(Rr,{field:e,instance:n[t],dense:r}));var h=o.increment(e);return he.createElement(bt,{key:t,xs:l,sm:u,md:m,lg:p,xl:y,bordered:h},zr(e,n,{dense:r}))})))},Ar={string:"",number:0,boolean:!1,enum:"",multienum:[],date:new Date(1970,0,1,0,0),time:new Date(1970,0,1,0,0),datetime:new Date(1970,0,1,0,0),group:{},"group[]":[],"string[]":[],"number[]":[]},Mr=function(e,t){return t&&t[e.id]||"default"in e&&e.default||Ar[e.type]},Dr=function(e,t){void 0===t&&(t=void 0);var n={};return e.fields.forEach((function(e){if("group"===e.type){var r={};e.value.forEach((function(n){r[n.id]=Mr(n,t&&t[e.id])})),n[e.id]=r}else n[e.id]=Mr(e,t)})),n},Fr=function(e){var n=e.model,a=e.saveButtonText,l=e.onSubmit,u=e.initialValues,d=ke((function(){return Dr(n,u)}),[n,u]),m=ge(d),f=m[0],p=m[1],v=function(e,t,n){p((function(r){var o,a={};return t?a[t]=ct(ct({},r[t]),((o={})[e]=n,o)):a[e]=n,ct(ct({},r),a)}))},y=function(e,t,n){e.preventDefault();var r=e.target.value;"number"===n&&"string"==typeof r?r=parseInt(e.target.value,10):n.includes("[]")&&(r=e.target.value.split(",")),v(e.target.name,t,r)},h=function(e,t,n){v(n,t,e)},g=function(e,t){void 0===t&&(t=void 0);var n,a=mt({lightWeight:200,darkWeight:800}),l=e.id,u=e.type,d=e.name,m=e.description,p=e.xs,E=e.sm,b=e.md,x=e.lg,w=e.xl,S=t?f[t][l]:f[l];if("group"===u)n=he.createElement(c,null,he.createElement(r,{bgcolor:a,px:2,py:1,mb:2},he.createElement(o,{variant:"h6",role:"heading","aria-level":1},d),he.createElement(o,{variant:"body2",role:"heading","aria-level":2},m)),he.createElement(s,{container:!0,spacing:2,sx:{p:2}},e.value.map((function(e){return g(e,l)}))));else if("boolean"===u)n=he.createElement(r,{sx:{height:1,display:"flex",alignItems:"center"}},he.createElement(me,{control:he.createElement(fe,{name:l,onChange:function(e){return function(e,t){e.preventDefault(),v(e.target.name,t,e.target.checked)}(e,t)},checked:S}),label:d}));else if("enum"===u)n=he.createElement(D,{fullWidth:!0},he.createElement(F,{id:"".concat(l,"-select-label")},d),he.createElement(V,{labelId:"".concat(l,"-select-label"),id:"".concat(l,"-select"),value:S,label:d,name:l,onChange:function(e){return function(e,t){e.preventDefault(),v(e.target.name,t,e.target.value)}(e,t)},required:!0},e.value.map((function(e){return he.createElement(pe,{key:e,value:e},e)}))));else if("multienum"===u)n=he.createElement(D,{fullWidth:!0},he.createElement(F,{id:"".concat(l,"-select-label")},d),he.createElement(V,{labelId:"".concat(l,"-select-label"),id:"".concat(l,"-select"),value:S||[],renderValue:function(e){return e.join(", ")},label:d,name:l,onChange:function(e){return function(e,t){e.preventDefault();var n=e.target.value,r="string"==typeof n?n.split(","):n;v(e.target.name,t,r)}(e,t)},required:!0,multiple:!0},e.value.map((function(e){return he.createElement(pe,{key:e,value:e},he.createElement(fe,{checked:(S||[]).includes(e)}),he.createElement(j,{primary:e}))}))));else if("date"===u)n=he.createElement(Ne,{label:d,format:e.format,value:S,onChange:function(e){return h(e,t,l)}});else if("time"===u)n=he.createElement(ze,{label:d,format:e.format,value:S,onChange:function(e){return h(e,t,l)}});else if("datetime"===u)n=he.createElement(je,{label:d,format:e.format,value:S,onChange:function(e){return h(e,t,l)}});else{if("group[]"===u)return null;n=u.includes("[]")?he.createElement(i,{required:!0,type:"text",label:d,name:l,variant:"outlined",helperText:"Use comas to separate multiple values",fullWidth:!0,value:S.join(","),onChange:function(e){return y(e,t,u)}}):he.createElement(i,{required:!0,type:u,label:d,name:l,variant:"outlined",fullWidth:!0,value:S,onChange:function(e){return y(e,t,u)}})}return he.createElement(s,{item:!0,key:l,xs:p,sm:E,md:b,lg:x,xl:w},n)};return he.createElement(s,{container:!0,component:"form",spacing:2,onSubmit:function(e){e.preventDefault(),l(f)}},n.fields.map((function(e){return g(e)})),he.createElement(s,{item:!0,xs:12},he.createElement(t,{type:"submit",variant:"contained"},a)))},Vr=function(e,t,n){var r=n.from,o=n.to,a=be(),i=Me();xe((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},_r=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.submitUpdateItemRequest,i=e.updateItemRequest,l=e.updateItem,c=e.onSubmitUpdateItem,u=e.onRequestUpdateItem,s=De().id,d=void 0===s?"":s,m=i.loading||a.loading;return xe((function(){u(d)}),[d]),Rt({title:"Item updated",message:"The item ".concat(d," has been updated successfully"),severity:"success"},!!a.success,{from:!1,to:!0}),Vr("".concat(o,"/"),!!a.success,{from:!1,to:!0}),Rt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0}),he.createElement(jr,{loading:m},he.createElement(Dt,{title:"Edit ".concat(d),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"update",text:"Edit ".concat(d),link:"".concat(o,"/").concat(d,"/update")}]}),he.createElement(qt,null,he.createElement(Fr,{model:t,initialValues:l,saveButtonText:"Save",onSubmit:c})))},qr=function(e){var t=e.columns,n=e.options,r=e.data,o=e.onClick,a=e.search,i=e.defaultSort,c=e.defaultOrder,u=e.loading,s=st(st([],t,!0),[{id:"__options",label:"",disablePadding:!1,numeric:!1,sort:!1}],!1),d=he.useState(null),m=d[0],f=d[1];return he.createElement(he.Fragment,null,he.createElement(vr,{columns:s,data:r,search:a,defaultSort:i,defaultOrder:c,loading:u},(function(e){return e.map((function(e,t){return he.createElement(ee,{key:e.id,onClick:function(){return o&&o(e)},role:"row","aria-rowindex":t,sx:{cursor:o&&"pointer"}},s.map((function(n,r){var o=n.id;return he.createElement(te,{role:"cell",scope:"row",key:o.toString(),"aria-rowindex":t,"aria-colindex":r},e[o])})),n&&he.createElement(te,null,he.createElement(l,{"data-testid":"options-".concat(e.id),onClick:function(t){t.stopPropagation(),f({item:e,anchor:t.currentTarget})}},he.createElement(Ze,null))))}))})),n&&he.createElement(ve,{anchorEl:null==m?void 0:m.anchor,open:!!m,onClose:function(){return f(null)},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},n.map((function(e){var t=e.id,n=e.label,r=e.onClick;return he.createElement(pe,{key:t,onClick:function(){m&&r(null==m?void 0:m.item),f(null)}},n)}))))},Lr=function(e){var t=e.model,n=e.modelName,r=e.listData,o=e.listRequest,a=e.deleteRequest,i=e.basePath,l=void 0===i?"":i,c=e.deleteFeature,u=void 0===c||c,s=e.updateFeature,d=void 0===s||s,m=e.addFeature,f=void 0===m||m,p=e.detailsFeature,v=void 0===p||p,y=e.onRequestList,h=e.onClickDeleteItem,g=Me();xe((function(){y()}),[]),Rt({title:"Item deleted",message:"The item has been deleted successfully",severity:"success"},!!a.success,{from:!1,to:!0}),Rt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0});var E=v?function(e){g("".concat(l,"/").concat(e.id))}:void 0,b=function(e,t){"edit"===e?g("".concat(l,"/").concat(t.id,"/update")):h(t)},x=[];d&&x.push({id:"edit",label:"Edit",onClick:function(e){return b("edit",e)}}),u&&x.push({id:"remove",label:"Remove",onClick:function(e){return b("remove",e)}});var w=[];return f&&w.push({id:"add",text:"Add",href:"".concat(l,"/add")}),he.createElement(jr,{loading:o.loading||a.loading},he.createElement(Dt,{title:n,preset:"default",actions:w.length>0?w:void 0}),he.createElement(qt,null,he.createElement(qr,{columns:t.fields.filter((function(e){return e.listable})).map((function(e){return{disablePadding:!1,id:e.id,label:e.name,numeric:"number"===e.type,sort:!1}})),data:r,defaultSort:t.fields[0].id,onClick:E,options:x.length>0?x:void 0})))},Br=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onSubmitNewItem,i=e.newItemRequest;return Rt({message:"Item added successfully",severity:"success"},!!i.success,{from:!1,to:!0}),Vr("".concat(o,"/"),!!i.success,{from:!1,to:!0}),Rt({title:"We had an error",message:i.error||"",severity:"error"},!!i.error,{from:!1,to:!0}),he.createElement(jr,{loading:i.loading},he.createElement(Dt,{title:"Add ".concat(n),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"add",text:"Add new ".concat(n),link:"".concat(o,"/add")}]}),he.createElement(qt,null,he.createElement(Fr,{model:t,saveButtonText:"Save",onSubmit:a})))},Hr=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onRequestItem,i=e.itemRequest,l=e.detailsItem,c=De().id,u=void 0===c?"":c;return xe((function(){a(u)}),[u]),he.createElement(jr,{loading:i.loading},he.createElement(Dt,{title:u,preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"detail",text:u,link:"".concat(o,"/").concat(u)}]}),he.createElement(qt,null,l&&he.createElement(Wr,{model:t,instance:l})))},Ur=function(e){var t=e.updateFeature,n=void 0===t||t,r=e.addFeature,o=void 0===r||r,a=e.detailsFeature,i=void 0===a||a;return he.createElement(Fe,null,he.createElement(Ve,{path:"",element:he.createElement(Lr,ct({},e))}),i&&he.createElement(Ve,{path:":id",element:he.createElement(Hr,ct({},e))}),o&&he.createElement(Ve,{path:"add",element:he.createElement(Br,ct({},e))}),n&&he.createElement(Ve,{path:":id/update",element:he.createElement(_r,ct({},e))}))},Yr={idle:!0},Jr={loading:!0},Xr={success:!0};export{ur as Autocomplete,_t as Board,kr as BootstrapDialog,Ct as Bullet,Lt as CenterContainer,Or as ConfirmDialog,qt as Content,xr as ContentPlaceholder,nt as DefaultPlaceholder,en as Drawer,yn as DrawerAppBar,fn as DrawerContent,Bt as DrawerContext,Xt as DrawerHeader,Tr as DrawerLayout,En as DrawerMain,rn as DrawerProvider,mn as DrawerSection,on as DrawerSubheader,hr as EnhancedRemoteTable,vr as EnhancedTable,fr as EnhancedTableHead,Cr as ExpandableAlert,Ir as FormDialog,ft as GroupValueCard,Dt as Header,jr as HeaderLayout,Yr as IdleRequest,Ot as Label,xt as LoadingArea,Jr as LoadingRequest,wr as LoremIpsumPlaceholder,Vt as Markdown,Fr as ModelForm,Ur as ModelRouter,Pt as NotificationCenterContext,zt as NotificationCenterProvider,Tt as NotificationCenterProviderUndefinedError,Wr as ObjectDetails,gr as Placeholder,wt as QueryContainer,xn as Select,wn as SignIn,Er as SkeletonCard,br as SkeletonGrid,Xr as SuccessRequest,mr as TabCard,Nt as TabContext,Wt as TabContextProvider,sr as TabPanel,Mt as TabProvider,qr as TableList,Ht as UndefinedProvider,lt as ValueBoolean,it as ValueCard,dt as ValueDatetime,et as ValueEditButtons,bt as ValueItem,pt as ValueRating,at as ValueText,St as bulletClasses,an as getDrawerItemColors,gt as getFormData,yt as getRandomItem,kt as labelClasses,Ft as markdownDefaultOptions,vt as newArrayWithSize,ht as newBreakpointsCounter,Dr as newInstanceFromValuesOrZeroValue,$r as useDialog,Ut as useDrawer,tt as useEditableValueDisplay,mt as useGetDefaultThemeColor,jt as useNotificationCenter,Rt as useNotifyWhenValueChanges,At as useTab,Et as valueItemClasses};
23
+ */er={exports:{}},"production"===process.env.NODE_ENV?er.exports=function(){if(Kn)return Qn;Kn=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case r:case a:case o:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case f:case m:case i:return e;default:return p}}case n:return p}}}return e=Symbol.for("react.module.reference"),Qn.ContextConsumer=l,Qn.ContextProvider=i,Qn.Element=t,Qn.ForwardRef=u,Qn.Fragment=r,Qn.Lazy=f,Qn.Memo=m,Qn.Portal=n,Qn.Profiler=a,Qn.StrictMode=o,Qn.Suspense=s,Qn.SuspenseList=d,Qn.isAsyncMode=function(){return!1},Qn.isConcurrentMode=function(){return!1},Qn.isContextConsumer=function(e){return v(e)===l},Qn.isContextProvider=function(e){return v(e)===i},Qn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Qn.isForwardRef=function(e){return v(e)===u},Qn.isFragment=function(e){return v(e)===r},Qn.isLazy=function(e){return v(e)===f},Qn.isMemo=function(e){return v(e)===m},Qn.isPortal=function(e){return v(e)===n},Qn.isProfiler=function(e){return v(e)===a},Qn.isStrictMode=function(e){return v(e)===o},Qn.isSuspense=function(e){return v(e)===s},Qn.isSuspenseList=function(e){return v(e)===d},Qn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},Qn.typeOf=v,Qn}():er.exports=(Zn||(Zn=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var v=e.type;switch(v){case r:case a:case o:case s:case d:return v;default:var y=v&&v.$$typeof;switch(y){case c:case l:case u:case f:case m:case i:return y;default:return p}}case n:return p}}}e=Symbol.for("react.module.reference");var y=l,h=i,b=t,g=u,E=r,x=f,S=m,w=n,C=a,k=o,O=s,I=d,T=!1,$=!1;tr.ContextConsumer=y,tr.ContextProvider=h,tr.Element=b,tr.ForwardRef=g,tr.Fragment=E,tr.Lazy=x,tr.Memo=S,tr.Portal=w,tr.Profiler=C,tr.StrictMode=k,tr.Suspense=O,tr.SuspenseList=I,tr.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},tr.isConcurrentMode=function(e){return $||($=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},tr.isContextConsumer=function(e){return v(e)===l},tr.isContextProvider=function(e){return v(e)===i},tr.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},tr.isForwardRef=function(e){return v(e)===u},tr.isFragment=function(e){return v(e)===r},tr.isLazy=function(e){return v(e)===f},tr.isMemo=function(e){return v(e)===m},tr.isPortal=function(e){return v(e)===n},tr.isProfiler=function(e){return v(e)===a},tr.isStrictMode=function(e){return v(e)===o},tr.isSuspense=function(e){return v(e)===s},tr.isSuspenseList=function(e){return v(e)===d},tr.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},tr.typeOf=v}()),tr),"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),In.exports.oneOfType([In.exports.func,In.exports.object]);let nr=0;const rr=ye.useId;function or(e){if(void 0!==rr){const t=rr();return null!=e?e:t}return function(e){const[t,n]=ye.useState(e),r=e||t;return ye.useEffect((()=>{null==t&&(nr+=1,n(`mui-${nr}`))}),[t]),r}(e)}const ar={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};const ir=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function lr(e,t,n,r){const o=e[t];if(null==o||!ir(o)){const e=function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return null===e?"null":e.constructor.name;default:return t}}(o);return new RangeError(`Invalid ${r} \`${t}\` of type \`${e}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function cr(e,t,...n){return void 0===e[t]?null:lr(e,t,...n)}function ur(){return null}cr.isRequired=lr,ur.isRequired=ur,process.env.NODE_ENV;var sr=function(t){var n,r=t.id,o=t.label,a=t.InputLabelProps,i=t.InputProps,l=t.fetching,c=t.loading,u=t.helperText,s=t.hexColor,d=t.size,f=t.fullWidth,p=t.sx,y=dt(t,["id","label","InputLabelProps","InputProps","fetching","loading","helperText","hexColor","size","fullWidth","sx"]),h=or(r),b=u&&h?"".concat(h,"-helper-text"):void 0,g=o&&h?"".concat(h,"-label"):void 0,E=s?((n={})["& .".concat(q.notchedOutline)]={borderColor:"".concat(s," !important")},n["& .".concat(B.root)]={color:s},n["& .".concat(q.input)]={color:s},n["& .".concat(H.root)]={color:s},n["& .".concat(U.bar)]={backgroundColor:s},n["& .".concat(Y.endAdornment," .").concat(J.root)]={color:s},n):{};return he.createElement(V,{sx:E,fullWidth:f},he.createElement(F,st({size:"small"===d?"small":"normal",id:g,htmlFor:h},a),o),he.createElement(X,st({},i,{id:h,label:o,size:d,fullWidth:f,endAdornment:he.createElement(e,{position:"end"},null==i?void 0:i.endAdornment,l?he.createElement(m,{color:"inherit",size:20,sx:{ml:1}}):null),sx:p},y)),c&&he.createElement(v,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}}),u&&he.createElement(G,{id:b},u))},dr=function(e){var t=e.label,n=e.loading,r=e.fetching,o=e.options,a=e.helperText,i=e.color,l=e.onChangeValue,c=void 0===l?function(){return null}:l,u=e.sx,s=dt(e,["label","loading","fetching","options","helperText","color","onChangeValue","sx"]),d=n||r;return he.createElement(K,st({loading:d,options:r?[]:o,onChange:function(e,t){return c(t)}},s,{renderInput:function(e){return he.createElement(sr,st({},e,{label:t,fullWidth:!0,fetching:r,loading:n,hexColor:i,helperText:a}))},sx:u}))};function mr(e){var t=e.children,n=e.index,r=Dt()[0],a=r===n;return Array.isArray(n)&&(a=n.includes(r)),he.createElement("div",{role:"tabpanel",hidden:!a,id:"simple-tabpanel-".concat(n),"aria-labelledby":"simple-tab-".concat(n)},a&&he.createElement(o,{sx:{p:3}},t))}var fr=w(x)((function(e){var t,n=e.theme;return(t={})["&.".concat(Q.root)]={backgroundColor:n.palette.grey[100]},t})),pr=function(e){var t=e.children,n=e.tabs,r=Dt(),o=r[0],a=r[1];return he.createElement(c,null,he.createElement(fr,{value:o,onChange:function(e,t){return a(t)}},n.map((function(e){return he.createElement(S,{key:e,label:e})}))),t)},vr=function(e){var t=e.order,n=e.orderBy,r=e.headCells,a=e.onRequestSort;return he.createElement(Z,null,he.createElement(ee,null,r.map((function(e){return he.createElement(te,{variant:"head",key:String(e.id),padding:e.disablePadding?"none":"normal",sortDirection:n===e.id&&t,sx:{fontWeight:"bold"}},e.sort?he.createElement(ne,{active:n===e.id,direction:n===e.id?t:"asc",onClick:(r=e.id,function(){a(r)})},e.label,n===e.id?he.createElement(o,{component:"span",sx:ar},"desc"===t?"sorted descending":"sorted ascending"):null):e.label);var r}))))};function yr(e,t,n){return t[n]<e[n]?-1:t[n]>e[n]?1:0}var hr=function(t){var n=t.children,r=t.data,a=t.search,i=t.columns,c=t.defaultSort,u=t.defaultOrder,s=void 0===u?"asc":u,d=t.loading,f=void 0!==d&&d,p=be(""),v=p[0],y=p[1],h=be(s),b=h[0],g=h[1],E=be(c),x=E[0],S=E[1],w=r.slice().filter(function(e,t){return function(n){return!t||e.some((function(e){var r=n[e.id];return(null==r?void 0:r.toLowerCase)&&(r=r.toLowerCase()),null==r?void 0:r.toString().includes(t.toLowerCase())}))}}(i,v)).sort(function(e,t){return"desc"===e?function(e,n){return yr(e,n,t)}:function(e,n){return-yr(e,n,t)}}(b,x));return he.createElement(he.Fragment,null,he.createElement(o,{sx:{paddingX:1,paddingBottom:2}},a&&he.createElement(o,{paddingY:2},he.createElement(l,{fullWidth:!0,placeholder:"Search",InputProps:{role:"search",startAdornment:he.createElement(e,{position:"start"},he.createElement(Xe,null))},onChange:function(e){return y(e.target.value)}})),he.createElement(re,null,he.createElement(oe,null,he.createElement(vr,{order:b,orderBy:x,headCells:i,onRequestSort:function(e){g(x===e&&"asc"===b?"desc":"asc"),S(e)}}),he.createElement(ae,null,f?he.createElement(ee,null,he.createElement(te,{colSpan:i.length,sx:{textAlign:"center"}},he.createElement(m,null))):0===w.length?he.createElement(ee,null,he.createElement(te,{colSpan:i.length,sx:{textAlign:"center"}},"No data")):n(w))))))};hr.defaultProps={defaultOrder:"asc"};var br,gr=function(e){var t=e.children,n=e.data,r=e.loading,o=e.columns,a=e.defaultSort,i=e.defaultOrder,l=e.onRequestSort,c=be({orderBy:a,order:i||"asc"}),u=c[0],s=c[1];return he.createElement(he.Fragment,null,he.createElement(re,null,he.createElement(oe,null,he.createElement(vr,{order:u.order,orderBy:u.orderBy,headCells:o,onRequestSort:function(e){s((function(t){var n=t.orderBy,r=t.order,o=n===e&&"asc"===r?"desc":"asc";return l(e,o),{orderBy:e,order:o}}))}}),he.createElement(ae,null,r?he.createElement(ee,null,he.createElement(te,{colSpan:o.length,sx:{textAlign:"center"}},he.createElement(m,null))):n.map((function(e,n){return t(e,n)}))))))},Er=function(e){var n=e.title,r=e.subtitle,i=e.icon,l=e.iconSize,c=void 0===l?200:l,u=e.actions;return he.createElement(o,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"},i&&i({size:c,color:"primary"}),he.createElement(a,{variant:"h4",role:"heading","aria-level":1},n),he.createElement(a,{variant:"subtitle1",role:"heading","aria-level":2,sx:{mt:2}},r),u&&he.createElement(o,{sx:{pt:2}},u.map((function(e,n){var r=e.id,o=e.text,a=e.href,i=e.onClick;return he.createElement(t,{key:r,role:"button",variant:"contained",href:a,onClick:i,sx:{mr:n<u.length-1?2:0}},o)}))))},xr=function(e){var t=e.width,n=void 0===t?"100%":t,r=e.animation,a=void 0!==r&&r;return he.createElement(o,{width:n},he.createElement(ie,{animation:a,variant:"rectangular",height:118}),he.createElement(ie,{animation:a,variant:"rectangular",height:16,sx:{my:1}}),he.createElement(ie,{animation:a,variant:"rectangular",width:"80%",height:16}))},Sr=function(e){var t=e.size,n=void 0===t?20:t;return he.createElement(s,{container:!0,spacing:2},ht(n,0).map((function(e,t){return he.createElement(s,{item:!0,key:t,xs:4},he.createElement(xr,{width:1}))})))},wr=function(e){var t=e.size,n=void 0===t?20:t,r=e.children,o=e.p;return he.createElement(g,{component:"main",sx:{p:o},"data-testid":"content-placeholder-test"},r,he.createElement(Sr,{size:n}))},Cr=function(e){var t=e.count,n=void 0===t?3:t,r=e.units,o=void 0===r?"paragraph":r,i=e.variant,l=void 0===i?"body1":i;return he.createElement(a,{variant:l},Ge({count:n,units:o}))},kr=((br={})["& .".concat(le.message)]={width:1},br),Or=xe((function(e,t){var n=e.severity,a=e.iconMapping,i=e.title,l=e.message,c=e.metadata,u=e.metadataComponent,s=e.onClose,d=e.sx,m=void 0===d?{}:d,v=be(!1),y=v[0],h=v[1];return he.createElement(f,{ref:t,severity:n,iconMapping:a,onClose:s,action:he.createElement(o,{display:"flex",flexDirection:"column"},he.createElement(r,{color:"inherit",onClick:s},he.createElement($e,{fontSize:"small"})),c&&he.createElement(r,{color:"inherit",onClick:function(){return h((function(e){return!e}))}},y?he.createElement(Ke,{fontSize:"small"}):he.createElement(He,{fontSize:"small"}))),sx:st(st({},kr),m)},he.createElement(o,{sx:{w:1}},i&&he.createElement(p,null,i),l,c&&he.createElement(R,{in:y,sx:{mt:2}},he.createElement(qt,{content:c},u))))})),Ir=function(e){var n=e.open,a=e.title,i=e.component,l=e.componentProps,c=void 0===l?{}:l,u=e.disabled,s=e.actions,d=void 0===s?[]:s,f=e.children,p=e.loading,v=e.cancelable,y=e.callCloseWhenCancel,h=void 0===y||y,b=e.acceptable,g=e.acceptText,E=void 0===g?"Accept":g,x=e.cancelText,S=void 0===x?"Cancel":x,w=e.onAccept,C=e.onCancel,k=void 0===C?function(){return null}:C,O=e.onClose,I=e.acceptType,T=void 0===I?"button":I,$=d.length>0||b||v;return he.createElement(ce,{open:n,onClose:O},he.createElement(ue,{sx:{display:"flex",alignItems:"center"}},a,p&&!b&&he.createElement(m,{size:20,sx:{ml:2,color:function(e){return e.palette.grey[500]}}}),he.createElement(r,{disabled:u,"aria-label":"close",onClick:O,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}}},he.createElement($e,null))),he.createElement(o,st({component:i},c),he.createElement(se,{dividers:!0},f),$&&he.createElement(de,null,d.map((function(e){var n=e.id,r=e.text,o=e.type,a=void 0===o?"button":o,i=e.onClick,l=e.color,c=void 0===l?"primary":l;return he.createElement(t,{key:n,type:a,disabled:u,onClick:i,color:c},r)})),v&&he.createElement(t,{color:"error",disabled:u,onClick:function(){k(),h&&O()}},S),b&&he.createElement(Je,{type:T,loading:p,disabled:u,onClick:w},E))))},Tr=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.confirmText,i=void 0===a?"Confirm":a,l=e.cancelText,c=void 0===l?"Cancel":l,u=e.children,s=e.onConfirm,d=e.onCancel;return he.createElement(Ir,{title:n,loading:r,disabled:r||o,open:t,onClose:d,acceptable:!0,cancelable:!0,callCloseWhenCancel:!1,acceptText:i,cancelText:c,onCancel:d,onAccept:s},u)},$r=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.submitText,i=void 0===a?"Submit":a,l=e.cancelText,c=void 0===l?"Cancel":l,u=e.children,s=e.onSubmit,d=e.onCancel;return he.createElement(Ir,{component:"form",componentProps:{onSubmit:function(e){e.preventDefault(),s(Et(e))}},title:n,loading:r,disabled:r||o,open:t,onClose:d,callCloseWhenCancel:!1,cancelable:!0,acceptable:!0,cancelText:c,onCancel:d,acceptText:i,acceptType:"submit"},u)},Pr=function(e){void 0===e&&(e=!1);var t=be(e),n=t[0],r=t[1];return{isOpen:n,open:function(){return r(!0)},close:function(){return r(!1)},setIsOpen:r}},jr=function(e){var t=e.drawerProviderProps,n=e.children,r=n[0],o=n[1],a=n[2];return he.createElement(an,st({},t),r,o,he.createElement(xn,null,a))},zr=function(){return he.createElement(Qe,{color:"error",sx:{width:200,height:200}})},Rr=function(e){var t=e.loading,n=e.children,r=e.fetching,a=e.error,i=n[0],l=n[1];return he.createElement(Vt,null,he.createElement(o,{display:"flex",flexDirection:"column",height:1},i,r&&he.createElement(o,{width:1},he.createElement(v,null)),t&&he.createElement(wt,null),a&&he.createElement(o,{mt:4},he.createElement(Er,{icon:a.icon||zr,title:a.title||"There has been an error",subtitle:a.message})),!t&&!a&&l))},Nr=function(e,t,n){var r=(void 0===n?{}:n).dense,o=e.id,a=e.name,i=e.type,l=t[o];return"boolean"===i?he.createElement(ut,{dense:r,label:a,value:l}):"date"===i||"time"===i||"datetime"===i?he.createElement(ft,{dense:r,label:a,value:l,format:e.format}):"object"!=typeof l||Array.isArray(l)?he.createElement(lt,{dense:r,label:a,value:null==l?void 0:l.toString()}):he.createElement(lt,{dense:r,label:a,value:JSON.stringify(l)})},Wr=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance,i=e.dense,l=[{field:"id",headerName:"ID",width:70}];o.forEach((function(e){l.push({field:e.id,headerName:e.name})}));var c=a.map((function(e,t){return st({id:t},e)}));return he.createElement(vt,{title:n,subtitle:r,dense:i},he.createElement(s,{item:!0,xs:12},he.createElement(Ze,{rows:c,columns:l,density:i?"compact":"standard",disableRowSelectionOnClick:!0,pageSizeOptions:[5],initialState:{pagination:{paginationModel:{pageSize:5}}},sx:{height:400}})))},Ar=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance,i=e.dense,l=gt();return he.createElement(vt,{title:n,subtitle:r,dense:i},o.map((function(e){var t=e.id,n=e.xs,r=e.sm,o=e.md,c=e.lg,u=e.xl,s=l.increment(e);return he.createElement(St,{key:t,xs:n,sm:r,md:o,lg:c,xl:u,bordered:s},Nr(e,a,{dense:i}))})))},Mr=function(e){var t=e.model,n=e.instance,r=e.dense,o=gt();return he.createElement(s,{container:!0,spacing:r?1:2},t.fields.map((function(e){var t=e.id,a=e.type,i=e.xs,l=void 0===i?3:i,c=e.sm,u=void 0===c?0:c,d=e.md,m=void 0===d?0:d,f=e.lg,p=void 0===f?0:f,v=e.xl,y=void 0===v?0:v;if("group"===a)return o.increment({xs:12}),he.createElement(s,{item:!0,key:t,xs:12},he.createElement(Ar,{field:e,instance:n[t],dense:r}));if("group[]"===a)return o.increment({xs:12}),he.createElement(s,{item:!0,key:t,xs:12},he.createElement(Wr,{field:e,instance:n[t],dense:r}));var h=o.increment(e);return he.createElement(St,{key:t,xs:l,sm:u,md:m,lg:p,xl:y,bordered:h},Nr(e,n,{dense:r}))})))},Dr={string:"",number:0,boolean:!1,enum:"",multienum:[],date:new Date(1970,0,1,0,0),time:new Date(1970,0,1,0,0),datetime:new Date(1970,0,1,0,0),group:{},"group[]":[],"string[]":[],"number[]":[]},Vr=function(e,t){return t&&t[e.id]||"default"in e&&e.default||Dr[e.type]},Fr=function(e,t){void 0===t&&(t=void 0);var n={};return e.fields.forEach((function(e){if("group"===e.type){var r={};e.value.forEach((function(n){r[n.id]=Vr(n,t&&t[e.id])})),n[e.id]=r}else n[e.id]=Vr(e,t)})),n},_r=function(e){var n=e.model,r=e.saveButtonText,i=e.onSubmit,u=e.initialValues,d=ke((function(){return Fr(n,u)}),[n,u]),m=be(d),f=m[0],p=m[1],v=function(e,t,n){p((function(r){var o,a={};return t?a[t]=st(st({},r[t]),((o={})[e]=n,o)):a[e]=n,st(st({},r),a)}))},y=function(e,t,n){e.preventDefault();var r=e.target.value;"number"===n&&"string"==typeof r?r=parseInt(e.target.value,10):n.includes("[]")&&(r=e.target.value.split(",")),v(e.target.name,t,r)},h=function(e,t,n){v(n,t,e)},b=function(e,t){void 0===t&&(t=void 0);var n,r=pt({lightWeight:200,darkWeight:800}),i=e.id,u=e.type,d=e.name,m=e.description,p=e.xs,g=e.sm,E=e.md,x=e.lg,S=e.xl,w=t?f[t][i]:f[i];if("group"===u)n=he.createElement(c,null,he.createElement(o,{bgcolor:r,px:2,py:1,mb:2},he.createElement(a,{variant:"h6",role:"heading","aria-level":1},d),he.createElement(a,{variant:"body2",role:"heading","aria-level":2},m)),he.createElement(s,{container:!0,spacing:2,sx:{p:2}},e.value.map((function(e){return b(e,i)}))));else if("boolean"===u)n=he.createElement(o,{sx:{height:1,display:"flex",alignItems:"center"}},he.createElement(me,{control:he.createElement(fe,{name:i,onChange:function(e){return function(e,t){e.preventDefault(),v(e.target.name,t,e.target.checked)}(e,t)},checked:w}),label:d}));else if("enum"===u)n=he.createElement(V,{fullWidth:!0},he.createElement(F,{id:"".concat(i,"-select-label")},d),he.createElement(_,{labelId:"".concat(i,"-select-label"),id:"".concat(i,"-select"),value:w,label:d,name:i,onChange:function(e){return function(e,t){e.preventDefault(),v(e.target.name,t,e.target.value)}(e,t)},required:!0},e.value.map((function(e){return he.createElement(pe,{key:e,value:e},e)}))));else if("multienum"===u)n=he.createElement(V,{fullWidth:!0},he.createElement(F,{id:"".concat(i,"-select-label")},d),he.createElement(_,{labelId:"".concat(i,"-select-label"),id:"".concat(i,"-select"),value:w||[],renderValue:function(e){return e.join(", ")},label:d,name:i,onChange:function(e){return function(e,t){e.preventDefault();var n=e.target.value,r="string"==typeof n?n.split(","):n;v(e.target.name,t,r)}(e,t)},required:!0,multiple:!0},e.value.map((function(e){return he.createElement(pe,{key:e,value:e},he.createElement(fe,{checked:(w||[]).includes(e)}),he.createElement(z,{primary:e}))}))));else if("date"===u)n=he.createElement(Ne,{label:d,format:e.format,value:w,onChange:function(e){return h(e,t,i)}});else if("time"===u)n=he.createElement(ze,{label:d,format:e.format,value:w,onChange:function(e){return h(e,t,i)}});else if("datetime"===u)n=he.createElement(je,{label:d,format:e.format,value:w,onChange:function(e){return h(e,t,i)}});else{if("group[]"===u)return null;n=u.includes("[]")?he.createElement(l,{required:!0,type:"text",label:d,name:i,variant:"outlined",helperText:"Use comas to separate multiple values",fullWidth:!0,value:w.join(","),onChange:function(e){return y(e,t,u)}}):he.createElement(l,{required:!0,type:u,label:d,name:i,variant:"outlined",fullWidth:!0,value:w,onChange:function(e){return y(e,t,u)}})}return he.createElement(s,{item:!0,key:i,xs:p,sm:g,md:E,lg:x,xl:S},n)};return he.createElement(s,{container:!0,component:"form",spacing:2,onSubmit:function(e){e.preventDefault(),i(f)}},n.fields.map((function(e){return b(e)})),he.createElement(s,{item:!0,xs:12},he.createElement(t,{type:"submit",variant:"contained"},r)))},Lr=function(e,t,n){var r=n.from,o=n.to,a=ge(),i=Me();Ee((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},qr=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.submitUpdateItemRequest,i=e.updateItemRequest,l=e.updateItem,c=e.onSubmitUpdateItem,u=e.onRequestUpdateItem,s=De().id,d=void 0===s?"":s,m=i.loading||a.loading;return Ee((function(){u(d)}),[d]),Wt({title:"Item updated",message:"The item ".concat(d," has been updated successfully"),severity:"success"},!!a.success,{from:!1,to:!0}),Lr("".concat(o,"/"),!!a.success,{from:!1,to:!0}),Wt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0}),he.createElement(Rr,{loading:m},he.createElement(Ft,{title:"Edit ".concat(d),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"update",text:"Edit ".concat(d),link:"".concat(o,"/").concat(d,"/update")}]}),he.createElement(Bt,null,he.createElement(_r,{model:t,initialValues:l,saveButtonText:"Save",onSubmit:c})))},Br=function(e){var t=e.columns,n=e.options,o=e.data,a=e.onClick,i=e.search,l=e.defaultSort,c=e.defaultOrder,u=e.loading,s=mt(mt([],t,!0),[{id:"__options",label:"",disablePadding:!1,numeric:!1,sort:!1}],!1),d=he.useState(null),m=d[0],f=d[1];return he.createElement(he.Fragment,null,he.createElement(hr,{columns:s,data:o,search:i,defaultSort:l,defaultOrder:c,loading:u},(function(e){return e.map((function(e,t){return he.createElement(ee,{key:e.id,onClick:function(){return a&&a(e)},role:"row","aria-rowindex":t,sx:{cursor:a&&"pointer"}},s.map((function(n,r){var o=n.id;return he.createElement(te,{role:"cell",scope:"row",key:o.toString(),"aria-rowindex":t,"aria-colindex":r},e[o])})),n&&he.createElement(te,null,he.createElement(r,{"data-testid":"options-".concat(e.id),onClick:function(t){t.stopPropagation(),f({item:e,anchor:t.currentTarget})}},he.createElement(et,null))))}))})),n&&he.createElement(ve,{anchorEl:null==m?void 0:m.anchor,open:!!m,onClose:function(){return f(null)},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},n.map((function(e){var t=e.id,n=e.label,r=e.onClick;return he.createElement(pe,{key:t,onClick:function(){m&&r(null==m?void 0:m.item),f(null)}},n)}))))},Hr=function(e){var t=e.model,n=e.modelName,r=e.listData,o=e.listRequest,a=e.deleteRequest,i=e.basePath,l=void 0===i?"":i,c=e.deleteFeature,u=void 0===c||c,s=e.updateFeature,d=void 0===s||s,m=e.addFeature,f=void 0===m||m,p=e.detailsFeature,v=void 0===p||p,y=e.onRequestList,h=e.onClickDeleteItem,b=Me();Ee((function(){y()}),[]),Wt({title:"Item deleted",message:"The item has been deleted successfully",severity:"success"},!!a.success,{from:!1,to:!0}),Wt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0});var g=v?function(e){b("".concat(l,"/").concat(e.id))}:void 0,E=function(e,t){"edit"===e?b("".concat(l,"/").concat(t.id,"/update")):h(t)},x=[];d&&x.push({id:"edit",label:"Edit",onClick:function(e){return E("edit",e)}}),u&&x.push({id:"remove",label:"Remove",onClick:function(e){return E("remove",e)}});var S=[];return f&&S.push({id:"add",text:"Add",href:"".concat(l,"/add")}),he.createElement(Rr,{loading:o.loading||a.loading},he.createElement(Ft,{title:n,preset:"default",actions:S.length>0?S:void 0}),he.createElement(Bt,null,he.createElement(Br,{columns:t.fields.filter((function(e){return e.listable})).map((function(e){return{disablePadding:!1,id:e.id,label:e.name,numeric:"number"===e.type,sort:!1}})),data:r,defaultSort:t.fields[0].id,onClick:g,options:x.length>0?x:void 0})))},Ur=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onSubmitNewItem,i=e.newItemRequest;return Wt({message:"Item added successfully",severity:"success"},!!i.success,{from:!1,to:!0}),Lr("".concat(o,"/"),!!i.success,{from:!1,to:!0}),Wt({title:"We had an error",message:i.error||"",severity:"error"},!!i.error,{from:!1,to:!0}),he.createElement(Rr,{loading:i.loading},he.createElement(Ft,{title:"Add ".concat(n),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"add",text:"Add new ".concat(n),link:"".concat(o,"/add")}]}),he.createElement(Bt,null,he.createElement(_r,{model:t,saveButtonText:"Save",onSubmit:a})))},Yr=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onRequestItem,i=e.itemRequest,l=e.detailsItem,c=De().id,u=void 0===c?"":c;return Ee((function(){a(u)}),[u]),he.createElement(Rr,{loading:i.loading},he.createElement(Ft,{title:u,preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"detail",text:u,link:"".concat(o,"/").concat(u)}]}),he.createElement(Bt,null,l&&he.createElement(Mr,{model:t,instance:l})))},Jr=function(e){var t=e.updateFeature,n=void 0===t||t,r=e.addFeature,o=void 0===r||r,a=e.detailsFeature,i=void 0===a||a;return he.createElement(Ve,null,he.createElement(Fe,{path:"",element:he.createElement(Hr,st({},e))}),i&&he.createElement(Fe,{path:":id",element:he.createElement(Yr,st({},e))}),o&&he.createElement(Fe,{path:"add",element:he.createElement(Ur,st({},e))}),n&&he.createElement(Fe,{path:":id/update",element:he.createElement(qr,st({},e))}))},Xr={idle:!0},Gr={loading:!0},Kr={success:!0};export{dr as Autocomplete,qt as Board,Ir as BootstrapDialog,Ot as Bullet,Ht as CenterContainer,Tr as ConfirmDialog,Bt as Content,wr as ContentPlaceholder,ot as DefaultPlaceholder,nn as Drawer,bn as DrawerAppBar,vn as DrawerContent,Ut as DrawerContext,Kt as DrawerHeader,jr as DrawerLayout,xn as DrawerMain,an as DrawerProvider,pn as DrawerSection,ln as DrawerSubheader,gr as EnhancedRemoteTable,hr as EnhancedTable,vr as EnhancedTableHead,Or as ExpandableAlert,$r as FormDialog,vt as GroupValueCard,Ft as Header,Rr as HeaderLayout,Xr as IdleRequest,Tt as Label,wt as LoadingArea,Gr as LoadingRequest,Cr as LoremIpsumPlaceholder,Lt as Markdown,_r as ModelForm,Jr as ModelRouter,zt as NotificationCenterContext,Nt as NotificationCenterProvider,jt as NotificationCenterProviderUndefinedError,Mr as ObjectDetails,Er as Placeholder,Ct as QueryContainer,wn as Select,Cn as SignIn,xr as SkeletonCard,Sr as SkeletonGrid,Kr as SuccessRequest,pr as TabCard,At as TabContext,Mt as TabContextProvider,mr as TabPanel,Vt as TabProvider,Br as TableList,sr as TextField,Yt as UndefinedProvider,ut as ValueBoolean,ct as ValueCard,ft as ValueDatetime,rt as ValueEditButton,tt as ValueEditButtons,St as ValueItem,yt as ValueRating,lt as ValueText,kt as bulletClasses,cn as getDrawerItemColors,Et as getFormData,bt as getRandomItem,It as labelClasses,_t as markdownDefaultOptions,ht as newArrayWithSize,gt as newBreakpointsCounter,Fr as newInstanceFromValuesOrZeroValue,Pr as useDialog,Jt as useDrawer,nt as useEditableValueDisplay,pt as useGetDefaultThemeColor,Rt as useNotificationCenter,Wt as useNotifyWhenValueChanges,Dt as useTab,xt as valueItemClasses};
24
24
  //# sourceMappingURL=index.js.map