@asaleh37/ui-base 25.8.31 → 25.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +10 -1
- package/dist/index.js +134 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +134 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
- package/src/components/App.tsx +16 -1
- package/src/components/common/AzureLogin.tsx +70 -0
- package/src/components/common/Login.tsx +1 -0
- package/src/components/msalConfig.ts +11 -0
- package/src/hooks/useAxios.tsx +1 -0
- package/src/layout/Layout.tsx +14 -3
- package/src/layout/MainContent.tsx +0 -5
- package/src/layout/TopBar.tsx +2 -1
- package/src/main.tsx +7 -0
- package/src/navigationItems/index.tsx +1 -8
- package/src/redux/features/common/AppInfoSlice.ts +7 -0
- package/src/routes/index.ts +2 -6
- package/src/util/AppUtils.ts +18 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("@mui/x-data-grid-premium"),t=require("react/jsx-runtime"),i=require("react-redux"),o=require("@fortawesome/fontawesome-svg-core"),a=require("@fortawesome/free-brands-svg-icons"),r=require("@fortawesome/free-regular-svg-icons"),n=require("@fortawesome/free-solid-svg-icons");require("react-toastify/dist/ReactToastify.css");var d=require("@mui/material"),l=require("@emotion/react"),s=require("react"),p=require("@mui/material/styles"),c=require("@mui/material/CssBaseline"),u=require("@mui/material/AppBar"),m=require("@mui/material/Toolbar"),T=require("@fortawesome/react-fontawesome"),A=require("@reduxjs/toolkit"),_=require("react-toastify"),f=require("axios"),I=require("i18next"),E=require("react-i18next"),O=require("react-hook-form"),N=require("react-router-dom"),y=require("@hookform/resolvers/zod"),h=require("zod"),R=require("@mui/material/List"),L=require("@mui/material/Card"),C=require("@mui/material/CardHeader"),g=require("@mui/material/ListItemText"),D=require("@mui/material/ListItemIcon"),P=require("@mui/material/Checkbox"),x=require("@mui/material/Button"),b=require("@mui/material/Divider"),M=require("@mui/x-date-pickers"),S=require("@mui/x-date-pickers/AdapterMoment"),U=require("moment"),F=require("@mui/material/CardActions"),w=require("@mui/material/CardContent"),v=require("@mui/material/CardMedia"),B=require("@mui/material/Typography"),k=require("@mui/lab"),j=require("@mui/x-tree-view/models"),G=require("@mui/x-charts"),W=require("@mui/material/LinearProgress"),Y=require("@mui/material/Box"),V=require("@mui/x-charts/PieChart"),q=require("@mui/material/IconButton"),K=require("@mui/material/Drawer"),z=require("@react-spring/web"),H=require("@mui/material/Collapse"),Q=require("@mui/x-tree-view/RichTreeView"),Z=require("@mui/x-tree-view/TreeItem"),$=require("@mui/x-tree-view/useTreeItem2"),X=require("@mui/x-tree-view/TreeItem2"),J=require("@mui/x-tree-view/TreeItem2Icon"),ee=require("@mui/x-tree-view/TreeItem2Provider"),te=require("@mui/x-tree-view/TreeItem2DragAndDropOverlay"),ie=require("stylis-plugin-rtl"),oe=require("stylis"),ae=require("@emotion/cache"),re=require("@emotion/styled"),ne=require("@mui/material/colors"),de=require("@mui/material/SwipeableDrawer"),le=require("@mui/x-license");function se(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var pe=se(s),ce=se(h);!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("html,\nbody {\n height: 100vh;\n margin: 0;\n padding: 0;\n}\n\n#root {\n height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.red-row {\n background-color: #f0d8d8;\n}\n");const ue=(e=768)=>{const[t,i]=s.useState(window.innerWidth<e);return s.useEffect(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},me=350,Te={themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},Ae=A.createSlice({name:"AppLayout",initialState:Te,reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),_e=Ae.actions;var fe=Ae.reducer;const Ie=A.createSlice({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:Ee,hideLoadingMask:Oe}=Ie.actions;var Ne=Ie.reducer;const ye=()=>{const e=i.useDispatch();return{show:t=>{e(Ee(t))},hide:()=>{e(Oe())}}},he=A.createSlice({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Re=he.actions;var Le=he.reducer;const Ce=()=>{const e=ye(),t=i.useDispatch(),o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),a=f.create({baseURL:o,timeout:6e5,withCredentials:!0});a.defaults.withCredentials=!0,a.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),a.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(Re.setUnAuthenticated()),_.toast.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&402===e.response.status)))t(Re.setUnAuthenticated()),_.toast.error("Your license is missing or has expired,Please reach out to your vendor for assistance.");else if(e&&(e.response&&(e.response.status&&403===e.response.status)))_.toast.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then(e=>{_.toast.error(e)})}else _.toast.error(e.response.data);else _.toast.error("failed to communicate with the server ... try again later");return"ERROR"});return{handleGetRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await a.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0,headers:t.headers,responseType:t?.responseType});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await a.post(t.endPointURI,t.data,{params:t.parameters,responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await a.delete(t.endPointURI,{params:{...t.parameters},responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await a.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleUploadRequest:async t=>{if(null===t.files||0===t.files.length)return _.toast.error("You must add files to upload"),"ERROR";const i=new FormData;for(const e of t.files)i.append("files",e);void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let o=await a.post(t.endPointURI,i,{params:t?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")}}},ge=e=>{const[i,o]=s.useState(!1),{t:a}=E.useTranslation();return{ConfirmationWindow:()=>t.jsxs(d.Dialog,{open:i,children:[t.jsx(d.DialogTitle,{children:e.title}),t.jsx(d.DialogContent,{children:t.jsx(d.DialogContentText,{children:e.body})}),t.jsxs(d.DialogActions,{children:[t.jsx(d.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{o(!1)},children:a("NO_LABEL")}),t.jsx(d.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),o(!1)},autoFocus:!0,children:a("YES_LABEL")})]})]}),open:i,setOpen:o}},De=()=>{const e=i.useSelector(e=>e.UserSession),t=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities){if("DEVELOPMENT_ADMIN"===t&&("DEVELOPMENT_ADMIN"===i?.authority||"ORGANIZATION_ADMIN"===i?.authority))return!0;if("ORGANIZATION_ADMIN"===t&&"ORGANIZATION_ADMIN"===i?.authority)return!0;if("DEVELOPMENT_ADMIN"!==t&&"ORGANIZATION_ADMIN"!==t&&("ORGANIZATION_ADMIN"===i?.authority||"DEVELOPMENT_ADMIN"===i?.authority||"SYSTEM_ADMIN"===i?.authority||i?.authority===t))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(t?.currentOrganization?.systemApplicationModules)for(const i of t.currentOrganization.systemApplicationModules)if(i.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:t}},Pe=e=>{const[o,a]=s.useState(!1),r=i.useSelector(e=>e.AppLayout.appDirection);return{windowState:o,setWindowState:a,Window:i=>t.jsx(d.Modal,{open:o,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!o&&e?.onCloseCallBack&&e.onCloseCallBack()},children:t.jsxs(d.Box,{dir:r,sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:e?.height||"80%",width:e?.width||"90%",minWidth:e.minWidth||400,minHeight:e.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[t.jsx(d.AppBar,{position:"static",children:t.jsxs(d.Toolbar,{variant:"dense",children:[t.jsx(T.FontAwesomeIcon,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),t.jsx(d.Typography,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),t.jsx("div",{style:{flexGrow:1}}),t.jsx(d.IconButton,{onClick:()=>{a(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:t.jsx(T.FontAwesomeIcon,{icon:"xmark-square"})})]})}),t.jsx(d.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:i?.children})]})})}},xe=A.createSlice({name:"commonStores",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data}}}),{setStoreData:be,setStoresMetaData:Me}=xe.actions;var Se=xe.reducer;const Ue=e=>{const t=i.useSelector(e=>e.commonStores.stores),o=i.useDispatch(),a=De(),{handleGetRequest:r,handlePostRequest:n,handleDeleteRequest:d}=Ce();return{reloadData:async i=>{if(e?.commonStoreKey){const i=Object.keys(t);for(const n of i)if(n===e.commonStoreKey&&(void 0===t[n]?.authority||null===t[n]?.authority||a.isUserAuthorized(t[n]?.authority))&&""!=t[n]?.url){await r({endPointURI:t[n].url,showMask:!1,successCallBkFn:t=>{o(be({storeKey:n,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{o(be({storeKey:n,data:[]})),e.setData([])}});break}}else e?.findAll&&await r({endPointURI:e.findAll,showMask:!0,parameters:i||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await r({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await n({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await d({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},Fe=e=>{const{t:i}=E.useTranslation();return t.jsx(d.TextField,{...e,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:t.jsx(t.Fragment,{children:e?.label?i(e.label):""}),helperText:e?.helperText?i(e.helperText):void 0})};function we(e,t){return e.filter(e=>-1===t.indexOf(e))}function ve(e,t){return e.filter(e=>-1!==t.indexOf(e))}const Be=({valueField:e="id",displayField:i="name",options:o=[],selectedOptions:a=[],setSelection:r})=>{const[n,l]=pe.useState([]),[s,p]=pe.useState([]),[c,u]=pe.useState([]),[m,T]=pe.useState(""),[A,_]=pe.useState(""),f=ve(n,s),I=ve(n,c);pe.useEffect(()=>{o&&p([...o])},[o]),pe.useEffect(()=>{a&&u([...a])},[a]);const E=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),l(i)},O=e=>ve(n,e).length,N=e=>()=>{var t,i;O(e)===e.length?l(we(n,e)):l((t=n,i=e,[...t,...we(i,t)]))},y=(o,a,r)=>{const l=a.filter(e=>{if(e[i]){const t=e[i];if("left"===r&&t.toLocaleLowerCase().includes(m.toLocaleLowerCase()))return!0;if("right"===r&&t.toLocaleLowerCase().includes(A.toLocaleLowerCase()))return!0}return!1});return t.jsxs(L,{sx:{height:"100%"},children:[t.jsx(C,{sx:{px:2,py:1},avatar:t.jsx(P,{onClick:N(l),checked:O(l)===l.length&&0!==l.length,indeterminate:O(l)!==l.length&&0!==O(l),disabled:0===l.length,inputProps:{"aria-label":"all items selected"}}),title:o,subheader:`${O(a)} / ${a.length} Selected`}),t.jsx(d.Box,{sx:{width:"100%",padding:1},children:t.jsx(Fe,{fullWidth:!0,label:"search",value:"left"===r?m:A,onChange:e=>{"left"===r?T(e.target.value):_(e.target.value)}})}),t.jsx(b,{}),t.jsx(R,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map(o=>(o[e],t.jsxs(d.ListItemButton,{role:"listitem",onClick:E(o),sx:{cursor:"pointer"},children:[t.jsx(D,{children:t.jsx(P,{checked:-1!==n.indexOf(o),tabIndex:-1,disableRipple:!0})}),t.jsx(g,{id:o[e],primary:o[i]})]},o[e])))})]})};return t.jsxs(d.Grid2,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[t.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:y("Available Items",s,"left")}),t.jsx(d.Grid2,{children:t.jsxs(d.Grid2,{container:!0,direction:"column",alignItems:"center",children:[t.jsx(x,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{u(e=>{let t=c.concat(f);return r(t),t}),p(we(s,f)),l(we(n,f))},disabled:0===f.length,"aria-label":"move selected right",children:">"}),t.jsx(x,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(s.concat(I)),u(e=>{let t=we(c,I);return r(t),t}),l(we(n,I))},disabled:0===I.length,"aria-label":"move selected left",children:"<"})]})}),t.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:y("Currently Selected",c,"right")})]})},ke=e=>{const{t:i}=E.useTranslation();return t.jsx(d.FormControlLabel,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:t.jsx(d.Checkbox,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:t=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(t.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:i(e.label)})},je=e=>{const o=i.useSelector(e=>e.AppLayout),{t:a}=E.useTranslation();return t.jsx(d.Autocomplete,{sx:e.sx,value:(t=>{for(let i of e.options)if(i[e.valueField]==t)return i;return null})(e.value),options:e.options,disabled:e.disabled,hidden:e?.hidden||!1,onChange:(t,i)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=i){let t=i[e.valueField];e.onChangeCallBack(t,i)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:t=>null!=t?a(t[e.displayField]):"",renderOption:(i,o)=>t.jsx("li",{...i,children:null!=o?a(o[e.displayField]):""}),slots:{popper:e=>t.jsx(d.Popper,{...e,style:{...e.style,direction:o.appDirection}})},renderInput:i=>t.jsx(d.TextField,{...i,required:e.required||!1,variant:"outlined",slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:a(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?a(e.errorMessage):""})})},Ge="YYYY-MM-DD",We="YYYY-MM-DD HH:mm:ss",Ye="#37505C",Ve="#ff6d00",qe="#ea690e",Ke="#74776B",ze=e=>{const{t:i}=E.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(M.LocalizationProvider,{dateAdapter:S.AdapterMoment,children:t.jsx(M.DatePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?U(e.value,e?.format||Ge):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:i(e.label),format:e?.format||Ge,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||Ge)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},He=e=>{const{t:i}=E.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(M.LocalizationProvider,{dateAdapter:S.AdapterMoment,children:t.jsx(M.DateTimePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?U(e.value,e?.format||We):null,label:i(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||We,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||We)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},Qe=e=>{const o=i.useSelector(e=>e.AppLayout),a=De(),[r,n]=s.useState([]),{handleGetRequest:d}=Ce();return s.useEffect(()=>{e.lookupType&&(async()=>{await d({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{n(e.data)},failureCallBkFn:()=>{n([])}})})()},[e.lookupType,a.UserSession]),t.jsx(je,{...e,options:r,displayField:"ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},Ze=e=>({...e,type:"string",renderEditCell:e=>t.jsx(ze,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(Ge)),o},valueFormatter:(e,t,i)=>t[i.field]}),$e=e=>({...e,type:"string",renderEditCell:e=>t.jsx(He,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(We)),o},valueFormatter:(e,t,i)=>t[i.field]}),Xe=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let i=null;try{i=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return t.jsx("div",{children:null!=i?i[e.colDef.displayField]:e.value})},renderEditCell:e=>t.jsx(je,{...e,sx:{width:"100%"},options:e.colDef.options,valueField:e.colDef.valueField,displayField:e.colDef.displayField,onChangeCallBack:(t,i)=>{null===t&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:t})}})}),Je=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const o=i?.value;return o===e.checkedValue||"true"===o||1===o||!0===o?t.jsx(T.FontAwesomeIcon,{icon:"check",color:"green"}):t.jsx(T.FontAwesomeIcon,{icon:"xmark",color:"red"})},renderEditCell:i=>t.jsx(ke,{...i,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),et=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...et(i));return t},tt=e=>{const t=[];for(const i of e)t.push(...et(i));return t},it=(e,t,i)=>{const o=[];for(const a of e)if("text"===a?.fieldType||"number"===a?.fieldType){const e={...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,type:"number"==a?.fieldType?"number":"string",field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200};o.push(e)}else if("date"===a?.fieldType){const e=Ze({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else if("datetime"===a?.fieldType){const e=$e({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else if("checkbox"===a?.fieldType){const e=Je({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,checkedValue:a?.checkedValue,unCheckedValue:a?.unCheckedValue,width:150});o.push(e)}else if("combobox"===a?.fieldType){const e=Xe({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,valueField:a?.optionValueField||"value",displayField:a?.optionDisplayField||"display",options:a?.options||[],flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else if("lookup"===a?.fieldType){const e=Xe({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,lookupType:a?.lookupType,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,valueField:a?.optionValueField||"value",displayField:a?.optionDisplayField||"display",options:a?.options||[],flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else{const e={field:a.fieldName,...a?.gridProps?.muiProps};o.push(e)}return o},ot=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?ce.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ce.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?ce.boolean({required_error:"This field is required"}):ce.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?ce.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ce.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?ce.string({message:"This field is required"}).min(1,"This field is required"):ce.string().optional().nullable()):t[e]=!0===i?.required?ce.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ce.number().optional().nullable():t[e]=!0===i?.required?ce.string({message:"This field is required"}).min(1,"This field is required"):ce.string().optional().nullable()}return t},at=(e,t,i)=>{const o=[],a=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),a.push(e[i]);else if(e?.ids)for(const r of e.ids){const e=t.find(e=>e[i]===r);o.push(e),a.push(r)}return{selectedRecords:o,selectedRecordIds:a}};function rt(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>i.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${i} for the full message.`}function nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dt,lt={exports:{}},st={exports:{}},pt={};var ct,ut,mt,Tt,At,_t,ft,It,Et,Ot,Nt,yt,ht,Rt,Lt,Ct={};
|
|
1
|
+
"use strict";var e=require("@mui/x-data-grid-premium"),t=require("react/jsx-runtime"),i=require("react-redux"),o=require("@fortawesome/fontawesome-svg-core"),r=require("@fortawesome/free-brands-svg-icons"),n=require("@fortawesome/free-regular-svg-icons"),a=require("@fortawesome/free-solid-svg-icons");require("react-toastify/dist/ReactToastify.css");var s=require("@mui/material"),l=require("@emotion/react"),d=require("react"),c=require("@mui/material/styles"),u=require("@mui/material/CssBaseline"),p=require("@mui/material/AppBar"),h=require("@mui/material/Toolbar"),m=require("@fortawesome/react-fontawesome"),f=require("@reduxjs/toolkit"),g=require("react-toastify"),T=require("axios"),A=require("i18next"),I=require("react-i18next"),y=require("react-hook-form"),_=require("react-router-dom"),E=require("@hookform/resolvers/zod"),O=require("zod"),C=require("@mui/material/List"),N=require("@mui/material/Card"),R=require("@mui/material/CardHeader"),b=require("@mui/material/ListItemText"),w=require("@mui/material/ListItemIcon"),P=require("@mui/material/Checkbox"),S=require("@mui/material/Button"),v=require("@mui/material/Divider"),L=require("@mui/x-date-pickers"),M=require("@mui/x-date-pickers/AdapterMoment"),x=require("moment"),D=require("@mui/material/CardActions"),k=require("@mui/material/CardContent"),U=require("@mui/material/CardMedia"),F=require("@mui/material/Typography"),B=require("@mui/lab"),q=require("@mui/x-tree-view/models"),j=require("@mui/x-charts"),G=require("@mui/material/LinearProgress"),W=require("@mui/material/Box"),H=require("@mui/x-charts/PieChart"),Y=require("@mui/material/IconButton"),K=require("@mui/material/Drawer"),V=require("@react-spring/web"),z=require("@mui/material/Collapse"),$=require("@mui/x-tree-view/RichTreeView"),Q=require("@mui/x-tree-view/TreeItem"),Z=require("@mui/x-tree-view/useTreeItem2"),J=require("@mui/x-tree-view/TreeItem2"),X=require("@mui/x-tree-view/TreeItem2Icon"),ee=require("@mui/x-tree-view/TreeItem2Provider"),te=require("@mui/x-tree-view/TreeItem2DragAndDropOverlay"),ie=require("stylis-plugin-rtl"),oe=require("stylis"),re=require("@emotion/cache"),ne=require("@emotion/styled"),ae=require("@mui/material/colors"),se=require("@mui/material/SwipeableDrawer"),le=require("@mui/x-license");function de(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var ce=de(d),ue=de(O);!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("html,\nbody {\n height: 100vh;\n margin: 0;\n padding: 0;\n}\n\n#root {\n height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.red-row {\n background-color: #f0d8d8;\n}\n");const pe=(e=768)=>{const[t,i]=d.useState(window.innerWidth<e);return d.useEffect(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},he=350,me={themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},fe=f.createSlice({name:"AppLayout",initialState:me,reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),ge=fe.actions;var Te=fe.reducer;const Ae=f.createSlice({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:Ie,hideLoadingMask:ye}=Ae.actions;var _e=Ae.reducer;const Ee=()=>{const e=i.useDispatch();return{show:t=>{e(Ie(t))},hide:()=>{e(ye())}}},Oe=f.createSlice({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Ce=Oe.actions;var Ne=Oe.reducer;const Re=()=>{const e=Ee(),t=i.useDispatch(),o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),r=T.create({baseURL:o,timeout:6e5,withCredentials:!0});r.defaults.withCredentials=!0,r.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),r.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN"),g.toast.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&402===e.response.status)))t(Ce.setUnAuthenticated()),g.toast.error("Your license is missing or has expired,Please reach out to your vendor for assistance.");else if(e&&(e.response&&(e.response.status&&403===e.response.status)))g.toast.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then(e=>{g.toast.error(e)})}else g.toast.error(e.response.data);else g.toast.error("failed to communicate with the server ... try again later");return"ERROR"});return{handleGetRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await r.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0,headers:t.headers,responseType:t?.responseType});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await r.post(t.endPointURI,t.data,{params:t.parameters,responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await r.delete(t.endPointURI,{params:{...t.parameters},responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await r.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleUploadRequest:async t=>{if(null===t.files||0===t.files.length)return g.toast.error("You must add files to upload"),"ERROR";const i=new FormData;for(const e of t.files)i.append("files",e);void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let o=await r.post(t.endPointURI,i,{params:t?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")}}},be=e=>{const[i,o]=d.useState(!1),{t:r}=I.useTranslation();return{ConfirmationWindow:()=>t.jsxs(s.Dialog,{open:i,children:[t.jsx(s.DialogTitle,{children:e.title}),t.jsx(s.DialogContent,{children:t.jsx(s.DialogContentText,{children:e.body})}),t.jsxs(s.DialogActions,{children:[t.jsx(s.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{o(!1)},children:r("NO_LABEL")}),t.jsx(s.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),o(!1)},autoFocus:!0,children:r("YES_LABEL")})]})]}),open:i,setOpen:o}},we=()=>{const e=i.useSelector(e=>e.UserSession),t=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities){if("DEVELOPMENT_ADMIN"===t&&("DEVELOPMENT_ADMIN"===i?.authority||"ORGANIZATION_ADMIN"===i?.authority))return!0;if("ORGANIZATION_ADMIN"===t&&"ORGANIZATION_ADMIN"===i?.authority)return!0;if("DEVELOPMENT_ADMIN"!==t&&"ORGANIZATION_ADMIN"!==t&&("ORGANIZATION_ADMIN"===i?.authority||"DEVELOPMENT_ADMIN"===i?.authority||"SYSTEM_ADMIN"===i?.authority||i?.authority===t))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(t?.currentOrganization?.systemApplicationModules)for(const i of t.currentOrganization.systemApplicationModules)if(i.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:t}},Pe=e=>{const[o,r]=d.useState(!1),n=i.useSelector(e=>e.AppLayout.appDirection);return{windowState:o,setWindowState:r,Window:i=>t.jsx(s.Modal,{open:o,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!o&&e?.onCloseCallBack&&e.onCloseCallBack()},children:t.jsxs(s.Box,{dir:n,sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:e?.height||"80%",width:e?.width||"90%",minWidth:e.minWidth||400,minHeight:e.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[t.jsx(s.AppBar,{position:"static",children:t.jsxs(s.Toolbar,{variant:"dense",children:[t.jsx(m.FontAwesomeIcon,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),t.jsx(s.Typography,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),t.jsx("div",{style:{flexGrow:1}}),t.jsx(s.IconButton,{onClick:()=>{r(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:t.jsx(m.FontAwesomeIcon,{icon:"xmark-square"})})]})}),t.jsx(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:i?.children})]})})}},Se=f.createSlice({name:"commonStores",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data}}}),{setStoreData:ve,setStoresMetaData:Le}=Se.actions;var Me=Se.reducer;const xe=e=>{const t=i.useSelector(e=>e.commonStores.stores),o=i.useDispatch(),r=we(),{handleGetRequest:n,handlePostRequest:a,handleDeleteRequest:s}=Re();return{reloadData:async i=>{if(e?.commonStoreKey){const i=Object.keys(t);for(const a of i)if(a===e.commonStoreKey&&(void 0===t[a]?.authority||null===t[a]?.authority||r.isUserAuthorized(t[a]?.authority))&&""!=t[a]?.url){await n({endPointURI:t[a].url,showMask:!1,successCallBkFn:t=>{o(ve({storeKey:a,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{o(ve({storeKey:a,data:[]})),e.setData([])}});break}}else e?.findAll&&await n({endPointURI:e.findAll,showMask:!0,parameters:i||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await n({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await a({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await s({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},De=e=>{const{t:i}=I.useTranslation();return t.jsx(s.TextField,{...e,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:t.jsx(t.Fragment,{children:e?.label?i(e.label):""}),helperText:e?.helperText?i(e.helperText):void 0})};function ke(e,t){return e.filter(e=>-1===t.indexOf(e))}function Ue(e,t){return e.filter(e=>-1!==t.indexOf(e))}const Fe=({valueField:e="id",displayField:i="name",options:o=[],selectedOptions:r=[],setSelection:n})=>{const[a,l]=ce.useState([]),[d,c]=ce.useState([]),[u,p]=ce.useState([]),[h,m]=ce.useState(""),[f,g]=ce.useState(""),T=Ue(a,d),A=Ue(a,u);ce.useEffect(()=>{o&&c([...o])},[o]),ce.useEffect(()=>{r&&p([...r])},[r]);const I=e=>()=>{const t=a.indexOf(e),i=[...a];-1===t?i.push(e):i.splice(t,1),l(i)},y=e=>Ue(a,e).length,_=e=>()=>{var t,i;y(e)===e.length?l(ke(a,e)):l((t=a,i=e,[...t,...ke(i,t)]))},E=(o,r,n)=>{const l=r.filter(e=>{if(e[i]){const t=e[i];if("left"===n&&t.toLocaleLowerCase().includes(h.toLocaleLowerCase()))return!0;if("right"===n&&t.toLocaleLowerCase().includes(f.toLocaleLowerCase()))return!0}return!1});return t.jsxs(N,{sx:{height:"100%"},children:[t.jsx(R,{sx:{px:2,py:1},avatar:t.jsx(P,{onClick:_(l),checked:y(l)===l.length&&0!==l.length,indeterminate:y(l)!==l.length&&0!==y(l),disabled:0===l.length,inputProps:{"aria-label":"all items selected"}}),title:o,subheader:`${y(r)} / ${r.length} Selected`}),t.jsx(s.Box,{sx:{width:"100%",padding:1},children:t.jsx(De,{fullWidth:!0,label:"search",value:"left"===n?h:f,onChange:e=>{"left"===n?m(e.target.value):g(e.target.value)}})}),t.jsx(v,{}),t.jsx(C,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map(o=>(o[e],t.jsxs(s.ListItemButton,{role:"listitem",onClick:I(o),sx:{cursor:"pointer"},children:[t.jsx(w,{children:t.jsx(P,{checked:-1!==a.indexOf(o),tabIndex:-1,disableRipple:!0})}),t.jsx(b,{id:o[e],primary:o[i]})]},o[e])))})]})};return t.jsxs(s.Grid2,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[t.jsx(s.Grid2,{sx:{height:"100%",flex:1},children:E("Available Items",d,"left")}),t.jsx(s.Grid2,{children:t.jsxs(s.Grid2,{container:!0,direction:"column",alignItems:"center",children:[t.jsx(S,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(e=>{let t=u.concat(T);return n(t),t}),c(ke(d,T)),l(ke(a,T))},disabled:0===T.length,"aria-label":"move selected right",children:">"}),t.jsx(S,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{c(d.concat(A)),p(e=>{let t=ke(u,A);return n(t),t}),l(ke(a,A))},disabled:0===A.length,"aria-label":"move selected left",children:"<"})]})}),t.jsx(s.Grid2,{sx:{height:"100%",flex:1},children:E("Currently Selected",u,"right")})]})},Be=e=>{const{t:i}=I.useTranslation();return t.jsx(s.FormControlLabel,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:t.jsx(s.Checkbox,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:t=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(t.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:i(e.label)})},qe=e=>{const o=i.useSelector(e=>e.AppLayout),{t:r}=I.useTranslation();return t.jsx(s.Autocomplete,{sx:e.sx,value:(t=>{for(let i of e.options)if(i[e.valueField]==t)return i;return null})(e.value),options:e.options,disabled:e.disabled,hidden:e?.hidden||!1,onChange:(t,i)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=i){let t=i[e.valueField];e.onChangeCallBack(t,i)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:t=>null!=t?r(t[e.displayField]):"",renderOption:(i,o)=>t.jsx("li",{...i,children:null!=o?r(o[e.displayField]):""}),slots:{popper:e=>t.jsx(s.Popper,{...e,style:{...e.style,direction:o.appDirection}})},renderInput:i=>t.jsx(s.TextField,{...i,required:e.required||!1,variant:"outlined",slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:r(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?r(e.errorMessage):""})})},je="YYYY-MM-DD",Ge="YYYY-MM-DD HH:mm:ss",We="#37505C",He="#ff6d00",Ye="#ea690e",Ke="#74776B",Ve=e=>{const{t:i}=I.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(L.LocalizationProvider,{dateAdapter:M.AdapterMoment,children:t.jsx(L.DatePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?x(e.value,e?.format||je):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:i(e.label),format:e?.format||je,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||je)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},ze=e=>{const{t:i}=I.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(L.LocalizationProvider,{dateAdapter:M.AdapterMoment,children:t.jsx(L.DateTimePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?x(e.value,e?.format||Ge):null,label:i(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||Ge,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||Ge)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},$e=e=>{const o=i.useSelector(e=>e.AppLayout),r=we(),[n,a]=d.useState([]),{handleGetRequest:s}=Re();return d.useEffect(()=>{e.lookupType&&(async()=>{await s({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{a(e.data)},failureCallBkFn:()=>{a([])}})})()},[e.lookupType,r.UserSession]),t.jsx(qe,{...e,options:n,displayField:"ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},Qe=e=>({...e,type:"string",renderEditCell:e=>t.jsx(Ve,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=x(e).format(je)),o},valueFormatter:(e,t,i)=>t[i.field]}),Ze=e=>({...e,type:"string",renderEditCell:e=>t.jsx(ze,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=x(e).format(Ge)),o},valueFormatter:(e,t,i)=>t[i.field]}),Je=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let i=null;try{i=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return t.jsx("div",{children:null!=i?i[e.colDef.displayField]:e.value})},renderEditCell:e=>t.jsx(qe,{...e,sx:{width:"100%"},options:e.colDef.options,valueField:e.colDef.valueField,displayField:e.colDef.displayField,onChangeCallBack:(t,i)=>{null===t&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:t})}})}),Xe=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const o=i?.value;return o===e.checkedValue||"true"===o||1===o||!0===o?t.jsx(m.FontAwesomeIcon,{icon:"check",color:"green"}):t.jsx(m.FontAwesomeIcon,{icon:"xmark",color:"red"})},renderEditCell:i=>t.jsx(Be,{...i,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),et=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...et(i));return t},tt=e=>{const t=[];for(const i of e)t.push(...et(i));return t},it=(e,t,i)=>{const o=[];for(const r of e)if("text"===r?.fieldType||"number"===r?.fieldType){const e={...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,type:"number"==r?.fieldType?"number":"string",field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200};o.push(e)}else if("date"===r?.fieldType){const e=Qe({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("datetime"===r?.fieldType){const e=Ze({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("checkbox"===r?.fieldType){const e=Xe({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,checkedValue:r?.checkedValue,unCheckedValue:r?.unCheckedValue,width:150});o.push(e)}else if("combobox"===r?.fieldType){const e=Je({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("lookup"===r?.fieldType){const e=Je({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,lookupType:r?.lookupType,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else{const e={field:r.fieldName,...r?.gridProps?.muiProps};o.push(e)}return o},ot=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?ue.boolean({required_error:"This field is required"}):ue.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?ue.string({message:"This field is required"}).min(1,"This field is required"):ue.string().optional().nullable()):t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():t[e]=!0===i?.required?ue.string({message:"This field is required"}).min(1,"This field is required"):ue.string().optional().nullable()}return t},rt=(e,t,i)=>{const o=[],r=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),r.push(e[i]);else if(e?.ids)for(const n of e.ids){const e=t.find(e=>e[i]===n);o.push(e),r.push(n)}return{selectedRecords:o,selectedRecordIds:r}};function nt(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>i.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${i} for the full message.`}function at(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st,lt={exports:{}},dt={exports:{}},ct={};var ut,pt,ht,mt,ft,gt,Tt,At,It,yt,_t,Et,Ot,Ct,Nt,Rt={};
|
|
2
2
|
/** @license React v16.13.1
|
|
3
3
|
* react-is.development.js
|
|
4
4
|
*
|
|
@@ -6,12 +6,12 @@
|
|
|
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
|
|
9
|
+
*/function bt(){return pt||(pt=1,"production"===process.env.NODE_ENV?dt.exports=function(){if(st)return ct;st=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case d:case o:case n:case r:case u:return e;default:switch(e=e&&e.$$typeof){case s:case c:case m:case h:case a:return e;default:return p}}case i:return p}}}function y(e){return I(e)===d}return ct.AsyncMode=l,ct.ConcurrentMode=d,ct.ContextConsumer=s,ct.ContextProvider=a,ct.Element=t,ct.ForwardRef=c,ct.Fragment=o,ct.Lazy=m,ct.Memo=h,ct.Portal=i,ct.Profiler=n,ct.StrictMode=r,ct.Suspense=u,ct.isAsyncMode=function(e){return y(e)||I(e)===l},ct.isConcurrentMode=y,ct.isContextConsumer=function(e){return I(e)===s},ct.isContextProvider=function(e){return I(e)===a},ct.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ct.isForwardRef=function(e){return I(e)===c},ct.isFragment=function(e){return I(e)===o},ct.isLazy=function(e){return I(e)===m},ct.isMemo=function(e){return I(e)===h},ct.isPortal=function(e){return I(e)===i},ct.isProfiler=function(e){return I(e)===n},ct.isStrictMode=function(e){return I(e)===r},ct.isSuspense=function(e){return I(e)===u},ct.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===T||e.$$typeof===A||e.$$typeof===f)},ct.typeOf=I,ct}():dt.exports=(ut||(ut=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var f=e.type;switch(f){case l:case d:case o:case n:case r:case u:return f;default:var g=f&&f.$$typeof;switch(g){case s:case c:case m:case h:case a:return g;default:return p}}case i:return p}}}var y=l,_=d,E=s,O=a,C=t,N=c,R=o,b=m,w=h,P=i,S=n,v=r,L=u,M=!1;function x(e){return I(e)===d}Rt.AsyncMode=y,Rt.ConcurrentMode=_,Rt.ContextConsumer=E,Rt.ContextProvider=O,Rt.Element=C,Rt.ForwardRef=N,Rt.Fragment=R,Rt.Lazy=b,Rt.Memo=w,Rt.Portal=P,Rt.Profiler=S,Rt.StrictMode=v,Rt.Suspense=L,Rt.isAsyncMode=function(e){return M||(M=!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.")),x(e)||I(e)===l},Rt.isConcurrentMode=x,Rt.isContextConsumer=function(e){return I(e)===s},Rt.isContextProvider=function(e){return I(e)===a},Rt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Rt.isForwardRef=function(e){return I(e)===c},Rt.isFragment=function(e){return I(e)===o},Rt.isLazy=function(e){return I(e)===m},Rt.isMemo=function(e){return I(e)===h},Rt.isPortal=function(e){return I(e)===i},Rt.isProfiler=function(e){return I(e)===n},Rt.isStrictMode=function(e){return I(e)===r},Rt.isSuspense=function(e){return I(e)===u},Rt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===T||e.$$typeof===A||e.$$typeof===f)},Rt.typeOf=I}()),Rt)),dt.exports}
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
13
13
|
@license MIT
|
|
14
|
-
*/function Dt(){if(Tt)return mt;Tt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return mt=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={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,a){for(var r,n,d=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var s in r=Object(arguments[l]))t.call(r,s)&&(d[s]=r[s]);if(e){n=e(r);for(var p=0;p<n.length;p++)i.call(r,n[p])&&(d[n[p]]=r[n[p]])}}return d},mt}function Pt(){if(_t)return At;_t=1;return At="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function xt(){return It?ft:(It=1,ft=Function.call.bind(Object.prototype.hasOwnProperty))}function bt(){if(Ot)return Et;Ot=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Pt(),i={},o=xt();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function a(a,r,n,d,l){if("production"!==process.env.NODE_ENV)for(var s in a)if(o(a,s)){var p;try{if("function"!=typeof a[s]){var c=Error((d||"React class")+": "+n+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}p=a[s](r,s,d,n,null,t)}catch(e){p=e}if(!p||p instanceof Error||e((d||"React class")+": type specification of "+n+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in i)){i[p.message]=!0;var u=l?l():"";e("Failed "+n+" type: "+p.message+(null!=u?u:""))}}}return a.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Et=a}function Mt(){if(yt)return Nt;yt=1;var e=gt(),t=Dt(),i=Pt(),o=xt(),a=bt(),r=function(){};function n(){return null}return"production"!==process.env.NODE_ENV&&(r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Nt=function(d,l){var s="function"==typeof Symbol&&Symbol.iterator;var p="<<anonymous>>",c={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:T(n),arrayOf:function(e){return T(function(t,o,a,r,n){if("function"!=typeof e)return new m("Property `"+n+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var d=t[o];if(!Array.isArray(d))return new m("Invalid "+r+" `"+n+"` of type `"+I(d)+"` supplied to `"+a+"`, expected an array.");for(var l=0;l<d.length;l++){var s=e(d,l,a,r,n+"["+l+"]",i);if(s instanceof Error)return s}return null})},element:T(function(e,t,i,o,a){var r=e[t];return d(r)?null:new m("Invalid "+o+" `"+a+"` of type `"+I(r)+"` supplied to `"+i+"`, expected a single ReactElement.")}),elementType:T(function(t,i,o,a,r){var n=t[i];return e.isValidElementType(n)?null:new m("Invalid "+a+" `"+r+"` of type `"+I(n)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(e){return T(function(t,i,o,a,r){if(!(t[i]instanceof e)){var n=e.name||p;return new m("Invalid "+a+" `"+r+"` of type `"+(((d=t[i]).constructor&&d.constructor.name?d.constructor.name:p)+"` supplied to `")+o+"`, expected instance of `"+n+"`.")}var d;return null})},node:T(function(e,t,i,o,a){return f(e[t])?null:new m("Invalid "+o+" `"+a+"` supplied to `"+i+"`, expected a ReactNode.")}),objectOf:function(e){return T(function(t,a,r,n,d){if("function"!=typeof e)return new m("Property `"+d+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[a],s=I(l);if("object"!==s)return new m("Invalid "+n+" `"+d+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var p in l)if(o(l,p)){var c=e(l,p,r,n,d+"."+p,i);if(c instanceof Error)return c}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r(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."),n;return T(function(t,i,o,a,r){for(var n=t[i],d=0;d<e.length;d++)if(u(n,e[d]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===E(t)?String(t):t});return new m("Invalid "+a+" `"+r+"` of value `"+String(n)+"` supplied to `"+o+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r("Invalid argument supplied to oneOfType, expected an instance of array."),n;for(var t=0;t<e.length;t++){var a=e[t];if("function"!=typeof a)return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(a)+" at index "+t+"."),n}return T(function(t,a,r,n,d){for(var l=[],s=0;s<e.length;s++){var p=(0,e[s])(t,a,r,n,d,i);if(null==p)return null;p.data&&o(p.data,"expectedType")&&l.push(p.data.expectedType)}return new m("Invalid "+n+" `"+d+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return T(function(t,o,a,r,n){var d=t[o],l=I(d);if("object"!==l)return new m("Invalid "+r+" `"+n+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");for(var s in e){var p=e[s];if("function"!=typeof p)return _(a,r,n,s,E(p));var c=p(d,s,a,r,n+"."+s,i);if(c)return c}return null})},exact:function(e){return T(function(a,r,n,d,l){var s=a[r],p=I(s);if("object"!==p)return new m("Invalid "+d+" `"+l+"` of type `"+p+"` supplied to `"+n+"`, expected `object`.");var c=t({},a[r],e);for(var u in c){var T=e[u];if(o(e,u)&&"function"!=typeof T)return _(n,d,l,u,E(T));if(!T)return new m("Invalid "+d+" `"+l+"` key `"+u+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(a[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var A=T(s,u,n,d,l+"."+u,i);if(A)return A}return null})}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function m(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function T(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function a(a,n,d,s,c,u,T){if(s=s||p,u=u||d,T!==i){if(l){var A=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 A.name="Invariant Violation",A}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=s+":"+d;!t[_]&&o<3&&(r("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+s+"`. 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[_]=!0,o++)}}return null==n[d]?a?null===n[d]?new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `null`."):new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(n,d,s,c,u)}var n=a.bind(null,!1);return n.isRequired=a.bind(null,!0),n}function A(e){return T(function(t,i,o,a,r,n){var d=t[i];return I(d)!==e?new m("Invalid "+a+" `"+r+"` of type `"+E(d)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null})}function _(e,t,i,o,a){return new m((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function f(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(f);if(null===e||d(e))return!0;var t=function(e){var t=e&&(s&&e[s]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!f(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!f(a[1]))return!1}return!0;default:return!1}}function I(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=I(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function O(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 m.prototype=Error.prototype,c.checkPropTypes=a,c.resetWarningCache=a.resetWarningCache,c.PropTypes=c,c},Nt}function St(){if(Rt)return ht;Rt=1;var e=Pt();function t(){}function i(){}return i.resetWarningCache=t,ht=function(){function o(t,i,o,a,r,n){if(n!==e){var d=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 d.name="Invariant Violation",d}}function a(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:a,element:o,elementType:o,instanceOf:a,node:o,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:t};return r.PropTypes=r,r}}function Ut(){if(Lt)return lt.exports;if(Lt=1,"production"!==process.env.NODE_ENV){var e=gt();lt.exports=Mt()(e.isElement,true)}else lt.exports=St()();return lt.exports}var Ft=nt(Ut());var wt,vt={exports:{}},Bt={};function kt(){if(wt)return Bt;wt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),n=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function T(m){if("object"==typeof m&&null!==m){var T=m.$$typeof;switch(T){case e:switch(m=m.type){case i:case a:case o:case l:case s:case u:return m;default:switch(m=m&&m.$$typeof){case n:case d:case c:case p:case r:return m;default:return T}}case t:return T}}}return Bt.ContextConsumer=r,Bt.ContextProvider=n,Bt.Element=e,Bt.ForwardRef=d,Bt.Fragment=i,Bt.Lazy=c,Bt.Memo=p,Bt.Portal=t,Bt.Profiler=a,Bt.StrictMode=o,Bt.Suspense=l,Bt.SuspenseList=s,Bt.isContextConsumer=function(e){return T(e)===r},Bt.isContextProvider=function(e){return T(e)===n},Bt.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Bt.isForwardRef=function(e){return T(e)===d},Bt.isFragment=function(e){return T(e)===i},Bt.isLazy=function(e){return T(e)===c},Bt.isMemo=function(e){return T(e)===p},Bt.isPortal=function(e){return T(e)===t},Bt.isProfiler=function(e){return T(e)===a},Bt.isStrictMode=function(e){return T(e)===o},Bt.isSuspense=function(e){return T(e)===l},Bt.isSuspenseList=function(e){return T(e)===s},Bt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===o||e===l||e===s||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===p||e.$$typeof===n||e.$$typeof===r||e.$$typeof===d||e.$$typeof===m||void 0!==e.getModuleId)},Bt.typeOf=T,Bt}var jt,Gt,Wt={};
|
|
14
|
+
*/function wt(){if(mt)return ht;mt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return ht=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={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,r){for(var n,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var d in n=Object(arguments[l]))t.call(n,d)&&(s[d]=n[d]);if(e){a=e(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s},ht}function Pt(){if(gt)return ft;gt=1;return ft="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function St(){return At?Tt:(At=1,Tt=Function.call.bind(Object.prototype.hasOwnProperty))}function vt(){if(yt)return It;yt=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Pt(),i={},o=St();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,n,a,s,l){if("production"!==process.env.NODE_ENV)for(var d in r)if(o(r,d)){var c;try{if("function"!=typeof r[d]){var u=Error((s||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}c=r[d](n,d,s,a,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in i)){i[c.message]=!0;var p=l?l():"";e("Failed "+a+" type: "+c.message+(null!=p?p:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},It=r}function Lt(){if(Et)return _t;Et=1;var e=bt(),t=wt(),i=Pt(),o=St(),r=vt(),n=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(n=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),_t=function(s,l){var d="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:m(a),arrayOf:function(e){return m(function(t,o,r,n,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[o];if(!Array.isArray(s))return new h("Invalid "+n+" `"+a+"` of type `"+A(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<s.length;l++){var d=e(s,l,r,n,a+"["+l+"]",i);if(d instanceof Error)return d}return null})},element:m(function(e,t,i,o,r){var n=e[t];return s(n)?null:new h("Invalid "+o+" `"+r+"` of type `"+A(n)+"` supplied to `"+i+"`, expected a single ReactElement.")}),elementType:m(function(t,i,o,r,n){var a=t[i];return e.isValidElementType(a)?null:new h("Invalid "+r+" `"+n+"` of type `"+A(a)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,i,o,r,n){if(!(t[i]instanceof e)){var a=e.name||c;return new h("Invalid "+r+" `"+n+"` of type `"+(((s=t[i]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `")+o+"`, expected instance of `"+a+"`.")}var s;return null})},node:m(function(e,t,i,o,r){return T(e[t])?null:new h("Invalid "+o+" `"+r+"` supplied to `"+i+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,r,n,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var l=t[r],d=A(l);if("object"!==d)return new h("Invalid "+a+" `"+s+"` of type `"+d+"` supplied to `"+n+"`, expected an object.");for(var c in l)if(o(l,c)){var u=e(l,c,n,a,s+"."+c,i);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n(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."),a;return m(function(t,i,o,r,n){for(var a=t[i],s=0;s<e.length;s++)if(p(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===I(t)?String(t):t});return new h("Invalid "+r+" `"+n+"` of value `"+String(a)+"` supplied to `"+o+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(r)+" at index "+t+"."),a}return m(function(t,r,n,a,s){for(var l=[],d=0;d<e.length;d++){var c=(0,e[d])(t,r,n,a,s,i);if(null==c)return null;c.data&&o(c.data,"expectedType")&&l.push(c.data.expectedType)}return new h("Invalid "+a+" `"+s+"` supplied to `"+n+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,o,r,n,a){var s=t[o],l=A(s);if("object"!==l)return new h("Invalid "+n+" `"+a+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var d in e){var c=e[d];if("function"!=typeof c)return g(r,n,a,d,I(c));var u=c(s,d,r,n,a+"."+d,i);if(u)return u}return null})},exact:function(e){return m(function(r,n,a,s,l){var d=r[n],c=A(d);if("object"!==c)return new h("Invalid "+s+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var u=t({},r[n],e);for(var p in u){var m=e[p];if(o(e,p)&&"function"!=typeof m)return g(a,s,l,p,I(m));if(!m)return new h("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=m(d,p,a,s,l+"."+p,i);if(f)return f}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function r(r,a,s,d,u,p,m){if(d=d||c,p=p||s,m!==i){if(l){var f=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 f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=d+":"+s;!t[g]&&o<3&&(n("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+d+"`. 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[g]=!0,o++)}}return null==a[s]?r?null===a[s]?new h("The "+u+" `"+p+"` is marked as required in `"+d+"`, but its value is `null`."):new h("The "+u+" `"+p+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(a,s,d,u,p)}var a=r.bind(null,!1);return a.isRequired=r.bind(null,!0),a}function f(e){return m(function(t,i,o,r,n,a){var s=t[i];return A(s)!==e?new h("Invalid "+r+" `"+n+"` of type `"+I(s)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,i,o,r){return new h((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function T(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(T);if(null===e||s(e))return!0;var t=function(e){var t=e&&(d&&e[d]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!T(i.value))return!1}else for(;!(i=o.next()).done;){var r=i.value;if(r&&!T(r[1]))return!1}return!0;default:return!1}}function A(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 I(e){if(null==e)return""+e;var t=A(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=I(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=r,u.resetWarningCache=r.resetWarningCache,u.PropTypes=u,u},_t}function Mt(){if(Ct)return Ot;Ct=1;var e=Pt();function t(){}function i(){}return i.resetWarningCache=t,Ot=function(){function o(t,i,o,r,n,a){if(a!==e){var s=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 s.name="Invariant Violation",s}}function r(){return o}o.isRequired=o;var n={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:t};return n.PropTypes=n,n}}function xt(){if(Nt)return lt.exports;if(Nt=1,"production"!==process.env.NODE_ENV){var e=bt();lt.exports=Lt()(e.isElement,true)}else lt.exports=Mt()();return lt.exports}var Dt=at(xt());var kt,Ut={exports:{}},Ft={};function Bt(){if(kt)return Ft;kt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(h){if("object"==typeof h&&null!==h){var m=h.$$typeof;switch(m){case e:switch(h=h.type){case i:case r:case o:case l:case d:case p:return h;default:switch(h=h&&h.$$typeof){case a:case s:case u:case c:case n:return h;default:return m}}case t:return m}}}return Ft.ContextConsumer=n,Ft.ContextProvider=a,Ft.Element=e,Ft.ForwardRef=s,Ft.Fragment=i,Ft.Lazy=u,Ft.Memo=c,Ft.Portal=t,Ft.Profiler=r,Ft.StrictMode=o,Ft.Suspense=l,Ft.SuspenseList=d,Ft.isContextConsumer=function(e){return m(e)===n},Ft.isContextProvider=function(e){return m(e)===a},Ft.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Ft.isForwardRef=function(e){return m(e)===s},Ft.isFragment=function(e){return m(e)===i},Ft.isLazy=function(e){return m(e)===u},Ft.isMemo=function(e){return m(e)===c},Ft.isPortal=function(e){return m(e)===t},Ft.isProfiler=function(e){return m(e)===r},Ft.isStrictMode=function(e){return m(e)===o},Ft.isSuspense=function(e){return m(e)===l},Ft.isSuspenseList=function(e){return m(e)===d},Ft.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===r||e===o||e===l||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===a||e.$$typeof===n||e.$$typeof===s||e.$$typeof===h||void 0!==e.getModuleId)},Ft.typeOf=m,Ft}var qt,jt,Gt={};
|
|
15
15
|
/**
|
|
16
16
|
* @license React
|
|
17
17
|
* react-is.development.js
|
|
@@ -20,7 +20,7 @@ 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
|
-
*/function Yt(){return jt||(jt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var T=e.$$typeof;switch(T){case t:switch(e=e.type){case o:case r:case a:case s:case p:case m:return e;default:switch(e=e&&e.$$typeof){case d:case l:case u:case c:case n:return e;default:return T}}case i:return T}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),d=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),T=Symbol.for("react.client.reference");Wt.ContextConsumer=n,Wt.ContextProvider=d,Wt.Element=t,Wt.ForwardRef=l,Wt.Fragment=o,Wt.Lazy=u,Wt.Memo=c,Wt.Portal=i,Wt.Profiler=r,Wt.StrictMode=a,Wt.Suspense=s,Wt.SuspenseList=p,Wt.isContextConsumer=function(t){return e(t)===n},Wt.isContextProvider=function(t){return e(t)===d},Wt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Wt.isForwardRef=function(t){return e(t)===l},Wt.isFragment=function(t){return e(t)===o},Wt.isLazy=function(t){return e(t)===u},Wt.isMemo=function(t){return e(t)===c},Wt.isPortal=function(t){return e(t)===i},Wt.isProfiler=function(t){return e(t)===r},Wt.isStrictMode=function(t){return e(t)===a},Wt.isSuspense=function(t){return e(t)===s},Wt.isSuspenseList=function(t){return e(t)===p},Wt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===r||e===a||e===s||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===n||e.$$typeof===l||e.$$typeof===T||void 0!==e.getModuleId)},Wt.typeOf=e}()),Wt}function Vt(){return Gt||(Gt=1,"production"===process.env.NODE_ENV?vt.exports=kt():vt.exports=Yt()),vt.exports}var qt=Vt();function Kt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function zt(e){if(pe.isValidElement(e)||qt.isValidElementType(e)||!Kt(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=zt(e[i])}),t}function Ht(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return Kt(e)&&Kt(t)&&Object.keys(t).forEach(a=>{pe.isValidElement(t[a])||qt.isValidElementType(t[a])?o[a]=t[a]:Kt(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Kt(e[a])?o[a]=Ht(e[a],t[a],i):i.clone?o[a]=Kt(t[a])?zt(t[a]):t[a]:o[a]=t[a]}),o}function Qt(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...a}=e,r=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),n=Object.keys(r);function d(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function s(e,a){const r=n.indexOf(a);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==r&&"number"==typeof t[n[r]]?t[n[r]]:a)-o/100}${i})`}return{keys:n,values:r,up:d,down:l,between:s,only:function(e){return n.indexOf(e)+1<n.length?s(e,n[n.indexOf(e)+1]):d(e)},not:function(e){const t=n.indexOf(e);return 0===t?d(n[1]):t===n.length-1?l(n[t]):s(e,n[n.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...a}}function Zt(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)});return i.length?i.reduce((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e},{...t}):t}const $t={borderRadius:4},Xt="production"!==process.env.NODE_ENV?Ft.oneOfType([Ft.number,Ft.string,Ft.object,Ft.array]):{};function Jt(e,t){return t?Ht(e,t,{clone:!1}):e}const ei={xs:0,sm:600,md:900,lg:1200,xl:1536},ti={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ei[e]}px)`},ii={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:ei[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function oi(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||ti;return t.reduce((o,a,r)=>(o[e.up(e.keys[r])]=i(t[r]),o),{})}if("object"==typeof t){const e=o.breakpoints||ti;return Object.keys(t).reduce((a,r)=>{if(n=e.keys,"@"===(d=r)||d.startsWith("@")&&(n.some(e=>d.startsWith(`@${e}`))||d.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:rt(18,`(${t})`));return null}const[,o,a]=i,r=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(r)}(o.containerQueries?o:ii,r);e&&(a[e]=i(t[r],r))}else if(Object.keys(e.values||ei).includes(r)){a[e.up(r)]=i(t[r],r)}else{const e=r;a[e]=t[e]}var n,d;return a},{})}return i(t)}function ai(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function ri(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":rt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ni(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=i)return i}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function di(e,t,i,o=i){let a;return a="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:ni(e,i)||o,t&&(a=t(a,o,e)),a}function li(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:a}=e,r=e=>{if(null==e[t])return null;const r=e[t],n=ni(e.theme,o)||{};return oi(e,r,e=>{let o=di(n,a,e);return e===o&&"string"==typeof e&&(o=di(n,a,`${t}${"default"===e?"":ri(e)}`,e)),!1===i?o:{[i]:o}})};return r.propTypes="production"!==process.env.NODE_ENV?{[t]:Xt}:{},r.filterProps=[t],r}const si={m:"margin",p:"padding"},pi={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ci={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ui=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!ci[e])return[e];e=ci[e]}const[t,i]=e.split(""),o=si[t],a=pi[i]||"";return Array.isArray(a)?a.map(e=>o+e):[o+a]}),mi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ai=[...mi,...Ti];function _i(e,t,i,o){const a=ni(e,t,!0)??i;return"number"==typeof a||"string"==typeof a?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof a?a.startsWith("var(")&&0===e?0:a.startsWith("var(")&&1===e?a:`calc(${e} * ${a})`:a*e):Array.isArray(a)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=a[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof a?a:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function fi(e){return _i(e,"spacing",8,"spacing")}function Ii(e,t){return"string"==typeof t||null==t?t:e(t)}function Ei(e,t,i,o){if(!t.includes(i))return null;const a=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Ii(t,i),e),{})}(ui(i),o);return oi(e,e[i],a)}function Oi(e,t){const i=fi(e.theme);return Object.keys(e).map(o=>Ei(e,t,o,i)).reduce(Jt,{})}function Ni(e){return Oi(e,mi)}function yi(e){return Oi(e,Ti)}function hi(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(i=>{e[i]=t}),e),{}),i=e=>Object.keys(e).reduce((i,o)=>t[o]?Jt(i,t[o](e)):i,{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},i.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),i}function Ri(e){return"number"!=typeof e?e:`${e}px solid`}function Li(e,t){return li({prop:e,themeKey:"borders",transform:t})}Ni.propTypes="production"!==process.env.NODE_ENV?mi.reduce((e,t)=>(e[t]=Xt,e),{}):{},Ni.filterProps=mi,yi.propTypes="production"!==process.env.NODE_ENV?Ti.reduce((e,t)=>(e[t]=Xt,e),{}):{},yi.filterProps=Ti,"production"===process.env.NODE_ENV||Ai.reduce((e,t)=>(e[t]=Xt,e),{});const Ci=Li("border",Ri),gi=Li("borderTop",Ri),Di=Li("borderRight",Ri),Pi=Li("borderBottom",Ri),xi=Li("borderLeft",Ri),bi=Li("borderColor"),Mi=Li("borderTopColor"),Si=Li("borderRightColor"),Ui=Li("borderBottomColor"),Fi=Li("borderLeftColor"),wi=Li("outline",Ri),vi=Li("outlineColor"),Bi=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=_i(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Ii(t,e)});return oi(e,e.borderRadius,i)}return null};Bi.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Xt}:{},Bi.filterProps=["borderRadius"],hi(Ci,gi,Di,Pi,xi,bi,Mi,Si,Ui,Fi,Bi,wi,vi);const ki=e=>{if(void 0!==e.gap&&null!==e.gap){const t=_i(e.theme,"spacing",8,"gap"),i=e=>({gap:Ii(t,e)});return oi(e,e.gap,i)}return null};ki.propTypes="production"!==process.env.NODE_ENV?{gap:Xt}:{},ki.filterProps=["gap"];const ji=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=_i(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Ii(t,e)});return oi(e,e.columnGap,i)}return null};ji.propTypes="production"!==process.env.NODE_ENV?{columnGap:Xt}:{},ji.filterProps=["columnGap"];const Gi=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=_i(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Ii(t,e)});return oi(e,e.rowGap,i)}return null};Gi.propTypes="production"!==process.env.NODE_ENV?{rowGap:Xt}:{},Gi.filterProps=["rowGap"];function Wi(e,t){return"grey"===t?t:e}hi(ki,ji,Gi,li({prop:"gridColumn"}),li({prop:"gridRow"}),li({prop:"gridAutoFlow"}),li({prop:"gridAutoColumns"}),li({prop:"gridAutoRows"}),li({prop:"gridTemplateColumns"}),li({prop:"gridTemplateRows"}),li({prop:"gridTemplateAreas"}),li({prop:"gridArea"}));function Yi(e){return e<=1&&0!==e?100*e+"%":e}hi(li({prop:"color",themeKey:"palette",transform:Wi}),li({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Wi}),li({prop:"backgroundColor",themeKey:"palette",transform:Wi}));const Vi=li({prop:"width",transform:Yi}),qi=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||ei[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Yi(t)}};return oi(e,e.maxWidth,t)}return null};qi.filterProps=["maxWidth"];const Ki=li({prop:"minWidth",transform:Yi}),zi=li({prop:"height",transform:Yi}),Hi=li({prop:"maxHeight",transform:Yi}),Qi=li({prop:"minHeight",transform:Yi});li({prop:"size",cssProperty:"width",transform:Yi}),li({prop:"size",cssProperty:"height",transform:Yi});hi(Vi,qi,Ki,zi,Hi,Qi,li({prop:"boxSizing"}));const Zi={border:{themeKey:"borders",transform:Ri},borderTop:{themeKey:"borders",transform:Ri},borderRight:{themeKey:"borders",transform:Ri},borderBottom:{themeKey:"borders",transform:Ri},borderLeft:{themeKey:"borders",transform:Ri},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ri},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Bi},color:{themeKey:"palette",transform:Wi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Wi},backgroundColor:{themeKey:"palette",transform:Wi},p:{style:yi},pt:{style:yi},pr:{style:yi},pb:{style:yi},pl:{style:yi},px:{style:yi},py:{style:yi},padding:{style:yi},paddingTop:{style:yi},paddingRight:{style:yi},paddingBottom:{style:yi},paddingLeft:{style:yi},paddingX:{style:yi},paddingY:{style:yi},paddingInline:{style:yi},paddingInlineStart:{style:yi},paddingInlineEnd:{style:yi},paddingBlock:{style:yi},paddingBlockStart:{style:yi},paddingBlockEnd:{style:yi},m:{style:Ni},mt:{style:Ni},mr:{style:Ni},mb:{style:Ni},ml:{style:Ni},mx:{style:Ni},my:{style:Ni},margin:{style:Ni},marginTop:{style:Ni},marginRight:{style:Ni},marginBottom:{style:Ni},marginLeft:{style:Ni},marginX:{style:Ni},marginY:{style:Ni},marginInline:{style:Ni},marginInlineStart:{style:Ni},marginInlineEnd:{style:Ni},marginBlock:{style:Ni},marginBlockStart:{style:Ni},marginBlockEnd:{style:Ni},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ki},rowGap:{style:Gi},columnGap:{style:ji},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Yi},maxWidth:{style:qi},minWidth:{transform:Yi},height:{transform:Yi},maxHeight:{transform:Yi},minHeight:{transform:Yi},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const $i=function(){function e(e,t,i,o){const a={[e]:t,theme:i},r=o[e];if(!r)return{[e]:t};const{cssProperty:n=e,themeKey:d,transform:l,style:s}=r;if(null==t)return null;if("typography"===d&&"inherit"===t)return{[e]:t};const p=ni(i,d)||{};if(s)return s(a);return oi(a,t,t=>{let i=di(p,l,t);return t===i&&"string"==typeof t&&(i=di(p,l,`${e}${"default"===t?"":ri(t)}`,t)),!1===n?i:{[n]:i}})}return function t(i){const{sx:o,theme:a={},nested:r}=i||{};if(!o)return null;const n=a.unstable_sxConfig??Zi;function d(i){let o=i;if("function"==typeof i)o=i(a);else if("object"!=typeof i)return i;if(!o)return null;const d=function(e={}){const t=e.keys?.reduce((t,i)=>(t[e.up(i)]={},t),{});return t||{}}(a.breakpoints),l=Object.keys(d);let s=d;return Object.keys(o).forEach(i=>{const r=(d=o[i],l=a,"function"==typeof d?d(l):d);var d,l;if(null!=r)if("object"==typeof r)if(n[i])s=Jt(s,e(i,r,a,n));else{const e=oi({theme:a},r,e=>({[i]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(t);return e.every(e=>i.size===Object.keys(e).length)}(e,r)?s=Jt(s,e):s[i]=t({sx:r,theme:a,nested:!0})}else s=Jt(s,e(i,r,a,n))}),!r&&a.modularCssLayers?{"@layer sx":Zt(a,ai(l,s))}:Zt(a,ai(l,s))}return Array.isArray(o)?o.map(d):d(o)}}();function Xi(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function Ji(e=null){const t=pe.useContext(l.ThemeContext);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}$i.filterProps=["sx"];const eo=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:a,shape:r={},...n}=e,d=Qt(i),l=function(e=8,t=fi({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const i=t(e);return"number"==typeof i?`${i}px`:i}).join(" "));return i.mui=!0,i}(a);let s=Ht({breakpoints:d,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...$t,...r}},n);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const a=t(e.breakpoints.not(...i),o);return a.includes("not all and")?a.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):a}}const o={},a=e=>(i(o,e),o);return i(a),{...e,containerQueries:a}}(s),s.applyStyles=Xi,s=t.reduce((e,t)=>Ht(e,t),s),s.unstable_sxConfig={...Zi,...n?.unstable_sxConfig},s.unstable_sx=function(e){return $i({sx:e,theme:this})},s}();function to(e){const{sx:t,...i}=e,{systemProps:o,otherProps:a}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??Zi;return Object.keys(e).forEach(o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t})(i);let r;return r=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return Kt(i)?{...o,...i}:o}:{...o,...t},{...a,sx:r}}const io=e=>e,oo=(()=>{let e=io;return{configure(t){e=t},generate:t=>e(t),reset(){e=io}}})();function ao(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(i=ao(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function ro(){for(var e,t,i=0,o="",a=arguments.length;i<a;i++)(e=arguments[i])&&(t=ao(e))&&(o&&(o+=" "),o+=t);return o}const no={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const lo=function(e={}){const{themeId:i,defaultTheme:o,defaultClassName:a="MuiBox-root",generateClassName:r}=e,n=
|
|
23
|
+
*/function Wt(){return qt||(qt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case o:case n:case r:case d:case c:case h:return e;default:switch(e=e&&e.$$typeof){case s:case l:case p:case u:case a:return e;default:return m}}case i:return m}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");Gt.ContextConsumer=a,Gt.ContextProvider=s,Gt.Element=t,Gt.ForwardRef=l,Gt.Fragment=o,Gt.Lazy=p,Gt.Memo=u,Gt.Portal=i,Gt.Profiler=n,Gt.StrictMode=r,Gt.Suspense=d,Gt.SuspenseList=c,Gt.isContextConsumer=function(t){return e(t)===a},Gt.isContextProvider=function(t){return e(t)===s},Gt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Gt.isForwardRef=function(t){return e(t)===l},Gt.isFragment=function(t){return e(t)===o},Gt.isLazy=function(t){return e(t)===p},Gt.isMemo=function(t){return e(t)===u},Gt.isPortal=function(t){return e(t)===i},Gt.isProfiler=function(t){return e(t)===n},Gt.isStrictMode=function(t){return e(t)===r},Gt.isSuspense=function(t){return e(t)===d},Gt.isSuspenseList=function(t){return e(t)===c},Gt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===n||e===r||e===d||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===u||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||void 0!==e.getModuleId)},Gt.typeOf=e}()),Gt}function Ht(){return jt||(jt=1,"production"===process.env.NODE_ENV?Ut.exports=Bt():Ut.exports=Wt()),Ut.exports}var Yt=Ht();function Kt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Vt(e){if(ce.isValidElement(e)||Yt.isValidElementType(e)||!Kt(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=Vt(e[i])}),t}function zt(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return Kt(e)&&Kt(t)&&Object.keys(t).forEach(r=>{ce.isValidElement(t[r])||Yt.isValidElementType(t[r])?o[r]=t[r]:Kt(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&Kt(e[r])?o[r]=zt(e[r],t[r],i):i.clone?o[r]=Kt(t[r])?Vt(t[r]):t[r]:o[r]=t[r]}),o}function $t(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...r}=e,n=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(n);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function d(e,r){const n=a.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==n&&"number"==typeof t[a[n]]?t[a[n]]:r)-o/100}${i})`}return{keys:a,values:n,up:s,down:l,between:d,only:function(e){return a.indexOf(e)+1<a.length?d(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):d(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...r}}function Qt(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)});return i.length?i.reduce((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e},{...t}):t}const Zt={borderRadius:4},Jt="production"!==process.env.NODE_ENV?Dt.oneOfType([Dt.number,Dt.string,Dt.object,Dt.array]):{};function Xt(e,t){return t?zt(e,t,{clone:!1}):e}const ei={xs:0,sm:600,md:900,lg:1200,xl:1536},ti={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ei[e]}px)`},ii={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:ei[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function oi(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||ti;return t.reduce((o,r,n)=>(o[e.up(e.keys[n])]=i(t[n]),o),{})}if("object"==typeof t){const e=o.breakpoints||ti;return Object.keys(t).reduce((r,n)=>{if(a=e.keys,"@"===(s=n)||s.startsWith("@")&&(a.some(e=>s.startsWith(`@${e}`))||s.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:nt(18,`(${t})`));return null}const[,o,r]=i,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(n)}(o.containerQueries?o:ii,n);e&&(r[e]=i(t[n],n))}else if(Object.keys(e.values||ei).includes(n)){r[e.up(n)]=i(t[n],n)}else{const e=n;r[e]=t[e]}var a,s;return r},{})}return i(t)}function ri(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function ni(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ai(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=i)return i}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function si(e,t,i,o=i){let r;return r="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:ai(e,i)||o,t&&(r=t(r,o,e)),r}function li(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:r}=e,n=e=>{if(null==e[t])return null;const n=e[t],a=ai(e.theme,o)||{};return oi(e,n,e=>{let o=si(a,r,e);return e===o&&"string"==typeof e&&(o=si(a,r,`${t}${"default"===e?"":ni(e)}`,e)),!1===i?o:{[i]:o}})};return n.propTypes="production"!==process.env.NODE_ENV?{[t]:Jt}:{},n.filterProps=[t],n}const di={m:"margin",p:"padding"},ci={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ui={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pi=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!ui[e])return[e];e=ui[e]}const[t,i]=e.split(""),o=di[t],r=ci[i]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]}),hi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],fi=[...hi,...mi];function gi(e,t,i,o){const r=ai(e,t,!0)??i;return"number"==typeof r||"string"==typeof r?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof r?r.startsWith("var(")&&0===e?0:r.startsWith("var(")&&1===e?r:`calc(${e} * ${r})`:r*e):Array.isArray(r)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>r.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${i} > ${r.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=r[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof r?r:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Ti(e){return gi(e,"spacing",8,"spacing")}function Ai(e,t){return"string"==typeof t||null==t?t:e(t)}function Ii(e,t,i,o){if(!t.includes(i))return null;const r=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Ai(t,i),e),{})}(pi(i),o);return oi(e,e[i],r)}function yi(e,t){const i=Ti(e.theme);return Object.keys(e).map(o=>Ii(e,t,o,i)).reduce(Xt,{})}function _i(e){return yi(e,hi)}function Ei(e){return yi(e,mi)}function Oi(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(i=>{e[i]=t}),e),{}),i=e=>Object.keys(e).reduce((i,o)=>t[o]?Xt(i,t[o](e)):i,{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},i.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),i}function Ci(e){return"number"!=typeof e?e:`${e}px solid`}function Ni(e,t){return li({prop:e,themeKey:"borders",transform:t})}_i.propTypes="production"!==process.env.NODE_ENV?hi.reduce((e,t)=>(e[t]=Jt,e),{}):{},_i.filterProps=hi,Ei.propTypes="production"!==process.env.NODE_ENV?mi.reduce((e,t)=>(e[t]=Jt,e),{}):{},Ei.filterProps=mi,"production"===process.env.NODE_ENV||fi.reduce((e,t)=>(e[t]=Jt,e),{});const Ri=Ni("border",Ci),bi=Ni("borderTop",Ci),wi=Ni("borderRight",Ci),Pi=Ni("borderBottom",Ci),Si=Ni("borderLeft",Ci),vi=Ni("borderColor"),Li=Ni("borderTopColor"),Mi=Ni("borderRightColor"),xi=Ni("borderBottomColor"),Di=Ni("borderLeftColor"),ki=Ni("outline",Ci),Ui=Ni("outlineColor"),Fi=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=gi(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Ai(t,e)});return oi(e,e.borderRadius,i)}return null};Fi.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Jt}:{},Fi.filterProps=["borderRadius"],Oi(Ri,bi,wi,Pi,Si,vi,Li,Mi,xi,Di,Fi,ki,Ui);const Bi=e=>{if(void 0!==e.gap&&null!==e.gap){const t=gi(e.theme,"spacing",8,"gap"),i=e=>({gap:Ai(t,e)});return oi(e,e.gap,i)}return null};Bi.propTypes="production"!==process.env.NODE_ENV?{gap:Jt}:{},Bi.filterProps=["gap"];const qi=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=gi(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Ai(t,e)});return oi(e,e.columnGap,i)}return null};qi.propTypes="production"!==process.env.NODE_ENV?{columnGap:Jt}:{},qi.filterProps=["columnGap"];const ji=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=gi(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Ai(t,e)});return oi(e,e.rowGap,i)}return null};ji.propTypes="production"!==process.env.NODE_ENV?{rowGap:Jt}:{},ji.filterProps=["rowGap"];function Gi(e,t){return"grey"===t?t:e}Oi(Bi,qi,ji,li({prop:"gridColumn"}),li({prop:"gridRow"}),li({prop:"gridAutoFlow"}),li({prop:"gridAutoColumns"}),li({prop:"gridAutoRows"}),li({prop:"gridTemplateColumns"}),li({prop:"gridTemplateRows"}),li({prop:"gridTemplateAreas"}),li({prop:"gridArea"}));function Wi(e){return e<=1&&0!==e?100*e+"%":e}Oi(li({prop:"color",themeKey:"palette",transform:Gi}),li({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Gi}),li({prop:"backgroundColor",themeKey:"palette",transform:Gi}));const Hi=li({prop:"width",transform:Wi}),Yi=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||ei[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Wi(t)}};return oi(e,e.maxWidth,t)}return null};Yi.filterProps=["maxWidth"];const Ki=li({prop:"minWidth",transform:Wi}),Vi=li({prop:"height",transform:Wi}),zi=li({prop:"maxHeight",transform:Wi}),$i=li({prop:"minHeight",transform:Wi});li({prop:"size",cssProperty:"width",transform:Wi}),li({prop:"size",cssProperty:"height",transform:Wi});Oi(Hi,Yi,Ki,Vi,zi,$i,li({prop:"boxSizing"}));const Qi={border:{themeKey:"borders",transform:Ci},borderTop:{themeKey:"borders",transform:Ci},borderRight:{themeKey:"borders",transform:Ci},borderBottom:{themeKey:"borders",transform:Ci},borderLeft:{themeKey:"borders",transform:Ci},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ci},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fi},color:{themeKey:"palette",transform:Gi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Gi},backgroundColor:{themeKey:"palette",transform:Gi},p:{style:Ei},pt:{style:Ei},pr:{style:Ei},pb:{style:Ei},pl:{style:Ei},px:{style:Ei},py:{style:Ei},padding:{style:Ei},paddingTop:{style:Ei},paddingRight:{style:Ei},paddingBottom:{style:Ei},paddingLeft:{style:Ei},paddingX:{style:Ei},paddingY:{style:Ei},paddingInline:{style:Ei},paddingInlineStart:{style:Ei},paddingInlineEnd:{style:Ei},paddingBlock:{style:Ei},paddingBlockStart:{style:Ei},paddingBlockEnd:{style:Ei},m:{style:_i},mt:{style:_i},mr:{style:_i},mb:{style:_i},ml:{style:_i},mx:{style:_i},my:{style:_i},margin:{style:_i},marginTop:{style:_i},marginRight:{style:_i},marginBottom:{style:_i},marginLeft:{style:_i},marginX:{style:_i},marginY:{style:_i},marginInline:{style:_i},marginInlineStart:{style:_i},marginInlineEnd:{style:_i},marginBlock:{style:_i},marginBlockStart:{style:_i},marginBlockEnd:{style:_i},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Bi},rowGap:{style:ji},columnGap:{style:qi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wi},maxWidth:{style:Yi},minWidth:{transform:Wi},height:{transform:Wi},maxHeight:{transform:Wi},minHeight:{transform:Wi},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Zi=function(){function e(e,t,i,o){const r={[e]:t,theme:i},n=o[e];if(!n)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:d}=n;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const c=ai(i,s)||{};if(d)return d(r);return oi(r,t,t=>{let i=si(c,l,t);return t===i&&"string"==typeof t&&(i=si(c,l,`${e}${"default"===t?"":ni(t)}`,t)),!1===a?i:{[a]:i}})}return function t(i){const{sx:o,theme:r={},nested:n}=i||{};if(!o)return null;const a=r.unstable_sxConfig??Qi;function s(i){let o=i;if("function"==typeof i)o=i(r);else if("object"!=typeof i)return i;if(!o)return null;const s=function(e={}){const t=e.keys?.reduce((t,i)=>(t[e.up(i)]={},t),{});return t||{}}(r.breakpoints),l=Object.keys(s);let d=s;return Object.keys(o).forEach(i=>{const n=(s=o[i],l=r,"function"==typeof s?s(l):s);var s,l;if(null!=n)if("object"==typeof n)if(a[i])d=Xt(d,e(i,n,r,a));else{const e=oi({theme:r},n,e=>({[i]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(t);return e.every(e=>i.size===Object.keys(e).length)}(e,n)?d=Xt(d,e):d[i]=t({sx:n,theme:r,nested:!0})}else d=Xt(d,e(i,n,r,a))}),!n&&r.modularCssLayers?{"@layer sx":Qt(r,ri(l,d))}:Qt(r,ri(l,d))}return Array.isArray(o)?o.map(s):s(o)}}();function Ji(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function Xi(e=null){const t=ce.useContext(l.ThemeContext);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}Zi.filterProps=["sx"];const eo=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:r,shape:n={},...a}=e,s=$t(i),l=function(e=8,t=Ti({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const i=t(e);return"number"==typeof i?`${i}px`:i}).join(" "));return i.mui=!0,i}(r);let d=zt({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...Zt,...n}},a);return d=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const r=t(e.breakpoints.not(...i),o);return r.includes("not all and")?r.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):r}}const o={},r=e=>(i(o,e),o);return i(r),{...e,containerQueries:r}}(d),d.applyStyles=Ji,d=t.reduce((e,t)=>zt(e,t),d),d.unstable_sxConfig={...Qi,...a?.unstable_sxConfig},d.unstable_sx=function(e){return Zi({sx:e,theme:this})},d}();function to(e){const{sx:t,...i}=e,{systemProps:o,otherProps:r}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??Qi;return Object.keys(e).forEach(o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t})(i);let n;return n=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return Kt(i)?{...o,...i}:o}:{...o,...t},{...r,sx:n}}const io=e=>e,oo=(()=>{let e=io;return{configure(t){e=t},generate:t=>e(t),reset(){e=io}}})();function ro(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(i=ro(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function no(){for(var e,t,i=0,o="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=ro(e))&&(o&&(o+=" "),o+=t);return o}const ao={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const so=function(e={}){const{themeId:i,defaultTheme:o,defaultClassName:r="MuiBox-root",generateClassName:n}=e,a=
|
|
24
24
|
/**
|
|
25
25
|
* @mui/styled-engine v7.3.1
|
|
26
26
|
*
|
|
@@ -28,11 +28,139 @@ object-assign
|
|
|
28
28
|
* This source code is licensed under the MIT license found in the
|
|
29
29
|
* LICENSE file in the root directory of this source tree.
|
|
30
30
|
*/
|
|
31
|
-
function(e,t){const i=re(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})($i),d=pe.forwardRef(function(e,d){const l=function(e=eo){return Ji(e)}(o),{className:s,component:p="div",...c}=to(e);return t.jsx(n,{as:p,ref:d,className:ro(s,r?r(a):a),theme:i&&l[i]||l,...c})});return d}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=no[t];return o?`${i}-${o}`:`${oo.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:oo.generate});function so(e){return"number"==typeof e&&!isNaN(e)}function po(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function co(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function uo(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function mo(e,t){const i=new Date(e),o=new Date,a=Math.floor((i-o)/1e3),r="rtl"===t?"ar":"en",n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}),d=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:t}of d){const i=Math.floor(a/t);if(Math.abs(i)>1)return n.format(i,e)}return"ar"===r?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(lo.propTypes={children:Ft.node,component:Ft.elementType,sx:Ft.oneOfType([Ft.arrayOf(Ft.oneOfType([Ft.func,Ft.object,Ft.bool])),Ft.func,Ft.object])});const To=e=>{if(e?.fieldInfo){const i=e.fieldInfo,o=e?.formManager||null,a=e?.formActions||null,r=e?.formValues||null,n=e?.fieldInfo?.fieldName||null,l=e?.fieldInfo?.fieldType||null;if(!(i&&o&&r&&n&&l))return t.jsx(t.Fragment,{});const s=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(r):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(n)?t.jsx(t.Fragment,{}):t.jsx(d.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?t.jsx(Fe,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),label:s(),value:r[n],onChange:t=>{let i=null;""!=t.target.value&&(i="number"===l&&po(t.target.value)?Number(t.target.value):t.target.value),o.setValue(n,i),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,i)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style},error:null!=o.formState.errors[n],helperText:o?.formState?.errors[n]?.message?.toString()}):"date"===i?.fieldType?t.jsx(ze,{format:i?.dateFormat||Ge,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),label:s(),onChangeCallBack:t=>{o.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"datetime"===i?.fieldType?t.jsx(He,{format:i?.dateFormat||We,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),label:s(),onChangeCallBack:t=>{o.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"checkbox"===i?.fieldType?t.jsx(ke,{label:s(),onChangeCallBack:t=>{o.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t)},value:r[n],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),sx:i?.formProps?.style}):"combobox"===i?.fieldType?t.jsx(je,{sx:i?.formProps?.style||{width:"100%"},label:s(),disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(t,i)=>{let d=null;t&&(d=t),o.setValue(n,d),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t,i)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"lookup"===i?.fieldType?t.jsx(Qe,{sx:i?.formProps?.style||{width:"100%"},label:s(),disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(t,i)=>{let d=null;t&&(d=t),o.setValue(n,d),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t,i)},lookupType:i.lookupType,value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):null})}return t.jsx(t.Fragment,{})},Ao=e=>{const i=De(),{ConfirmationWindow:o,setOpen:a}=ge({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||i.isUserAuthorized(e.authority)?t.jsxs(t.Fragment,{children:[t.jsx(o,{}),t.jsxs(d.Button,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?a(!0):e?.actionFn(e.record)}},children:[e?.icon?t.jsx(T.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx("div",{children:e?.label})]})]}):t.jsx(t.Fragment,{})},_o=e=>{const{t:i}=E.useTranslation();return t.jsx(t.Fragment,{children:t.jsxs(d.Grid2,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?t.jsx(d.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),t.jsx("div",{children:i(e.label)})]}):t.jsx(t.Fragment,{children:i(e.label)})}):t.jsx(t.Fragment,{}),e?.elements?e.elements.map(i=>"group"===i.type?t.jsx(_o,{...i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"props"===i.mode?t.jsx(To,{fieldInfo:i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"node"===i.mode?t.jsx(d.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?t.jsx(d.Grid2,{size:{sm:12},sx:{padding:1},children:e.actions.map(i=>t.jsx(Ao,{...i,record:e.formValues}))}):t.jsx(t.Fragment,{})]})})},fo=e=>{const o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),[a,r]=s.useState(null);return s.useEffect(()=>{(()=>{let t=o+"/api/v1/attachment/";e?.attachmentId?t+="download?attachmentId="+e.attachmentId:(t+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(t+=`&category=${e.category}`)),r(t)})()},[e]),e?.showAsAvatar?t.jsx(d.Avatar,{sx:e.style,onError:()=>{r(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:a}):t.jsx("img",{src:a,loading:"lazy",alt:"image",onError:()=>{r(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Io=e=>{const{handleGetRequest:i,handleDeleteRequest:o}=Ce(),{isUserAuthorized:a}=De();let r=!0;e?.downloadAuthorityKey&&(r=a(e.downloadAuthorityKey));const{ConfirmationWindow:n,setOpen:l}=ge({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await o({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return t.jsxs(t.Fragment,{children:[t.jsx(n,{}),t.jsxs(L,{sx:{width:300,border:"0.5px solid gray"},children:[t.jsx(v,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?t.jsx(fo,{attachmentId:e.id}):t.jsx(T.FontAwesomeIcon,{icon:"file",size:"3x"})}),t.jsxs(w,{children:[t.jsx(B,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),t.jsxs(F,{children:[e?.allowDelete?t.jsx(d.IconButton,{size:"small",onClick:()=>{l(!0)},children:t.jsx(d.Tooltip,{title:"Delete Attachment",children:t.jsx(T.FontAwesomeIcon,{icon:"trash"})})}):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),r?t.jsx(d.IconButton,{size:"small",onClick:async()=>{await i({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const i=window.URL.createObjectURL(new Blob([t.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",e.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:t.jsx(d.Tooltip,{title:"Download Attachment",children:t.jsx(T.FontAwesomeIcon,{icon:"download"})})}):t.jsx(t.Fragment,{})]})]})]})},Eo=e=>{const{handleUploadRequest:i,handleGetRequest:o}=Ce(),[a,r]=s.useState(null),[n,l]=s.useState([]),[p,c]=s.useState(null),[u,m]=s.useState(null),[A,f]=s.useState([]),[I,E]=s.useState(null),{isUserAuthorized:O}=De(),N=e=>e.split(".").pop()?.toLowerCase()||"";s.useEffect(()=>{(async()=>{await o({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{E(e.data)}})})()},[e.refKey,e.attachmentCode]),s.useEffect(()=>{if(f(I?.allowedFileTypes?I.allowedFileTypes.split(","):[]),I?.attachmentCategories){const e=[];for(const t of I.attachmentCategories.split(","))e.push({value:t});l(e)}else l([])},[I]);let y=!0;I?.downloadAuthorityKey&&!O(I?.downloadAuthorityKey)&&(y=!1);let h=!0;return!1===e?.enableAttachment&&(h=!1),I?.uploadAuthorityKey&&!O(I.uploadAuthorityKey)&&(h=!1),t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[h?t.jsx(t.Fragment,{children:null==I?.maxAllowedNumberOfFiles||I?.maxAllowedNumberOfFiles>I.refKeyAttachments.length?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(T.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),t.jsx("input",{type:"file",style:{margin:20},accept:I?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=N(t.name);if(A.length>0&&!A.includes(e))return void _.toast.error(e+" is not allowed")}r(e.target.files)}}),n.length>0?t.jsx(je,{label:"Attachment Type",sx:{width:300,m:1},options:n,displayField:"value",valueField:"value",value:u,onChangeCallBack:e=>{m(e)}}):t.jsx(t.Fragment,{}),t.jsx(Fe,{label:"Remark",value:p,onChange:e=>c(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),t.jsx(d.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let t=I?.refKeyAttachments.length||0;if(I?.maxAllowedNumberOfFiles&&a.length+t>I.maxAllowedNumberOfFiles)_.toast.error("Maximum number of attachments is "+I.maxAllowedNumberOfFiles);else if(!0===I?.isCategoryRequired&&n.length>0&&(null==u||void 0===u||""===u))_.toast.error("You must selected document type to process your request");else if(a){for(const e of a)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void _.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await i({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:p,category:u},files:a,successCallBkFn:e=>{E(e.data),r(null),m(null),c(null),_.toast.success("Your request has been process successfully")}})}else _.toast.error("You must add files to upload")},children:"Upload"})]}):t.jsx(t.Fragment,{})}):t.jsx(t.Fragment,{}),y&&I?.refKeyAttachments?.length>0?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),t.jsx(d.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:I?.refKeyAttachments.map(i=>t.jsx(d.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:t.jsx(Io,{...i,attachmentCode:e.attachmentCode,setAttachmentConfig:E,downloadAuthorityKey:I.downloadAuthorityKey,allowDelete:h})}))})]}):t.jsx(t.Fragment,{})]})},Oo=e=>{const o=i.useSelector(e=>e.AppLayout),{t:a}=E.useTranslation();return t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(d.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(T.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),a("WF_ACTION_HISTORY_LABEL")]}),t.jsx(d.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,a)=>t.jsx(t.Fragment,{children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[t.jsxs(d.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[t.jsx(d.Box,{sx:{marginBottom:.2},children:i.actionTime}),t.jsxs(B,{children:["via ",i.actionMethod]})]}),t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[t.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId+""||"0",style:{m:1,width:70,height:70}}),a!==e.actionHistory.length-1?t.jsx(d.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):t.jsx(t.Fragment,{})]}),t.jsxs(d.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsxs(d.Box,{sx:{width:"100%"},children:["ltr"===o.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),t.jsx(d.Box,{sx:{width:"100%"},children:"ltr"===o.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},No=e=>{const{t:i}=E.useTranslation(),o=De(),{ConfirmationWindow:a,setOpen:r}=ge({body:i(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let n=!0;if(e.authority&&(n=o.isUserAuthorized(e.authority)),n)return t.jsxs(t.Fragment,{children:[t.jsx(a,{}),t.jsxs(d.Button,{onClick:async()=>{if(e?.recordsToProcessActionOn&&e?.recordsToProcessActionOn.length>0){if(e?.preActionValidation)for(const t of e.recordsToProcessActionOn)if(!e.preActionValidation(t))return;!0===e?.isConfirmationRequired?r(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else _.toast.error(i("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:e?.label?"outlined":e?.formActionProps?.actionButtonVariant?e.formActionProps.actionButtonVariant:"text",size:"small",color:e?.formActionProps?.actionButtonColor||"primary",children:[e?.icon?t.jsx(T.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:e.icon}):t.jsx(t.Fragment,{}),e?.label?i(e.label):t.jsx(t.Fragment,{})]})]})},yo=d.styled(e.QuickFilter)({display:"grid",alignItems:"center"}),ho=d.styled(e.ToolbarButton)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Ro=d.styled(d.TextField)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),Lo=i=>{const{t:o}=E.useTranslation(),a=De(),r=!i?.templateProps?.editAction?.authority||a.isUserAuthorized(i.templateProps.editAction.authority),n=at(i?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},i?.templateProps?.data||[],i?.templateProps?.keyColumnName||"id");return t.jsxs(e.Toolbar,{children:[r&&"none"!=i?.templateProps?.editMode?.editMode?t.jsxs(d.Button,{onClick:i?.handleCreateNewRecord,children:[t.jsx(T.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),o("ADD_BTN_LABEL")]}):t.jsx(t.Fragment,{}),i?.templateProps?.rowActions?i.templateProps.rowActions.map((e,t)=>!0===e?.gridActionProps?.multiRecord?s.createElement(No,{...e,key:t,reloadData:async()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:n.selectedRecordIds,recordsToProcessActionOn:n.selectedRecords}):null):t.jsx(t.Fragment,{}),t.jsx(d.Box,{sx:{flex:1,mx:.5,my:.5,padding:1},children:i?.templateProps?.tBar}),t.jsx(d.Tooltip,{title:"Columns",children:t.jsx(e.ColumnsPanelTrigger,{render:t.jsx(e.ToolbarButton,{}),children:t.jsx(e.GridViewColumnIcon,{fontSize:"small"})})}),t.jsx(d.Tooltip,{title:"Filters",children:t.jsx(e.FilterPanelTrigger,{render:(i,o)=>t.jsx(e.ToolbarButton,{...i,color:"default",children:t.jsx(d.Badge,{badgeContent:o.filterCount,color:"primary",variant:"dot",children:t.jsx(e.GridFilterListIcon,{fontSize:"small"})})})})}),i?.templateProps?.gridStateKey?t.jsx(d.Tooltip,{title:o("RESET_GRID_STATE"),children:t.jsx(d.IconButton,{onClick:i?.clearGridState,children:t.jsx(T.FontAwesomeIcon,{icon:"eraser"})})}):t.jsx(t.Fragment,{}),t.jsx(d.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),t.jsx(d.Tooltip,{title:o("EXPORT_EXECL_LABEL"),children:t.jsx(e.ExportExcel,{render:t.jsx(d.MenuItem,{}),children:t.jsx(T.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),t.jsxs(yo,{children:[t.jsx(e.QuickFilterTrigger,{render:(e,i)=>t.jsx(d.Tooltip,{title:o("SEARCH_BTN_LABEL"),enterDelay:0,children:t.jsx(ho,{...e,ownerState:{expanded:i.expanded},color:"default","aria-disabled":i.expanded,children:t.jsx(T.FontAwesomeIcon,{icon:"search"})})})}),t.jsx(e.QuickFilterControl,{render:({ref:i,...a},r)=>t.jsx(Ro,{...a,ownerState:{expanded:r.expanded},inputRef:i,"aria-label":"Search",placeholder:`${o("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:t.jsx(d.InputAdornment,{position:"start",children:t.jsx(T.FontAwesomeIcon,{icon:"search"})}),endAdornment:r.value?t.jsx(d.InputAdornment,{position:"end",children:t.jsx(e.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:t.jsx(T.FontAwesomeIcon,{icon:"xmark"})})}):null,...a.slotProps?.input},...a.slotProps}})})]}),t.jsx(d.IconButton,{onClick:()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},children:t.jsx(T.FontAwesomeIcon,{icon:"refresh"})})]})},Co=i=>{const{t:o}=E.useTranslation(),a=De(),{ConfirmationWindow:r,setOpen:n}=ge({body:o(i?.confirmationMessage||"ACTION_CONFIRMATION"),title:o("CONFIRMATION"),onConfirmationCallBk:async()=>{await(i?.actionFn(i.record)),i?.reloadData&&i.reloadData()}});let l=!0;i.authority&&(l=a.isUserAuthorized(i.authority));let s={};i?.getActionIconStyleForRecord&&(s=i.getActionIconStyleForRecord(i.record));let p=!0;i?.isActionVisibleForRecord&&(p=i?.isActionVisibleForRecord(i.record));let c=!1;if(i?.isActionDisabledForRecord&&(c=i.isActionDisabledForRecord(i.record)),l&&p)return t.jsxs(t.Fragment,{children:[t.jsx(r,{}),t.jsx(e.GridActionsCellItem,{disabled:c,icon:t.jsx(d.Tooltip,{title:i?.label?o(i.label):"",children:t.jsx(T.FontAwesomeIcon,{icon:i.icon,style:{...s,color:c?"gray":null!=s?.color?s.color:void 0}})}),showInMenu:i?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!c){if(i?.preActionValidation&&!i.preActionValidation(i.record))return;!0===i?.isConfirmationRequired?n(!0):(await i.actionFn(i.record),!0===i?.gridActionProps?.reloadGridAfterAction&&i?.reloadData&&i.reloadData())}}})]})};let go=-1;const Do=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Po=(e,t)=>{const i=Do(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},xo=["__check__","actions"],bo=o=>{const{t:a}=E.useTranslation(),r=i.useSelector(e=>e.AppLayout),[n,l]=s.useState({}),[p,c]=s.useState(!0),{getLookupOptions:u}=(()=>{const{handleGetRequest:e}=Ce(),t=i.useSelector(e=>e.AppLayout),o=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let i=await o(e.lookupType);return{...e,options:i,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),{Window:m,setWindowState:A}=Pe({windowTitle:a(o.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),{Window:f,setWindowState:I}=Pe({windowTitle:a(o.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),[O,y]=s.useState([]),R=tt(o.formElements),L=[],C=s.useMemo(()=>o?.gridStateKey?Do(o.gridStateKey):{},[]);for(const e of R)!0===e?.gridProps?.hidden&&L.push(e.fieldName);let g={};if(C?.columnVisibilityModel){g=C.columnVisibilityModel;const e=Object.keys(g);for(const t of L)e.includes(t)||(g[t]=!1)}else for(const e of L)g[e]=!1;const D=i.useSelector(e=>e.AppLayout.appDirection),[P,x]=s.useState(g),[b,M]=s.useState(C.columnOrder||[]),[S,U]=s.useState(C.columnWidths||{}),[F,w]=s.useState(C.columnGroupingModel||[]);let v=C?.pinnedColumns?.left||[];v=v.filter(e=>!xo.includes(e));let B=C?.pinnedColumns?.right||[]||[];B=B.filter(e=>!xo.includes(e));const[k,j]=s.useState({left:[..."ltr"===D?xo:[],...v],right:[..."rtl"===D?xo:[],...B]}),G=De(),W=N.useNavigate(),[Y,V]=s.useState(null),[q,K]=s.useState(null),[z,H]=s.useState({}),Q=async()=>{let e=it(R,"row"===o?.editMode?.editMode||!1,a);for(let t of e)t?.lookupType&&(t.displayField="ltr"===r.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await u(t.lookupType),t.valueField="lookupValue");y(e)},[Z,$]=s.useState({ids:new Set,type:"include"});let X="id";o?.keyColumnName&&(X=o?.keyColumnName);const J=o.setData;let ee=null;ee=o?.validationSchema?o.validationSchema:h.z.object(ot(R));let te=!0;o?.editAction?.authority&&(te=G.isUserAuthorized(o.editAction.authority));let ie=!0;o?.deleteAction?.authority&&(ie=G.isUserAuthorized(o.deleteAction.authority));const{ConfirmationWindow:oe,setOpen:ae}=ge({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;Y&&!0===Y?.isNew||(e=await o.apiActions.deleteRecordById(Y[X])),e&&(o?.deleteAction?.postActionCallBack&&await o.deleteAction.postActionCallBack(Y),J(e=>e.filter(e=>e[X]!=Y[X])))}});let re,ne,de,le,se,pe;"modal"===o?.editMode?.editMode&&(re=o?.editMode?.specs?.modalHeight||"fit-content",ne=o?.editMode?.specs?.modalWidth||"300",de=o?.editMode?.specs?.modalMinHeight,le=o?.editMode?.specs?.modalMinWidth,se=o?.editMode?.specs?.modalIcon||"window",pe=o?.editMode?.specs?.modalTitle||"Record Form");const{Window:ce,setWindowState:ue}=Pe({height:re,minHeight:de,minWidth:le,onCloseCallBack:()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},width:ne,windowIcon:se,windowTitle:pe}),me={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(o?.rowActions?30*o.rowActions.length:0)+(o?.editAction&&o?.editAction?.isEnabled?30:0)+(o?.deleteAction&&o?.deleteAction?.isEnabled?30:0)+(o?.attachment?30:0)+(o?.workFlowDocumentCode?30:0),getActions:i=>{const r=i.row,n=[];if("none"!=o?.editMode?.editMode&&(void 0===o?.disableDefaultAction||!o.disableDefaultAction)){const i=z[r[X]]?.mode===e.GridRowModes.Edit;if("row"===o.editMode.editMode&&i)te&&(n.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(T.FontAwesomeIcon,{icon:"save"}),label:a("SAVE_BTN_LABEL"),onClick:()=>{(t=>{const i=t[X];H({...z,[i]:{mode:e.GridRowModes.View}})})(r)}})),n.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(T.FontAwesomeIcon,{icon:"cancel"}),label:a("CANCEL_BTN_LABEL"),onClick:()=>{(t=>{const i=t[X];i&&so(i)&&i<0?(H({...z,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}}),J(e=>{const t=e.filter(e=>e[X]!=i);return t})):H({...z,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}})})(r)},color:"inherit"})));else{if(o?.editAction&&!0===o?.editAction?.isEnabled){let i=!0;o?.editAction?.isActionVisibleForRecord&&(i=o?.editAction?.isActionVisibleForRecord(r));let l=!1;o?.editAction?.isActionDisabledForRecord&&(l=o?.editAction?.isActionDisabledForRecord(r)),te&&i&&n.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(d.Tooltip,{title:a("EDIT_BTN_LABEL"),children:t.jsx(T.FontAwesomeIcon,{icon:"edit",style:{color:l?"gray":void 0}})}),showInMenu:o?.editAction?.gridActionProps?.showInMenu||!1,label:a("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{te&&!l&&(async t=>{if(t)if(K(t),"form"===o.editMode.editMode)W(o.editMode.specs.formRoute+"/"+t[X]);else if("modal"===o.editMode.editMode)ue(!0);else if("row"===o?.editMode?.editMode){const i=t[X];H({...z,[i]:{mode:e.GridRowModes.Edit}})}})(r)}}))}if(o?.deleteAction&&!0===o?.deleteAction?.isEnabled){let i=!0;o?.deleteAction?.isActionVisibleForRecord&&(i=o?.deleteAction?.isActionVisibleForRecord(r));let l=!1;o?.deleteAction?.isActionDisabledForRecord&&(l=o?.deleteAction?.isActionDisabledForRecord(r)),ie&&i&&n.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(d.Tooltip,{title:a("DELETE_BTN_LABEL"),children:t.jsx(T.FontAwesomeIcon,{icon:"trash",style:{color:l?"gray":void 0}})}),showInMenu:o?.deleteAction?.gridActionProps?.showInMenu||!1,label:a("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ie&&!l){if(o?.deleteAction?.preActionValidation&&!o.deleteAction.preActionValidation(r))return;V(r),ae(!0)}}}))}}}if(r[o?.keyColumnName||"id"]&&r[o?.keyColumnName||"id"]>0&&o?.attachment&&n?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(d.Tooltip,{title:"Attachments",children:t.jsx(T.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{l(r),c(!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(r)),A(!0)}})),r[o?.keyColumnName||"id"]&&r[o?.keyColumnName||"id"]>0&&o?.workFlowDocumentCode&&n?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(d.Tooltip,{title:"Approvals",children:t.jsx(T.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{l(r),I(!0)}})),r[o?.keyColumnName||"id"]&&r[o?.keyColumnName||"id"]>0&&o?.rowActions)for(const e of o.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||n.push(t.jsx(Co,{...e,record:r,reloadData:async()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}}));return n}};let Te=[];(void 0===o?.disableDefaultAction||!o.disableDefaultAction||o?.rowActions&&o?.rowActions.length>0)&&Te.push(me),Te=[...Te,...O];s.useEffect(()=>{void 0!==o?.autoLoad&&!0!==o.autoLoad||o.apiActions.reloadData(o?.gridLoadParametersValues),Q()},[]),s.useEffect(()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},[G.UserInfo?.currentOrganization]),s.useEffect(()=>{Q()},[D,o.formElements]);const Ae=s.useMemo(()=>{const e=Te.map(e=>({...e}));if(b.length){const t=new Map(e.map(e=>[e.field,e]));return b.map(e=>t.get(e)).filter(Boolean)}return e},[b,S,Te]);return t.jsxs(t.Fragment,{children:[t.jsx(oe,{}),"modal"===o?.editMode?.editMode?t.jsx(ce,{children:o?.editMode?.specs?.formComponent?t.jsx(o.editMode.specs.formComponent,{recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)}}):t.jsx(vo,{keyColumnName:o.keyColumnName,attachment:o.attachment,formValuesChangeCallBk:o?.formProps?.formValuesChangeCallBk,recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)},elements:o.formElements,apiActions:o.apiActions,editAuthorityKey:o?.editAction?.authority,formSavedSuccessfullyCallBk:o?.editAction?.postActionCallBack,preSaveValidation:o?.editAction?.preActionValidation,actions:o?.rowActions})}):t.jsx(t.Fragment,{}),void 0!==o?.hideInfoBar||o?.hideInfoBar?t.jsx(t.Fragment,{}):t.jsxs(d.Box,{sx:{display:"flex"},children:[void 0!==o?.hideBackButton||o?.hideBackButton?t.jsx(t.Fragment,{}):t.jsx(d.IconButton,{onClick:()=>{W(-1,{replace:!0})},children:t.jsx(T.FontAwesomeIcon,{icon:"ltr"===D?"arrow-left":"arrow-right"})}),t.jsxs(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[o?.girdIcon?t.jsx(T.FontAwesomeIcon,{icon:o.girdIcon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx(d.Typography,{variant:"h5",children:o?.gridTitle?co(a(o?.gridTitle)):""})]})]}),o?.gridLoadParameters&&o?.gridLoadParameters.length>0&&o?.gridLoadParametersValues&&o?.setGridLoadParametersValues?t.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(d.AccordionSummary,{expandIcon:t.jsx(e.GridExpandMoreIcon,{}),children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(T.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(d.Typography,{component:"span",children:"Filters"})]})}),t.jsx(d.AccordionDetails,{children:t.jsx(d.Box,{children:t.jsx(vo,{saveButtonSpecs:{label:a("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:a("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?o.setGridLoadParametersValues(e):o.setGridLoadParametersValues({}),o.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o.gridLoadParameters})})})]}):t.jsx(t.Fragment,{}),o?.attachment?t.jsx(m,{children:t.jsx(Eo,{attachmentCode:o.attachment.attachmentCode,refKey:n[o?.keyColumnName||"id"],enableAttachment:p})}):t.jsx(t.Fragment,{}),o?.workFlowDocumentCode?t.jsx(f,{children:t.jsx(wo,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:n[o?.keyColumnName||"id"],postActionCallBk:()=>{I(!1),o.apiActions.reloadData(o.gridLoadParametersValues)},cancelActionCallBk:()=>{I(!1),o.apiActions.reloadData(o.gridLoadParametersValues)}})}):t.jsx(t.Fragment,{}),t.jsx(e.DataGridPremium,{...o?.muiProps,slots:{toolbar:Lo},slotProps:{toolbar:{templateProps:{...o,rowSelectionModel:Z,data:o?.data},handleCreateNewRecord:()=>{if("form"===o?.editMode?.editMode)W(o.editMode.specs.formRoute);else if("modal"===o?.editMode?.editMode)K(null),ue(!0);else if("row"===o?.editMode?.editMode){go-=1;const t={};t[X]=go,t.isNew=!0;for(const e of O)"actions"!=e?.type&&e?.field!=X&&e?.field&&(t[e.field]=null);J(e=>[t,...e]),H(t=>({...t,[go]:{mode:e.GridRowModes.Edit}}))}},clearGridState:()=>{o?.gridStateKey&&localStorage.removeItem(o.gridStateKey),x({}),M([]),U({}),w([]),j({left:[..."ltr"===D?xo:[]],right:[..."rtl"===D?xo:[]]})}}},getRowId:e=>e[X],showToolbar:!0,rows:o?.data,columns:Ae,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==o.editMode.editMode?z:void 0,onRowModesModelChange:"row"==o.editMode.editMode?e=>{H(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async e=>{if("row"===o.editMode.editMode){let i=null;const a=(e=>{try{ee.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof h.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(e);if(a){const e=a.split(",");throw _.toast.error(t.jsx("div",{style:{},children:e.map(e=>t.jsxs(t.Fragment,{children:[t.jsx("div",{children:e}),t.jsx(d.Divider,{})]}))})),new Error(a)}if(o?.editAction?.preActionValidation&&!o.editAction.preActionValidation(e))throw new Error("error on the configured presave validation");const r={...e};if(e[X]&&so(e[X])&&Number(e[X])<0&&(r[X]=null),i=await o.apiActions.saveRecord(r),null==i)throw new Error("Failed to process your request, contact your administrator");return o?.editAction?.postActionCallBack&&await o.editAction.postActionCallBack(e),!0===e?.isNew&&J(t=>{const o=t.filter(t=>t[X]!==e[X]);return[i,...o]}),!0===o?.editMode?.reloadAfterSave&&o?.apiActions?.reloadData&&o?.apiActions?.reloadData(o?.gridLoadParametersValues),i}},rowSelectionModel:Z,onRowSelectionModelChange:e=>{$(e)},columnVisibilityModel:P,onColumnVisibilityModelChange:e=>{x(e),o?.gridStateKey&&Po(o.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:i}=e;M(e=>{const a=e.length?[...e]:Te.map(e=>e.field),r=a.indexOf(t.field);return-1===r||(a.splice(r,1),a.splice(i,0,t.field),o?.gridStateKey&&Po(o.gridStateKey,{columnOrder:a})),a})},rowGroupingModel:F,onRowGroupingModelChange:e=>{(e=>{w(e),o?.gridStateKey&&Po(o.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},Mo=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},So=e=>{const[i,o]=s.useState([]);return s.useEffect(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));o(t)},[e.reportData]),t.jsx(bo,{data:i,disableDefaultAction:!0,setData:e.setReportData,formElements:Mo(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,keyColumnName:"report_record_data_key",hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})},Uo=e=>{console.log("useParameterPanel","useParameterPanel called");const[i,o]=s.useState({...e?.initialParameterValues}),a=((e,t)=>{const i=[];for(const o of e){const e={type:"field",mode:"props",props:{fieldLabel:o?.parameterLabel,fieldName:o?.parameterCode,fieldType:o?.parameterType,hidden:o?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:o?.mandatory,defaultValue:t[o?.parameterCode]||o?.defaultValue}};i.push(e)}return i})(e.parameters,i);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:r}=E.useTranslation();return t.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(d.AccordionSummary,{expandIcon:t.jsx(T.FontAwesomeIcon,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(T.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(d.Typography,{component:"span",children:"Filters"})]})}),t.jsx(d.AccordionDetails,{children:t.jsx(d.Box,{children:t.jsx(vo,{saveButtonSpecs:{label:r("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:r("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:r("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{o({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{o(null!=t?t:{}),e&&await e(i)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:a})})})]})},parametersValues:i,setParametersValues:o,panelElements:a}},Fo=e=>{const[i,o]=s.useState(null),[a,r]=s.useState(null),[n,l]=s.useState([]),[p,c]=s.useState("WAITING_REPORT_CODE"),{handleGetRequest:u,handlePostRequest:m,HandleDownloadHTTPPostPDF:A}=Ce(),[_,f]=s.useState(null),{ParameterPanel:I,parametersValues:E,panelElements:O,setParametersValues:N}=Uo({parameters:_?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}}),y=async t=>{c("WAITING_RESULT"),"Excel"===_?.reportType?await m({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),l(e.data)}}):_?.reportType&&await A({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),c("ERROR")}})};return s.useEffect(()=>{e?.reportCode&&(async()=>{c("LOADING_METADATA"),await u({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:t=>{f(t.data),!0===e?.byPassParameterEntry||0==t.data.reportParameters.length?(y(E),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),t.jsxs(t.Fragment,{children:[t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[t.jsxs(d.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[t.jsx(T.FontAwesomeIcon,{icon:"Excel"===_?.reportType?"file-excel":"file-pdf",color:"Excel"===_?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),_?.reportName]}),"Excel"!=_?.reportType&&"SHOWING_RESULT"===p?t.jsxs(t.Fragment,{children:[!0===e?.byPassParameterEntry?t.jsx(t.Fragment,{}):_?.reportParameters.length>0?t.jsx(d.IconButton,{onClick:()=>{c("WAITING_PARAMETER_INPUT")},children:t.jsx(T.FontAwesomeIcon,{icon:"filter"})}):t.jsx(t.Fragment,{}),t.jsx(d.IconButton,{children:t.jsx(T.FontAwesomeIcon,{icon:"refresh",onClick:()=>{y(E)}})})]}):t.jsx(t.Fragment,{})]}),t.jsx(d.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=_?.reportType?t.jsx(I,{searchBtnClickCallBk:y}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===_?.reportType?"Excel"===_?.reportType?t.jsx(So,{reportData:n,setReportData:l,reloadReport:async()=>{y(E)},gridLoadParameters:O,gridLoadParametersValues:E,setGridLoadParametersValues:N}):t.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?t.jsxs(d.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[t.jsx(T.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),a]}):t.jsx(t.Fragment,{})})]})},wo=e=>{const o=N.useNavigate(),a=i.useSelector(e=>e.AppLayout),{isUserAuthorized:r,UserInfo:n}=De(),{handleGetRequest:l,handlePostRequest:p}=Ce(),[c,u]=s.useState(null),[m,A]=s.useState([]),{t:f}=E.useTranslation(),[I,O]=s.useState(null),[y,h]=s.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:R,setWindowState:L}=Pe({windowTitle:"ltr"===a.appDirection?y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"Document":y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),C=async()=>{await l({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{h(e.data)},failureCallBkFn:()=>{h({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},g=async()=>{await p({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:y?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:c.id,refDocumentStatus:y?.workflowDocumentStatus?.documentStatusCode,actionComment:I},successCallBkFn:async t=>{c?.post_action_endpoint?await p({endPointURI:c.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:c.id},successCallBkFn:()=>{C(),e?.postActionCallBk&&e.postActionCallBk()}}):C()}})};return s.useEffect(()=>{e.refDocumentId&&e.workFlowDocumentCode&&C()},[e.refDocumentId,e.workFlowDocumentCode]),s.useEffect(()=>{A(y?.nextActions&&y?.nextActions?.length>0?y.nextActions.filter(e=>{if(!y?.workflowDocumentStatus?.nextActionTakersAuthority&&!y?.nextActionTakers)return!0;if(y?.workflowDocumentStatus?.nextActionTakersAuthority&&r(y.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(y?.nextActionTakers)for(const e of y.nextActionTakers)if(n?.username===e?.username||n?.username===e?.USERNAME)return!0;return!1}):[])},[y.nextActions,y.nextActionTakers]),t.jsxs(t.Fragment,{children:[y?.workflowDocumentReport?.id?t.jsx(R,{children:t.jsx(Fo,{reportCode:y?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):t.jsx(t.Fragment,{}),y?.workflowDocument?t.jsxs(d.Box,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.IconButton,{onClick:()=>{o(-1,{replace:!0})},children:t.jsx(T.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(T.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`,y?.workflowDocumentStatus?"ltr"===a.appDirection?` ( ${y?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${y?.workflowDocumentStatus?.documentStatusArName} )`:"",t.jsx(d.Box,{sx:{flex:1}}),y?.workflowDocumentReport?.id?t.jsx(d.Button,{onClick:()=>{L(!0)},variant:"outlined",startIcon:t.jsx(T.FontAwesomeIcon,{icon:"eye"}),children:f("VIEW_LABEL")}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),t.jsxs(d.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[m?.length>0?t.jsxs(d.Paper,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[t.jsx(je,{sx:{marginBottom:2,width:400},label:f("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===a.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:c?.id,options:m,onChangeCallBack:(e,t)=>{u(t)}}),t.jsx(Fe,{sx:{width:400},rows:3,value:I,onChange:e=>{O(e.target.value)},multiline:!0,label:f("WF_COMMENT_LABEL")}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.Button,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=c&&null!=c?.id?!0!==c.require_comment&&1!==c.require_comment&&"true"!==c.require_comment||null!==I&&""!==I?c?.pre_action_endpoint?await p({endPointURI:c.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:c.id},successCallBkFn:()=>{g()}}):g():_.toast.error("You must enter comment for the action to be processed"):_.toast.error("You must select action to process")},children:f("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?t.jsx(d.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:f("WF_CANCEL_BTN_LABEL")}):t.jsx(t.Fragment,{})]}),y?.nextActionTakers&&y.nextActionTakers.length>0?t.jsxs(t.Fragment,{children:[t.jsx(d.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:t.jsxs(d.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(T.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",f("WF_WAITING_FOR_LABEL")]})}),t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:y.nextActionTakers.map(e=>t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[t.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),t.jsxs(d.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsx("div",{children:"ltr"===a.appDirection?e?.employee_en_name:e?.employee_ar_name}),t.jsx("div",{children:e?.email?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):t.jsx(t.Fragment,{})}),t.jsx("div",{children:e?.mobile_number?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):t.jsx(t.Fragment,{})})]})]}))})]}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),y?.actionsHistory.length>0?t.jsx(Oo,{actionHistory:y.actionsHistory}):t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(d.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(T.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),f("WF_ACTION_HISTORY_LABEL")]}),t.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},vo=e=>{const{Window:i,setWindowState:o}=Pe({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:a,setWindowState:r}=Pe({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[n,l]=s.useState(!0),{t:p}=E.useTranslation(),c=tt(e.elements),u=[];for(const e of c)e?.hidden&&u.push(e.fieldName);const[m,A]=s.useState(u),f={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(f[t.props.fieldName]=t.props.defaultValue);const[I,h]=s.useState([]);let R=null;R=e?.validationSchema?e.validationSchema:ce.object(ot(c));const L=O.useForm({resolver:y.zodResolver(R),defaultValues:f}),C=L.watch(),g=N.useParams(),D=e?.formRouteRecordIdParamName,P=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:D&&g[D]&&(t=g[D]),t){const i=await e.apiActions.loadRecordById(t);if(i){L.reset({...i}),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk({...i},x,L);for(const e of c)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?L.setValue(e.fieldName,i[e.fieldName]+""):L.setValue(e.fieldName,i[e.fieldName]))}}else L.reset({})},x={setFieldValue:(e,t)=>{L.setValue(e,t)},hideField:e=>{A(t=>[...t,e])},showField:e=>{A(t=>t.filter(t=>t!==e))},disableField:e=>{h(t=>[...t,e])},enableField:e=>{h(t=>t.filter(t=>t!==e))}};return s.useEffect(()=>{P()},[e?.recordIdToEdit]),s.useEffect(()=>{l(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(C))},[C]),t.jsxs(t.Fragment,{children:[e?.attachment?t.jsx(i,{children:t.jsx(Eo,{attachmentCode:e.attachment.attachmentCode,refKey:C[e?.keyColumnName||"id"],enableAttachment:n})}):t.jsx(t.Fragment,{}),e?.workFlowDocumentCode?t.jsx(a,{children:t.jsx(wo,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:C[e?.keyColumnName||"id"],postActionCallBk:()=>{r(!1),P()},cancelActionCallBk:()=>{r(!1)}})}):t.jsx(t.Fragment,{}),t.jsx(lo,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:t.jsx(d.Grid2,{sx:{width:"100%"},container:!0,children:e.elements.map((i,o)=>"group"===i.type?t.jsx(_o,{...i.props,formManager:L,formValues:C,formActions:x,hiddenFields:m,disabledFields:I},o):"field"===i.type&&"props"===i.mode?t.jsx(To,{fieldInfo:i.props,formManager:L,formValues:C,formActions:x,hiddenFields:m,disabledFields:I,formValuesChangeCallBk:e.formValuesChangeCallBk},o):"field"===i.type&&"node"===i.mode?t.jsx(d.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:L,formValues:C})},o):void 0)})}),t.jsxs(lo,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[C[e?.keyColumnName||"id"]&&e?.attachment?t.jsx(d.Tooltip,{title:"Attachments",children:t.jsx(d.IconButton,{onClick:()=>{o(!0)},children:t.jsx(T.FontAwesomeIcon,{icon:"paperclip"})})}):null,C[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?t.jsx(d.Tooltip,{title:"Approvals",children:t.jsx(d.IconButton,{onClick:()=>{r(!0)},children:t.jsx(T.FontAwesomeIcon,{icon:"stamp"})})}):null,e?.actions?e.actions.map(i=>!1===i?.isIdRequired?t.jsx(Ao,{...i,record:C}):C[e?.keyColumnName||"id"]?!0===i?.formActionProps?.enabled?t.jsx(Ao,{...i,record:C}):t.jsx(t.Fragment,{}):void 0):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(d.Button,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?t.jsx(T.FontAwesomeIcon,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:L.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(L.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{_.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:p(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(d.Button,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?t.jsx(T.FontAwesomeIcon,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),L.reset(f)},children:p(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Bo=()=>{const{workflowDocumentCode:e,refDocumentId:i}=N.useParams();return t.jsx(wo,{workFlowDocumentCode:e,refDocumentId:i})},ko=e=>t.jsx(G.BarChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),jo=e=>t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[t.jsx(d.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:t.jsx("div",{children:e.record[e.valueField]})}),t.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),Go=e=>t.jsxs(t.Fragment,{children:[t.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(G.Gauge,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),Wo=e=>t.jsx(G.LineChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Yo(e){return t.jsxs(Y,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(Y,{sx:{width:"100%",mr:1},children:t.jsx(W,{variant:"determinate",...e})}),t.jsx(Y,{sx:{minWidth:35},children:t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Vo=e=>t.jsxs(Y,{sx:{width:"100%"},children:[t.jsx(B,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(Yo,{value:e.record[e.valueField]/e.total*100})]}),qo=e=>{const i=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return t.jsx(V.PieChart,{series:[{data:i}]})},Ko=e=>{const[i,o]=s.useState(!0),[a,r]=s.useState([]),{handleGetRequest:n}=Ce();s.useEffect(()=>{e.loadWidget?(async()=>{o(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{o(!1),r(e.data)},failureCallBkFn:()=>{o(!1),r([])}})})():o(!1)},[e.loadWidget,e.loadCounter]);let l=0;if(1==a.length)l=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of a)l+=t[e.verticalAxisField];return t.jsxs(t.Fragment,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?t.jsxs(d.Box,{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):t.jsx(t.Fragment,{}),t.jsx(d.Box,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:i?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),t.jsx("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?t.jsx(ko,{data:a,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?t.jsx(Wo,{data:a,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?t.jsx(qo,{data:a,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):t.jsxs(d.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[t.jsx(d.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),a.map((i,o)=>"Card"===e.widgetType?t.jsx(d.Grid2,{size:{md:3,xs:12},children:t.jsx(jo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},o)}):"CircularProgress"===e.widgetType?t.jsx(d.Grid2,{size:{md:3,xs:12},children:t.jsx(Go,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):"LinearProgress"===e.widgetType?t.jsx(d.Grid2,{size:{md:3,xs:12},children:t.jsx(Vo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):void 0)]})})]})},zo=e=>{const[i,o]=s.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:a,parametersValues:r}=Uo({parameters:i?.dashboardParameters||[],initialParameterValues:{}}),[n,l]=s.useState(0),[p,c]=s.useState(!1);s.useEffect(()=>{if(null!=i.dashboardCode&&null!=i.dashboardCode&&""!=i.dashboardCode){c(!1);let e=!0;if(i?.dashboardParameters.length>0)for(const t of i?.dashboardParameters)if(!0===t?.mandatory&&(void 0===r[t.parameterCode]||null===r[t.parameterCode]||""===r[t.parameterCode])){e=!1;break}e&&c(e),l(n+1)}},[i?.dashboardParameters,r]);const u=N.useNavigate(),{handleGetRequest:m,handlePostRequest:A}=Ce();return s.useEffect(()=>{e.dashboardCode&&(async()=>{await m({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()},[e.dashboardCode,e.parameters]),t.jsx(t.Fragment,{children:i?t.jsxs(t.Fragment,{children:[t.jsxs(d.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.IconButton,{onClick:()=>{u(-1,{replace:!0})},children:t.jsx(T.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(T.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),t.jsx(d.Box,{children:i?.dashboardTitle}),t.jsx(d.Box,{sx:{flex:1}})]}),i?.dashboardParameters.length>0?t.jsx(a,{searchBtnClickCallBk:async e=>{l(n+1)}}):t.jsx(t.Fragment,{}),t.jsx(d.Grid2,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:i?.widgets.map((e,i)=>t.jsx(d.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:t.jsx(Ko,{...e,parameterValues:r,loadWidget:p})},i))})]}):t.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},Ho=()=>{const{dashboardCode:e}=N.useParams();return t.jsx(zo,{dashboardCode:e})},Qo=e=>{const{UserSession:o}=De(),a=i.useSelector(e=>e.AppLayout),r=i.useDispatch(),{handlePostRequest:n}=Ce(),[l,p]=s.useState(o.value.currentOrganization.id);return t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[t.jsx(je,{sx:{width:"100%"},displayField:"ltr"===a.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:l,onChangeCallBack:e=>{p(e)}}),t.jsx(d.Button,{sx:{m:1},variant:"contained",disabled:null==l||l===o.value.currentOrganization.id,onClick:async()=>{await n({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:l},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};r(Re.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},Zo=A.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:$o,setSideBarState:Xo}=Zo.actions;var Jo=Zo.reducer;function ea(e,t){const i=s.useRef(e);s.useEffect(()=>{i.current=e},[e]),s.useEffect(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const ta=d.keyframes`
|
|
31
|
+
function(e,t){const i=ne(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Zi),s=ce.forwardRef(function(e,s){const l=function(e=eo){return Xi(e)}(o),{className:d,component:c="div",...u}=to(e);return t.jsx(a,{as:c,ref:s,className:no(d,n?n(r):r),theme:i&&l[i]||l,...u})});return s}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=ao[t];return o?`${i}-${o}`:`${oo.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:oo.generate});function lo(e){return"number"==typeof e&&!isNaN(e)}function co(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function uo(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function po(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function ho(e,t){const i=new Date(e),o=new Date,r=Math.floor((i-o)/1e3),n="rtl"===t?"ar":"en",a=new Intl.RelativeTimeFormat(n,{numeric:"auto"}),s=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:t}of s){const i=Math.floor(r/t);if(Math.abs(i)>1)return a.format(i,e)}return"ar"===n?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(so.propTypes={children:Dt.node,component:Dt.elementType,sx:Dt.oneOfType([Dt.arrayOf(Dt.oneOfType([Dt.func,Dt.object,Dt.bool])),Dt.func,Dt.object])});const mo=e=>{if(e?.fieldInfo){const i=e.fieldInfo,o=e?.formManager||null,r=e?.formActions||null,n=e?.formValues||null,a=e?.fieldInfo?.fieldName||null,l=e?.fieldInfo?.fieldType||null;if(!(i&&o&&n&&a&&l))return t.jsx(t.Fragment,{});const d=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(n):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(a)?t.jsx(t.Fragment,{}):t.jsx(s.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?t.jsx(De,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:!(!i?.disabled&&!e.disabledFields.includes(a)),label:d(),value:n[a],onChange:t=>{let i=null;""!=t.target.value&&(i="number"===l&&co(t.target.value)?Number(t.target.value):t.target.value),o.setValue(a,i),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,i)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style},error:null!=o.formState.errors[a],helperText:o?.formState?.errors[a]?.message?.toString()}):"date"===i?.fieldType?t.jsx(Ve,{format:i?.dateFormat||je,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(a)),label:d(),onChangeCallBack:t=>{o.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t)},value:n[a],error:null!=o.formState.errors[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):"datetime"===i?.fieldType?t.jsx(ze,{format:i?.dateFormat||Ge,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(a)),label:d(),onChangeCallBack:t=>{o.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t)},value:n[a],error:null!=o.formState.errors[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):"checkbox"===i?.fieldType?t.jsx(Be,{label:d(),onChangeCallBack:t=>{o.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t)},value:n[a],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:!(!i?.disabled&&!e.disabledFields.includes(a)),sx:i?.formProps?.style}):"combobox"===i?.fieldType?t.jsx(qe,{sx:i?.formProps?.style||{width:"100%"},label:d(),disabled:!(!i?.disabled&&!e.disabledFields.includes(a)),onChangeCallBack:(t,i)=>{let s=null;t&&(s=t),o.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t,i)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:n[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):"lookup"===i?.fieldType?t.jsx($e,{sx:i?.formProps?.style||{width:"100%"},label:d(),disabled:!(!i?.disabled&&!e.disabledFields.includes(a)),onChangeCallBack:(t,i)=>{let s=null;t&&(s=t),o.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t,i)},lookupType:i.lookupType,value:n[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):null})}return t.jsx(t.Fragment,{})},fo=e=>{const i=we(),{ConfirmationWindow:o,setOpen:r}=be({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||i.isUserAuthorized(e.authority)?t.jsxs(t.Fragment,{children:[t.jsx(o,{}),t.jsxs(s.Button,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?r(!0):e?.actionFn(e.record)}},children:[e?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx("div",{children:e?.label})]})]}):t.jsx(t.Fragment,{})},go=e=>{const{t:i}=I.useTranslation();return t.jsx(t.Fragment,{children:t.jsxs(s.Grid2,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?t.jsx(s.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),t.jsx("div",{children:i(e.label)})]}):t.jsx(t.Fragment,{children:i(e.label)})}):t.jsx(t.Fragment,{}),e?.elements?e.elements.map(i=>"group"===i.type?t.jsx(go,{...i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"props"===i.mode?t.jsx(mo,{fieldInfo:i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"node"===i.mode?t.jsx(s.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?t.jsx(s.Grid2,{size:{sm:12},sx:{padding:1},children:e.actions.map(i=>t.jsx(fo,{...i,record:e.formValues}))}):t.jsx(t.Fragment,{})]})})},To=e=>{const o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),[r,n]=d.useState(null);return d.useEffect(()=>{(()=>{let t=o+"/api/v1/attachment/";e?.attachmentId?t+="download?attachmentId="+e.attachmentId:(t+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(t+=`&category=${e.category}`)),n(t)})()},[e]),e?.showAsAvatar?t.jsx(s.Avatar,{sx:e.style,onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:r}):t.jsx("img",{src:r,loading:"lazy",alt:"image",onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Ao=e=>{const{handleGetRequest:i,handleDeleteRequest:o}=Re(),{isUserAuthorized:r}=we();let n=!0;e?.downloadAuthorityKey&&(n=r(e.downloadAuthorityKey));const{ConfirmationWindow:a,setOpen:l}=be({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await o({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return t.jsxs(t.Fragment,{children:[t.jsx(a,{}),t.jsxs(N,{sx:{width:300,border:"0.5px solid gray"},children:[t.jsx(U,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?t.jsx(To,{attachmentId:e.id}):t.jsx(m.FontAwesomeIcon,{icon:"file",size:"3x"})}),t.jsxs(k,{children:[t.jsx(F,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),t.jsxs(D,{children:[e?.allowDelete?t.jsx(s.IconButton,{size:"small",onClick:()=>{l(!0)},children:t.jsx(s.Tooltip,{title:"Delete Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"trash"})})}):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),n?t.jsx(s.IconButton,{size:"small",onClick:async()=>{await i({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const i=window.URL.createObjectURL(new Blob([t.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",e.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:t.jsx(s.Tooltip,{title:"Download Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"download"})})}):t.jsx(t.Fragment,{})]})]})]})},Io=e=>{const{handleUploadRequest:i,handleGetRequest:o}=Re(),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState(null),[p,h]=d.useState(null),[f,T]=d.useState([]),[A,I]=d.useState(null),{isUserAuthorized:y}=we(),_=e=>e.split(".").pop()?.toLowerCase()||"";d.useEffect(()=>{(async()=>{await o({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{I(e.data)}})})()},[e.refKey,e.attachmentCode]),d.useEffect(()=>{if(T(A?.allowedFileTypes?A.allowedFileTypes.split(","):[]),A?.attachmentCategories){const e=[];for(const t of A.attachmentCategories.split(","))e.push({value:t});l(e)}else l([])},[A]);let E=!0;A?.downloadAuthorityKey&&!y(A?.downloadAuthorityKey)&&(E=!1);let O=!0;return!1===e?.enableAttachment&&(O=!1),A?.uploadAuthorityKey&&!y(A.uploadAuthorityKey)&&(O=!1),t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[O?t.jsx(t.Fragment,{children:null==A?.maxAllowedNumberOfFiles||A?.maxAllowedNumberOfFiles>A.refKeyAttachments.length?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),t.jsx("input",{type:"file",style:{margin:20},accept:A?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=_(t.name);if(f.length>0&&!f.includes(e))return void g.toast.error(e+" is not allowed")}n(e.target.files)}}),a.length>0?t.jsx(qe,{label:"Attachment Type",sx:{width:300,m:1},options:a,displayField:"value",valueField:"value",value:p,onChangeCallBack:e=>{h(e)}}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"Remark",value:c,onChange:e=>u(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let t=A?.refKeyAttachments.length||0;if(A?.maxAllowedNumberOfFiles&&r.length+t>A.maxAllowedNumberOfFiles)g.toast.error("Maximum number of attachments is "+A.maxAllowedNumberOfFiles);else if(!0===A?.isCategoryRequired&&a.length>0&&(null==p||void 0===p||""===p))g.toast.error("You must selected document type to process your request");else if(r){for(const e of r)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void g.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await i({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:c,category:p},files:r,successCallBkFn:e=>{I(e.data),n(null),h(null),u(null),g.toast.success("Your request has been process successfully")}})}else g.toast.error("You must add files to upload")},children:"Upload"})]}):t.jsx(t.Fragment,{})}):t.jsx(t.Fragment,{}),E&&A?.refKeyAttachments?.length>0?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),t.jsx(s.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:A?.refKeyAttachments.map(i=>t.jsx(s.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:t.jsx(Ao,{...i,attachmentCode:e.attachmentCode,setAttachmentConfig:I,downloadAuthorityKey:A.downloadAuthorityKey,allowDelete:O})}))})]}):t.jsx(t.Fragment,{})]})},yo=e=>{const o=i.useSelector(e=>e.AppLayout),{t:r}=I.useTranslation();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),r("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,r)=>t.jsx(t.Fragment,{children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{marginBottom:.2},children:i.actionTime}),t.jsxs(F,{children:["via ",i.actionMethod]})]}),t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[t.jsx(To,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId+""||"0",style:{m:1,width:70,height:70}}),r!==e.actionHistory.length-1?t.jsx(s.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):t.jsx(t.Fragment,{})]}),t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%"},children:["ltr"===o.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),t.jsx(s.Box,{sx:{width:"100%"},children:"ltr"===o.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},_o=e=>{const{t:i}=I.useTranslation(),o=we(),{ConfirmationWindow:r,setOpen:n}=be({body:i(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let a=!0;if(e.authority&&(a=o.isUserAuthorized(e.authority)),a)return t.jsxs(t.Fragment,{children:[t.jsx(r,{}),t.jsxs(s.Button,{onClick:async()=>{if(e?.recordsToProcessActionOn&&e?.recordsToProcessActionOn.length>0){if(e?.preActionValidation)for(const t of e.recordsToProcessActionOn)if(!e.preActionValidation(t))return;!0===e?.isConfirmationRequired?n(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else g.toast.error(i("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:e?.label?"outlined":e?.formActionProps?.actionButtonVariant?e.formActionProps.actionButtonVariant:"text",size:"small",color:e?.formActionProps?.actionButtonColor||"primary",children:[e?.icon?t.jsx(m.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:e.icon}):t.jsx(t.Fragment,{}),e?.label?i(e.label):t.jsx(t.Fragment,{})]})]})},Eo=s.styled(e.QuickFilter)({display:"grid",alignItems:"center"}),Oo=s.styled(e.ToolbarButton)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Co=s.styled(s.TextField)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),No=i=>{const{t:o}=I.useTranslation(),r=we(),n=!i?.templateProps?.editAction?.authority||r.isUserAuthorized(i.templateProps.editAction.authority),a=rt(i?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},i?.templateProps?.data||[],i?.templateProps?.keyColumnName||"id");return t.jsxs(e.Toolbar,{children:[n&&"none"!=i?.templateProps?.editMode?.editMode?t.jsxs(s.Button,{onClick:i?.handleCreateNewRecord,children:[t.jsx(m.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),o("ADD_BTN_LABEL")]}):t.jsx(t.Fragment,{}),i?.templateProps?.rowActions?i.templateProps.rowActions.map((e,t)=>!0===e?.gridActionProps?.multiRecord?d.createElement(_o,{...e,key:t,reloadData:async()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:a.selectedRecordIds,recordsToProcessActionOn:a.selectedRecords}):null):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,mx:.5,my:.5,padding:1},children:i?.templateProps?.tBar}),t.jsx(s.Tooltip,{title:"Columns",children:t.jsx(e.ColumnsPanelTrigger,{render:t.jsx(e.ToolbarButton,{}),children:t.jsx(e.GridViewColumnIcon,{fontSize:"small"})})}),t.jsx(s.Tooltip,{title:"Filters",children:t.jsx(e.FilterPanelTrigger,{render:(i,o)=>t.jsx(e.ToolbarButton,{...i,color:"default",children:t.jsx(s.Badge,{badgeContent:o.filterCount,color:"primary",variant:"dot",children:t.jsx(e.GridFilterListIcon,{fontSize:"small"})})})})}),i?.templateProps?.gridStateKey?t.jsx(s.Tooltip,{title:o("RESET_GRID_STATE"),children:t.jsx(s.IconButton,{onClick:i?.clearGridState,children:t.jsx(m.FontAwesomeIcon,{icon:"eraser"})})}):t.jsx(t.Fragment,{}),t.jsx(s.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),t.jsx(s.Tooltip,{title:o("EXPORT_EXECL_LABEL"),children:t.jsx(e.ExportExcel,{render:t.jsx(s.MenuItem,{}),children:t.jsx(m.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),t.jsxs(Eo,{children:[t.jsx(e.QuickFilterTrigger,{render:(e,i)=>t.jsx(s.Tooltip,{title:o("SEARCH_BTN_LABEL"),enterDelay:0,children:t.jsx(Oo,{...e,ownerState:{expanded:i.expanded},color:"default","aria-disabled":i.expanded,children:t.jsx(m.FontAwesomeIcon,{icon:"search"})})})}),t.jsx(e.QuickFilterControl,{render:({ref:i,...r},n)=>t.jsx(Co,{...r,ownerState:{expanded:n.expanded},inputRef:i,"aria-label":"Search",placeholder:`${o("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:t.jsx(s.InputAdornment,{position:"start",children:t.jsx(m.FontAwesomeIcon,{icon:"search"})}),endAdornment:n.value?t.jsx(s.InputAdornment,{position:"end",children:t.jsx(e.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:t.jsx(m.FontAwesomeIcon,{icon:"xmark"})})}):null,...r.slotProps?.input},...r.slotProps}})})]}),t.jsx(s.IconButton,{onClick:()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},children:t.jsx(m.FontAwesomeIcon,{icon:"refresh"})})]})},Ro=i=>{const{t:o}=I.useTranslation(),r=we(),{ConfirmationWindow:n,setOpen:a}=be({body:o(i?.confirmationMessage||"ACTION_CONFIRMATION"),title:o("CONFIRMATION"),onConfirmationCallBk:async()=>{await(i?.actionFn(i.record)),i?.reloadData&&i.reloadData()}});let l=!0;i.authority&&(l=r.isUserAuthorized(i.authority));let d={};i?.getActionIconStyleForRecord&&(d=i.getActionIconStyleForRecord(i.record));let c=!0;i?.isActionVisibleForRecord&&(c=i?.isActionVisibleForRecord(i.record));let u=!1;if(i?.isActionDisabledForRecord&&(u=i.isActionDisabledForRecord(i.record)),l&&c)return t.jsxs(t.Fragment,{children:[t.jsx(n,{}),t.jsx(e.GridActionsCellItem,{disabled:u,icon:t.jsx(s.Tooltip,{title:i?.label?o(i.label):"",children:t.jsx(m.FontAwesomeIcon,{icon:i.icon,style:{...d,color:u?"gray":null!=d?.color?d.color:void 0}})}),showInMenu:i?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!u){if(i?.preActionValidation&&!i.preActionValidation(i.record))return;!0===i?.isConfirmationRequired?a(!0):(await i.actionFn(i.record),!0===i?.gridActionProps?.reloadGridAfterAction&&i?.reloadData&&i.reloadData())}}})]})};let bo=-1;const wo=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Po=(e,t)=>{const i=wo(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},So=["__check__","actions"],vo=o=>{const{t:r}=I.useTranslation(),n=i.useSelector(e=>e.AppLayout),[a,l]=d.useState({}),[c,u]=d.useState(!0),{getLookupOptions:p}=(()=>{const{handleGetRequest:e}=Re(),t=i.useSelector(e=>e.AppLayout),o=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let i=await o(e.lookupType);return{...e,options:i,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),{Window:h,setWindowState:f}=Pe({windowTitle:r(o.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),{Window:T,setWindowState:A}=Pe({windowTitle:r(o.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),[y,E]=d.useState([]),C=tt(o.formElements),N=[],R=d.useMemo(()=>o?.gridStateKey?wo(o.gridStateKey):{},[]);for(const e of C)!0===e?.gridProps?.hidden&&N.push(e.fieldName);let b={};if(R?.columnVisibilityModel){b=R.columnVisibilityModel;const e=Object.keys(b);for(const t of N)e.includes(t)||(b[t]=!1)}else for(const e of N)b[e]=!1;const w=i.useSelector(e=>e.AppLayout.appDirection),[P,S]=d.useState(b),[v,L]=d.useState(R.columnOrder||[]),[M,x]=d.useState(R.columnWidths||{}),[D,k]=d.useState(R.columnGroupingModel||[]);let U=R?.pinnedColumns?.left||[];U=U.filter(e=>!So.includes(e));let F=R?.pinnedColumns?.right||[]||[];F=F.filter(e=>!So.includes(e));const[B,q]=d.useState({left:[..."ltr"===w?So:[],...U],right:[..."rtl"===w?So:[],...F]}),j=we(),G=_.useNavigate(),[W,H]=d.useState(null),[Y,K]=d.useState(null),[V,z]=d.useState({}),$=async()=>{let e=it(C,"row"===o?.editMode?.editMode||!1,r);for(let t of e)t?.lookupType&&(t.displayField="ltr"===n.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await p(t.lookupType),t.valueField="lookupValue");E(e)},[Q,Z]=d.useState({ids:new Set,type:"include"});let J="id";o?.keyColumnName&&(J=o?.keyColumnName);const X=o.setData;let ee=null;ee=o?.validationSchema?o.validationSchema:O.z.object(ot(C));let te=!0;o?.editAction?.authority&&(te=j.isUserAuthorized(o.editAction.authority));let ie=!0;o?.deleteAction?.authority&&(ie=j.isUserAuthorized(o.deleteAction.authority));const{ConfirmationWindow:oe,setOpen:re}=be({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;W&&!0===W?.isNew||(e=await o.apiActions.deleteRecordById(W[J])),e&&(o?.deleteAction?.postActionCallBack&&await o.deleteAction.postActionCallBack(W),X(e=>e.filter(e=>e[J]!=W[J])))}});let ne,ae,se,le,de,ce;"modal"===o?.editMode?.editMode&&(ne=o?.editMode?.specs?.modalHeight||"fit-content",ae=o?.editMode?.specs?.modalWidth||"300",se=o?.editMode?.specs?.modalMinHeight,le=o?.editMode?.specs?.modalMinWidth,de=o?.editMode?.specs?.modalIcon||"window",ce=o?.editMode?.specs?.modalTitle||"Record Form");const{Window:ue,setWindowState:pe}=Pe({height:ne,minHeight:se,minWidth:le,onCloseCallBack:()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},width:ae,windowIcon:de,windowTitle:ce}),he={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(o?.rowActions?30*o.rowActions.length:0)+(o?.editAction&&o?.editAction?.isEnabled?30:0)+(o?.deleteAction&&o?.deleteAction?.isEnabled?30:0)+(o?.attachment?30:0)+(o?.workFlowDocumentCode?30:0),getActions:i=>{const n=i.row,a=[];if("none"!=o?.editMode?.editMode&&(void 0===o?.disableDefaultAction||!o.disableDefaultAction)){const i=V[n[J]]?.mode===e.GridRowModes.Edit;if("row"===o.editMode.editMode&&i)te&&(a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"save"}),label:r("SAVE_BTN_LABEL"),onClick:()=>{(t=>{const i=t[J];z({...V,[i]:{mode:e.GridRowModes.View}})})(n)}})),a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"cancel"}),label:r("CANCEL_BTN_LABEL"),onClick:()=>{(t=>{const i=t[J];i&&lo(i)&&i<0?(z({...V,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}}),X(e=>{const t=e.filter(e=>e[J]!=i);return t})):z({...V,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}})})(n)},color:"inherit"})));else{if(o?.editAction&&!0===o?.editAction?.isEnabled){let i=!0;o?.editAction?.isActionVisibleForRecord&&(i=o?.editAction?.isActionVisibleForRecord(n));let l=!1;o?.editAction?.isActionDisabledForRecord&&(l=o?.editAction?.isActionDisabledForRecord(n)),te&&i&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("EDIT_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"edit",style:{color:l?"gray":void 0}})}),showInMenu:o?.editAction?.gridActionProps?.showInMenu||!1,label:r("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{te&&!l&&(async t=>{if(t)if(K(t),"form"===o.editMode.editMode)G(o.editMode.specs.formRoute+"/"+t[J]);else if("modal"===o.editMode.editMode)pe(!0);else if("row"===o?.editMode?.editMode){const i=t[J];z({...V,[i]:{mode:e.GridRowModes.Edit}})}})(n)}}))}if(o?.deleteAction&&!0===o?.deleteAction?.isEnabled){let i=!0;o?.deleteAction?.isActionVisibleForRecord&&(i=o?.deleteAction?.isActionVisibleForRecord(n));let l=!1;o?.deleteAction?.isActionDisabledForRecord&&(l=o?.deleteAction?.isActionDisabledForRecord(n)),ie&&i&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("DELETE_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"trash",style:{color:l?"gray":void 0}})}),showInMenu:o?.deleteAction?.gridActionProps?.showInMenu||!1,label:r("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ie&&!l){if(o?.deleteAction?.preActionValidation&&!o.deleteAction.preActionValidation(n))return;H(n),re(!0)}}}))}}}if(n[o?.keyColumnName||"id"]&&n[o?.keyColumnName||"id"]>0&&o?.attachment&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{l(n),u(!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(n)),f(!0)}})),n[o?.keyColumnName||"id"]&&n[o?.keyColumnName||"id"]>0&&o?.workFlowDocumentCode&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{l(n),A(!0)}})),n[o?.keyColumnName||"id"]&&n[o?.keyColumnName||"id"]>0&&o?.rowActions)for(const e of o.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||a.push(t.jsx(Ro,{...e,record:n,reloadData:async()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}}));return a}};let me=[];(void 0===o?.disableDefaultAction||!o.disableDefaultAction||o?.rowActions&&o?.rowActions.length>0)&&me.push(he),me=[...me,...y];d.useEffect(()=>{void 0!==o?.autoLoad&&!0!==o.autoLoad||o.apiActions.reloadData(o?.gridLoadParametersValues),$()},[]),d.useEffect(()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},[j.UserInfo?.currentOrganization]),d.useEffect(()=>{$()},[w,o.formElements]);const fe=d.useMemo(()=>{const e=me.map(e=>({...e}));if(v.length){const t=new Map(e.map(e=>[e.field,e]));return v.map(e=>t.get(e)).filter(Boolean)}return e},[v,M,me]);return t.jsxs(t.Fragment,{children:[t.jsx(oe,{}),"modal"===o?.editMode?.editMode?t.jsx(ue,{children:o?.editMode?.specs?.formComponent?t.jsx(o.editMode.specs.formComponent,{recordIdToEdit:Y?Y[J]:void 0,formCloseCallBk:()=>{pe(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)}}):t.jsx(Uo,{keyColumnName:o.keyColumnName,attachment:o.attachment,formValuesChangeCallBk:o?.formProps?.formValuesChangeCallBk,recordIdToEdit:Y?Y[J]:void 0,formCloseCallBk:()=>{pe(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)},elements:o.formElements,apiActions:o.apiActions,editAuthorityKey:o?.editAction?.authority,formSavedSuccessfullyCallBk:o?.editAction?.postActionCallBack,preSaveValidation:o?.editAction?.preActionValidation,actions:o?.rowActions})}):t.jsx(t.Fragment,{}),void 0!==o?.hideInfoBar||o?.hideInfoBar?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{sx:{display:"flex"},children:[void 0!==o?.hideBackButton||o?.hideBackButton?t.jsx(t.Fragment,{}):t.jsx(s.IconButton,{onClick:()=>{G(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"ltr"===w?"arrow-left":"arrow-right"})}),t.jsxs(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[o?.girdIcon?t.jsx(m.FontAwesomeIcon,{icon:o.girdIcon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx(s.Typography,{variant:"h5",children:o?.gridTitle?uo(r(o?.gridTitle)):""})]})]}),o?.gridLoadParameters&&o?.gridLoadParameters.length>0&&o?.gridLoadParametersValues&&o?.setGridLoadParametersValues?t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(e.GridExpandMoreIcon,{}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Uo,{saveButtonSpecs:{label:r("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:r("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?o.setGridLoadParametersValues(e):o.setGridLoadParametersValues({}),o.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o.gridLoadParameters})})})]}):t.jsx(t.Fragment,{}),o?.attachment?t.jsx(h,{children:t.jsx(Io,{attachmentCode:o.attachment.attachmentCode,refKey:a[o?.keyColumnName||"id"],enableAttachment:c})}):t.jsx(t.Fragment,{}),o?.workFlowDocumentCode?t.jsx(T,{children:t.jsx(ko,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:a[o?.keyColumnName||"id"],postActionCallBk:()=>{A(!1),o.apiActions.reloadData(o.gridLoadParametersValues)},cancelActionCallBk:()=>{A(!1),o.apiActions.reloadData(o.gridLoadParametersValues)}})}):t.jsx(t.Fragment,{}),t.jsx(e.DataGridPremium,{...o?.muiProps,slots:{toolbar:No},slotProps:{toolbar:{templateProps:{...o,rowSelectionModel:Q,data:o?.data},handleCreateNewRecord:()=>{if("form"===o?.editMode?.editMode)G(o.editMode.specs.formRoute);else if("modal"===o?.editMode?.editMode)K(null),pe(!0);else if("row"===o?.editMode?.editMode){bo-=1;const t={};t[J]=bo,t.isNew=!0;for(const e of y)"actions"!=e?.type&&e?.field!=J&&e?.field&&(t[e.field]=null);X(e=>[t,...e]),z(t=>({...t,[bo]:{mode:e.GridRowModes.Edit}}))}},clearGridState:()=>{o?.gridStateKey&&localStorage.removeItem(o.gridStateKey),S({}),L([]),x({}),k([]),q({left:[..."ltr"===w?So:[]],right:[..."rtl"===w?So:[]]})}}},getRowId:e=>e[J],showToolbar:!0,rows:o?.data,columns:fe,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==o.editMode.editMode?V:void 0,onRowModesModelChange:"row"==o.editMode.editMode?e=>{z(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async e=>{if("row"===o.editMode.editMode){let i=null;const r=(e=>{try{ee.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof O.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(e);if(r){const e=r.split(",");throw g.toast.error(t.jsx("div",{style:{},children:e.map(e=>t.jsxs(t.Fragment,{children:[t.jsx("div",{children:e}),t.jsx(s.Divider,{})]}))})),new Error(r)}if(o?.editAction?.preActionValidation&&!o.editAction.preActionValidation(e))throw new Error("error on the configured presave validation");const n={...e};if(e[J]&&lo(e[J])&&Number(e[J])<0&&(n[J]=null),i=await o.apiActions.saveRecord(n),null==i)throw new Error("Failed to process your request, contact your administrator");return o?.editAction?.postActionCallBack&&await o.editAction.postActionCallBack(e),!0===e?.isNew&&X(t=>{const o=t.filter(t=>t[J]!==e[J]);return[i,...o]}),!0===o?.editMode?.reloadAfterSave&&o?.apiActions?.reloadData&&o?.apiActions?.reloadData(o?.gridLoadParametersValues),i}},rowSelectionModel:Q,onRowSelectionModelChange:e=>{Z(e)},columnVisibilityModel:P,onColumnVisibilityModelChange:e=>{S(e),o?.gridStateKey&&Po(o.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:i}=e;L(e=>{const r=e.length?[...e]:me.map(e=>e.field),n=r.indexOf(t.field);return-1===n||(r.splice(n,1),r.splice(i,0,t.field),o?.gridStateKey&&Po(o.gridStateKey,{columnOrder:r})),r})},rowGroupingModel:D,onRowGroupingModelChange:e=>{(e=>{k(e),o?.gridStateKey&&Po(o.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},Lo=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},Mo=e=>{const[i,o]=d.useState([]);return d.useEffect(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));o(t)},[e.reportData]),t.jsx(vo,{data:i,disableDefaultAction:!0,setData:e.setReportData,formElements:Lo(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,keyColumnName:"report_record_data_key",hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})},xo=e=>{console.log("useParameterPanel","useParameterPanel called");const[i,o]=d.useState({...e?.initialParameterValues}),r=((e,t)=>{const i=[];for(const o of e){const e={type:"field",mode:"props",props:{fieldLabel:o?.parameterLabel,fieldName:o?.parameterCode,fieldType:o?.parameterType,hidden:o?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:o?.mandatory,defaultValue:t[o?.parameterCode]||o?.defaultValue}};i.push(e)}return i})(e.parameters,i);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:n}=I.useTranslation();return t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Uo,{saveButtonSpecs:{label:n("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:n("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:n("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{o({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{o(null!=t?t:{}),e&&await e(i)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:r})})})]})},parametersValues:i,setParametersValues:o,panelElements:r}},Do=e=>{const[i,o]=d.useState(null),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState("WAITING_REPORT_CODE"),{handleGetRequest:p,handlePostRequest:h,HandleDownloadHTTPPostPDF:f}=Re(),[g,T]=d.useState(null),{ParameterPanel:A,parametersValues:I,panelElements:y,setParametersValues:_}=xo({parameters:g?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}}),E=async t=>{u("WAITING_RESULT"),"Excel"===g?.reportType?await h({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT"),l(e.data)}}):g?.reportType&&await f({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),r=document.createElement("a");r.href=o,r.download=i,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(o)}},failureCallBkFn:e=>{n("Failed To run report ... contact your administrator"),u("ERROR")}})};return d.useEffect(()=>{e?.reportCode&&(async()=>{u("LOADING_METADATA"),await p({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:t=>{T(t.data),!0===e?.byPassParameterEntry||0==t.data.reportParameters.length?(E(I),u("WAITING_RESULT")):u("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{n("Failed loading report metadata ... contact your administrator"),u("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[t.jsxs(s.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"Excel"===g?.reportType?"file-excel":"file-pdf",color:"Excel"===g?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),g?.reportName]}),"Excel"!=g?.reportType&&"SHOWING_RESULT"===c?t.jsxs(t.Fragment,{children:[!0===e?.byPassParameterEntry?t.jsx(t.Fragment,{}):g?.reportParameters.length>0?t.jsx(s.IconButton,{onClick:()=>{u("WAITING_PARAMETER_INPUT")},children:t.jsx(m.FontAwesomeIcon,{icon:"filter"})}):t.jsx(t.Fragment,{}),t.jsx(s.IconButton,{children:t.jsx(m.FontAwesomeIcon,{icon:"refresh",onClick:()=>{E(I)}})})]}):t.jsx(t.Fragment,{})]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===c&&"Excel"!=g?.reportType?t.jsx(A,{searchBtnClickCallBk:E}):"SHOWING_RESULT"===c||("WAITING_PARAMETER_INPUT"===c||"WAITING_RESULT"===c)&&"Excel"===g?.reportType?"Excel"===g?.reportType?t.jsx(Mo,{reportData:a,setReportData:l,reloadReport:async()=>{E(I)},gridLoadParameters:y,gridLoadParametersValues:I,setGridLoadParametersValues:_}):t.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===c?t.jsxs(s.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),r]}):t.jsx(t.Fragment,{})})]})},ko=e=>{const o=_.useNavigate(),r=i.useSelector(e=>e.AppLayout),{isUserAuthorized:n,UserInfo:a}=we(),{handleGetRequest:l,handlePostRequest:c}=Re(),[u,p]=d.useState(null),[h,f]=d.useState([]),{t:T}=I.useTranslation(),[A,y]=d.useState(null),[E,O]=d.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:C,setWindowState:N}=Pe({windowTitle:"ltr"===r.appDirection?E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"Document":E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),R=async()=>{await l({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{O(e.data)},failureCallBkFn:()=>{O({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},b=async()=>{await c({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:E?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:u.id,refDocumentStatus:E?.workflowDocumentStatus?.documentStatusCode,actionComment:A},successCallBkFn:async t=>{u?.post_action_endpoint?await c({endPointURI:u.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{R(),e?.postActionCallBk&&e.postActionCallBk()}}):R()}})};return d.useEffect(()=>{e.refDocumentId&&e.workFlowDocumentCode&&R()},[e.refDocumentId,e.workFlowDocumentCode]),d.useEffect(()=>{f(E?.nextActions&&E?.nextActions?.length>0?E.nextActions.filter(e=>{if(!E?.workflowDocumentStatus?.nextActionTakersAuthority&&!E?.nextActionTakers)return!0;if(E?.workflowDocumentStatus?.nextActionTakersAuthority&&n(E.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(E?.nextActionTakers)for(const e of E.nextActionTakers)if(a?.username===e?.username||a?.username===e?.USERNAME)return!0;return!1}):[])},[E.nextActions,E.nextActionTakers]),t.jsxs(t.Fragment,{children:[E?.workflowDocumentReport?.id?t.jsx(C,{children:t.jsx(Do,{reportCode:E?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):t.jsx(t.Fragment,{}),E?.workflowDocument?t.jsxs(s.Box,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{o(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===r.appDirection?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`,E?.workflowDocumentStatus?"ltr"===r.appDirection?` ( ${E?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${E?.workflowDocumentStatus?.documentStatusArName} )`:"",t.jsx(s.Box,{sx:{flex:1}}),E?.workflowDocumentReport?.id?t.jsx(s.Button,{onClick:()=>{N(!0)},variant:"outlined",startIcon:t.jsx(m.FontAwesomeIcon,{icon:"eye"}),children:T("VIEW_LABEL")}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),t.jsxs(s.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[h?.length>0?t.jsxs(s.Paper,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[t.jsx(qe,{sx:{marginBottom:2,width:400},label:T("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===r.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:u?.id,options:h,onChangeCallBack:(e,t)=>{p(t)}}),t.jsx(De,{sx:{width:400},rows:3,value:A,onChange:e=>{y(e.target.value)},multiline:!0,label:T("WF_COMMENT_LABEL")}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Button,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=u&&null!=u?.id?!0!==u.require_comment&&1!==u.require_comment&&"true"!==u.require_comment||null!==A&&""!==A?u?.pre_action_endpoint?await c({endPointURI:u.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{b()}}):b():g.toast.error("You must enter comment for the action to be processed"):g.toast.error("You must select action to process")},children:T("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?t.jsx(s.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:T("WF_CANCEL_BTN_LABEL")}):t.jsx(t.Fragment,{})]}),E?.nextActionTakers&&E.nextActionTakers.length>0?t.jsxs(t.Fragment,{children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",T("WF_WAITING_FOR_LABEL")]})}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:E.nextActionTakers.map(e=>t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[t.jsx(To,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),t.jsxs(s.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsx("div",{children:"ltr"===r.appDirection?e?.employee_en_name:e?.employee_ar_name}),t.jsx("div",{children:e?.email?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):t.jsx(t.Fragment,{})}),t.jsx("div",{children:e?.mobile_number?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):t.jsx(t.Fragment,{})})]})]}))})]}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),E?.actionsHistory.length>0?t.jsx(yo,{actionHistory:E.actionsHistory}):t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),T("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},Uo=e=>{const{Window:i,setWindowState:o}=Pe({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:r,setWindowState:n}=Pe({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[a,l]=d.useState(!0),{t:c}=I.useTranslation(),u=tt(e.elements),p=[];for(const e of u)e?.hidden&&p.push(e.fieldName);const[h,f]=d.useState(p),T={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(T[t.props.fieldName]=t.props.defaultValue);const[A,O]=d.useState([]);let C=null;C=e?.validationSchema?e.validationSchema:ue.object(ot(u));const N=y.useForm({resolver:E.zodResolver(C),defaultValues:T}),R=N.watch(),b=_.useParams(),w=e?.formRouteRecordIdParamName,P=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:w&&b[w]&&(t=b[w]),t){const i=await e.apiActions.loadRecordById(t);if(i){N.reset({...i}),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk({...i},S,N);for(const e of u)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?N.setValue(e.fieldName,i[e.fieldName]+""):N.setValue(e.fieldName,i[e.fieldName]))}}else N.reset({})},S={setFieldValue:(e,t)=>{N.setValue(e,t)},hideField:e=>{f(t=>[...t,e])},showField:e=>{f(t=>t.filter(t=>t!==e))},disableField:e=>{O(t=>[...t,e])},enableField:e=>{O(t=>t.filter(t=>t!==e))}};return d.useEffect(()=>{P()},[e?.recordIdToEdit]),d.useEffect(()=>{l(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(R))},[R]),t.jsxs(t.Fragment,{children:[e?.attachment?t.jsx(i,{children:t.jsx(Io,{attachmentCode:e.attachment.attachmentCode,refKey:R[e?.keyColumnName||"id"],enableAttachment:a})}):t.jsx(t.Fragment,{}),e?.workFlowDocumentCode?t.jsx(r,{children:t.jsx(ko,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:R[e?.keyColumnName||"id"],postActionCallBk:()=>{n(!1),P()},cancelActionCallBk:()=>{n(!1)}})}):t.jsx(t.Fragment,{}),t.jsx(so,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:t.jsx(s.Grid2,{sx:{width:"100%"},container:!0,children:e.elements.map((i,o)=>"group"===i.type?t.jsx(go,{...i.props,formManager:N,formValues:R,formActions:S,hiddenFields:h,disabledFields:A},o):"field"===i.type&&"props"===i.mode?t.jsx(mo,{fieldInfo:i.props,formManager:N,formValues:R,formActions:S,hiddenFields:h,disabledFields:A,formValuesChangeCallBk:e.formValuesChangeCallBk},o):"field"===i.type&&"node"===i.mode?t.jsx(s.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:N,formValues:R})},o):void 0)})}),t.jsxs(so,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[R[e?.keyColumnName||"id"]&&e?.attachment?t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(s.IconButton,{onClick:()=>{o(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})})}):null,R[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(s.IconButton,{onClick:()=>{n(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})})}):null,e?.actions?e.actions.map(i=>!1===i?.isIdRequired?t.jsx(fo,{...i,record:R}):R[e?.keyColumnName||"id"]?!0===i?.formActionProps?.enabled?t.jsx(fo,{...i,record:R}):t.jsx(t.Fragment,{}):void 0):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(s.Button,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:N.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(N.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{g.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:c(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(s.Button,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),N.reset(T)},children:c(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Fo=()=>{const{workflowDocumentCode:e,refDocumentId:i}=_.useParams();return t.jsx(ko,{workFlowDocumentCode:e,refDocumentId:i})},Bo=e=>t.jsx(j.BarChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),qo=e=>t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[t.jsx(s.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:t.jsx("div",{children:e.record[e.valueField]})}),t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),jo=e=>t.jsxs(t.Fragment,{children:[t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(j.Gauge,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),Go=e=>t.jsx(j.LineChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Wo(e){return t.jsxs(W,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(W,{sx:{width:"100%",mr:1},children:t.jsx(G,{variant:"determinate",...e})}),t.jsx(W,{sx:{minWidth:35},children:t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Ho=e=>t.jsxs(W,{sx:{width:"100%"},children:[t.jsx(F,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(Wo,{value:e.record[e.valueField]/e.total*100})]}),Yo=e=>{const i=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return t.jsx(H.PieChart,{series:[{data:i}]})},Ko=e=>{const[i,o]=d.useState(!0),[r,n]=d.useState([]),{handleGetRequest:a}=Re();d.useEffect(()=>{e.loadWidget?(async()=>{o(!0),await a({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{o(!1),n(e.data)},failureCallBkFn:()=>{o(!1),n([])}})})():o(!1)},[e.loadWidget,e.loadCounter]);let l=0;if(1==r.length)l=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of r)l+=t[e.verticalAxisField];return t.jsxs(t.Fragment,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?t.jsxs(s.Box,{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:i?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),t.jsx("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?t.jsx(Bo,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?t.jsx(Go,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?t.jsx(Yo,{data:r,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):t.jsxs(s.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[t.jsx(s.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),r.map((i,o)=>"Card"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(qo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},o)}):"CircularProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(jo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):"LinearProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(Ho,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):void 0)]})})]})},Vo=e=>{const[i,o]=d.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:r,parametersValues:n}=xo({parameters:i?.dashboardParameters||[],initialParameterValues:{}}),[a,l]=d.useState(0),[c,u]=d.useState(!1);d.useEffect(()=>{if(null!=i.dashboardCode&&null!=i.dashboardCode&&""!=i.dashboardCode){u(!1);let e=!0;if(i?.dashboardParameters.length>0)for(const t of i?.dashboardParameters)if(!0===t?.mandatory&&(void 0===n[t.parameterCode]||null===n[t.parameterCode]||""===n[t.parameterCode])){e=!1;break}e&&u(e),l(a+1)}},[i?.dashboardParameters,n]);const p=_.useNavigate(),{handleGetRequest:h,handlePostRequest:f}=Re();return d.useEffect(()=>{e.dashboardCode&&(async()=>{await h({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()},[e.dashboardCode,e.parameters]),t.jsx(t.Fragment,{children:i?t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{p(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),t.jsx(s.Box,{children:i?.dashboardTitle}),t.jsx(s.Box,{sx:{flex:1}})]}),i?.dashboardParameters.length>0?t.jsx(r,{searchBtnClickCallBk:async e=>{l(a+1)}}):t.jsx(t.Fragment,{}),t.jsx(s.Grid2,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:i?.widgets.map((e,i)=>t.jsx(s.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:t.jsx(Ko,{...e,parameterValues:n,loadWidget:c})},i))})]}):t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},zo=()=>{const{dashboardCode:e}=_.useParams();return t.jsx(Vo,{dashboardCode:e})},$o=e=>{const{UserSession:o}=we(),r=i.useSelector(e=>e.AppLayout),n=i.useDispatch(),{handlePostRequest:a}=Re(),[l,c]=d.useState(o.value.currentOrganization.id);return t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[t.jsx(qe,{sx:{width:"100%"},displayField:"ltr"===r.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:l,onChangeCallBack:e=>{c(e)}}),t.jsx(s.Button,{sx:{m:1},variant:"contained",disabled:null==l||l===o.value.currentOrganization.id,onClick:async()=>{await a({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:l},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};n(Ce.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},Qo=f.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Zo,setSideBarState:Jo}=Qo.actions;var Xo=Qo.reducer;function er(e,t){const i=d.useRef(e);d.useEffect(()=>{i.current=e},[e]),d.useEffect(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const tr=s.keyframes`
|
|
32
32
|
0% { transform: scale(1); opacity: 1; }
|
|
33
33
|
25% { transform: scale(1); opacity: 0.6; }
|
|
34
34
|
50% { transform: scale(1); opacity: 1; }
|
|
35
35
|
75% { transform: scale(1); opacity: 0.6; }
|
|
36
36
|
100% { transform: scale(1); opacity: 1; }
|
|
37
|
-
`,ia=e=>{const o=N.useNavigate(),a=i.useSelector(e=>e.AppLayout),{handlePostRequest:r}=Ce();return t.jsxs(t.Fragment,{children:[t.jsxs(d.Button,{fullWidth:!0,onClick:()=>{var t;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&o(e.notificationActionPayload),e?.isNotified||(t=e.id,r({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:t}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[t.jsxs(d.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?t.jsx(T.FontAwesomeIcon,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):t.jsx(t.Fragment,{}),"ltr"===a.appDirection?e.notificationEnText:e.notificationArText,t.jsx(d.Box,{sx:{flex:1}}),e?.isNotified?t.jsx(t.Fragment,{}):t.jsxs(d.Typography,{color:"warning",sx:{animation:`${ta} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[t.jsx(T.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===a.appDirection?"New":"جديد"]})]}),t.jsxs(d.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[t.jsx(d.Box,{sx:{marginRight:1,marginLeft:1},children:mo(e.createTime,a.appDirection)}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(d.Box,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?t.jsx(d.Divider,{flexItem:!0}):t.jsx(t.Fragment,{})]})},oa=()=>{const{UserInfo:e}=De(),[o,a]=s.useState(null),{handleGetRequest:r,handlePostRequest:n}=Ce(),l=N.useNavigate(),p=i.useSelector(e=>e.AppLayout),[c,u]=s.useState(!1),[m,A]=s.useState([]);ea(()=>{!0===e.isAuthenticated&&r({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>m.length&&_.toast.info("ltr"===p.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===p.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),A(e.data)}})},1e3);return t.jsx(d.ClickAwayListener,{onClickAway:()=>{u(!1)},children:t.jsxs("div",{style:{cursor:"pointer"},children:[t.jsx(d.IconButton,{color:"inherit",onClick:e=>{a(e.currentTarget),u(!c)},sx:{marginRight:1,marginLeft:1},children:t.jsx(d.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===p.appDirection?"right":"left"},badgeContent:m.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:t.jsx(T.FontAwesomeIcon,{icon:"bell"})})}),t.jsx(d.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:c,anchorEl:o,dir:p.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>t.jsx(d.Fade,{...e,timeout:350,children:t.jsxs(d.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsx(d.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[t.jsx(T.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===p.appDirection?"Notifications":"الاشعارات"]})}),0==m.length?t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:t.jsx(d.Box,{children:"ltr"===p.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):t.jsx(t.Fragment,{}),t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:m.map((e,i)=>t.jsx(ia,{...e,setOpen:u,showDivider:i<m.length-1}))}),t.jsx(d.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsx(d.Button,{sx:{textTransform:"none"},onClick:()=>{l("myNotifications")},children:"ltr"===p.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},aa=e=>{const[i,o]=s.useState(""),[a,r]=s.useState(""),[n,l]=s.useState(""),{handlePostRequest:p}=Ce();return t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[t.jsxs(d.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),t.jsx(d.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?t.jsx(Fe,{label:"Current Password",value:i,onChange:e=>{o(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):t.jsx(t.Fragment,{}),t.jsx(Fe,{label:"New Password",value:a,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(Fe,{label:"Confirm New Password",value:n,onChange:e=>{l(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(d.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==i&&""!==i.trim()?null!==a&&""!==a&&null!==n&&""!==n&&a==n?await p({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:i,newPassword:a},successCallBkFn:()=>{e.onSuccessCallBk(),_.toast.success("Your request has been processed successfully")},showMask:!0}):_.toast.error("You must enter new password in required fields and must be identical"):_.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},ra=d.styled(u,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=i.useSelector(e=>e.AppLayout),o=ue();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:o?void 0:"calc(100% - 350px)",marginLeft:o||"ltr"!==t.appDirection?void 0:"350px",marginRight:o||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),na=()=>{const{Window:e,setWindowState:o}=Pe({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),a=i.useSelector(e=>e.AppInfo.value),[r,n]=s.useState(null),l=()=>{n(null)},p=e=>{n(e.currentTarget)},c=i.useSelector(e=>e.AppLayout),u=i.useSelector(e=>e.SideBar),{UserSession:A}=De(),_=A.value.currentOrganization,{Window:f,setWindowState:E}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:O}=Ce(),N=ue(),y=i.useDispatch();return t.jsxs(t.Fragment,{children:[t.jsx(f,{children:t.jsx(aa,{selectedPerson:A.value,isSelfService:!0,onSuccessCallBk:()=>{E(!1)}})}),t.jsx(d.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:r,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(r),onClose:l,children:t.jsx(d.MenuItem,{onClick:()=>{E(!0),l()},children:t.jsx(d.Typography,{sx:{textAlign:"center"},children:"Change Password"})})}),t.jsx(e,{children:t.jsx(Qo,{successChangeCallBackFn:()=>{o(!1)}})}),t.jsx(ra,{position:"fixed",open:u.isOpened,children:t.jsxs(m,{children:[t.jsx(d.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{y($o())},edge:"start",sx:[{mr:"ltr"===c.appDirection?2:void 0,ml:"rtl"===c.appDirection?2:void 0},u.isOpened&&{display:"none"}],children:t.jsx(T.FontAwesomeIcon,{icon:"bars"})}),t.jsx(fo,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:A.value.currentOrganization.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),t.jsx(d.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:N?"":`${a.appName} - ${"ltr"===c.appDirection?_?.organizationEnName:_?.organizationArName}`}),t.jsx(d.Tooltip,{title:"light"===c.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:t.jsx(d.IconButton,{color:"inherit",onClick:()=>{y(_e.setThemeMode("light"===c.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===c.themeMode?"dark":"light")},children:"light"===c.themeMode?t.jsx(T.FontAwesomeIcon,{icon:"moon"}):t.jsx(T.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),t.jsx(d.Tooltip,{title:"ar"===I.language?"Change Language To English":"Change Language To Arabic",children:t.jsx(d.IconButton,{color:"inherit",onClick:()=>{let e="ar"===I.language?"en":"ar";var t;t=e,I.changeLanguage(t),localStorage.setItem("language",t),y(_e.setAppDirection("ar"===e?"rtl":"ltr"))},children:t.jsx(T.FontAwesomeIcon,{icon:"language"})})}),A.value?.userOrganizations&&A.value?.userOrganizations.length>1?t.jsx(d.Tooltip,{title:"Change Current Organization",children:t.jsx(d.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:t.jsx(T.FontAwesomeIcon,{icon:"globe"})})}):t.jsx(t.Fragment,{}),!0===a?.enableUINotifications?t.jsx(oa,{}):t.jsx(t.Fragment,{}),t.jsx("div",{onClick:p,style:{cursor:"pointer"},children:t.jsx(fo,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:A.value?.id+""})}),t.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:p,children:N?"":A.value?.username}),t.jsx(d.IconButton,{color:"inherit",onClick:async()=>{try{await O({endPointURI:"api/auth/logout"})}catch(e){}y(Re.setUnAuthenticated())},children:t.jsx(T.FontAwesomeIcon,{rotation:"rtl"===c.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},da=d.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),la=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=la(e,i.children);if(t)return t}}},sa=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.organization",label:"Organization Info",authority:"DEVELOPMENT_ADMIN",icon:"globe",children:[{id:"development_admin.organization.modules",label:"Subscriped Modules",icon:"layer-group",authority:"ORGANIZATION_ADMIN",action:"NAVIGATION",actionPayload:{path:"admin/org/apps"}},{id:"development_admin.organization.unitTypes",label:"Organization Unit Types",icon:"tags",action:"NAVIGATION",actionPayload:{path:"admin/org/unit/types"}},{id:"development_admin.organization.units",label:"Organization Units",icon:"folder-tree",action:"NAVIGATION",actionPayload:{path:"admin/org/units"}},{id:"development_admin.organization.ranks",label:"Organization Ranks",icon:"street-view",action:"NAVIGATION",actionPayload:{path:"admin/org/ranks"}}]},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",authority:"DEVELOPMENT_ADMIN",icon:"code",children:[{id:"system_admin.devtools.modules",label:"System Modules",icon:"layer-group",action:"NAVIGATION",actionPayload:{path:"dev/system/modules"}},{id:"system_admin.devtools.authorities",label:"System Authorities",icon:"key",action:"NAVIGATION",actionPayload:{path:"dev/system/authorities"}},{id:"system_admin.devtools.roles",label:"System Roles",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"system_admin.devtools.lookups",label:"System Lookups",icon:"list-check",action:"NAVIGATION",actionPayload:{path:"dev/system/lookups"}},{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.AttachmentConfig",label:"ATTACHMENT_CONFIG_PLURAL",icon:"paperclip",action:"NAVIGATION",actionPayload:{path:"dev/attachmentconfigs"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",authority:"DEVELOPMENT_ADMIN",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}],{icon:"user",label:"Example Grid",id:"example",action:"NAVIGATION",actionPayload:{path:"example"}}];function pa(){return t.jsx(Y,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const ca=p.styled(X.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${Z.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),ua=p.styled(X.TreeItem2Content)(({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:p.alpha(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}})),ma=z.animated(H);function Ta(e){const i=z.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return t.jsx(ma,{style:i,...e})}const Aa=p.styled(B)({color:"inherit",fontWeight:500});function _a({icon:e,expandable:o,children:a,...r}){const{t:n}=E.useTranslation(),d=i.useSelector(e=>e.AppLayout);return t.jsxs(X.TreeItem2Label,{...r,sx:{display:"flex",alignItems:"center",padding:1},children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:"ltr"===d.appDirection?7:void 0,marginLeft:"rtl"===d.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),t.jsx(Aa,{variant:"body2",sx:{fontSize:16},children:n(a)}),o&&t.jsx(pa,{})]})}const fa=e=>Array.isArray(e)?e.length>0&&e.some(fa):Boolean(e),Ia=pe.forwardRef(function(e,i){const{id:o,itemId:a,label:r,disabled:n,children:d,...l}=e,{getRootProps:s,getContentProps:p,getIconContainerProps:c,getCheckboxProps:u,getLabelProps:m,getGroupTransitionProps:T,getDragAndDropOverlayProps:A,status:_,publicAPI:f}=$.useTreeItem2({id:o,itemId:a,children:d,label:r,disabled:n,rootRef:i}),I=f.getItem(a),E=fa(d);return t.jsx(ee.TreeItem2Provider,{itemId:a,children:t.jsxs(ca,{...s(l),children:[t.jsxs(ua,{...p({className:ro("content",{"Mui-expanded":_.expanded,"Mui-selected":_.selected,"Mui-focused":_.focused,"Mui-disabled":_.disabled})}),children:[t.jsx(X.TreeItem2IconContainer,{...c(),children:t.jsx(J.TreeItem2Icon,{status:_})}),t.jsx(X.TreeItem2Checkbox,{...u()}),t.jsx(_a,{...m({icon:I?.icon||"book",expandable:E&&_.expanded})}),t.jsx(te.TreeItem2DragAndDropOverlay,{...A()})]}),d&&t.jsx(Ta,{...T()})]})})});function Ea(){const e=N.useNavigate(),o=i.useSelector(e=>e.AppLayout),a=i.useSelector(e=>e.AppInfo.value);i.useDispatch();const r=ue(),{isUserAuthorized:n,isCurrentOrganizationAuthorizedToModule:d}=De(),l=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||n(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||d(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=l(i.children)),t.push(e)}return t},s=[];a.enableAdministrationModule&&s.push(...structuredClone(sa)),s.push(...structuredClone(a.businessNavigationItems));const p=l(s);return t.jsx(Q.RichTreeView,{items:p,onItemClick:(t,i)=>{const o=la(i,s);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:me,direction:o.appDirection,maxHeight:r?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Ia}})}const Oa=()=>{const e=i.useSelector(e=>e.AppInfo.value),{UserSession:o}=De(),a=o.value.currentOrganization,r=d.useTheme(),n=i.useSelector(e=>e.AppLayout),l=i.useSelector(e=>e.SideBar),s=i.useDispatch();return t.jsxs(K,{sx:{width:me,flexShrink:0,"& .MuiDrawer-paper":{width:me,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===n.appDirection?"left":"right",open:l.isOpened,children:[t.jsxs(da,{children:[t.jsxs(d.Box,{sx:{width:"100%"},children:[t.jsx(d.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[t.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===n.appDirection?a?.organizationEnName:a?.organizationArName}`}),t.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),t.jsx(q,{onClick:()=>{s($o())},children:"ltr"===r.direction?t.jsx(T.FontAwesomeIcon,{icon:"angle-left"}):t.jsx(T.FontAwesomeIcon,{icon:"angle-right"})})]}),t.jsx(b,{}),t.jsx(Ea,{})]})},Na=ae({key:"muirtl",stylisPlugins:[oe.prefixer,ie]}),ya=ae({key:"mui"}),ha=e=>{const[i,o]=s.useState([]),[a,r]=s.useState([]),{handlePostRequest:n,handleGetRequest:l}=Ce();s.useEffect(()=>{e.selectedRecord&&(async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),r(e.data.availableRoles)}})})()},[e.selectedRecord]);return t.jsxs(t.Fragment,{children:[t.jsx(Be,{displayField:"roleName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:i,successCallBkFn:()=>{_.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(d.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Ra=e=>{const[o,a]=s.useState(null),{Window:r,setWindowState:n}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),d=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),p=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:c}=E.useTranslation(),[u,m]=s.useState([]),T=Ue({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:m}),A=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(ha,{selectedRecord:o,closeModalFn:()=>{n(!1)}})}),t.jsx(bo,{apiActions:T,hideInfoBar:!0,data:u,setData:m,editMode:{editMode:"row"},formElements:A,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{a(e),n(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async t=>(t.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},La=()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),r=Ue({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:a}),{handleGetRequest:n}=Ce(),d=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),l=i.useDispatch();return t.jsx(bo,{apiActions:r,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",postActionCallBack:()=>{(async()=>{await n({endPointURI:d.url,showMask:!1,successCallBkFn:e=>{l(be({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{l(be({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Ca=()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),{handleGetRequest:r}=Ce(),n=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),d=i.useDispatch(),l=Ue({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:a}),p=[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:l,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{d(be({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{d(be({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ga=()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return t.jsx(bo,{apiActions:a,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},Da=()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),r=Ue({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:a}),n=i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:d}=Ce(),l=[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:r,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},Pa=()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},xa=e=>{const[i,o]=s.useState([]),[a,r]=s.useState([]),{handlePostRequest:n,handleGetRequest:l}=Ce();s.useEffect(()=>{e.roleId&&(async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[e.roleId]);return t.jsxs(t.Fragment,{children:[t.jsx(Be,{displayField:"authorityName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:i,successCallBkFn:()=>{_.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(d.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},ba=()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),[a,r]=s.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),l=Ue({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:o});return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(xa,{roleId:a?.id,closeModalFn:()=>{d(!1)}})}),t.jsx(bo,{apiActions:l,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{r(e),d(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Ma=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:a}=E.useTranslation(),[r,n]=s.useState([]),d=Ue({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:d,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:a("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},Sa=()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:e,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(bo,{apiActions:n,data:a,setData:r,hideInfoBar:!0,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Ua=e=>{const{t:o}=E.useTranslation(),a=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[r,n]=s.useState([]),d=Ue({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(bo,{apiActions:d,data:r,hideInfoBar:!0,setData:n,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Fa=[{value:"FILE_SYSTEM"},{value:"SFTP"}],wa=(e,t,i,o,a)=>{o?("useSysDatasource"===o&&1==a?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===a?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===a?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===a?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},va=e=>{const{t:i}=E.useTranslation(),[o,a]=s.useState([]),r=Ue({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:a});return t.jsx(bo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!uo(t.recipientMail)?(_.toast.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Ba=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),d=Ue({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:r}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(bo,{apiActions:d,data:a,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:l,keyColumnName:"id",gridTitle:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},ka=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:a}=E.useTranslation(),[r,n]=s.useState([]),d=Ue({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(bo,{apiActions:d,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:a("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},ja={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},Ga=(e,t,i)=>{if(e&&ja[e]){const o=ja[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Wa=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:r}),d=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:n,data:a,setData:r,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:l,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Ya=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:n,data:a,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Va=e=>{const[i,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=E.useTranslation(),{handleGetRequest:d}=Ce(),[l,p]=s.useState([]);s.useEffect(()=>{(async()=>{await d({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{p(e.data)}})})()},[e.selectedRecord]);const[c,u]=s.useState([]),m=Ue({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:l,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Ya,{selectedRecord:i})}),t.jsx(bo,{apiActions:m,data:c,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:u,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{o(e),r(!0)}}],formElements:T,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},qa=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=i.useSelector(e=>e.commonStores.stores.SystemWidgets.data),d=Ue({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:r}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:d,data:a,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Ka=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(fo,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(t.Fragment,{children:t.jsx(bo,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:r,keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:Ra,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:La,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Ca,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:ga,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState(null),{UserInfo:r}=De(),n=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),l=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[p,c]=s.useState([]),u=Ue({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:c}),[m,T]=s.useState(null),{Window:A,setWindowState:f}=Pe({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:I,setWindowState:O}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:N,setWindowState:y}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),h=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsxs(t.Fragment,{children:[t.jsx(I,{children:t.jsx(ha,{selectedRecord:m,closeModalFn:()=>{O(!1)}})}),t.jsx(A,{children:t.jsx(Ra,{selectedPerson:o})}),t.jsx(N,{children:t.jsx(aa,{selectedPerson:o,isSelfService:!1,onSuccessCallBk:()=>{y(!1)}})}),t.jsx(bo,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:u,data:p,setData:c,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:h,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{a(e),y(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{T({organizationId:r?.currentOrganization?.id,id:e?.organizationMemberId}),O(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{a(e),f(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(_.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(_.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/org/admin/systemapplication/all",deleteById:"api/v1/org/admin/systemapplication",save:"api/v1/org/admin/systemapplication",findById:"api/v1/org/admin/systemapplication",setData:o});return t.jsx(t.Fragment,{children:t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:Da,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Pa,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:ba,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=E.useTranslation(),{handleGetRequest:o}=Ce(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/org/admin/organizationapplicationmodule/all",deleteById:"api/org/v1/admin/organizationapplicationmodule",save:"api/v1/org/admin/organizationapplicationmodule",findById:"api/org/v1/admin/organizationapplicationmodule",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:n,data:a,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:ga,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Ca,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:La,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=E.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[a,r]=s.useState([]),n=Ue({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}}];return t.jsx(bo,{apiActions:n,data:a,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:d,keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[e,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),n=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=E.useTranslation(),[l,p]=s.useState([]),c=Ue({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:p}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:n,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Ma,{selectedRecord:e})}),t.jsx(bo,{apiActions:c,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),r(!0)},icon:"p"}],data:l,setData:p,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:u,keyColumnName:"id",gridTitle:d("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,i,o,a)=>{o?"useSysCon"===o&&1==a?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Ce(),o=i.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:a}=E.useTranslation(),[r,n]=s.useState([]),d=Ue({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:n,commonStoreKey:"SystemDataSources"}),l=[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:o,comboboxValueDataType:"string",optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:l,keyColumnName:"id",gridTitle:a("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{_.toast.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=E.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[a,r]=s.useState([]),n=Ue({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:o,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:n,data:a,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:d,keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,a,r)=>{o?"parameterType"===o?("combobox"===a?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===a||"datetime"===a?(t.showField("parameterValueFormat"),"date"===a?i.setValue("parameterValueFormat",Ge):i.setValue("parameterValueFormat",We)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=a&&""!=a?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=a&&""!=a?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",Ge)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",We)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:Sa,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:d,setWindowState:l}=Pe({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[p,c]=s.useState([]),u=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),m=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),T=i.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),A=Ue({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:c}),f=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:Fa,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:u,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:T,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:m,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Fo,{reportCode:o?.reportCode,resultMode:"App"})}),t.jsx(d,{children:t.jsx(Ua,{selectedRecord:o})}),t.jsx(bo,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:A,data:p,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{a(e),l(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{a(e),n(!0)}}],formProps:{formValuesChangeCallBk:wa},formElements:f,keyColumnName:"id",gridTitle:e("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(_.toast.error("You must choose the report query"),!1):(_.toast.error("You must choose the report blueprint"),!1):(_.toast.error("You must enter the jasper report name"),!1):(_.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),o=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[a,r]=s.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:l,setWindowState:p}=Pe({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:c,setWindowState:u}=Pe({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:m}=E.useTranslation(),[T,A]=s.useState([]),f=Ue({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:A}),I=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:o,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(va,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),t.jsx(l,{children:t.jsx(Ba,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),t.jsx(c,{children:t.jsx(ka,{selectedRecord:a,callBkFn:()=>{u(!1)}})}),t.jsx(bo,{apiActions:f,data:T,setData:A,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:I,keyColumnName:"id",gridTitle:m("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{r(e),d(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{r(e),p(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{r(e),u(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(_.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(_.toast.error("You must specifiy the period value since this email is periodical"),!1):(_.toast.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,a){Ga(t,o,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:r,keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{Ga(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Document Status",windowIcon:"tag"}),{Window:n,setWindowState:d}=Pe({windowTitle:"Document Action",windowIcon:"stamp"}),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),p=i.useSelector(e=>e.commonStores.stores.SystemReports.data),c=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:u}=E.useTranslation(),[m,T]=s.useState([]),A=Ue({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:T}),_=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:l,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:p,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Wa,{selectedRecord:e})}),t.jsx(n,{children:t.jsx(Va,{selectedRecord:e})}),t.jsx(bo,{apiActions:A,data:m,setData:T,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),r(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),d(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:u("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:_,keyColumnName:"id",gridTitle:u("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=E.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),a=i.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[r,n]=s.useState([]),d=Ue({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:a,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}];return t.jsx(bo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:l,keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,d]=s.useState([]),l=N.useNavigate(),p=Ue({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:d});return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(qa,{selectedRecord:i})}),t.jsx(bo,{apiActions:p,data:n,setData:d,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{o(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{l("/dashboard/"+e.dashboardCode)}}],gridTitle:e("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:Ho},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),{handlePostRequest:r}=Ce(),n=Ue({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:a}),d=i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}];return t.jsx(bo,{apiActions:n,disableDefaultAction:!0,data:o,setData:a,editMode:{editMode:"none"},formElements:l,rowActions:[{actionFn:async e=>{(async e=>{await r({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{n.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:Da},{path:"dev/system/roles",component:ba},{path:"dev/system/lookups",component:Sa},{path:"dev/system/modules",component:Pa},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:Fa,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}];return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:r,keyColumnName:"id",gridTitle:e("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),r=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),n=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=Ue({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:a}),p=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:n,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",comboboxValueDataType:"string",options:r,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?t.jsx(T.FontAwesomeIcon,{icon:e.row.notificationIcon}):t.jsx(t.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:l,data:o,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:p,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:e}=De(),o=i.useSelector(e=>e.AppLayout),{handleGetRequest:a,handlePostRequest:r}=Ce(),[n,l]=s.useState([]),p=i.useSelector(e=>e.AppInfo.value),c=()=>{!0===e.isAuthenticated&&a({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{l(e.data)}})};return!0===p?.enableUINotifications&&ea(c,1e3),t.jsxs(t.Fragment,{children:[t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.Box,{sx:{flex:1}}),t.jsxs("h3",{children:[t.jsx(T.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===o.appDirection?"Notifications":"الاشعارات"]}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(d.Button,{sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),t.jsx(d.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),t.jsx(d.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:t.jsx(d.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:n.map((e,i)=>t.jsx(ia,{...e,showDivider:i<n.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Bo}]],{path:"example",component:()=>{const[e,i]=s.useState([]),o=[{value:1,display:"Male"},{value:2,display:"Female"}],a=Ue({findAll:void 0,commonStoreKey:void 0,deleteById:void 0,deleteByIdParamName:void 0,findById:void 0,findByIdParamName:void 0,save:void 0,setData:i}),r=[{mode:"props",props:{fieldLabel:"ID",fieldName:"id",fieldType:"number"},type:"field"},{mode:"props",props:{fieldLabel:"Gender",fieldName:"gender",fieldType:"combobox",options:o,optionValueField:"value",optionDisplayField:"display",formProps:{onValueChangeCallBack(e,t,i,o,a){1==t?(o.disableField("bithdate"),i.setValue("bithdate",new Date),i.setValue("active",!0),i.setValue("type",t)):(o.enableField("bithdate"),i.setValue("bithdate",null),i.setValue("active",!1)),i.setValue("type",t)}}},type:"field"},{mode:"props",props:{fieldLabel:"Gender",fieldName:"type",fieldType:"combobox",options:o,optionValueField:"value",optionDisplayField:"display"},type:"field"},{mode:"props",props:{fieldLabel:"Name",fieldName:"name",required:!0,fieldType:"text",gridProps:{hidden:!1},formProps:{onValueChangeCallBack(e,t,i,o,a){}}},type:"field"},{mode:"props",props:{fieldLabel:"Birthdate",fieldName:"bithdate",required:!0,fieldType:"date",gridProps:{hidden:!1}},type:"field"},{mode:"props",props:{fieldLabel:"Active",fieldName:"active",required:!0,fieldType:"checkbox",gridProps:{hidden:!1}},type:"field"}];return t.jsx(bo,{apiActions:a,data:e,setData:i,editMode:{editMode:"modal",specs:{modalTitle:"Example Modal Form",modalIcon:"user"}},formElements:r,girdIcon:"user",gridTitle:"Example Grid "})}}],za=e=>{const{isUserAuthorized:i,isCurrentOrganizationAuthorizedToModule:o}=De();return e?.applicationModule&&!o(e?.applicationModule)?t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!i(e.authority)?t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):t.jsx(t.Fragment,{children:e.children})},Ha=()=>{const e=i.useSelector(e=>e.AppLayout),o=i.useSelector(e=>e.AppInfo.value),a=i.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:r}=De(),n=i.useDispatch(),{show:p,hide:c}=ye(),u=i.useSelector(e=>e.commonStores),[m,T]=s.useState(!1),{isUserAuthorized:A}=De(),{handleGetRequest:_}=Ce();return s.useEffect(()=>{u?.storeKeys&&(async()=>{p("Loading ... please wait"),T(!1);const e=u.stores,t=u.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!A(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||_({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{n(be({storeKey:i,data:e.data}))},failureCallBkFn:()=>{n(be({storeKey:i,data:[]}))}});T(!0),c()})()},[u.storeKeys,r?.currentOrganization]),t.jsxs(l.CacheProvider,{value:"ltr"===e.appDirection?ya:Na,children:[t.jsx(d.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:t.jsxs(N.Routes,{children:[o.enableAdministrationModule?Ka.map((e,i)=>t.jsx(N.Route,{path:e.path,element:t.jsx(za,{authority:e.authority,applicationModule:e.applicationModule,children:t.jsx(e.component,{})})},"adm"+i)):null,a.map((e,i)=>t.jsx(N.Route,{path:e.path,element:t.jsx(za,{authority:e.authority,children:t.jsx(e.component,{})})},"bs"+i))]})}),")"]})},Qa=p.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ne.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ne.grey[900]})}));function Za(e){const{window:o}=e,a=i.useSelector(e=>e.SideBar),r=i.useSelector(e=>e.AppInfo.value),n=i.useDispatch(),l=e=>{n(Xo(e))},s=void 0!==o?()=>o().document.body:void 0;return t.jsx(de,{container:s,anchor:"bottom",open:a.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[t.jsx(Qa,{}),t.jsx(d.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:t.jsx(Ea,{})}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[t.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:r.appName}),t.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",r.appVersion]})]})]})})}const $a=()=>{const{t:e}=E.useTranslation(),o=i.useSelector(e=>e.loadingMask.value),a=i.useSelector(e=>e.AppLayout);return t.jsxs(d.Backdrop,{dir:a.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[t.jsx(d.CircularProgress,{color:"inherit"}),t.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Xa=()=>{const e=i.useSelector(e=>e.AppInfo.value),[o,a]=s.useState(""),[r,n]=s.useState(""),[p,c]=s.useState(!1),u=i.useSelector(e=>e.UserSession.value),m=i.useDispatch(),T=async()=>{if(null==o||""==o)return void _.toast.error("username is required to proceed");if(null==r||""==r)return void _.toast.error("password is required to proceed");c(!0);let t=null;try{if(t=await f.post(`${e.apiBaseUrl}/api/auth/login`,{username:o,password:r},{withCredentials:!0}),null!=t.data&&""!==t.data){c(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),m(Re.setAuthenticated(e))}}catch(e){c(!1),_.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},A=i.useSelector(e=>e.UserSession.value),I=d.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||qe} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||qe},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}});return s.useEffect(()=>{console.log("checking usersession on reload",A),console.log("checking usersession app info",e),(async()=>{if(e?.apiBaseUrl&&null==A.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await f.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};m(Re.setAuthenticated(e))}else m(Re.setUnAuthenticated())}catch(e){m(Re.setUnAuthenticated())}}})()},[e,A.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:I,children:t.jsx(d.Paper,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==u.isAuthenticated?t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:e?.appLogo,width:150,height:150}),t.jsx(d.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),t.jsxs(d.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(d.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),t.jsx(d.TextField,{label:"password",sx:{width:300,m:1},value:r,type:"password",onChange:e=>{n(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),t.jsx(d.Button,{loading:p,onClick:T,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):t.jsxs(t.Fragment,{children:[t.jsx(d.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})})},Ja=()=>{const[e,o]=s.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:a}=Ce(),r=i.useSelector(e=>e.AppInfo.value);return s.useEffect(()=>{if(r?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{r?.checkLicense?.endpoint&&await a({endPointURI:r.checkLicense?.endpoint,successCallBkFn:e=>{o(e.data)}})})()},r?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[r]),e.isLicensed?t.jsx(t.Fragment,{}):t.jsxs(d.Box,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[t.jsx("img",{src:r.appLogo,style:{height:200,width:200}}),t.jsxs(d.Typography,{variant:"h5",children:[r.appName," - ",r.appVersion]}),t.jsx(d.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),t.jsx(d.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),t.jsxs(d.Typography,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),t.jsxs(d.Typography,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},er=p.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const o=i.useSelector(e=>e.AppLayout),a=p.useTheme(),r=ue();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&t?"calc(100% - 350px)":"100%",direction:o.appDirection,justifyContent:"flex-start",transition:!0===t?a.transitions.create(["margin","width"],{easing:a.transitions.easing.easeOut,duration:a.transitions.duration.enteringScreen}):a.transitions.create(["margin","width"],{easing:a.transitions.easing.sharp,duration:a.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==o.appDirection||!0!==t?0:me+"px",marginRight:r||"rtl"!==o.appDirection||!0!==t?0:me+"px"}});function tr(){const e=i.useSelector(e=>e.SideBar),o=ue(),a=i.useSelector(e=>e.UserSession),r=i.useSelector(e=>e.AppLayout);return t.jsxs(N.BrowserRouter,{children:[t.jsx(_.ToastContainer,{rtl:"rtl"===r.appDirection,draggable:!0,position:"bottom-center"}),t.jsx($a,{}),!0===a.value.isAuthenticated?t.jsxs(er,{open:e.isOpened,children:[t.jsx(c,{}),t.jsx(na,{}),o?null:t.jsx(Oa,{}),o?t.jsx(Za,{}):null,t.jsx(da,{}),t.jsx(Ha,{}),t.jsx(Ja,{})]}):t.jsx(Xa,{})]})}const ir=A.createSlice({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),or=ir.actions;var ar=ir.reducer;const rr={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/public/organization/all",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organization/ranks/all",data:[]},CurrentOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organizationunit/all",data:[]},SystemOrganizationUnitType:{autoLoad:!0,url:"api/v1/public/organizationunittype/all",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"},SystemApplicationModules:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"}},nr=e=>{const o=i.useDispatch();le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||Ye} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:e.appTheme?.light?.primaryColor||Ye},secondary:{main:e.appTheme?.light?.secondaryColor||Ve},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||qe} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||qe},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},n=i.useSelector(e=>e.AppLayout);let p={...a};"dark"===n.themeMode&&(p={...r});const c=d.createTheme({direction:n.appDirection,...p});return s.useEffect(()=>{document.title=e.documentTitle,o(or.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...rr}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),o(Me(t))},[e]),t.jsx(l.ThemeProvider,{theme:c,children:t.jsx(tr,{})})};var dr={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},lr={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"Member Role",ORGANIZATION_MEMBER_ROLE_PLURAL:"Member Roles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ROLES:"System Roles",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"Application Authority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"Application Authorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"Application Module",ORGANIZATION_APPLICATION_MODULE_PLURAL:"Application Modules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const sr={...dr,...lr,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"Dashboard Widget",DASHBOARD_WIDGET_PLURAL:"Dashboard Widgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"Query Parameter",DATA_QUERY_PARAMETER_PLURAL:"Query Parameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"Excel Uploader Detail",EXCEL_UPLOADER_DETAIL_PLURAL:"Excel Uploader Details",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"Excel Uploader Header",EXCEL_UPLOADER_HEADER_PLURAL:"Excel Uploader Headers",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"Lookup",LOOKUP_PLURAL:"Lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"Mail Attachment",MAIL_ATTACHMENT_PLURAL:"Mail Attachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"Mail Body",MAIL_BODY_PLURAL:"Mail Bodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_PLURAL:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"Mail Recipient",MAIL_RECIPIENT_PLURAL:"Mail Recipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"Notification",NOTIFICATION_PLURAL:"Notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"Notification Queue",NOTIFICATION_QUEUE_PLURAL:"Notification Queue",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"Report Parameter",REPORT_PARAMETER_PLURAL:"Report Parameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"User Request",USER_REQUEST_PLURAL:"User Requests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"Workflow Document Action",WORKFLOW_DOCUMENT_ACTION_PLURAL:"Workflow Document Actions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"Workflow Document Action Mail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"Workflow Document Action Mails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"Workflow Document Mail Log",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"Workflow Document Mail Logs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"Workflow Document Status",WORKFLOW_DOCUMENT_STATUS_PLURAL:"Workflow Document Statuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};var pr={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},cr={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"المستخدمين",ROLES:"الصلاحيات",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};const ur={...pr,...cr,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};o.library.add(a.fab),o.library.add(r.far),o.library.add(n.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return i.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return i.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return T.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return _.toast}}),exports.axios=f,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return E.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return O.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return N.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return N.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return y.zodResolver}}),exports.z=ce,exports.AttachmentCard=Io,exports.AttachmentImageViewer=fo,exports.AttachmentPanel=Eo,exports.BaseApp=e=>{const[o,a]=s.useState({AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Jo,AppInfo:ar}),r=A.configureStore({reducer:o}),[n,d]=s.useState(!1);return s.useEffect(()=>{(()=>{const t={AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Jo,AppInfo:ar,...e?.businessReduxReducers};a(e=>({...t}));const i={en:{translation:{...sr,...e?.businessLocals?.en}},ar:{translation:{...ur,...e?.businessLocals?.ar}}};I.use(E.initReactI18next).init({resources:i,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),d(!0)})()},[e]),n?t.jsx(i.Provider,{store:r,children:t.jsx(nr,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=ke,exports.ComboBox=je,exports.DARK_THEME_INITIAL_MAIN_COLOR=qe,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=Ge,exports.DATE_TIME_FORMAT=We,exports.DashboardRouteView=Ho,exports.DashboardViewer=zo,exports.Datefield=ze,exports.DatetimeField=He,exports.ExcelReportViewer=So,exports.FormElement=To,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=Ye,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=Ve,exports.ReportViewer=Fo,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=ko,exports.TemplateDataCard=jo,exports.TemplateForm=vo,exports.TemplateGauge=Go,exports.TemplateGrid=bo,exports.TemplateLineChart=Wo,exports.TemplateLineProgress=Vo,exports.TemplatePieChart=qo,exports.TemplateTextField=Fe,exports.TransferList=Be,exports.WorkflowDocumentPanel=wo,exports.WorkflowDocumentTimeLine=Oo,exports.WorkflowRouteComponent=Bo,exports.capitalizeFirstLetter=co,exports.constructGridColumnsFromFields=it,exports.constructValidationSchema=ot,exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=at,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=so,exports.isNumeric=po,exports.isValidEmail=uo,exports.timeAgo=mo,exports.useApiActions=Ue,exports.useAxios=Ce,exports.useConfirmationWindow=ge,exports.useIsMobile=ue,exports.useLoadingMask=ye,exports.useSession=De,exports.useWindow=Pe,Object.keys(d).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return d[e]}})}),Object.keys(k).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return k[e]}})}),Object.keys(j).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return j[e]}})});
|
|
37
|
+
`,ir=e=>{const o=_.useNavigate(),r=i.useSelector(e=>e.AppLayout),{handlePostRequest:n}=Re();return t.jsxs(t.Fragment,{children:[t.jsxs(s.Button,{fullWidth:!0,onClick:()=>{var t;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&o(e.notificationActionPayload),e?.isNotified||(t=e.id,n({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:t}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[t.jsxs(s.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):t.jsx(t.Fragment,{}),"ltr"===r.appDirection?e.notificationEnText:e.notificationArText,t.jsx(s.Box,{sx:{flex:1}}),e?.isNotified?t.jsx(t.Fragment,{}):t.jsxs(s.Typography,{color:"warning",sx:{animation:`${tr} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===r.appDirection?"New":"جديد"]})]}),t.jsxs(s.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:ho(e.createTime,r.appDirection)}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?t.jsx(s.Divider,{flexItem:!0}):t.jsx(t.Fragment,{})]})},or=()=>{const{UserInfo:e}=we(),[o,r]=d.useState(null),{handleGetRequest:n,handlePostRequest:a}=Re(),l=_.useNavigate(),c=i.useSelector(e=>e.AppLayout),[u,p]=d.useState(!1),[h,f]=d.useState([]);er(()=>{!0===e.isAuthenticated&&n({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>h.length&&g.toast.info("ltr"===c.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===c.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),f(e.data)}})},1e3);return t.jsx(s.ClickAwayListener,{onClickAway:()=>{p(!1)},children:t.jsxs("div",{style:{cursor:"pointer"},children:[t.jsx(s.IconButton,{color:"inherit",onClick:e=>{r(e.currentTarget),p(!u)},sx:{marginRight:1,marginLeft:1},children:t.jsx(s.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===c.appDirection?"right":"left"},badgeContent:h.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:t.jsx(m.FontAwesomeIcon,{icon:"bell"})})}),t.jsx(s.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:u,anchorEl:o,dir:c.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>t.jsx(s.Fade,{...e,timeout:350,children:t.jsxs(s.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===c.appDirection?"Notifications":"الاشعارات"]})}),0==h.length?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:t.jsx(s.Box,{children:"ltr"===c.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:h.map((e,i)=>t.jsx(ir,{...e,setOpen:p,showDivider:i<h.length-1}))}),t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsx(s.Button,{sx:{textTransform:"none"},onClick:()=>{l("myNotifications")},children:"ltr"===c.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},rr=e=>{const[i,o]=d.useState(""),[r,n]=d.useState(""),[a,l]=d.useState(""),{handlePostRequest:c}=Re();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[t.jsxs(s.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),t.jsx(s.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?t.jsx(De,{label:"Current Password",value:i,onChange:e=>{o(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"New Password",value:r,onChange:e=>{n(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(De,{label:"Confirm New Password",value:a,onChange:e=>{l(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==i&&""!==i.trim()?null!==r&&""!==r&&null!==a&&""!==a&&r==a?await c({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:i,newPassword:r},successCallBkFn:()=>{e.onSuccessCallBk(),g.toast.success("Your request has been processed successfully")},showMask:!0}):g.toast.error("You must enter new password in required fields and must be identical"):g.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},nr=s.styled(p,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=i.useSelector(e=>e.AppLayout),o=pe();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:o?void 0:"calc(100% - 350px)",marginLeft:o||"ltr"!==t.appDirection?void 0:"350px",marginRight:o||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),ar=()=>{const{Window:e,setWindowState:o}=Pe({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),r=i.useSelector(e=>e.AppInfo.value),[n,a]=d.useState(null),l=()=>{a(null)},c=e=>{a(e.currentTarget)},u=i.useSelector(e=>e.AppLayout),p=i.useSelector(e=>e.SideBar),{UserSession:f}=we(),g=f.value.currentOrganization,{Window:T,setWindowState:I}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:y}=Re(),_=pe(),E=i.useDispatch();return t.jsxs(t.Fragment,{children:[t.jsx(T,{children:t.jsx(rr,{selectedPerson:f.value,isSelfService:!0,onSuccessCallBk:()=>{I(!1)}})}),t.jsx(s.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:n,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(n),onClose:l,children:t.jsx(s.MenuItem,{onClick:()=>{I(!0),l()},children:t.jsx(s.Typography,{sx:{textAlign:"center"},children:"Change Password"})})}),t.jsx(e,{children:t.jsx($o,{successChangeCallBackFn:()=>{o(!1)}})}),t.jsx(nr,{position:"fixed",open:p.isOpened,children:t.jsxs(h,{children:[t.jsx(s.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{E(Zo())},edge:"start",sx:[{mr:"ltr"===u.appDirection?2:void 0,ml:"rtl"===u.appDirection?2:void 0},p.isOpened&&{display:"none"}],children:t.jsx(m.FontAwesomeIcon,{icon:"bars"})}),t.jsx(To,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:f?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),t.jsx(s.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:_?"":`${r.appName} - ${"ltr"===u.appDirection?g?.organizationEnName:g?.organizationArName}`}),t.jsx(s.Tooltip,{title:"light"===u.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{E(ge.setThemeMode("light"===u.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===u.themeMode?"dark":"light")},children:"light"===u.themeMode?t.jsx(m.FontAwesomeIcon,{icon:"moon"}):t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),t.jsx(s.Tooltip,{title:"ar"===A.language?"Change Language To English":"Change Language To Arabic",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{let e="ar"===A.language?"en":"ar";var t;t=e,A.changeLanguage(t),localStorage.setItem("language",t),E(ge.setAppDirection("ar"===e?"rtl":"ltr"))},children:t.jsx(m.FontAwesomeIcon,{icon:"language"})})}),f.value?.userOrganizations&&f.value?.userOrganizations.length>1?t.jsx(s.Tooltip,{title:"Change Current Organization",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"globe"})})}):t.jsx(t.Fragment,{}),!0===r?.enableUINotifications?t.jsx(or,{}):t.jsx(t.Fragment,{}),t.jsx("div",{onClick:c,style:{cursor:"pointer"},children:t.jsx(To,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:f.value?.id+""})}),t.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:c,children:_?"":f.value?.username}),t.jsx(s.IconButton,{color:"inherit",onClick:async()=>{try{await y({endPointURI:"api/auth/logout"})}catch(e){}E(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:t.jsx(m.FontAwesomeIcon,{rotation:"rtl"===u.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},sr=s.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),lr=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=lr(e,i.children);if(t)return t}}},dr=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.organization",label:"Organization Info",authority:"DEVELOPMENT_ADMIN",icon:"globe",children:[{id:"development_admin.organization.modules",label:"Subscriped Modules",icon:"layer-group",authority:"ORGANIZATION_ADMIN",action:"NAVIGATION",actionPayload:{path:"admin/org/apps"}},{id:"development_admin.organization.unitTypes",label:"Organization Unit Types",icon:"tags",action:"NAVIGATION",actionPayload:{path:"admin/org/unit/types"}},{id:"development_admin.organization.units",label:"Organization Units",icon:"folder-tree",action:"NAVIGATION",actionPayload:{path:"admin/org/units"}},{id:"development_admin.organization.ranks",label:"Organization Ranks",icon:"street-view",action:"NAVIGATION",actionPayload:{path:"admin/org/ranks"}}]},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",authority:"DEVELOPMENT_ADMIN",icon:"code",children:[{id:"system_admin.devtools.modules",label:"System Modules",icon:"layer-group",action:"NAVIGATION",actionPayload:{path:"dev/system/modules"}},{id:"system_admin.devtools.authorities",label:"System Authorities",icon:"key",action:"NAVIGATION",actionPayload:{path:"dev/system/authorities"}},{id:"system_admin.devtools.roles",label:"System Roles",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"system_admin.devtools.lookups",label:"System Lookups",icon:"list-check",action:"NAVIGATION",actionPayload:{path:"dev/system/lookups"}},{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.AttachmentConfig",label:"ATTACHMENT_CONFIG_PLURAL",icon:"paperclip",action:"NAVIGATION",actionPayload:{path:"dev/attachmentconfigs"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",authority:"DEVELOPMENT_ADMIN",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function cr(){return t.jsx(W,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const ur=c.styled(J.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${Q.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),pr=c.styled(J.TreeItem2Content)(({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:c.alpha(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}})),hr=V.animated(z);function mr(e){const i=V.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return t.jsx(hr,{style:i,...e})}const fr=c.styled(F)({color:"inherit",fontWeight:500});function gr({icon:e,expandable:o,children:r,...n}){const{t:a}=I.useTranslation(),s=i.useSelector(e=>e.AppLayout);return t.jsxs(J.TreeItem2Label,{...n,sx:{display:"flex",alignItems:"center",padding:1},children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:"ltr"===s.appDirection?7:void 0,marginLeft:"rtl"===s.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),t.jsx(fr,{variant:"body2",sx:{fontSize:16},children:a(r)}),o&&t.jsx(cr,{})]})}const Tr=e=>Array.isArray(e)?e.length>0&&e.some(Tr):Boolean(e),Ar=ce.forwardRef(function(e,i){const{id:o,itemId:r,label:n,disabled:a,children:s,...l}=e,{getRootProps:d,getContentProps:c,getIconContainerProps:u,getCheckboxProps:p,getLabelProps:h,getGroupTransitionProps:m,getDragAndDropOverlayProps:f,status:g,publicAPI:T}=Z.useTreeItem2({id:o,itemId:r,children:s,label:n,disabled:a,rootRef:i}),A=T.getItem(r),I=Tr(s);return t.jsx(ee.TreeItem2Provider,{itemId:r,children:t.jsxs(ur,{...d(l),children:[t.jsxs(pr,{...c({className:no("content",{"Mui-expanded":g.expanded,"Mui-selected":g.selected,"Mui-focused":g.focused,"Mui-disabled":g.disabled})}),children:[t.jsx(J.TreeItem2IconContainer,{...u(),children:t.jsx(X.TreeItem2Icon,{status:g})}),t.jsx(J.TreeItem2Checkbox,{...p()}),t.jsx(gr,{...h({icon:A?.icon||"book",expandable:I&&g.expanded})}),t.jsx(te.TreeItem2DragAndDropOverlay,{...f()})]}),s&&t.jsx(mr,{...m()})]})})});function Ir(){const e=_.useNavigate(),o=i.useSelector(e=>e.AppLayout),r=i.useSelector(e=>e.AppInfo.value);i.useDispatch();const n=pe(),{isUserAuthorized:a,isCurrentOrganizationAuthorizedToModule:s}=we(),l=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||a(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||s(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=l(i.children)),t.push(e)}return t},d=[];r.enableAdministrationModule&&d.push(...structuredClone(dr)),d.push(...structuredClone(r.businessNavigationItems));const c=l(d);return t.jsx($.RichTreeView,{items:c,onItemClick:(t,i)=>{const o=lr(i,d);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:he,direction:o.appDirection,maxHeight:n?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Ar}})}const yr=()=>{const e=i.useSelector(e=>e.AppInfo.value),{UserSession:o}=we(),r=o.value.currentOrganization,n=s.useTheme(),a=i.useSelector(e=>e.AppLayout),l=i.useSelector(e=>e.SideBar),d=i.useDispatch();return t.jsxs(K,{sx:{width:he,flexShrink:0,"& .MuiDrawer-paper":{width:he,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===a.appDirection?"left":"right",open:l.isOpened,children:[t.jsxs(sr,{children:[t.jsxs(s.Box,{sx:{width:"100%"},children:[t.jsx(s.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===a.appDirection?r?.organizationEnName:r?.organizationArName}`}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),t.jsx(Y,{onClick:()=>{d(Zo())},children:"ltr"===n.direction?t.jsx(m.FontAwesomeIcon,{icon:"angle-left"}):t.jsx(m.FontAwesomeIcon,{icon:"angle-right"})})]}),t.jsx(v,{}),t.jsx(Ir,{})]})},_r=re({key:"muirtl",stylisPlugins:[oe.prefixer,ie]}),Er=re({key:"mui"}),Or=e=>{const[i,o]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.selectedRecord&&(async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),n(e.data.availableRoles)}})})()},[e.selectedRecord]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"roleName",options:r,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:i,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Cr=e=>{const[o,r]=d.useState(null),{Window:n,setWindowState:a}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),s=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),c=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:u}=I.useTranslation(),[p,h]=d.useState([]),m=xe({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:h}),f=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:c,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(Or,{selectedRecord:o,closeModalFn:()=>{a(!1)}})}),t.jsx(vo,{apiActions:m,hideInfoBar:!0,data:p,setData:h,editMode:{editMode:"row"},formElements:f,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{r(e),a(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async t=>(t.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Nr=()=>{const{t:e}=I.useTranslation(),[o,r]=d.useState([]),n=xe({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:r}),{handleGetRequest:a}=Re(),s=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),l=i.useDispatch();return t.jsx(vo,{apiActions:n,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",postActionCallBack:()=>{(async()=>{await a({endPointURI:s.url,showMask:!1,successCallBkFn:e=>{l(ve({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{l(ve({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Rr=()=>{const{t:e}=I.useTranslation(),[o,r]=d.useState([]),{handleGetRequest:n}=Re(),a=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),s=i.useDispatch(),l=xe({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:r}),c=[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:l,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:c,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await n({endPointURI:a.url,showMask:!1,successCallBkFn:e=>{s(ve({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{s(ve({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},br=()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return t.jsx(vo,{apiActions:r,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},wr=()=>{const{t:e}=I.useTranslation(),[o,r]=d.useState([]),n=xe({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:r}),a=i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:s}=Re(),l=[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:n,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},Pr=()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),r=xe({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},Sr=e=>{const[i,o]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.roleId&&(async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),n(e.data.availableAuthorities)}})})()},[e.roleId]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"authorityName",options:r,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:i,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},vr=()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Pe({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),l=xe({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:o});return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Sr,{roleId:r?.id,closeModalFn:()=>{s(!1)}})}),t.jsx(vo,{apiActions:l,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{n(e),s(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Lr=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:r}=I.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:s,data:n,setData:a,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:r("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},Mr=()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:o}=I.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:e,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,hideInfoBar:!0,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},xr=e=>{const{t:o}=I.useTranslation(),r=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(vo,{apiActions:s,data:n,hideInfoBar:!0,setData:a,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Dr=[{value:"FILE_SYSTEM"},{value:"SFTP"}],kr=(e,t,i,o,r)=>{o?("useSysDatasource"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===r?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},Ur=e=>{const{t:i}=I.useTranslation(),[o,r]=d.useState([]),n=xe({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:r});return t.jsx(vo,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!po(t.recipientMail)?(g.toast.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Fr=e=>{const{t:o}=I.useTranslation(),[r,n]=d.useState([]),a=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),s=xe({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:a,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(vo,{apiActions:s,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:n,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:l,keyColumnName:"id",gridTitle:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},Br=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:r}=I.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(vo,{apiActions:s,data:n,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:r("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},qr={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},jr=(e,t,i)=>{if(e&&qr[e]){const o=qr[e],r=Object.keys(o);for(const e of r){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Gr=e=>{const{t:o}=I.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:n}),s=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:l,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Wr=e=>{const{t:o}=I.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Hr=e=>{const[i,o]=d.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:a}=I.useTranslation(),{handleGetRequest:s}=Re(),[l,c]=d.useState([]);d.useEffect(()=>{(async()=>{await s({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{c(e.data)}})})()},[e.selectedRecord]);const[u,p]=d.useState([]),h=xe({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:p}),m=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:l,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Wr,{selectedRecord:i})}),t.jsx(vo,{apiActions:h,data:u,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:p,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{o(e),n(!0)}}],formElements:m,keyColumnName:"id",gridTitle:a("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},Yr=e=>{const{t:o}=I.useTranslation(),[r,n]=d.useState([]),a=i.useSelector(e=>e.commonStores.stores.SystemWidgets.data),s=xe({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:s,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Kr=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(To,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(t.Fragment,{children:t.jsx(vo,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:Cr,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:Nr,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Rr,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:br,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=I.useTranslation(),[o,r]=d.useState(null),{UserInfo:n}=we(),a=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),l=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[c,u]=d.useState([]),p=xe({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:u}),[h,m]=d.useState(null),{Window:f,setWindowState:T}=Pe({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:A,setWindowState:y}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:_,setWindowState:E}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),O=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(To,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsxs(t.Fragment,{children:[t.jsx(A,{children:t.jsx(Or,{selectedRecord:h,closeModalFn:()=>{y(!1)}})}),t.jsx(f,{children:t.jsx(Cr,{selectedPerson:o})}),t.jsx(_,{children:t.jsx(rr,{selectedPerson:o,isSelfService:!1,onSuccessCallBk:()=>{E(!1)}})}),t.jsx(vo,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:p,data:c,setData:u,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:O,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{r(e),E(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{m({organizationId:n?.currentOrganization?.id,id:e?.organizationMemberId}),y(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{r(e),T(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(g.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(g.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/org/admin/systemapplication/all",deleteById:"api/v1/org/admin/systemapplication",save:"api/v1/org/admin/systemapplication",findById:"api/v1/org/admin/systemapplication",setData:o});return t.jsx(t.Fragment,{children:t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:wr,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Pr,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:vr,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=I.useTranslation(),{handleGetRequest:o}=Re(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/org/admin/organizationapplicationmodule/all",deleteById:"api/org/v1/admin/organizationapplicationmodule",save:"api/v1/org/admin/organizationapplicationmodule",findById:"api/org/v1/admin/organizationapplicationmodule",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,hideInfoBar:!0,setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:br,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Rr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Nr,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=I.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,editMode:{editMode:"row",reloadAfterSave:!0},formElements:s,keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[e,o]=d.useState(null),{Window:r,setWindowState:n}=Pe({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),a=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:s}=I.useTranslation(),[l,c]=d.useState([]),u=xe({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:c}),p=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:a,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Lr,{selectedRecord:e})}),t.jsx(vo,{apiActions:u,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),n(!0)},icon:"p"}],data:l,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:p,keyColumnName:"id",gridTitle:s("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,i,o,r)=>{o?"useSysCon"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Re(),o=i.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:r}=I.useTranslation(),[n,a]=d.useState([]),s=xe({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:a,commonStoreKey:"SystemDataSources"}),l=[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:o,comboboxValueDataType:"string",optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:l,keyColumnName:"id",gridTitle:r("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{g.toast.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=I.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:o,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:s,keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,r,n)=>{o?"parameterType"===o?("combobox"===r?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===r||"datetime"===r?(t.showField("parameterValueFormat"),"date"===r?i.setValue("parameterValueFormat",je):i.setValue("parameterValueFormat",Ge)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=r&&""!=r?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=r&&""!=r?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",je)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",Ge)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:Mr,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=I.useTranslation(),[o,r]=d.useState(null),{Window:n,setWindowState:a}=Pe({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:s,setWindowState:l}=Pe({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[c,u]=d.useState([]),p=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),h=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),m=i.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),f=xe({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:Dr,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:m,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:h,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(Do,{reportCode:o?.reportCode,resultMode:"App"})}),t.jsx(s,{children:t.jsx(xr,{selectedRecord:o})}),t.jsx(vo,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:f,data:c,setData:u,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{r(e),l(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{r(e),a(!0)}}],formProps:{formValuesChangeCallBk:kr},formElements:T,keyColumnName:"id",gridTitle:e("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(g.toast.error("You must choose the report query"),!1):(g.toast.error("You must choose the report blueprint"),!1):(g.toast.error("You must enter the jasper report name"),!1):(g.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),o=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Pe({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:l,setWindowState:c}=Pe({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:u,setWindowState:p}=Pe({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:h}=I.useTranslation(),[m,f]=d.useState([]),T=xe({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:f}),A=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:o,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Ur,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(l,{children:t.jsx(Fr,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(u,{children:t.jsx(Br,{selectedRecord:r,callBkFn:()=>{p(!1)}})}),t.jsx(vo,{apiActions:T,data:m,setData:f,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:A,keyColumnName:"id",gridTitle:h("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{n(e),s(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{n(e),c(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{n(e),p(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(g.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(g.toast.error("You must specifiy the period value since this email is periodical"),!1):(g.toast.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,r){jr(t,o,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:n,keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{jr(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,o]=d.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Document Status",windowIcon:"tag"}),{Window:a,setWindowState:s}=Pe({windowTitle:"Document Action",windowIcon:"stamp"}),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),c=i.useSelector(e=>e.commonStores.stores.SystemReports.data),u=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:p}=I.useTranslation(),[h,m]=d.useState([]),f=xe({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:m}),g=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:l,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:u,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Gr,{selectedRecord:e})}),t.jsx(a,{children:t.jsx(Hr,{selectedRecord:e})}),t.jsx(vo,{apiActions:f,data:h,setData:m,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),n(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),s(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:p("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:g,keyColumnName:"id",gridTitle:p("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=I.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),r=i.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[n,a]=d.useState([]),s=xe({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:r,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}];return t.jsx(vo,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:l,keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[a,s]=d.useState([]),l=_.useNavigate(),c=xe({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:s});return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Yr,{selectedRecord:i})}),t.jsx(vo,{apiActions:c,data:a,setData:s,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{o(e),n(!0)}},{label:"View",icon:"eye",actionFn:async e=>{l("/dashboard/"+e.dashboardCode)}}],gridTitle:e("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:zo},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=I.useTranslation(),[o,r]=d.useState([]),{handlePostRequest:n}=Re(),a=xe({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:r}),s=i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:s,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}];return t.jsx(vo,{apiActions:a,disableDefaultAction:!0,data:o,setData:r,editMode:{editMode:"none"},formElements:l,rowActions:[{actionFn:async e=>{(async e=>{await n({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{a.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:wr},{path:"dev/system/roles",component:vr},{path:"dev/system/lookups",component:Mr},{path:"dev/system/modules",component:Pr},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=I.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:Dr,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}];return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:n,keyColumnName:"id",gridTitle:e("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:e}=I.useTranslation(),[o,r]=d.useState([]),n=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),a=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=xe({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:r}),c=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:a,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:a,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",comboboxValueDataType:"string",options:n,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.row.notificationIcon}):t.jsx(t.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:l,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:c,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:e}=we(),o=i.useSelector(e=>e.AppLayout),{handleGetRequest:r,handlePostRequest:n}=Re(),[a,l]=d.useState([]),c=i.useSelector(e=>e.AppInfo.value),u=()=>{!0===e.isAuthenticated&&r({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{l(e.data)}})};return!0===c?.enableUINotifications&&er(u,1e3),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{flex:1}}),t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===o.appDirection?"Notifications":"الاشعارات"]}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Button,{sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),t.jsx(s.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),t.jsx(s.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:t.jsx(s.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:a.map((e,i)=>t.jsx(ir,{...e,showDivider:i<a.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Fo}]]],Vr=e=>{const{isUserAuthorized:i,isCurrentOrganizationAuthorizedToModule:o}=we();return e?.applicationModule&&!o(e?.applicationModule)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!i(e.authority)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):t.jsx(t.Fragment,{children:e.children})},zr=()=>{const e=i.useSelector(e=>e.AppLayout),o=i.useSelector(e=>e.AppInfo.value),r=i.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:n}=we(),a=i.useDispatch(),{show:c,hide:u}=Ee(),p=i.useSelector(e=>e.commonStores),[h,m]=d.useState(!1),{isUserAuthorized:f}=we(),{handleGetRequest:g}=Re();return d.useEffect(()=>{p?.storeKeys&&(async()=>{c("Loading ... please wait"),m(!1);const e=p.stores,t=p.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!f(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||g({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{a(ve({storeKey:i,data:e.data}))},failureCallBkFn:()=>{a(ve({storeKey:i,data:[]}))}});m(!0),u()})()},[p.storeKeys,n?.currentOrganization]),t.jsx(l.CacheProvider,{value:"ltr"===e.appDirection?Er:_r,children:t.jsx(s.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:t.jsxs(_.Routes,{children:[o.enableAdministrationModule?Kr.map((e,i)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Vr,{authority:e.authority,applicationModule:e.applicationModule,children:t.jsx(e.component,{})})},"adm"+i)):null,r.map((e,i)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Vr,{authority:e.authority,children:t.jsx(e.component,{})})},"bs"+i))]})})})},$r=c.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ae.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ae.grey[900]})}));function Qr(e){const{window:o}=e,r=i.useSelector(e=>e.SideBar),n=i.useSelector(e=>e.AppInfo.value),a=i.useDispatch(),l=e=>{a(Jo(e))},d=void 0!==o?()=>o().document.body:void 0;return t.jsx(se,{container:d,anchor:"bottom",open:r.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[t.jsx($r,{}),t.jsx(s.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:t.jsx(Ir,{})}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:n.appName}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",n.appVersion]})]})]})})}const Zr=()=>{const{t:e}=I.useTranslation(),o=i.useSelector(e=>e.loadingMask.value),r=i.useSelector(e=>e.AppLayout);return t.jsxs(s.Backdrop,{dir:r.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[t.jsx(s.CircularProgress,{color:"inherit"}),t.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Jr=()=>{const e=i.useSelector(e=>e.AppInfo.value),[o,r]=d.useState(""),[n,a]=d.useState(""),[c,u]=d.useState(!1),p=i.useSelector(e=>e.UserSession.value),h=i.useDispatch(),m=async()=>{if(null==o||""==o)return void g.toast.error("username is required to proceed");if(null==n||""==n)return void g.toast.error("password is required to proceed");u(!0);let t=null;try{if(t=await T.post(`${e.apiBaseUrl}/api/auth/login`,{username:o,password:n},{withCredentials:!0}),null!=t.data&&""!==t.data){u(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),h(Ce.setAuthenticated(e))}}catch(e){u(!1),g.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=i.useSelector(e=>e.UserSession.value),A=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}});return d.useEffect(()=>{console.log("checking usersession on reload",f),console.log("checking usersession app info",e),(async()=>{if(e?.apiBaseUrl&&null==f.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await T.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};h(Ce.setAuthenticated(e))}else h(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){h(Ce.setUnAuthenticated())}}})()},[e,f.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:A,children:t.jsx(s.Paper,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==p.isAuthenticated?t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:e?.appLogo,width:150,height:150}),t.jsx(s.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(s.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.TextField,{label:"password",sx:{width:300,m:1},value:n,type:"password",onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.Button,{loading:c,onClick:m,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):t.jsxs(t.Fragment,{children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})})},Xr=()=>{const[e,o]=d.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:r}=Re(),n=i.useSelector(e=>e.AppInfo.value);return d.useEffect(()=>{if(n?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{n?.checkLicense?.endpoint&&await r({endPointURI:n.checkLicense?.endpoint,successCallBkFn:e=>{o(e.data)}})})()},n?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[n]),e.isLicensed?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[t.jsx("img",{src:n.appLogo,style:{height:200,width:200}}),t.jsxs(s.Typography,{variant:"h5",children:[n.appName," - ",n.appVersion]}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),t.jsxs(s.Typography,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),t.jsxs(s.Typography,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},en=({msalInstance:e})=>{const o=i.useSelector(e=>e.AppInfo.value),r=i.useSelector(e=>e.UserSession.value),{handleGetRequest:n}=Re(),a=i.useDispatch();return t.jsx(s.Box,{children:t.jsx(s.Button,{onClick:async()=>{const t=await e.acquireTokenPopup({scopes:o?.azureConfiguration?.scopes});t?.accessToken&&(localStorage.setItem("TOKEN",t.accessToken),(async()=>{o?.apiBaseUrl&&null==r.isAuthenticated&&(localStorage.getItem("TOKEN"),n({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};a(Ce.setAuthenticated(t))}else a(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")}}))})())},children:"Azure Login "})})},tn=c.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const o=i.useSelector(e=>e.AppLayout),r=c.useTheme(),n=pe();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!n&&t?"calc(100% - 350px)":"100%",direction:o.appDirection,justifyContent:"flex-start",transition:!0===t?r.transitions.create(["margin","width"],{easing:r.transitions.easing.easeOut,duration:r.transitions.duration.enteringScreen}):r.transitions.create(["margin","width"],{easing:r.transitions.easing.sharp,duration:r.transitions.duration.leavingScreen}),marginLeft:n||"ltr"!==o.appDirection||!0!==t?0:he+"px",marginRight:n||"rtl"!==o.appDirection||!0!==t?0:he+"px"}}),on=({msalInstance:e})=>{const o=i.useSelector(e=>e.SideBar),r=i.useSelector(e=>e.AppInfo.value),n=pe(),a=i.useSelector(e=>e.UserSession),s=i.useSelector(e=>e.AppLayout);return t.jsxs(_.BrowserRouter,{children:[t.jsx(g.ToastContainer,{rtl:"rtl"===s.appDirection,draggable:!0,position:"bottom-center"}),t.jsx(Zr,{}),!0===a.value.isAuthenticated?t.jsxs(tn,{open:o.isOpened,children:[t.jsx(u,{}),t.jsx(ar,{}),n?null:t.jsx(yr,{}),n?t.jsx(Qr,{}):null,t.jsx(sr,{}),t.jsx(zr,{}),t.jsx(Xr,{})]}):"AZURE"===r.authenticationMethod?t.jsx(en,{msalInstance:e}):t.jsx(Jr,{})]})},rn=f.createSlice({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),nn=rn.actions;var an=rn.reducer;const sn={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/public/organization/all",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organization/ranks/all",data:[]},CurrentOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organizationunit/all",data:[]},SystemOrganizationUnitType:{autoLoad:!0,url:"api/v1/public/organizationunittype/all",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"},SystemApplicationModules:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"}},ln={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},dn=200,cn=400,un=400,pn=499,hn=500,mn=599,fn="GET",gn="POST",Tn=[ln.OPENID_SCOPE,ln.PROFILE_SCOPE,ln.OFFLINE_ACCESS_SCOPE],An=[...Tn,ln.EMAIL_SCOPE],In="Content-Type",yn="Content-Length",_n="Retry-After",En="X-AnchorMailbox",On="x-ms-request-id",Cn="x-ms-httpver",Nn="active-account-filters",Rn="common",bn="organizations",wn="consumers",Pn="access_token",Sn="xms_cc",vn="login",Ln="select_account",Mn="consent",xn="none",Dn="no_session",kn="code",Un="id_token token refresh_token",Fn="query",Bn="fragment",qn="query",jn="authorization_code",Gn="refresh_token",Wn="MSSTS",Hn="ADFS",Yn="Generic",Kn="-",Vn=".",zn={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},$n="appmetadata",Qn="1",Zn="authority-metadata",Jn=86400,Xn="config",ea="cache",ta="network",ia="hardcoded_values",oa={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},ra={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},na=60,aa=3600,sa="throttling",la="retry-after, h429",da="invalid_grant",ca="client_mismatch",ua="1",pa="3",ha="4",ma="2",fa="4",ga="5",Ta="0",Aa="1",Ia="2",ya="3",_a="4",Ea="pop",Oa="unexpected_error",Ca="post_request_failed",Na={[Oa]:"Unexpected error in authentication.",[Ca]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};
|
|
38
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Ra extends Error{constructor(e,t,i){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,Ra.prototype),this.errorCode=e||ln.EMPTY_STRING,this.errorMessage=t||ln.EMPTY_STRING,this.subError=i||ln.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function ba(e,t){return new Ra(e,t?`${Na[e]} ${t}`:Na[e])}
|
|
39
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const wa="client_info_decoding_error",Pa="client_info_empty_error",Sa="token_parsing_error",va="null_or_empty_token",La="endpoints_resolution_error",Ma="network_error",xa="openid_config_error",Da="hash_not_deserialized",ka="invalid_state",Ua="state_mismatch",Fa="state_not_found",Ba="nonce_mismatch",qa="auth_time_not_found",ja="max_age_transpired",Ga="multiple_matching_tokens",Wa="multiple_matching_accounts",Ha="multiple_matching_appMetadata",Ya="request_cannot_be_made",Ka="cannot_remove_empty_scope",Va="cannot_append_scopeset",za="empty_input_scopeset",$a="device_code_polling_cancelled",Qa="device_code_expired",Za="device_code_unknown_error",Ja="no_account_in_silent_request",Xa="invalid_cache_record",es="invalid_cache_environment",ts="no_account_found",is="no_crypto_object",os="unexpected_credential_type",rs="invalid_assertion",ns="invalid_client_credential",as="token_refresh_required",ss="user_timeout_reached",ls="token_claims_cnf_required_for_signedjwt",ds="authorization_code_missing_from_server_response",cs="binding_key_not_removed",us="end_session_endpoint_not_supported",ps="key_id_missing",hs="no_network_connectivity",ms="user_canceled",fs="missing_tenant_id_error",gs="method_not_implemented",Ts="nested_app_auth_bridge_disabled",As={[wa]:"The client info could not be parsed/decoded correctly",[Pa]:"The client info was empty",[Sa]:"Token cannot be parsed",[va]:"The token is null or empty",[La]:"Endpoints cannot be resolved",[Ma]:"Network request failed",[xa]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[Da]:"The hash parameters could not be deserialized",[ka]:"State was not the expected format",[Ua]:"State mismatch error",[Fa]:"State not found",[Ba]:"Nonce mismatch error",[qa]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[ja]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[Ga]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[Wa]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Ha]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Ya]:"Token request cannot be made without authorization code or refresh token.",[Ka]:"Cannot remove null or empty scope from ScopeSet",[Va]:"Cannot append ScopeSet",[za]:"Empty input ScopeSet cannot be processed",[$a]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Qa]:"Device code is expired.",[Za]:"Device code stopped polling for unknown reasons.",[Ja]:"Please pass an account object, silent flow is not supported without account information",[Xa]:"Cache record object was null or undefined.",[es]:"Invalid environment when attempting to create cache entry",[ts]:"No account found in cache for given key.",[is]:"No crypto object detected.",[os]:"Unexpected credential type.",[rs]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[ns]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[as]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[ss]:"User defined timeout for device code polling reached",[ls]:"Cannot generate a POP jwt if the token_claims are not populated",[ds]:"Server response does not contain an authorization code to proceed",[cs]:"Could not remove the credential's binding key from storage.",[us]:"The provided authority does not support logout",[ps]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[hs]:"No network connectivity. Check your internet connection.",[ms]:"User cancelled the flow.",[fs]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[gs]:"This method has not been implemented",[Ts]:"The nested app auth bridge is disabled"};class Is extends Ra{constructor(e,t){super(e,t?`${As[e]}: ${t}`:As[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Is.prototype)}}function ys(e,t){return new Is(e,t)}
|
|
40
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const _s={createNewGuid:()=>{throw ys(gs)},base64Decode:()=>{throw ys(gs)},base64Encode:()=>{throw ys(gs)},base64UrlEncode:()=>{throw ys(gs)},encodeKid:()=>{throw ys(gs)},async getPublicKeyThumbprint(){throw ys(gs)},async removeTokenBindingKey(){throw ys(gs)},async clearKeystore(){throw ys(gs)},async signJwt(){throw ys(gs)},async hashString(){throw ys(gs)}};
|
|
41
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */var Es;!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"}(Es||(Es={}));class Os{constructor(e,t,i){this.level=Es.Info;const o=e||Os.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||(()=>{}),this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level="number"==typeof o.logLevel?o.logLevel:Es.Info,this.correlationId=o.correlationId||ln.EMPTY_STRING,this.packageName=t||ln.EMPTY_STRING,this.packageVersion=i||ln.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Es.Info}}clone(e,t,i){return new Os({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:i||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const i=`${`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Es[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,i,t.containsPii||!1)}executeCallback(e,t,i){this.localCallback&&this.localCallback(e,t,i)}error(e,t){this.logMessage(e,{logLevel:Es.Error,containsPii:!1,correlationId:t||ln.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Es.Error,containsPii:!0,correlationId:t||ln.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Es.Warning,containsPii:!1,correlationId:t||ln.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Es.Warning,containsPii:!0,correlationId:t||ln.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Es.Info,containsPii:!1,correlationId:t||ln.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Es.Info,containsPii:!0,correlationId:t||ln.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Es.Verbose,containsPii:!1,correlationId:t||ln.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Es.Verbose,containsPii:!0,correlationId:t||ln.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Es.Trace,containsPii:!1,correlationId:t||ln.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Es.Trace,containsPii:!0,correlationId:t||ln.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
|
|
42
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Cs="@azure/msal-common",Ns="15.12.0",Rs="none",bs="redirect_uri_empty",ws="claims_request_parsing_error",Ps="authority_uri_insecure",Ss="url_parse_error",vs="empty_url_error",Ls="empty_input_scopes_error",Ms="invalid_claims",xs="token_request_empty",Ds="logout_request_empty",ks="invalid_code_challenge_method",Us="pkce_params_missing",Fs="invalid_cloud_discovery_metadata",Bs="invalid_authority_metadata",qs="untrusted_authority",js="missing_ssh_jwk",Gs="missing_ssh_kid",Ws="missing_nonce_authentication_header",Hs="invalid_authentication_header",Ys="cannot_set_OIDCOptions",Ks="cannot_allow_platform_broker",Vs="authority_mismatch",zs="invalid_request_method_for_EAR",$s="invalid_authorize_post_body_parameters",Qs={[bs]:"A redirect URI is required for all calls, and none has been set.",[ws]:"Could not parse the given claims request object.",[Ps]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[Ss]:"URL could not be parsed into appropriate segments.",[vs]:"URL was empty or null.",[Ls]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Ms]:"Given claims parameter must be a stringified JSON object.",[xs]:"Token request was empty and not found in cache.",[Ds]:"The logout request was null or undefined.",[ks]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[Us]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Fs]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[Bs]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[qs]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[js]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Gs]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Ws]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[Hs]:"Invalid authentication header provided",[Ys]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Ks]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[Vs]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",[$s]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[zs]:"Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST."};class Zs extends Ra{constructor(e){super(e,Qs[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,Zs.prototype)}}function Js(e){return new Zs(e)}
|
|
43
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Xs{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},i=e.split("&"),o=e=>decodeURIComponent(e.replace(/\+/g," "));return i.forEach(e=>{if(e.trim()){const[i,r]=e.split(/=(.+)/g,2);i&&r&&(t[o(i)]=o(r))}}),t}static trimArrayEntries(e){return e.map(e=>e.trim())}static removeEmptyStringsFromArray(e){return e.filter(e=>!!e)}static jsonParseHelper(e){try{return JSON.parse(e)}catch(e){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}
|
|
44
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class el{constructor(e){const t=e?Xs.trimArrayEntries([...e]):[],i=t?Xs.removeEmptyStringsFromArray(t):[];if(!i||!i.length)throw Js(Ls);this.scopes=new Set,i.forEach(e=>this.scopes.add(e))}static fromString(e){const t=(e||ln.EMPTY_STRING).split(" ");return new el(t)}static createSearchScopes(e){const t=e&&e.length>0?e:[...Tn],i=new el(t);return i.containsOnlyOIDCScopes()?i.removeScope(ln.OFFLINE_ACCESS_SCOPE):i.removeOIDCScopes(),i}containsScope(e){const t=this.printScopesLowerCase().split(" "),i=new el(t);return!!e&&i.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&(this.scopes.size>=e.scopes.size&&e.asArray().every(e=>this.containsScope(e)))}containsOnlyOIDCScopes(){let e=0;return An.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(e=>this.appendScope(e))}catch(e){throw ys(Va)}}removeScope(e){if(!e)throw ys(Ka);this.scopes.delete(e.trim())}removeOIDCScopes(){An.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw ys(za);const t=new Set;return e.scopes.forEach(e=>t.add(e.toLowerCase())),this.scopes.forEach(e=>t.add(e.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw ys(za);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),i=e.getScopeCount(),o=this.getScopeCount();return t.size<o+i}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){if(this.scopes){return this.asArray().join(" ")}return ln.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
|
|
45
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function tl(e,t){return!!e&&!!t&&e===t.split(".")[1]}function il(e,t,i,o){if(o){const{oid:t,sub:i,tid:r,name:n,tfp:a,acr:s,preferred_username:l,upn:d,login_hint:c}=o,u=r||a||s||"";return{tenantId:u,localAccountId:t||i||"",name:n,username:l||d||"",loginHint:c,isHomeTenant:tl(u,e)}}return{tenantId:i,localAccountId:t,username:"",isHomeTenant:tl(i,e)}}function ol(e,t,i,o){let r=e;if(t){const{isHomeTenant:i,...o}=t;r={...e,...o}}if(i){const{isHomeTenant:t,...n}=il(e.homeAccountId,e.localAccountId,e.tenantId,i);return r={...r,...n,idTokenClaims:i,idToken:o},r}return r}
|
|
46
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function rl(e,t){const i=function(e){if(!e)throw ys(va);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw ys(Sa);return t[2]}(e);try{const e=t(i);return JSON.parse(e)}catch(e){throw ys(Sa)}}function nl(e,t){if(0===t||Date.now()-3e5>e+t)throw ys(ja)}
|
|
47
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function al(e){if(!e)return e;let t=e.toLowerCase();return Xs.endsWith(t,"?")?t=t.slice(0,-1):Xs.endsWith(t,"?/")&&(t=t.slice(0,-2)),Xs.endsWith(t,"/")||(t+="/"),t}function sl(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function ll(e){if(!e||e.indexOf("=")<0)return null;try{const t=sl(e),i=Object.fromEntries(new URLSearchParams(t));if(i.code||i.ear_jwe||i.error||i.error_description||i.state)return i}catch(e){throw ys(Da)}return null}function dl(e,t=!0,i){const o=new Array;return e.forEach((e,r)=>{!t&&i&&r in i?o.push(`${r}=${e}`):o.push(`${r}=${encodeURIComponent(e)}`)}),o.join("&")}function cl(e){if(!e)return e;const t=e.split("#")[0];try{const e=new URL(t);return al(e.origin+e.pathname+e.search)}catch(e){return al(t)}}
|
|
48
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class ul{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Js(vs);e.includes("#")||(this._urlString=ul.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Xs.endsWith(t,"?")?t=t.slice(0,-1):Xs.endsWith(t,"?/")&&(t=t.slice(0,-2)),Xs.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw Js(Ss)}if(!e.HostNameAndPort||!e.PathSegments)throw Js(Ss);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw Js(Ps)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return ul.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),i=t.PathSegments;return!e||0===i.length||i[0]!==Rn&&i[0]!==bn||(i[0]=e),ul.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Js(Ss);const i={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let o=i.AbsolutePath.split("/");return o=o.filter(e=>e&&e.length>0),i.PathSegments=o,i.QueryString&&i.QueryString.endsWith("/")&&(i.QueryString=i.QueryString.substring(0,i.QueryString.length-1)),i}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),i=e.match(t);if(!i)throw Js(Ss);return i[2]}static getAbsoluteUrl(e,t){if(e[0]===ln.FORWARD_SLASH){const i=new ul(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new ul(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!ll(e)}}
|
|
49
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const pl={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},hl={metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},ml=new Set;function fl(e,t,i,o){if(o?.trace(`getAliasesFromMetadata called with source: ${i}`),e&&t){const r=gl(t,e);if(r)return o?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${i}, returning aliases`),r.aliases;o?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${i}`)}return null}function gl(e,t){for(let i=0;i<e.length;i++){const o=e[i];if(o.aliases.includes(t))return o}return null}
|
|
50
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */hl.metadata.forEach(e=>{e.aliases.forEach(e=>{ml.add(e)})});const Tl="cache_quota_exceeded",Al="cache_error_unknown",Il={[Tl]:"Exceeded cache storage capacity.",[Al]:"Unexpected error occurred when using cache storage."};class yl extends Ra{constructor(e,t){const i=t||(Il[e]?Il[e]:Il[Al]);super(`${e}: ${i}`),Object.setPrototypeOf(this,yl.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=i}}function _l(e){return e instanceof Error?"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?new yl(Tl):new yl(e.name,e.message):new yl(Al)}
|
|
51
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class El{constructor(e,t,i,o,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=i.clone(Cs,Ns),this.staticAuthorityOptions=r,this.performanceClient=o}getAllAccounts(e,t){return this.buildTenantProfiles(this.getAccountsFilteredBy(e,t),t,e)}getAccountInfoFilteredBy(e,t){if(0===Object.keys(e).length||Object.values(e).every(e=>!e))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;const i=this.getAllAccounts(e,t);if(i.length>1){return i.sort(e=>e.idTokenClaims?-1:1)[0]}return 1===i.length?i[0]:null}getBaseAccountInfo(e,t){const i=this.getAccountsFilteredBy(e,t);return i.length>0?i[0].getAccountInfo():null}buildTenantProfiles(e,t,i){return e.flatMap(e=>this.getTenantProfilesFromAccountEntity(e,t,i?.tenantId,i))}getTenantedAccountInfoByFilter(e,t,i,o,r){let n,a=null;if(r&&!this.tenantProfileMatchesFilter(i,r))return null;const s=this.getIdToken(e,o,t,i.tenantId);return s&&(n=rl(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,r))?null:(a=ol(e,i,n,s?.secret),a)}getTenantProfilesFromAccountEntity(e,t,i,o){const r=e.getAccountInfo();let n=r.tenantProfiles||new Map;const a=this.getTokenKeys();if(i){const e=n.get(i);if(!e)return[];n=new Map([[i,e]])}const s=[];return n.forEach(e=>{const i=this.getTenantedAccountInfoByFilter(r,a,e,t,o);i&&s.push(i)}),s}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId))&&((!t.name||e.name===t.name)&&(void 0===t.isHomeTenant||e.isHomeTenant===t.isHomeTenant))}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,i){if(!e)throw ys(Xa);try{e.account&&await this.setAccount(e.account,t),e.idToken&&!1!==i?.idToken&&await this.setIdTokenCredential(e.idToken,t),e.accessToken&&!1!==i?.accessToken&&await this.saveAccessToken(e.accessToken,t),e.refreshToken&&!1!==i?.refreshToken&&await this.setRefreshTokenCredential(e.refreshToken,t),e.appMetadata&&this.setAppMetadata(e.appMetadata,t)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof Ra?e:_l(e)}}async saveAccessToken(e,t){const i={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},o=this.getTokenKeys(),r=el.fromString(e.target);o.accessToken.forEach(e=>{if(!this.accessTokenKeyMatchesFilter(e,i,!1))return;const o=this.getAccessTokenCredential(e,t);if(o&&this.credentialMatchesFilter(o,i)){el.fromString(o.target).intersectingScopeSets(r)&&this.removeAccessToken(e,t)}}),await this.setAccessTokenCredential(e,t)}getAccountsFilteredBy(e,t){const i=this.getAccountKeys(),o=[];return i.forEach(i=>{const r=this.getAccount(i,t);if(!r)return;if(e.homeAccountId&&!this.matchHomeAccountId(r,e.homeAccountId))return;if(e.username&&!this.matchUsername(r.username,e.username))return;if(e.environment&&!this.matchEnvironment(r,e.environment))return;if(e.realm&&!this.matchRealm(r,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(r,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(r,e.authorityType))return;const n={localAccountId:e?.localAccountId,name:e?.name},a=r.tenantProfiles?.filter(e=>this.tenantProfileMatchesFilter(e,n));a&&0===a.length||o.push(r)}),o}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===zn.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===ra.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),i={};return t.forEach(t=>{if(!this.isAppMetadata(t))return;const o=this.getAppMetadata(t);o&&(e.environment&&!this.matchEnvironment(o,e.environment)||e.clientId&&!this.matchClientId(o,e.clientId)||(i[t]=o))}),i}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let i=null;return t.forEach(t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const o=this.getAuthorityMetadata(t);o&&-1!==o.aliases.indexOf(e)&&(i=o)}),i}removeAllAccounts(e){this.getAllAccounts({},e).forEach(t=>{this.removeAccount(t,e)})}removeAccount(e,t){this.removeAccountContext(e,t);this.getAccountKeys().filter(t=>t.includes(e.homeAccountId)&&t.includes(e.environment)).forEach(e=>{this.removeItem(e,t),this.performanceClient.incrementFields({accountsRemoved:1},t)})}removeAccountContext(e,t){const i=this.getTokenKeys(),o=t=>t.includes(e.homeAccountId)&&t.includes(e.environment);i.idToken.filter(o).forEach(e=>{this.removeIdToken(e,t)}),i.accessToken.filter(o).forEach(e=>{this.removeAccessToken(e,t)}),i.refreshToken.filter(o).forEach(e=>{this.removeRefreshToken(e,t)})}removeAccessToken(e,t){const i=this.getAccessTokenCredential(e,t);if(this.removeItem(e,t),this.performanceClient.incrementFields({accessTokensRemoved:1},t),!i||i.credentialType.toLowerCase()!==zn.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||i.tokenType!==ra.POP)return;const o=i.keyId;o&&this.cryptoImpl.removeTokenBindingKey(o).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${o}`,t),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},t)})}removeAppMetadata(e){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t,e)}),!0}getIdToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getIdToken called");const n={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:zn.ID_TOKEN,clientId:this.clientId,realm:o},a=this.getIdTokensByFilter(n,t,i),s=a.size;if(s<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(s>1){let i=a;if(!o){const t=new Map;a.forEach((i,o)=>{i.realm===e.tenantId&&t.set(o,i)});const o=t.size;if(o<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),a.values().next().value;if(1===o)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),t.values().next().value;i=t}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),i.forEach((e,i)=>{this.removeIdToken(i,t)}),r&&t&&r.addFields({multiMatchedID:a.size},t),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),a.values().next().value}getIdTokensByFilter(e,t,i){const o=i&&i.idToken||this.getTokenKeys().idToken,r=new Map;return o.forEach(i=>{if(!this.idTokenKeyMatchesFilter(i,{clientId:this.clientId,...e}))return;const o=this.getIdTokenCredential(i,t);o&&this.credentialMatchesFilter(o,e)&&r.set(i,o)}),r}idTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.clientId||-1!==i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e,t){this.removeItem(e,t)}removeRefreshToken(e,t){this.removeItem(e,t)}getAccessToken(e,t,i,o){const r=t.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",r);const n=el.createSearchScopes(t.scopes),a=t.authenticationScheme||ra.BEARER,s=a.toLowerCase()!==ra.BEARER.toLowerCase()?zn.ACCESS_TOKEN_WITH_AUTH_SCHEME:zn.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s,clientId:this.clientId,realm:o||e.tenantId,target:n,tokenType:a,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},d=i&&i.accessToken||this.getTokenKeys().accessToken,c=[];d.forEach(e=>{if(this.accessTokenKeyMatchesFilter(e,l,!0)){const t=this.getAccessTokenCredential(e,r);t&&this.credentialMatchesFilter(t,l)&&c.push(t)}});const u=c.length;return u<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):u>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",r),c.forEach(e=>{this.removeAccessToken(this.generateCredentialKey(e),r)}),this.performanceClient.addFields({multiMatchedAT:c.length},r),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",r),c[0])}accessTokenKeyMatchesFilter(e,t,i){const o=e.toLowerCase();if(t.clientId&&-1===o.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===o.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===o.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===o.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(i&&!o.includes(e[t].toLowerCase()))return!1;if(!i&&o.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e,t){const i=this.getTokenKeys(),o=[];return i.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const r=this.getAccessTokenCredential(i,t);r&&this.credentialMatchesFilter(r,e)&&o.push(r)}),o}getRefreshToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getRefreshToken called");const n=t?Qn:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:zn.REFRESH_TOKEN,clientId:this.clientId,familyId:n},s=o&&o.refreshToken||this.getTokenKeys().refreshToken,l=[];s.forEach(e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e,i);t&&this.credentialMatchesFilter(t,a)&&l.push(t)}});const d=l.length;return d<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(d>1&&r&&i&&r.addFields({multiMatchedRT:d},i),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.familyId||-1!==i.indexOf(t.familyId.toLowerCase()))&&(!(!t.familyId&&t.clientId&&-1===i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase())))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},i=this.getAppMetadataFilteredBy(t),o=Object.keys(i).map(e=>i[e]),r=o.length;if(r<1)return null;if(r>1)throw ys(Ha);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==Qn)}matchHomeAccountId(e,t){return!("string"!=typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){return!(t.toLowerCase()!==e.name?.toLowerCase())}matchUsername(e,t){return!(!e||"string"!=typeof e||t?.toLowerCase()!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=function(e,t){let i;const o=e.canonicalAuthority;if(o){const r=new ul(o).getUrlComponents().HostNameAndPort;i=fl(r,e.cloudDiscoveryMetadata?.metadata,Xn,t)||fl(r,hl.metadata,ia,t)||e.knownAuthorities}return i||[]}(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const i=this.getAuthorityMetadataByAlias(t);return!!(i&&i.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){return!(e.realm?.toLowerCase()!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||(e.preferred_username===t||e.upn===t)}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){if(e.credentialType!==zn.ACCESS_TOKEN&&e.credentialType!==zn.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return el.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf($n)}isAuthorityMetadata(e){return-1!==e.indexOf(Zn)}generateAuthorityMetadataCacheKey(e){return`${Zn}-${this.clientId}-${e}`}static toObject(e,t){for(const i in t)e[i]=t[i];return e}}class Ol extends El{async setAccount(){throw ys(gs)}getAccount(){throw ys(gs)}async setIdTokenCredential(){throw ys(gs)}getIdTokenCredential(){throw ys(gs)}async setAccessTokenCredential(){throw ys(gs)}getAccessTokenCredential(){throw ys(gs)}async setRefreshTokenCredential(){throw ys(gs)}getRefreshTokenCredential(){throw ys(gs)}setAppMetadata(){throw ys(gs)}getAppMetadata(){throw ys(gs)}setServerTelemetry(){throw ys(gs)}getServerTelemetry(){throw ys(gs)}setAuthorityMetadata(){throw ys(gs)}getAuthorityMetadata(){throw ys(gs)}getAuthorityMetadataKeys(){throw ys(gs)}setThrottlingCache(){throw ys(gs)}getThrottlingCache(){throw ys(gs)}removeItem(){throw ys(gs)}getKeys(){throw ys(gs)}getAccountKeys(){throw ys(gs)}getTokenKeys(){throw ys(gs)}generateCredentialKey(){throw ys(gs)}generateAccountKey(){throw ys(gs)}}
|
|
52
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Cl="AAD",Nl="OIDC",Rl="EAR",bl="acquireTokenByCode",wl="acquireTokenByRefreshToken",Pl="acquireTokenSilent",Sl="acquireTokenSilentAsync",vl="acquireTokenPopup",Ll="acquireTokenPreRedirect",Ml="acquireTokenRedirect",xl="cryptoOptsGetPublicKeyThumbprint",Dl="cryptoOptsSignJwt",kl="silentCacheClientAcquireToken",Ul="silentIframeClientAcquireToken",Fl="awaitConcurrentIframe",Bl="silentRefreshClientAcquireToken",ql="ssoSilent",jl="standardInteractionClientGetDiscoveredAuthority",Gl="nativeInteractionClientAcquireToken",Wl="networkClientSendPostRequestAsync",Hl="refreshTokenClientExecutePostToTokenEndpoint",Yl="authorizationCodeClientExecutePostToTokenEndpoint",Kl="refreshTokenClientExecuteTokenRequest",Vl="refreshTokenClientAcquireToken",zl="refreshTokenClientAcquireTokenWithCachedRefreshToken",$l="refreshTokenClientAcquireTokenByRefreshToken",Ql="refreshTokenClientCreateTokenRequestBody",Zl="acquireTokenFromCache",Jl="silentFlowClientAcquireCachedToken",Xl="silentFlowClientGenerateResultFromCacheRecord",ed="acquireTokenBySilentIframe",td="initializeBaseRequest",id="initializeSilentRequest",od="initializeClientApplication",rd="initializeCache",nd="silentIframeClientTokenHelper",ad="silentHandlerInitiateAuthRequest",sd="silentHandlerMonitorIframeForHash",ld="silentHandlerLoadFrame",dd="silentHandlerLoadFrameSync",cd="standardInteractionClientCreateAuthCodeClient",ud="standardInteractionClientGetClientConfiguration",pd="standardInteractionClientInitializeAuthorizationRequest",hd="getAuthCodeUrl",md="getStandardParams",fd="handleCodeResponseFromServer",gd="handleCodeResponse",Td="handleResponseEar",Ad="handleResponsePlatformBroker",Id="handleResponseCode",yd="updateTokenEndpointAuthority",_d="authClientAcquireToken",Ed="authClientExecuteTokenRequest",Od="authClientCreateTokenRequestBody",Cd="popTokenGenerateCnf",Nd="popTokenGenerateKid",Rd="handleServerTokenResponse",bd="deserializeResponse",wd="authorityFactoryCreateDiscoveredInstance",Pd="authorityResolveEndpointsAsync",Sd="authorityGetCloudDiscoveryMetadataFromNetwork",vd="authorityUpdateCloudDiscoveryMetadata",Ld="authorityGetEndpointMetadataFromNetwork",Md="authorityUpdateEndpointMetadata",xd="authorityUpdateMetadataWithRegionalInformation",Dd="regionDiscoveryDetectRegion",kd="regionDiscoveryGetRegionFromIMDS",Ud="regionDiscoveryGetCurrentVersion",Fd="acquireTokenByCodeAsync",Bd="handleRedirectPromise",qd="handleNativeRedirectPromise",jd="nativeMessageHandlerHandshake",Gd="removeHiddenIframe",Wd="clearTokensAndKeysWithClaims",Hd="cacheManagerGetRefreshToken",Yd="importExistingCache",Kd="setUserData",Vd="localStorageUpdated",zd="generatePkceCodes",$d="generateCodeVerifier",Qd="generateCodeChallengeFromVerifier",Zd="sha256Digest",Jd="getRandomValues",Xd="generateHKDF",ec="generateBaseKey",tc="base64Decode",ic="urlEncodeArr",oc="encrypt",rc="decrypt",nc="generateEarKey",ac="decryptEarResponse",sc=1;
|
|
53
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
54
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
55
|
+
class lc{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class dc{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:sc,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new lc}}startPerformanceMeasurement(){return new lc}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}
|
|
56
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const cc={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},uc={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Es.Info,correlationId:ln.EMPTY_STRING},pc={claimsBasedCachingEnabled:!1},hc={async sendGetRequestAsync(){throw ys(gs)},async sendPostRequestAsync(){throw ys(gs)}},mc={sku:ln.SKU,version:Ns,cpu:ln.EMPTY_STRING,os:ln.EMPTY_STRING},fc={clientSecret:ln.EMPTY_STRING,clientAssertion:void 0},gc={azureCloudInstance:Rs,tenant:`${ln.DEFAULT_COMMON_TENANT}`},Tc={application:{appName:"",appVersion:""}};function Ac(e){return e.authOptions.authority.options.protocolMode===Nl}
|
|
57
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Ic="home_account_id",yc="UPN";
|
|
58
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function _c(e,t){if(!e)throw ys(Pa);try{const i=t(e);return JSON.parse(i)}catch(e){throw ys(wa)}}function Ec(e){if(!e)throw ys(wa);const t=e.split(Vn,2);return{uid:t[0],utid:t.length<2?ln.EMPTY_STRING:t[1]}}
|
|
59
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Oc="client_id",Cc="redirect_uri",Nc="token_type",Rc="req_cnf",bc="return_spa_code",wc="x-client-xtra-sku",Pc="brk_client_id",Sc="brk_redirect_uri",vc="instance_aware";
|
|
60
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
61
|
+
function Lc(e,t,i){if(!t)return;const o=e.get(Oc);o&&e.has(Pc)&&i?.addFields({embeddedClientId:o,embeddedRedirectUri:e.get(Cc)},t)}function Mc(e,t){e.set("response_type",t)}function xc(e,t,i=!0,o=Tn){!i||o.includes("openid")||t.includes("openid")||o.push("openid");const r=i?[...t||[],...o]:t||[],n=new el(r);e.set("scope",n.printScopes())}function Dc(e,t){e.set(Oc,t)}function kc(e,t){e.set(Cc,t)}function Uc(e,t){e.set("login_hint",t)}function Fc(e,t){e.set(En,`UPN:${t}`)}function Bc(e,t){e.set(En,`Oid:${t.uid}@${t.utid}`)}function qc(e,t){e.set("sid",t)}function jc(e,t,i){const o=function(e,t){let i;if(e)try{i=JSON.parse(e)}catch(e){throw Js(Ms)}else i={};t&&t.length>0&&(i.hasOwnProperty(Pn)||(i[Pn]={}),i[Pn][Sn]={values:t});return JSON.stringify(i)}(t,i);try{JSON.parse(o)}catch(e){throw Js(Ms)}e.set("claims",o)}function Gc(e,t){e.set("client-request-id",t)}function Wc(e,t){e.set("x-client-SKU",t.sku),e.set("x-client-VER",t.version),t.os&&e.set("x-client-OS",t.os),t.cpu&&e.set("x-client-CPU",t.cpu)}function Hc(e,t){t?.appName&&e.set("x-app-name",t.appName),t?.appVersion&&e.set("x-app-ver",t.appVersion)}function Yc(e,t){t&&e.set("state",t)}function Kc(e,t,i){if(!t||!i)throw Js(Us);e.set("code_challenge",t),e.set("code_challenge_method",i)}function Vc(e,t){e.set("client_secret",t)}function zc(e,t){t&&e.set("client_assertion",t)}function $c(e,t){t&&e.set("client_assertion_type",t)}function Qc(e,t){e.set("grant_type",t)}function Zc(e){e.set("client_info","1")}function Jc(e){e.has(vc)||e.set(vc,"true")}function Xc(e,t){Object.entries(t).forEach(([t,i])=>{!e.has(t)&&i&&e.set(t,i)})}function eu(e,t){t&&(e.set(Nc,ra.POP),e.set(Rc,t))}function tu(e,t){t&&(e.set(Nc,ra.SSH),e.set(Rc,t))}function iu(e,t){e.set("x-client-current-telemetry",t.generateCurrentRequestHeaderValue()),e.set("x-client-last-telemetry",t.generateLastRequestHeaderValue())}function ou(e){e.set("x-ms-lib-capability",la)}function ru(e,t,i){e.has(Pc)||e.set(Pc,t),e.has(Sc)||e.set(Sc,i)}
|
|
62
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
63
|
+
const nu=0,au=1,su=2,lu=3;
|
|
64
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
65
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
66
|
+
const du=(e,t,i,o,r)=>(...n)=>{i.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,r);if(r){const e=t+"CallCount";o?.incrementFields({[e]:1},r)}try{const o=e(...n);return a?.end({success:!0}),i.trace(`Returning result from ${t}`),o}catch(e){i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw a?.end({success:!1},e),e}},cu=(e,t,i,o,r)=>(...n)=>{i.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,r);if(r){const e=t+"CallCount";o?.incrementFields({[e]:1},r)}return o?.setPreQueueTime(t,r),e(...n).then(e=>(i.trace(`Returning result from ${t}`),a?.end({success:!0}),e)).catch(e=>{i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw a?.end({success:!1},e),e})};
|
|
67
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
68
|
+
class uu{constructor(e,t,i,o){this.networkInterface=e,this.logger=t,this.performanceClient=i,this.correlationId=o}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(Dd,this.correlationId);let i=e;if(i)t.region_source=pa;else{const e=uu.IMDS_OPTIONS;try{const o=await cu(this.getRegionFromIMDS.bind(this),kd,this.logger,this.performanceClient,this.correlationId)(ln.IMDS_VERSION,e);if(o.status===dn&&(i=o.body,t.region_source=ha),o.status===un){const o=await cu(this.getCurrentVersion.bind(this),Ud,this.logger,this.performanceClient,this.correlationId)(e);if(!o)return t.region_source=ua,null;const r=await cu(this.getRegionFromIMDS.bind(this),kd,this.logger,this.performanceClient,this.correlationId)(o,e);r.status===dn&&(i=r.body,t.region_source=ha)}}catch(e){return t.region_source=ua,null}}return i||(t.region_source=ua),i||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(kd,this.correlationId),this.networkInterface.sendGetRequestAsync(`${ln.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,ln.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(Ud,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${ln.IMDS_ENDPOINT}?format=json`,e);return t.status===un&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(e){return null}}}
|
|
69
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
70
|
+
function pu(){return Math.round((new Date).getTime()/1e3)}function hu(e){return e.getTime()/1e3}function mu(e){return e?new Date(1e3*Number(e)):new Date}function fu(e,t){const i=Number(e)||0;return pu()+t>i}function gu(e,t){const i=Number(e)+24*t*60*60*1e3;return Date.now()>i}
|
|
71
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
72
|
+
function Tu(e,t,i,o,r){return{credentialType:zn.ID_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,realm:r,lastUpdatedAt:Date.now().toString()}}function Au(e,t,i,o,r,n,a,s,l,d,c,u,p,h,m){const f={homeAccountId:e,credentialType:zn.ACCESS_TOKEN,secret:i,cachedAt:pu().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:o,realm:r,target:n,tokenType:c||ra.BEARER,lastUpdatedAt:Date.now().toString()};if(u&&(f.userAssertionHash=u),d&&(f.refreshOn=d.toString()),h&&(f.requestedClaims=h,f.requestedClaimsHash=m),f.tokenType?.toLowerCase()!==ra.BEARER.toLowerCase())switch(f.credentialType=zn.ACCESS_TOKEN_WITH_AUTH_SCHEME,f.tokenType){case ra.POP:const e=rl(i,l);if(!e?.cnf?.kid)throw ys(ls);f.keyId=e.cnf.kid;break;case ra.SSH:f.keyId=p}return f}function Iu(e,t,i,o,r,n,a){const s={credentialType:zn.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,lastUpdatedAt:Date.now().toString()};return n&&(s.userAssertionHash=n),r&&(s.familyId=r),a&&(s.expiresOn=a.toString()),s}function yu(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function _u(e){return!!e&&(yu(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===zn.ACCESS_TOKEN||e.credentialType===zn.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function Eu(e){return!!e&&(yu(e)&&e.credentialType===zn.REFRESH_TOKEN)}function Ou(){return pu()+Jn}function Cu(e,t,i){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=i,e.jwks_uri=t.jwks_uri}function Nu(e,t,i){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=i}function Ru(e){return e.expiresAt<=pu()}
|
|
73
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */uu.IMDS_OPTIONS={headers:{Metadata:"true"}};class bu{constructor(e,t,i,o,r,n,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=i,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=r,this.performanceClient=a,this.correlationId=n,this.managedIdentity=s||!1,this.regionDiscovery=new uu(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(ln.CIAM_AUTH_URL))return lu;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case ln.ADFS:return au;case ln.DSTS:return su}return nu}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new ul(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw ys(La)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw ys(La)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw ys(La)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw ys(us);return this.replacePath(this.metadata.end_session_endpoint)}throw ys(La)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw ys(La)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw ys(La)}canReplaceTenant(e){return 1===e.PathSegments.length&&!bu.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===nu&&this.protocolMode!==Nl}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new ul(this.metadata.canonical_authority).getUrlComponents(),o=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((e,r)=>{let n=o[r];if(0===r&&this.canReplaceTenant(i)){const e=new ul(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];n!==e&&(this.logger.verbose(`Replacing tenant domain name ${n} with id ${e}`),n=e)}e!==n&&(t=t.replace(`/${n}/`,`/${e}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===au||this.protocolMode===Nl&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(Pd,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await cu(this.updateCloudDiscoveryMetadata.bind(this),vd,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const i=await cu(this.updateEndpointMetadata.bind(this),Md,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:i}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:i},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:Ou(),jwks_uri:""}),e}updateCachedMetadata(e,t,i){t!==ea&&i?.source!==ea&&(e.expiresAt=Ou(),e.canonical_authority=this.canonicalAuthority);const o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(Md,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===ia&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata){Cu(e,await cu(this.updateMetadataWithRegionalInformation.bind(this),xd,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority}return t.source}let i=await cu(this.getEndpointMetadataFromNetwork.bind(this),Ld,this.logger,this.performanceClient,this.correlationId)();if(i)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(i=await cu(this.updateMetadataWithRegionalInformation.bind(this),xd,this.logger,this.performanceClient,this.correlationId)(i)),Cu(e,i,!0),ta;throw ys(xa,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Cu(e,t,!1),{source:Xn};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const t=this.getEndpointMetadataFromHardcodedValues();if(t)return Cu(e,t,!1),{source:ia,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const i=Ru(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!i?(this.logger.verbose("Found endpoint metadata in the cache."),{source:ea}):(i&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new ul(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw Js(Bs)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Ld,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const i=await this.networkInterface.sendGetRequestAsync(t,e),o=function(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}
|
|
74
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */(i.body);return o?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in pl?pl[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(xd,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==ln.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=ma,this.regionDiscoveryMetadata.region_used=t,bu.replaceWithRegionalInformation(e,t);const i=await cu(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),Dd,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(i)return this.regionDiscoveryMetadata.region_outcome=fa,this.regionDiscoveryMetadata.region_used=i,bu.replaceWithRegionalInformation(e,i);this.regionDiscoveryMetadata.region_outcome=ga}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(vd,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const i=await cu(this.getCloudDiscoveryMetadataFromNetwork.bind(this),Sd,this.logger,this.performanceClient,this.correlationId)();if(i)return Nu(e,i,!0),ta;throw Js(qs)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||ln.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||ln.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||ln.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Nu(e,t,!1),Xn;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const t=(i=this.hostnameAndPort,gl(hl.metadata,i));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Nu(e,t,!1),ia;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var i;const o=Ru(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!o?(this.logger.verbose("Found cloud discovery metadata in the cache."),ea):(o&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===lu)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),bu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=gl(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Js(Fs)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),bu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Sd,this.correlationId);const e=`${ln.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let i=null;try{const o=await this.networkInterface.sendGetRequestAsync(e,t);let r,n;if(function(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}
|
|
75
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */(o.body))r=o.body,n=r.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${r.tenant_discovery_endpoint}`);else{if(!function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(o.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),r=o.body,r.error===ln.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${r.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${r.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),n=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),i=gl(n,this.hostnameAndPort)}catch(e){if(e instanceof Ra)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${e.errorCode}\nError Description: ${e.errorMessage}`);else{const t=e;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${t.name}\nError Description: ${t.message}`)}return null}return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=bu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),i}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&ul.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let i;if(t&&t.azureCloudInstance!==Rs){const e=t.tenant?t.tenant:ln.DEFAULT_COMMON_TENANT;i=`${t.azureCloudInstance}/${e}/`}return i||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return ln.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw ys(La)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return ml.has(e)}static isPublicCloudAuthority(e){return ln.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,i){const o=new ul(e);o.validateAsUri();const r=o.getUrlComponents();let n=`${t}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(n=`${t}.${ln.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=ul.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:n}).urlString;return i?`${a}?${i}`:a}static replaceWithRegionalInformation(e,t){const i={...e};return i.authorization_endpoint=bu.buildRegionalAuthorityString(i.authorization_endpoint,t),i.token_endpoint=bu.buildRegionalAuthorityString(i.token_endpoint,t),i.end_session_endpoint&&(i.end_session_endpoint=bu.buildRegionalAuthorityString(i.end_session_endpoint,t)),i}static transformCIAMAuthority(e){let t=e;const i=new ul(e).getUrlComponents();if(0===i.PathSegments.length&&i.HostNameAndPort.endsWith(ln.CIAM_AUTH_URL)){t=`${t}${i.HostNameAndPort.split(".")[0]}${ln.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}function wu(e){return e.endsWith(ln.FORWARD_SLASH)?e:`${e}${ln.FORWARD_SLASH}`}
|
|
76
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
77
|
+
async function Pu(e,t,i,o,r,n,a){a?.addQueueMeasurement(wd,n);const s=bu.transformCIAMAuthority(wu(e)),l=new bu(s,t,i,o,r,n,a);try{return await cu(l.resolveEndpointsAsync.bind(l),Pd,r,a,n)(),l}catch(e){throw ys(La)}}
|
|
78
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */bu.reservedTenantDomains=new Set(["{tenant}","{tenantid}",Rn,wn,bn]);class Su extends Ra{constructor(e,t,i,o,r){super(e,t,i),this.name="ServerError",this.errorNo=o,this.status=r,Object.setPrototypeOf(this,Su.prototype)}}
|
|
79
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function vu(e,t,i){return{clientId:e,authority:t.authority,scopes:t.scopes,homeAccountIdentifier:i,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid,embeddedClientId:t.embeddedClientId||t.tokenBodyParameters?.clientId}}
|
|
80
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Lu{static generateThrottlingStorageKey(e){return`${sa}.${JSON.stringify(e)}`}static preProcess(e,t,i){const o=Lu.generateThrottlingStorageKey(t),r=e.getThrottlingCache(o);if(r){if(r.throttleTime<Date.now())return void e.removeItem(o,i);throw new Su(r.errorCodes?.join(" ")||ln.EMPTY_STRING,r.errorMessage,r.subError)}}static postProcess(e,t,i,o){if(Lu.checkResponseStatus(i)||Lu.checkResponseForRetryAfter(i)){const r={throttleTime:Lu.calculateThrottleTime(parseInt(i.headers[_n])),error:i.body.error,errorCodes:i.body.error_codes,errorMessage:i.body.error_description,subError:i.body.suberror};e.setThrottlingCache(Lu.generateThrottlingStorageKey(t),r,o)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty(_n)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,i=Date.now()/1e3;return Math.floor(1e3*Math.min(i+(t||na),i+aa))}static removeThrottle(e,t,i,o){const r=vu(t,i,o),n=this.generateThrottlingStorageKey(r);e.removeItem(n,i.correlationId)}}
|
|
81
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Mu extends Ra{constructor(e,t,i){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,Mu.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=i}}function xu(e,t,i,o){return e.errorMessage=`${e.errorMessage}, additionalErrorInfo: error.name:${o?.name}, error.message:${o?.message}`,new Mu(e,t,i)}
|
|
82
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Du{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:i,cacheOptions:o,storageInterface:r,networkInterface:n,cryptoInterface:a,clientCredentials:s,libraryInfo:l,telemetry:d,serverTelemetryManager:c,persistencePlugin:u,serializableCache:p}){const h={...uc,...i};return{authOptions:(m=e,{clientCapabilities:[],azureCloudOptions:gc,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...m}),systemOptions:{...cc,...t},loggerOptions:h,cacheOptions:{...pc,...o},storageInterface:r||new Ol(e.clientId,_s,new Os(h),new dc),networkInterface:n||hc,cryptoInterface:a||_s,clientCredentials:s||fc,libraryInfo:{...mc,...l},telemetry:{...Tc,...d},serverTelemetryManager:c||null,persistencePlugin:u||null,serializableCache:p||null};var m}(e),this.logger=new Os(this.config.loggerOptions,Cs,Ns),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[In]=ln.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Ic:try{const i=Ec(e.credential);t[En]=`Oid:${i.uid}@${i.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case yc:t[En]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,i,o,r,n){n&&this.performanceClient?.addQueueMeasurement(n,r);const a=await this.sendPostRequest(o,e,{body:t,headers:i},r);return this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async sendPostRequest(e,t,i,o){let r;Lu.preProcess(this.cacheManager,e,o);try{r=await cu(this.networkClient.sendPostRequestAsync.bind(this.networkClient),Wl,this.logger,this.performanceClient,o)(t,i);const e=r.headers||{};this.performanceClient?.addFields({refreshTokenSize:r.body.refresh_token?.length||0,httpVerToken:e[Cn]||"",requestId:e[On]||""},o)}catch(e){if(e instanceof Mu){const t=e.responseHeaders;throw t&&this.performanceClient?.addFields({httpVerToken:t[Cn]||"",requestId:t[On]||"",contentTypeHeader:t[In]||void 0,contentLengthHeader:t[yn]||void 0,httpStatus:e.httpStatus},o),e.error}throw e instanceof Ra?e:ys(Ma)}return Lu.postProcess(this.cacheManager,e,r,o),r}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(yd,t);const i=`https://${e}/${this.authority.tenant}/`,o=await Pu(i,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=o}createTokenQueryParameters(e){const t=new Map;return e.embeddedClientId&&ru(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenQueryParameters&&Xc(t,e.tokenQueryParameters),Gc(t,e.correlationId),Lc(t,e.correlationId,this.performanceClient),dl(t)}}
|
|
83
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function ku(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
|
|
84
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Uu{getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,loginHint:this.loginHint,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static createAccount(e,t,i){const o=new Uu;let r;t.authorityType===au?o.authorityType=Hn:t.protocolMode===Nl?o.authorityType=Yn:o.authorityType=Wn,e.clientInfo&&i&&(r=_c(e.clientInfo,i)),o.clientInfo=e.clientInfo,o.homeAccountId=e.homeAccountId,o.nativeAccountId=e.nativeAccountId;const n=e.environment||t&&t.getPreferredCache();if(!n)throw ys(es);o.environment=n,o.realm=r?.utid||ku(e.idTokenClaims)||"",o.localAccountId=r?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";const a=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,s=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(o.username=a||s||"",o.loginHint=e.idTokenClaims?.login_hint,o.name=e.idTokenClaims?.name||"",o.cloudGraphHostName=e.cloudGraphHostName,o.msGraphHost=e.msGraphHost,e.tenantProfiles)o.tenantProfiles=e.tenantProfiles;else{const t=il(e.homeAccountId,o.localAccountId,o.realm,e.idTokenClaims);o.tenantProfiles=[t]}return o}static createFromAccountInfo(e,t,i){const o=new Uu;return o.authorityType=e.authorityType||Yn,o.homeAccountId=e.homeAccountId,o.localAccountId=e.localAccountId,o.nativeAccountId=e.nativeAccountId,o.realm=e.tenantId,o.environment=e.environment,o.username=e.username,o.name=e.name,o.loginHint=e.loginHint,o.cloudGraphHostName=t,o.msGraphHost=i,o.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),o}static generateHomeAccountId(e,t,i,o,r){if(t!==au&&t!==su){if(e)try{const t=_c(e,o.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}i.warning("No client info in response")}return r?.sub||""}static isAccountEntity(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))}static accountInfoIsEqual(e,t,i){if(!e||!t)return!1;let o=!0;if(i){const i=e.idTokenClaims||{},r=t.idTokenClaims||{};o=i.iat===r.iat&&i.nonce===r.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.loginHint===t.loginHint&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&o}}
|
|
85
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Fu="no_tokens_found",Bu="native_account_unavailable",qu="refresh_token_expired",ju="ux_not_allowed",Gu="bad_token",Wu=["interaction_required","consent_required","login_required",Gu,ju],Hu=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Yu={[Fu]:"No refresh token found in the cache. Please sign-in.",[Bu]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[qu]:"Refresh token has expired.",[Gu]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[ju]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."};class Ku extends Ra{constructor(e,t,i,o,r,n,a,s){super(e,t,i),Object.setPrototypeOf(this,Ku.prototype),this.timestamp=o||ln.EMPTY_STRING,this.traceId=r||ln.EMPTY_STRING,this.correlationId=n||ln.EMPTY_STRING,this.claims=a||ln.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=s}}function Vu(e,t,i){const o=!!e&&Wu.indexOf(e)>-1,r=!!i&&Hu.indexOf(i)>-1,n=!!t&&Wu.some(e=>t.indexOf(e)>-1);return o||n||r}function zu(e){return new Ku(e,Yu[e])}
|
|
86
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class $u{static setRequestState(e,t,i){const o=$u.generateLibraryState(e,i);return t?`${o}${ln.RESOURCE_DELIM}${t}`:o}static generateLibraryState(e,t){if(!e)throw ys(is);const i={id:e.createNewGuid()};t&&(i.meta=t);const o=JSON.stringify(i);return e.base64Encode(o)}static parseRequestState(e,t){if(!e)throw ys(is);if(!t)throw ys(ka);try{const i=t.split(ln.RESOURCE_DELIM),o=i[0],r=i.length>1?i.slice(1).join(ln.RESOURCE_DELIM):ln.EMPTY_STRING,n=e.base64Decode(o),a=JSON.parse(n);return{userRequestState:r||ln.EMPTY_STRING,libraryState:a}}catch(e){throw ys(ka)}}}
|
|
87
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Qu="sw";class Zu{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(Cd,e.correlationId);const i=await cu(this.generateKid.bind(this),Cd,t,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(i));return{kid:i.kid,reqCnfString:o}}async generateKid(e){this.performanceClient?.addQueueMeasurement(Nd,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Qu}}async signPopToken(e,t,i){return this.signPayload(e,t,i)}async signPayload(e,t,i,o){const{resourceRequestMethod:r,resourceRequestUri:n,shrClaims:a,shrNonce:s,shrOptions:l}=i,d=n?new ul(n):void 0,c=d?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:pu(),m:r?.toUpperCase(),u:c?.HostNameAndPort,nonce:s||this.cryptoUtils.createNewGuid(),p:c?.AbsolutePath,q:c?.QueryString?[[],c.QueryString]:void 0,client_claims:a||void 0,...o},t,l,i.correlationId)}}
|
|
88
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Ju{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}
|
|
89
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Xu{constructor(e,t,i,o,r,n,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=i,this.logger=o,this.serializableCache=r,this.persistencePlugin=n,this.performanceClient=a}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||ln.NOT_AVAILABLE} - Timestamp: ${e.timestamp||ln.NOT_AVAILABLE} - Description: ${e.error_description||ln.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||ln.NOT_AVAILABLE} - Trace ID: ${e.trace_id||ln.NOT_AVAILABLE}`,o=e.error_codes?.length?e.error_codes[0]:void 0,r=new Su(e.error,i,e.suberror,o,e.status);if(t&&e.status&&e.status>=hn&&e.status<=mn)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${r}`);if(t&&e.status&&e.status>=cn&&e.status<=pn)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${r}`);if(Vu(e.error,e.error_description,e.suberror))throw new Ku(e.error,e.error_description,e.suberror,e.timestamp||ln.EMPTY_STRING,e.trace_id||ln.EMPTY_STRING,e.correlation_id||ln.EMPTY_STRING,e.claims||ln.EMPTY_STRING,o);throw r}}async handleServerTokenResponse(e,t,i,o,r,n,a,s,l){let d,c;if(this.performanceClient?.addQueueMeasurement(Rd,e.correlation_id),e.id_token){if(d=rl(e.id_token||ln.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&d.nonce!==r.nonce)throw ys(Ba);if(o.maxAge||0===o.maxAge){const e=d.auth_time;if(!e)throw ys(qa);nl(e,o.maxAge)}}this.homeAccountIdentifier=Uu.generateHomeAccountId(e.client_info||ln.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),r&&r.state&&(c=$u.parseRequestState(this.cryptoObj,r.state)),e.key_id=e.key_id||o.sshKid||void 0;const u=this.generateCacheRecord(e,t,i,o,d,n,r);let p;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),p=new Ju(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(p)),a&&!s&&u.account){const e=this.cacheStorage.generateAccountKey(u.account.getAccountInfo());if(!this.cacheStorage.getAccount(e,o.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await Xu.generateAuthenticationResult(this.cryptoObj,t,u,!1,o,d,c,void 0,l)}await this.cacheStorage.saveCacheRecord(u,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&p&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(p))}return Xu.generateAuthenticationResult(this.cryptoObj,t,u,!1,o,d,c,e,l)}generateCacheRecord(e,t,i,o,r,n,a){const s=t.getPreferredCache();if(!s)throw ys(es);const l=ku(r);let d,c;e.id_token&&r&&(d=Tu(this.homeAccountIdentifier,s,e.id_token,this.clientId,l||""),c=ep(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,r,e.client_info,s,l,a,void 0,this.logger));let u=null;if(e.access_token){const r=e.scope?el.fromString(e.scope):new el(o.scopes||[]),a=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,d=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,c=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,p=i+a,h=p+d,m=c&&c>0?i+c:void 0;u=Au(this.homeAccountIdentifier,s,e.access_token,this.clientId,l||t.tenant||"",r.printScopes(),p,h,this.cryptoObj.base64Decode,m,e.token_type,n,e.key_id,o.claims,o.requestedClaimsHash)}let p=null;if(e.refresh_token){let t;if(e.refresh_token_expires_in){t=i+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)}p=Iu(this.homeAccountIdentifier,s,e.refresh_token,this.clientId,e.foci,n,t)}let h=null;return e.foci&&(h={clientId:this.clientId,environment:s,familyId:e.foci}),{account:c,idToken:d,accessToken:u,refreshToken:p,appMetadata:h}}static async generateAuthenticationResult(e,t,i,o,r,n,a,s,l){let d,c,u=ln.EMPTY_STRING,p=[],h=null,m=ln.EMPTY_STRING;if(i.accessToken){if(i.accessToken.tokenType!==ra.POP||r.popKid)u=i.accessToken.secret;else{const t=new Zu(e),{secret:o,keyId:n}=i.accessToken;if(!n)throw ys(ps);u=await t.signPopToken(o,n,r)}p=el.fromString(i.accessToken.target).asArray(),h=mu(i.accessToken.expiresOn),d=mu(i.accessToken.extendedExpiresOn),i.accessToken.refreshOn&&(c=mu(i.accessToken.refreshOn))}i.appMetadata&&(m=i.appMetadata.familyId===Qn?Qn:"");const f=n?.oid||n?.sub||"",g=n?.tid||"";s?.spa_accountid&&i.account&&(i.account.nativeAccountId=s?.spa_accountid);const T=i.account?ol(i.account.getAccountInfo(),void 0,n,i.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:f,tenantId:g,scopes:p,account:T,idToken:i?.idToken?.secret||"",idTokenClaims:n||{},accessToken:u,fromCache:o,expiresOn:h,extExpiresOn:d,refreshOn:c,correlationId:r.correlationId,requestId:l||ln.EMPTY_STRING,familyId:m,tokenType:i.accessToken?.tokenType||ln.EMPTY_STRING,state:a?a.userRequestState:ln.EMPTY_STRING,cloudGraphHostName:i.account?.cloudGraphHostName||ln.EMPTY_STRING,msGraphHost:i.account?.msGraphHost||ln.EMPTY_STRING,code:s?.spa_code,fromNativeBroker:!1}}}function ep(e,t,i,o,r,n,a,s,l,d,c,u){u?.verbose("setCachedAccount called");const p=e.getAccountKeys().find(e=>e.startsWith(i));let h=null;p&&(h=e.getAccount(p,r));const m=h||Uu.createAccount({homeAccountId:i,idTokenClaims:n,clientInfo:a,environment:s,cloudGraphHostName:d?.cloud_graph_host_name,msGraphHost:d?.msgraph_host,nativeAccountId:c},t,o),f=m.tenantProfiles||[],g=l||m.realm;if(g&&!f.find(e=>e.tenantId===g)){const e=il(i,m.localAccountId,g,n);f.push(e)}return m.tenantProfiles=f,m}
|
|
90
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */async function tp(e,t,i){if("string"==typeof e)return e;return e({clientId:t,tokenEndpoint:i})}
|
|
91
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class ip extends Du{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async acquireToken(e,t){if(this.performanceClient?.addQueueMeasurement(_d,e.correlationId),!e.code)throw ys(Ya);const i=pu(),o=await cu(this.executeTokenRequest.bind(this),Ed,this.logger,this.performanceClient,e.correlationId)(this.authority,e),r=o.headers?.[On],n=new Xu(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return n.validateTokenResponse(o.body),cu(n.handleServerTokenResponse.bind(n),Rd,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,i,e,t,void 0,void 0,void 0,r)}getLogoutUri(e){if(!e)throw Js(Ds);const t=this.createLogoutUrlQueryString(e);return ul.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Ed,t.correlationId);const i=this.createTokenQueryParameters(t),o=ul.appendQueryString(e.tokenEndpoint,i),r=await cu(this.createTokenRequestBody.bind(this),Od,this.logger,this.performanceClient,t.correlationId)(t);let n;if(t.clientInfo)try{const e=_c(t.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${e.uid}${Vn}${e.utid}`,type:Ic}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(n||t.ccsCredential),s=vu(this.config.authOptions.clientId,t);return cu(this.executePostToTokenEndpoint.bind(this),Yl,this.logger,this.performanceClient,t.correlationId)(o,r,a,s,t.correlationId,Yl)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Od,e.correlationId);const t=new Map;if(Dc(t,e.embeddedClientId||e.tokenBodyParameters?.[Oc]||this.config.authOptions.clientId),this.includeRedirectUri)kc(t,e.redirectUri);else if(!e.redirectUri)throw Js(bs);if(xc(t,e.scopes,!0,this.oidcDefaultScopes),function(e,t){e.set("code",t)}(t,e.code),Wc(t,this.config.libraryInfo),Hc(t,this.config.telemetry.application),ou(t),this.serverTelemetryManager&&!Ac(this.config)&&iu(t,this.serverTelemetryManager),e.codeVerifier&&function(e,t){e.set("code_verifier",t)}(t,e.codeVerifier),this.config.clientCredentials.clientSecret&&Vc(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;zc(t,await tp(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),$c(t,i.assertionType)}if(Qc(t,jn),Zc(t),e.authenticationScheme===ra.POP){const i=new Zu(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await cu(i.generateCnf.bind(i),Cd,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}eu(t,o)}else if(e.authenticationScheme===ra.SSH){if(!e.sshJwk)throw Js(js);tu(t,e.sshJwk)}let i;if((!Xs.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&jc(t,e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=_c(e.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${t.uid}${Vn}${t.utid}`,type:Ic}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else i=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case Ic:try{Bc(t,Ec(i.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case yc:Fc(t,i.credential)}return e.embeddedClientId&&ru(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&Xc(t,e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[bc]||Xc(t,{[bc]:"1"}),Lc(t,e.correlationId,this.performanceClient),dl(t)}createLogoutUrlQueryString(e){const t=new Map;return e.postLogoutRedirectUri&&function(e,t){e.set("post_logout_redirect_uri",t)}(t,e.postLogoutRedirectUri),e.correlationId&&Gc(t,e.correlationId),e.idTokenHint&&function(e,t){e.set("id_token_hint",t)}(t,e.idTokenHint),e.state&&Yc(t,e.state),e.logoutHint&&function(e,t){e.set("logout_hint",t)}(t,e.logoutHint),e.extraQueryParameters&&Xc(t,e.extraQueryParameters),this.config.authOptions.instanceAware&&Jc(t),dl(t,this.config.authOptions.encodeExtraQueryParams,e.extraQueryParameters)}}
|
|
92
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class op extends Du{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(Vl,e.correlationId);const t=pu(),i=await cu(this.executeTokenRequest.bind(this),Kl,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=i.headers?.[On],r=new Xu(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(i.body),cu(r.handleServerTokenResponse.bind(r),Rd,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){if(!e)throw Js(xs);if(this.performanceClient?.addQueueMeasurement($l,e.correlationId),!e.account)throw ys(Ja);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await cu(this.acquireTokenWithCachedRefreshToken.bind(this),zl,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const i=t instanceof Ku&&t.errorCode===Fu,o=t instanceof Su&&t.errorCode===da&&t.subError===ca;if(i||o)return cu(this.acquireTokenWithCachedRefreshToken.bind(this),zl,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return cu(this.acquireTokenWithCachedRefreshToken.bind(this),zl,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(zl,e.correlationId);const i=du(this.cacheManager.getRefreshToken.bind(this.cacheManager),Hd,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!i)throw zu(Fu);if(i.expiresOn&&fu(i.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),zu(qu);const o={...e,refreshToken:i.secret,authenticationScheme:e.authenticationScheme||ra.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Ic}};try{return await cu(this.acquireToken.bind(this),Vl,this.logger,this.performanceClient,e.correlationId)(o)}catch(t){if(t instanceof Ku&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),t.subError===Gu)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const t=this.cacheManager.generateCredentialKey(i);this.cacheManager.removeRefreshToken(t,e.correlationId)}throw t}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Kl,e.correlationId);const i=this.createTokenQueryParameters(e),o=ul.appendQueryString(t.tokenEndpoint,i),r=await cu(this.createTokenRequestBody.bind(this),Ql,this.logger,this.performanceClient,e.correlationId)(e),n=this.createTokenRequestHeaders(e.ccsCredential),a=vu(this.config.authOptions.clientId,e);return cu(this.executePostToTokenEndpoint.bind(this),Hl,this.logger,this.performanceClient,e.correlationId)(o,r,n,a,e.correlationId,Hl)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Ql,e.correlationId);const t=new Map;if(Dc(t,e.embeddedClientId||e.tokenBodyParameters?.[Oc]||this.config.authOptions.clientId),e.redirectUri&&kc(t,e.redirectUri),xc(t,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Qc(t,Gn),Zc(t),Wc(t,this.config.libraryInfo),Hc(t,this.config.telemetry.application),ou(t),this.serverTelemetryManager&&!Ac(this.config)&&iu(t,this.serverTelemetryManager),function(e,t){e.set("refresh_token",t)}(t,e.refreshToken),this.config.clientCredentials.clientSecret&&Vc(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;zc(t,await tp(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),$c(t,i.assertionType)}if(e.authenticationScheme===ra.POP){const i=new Zu(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await cu(i.generateCnf.bind(i),Cd,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}eu(t,o)}else if(e.authenticationScheme===ra.SSH){if(!e.sshJwk)throw Js(js);tu(t,e.sshJwk)}if((!Xs.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&jc(t,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Ic:try{Bc(t,Ec(e.ccsCredential.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case yc:Fc(t,e.ccsCredential.credential)}return e.embeddedClientId&&ru(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&Xc(t,e.tokenBodyParameters),Lc(t,e.correlationId,this.performanceClient),dl(t)}}
|
|
93
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class rp extends Du{constructor(e,t){super(e,t)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(Jl,e.correlationId);let t=Ta;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Xs.isEmptyObj(e.claims))throw this.setCacheOutcome(Aa,e.correlationId),ys(as);if(!e.account)throw ys(Ja);const i=e.account.tenantId||function(e){const t=new ul(e).getUrlComponents(),i=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(i){case Rn:case bn:case wn:return;default:return i}}(e.authority),o=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(e.account,e,o,i);if(!r)throw this.setCacheOutcome(Ia,e.correlationId),ys(as);if(n=r.cachedAt,Number(n)>pu()||fu(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(ya,e.correlationId),ys(as);var n;r.refreshOn&&fu(r.refreshOn,0)&&(t=_a);const a=e.authority||this.authority.getPreferredCache(),s={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(e.account),e.correlationId),accessToken:r,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,o,i,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await cu(this.generateResultFromCacheRecord.bind(this),Xl,this.logger,this.performanceClient,e.correlationId)(s,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==Ta&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let i;if(this.performanceClient?.addQueueMeasurement(Xl,t.correlationId),e.idToken&&(i=rl(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=i?.auth_time;if(!e)throw ys(qa);nl(e,t.maxAge)}return Xu.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,i)}}
|
|
94
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const np={sendGetRequestAsync:()=>Promise.reject(ys(gs)),sendPostRequestAsync:()=>Promise.reject(ys(gs))};
|
|
95
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function ap(e,t,i,o){const r=t.correlationId,n=new Map;Dc(n,t.embeddedClientId||t.extraQueryParameters?.[Oc]||e.clientId);if(xc(n,[...t.scopes||[],...t.extraScopesToConsent||[]],!0,e.authority.options.OIDCOptions?.defaultScopes),kc(n,t.redirectUri),Gc(n,r),function(e,t){e.set("response_mode",t||qn)}(n,t.responseMode),Zc(n),t.prompt&&(!function(e,t){e.set("prompt",t)}(n,t.prompt),o?.addFields({prompt:t.prompt},r)),t.domainHint&&(!function(e,t){e.set("domain_hint",t)}(n,t.domainHint),o?.addFields({domainHintFromRequest:!0},r)),t.prompt!==Ln)if(t.sid&&t.prompt===xn)i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),qc(n,t.sid),o?.addFields({sidFromRequest:!0},r);else if(t.account){const e=(a=t.account,a.idTokenClaims?.sid||null);let s=function(e){return e.loginHint||e.idTokenClaims?.login_hint||null}
|
|
96
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */(t.account);if(s&&t.domainHint&&(i.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),s=null),s){i.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),Uc(n,s),o?.addFields({loginHintFromClaim:!0},r);try{Bc(n,Ec(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e&&t.prompt===xn){i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),qc(n,e),o?.addFields({sidFromClaim:!0},r);try{Bc(n,Ec(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)i.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),Uc(n,t.loginHint),Fc(n,t.loginHint),o?.addFields({loginHintFromRequest:!0},r);else if(t.account.username){i.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),Uc(n,t.account.username),o?.addFields({loginHintFromUpn:!0},r);try{Bc(n,Ec(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(i.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),Uc(n,t.loginHint),Fc(n,t.loginHint),o?.addFields({loginHintFromRequest:!0},r));else i.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");var a;return t.nonce&&function(e,t){e.set("nonce",t)}(n,t.nonce),t.state&&Yc(n,t.state),(t.claims||e.clientCapabilities&&e.clientCapabilities.length>0)&&jc(n,t.claims,e.clientCapabilities),t.embeddedClientId&&ru(n,e.clientId,e.redirectUri),!e.instanceAware||t.extraQueryParameters&&Object.keys(t.extraQueryParameters).includes(vc)||Jc(n),n}function sp(e,t,i,o){const r=dl(t,i,o);return ul.appendQueryString(e.authorizationEndpoint,r)}function lp(e,t){if(!e.state||!t)throw e.state?ys(Fa,"Cached State"):ys(Fa,"Server State");let i,o;try{i=decodeURIComponent(e.state)}catch(t){throw ys(ka,e.state)}try{o=decodeURIComponent(t)}catch(t){throw ys(ka,e.state)}if(i!==o)throw ys(Ua);if(e.error||e.error_description||e.suberror){const t=function(e){const t="code=",i=e.error_uri?.lastIndexOf(t);return i&&i>=0?e.error_uri?.substring(i+t.length):void 0}(e);if(Vu(e.error,e.error_description,e.suberror))throw new Ku(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new Su(e.error||"",e.error_description,e.suberror,t)}}function dp(e){const{skus:t,libraryName:i,libraryVersion:o,extensionName:r,extensionVersion:n}=e,a=new Map([[0,[i,o]],[2,[r,n]]]);let s=[];if(t?.length){if(s=t.split(","),s.length<4)return t}else s=Array.from({length:4},()=>"|");return a.forEach((e,t)=>{2===e.length&&e[0]?.length&&e[1]?.length&&function(e){const{skuArr:t,index:i,skuName:o,skuVersion:r}=e;if(i>=t.length)return;t[i]=[o,r].join("|")}({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})}),s.join(",")}class cp{constructor(e,t){this.cacheOutcome=Ta,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||ln.EMPTY_STRING,this.wrapperVer=e.wrapperVer||ln.EMPTY_STRING,this.telemetryCacheKey=oa.CACHE_KEY+Kn+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${oa.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],i=this.getNativeBrokerErrorCode();i?.length&&t.push(`broker_error=${i}`);const o=t.join(oa.VALUE_SEPARATOR),r=[e,this.getRegionDiscoveryFields()].join(oa.VALUE_SEPARATOR);return[oa.SCHEMA_VERSION,r,o].join(oa.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=cp.maxErrorsToSend(e),i=e.failedRequests.slice(0,2*t).join(oa.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(oa.VALUE_SEPARATOR),r=e.errors.length,n=[r,t<r?oa.OVERFLOW_TRUE:oa.OVERFLOW_FALSE].join(oa.VALUE_SEPARATOR);return[oa.SCHEMA_VERSION,e.cacheHits,i,o,n].join(oa.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=oa.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Ra?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(oa.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const e=this.getLastRequests(),t=cp.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const i={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i,this.correlationId)}}static maxErrorsToSend(e){let t,i=0,o=0;const r=e.errors.length;for(t=0;t<r;t++){const r=e.failedRequests[2*t]||ln.EMPTY_STRING,n=e.failedRequests[2*t+1]||ln.EMPTY_STRING,a=e.errors[t]||ln.EMPTY_STRING;if(o+=r.toString().length+n.toString().length+a.length+3,!(o<oa.MAX_LAST_HEADER_BYTES))break;i+=1}return i}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||ln.EMPTY_STRING),e.push(this.regionSource||ln.EMPTY_STRING),e.push(this.regionOutcome||ln.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId)}static makeExtraSkuString(e){return dp(e)}}
|
|
97
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const up="missing_kid_error",pp="missing_alg_error",hp={[up]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[pp]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class mp extends Ra{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,mp.prototype)}}function fp(e){return new mp(e,hp[e])}
|
|
98
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class gp{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw fp(up);if(!e.alg)throw fp(pp);const t=new gp({typ:e.typ||Ea,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}
|
|
99
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Tp="pkce_not_created",Ap="ear_jwk_empty",Ip="ear_jwe_empty",yp="crypto_nonexistent",_p="empty_navigate_uri",Ep="hash_empty_error",Op="no_state_in_hash",Cp="hash_does_not_contain_known_properties",Np="unable_to_parse_state",Rp="state_interaction_type_mismatch",bp="interaction_in_progress",wp="popup_window_error",Pp="empty_window_error",Sp="user_cancelled",vp="monitor_popup_timeout",Lp="monitor_window_timeout",Mp="redirect_in_iframe",xp="block_iframe_reload",Dp="block_nested_popups",kp="iframe_closed_prematurely",Up="silent_logout_unsupported",Fp="no_account_error",Bp="silent_prompt_value_error",qp="no_token_request_cache_error",jp="unable_to_parse_token_request_cache_error",Gp="auth_request_not_set_error",Wp="invalid_cache_type",Hp="non_browser_environment",Yp="database_not_open",Kp="no_network_connectivity",Vp="post_request_failed",zp="get_request_failed",$p="failed_to_parse_response",Qp="unable_to_load_token",Zp="crypto_key_not_found",Jp="auth_code_required",Xp="auth_code_or_nativeAccountId_required",eh="spa_code_and_nativeAccountId_present",th="database_unavailable",ih="unable_to_acquire_token_from_native_platform",oh="native_handshake_timeout",rh="native_extension_not_installed",nh="native_connection_not_established",ah="uninitialized_public_client_application",sh="native_prompt_not_supported",lh="invalid_base64_string",dh="invalid_pop_token_request",ch="failed_to_build_headers",uh="failed_to_parse_headers",ph="failed_to_decrypt_ear_response",hh="timed_out",mh="For more visit: aka.ms/msaljs/browser-errors",fh={[Tp]:"The PKCE code challenge and verifier could not be generated.",[Ap]:"No EAR encryption key provided. This is unexpected.",[Ip]:"Server response does not contain ear_jwe property. This is unexpected.",[yp]:"The crypto object or function is not available.",[_p]:"Navigation URI is empty. Please check stack trace for more info.",[Ep]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${mh}`,[Op]:"Hash does not contain state. Please verify that the request originated from msal.",[Cp]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${mh}`,[Np]:"Unable to parse state. Please verify that the request originated from msal.",[Rp]:"Hash contains state but the interaction type does not match the caller.",[bp]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${mh}`,[wp]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[Pp]:"window.open returned null or undefined window object.",[Sp]:"User cancelled the flow.",[vp]:`Token acquisition in popup failed due to timeout. ${mh}`,[Lp]:`Token acquisition in iframe failed due to timeout. ${mh}`,[Mp]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[xp]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${mh}`,[Dp]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[kp]:"The iframe being monitored was closed prematurely.",[Up]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[Fp]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[Bp]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[qp]:"No token request found in cache.",[jp]:"The cached token request could not be parsed.",[Gp]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Wp]:"Invalid cache type",[Hp]:"Login and token requests are not supported in non-browser environments.",[Yp]:"Database is not open!",[Kp]:"No network connectivity. Check your internet connection.",[Vp]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[zp]:"Network request failed. Please check the network trace to determine root cause.",[$p]:"Failed to parse network response. Check network trace.",[Qp]:"Error loading token to cache.",[Zp]:"Cryptographic Key or Keypair not found in browser storage.",[Jp]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[Xp]:"An authorization code or nativeAccountId must be provided to this flow.",[eh]:"Request cannot contain both spa code and native account id.",[th]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[ih]:`Unable to acquire token from native platform. ${mh}`,[oh]:"Timed out while attempting to establish connection to browser extension",[rh]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[nh]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${mh}`,[ah]:`You must call and await the initialize function before attempting to call any other MSAL API. ${mh}`,[sh]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[lh]:"Invalid base64 encoded string.",[dh]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[ch]:"Failed to build request headers object.",[uh]:"Failed to parse response headers",[ph]:"Failed to decrypt ear response",[hh]:"The request timed out."};class gh extends Ra{constructor(e,t){super(e,fh[e],t),Object.setPrototypeOf(this,gh.prototype),this.name="BrowserAuthError"}}function Th(e,t){return new gh(e,t)}
|
|
100
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Ah="invalid_grant",Ih=483,yh=600,_h="msal",Eh=30,Oh="msal.js.browser",Ch="53ee284d-920a-4b59-9d30-a60315b26836",Nh="ppnbnpeolgkicgegkbkbjmhlideopiji",Rh="MATS",bh="MicrosoftEntra",wh="DOM API",Ph="get-token-and-sign-out",Sh="PlatformAuthDOMHandler",vh="PlatformAuthExtensionHandler",Lh="Handshake",Mh="HandshakeResponse",xh="GetToken",Dh="Response",kh="localStorage",Uh="sessionStorage",Fh="memoryStorage",Bh="GET",qh="POST",jh="signin",Gh="signout",Wh="request.origin",Hh="urlHash",Yh="request.params",Kh="code.verifier",Vh="interaction.status",zh="request.native",$h="wrapper.sku",Qh="wrapper.version",Zh=861,Jh=862,Xh=863,em=865,tm=866,im=61,om=961,rm=962;var nm;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(nm||(nm={}));const am="startup",sm="login",lm="logout",dm="acquireToken",cm="ssoSilent",um="handleRedirect",pm="none",hm={scopes:Tn},mm="@azure/msal-react",fm="msal.db",gm=`${fm}.keys`,Tm=0,Am=1,Im=2,ym=3,_m=4,Em=5,Om=[Tm,Em,_m];
|
|
101
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
102
|
+
function Cm(e){return encodeURIComponent(Rm(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Nm(e){return bm(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Rm(e){return bm((new TextEncoder).encode(e))}function bm(e){const t=Array.from(e,e=>String.fromCodePoint(e)).join("");return btoa(t)}
|
|
103
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */function wm(e){return(new TextDecoder).decode(Pm(e))}function Pm(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Th(lh)}const i=atob(t);return Uint8Array.from(i,e=>e.codePointAt(0)||0)}
|
|
104
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Sm="AES-GCM",vm="HKDF",Lm="SHA-256",Mm=new Uint8Array([1,0,1]),xm="0123456789abcdef",Dm=new Uint32Array(1),km="raw",Um="encrypt",Fm="decrypt",Bm={name:"RSASSA-PKCS1-v1_5",hash:Lm,modulusLength:2048,publicExponent:Mm};async function qm(e,t,i){t?.addQueueMeasurement(Zd,i);const o=(new TextEncoder).encode(e);return window.crypto.subtle.digest(Lm,o)}function jm(e){return window.crypto.getRandomValues(e)}function Gm(){return window.crypto.getRandomValues(Dm),Dm[0]}function Wm(){const e=Date.now(),t=1024*Gm()+(1023&Gm()),i=new Uint8Array(16),o=Math.trunc(t/2**30),r=t&2**30-1,n=Gm();i[0]=e/2**40,i[1]=e/2**32,i[2]=e/2**24,i[3]=e/65536,i[4]=e/256,i[5]=e,i[6]=112|o>>>8,i[7]=o,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n;let a="";for(let e=0;e<i.length;e++)a+=xm.charAt(i[e]>>>4),a+=xm.charAt(15&i[e]),3!==e&&5!==e&&7!==e&&9!==e||(a+="-");return a}async function Hm(e){return window.crypto.subtle.exportKey("jwk",e)}async function Ym(){const e=await Vm(),t={alg:"dir",kty:"oct",k:Nm(new Uint8Array(e))};return Rm(JSON.stringify(t))}async function Km(e,t){const i=t.split(".");if(5!==i.length)throw Th(ph,"jwe_length");const o=await async function(e){const t=wm(e),i=Pm(JSON.parse(t).k);return window.crypto.subtle.importKey(km,i,Sm,!1,[Fm])}(e).catch(()=>{throw Th(ph,"import_key")});try{const e=(new TextEncoder).encode(i[0]),t=Pm(i[2]),r=Pm(i[3]),n=Pm(i[4]),a=8*n.byteLength,s=new Uint8Array(r.length+n.length);s.set(r),s.set(n,r.length);const l=await window.crypto.subtle.decrypt({name:Sm,iv:t,tagLength:a,additionalData:e},o,s);return(new TextDecoder).decode(l)}catch(e){throw Th(ph,"decrypt")}}async function Vm(){const e=await window.crypto.subtle.generateKey({name:Sm,length:256},!0,[Um,Fm]);return window.crypto.subtle.exportKey(km,e)}async function zm(e){return window.crypto.subtle.importKey(km,e,vm,!1,["deriveKey"])}async function $m(e,t,i){return window.crypto.subtle.deriveKey({name:vm,salt:t,hash:Lm,info:(new TextEncoder).encode(i)},e,{name:Sm,length:256},!1,[Um,Fm])}async function Qm(e,t,i){const o=(new TextEncoder).encode(t),r=window.crypto.getRandomValues(new Uint8Array(16)),n=await $m(e,r,i),a=await window.crypto.subtle.encrypt({name:Sm,iv:new Uint8Array(12)},n,o);return{data:Nm(new Uint8Array(a)),nonce:Nm(r)}}async function Zm(e,t,i,o){const r=Pm(o),n=await $m(e,Pm(t),i),a=await window.crypto.subtle.decrypt({name:Sm,iv:new Uint8Array(12)},n,r);return(new TextDecoder).decode(a)}async function Jm(e){const t=await qm(e);return Nm(new Uint8Array(t))}
|
|
105
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Xm="storage_not_supported",ef="stubbed_public_client_application_called",tf="in_mem_redirect_unavailable",of={[Xm]:"Given storage configuration option was not supported.",[ef]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[tf]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};class rf extends Ra{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,rf.prototype)}}function nf(e){return new rf(e,of[e])}
|
|
106
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */function af(e){e.location.hash="","function"==typeof e.history.replaceState&&e.history.replaceState(null,"",`${e.location.origin}${e.location.pathname}${e.location.search}`)}function sf(){return window.parent!==window}function lf(){return"undefined"!=typeof window&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function df(){if("undefined"!=typeof window&&window.opener&&window.opener!==window&&"string"==typeof window.name&&0===window.name.indexOf(`${_h}.`))throw Th(Dp)}function cf(){if("undefined"==typeof window)throw Th(Hp)}function uf(e){if(!e)throw Th(ah)}function pf(e){cf(),function(){if(ul.hashContainsKnownProperties(window.location.hash)&&sf())throw Th(xp)}(),df(),uf(e)}function hf(e,t){if(pf(e),function(e){if(sf()&&!e)throw Th(Mp)}(t.system.allowRedirectInIframe),t.cache.cacheLocation===Fh&&!t.cache.storeAuthStateInCookie)throw nf(tf)}function mf(e){const t=document.createElement("link");t.rel="preconnect",t.href=new URL(e).origin,t.crossOrigin="anonymous",document.head.appendChild(t),window.setTimeout(()=>{try{document.head.removeChild(t)}catch{}},1e4)}
|
|
107
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
108
|
+
class ff{navigateInternal(e,t){return ff.defaultNavigateWindow(e,t)}navigateExternal(e,t){return ff.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise((e,i)=>{setTimeout(()=>{i(Th(hh,"failed_to_redirect"))},t.timeout)})}}
|
|
109
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class gf{async sendGetRequestAsync(e,t){let i,o={},r=0;const n=Tf(t);try{i=await fetch(e,{method:Bh,headers:n})}catch(e){throw xu(Th(window.navigator.onLine?zp:Kp),void 0,void 0,e)}o=Af(i.headers);try{return r=i.status,{headers:o,body:await i.json(),status:r}}catch(e){throw xu(Th($p),r,o,e)}}async sendPostRequestAsync(e,t){const i=t&&t.body||"",o=Tf(t);let r,n=0,a={};try{r=await fetch(e,{method:qh,headers:o,body:i})}catch(e){throw xu(Th(window.navigator.onLine?Vp:Kp),void 0,void 0,e)}a=Af(r.headers);try{return n=r.status,{headers:a,body:await r.json(),status:n}}catch(e){throw xu(Th($p),n,a,e)}}}function Tf(e){try{const t=new Headers;if(!e||!e.headers)return t;const i=e.headers;return Object.entries(i).forEach(([e,i])=>{t.append(e,i)}),t}catch(e){throw xu(Th(ch),void 0,void 0,e)}}function Af(e){try{const t={};return e.forEach((e,i)=>{t[i]=e}),t}catch(e){throw Th(uh)}}
|
|
110
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const If=1e4;
|
|
111
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
112
|
+
const yf="4.21.1",_f="msal",Ef="browser",Of=`${_f}.${Ef}.log.level`,Cf=`${_f}.${Ef}.log.pii`,Nf=`${_f}.${Ef}.platform.auth.dom`,Rf=`${_f}.version`,bf="account.keys",wf="token.keys";function Pf(e=1){return e<1?`${_f}.${bf}`:`${_f}.${e}.${bf}`}function Sf(e,t=1){return t<1?`${_f}.${wf}.${e}`:`${_f}.${t}.${wf}.${e}`}
|
|
113
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class vf{static loggerCallback(e,t){switch(e){case Es.Error:return void console.error(t);case Es.Info:return void console.info(t);case Es.Verbose:return void console.debug(t);case Es.Warning:return void console.warn(t);default:return void console.log(t)}}constructor(e){let t;this.browserEnvironment="undefined"!=typeof window,this.config=function({auth:e,cache:t,system:i,telemetry:o},r){const n={clientId:ln.EMPTY_STRING,authority:`${ln.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:ln.EMPTY_STRING,authorityMetadata:ln.EMPTY_STRING,redirectUri:"undefined"!=typeof window?lf():"",postLogoutRedirectUri:ln.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Cl,OIDCOptions:{serverResponseType:Bn,defaultScopes:[ln.OPENID_SCOPE,ln.PROFILE_SCOPE,ln.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Rs,tenant:ln.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:Uh,cacheRetentionDays:5,temporaryCacheLocation:Uh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==kh),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:Es.Info,piiLoggingEnabled:!1},l={...{...cc,loggerOptions:s,networkClient:r?new gf:np,navigationClient:new ff,loadFrameTimeout:0,windowHashTimeout:i?.loadFrameTimeout||6e4,iframeHashTimeout:i?.loadFrameTimeout||If,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:i?.nativeBrokerHandshakeTimeout||2e3,pollIntervalMilliseconds:Eh},...i,loggerOptions:i?.loggerOptions||s},d={application:{appName:ln.EMPTY_STRING,appVersion:ln.EMPTY_STRING},client:new dc};e?.protocolMode!==Nl&&e?.OIDCOptions&&new Os(l.loggerOptions).warning(JSON.stringify(Js(Ys)));if(e?.protocolMode&&e.protocolMode===Nl&&l?.allowPlatformBroker)throw Js(Ks);return{auth:{...n,...e,OIDCOptions:{...n.OIDCOptions,...e?.OIDCOptions}},cache:{...a,...t},system:l,telemetry:{...d,...o}}}(e,this.browserEnvironment);try{t=window[Uh]}catch(e){}const i=t?.getItem(Of),o=t?.getItem(Cf)?.toLowerCase(),r="true"===o||"false"!==o&&void 0,n={...this.config.system.loggerOptions},a=i&&Object.keys(Es).includes(i)?Es[i]:void 0;a&&(n.loggerCallback=vf.loggerCallback,n.logLevel=a),void 0!==r&&(n.piiLoggingEnabled=r),this.logger=new Os(n,"@azure/msal-browser",yf),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}
|
|
114
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Lf extends vf{getModuleName(){return Lf.MODULE_NAME}getId(){return Lf.ID}async initialize(){return this.available="undefined"!=typeof window,this.available}}Lf.MODULE_NAME="",Lf.ID="StandardOperatingContext";
|
|
115
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
116
|
+
class Mf{constructor(){this.dbName=fm,this.version=1,this.tableName=gm,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const i=window.indexedDB.open(this.dbName,this.version);i.addEventListener("upgradeneeded",e=>{e.target.result.createObjectStore(this.tableName)}),i.addEventListener("success",t=>{const i=t;this.db=i.target.result,this.dbOpen=!0,e()}),i.addEventListener("error",()=>t(Th(th)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(Th(Yp));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);o.addEventListener("success",e=>{const i=e;this.closeConnection(),t(i.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((i,o)=>{if(!this.db)return o(Th(Yp));const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);r.addEventListener("success",()=>{this.closeConnection(),i()}),r.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(Th(Yp));const o=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);o.addEventListener("success",()=>{this.closeConnection(),t()}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(Th(Yp));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();i.addEventListener("success",t=>{const i=t;this.closeConnection(),e(i.target.result)}),i.addEventListener("error",e=>{this.closeConnection(),t(e)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(Th(Yp));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);o.addEventListener("success",e=>{const i=e;this.closeConnection(),t(1===i.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const i=window.indexedDB.deleteDatabase(fm),o=setTimeout(()=>t(!1),200);i.addEventListener("success",()=>(clearTimeout(o),e(!0))),i.addEventListener("blocked",()=>(clearTimeout(o),e(!0))),i.addEventListener("error",()=>(clearTimeout(o),t(!1)))})}}
|
|
117
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class xf{constructor(){this.cache=new Map}async initialize(){}getItem(e){return this.cache.get(e)||null}getUserData(e){return this.getItem(e)}setItem(e,t){this.cache.set(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,i)=>{e.push(i)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}decryptData(){return Promise.resolve(null)}}
|
|
118
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Df{constructor(e){this.inMemoryCache=new xf,this.indexedDBCache=new Mf,this.logger=e}handleDatabaseAccessError(e){if(!(e instanceof gh&&e.errorCode===th))throw e;this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.")}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(e){this.handleDatabaseAccessError(e)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(e){this.handleDatabaseAccessError(e)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(e){this.handleDatabaseAccessError(e)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(0===e.length)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(e){this.handleDatabaseAccessError(e)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(e){this.handleDatabaseAccessError(e)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}
|
|
119
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class kf{constructor(e,t,i){this.logger=e,function(e){if(!window)throw Th(Hp);if(!window.crypto)throw Th(yp);if(!e&&!window.crypto.subtle)throw Th(yp,"crypto_subtle_undefined")}(i??!1),this.cache=new Df(this.logger),this.performanceClient=t}createNewGuid(){return Wm()}base64Encode(e){return Rm(e)}base64Decode(e){return wm(e)}base64UrlEncode(e){return Cm(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){const t=this.performanceClient?.startMeasurement(xl,e.correlationId),i=await async function(e,t){return window.crypto.subtle.generateKey(Bm,e,t)}(kf.EXTRACTABLE,kf.POP_KEY_USAGES),o=await Hm(i.publicKey),r=Uf({e:o.e,kty:o.kty,n:o.n}),n=await this.hashString(r),a=await Hm(i.privateKey),s=await async function(e,t,i){return window.crypto.subtle.importKey("jwk",e,Bm,t,i)}(a,!1,["sign"]);return await this.cache.setItem(n,{privateKey:s,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),n}async removeTokenBindingKey(e){await this.cache.removeItem(e);if(await this.cache.containsKey(e))throw ys(cs)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,i,o){const r=this.performanceClient?.startMeasurement(Dl,o),n=await this.cache.getItem(t);if(!n)throw Th(Zp);const a=await Hm(n.publicKey),s=Uf(a),l=Cm(JSON.stringify({kid:t})),d=Cm(gp.getShrHeaderString({...i?.header,alg:a.alg,kid:l}));e.cnf={jwk:JSON.parse(s)};const c=`${d}.${Cm(JSON.stringify(e))}`,u=(new TextEncoder).encode(c),p=await async function(e,t){return window.crypto.subtle.sign(Bm,e,t)}(n.privateKey,u),h=`${c}.${Nm(new Uint8Array(p))}`;return r&&r.end({success:!0}),h}async hashString(e){return Jm(e)}}function Uf(e){return JSON.stringify(e,Object.keys(e).sort())}
|
|
120
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */kf.POP_KEY_USAGES=["sign","verify"],kf.EXTRACTABLE=!0;const Ff=864e5,Bf="Lax",qf="None";class jf{initialize(){return Promise.resolve()}getItem(e){const t=`${encodeURIComponent(e)}`,i=document.cookie.split(";");for(let e=0;e<i.length;e++){const o=i[e],[r,...n]=decodeURIComponent(o).trim().split("="),a=n.join("=");if(r===t)return a}return""}getUserData(){throw ys(gs)}setItem(e,t,i,o=!0,r=Bf){let n=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=${r};`;if(i){const e=function(e){const t=new Date,i=new Date(t.getTime()+e*Ff);return i.toUTCString()}
|
|
121
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */(i);n+=`expires=${e};`}(o||r===qf)&&(n+="Secure;"),document.cookie=n}async setUserData(){return Promise.reject(ys(gs))}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(e=>{const i=decodeURIComponent(e).trim().split("=");t.push(i[0])}),t}containsKey(e){return this.getKeys().includes(e)}decryptData(){return Promise.resolve(null)}}function Gf(e,t){const i=e.getItem(Pf(t));return i?JSON.parse(i):[]}function Wf(e,t,i){const o=t.getItem(Sf(e,i));if(o){const e=JSON.parse(o);if(e&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("accessToken")&&e.hasOwnProperty("refreshToken"))return e}return{idToken:[],accessToken:[],refreshToken:[]}}
|
|
122
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */function Hf(e){return e.hasOwnProperty("id")&&e.hasOwnProperty("nonce")&&e.hasOwnProperty("data")}
|
|
123
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Yf="msal.cache.encryption";class Kf{constructor(e,t,i){if(!window.localStorage)throw nf(Xm);this.memoryStorage=new xf,this.initialized=!1,this.clientId=e,this.logger=t,this.performanceClient=i,this.broadcast=new BroadcastChannel("msal.broadcast.cache")}async initialize(e){const t=new jf,i=t.getItem(Yf);let o={key:"",id:""};if(i)try{o=JSON.parse(i)}catch(e){}if(o.key&&o.id){const t=du(Pm,tc,this.logger,this.performanceClient,e)(o.key);this.encryptionCookie={id:o.id,key:await cu(zm,Xd,this.logger,this.performanceClient,e)(t)}}else{const i=Wm(),o=await cu(Vm,ec,this.logger,this.performanceClient,e)(),r=du(Nm,ic,this.logger,this.performanceClient,e)(new Uint8Array(o));this.encryptionCookie={id:i,key:await cu(zm,Xd,this.logger,this.performanceClient,e)(o)};const n={id:i,key:r};t.setItem(Yf,JSON.stringify(n),0,!0,qf)}await cu(this.importExistingCache.bind(this),Yd,this.logger,this.performanceClient,e)(e),this.broadcast.addEventListener("message",this.updateCache.bind(this)),this.initialized=!0}getItem(e){return window.localStorage.getItem(e)}getUserData(e){if(!this.initialized)throw Th(ah);return this.memoryStorage.getItem(e)}async decryptData(e,t,i){if(!this.initialized||!this.encryptionCookie)throw Th(ah);if(t.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},i),null;const o=await cu(Zm,rc,this.logger,this.performanceClient,i)(this.encryptionCookie.key,t.nonce,this.getContext(e),t.data);if(!o)return null;try{return JSON.parse(o)}catch(e){return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},i),null}}setItem(e,t){window.localStorage.setItem(e,t)}async setUserData(e,t,i,o){if(!this.initialized||!this.encryptionCookie)throw Th(ah);const{data:r,nonce:n}=await cu(Qm,oc,this.logger,this.performanceClient,i)(this.encryptionCookie.key,t,this.getContext(e)),a={id:this.encryptionCookie.id,nonce:n,data:r,lastUpdatedAt:o};this.memoryStorage.setItem(e,t),this.setItem(e,JSON.stringify(a)),this.broadcast.postMessage({key:e,value:t,context:this.getContext(e)})}removeItem(e){this.memoryStorage.containsKey(e)&&(this.memoryStorage.removeItem(e),this.broadcast.postMessage({key:e,value:null,context:this.getContext(e)})),window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}clear(){this.memoryStorage.clear();Gf(this).forEach(e=>this.removeItem(e));const e=Wf(this.clientId,this);e.idToken.forEach(e=>this.removeItem(e)),e.accessToken.forEach(e=>this.removeItem(e)),e.refreshToken.forEach(e=>this.removeItem(e)),this.getKeys().forEach(e=>{(e.startsWith(_f)||-1!==e.indexOf(this.clientId))&&this.removeItem(e)})}async importExistingCache(e){if(!this.encryptionCookie)return;let t=Gf(this);t=await this.importArray(t,e),t.length?this.setItem(Pf(),JSON.stringify(t)):this.removeItem(Pf());const i=Wf(this.clientId,this);i.idToken=await this.importArray(i.idToken,e),i.accessToken=await this.importArray(i.accessToken,e),i.refreshToken=await this.importArray(i.refreshToken,e),i.idToken.length||i.accessToken.length||i.refreshToken.length?this.setItem(Sf(this.clientId),JSON.stringify(i)):this.removeItem(Sf(this.clientId))}async getItemFromEncryptedCache(e,t){if(!this.encryptionCookie)return null;const i=this.getItem(e);if(!i)return null;let o;try{o=JSON.parse(i)}catch(e){return null}return Hf(o)?o.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},t),null):cu(Zm,rc,this.logger,this.performanceClient,t)(this.encryptionCookie.key,o.nonce,this.getContext(e),o.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},t),o)}async importArray(e,t){const i=[],o=[];return e.forEach(e=>{const r=this.getItemFromEncryptedCache(e,t).then(t=>{t?(this.memoryStorage.setItem(e,t),i.push(e)):this.removeItem(e)});o.push(r)}),await Promise.all(o),i}getContext(e){let t="";return e.includes(this.clientId)&&(t=this.clientId),t}updateCache(e){this.logger.trace("Updating internal cache from broadcast event");const t=this.performanceClient.startMeasurement(Vd);t.add({isBackground:!0});const{key:i,value:o,context:r}=e.data;return i?r&&r!==this.clientId?(this.logger.trace(`Ignoring broadcast event from clientId: ${r}`),void t.end({success:!1,errorCode:"contextMismatch"})):(o?(this.memoryStorage.setItem(i,o),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(i),this.logger.verbose("Removed item from internal cache")),void t.end({success:!0})):(this.logger.error("Broadcast event missing key"),void t.end({success:!1,errorCode:"noKey"}))}}
|
|
124
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Vf{constructor(){if(!window.sessionStorage)throw nf(Xm)}async initialize(){}getItem(e){return window.sessionStorage.getItem(e)}getUserData(e){return this.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}decryptData(){return Promise.resolve(null)}}
|
|
125
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const zf="msal:initializeStart",$f="msal:initializeEnd",Qf="msal:accountAdded",Zf="msal:accountRemoved",Jf="msal:activeAccountChanged",Xf="msal:loginStart",eg="msal:loginSuccess",tg="msal:loginFailure",ig="msal:acquireTokenStart",og="msal:acquireTokenSuccess",rg="msal:acquireTokenFailure",ng="msal:acquireTokenFromNetworkStart",ag="msal:ssoSilentStart",sg="msal:ssoSilentSuccess",lg="msal:ssoSilentFailure",dg="msal:acquireTokenByCodeStart",cg="msal:acquireTokenByCodeSuccess",ug="msal:acquireTokenByCodeFailure",pg="msal:handleRedirectStart",hg="msal:handleRedirectEnd",mg="msal:popupOpened",fg="msal:logoutStart",gg="msal:logoutSuccess",Tg="msal:logoutFailure",Ag="msal:logoutEnd",Ig="msal:restoreFromBFCache";
|
|
126
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */function yg(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}
|
|
127
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class _g extends El{constructor(e,t,i,o,r,n,a){super(e,i,o,r,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new xf,this.browserStorage=Eg(e,t.cacheLocation,o,r),this.temporaryCacheStorage=Eg(e,t.temporaryCacheLocation,o,r),this.cookieStorage=new jf,this.eventHandler=n}async initialize(e){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},e),await this.browserStorage.initialize(e),await this.migrateExistingCache(e),this.trackVersionChanges(e)}async migrateExistingCache(e){const t=Gf(this.browserStorage,0),i=Wf(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:t.length,oldAccessCount:i.accessToken.length,oldIdCount:i.idToken.length,oldRefreshCount:i.refreshToken.length},e);const o=Gf(this.browserStorage,1),r=Wf(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:o.length,currAccessCount:r.accessToken.length,currIdCount:r.idToken.length,currRefreshCount:r.refreshToken.length},e),await Promise.all([this.updateV0ToCurrent(1,t,o,e),this.updateV0ToCurrent(1,i.idToken,r.idToken,e),this.updateV0ToCurrent(1,i.accessToken,r.accessToken,e),this.updateV0ToCurrent(1,i.refreshToken,r.refreshToken,e)]),t.length>0?this.browserStorage.setItem(Pf(0),JSON.stringify(t)):this.browserStorage.removeItem(Pf(0)),o.length>0?this.browserStorage.setItem(Pf(1),JSON.stringify(o)):this.browserStorage.removeItem(Pf(1)),this.setTokenKeys(i,e,0),this.setTokenKeys(r,e,1)}async updateV0ToCurrent(e,t,i,o){const r=[];for(const n of[...t]){const a=this.browserStorage.getItem(n),s=this.validateAndParseJson(a||"");if(!s){yg(t,n);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(n,JSON.stringify(s),o));const l=Hf(s)?await this.browserStorage.decryptData(n,s,o):s;let d;if(l&&(_u(l)||Eu(l))&&(d=l.expiresOn),!l||gu(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||d&&fu(d,300))this.browserStorage.removeItem(n),yg(t,n),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);else if(this.cacheConfig.cacheLocation!==kh||Hf(s)){const t=`${_f}.${e}-${n}`,a=this.browserStorage.getItem(t);if(!a){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{i.push(t),this.performanceClient.incrementFields({upgradedCacheCount:1},o)}));continue}{const e=this.validateAndParseJson(a);if(Number(s.lastUpdatedAt)>Number(e.lastUpdatedAt)){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},o)}));continue}}}}return Promise.all(r)}trackVersionChanges(e){const t=this.browserStorage.getItem(Rf);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==yf&&this.setItem(Rf,yf,e)}validateAndParseJson(e){if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}setItem(e,t,i){let o=0,r=[];for(let n=0;n<=20;n++)try{this.browserStorage.setItem(e,t),n>0&&(n<=o?this.removeAccessTokenKeys(r.slice(0,n),i,0):(this.removeAccessTokenKeys(r.slice(0,o),i,0),this.removeAccessTokenKeys(r.slice(o,n),i)));break}catch(a){const s=_l(a);if(!(s.errorCode===Tl&&n<20))throw s;if(!r.length){const i=e===Sf(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,n=e===Sf(this.clientId)?JSON.parse(t).accessToken:this.getTokenKeys().accessToken;r=[...i,...n],o=i.length}if(r.length<=n)throw s;this.removeAccessToken(r[n],i,!1)}}async setUserData(e,t,i,o){let r=0,n=[];for(let a=0;a<=20;a++)try{await cu(this.browserStorage.setUserData.bind(this.browserStorage),Kd,this.logger,this.performanceClient)(e,t,i,o),a>0&&(a<=r?this.removeAccessTokenKeys(n.slice(0,a),i,0):(this.removeAccessTokenKeys(n.slice(0,r),i,0),this.removeAccessTokenKeys(n.slice(r,a),i)));break}catch(e){const t=_l(e);if(!(t.errorCode===Tl&&a<20))throw t;if(!n.length){const e=this.getTokenKeys(0).accessToken,t=this.getTokenKeys().accessToken;n=[...e,...t],r=e.length}if(n.length<=a)throw t;this.removeAccessToken(n[a],i,!1)}}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const i=this.browserStorage.getUserData(e);if(!i)return this.removeAccountKeyFromMap(e,t),null;const o=this.validateAndParseJson(i);return o&&Uu.isAccountEntity(o)?El.toObject(new Uu,o):null}async setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const i=this.generateAccountKey(e.getAccountInfo()),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.addAccountKeyToMap(i,t);this.cacheConfig.cacheLocation===kh&&r&&this.eventHandler.emitEvent(Qf,void 0,e.getAccountInfo())}getAccountKeys(){return Gf(this.browserStorage)}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const i=this.getAccountKeys();return-1===i.indexOf(e)?(i.push(e),this.setItem(Pf(),JSON.stringify(i),t),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added"),!0):(this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map"),!1)}removeAccountKeyFromMap(e,t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const i=this.getAccountKeys(),o=i.indexOf(e);if(o>-1){if(i.splice(o,1),0===i.length)return void this.removeItem(Pf());this.setItem(Pf(),JSON.stringify(i),t),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}removeAccount(e,t){const i=this.getActiveAccount(t);i?.homeAccountId===e.homeAccountId&&i?.environment===e.environment&&this.setActiveAccount(null,t),super.removeAccount(e,t),this.removeAccountKeyFromMap(this.generateAccountKey(e),t),this.browserStorage.getKeys().forEach(t=>{t.includes(e.homeAccountId)&&t.includes(e.environment)&&this.browserStorage.removeItem(t)}),this.cacheConfig.cacheLocation===kh&&this.eventHandler.emitEvent(Zf,void 0,e)}removeIdToken(e,t){super.removeIdToken(e,t);const i=this.getTokenKeys(),o=i.idToken.indexOf(e);o>-1&&(this.logger.info("idToken removed from tokenKeys map"),i.idToken.splice(o,1),this.setTokenKeys(i,t))}removeAccessToken(e,t,i=!0){super.removeAccessToken(e,t),i&&this.removeAccessTokenKeys([e],t)}removeAccessTokenKeys(e,t,i=1){this.logger.trace("removeAccessTokenKey called");const o=this.getTokenKeys(i);let r=0;if(e.forEach(e=>{const t=o.accessToken.indexOf(e);t>-1&&(o.accessToken.splice(t,1),r++)}),r>0)return this.logger.info(`removed ${r} accessToken keys from tokenKeys map`),void this.setTokenKeys(o,t,i)}removeRefreshToken(e,t){super.removeRefreshToken(e,t);const i=this.getTokenKeys(),o=i.refreshToken.indexOf(e);o>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),i.refreshToken.splice(o,1),this.setTokenKeys(i,t))}getTokenKeys(e=1){return Wf(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,i=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(Sf(this.clientId,i),JSON.stringify(e),t):this.removeItem(Sf(this.clientId,i))}getIdTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const o=this.validateAndParseJson(i);return o&&((r=o)&&yu(r)&&r.hasOwnProperty("realm")&&r.credentialType===zn.ID_TOKEN)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null);var r}async setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.idToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(i),this.setTokenKeys(r,t))}getAccessTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([e],t),null;const o=this.validateAndParseJson(i);return o&&_u(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null)}async setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys(),n=r.accessToken.indexOf(i);-1!==n&&r.accessToken.splice(n,1),this.logger.trace(`access token ${-1===n?"added to":"updated in"} map`),r.accessToken.push(i),this.setTokenKeys(r,t)}getRefreshTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(e,t),null;const o=this.validateAndParseJson(i);return o&&Eu(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null)}async setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.refreshToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(i),this.setTokenKeys(r,t))}getAppMetadata(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&(o=e,(r=i)&&0===o.indexOf($n)&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),i):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var o,r}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const i=function({environment:e,clientId:t}){return[$n,e,t].join(Kn).toLowerCase()}(e);this.setItem(i,JSON.stringify(e),t)}getServerTelemetry(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){const i=0===e.indexOf(oa.CACHE_KEY);let o=!0;return t&&(o=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),i):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t,i){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),i)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){return!!t&&0===e.indexOf(Zn)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),i):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(e,t){this.internalStorage.setItem($h,e),this.internalStorage.setItem(Qh,t)}getWrapperMetadata(){return[this.internalStorage.getItem($h)||ln.EMPTY_STRING,this.internalStorage.getItem(Qh)||ln.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(Nn),i=this.browserStorage.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;const o=this.validateAndParseJson(i);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const i=this.generateCacheKey(Nn);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:pu().toString()};this.setItem(i,JSON.stringify(o),t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(i);this.eventHandler.emitEvent(Jf)}getThrottlingCache(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){let i=!1;e&&(i=0===e.indexOf(sa));let o=!0;return t&&(o=t.hasOwnProperty("throttleTime")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),i):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t,i){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),i)}getTemporaryCache(e,t){const i=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.cookieStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const o=this.temporaryCacheStorage.getItem(i);if(!o){if(this.cacheConfig.cacheLocation===kh){const e=this.browserStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),e}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,i){const o=i?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}clear(e){this.removeAllAccounts(e),this.removeAppMetadata(e),this.temporaryCacheStorage.getKeys().forEach(e=>{-1===e.indexOf(_f)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(_f)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(Wd,e);const t=this.getTokenKeys();let i=0;t.accessToken.forEach(t=>{const o=this.getAccessTokenCredential(t,e);o?.requestedClaimsHash&&t.includes(o.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(t,e),i++)}),i>0&&this.logger.warning(`${i} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return Xs.startsWith(e,_f)?e:`${_f}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===zn.REFRESH_TOKEN&&e.familyId||e.clientId,i=e.tokenType&&e.tokenType.toLowerCase()!==ra.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${_f}.1`,e.homeAccountId,e.environment,e.credentialType,t,e.realm||"",e.target||"",e.requestedClaimsHash||"",i].join("-").toLowerCase()}generateAccountKey(e){const t=e.homeAccountId.split(".")[1];return[`${_f}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(Yh)),this.removeTemporaryItem(this.generateCacheKey(Kh)),this.removeTemporaryItem(this.generateCacheKey(Wh)),this.removeTemporaryItem(this.generateCacheKey(Hh)),this.removeTemporaryItem(this.generateCacheKey(zh)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const i=Rm(JSON.stringify(e));if(this.setTemporaryCache(Yh,i,!0),t){const e=Rm(t);this.setTemporaryCache(Kh,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(Yh,!0);if(!e)throw Th(qp);const t=this.getTemporaryCache(Kh,!0);let i,o="";try{i=JSON.parse(wm(e)),t&&(o=wm(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),Th(jp)}return[i,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(zh,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress()?.clientId;return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${_f}.${Vh}`,t=this.getTemporaryCache(e,!1);try{return t?JSON.parse(t):null}catch(t){return this.logger.error("Cannot parse interaction status. Removing temporary cache items and clearing url hash. Retrying interaction should fix the error"),this.removeTemporaryItem(e),this.resetRequestCache(),af(window),null}}setInteractionInProgress(e,t=jh){const i=`${_f}.${Vh}`;if(e){if(this.getInteractionInProgress())throw Th(bp);this.setTemporaryCache(i,JSON.stringify({clientId:this.clientId,type:t}),!1)}else e||this.getInteractionInProgress()?.clientId!==this.clientId||this.removeTemporaryItem(i)}async hydrateCache(e,t){const i=Tu(e.account?.homeAccountId,e.account?.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const r={idToken:i,accessToken:Au(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?hu(e.expiresOn):0,e.extExpiresOn?hu(e.extExpiresOn):0,wm,void 0,e.tokenType,void 0,t.sshKid,t.claims,o)};return this.saveCacheRecord(r,e.correlationId)}async saveCacheRecord(e,t,i){try{await super.saveCacheRecord(e,t,i)}catch(e){if(e instanceof yl&&this.performanceClient&&t)try{const e=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:e.refreshToken.length,cacheIdCount:e.idToken.length,cacheAtCount:e.accessToken.length},t)}catch(e){}throw e}}}function Eg(e,t,i,o){try{switch(t){case kh:return new Kf(e,i,o);case Uh:return new Vf}}catch(e){i.error(e)}return new xf}class Og{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Os({}),"undefined"!=typeof BroadcastChannel&&(this.broadcastChannel=new BroadcastChannel("msal.broadcast.event")),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(e,t,i){if("undefined"!=typeof window){const o=i||Wm();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,i,o){const r={eventType:e,interactionType:t||null,payload:i||null,error:o||null,timestamp:Date.now()};switch(e){case Qf:case Zf:case Jf:this.broadcastChannel?.postMessage(r);break;default:this.invokeCallbacks(r)}}invokeCallbacks(e){this.eventCallbacks.forEach(([t,i],o)=>{(0===i.length||i.includes(e.eventType))&&(this.logger.verbose(`Emitting event to callback ${o}: ${e.eventType}`),t.apply(null,[e]))})}invokeCrossTabCallbacks(e){const t=e.data;this.invokeCallbacks(t)}subscribeCrossTab(){this.broadcastChannel?.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){this.broadcastChannel?.removeEventListener("message",this.invokeCrossTabCallbacks)}}
|
|
128
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Cg{constructor(e,t,i,o,r,n,a,s,l){this.config=e,this.browserStorage=t,this.browserCrypto=i,this.networkClient=this.config.system.networkClient,this.eventHandler=r,this.navigationClient=n,this.platformAuthProvider=s,this.correlationId=l||Wm(),this.logger=o.clone(Oh,yf,this.correlationId),this.performanceClient=a}async clearCacheOnLogout(e,t){if(t)try{this.browserStorage.removeAccount(t,e),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch(e){this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),this.browserStorage.clear(e),await this.browserCrypto.clearKeystore()}catch(e){this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return ul.getAbsoluteUrl(t,lf())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const i={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new cp(i,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,i=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(jl,this.correlationId);const o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},r=e.requestAuthority||this.config.auth.authority,n=i?.length?"true"===i:this.config.auth.instanceAware,a=t&&n?this.config.auth.authority.replace(ul.getDomainFromUrl(r),t.environment):r,s=bu.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await cu(Pu,wd,this.logger,this.performanceClient,this.correlationId)(s,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw Js(Vs);return l}}
|
|
129
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function Ng(e,t,i,o){i.addQueueMeasurement(td,e.correlationId);const r=e.authority||t.auth.authority,n=[...e&&e.scopes||[]],a={...e,correlationId:e.correlationId,authority:r,scopes:n};if(a.authenticationScheme){if(a.authenticationScheme===ra.SSH){if(!e.sshJwk)throw Js(js);if(!e.sshKid)throw Js(Gs)}o.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}else a.authenticationScheme=ra.BEARER,o.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!Xs.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await Jm(e.claims)),a}async function Rg(e,t,i,o,r){o.addQueueMeasurement(id,e.correlationId);const n=await cu(Ng,td,r,o,e.correlationId)(e,i,o,r);return{...e,...n,account:t,forceRefresh:e.forceRefresh||!1}}function bg(e,t){let i;const o=e.httpMethod;if(t===Rl){if(i=o||gn,i!==gn)throw Js(zs)}else i=o||fn;if(e.authorizePostBodyParameters&&i!==gn)throw Js($s);return i}
|
|
130
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class wg extends Cg{initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||Wm(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const i=this.getLogoutHintFromIdTokenClaims(e.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=i)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return e&&null===e.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId):e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=ul.getAbsoluteUrl(e.postLogoutRedirectUri,lf())):null===this.config.auth.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=ul.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,lf())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ul.getAbsoluteUrl(lf(),lf())),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(cd,this.correlationId);const t=await cu(this.getClientConfiguration.bind(this),ud,this.logger,this.performanceClient,this.correlationId)(e);return new ip(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}=e;this.performanceClient.addQueueMeasurement(ud,this.correlationId);const a=await cu(this.getDiscoveredAuthority.bind(this),jl,this.logger,this.performanceClient,this.correlationId)({requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}),s=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Oh,version:yf,cpu:ln.EMPTY_STRING,os:ln.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(pd,this.correlationId);const i=this.getRedirectUri(e.redirectUri),o={interactionType:t},r=$u.setRequestState(this.browserCrypto,e&&e.state||ln.EMPTY_STRING,o),n={...await cu(Ng,td,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:i,state:r,nonce:e.nonce||Wm(),responseMode:this.config.auth.OIDCOptions.serverResponseType},a={...n,httpMethod:bg(n,this.config.auth.protocolMode)};if(e.loginHint||e.sid)return a;const s=e.account||this.browserStorage.getActiveAccount(this.correlationId);return s&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${s.homeAccountId}`,this.correlationId),a.account=s),a}}
|
|
131
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
132
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
133
|
+
function Pg(e,t,i){const o=ll(e);if(!o)throw sl(e)?(i.error(`A ${t} is present in the iframe but it does not contain known properties. It's likely that the ${t} has been replaced by code running on the redirectUri page.`),i.errorPii(`The ${t} detected is: ${e}`),Th(Cp)):(i.error(`The request has returned to the redirectUri but a ${t} is not present. It's likely that the ${t} has been removed or the page has been redirected by code running on the redirectUri page.`),Th(Ep));return o}function Sg(e,t,i){if(!e.state)throw Th(Op);const o=function(e,t){if(!t)return null;try{return $u.parseRequestState(e,t).libraryState.meta}catch(e){throw ys(ka)}}(t,e.state);if(!o)throw Th(Np);if(o.interactionType!==i)throw Th(Rp)}
|
|
134
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class vg{constructor(e,t,i,o,r){this.authModule=e,this.browserStorage=t,this.authCodeRequest=i,this.logger=o,this.performanceClient=r}async handleCodeResponse(e,t){let i;this.performanceClient.addQueueMeasurement(gd,t.correlationId);try{i=function(e,t){if(lp(e,t),!e.code)throw ys(ds);return e}(e,t.state)}catch(e){throw e instanceof Su&&e.subError===Sp?Th(Sp):e}return cu(this.handleCodeResponseFromServer.bind(this),fd,this.logger,this.performanceClient,t.correlationId)(i,t)}async handleCodeResponseFromServer(e,t,i=!0){if(this.performanceClient.addQueueMeasurement(fd,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await cu(this.authModule.updateAuthority.bind(this.authModule),yd,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),i&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const e=this.createCcsCredentials(t);e&&(this.authCodeRequest.ccsCredential=e)}return await cu(this.authModule.acquireToken.bind(this.authModule),_d,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Ic}:e.loginHint?{credential:e.loginHint,type:yc}:null}}
|
|
135
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Lg="user_switch",Mg={[Lg]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class xg extends Ra{constructor(e,t,i){super(e,t),Object.setPrototypeOf(this,xg.prototype),this.name="NativeAuthError",this.ext=i}}function Dg(e){return!(!e.ext||!e.ext.status||"DISABLED"!==e.ext.status)||(!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode)}function kg(e,t,i){if(i&&i.status)switch(i.status){case"ACCOUNT_UNAVAILABLE":return zu(Bu);case"USER_INTERACTION_REQUIRED":return new Ku(e,t);case"USER_CANCEL":return Th(Sp);case"NO_NETWORK":return Th(Kp);case"UX_NOT_ALLOWED":return zu(ju)}return new xg(e,Mg[e]||t,i)}
|
|
136
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Ug extends wg{async acquireToken(e){this.performanceClient.addQueueMeasurement(kl,e.correlationId);const t=this.initializeServerTelemetryManager(im),i=await cu(this.getClientConfiguration.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new rp(i,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await cu(o.acquireCachedToken.bind(o),Jl,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(e){throw e instanceof gh&&e.errorCode===Zp&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),e}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t.correlationId,t?.account)}}
|
|
137
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Fg extends Cg{constructor(e,t,i,o,r,n,a,s,l,d,c,u){super(e,t,i,o,r,n,s,l,u),this.apiId=a,this.accountId=d,this.platformAuthProvider=l,this.nativeStorageManager=c,this.silentCacheClient=new Ug(e,this.nativeStorageManager,i,o,r,n,s,l,u);const p=this.platformAuthProvider.getExtensionName();this.skus=cp.makeExtraSkuString({libraryName:Oh,libraryVersion:yf,extensionName:p,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[wc]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(Gl,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const i=this.performanceClient.startMeasurement(Gl,this.correlationId),o=pu(),r=this.initializeServerTelemetryManager(this.apiId);try{const n=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,n);return i.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(e){if(t===Am)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),i.end({success:!1,brokerErrorCode:"cache_request_failed"}),e;this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const a=await this.platformAuthProvider.sendMessage(n);return await this.handleNativeResponse(a,n,o).then(e=>(i.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),r.clearNativeBrokerErrorCode(),e)).catch(e=>{throw i.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError}),e})}catch(e){throw e instanceof xg&&r.setNativeBrokerErrorCode(e.errorCode),i.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:el.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),ys(ts);const i=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!i)throw ys(ts);try{const e=this.createSilentCacheRequest(t,i),o=await this.silentCacheClient.acquireToken(e),r={...i,idTokenClaims:o?.idTokenClaims,idToken:o?.idToken};return{...o,account:r}}catch(e){throw e}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...i}=e;delete i.onRedirectNavigate;const o=await this.initializeNativeRequest(i);try{await this.platformAuthProvider.sendMessage(o)}catch(e){if(e instanceof xg){if(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),Dg(e))throw e}}this.browserStorage.setTemporaryCache(zh,JSON.stringify(o),!0);const r={apiId:Zh,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},n=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(n,r)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const i=this.browserStorage.getCachedNativeRequest();if(!i)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&e?.addFields({errorCode:"no_cached_request"},t),null;const{prompt:o,...r}=i;o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(zh));const n=pu();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const t=await this.platformAuthProvider.sendMessage(r),i=await this.handleNativeResponse(t,r,n);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),e&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),i}catch(e){throw e}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,i){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=rl(e.id_token,wm),r=this.createHomeAccountIdentifier(e,o),n=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId},this.correlationId)?.homeAccountId;if(t.extraParameters?.child_client_id&&e.account.id!==t.accountId)this.logger.info("handleNativeServerResponse: Double broker flow detected, ignoring accountId mismatch");else if(r!==n&&e.account.id!==t.accountId)throw kg(Lg);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=ep(this.browserStorage,a,r,wm,this.correlationId,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger);e.expires_in=Number(e.expires_in);const l=await this.generateAuthenticationResult(e,t,o,s,a.canonicalAuthority,i);return await this.cacheAccount(s,this.correlationId),await this.cacheNativeTokens(e,t,r,o,e.access_token,l.tenantId,i),l}createHomeAccountIdentifier(e,t){return Uu.generateHomeAccountId(e.client_info||ln.EMPTY_STRING,nu,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?el.fromString(t):el.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===ra.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const i=new Zu(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw ys(ps);return i.signPopToken(e.access_token,t.keyId,o)}return e.access_token}async generateAuthenticationResult(e,t,i,o,r,n){const a=this.addTelemetryFromNativeResponse(e.properties.MATS),s=this.generateScopes(t.scope,e.scope),l=e.account.properties||{},d=l.UID||i.oid||i.sub||ln.EMPTY_STRING,c=l.TenantId||i.tid||ln.EMPTY_STRING,u=ol(o.getAccountInfo(),void 0,i,e.id_token);u.nativeAccountId!==e.account.id&&(u.nativeAccountId=e.account.id);const p=await this.generatePopAccessToken(e,t),h=t.tokenType===ra.POP?ra.POP:ra.BEARER;return{authority:r,uniqueId:d,tenantId:c,scopes:s.asArray(),account:u,idToken:e.id_token,idTokenClaims:i,accessToken:p,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:mu(n+e.expires_in),tokenType:h,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}async cacheAccount(e,t){await this.browserStorage.setAccount(e,this.correlationId),this.browserStorage.removeAccountContext(e.getAccountInfo(),t)}cacheNativeTokens(e,t,i,o,r,n,a){const s=Tu(i,t.authority,e.id_token||"",t.clientId,o.tid||""),l=a+(t.tokenType===ra.POP?ln.SHR_NONCE_VALIDITY:("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0),d=this.generateScopes(e.scope,t.scope),c={idToken:s,accessToken:Au(i,t.authority,r,t.clientId,o.tid||n,d.printScopes(),l,0,wm,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(c,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===ra.POP?ln.SHR_NONCE_VALIDITY:("string"==typeof t?parseInt(t,10):t)||0}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.platformAuthProvider.getExtensionId(),extensionVersion:this.platformAuthProvider.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}getMATSFromResponse(e){if(e)try{return JSON.parse(e)}catch(e){this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return void 0===e.is_cached?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=await this.getCanonicalAuthority(e),{scopes:i,...o}=e,r=new el(i||[]);r.appendScopes(Tn);const n={...o,accountId:this.accountId,clientId:this.config.auth.clientId,authority:t.urlString,scope:r.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:this.getPrompt(e.prompt),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(n.signPopToken&&e.popKid)throw Th(dh);if(this.handleExtraBrokerParams(n),n.extraParameters=n.extraParameters||{},n.extraParameters.telemetry=Rh,e.authenticationScheme===ra.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},i=new Zu(this.browserCrypto);let o;if(n.keyId)o=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:n.keyId})),n.signPopToken=!1;else{const e=await cu(i.generateCnf.bind(i),Cd,this.logger,this.performanceClient,this.correlationId)(t,this.logger);o=e.reqCnfString,n.keyId=e.kid,n.signPopToken=!0}n.reqCnf=o}return this.addRequestSKUs(n),n}async getCanonicalAuthority(e){const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const i=new ul(t);return i.validateAsUri(),i}getPrompt(e){switch(this.apiId){case Xh:case im:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),xn}if(e)switch(e){case xn:case Mn:case vn:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e} is not compatible with native flow`),Th(sh)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(Pc)&&e.extraParameters.hasOwnProperty(Sc)&&e.extraParameters.hasOwnProperty(Oc);if(!e.embeddedClientId&&!t)return;let i="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,i=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[Sc],i=e.extraParameters[Oc]),e.extraParameters={child_client_id:i,child_redirect_uri:o},this.performanceClient?.addFields({embeddedClientId:i,embeddedRedirectUri:o},this.correlationId)}}
|
|
138
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function Bg(e,t,i,o,r){const n=ap({...e.auth,authority:t},i,o,r);if(Wc(n,{sku:Oh,version:yf,os:"",cpu:""}),e.auth.protocolMode!==Nl&&Hc(n,e.telemetry.application),i.platformBroker&&(function(e){e.set("nativebroker","1")}(n),r.addFields({isPlatformAuthorizeRequest:!0},i.correlationId),i.authenticationScheme===ra.POP)){const e=new kf(o,r),t=new Zu(e);let a;if(i.popKid)a=e.encodeKid(i.popKid);else{a=(await cu(t.generateCnf.bind(t),Cd,o,r,i.correlationId)(i,o)).reqCnfString}eu(n,a)}return Lc(n,i.correlationId,r),n}async function qg(e,t,i,o,r){if(!i.codeChallenge)throw Js(Us);const n=await cu(Bg,md,o,r,i.correlationId)(e,t,i,o,r);return Mc(n,kn),Kc(n,i.codeChallenge,ln.S256_CODE_CHALLENGE_METHOD),Xc(n,i.extraQueryParameters||{}),sp(t,n,e.auth.encodeExtraQueryParams,i.extraQueryParameters)}async function jg(e,t,i,o,r,n){if(!o.earJwk)throw Th(Ap);const a=await Bg(t,i,o,r,n);Mc(a,Un),function(e,t){e.set("ear_jwk",encodeURIComponent(t)),e.set("ear_jwe_crypto","eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}(a,o.earJwk);const s=new Map;Xc(s,o.extraQueryParameters||{});return Wg(e,sp(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}async function Gg(e,t,i,o,r,n){const a=await Bg(t,i,o,r,n);Mc(a,kn),Kc(a,o.codeChallenge,o.codeChallengeMethod||ln.S256_CODE_CHALLENGE_METHOD),function(e,t){Object.entries(t).forEach(([t,i])=>{i&&e.set(t,i)})}(a,o.authorizePostBodyParameters||{});const s=new Map;Xc(s,o.extraQueryParameters||{});return Wg(e,sp(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}function Wg(e,t,i){const o=e.createElement("form");return o.method="post",o.action=t,i.forEach((t,i)=>{const r=e.createElement("input");r.hidden=!0,r.name=i,r.value=t,o.appendChild(r)}),e.body.appendChild(o),o}async function Hg(e,t,i,o,r,n,a,s,l,d){if(s.verbose("Account id found, calling WAM for token"),!d)throw Th(nh);const c=new kf(s,l),u=new Fg(o,r,c,s,a,o.system.navigationClient,i,l,d,t,n,e.correlationId),{userRequestState:p}=$u.parseRequestState(c,e.state);return cu(u.acquireToken.bind(u),Gl,s,l,e.correlationId)({...e,state:p,prompt:void 0})}async function Yg(e,t,i,o,r,n,a,s,l,d,c,u){if(Lu.removeThrottle(a,r.auth.clientId,e),t.accountId)return cu(Hg,Ad,d,c,e.correlationId)(e,t.accountId,o,r,a,s,l,d,c,u);const p={...e,code:t.code||"",codeVerifier:i},h=new vg(n,a,p,d,c);return await cu(h.handleCodeResponse.bind(h),gd,d,c,e.correlationId)(t,e)}async function Kg(e,t,i,o,r,n,a,s,l,d,c){if(Lu.removeThrottle(n,o.auth.clientId,e),lp(t,e.state),!t.ear_jwe)throw Th(Ip);if(!e.earJwk)throw Th(Ap);const u=JSON.parse(await cu(Km,ac,l,d,e.correlationId)(e.earJwk,t.ear_jwe));if(u.accountId)return cu(Hg,Ad,l,d,e.correlationId)(e,u.accountId,i,o,n,a,s,l,d,c);const p=new Xu(o.auth.clientId,n,new kf(l,d),l,null,null,d);p.validateTokenResponse(u);const h={code:"",state:e.state,nonce:e.nonce,client_info:u.client_info,cloud_graph_host_name:u.cloud_graph_host_name,cloud_instance_host_name:u.cloud_instance_host_name,cloud_instance_name:u.cloud_instance_name,msgraph_host:u.msgraph_host};return await cu(p.handleServerTokenResponse.bind(p),Rd,l,d,e.correlationId)(u,r,pu(),e,h,void 0,void 0,void 0,void 0)}
|
|
139
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function Vg(e,t,i){e.addQueueMeasurement(zd,i);const o=du(zg,$d,t,e,i)(e,t,i);return{verifier:o,challenge:await cu($g,Qd,t,e,i)(o,e,t,i)}}function zg(e,t,i){try{const o=new Uint8Array(32);du(jm,Jd,t,e,i)(o);return Nm(o)}catch(e){throw Th(Tp)}}async function $g(e,t,i,o){t.addQueueMeasurement(Qd,o);try{const r=await cu(qm,Zd,i,t,o)(e,t,o);return Nm(new Uint8Array(r))}catch(e){throw Th(Tp)}}
|
|
140
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Qg{constructor(e,t,i,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=i,this.handshakeEvent=i.startMeasurement(jd),this.platformAuthType=vh}async sendMessage(e){this.logger.trace(this.platformAuthType+" - sendMessage called.");const t={method:xh,request:e},i={channel:Ch,extensionId:this.extensionId,responseId:Wm(),body:t};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(i)}`),this.messageChannel.port1.postMessage(i);const o=await new Promise((e,t)=>{this.resolvers.set(i.responseId,{resolve:e,reject:t})});return this.validatePlatformBrokerResponse(o)}static async createProvider(e,t,i){e.trace("PlatformAuthExtensionHandler - createProvider called.");try{const o=new Qg(e,t,i,Nh);return await o.sendHandshakeRequest(),o}catch(o){const r=new Qg(e,t,i);return await r.sendHandshakeRequest(),r}}async sendHandshakeRequest(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:Ch,extensionId:this.extensionId,responseId:Wm(),body:{method:Lh}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,i)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:i}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),i(Th(oh)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace(this.platformAuthType+" - onWindowMessage called"),e.source!==window)return;const t=e.data;if(t.channel&&t.channel===Ch&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===Lh){const e=this.handshakeResolvers.get(t.responseId);if(!e)return void this.logger.trace(this.platformAuthType+`.onWindowMessage - resolver can't be found for request ${t.responseId}`);this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),e.reject(Th(rh))}}onChannelMessage(e){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");const t=e.data,i=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if(e===Dh){if(!i)return;const e=t.body.response;if(this.logger.trace(this.platformAuthType+" - Received response from browser extension"),this.logger.tracePii(this.platformAuthType+` - Received response from browser extension: ${JSON.stringify(e)}`),"Success"!==e.status)i.reject(kg(e.code,e.description,e.ext));else{if(!e.result)throw ba(Oa,"Event does not contain result.");e.result.code&&e.result.description?i.reject(kg(e.result.code,e.result.description,e.result.ext)):i.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===Mh){if(!o)return void this.logger.trace(this.platformAuthType+`.onChannelMessage - resolver can't be found for request ${t.responseId}`);clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(this.platformAuthType+` - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(t){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${t}`),this.logger.errorPii(`Unable to parse ${e}`),i?i.reject(t):o&&o.reject(t)}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw ba(Oa,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===Nh?"chrome":this.getExtensionId()?.length?"unknown":void 0}}
|
|
141
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Zg{constructor(e,t,i){this.logger=e,this.performanceClient=t,this.correlationId=i,this.platformAuthType=Sh}static async createProvider(e,t,i){if(e.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication){const o=await window.navigator.platformAuthentication.getSupportedContracts(bh);if(o?.includes(Ph))return e.trace("Platform auth api available in DOM"),new Zg(e,t,i)}}getExtensionId(){return bh}getExtensionVersion(){return""}getExtensionName(){return wh}async sendMessage(e){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{const t=this.initializePlatformDOMRequest(e),i=await window.navigator.platformAuthentication.executeGetToken(t);return this.validatePlatformBrokerResponse(i)}catch(e){throw this.logger.error(this.platformAuthType+" - executeGetToken DOM API error"),e}}initializePlatformDOMRequest(e){this.logger.trace(this.platformAuthType+" - initializeNativeDOMRequest called");const{accountId:t,clientId:i,authority:o,scope:r,redirectUri:n,correlationId:a,state:s,storeInCache:l,embeddedClientId:d,extraParameters:c,...u}=e,p=this.getDOMExtraParams(u);return{accountId:t,brokerId:this.getExtensionId(),authority:o,clientId:i,correlationId:a||this.correlationId,extraParameters:{...c,...p},isSecurityTokenService:!1,redirectUri:n,scope:r,state:s,storeInCache:l,embeddedClientId:d}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("isSuccess")){if(e.hasOwnProperty("accessToken")&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("clientInfo")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scopes")&&e.hasOwnProperty("expiresIn"))return this.logger.trace(this.platformAuthType+" - platform broker returned successful and valid response"),this.convertToPlatformBrokerResponse(e);if(e.hasOwnProperty("error")){const t=e;if(!1===t.isSuccess&&t.error&&t.error.code)throw this.logger.trace(this.platformAuthType+" - platform broker returned error response"),kg(t.error.code,t.error.description,{error:parseInt(t.error.errorCode),protocol_error:t.error.protocolError,status:t.error.status,properties:t.error.properties})}}throw ba(Oa,"Response missing expected properties.")}convertToPlatformBrokerResponse(e){this.logger.trace(this.platformAuthType+" - convertToNativeResponse called");return{access_token:e.accessToken,id_token:e.idToken,client_info:e.clientInfo,account:e.account,expires_in:e.expiresIn,scope:e.scopes,state:e.state||"",properties:e.properties||{},extendedLifetimeToken:e.extendedLifetimeToken??!1,shr:e.proofOfPossessionPayload}}getDOMExtraParams(e){return{...Object.entries(e).reduce((e,[t,i])=>(e[t]=String(i),e),{})}}}
|
|
142
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function Jg(e,t,i,o){e.trace("getPlatformAuthProvider called",i);const r=function(){let e;try{return e=window[Uh],"true"===e?.getItem(Nf)}catch(e){return!1}}();let n;e.trace("Has client allowed platform auth via DOM API: "+r);try{r&&(n=await Zg.createProvider(e,t,i)),n||(e.trace("Platform auth via DOM API not available, checking for extension"),n=await Qg.createProvider(e,o||2e3,t))}catch(t){e.trace("Platform auth not available",t)}return n}function Xg(e,t,i,o){if(t.trace("isPlatformAuthAllowed called"),!e.system.allowPlatformBroker)return t.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!i)return t.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(o)switch(o){case ra.BEARER:case ra.POP:return t.trace("isPlatformAuthAllowed: authenticationScheme is supported, returning true"),!0;default:return t.trace("isPlatformAuthAllowed: authenticationScheme is not supported, returning false"),!1}return!0}
|
|
143
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class eT extends wg{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,a,l,d),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=s,this.eventHandler=r}acquireToken(e,t){let i;try{if(i={popupName:this.generatePopupName(e.scopes||Tn,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window},this.performanceClient.addFields({isAsyncPopup:this.config.system.asyncPopups},this.correlationId),this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,i,t);{const o={...e,httpMethod:bg(e,this.config.auth.protocolMode)};return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),i.popup=this.openSizedPopup("about:blank",i),this.acquireTokenPopupAsync(o,i,t)}}catch(e){return Promise.reject(e)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),i={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:e?.popupWindowAttributes||{},popupWindowParent:e?.popupWindowParent??window},o=e&&e.authority,r=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,i,o,r)):(this.logger.verbose("asyncPopup set to false, opening popup"),i.popup=this.openSizedPopup("about:blank",i),this.logoutPopupAsync(t,i,o,r))}catch(e){return Promise.reject(e)}}async acquireTokenPopupAsync(e,t,i){this.logger.verbose("acquireTokenPopupAsync called");const o=await cu(this.initializeAuthorizationRequest.bind(this),pd,this.logger,this.performanceClient,this.correlationId)(e,nm.Popup);t.popup&&mf(o.authority);const r=Xg(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);return o.platformBroker=r,this.config.auth.protocolMode===Rl?this.executeEarFlow(o,t):this.executeCodeFlow(o,t,i)}async executeCodeFlow(e,t,i){const o=e.correlationId,r=this.initializeServerTelemetryManager(Jh),n=i||await cu(Vg,zd,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),a={...e,codeChallenge:n.challenge};try{const i=await cu(this.createAuthCodeClient.bind(this),cd,this.logger,this.performanceClient,o)({serverTelemetryManager:r,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account});if(a.httpMethod===gn)return await this.executeCodeFlowWithPost(a,t,i,n.verifier);{const r=await cu(qg,hd,this.logger,this.performanceClient,o)(this.config,i.authority,a,this.logger,this.performanceClient),s=this.initiateAuthRequest(r,t);this.eventHandler.emitEvent(mg,nm.Popup,{popupWindow:s},null);const l=await this.monitorPopupForHash(s,t.popupWindowParent),d=du(Pg,bd,this.logger,this.performanceClient,this.correlationId)(l,this.config.auth.OIDCOptions.serverResponseType,this.logger);return await cu(Yg,Id,this.logger,this.performanceClient,o)(e,d,n.verifier,Jh,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(e){throw t.popup?.close(),e instanceof Ra&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}async executeEarFlow(e,t){const i=e.correlationId,o=await cu(this.getDiscoveredAuthority.bind(this),jl,this.logger,this.performanceClient,i)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),r=await cu(Ym,nc,this.logger,this.performanceClient,i)(),n={...e,earJwk:r},a=t.popup||this.openPopup("about:blank",t);(await jg(a.document,this.config,o,n,this.logger,this.performanceClient)).submit();const s=await cu(this.monitorPopupForHash.bind(this),sd,this.logger,this.performanceClient,i)(a,t.popupWindowParent),l=du(Pg,bd,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return cu(Kg,Td,this.logger,this.performanceClient,i)(n,l,Jh,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async executeCodeFlowWithPost(e,t,i,o){const r=e.correlationId,n=await cu(this.getDiscoveredAuthority.bind(this),jl,this.logger,this.performanceClient,r)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),a=t.popup||this.openPopup("about:blank",t);(await Gg(a.document,this.config,n,e,this.logger,this.performanceClient)).submit();const s=await cu(this.monitorPopupForHash.bind(this),sd,this.logger,this.performanceClient,r)(a,t.popupWindowParent),l=du(Pg,bd,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return cu(Yg,Id,this.logger,this.performanceClient,r)(e,l,o,Jh,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async logoutPopupAsync(e,t,i,o){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(fg,nm.Popup,e);const r=this.initializeServerTelemetryManager(rm);try{await this.clearCacheOnLogout(this.correlationId,e.account);const n=await cu(this.createAuthCodeClient.bind(this),cd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:i,account:e.account||void 0});try{n.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId&&e.postLogoutRedirectUri&&n.authority.protocolMode===Nl){if(this.eventHandler.emitEvent(gg,nm.Popup,e),o){const e={apiId:rm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=ul.getAbsoluteUrl(o,lf());await this.navigationClient.navigateInternal(t,e)}return void t.popup?.close()}}const a=n.getLogoutUri(e);this.eventHandler.emitEvent(gg,nm.Popup,e);const s=this.openPopup(a,t);if(this.eventHandler.emitEvent(mg,nm.Popup,{popupWindow:s},null),await this.monitorPopupForHash(s,t.popupWindowParent).catch(()=>{}),o){const e={apiId:rm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=ul.getAbsoluteUrl(o,lf());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${t}`),await this.navigationClient.navigateInternal(t,e)}else this.logger.verbose("No main window navigation requested")}catch(e){throw t.popup?.close(),e instanceof Ra&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),this.eventHandler.emitEvent(Tg,nm.Popup,null,e),this.eventHandler.emitEvent(Ag,nm.Popup),e}this.eventHandler.emitEvent(Ag,nm.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),Th(_p)}monitorPopupForHash(e,t){return new Promise((t,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const o=setInterval(()=>{if(e.closed)return this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(o),void i(Th(Sp));let r="";try{r=e.location.href}catch(e){}if(!r||"about:blank"===r)return;clearInterval(o);let n="";const a=this.config.auth.OIDCOptions.serverResponseType;e&&(n=a===Fn?e.location.search:e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),t(n)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let i;if(t.popup?(i=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),i.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii(`Opening popup window to: ${e}`),i=this.openSizedPopup(e,t)),!i)throw Th(Pp);return i.focus&&i.focus(),this.currentWindow=i,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),i}catch(e){throw this.logger.error("error opening popup "+e.message),Th(wp)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:i,popupWindowParent:o}){const r=o.screenLeft?o.screenLeft:o.screenX,n=o.screenTop?o.screenTop:o.screenY,a=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let l=i.popupSize?.width,d=i.popupSize?.height,c=i.popupPosition?.top,u=i.popupPosition?.left;return(!l||l<0||l>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=Ih),(!d||d<0||d>s)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),d=yh),(!c||c<0||c>s)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),c=Math.max(0,s/2-yh/2+n)),(!u||u<0||u>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),u=Math.max(0,a/2-Ih/2+r)),o.open(e,t,`width=${l}, height=${d}, top=${c}, left=${u}, scrollbars=yes`)}unloadWindow(e){this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow)}generatePopupName(e,t){return`${_h}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${_h}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}
|
|
144
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class tT extends wg{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,a,l,d),this.nativeStorage=s}async acquireToken(e){const t=await cu(this.initializeAuthorizationRequest.bind(this),pd,this.logger,this.performanceClient,this.correlationId)(e,nm.Redirect);t.platformBroker=Xg(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);const i=e=>{e.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent(Ig,nm.Redirect))},o=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${o}`),this.browserStorage.setTemporaryCache(Wh,o,!0),window.addEventListener("pageshow",i);try{this.config.auth.protocolMode===Rl?await this.executeEarFlow(t):await this.executeCodeFlow(t,e.onRedirectNavigate)}catch(e){throw e instanceof Ra&&e.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),e}}async executeCodeFlow(e,t){const i=e.correlationId,o=this.initializeServerTelemetryManager(Zh),r=await cu(Vg,zd,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),n={...e,codeChallenge:r.challenge};this.browserStorage.cacheAuthorizeRequest(n,r.verifier);try{if(n.httpMethod===gn)return await this.executeCodeFlowWithPost(n);{const i=await cu(this.createAuthCodeClient.bind(this),cd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=await cu(qg,hd,this.logger,this.performanceClient,e.correlationId)(this.config,i.authority,n,this.logger,this.performanceClient);return await this.initiateAuthRequest(r,t)}}catch(e){throw e instanceof Ra&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),e}}async executeEarFlow(e){const t=e.correlationId,i=await cu(this.getDiscoveredAuthority.bind(this),jl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await cu(Ym,nc,this.logger,this.performanceClient,t)(),r={...e,earJwk:o};this.browserStorage.cacheAuthorizeRequest(r);return(await jg(document,this.config,i,r,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Th(hh,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,i=await cu(this.getDiscoveredAuthority.bind(this),jl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});this.browserStorage.cacheAuthorizeRequest(e);return(await Gg(document,this.config,i,e,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Th(hh,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e="",t,i,o){const r=this.initializeServerTelemetryManager(em);try{const[n,a]=this.getRedirectResponse(e||"");if(!n)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.resetRequestCache(),"back_forward"!==function(){if("undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.getEntriesByType)return;const e=window.performance.getEntriesByType("navigation"),t=e.length?e[0]:void 0;return t?.type}()?o.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const s=this.browserStorage.getTemporaryCache(Wh,!0)||ln.EMPTY_STRING,l=cl(s);if(l===cl(window.location.href)&&this.config.auth.navigateToLoginRequestUrl){this.logger.verbose("Current page is loginRequestUrl, handling response"),s.indexOf("#")>-1&&function(e){const t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):""}(s);return await this.handleResponse(n,t,i,r)}if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(n,t,i,r);if(!sf()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Hh,a,!0);const e={apiId:em,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let o=!0;if(s&&"null"!==s)this.logger.verbose(`Navigating to loginRequestUrl: ${s}`),o=await this.navigationClient.navigateInternal(s,e);else{const t=function(){const e=new ul(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(Wh,t,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),o=await this.navigationClient.navigateInternal(t,e)}if(!o)return await this.handleResponse(n,t,i,r)}return null}catch(e){throw e instanceof Ra&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(t=this.config.auth.OIDCOptions.serverResponseType===Fn?window.location.search:window.location.hash);let i=ll(t);if(i){try{Sg(i,this.browserCrypto,nm.Redirect)}catch(e){return e instanceof Ra&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return af(window),this.logger.verbose("Hash contains known properties, returning response hash"),[i,t]}const o=this.browserStorage.getTemporaryCache(Hh,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Hh)),o&&(i=ll(o),i)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[i,o]):[null,""]}async handleResponse(e,t,i,o){if(!e.state)throw Th(Op);if(e.ear_jwe){const i=await cu(this.getDiscoveredAuthority.bind(this),jl,this.logger,this.performanceClient,t.correlationId)({requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account});return cu(Kg,Td,this.logger,this.performanceClient,t.correlationId)(t,e,Zh,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}const r=await cu(this.createAuthCodeClient.bind(this),cd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:t.authority});return cu(Yg,Id,this.logger,this.performanceClient,t.correlationId)(t,e,i,Zh,this.config,r,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const i={apiId:Zh,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},o=t||this.config.auth.onRedirectNavigate;if("function"==typeof o){this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback");return!1!==o(e)?(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),void await this.navigationClient.navigateExternal(e,i)):void this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation")}return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),void await this.navigationClient.navigateExternal(e,i)}throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Th(_p)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),i=this.initializeServerTelemetryManager(om);try{this.eventHandler.emitEvent(fg,nm.Redirect,e),await this.clearCacheOnLogout(this.correlationId,t.account);const o={apiId:om,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=await cu(this.createAuthCodeClient.bind(this),cd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:e&&e.authority,requestExtraQueryParameters:e?.extraQueryParameters,account:e&&e.account||void 0});if(r.authority.protocolMode===Nl)try{r.authority.endSessionEndpoint}catch{if(t.account?.homeAccountId)return void this.eventHandler.emitEvent(gg,nm.Redirect,t)}const n=r.getLogoutUri(t);if(this.eventHandler.emitEvent(gg,nm.Redirect,t),!e||"function"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Gh),void await this.navigationClient.navigateExternal(n,o);if(!1!==e.onRedirectNavigate(n))return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Gh),void await this.navigationClient.navigateExternal(n,o);this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation")}catch(e){throw e instanceof Ra&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),this.eventHandler.emitEvent(Tg,nm.Redirect,null,e),this.eventHandler.emitEvent(Ag,nm.Redirect),e}this.eventHandler.emitEvent(Ag,nm.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ul.getAbsoluteUrl(t,lf())}}
|
|
145
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function iT(e,t,i,o,r){if(t.addQueueMeasurement(ad,o),!e)throw i.info("Navigate url is empty"),Th(_p);return r?cu(aT,ld,i,t,o)(e,r,t,o):du(sT,dd,i,t,o)(e)}async function oT(e,t,i,o,r){const n=lT();if(!n.contentDocument)throw"No document associated with iframe!";return(await Gg(n.contentDocument,e,t,i,o,r)).submit(),n}async function rT(e,t,i,o,r){const n=lT();if(!n.contentDocument)throw"No document associated with iframe!";return(await jg(n.contentDocument,e,t,i,o,r)).submit(),n}async function nT(e,t,i,o,r,n,a){return o.addQueueMeasurement(sd,n),new Promise((o,n)=>{t<If&&r.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${t}ms) than the default (10000ms). This may result in timeouts.`);const s=window.setTimeout(()=>{window.clearInterval(l),n(Th(Lp))},t),l=window.setInterval(()=>{let t="";const i=e.contentWindow;try{t=i?i.location.href:""}catch(e){}if(!t||"about:blank"===t)return;let r="";i&&(r=a===Fn?i.location.search:i.location.hash),window.clearTimeout(s),window.clearInterval(l),o(r)},i)}).finally(()=>{du(dT,Gd,r,o,n)(e)})}function aT(e,t,i,o){return i.addQueueMeasurement(ld,o),new Promise((i,o)=>{const r=lT();window.setTimeout(()=>{r?(r.src=e,i(r)):o("Unable to load iframe")},t)})}function sT(e){const t=lT();return t.src=e,t}function lT(){const e=document.createElement("iframe");return e.className="msalSilentIframe",e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height="0",e.style.border="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(e),e}function dT(e){document.body===e.parentNode&&document.body.removeChild(e)}
|
|
146
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class cT extends wg{constructor(e,t,i,o,r,n,a,s,l,d,c){super(e,t,i,o,r,n,s,d,c),this.apiId=a,this.nativeStorage=l}async acquireToken(e){this.performanceClient.addQueueMeasurement(Ul,e.correlationId),e.loginHint||e.sid||e.account&&e.account.username||this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==xn&&t.prompt!==Dn&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${xn}`),t.prompt=xn):t.prompt=xn;const i=await cu(this.initializeAuthorizationRequest.bind(this),pd,this.logger,this.performanceClient,e.correlationId)(t,nm.Silent);return i.platformBroker=Xg(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme),mf(i.authority),this.config.auth.protocolMode===Rl?this.executeEarFlow(i):this.executeCodeFlow(i)}async executeCodeFlow(e){let t;const i=this.initializeServerTelemetryManager(this.apiId);try{return t=await cu(this.createAuthCodeClient.bind(this),cd,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),await cu(this.silentTokenHelper.bind(this),nd,this.logger,this.performanceClient,e.correlationId)(t,e)}catch(o){if(o instanceof Ra&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),!(t&&o instanceof Ra&&o.errorCode===Ah))throw o;return this.performanceClient.addFields({retryError:o.errorCode},this.correlationId),await cu(this.silentTokenHelper.bind(this),nd,this.logger,this.performanceClient,this.correlationId)(t,e)}}async executeEarFlow(e){const t=e.correlationId,i=await cu(this.getDiscoveredAuthority.bind(this),jl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await cu(Ym,nc,this.logger,this.performanceClient,t)(),r={...e,earJwk:o},n=await cu(rT,ad,this.logger,this.performanceClient,t)(this.config,i,r,this.logger,this.performanceClient),a=this.config.auth.OIDCOptions.serverResponseType,s=await cu(nT,sd,this.logger,this.performanceClient,t)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,t,a),l=du(Pg,bd,this.logger,this.performanceClient,t)(s,a,this.logger);return cu(Kg,Td,this.logger,this.performanceClient,t)(r,l,this.apiId,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}logout(){return Promise.reject(Th(Up))}async silentTokenHelper(e,t){const i=t.correlationId;this.performanceClient.addQueueMeasurement(nd,i);const o=await cu(Vg,zd,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),r={...t,codeChallenge:o.challenge};let n;if(t.httpMethod===gn)n=await cu(oT,ad,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);else{const t=await cu(qg,hd,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);n=await cu(iT,ad,this.logger,this.performanceClient,i)(t,this.performanceClient,this.logger,i,this.config.system.navigateFrameWait)}const a=this.config.auth.OIDCOptions.serverResponseType,s=await cu(nT,sd,this.logger,this.performanceClient,i)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,i,a),l=du(Pg,bd,this.logger,this.performanceClient,i)(s,a,this.logger);return cu(Yg,Id,this.logger,this.performanceClient,i)(t,l,o.verifier,this.apiId,this.config,e,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}
|
|
147
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class uT extends wg{async acquireToken(e){this.performanceClient.addQueueMeasurement(Bl,e.correlationId);const t=await cu(Ng,td,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),i={...e,...t};e.redirectUri&&(i.redirectUri=this.getRedirectUri(e.redirectUri));const o=this.initializeServerTelemetryManager(im),r=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:i.authority,azureCloudOptions:i.azureCloudOptions,account:i.account});return cu(r.acquireTokenByRefreshToken.bind(r),$l,this.logger,this.performanceClient,e.correlationId)(i).catch(e=>{throw e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e),e})}logout(){return Promise.reject(Th(Up))}async createRefreshTokenClient(e){const t=await cu(this.getClientConfiguration.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new op(t,this.performanceClient)}}
|
|
148
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class pT{constructor(e,t,i,o){this.isBrowserEnvironment="undefined"!=typeof window,this.config=e,this.storage=t,this.logger=i,this.cryptoObj=o}async loadExternalTokens(e,t,i){if(!this.isBrowserEnvironment)throw Th(Hp);const o=e.correlationId||Wm(),r=t.id_token?rl(t.id_token,wm):void 0,n={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},a=e.authority?new bu(bu.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,n,this.logger,e.correlationId||Wm()):void 0,s=await this.loadAccount(e,i.clientInfo||t.client_info||"",o,r,a),l=await this.loadIdToken(t,s.homeAccountId,s.environment,s.realm,o),d=await this.loadAccessToken(e,t,s.homeAccountId,s.environment,s.realm,i,o),c=await this.loadRefreshToken(t,s.homeAccountId,s.environment,o);return this.generateAuthenticationResult(e,{account:s,idToken:l,accessToken:d,refreshToken:c},r,a)}async loadAccount(e,t,i,o,r){if(this.logger.verbose("TokenCache - loading account"),e.account){const t=Uu.createFromAccountInfo(e.account);return await this.storage.setAccount(t,i),t}if(!r||!t&&!o)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Th(Qp);const n=Uu.generateHomeAccountId(t,r.authorityType,this.logger,this.cryptoObj,o),a=o?.tid,s=ep(this.storage,r,n,wm,i,o,t,r.hostnameAndPort,a,void 0,void 0,this.logger);return await this.storage.setAccount(s,i),s}async loadIdToken(e,t,i,o,r){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const n=Tu(t,i,e.id_token,this.config.auth.clientId,o);return await this.storage.setIdTokenCredential(n,r),n}async loadAccessToken(e,t,i,o,r,n,a){if(!t.access_token)return this.logger.verbose("TokenCache - no access token found in response"),null;if(!t.expires_in)return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;if(!(t.scope||e.scopes&&e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null;this.logger.verbose("TokenCache - loading access token");const s=t.scope?el.fromString(t.scope):new el(e.scopes),l=n.expiresOn||t.expires_in+pu(),d=n.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+pu(),c=Au(i,o,t.access_token,this.config.auth.clientId,r,s.printScopes(),l,d,wm);return await this.storage.setAccessTokenCredential(c,a),c}async loadRefreshToken(e,t,i,o){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const r=Iu(t,i,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return await this.storage.setRefreshTokenCredential(r,o),r}generateAuthenticationResult(e,t,i,o){let r,n="",a=[],s=null;t?.accessToken&&(n=t.accessToken.secret,a=el.fromString(t.accessToken.target).asArray(),s=mu(t.accessToken.expiresOn),r=mu(t.accessToken.extendedExpiresOn));const l=t.account;return{authority:o?o.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:a,account:l.getAccountInfo(),idToken:t.idToken?.secret||"",idTokenClaims:i||{},accessToken:n,fromCache:!0,expiresOn:s,correlationId:e.correlationId||"",requestId:"",extExpiresOn:r,familyId:t.refreshToken?.familyId||"",tokenType:t?.accessToken?.tokenType||"",state:e.state||"",cloudGraphHostName:l.cloudGraphHostName||"",msGraphHost:l.msGraphHost||"",fromNativeBroker:!1}}}
|
|
149
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class hT extends ip{constructor(e){super(e),this.includeRedirectUri=!1}}
|
|
150
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class mT extends wg{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,s,l,d),this.apiId=a}async acquireToken(e){if(!e.code)throw Th(Jp);const t=await cu(this.initializeAuthorizationRequest.bind(this),pd,this.logger,this.performanceClient,e.correlationId)(e,nm.Silent),i=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},r=await cu(this.getClientConfiguration.bind(this),ud,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),n=new hT(r);this.logger.verbose("Auth code client created");const a=new vg(n,this.browserStorage,o,this.logger,this.performanceClient);return await cu(a.handleCodeResponseFromServer.bind(a),fd,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(e){throw e instanceof Ra&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),e}}logout(){return Promise.reject(Th(Up))}}
|
|
151
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
152
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
153
|
+
function fT(e){const t=e?.idTokenClaims;return t?.tfp||t?.acr?"B2C":t?.tid?"9188040d-6c67-4c5b-b112-36a304b66dad"===t?.tid?"MSA":"AAD":void 0}function gT(e,t){try{pf(e)}catch(e){throw t.end({success:!1},e),e}}class TT{constructor(e){var t,i,o,r;this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new kf(this.logger,this.performanceClient):_s,this.eventHandler=new Og(this.logger),this.browserStorage=this.isBrowserEnvironment?new _g(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,function(e){const t=e.cloudDiscoveryMetadata;let i;if(t)try{i=JSON.parse(t)}catch(e){throw Js(Fs)}return{canonicalAuthority:e.authority?wu(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:i}}(this.config.auth)):(t=this.config.auth.clientId,i=this.logger,o=this.performanceClient,r=this.eventHandler,new _g(t,{cacheLocation:Fh,cacheRetentionDays:5,temporaryCacheLocation:Fh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},_s,i,o,r));const n={cacheLocation:Fh,cacheRetentionDays:5,temporaryCacheLocation:Fh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new _g(this.config.auth.clientId,n,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new pT(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static async createController(e,t){const i=new TT(e);return await i.initialize(t),i}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e,t){if(this.logger.trace("initialize called"),this.initialized)return void this.logger.info("initialize has already been called, exiting early.");if(!this.isBrowserEnvironment)return this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,void this.eventHandler.emitEvent($f);const i=e?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(od,i);if(this.eventHandler.emitEvent(zf),!t)try{this.logMultipleInstances(r)}catch{}if(await cu(this.browserStorage.initialize.bind(this.browserStorage),rd,this.logger,this.performanceClient,i)(i),o)try{this.platformAuthProvider=await Jg(this.logger,this.performanceClient,i,this.config.system.nativeBrokerHandshakeTimeout)}catch(e){this.logger.verbose(e)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),du(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Wd,this.logger,this.performanceClient,i)(i)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(i),this.initialized=!0,this.eventHandler.emitEvent($f),r.end({allowPlatformBroker:o,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),uf(this.initialized),this.isBrowserEnvironment){const t=e||"";let i=this.redirectResponse.get(t);return void 0===i?(i=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,i),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),i}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const t=this.browserStorage.getInteractionInProgress()?.type;if(t===Gh)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);const i=this.getAllAccounts(),o=this.browserStorage.getCachedNativeRequest(),r=o&&this.platformAuthProvider&&!e;let n,a;this.eventHandler.emitEvent(pg,nm.Redirect);try{if(r&&this.platformAuthProvider){n=this.performanceClient.startMeasurement(Ml,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),n.add({isPlatformBrokerRequest:!0});const e=new Fg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,em,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);a=cu(e.handleRedirectPromise.bind(e),qd,this.logger,this.performanceClient,n.event.correlationId)(this.performanceClient,n.event.correlationId)}else{const[t,i]=this.browserStorage.getCachedRequest(),o=t.correlationId;n=this.performanceClient.startMeasurement(Ml,o),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const r=this.createRedirectClient(o);a=cu(r.handleRedirectPromise.bind(r),Bd,this.logger,this.performanceClient,n.event.correlationId)(e,t,i,n)}}catch(e){throw this.browserStorage.resetRequestCache(),e}return a.then(e=>{if(e){this.browserStorage.resetRequestCache();i.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(eg,nm.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(og,nm.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),n.end({success:!0,accountType:fT(e.account)})}else n.event.errorCode?n.end({success:!1}):n.discard();return this.eventHandler.emitEvent(hg,nm.Redirect),e}).catch(e=>{this.browserStorage.resetRequestCache();const t=e;throw i.length>0?this.eventHandler.emitEvent(rg,nm.Redirect,null,t):this.eventHandler.emitEvent(tg,nm.Redirect,null,t),this.eventHandler.emitEvent(hg,nm.Redirect),n.end({success:!1},t),e})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const i=this.performanceClient.startMeasurement(Ll,t);i.add({accountType:fT(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=e=>{const t="function"==typeof o?o(e):void 0;return i.add({navigateCallbackResult:!1!==t}),i.event=i.end({success:!0})||i.event,t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const o="function"==typeof e?e(t):void 0;return i.add({navigateCallbackResult:!1!==o}),i.event=i.end({success:!0})||i.event,o}}const r=this.getAllAccounts().length>0;try{let o;if(hf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,jh),r?this.eventHandler.emitEvent(ig,nm.Redirect,e):this.eventHandler.emitEvent(Xf,nm.Redirect,e),this.platformAuthProvider&&this.canUsePlatformBroker(e)){o=new Fg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Zh,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,i).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof xg&&Dg(o)){this.platformAuthProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(o instanceof Ku){this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createRedirectClient(t).acquireToken(e)}throw o})}else{o=this.createRedirectClient(t).acquireToken(e)}return await o}catch(e){throw this.browserStorage.resetRequestCache(),2===i.event.status?this.performanceClient.startMeasurement(Ml,t).end({success:!1},e):i.end({success:!1},e),r?this.eventHandler.emitEvent(rg,nm.Redirect,null,e):this.eventHandler.emitEvent(tg,nm.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(vl,t);i.add({scenarioId:e.scenarioId,accountType:fT(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),gT(this.initialized,i),this.browserStorage.setInteractionInProgress(!0,jh)}catch(e){return Promise.reject(e)}const o=this.getAllAccounts();let r;o.length>0?this.eventHandler.emitEvent(ig,nm.Popup,e):this.eventHandler.emitEvent(Xf,nm.Popup,e);const n=this.getPreGeneratedPkceCodes(t);if(this.canUsePlatformBroker(e))i.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative({...e,correlationId:t},Jh).then(e=>(i.end({success:!0,accountType:fT(e.account)}),e)).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof xg&&Dg(o)){this.platformAuthProvider=void 0;return this.createPopupClient(t).acquireToken(e,n)}if(o instanceof Ku){this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createPopupClient(t).acquireToken(e,n)}throw o});else{r=this.createPopupClient(t).acquireToken(e,n)}return r.then(e=>(o.length<this.getAllAccounts().length?this.eventHandler.emitEvent(eg,nm.Popup,e):this.eventHandler.emitEvent(og,nm.Popup,e),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:fT(e.account)}),e)).catch(e=>(o.length>0?this.eventHandler.emitEvent(rg,nm.Popup,null,e):this.eventHandler.emitEvent(tg,nm.Popup,null,e),i.end({success:!1},e),Promise.reject(e))).finally(async()=>{this.browserStorage.setInteractionInProgress(!1),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(t)})}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){const t=this.getRequestCorrelationId(e),i={...e,prompt:e.prompt,correlationId:t};let o;if(this.ssoSilentMeasurement=this.performanceClient.startMeasurement(ql,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:fT(e.account)}),gT(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(ag,nm.Silent,i),this.canUsePlatformBroker(i))this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(i,Xh).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof xg&&Dg(e)){this.platformAuthProvider=void 0;return this.createSilentIframeClient(i.correlationId).acquireToken(i)}throw e});else{o=this.createSilentIframeClient(i.correlationId).acquireToken(i)}return o.then(e=>(this.eventHandler.emitEvent(sg,nm.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:fT(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(lg,nm.Silent,null,e),this.ssoSilentMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const i=this.performanceClient.startMeasurement(bl,t);gT(this.initialized,i),this.eventHandler.emitEvent(dg,nm.Silent,e),i.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Th(eh);if(e.code){const o=e.code;let r=this.hybridAuthCodeResponses.get(o);return r?(this.logger.verbose("Existing acquireTokenByCode request found",t),i.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),r=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(e=>(this.eventHandler.emitEvent(cg,nm.Silent,e),this.hybridAuthCodeResponses.delete(o),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:fT(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(ug,nm.Silent,null,e),i.end({success:!1},e),e}),this.hybridAuthCodeResponses.set(o,r)),await r}if(e.nativeAccountId){if(this.canUsePlatformBroker(e,e.nativeAccountId)){i.add({isPlatformBrokerRequest:!0});const o=await this.acquireTokenNative({...e,correlationId:t},tm,e.nativeAccountId).catch(e=>{throw e instanceof xg&&Dg(e)&&(this.platformAuthProvider=void 0),i.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return i.end({accountType:fT(o.account),success:!0}),o}throw Th(ih)}throw Th(Xp)}catch(e){throw this.eventHandler.emitEvent(ug,nm.Silent,null,e),i.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(Fd,e.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement);const t=this.createSilentAuthCodeClient(e.correlationId);return await t.acquireToken(e).then(e=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:e.fromCache}),e)).catch(e=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(Zl,e.correlationId),t){case Tm:case Am:case Im:const t=this.createSilentCacheClient(e.correlationId);return cu(t.acquireToken.bind(t),kl,this.logger,this.performanceClient,e.correlationId)(e);default:throw ys(as)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(wl,e.correlationId),t){case Tm:case Im:case ym:case _m:const t=this.createSilentRefreshClient(e.correlationId);return cu(t.acquireToken.bind(t),Bl,this.logger,this.performanceClient,e.correlationId)(e);default:throw ys(as)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(ed,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return cu(t.acquireToken.bind(t),Ul,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);hf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Gh);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);pf(this.initialized),this.browserStorage.setInteractionInProgress(!0,Gh);return this.createPopupClient(t).logout(e).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(e){return Promise.reject(e)}}async clearCache(e){if(!this.isBrowserEnvironment)return void this.logger.info("in non-browser environment, returning early.");const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){const t=this.getRequestCorrelationId();
|
|
154
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
155
|
+
return function(e,t,i,o,r){return e.verbose("getAllAccounts called"),i?t.getAllAccounts(r||{},o):[]}(this.logger,this.browserStorage,this.isBrowserEnvironment,t,e)}getAccount(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){const r=i.getAccountInfoFilteredBy(e,o);return r?(t.verbose("getAccount: Account matching provided filter found, returning"),r):(t.verbose("getAccount: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByUsername(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){if(t.trace("getAccountByUsername called"),!e)return t.warning("getAccountByUsername: No username provided"),null;const r=i.getAccountInfoFilteredBy({username:e},o);return r?(t.verbose("getAccountByUsername: Account matching username found, returning"),t.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${e}`),r):(t.verbose("getAccountByUsername: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByHomeId(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){if(t.trace("getAccountByHomeId called"),!e)return t.warning("getAccountByHomeId: No homeAccountId provided"),null;const r=i.getAccountInfoFilteredBy({homeAccountId:e},o);return r?(t.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),t.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${e}`),r):(t.verbose("getAccountByHomeId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByLocalId(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){if(t.trace("getAccountByLocalId called"),!e)return t.warning("getAccountByLocalId: No localAccountId provided"),null;const r=i.getAccountInfoFilteredBy({localAccountId:e},o);return r?(t.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),t.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${e}`),r):(t.verbose("getAccountByLocalId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}setActiveAccount(e){const t=this.getRequestCorrelationId();!function(e,t,i){t.setActiveAccount(e,i)}(e,this.browserStorage,t)}getActiveAccount(){const e=this.getRequestCorrelationId();return function(e,t){return e.getActiveAccount(t)}
|
|
156
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */(this.browserStorage,e)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const i=Uu.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return await this.browserStorage.setAccount(i,e.correlationId),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,i,o){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw Th(nh);return new Fg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.platformAuthProvider,i||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e,o)}canUsePlatformBroker(e,t){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!Xg(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme))return this.logger.trace("canUsePlatformBroker: isBrokerAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case xn:case Mn:case vn:this.logger.trace("canUsePlatformBroker: prompt is compatible with platform broker flow");break;default:return this.logger.trace(`canUsePlatformBroker: prompt = ${e.prompt} is not compatible with platform broker flow, returning false`),!1}return!(!t&&!this.getNativeAccountId(e))||(this.logger.trace("canUsePlatformBroker: nativeAccountId is not available, returning false"),!1)}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new eT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createRedirectClient(e){return new tT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentIframeClient(e){return new cT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Xh,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentCacheClient(e){return new Ug(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentRefreshClient(e){return new uT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentAuthCodeClient(e){return new mT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,tm,this.performanceClient,this.platformAuthProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return cf(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){this.config.cache.cacheLocation===kh?this.eventHandler.subscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}disableAccountStorageEvents(){this.config.cache.cacheLocation===kh?this.eventHandler.unsubscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e?.correlationId?e.correlationId:this.isBrowserEnvironment?Wm():ln.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||hm})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||hm})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(Pl,t);i.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),gT(this.initialized,i),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw Th(Fp);return i.add({accountType:fT(o)}),this.acquireTokenSilentDeduped(e,o,t).then(o=>(i.end({success:!0,fromCache:o.fromCache,accessTokenSize:o.accessToken.length,idTokenSize:o.idToken.length}),{...o,state:e.state,correlationId:t})).catch(e=>{throw e instanceof Ra&&e.setCorrelationId(t),i.end({success:!1},e),e})}async acquireTokenSilentDeduped(e,t,i){const o=vu(this.config.auth.clientId,{...e,authority:e.authority||this.config.auth.authority},t.homeAccountId),r=JSON.stringify(o),n=this.activeSilentTokenRequests.get(r);if(void 0===n){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",i),this.performanceClient.addFields({deduped:!1},i);const o=cu(this.acquireTokenSilentAsync.bind(this),Sl,this.logger,this.performanceClient,i)({...e,correlationId:i},t);return this.activeSilentTokenRequests.set(r,o),o.finally(()=>{this.activeSilentTokenRequests.delete(r)})}return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",i),this.performanceClient.addFields({deduped:!0},i),n}async acquireTokenSilentAsync(e,t){const i=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(Sl,e.correlationId),this.eventHandler.emitEvent(ig,nm.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",i);const o=await cu(Rg,id,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),r=e.cacheLookupPolicy||Tm;return this.acquireTokenSilentNoIframe(o,r).catch(async e=>{const t=function(e,t){const i=!(e instanceof Ku&&e.subError!==Gu),o=e.errorCode===Ah||e.errorCode===as,r=i&&o||e.errorCode===Fu||e.errorCode===qu,n=Om.includes(t);return r&&n}
|
|
157
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */(e,r);if(t){if(this.activeIframeRequest){if(r!==Em){const[t,i]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${i}`,o.correlationId);const n=this.performanceClient.startMeasurement(Fl,o.correlationId);n.add({awaitIframeCorrelationId:i});const a=await t;if(n.end({success:a}),a)return this.logger.verbose(`Parallel iframe request with correlationId: ${i} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,r);throw this.logger.info(`Iframe request with correlationId: ${i} failed. Interaction is required.`),e}return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),cu(this.acquireTokenBySilentIframe.bind(this),ed,this.logger,this.performanceClient,o.correlationId)(o)}{let e;return this.activeIframeRequest=[new Promise(t=>{e=t}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),cu(this.acquireTokenBySilentIframe.bind(this),ed,this.logger,this.performanceClient,o.correlationId)(o).then(t=>(e(!0),t)).catch(t=>{throw e(!1),t}).finally(()=>{this.activeIframeRequest=void 0})}}throw e}).then(t=>(this.eventHandler.emitEvent(og,nm.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache},e.correlationId),t)).catch(e=>{throw this.eventHandler.emitEvent(rg,nm.Silent,null,e),e}).finally(()=>{document.removeEventListener("visibilitychange",i)})}async acquireTokenSilentNoIframe(e,t){return Xg(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.performanceClient.addFields({isPlatformBrokerRequest:!0},e.correlationId),this.acquireTokenNative(e,im,e.account.nativeAccountId,t).catch(async t=>{if(this.performanceClient.addFields({brokerErrorName:t.name,brokerErrorCode:t.errorCode},e.correlationId),t instanceof xg&&Dg(t))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,ys(as);throw t})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),t===Am&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),cu(this.acquireTokenFromCache.bind(this),Zl,this.logger,this.performanceClient,e.correlationId)(e,t).catch(i=>{if(t===Am)throw i;return this.eventHandler.emitEvent(ng,nm.Silent,e),cu(this.acquireTokenByRefreshToken.bind(this),wl,this.logger,this.performanceClient,e.correlationId)(e,t)}))}async preGeneratePkceCodes(e){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=await cu(Vg,zd,this.logger,this.performanceClient,e)(this.performanceClient,this.logger,e),Promise.resolve()}getPreGeneratedPkceCodes(e){this.logger.verbose("Attempting to pick up pre-generated PKCE codes");const t=this.pkceCode?{...this.pkceCode}:void 0;return this.pkceCode=void 0,this.logger.verbose((t?"Found":"Did not find")+" pre-generated PKCE codes"),this.performanceClient.addFields({usePreGeneratedPkce:!!t},e),t}logMultipleInstances(e){const t=this.config.auth.clientId;if(!window)return;window.msal=window.msal||{},window.msal.clientIds=window.msal.clientIds||[];window.msal.clientIds.length>0&&this.logger.verbose("There is already an instance of MSAL.js in the window."),window.msal.clientIds.push(t),function(e,t,i){const o=window.msal?.clientIds||[],r=o.length,n=o.filter(t=>t===e).length;n>1&&i.warning("There is already an instance of MSAL.js in the window with the same client id."),t.add({msalInstanceCount:r,sameClientIdInstanceCount:n})}(t,e,this.logger)}}
|
|
158
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
159
|
+
class AT{static async createPublicClientApplication(e){const t=await async function(e,t){const i=new Lf(e);return await i.initialize(),TT.createController(i,t)}(e);return new AT(e,t)}constructor(e,t){this.isBroker=!1,this.controller=t||new TT(new Lf(e))}async initialize(e){return this.controller.initialize(e,this.isBroker)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}
|
|
160
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const IT={initialize:()=>Promise.reject(nf(ef)),acquireTokenPopup:()=>Promise.reject(nf(ef)),acquireTokenRedirect:()=>Promise.reject(nf(ef)),acquireTokenSilent:()=>Promise.reject(nf(ef)),acquireTokenByCode:()=>Promise.reject(nf(ef)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject(nf(ef)),loginPopup:()=>Promise.reject(nf(ef)),loginRedirect:()=>Promise.reject(nf(ef)),logout:()=>Promise.reject(nf(ef)),logoutRedirect:()=>Promise.reject(nf(ef)),logoutPopup:()=>Promise.reject(nf(ef)),ssoSilent:()=>Promise.reject(nf(ef)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw nf(ef)},getLogger:()=>{throw nf(ef)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw nf(ef)},hydrateCache:()=>Promise.reject(nf(ef)),clearCache:()=>Promise.reject(nf(ef))};
|
|
161
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class yT{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case Xf:return sm;case ag:return cm;case ig:if(e.interactionType===nm.Redirect||e.interactionType===nm.Popup)return dm;break;case pg:return um;case fg:return lm;case sg:case lg:if(t&&t!==cm)break;return pm;case Ag:if(t&&t!==lm)break;return pm;case hg:if(t&&t!==um)break;return pm;case eg:case tg:case og:case rg:case Ig:if(e.interactionType===nm.Redirect||e.interactionType===nm.Popup){if(t&&t!==sm&&t!==dm)break;return pm}}return null}}
|
|
162
|
+
/*! @azure/msal-react v3.0.19 2025-08-19 */const _T={instance:IT,inProgress:pm,accounts:[],logger:new Os({})},ET=ce.createContext(_T);
|
|
163
|
+
/*! @azure/msal-react v3.0.19 2025-08-19 */
|
|
164
|
+
function OT(e,t){if(e.length!==t.length)return!1;const i=[...t];return e.every(e=>{const t=i.shift();return!(!e||!t)&&(e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username)})}
|
|
165
|
+
/*! @azure/msal-react v3.0.19 2025-08-19 */ET.Consumer;const CT="3.0.19",NT="UNBLOCK_INPROGRESS",RT="EVENT",bT=(e,t)=>{const{type:i,payload:o}=t;let r=e.inProgress;switch(i){case NT:e.inProgress===am&&(r=pm,o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case RT:const t=o.message,n=yT.getInteractionStatusFromEvent(t,e.inProgress);n&&(o.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${n}`),r=n);break;default:throw new Error(`Unknown action type: ${i}`)}if(r===am)return e;const n=o.instance.getAllAccounts();return r===e.inProgress||OT(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:OT(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function wT({instance:e,children:t}){d.useEffect(()=>{e.initializeWrapperLibrary(mm,CT)},[e]);const i=d.useMemo(()=>e.getLogger().clone("@azure/msal-react",CT),[e]),[o,r]=d.useReducer(bT,void 0,()=>({inProgress:am,accounts:[]}));d.useEffect(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:i,message:t},type:RT})});return i.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:i},type:NT})})}).catch(()=>{}),()=>{t&&(i.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,i]);const n={instance:e,inProgress:o.inProgress,accounts:o.accounts,logger:i};return d.createElement(ET.Provider,{value:n},t)}const PT=e=>{const o=i.useDispatch(),r=new AT({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}});le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const n={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||We} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:e.appTheme?.light?.primaryColor||We},secondary:{main:e.appTheme?.light?.secondaryColor||He},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},c=i.useSelector(e=>e.AppLayout);let u={...n};"dark"===c.themeMode&&(u={...a});const p=s.createTheme({direction:c.appDirection,...u});return d.useEffect(()=>{document.title=e.documentTitle,o(nn.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...sn}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),o(Le(t))},[e]),t.jsx(l.ThemeProvider,{theme:p,children:"AZURE"===e?.authenticationMethod?t.jsx(wT,{instance:r,children:t.jsx(on,{msalInstance:r})}):t.jsx(on,{msalInstance:r})})};var ST={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},vT={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"Member Role",ORGANIZATION_MEMBER_ROLE_PLURAL:"Member Roles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ROLES:"System Roles",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"Application Authority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"Application Authorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"Application Module",ORGANIZATION_APPLICATION_MODULE_PLURAL:"Application Modules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const LT={...ST,...vT,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"Dashboard Widget",DASHBOARD_WIDGET_PLURAL:"Dashboard Widgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"Query Parameter",DATA_QUERY_PARAMETER_PLURAL:"Query Parameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"Excel Uploader Detail",EXCEL_UPLOADER_DETAIL_PLURAL:"Excel Uploader Details",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"Excel Uploader Header",EXCEL_UPLOADER_HEADER_PLURAL:"Excel Uploader Headers",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"Lookup",LOOKUP_PLURAL:"Lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"Mail Attachment",MAIL_ATTACHMENT_PLURAL:"Mail Attachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"Mail Body",MAIL_BODY_PLURAL:"Mail Bodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_PLURAL:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"Mail Recipient",MAIL_RECIPIENT_PLURAL:"Mail Recipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"Notification",NOTIFICATION_PLURAL:"Notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"Notification Queue",NOTIFICATION_QUEUE_PLURAL:"Notification Queue",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"Report Parameter",REPORT_PARAMETER_PLURAL:"Report Parameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"User Request",USER_REQUEST_PLURAL:"User Requests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"Workflow Document Action",WORKFLOW_DOCUMENT_ACTION_PLURAL:"Workflow Document Actions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"Workflow Document Action Mail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"Workflow Document Action Mails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"Workflow Document Mail Log",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"Workflow Document Mail Logs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"Workflow Document Status",WORKFLOW_DOCUMENT_STATUS_PLURAL:"Workflow Document Statuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};var MT={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},xT={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"المستخدمين",ROLES:"الصلاحيات",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};const DT={...MT,...xT,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};o.library.add(r.fab),o.library.add(n.far),o.library.add(a.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return i.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return i.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return g.toast}}),exports.axios=T,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return I.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return y.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return _.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return _.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return E.zodResolver}}),exports.z=ue,exports.AttachmentCard=Ao,exports.AttachmentImageViewer=To,exports.AttachmentPanel=Io,exports.BaseApp=e=>{const[o,r]=d.useState({AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xo,AppInfo:an}),n=f.configureStore({reducer:o}),[a,s]=d.useState(!1);return d.useEffect(()=>{(()=>{const t={AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xo,AppInfo:an,...e?.businessReduxReducers};r(e=>({...t}));const i={en:{translation:{...LT,...e?.businessLocals?.en}},ar:{translation:{...DT,...e?.businessLocals?.ar}}};A.use(I.initReactI18next).init({resources:i,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),s(!0)})()},[e]),a?t.jsx(i.Provider,{store:n,children:t.jsx(PT,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=Be,exports.ComboBox=qe,exports.DARK_THEME_INITIAL_MAIN_COLOR=Ye,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=je,exports.DATE_TIME_FORMAT=Ge,exports.DashboardRouteView=zo,exports.DashboardViewer=Vo,exports.Datefield=Ve,exports.DatetimeField=ze,exports.ExcelReportViewer=Mo,exports.FormElement=mo,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=We,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=He,exports.ReportViewer=Do,exports.SystemLookupCombobox=$e,exports.TemplateBarChart=Bo,exports.TemplateDataCard=qo,exports.TemplateForm=Uo,exports.TemplateGauge=jo,exports.TemplateGrid=vo,exports.TemplateLineChart=Go,exports.TemplateLineProgress=Ho,exports.TemplatePieChart=Yo,exports.TemplateTextField=De,exports.TransferList=Fe,exports.WorkflowDocumentPanel=ko,exports.WorkflowDocumentTimeLine=yo,exports.WorkflowRouteComponent=Fo,exports.capitalizeFirstLetter=uo,exports.constructGridColumnsFromFields=it,exports.constructValidationSchema=ot,exports.formatDate=(e,t)=>t?x(e).format(t):x(e).format(je),exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=rt,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=lo,exports.isNumeric=co,exports.isValidEmail=po,exports.parseStringToDate=(e,t)=>t?x(e,t).toDate():x(e,je).toDate(),exports.timeAgo=ho,exports.useApiActions=xe,exports.useAxios=Re,exports.useConfirmationWindow=be,exports.useIsMobile=pe,exports.useLoadingMask=Ee,exports.useSession=we,exports.useWindow=Pe,Object.keys(s).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return s[e]}})}),Object.keys(B).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return B[e]}})}),Object.keys(q).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return q[e]}})});
|
|
38
166
|
//# sourceMappingURL=index.js.map
|