@asaleh37/ui-base 25.9.5-3 → 25.9.5-5
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 +9 -1
- package/dist/index.js +32 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -39
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +4 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +7 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +57 -2
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +7 -3
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{QuickFilter as e,ToolbarButton as t,Toolbar as i,ColumnsPanelTrigger as o,GridViewColumnIcon as r,FilterPanelTrigger as n,GridFilterListIcon as a,ExportExcel as s,QuickFilterTrigger as l,QuickFilterControl as d,QuickFilterClear as c,GridActionsCellItem as p,GridExpandMoreIcon as u,DataGridPremium as h,GridRowModes as m}from"@mui/x-data-grid-premium";export{DataGridPremium}from"@mui/x-data-grid-premium";import{jsxs as f,jsx as g,Fragment as T}from"react/jsx-runtime";import{useDispatch as A,useSelector as y,Provider as I}from"react-redux";export{useDispatch,useSelector}from"react-redux";import{library as _}from"@fortawesome/fontawesome-svg-core";import{fab as E}from"@fortawesome/free-brands-svg-icons";import{far as O}from"@fortawesome/free-regular-svg-icons";import{fas as C}from"@fortawesome/free-solid-svg-icons";import"react-toastify/dist/ReactToastify.css";import{Dialog as N,DialogTitle as R,DialogContent as b,DialogContentText as P,DialogActions as w,Button as v,Modal as L,Box as S,AppBar as M,Toolbar as D,Typography as k,IconButton as U,Paper as x,TextField as F,Grid2 as B,ListItemButton as q,FormControlLabel as W,Checkbox as G,Autocomplete as H,Popper as Y,Avatar as K,Tooltip as V,styled as z,Badge as $,Divider as Q,MenuItem as j,InputAdornment as Z,Accordion as J,AccordionSummary as X,AccordionDetails as ee,keyframes as te,ClickAwayListener as ie,Fade as oe,Menu as re,useTheme as ne,Backdrop as ae,CircularProgress as se,createTheme as le}from"@mui/material";export*from"@mui/material";import{ThemeContext as de,CacheProvider as ce,ThemeProvider as pe}from"@emotion/react";import*as ue from"react";import he,{useState as me,useEffect as fe,createElement as ge,useRef as Te,useMemo as Ae,useReducer as ye}from"react";import{styled as Ie,alpha as _e,useTheme as Ee}from"@mui/material/styles";import Oe from"@mui/material/CssBaseline";import Ce from"@mui/material/AppBar";import Ne from"@mui/material/Toolbar";import{FontAwesomeIcon as Re}from"@fortawesome/react-fontawesome";export{FontAwesomeIcon}from"@fortawesome/react-fontawesome";import{createSlice as be,configureStore as Pe}from"@reduxjs/toolkit";import{toast as we,ToastContainer as ve}from"react-toastify";export{toast}from"react-toastify";import Le from"axios";export{default as axios}from"axios";import Se from"i18next";import{useTranslation as Me,initReactI18next as De}from"react-i18next";export{useTranslation}from"react-i18next";import{useForm as ke}from"react-hook-form";export{useForm}from"react-hook-form";import{useNavigate as Ue,useParams as xe,Routes as Fe,Route as Be,BrowserRouter as qe}from"react-router-dom";export{useNavigate,useParams}from"react-router-dom";import{zodResolver as We}from"@hookform/resolvers/zod";export{zodResolver}from"@hookform/resolvers/zod";import*as Ge from"zod";import{z as He}from"zod";export{Ge as z};import Ye from"@mui/material/List";import Ke from"@mui/material/Card";import Ve from"@mui/material/CardHeader";import ze from"@mui/material/ListItemText";import $e from"@mui/material/ListItemIcon";import Qe from"@mui/material/Checkbox";import je from"@mui/material/Button";import Ze from"@mui/material/Divider";import{LocalizationProvider as Je,DatePicker as Xe,DateTimePicker as et}from"@mui/x-date-pickers";import{AdapterMoment as tt}from"@mui/x-date-pickers/AdapterMoment";import it from"moment";import ot from"@mui/material/CardActions";import rt from"@mui/material/CardContent";import nt from"@mui/material/CardMedia";import at from"@mui/material/Typography";export*from"@mui/lab";export*from"@mui/x-tree-view/models";import{BarChart as st,Gauge as lt,LineChart as dt}from"@mui/x-charts";import ct from"@mui/material/LinearProgress";import pt from"@mui/material/Box";import{PieChart as ut}from"@mui/x-charts/PieChart";import ht from"@mui/material/IconButton";import mt from"@mui/material/Drawer";import{animated as ft,useSpring as gt}from"@react-spring/web";import Tt from"@mui/material/Collapse";import{RichTreeView as At}from"@mui/x-tree-view/RichTreeView";import{treeItemClasses as yt}from"@mui/x-tree-view/TreeItem";import{useTreeItem2 as It}from"@mui/x-tree-view/useTreeItem2";import{TreeItem2Root as _t,TreeItem2Content as Et,TreeItem2IconContainer as Ot,TreeItem2Checkbox as Ct,TreeItem2Label as Nt}from"@mui/x-tree-view/TreeItem2";import{TreeItem2Icon as Rt}from"@mui/x-tree-view/TreeItem2Icon";import{TreeItem2Provider as bt}from"@mui/x-tree-view/TreeItem2Provider";import{TreeItem2DragAndDropOverlay as Pt}from"@mui/x-tree-view/TreeItem2DragAndDropOverlay";import wt from"stylis-plugin-rtl";import{prefixer as vt}from"stylis";import Lt from"@emotion/cache";import St from"@emotion/styled";import{grey as Mt}from"@mui/material/colors";import Dt from"@mui/material/SwipeableDrawer";import{LicenseInfo as kt}from"@mui/x-license";!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 Ut=(e=768)=>{const[t,i]=me(window.innerWidth<e);return fe(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},xt=350,Ft=be({name:"AppLayout",initialState:{themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),Bt=Ft.actions;var qt=Ft.reducer;const Wt=be({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:Gt,hideLoadingMask:Ht}=Wt.actions;var Yt=Wt.reducer;const Kt=()=>{const e=A();return{show:t=>{e(Gt(t))},hide:()=>{e(Ht())}}},Vt=be({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),zt=Vt.actions;var $t=Vt.reducer;const Qt=()=>{const e=Kt(),t=A(),i=y(e=>e.AppInfo.value.apiBaseUrl),o=Le.create({baseURL:i,timeout:6e5,withCredentials:!0});o.defaults.withCredentials=!0,o.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),o.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN"),we.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(zt.setUnAuthenticated()),we.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)))we.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=>{we.error(e)})}else we.error(e.response.data);else we.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 o.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 o.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 o.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 o.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 we.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 r=await o.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"!==r?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(r),r):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(r),"ERROR")}}},jt=e=>{const[t,i]=me(!1),{t:o}=Me();return{ConfirmationWindow:()=>f(N,{open:t,children:[g(R,{children:e.title}),g(b,{children:g(P,{children:e.body})}),f(w,{children:[g(v,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{i(!1)},children:o("NO_LABEL")}),g(v,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),i(!1)},autoFocus:!0,children:o("YES_LABEL")})]})]}),open:t,setOpen:i}},Zt=()=>{const e=y(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}},Jt=e=>{const[t,i]=me(!1),o=y(e=>e.AppLayout.appDirection);return{windowState:t,setWindowState:i,Window:r=>g(L,{open:t,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!t&&e?.onCloseCallBack&&e.onCloseCallBack()},children:f(S,{dir:o,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:[g(M,{position:"static",children:f(D,{variant:"dense",children:[g(Re,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),g(k,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),g("div",{style:{flexGrow:1}}),g(U,{onClick:()=>{i(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:g(Re,{icon:"xmark-square"})})]})}),g(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:r?.children})]})})}},Xt=be({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:ei,setStoresMetaData:ti}=Xt.actions;var ii=Xt.reducer;const oi=e=>{const t=y(e=>e.commonStores.stores),i=A(),o=Zt(),{handleGetRequest:r,handlePostRequest:n,handleDeleteRequest:a}=Qt();return{reloadData:async n=>{if(e?.commonStoreKey){const n=Object.keys(t);for(const a of n)if(a===e.commonStoreKey&&(void 0===t[a]?.authority||null===t[a]?.authority||o.isUserAuthorized(t[a]?.authority))&&""!=t[a]?.url){await r({endPointURI:t[a].url,showMask:!1,successCallBkFn:t=>{i(ei({storeKey:a,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{i(ei({storeKey:a,data:[]})),e.setData([])}});break}}else e?.findAll&&await r({endPointURI:e.findAll,showMask:!0,parameters:n||{},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 a({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},ri=e=>{const{t:t}=Me();return g(F,{...e,hidden:!0,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:g(T,{children:e?.label?t(e.label):""}),helperText:e?.helperText?t(e.helperText):void 0})};function ni(e,t){return e.filter(e=>-1===t.indexOf(e))}function ai(e,t){return e.filter(e=>-1!==t.indexOf(e))}const si=({valueField:e="id",displayField:t="name",options:i=[],selectedOptions:o=[],setSelection:r})=>{const[n,a]=ue.useState([]),[s,l]=ue.useState([]),[d,c]=ue.useState([]),[p,u]=ue.useState(""),[h,m]=ue.useState(""),T=ai(n,s),A=ai(n,d);ue.useEffect(()=>{i&&l([...i])},[i]),ue.useEffect(()=>{o&&c([...o])},[o]);const y=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),a(i)},I=e=>ai(n,e).length,_=e=>()=>{var t,i;I(e)===e.length?a(ni(n,e)):a((t=n,i=e,[...t,...ni(i,t)]))},E=(i,o,r)=>{const a=o.filter(e=>{if(e[t]){const i=e[t];if("left"===r&&i.toLocaleLowerCase().includes(p.toLocaleLowerCase()))return!0;if("right"===r&&i.toLocaleLowerCase().includes(h.toLocaleLowerCase()))return!0}return!1});return f(Ke,{sx:{height:"100%"},children:[g(Ve,{sx:{px:2,py:1},avatar:g(Qe,{onClick:_(a),checked:I(a)===a.length&&0!==a.length,indeterminate:I(a)!==a.length&&0!==I(a),disabled:0===a.length,inputProps:{"aria-label":"all items selected"}}),title:i,subheader:`${I(o)} / ${o.length} Selected`}),g(S,{sx:{width:"100%",padding:1},children:g(ri,{fullWidth:!0,label:"search",value:"left"===r?p:h,onChange:e=>{"left"===r?u(e.target.value):m(e.target.value)}})}),g(Ze,{}),g(Ye,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:a.map(i=>(i[e],f(q,{role:"listitem",onClick:y(i),sx:{cursor:"pointer"},children:[g($e,{children:g(Qe,{checked:-1!==n.indexOf(i),tabIndex:-1,disableRipple:!0})}),g(ze,{id:i[e],primary:i[t]})]},i[e])))})]})};return f(B,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[g(B,{sx:{height:"100%",flex:1},children:E("Available Items",s,"left")}),g(B,{children:f(B,{container:!0,direction:"column",alignItems:"center",children:[g(je,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{c(e=>{let t=d.concat(T);return r(t),t}),l(ni(s,T)),a(ni(n,T))},disabled:0===T.length,"aria-label":"move selected right",children:">"}),g(je,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{l(s.concat(A)),c(e=>{let t=ni(d,A);return r(t),t}),a(ni(n,A))},disabled:0===A.length,"aria-label":"move selected left",children:"<"})]})}),g(B,{sx:{height:"100%",flex:1},children:E("Currently Selected",d,"right")})]})},li=e=>{const{t:t}=Me();return g(W,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:g(G,{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:t(e.label)})},di=e=>{const t=y(e=>e.AppLayout),{t:i}=Me();return g(H,{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?i(t[e.displayField]):"",renderOption:(t,o)=>g("li",{...t,children:null!=o?i(o[e.displayField]):""}),slots:{popper:e=>g(Y,{...e,style:{...e.style,direction:t.appDirection}})},renderInput:t=>g(F,{...t,required:e.required||!1,variant:"outlined",slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:i(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?i(e.errorMessage):""})})},ci="YYYY-MM-DD",pi="YYYY-MM-DD HH:mm:ss",ui="#37505C",hi="#ff6d00",mi="#ea690e",fi="#74776B",gi=e=>{const{t:t}=Me();return e?.hidden?g(T,{}):g(Je,{dateAdapter:tt,children:g(Xe,{value:null!=e.value&&void 0!==e.value&&""!==e.value?it(e.value,e?.format||ci):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:t(e.label),format:e?.format||ci,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||ci)),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?g(T,{children:t(e.errorMessage)}):g(T,{})}}})})},Ti=e=>{const{t:t}=Me();return e?.hidden?g(T,{}):g(Je,{dateAdapter:tt,children:g(et,{value:null!=e.value&&void 0!==e.value&&""!==e.value?it(e.value,e?.format||pi):null,label:t(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||pi,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||pi)),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?g(T,{children:t(e.errorMessage)}):g(T,{})}}})})},Ai=e=>{const t=y(e=>e.AppLayout),i=Zt(),[o,r]=me([]),{handleGetRequest:n}=Qt();return fe(()=>{e.lookupType&&(async()=>{await n({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{r(e.data)},failureCallBkFn:()=>{r([])}})})()},[e.lookupType,i.UserSession]),g(di,{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},yi=e=>({...e,type:"string",renderEditCell:e=>g(gi,{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=it(e).format(ci)),o},valueFormatter:(e,t,i)=>t[i.field]}),Ii=e=>({...e,type:"string",renderEditCell:e=>g(Ti,{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=it(e).format(pi)),o},valueFormatter:(e,t,i)=>t[i.field]}),_i=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let t=null;try{t=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return g("div",{children:null!=t?t[e.colDef.displayField]:e.value})},renderEditCell:e=>g(di,{...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})}})}),Ei=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:t=>{const i=t?.value;return i===e.checkedValue||"true"===i||1===i||!0===i?g(Re,{icon:"check",color:"green"}):g(Re,{icon:"xmark",color:"red"})},renderEditCell:t=>g(li,{...t,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}})}),Oi=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(...Oi(i));return t},Ci=e=>{const t=[];for(const i of e)t.push(...Oi(i));return t},Ni=(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=yi({...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=Ii({...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=Ei({...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=_i({...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=_i({...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},Ri=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?Ge.boolean({required_error:"This field is required"}):Ge.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?Ge.string({message:"This field is required"}).min(1,"This field is required"):Ge.string().optional().nullable()):t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():t[e]=!0===i?.required?Ge.string({message:"This field is required"}).min(1,"This field is required"):Ge.string().optional().nullable()}return t},bi=(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 Pi(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 wi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vi,Li={exports:{}},Si={exports:{}},Mi={};var Di,ki,Ui,xi,Fi,Bi,qi,Wi,Gi,Hi,Yi,Ki,Vi,zi,$i,Qi={};
|
|
1
|
+
import{QuickFilter as e,ToolbarButton as t,Toolbar as i,ColumnsPanelTrigger as o,GridViewColumnIcon as r,FilterPanelTrigger as n,GridFilterListIcon as a,ExportExcel as s,QuickFilterTrigger as l,QuickFilterControl as d,QuickFilterClear as c,GridActionsCellItem as p,GridExpandMoreIcon as u,DataGridPremium as h,GridRowModes as m}from"@mui/x-data-grid-premium";export{DataGridPremium}from"@mui/x-data-grid-premium";import{jsxs as f,jsx as g,Fragment as T}from"react/jsx-runtime";import{useDispatch as A,useSelector as y,Provider as I}from"react-redux";export{useDispatch,useSelector}from"react-redux";import{library as _}from"@fortawesome/fontawesome-svg-core";import{fab as E}from"@fortawesome/free-brands-svg-icons";import{far as O}from"@fortawesome/free-regular-svg-icons";import{fas as C}from"@fortawesome/free-solid-svg-icons";import"react-toastify/dist/ReactToastify.css";import{Dialog as N,DialogTitle as R,DialogContent as b,DialogContentText as P,DialogActions as w,Button as v,Modal as L,Box as S,AppBar as M,Toolbar as D,Typography as k,IconButton as U,Paper as x,TextField as F,Grid2 as B,ListItemButton as q,FormControlLabel as W,Checkbox as G,Autocomplete as H,Popper as Y,Avatar as K,Tooltip as V,styled as z,Badge as Q,Divider as $,MenuItem as j,InputAdornment as Z,Accordion as J,AccordionSummary as X,AccordionDetails as ee,keyframes as te,ClickAwayListener as ie,Fade as oe,Menu as re,useTheme as ne,Backdrop as ae,CircularProgress as se,createTheme as le}from"@mui/material";export*from"@mui/material";import{ThemeContext as de,CacheProvider as ce,ThemeProvider as pe}from"@emotion/react";import*as ue from"react";import he,{useState as me,useEffect as fe,createElement as ge,useRef as Te,useMemo as Ae,useReducer as ye}from"react";import{styled as Ie,alpha as _e,useTheme as Ee}from"@mui/material/styles";import Oe from"@mui/material/CssBaseline";import Ce from"@mui/material/AppBar";import Ne from"@mui/material/Toolbar";import{FontAwesomeIcon as Re}from"@fortawesome/react-fontawesome";export{FontAwesomeIcon}from"@fortawesome/react-fontawesome";import{createSlice as be,configureStore as Pe}from"@reduxjs/toolkit";import{toast as we,ToastContainer as ve}from"react-toastify";export{toast}from"react-toastify";import Le from"axios";export{default as axios}from"axios";import Se from"i18next";import{useTranslation as Me,initReactI18next as De}from"react-i18next";export{useTranslation}from"react-i18next";import{useForm as ke}from"react-hook-form";export{useForm}from"react-hook-form";import{useNavigate as Ue,useParams as xe,Routes as Fe,Route as Be,BrowserRouter as qe}from"react-router-dom";export{useNavigate,useParams}from"react-router-dom";import{zodResolver as We}from"@hookform/resolvers/zod";export{zodResolver}from"@hookform/resolvers/zod";import*as Ge from"zod";import{z as He}from"zod";export{Ge as z};import Ye from"@mui/material/List";import Ke from"@mui/material/Card";import Ve from"@mui/material/CardHeader";import ze from"@mui/material/ListItemText";import Qe from"@mui/material/ListItemIcon";import $e from"@mui/material/Checkbox";import je from"@mui/material/Button";import Ze from"@mui/material/Divider";import{LocalizationProvider as Je,DatePicker as Xe,DateTimePicker as et}from"@mui/x-date-pickers";import{AdapterMoment as tt}from"@mui/x-date-pickers/AdapterMoment";import it from"moment";import ot from"@mui/material/CardActions";import rt from"@mui/material/CardContent";import nt from"@mui/material/CardMedia";import at from"@mui/material/Typography";export*from"@mui/lab";export*from"@mui/x-tree-view/models";import{BarChart as st,Gauge as lt,LineChart as dt}from"@mui/x-charts";import ct from"@mui/material/LinearProgress";import pt from"@mui/material/Box";import{PieChart as ut}from"@mui/x-charts/PieChart";import ht from"@mui/material/IconButton";import mt from"@mui/material/Drawer";import{animated as ft,useSpring as gt}from"@react-spring/web";import Tt from"@mui/material/Collapse";import{RichTreeView as At}from"@mui/x-tree-view/RichTreeView";import{treeItemClasses as yt}from"@mui/x-tree-view/TreeItem";import{useTreeItem2 as It}from"@mui/x-tree-view/useTreeItem2";import{TreeItem2Root as _t,TreeItem2Content as Et,TreeItem2IconContainer as Ot,TreeItem2Checkbox as Ct,TreeItem2Label as Nt}from"@mui/x-tree-view/TreeItem2";import{TreeItem2Icon as Rt}from"@mui/x-tree-view/TreeItem2Icon";import{TreeItem2Provider as bt}from"@mui/x-tree-view/TreeItem2Provider";import{TreeItem2DragAndDropOverlay as Pt}from"@mui/x-tree-view/TreeItem2DragAndDropOverlay";import wt from"stylis-plugin-rtl";import{prefixer as vt}from"stylis";import Lt from"@emotion/cache";import St from"@emotion/styled";import{grey as Mt}from"@mui/material/colors";import Dt from"@mui/material/SwipeableDrawer";import{LicenseInfo as kt}from"@mui/x-license";!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 Ut=(e=768)=>{const[t,i]=me(window.innerWidth<e);return fe(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},xt=350,Ft=be({name:"AppLayout",initialState:{themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),Bt=Ft.actions;var qt=Ft.reducer;const Wt=be({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:Gt,hideLoadingMask:Ht}=Wt.actions;var Yt=Wt.reducer;const Kt=()=>{const e=A();return{show:t=>{e(Gt(t))},hide:()=>{e(Ht())}}},Vt=be({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),zt=Vt.actions;var Qt=Vt.reducer;const $t=()=>{const e=Kt(),t=A(),i=y(e=>e.AppInfo.value.apiBaseUrl),o=Le.create({baseURL:i,timeout:6e5,withCredentials:!0});o.defaults.withCredentials=!0,o.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),o.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN"),we.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(zt.setUnAuthenticated()),we.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)))we.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=>{we.error(e)})}else we.error(e.response.data);else we.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 o.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 o.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 o.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 o.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 we.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 r=await o.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"!==r?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(r),r):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(r),"ERROR")}}},jt=e=>{const[t,i]=me(!1),{t:o}=Me();return{ConfirmationWindow:()=>f(N,{open:t,children:[g(R,{children:e.title}),g(b,{children:g(P,{children:e.body})}),f(w,{children:[g(v,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{i(!1)},children:o("NO_LABEL")}),g(v,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),i(!1)},autoFocus:!0,children:o("YES_LABEL")})]})]}),open:t,setOpen:i}},Zt=()=>{const e=y(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}},Jt=e=>{const[t,i]=me(!1),o=y(e=>e.AppLayout.appDirection);return{windowState:t,setWindowState:i,Window:r=>g(L,{open:t,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!t&&e?.onCloseCallBack&&e.onCloseCallBack()},children:f(S,{dir:o,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:[g(M,{position:"static",children:f(D,{variant:"dense",children:[g(Re,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),g(k,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),g("div",{style:{flexGrow:1}}),g(U,{onClick:()=>{i(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:g(Re,{icon:"xmark-square"})})]})}),g(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:r?.children})]})})}},Xt=be({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:ei,setStoresMetaData:ti}=Xt.actions;var ii=Xt.reducer;const oi=e=>{const t=y(e=>e.commonStores.stores),i=A(),o=Zt(),{handleGetRequest:r,handlePostRequest:n,handleDeleteRequest:a}=$t();return{reloadData:async n=>{if(e?.commonStoreKey){const n=Object.keys(t);for(const a of n)if(a===e.commonStoreKey&&(void 0===t[a]?.authority||null===t[a]?.authority||o.isUserAuthorized(t[a]?.authority))&&""!=t[a]?.url){await r({endPointURI:t[a].url,showMask:!1,successCallBkFn:t=>{i(ei({storeKey:a,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{i(ei({storeKey:a,data:[]})),e.setData([])}});break}}else e?.findAll&&await r({endPointURI:e.findAll,showMask:!0,parameters:n||{},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 a({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},ri=e=>{const{t:t}=Me();return g(F,{...e,hidden:!0,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:g(T,{children:e?.label?t(e.label):""}),helperText:e?.helperText?t(e.helperText):void 0})};function ni(e,t){return e.filter(e=>-1===t.indexOf(e))}function ai(e,t){return e.filter(e=>-1!==t.indexOf(e))}const si=({valueField:e="id",displayField:t="name",options:i=[],selectedOptions:o=[],setSelection:r})=>{const[n,a]=ue.useState([]),[s,l]=ue.useState([]),[d,c]=ue.useState([]),[p,u]=ue.useState(""),[h,m]=ue.useState(""),T=ai(n,s),A=ai(n,d);ue.useEffect(()=>{i&&l([...i])},[i]),ue.useEffect(()=>{o&&c([...o])},[o]);const y=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),a(i)},I=e=>ai(n,e).length,_=e=>()=>{var t,i;I(e)===e.length?a(ni(n,e)):a((t=n,i=e,[...t,...ni(i,t)]))},E=(i,o,r)=>{const a=o.filter(e=>{if(e[t]){const i=e[t];if("left"===r&&i.toLocaleLowerCase().includes(p.toLocaleLowerCase()))return!0;if("right"===r&&i.toLocaleLowerCase().includes(h.toLocaleLowerCase()))return!0}return!1});return f(Ke,{sx:{height:"100%"},children:[g(Ve,{sx:{px:2,py:1},avatar:g($e,{onClick:_(a),checked:I(a)===a.length&&0!==a.length,indeterminate:I(a)!==a.length&&0!==I(a),disabled:0===a.length,inputProps:{"aria-label":"all items selected"}}),title:i,subheader:`${I(o)} / ${o.length} Selected`}),g(S,{sx:{width:"100%",padding:1},children:g(ri,{fullWidth:!0,label:"search",value:"left"===r?p:h,onChange:e=>{"left"===r?u(e.target.value):m(e.target.value)}})}),g(Ze,{}),g(Ye,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:a.map(i=>(i[e],f(q,{role:"listitem",onClick:y(i),sx:{cursor:"pointer"},children:[g(Qe,{children:g($e,{checked:-1!==n.indexOf(i),tabIndex:-1,disableRipple:!0})}),g(ze,{id:i[e],primary:i[t]})]},i[e])))})]})};return f(B,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[g(B,{sx:{height:"100%",flex:1},children:E("Available Items",s,"left")}),g(B,{children:f(B,{container:!0,direction:"column",alignItems:"center",children:[g(je,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{c(e=>{let t=d.concat(T);return r(t),t}),l(ni(s,T)),a(ni(n,T))},disabled:0===T.length,"aria-label":"move selected right",children:">"}),g(je,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{l(s.concat(A)),c(e=>{let t=ni(d,A);return r(t),t}),a(ni(n,A))},disabled:0===A.length,"aria-label":"move selected left",children:"<"})]})}),g(B,{sx:{height:"100%",flex:1},children:E("Currently Selected",d,"right")})]})},li=e=>{const{t:t}=Me();return g(W,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:g(G,{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:t(e.label)})},di=e=>{const t=y(e=>e.AppLayout),[i,o]=me(e?.options||[]),r=y(t=>t?.commonStores?.stores[e?.commonStoreKey]?.data),{handleGetRequest:n}=$t();fe(()=>{e?.commonStoreKey?o(r):(async()=>{e?.storeUrl?await n({endPointURI:e.storeUrl,showMask:!1,parameters:e?.storeLoadParam,successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o([])}}):e?.dataQueryId&&await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e?.storeLoadParam},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o([])}})})()},[e?.storeUrl,e?.storeLoadParam,e?.dataQueryId,e?.commonStoreKey]);const{t:a}=Me();return g(H,{sx:e.sx,value:(t=>{for(let i of e.options)if(i[e.valueField]==t)return i;return null})(e.value),options:i,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:(t,i)=>g("li",{...t,children:null!=i?a(i[e.displayField]):""}),slots:{popper:e=>g(Y,{...e,style:{...e.style,direction:t.appDirection}})},renderInput:t=>g(F,{...t,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):""})})},ci="YYYY-MM-DD",pi="YYYY-MM-DD HH:mm:ss",ui="#37505C",hi="#ff6d00",mi="#ea690e",fi="#74776B",gi=e=>{const{t:t}=Me();return e?.hidden?g(T,{}):g(Je,{dateAdapter:tt,children:g(Xe,{value:null!=e.value&&void 0!==e.value&&""!==e.value?it(e.value,e?.format||ci):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:t(e.label),format:e?.format||ci,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||ci)),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?g(T,{children:t(e.errorMessage)}):g(T,{})}}})})},Ti=e=>{const{t:t}=Me();return e?.hidden?g(T,{}):g(Je,{dateAdapter:tt,children:g(et,{value:null!=e.value&&void 0!==e.value&&""!==e.value?it(e.value,e?.format||pi):null,label:t(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||pi,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||pi)),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?g(T,{children:t(e.errorMessage)}):g(T,{})}}})})},Ai=e=>{const t=y(e=>e.AppLayout),i=Zt(),[o,r]=me([]),{handleGetRequest:n}=$t();return fe(()=>{e.lookupType&&(async()=>{await n({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{r(e.data)},failureCallBkFn:()=>{r([])}})})()},[e.lookupType,i.UserSession]),g(di,{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},yi=e=>({...e,type:"string",renderEditCell:e=>g(gi,{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=it(e).format(ci)),o},valueFormatter:(e,t,i)=>t[i.field]}),Ii=e=>({...e,type:"string",renderEditCell:e=>g(Ti,{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=it(e).format(pi)),o},valueFormatter:(e,t,i)=>t[i.field]}),_i=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let t=null;try{t=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return g("div",{children:null!=t?t[e.colDef.displayField]:e.value})},renderEditCell:e=>g(di,{...e,sx:{width:"100%"},options:e?.colDef?.options,commonStoreKey:e?.colDef?.commonStoreKey,dataQueryId:e?.colDef?.dataQueryId,storeUrl:e?.colDef?.storeUrl,storeLoadParam:e?.colDef?.storeLoadParam,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})}})}),Ei=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:t=>{const i=t?.value;return i===e.checkedValue||"true"===i||1===i||!0===i?g(Re,{icon:"check",color:"green"}):g(Re,{icon:"xmark",color:"red"})},renderEditCell:t=>g(li,{...t,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}})}),Oi=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(...Oi(i));return t},Ci=e=>{const t=[];for(const i of e)t.push(...Oi(i));return t},Ni=(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=yi({...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=Ii({...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=Ei({...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=_i({...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=_i({...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},Ri=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?Ge.boolean({required_error:"This field is required"}):Ge.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?Ge.string({message:"This field is required"}).min(1,"This field is required"):Ge.string().optional().nullable()):t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():t[e]=!0===i?.required?Ge.string({message:"This field is required"}).min(1,"This field is required"):Ge.string().optional().nullable()}return t},bi=(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 Pi(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 wi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vi,Li={exports:{}},Si={exports:{}},Mi={};var Di,ki,Ui,xi,Fi,Bi,qi,Wi,Gi,Hi,Yi,Ki,Vi,zi,Qi,$i={};
|
|
2
2
|
/** @license React v16.13.1
|
|
3
3
|
* react-is.development.js
|
|
4
4
|
*
|
|
@@ -6,12 +6,12 @@ import{QuickFilter as e,ToolbarButton as t,Toolbar as i,ColumnsPanelTrigger as o
|
|
|
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 ji(){return ki||(ki=1,"production"===process.env.NODE_ENV?Si.exports=function(){if(vi)return Mi;vi=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,p=e?Symbol.for("react.suspense"):60113,u=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 y(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:switch(e=e.type){case l:case d:case o:case n:case r:case p:return e;default:switch(e=e&&e.$$typeof){case s:case c:case m:case h:case a:return e;default:return u}}case i:return u}}}function I(e){return y(e)===d}return Mi.AsyncMode=l,Mi.ConcurrentMode=d,Mi.ContextConsumer=s,Mi.ContextProvider=a,Mi.Element=t,Mi.ForwardRef=c,Mi.Fragment=o,Mi.Lazy=m,Mi.Memo=h,Mi.Portal=i,Mi.Profiler=n,Mi.StrictMode=r,Mi.Suspense=p,Mi.isAsyncMode=function(e){return I(e)||y(e)===l},Mi.isConcurrentMode=I,Mi.isContextConsumer=function(e){return y(e)===s},Mi.isContextProvider=function(e){return y(e)===a},Mi.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Mi.isForwardRef=function(e){return y(e)===c},Mi.isFragment=function(e){return y(e)===o},Mi.isLazy=function(e){return y(e)===m},Mi.isMemo=function(e){return y(e)===h},Mi.isPortal=function(e){return y(e)===i},Mi.isProfiler=function(e){return y(e)===n},Mi.isStrictMode=function(e){return y(e)===r},Mi.isSuspense=function(e){return y(e)===p},Mi.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===p||e===u||"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)},Mi.typeOf=y,Mi}():Si.exports=(Di||(Di=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,p=e?Symbol.for("react.suspense"):60113,u=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 y(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:var f=e.type;switch(f){case l:case d:case o:case n:case r:case p:return f;default:var g=f&&f.$$typeof;switch(g){case s:case c:case m:case h:case a:return g;default:return u}}case i:return u}}}var I=l,_=d,E=s,O=a,C=t,N=c,R=o,b=m,P=h,w=i,v=n,L=r,S=p,M=!1;function D(e){return y(e)===d}
|
|
9
|
+
*/function ji(){return ki||(ki=1,"production"===process.env.NODE_ENV?Si.exports=function(){if(vi)return Mi;vi=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,p=e?Symbol.for("react.suspense"):60113,u=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 y(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:switch(e=e.type){case l:case d:case o:case n:case r:case p:return e;default:switch(e=e&&e.$$typeof){case s:case c:case m:case h:case a:return e;default:return u}}case i:return u}}}function I(e){return y(e)===d}return Mi.AsyncMode=l,Mi.ConcurrentMode=d,Mi.ContextConsumer=s,Mi.ContextProvider=a,Mi.Element=t,Mi.ForwardRef=c,Mi.Fragment=o,Mi.Lazy=m,Mi.Memo=h,Mi.Portal=i,Mi.Profiler=n,Mi.StrictMode=r,Mi.Suspense=p,Mi.isAsyncMode=function(e){return I(e)||y(e)===l},Mi.isConcurrentMode=I,Mi.isContextConsumer=function(e){return y(e)===s},Mi.isContextProvider=function(e){return y(e)===a},Mi.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Mi.isForwardRef=function(e){return y(e)===c},Mi.isFragment=function(e){return y(e)===o},Mi.isLazy=function(e){return y(e)===m},Mi.isMemo=function(e){return y(e)===h},Mi.isPortal=function(e){return y(e)===i},Mi.isProfiler=function(e){return y(e)===n},Mi.isStrictMode=function(e){return y(e)===r},Mi.isSuspense=function(e){return y(e)===p},Mi.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===p||e===u||"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)},Mi.typeOf=y,Mi}():Si.exports=(Di||(Di=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,p=e?Symbol.for("react.suspense"):60113,u=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 y(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:var f=e.type;switch(f){case l:case d:case o:case n:case r:case p:return f;default:var g=f&&f.$$typeof;switch(g){case s:case c:case m:case h:case a:return g;default:return u}}case i:return u}}}var I=l,_=d,E=s,O=a,C=t,N=c,R=o,b=m,P=h,w=i,v=n,L=r,S=p,M=!1;function D(e){return y(e)===d}$i.AsyncMode=I,$i.ConcurrentMode=_,$i.ContextConsumer=E,$i.ContextProvider=O,$i.Element=C,$i.ForwardRef=N,$i.Fragment=R,$i.Lazy=b,$i.Memo=P,$i.Portal=w,$i.Profiler=v,$i.StrictMode=L,$i.Suspense=S,$i.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.")),D(e)||y(e)===l},$i.isConcurrentMode=D,$i.isContextConsumer=function(e){return y(e)===s},$i.isContextProvider=function(e){return y(e)===a},$i.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},$i.isForwardRef=function(e){return y(e)===c},$i.isFragment=function(e){return y(e)===o},$i.isLazy=function(e){return y(e)===m},$i.isMemo=function(e){return y(e)===h},$i.isPortal=function(e){return y(e)===i},$i.isProfiler=function(e){return y(e)===n},$i.isStrictMode=function(e){return y(e)===r},$i.isSuspense=function(e){return y(e)===p},$i.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===p||e===u||"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)},$i.typeOf=y}()),$i)),Si.exports}
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
13
13
|
@license MIT
|
|
14
|
-
*/function Zi(){if(xi)return Ui;xi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return Ui=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},Ui}function Ji(){if(Bi)return Fi;Bi=1;return Fi="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Xi(){return Wi?qi:(Wi=1,qi=Function.call.bind(Object.prototype.hasOwnProperty))}function eo(){if(Hi)return Gi;Hi=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Ji(),i={},o=Xi();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 p=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 p.name="Invariant Violation",p}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 u=l?l():"";e("Failed "+a+" type: "+c.message+(null!=u?u:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Gi=r}function to(){if(Ki)return Yi;Ki=1;var e=ji(),t=Zi(),i=Ji(),o=Xi(),r=eo(),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){}}),Yi=function(s,l){var d="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",p={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 p=e(l,c,n,a,s+"."+c,i);if(p instanceof Error)return p}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(u(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===y(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 "+I(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,y(c));var p=c(s,d,r,n,a+"."+d,i);if(p)return p}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 p=t({},r[n],e);for(var u in p){var m=e[u];if(o(e,u)&&"function"!=typeof m)return g(a,s,l,u,y(m));if(!m)return new h("Invalid "+s+" `"+l+"` key `"+u+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=m(d,u,a,s,l+"."+u,i);if(f)return f}return null})}};function u(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,p,u,m){if(d=d||c,u=u||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 `"+u+"` 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 "+p+" `"+u+"` is marked as required in `"+d+"`, but its value is `null`."):new h("The "+p+" `"+u+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(a,s,d,p,u)}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 `"+y(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 y(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 I(e){var t=y(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,p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},Yi}function io(){if(zi)return Vi;zi=1;var e=Ji();function t(){}function i(){}return i.resetWarningCache=t,Vi=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 oo(){if($i)return Li.exports;if($i=1,"production"!==process.env.NODE_ENV){var e=ji();Li.exports=to()(e.isElement,true)}else Li.exports=io()();return Li.exports}var ro=wi(oo());var no,ao={exports:{}},so={};function lo(){if(no)return so;no=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"),p=Symbol.for("react.lazy"),u=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 u:return h;default:switch(h=h&&h.$$typeof){case a:case s:case p:case c:case n:return h;default:return m}}case t:return m}}}return so.ContextConsumer=n,so.ContextProvider=a,so.Element=e,so.ForwardRef=s,so.Fragment=i,so.Lazy=p,so.Memo=c,so.Portal=t,so.Profiler=r,so.StrictMode=o,so.Suspense=l,so.SuspenseList=d,so.isContextConsumer=function(e){return m(e)===n},so.isContextProvider=function(e){return m(e)===a},so.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},so.isForwardRef=function(e){return m(e)===s},so.isFragment=function(e){return m(e)===i},so.isLazy=function(e){return m(e)===p},so.isMemo=function(e){return m(e)===c},so.isPortal=function(e){return m(e)===t},so.isProfiler=function(e){return m(e)===r},so.isStrictMode=function(e){return m(e)===o},so.isSuspense=function(e){return m(e)===l},so.isSuspenseList=function(e){return m(e)===d},so.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===p||e.$$typeof===c||e.$$typeof===a||e.$$typeof===n||e.$$typeof===s||e.$$typeof===h||void 0!==e.getModuleId)},so.typeOf=m,so}var co,po,uo={};
|
|
14
|
+
*/function Zi(){if(xi)return Ui;xi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return Ui=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},Ui}function Ji(){if(Bi)return Fi;Bi=1;return Fi="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Xi(){return Wi?qi:(Wi=1,qi=Function.call.bind(Object.prototype.hasOwnProperty))}function eo(){if(Hi)return Gi;Hi=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Ji(),i={},o=Xi();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 p=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 p.name="Invariant Violation",p}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 u=l?l():"";e("Failed "+a+" type: "+c.message+(null!=u?u:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Gi=r}function to(){if(Ki)return Yi;Ki=1;var e=ji(),t=Zi(),i=Ji(),o=Xi(),r=eo(),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){}}),Yi=function(s,l){var d="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",p={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 p=e(l,c,n,a,s+"."+c,i);if(p instanceof Error)return p}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(u(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===y(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 "+I(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,y(c));var p=c(s,d,r,n,a+"."+d,i);if(p)return p}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 p=t({},r[n],e);for(var u in p){var m=e[u];if(o(e,u)&&"function"!=typeof m)return g(a,s,l,u,y(m));if(!m)return new h("Invalid "+s+" `"+l+"` key `"+u+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=m(d,u,a,s,l+"."+u,i);if(f)return f}return null})}};function u(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,p,u,m){if(d=d||c,u=u||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 `"+u+"` 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 "+p+" `"+u+"` is marked as required in `"+d+"`, but its value is `null`."):new h("The "+p+" `"+u+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(a,s,d,p,u)}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 `"+y(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 y(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 I(e){var t=y(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,p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},Yi}function io(){if(zi)return Vi;zi=1;var e=Ji();function t(){}function i(){}return i.resetWarningCache=t,Vi=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 oo(){if(Qi)return Li.exports;if(Qi=1,"production"!==process.env.NODE_ENV){var e=ji();Li.exports=to()(e.isElement,true)}else Li.exports=io()();return Li.exports}var ro=wi(oo());var no,ao={exports:{}},so={};function lo(){if(no)return so;no=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"),p=Symbol.for("react.lazy"),u=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 u:return h;default:switch(h=h&&h.$$typeof){case a:case s:case p:case c:case n:return h;default:return m}}case t:return m}}}return so.ContextConsumer=n,so.ContextProvider=a,so.Element=e,so.ForwardRef=s,so.Fragment=i,so.Lazy=p,so.Memo=c,so.Portal=t,so.Profiler=r,so.StrictMode=o,so.Suspense=l,so.SuspenseList=d,so.isContextConsumer=function(e){return m(e)===n},so.isContextProvider=function(e){return m(e)===a},so.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},so.isForwardRef=function(e){return m(e)===s},so.isFragment=function(e){return m(e)===i},so.isLazy=function(e){return m(e)===p},so.isMemo=function(e){return m(e)===c},so.isPortal=function(e){return m(e)===t},so.isProfiler=function(e){return m(e)===r},so.isStrictMode=function(e){return m(e)===o},so.isSuspense=function(e){return m(e)===l},so.isSuspenseList=function(e){return m(e)===d},so.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===p||e.$$typeof===c||e.$$typeof===a||e.$$typeof===n||e.$$typeof===s||e.$$typeof===h||void 0!==e.getModuleId)},so.typeOf=m,so}var co,po,uo={};
|
|
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 ho(){return co||(co=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 u:case p: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"),p=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");uo.ContextConsumer=a,uo.ContextProvider=s,uo.Element=t,uo.ForwardRef=l,uo.Fragment=o,uo.Lazy=u,uo.Memo=p,uo.Portal=i,uo.Profiler=n,uo.StrictMode=r,uo.Suspense=d,uo.SuspenseList=c,uo.isContextConsumer=function(t){return e(t)===a},uo.isContextProvider=function(t){return e(t)===s},uo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},uo.isForwardRef=function(t){return e(t)===l},uo.isFragment=function(t){return e(t)===o},uo.isLazy=function(t){return e(t)===u},uo.isMemo=function(t){return e(t)===p},uo.isPortal=function(t){return e(t)===i},uo.isProfiler=function(t){return e(t)===n},uo.isStrictMode=function(t){return e(t)===r},uo.isSuspense=function(t){return e(t)===d},uo.isSuspenseList=function(t){return e(t)===c},uo.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===u||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||void 0!==e.getModuleId)},uo.typeOf=e}()),uo}function mo(){return po||(po=1,"production"===process.env.NODE_ENV?ao.exports=lo():ao.exports=ho()),ao.exports}var fo=mo();function go(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 To(e){if(ue.isValidElement(e)||fo.isValidElementType(e)||!go(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=To(e[i])}),t}function Ao(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return go(e)&&go(t)&&Object.keys(t).forEach(r=>{ue.isValidElement(t[r])||fo.isValidElementType(t[r])?o[r]=t[r]:go(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&go(e[r])?o[r]=Ao(e[r],t[r],i):i.clone?o[r]=go(t[r])?To(t[r]):t[r]:o[r]=t[r]}),o}function yo(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 Io(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 _o={borderRadius:4},Eo="production"!==process.env.NODE_ENV?ro.oneOfType([ro.number,ro.string,ro.object,ro.array]):{};function Oo(e,t){return t?Ao(e,t,{clone:!1}):e}const Co={xs:0,sm:600,md:900,lg:1200,xl:1536},No={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Co[e]}px)`},Ro={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:Co[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function bo(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||No;return t.reduce((o,r,n)=>(o[e.up(e.keys[n])]=i(t[n]),o),{})}if("object"==typeof t){const e=o.breakpoints||No;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\`.`:Pi(18,`(${t})`));return null}const[,o,r]=i,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(n)}(o.containerQueries?o:Ro,n);e&&(r[e]=i(t[n],n))}else if(Object.keys(e.values||Co).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 Po(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function wo(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Pi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function vo(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 Lo(e,t,i,o=i){let r;return r="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:vo(e,i)||o,t&&(r=t(r,o,e)),r}function So(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=vo(e.theme,o)||{};return bo(e,n,e=>{let o=Lo(a,r,e);return e===o&&"string"==typeof e&&(o=Lo(a,r,`${t}${"default"===e?"":wo(e)}`,e)),!1===i?o:{[i]:o}})};return n.propTypes="production"!==process.env.NODE_ENV?{[t]:Eo}:{},n.filterProps=[t],n}const Mo={m:"margin",p:"padding"},Do={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ko={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Uo=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!ko[e])return[e];e=ko[e]}const[t,i]=e.split(""),o=Mo[t],r=Do[i]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]}),xo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Fo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Bo=[...xo,...Fo];function qo(e,t,i,o){const r=vo(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 Wo(e){return qo(e,"spacing",8,"spacing")}function Go(e,t){return"string"==typeof t||null==t?t:e(t)}function Ho(e,t,i,o){if(!t.includes(i))return null;const r=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Go(t,i),e),{})}(Uo(i),o);return bo(e,e[i],r)}function Yo(e,t){const i=Wo(e.theme);return Object.keys(e).map(o=>Ho(e,t,o,i)).reduce(Oo,{})}function Ko(e){return Yo(e,xo)}function Vo(e){return Yo(e,Fo)}function zo(...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]?Oo(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 $o(e){return"number"!=typeof e?e:`${e}px solid`}function Qo(e,t){return So({prop:e,themeKey:"borders",transform:t})}Ko.propTypes="production"!==process.env.NODE_ENV?xo.reduce((e,t)=>(e[t]=Eo,e),{}):{},Ko.filterProps=xo,Vo.propTypes="production"!==process.env.NODE_ENV?Fo.reduce((e,t)=>(e[t]=Eo,e),{}):{},Vo.filterProps=Fo,"production"===process.env.NODE_ENV||Bo.reduce((e,t)=>(e[t]=Eo,e),{});const jo=Qo("border",$o),Zo=Qo("borderTop",$o),Jo=Qo("borderRight",$o),Xo=Qo("borderBottom",$o),er=Qo("borderLeft",$o),tr=Qo("borderColor"),ir=Qo("borderTopColor"),or=Qo("borderRightColor"),rr=Qo("borderBottomColor"),nr=Qo("borderLeftColor"),ar=Qo("outline",$o),sr=Qo("outlineColor"),lr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=qo(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Go(t,e)});return bo(e,e.borderRadius,i)}return null};lr.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Eo}:{},lr.filterProps=["borderRadius"],zo(jo,Zo,Jo,Xo,er,tr,ir,or,rr,nr,lr,ar,sr);const dr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=qo(e.theme,"spacing",8,"gap"),i=e=>({gap:Go(t,e)});return bo(e,e.gap,i)}return null};dr.propTypes="production"!==process.env.NODE_ENV?{gap:Eo}:{},dr.filterProps=["gap"];const cr=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=qo(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Go(t,e)});return bo(e,e.columnGap,i)}return null};cr.propTypes="production"!==process.env.NODE_ENV?{columnGap:Eo}:{},cr.filterProps=["columnGap"];const pr=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=qo(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Go(t,e)});return bo(e,e.rowGap,i)}return null};pr.propTypes="production"!==process.env.NODE_ENV?{rowGap:Eo}:{},pr.filterProps=["rowGap"];function ur(e,t){return"grey"===t?t:e}zo(dr,cr,pr,So({prop:"gridColumn"}),So({prop:"gridRow"}),So({prop:"gridAutoFlow"}),So({prop:"gridAutoColumns"}),So({prop:"gridAutoRows"}),So({prop:"gridTemplateColumns"}),So({prop:"gridTemplateRows"}),So({prop:"gridTemplateAreas"}),So({prop:"gridArea"}));function hr(e){return e<=1&&0!==e?100*e+"%":e}zo(So({prop:"color",themeKey:"palette",transform:ur}),So({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ur}),So({prop:"backgroundColor",themeKey:"palette",transform:ur}));const mr=So({prop:"width",transform:hr}),fr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||Co[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:hr(t)}};return bo(e,e.maxWidth,t)}return null};fr.filterProps=["maxWidth"];const gr=So({prop:"minWidth",transform:hr}),Tr=So({prop:"height",transform:hr}),Ar=So({prop:"maxHeight",transform:hr}),yr=So({prop:"minHeight",transform:hr});So({prop:"size",cssProperty:"width",transform:hr}),So({prop:"size",cssProperty:"height",transform:hr});zo(mr,fr,gr,Tr,Ar,yr,So({prop:"boxSizing"}));const Ir={border:{themeKey:"borders",transform:$o},borderTop:{themeKey:"borders",transform:$o},borderRight:{themeKey:"borders",transform:$o},borderBottom:{themeKey:"borders",transform:$o},borderLeft:{themeKey:"borders",transform:$o},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:$o},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:lr},color:{themeKey:"palette",transform:ur},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ur},backgroundColor:{themeKey:"palette",transform:ur},p:{style:Vo},pt:{style:Vo},pr:{style:Vo},pb:{style:Vo},pl:{style:Vo},px:{style:Vo},py:{style:Vo},padding:{style:Vo},paddingTop:{style:Vo},paddingRight:{style:Vo},paddingBottom:{style:Vo},paddingLeft:{style:Vo},paddingX:{style:Vo},paddingY:{style:Vo},paddingInline:{style:Vo},paddingInlineStart:{style:Vo},paddingInlineEnd:{style:Vo},paddingBlock:{style:Vo},paddingBlockStart:{style:Vo},paddingBlockEnd:{style:Vo},m:{style:Ko},mt:{style:Ko},mr:{style:Ko},mb:{style:Ko},ml:{style:Ko},mx:{style:Ko},my:{style:Ko},margin:{style:Ko},marginTop:{style:Ko},marginRight:{style:Ko},marginBottom:{style:Ko},marginLeft:{style:Ko},marginX:{style:Ko},marginY:{style:Ko},marginInline:{style:Ko},marginInlineStart:{style:Ko},marginInlineEnd:{style:Ko},marginBlock:{style:Ko},marginBlockStart:{style:Ko},marginBlockEnd:{style:Ko},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:dr},rowGap:{style:pr},columnGap:{style:cr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:hr},maxWidth:{style:fr},minWidth:{transform:hr},height:{transform:hr},maxHeight:{transform:hr},minHeight:{transform:hr},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 _r=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=vo(i,s)||{};if(d)return d(r);return bo(r,t,t=>{let i=Lo(c,l,t);return t===i&&"string"==typeof t&&(i=Lo(c,l,`${e}${"default"===t?"":wo(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??Ir;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=Oo(d,e(i,n,r,a));else{const e=bo({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=Oo(d,e):d[i]=t({sx:n,theme:r,nested:!0})}else d=Oo(d,e(i,n,r,a))}),!n&&r.modularCssLayers?{"@layer sx":Io(r,Po(l,d))}:Io(r,Po(l,d))}return Array.isArray(o)?o.map(s):s(o)}}();function Er(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 Or(e=null){const t=ue.useContext(de);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}_r.filterProps=["sx"];const Cr=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:r,shape:n={},...a}=e,s=yo(i),l=function(e=8,t=Wo({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=Ao({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{..._o,...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=Er,d=t.reduce((e,t)=>Ao(e,t),d),d.unstable_sxConfig={...Ir,...a?.unstable_sxConfig},d.unstable_sx=function(e){return _r({sx:e,theme:this})},d}();function Nr(e){const{sx:t,...i}=e,{systemProps:o,otherProps:r}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??Ir;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 go(i)?{...o,...i}:o}:{...o,...t},{...r,sx:n}}const Rr=e=>e,br=(()=>{let e=Rr;return{configure(t){e=t},generate:t=>e(t),reset(){e=Rr}}})();function Pr(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=Pr(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function wr(){for(var e,t,i=0,o="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=Pr(e))&&(o&&(o+=" "),o+=t);return o}const vr={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 Lr=function(e={}){const{themeId:t,defaultTheme:i,defaultClassName:o="MuiBox-root",generateClassName:r}=e,n=
|
|
23
|
+
*/function ho(){return co||(co=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 u:case p: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"),p=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");uo.ContextConsumer=a,uo.ContextProvider=s,uo.Element=t,uo.ForwardRef=l,uo.Fragment=o,uo.Lazy=u,uo.Memo=p,uo.Portal=i,uo.Profiler=n,uo.StrictMode=r,uo.Suspense=d,uo.SuspenseList=c,uo.isContextConsumer=function(t){return e(t)===a},uo.isContextProvider=function(t){return e(t)===s},uo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},uo.isForwardRef=function(t){return e(t)===l},uo.isFragment=function(t){return e(t)===o},uo.isLazy=function(t){return e(t)===u},uo.isMemo=function(t){return e(t)===p},uo.isPortal=function(t){return e(t)===i},uo.isProfiler=function(t){return e(t)===n},uo.isStrictMode=function(t){return e(t)===r},uo.isSuspense=function(t){return e(t)===d},uo.isSuspenseList=function(t){return e(t)===c},uo.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===u||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||void 0!==e.getModuleId)},uo.typeOf=e}()),uo}function mo(){return po||(po=1,"production"===process.env.NODE_ENV?ao.exports=lo():ao.exports=ho()),ao.exports}var fo=mo();function go(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 To(e){if(ue.isValidElement(e)||fo.isValidElementType(e)||!go(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=To(e[i])}),t}function Ao(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return go(e)&&go(t)&&Object.keys(t).forEach(r=>{ue.isValidElement(t[r])||fo.isValidElementType(t[r])?o[r]=t[r]:go(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&go(e[r])?o[r]=Ao(e[r],t[r],i):i.clone?o[r]=go(t[r])?To(t[r]):t[r]:o[r]=t[r]}),o}function yo(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 Io(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 _o={borderRadius:4},Eo="production"!==process.env.NODE_ENV?ro.oneOfType([ro.number,ro.string,ro.object,ro.array]):{};function Oo(e,t){return t?Ao(e,t,{clone:!1}):e}const Co={xs:0,sm:600,md:900,lg:1200,xl:1536},No={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Co[e]}px)`},Ro={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:Co[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function bo(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||No;return t.reduce((o,r,n)=>(o[e.up(e.keys[n])]=i(t[n]),o),{})}if("object"==typeof t){const e=o.breakpoints||No;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\`.`:Pi(18,`(${t})`));return null}const[,o,r]=i,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(n)}(o.containerQueries?o:Ro,n);e&&(r[e]=i(t[n],n))}else if(Object.keys(e.values||Co).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 Po(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function wo(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Pi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function vo(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 Lo(e,t,i,o=i){let r;return r="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:vo(e,i)||o,t&&(r=t(r,o,e)),r}function So(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=vo(e.theme,o)||{};return bo(e,n,e=>{let o=Lo(a,r,e);return e===o&&"string"==typeof e&&(o=Lo(a,r,`${t}${"default"===e?"":wo(e)}`,e)),!1===i?o:{[i]:o}})};return n.propTypes="production"!==process.env.NODE_ENV?{[t]:Eo}:{},n.filterProps=[t],n}const Mo={m:"margin",p:"padding"},Do={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ko={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Uo=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!ko[e])return[e];e=ko[e]}const[t,i]=e.split(""),o=Mo[t],r=Do[i]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]}),xo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Fo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Bo=[...xo,...Fo];function qo(e,t,i,o){const r=vo(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 Wo(e){return qo(e,"spacing",8,"spacing")}function Go(e,t){return"string"==typeof t||null==t?t:e(t)}function Ho(e,t,i,o){if(!t.includes(i))return null;const r=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Go(t,i),e),{})}(Uo(i),o);return bo(e,e[i],r)}function Yo(e,t){const i=Wo(e.theme);return Object.keys(e).map(o=>Ho(e,t,o,i)).reduce(Oo,{})}function Ko(e){return Yo(e,xo)}function Vo(e){return Yo(e,Fo)}function zo(...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]?Oo(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 Qo(e){return"number"!=typeof e?e:`${e}px solid`}function $o(e,t){return So({prop:e,themeKey:"borders",transform:t})}Ko.propTypes="production"!==process.env.NODE_ENV?xo.reduce((e,t)=>(e[t]=Eo,e),{}):{},Ko.filterProps=xo,Vo.propTypes="production"!==process.env.NODE_ENV?Fo.reduce((e,t)=>(e[t]=Eo,e),{}):{},Vo.filterProps=Fo,"production"===process.env.NODE_ENV||Bo.reduce((e,t)=>(e[t]=Eo,e),{});const jo=$o("border",Qo),Zo=$o("borderTop",Qo),Jo=$o("borderRight",Qo),Xo=$o("borderBottom",Qo),er=$o("borderLeft",Qo),tr=$o("borderColor"),ir=$o("borderTopColor"),or=$o("borderRightColor"),rr=$o("borderBottomColor"),nr=$o("borderLeftColor"),ar=$o("outline",Qo),sr=$o("outlineColor"),lr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=qo(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Go(t,e)});return bo(e,e.borderRadius,i)}return null};lr.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Eo}:{},lr.filterProps=["borderRadius"],zo(jo,Zo,Jo,Xo,er,tr,ir,or,rr,nr,lr,ar,sr);const dr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=qo(e.theme,"spacing",8,"gap"),i=e=>({gap:Go(t,e)});return bo(e,e.gap,i)}return null};dr.propTypes="production"!==process.env.NODE_ENV?{gap:Eo}:{},dr.filterProps=["gap"];const cr=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=qo(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Go(t,e)});return bo(e,e.columnGap,i)}return null};cr.propTypes="production"!==process.env.NODE_ENV?{columnGap:Eo}:{},cr.filterProps=["columnGap"];const pr=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=qo(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Go(t,e)});return bo(e,e.rowGap,i)}return null};pr.propTypes="production"!==process.env.NODE_ENV?{rowGap:Eo}:{},pr.filterProps=["rowGap"];function ur(e,t){return"grey"===t?t:e}zo(dr,cr,pr,So({prop:"gridColumn"}),So({prop:"gridRow"}),So({prop:"gridAutoFlow"}),So({prop:"gridAutoColumns"}),So({prop:"gridAutoRows"}),So({prop:"gridTemplateColumns"}),So({prop:"gridTemplateRows"}),So({prop:"gridTemplateAreas"}),So({prop:"gridArea"}));function hr(e){return e<=1&&0!==e?100*e+"%":e}zo(So({prop:"color",themeKey:"palette",transform:ur}),So({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ur}),So({prop:"backgroundColor",themeKey:"palette",transform:ur}));const mr=So({prop:"width",transform:hr}),fr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||Co[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:hr(t)}};return bo(e,e.maxWidth,t)}return null};fr.filterProps=["maxWidth"];const gr=So({prop:"minWidth",transform:hr}),Tr=So({prop:"height",transform:hr}),Ar=So({prop:"maxHeight",transform:hr}),yr=So({prop:"minHeight",transform:hr});So({prop:"size",cssProperty:"width",transform:hr}),So({prop:"size",cssProperty:"height",transform:hr});zo(mr,fr,gr,Tr,Ar,yr,So({prop:"boxSizing"}));const Ir={border:{themeKey:"borders",transform:Qo},borderTop:{themeKey:"borders",transform:Qo},borderRight:{themeKey:"borders",transform:Qo},borderBottom:{themeKey:"borders",transform:Qo},borderLeft:{themeKey:"borders",transform:Qo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Qo},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:lr},color:{themeKey:"palette",transform:ur},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ur},backgroundColor:{themeKey:"palette",transform:ur},p:{style:Vo},pt:{style:Vo},pr:{style:Vo},pb:{style:Vo},pl:{style:Vo},px:{style:Vo},py:{style:Vo},padding:{style:Vo},paddingTop:{style:Vo},paddingRight:{style:Vo},paddingBottom:{style:Vo},paddingLeft:{style:Vo},paddingX:{style:Vo},paddingY:{style:Vo},paddingInline:{style:Vo},paddingInlineStart:{style:Vo},paddingInlineEnd:{style:Vo},paddingBlock:{style:Vo},paddingBlockStart:{style:Vo},paddingBlockEnd:{style:Vo},m:{style:Ko},mt:{style:Ko},mr:{style:Ko},mb:{style:Ko},ml:{style:Ko},mx:{style:Ko},my:{style:Ko},margin:{style:Ko},marginTop:{style:Ko},marginRight:{style:Ko},marginBottom:{style:Ko},marginLeft:{style:Ko},marginX:{style:Ko},marginY:{style:Ko},marginInline:{style:Ko},marginInlineStart:{style:Ko},marginInlineEnd:{style:Ko},marginBlock:{style:Ko},marginBlockStart:{style:Ko},marginBlockEnd:{style:Ko},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:dr},rowGap:{style:pr},columnGap:{style:cr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:hr},maxWidth:{style:fr},minWidth:{transform:hr},height:{transform:hr},maxHeight:{transform:hr},minHeight:{transform:hr},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 _r=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=vo(i,s)||{};if(d)return d(r);return bo(r,t,t=>{let i=Lo(c,l,t);return t===i&&"string"==typeof t&&(i=Lo(c,l,`${e}${"default"===t?"":wo(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??Ir;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=Oo(d,e(i,n,r,a));else{const e=bo({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=Oo(d,e):d[i]=t({sx:n,theme:r,nested:!0})}else d=Oo(d,e(i,n,r,a))}),!n&&r.modularCssLayers?{"@layer sx":Io(r,Po(l,d))}:Io(r,Po(l,d))}return Array.isArray(o)?o.map(s):s(o)}}();function Er(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 Or(e=null){const t=ue.useContext(de);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}_r.filterProps=["sx"];const Cr=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:r,shape:n={},...a}=e,s=yo(i),l=function(e=8,t=Wo({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=Ao({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{..._o,...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=Er,d=t.reduce((e,t)=>Ao(e,t),d),d.unstable_sxConfig={...Ir,...a?.unstable_sxConfig},d.unstable_sx=function(e){return _r({sx:e,theme:this})},d}();function Nr(e){const{sx:t,...i}=e,{systemProps:o,otherProps:r}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??Ir;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 go(i)?{...o,...i}:o}:{...o,...t},{...r,sx:n}}const Rr=e=>e,br=(()=>{let e=Rr;return{configure(t){e=t},generate:t=>e(t),reset(){e=Rr}}})();function Pr(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=Pr(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function wr(){for(var e,t,i=0,o="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=Pr(e))&&(o&&(o+=" "),o+=t);return o}const vr={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 Lr=function(e={}){const{themeId:t,defaultTheme:i,defaultClassName:o="MuiBox-root",generateClassName:r}=e,n=
|
|
24
24
|
/**
|
|
25
25
|
* @mui/styled-engine v7.3.1
|
|
26
26
|
*
|
|
@@ -28,17 +28,17 @@ 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=St(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})(_r),a=ue.forwardRef(function(e,a){const s=function(e=Cr){return Or(e)}(i),{className:l,component:d="div",...c}=Nr(e);return g(n,{as:d,ref:a,className:wr(l,r?r(o):o),theme:t&&s[t]||s,...c})});return a}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=vr[t];return o?`${i}-${o}`:`${br.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:br.generate});function Sr(e){return/^\d+$/.test(e)}function Mr(e){return"number"==typeof e&&!isNaN(e)}function Dr(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function kr(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Ur(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function xr(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&&(Lr.propTypes={children:ro.node,component:ro.elementType,sx:ro.oneOfType([ro.arrayOf(ro.oneOfType([ro.func,ro.object,ro.bool])),ro.func,ro.object])});const Fr=(e,t)=>t?it(e).format(t):it(e).format(ci),Br=(e,t)=>t?it(e,t).toDate():it(e,ci).toDate(),qr=e=>{if(e?.fieldInfo){const t=e.fieldInfo,i=e?.formManager||null,o=e?.formActions||null,r=e?.formValues||null,n=e?.fieldInfo?.fieldName||null,a=e?.fieldInfo?.fieldType||null;if(!(t&&i&&r&&n&&a))return g(T,{});const s=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(r):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return g(B,{size:t?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===a||"number"===a?g(ri,{...t.muiTextFieldProps,fullWidth:!0,type:a,disabled:e.disabledFields.includes(n),label:s(),value:r[n],onChange:t=>{let s=null;""!=t.target.value&&(s="number"===a&&Dr(t.target.value)?Number(t.target.value):t.target.value),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,s)},sx:{"& .MuiInputBase-root":{height:`${t?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...t?.formProps?.style,display:e.hiddenFields.includes(n)?"none":void 0},error:null!=i.formState.errors[n],helperText:i?.formState?.errors[n]?.message?.toString()}):"date"===t?.fieldType?g(gi,{format:t?.dateFormat||ci,sx:t?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],error:null!=i.formState.errors[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"datetime"===t?.fieldType?g(Ti,{format:t?.dateFormat||pi,sx:t?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],error:null!=i.formState.errors[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"checkbox"===t?.fieldType?g(li,{label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],checkedValue:t?.checkedValue||!0,unCheckedValue:t?.unCheckedValue||!1,disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),sx:t?.formProps?.style}):"combobox"===t?.fieldType?g(di,{sx:t?.formProps?.style||{width:"100%"},label:s(),disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),onChangeCallBack:(t,a)=>{let s=null;t&&(s=t),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t,a)},options:t?.options||[],displayField:t?.optionDisplayField||"",valueField:t?.optionValueField||"",value:r[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"lookup"===t?.fieldType?g(Ai,{sx:t?.formProps?.style||{width:"100%"},label:s(),disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),onChangeCallBack:(t,a)=>{let s=null;t&&(s=t),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t,a)},lookupType:t.lookupType,value:r[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):null})}return g(T,{})},Wr=e=>{const t=Zt(),{ConfirmationWindow:i,setOpen:o}=jt({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||t.isUserAuthorized(e.authority)?f(T,{children:[g(i,{}),f(v,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?o(!0):e?.actionFn(e.record)}},children:[e?.icon?g(Re,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):g(T,{}),g("div",{children:e?.label})]})]}):g(T,{})},Gr=e=>{const{t:t}=Me();return g(T,{children:f(B,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?g(B,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?f(T,{children:[g(Re,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),g("div",{children:t(e.label)})]}):g(T,{children:t(e.label)})}):g(T,{}),e?.elements?e.elements.map(t=>"group"===t.type?g(Gr,{...t.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===t.type&&"props"===t.mode?g(qr,{fieldInfo:t.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===t.type&&"node"===t.mode?g(B,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:g(t.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?g(B,{size:{sm:12},sx:{padding:1},children:e.actions.map(t=>g(Wr,{...t,record:e.formValues}))}):g(T,{})]})})},Hr=e=>{const t=y(e=>e.AppInfo.value.apiBaseUrl),[i,o]=me(null);return fe(()=>{(()=>{let i=t+"/api/v1/attachment/";e?.attachmentId?i+="download?attachmentId="+e.attachmentId:(i+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(i+=`&category=${e.category}`)),o(i)})()},[e]),e?.showAsAvatar?g(K,{sx:e.style,onError:()=>{o(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:i}):g("img",{src:i,loading:"lazy",alt:"image",onError:()=>{o(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Yr=e=>{const{handleGetRequest:t,handleDeleteRequest:i}=Qt(),{isUserAuthorized:o}=Zt();let r=!0;e?.downloadAuthorityKey&&(r=o(e.downloadAuthorityKey));const{ConfirmationWindow:n,setOpen:a}=jt({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await i({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return f(T,{children:[g(n,{}),f(Ke,{sx:{width:300,border:"0.5px solid gray"},children:[g(nt,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?g(Hr,{attachmentId:e.id}):g(Re,{icon:"file",size:"3x"})}),f(rt,{children:[g(at,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),f(ot,{children:[e?.allowDelete?g(U,{size:"small",onClick:()=>{a(!0)},children:g(V,{title:"Delete Attachment",children:g(Re,{icon:"trash"})})}):g(T,{}),g("div",{style:{flex:1}}),r?g(U,{size:"small",onClick:async()=>{await t({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:g(V,{title:"Download Attachment",children:g(Re,{icon:"download"})})}):g(T,{})]})]})]})},Kr=e=>{const{handleUploadRequest:t,handleGetRequest:i}=Qt(),[o,r]=me(null),[n,a]=me([]),[s,l]=me(null),[d,c]=me(null),[p,u]=me([]),[h,m]=me(null),{isUserAuthorized:A}=Zt(),y=e=>e.split(".").pop()?.toLowerCase()||"";fe(()=>{(async()=>{await i({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{m(e.data)}})})()},[e.refKey,e.attachmentCode]),fe(()=>{if(u(h?.allowedFileTypes?h.allowedFileTypes.split(","):[]),h?.attachmentCategories){const e=[];for(const t of h.attachmentCategories.split(","))e.push({value:t});a(e)}else a([])},[h]);let I=!0;h?.downloadAuthorityKey&&!A(h?.downloadAuthorityKey)&&(I=!1);let _=!0;return!1===e?.enableAttachment&&(_=!1),h?.uploadAuthorityKey&&!A(h.uploadAuthorityKey)&&(_=!1),f(x,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[g(T,_?{children:null==h?.maxAllowedNumberOfFiles||h?.maxAllowedNumberOfFiles>h.refKeyAttachments.length?f(T,{children:[f("h3",{children:[g(Re,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),g("input",{type:"file",style:{margin:20},accept:h?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=y(t.name);if(p.length>0&&!p.includes(e))return void we.error(e+" is not allowed")}r(e.target.files)}}),n.length>0?g(di,{label:"Attachment Type",sx:{width:300,m:1},options:n,displayField:"value",valueField:"value",value:d,onChangeCallBack:e=>{c(e)}}):g(T,{}),g(ri,{label:"Remark",value:s,onChange:e=>l(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),g(v,{sx:{m:1},variant:"contained",onClick:async()=>{let i=h?.refKeyAttachments.length||0;if(h?.maxAllowedNumberOfFiles&&o.length+i>h.maxAllowedNumberOfFiles)we.error("Maximum number of attachments is "+h.maxAllowedNumberOfFiles);else if(!0===h?.isCategoryRequired&&n.length>0&&(null==d||void 0===d||""===d))we.error("You must selected document type to process your request");else if(o){for(const e of o)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void we.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await t({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:s,category:d},files:o,successCallBkFn:e=>{m(e.data),r(null),c(null),l(null),we.success("Your request has been process successfully")}})}else we.error("You must add files to upload")},children:"Upload"})]}):g(T,{})}:{}),I&&h?.refKeyAttachments?.length>0?f(T,{children:[f("h3",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),g(B,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:h?.refKeyAttachments.map(t=>g(B,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:g(Yr,{...t,attachmentCode:e.attachmentCode,setAttachmentConfig:m,downloadAuthorityKey:h.downloadAuthorityKey,allowDelete:_})}))})]}):g(T,{})]})},Vr=e=>{const t=y(e=>e.AppLayout),{t:i}=Me();return f(x,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"history",style:{marginRight:10,marginLeft:10}}),i("WF_ACTION_HISTORY_LABEL")]}),g(S,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,o)=>g(T,{children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[f(S,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[g(S,{sx:{marginBottom:.2},children:i.actionTime}),f(at,{children:["via ",i.actionMethod]})]}),f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[g(Hr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId+""||"0",style:{m:1,width:70,height:70}}),o!==e.actionHistory.length-1?g(S,{sx:{marginTop:11,position:"absolute"},children:"|"}):g(T,{})]}),f(S,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[f(S,{sx:{width:"100%"},children:["ltr"===t.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),g(S,{sx:{width:"100%"},children:"ltr"===t.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},zr=e=>{const{t:t}=Me(),i=Zt(),{ConfirmationWindow:o,setOpen:r}=jt({body:t(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:t("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let n=!0;if(e.authority&&(n=i.isUserAuthorized(e.authority)),n)return f(T,{children:[g(o,{}),f(v,{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 we.error(t("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?g(Re,{style:{marginRight:5,marginLeft:5},icon:e.icon}):g(T,{}),e?.label?t(e.label):g(T,{})]})]})},$r=z(e)({display:"grid",alignItems:"center"}),Qr=z(t)(({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"])})),jr=z(F)(({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"])})),Zr=e=>{const{t:p}=Me(),u=Zt(),h=!e?.templateProps?.editAction?.authority||u.isUserAuthorized(e.templateProps.editAction.authority),m=bi(e?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},e?.templateProps?.data||[],e?.templateProps?.keyColumnName||"id");return f(i,{children:[h&&"none"!=e?.templateProps?.editMode?.editMode?f(v,{onClick:e?.handleCreateNewRecord,children:[g(Re,{icon:"add",style:{marginRight:5,marginLeft:5}}),p("ADD_BTN_LABEL")]}):g(T,{}),e?.templateProps?.rowActions?e.templateProps.rowActions.map((t,i)=>!0===t?.gridActionProps?.multiRecord?ge(zr,{...t,key:i,reloadData:async()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:m.selectedRecordIds,recordsToProcessActionOn:m.selectedRecords}):null):g(T,{}),g(S,{sx:{flex:1,mx:.5,my:.5,padding:1},children:e?.templateProps?.tBar}),g(V,{title:"Columns",children:g(o,{render:g(t,{}),children:g(r,{fontSize:"small"})})}),g(V,{title:"Filters",children:g(n,{render:(e,i)=>g(t,{...e,color:"default",children:g($,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:g(a,{fontSize:"small"})})})})}),e?.templateProps?.gridStateKey?g(V,{title:p("RESET_GRID_STATE"),children:g(U,{onClick:e?.clearGridState,children:g(Re,{icon:"eraser"})})}):g(T,{}),g(Q,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),g(V,{title:p("EXPORT_EXECL_LABEL"),children:g(s,{render:g(j,{}),children:g(Re,{icon:"file-excel",color:"green"})})}),f($r,{children:[g(l,{render:(e,t)=>g(V,{title:p("SEARCH_BTN_LABEL"),enterDelay:0,children:g(Qr,{...e,ownerState:{expanded:t.expanded},color:"default","aria-disabled":t.expanded,children:g(Re,{icon:"search"})})})}),g(d,{render:({ref:e,...t},i)=>g(jr,{...t,ownerState:{expanded:i.expanded},inputRef:e,"aria-label":"Search",placeholder:`${p("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:g(Z,{position:"start",children:g(Re,{icon:"search"})}),endAdornment:i.value?g(Z,{position:"end",children:g(c,{edge:"end",size:"small","aria-label":"Clear search",children:g(Re,{icon:"xmark"})})}):null,...t.slotProps?.input},...t.slotProps}})})]}),g(U,{onClick:()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},children:g(Re,{icon:"refresh"})})]})},Jr=e=>{const{t:t}=Me(),i=Zt(),{ConfirmationWindow:o,setOpen:r}=jt({body:t(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:t("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.record)),e?.reloadData&&e.reloadData()}});let n=!0;e.authority&&(n=i.isUserAuthorized(e.authority));let a={};e?.getActionIconStyleForRecord&&(a=e.getActionIconStyleForRecord(e.record));let s=!0;e?.isActionVisibleForRecord&&(s=e?.isActionVisibleForRecord(e.record));let l=!1;if(e?.isActionDisabledForRecord&&(l=e.isActionDisabledForRecord(e.record)),n&&s)return f(T,{children:[g(o,{}),g(p,{disabled:l,icon:g(V,{title:e?.label?t(e.label):"",children:g(Re,{icon:e.icon,style:{...a,color:l?"gray":null!=a?.color?a.color:void 0}})}),showInMenu:e?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!l){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?r(!0):(await e.actionFn(e.record),!0===e?.gridActionProps?.reloadGridAfterAction&&e?.reloadData&&e.reloadData())}}})]})};let Xr=-1;const en=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},tn=(e,t)=>{const i=en(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},on=["__check__","actions"],rn=e=>{const{t:t}=Me(),i=y(e=>e.AppLayout),[o,r]=me({}),[n,a]=me(!0),{getLookupOptions:s}=(()=>{const{handleGetRequest:e}=Qt(),t=y(e=>e.AppLayout),i=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 o=await i(e.lookupType);return{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:i}})(),{Window:l,setWindowState:d}=Jt({windowTitle:t(e.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),{Window:c,setWindowState:A}=Jt({windowTitle:t(e.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),[I,_]=me([]),E=Ci(e.formElements),O=[],C=he.useMemo(()=>e?.gridStateKey?en(e.gridStateKey):{},[]);for(const e of E)!0===e?.gridProps?.hidden&&O.push(e.fieldName);let N={};if(C?.columnVisibilityModel){N=C.columnVisibilityModel;const e=Object.keys(N);for(const t of O)e.includes(t)||(N[t]=!1)}else for(const e of O)N[e]=!1;const R=y(e=>e.AppLayout.appDirection),[b,P]=he.useState(N),[w,v]=he.useState(C.columnOrder||[]),[L,M]=he.useState(C.columnWidths||{}),[D,x]=me(C.columnGroupingModel||[]);let F=C?.pinnedColumns?.left||[];F=F.filter(e=>!on.includes(e));let B=C?.pinnedColumns?.right||[]||[];B=B.filter(e=>!on.includes(e));const[q,W]=me({left:[..."ltr"===R?on:[],...F],right:[..."rtl"===R?on:[],...B]}),G=Zt(),H=Ue(),[Y,K]=me(null),[z,$]=me(null),[j,Z]=me({}),te=async()=>{let o=Ni(E,"row"===e?.editMode?.editMode||!1,t);for(let e of o)e?.lookupType&&(e.displayField="ltr"===i.appDirection?"lookupEnDisplay":"lookupArDisplay",e.options=await s(e.lookupType),e.valueField="lookupValue");_(o)},[ie,oe]=me({ids:new Set,type:"include"});let re="id";e?.keyColumnName&&(re=e?.keyColumnName);const ne=e.setData;let ae=null;ae=e?.validationSchema?e.validationSchema:He.object(Ri(E));let se=!0;e?.editAction?.authority&&(se=G.isUserAuthorized(e.editAction.authority));let le=!0;e?.deleteAction?.authority&&(le=G.isUserAuthorized(e.deleteAction.authority));const{ConfirmationWindow:de,setOpen:ce}=jt({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let t=!0;Y&&!0===Y?.isNew||(t=await e.apiActions.deleteRecordById(Y[re])),t&&(e?.deleteAction?.postActionCallBack&&await e.deleteAction.postActionCallBack(Y),ne(e=>e.filter(e=>e[re]!=Y[re])))}});let pe,ue,ge,Te,Ae,ye;"modal"===e?.editMode?.editMode&&(pe=e?.editMode?.specs?.modalHeight||"fit-content",ue=e?.editMode?.specs?.modalWidth||"300",ge=e?.editMode?.specs?.modalMinHeight,Te=e?.editMode?.specs?.modalMinWidth,Ae=e?.editMode?.specs?.modalIcon||"window",ye=e?.editMode?.specs?.modalTitle||"Record Form");const{Window:Ie,setWindowState:_e}=Jt({height:pe,minHeight:ge,minWidth:Te,onCloseCallBack:()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)},width:ue,windowIcon:Ae,windowTitle:ye}),Ee={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(e?.rowActions?30*e.rowActions.length:0)+(e?.editAction&&e?.editAction?.isEnabled?30:0)+(e?.deleteAction&&e?.deleteAction?.isEnabled?30:0)+(e?.attachment?30:0)+(e?.workFlowDocumentCode?30:0),getActions:i=>{const o=i.row,n=[];if("none"!=e?.editMode?.editMode&&(void 0===e?.disableDefaultAction||!e.disableDefaultAction)){const i=j[o[re]]?.mode===m.Edit;if("row"===e.editMode.editMode&&i)se&&(n.push(g(p,{icon:g(Re,{icon:"save"}),label:t("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const t=e[re];Z({...j,[t]:{mode:m.View}})})(o)}})),n.push(g(p,{icon:g(Re,{icon:"cancel"}),label:t("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const t=e[re];t&&Mr(t)&&t<0?(Z({...j,[t]:{mode:m.View,ignoreModifications:!0}}),ne(e=>{const i=e.filter(e=>e[re]!=t);return i})):Z({...j,[t]:{mode:m.View,ignoreModifications:!0}})})(o)},color:"inherit"})));else{if(e?.editAction&&!0===e?.editAction?.isEnabled){let i=!0;e?.editAction?.isActionVisibleForRecord&&(i=e?.editAction?.isActionVisibleForRecord(o));let r=!1;e?.editAction?.isActionDisabledForRecord&&(r=e?.editAction?.isActionDisabledForRecord(o)),se&&i&&n.push(g(p,{disabled:r,icon:g(V,{title:t("EDIT_BTN_LABEL"),children:g(Re,{icon:"edit",style:{color:r?"gray":void 0}})}),showInMenu:e?.editAction?.gridActionProps?.showInMenu||!1,label:t("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{se&&!r&&(async t=>{if(t)if($(t),"form"===e.editMode.editMode)H(e.editMode.specs.formRoute+"/"+t[re]);else if("modal"===e.editMode.editMode)_e(!0);else if("row"===e?.editMode?.editMode){const e=t[re];Z({...j,[e]:{mode:m.Edit}})}})(o)}}))}if(e?.deleteAction&&!0===e?.deleteAction?.isEnabled){let i=!0;e?.deleteAction?.isActionVisibleForRecord&&(i=e?.deleteAction?.isActionVisibleForRecord(o));let r=!1;e?.deleteAction?.isActionDisabledForRecord&&(r=e?.deleteAction?.isActionDisabledForRecord(o)),le&&i&&n.push(g(p,{disabled:r,icon:g(V,{title:t("DELETE_BTN_LABEL"),children:g(Re,{icon:"trash",style:{color:r?"gray":void 0}})}),showInMenu:e?.deleteAction?.gridActionProps?.showInMenu||!1,label:t("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(le&&!r){if(e?.deleteAction?.preActionValidation&&!e.deleteAction.preActionValidation(o))return;K(o),ce(!0)}}}))}}}if(o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.attachment&&n?.push(g(p,{icon:g(V,{title:"Attachments",children:g(Re,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{r(o),a(!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(o)),d(!0)}})),o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.workFlowDocumentCode&&n?.push(g(p,{icon:g(V,{title:"Approvals",children:g(Re,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{r(o),A(!0)}})),o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.rowActions)for(const t of e.rowActions)t?.gridActionProps?.multiRecord&&!0===t?.gridActionProps?.multiRecord||n.push(g(Jr,{...t,record:o,reloadData:async()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)}}));return n}};let Oe=[];(void 0===e?.disableDefaultAction||!e.disableDefaultAction||e?.rowActions&&e?.rowActions.length>0)&&Oe.push(Ee),Oe=[...Oe,...I];fe(()=>{void 0!==e?.autoLoad&&!0!==e.autoLoad||e.apiActions.reloadData(e?.gridLoadParametersValues),te()},[]),fe(()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)},[G.UserInfo?.currentOrganization]),fe(()=>{te()},[R,e.formElements]);const Ce=he.useMemo(()=>{const e=Oe.map(e=>({...e}));if(w.length){const t=new Map(e.map(e=>[e.field,e]));return w.map(e=>t.get(e)).filter(Boolean)}return e},[w,L,Oe]);return f(T,{children:[g(de,{}),"modal"===e?.editMode?.editMode?g(Ie,{children:e?.editMode?.specs?.formComponent?g(e.editMode.specs.formComponent,{recordIdToEdit:z?z[re]:void 0,formCloseCallBk:()=>{_e(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)}}):g(cn,{keyColumnName:e.keyColumnName,attachment:e.attachment,formValuesChangeCallBk:e?.formProps?.formValuesChangeCallBk,recordIdToEdit:z?z[re]:void 0,formCloseCallBk:()=>{_e(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)},elements:e.formElements,apiActions:e.apiActions,editAuthorityKey:e?.editAction?.authority,formSavedSuccessfullyCallBk:e?.editAction?.postActionCallBack,preSaveValidation:e?.editAction?.preActionValidation,actions:e?.rowActions})}):g(T,{}),void 0!==e?.hideInfoBar||e?.hideInfoBar?g(T,{}):f(S,{sx:{display:"flex"},children:[void 0!==e?.hideBackButton||e?.hideBackButton?g(T,{}):g(U,{onClick:()=>{H(-1,{replace:!0})},children:g(Re,{icon:"ltr"===R?"arrow-left":"arrow-right"})}),f(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[e?.girdIcon?g(Re,{icon:e.girdIcon,style:{marginRight:5,marginLeft:5}}):g(T,{}),g(k,{variant:"h5",children:e?.gridTitle?kr(t(e?.gridTitle)):""})]})]}),e?.gridLoadParameters&&e?.gridLoadParameters.length>0&&e?.gridLoadParametersValues&&e?.setGridLoadParametersValues?f(J,{defaultExpanded:!0,sx:{width:"100%"},children:[g(X,{expandIcon:g(u,{}),children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(Re,{style:{marginLeft:5,marginRight:5},icon:"search"}),g(k,{component:"span",children:"Filters"})]})}),g(ee,{children:g(S,{children:g(cn,{saveButtonSpecs:{label:t("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:t("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{null!=t?e.setGridLoadParametersValues(t):e.setGridLoadParametersValues({}),e.apiActions.reloadData(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:e.gridLoadParameters})})})]}):g(T,{}),e?.attachment?g(l,{children:g(Kr,{attachmentCode:e.attachment.attachmentCode,refKey:o[e?.keyColumnName||"id"],enableAttachment:n})}):g(T,{}),e?.workFlowDocumentCode?g(c,{children:g(dn,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:o[e?.keyColumnName||"id"],postActionCallBk:()=>{A(!1),e.apiActions.reloadData(e.gridLoadParametersValues)},cancelActionCallBk:()=>{A(!1),e.apiActions.reloadData(e.gridLoadParametersValues)}})}):g(T,{}),g(h,{...e?.muiProps,slots:{toolbar:Zr},slotProps:{toolbar:{templateProps:{...e,rowSelectionModel:ie,data:e?.data},handleCreateNewRecord:()=>{if("form"===e?.editMode?.editMode)H(e.editMode.specs.formRoute);else if("modal"===e?.editMode?.editMode)$(null),_e(!0);else if("row"===e?.editMode?.editMode){Xr-=1;const e={};e[re]=Xr,e.isNew=!0;for(const t of I)"actions"!=t?.type&&t?.field!=re&&t?.field&&(e[t.field]=null);ne(t=>[e,...t]),Z(e=>({...e,[Xr]:{mode:m.Edit}}))}},clearGridState:()=>{e?.gridStateKey&&localStorage.removeItem(e.gridStateKey),P({}),v([]),M({}),x([]),W({left:[..."ltr"===R?on:[]],right:[..."rtl"===R?on:[]]})}}},getRowId:e=>e[re],showToolbar:!0,rows:e?.data,columns:Ce,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==e.editMode.editMode?j:void 0,onRowModesModelChange:"row"==e.editMode.editMode?e=>{Z(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async t=>{if("row"===e.editMode.editMode){let i=null;const o=(e=>{try{ae.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof He.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(t);if(o){const e=o.split(",");throw we.error(g("div",{style:{},children:e.map(e=>f(T,{children:[g("div",{children:e}),g(Q,{})]}))})),new Error(o)}if(e?.editAction?.preActionValidation&&!e.editAction.preActionValidation(t))throw new Error("error on the configured presave validation");const r={...t};if(t[re]&&Mr(t[re])&&Number(t[re])<0&&(r[re]=null),i=await e.apiActions.saveRecord(r),null==i)throw new Error("Failed to process your request, contact your administrator");return e?.editAction?.postActionCallBack&&await e.editAction.postActionCallBack(t),!0===t?.isNew&&ne(e=>{const o=e.filter(e=>e[re]!==t[re]);return[i,...o]}),!0===e?.editMode?.reloadAfterSave&&e?.apiActions?.reloadData&&e?.apiActions?.reloadData(e?.gridLoadParametersValues),i}},rowSelectionModel:ie,onRowSelectionModelChange:e=>{oe(e)},columnVisibilityModel:b,onColumnVisibilityModelChange:t=>{P(t),e?.gridStateKey&&tn(e.gridStateKey,{columnVisibilityModel:t})},onColumnOrderChange:t=>{const{column:i,targetIndex:o}=t;v(t=>{const r=t.length?[...t]:Oe.map(e=>e.field),n=r.indexOf(i.field);return-1===n||(r.splice(n,1),r.splice(o,0,i.field),e?.gridStateKey&&tn(e.gridStateKey,{columnOrder:r})),r})},rowGroupingModel:D,onRowGroupingModelChange:t=>{(t=>{x(t),e?.gridStateKey&&tn(e.gridStateKey,{columnGroupingModel:t})})(t)},sx:{width:"100%"}})]})},nn=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},an=e=>{const[t,i]=me([]);return fe(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));i(t)},[e.reportData]),g(rn,{data:t,disableDefaultAction:!0,setData:e.setReportData,formElements:nn(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()=>{}}})},sn=e=>{console.log("useParameterPanel","useParameterPanel called");const[t,i]=me({...e?.initialParameterValues}),o=((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,t);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:r}=Me();return f(J,{defaultExpanded:!0,sx:{width:"100%"},children:[g(X,{expandIcon:g(Re,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(Re,{style:{marginLeft:5,marginRight:5},icon:"search"}),g(k,{component:"span",children:"Filters"})]})}),g(ee,{children:g(S,{children:g(cn,{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)=>{i({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async o=>{i(null!=o?o:{}),e&&await e(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o})})})]})},parametersValues:t,setParametersValues:i,panelElements:o}},ln=e=>{const[t,i]=me(null),[o,r]=me(null),[n,a]=me([]),[s,l]=me("WAITING_REPORT_CODE"),{handleGetRequest:d,handlePostRequest:c,HandleDownloadHTTPPostPDF:p}=Qt(),[u,h]=me(null),{ParameterPanel:m,parametersValues:A,panelElements:y,setParametersValues:I}=sn({parameters:u?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}}),_=async t=>{l("WAITING_RESULT"),"Excel"===u?.reportType?await c({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{l("SHOWING_RESULT"),a(e.data)}}):u?.reportType&&await p({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{l("SHOWING_RESULT");const t=e.headers["content-disposition"];let o="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(o=e[1])}if(o.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),o=URL.createObjectURL(t);i(o)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),i=window.URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=o,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(i)}},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),l("ERROR")}})};return fe(()=>{e?.reportCode&&(async()=>{l("LOADING_METADATA"),await d({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:t=>{h(t.data),!0===e?.byPassParameterEntry||0==t.data.reportParameters.length?(_(A),l("WAITING_RESULT")):l("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),l("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[f(S,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[g(Re,{icon:"Excel"===u?.reportType?"file-excel":"file-pdf",color:"Excel"===u?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),u?.reportName]}),"Excel"!=u?.reportType&&"SHOWING_RESULT"===s?f(T,{children:[!0===e?.byPassParameterEntry?g(T,{}):u?.reportParameters.length>0?g(U,{onClick:()=>{l("WAITING_PARAMETER_INPUT")},children:g(Re,{icon:"filter"})}):g(T,{}),g(U,{children:g(Re,{icon:"refresh",onClick:()=>{_(A)}})})]}):g(T,{})]}),g(S,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===s&&"Excel"!=u?.reportType?g(m,{searchBtnClickCallBk:_}):"SHOWING_RESULT"===s||("WAITING_PARAMETER_INPUT"===s||"WAITING_RESULT"===s)&&"Excel"===u?.reportType?"Excel"===u?.reportType?g(an,{reportData:n,setReportData:a,reloadReport:async()=>{_(A)},gridLoadParameters:y,gridLoadParametersValues:A,setGridLoadParametersValues:I}):g("iframe",{src:t,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===s?f(S,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[g(Re,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),o]}):g(T,{})})]})},dn=e=>{const t=Ue(),i=y(e=>e.AppLayout),{isUserAuthorized:o,UserInfo:r}=Zt(),{handleGetRequest:n,handlePostRequest:a}=Qt(),[s,l]=me(null),[d,c]=me([]),{t:p}=Me(),[u,h]=me(null),[m,A]=me({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:I,setWindowState:_}=Jt({windowTitle:"ltr"===i.appDirection?m?.workflowDocument&&m?.referencedDocument?`${m?.workflowDocument?.documentEnName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:"Document":m?.workflowDocument&&m?.referencedDocument?`${m?.workflowDocument?.documentArName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),E=async()=>{await n({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{A(e.data)},failureCallBkFn:()=>{A({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},O=async()=>{await a({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:m?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:s.id,refDocumentStatus:m?.workflowDocumentStatus?.documentStatusCode,actionComment:u},successCallBkFn:async t=>{s?.post_action_endpoint?await a({endPointURI:s.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:s.id},successCallBkFn:()=>{E(),e?.postActionCallBk&&e.postActionCallBk()}}):E()}})};return fe(()=>{e.refDocumentId&&e.workFlowDocumentCode&&E()},[e.refDocumentId,e.workFlowDocumentCode]),fe(()=>{c(m?.nextActions&&m?.nextActions?.length>0?m.nextActions.filter(e=>{if(!m?.workflowDocumentStatus?.nextActionTakersAuthority&&!m?.nextActionTakers)return!0;if(m?.workflowDocumentStatus?.nextActionTakersAuthority&&o(m.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(m?.nextActionTakers)for(const e of m.nextActionTakers)if(r?.username===e?.username||r?.username===e?.USERNAME)return!0;return!1}):[])},[m.nextActions,m.nextActionTakers]),f(T,{children:[m?.workflowDocumentReport?.id?g(I,{children:g(ln,{reportCode:m?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):g(T,{}),m?.workflowDocument?f(S,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(U,{onClick:()=>{t(-1,{replace:!0})},children:g(Re,{icon:"arrow-left"})}),g(S,{sx:{flex:1}}),g(Re,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===i.appDirection?`${m?.workflowDocument?.documentEnName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:`${m?.workflowDocument?.documentArName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`,m?.workflowDocumentStatus?"ltr"===i.appDirection?` ( ${m?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${m?.workflowDocumentStatus?.documentStatusArName} )`:"",g(S,{sx:{flex:1}}),m?.workflowDocumentReport?.id?g(v,{onClick:()=>{_(!0)},variant:"outlined",startIcon:g(Re,{icon:"eye"}),children:p("VIEW_LABEL")}):g(T,{})]}):g(T,{}),f(S,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[d?.length>0?f(x,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[g(di,{sx:{marginBottom:2,width:400},label:p("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===i.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:s?.id,options:d,onChangeCallBack:(e,t)=>{l(t)}}),g(ri,{sx:{width:400},rows:3,value:u,onChange:e=>{h(e.target.value)},multiline:!0,label:p("WF_COMMENT_LABEL")}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(v,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=s&&null!=s?.id?!0!==s.require_comment&&1!==s.require_comment&&"true"!==s.require_comment||null!==u&&""!==u?s?.pre_action_endpoint?await a({endPointURI:s.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:s.id},successCallBkFn:()=>{O()}}):O():we.error("You must enter comment for the action to be processed"):we.error("You must select action to process")},children:p("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?g(v,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:p("WF_CANCEL_BTN_LABEL")}):g(T,{})]}),m?.nextActionTakers&&m.nextActionTakers.length>0?f(T,{children:[g(Q,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",p("WF_WAITING_FOR_LABEL")]})}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:m.nextActionTakers.map(e=>f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[g(Hr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),f(S,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[g("div",{children:"ltr"===i.appDirection?e?.employee_en_name:e?.employee_ar_name}),g("div",{children:e?.email?f(T,{children:[g(Re,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):g(T,{})}),g("div",{children:e?.mobile_number?f(T,{children:[g(Re,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):g(T,{})})]})]}))})]}):g(T,{})]}):g(T,{}),m?.actionsHistory.length>0?g(Vr,{actionHistory:m.actionsHistory}):f(x,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"history",style:{marginRight:10,marginLeft:10}}),p("WF_ACTION_HISTORY_LABEL")]}),g(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},cn=e=>{const{Window:t,setWindowState:i}=Jt({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:o,setWindowState:r}=Jt({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[n,a]=me(!0),{t:s}=Me(),l=Ci(e.elements),[d,c]=me([]),[p,u]=me([]),h={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(h[t.props.fieldName]=t.props.defaultValue);let m=null;m=e?.validationSchema?e.validationSchema:Ge.object(Ri(l));const A=ke({resolver:We(m),defaultValues:h}),y=A.watch(),I=xe(),_=e?.formRouteRecordIdParamName,E=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:_&&I[_]&&(t=I[_]),t){const i=await e.apiActions.loadRecordById(t);if(i){A.reset({...i}),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk({...i},O,A);for(const e of l)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?A.setValue(e.fieldName,i[e.fieldName]+""):A.setValue(e.fieldName,i[e.fieldName]))}}else A.reset({})},O={setFieldValue:(e,t)=>{A.setValue(e,t)},hideField:e=>{u(t=>[...t,e])},showField:e=>{u(t=>t.filter(t=>t!==e))},disableField:e=>{c(t=>[...t,e])},enableField:e=>{c(t=>t.filter(t=>t!==e))}};return fe(()=>{const e=[],t=[];for(const i of l)i?.hidden&&e.push(i.fieldName),i?.disabled&&t.push(i.fieldName);u(e),c(t)},[e.elements]),fe(()=>{E()},[e?.recordIdToEdit]),fe(()=>{a(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(y))},[y]),f(T,{children:[e?.attachment?g(t,{children:g(Kr,{attachmentCode:e.attachment.attachmentCode,refKey:y[e?.keyColumnName||"id"],enableAttachment:n})}):g(T,{}),e?.workFlowDocumentCode?g(o,{children:g(dn,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:y[e?.keyColumnName||"id"],postActionCallBk:()=>{r(!1),E()},cancelActionCallBk:()=>{r(!1)}})}):g(T,{}),g(Lr,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:g(B,{sx:{width:"100%"},container:!0,children:e.elements.map((t,i)=>"group"===t.type?g(Gr,{...t.props,formManager:A,formValues:y,formActions:O,hiddenFields:p,disabledFields:d},i):"field"===t.type&&"props"===t.mode?g(qr,{fieldInfo:t.props,formManager:A,formValues:y,formActions:O,hiddenFields:p,disabledFields:d,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===t.type&&"node"===t.mode?g(B,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:g(t.node,{formManager:A,formValues:y})},i):void 0)})}),f(Lr,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[y[e?.keyColumnName||"id"]&&e?.attachment?g(V,{title:"Attachments",children:g(U,{onClick:()=>{i(!0)},children:g(Re,{icon:"paperclip"})})}):null,y[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?g(V,{title:"Approvals",children:g(U,{onClick:()=>{r(!0)},children:g(Re,{icon:"stamp"})})}):null,e?.actions?e.actions.map(t=>!1===t?.isIdRequired?g(Wr,{...t,record:y}):y[e?.keyColumnName||"id"]?!0===t?.formActionProps?.enabled?g(Wr,{...t,record:y}):g(T,{}):void 0):g(T,{}),g("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?g(T,{}):g(v,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?g(Re,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:A.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(A.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{we.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:s(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?g(T,{}):g(v,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?g(Re,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),A.reset(h)},children:s(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},pn=()=>{const{workflowDocumentCode:e,refDocumentId:t}=xe();return g(dn,{workFlowDocumentCode:e,refDocumentId:t})},un=e=>g(st,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),hn=e=>f(x,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[g(S,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:g("div",{children:e.record[e.valueField]})}),g(k,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),mn=e=>f(T,{children:[g(k,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),g(lt,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),fn=e=>g(dt,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function gn(e){return f(pt,{sx:{display:"flex",alignItems:"center"},children:[g(pt,{sx:{width:"100%",mr:1},children:g(ct,{variant:"determinate",...e})}),g(pt,{sx:{minWidth:35},children:g(at,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Tn=e=>f(pt,{sx:{width:"100%"},children:[g(at,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),g(gn,{value:e.record[e.valueField]/e.total*100})]}),An=e=>{const t=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return g(ut,{series:[{data:t}]})},yn=e=>{const[t,i]=me(!0),[o,r]=me([]),{handleGetRequest:n}=Qt();fe(()=>{e.loadWidget?(async()=>{i(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{i(!1),r(e.data)},failureCallBkFn:()=>{i(!1),r([])}})})():i(!1)},[e.loadWidget,e.loadCounter]);let a=0;if(1==o.length)a=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of o)a+=t[e.verticalAxisField];return f(T,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?f(S,{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):g(T,{}),g(S,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:t?f(T,{children:[g(Re,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),g("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?g(un,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?g(fn,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?g(An,{data:o,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):f(B,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[g(B,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),o.map((t,i)=>"Card"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(hn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},i)}):"CircularProgress"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(mn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:a},i)}):"LinearProgress"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(Tn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:a},i)}):void 0)]})})]})},In=e=>{const[t,i]=me({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:o,parametersValues:r}=sn({parameters:t?.dashboardParameters||[],initialParameterValues:{}}),[n,a]=me(0),[s,l]=me(!1);fe(()=>{if(null!=t.dashboardCode&&null!=t.dashboardCode&&""!=t.dashboardCode){l(!1);let e=!0;if(t?.dashboardParameters.length>0)for(const i of t?.dashboardParameters)if(!0===i?.mandatory&&(void 0===r[i.parameterCode]||null===r[i.parameterCode]||""===r[i.parameterCode])){e=!1;break}e&&l(e),a(n+1)}},[t?.dashboardParameters,r]);const d=Ue(),{handleGetRequest:c,handlePostRequest:p}=Qt();return fe(()=>{e.dashboardCode&&(async()=>{await c({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{i(e.data)},failureCallBkFn:()=>{i(null)}})})()},[e.dashboardCode,e.parameters]),g(T,{children:t?f(T,{children:[f(S,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(U,{onClick:()=>{d(-1,{replace:!0})},children:g(Re,{icon:"arrow-left"})}),g(S,{sx:{flex:1}}),g(Re,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),g(S,{children:t?.dashboardTitle}),g(S,{sx:{flex:1}})]}),t?.dashboardParameters.length>0?g(o,{searchBtnClickCallBk:async e=>{a(n+1)}}):g(T,{}),g(B,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:t?.widgets.map((e,t)=>g(B,{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:g(yn,{...e,parameterValues:r,loadWidget:s})},t))})]}):g(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},_n=()=>{const{dashboardCode:e}=xe();return g(In,{dashboardCode:e})},En=e=>{const{UserSession:t}=Zt(),i=y(e=>e.AppLayout),o=A(),{handlePostRequest:r}=Qt(),[n,a]=me(t.value.currentOrganization.id);return f(S,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[g(di,{sx:{width:"100%"},displayField:"ltr"===i.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:t.value.userOrganizations,value:n,onChangeCallBack:e=>{a(e)}}),g(v,{sx:{m:1},variant:"contained",disabled:null==n||n===t.value.currentOrganization.id,onClick:async()=>{await r({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:t.value.username,orgId:n},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};o(zt.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},On=be({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Cn,setSideBarState:Nn}=On.actions;var Rn=On.reducer;function bn(e,t){const i=Te(e);fe(()=>{i.current=e},[e]),fe(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const Pn=te`
|
|
31
|
+
function(e,t){const i=St(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})(_r),a=ue.forwardRef(function(e,a){const s=function(e=Cr){return Or(e)}(i),{className:l,component:d="div",...c}=Nr(e);return g(n,{as:d,ref:a,className:wr(l,r?r(o):o),theme:t&&s[t]||s,...c})});return a}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=vr[t];return o?`${i}-${o}`:`${br.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:br.generate});function Sr(e){return/^\d+$/.test(e)}function Mr(e){return"number"==typeof e&&!isNaN(e)}function Dr(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function kr(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Ur(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function xr(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&&(Lr.propTypes={children:ro.node,component:ro.elementType,sx:ro.oneOfType([ro.arrayOf(ro.oneOfType([ro.func,ro.object,ro.bool])),ro.func,ro.object])});const Fr=(e,t)=>t?it(e).format(t):it(e).format(ci),Br=(e,t)=>t?it(e,t).toDate():it(e,ci).toDate(),qr=e=>{if(e?.fieldInfo){const t=e.fieldInfo,i=e?.formManager||null,o=e?.formActions||null,r=e?.formValues||null,n=e?.fieldInfo?.fieldName||null,a=e?.fieldInfo?.fieldType||null;if(!(t&&i&&r&&n&&a))return g(T,{});const s=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(r):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(n)?g(T,{}):g(B,{size:t?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===a||"number"===a?g(ri,{...t.muiTextFieldProps,fullWidth:!0,type:a,disabled:e.disabledFields.includes(n),label:s(),value:r[n],onChange:t=>{let s=null;""!=t.target.value&&(s="number"===a&&Dr(t.target.value)?Number(t.target.value):t.target.value),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,s)},sx:{"& .MuiInputBase-root":{height:`${t?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...t?.formProps?.style,display:e.hiddenFields.includes(n)?"none":void 0},error:null!=i.formState.errors[n],helperText:i?.formState?.errors[n]?.message?.toString()}):"date"===t?.fieldType?g(gi,{format:t?.dateFormat||ci,sx:t?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],error:null!=i.formState.errors[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"datetime"===t?.fieldType?g(Ti,{format:t?.dateFormat||pi,sx:t?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],error:null!=i.formState.errors[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"checkbox"===t?.fieldType?g(li,{label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],checkedValue:t?.checkedValue||!0,unCheckedValue:t?.unCheckedValue||!1,disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),sx:t?.formProps?.style}):"combobox"===t?.fieldType?g(di,{sx:t?.formProps?.style||{width:"100%"},label:s(),commonStoreKey:t?.commonStoreKey,dataQueryId:t?.dataQueryId,storeUrl:t?.storeUrl,storeLoadParam:t?.storeLoadParam,disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),onChangeCallBack:(t,a)=>{let s=null;t&&(s=t),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t,a)},options:t?.options||[],displayField:t?.optionDisplayField||"",valueField:t?.optionValueField||"",value:r[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"lookup"===t?.fieldType?g(Ai,{sx:t?.formProps?.style||{width:"100%"},label:s(),disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),onChangeCallBack:(t,a)=>{let s=null;t&&(s=t),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t,a)},lookupType:t.lookupType,value:r[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):null})}return g(T,{})},Wr=e=>{const t=Zt(),{ConfirmationWindow:i,setOpen:o}=jt({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||t.isUserAuthorized(e.authority)?f(T,{children:[g(i,{}),f(v,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?o(!0):e?.actionFn(e.record)}},children:[e?.icon?g(Re,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):g(T,{}),g("div",{children:e?.label})]})]}):g(T,{})},Gr=e=>{const{t:t}=Me();return g(T,{children:f(B,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?g(B,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?f(T,{children:[g(Re,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),g("div",{children:t(e.label)})]}):g(T,{children:t(e.label)})}):g(T,{}),e?.elements?e.elements.map(t=>"group"===t.type?g(Gr,{...t.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===t.type&&"props"===t.mode?g(qr,{fieldInfo:t.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===t.type&&"node"===t.mode?g(B,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:g(t.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?g(B,{size:{sm:12},sx:{padding:1},children:e.actions.map(t=>g(Wr,{...t,record:e.formValues}))}):g(T,{})]})})},Hr=e=>{const t=y(e=>e.AppInfo.value.apiBaseUrl),[i,o]=me(null);return fe(()=>{(()=>{let i=t+"/api/v1/attachment/";e?.attachmentId?i+="download?attachmentId="+e.attachmentId:(i+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(i+=`&category=${e.category}`)),o(i)})()},[e]),e?.showAsAvatar?g(K,{sx:e.style,onError:()=>{o(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:i}):g("img",{src:i,loading:"lazy",alt:"image",onError:()=>{o(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Yr=e=>{const{handleGetRequest:t,handleDeleteRequest:i}=$t(),{isUserAuthorized:o}=Zt();let r=!0;e?.downloadAuthorityKey&&(r=o(e.downloadAuthorityKey));const{ConfirmationWindow:n,setOpen:a}=jt({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await i({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return f(T,{children:[g(n,{}),f(Ke,{sx:{width:300,border:"0.5px solid gray"},children:[g(nt,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?g(Hr,{attachmentId:e.id}):g(Re,{icon:"file",size:"3x"})}),f(rt,{children:[g(at,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),f(ot,{children:[e?.allowDelete?g(U,{size:"small",onClick:()=>{a(!0)},children:g(V,{title:"Delete Attachment",children:g(Re,{icon:"trash"})})}):g(T,{}),g("div",{style:{flex:1}}),r?g(U,{size:"small",onClick:async()=>{await t({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:g(V,{title:"Download Attachment",children:g(Re,{icon:"download"})})}):g(T,{})]})]})]})},Kr=e=>{const{handleUploadRequest:t,handleGetRequest:i}=$t(),[o,r]=me(null),[n,a]=me([]),[s,l]=me(null),[d,c]=me(null),[p,u]=me([]),[h,m]=me(null),{isUserAuthorized:A}=Zt(),y=e=>e.split(".").pop()?.toLowerCase()||"";fe(()=>{(async()=>{await i({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{m(e.data)}})})()},[e.refKey,e.attachmentCode]),fe(()=>{if(u(h?.allowedFileTypes?h.allowedFileTypes.split(","):[]),h?.attachmentCategories){const e=[];for(const t of h.attachmentCategories.split(","))e.push({value:t});a(e)}else a([])},[h]);let I=!0;h?.downloadAuthorityKey&&!A(h?.downloadAuthorityKey)&&(I=!1);let _=!0;return!1===e?.enableAttachment&&(_=!1),h?.uploadAuthorityKey&&!A(h.uploadAuthorityKey)&&(_=!1),f(x,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[g(T,_?{children:null==h?.maxAllowedNumberOfFiles||h?.maxAllowedNumberOfFiles>h.refKeyAttachments.length?f(T,{children:[f("h3",{children:[g(Re,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),g("input",{type:"file",style:{margin:20},accept:h?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=y(t.name);if(p.length>0&&!p.includes(e))return void we.error(e+" is not allowed")}r(e.target.files)}}),n.length>0?g(di,{label:"Attachment Type",sx:{width:300,m:1},options:n,displayField:"value",valueField:"value",value:d,onChangeCallBack:e=>{c(e)}}):g(T,{}),g(ri,{label:"Remark",value:s,onChange:e=>l(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),g(v,{sx:{m:1},variant:"contained",onClick:async()=>{let i=h?.refKeyAttachments.length||0;if(h?.maxAllowedNumberOfFiles&&o.length+i>h.maxAllowedNumberOfFiles)we.error("Maximum number of attachments is "+h.maxAllowedNumberOfFiles);else if(!0===h?.isCategoryRequired&&n.length>0&&(null==d||void 0===d||""===d))we.error("You must selected document type to process your request");else if(o){for(const e of o)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void we.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await t({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:s,category:d},files:o,successCallBkFn:e=>{m(e.data),r(null),c(null),l(null),we.success("Your request has been process successfully")}})}else we.error("You must add files to upload")},children:"Upload"})]}):g(T,{})}:{}),I&&h?.refKeyAttachments?.length>0?f(T,{children:[f("h3",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),g(B,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:h?.refKeyAttachments.map(t=>g(B,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:g(Yr,{...t,attachmentCode:e.attachmentCode,setAttachmentConfig:m,downloadAuthorityKey:h.downloadAuthorityKey,allowDelete:_})}))})]}):g(T,{})]})},Vr=e=>{const t=y(e=>e.AppLayout),{t:i}=Me();return f(x,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"history",style:{marginRight:10,marginLeft:10}}),i("WF_ACTION_HISTORY_LABEL")]}),g(S,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,o)=>g(T,{children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[f(S,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[g(S,{sx:{marginBottom:.2},children:i.actionTime}),f(at,{children:["via ",i.actionMethod]})]}),f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[g(Hr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId+""||"0",style:{m:1,width:70,height:70}}),o!==e.actionHistory.length-1?g(S,{sx:{marginTop:11,position:"absolute"},children:"|"}):g(T,{})]}),f(S,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[f(S,{sx:{width:"100%"},children:["ltr"===t.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),g(S,{sx:{width:"100%"},children:"ltr"===t.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},zr=e=>{const{t:t}=Me(),i=Zt(),{ConfirmationWindow:o,setOpen:r}=jt({body:t(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:t("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let n=!0;if(e.authority&&(n=i.isUserAuthorized(e.authority)),n)return f(T,{children:[g(o,{}),f(v,{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 we.error(t("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?g(Re,{style:{marginRight:5,marginLeft:5},icon:e.icon}):g(T,{}),e?.label?t(e.label):g(T,{})]})]})},Qr=z(e)({display:"grid",alignItems:"center"}),$r=z(t)(({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"])})),jr=z(F)(({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"])})),Zr=e=>{const{t:p}=Me(),u=Zt(),h=!e?.templateProps?.editAction?.authority||u.isUserAuthorized(e.templateProps.editAction.authority),m=bi(e?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},e?.templateProps?.data||[],e?.templateProps?.keyColumnName||"id");return f(i,{children:[h&&"none"!=e?.templateProps?.editMode?.editMode?f(v,{onClick:e?.handleCreateNewRecord,children:[g(Re,{icon:"add",style:{marginRight:5,marginLeft:5}}),p("ADD_BTN_LABEL")]}):g(T,{}),e?.templateProps?.rowActions?e.templateProps.rowActions.map((t,i)=>!0===t?.gridActionProps?.multiRecord?ge(zr,{...t,key:i,reloadData:async()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:m.selectedRecordIds,recordsToProcessActionOn:m.selectedRecords}):null):g(T,{}),g(S,{sx:{flex:1,mx:.5,my:.5,padding:1},children:e?.templateProps?.tBar}),g(V,{title:"Columns",children:g(o,{render:g(t,{}),children:g(r,{fontSize:"small"})})}),g(V,{title:"Filters",children:g(n,{render:(e,i)=>g(t,{...e,color:"default",children:g(Q,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:g(a,{fontSize:"small"})})})})}),e?.templateProps?.gridStateKey?g(V,{title:p("RESET_GRID_STATE"),children:g(U,{onClick:e?.clearGridState,children:g(Re,{icon:"eraser"})})}):g(T,{}),g($,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),g(V,{title:p("EXPORT_EXECL_LABEL"),children:g(s,{render:g(j,{}),children:g(Re,{icon:"file-excel",color:"green"})})}),f(Qr,{children:[g(l,{render:(e,t)=>g(V,{title:p("SEARCH_BTN_LABEL"),enterDelay:0,children:g($r,{...e,ownerState:{expanded:t.expanded},color:"default","aria-disabled":t.expanded,children:g(Re,{icon:"search"})})})}),g(d,{render:({ref:e,...t},i)=>g(jr,{...t,ownerState:{expanded:i.expanded},inputRef:e,"aria-label":"Search",placeholder:`${p("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:g(Z,{position:"start",children:g(Re,{icon:"search"})}),endAdornment:i.value?g(Z,{position:"end",children:g(c,{edge:"end",size:"small","aria-label":"Clear search",children:g(Re,{icon:"xmark"})})}):null,...t.slotProps?.input},...t.slotProps}})})]}),g(U,{onClick:()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},children:g(Re,{icon:"refresh"})})]})},Jr=e=>{const{t:t}=Me(),i=Zt(),{ConfirmationWindow:o,setOpen:r}=jt({body:t(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:t("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.record)),e?.reloadData&&e.reloadData()}});let n=!0;e.authority&&(n=i.isUserAuthorized(e.authority));let a={};e?.getActionIconStyleForRecord&&(a=e.getActionIconStyleForRecord(e.record));let s=!0;e?.isActionVisibleForRecord&&(s=e?.isActionVisibleForRecord(e.record));let l=!1;if(e?.isActionDisabledForRecord&&(l=e.isActionDisabledForRecord(e.record)),n&&s)return f(T,{children:[g(o,{}),g(p,{disabled:l,icon:g(V,{title:e?.label?t(e.label):"",children:g(Re,{icon:e.icon,style:{...a,color:l?"gray":null!=a?.color?a.color:void 0}})}),showInMenu:e?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!l){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?r(!0):(await e.actionFn(e.record),!0===e?.gridActionProps?.reloadGridAfterAction&&e?.reloadData&&e.reloadData())}}})]})};let Xr=-1;const en=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},tn=(e,t)=>{const i=en(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},on=["__check__","actions"],rn=e=>{const{t:t}=Me(),i=y(e=>e.AppLayout),[o,r]=me({}),[n,a]=me(!0),{getLookupOptions:s}=(()=>{const{handleGetRequest:e}=$t(),t=y(e=>e.AppLayout),i=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 o=await i(e.lookupType);return{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:i}})(),{Window:l,setWindowState:d}=Jt({windowTitle:t(e.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),{Window:c,setWindowState:A}=Jt({windowTitle:t(e.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),[I,_]=me([]),E=Ci(e.formElements),O=[],C=he.useMemo(()=>e?.gridStateKey?en(e.gridStateKey):{},[]);for(const e of E)!0===e?.gridProps?.hidden&&O.push(e.fieldName);let N={};if(C?.columnVisibilityModel){N=C.columnVisibilityModel;const e=Object.keys(N);for(const t of O)e.includes(t)||(N[t]=!1)}else for(const e of O)N[e]=!1;const R=y(e=>e.AppLayout.appDirection),[b,P]=he.useState(N),[w,v]=he.useState(C.columnOrder||[]),[L,M]=he.useState(C.columnWidths||{}),[D,x]=me(C.columnGroupingModel||[]);let F=C?.pinnedColumns?.left||[];F=F.filter(e=>!on.includes(e));let B=C?.pinnedColumns?.right||[]||[];B=B.filter(e=>!on.includes(e));const[q,W]=me({left:[..."ltr"===R?on:[],...F],right:[..."rtl"===R?on:[],...B]}),G=Zt(),H=Ue(),[Y,K]=me(null),[z,Q]=me(null),[j,Z]=me({}),te=async()=>{let o=Ni(E,"row"===e?.editMode?.editMode||!1,t);for(let e of o)e?.lookupType&&(e.displayField="ltr"===i.appDirection?"lookupEnDisplay":"lookupArDisplay",e.options=await s(e.lookupType),e.valueField="lookupValue");_(o)},[ie,oe]=me({ids:new Set,type:"include"});let re="id";e?.keyColumnName&&(re=e?.keyColumnName);const ne=e.setData;let ae=null;ae=e?.validationSchema?e.validationSchema:He.object(Ri(E));let se=!0;e?.editAction?.authority&&(se=G.isUserAuthorized(e.editAction.authority));let le=!0;e?.deleteAction?.authority&&(le=G.isUserAuthorized(e.deleteAction.authority));const{ConfirmationWindow:de,setOpen:ce}=jt({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let t=!0;Y&&!0===Y?.isNew||(t=await e.apiActions.deleteRecordById(Y[re])),t&&(e?.deleteAction?.postActionCallBack&&await e.deleteAction.postActionCallBack(Y),ne(e=>e.filter(e=>e[re]!=Y[re])))}});let pe,ue,ge,Te,Ae,ye;"modal"===e?.editMode?.editMode&&(pe=e?.editMode?.specs?.modalHeight||"fit-content",ue=e?.editMode?.specs?.modalWidth||"300",ge=e?.editMode?.specs?.modalMinHeight,Te=e?.editMode?.specs?.modalMinWidth,Ae=e?.editMode?.specs?.modalIcon||"window",ye=e?.editMode?.specs?.modalTitle||"Record Form");const{Window:Ie,setWindowState:_e}=Jt({height:pe,minHeight:ge,minWidth:Te,onCloseCallBack:()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)},width:ue,windowIcon:Ae,windowTitle:ye}),Ee={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(e?.rowActions?30*e.rowActions.length:0)+(e?.editAction&&e?.editAction?.isEnabled?30:0)+(e?.deleteAction&&e?.deleteAction?.isEnabled?30:0)+(e?.attachment?30:0)+(e?.workFlowDocumentCode?30:0),getActions:i=>{const o=i.row,n=[];if("none"!=e?.editMode?.editMode&&(void 0===e?.disableDefaultAction||!e.disableDefaultAction)){const i=j[o[re]]?.mode===m.Edit;if("row"===e.editMode.editMode&&i)se&&(n.push(g(p,{icon:g(Re,{icon:"save"}),label:t("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const t=e[re];Z({...j,[t]:{mode:m.View}})})(o)}})),n.push(g(p,{icon:g(Re,{icon:"cancel"}),label:t("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const t=e[re];t&&Mr(t)&&t<0?(Z({...j,[t]:{mode:m.View,ignoreModifications:!0}}),ne(e=>{const i=e.filter(e=>e[re]!=t);return i})):Z({...j,[t]:{mode:m.View,ignoreModifications:!0}})})(o)},color:"inherit"})));else{if(e?.editAction&&!0===e?.editAction?.isEnabled){let i=!0;e?.editAction?.isActionVisibleForRecord&&(i=e?.editAction?.isActionVisibleForRecord(o));let r=!1;e?.editAction?.isActionDisabledForRecord&&(r=e?.editAction?.isActionDisabledForRecord(o)),se&&i&&n.push(g(p,{disabled:r,icon:g(V,{title:t("EDIT_BTN_LABEL"),children:g(Re,{icon:"edit",style:{color:r?"gray":void 0}})}),showInMenu:e?.editAction?.gridActionProps?.showInMenu||!1,label:t("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{se&&!r&&(async t=>{if(t)if(Q(t),"form"===e.editMode.editMode)H(e.editMode.specs.formRoute+"/"+t[re]);else if("modal"===e.editMode.editMode)_e(!0);else if("row"===e?.editMode?.editMode){const e=t[re];Z({...j,[e]:{mode:m.Edit}})}})(o)}}))}if(e?.deleteAction&&!0===e?.deleteAction?.isEnabled){let i=!0;e?.deleteAction?.isActionVisibleForRecord&&(i=e?.deleteAction?.isActionVisibleForRecord(o));let r=!1;e?.deleteAction?.isActionDisabledForRecord&&(r=e?.deleteAction?.isActionDisabledForRecord(o)),le&&i&&n.push(g(p,{disabled:r,icon:g(V,{title:t("DELETE_BTN_LABEL"),children:g(Re,{icon:"trash",style:{color:r?"gray":void 0}})}),showInMenu:e?.deleteAction?.gridActionProps?.showInMenu||!1,label:t("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(le&&!r){if(e?.deleteAction?.preActionValidation&&!e.deleteAction.preActionValidation(o))return;K(o),ce(!0)}}}))}}}if(o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.attachment&&n?.push(g(p,{icon:g(V,{title:"Attachments",children:g(Re,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{r(o),a(!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(o)),d(!0)}})),o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.workFlowDocumentCode&&n?.push(g(p,{icon:g(V,{title:"Approvals",children:g(Re,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{r(o),A(!0)}})),o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.rowActions)for(const t of e.rowActions)t?.gridActionProps?.multiRecord&&!0===t?.gridActionProps?.multiRecord||n.push(g(Jr,{...t,record:o,reloadData:async()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)}}));return n}};let Oe=[];(void 0===e?.disableDefaultAction||!e.disableDefaultAction||e?.rowActions&&e?.rowActions.length>0)&&Oe.push(Ee),Oe=[...Oe,...I];fe(()=>{void 0!==e?.autoLoad&&!0!==e.autoLoad||e.apiActions.reloadData(e?.gridLoadParametersValues),te()},[]),fe(()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)},[G.UserInfo?.currentOrganization]),fe(()=>{te()},[R,e.formElements]);const Ce=he.useMemo(()=>{const e=Oe.map(e=>({...e}));if(w.length){const t=new Map(e.map(e=>[e.field,e]));return w.map(e=>t.get(e)).filter(Boolean)}return e},[w,L,Oe]);return f(T,{children:[g(de,{}),"modal"===e?.editMode?.editMode?g(Ie,{children:e?.editMode?.specs?.formComponent?g(e.editMode.specs.formComponent,{recordIdToEdit:z?z[re]:void 0,formCloseCallBk:()=>{_e(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)}}):g(cn,{keyColumnName:e.keyColumnName,attachment:e.attachment,formValuesChangeCallBk:e?.formProps?.formValuesChangeCallBk,recordIdToEdit:z?z[re]:void 0,formCloseCallBk:()=>{_e(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)},elements:e.formElements,apiActions:e.apiActions,editAuthorityKey:e?.editAction?.authority,formSavedSuccessfullyCallBk:e?.editAction?.postActionCallBack,preSaveValidation:e?.editAction?.preActionValidation,actions:e?.rowActions})}):g(T,{}),void 0!==e?.hideInfoBar||e?.hideInfoBar?g(T,{}):f(S,{sx:{display:"flex"},children:[void 0!==e?.hideBackButton||e?.hideBackButton?g(T,{}):g(U,{onClick:()=>{H(-1,{replace:!0})},children:g(Re,{icon:"ltr"===R?"arrow-left":"arrow-right"})}),f(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[e?.girdIcon?g(Re,{icon:e.girdIcon,style:{marginRight:5,marginLeft:5}}):g(T,{}),g(k,{variant:"h5",children:e?.gridTitle?kr(t(e?.gridTitle)):""})]})]}),e?.gridLoadParameters&&e?.gridLoadParameters.length>0&&e?.gridLoadParametersValues&&e?.setGridLoadParametersValues?f(J,{defaultExpanded:!0,sx:{width:"100%"},children:[g(X,{expandIcon:g(u,{}),children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(Re,{style:{marginLeft:5,marginRight:5},icon:"search"}),g(k,{component:"span",children:"Filters"})]})}),g(ee,{children:g(S,{children:g(cn,{saveButtonSpecs:{label:t("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:t("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{null!=t?e.setGridLoadParametersValues(t):e.setGridLoadParametersValues({}),e.apiActions.reloadData(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:e.gridLoadParameters})})})]}):g(T,{}),e?.attachment?g(l,{children:g(Kr,{attachmentCode:e.attachment.attachmentCode,refKey:o[e?.keyColumnName||"id"],enableAttachment:n})}):g(T,{}),e?.workFlowDocumentCode?g(c,{children:g(dn,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:o[e?.keyColumnName||"id"],postActionCallBk:()=>{A(!1),e.apiActions.reloadData(e.gridLoadParametersValues)},cancelActionCallBk:()=>{A(!1),e.apiActions.reloadData(e.gridLoadParametersValues)}})}):g(T,{}),g(h,{...e?.muiProps,slots:{toolbar:Zr},slotProps:{toolbar:{templateProps:{...e,rowSelectionModel:ie,data:e?.data},handleCreateNewRecord:()=>{if("form"===e?.editMode?.editMode)H(e.editMode.specs.formRoute);else if("modal"===e?.editMode?.editMode)Q(null),_e(!0);else if("row"===e?.editMode?.editMode){Xr-=1;const e={};e[re]=Xr,e.isNew=!0;for(const t of I)"actions"!=t?.type&&t?.field!=re&&t?.field&&(e[t.field]=null);ne(t=>[e,...t]),Z(e=>({...e,[Xr]:{mode:m.Edit}}))}},clearGridState:()=>{e?.gridStateKey&&localStorage.removeItem(e.gridStateKey),P({}),v([]),M({}),x([]),W({left:[..."ltr"===R?on:[]],right:[..."rtl"===R?on:[]]})}}},getRowId:e=>e[re],showToolbar:!0,rows:e?.data,columns:Ce,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==e.editMode.editMode?j:void 0,onRowModesModelChange:"row"==e.editMode.editMode?e=>{Z(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async t=>{if("row"===e.editMode.editMode){let i=null;const o=(e=>{try{ae.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof He.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(t);if(o){const e=o.split(",");throw we.error(g("div",{style:{},children:e.map(e=>f(T,{children:[g("div",{children:e}),g($,{})]}))})),new Error(o)}if(e?.editAction?.preActionValidation&&!e.editAction.preActionValidation(t))throw new Error("error on the configured presave validation");const r={...t};if(t[re]&&Mr(t[re])&&Number(t[re])<0&&(r[re]=null),i=await e.apiActions.saveRecord(r),null==i)throw new Error("Failed to process your request, contact your administrator");return e?.editAction?.postActionCallBack&&await e.editAction.postActionCallBack(t),!0===t?.isNew&&ne(e=>{const o=e.filter(e=>e[re]!==t[re]);return[i,...o]}),!0===e?.editMode?.reloadAfterSave&&e?.apiActions?.reloadData&&e?.apiActions?.reloadData(e?.gridLoadParametersValues),i}},rowSelectionModel:ie,onRowSelectionModelChange:e=>{oe(e)},columnVisibilityModel:b,onColumnVisibilityModelChange:t=>{P(t),e?.gridStateKey&&tn(e.gridStateKey,{columnVisibilityModel:t})},onColumnOrderChange:t=>{const{column:i,targetIndex:o}=t;v(t=>{const r=t.length?[...t]:Oe.map(e=>e.field),n=r.indexOf(i.field);return-1===n||(r.splice(n,1),r.splice(o,0,i.field),e?.gridStateKey&&tn(e.gridStateKey,{columnOrder:r})),r})},rowGroupingModel:D,onRowGroupingModelChange:t=>{(t=>{x(t),e?.gridStateKey&&tn(e.gridStateKey,{columnGroupingModel:t})})(t)},sx:{width:"100%"}})]})},nn=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},an=e=>{const[t,i]=me([]);return fe(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));i(t)},[e.reportData]),g(rn,{data:t,disableDefaultAction:!0,setData:e.setReportData,formElements:nn(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()=>{}}})},sn=e=>{console.log("useParameterPanel","useParameterPanel called");const[t,i]=me({...e?.initialParameterValues}),o=((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,t);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:r}=Me();return f(J,{defaultExpanded:!0,sx:{width:"100%"},children:[g(X,{expandIcon:g(Re,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(Re,{style:{marginLeft:5,marginRight:5},icon:"search"}),g(k,{component:"span",children:"Filters"})]})}),g(ee,{children:g(S,{children:g(cn,{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)=>{i({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async o=>{i(null!=o?o:{}),e&&await e(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o})})})]})},parametersValues:t,setParametersValues:i,panelElements:o}},ln=e=>{const[t,i]=me(null),[o,r]=me(null),[n,a]=me([]),[s,l]=me("WAITING_REPORT_CODE"),{handleGetRequest:d,handlePostRequest:c,HandleDownloadHTTPPostPDF:p}=$t(),[u,h]=me(null),{ParameterPanel:m,parametersValues:A,panelElements:y,setParametersValues:I}=sn({parameters:u?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}}),_=async t=>{l("WAITING_RESULT"),"Excel"===u?.reportType?await c({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{l("SHOWING_RESULT"),a(e.data)}}):u?.reportType&&await p({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{l("SHOWING_RESULT");const t=e.headers["content-disposition"];let o="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(o=e[1])}if(o.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),o=URL.createObjectURL(t);i(o)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),i=window.URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=o,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(i)}},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),l("ERROR")}})};return fe(()=>{e?.reportCode&&(async()=>{l("LOADING_METADATA"),await d({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:t=>{h(t.data),!0===e?.byPassParameterEntry||0==t.data.reportParameters.length?(_(A),l("WAITING_RESULT")):l("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),l("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[f(S,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[g(Re,{icon:"Excel"===u?.reportType?"file-excel":"file-pdf",color:"Excel"===u?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),u?.reportName]}),"Excel"!=u?.reportType&&"SHOWING_RESULT"===s?f(T,{children:[!0===e?.byPassParameterEntry?g(T,{}):u?.reportParameters.length>0?g(U,{onClick:()=>{l("WAITING_PARAMETER_INPUT")},children:g(Re,{icon:"filter"})}):g(T,{}),g(U,{children:g(Re,{icon:"refresh",onClick:()=>{_(A)}})})]}):g(T,{})]}),g(S,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===s&&"Excel"!=u?.reportType?g(m,{searchBtnClickCallBk:_}):"SHOWING_RESULT"===s||("WAITING_PARAMETER_INPUT"===s||"WAITING_RESULT"===s)&&"Excel"===u?.reportType?"Excel"===u?.reportType?g(an,{reportData:n,setReportData:a,reloadReport:async()=>{_(A)},gridLoadParameters:y,gridLoadParametersValues:A,setGridLoadParametersValues:I}):g("iframe",{src:t,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===s?f(S,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[g(Re,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),o]}):g(T,{})})]})},dn=e=>{const t=Ue(),i=y(e=>e.AppLayout),{isUserAuthorized:o,UserInfo:r}=Zt(),{handleGetRequest:n,handlePostRequest:a}=$t(),[s,l]=me(null),[d,c]=me([]),{t:p}=Me(),[u,h]=me(null),[m,A]=me({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:I,setWindowState:_}=Jt({windowTitle:"ltr"===i.appDirection?m?.workflowDocument&&m?.referencedDocument?`${m?.workflowDocument?.documentEnName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:"Document":m?.workflowDocument&&m?.referencedDocument?`${m?.workflowDocument?.documentArName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),E=async()=>{await n({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{A(e.data)},failureCallBkFn:()=>{A({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},O=async()=>{await a({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:m?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:s.id,refDocumentStatus:m?.workflowDocumentStatus?.documentStatusCode,actionComment:u},successCallBkFn:async t=>{s?.post_action_endpoint?await a({endPointURI:s.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:s.id},successCallBkFn:()=>{E(),e?.postActionCallBk&&e.postActionCallBk()}}):E()}})};return fe(()=>{e.refDocumentId&&e.workFlowDocumentCode&&E()},[e.refDocumentId,e.workFlowDocumentCode]),fe(()=>{c(m?.nextActions&&m?.nextActions?.length>0?m.nextActions.filter(e=>{if(!m?.workflowDocumentStatus?.nextActionTakersAuthority&&!m?.nextActionTakers)return!0;if(m?.workflowDocumentStatus?.nextActionTakersAuthority&&o(m.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(m?.nextActionTakers)for(const e of m.nextActionTakers)if(r?.username===e?.username||r?.username===e?.USERNAME)return!0;return!1}):[])},[m.nextActions,m.nextActionTakers]),f(T,{children:[m?.workflowDocumentReport?.id?g(I,{children:g(ln,{reportCode:m?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):g(T,{}),m?.workflowDocument?f(S,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(U,{onClick:()=>{t(-1,{replace:!0})},children:g(Re,{icon:"arrow-left"})}),g(S,{sx:{flex:1}}),g(Re,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===i.appDirection?`${m?.workflowDocument?.documentEnName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:`${m?.workflowDocument?.documentArName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`,m?.workflowDocumentStatus?"ltr"===i.appDirection?` ( ${m?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${m?.workflowDocumentStatus?.documentStatusArName} )`:"",g(S,{sx:{flex:1}}),m?.workflowDocumentReport?.id?g(v,{onClick:()=>{_(!0)},variant:"outlined",startIcon:g(Re,{icon:"eye"}),children:p("VIEW_LABEL")}):g(T,{})]}):g(T,{}),f(S,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[d?.length>0?f(x,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[g(di,{sx:{marginBottom:2,width:400},label:p("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===i.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:s?.id,options:d,onChangeCallBack:(e,t)=>{l(t)}}),g(ri,{sx:{width:400},rows:3,value:u,onChange:e=>{h(e.target.value)},multiline:!0,label:p("WF_COMMENT_LABEL")}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(v,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=s&&null!=s?.id?!0!==s.require_comment&&1!==s.require_comment&&"true"!==s.require_comment||null!==u&&""!==u?s?.pre_action_endpoint?await a({endPointURI:s.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:s.id},successCallBkFn:()=>{O()}}):O():we.error("You must enter comment for the action to be processed"):we.error("You must select action to process")},children:p("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?g(v,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:p("WF_CANCEL_BTN_LABEL")}):g(T,{})]}),m?.nextActionTakers&&m.nextActionTakers.length>0?f(T,{children:[g($,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",p("WF_WAITING_FOR_LABEL")]})}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:m.nextActionTakers.map(e=>f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[g(Hr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),f(S,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[g("div",{children:"ltr"===i.appDirection?e?.employee_en_name:e?.employee_ar_name}),g("div",{children:e?.email?f(T,{children:[g(Re,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):g(T,{})}),g("div",{children:e?.mobile_number?f(T,{children:[g(Re,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):g(T,{})})]})]}))})]}):g(T,{})]}):g(T,{}),m?.actionsHistory.length>0?g(Vr,{actionHistory:m.actionsHistory}):f(x,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"history",style:{marginRight:10,marginLeft:10}}),p("WF_ACTION_HISTORY_LABEL")]}),g(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},cn=e=>{const{Window:t,setWindowState:i}=Jt({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:o,setWindowState:r}=Jt({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[n,a]=me(!0),{t:s}=Me(),l=Ci(e.elements),[d,c]=me([]),[p,u]=me([]),h={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(h[t.props.fieldName]=t.props.defaultValue);let m=null;m=e?.validationSchema?e.validationSchema:Ge.object(Ri(l));const A=ke({resolver:We(m),defaultValues:h}),y=A.watch(),I=xe(),_=e?.formRouteRecordIdParamName,E=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:_&&I[_]&&(t=I[_]),t){const i=await e.apiActions.loadRecordById(t);if(i){A.reset({...i}),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk({...i},O,A);for(const e of l)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?A.setValue(e.fieldName,i[e.fieldName]+""):A.setValue(e.fieldName,i[e.fieldName]))}}else A.reset({})},O={setFieldValue:(e,t)=>{A.setValue(e,t)},hideField:e=>{u(t=>[...t,e])},showField:e=>{u(t=>t.filter(t=>t!==e))},disableField:e=>{c(t=>[...t,e])},enableField:e=>{c(t=>t.filter(t=>t!==e))}};return fe(()=>{const e=[],t=[];for(const i of l)i?.hidden&&e.push(i.fieldName),i?.disabled&&t.push(i.fieldName);u(e),c(t)},[e.elements]),fe(()=>{E()},[e?.recordIdToEdit]),fe(()=>{a(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(y))},[y]),f(T,{children:[e?.attachment?g(t,{children:g(Kr,{attachmentCode:e.attachment.attachmentCode,refKey:y[e?.keyColumnName||"id"],enableAttachment:n})}):g(T,{}),e?.workFlowDocumentCode?g(o,{children:g(dn,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:y[e?.keyColumnName||"id"],postActionCallBk:()=>{r(!1),E()},cancelActionCallBk:()=>{r(!1)}})}):g(T,{}),g(Lr,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:g(B,{sx:{width:"100%"},container:!0,children:e.elements.map((t,i)=>"group"===t.type?g(Gr,{...t.props,formManager:A,formValues:y,formActions:O,hiddenFields:p,disabledFields:d},i):"field"===t.type&&"props"===t.mode?g(qr,{fieldInfo:t.props,formManager:A,formValues:y,formActions:O,hiddenFields:p,disabledFields:d,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===t.type&&"node"===t.mode?g(B,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:g(t.node,{formManager:A,formValues:y})},i):void 0)})}),f(Lr,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[y[e?.keyColumnName||"id"]&&e?.attachment?g(V,{title:"Attachments",children:g(U,{onClick:()=>{i(!0)},children:g(Re,{icon:"paperclip"})})}):null,y[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?g(V,{title:"Approvals",children:g(U,{onClick:()=>{r(!0)},children:g(Re,{icon:"stamp"})})}):null,e?.actions?e.actions.map(t=>!1===t?.isIdRequired?g(Wr,{...t,record:y}):y[e?.keyColumnName||"id"]?!0===t?.formActionProps?.enabled?g(Wr,{...t,record:y}):g(T,{}):void 0):g(T,{}),g("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?g(T,{}):g(v,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?g(Re,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:A.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(A.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{we.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:s(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?g(T,{}):g(v,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?g(Re,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),A.reset(h)},children:s(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},pn=()=>{const{workflowDocumentCode:e,refDocumentId:t}=xe();return g(dn,{workFlowDocumentCode:e,refDocumentId:t})},un=e=>g(st,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),hn=e=>f(x,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[g(S,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:g("div",{children:e.record[e.valueField]})}),g(k,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),mn=e=>f(T,{children:[g(k,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),g(lt,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),fn=e=>g(dt,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function gn(e){return f(pt,{sx:{display:"flex",alignItems:"center"},children:[g(pt,{sx:{width:"100%",mr:1},children:g(ct,{variant:"determinate",...e})}),g(pt,{sx:{minWidth:35},children:g(at,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Tn=e=>f(pt,{sx:{width:"100%"},children:[g(at,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),g(gn,{value:e.record[e.valueField]/e.total*100})]}),An=e=>{const t=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return g(ut,{series:[{data:t}]})},yn=e=>{const[t,i]=me(!0),[o,r]=me([]),{handleGetRequest:n}=$t();fe(()=>{e.loadWidget?(async()=>{i(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{i(!1),r(e.data)},failureCallBkFn:()=>{i(!1),r([])}})})():i(!1)},[e.loadWidget,e.loadCounter]);let a=0;if(1==o.length)a=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of o)a+=t[e.verticalAxisField];return f(T,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?f(S,{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):g(T,{}),g(S,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:t?f(T,{children:[g(Re,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),g("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?g(un,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?g(fn,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?g(An,{data:o,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):f(B,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[g(B,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),o.map((t,i)=>"Card"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(hn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},i)}):"CircularProgress"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(mn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:a},i)}):"LinearProgress"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(Tn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:a},i)}):void 0)]})})]})},In=e=>{const[t,i]=me({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:o,parametersValues:r}=sn({parameters:t?.dashboardParameters||[],initialParameterValues:{}}),[n,a]=me(0),[s,l]=me(!1);fe(()=>{if(null!=t.dashboardCode&&null!=t.dashboardCode&&""!=t.dashboardCode){l(!1);let e=!0;if(t?.dashboardParameters.length>0)for(const i of t?.dashboardParameters)if(!0===i?.mandatory&&(void 0===r[i.parameterCode]||null===r[i.parameterCode]||""===r[i.parameterCode])){e=!1;break}e&&l(e),a(n+1)}},[t?.dashboardParameters,r]);const d=Ue(),{handleGetRequest:c,handlePostRequest:p}=$t();return fe(()=>{e.dashboardCode&&(async()=>{await c({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{i(e.data)},failureCallBkFn:()=>{i(null)}})})()},[e.dashboardCode,e.parameters]),g(T,{children:t?f(T,{children:[f(S,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(U,{onClick:()=>{d(-1,{replace:!0})},children:g(Re,{icon:"arrow-left"})}),g(S,{sx:{flex:1}}),g(Re,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),g(S,{children:t?.dashboardTitle}),g(S,{sx:{flex:1}})]}),t?.dashboardParameters.length>0?g(o,{searchBtnClickCallBk:async e=>{a(n+1)}}):g(T,{}),g(B,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:t?.widgets.map((e,t)=>g(B,{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:g(yn,{...e,parameterValues:r,loadWidget:s})},t))})]}):g(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},_n=()=>{const{dashboardCode:e}=xe();return g(In,{dashboardCode:e})},En=e=>{const{UserSession:t}=Zt(),i=y(e=>e.AppLayout),o=A(),{handlePostRequest:r}=$t(),[n,a]=me(t.value.currentOrganization.id);return f(S,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[g(di,{sx:{width:"100%"},displayField:"ltr"===i.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:t.value.userOrganizations,value:n,onChangeCallBack:e=>{a(e)}}),g(v,{sx:{m:1},variant:"contained",disabled:null==n||n===t.value.currentOrganization.id,onClick:async()=>{await r({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:t.value.username,orgId:n},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};o(zt.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},On=be({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Cn,setSideBarState:Nn}=On.actions;var Rn=On.reducer;function bn(e,t){const i=Te(e);fe(()=>{i.current=e},[e]),fe(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const Pn=te`
|
|
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
|
-
`,wn=e=>{const t=Ue(),i=y(e=>e.AppLayout),{handlePostRequest:o}=Qt();return f(T,{children:[f(v,{fullWidth:!0,onClick:()=>{var i;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&t(e.notificationActionPayload),e?.isNotified||(i=e.id,o({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:i}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[f(S,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?g(Re,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):g(T,{}),"ltr"===i.appDirection?e.notificationEnText:e.notificationArText,g(S,{sx:{flex:1}}),e?.isNotified?g(T,{}):f(k,{color:"warning",sx:{animation:`${Pn} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[g(Re,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===i.appDirection?"New":"جديد"]})]}),f(S,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[g(S,{sx:{marginRight:1,marginLeft:1},children:xr(e.createTime,i.appDirection)}),g(S,{sx:{flex:1}}),g(S,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?g(Q,{flexItem:!0}):g(T,{})]})},vn=()=>{const{UserInfo:e}=Zt(),[t,i]=me(null),{handleGetRequest:o,handlePostRequest:r}=Qt(),n=Ue(),a=y(e=>e.AppLayout),[s,l]=me(!1),[d,c]=me([]);bn(()=>{!0===e.isAuthenticated&&o({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>d.length&&we.info("ltr"===a.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===a.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),c(e.data)}})},1e3);return g(ie,{onClickAway:()=>{l(!1)},children:f("div",{style:{cursor:"pointer"},children:[g(U,{color:"inherit",onClick:e=>{i(e.currentTarget),l(!s)},sx:{marginRight:1,marginLeft:1},children:g($,{anchorOrigin:{vertical:"top",horizontal:"ltr"===a.appDirection?"right":"left"},badgeContent:d.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:g(Re,{icon:"bell"})})}),g(Y,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:s,anchorEl:t,dir:a.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>g(oe,{...e,timeout:350,children:f(x,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[g(Q,{variant:"fullWidth",flexItem:!0,children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?"Notifications":"الاشعارات"]})}),0==d.length?g(S,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:g(S,{children:"ltr"===a.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):g(T,{}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:d.map((e,t)=>g(wn,{...e,setOpen:l,showDivider:t<d.length-1}))}),g(Q,{variant:"fullWidth",flexItem:!0,children:g(v,{sx:{textTransform:"none"},onClick:()=>{n("myNotifications")},children:"ltr"===a.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},Ln=e=>{const[t,i]=me(""),[o,r]=me(""),[n,a]=me(""),{handlePostRequest:s}=Qt();return f(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[f(S,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),g(Q,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?g(ri,{label:"Current Password",value:t,onChange:e=>{i(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):g(T,{}),g(ri,{label:"New Password",value:o,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(ri,{label:"Confirm New Password",value:n,onChange:e=>{a(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(v,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==t&&""!==t.trim()?null!==o&&""!==o&&null!==n&&""!==n&&o==n?await s({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:t,newPassword:o},successCallBkFn:()=>{e.onSuccessCallBk(),we.success("Your request has been processed successfully")},showMask:!0}):we.error("You must enter new password in required fields and must be identical"):we.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},Sn=z(Ce,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=y(e=>e.AppLayout),i=Ut();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:i?void 0:"calc(100% - 350px)",marginLeft:i||"ltr"!==t.appDirection?void 0:"350px",marginRight:i||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),Mn=()=>{const{Window:e,setWindowState:t}=Jt({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),i=y(e=>e.AppInfo.value),[o,r]=me(null),n=()=>{r(null)},a=e=>{r(e.currentTarget)},s=y(e=>e.AppLayout),l=y(e=>e.SideBar),{UserSession:d}=Zt(),c=d.value.currentOrganization,{Window:p,setWindowState:u}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:h}=Qt(),m=Ut(),I=A();return f(T,{children:[g(p,{children:g(Ln,{selectedPerson:d.value,isSelfService:!0,onSuccessCallBk:()=>{u(!1)}})}),g(re,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:o,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(o),onClose:n,children:g(j,{onClick:()=>{u(!0),n()},children:g(k,{sx:{textAlign:"center"},children:"Change Password"})})}),g(e,{children:g(En,{successChangeCallBackFn:()=>{t(!1)}})}),g(Sn,{position:"fixed",open:l.isOpened,children:f(Ne,{children:[g(U,{color:"inherit","aria-label":"open drawer",onClick:()=>{I(Cn())},edge:"start",sx:[{mr:"ltr"===s.appDirection?2:void 0,ml:"rtl"===s.appDirection?2:void 0},l.isOpened&&{display:"none"}],children:g(Re,{icon:"bars"})}),g(Hr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:d?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),g(k,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:m?"":`${i.appName} - ${"ltr"===s.appDirection?c?.organizationEnName:c?.organizationArName}`}),g(V,{title:"light"===s.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:g(U,{color:"inherit",onClick:()=>{I(Bt.setThemeMode("light"===s.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===s.themeMode?"dark":"light")},children:"light"===s.themeMode?g(Re,{icon:"moon"}):g(Re,{icon:{prefix:"far",iconName:"sun"}})})}),g(V,{title:"ar"===Se.language?"Change Language To English":"Change Language To Arabic",children:g(U,{color:"inherit",onClick:()=>{let e="ar"===Se.language?"en":"ar";var t;t=e,Se.changeLanguage(t),localStorage.setItem("language",t),I(Bt.setAppDirection("ar"===e?"rtl":"ltr"))},children:g(Re,{icon:"language"})})}),d.value?.userOrganizations&&d.value?.userOrganizations.length>1?g(V,{title:"Change Current Organization",children:g(U,{color:"inherit",onClick:()=>{t(!0)},children:g(Re,{icon:"globe"})})}):g(T,{}),g(!0===i?.enableUINotifications?vn:T,{}),g("div",{onClick:a,style:{cursor:"pointer"},children:g(Hr,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:d.value?.id+""})}),g("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:a,children:m?"":d.value?.username}),g(U,{color:"inherit",onClick:async()=>{try{await h({endPointURI:"api/auth/logout"})}catch(e){}I(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:g(Re,{rotation:"rtl"===s.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},Dn=z("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),kn=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=kn(e,i.children);if(t)return t}}},Un=[...[{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 xn(){return g(pt,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Fn=Ie(_t)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${yt.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),Bn=Ie(Et)(({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:_e(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})}})),qn=ft(Tt);function Wn(e){const t=gt({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return g(qn,{style:t,...e})}const Gn=Ie(at)({color:"inherit",fontWeight:500});function Hn({icon:e,expandable:t,children:i,...o}){const{t:r}=Me(),n=y(e=>e.AppLayout);return f(Nt,{...o,sx:{display:"flex",alignItems:"center",padding:1},children:[g(Re,{style:{marginRight:"ltr"===n.appDirection?7:void 0,marginLeft:"rtl"===n.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),g(Gn,{variant:"body2",sx:{fontSize:16},children:r(i)}),t&&g(xn,{})]})}const Yn=e=>Array.isArray(e)?e.length>0&&e.some(Yn):Boolean(e),Kn=ue.forwardRef(function(e,t){const{id:i,itemId:o,label:r,disabled:n,children:a,...s}=e,{getRootProps:l,getContentProps:d,getIconContainerProps:c,getCheckboxProps:p,getLabelProps:u,getGroupTransitionProps:h,getDragAndDropOverlayProps:m,status:T,publicAPI:A}=It({id:i,itemId:o,children:a,label:r,disabled:n,rootRef:t}),y=A.getItem(o),I=Yn(a);return g(bt,{itemId:o,children:f(Fn,{...l(s),children:[f(Bn,{...d({className:wr("content",{"Mui-expanded":T.expanded,"Mui-selected":T.selected,"Mui-focused":T.focused,"Mui-disabled":T.disabled})}),children:[g(Ot,{...c(),children:g(Rt,{status:T})}),g(Ct,{...p()}),g(Hn,{...u({icon:y?.icon||"book",expandable:I&&T.expanded})}),g(Pt,{...m()})]}),a&&g(Wn,{...h()})]})})});function Vn(){const e=Ue(),t=y(e=>e.AppLayout),i=y(e=>e.AppInfo.value);A();const o=Ut(),{isUserAuthorized:r,isCurrentOrganizationAuthorizedToModule:n}=Zt(),a=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||r(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||n(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=a(i.children)),t.push(e)}return t},s=[];i.enableAdministrationModule&&s.push(...structuredClone(Un)),s.push(...structuredClone(i.businessNavigationItems));const l=a(s);return g(At,{items:l,onItemClick:(t,i)=>{const o=kn(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:xt,direction:t.appDirection,maxHeight:o?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Kn}})}const zn=()=>{const e=y(e=>e.AppInfo.value),{UserSession:t}=Zt(),i=t.value.currentOrganization,o=ne(),r=y(e=>e.AppLayout),n=y(e=>e.SideBar),a=A();return f(mt,{sx:{width:xt,flexShrink:0,"& .MuiDrawer-paper":{width:xt,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===r.appDirection?"left":"right",open:n.isOpened,children:[f(Dn,{children:[f(S,{sx:{width:"100%"},children:[g(k,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===r.appDirection?i?.organizationEnName:i?.organizationArName}`}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),g(ht,{onClick:()=>{a(Cn())},children:"ltr"===o.direction?g(Re,{icon:"angle-left"}):g(Re,{icon:"angle-right"})})]}),g(Ze,{}),g(Vn,{})]})},$n=Lt({key:"muirtl",stylisPlugins:[vt,wt]}),Qn=Lt({key:"mui"}),jn=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=Qt();fe(()=>{e.selectedRecord&&(async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{i(e.data.currentRoles),r(e.data.availableRoles)}})})()},[e.selectedRecord]);return f(T,{children:[g(si,{displayField:"roleName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:t,successCallBkFn:()=>{we.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Zn=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),n=y(e=>e.commonStores.stores.SystemOrganizations.data),a=y(e=>e.commonStores.stores.SystemOrganizationRanks.data),s=y(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:l}=Me(),[d,c]=me([]),p=oi({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:c}),u=[{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:n,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:s,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 f(T,{children:[g(o,{children:g(jn,{selectedRecord:t,closeModalFn:()=>{r(!1)}})}),g(rn,{apiActions:p,hideInfoBar:!0,data:d,setData:c,editMode:{editMode:"row"},formElements:u,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{i(e),r(!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"}})]})},Jn=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:i}),{handleGetRequest:r}=Qt(),n=y(e=>e.commonStores.stores.SystemOrganizationRanks),a=A();return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,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 r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{a(ei({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{a(ei({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Xn=()=>{const{t:e}=Me(),[t,i]=me([]),{handleGetRequest:o}=Qt(),r=y(e=>e.commonStores.stores.SystemOrganizationUnits),n=A(),a=oi({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:i}),s=y(e=>e.commonStores.stores.SystemOrganizationUnitType.data);return g(rn,{apiActions:a,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{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:s,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:t,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await o({endPointURI:r.url,showMask:!1,successCallBkFn:e=>{n(ei({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{n(ei({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ea=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:i});return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,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"}})},ta=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:i}),r=y(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:n}=Qt();return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{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:r,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"}}],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"}})},ia=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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"}})},oa=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=Qt();fe(()=>{e.roleId&&(async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{i(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[e.roleId]);return f(T,{children:[g(si,{displayField:"authorityName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:t,successCallBkFn:()=>{we.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},ra=()=>{const{t:e}=Me(),[t,i]=me([]),[o,r]=me(null),{Window:n,setWindowState:a}=Jt({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),s=oi({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:i});return f(T,{children:[g(n,{children:g(oa,{roleId:o?.id,closeModalFn:()=>{a(!1)}})}),g(rn,{apiActions:s,data:t,hideInfoBar:!0,setData:i,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),a(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},na=e=>{const t=y(e=>e.commonStores.stores.SystemEntityParameters.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:r});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,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:"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:t,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"}}],keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:i("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"}})},aa=()=>{const e=y(e=>e.commonStores.stores.SystemOrganizations.data),{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:o});return g(rn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,editMode:{editMode:"row"},formElements:[{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"}}],keyColumnName:"id",gridTitle:t("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},sa=e=>{const{t:t}=Me(),i=y(e=>e.commonStores.stores.SystemEntityParameters.data),[o,r]=me([]),n=oi({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:r}),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:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:i,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 g(rn,{apiActions:n,data:o,hideInfoBar:!0,setData:r,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:t("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"}})},la=[{value:"FILE_SYSTEM"},{value:"SFTP"}],da=(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")))},ca=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:o});return g(rn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},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:"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:t("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!Ur(t.recipientMail)?(we.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},pa=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:o}),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_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:r,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 g(rn,{apiActions:n,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:a,keyColumnName:"id",gridTitle:t("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"}})},ua=e=>{const t=y(e=>e.commonStores.stores.SystemReports.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:r}),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:{options:t,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 g(rn,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:i("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"}})},ha={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}}},ma=(e,t,i)=>{if(e&&ha[e]){const o=ha[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)},fa=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data),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:"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:n,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:n,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 g(rn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:a,keyColumnName:"id",gridTitle:t("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"}})},ga=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",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:"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:y(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 g(rn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:t("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"}})},Ta=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=Me(),{handleGetRequest:a}=Qt(),[s,l]=me([]);fe(()=>{(async()=>{await a({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{l(e.data)}})})()},[e.selectedRecord]);const[d,c]=me([]),p=oi({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:c}),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:"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:s,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 f(T,{children:[g(o,{children:g(ga,{selectedRecord:t})}),g(rn,{apiActions:p,data:d,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:c,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{i(e),r(!0)}}],formElements:u,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"}})]})},Aa=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemWidgets.data),n=oi({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:o});return g(rn,{apiActions:n,data:i,setData:o,editMode:{editMode:"row"},hideInfoBar:!0,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_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:r,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"}}],gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:t("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"}})},ya=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:i}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Hr,{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 g(T,{children:g(rn,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:o,data:t,setData:i,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:Zn,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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:Jn,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Xn,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:ea,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=Me(),[t,i]=me(null),{UserInfo:o}=Zt(),r=y(e=>e.commonStores.stores.CurrentOrganizationRanks.data),n=y(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[a,s]=me([]),l=oi({commonStoreKey:"persons",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:s}),[d,c]=me(null),{Window:p,setWindowState:u}=Jt({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:h,setWindowState:m}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:A,setWindowState:I}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),_=[{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=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Hr,{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:r,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:n,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 f(T,{children:[g(h,{children:g(jn,{selectedRecord:d,closeModalFn:()=>{m(!1)}})}),g(p,{children:g(Zn,{selectedPerson:t})}),g(A,{children:g(Ln,{selectedPerson:t,isSelfService:!1,onSuccessCallBk:()=>{I(!1)}})}),g(rn,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:l,data:a,setData:s,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:_,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{i(e),I(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{c({organizationId:o?.currentOrganization?.id,id:e?.organizationMemberId}),m(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{i(e),u(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(we.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||(we.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}=Me(),[t,i]=me([]),o=oi({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:i});return g(T,{children:g(rn,{apiActions:o,data:t,setData:i,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:ta,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:ia,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:ra,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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}=Me(),{handleGetRequest:t}=Qt(),[i,o]=me([]),r=oi({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:o}),n=y(e=>e.commonStores.stores.SystemApplicationModules.data);return g(rn,{apiActions:r,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:n,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"}}],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:ea,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Xn,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Jn,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:o});return g(rn,{apiActions:r,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},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:"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:t,optionDisplayField:"queryName",optionValueField:"id"}}],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,t]=me(null),{Window:i,setWindowState:o}=Jt({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),r=y(e=>e.commonStores.stores.SystemDataSources.data),{t:n}=Me(),[a,s]=me([]),l=oi({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:s}),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:"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:r,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 f(T,{children:[g(i,{children:g(na,{selectedRecord:e})}),g(rn,{apiActions:l,rowActions:[{label:"Query Parameters",actionFn:async e=>{t(e),o(!0)},icon:"p"}],data:a,setData:s,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:d,keyColumnName:"id",gridTitle:n("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}=Qt(),t=y(e=>e.commonStores.stores.SystemDataSourceType.data),{t:i}=Me(),[o,r]=me([]),n=oi({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:r,commonStoreKey:"SystemDataSources"});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:[{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:t,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"}}],keyColumnName:"id",gridTitle:i("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=>{we.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}=Me(),t=y(e=>e.commonStores.stores.SystemParameterTypes.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data);return g(rn,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},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:"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:t,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:n,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"}}],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",ci):i.setValue("parameterValueFormat",pi)):(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",ci)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",pi)):(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:aa,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:n,setWindowState:a}=Jt({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[s,l]=me([]),d=y(e=>e.commonStores.stores.SystemDataSources.data),c=y(e=>e.commonStores.stores.SystemDataQueries.data),p=y(e=>e.commonStores.stores.SystemBluePrints.data),u=oi({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:l}),h=[{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:la,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:d,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:p,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:c,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 f(T,{children:[g(o,{children:g(ln,{reportCode:t?.reportCode,resultMode:"App"})}),g(n,{children:g(sa,{selectedRecord:t})}),g(rn,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:u,data:s,setData:l,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)=>{i(e),a(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{i(e),r(!0)}}],formProps:{formValuesChangeCallBk:da},formElements:h,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)||(we.error("You must choose the report query"),!1):(we.error("You must choose the report blueprint"),!1):(we.error("You must enter the jasper report name"),!1):(we.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=y(e=>e.commonStores.stores.SystemDataQueries.data),t=y(e=>e.commonStores.stores.SystemTimeIntervals.data),[i,o]=me(null),{Window:r,setWindowState:n}=Jt({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:a,setWindowState:s}=Jt({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:l,setWindowState:d}=Jt({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:c}=Me(),[p,u]=me([]),h=oi({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:u}),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:"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:t,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 f(T,{children:[g(r,{children:g(ca,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(a,{children:g(pa,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(l,{children:g(ua,{selectedRecord:i,callBkFn:()=>{d(!1)}})}),g(rn,{apiActions:h,data:p,setData:u,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:m,keyColumnName:"id",gridTitle:c("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{o(e),n(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{o(e),s(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{o(e),d(!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)||(we.error("You must specifiy the start sending time since this email is periodical"),!1):(we.error("You must specifiy the period value since this email is periodical"),!1):(we.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}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},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:"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){ma(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"}}],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)=>{ma(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({windowTitle:"Document Status",windowIcon:"tag"}),{Window:r,setWindowState:n}=Jt({windowTitle:"Document Action",windowIcon:"stamp"}),a=y(e=>e.commonStores.stores.SystemOrganizations.data),s=y(e=>e.commonStores.stores.SystemReports.data),l=y(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=Me(),[c,p]=me([]),u=oi({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:p}),h=[{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:a,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:s,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:l,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 f(T,{children:[g(i,{children:g(fa,{selectedRecord:e})}),g(r,{children:g(Ta,{selectedRecord:e})}),g(rn,{apiActions:u,data:c,setData:p,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{t(e),o(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{t(e),n(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:d("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:h,keyColumnName:"id",gridTitle:d("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}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),i=y(e=>e.commonStores.stores.SystemWidgetTypes.data),[o,r]=me([]),n=oi({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:r});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},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:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:i,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:t,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"}}]}}],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}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,a]=me([]),s=Ue(),l=oi({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:a});return f(T,{children:[g(o,{children:g(Aa,{selectedRecord:t})}),g(rn,{apiActions:l,data:n,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:"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=>{i(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/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:_n},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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}=Me(),[t,i]=me([]),{handlePostRequest:o}=Qt(),r=oi({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:i}),n=y(e=>e.commonStores.stores.SystemMailTemplates.data);return g(rn,{apiActions:r,disableDefaultAction:!0,data:t,setData:i,editMode:{editMode:"none"},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_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:n,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"}}],rowActions:[{actionFn:async e=>{(async e=>{await o({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{r.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:ta},{path:"dev/system/roles",component:ra},{path:"dev/system/lookups",component:aa},{path:"dev/system/modules",component:ia},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},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:"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:la,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"}}],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}=Me(),[t,i]=me([]),o=y(e=>e.commonStores.stores.SystemTimeIntervals.data),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:i}),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:"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:r,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:r,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:o,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=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?g(Re,{icon:e.row.notificationIcon}):g(T,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{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=>g(S,{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 g(rn,{apiActions:n,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:a,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}=Zt(),t=y(e=>e.AppLayout),{handleGetRequest:i,handlePostRequest:o}=Qt(),[r,n]=me([]),a=y(e=>e.AppInfo.value),s=()=>{!0===e.isAuthenticated&&i({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{n(e.data)}})};return!0===a?.enableUINotifications&&bn(s,1e3),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(S,{sx:{flex:1}}),f("h3",{children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===t.appDirection?"Notifications":"الاشعارات"]}),g(S,{sx:{flex:1}}),g(v,{sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),g(v,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),g(S,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:g(S,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:r.map((e,t)=>g(wn,{...e,showDivider:t<r.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:pn}]]],Ia=e=>{const{isUserAuthorized:t,isCurrentOrganizationAuthorizedToModule:i}=Zt();return e?.applicationModule&&!i(e?.applicationModule)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!t(e.authority)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):g(T,{children:e.children})},_a=()=>{const e=y(e=>e.AppLayout),t=y(e=>e.AppInfo.value),i=y(e=>e.AppInfo.value.businessRoutes),{UserInfo:o}=Zt(),r=A(),{show:n,hide:a}=Kt(),s=y(e=>e.commonStores),[l,d]=me(!1),{isUserAuthorized:c}=Zt(),{handleGetRequest:p}=Qt();return fe(()=>{s?.storeKeys&&(async()=>{n("Loading ... please wait"),d(!1);const e=s.stores,t=s.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!c(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||p({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{r(ei({storeKey:i,data:e.data}))},failureCallBkFn:()=>{r(ei({storeKey:i,data:[]}))}});d(!0),a()})()},[s.storeKeys,o?.currentOrganization]),g(ce,{value:"ltr"===e.appDirection?Qn:$n,children:g(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:f(Fe,{children:[t.enableAdministrationModule?ya.map((e,t)=>g(Be,{path:e.path,element:g(Ia,{authority:e.authority,applicationModule:e.applicationModule,children:g(e.component,{})})},"adm"+t)):null,i.map((e,t)=>g(Be,{path:e.path,element:g(Ia,{authority:e.authority,children:g(e.component,{})})},"bs"+t))]})})})},Ea=Ie("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:Mt[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:Mt[900]})}));function Oa(e){const{window:t}=e,i=y(e=>e.SideBar),o=y(e=>e.AppInfo.value),r=A(),n=e=>{r(Nn(e))};return g(Dt,{container:void 0!==t?()=>t().document.body:void 0,anchor:"bottom",open:i.isOpened,onClose:()=>{n(!1)},onOpen:()=>{n(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[g(Ea,{}),g(S,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:g(Vn,{})}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:o.appName}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",o.appVersion]})]})]})})}const Ca=()=>{const{t:e}=Me(),t=y(e=>e.loadingMask.value),i=y(e=>e.AppLayout);return f(ae,{dir:i.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:t.isOpened,children:[g(se,{color:"inherit"}),g("div",{style:{marginRight:10,marginLeft:10},children:t?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Na=()=>{const e=y(e=>e.AppInfo.value),[t,i]=me(""),[o,r]=me(""),[n,a]=me(!1),s=y(e=>e.UserSession.value),l=A(),d=async()=>{if(null==t||""==t)return void we.error("username is required to proceed");if(null==o||""==o)return void we.error("password is required to proceed");a(!0);let i=null;try{if(i=await Le.post(`${e.apiBaseUrl}/api/auth/login`,{username:t,password:o},{withCredentials:!0}),null!=i.data&&""!==i.data){a(!1);const e={...i.data,isAuthenticated:!0};i?.data?.token&&localStorage.setItem("TOKEN",i.data.token),l(zt.setAuthenticated(e))}}catch(e){a(!1),we.error(e?.response?.data||"failed to authenticate, contact your administrator")}},c=y(e=>e.UserSession.value),p=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||mi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||ui:e.appTheme?.dark?.primaryColor||mi},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||hi:e.appTheme?.dark?.secondaryColor||fi}}});return fe(()=>{(async()=>{if(e?.apiBaseUrl&&null==c.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await Le.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};l(zt.setAuthenticated(e))}else l(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){l(zt.setUnAuthenticated())}}})()},[e,c.isAuthenticated]),g(pe,{theme:p,children:0==s.isAuthenticated?g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:"url('/bg.jpg')",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:0}},children:g(x,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:e?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),g(F,{label:"username",sx:{width:300,m:1},value:t,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(F,{label:"password",sx:{width:300,m:1},value:o,type:"password",onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(v,{loading:n,onClick:d,variant:"contained",color:"primary",sx:{m:1},children:"login"})]})})}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},Ra=()=>{const[e,t]=me({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:i}=Qt(),o=y(e=>e.AppInfo.value);return fe(()=>{if(o?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{o?.checkLicense?.endpoint&&await i({endPointURI:o.checkLicense?.endpoint,successCallBkFn:e=>{t(e.data)}})})()},o?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[o]),e.isLicensed?g(T,{}):f(S,{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:[g("img",{src:o.appLogo,style:{height:200,width:200}}),f(k,{variant:"h5",children:[o.appName," - ",o.appVersion]}),g(k,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),g(k,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),f(k,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),f(k,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},ba=({msalInstance:e})=>{const t=y(e=>e.AppInfo.value);y(e=>e.UserSession.value);const[i,o]=me(!1),{handleGetRequest:r}=Qt(),n=A(),a=async()=>{localStorage.getItem("TOKEN")?t?.apiBaseUrl&&r({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(o(!1),null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};n(zt.setAuthenticated(t))}else n(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},failureCallBkFn:()=>{o(!1)}}):(n(zt.setUnAuthenticated()),o(!1))},s=y(e=>e.UserSession.value);fe(()=>{a()},[t]);const l=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${t.appTheme?.dark?.primaryColor||mi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:t?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===t?.loginScreenStyle?.themeMode?t.appTheme?.light?.primaryColor||ui:t.appTheme?.dark?.primaryColor||mi},secondary:{main:"light"===t?.loginScreenStyle?.themeMode?t.appTheme?.light?.secondaryColor||hi:t.appTheme?.dark?.secondaryColor||fi}}});return g(pe,{theme:l,children:0==s.isAuthenticated?g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:"url('/bg.jpg')",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:0}},children:g(x,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:t?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:t?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",t.appVersion]}),g(v,{loading:i,onClick:async()=>{o(!0);const i=await e.acquireTokenPopup({scopes:t?.azureConfiguration?.scopes});i?.accessToken?(localStorage.setItem("TOKEN",i.accessToken),a()):o(!1)},variant:"contained",color:"primary",sx:{m:1},startIcon:g(Re,{icon:{iconName:"microsoft",prefix:"fab"}}),children:"login"})]})})}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},Pa=Ie("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const i=y(e=>e.AppLayout),o=Ee(),r=Ut();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&t?"calc(100% - 350px)":"100%",direction:i.appDirection,justifyContent:"flex-start",transition:!0===t?o.transitions.create(["margin","width"],{easing:o.transitions.easing.easeOut,duration:o.transitions.duration.enteringScreen}):o.transitions.create(["margin","width"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==i.appDirection||!0!==t?0:xt+"px",marginRight:r||"rtl"!==i.appDirection||!0!==t?0:xt+"px"}}),wa=({msalInstance:e})=>{const t=y(e=>e.SideBar),i=y(e=>e.AppInfo.value),o=Ut(),r=y(e=>e.UserSession),n=y(e=>e.AppLayout);return f(qe,{children:[g(ve,{rtl:"rtl"===n.appDirection,draggable:!0,position:"bottom-center"}),g(Ca,{}),!0===r.value.isAuthenticated?f(Pa,{open:t.isOpened,children:[g(Oe,{}),g(Mn,{}),o?null:g(zn,{}),o?g(Oa,{}):null,g(Dn,{}),g(_a,{}),g(Ra,{})]}):"AZURE"===i.authenticationMethod?g(ba,{msalInstance:e}):g(Na,{})]})},va=be({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,authenticationMethod:"APP",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}}}),La=va.actions;var Sa=va.reducer;const Ma={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"},persons:{autoLoad:!0,data:[],url:"api/v1/public/person/all"}},Da={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"},ka=200,Ua=400,xa=400,Fa=499,Ba=500,qa=599,Wa="GET",Ga="POST",Ha=[Da.OPENID_SCOPE,Da.PROFILE_SCOPE,Da.OFFLINE_ACCESS_SCOPE],Ya=[...Ha,Da.EMAIL_SCOPE],Ka="Content-Type",Va="Content-Length",za="Retry-After",$a="X-AnchorMailbox",Qa="x-ms-request-id",ja="x-ms-httpver",Za="active-account-filters",Ja="common",Xa="organizations",es="consumers",ts="access_token",is="xms_cc",os="login",rs="select_account",ns="consent",as="none",ss="no_session",ls="code",ds="id_token token refresh_token",cs="query",ps="fragment",us="query",hs="authorization_code",ms="refresh_token",fs="MSSTS",gs="ADFS",Ts="Generic",As="-",ys=".",Is={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},_s="appmetadata",Es="1",Os="authority-metadata",Cs=86400,Ns="config",Rs="cache",bs="network",Ps="hardcoded_values",ws={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"},vs={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Ls=60,Ss=3600,Ms="throttling",Ds="retry-after, h429",ks="invalid_grant",Us="client_mismatch",xs="1",Fs="3",Bs="4",qs="2",Ws="4",Gs="5",Hs="0",Ys="1",Ks="2",Vs="3",zs="4",$s="pop",Qs="unexpected_error",js="post_request_failed",Zs={[Qs]:"Unexpected error in authentication.",[js]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};
|
|
37
|
+
`,wn=e=>{const t=Ue(),i=y(e=>e.AppLayout),{handlePostRequest:o}=$t();return f(T,{children:[f(v,{fullWidth:!0,onClick:()=>{var i;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&t(e.notificationActionPayload),e?.isNotified||(i=e.id,o({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:i}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[f(S,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?g(Re,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):g(T,{}),"ltr"===i.appDirection?e.notificationEnText:e.notificationArText,g(S,{sx:{flex:1}}),e?.isNotified?g(T,{}):f(k,{color:"warning",sx:{animation:`${Pn} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[g(Re,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===i.appDirection?"New":"جديد"]})]}),f(S,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[g(S,{sx:{marginRight:1,marginLeft:1},children:xr(e.createTime,i.appDirection)}),g(S,{sx:{flex:1}}),g(S,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?g($,{flexItem:!0}):g(T,{})]})},vn=()=>{const{UserInfo:e}=Zt(),[t,i]=me(null),{handleGetRequest:o,handlePostRequest:r}=$t(),n=Ue(),a=y(e=>e.AppLayout),[s,l]=me(!1),[d,c]=me([]);bn(()=>{!0===e.isAuthenticated&&o({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>d.length&&we.info("ltr"===a.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===a.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),c(e.data)}})},1e3);return g(ie,{onClickAway:()=>{l(!1)},children:f("div",{style:{cursor:"pointer"},children:[g(U,{color:"inherit",onClick:e=>{i(e.currentTarget),l(!s)},sx:{marginRight:1,marginLeft:1},children:g(Q,{anchorOrigin:{vertical:"top",horizontal:"ltr"===a.appDirection?"right":"left"},badgeContent:d.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:g(Re,{icon:"bell"})})}),g(Y,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:s,anchorEl:t,dir:a.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>g(oe,{...e,timeout:350,children:f(x,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[g($,{variant:"fullWidth",flexItem:!0,children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?"Notifications":"الاشعارات"]})}),0==d.length?g(S,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:g(S,{children:"ltr"===a.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):g(T,{}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:d.map((e,t)=>g(wn,{...e,setOpen:l,showDivider:t<d.length-1}))}),g($,{variant:"fullWidth",flexItem:!0,children:g(v,{sx:{textTransform:"none"},onClick:()=>{n("myNotifications")},children:"ltr"===a.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},Ln=e=>{const[t,i]=me(""),[o,r]=me(""),[n,a]=me(""),{handlePostRequest:s}=$t();return f(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[f(S,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),g($,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?g(ri,{label:"Current Password",value:t,onChange:e=>{i(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):g(T,{}),g(ri,{label:"New Password",value:o,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(ri,{label:"Confirm New Password",value:n,onChange:e=>{a(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(v,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==t&&""!==t.trim()?null!==o&&""!==o&&null!==n&&""!==n&&o==n?await s({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:t,newPassword:o},successCallBkFn:()=>{e.onSuccessCallBk(),we.success("Your request has been processed successfully")},showMask:!0}):we.error("You must enter new password in required fields and must be identical"):we.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},Sn=z(Ce,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=y(e=>e.AppLayout),i=Ut();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:i?void 0:"calc(100% - 350px)",marginLeft:i||"ltr"!==t.appDirection?void 0:"350px",marginRight:i||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),Mn=()=>{const{Window:e,setWindowState:t}=Jt({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),i=y(e=>e.AppInfo.value),[o,r]=me(null),n=()=>{r(null)},a=e=>{r(e.currentTarget)},s=y(e=>e.AppLayout),l=y(e=>e.SideBar),{UserSession:d}=Zt(),c=d.value.currentOrganization,{Window:p,setWindowState:u}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:h}=$t(),m=Ut(),I=A();return f(T,{children:[g(p,{children:g(Ln,{selectedPerson:d.value,isSelfService:!0,onSuccessCallBk:()=>{u(!1)}})}),g(re,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:o,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(o),onClose:n,children:g(j,{onClick:()=>{u(!0),n()},children:g(k,{sx:{textAlign:"center"},children:"Change Password"})})}),g(e,{children:g(En,{successChangeCallBackFn:()=>{t(!1)}})}),g(Sn,{position:"fixed",open:l.isOpened,children:f(Ne,{children:[g(U,{color:"inherit","aria-label":"open drawer",onClick:()=>{I(Cn())},edge:"start",sx:[{mr:"ltr"===s.appDirection?2:void 0,ml:"rtl"===s.appDirection?2:void 0},l.isOpened&&{display:"none"}],children:g(Re,{icon:"bars"})}),g(Hr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:d?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),g(k,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:m?"":`${i.appName} - ${"ltr"===s.appDirection?c?.organizationEnName:c?.organizationArName}`}),g(V,{title:"light"===s.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:g(U,{color:"inherit",onClick:()=>{I(Bt.setThemeMode("light"===s.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===s.themeMode?"dark":"light")},children:"light"===s.themeMode?g(Re,{icon:"moon"}):g(Re,{icon:{prefix:"far",iconName:"sun"}})})}),g(V,{title:"ar"===Se.language?"Change Language To English":"Change Language To Arabic",children:g(U,{color:"inherit",onClick:()=>{let e="ar"===Se.language?"en":"ar";var t;t=e,Se.changeLanguage(t),localStorage.setItem("language",t),I(Bt.setAppDirection("ar"===e?"rtl":"ltr"))},children:g(Re,{icon:"language"})})}),d.value?.userOrganizations&&d.value?.userOrganizations.length>1?g(V,{title:"Change Current Organization",children:g(U,{color:"inherit",onClick:()=>{t(!0)},children:g(Re,{icon:"globe"})})}):g(T,{}),g(!0===i?.enableUINotifications?vn:T,{}),g("div",{onClick:a,style:{cursor:"pointer"},children:g(Hr,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:d.value?.id+""})}),g("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:a,children:m?"":d.value?.username}),g(U,{color:"inherit",onClick:async()=>{try{await h({endPointURI:"api/auth/logout"})}catch(e){}I(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:g(Re,{rotation:"rtl"===s.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},Dn=z("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),kn=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=kn(e,i.children);if(t)return t}}},Un=[...[{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 xn(){return g(pt,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Fn=Ie(_t)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${yt.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),Bn=Ie(Et)(({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:_e(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})}})),qn=ft(Tt);function Wn(e){const t=gt({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return g(qn,{style:t,...e})}const Gn=Ie(at)({color:"inherit",fontWeight:500});function Hn({icon:e,expandable:t,children:i,...o}){const{t:r}=Me(),n=y(e=>e.AppLayout);return f(Nt,{...o,sx:{display:"flex",alignItems:"center",padding:1},children:[g(Re,{style:{marginRight:"ltr"===n.appDirection?7:void 0,marginLeft:"rtl"===n.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),g(Gn,{variant:"body2",sx:{fontSize:16},children:r(i)}),t&&g(xn,{})]})}const Yn=e=>Array.isArray(e)?e.length>0&&e.some(Yn):Boolean(e),Kn=ue.forwardRef(function(e,t){const{id:i,itemId:o,label:r,disabled:n,children:a,...s}=e,{getRootProps:l,getContentProps:d,getIconContainerProps:c,getCheckboxProps:p,getLabelProps:u,getGroupTransitionProps:h,getDragAndDropOverlayProps:m,status:T,publicAPI:A}=It({id:i,itemId:o,children:a,label:r,disabled:n,rootRef:t}),y=A.getItem(o),I=Yn(a);return g(bt,{itemId:o,children:f(Fn,{...l(s),children:[f(Bn,{...d({className:wr("content",{"Mui-expanded":T.expanded,"Mui-selected":T.selected,"Mui-focused":T.focused,"Mui-disabled":T.disabled})}),children:[g(Ot,{...c(),children:g(Rt,{status:T})}),g(Ct,{...p()}),g(Hn,{...u({icon:y?.icon||"book",expandable:I&&T.expanded})}),g(Pt,{...m()})]}),a&&g(Wn,{...h()})]})})});function Vn(){const e=Ue(),t=y(e=>e.AppLayout),i=y(e=>e.AppInfo.value);A();const o=Ut(),{isUserAuthorized:r,isCurrentOrganizationAuthorizedToModule:n}=Zt(),a=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||r(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||n(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=a(i.children)),t.push(e)}return t},s=[];i.enableAdministrationModule&&s.push(...structuredClone(Un)),s.push(...structuredClone(i.businessNavigationItems));const l=a(s);return g(At,{items:l,onItemClick:(t,i)=>{const o=kn(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:xt,direction:t.appDirection,maxHeight:o?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Kn}})}const zn=()=>{const e=y(e=>e.AppInfo.value),{UserSession:t}=Zt(),i=t.value.currentOrganization,o=ne(),r=y(e=>e.AppLayout),n=y(e=>e.SideBar),a=A();return f(mt,{sx:{width:xt,flexShrink:0,"& .MuiDrawer-paper":{width:xt,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===r.appDirection?"left":"right",open:n.isOpened,children:[f(Dn,{children:[f(S,{sx:{width:"100%"},children:[g(k,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===r.appDirection?i?.organizationEnName:i?.organizationArName}`}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),g(ht,{onClick:()=>{a(Cn())},children:"ltr"===o.direction?g(Re,{icon:"angle-left"}):g(Re,{icon:"angle-right"})})]}),g(Ze,{}),g(Vn,{})]})},Qn=Lt({key:"muirtl",stylisPlugins:[vt,wt]}),$n=Lt({key:"mui"}),jn=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=$t();fe(()=>{e.selectedRecord&&(async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{i(e.data.currentRoles),r(e.data.availableRoles)}})})()},[e.selectedRecord]);return f(T,{children:[g(si,{displayField:"roleName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:t,successCallBkFn:()=>{we.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Zn=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),n=y(e=>e.commonStores.stores.SystemOrganizations.data),a=y(e=>e.commonStores.stores.SystemOrganizationRanks.data),s=y(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:l}=Me(),[d,c]=me([]),p=oi({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:c}),u=[{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:n,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:s,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 f(T,{children:[g(o,{children:g(jn,{selectedRecord:t,closeModalFn:()=>{r(!1)}})}),g(rn,{apiActions:p,hideInfoBar:!0,data:d,setData:c,editMode:{editMode:"row"},formElements:u,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{i(e),r(!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"}})]})},Jn=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:i}),{handleGetRequest:r}=$t(),n=y(e=>e.commonStores.stores.SystemOrganizationRanks),a=A();return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,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 r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{a(ei({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{a(ei({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Xn=()=>{const{t:e}=Me(),[t,i]=me([]),{handleGetRequest:o}=$t(),r=y(e=>e.commonStores.stores.SystemOrganizationUnits),n=A(),a=oi({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:i}),s=y(e=>e.commonStores.stores.SystemOrganizationUnitType.data);return g(rn,{apiActions:a,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{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:s,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:t,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await o({endPointURI:r.url,showMask:!1,successCallBkFn:e=>{n(ei({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{n(ei({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ea=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:i});return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,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"}})},ta=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:i}),r=y(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:n}=$t();return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{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:r,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"}}],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"}})},ia=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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"}})},oa=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=$t();fe(()=>{e.roleId&&(async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{i(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[e.roleId]);return f(T,{children:[g(si,{displayField:"authorityName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:t,successCallBkFn:()=>{we.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},ra=()=>{const{t:e}=Me(),[t,i]=me([]),[o,r]=me(null),{Window:n,setWindowState:a}=Jt({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),s=oi({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:i});return f(T,{children:[g(n,{children:g(oa,{roleId:o?.id,closeModalFn:()=>{a(!1)}})}),g(rn,{apiActions:s,data:t,hideInfoBar:!0,setData:i,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),a(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},na=e=>{const t=y(e=>e.commonStores.stores.SystemEntityParameters.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:r});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,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:"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:t,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"}}],keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:i("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"}})},aa=()=>{const e=y(e=>e.commonStores.stores.SystemOrganizations.data),{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:o});return g(rn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,editMode:{editMode:"row"},formElements:[{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"}}],keyColumnName:"id",gridTitle:t("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},sa=e=>{const{t:t}=Me(),i=y(e=>e.commonStores.stores.SystemEntityParameters.data),[o,r]=me([]),n=oi({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:r}),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:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:i,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 g(rn,{apiActions:n,data:o,hideInfoBar:!0,setData:r,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:t("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"}})},la=[{value:"FILE_SYSTEM"},{value:"SFTP"}],da=(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")))},ca=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:o});return g(rn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},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:"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:t("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!Ur(t.recipientMail)?(we.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},pa=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:o}),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_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:r,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 g(rn,{apiActions:n,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:a,keyColumnName:"id",gridTitle:t("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"}})},ua=e=>{const t=y(e=>e.commonStores.stores.SystemReports.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:r}),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:{options:t,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 g(rn,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:i("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"}})},ha={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}}},ma=(e,t,i)=>{if(e&&ha[e]){const o=ha[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)},fa=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data),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:"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:n,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:n,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 g(rn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:a,keyColumnName:"id",gridTitle:t("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"}})},ga=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",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:"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:y(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 g(rn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:t("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"}})},Ta=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=Me(),{handleGetRequest:a}=$t(),[s,l]=me([]);fe(()=>{(async()=>{await a({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{l(e.data)}})})()},[e.selectedRecord]);const[d,c]=me([]),p=oi({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:c}),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:"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:s,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 f(T,{children:[g(o,{children:g(ga,{selectedRecord:t})}),g(rn,{apiActions:p,data:d,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:c,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{i(e),r(!0)}}],formElements:u,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"}})]})},Aa=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemWidgets.data),n=oi({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:o});return g(rn,{apiActions:n,data:i,setData:o,editMode:{editMode:"row"},hideInfoBar:!0,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_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:r,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"}}],gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:t("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"}})},ya=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:i}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Hr,{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 g(T,{children:g(rn,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:o,data:t,setData:i,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:Zn,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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:Jn,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Xn,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:ea,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=Me(),[t,i]=me(null),{UserInfo:o}=Zt(),r=y(e=>e.commonStores.stores.CurrentOrganizationRanks.data),n=y(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[a,s]=me([]),l=oi({commonStoreKey:"persons",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:s}),[d,c]=me(null),{Window:p,setWindowState:u}=Jt({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:h,setWindowState:m}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:A,setWindowState:I}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),_=[{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=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Hr,{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:r,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:n,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 f(T,{children:[g(h,{children:g(jn,{selectedRecord:d,closeModalFn:()=>{m(!1)}})}),g(p,{children:g(Zn,{selectedPerson:t})}),g(A,{children:g(Ln,{selectedPerson:t,isSelfService:!1,onSuccessCallBk:()=>{I(!1)}})}),g(rn,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:l,data:a,setData:s,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:_,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{i(e),I(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{c({organizationId:o?.currentOrganization?.id,id:e?.organizationMemberId}),m(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{i(e),u(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(we.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||(we.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}=Me(),[t,i]=me([]),o=oi({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:i});return g(T,{children:g(rn,{apiActions:o,data:t,setData:i,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:ta,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:ia,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:ra,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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}=Me(),{handleGetRequest:t}=$t(),[i,o]=me([]),r=oi({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:o}),n=y(e=>e.commonStores.stores.SystemApplicationModules.data);return g(rn,{apiActions:r,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:n,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"}}],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:ea,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Xn,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Jn,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:o});return g(rn,{apiActions:r,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},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:"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:t,optionDisplayField:"queryName",optionValueField:"id"}}],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,t]=me(null),{Window:i,setWindowState:o}=Jt({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),r=y(e=>e.commonStores.stores.SystemDataSources.data),{t:n}=Me(),[a,s]=me([]),l=oi({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:s}),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:"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:r,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 f(T,{children:[g(i,{children:g(na,{selectedRecord:e})}),g(rn,{apiActions:l,rowActions:[{label:"Query Parameters",actionFn:async e=>{t(e),o(!0)},icon:"p"}],data:a,setData:s,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:d,keyColumnName:"id",gridTitle:n("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}=$t(),t=y(e=>e.commonStores.stores.SystemDataSourceType.data),{t:i}=Me(),[o,r]=me([]),n=oi({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:r,commonStoreKey:"SystemDataSources"});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:[{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:t,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"}}],keyColumnName:"id",gridTitle:i("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=>{we.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}=Me(),t=y(e=>e.commonStores.stores.SystemParameterTypes.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data);return g(rn,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},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:"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:t,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:n,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"}}],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",ci):i.setValue("parameterValueFormat",pi)):(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",ci)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",pi)):(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:aa,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:n,setWindowState:a}=Jt({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[s,l]=me([]),d=y(e=>e.commonStores.stores.SystemDataSources.data),c=y(e=>e.commonStores.stores.SystemDataQueries.data),p=y(e=>e.commonStores.stores.SystemBluePrints.data),u=oi({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:l}),h=[{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:la,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:d,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:p,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:c,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 f(T,{children:[g(o,{children:g(ln,{reportCode:t?.reportCode,resultMode:"App"})}),g(n,{children:g(sa,{selectedRecord:t})}),g(rn,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:u,data:s,setData:l,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)=>{i(e),a(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{i(e),r(!0)}}],formProps:{formValuesChangeCallBk:da},formElements:h,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)||(we.error("You must choose the report query"),!1):(we.error("You must choose the report blueprint"),!1):(we.error("You must enter the jasper report name"),!1):(we.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=y(e=>e.commonStores.stores.SystemDataQueries.data),t=y(e=>e.commonStores.stores.SystemTimeIntervals.data),[i,o]=me(null),{Window:r,setWindowState:n}=Jt({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:a,setWindowState:s}=Jt({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:l,setWindowState:d}=Jt({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:c}=Me(),[p,u]=me([]),h=oi({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:u}),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:"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:t,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 f(T,{children:[g(r,{children:g(ca,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(a,{children:g(pa,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(l,{children:g(ua,{selectedRecord:i,callBkFn:()=>{d(!1)}})}),g(rn,{apiActions:h,data:p,setData:u,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:m,keyColumnName:"id",gridTitle:c("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{o(e),n(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{o(e),s(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{o(e),d(!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)||(we.error("You must specifiy the start sending time since this email is periodical"),!1):(we.error("You must specifiy the period value since this email is periodical"),!1):(we.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}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},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:"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){ma(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"}}],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)=>{ma(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({windowTitle:"Document Status",windowIcon:"tag"}),{Window:r,setWindowState:n}=Jt({windowTitle:"Document Action",windowIcon:"stamp"}),a=y(e=>e.commonStores.stores.SystemOrganizations.data),s=y(e=>e.commonStores.stores.SystemReports.data),l=y(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=Me(),[c,p]=me([]),u=oi({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:p}),h=[{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:a,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:s,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:l,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 f(T,{children:[g(i,{children:g(fa,{selectedRecord:e})}),g(r,{children:g(Ta,{selectedRecord:e})}),g(rn,{apiActions:u,data:c,setData:p,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{t(e),o(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{t(e),n(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:d("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:h,keyColumnName:"id",gridTitle:d("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}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),i=y(e=>e.commonStores.stores.SystemWidgetTypes.data),[o,r]=me([]),n=oi({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:r});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},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:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:i,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:t,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"}}]}}],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}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,a]=me([]),s=Ue(),l=oi({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:a});return f(T,{children:[g(o,{children:g(Aa,{selectedRecord:t})}),g(rn,{apiActions:l,data:n,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:"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=>{i(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/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:_n},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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}=Me(),[t,i]=me([]),{handlePostRequest:o}=$t(),r=oi({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:i}),n=y(e=>e.commonStores.stores.SystemMailTemplates.data);return g(rn,{apiActions:r,disableDefaultAction:!0,data:t,setData:i,editMode:{editMode:"none"},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_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:n,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"}}],rowActions:[{actionFn:async e=>{(async e=>{await o({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{r.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:ta},{path:"dev/system/roles",component:ra},{path:"dev/system/lookups",component:aa},{path:"dev/system/modules",component:ia},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},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:"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:la,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"}}],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}=Me(),[t,i]=me([]),o=y(e=>e.commonStores.stores.SystemTimeIntervals.data),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:i}),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:"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:r,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:r,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:o,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=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?g(Re,{icon:e.row.notificationIcon}):g(T,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{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=>g(S,{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 g(rn,{apiActions:n,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:a,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}=Zt(),t=y(e=>e.AppLayout),{handleGetRequest:i,handlePostRequest:o}=$t(),[r,n]=me([]),a=y(e=>e.AppInfo.value),s=()=>{!0===e.isAuthenticated&&i({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{n(e.data)}})};return!0===a?.enableUINotifications&&bn(s,1e3),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(S,{sx:{flex:1}}),f("h3",{children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===t.appDirection?"Notifications":"الاشعارات"]}),g(S,{sx:{flex:1}}),g(v,{sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),g(v,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),g(S,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:g(S,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:r.map((e,t)=>g(wn,{...e,showDivider:t<r.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:pn}]]],Ia=e=>{const{isUserAuthorized:t,isCurrentOrganizationAuthorizedToModule:i}=Zt();return e?.applicationModule&&!i(e?.applicationModule)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!t(e.authority)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):g(T,{children:e.children})},_a=()=>{const e=y(e=>e.AppLayout),t=y(e=>e.AppInfo.value),i=y(e=>e.AppInfo.value.businessRoutes),{UserInfo:o}=Zt(),r=A(),{show:n,hide:a}=Kt(),s=y(e=>e.commonStores),[l,d]=me(!1),{isUserAuthorized:c}=Zt(),{handleGetRequest:p}=$t();return fe(()=>{s?.storeKeys&&(async()=>{n("Loading ... please wait"),d(!1);const e=s.stores,t=s.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!c(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||p({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{r(ei({storeKey:i,data:e.data}))},failureCallBkFn:()=>{r(ei({storeKey:i,data:[]}))}});d(!0),a()})()},[s.storeKeys,o?.currentOrganization]),g(ce,{value:"ltr"===e.appDirection?$n:Qn,children:g(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:f(Fe,{children:[t.enableAdministrationModule?ya.map((e,t)=>g(Be,{path:e.path,element:g(Ia,{authority:e.authority,applicationModule:e.applicationModule,children:g(e.component,{})})},"adm"+t)):null,i.map((e,t)=>g(Be,{path:e.path,element:g(Ia,{authority:e.authority,children:g(e.component,{})})},"bs"+t))]})})})},Ea=Ie("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:Mt[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:Mt[900]})}));function Oa(e){const{window:t}=e,i=y(e=>e.SideBar),o=y(e=>e.AppInfo.value),r=A(),n=e=>{r(Nn(e))};return g(Dt,{container:void 0!==t?()=>t().document.body:void 0,anchor:"bottom",open:i.isOpened,onClose:()=>{n(!1)},onOpen:()=>{n(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[g(Ea,{}),g(S,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:g(Vn,{})}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:o.appName}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",o.appVersion]})]})]})})}const Ca=()=>{const{t:e}=Me(),t=y(e=>e.loadingMask.value),i=y(e=>e.AppLayout);return f(ae,{dir:i.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:t.isOpened,children:[g(se,{color:"inherit"}),g("div",{style:{marginRight:10,marginLeft:10},children:t?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Na=()=>{const e=y(e=>e.AppInfo.value),[t,i]=me(""),[o,r]=me(""),[n,a]=me(!1),s=y(e=>e.UserSession.value),l=A(),d=async()=>{if(null==t||""==t)return void we.error("username is required to proceed");if(null==o||""==o)return void we.error("password is required to proceed");a(!0);let i=null;try{if(i=await Le.post(`${e.apiBaseUrl}/api/auth/login`,{username:t,password:o},{withCredentials:!0}),null!=i.data&&""!==i.data){a(!1);const e={...i.data,isAuthenticated:!0};i?.data?.token&&localStorage.setItem("TOKEN",i.data.token),l(zt.setAuthenticated(e))}}catch(e){a(!1),we.error(e?.response?.data||"failed to authenticate, contact your administrator")}},c=y(e=>e.UserSession.value),p=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||mi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||ui:e.appTheme?.dark?.primaryColor||mi},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||hi:e.appTheme?.dark?.secondaryColor||fi}}});return fe(()=>{(async()=>{if(e?.apiBaseUrl&&null==c.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await Le.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};l(zt.setAuthenticated(e))}else l(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){l(zt.setUnAuthenticated())}}})()},[e,c.isAuthenticated]),g(pe,{theme:p,children:0==s.isAuthenticated?g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:"url('/bg.jpg')",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:0}},children:g(x,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:e?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),g(F,{label:"username",sx:{width:300,m:1},value:t,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(F,{label:"password",sx:{width:300,m:1},value:o,type:"password",onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(v,{loading:n,onClick:d,variant:"contained",color:"primary",sx:{m:1},children:"login"})]})})}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},Ra=()=>{const[e,t]=me({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:i}=$t(),o=y(e=>e.AppInfo.value);return fe(()=>{if(o?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{o?.checkLicense?.endpoint&&await i({endPointURI:o.checkLicense?.endpoint,successCallBkFn:e=>{t(e.data)}})})()},o?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[o]),e.isLicensed?g(T,{}):f(S,{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:[g("img",{src:o.appLogo,style:{height:200,width:200}}),f(k,{variant:"h5",children:[o.appName," - ",o.appVersion]}),g(k,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),g(k,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),f(k,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),f(k,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},ba=({msalInstance:e})=>{const t=y(e=>e.AppInfo.value);y(e=>e.UserSession.value);const[i,o]=me(!1),{handleGetRequest:r}=$t(),n=A(),a=async()=>{localStorage.getItem("TOKEN")?t?.apiBaseUrl&&r({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(o(!1),null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};n(zt.setAuthenticated(t))}else n(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},failureCallBkFn:()=>{o(!1)}}):(n(zt.setUnAuthenticated()),o(!1))},s=y(e=>e.UserSession.value);fe(()=>{a()},[t]);const l=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${t.appTheme?.dark?.primaryColor||mi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:t?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===t?.loginScreenStyle?.themeMode?t.appTheme?.light?.primaryColor||ui:t.appTheme?.dark?.primaryColor||mi},secondary:{main:"light"===t?.loginScreenStyle?.themeMode?t.appTheme?.light?.secondaryColor||hi:t.appTheme?.dark?.secondaryColor||fi}}});return g(pe,{theme:l,children:0==s.isAuthenticated?g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:"url('/bg.jpg')",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:0}},children:g(x,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:t?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:t?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",t.appVersion]}),g(v,{loading:i,onClick:async()=>{o(!0);const i=await e.acquireTokenPopup({scopes:t?.azureConfiguration?.scopes});i?.accessToken?(localStorage.setItem("TOKEN",i.accessToken),a()):o(!1)},variant:"contained",color:"primary",sx:{m:1},startIcon:g(Re,{icon:{iconName:"microsoft",prefix:"fab"}}),children:"login"})]})})}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},Pa=Ie("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const i=y(e=>e.AppLayout),o=Ee(),r=Ut();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&t?"calc(100% - 350px)":"100%",direction:i.appDirection,justifyContent:"flex-start",transition:!0===t?o.transitions.create(["margin","width"],{easing:o.transitions.easing.easeOut,duration:o.transitions.duration.enteringScreen}):o.transitions.create(["margin","width"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==i.appDirection||!0!==t?0:xt+"px",marginRight:r||"rtl"!==i.appDirection||!0!==t?0:xt+"px"}}),wa=({msalInstance:e})=>{const t=y(e=>e.SideBar),i=y(e=>e.AppInfo.value),o=Ut(),r=y(e=>e.UserSession),n=y(e=>e.AppLayout);return f(qe,{children:[g(ve,{rtl:"rtl"===n.appDirection,draggable:!0,position:"bottom-center"}),g(Ca,{}),!0===r.value.isAuthenticated?f(Pa,{open:t.isOpened,children:[g(Oe,{}),g(Mn,{}),o?null:g(zn,{}),o?g(Oa,{}):null,g(Dn,{}),g(_a,{}),g(Ra,{})]}):"AZURE"===i.authenticationMethod?g(ba,{msalInstance:e}):g(Na,{})]})},va=be({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,authenticationMethod:"APP",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}}}),La=va.actions;var Sa=va.reducer;const Ma={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"},persons:{autoLoad:!0,data:[],url:"api/v1/public/person/all"}},Da={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"},ka=200,Ua=400,xa=400,Fa=499,Ba=500,qa=599,Wa="GET",Ga="POST",Ha=[Da.OPENID_SCOPE,Da.PROFILE_SCOPE,Da.OFFLINE_ACCESS_SCOPE],Ya=[...Ha,Da.EMAIL_SCOPE],Ka="Content-Type",Va="Content-Length",za="Retry-After",Qa="X-AnchorMailbox",$a="x-ms-request-id",ja="x-ms-httpver",Za="active-account-filters",Ja="common",Xa="organizations",es="consumers",ts="access_token",is="xms_cc",os="login",rs="select_account",ns="consent",as="none",ss="no_session",ls="code",ds="id_token token refresh_token",cs="query",ps="fragment",us="query",hs="authorization_code",ms="refresh_token",fs="MSSTS",gs="ADFS",Ts="Generic",As="-",ys=".",Is={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},_s="appmetadata",Es="1",Os="authority-metadata",Cs=86400,Ns="config",Rs="cache",bs="network",Ps="hardcoded_values",ws={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"},vs={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Ls=60,Ss=3600,Ms="throttling",Ds="retry-after, h429",ks="invalid_grant",Us="client_mismatch",xs="1",Fs="3",Bs="4",qs="2",Ws="4",Gs="5",Hs="0",Ys="1",Ks="2",Vs="3",zs="4",Qs="pop",$s="unexpected_error",js="post_request_failed",Zs={[$s]:"Unexpected error in authentication.",[js]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};
|
|
38
38
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class Js extends Error{constructor(e,t,i){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,Js.prototype),this.errorCode=e||Da.EMPTY_STRING,this.errorMessage=t||Da.EMPTY_STRING,this.subError=i||Da.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function Xs(e,t){return new Js(e,t?`${Zs[e]} ${t}`:Zs[e])}
|
|
39
39
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const el="client_info_decoding_error",tl="client_info_empty_error",il="token_parsing_error",ol="null_or_empty_token",rl="endpoints_resolution_error",nl="network_error",al="openid_config_error",sl="hash_not_deserialized",ll="invalid_state",dl="state_mismatch",cl="state_not_found",pl="nonce_mismatch",ul="auth_time_not_found",hl="max_age_transpired",ml="multiple_matching_tokens",fl="multiple_matching_accounts",gl="multiple_matching_appMetadata",Tl="request_cannot_be_made",Al="cannot_remove_empty_scope",yl="cannot_append_scopeset",Il="empty_input_scopeset",_l="device_code_polling_cancelled",El="device_code_expired",Ol="device_code_unknown_error",Cl="no_account_in_silent_request",Nl="invalid_cache_record",Rl="invalid_cache_environment",bl="no_account_found",Pl="no_crypto_object",wl="unexpected_credential_type",vl="invalid_assertion",Ll="invalid_client_credential",Sl="token_refresh_required",Ml="user_timeout_reached",Dl="token_claims_cnf_required_for_signedjwt",kl="authorization_code_missing_from_server_response",Ul="binding_key_not_removed",xl="end_session_endpoint_not_supported",Fl="key_id_missing",Bl="no_network_connectivity",ql="user_canceled",Wl="missing_tenant_id_error",Gl="method_not_implemented",Hl="nested_app_auth_bridge_disabled",Yl={[el]:"The client info could not be parsed/decoded correctly",[tl]:"The client info was empty",[il]:"Token cannot be parsed",[ol]:"The token is null or empty",[rl]:"Endpoints cannot be resolved",[nl]:"Network request failed",[al]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[sl]:"The hash parameters could not be deserialized",[ll]:"State was not the expected format",[dl]:"State mismatch error",[cl]:"State not found",[pl]:"Nonce mismatch error",[ul]:"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.",[hl]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[ml]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[fl]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[gl]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Tl]:"Token request cannot be made without authorization code or refresh token.",[Al]:"Cannot remove null or empty scope from ScopeSet",[yl]:"Cannot append ScopeSet",[Il]:"Empty input ScopeSet cannot be processed",[_l]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[El]:"Device code is expired.",[Ol]:"Device code stopped polling for unknown reasons.",[Cl]:"Please pass an account object, silent flow is not supported without account information",[Nl]:"Cache record object was null or undefined.",[Rl]:"Invalid environment when attempting to create cache entry",[bl]:"No account found in cache for given key.",[Pl]:"No crypto object detected.",[wl]:"Unexpected credential type.",[vl]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[Ll]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[Sl]:"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.",[Ml]:"User defined timeout for device code polling reached",[Dl]:"Cannot generate a POP jwt if the token_claims are not populated",[kl]:"Server response does not contain an authorization code to proceed",[Ul]:"Could not remove the credential's binding key from storage.",[xl]:"The provided authority does not support logout",[Fl]:"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.",[Bl]:"No network connectivity. Check your internet connection.",[ql]:"User cancelled the flow.",[Wl]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Gl]:"This method has not been implemented",[Hl]:"The nested app auth bridge is disabled"};class Kl extends Js{constructor(e,t){super(e,t?`${Yl[e]}: ${t}`:Yl[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Kl.prototype)}}function Vl(e,t){return new Kl(e,t)}
|
|
40
40
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const zl={createNewGuid:()=>{throw Vl(Gl)},base64Decode:()=>{throw Vl(Gl)},base64Encode:()=>{throw Vl(Gl)},base64UrlEncode:()=>{throw Vl(Gl)},encodeKid:()=>{throw Vl(Gl)},async getPublicKeyThumbprint(){throw Vl(Gl)},async removeTokenBindingKey(){throw Vl(Gl)},async clearKeystore(){throw Vl(Gl)},async signJwt(){throw Vl(Gl)},async hashString(){throw Vl(Gl)}};
|
|
41
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */var
|
|
41
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */var Ql;!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"}(Ql||(Ql={}));class $l{constructor(e,t,i){this.level=Ql.Info;const o=e||$l.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||(()=>{}),this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level="number"==typeof o.logLevel?o.logLevel:Ql.Info,this.correlationId=o.correlationId||Da.EMPTY_STRING,this.packageName=t||Da.EMPTY_STRING,this.packageVersion=i||Da.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ql.Info}}clone(e,t,i){return new $l({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} : ${Ql[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:Ql.Error,containsPii:!1,correlationId:t||Da.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Ql.Error,containsPii:!0,correlationId:t||Da.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Ql.Warning,containsPii:!1,correlationId:t||Da.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Ql.Warning,containsPii:!0,correlationId:t||Da.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Ql.Info,containsPii:!1,correlationId:t||Da.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Ql.Info,containsPii:!0,correlationId:t||Da.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Ql.Verbose,containsPii:!1,correlationId:t||Da.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Ql.Verbose,containsPii:!0,correlationId:t||Da.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Ql.Trace,containsPii:!1,correlationId:t||Da.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Ql.Trace,containsPii:!0,correlationId:t||Da.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
|
|
42
42
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const jl="@azure/msal-common",Zl="15.12.0",Jl="none",Xl="redirect_uri_empty",ed="claims_request_parsing_error",td="authority_uri_insecure",id="url_parse_error",od="empty_url_error",rd="empty_input_scopes_error",nd="invalid_claims",ad="token_request_empty",sd="logout_request_empty",ld="invalid_code_challenge_method",dd="pkce_params_missing",cd="invalid_cloud_discovery_metadata",pd="invalid_authority_metadata",ud="untrusted_authority",hd="missing_ssh_jwk",md="missing_ssh_kid",fd="missing_nonce_authentication_header",gd="invalid_authentication_header",Td="cannot_set_OIDCOptions",Ad="cannot_allow_platform_broker",yd="authority_mismatch",Id="invalid_request_method_for_EAR",_d="invalid_authorize_post_body_parameters",Ed={[Xl]:"A redirect URI is required for all calls, and none has been set.",[ed]:"Could not parse the given claims request object.",[td]:"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",[id]:"URL could not be parsed into appropriate segments.",[od]:"URL was empty or null.",[rd]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[nd]:"Given claims parameter must be a stringified JSON object.",[ad]:"Token request was empty and not found in cache.",[sd]:"The logout request was null or undefined.",[ld]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[dd]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[cd]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[pd]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[ud]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[hd]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[md]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[fd]:"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.",[gd]:"Invalid authentication header provided",[Td]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Ad]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[yd]:"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.",[_d]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[Id]:"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 Od extends Js{constructor(e){super(e,Ed[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,Od.prototype)}}function Cd(e){return new Od(e)}
|
|
43
43
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class Nd{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
44
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class Rd{constructor(e){const t=e?Nd.trimArrayEntries([...e]):[],i=t?Nd.removeEmptyStringsFromArray(t):[];if(!i||!i.length)throw Cd(rd);this.scopes=new Set,i.forEach(e=>this.scopes.add(e))}static fromString(e){const t=(e||Da.EMPTY_STRING).split(" ");return new Rd(t)}static createSearchScopes(e){const t=e&&e.length>0?e:[...Ha],i=new Rd(t);return i.containsOnlyOIDCScopes()?i.removeScope(Da.OFFLINE_ACCESS_SCOPE):i.removeOIDCScopes(),i}containsScope(e){const t=this.printScopesLowerCase().split(" "),i=new Rd(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 Ya.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 Vl(yl)}}removeScope(e){if(!e)throw Vl(Al);this.scopes.delete(e.trim())}removeOIDCScopes(){Ya.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw Vl(Il);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 Vl(Il);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 Da.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
|
|
@@ -48,17 +48,17 @@ function(e,t){const i=St(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
|
|
|
48
48
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class xd{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Cd(od);e.includes("#")||(this._urlString=xd.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Nd.endsWith(t,"?")?t=t.slice(0,-1):Nd.endsWith(t,"?/")&&(t=t.slice(0,-2)),Nd.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw Cd(id)}if(!e.HostNameAndPort||!e.PathSegments)throw Cd(id);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw Cd(td)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return xd.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),i=t.PathSegments;return!e||0===i.length||i[0]!==Ja&&i[0]!==Xa||(i[0]=e),xd.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Cd(id);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 Cd(id);return i[2]}static getAbsoluteUrl(e,t){if(e[0]===Da.FORWARD_SLASH){const i=new xd(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new xd(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!Dd(e)}}
|
|
49
49
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const Fd={"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"}},Bd={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"]}]},qd=new Set;function Wd(e,t,i,o){if(o?.trace(`getAliasesFromMetadata called with source: ${i}`),e&&t){const r=Gd(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 Gd(e,t){for(let i=0;i<e.length;i++){const o=e[i];if(o.aliases.includes(t))return o}return null}
|
|
50
50
|
/*! @azure/msal-common v15.12.0 2025-08-19 */Bd.metadata.forEach(e=>{e.aliases.forEach(e=>{qd.add(e)})});const Hd="cache_quota_exceeded",Yd="cache_error_unknown",Kd={[Hd]:"Exceeded cache storage capacity.",[Yd]:"Unexpected error occurred when using cache storage."};class Vd extends Js{constructor(e,t){const i=t||(Kd[e]?Kd[e]:Kd[Yd]);super(`${e}: ${i}`),Object.setPrototypeOf(this,Vd.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=i}}function zd(e){return e instanceof Error?"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?new Vd(Hd):new Vd(e.name,e.message):new Vd(Yd)}
|
|
51
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class $d{constructor(e,t,i,o,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=i.clone(jl,Zl),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=vd(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,r))?null:(a=wd(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 Vl(Nl);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 Js?e:zd(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=Rd.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)){Rd.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===Is.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===vs.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()!==Is.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||i.tokenType!==vs.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:Is.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=Rd.createSearchScopes(t.scopes),a=t.authenticationScheme||vs.BEARER,s=a.toLowerCase()!==vs.BEARER.toLowerCase()?Is.ACCESS_TOKEN_WITH_AUTH_SCHEME:Is.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 p=c.length;return p<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):p>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?Es:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Is.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 Vl(gl);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==Es)}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 xd(o).getUrlComponents().HostNameAndPort;i=Wd(r,e.cloudDiscoveryMetadata?.metadata,Ns,t)||Wd(r,Bd.metadata,Ps,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!==Is.ACCESS_TOKEN&&e.credentialType!==Is.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return Rd.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(_s)}isAuthorityMetadata(e){return-1!==e.indexOf(Os)}generateAuthorityMetadataCacheKey(e){return`${Os}-${this.clientId}-${e}`}static toObject(e,t){for(const i in t)e[i]=t[i];return e}}class Qd extends $d{async setAccount(){throw Vl(Gl)}getAccount(){throw Vl(Gl)}async setIdTokenCredential(){throw Vl(Gl)}getIdTokenCredential(){throw Vl(Gl)}async setAccessTokenCredential(){throw Vl(Gl)}getAccessTokenCredential(){throw Vl(Gl)}async setRefreshTokenCredential(){throw Vl(Gl)}getRefreshTokenCredential(){throw Vl(Gl)}setAppMetadata(){throw Vl(Gl)}getAppMetadata(){throw Vl(Gl)}setServerTelemetry(){throw Vl(Gl)}getServerTelemetry(){throw Vl(Gl)}setAuthorityMetadata(){throw Vl(Gl)}getAuthorityMetadata(){throw Vl(Gl)}getAuthorityMetadataKeys(){throw Vl(Gl)}setThrottlingCache(){throw Vl(Gl)}getThrottlingCache(){throw Vl(Gl)}removeItem(){throw Vl(Gl)}getKeys(){throw Vl(Gl)}getAccountKeys(){throw Vl(Gl)}getTokenKeys(){throw Vl(Gl)}generateCredentialKey(){throw Vl(Gl)}generateAccountKey(){throw Vl(Gl)}}
|
|
52
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const jd="AAD",Zd="OIDC",Jd="EAR",Xd="acquireTokenByCode",ec="acquireTokenByRefreshToken",tc="acquireTokenSilent",ic="acquireTokenSilentAsync",oc="acquireTokenPopup",rc="acquireTokenPreRedirect",nc="acquireTokenRedirect",ac="cryptoOptsGetPublicKeyThumbprint",sc="cryptoOptsSignJwt",lc="silentCacheClientAcquireToken",dc="silentIframeClientAcquireToken",cc="awaitConcurrentIframe",pc="silentRefreshClientAcquireToken",uc="ssoSilent",hc="standardInteractionClientGetDiscoveredAuthority",mc="nativeInteractionClientAcquireToken",fc="networkClientSendPostRequestAsync",gc="refreshTokenClientExecutePostToTokenEndpoint",Tc="authorizationCodeClientExecutePostToTokenEndpoint",Ac="refreshTokenClientExecuteTokenRequest",yc="refreshTokenClientAcquireToken",Ic="refreshTokenClientAcquireTokenWithCachedRefreshToken",_c="refreshTokenClientAcquireTokenByRefreshToken",Ec="refreshTokenClientCreateTokenRequestBody",Oc="acquireTokenFromCache",Cc="silentFlowClientAcquireCachedToken",Nc="silentFlowClientGenerateResultFromCacheRecord",Rc="acquireTokenBySilentIframe",bc="initializeBaseRequest",Pc="initializeSilentRequest",wc="initializeClientApplication",vc="initializeCache",Lc="silentIframeClientTokenHelper",Sc="silentHandlerInitiateAuthRequest",Mc="silentHandlerMonitorIframeForHash",Dc="silentHandlerLoadFrame",kc="silentHandlerLoadFrameSync",Uc="standardInteractionClientCreateAuthCodeClient",xc="standardInteractionClientGetClientConfiguration",Fc="standardInteractionClientInitializeAuthorizationRequest",Bc="getAuthCodeUrl",qc="getStandardParams",Wc="handleCodeResponseFromServer",Gc="handleCodeResponse",Hc="handleResponseEar",Yc="handleResponsePlatformBroker",Kc="handleResponseCode",Vc="updateTokenEndpointAuthority",zc="authClientAcquireToken"
|
|
51
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Qd{constructor(e,t,i,o,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=i.clone(jl,Zl),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=vd(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,r))?null:(a=wd(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 Vl(Nl);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 Js?e:zd(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=Rd.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)){Rd.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===Is.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===vs.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()!==Is.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||i.tokenType!==vs.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:Is.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=Rd.createSearchScopes(t.scopes),a=t.authenticationScheme||vs.BEARER,s=a.toLowerCase()!==vs.BEARER.toLowerCase()?Is.ACCESS_TOKEN_WITH_AUTH_SCHEME:Is.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 p=c.length;return p<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):p>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?Es:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Is.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 Vl(gl);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==Es)}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 xd(o).getUrlComponents().HostNameAndPort;i=Wd(r,e.cloudDiscoveryMetadata?.metadata,Ns,t)||Wd(r,Bd.metadata,Ps,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!==Is.ACCESS_TOKEN&&e.credentialType!==Is.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return Rd.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(_s)}isAuthorityMetadata(e){return-1!==e.indexOf(Os)}generateAuthorityMetadataCacheKey(e){return`${Os}-${this.clientId}-${e}`}static toObject(e,t){for(const i in t)e[i]=t[i];return e}}class $d extends Qd{async setAccount(){throw Vl(Gl)}getAccount(){throw Vl(Gl)}async setIdTokenCredential(){throw Vl(Gl)}getIdTokenCredential(){throw Vl(Gl)}async setAccessTokenCredential(){throw Vl(Gl)}getAccessTokenCredential(){throw Vl(Gl)}async setRefreshTokenCredential(){throw Vl(Gl)}getRefreshTokenCredential(){throw Vl(Gl)}setAppMetadata(){throw Vl(Gl)}getAppMetadata(){throw Vl(Gl)}setServerTelemetry(){throw Vl(Gl)}getServerTelemetry(){throw Vl(Gl)}setAuthorityMetadata(){throw Vl(Gl)}getAuthorityMetadata(){throw Vl(Gl)}getAuthorityMetadataKeys(){throw Vl(Gl)}setThrottlingCache(){throw Vl(Gl)}getThrottlingCache(){throw Vl(Gl)}removeItem(){throw Vl(Gl)}getKeys(){throw Vl(Gl)}getAccountKeys(){throw Vl(Gl)}getTokenKeys(){throw Vl(Gl)}generateCredentialKey(){throw Vl(Gl)}generateAccountKey(){throw Vl(Gl)}}
|
|
52
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const jd="AAD",Zd="OIDC",Jd="EAR",Xd="acquireTokenByCode",ec="acquireTokenByRefreshToken",tc="acquireTokenSilent",ic="acquireTokenSilentAsync",oc="acquireTokenPopup",rc="acquireTokenPreRedirect",nc="acquireTokenRedirect",ac="cryptoOptsGetPublicKeyThumbprint",sc="cryptoOptsSignJwt",lc="silentCacheClientAcquireToken",dc="silentIframeClientAcquireToken",cc="awaitConcurrentIframe",pc="silentRefreshClientAcquireToken",uc="ssoSilent",hc="standardInteractionClientGetDiscoveredAuthority",mc="nativeInteractionClientAcquireToken",fc="networkClientSendPostRequestAsync",gc="refreshTokenClientExecutePostToTokenEndpoint",Tc="authorizationCodeClientExecutePostToTokenEndpoint",Ac="refreshTokenClientExecuteTokenRequest",yc="refreshTokenClientAcquireToken",Ic="refreshTokenClientAcquireTokenWithCachedRefreshToken",_c="refreshTokenClientAcquireTokenByRefreshToken",Ec="refreshTokenClientCreateTokenRequestBody",Oc="acquireTokenFromCache",Cc="silentFlowClientAcquireCachedToken",Nc="silentFlowClientGenerateResultFromCacheRecord",Rc="acquireTokenBySilentIframe",bc="initializeBaseRequest",Pc="initializeSilentRequest",wc="initializeClientApplication",vc="initializeCache",Lc="silentIframeClientTokenHelper",Sc="silentHandlerInitiateAuthRequest",Mc="silentHandlerMonitorIframeForHash",Dc="silentHandlerLoadFrame",kc="silentHandlerLoadFrameSync",Uc="standardInteractionClientCreateAuthCodeClient",xc="standardInteractionClientGetClientConfiguration",Fc="standardInteractionClientInitializeAuthorizationRequest",Bc="getAuthCodeUrl",qc="getStandardParams",Wc="handleCodeResponseFromServer",Gc="handleCodeResponse",Hc="handleResponseEar",Yc="handleResponsePlatformBroker",Kc="handleResponseCode",Vc="updateTokenEndpointAuthority",zc="authClientAcquireToken",Qc="authClientExecuteTokenRequest",$c="authClientCreateTokenRequestBody",jc="popTokenGenerateCnf",Zc="popTokenGenerateKid",Jc="handleServerTokenResponse",Xc="deserializeResponse",ep="authorityFactoryCreateDiscoveredInstance",tp="authorityResolveEndpointsAsync",ip="authorityGetCloudDiscoveryMetadataFromNetwork",op="authorityUpdateCloudDiscoveryMetadata",rp="authorityGetEndpointMetadataFromNetwork",np="authorityUpdateEndpointMetadata",ap="authorityUpdateMetadataWithRegionalInformation",sp="regionDiscoveryDetectRegion",lp="regionDiscoveryGetRegionFromIMDS",dp="regionDiscoveryGetCurrentVersion",cp="acquireTokenByCodeAsync",pp="handleRedirectPromise",up="handleNativeRedirectPromise",hp="nativeMessageHandlerHandshake",mp="removeHiddenIframe",fp="clearTokensAndKeysWithClaims",gp="cacheManagerGetRefreshToken",Tp="importExistingCache",Ap="setUserData",yp="localStorageUpdated",Ip="generatePkceCodes",_p="generateCodeVerifier",Ep="generateCodeChallengeFromVerifier",Op="sha256Digest",Cp="getRandomValues",Np="generateHKDF",Rp="generateBaseKey",bp="base64Decode",Pp="urlEncodeArr",wp="encrypt",vp="decrypt",Lp="generateEarKey",Sp="decryptEarResponse",Mp=1;
|
|
53
53
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
54
54
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
55
55
|
class Dp{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class kp{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:Mp,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new Dp}}startPerformanceMeasurement(){return new Dp}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 Up={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},xp={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel
|
|
56
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Up={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},xp={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ql.Info,correlationId:Da.EMPTY_STRING},Fp={claimsBasedCachingEnabled:!1},Bp={async sendGetRequestAsync(){throw Vl(Gl)},async sendPostRequestAsync(){throw Vl(Gl)}},qp={sku:Da.SKU,version:Zl,cpu:Da.EMPTY_STRING,os:Da.EMPTY_STRING},Wp={clientSecret:Da.EMPTY_STRING,clientAssertion:void 0},Gp={azureCloudInstance:Jl,tenant:`${Da.DEFAULT_COMMON_TENANT}`},Hp={application:{appName:"",appVersion:""}};function Yp(e){return e.authOptions.authority.options.protocolMode===Zd}
|
|
57
57
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const Kp="home_account_id",Vp="UPN";
|
|
58
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */function zp(e,t){if(!e)throw Vl(tl);try{const i=t(e);return JSON.parse(i)}catch(e){throw Vl(el)}}function
|
|
59
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
58
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function zp(e,t){if(!e)throw Vl(tl);try{const i=t(e);return JSON.parse(i)}catch(e){throw Vl(el)}}function Qp(e){if(!e)throw Vl(el);const t=e.split(ys,2);return{uid:t[0],utid:t.length<2?Da.EMPTY_STRING:t[1]}}
|
|
59
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const $p="client_id",jp="redirect_uri",Zp="token_type",Jp="req_cnf",Xp="return_spa_code",eu="x-client-xtra-sku",tu="brk_client_id",iu="brk_redirect_uri",ou="instance_aware";
|
|
60
60
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
61
|
-
function ru(e,t,i){if(!t)return;const o=e.get(
|
|
61
|
+
function ru(e,t,i){if(!t)return;const o=e.get($p);o&&e.has(tu)&&i?.addFields({embeddedClientId:o,embeddedRedirectUri:e.get(jp)},t)}function nu(e,t){e.set("response_type",t)}function au(e,t,i=!0,o=Ha){!i||o.includes("openid")||t.includes("openid")||o.push("openid");const r=i?[...t||[],...o]:t||[],n=new Rd(r);e.set("scope",n.printScopes())}function su(e,t){e.set($p,t)}function lu(e,t){e.set(jp,t)}function du(e,t){e.set("login_hint",t)}function cu(e,t){e.set(Qa,`UPN:${t}`)}function pu(e,t){e.set(Qa,`Oid:${t.uid}@${t.utid}`)}function uu(e,t){e.set("sid",t)}function hu(e,t,i){const o=function(e,t){let i;if(e)try{i=JSON.parse(e)}catch(e){throw Cd(nd)}else i={};t&&t.length>0&&(i.hasOwnProperty(ts)||(i[ts]={}),i[ts][is]={values:t});return JSON.stringify(i)}(t,i);try{JSON.parse(o)}catch(e){throw Cd(nd)}e.set("claims",o)}function mu(e,t){e.set("client-request-id",t)}function fu(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 gu(e,t){t?.appName&&e.set("x-app-name",t.appName),t?.appVersion&&e.set("x-app-ver",t.appVersion)}function Tu(e,t){t&&e.set("state",t)}function Au(e,t,i){if(!t||!i)throw Cd(dd);e.set("code_challenge",t),e.set("code_challenge_method",i)}function yu(e,t){e.set("client_secret",t)}function Iu(e,t){t&&e.set("client_assertion",t)}function _u(e,t){t&&e.set("client_assertion_type",t)}function Eu(e,t){e.set("grant_type",t)}function Ou(e){e.set("client_info","1")}function Cu(e){e.has(ou)||e.set(ou,"true")}function Nu(e,t){Object.entries(t).forEach(([t,i])=>{!e.has(t)&&i&&e.set(t,i)})}function Ru(e,t){t&&(e.set(Zp,vs.POP),e.set(Jp,t))}function bu(e,t){t&&(e.set(Zp,vs.SSH),e.set(Jp,t))}function Pu(e,t){e.set("x-client-current-telemetry",t.generateCurrentRequestHeaderValue()),e.set("x-client-last-telemetry",t.generateLastRequestHeaderValue())}function wu(e){e.set("x-ms-lib-capability",Ds)}function vu(e,t,i){e.has(tu)||e.set(tu,t),e.has(iu)||e.set(iu,i)}
|
|
62
62
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
63
63
|
const Lu=0,Su=1,Mu=2,Du=3;
|
|
64
64
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
@@ -69,8 +69,8 @@ class xu{constructor(e,t,i,o){this.networkInterface=e,this.logger=t,this.perform
|
|
|
69
69
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
70
70
|
function Fu(){return Math.round((new Date).getTime()/1e3)}function Bu(e){return e.getTime()/1e3}function qu(e){return e?new Date(1e3*Number(e)):new Date}function Wu(e,t){const i=Number(e)||0;return Fu()+t>i}function Gu(e,t){const i=Number(e)+24*t*60*60*1e3;return Date.now()>i}
|
|
71
71
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
72
|
-
function Hu(e,t,i,o,r){return{credentialType:Is.ID_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,realm:r,lastUpdatedAt:Date.now().toString()}}function Yu(e,t,i,o,r,n,a,s,l,d,c,p,u,h,m){const f={homeAccountId:e,credentialType:Is.ACCESS_TOKEN,secret:i,cachedAt:Fu().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:o,realm:r,target:n,tokenType:c||vs.BEARER,lastUpdatedAt:Date.now().toString()};if(p&&(f.userAssertionHash=p),d&&(f.refreshOn=d.toString()),h&&(f.requestedClaims=h,f.requestedClaimsHash=m),f.tokenType?.toLowerCase()!==vs.BEARER.toLowerCase())switch(f.credentialType=Is.ACCESS_TOKEN_WITH_AUTH_SCHEME,f.tokenType){case vs.POP:const e=vd(i,l);if(!e?.cnf?.kid)throw Vl(Dl);f.keyId=e.cnf.kid;break;case vs.SSH:f.keyId=u}return f}function Ku(e,t,i,o,r,n,a){const s={credentialType:Is.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 Vu(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function zu(e){return!!e&&(Vu(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===Is.ACCESS_TOKEN||e.credentialType===Is.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function
|
|
73
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */xu.IMDS_OPTIONS={headers:{Metadata:"true"}};class Xu{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 xu(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(Da.CIAM_AUTH_URL))return Du;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case Da.ADFS:return Su;case Da.DSTS:return Mu}return Lu}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 xd(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 Vl(rl)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Vl(rl)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Vl(rl)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Vl(xl);return this.replacePath(this.metadata.end_session_endpoint)}throw Vl(rl)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Vl(rl)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Vl(rl)}canReplaceTenant(e){return 1===e.PathSegments.length&&!Xu.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Lu&&this.protocolMode!==Zd}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new xd(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 xd(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===Su||this.protocolMode===Zd&&!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(tp,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await Uu(this.updateCloudDiscoveryMetadata.bind(this),op,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const i=await Uu(this.updateEndpointMetadata.bind(this),np,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
|
|
72
|
+
function Hu(e,t,i,o,r){return{credentialType:Is.ID_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,realm:r,lastUpdatedAt:Date.now().toString()}}function Yu(e,t,i,o,r,n,a,s,l,d,c,p,u,h,m){const f={homeAccountId:e,credentialType:Is.ACCESS_TOKEN,secret:i,cachedAt:Fu().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:o,realm:r,target:n,tokenType:c||vs.BEARER,lastUpdatedAt:Date.now().toString()};if(p&&(f.userAssertionHash=p),d&&(f.refreshOn=d.toString()),h&&(f.requestedClaims=h,f.requestedClaimsHash=m),f.tokenType?.toLowerCase()!==vs.BEARER.toLowerCase())switch(f.credentialType=Is.ACCESS_TOKEN_WITH_AUTH_SCHEME,f.tokenType){case vs.POP:const e=vd(i,l);if(!e?.cnf?.kid)throw Vl(Dl);f.keyId=e.cnf.kid;break;case vs.SSH:f.keyId=u}return f}function Ku(e,t,i,o,r,n,a){const s={credentialType:Is.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 Vu(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function zu(e){return!!e&&(Vu(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===Is.ACCESS_TOKEN||e.credentialType===Is.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function Qu(e){return!!e&&(Vu(e)&&e.credentialType===Is.REFRESH_TOKEN)}function $u(){return Fu()+Cs}function ju(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 Zu(e,t,i){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=i}function Ju(e){return e.expiresAt<=Fu()}
|
|
73
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */xu.IMDS_OPTIONS={headers:{Metadata:"true"}};class Xu{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 xu(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(Da.CIAM_AUTH_URL))return Du;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case Da.ADFS:return Su;case Da.DSTS:return Mu}return Lu}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 xd(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 Vl(rl)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Vl(rl)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Vl(rl)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Vl(xl);return this.replacePath(this.metadata.end_session_endpoint)}throw Vl(rl)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Vl(rl)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Vl(rl)}canReplaceTenant(e){return 1===e.PathSegments.length&&!Xu.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Lu&&this.protocolMode!==Zd}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new xd(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 xd(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===Su||this.protocolMode===Zd&&!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(tp,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await Uu(this.updateCloudDiscoveryMetadata.bind(this),op,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const i=await Uu(this.updateEndpointMetadata.bind(this),np,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:$u(),jwks_uri:""}),e}updateCachedMetadata(e,t,i){t!==Rs&&i?.source!==Rs&&(e.expiresAt=$u(),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(np,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Ps&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata){ju(e,await Uu(this.updateMetadataWithRegionalInformation.bind(this),ap,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority}return t.source}let i=await Uu(this.getEndpointMetadataFromNetwork.bind(this),rp,this.logger,this.performanceClient,this.correlationId)();if(i)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(i=await Uu(this.updateMetadataWithRegionalInformation.bind(this),ap,this.logger,this.performanceClient,this.correlationId)(i)),ju(e,i,!0),bs;throw Vl(al,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"),ju(e,t,!1),{source:Ns};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 ju(e,t,!1),{source:Ps,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=Ju(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!i?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Rs}):(i&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new xd(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 Cd(pd)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(rp,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
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 Fd?Fd[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(ap,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==Da.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=qs,this.regionDiscoveryMetadata.region_used=t,Xu.replaceWithRegionalInformation(e,t);const i=await Uu(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),sp,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(i)return this.regionDiscoveryMetadata.region_outcome=Ws,this.regionDiscoveryMetadata.region_used=i,Xu.replaceWithRegionalInformation(e,i);this.regionDiscoveryMetadata.region_outcome=Gs}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(op,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const i=await Uu(this.getCloudDiscoveryMetadataFromNetwork.bind(this),ip,this.logger,this.performanceClient,this.correlationId)();if(i)return Zu(e,i,!0),bs;throw Cd(ud)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||Da.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||Da.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||Da.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Zu(e,t,!1),Ns;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,Gd(Bd.metadata,i));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Zu(e,t,!1),Ps;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=Ju(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!o?(this.logger.verbose("Found cloud discovery metadata in the cache."),Rs):(o&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Du)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Xu.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=Gd(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."),Cd(cd)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Xu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(ip,this.correlationId);const e=`${Da.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
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===Da.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=Gd(n,this.hostnameAndPort)}catch(e){if(e instanceof Js)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=Xu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),i}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&xd.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let i;if(t&&t.azureCloudInstance!==Jl){const e=t.tenant?t.tenant:Da.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 Da.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Vl(rl)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return qd.has(e)}static isPublicCloudAuthority(e){return Da.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,i){const o=new xd(e);o.validateAsUri();const r=o.getUrlComponents();let n=`${t}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(n=`${t}.${Da.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=xd.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:n}).urlString;return i?`${a}?${i}`:a}static replaceWithRegionalInformation(e,t){const i={...e};return i.authorization_endpoint=Xu.buildRegionalAuthorityString(i.authorization_endpoint,t),i.token_endpoint=Xu.buildRegionalAuthorityString(i.token_endpoint,t),i.end_session_endpoint&&(i.end_session_endpoint=Xu.buildRegionalAuthorityString(i.end_session_endpoint,t)),i}static transformCIAMAuthority(e){let t=e;const i=new xd(e).getUrlComponents();if(0===i.PathSegments.length&&i.HostNameAndPort.endsWith(Da.CIAM_AUTH_URL)){t=`${t}${i.HostNameAndPort.split(".")[0]}${Da.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}function eh(e){return e.endsWith(Da.FORWARD_SLASH)?e:`${e}${Da.FORWARD_SLASH}`}
|
|
76
76
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
@@ -79,7 +79,7 @@ async function th(e,t,i,o,r,n,a){a?.addQueueMeasurement(ep,n);const s=Xu.transfo
|
|
|
79
79
|
/*! @azure/msal-common v15.12.0 2025-08-19 */function oh(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
80
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class rh{static generateThrottlingStorageKey(e){return`${Ms}.${JSON.stringify(e)}`}static preProcess(e,t,i){const o=rh.generateThrottlingStorageKey(t),r=e.getThrottlingCache(o);if(r){if(r.throttleTime<Date.now())return void e.removeItem(o,i);throw new ih(r.errorCodes?.join(" ")||Da.EMPTY_STRING,r.errorMessage,r.subError)}}static postProcess(e,t,i,o){if(rh.checkResponseStatus(i)||rh.checkResponseForRetryAfter(i)){const r={throttleTime:rh.calculateThrottleTime(parseInt(i.headers[za])),error:i.body.error,errorCodes:i.body.error_codes,errorMessage:i.body.error_description,subError:i.body.suberror};e.setThrottlingCache(rh.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(za)&&(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||Ls),i+Ss))}static removeThrottle(e,t,i,o){const r=oh(t,i,o),n=this.generateThrottlingStorageKey(r);e.removeItem(n,i.correlationId)}}
|
|
81
81
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class nh extends Js{constructor(e,t,i){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,nh.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=i}}function ah(e,t,i,o){return e.errorMessage=`${e.errorMessage}, additionalErrorInfo: error.name:${o?.name}, error.message:${o?.message}`,new nh(e,t,i)}
|
|
82
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class sh{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:p,serializableCache:u}){const h={...xp,...i};return{authOptions:(m=e,{clientCapabilities:[],azureCloudOptions:Gp,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...m}),systemOptions:{...Up,...t},loggerOptions:h,cacheOptions:{...Fp,...o},storageInterface:r||new
|
|
82
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class sh{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:p,serializableCache:u}){const h={...xp,...i};return{authOptions:(m=e,{clientCapabilities:[],azureCloudOptions:Gp,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...m}),systemOptions:{...Up,...t},loggerOptions:h,cacheOptions:{...Fp,...o},storageInterface:r||new $d(e.clientId,zl,new $l(h),new kp),networkInterface:n||Bp,cryptoInterface:a||zl,clientCredentials:s||Wp,libraryInfo:{...qp,...l},telemetry:{...Hp,...d},serverTelemetryManager:c||null,persistencePlugin:p||null,serializableCache:u||null};var m}(e),this.logger=new $l(this.config.loggerOptions,jl,Zl),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[Ka]=Da.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Kp:try{const i=Qp(e.credential);t[Qa]=`Oid:${i.uid}@${i.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Vp:t[Qa]=`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;rh.preProcess(this.cacheManager,e,o);try{r=await Uu(this.networkClient.sendPostRequestAsync.bind(this.networkClient),fc,this.logger,this.performanceClient,o)(t,i);const e=r.headers||{};this.performanceClient?.addFields({refreshTokenSize:r.body.refresh_token?.length||0,httpVerToken:e[ja]||"",requestId:e[$a]||""},o)}catch(e){if(e instanceof nh){const t=e.responseHeaders;throw t&&this.performanceClient?.addFields({httpVerToken:t[ja]||"",requestId:t[$a]||"",contentTypeHeader:t[Ka]||void 0,contentLengthHeader:t[Va]||void 0,httpStatus:e.httpStatus},o),e.error}throw e instanceof Js?e:Vl(nl)}return rh.postProcess(this.cacheManager,e,r,o),r}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(Vc,t);const i=`https://${e}/${this.authority.tenant}/`,o=await th(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&&vu(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenQueryParameters&&Nu(t,e.tokenQueryParameters),mu(t,e.correlationId),ru(t,e.correlationId,this.performanceClient),kd(t)}}
|
|
83
83
|
/*! @azure/msal-common v15.12.0 2025-08-19 */function lh(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
|
|
84
84
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class dh{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 dh;let r;t.authorityType===Su?o.authorityType=gs:t.protocolMode===Zd?o.authorityType=Ts:o.authorityType=fs,e.clientInfo&&i&&(r=zp(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 Vl(Rl);o.environment=n,o.realm=r?.utid||lh(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=Pd(e.homeAccountId,o.localAccountId,o.realm,e.idTokenClaims);o.tenantProfiles=[t]}return o}static createFromAccountInfo(e,t,i){const o=new dh;return o.authorityType=e.authorityType||Ts,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!==Su&&t!==Mu){if(e)try{const t=zp(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
85
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const ch="no_tokens_found",ph="native_account_unavailable",uh="refresh_token_expired",hh="ux_not_allowed",mh="bad_token",fh=["interaction_required","consent_required","login_required",mh,hh],gh=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Th={[ch]:"No refresh token found in the cache. Please sign-in.",[ph]:"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.",[uh]:"Refresh token has expired.",[mh]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[hh]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."};class Ah extends Js{constructor(e,t,i,o,r,n,a,s){super(e,t,i),Object.setPrototypeOf(this,Ah.prototype),this.timestamp=o||Da.EMPTY_STRING,this.traceId=r||Da.EMPTY_STRING,this.correlationId=n||Da.EMPTY_STRING,this.claims=a||Da.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=s}}function yh(e,t,i){const o=!!e&&fh.indexOf(e)>-1,r=!!i&&gh.indexOf(i)>-1,n=!!t&&fh.some(e=>t.indexOf(e)>-1);return o||n||r}function Ih(e){return new Ah(e,Th[e])}
|
|
@@ -88,16 +88,16 @@ async function th(e,t,i,o,r,n,a){a?.addQueueMeasurement(ep,n);const s=Xu.transfo
|
|
|
88
88
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class Ch{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}
|
|
89
89
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class Nh{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||Da.NOT_AVAILABLE} - Timestamp: ${e.timestamp||Da.NOT_AVAILABLE} - Description: ${e.error_description||Da.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||Da.NOT_AVAILABLE} - Trace ID: ${e.trace_id||Da.NOT_AVAILABLE}`,o=e.error_codes?.length?e.error_codes[0]:void 0,r=new ih(e.error,i,e.suberror,o,e.status);if(t&&e.status&&e.status>=Ba&&e.status<=qa)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>=Ua&&e.status<=Fa)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${r}`);if(yh(e.error,e.error_description,e.suberror))throw new Ah(e.error,e.error_description,e.suberror,e.timestamp||Da.EMPTY_STRING,e.trace_id||Da.EMPTY_STRING,e.correlation_id||Da.EMPTY_STRING,e.claims||Da.EMPTY_STRING,o);throw r}}async handleServerTokenResponse(e,t,i,o,r,n,a,s,l){let d,c;if(this.performanceClient?.addQueueMeasurement(Jc,e.correlation_id),e.id_token){if(d=vd(e.id_token||Da.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&d.nonce!==r.nonce)throw Vl(pl);if(o.maxAge||0===o.maxAge){const e=d.auth_time;if(!e)throw Vl(ul);Ld(e,o.maxAge)}}this.homeAccountIdentifier=dh.generateHomeAccountId(e.client_info||Da.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),r&&r.state&&(c=_h.parseRequestState(this.cryptoObj,r.state)),e.key_id=e.key_id||o.sshKid||void 0;const p=this.generateCacheRecord(e,t,i,o,d,n,r);let u;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),u=new Ch(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(u)),a&&!s&&p.account){const e=this.cacheStorage.generateAccountKey(p.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 Nh.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,d,c,void 0,l)}await this.cacheStorage.saveCacheRecord(p,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&u&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(u))}return Nh.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,d,c,e,l)}generateCacheRecord(e,t,i,o,r,n,a){const s=t.getPreferredCache();if(!s)throw Vl(Rl);const l=lh(r);let d,c;e.id_token&&r&&(d=Hu(this.homeAccountIdentifier,s,e.id_token,this.clientId,l||""),c=Rh(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,r,e.client_info,s,l,a,void 0,this.logger));let p=null;if(e.access_token){const r=e.scope?Rd.fromString(e.scope):new Rd(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,u=i+a,h=u+d,m=c&&c>0?i+c:void 0;p=Yu(this.homeAccountIdentifier,s,e.access_token,this.clientId,l||t.tenant||"",r.printScopes(),u,h,this.cryptoObj.base64Decode,m,e.token_type,n,e.key_id,o.claims,o.requestedClaimsHash)}let u=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)}u=Ku(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:p,refreshToken:u,appMetadata:h}}static async generateAuthenticationResult(e,t,i,o,r,n,a,s,l){let d,c,p=Da.EMPTY_STRING,u=[],h=null,m=Da.EMPTY_STRING;if(i.accessToken){if(i.accessToken.tokenType!==vs.POP||r.popKid)p=i.accessToken.secret;else{const t=new Oh(e),{secret:o,keyId:n}=i.accessToken;if(!n)throw Vl(Fl);p=await t.signPopToken(o,n,r)}u=Rd.fromString(i.accessToken.target).asArray(),h=qu(i.accessToken.expiresOn),d=qu(i.accessToken.extendedExpiresOn),i.accessToken.refreshOn&&(c=qu(i.accessToken.refreshOn))}i.appMetadata&&(m=i.appMetadata.familyId===Es?Es:"");const f=n?.oid||n?.sub||"",g=n?.tid||"";s?.spa_accountid&&i.account&&(i.account.nativeAccountId=s?.spa_accountid);const T=i.account?wd(i.account.getAccountInfo(),void 0,n,i.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:f,tenantId:g,scopes:u,account:T,idToken:i?.idToken?.secret||"",idTokenClaims:n||{},accessToken:p,fromCache:o,expiresOn:h,extExpiresOn:d,refreshOn:c,correlationId:r.correlationId,requestId:l||Da.EMPTY_STRING,familyId:m,tokenType:i.accessToken?.tokenType||Da.EMPTY_STRING,state:a?a.userRequestState:Da.EMPTY_STRING,cloudGraphHostName:i.account?.cloudGraphHostName||Da.EMPTY_STRING,msGraphHost:i.account?.msGraphHost||Da.EMPTY_STRING,code:s?.spa_code,fromNativeBroker:!1}}}function Rh(e,t,i,o,r,n,a,s,l,d,c,p){p?.verbose("setCachedAccount called");const u=e.getAccountKeys().find(e=>e.startsWith(i));let h=null;u&&(h=e.getAccount(u,r));const m=h||dh.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=Pd(i,m.localAccountId,g,n);f.push(e)}return m.tenantProfiles=f,m}
|
|
90
90
|
/*! @azure/msal-common v15.12.0 2025-08-19 */async function bh(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 Ph extends sh{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(zc,e.correlationId),!e.code)throw Vl(Tl);const i=Fu(),o=await Uu(this.executeTokenRequest.bind(this)
|
|
92
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class wh extends sh{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(yc,e.correlationId);const t=Fu(),i=await Uu(this.executeTokenRequest.bind(this),Ac,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=i.headers?.[
|
|
91
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Ph extends sh{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(zc,e.correlationId),!e.code)throw Vl(Tl);const i=Fu(),o=await Uu(this.executeTokenRequest.bind(this),Qc,this.logger,this.performanceClient,e.correlationId)(this.authority,e),r=o.headers?.[$a],n=new Nh(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return n.validateTokenResponse(o.body),Uu(n.handleServerTokenResponse.bind(n),Jc,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 Cd(sd);const t=this.createLogoutUrlQueryString(e);return xd.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Qc,t.correlationId);const i=this.createTokenQueryParameters(t),o=xd.appendQueryString(e.tokenEndpoint,i),r=await Uu(this.createTokenRequestBody.bind(this),$c,this.logger,this.performanceClient,t.correlationId)(t);let n;if(t.clientInfo)try{const e=zp(t.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${e.uid}${ys}${e.utid}`,type:Kp}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(n||t.ccsCredential),s=oh(this.config.authOptions.clientId,t);return Uu(this.executePostToTokenEndpoint.bind(this),Tc,this.logger,this.performanceClient,t.correlationId)(o,r,a,s,t.correlationId,Tc)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement($c,e.correlationId);const t=new Map;if(su(t,e.embeddedClientId||e.tokenBodyParameters?.[$p]||this.config.authOptions.clientId),this.includeRedirectUri)lu(t,e.redirectUri);else if(!e.redirectUri)throw Cd(Xl);if(au(t,e.scopes,!0,this.oidcDefaultScopes),function(e,t){e.set("code",t)}(t,e.code),fu(t,this.config.libraryInfo),gu(t,this.config.telemetry.application),wu(t),this.serverTelemetryManager&&!Yp(this.config)&&Pu(t,this.serverTelemetryManager),e.codeVerifier&&function(e,t){e.set("code_verifier",t)}(t,e.codeVerifier),this.config.clientCredentials.clientSecret&&yu(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Iu(t,await bh(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),_u(t,i.assertionType)}if(Eu(t,hs),Ou(t),e.authenticationScheme===vs.POP){const i=new Oh(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await Uu(i.generateCnf.bind(i),jc,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}Ru(t,o)}else if(e.authenticationScheme===vs.SSH){if(!e.sshJwk)throw Cd(hd);bu(t,e.sshJwk)}let i;if((!Nd.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&hu(t,e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=zp(e.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${t.uid}${ys}${t.utid}`,type:Kp}}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 Kp:try{pu(t,Qp(i.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Vp:cu(t,i.credential)}return e.embeddedClientId&&vu(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&Nu(t,e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[Xp]||Nu(t,{[Xp]:"1"}),ru(t,e.correlationId,this.performanceClient),kd(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&&mu(t,e.correlationId),e.idTokenHint&&function(e,t){e.set("id_token_hint",t)}(t,e.idTokenHint),e.state&&Tu(t,e.state),e.logoutHint&&function(e,t){e.set("logout_hint",t)}(t,e.logoutHint),e.extraQueryParameters&&Nu(t,e.extraQueryParameters),this.config.authOptions.instanceAware&&Cu(t),kd(t,this.config.authOptions.encodeExtraQueryParams,e.extraQueryParameters)}}
|
|
92
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class wh extends sh{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(yc,e.correlationId);const t=Fu(),i=await Uu(this.executeTokenRequest.bind(this),Ac,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=i.headers?.[$a],r=new Nh(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(i.body),Uu(r.handleServerTokenResponse.bind(r),Jc,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 Cd(ad);if(this.performanceClient?.addQueueMeasurement(_c,e.correlationId),!e.account)throw Vl(Cl);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await Uu(this.acquireTokenWithCachedRefreshToken.bind(this),Ic,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const i=t instanceof Ah&&t.errorCode===ch,o=t instanceof ih&&t.errorCode===ks&&t.subError===Us;if(i||o)return Uu(this.acquireTokenWithCachedRefreshToken.bind(this),Ic,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return Uu(this.acquireTokenWithCachedRefreshToken.bind(this),Ic,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(Ic,e.correlationId);const i=ku(this.cacheManager.getRefreshToken.bind(this.cacheManager),gp,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!i)throw Ih(ch);if(i.expiresOn&&Wu(i.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),Ih(uh);const o={...e,refreshToken:i.secret,authenticationScheme:e.authenticationScheme||vs.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Kp}};try{return await Uu(this.acquireToken.bind(this),yc,this.logger,this.performanceClient,e.correlationId)(o)}catch(t){if(t instanceof Ah&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),t.subError===mh)){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(Ac,e.correlationId);const i=this.createTokenQueryParameters(e),o=xd.appendQueryString(t.tokenEndpoint,i),r=await Uu(this.createTokenRequestBody.bind(this),Ec,this.logger,this.performanceClient,e.correlationId)(e),n=this.createTokenRequestHeaders(e.ccsCredential),a=oh(this.config.authOptions.clientId,e);return Uu(this.executePostToTokenEndpoint.bind(this),gc,this.logger,this.performanceClient,e.correlationId)(o,r,n,a,e.correlationId,gc)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Ec,e.correlationId);const t=new Map;if(su(t,e.embeddedClientId||e.tokenBodyParameters?.[$p]||this.config.authOptions.clientId),e.redirectUri&&lu(t,e.redirectUri),au(t,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Eu(t,ms),Ou(t),fu(t,this.config.libraryInfo),gu(t,this.config.telemetry.application),wu(t),this.serverTelemetryManager&&!Yp(this.config)&&Pu(t,this.serverTelemetryManager),function(e,t){e.set("refresh_token",t)}(t,e.refreshToken),this.config.clientCredentials.clientSecret&&yu(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Iu(t,await bh(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),_u(t,i.assertionType)}if(e.authenticationScheme===vs.POP){const i=new Oh(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await Uu(i.generateCnf.bind(i),jc,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}Ru(t,o)}else if(e.authenticationScheme===vs.SSH){if(!e.sshJwk)throw Cd(hd);bu(t,e.sshJwk)}if((!Nd.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&hu(t,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Kp:try{pu(t,Qp(e.ccsCredential.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Vp:cu(t,e.ccsCredential.credential)}return e.embeddedClientId&&vu(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&Nu(t,e.tokenBodyParameters),ru(t,e.correlationId,this.performanceClient),kd(t)}}
|
|
93
93
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class vh extends sh{constructor(e,t){super(e,t)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(Cc,e.correlationId);let t=Hs;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Nd.isEmptyObj(e.claims))throw this.setCacheOutcome(Ys,e.correlationId),Vl(Sl);if(!e.account)throw Vl(Cl);const i=e.account.tenantId||function(e){const t=new xd(e).getUrlComponents(),i=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(i){case Ja:case Xa:case es:return;default:return i}}(e.authority),o=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(e.account,e,o,i);if(!r)throw this.setCacheOutcome(Ks,e.correlationId),Vl(Sl);if(n=r.cachedAt,Number(n)>Fu()||Wu(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Vs,e.correlationId),Vl(Sl);var n;r.refreshOn&&Wu(r.refreshOn,0)&&(t=zs);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 Uu(this.generateResultFromCacheRecord.bind(this),Nc,this.logger,this.performanceClient,e.correlationId)(s,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==Hs&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let i;if(this.performanceClient?.addQueueMeasurement(Nc,t.correlationId),e.idToken&&(i=vd(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=i?.auth_time;if(!e)throw Vl(ul);Ld(e,t.maxAge)}return Nh.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,i)}}
|
|
94
94
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const Lh={sendGetRequestAsync:()=>Promise.reject(Vl(Gl)),sendPostRequestAsync:()=>Promise.reject(Vl(Gl))};
|
|
95
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */function Sh(e,t,i,o){const r=t.correlationId,n=new Map;su(n,t.embeddedClientId||t.extraQueryParameters?.[
|
|
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"),du(n,s),o?.addFields({loginHintFromClaim:!0},r);try{pu(n
|
|
95
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function Sh(e,t,i,o){const r=t.correlationId,n=new Map;su(n,t.embeddedClientId||t.extraQueryParameters?.[$p]||e.clientId);if(au(n,[...t.scopes||[],...t.extraScopesToConsent||[]],!0,e.authority.options.OIDCOptions?.defaultScopes),lu(n,t.redirectUri),mu(n,r),function(e,t){e.set("response_mode",t||us)}(n,t.responseMode),Ou(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!==rs)if(t.sid&&t.prompt===as)i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),uu(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"),du(n,s),o?.addFields({loginHintFromClaim:!0},r);try{pu(n,Qp(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e&&t.prompt===as){i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),uu(n,e),o?.addFields({sidFromClaim:!0},r);try{pu(n,Qp(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"),du(n,t.loginHint),cu(n,t.loginHint),o?.addFields({loginHintFromRequest:!0},r);else if(t.account.username){i.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),du(n,t.account.username),o?.addFields({loginHintFromUpn:!0},r);try{pu(n,Qp(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"),du(n,t.loginHint),cu(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&&Tu(n,t.state),(t.claims||e.clientCapabilities&&e.clientCapabilities.length>0)&&hu(n,t.claims,e.clientCapabilities),t.embeddedClientId&&vu(n,e.clientId,e.redirectUri),!e.instanceAware||t.extraQueryParameters&&Object.keys(t.extraQueryParameters).includes(ou)||Cu(n),n}function Mh(e,t,i,o){const r=kd(t,i,o);return xd.appendQueryString(e.authorizationEndpoint,r)}function Dh(e,t){if(!e.state||!t)throw e.state?Vl(cl,"Cached State"):Vl(cl,"Server State");let i,o;try{i=decodeURIComponent(e.state)}catch(t){throw Vl(ll,e.state)}try{o=decodeURIComponent(t)}catch(t){throw Vl(ll,e.state)}if(i!==o)throw Vl(dl);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(yh(e.error,e.error_description,e.suberror))throw new Ah(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new ih(e.error||"",e.error_description,e.suberror,t)}}function kh(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 Uh{constructor(e,t){this.cacheOutcome=Hs,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||Da.EMPTY_STRING,this.wrapperVer=e.wrapperVer||Da.EMPTY_STRING,this.telemetryCacheKey=ws.CACHE_KEY+As+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${ws.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],i=this.getNativeBrokerErrorCode();i?.length&&t.push(`broker_error=${i}`);const o=t.join(ws.VALUE_SEPARATOR),r=[e,this.getRegionDiscoveryFields()].join(ws.VALUE_SEPARATOR);return[ws.SCHEMA_VERSION,r,o].join(ws.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=Uh.maxErrorsToSend(e),i=e.failedRequests.slice(0,2*t).join(ws.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(ws.VALUE_SEPARATOR),r=e.errors.length,n=[r,t<r?ws.OVERFLOW_TRUE:ws.OVERFLOW_FALSE].join(ws.VALUE_SEPARATOR);return[ws.SCHEMA_VERSION,e.cacheHits,i,o,n].join(ws.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=ws.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 Js?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(ws.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=Uh.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]||Da.EMPTY_STRING,n=e.failedRequests[2*t+1]||Da.EMPTY_STRING,a=e.errors[t]||Da.EMPTY_STRING;if(o+=r.toString().length+n.toString().length+a.length+3,!(o<ws.MAX_LAST_HEADER_BYTES))break;i+=1}return i}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||Da.EMPTY_STRING),e.push(this.regionSource||Da.EMPTY_STRING),e.push(this.regionOutcome||Da.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 kh(e)}}
|
|
97
97
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const xh="missing_kid_error",Fh="missing_alg_error",Bh={[xh]:"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.",[Fh]:"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 qh extends Js{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,qh.prototype)}}function Wh(e){return new qh(e,Bh[e])}
|
|
98
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class Gh{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw Wh(xh);if(!e.alg)throw Wh(Fh);const t=new Gh({typ:e.typ
|
|
99
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Hh="pkce_not_created",Yh="ear_jwk_empty",Kh="ear_jwe_empty",Vh="crypto_nonexistent",zh="empty_navigate_uri"
|
|
100
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Ym="invalid_grant",Km=483,Vm=600,zm="msal",$m=
|
|
98
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Gh{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw Wh(xh);if(!e.alg)throw Wh(Fh);const t=new Gh({typ:e.typ||Qs,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}
|
|
99
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Hh="pkce_not_created",Yh="ear_jwk_empty",Kh="ear_jwe_empty",Vh="crypto_nonexistent",zh="empty_navigate_uri",Qh="hash_empty_error",$h="no_state_in_hash",jh="hash_does_not_contain_known_properties",Zh="unable_to_parse_state",Jh="state_interaction_type_mismatch",Xh="interaction_in_progress",em="popup_window_error",tm="empty_window_error",im="user_cancelled",om="monitor_popup_timeout",rm="monitor_window_timeout",nm="redirect_in_iframe",am="block_iframe_reload",sm="block_nested_popups",lm="iframe_closed_prematurely",dm="silent_logout_unsupported",cm="no_account_error",pm="silent_prompt_value_error",um="no_token_request_cache_error",hm="unable_to_parse_token_request_cache_error",mm="auth_request_not_set_error",fm="invalid_cache_type",gm="non_browser_environment",Tm="database_not_open",Am="no_network_connectivity",ym="post_request_failed",Im="get_request_failed",_m="failed_to_parse_response",Em="unable_to_load_token",Om="crypto_key_not_found",Cm="auth_code_required",Nm="auth_code_or_nativeAccountId_required",Rm="spa_code_and_nativeAccountId_present",bm="database_unavailable",Pm="unable_to_acquire_token_from_native_platform",wm="native_handshake_timeout",vm="native_extension_not_installed",Lm="native_connection_not_established",Sm="uninitialized_public_client_application",Mm="native_prompt_not_supported",Dm="invalid_base64_string",km="invalid_pop_token_request",Um="failed_to_build_headers",xm="failed_to_parse_headers",Fm="failed_to_decrypt_ear_response",Bm="timed_out",qm="For more visit: aka.ms/msaljs/browser-errors",Wm={[Hh]:"The PKCE code challenge and verifier could not be generated.",[Yh]:"No EAR encryption key provided. This is unexpected.",[Kh]:"Server response does not contain ear_jwe property. This is unexpected.",[Vh]:"The crypto object or function is not available.",[zh]:"Navigation URI is empty. Please check stack trace for more info.",[Qh]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${qm}`,[$h]:"Hash does not contain state. Please verify that the request originated from msal.",[jh]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${qm}`,[Zh]:"Unable to parse state. Please verify that the request originated from msal.",[Jh]:"Hash contains state but the interaction type does not match the caller.",[Xh]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${qm}`,[em]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[tm]:"window.open returned null or undefined window object.",[im]:"User cancelled the flow.",[om]:`Token acquisition in popup failed due to timeout. ${qm}`,[rm]:`Token acquisition in iframe failed due to timeout. ${qm}`,[nm]:"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.",[am]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${qm}`,[sm]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[lm]:"The iframe being monitored was closed prematurely.",[dm]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[cm]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[pm]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[um]:"No token request found in cache.",[hm]:"The cached token request could not be parsed.",[mm]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[fm]:"Invalid cache type",[gm]:"Login and token requests are not supported in non-browser environments.",[Tm]:"Database is not open!",[Am]:"No network connectivity. Check your internet connection.",[ym]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[Im]:"Network request failed. Please check the network trace to determine root cause.",[_m]:"Failed to parse network response. Check network trace.",[Em]:"Error loading token to cache.",[Om]:"Cryptographic Key or Keypair not found in browser storage.",[Cm]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[Nm]:"An authorization code or nativeAccountId must be provided to this flow.",[Rm]:"Request cannot contain both spa code and native account id.",[bm]:"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.",[Pm]:`Unable to acquire token from native platform. ${qm}`,[wm]:"Timed out while attempting to establish connection to browser extension",[vm]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[Lm]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${qm}`,[Sm]:`You must call and await the initialize function before attempting to call any other MSAL API. ${qm}`,[Mm]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[Dm]:"Invalid base64 encoded string.",[km]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[Um]:"Failed to build request headers object.",[xm]:"Failed to parse response headers",[Fm]:"Failed to decrypt ear response",[Bm]:"The request timed out."};class Gm extends Js{constructor(e,t){super(e,Wm[e],t),Object.setPrototypeOf(this,Gm.prototype),this.name="BrowserAuthError"}}function Hm(e,t){return new Gm(e,t)}
|
|
100
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Ym="invalid_grant",Km=483,Vm=600,zm="msal",Qm=30,$m="msal.js.browser",jm="53ee284d-920a-4b59-9d30-a60315b26836",Zm="ppnbnpeolgkicgegkbkbjmhlideopiji",Jm="MATS",Xm="MicrosoftEntra",ef="DOM API",tf="get-token-and-sign-out",of="PlatformAuthDOMHandler",rf="PlatformAuthExtensionHandler",nf="Handshake",af="HandshakeResponse",sf="GetToken",lf="Response",df="localStorage",cf="sessionStorage",pf="memoryStorage",uf="GET",hf="POST",mf="signin",ff="signout",gf="request.origin",Tf="urlHash",Af="request.params",yf="code.verifier",If="interaction.status",_f="request.native",Ef="wrapper.sku",Of="wrapper.version",Cf=861,Nf=862,Rf=863,bf=865,Pf=866,wf=61,vf=961,Lf=962;var Sf;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(Sf||(Sf={}));const Mf="startup",Df="login",kf="logout",Uf="acquireToken",xf="ssoSilent",Ff="handleRedirect",Bf="none",qf={scopes:Ha},Wf="@azure/msal-react",Gf="msal.db",Hf=`${Gf}.keys`,Yf=0,Kf=1,Vf=2,zf=3,Qf=4,$f=5,jf=[Yf,$f,Qf];
|
|
101
101
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
102
102
|
function Zf(e){return encodeURIComponent(Xf(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Jf(e){return eg(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Xf(e){return eg((new TextEncoder).encode(e))}function eg(e){const t=Array.from(e,e=>String.fromCodePoint(e)).join("");return btoa(t)}
|
|
103
103
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */function tg(e){return(new TextDecoder).decode(ig(e))}function ig(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 Hm(Dm)}const i=atob(t);return Uint8Array.from(i,e=>e.codePointAt(0)||0)}
|
|
@@ -109,8 +109,8 @@ class Wg{navigateInternal(e,t){return Wg.defaultNavigateWindow(e,t)}navigateExte
|
|
|
109
109
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Gg{async sendGetRequestAsync(e,t){let i,o={},r=0;const n=Hg(t);try{i=await fetch(e,{method:uf,headers:n})}catch(e){throw ah(Hm(window.navigator.onLine?Im:Am),void 0,void 0,e)}o=Yg(i.headers);try{return r=i.status,{headers:o,body:await i.json(),status:r}}catch(e){throw ah(Hm(_m),r,o,e)}}async sendPostRequestAsync(e,t){const i=t&&t.body||"",o=Hg(t);let r,n=0,a={};try{r=await fetch(e,{method:hf,headers:o,body:i})}catch(e){throw ah(Hm(window.navigator.onLine?ym:Am),void 0,void 0,e)}a=Yg(r.headers);try{return n=r.status,{headers:a,body:await r.json(),status:n}}catch(e){throw ah(Hm(_m),n,a,e)}}}function Hg(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 ah(Hm(Um),void 0,void 0,e)}}function Yg(e){try{const t={};return e.forEach((e,i)=>{t[i]=e}),t}catch(e){throw Hm(xm)}}
|
|
110
110
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Kg=1e4;
|
|
111
111
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
112
|
-
const Vg="4.21.1",zg="msal"
|
|
113
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class oT{static loggerCallback(e,t){switch(e){case
|
|
112
|
+
const Vg="4.21.1",zg="msal",Qg="browser",$g=`${zg}.${Qg}.log.level`,jg=`${zg}.${Qg}.log.pii`,Zg=`${zg}.${Qg}.platform.auth.dom`,Jg=`${zg}.version`,Xg="account.keys",eT="token.keys";function tT(e=1){return e<1?`${zg}.${Xg}`:`${zg}.${e}.${Xg}`}function iT(e,t=1){return t<1?`${zg}.${eT}.${e}`:`${zg}.${t}.${eT}.${e}`}
|
|
113
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class oT{static loggerCallback(e,t){switch(e){case Ql.Error:return void console.error(t);case Ql.Info:return void console.info(t);case Ql.Verbose:return void console.debug(t);case Ql.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:Da.EMPTY_STRING,authority:`${Da.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:Da.EMPTY_STRING,authorityMetadata:Da.EMPTY_STRING,redirectUri:"undefined"!=typeof window?Dg():"",postLogoutRedirectUri:Da.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:jd,OIDCOptions:{serverResponseType:ps,defaultScopes:[Da.OPENID_SCOPE,Da.PROFILE_SCOPE,Da.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Jl,tenant:Da.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:cf,cacheRetentionDays:5,temporaryCacheLocation:cf,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==df),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:Ql.Info,piiLoggingEnabled:!1},l={...{...Up,loggerOptions:s,networkClient:r?new Gg:Lh,navigationClient:new Wg,loadFrameTimeout:0,windowHashTimeout:i?.loadFrameTimeout||6e4,iframeHashTimeout:i?.loadFrameTimeout||Kg,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:i?.nativeBrokerHandshakeTimeout||2e3,pollIntervalMilliseconds:Qm},...i,loggerOptions:i?.loggerOptions||s},d={application:{appName:Da.EMPTY_STRING,appVersion:Da.EMPTY_STRING},client:new kp};e?.protocolMode!==Zd&&e?.OIDCOptions&&new $l(l.loggerOptions).warning(JSON.stringify(Cd(Td)));if(e?.protocolMode&&e.protocolMode===Zd&&l?.allowPlatformBroker)throw Cd(Ad);return{auth:{...n,...e,OIDCOptions:{...n.OIDCOptions,...e?.OIDCOptions}},cache:{...a,...t},system:l,telemetry:{...d,...o}}}(e,this.browserEnvironment);try{t=window[cf]}catch(e){}const i=t?.getItem($g),o=t?.getItem(jg)?.toLowerCase(),r="true"===o||"false"!==o&&void 0,n={...this.config.system.loggerOptions},a=i&&Object.keys(Ql).includes(i)?Ql[i]:void 0;a&&(n.loggerCallback=oT.loggerCallback,n.logLevel=a),void 0!==r&&(n.piiLoggingEnabled=r),this.logger=new $l(n,"@azure/msal-browser",Vg),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}
|
|
114
114
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class rT extends oT{getModuleName(){return rT.MODULE_NAME}getId(){return rT.ID}async initialize(){return this.available="undefined"!=typeof window,this.available}}rT.MODULE_NAME="",rT.ID="StandardOperatingContext";
|
|
115
115
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
116
116
|
class nT{constructor(){this.dbName=Gf,this.version=1,this.tableName=Hf,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(Hm(bm)))})}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(Hm(Tm));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(Hm(Tm));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(Hm(Tm));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(Hm(Tm));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(Hm(Tm));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(Gf),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)))})}}
|
|
@@ -124,24 +124,24 @@ class nT{constructor(){this.dbName=Gf,this.version=1,this.tableName=Hf,this.dbOp
|
|
|
124
124
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class yT{constructor(){if(!window.sessionStorage)throw Lg(Rg)}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
125
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */const IT="msal:initializeStart",_T="msal:initializeEnd",ET="msal:accountAdded",OT="msal:accountRemoved",CT="msal:activeAccountChanged",NT="msal:loginStart",RT="msal:loginSuccess",bT="msal:loginFailure",PT="msal:acquireTokenStart",wT="msal:acquireTokenSuccess",vT="msal:acquireTokenFailure",LT="msal:acquireTokenFromNetworkStart",ST="msal:ssoSilentStart",MT="msal:ssoSilentSuccess",DT="msal:ssoSilentFailure",kT="msal:acquireTokenByCodeStart",UT="msal:acquireTokenByCodeSuccess",xT="msal:acquireTokenByCodeFailure",FT="msal:handleRedirectStart",BT="msal:handleRedirectEnd",qT="msal:popupOpened",WT="msal:logoutStart",GT="msal:logoutSuccess",HT="msal:logoutFailure",YT="msal:logoutEnd",KT="msal:restoreFromBFCache";
|
|
126
126
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */function VT(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}
|
|
127
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class zT extends $d{constructor(e,t,i,o,r,n,a){super(e,i,o,r,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new aT,this.browserStorage=$T(e,t.cacheLocation,o,r),this.temporaryCacheStorage=$T(e,t.temporaryCacheLocation,o,r),this.cookieStorage=new hT,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=mT(this.browserStorage,0),i=fT(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=mT(this.browserStorage,1),r=fT(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(tT(0),JSON.stringify(t)):this.browserStorage.removeItem(tT(0)),o.length>0?this.browserStorage.setItem(tT(1),JSON.stringify(o)):this.browserStorage.removeItem(tT(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){VT(t,n);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(n,JSON.stringify(s),o));const l=gT(s)?await this.browserStorage.decryptData(n,s,o):s;let d;if(l&&(zu(l)||$u(l))&&(d=l.expiresOn),!l||Gu(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||d&&Wu(d,300))this.browserStorage.removeItem(n),VT(t,n),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);else if(this.cacheConfig.cacheLocation!==df||gT(s)){const t=`${zg}.${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(Jg);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==Vg&&this.setItem(Jg,Vg,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=zd(a);if(!(s.errorCode===Hd&&n<20))throw s;if(!r.length){const i=e===iT(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,n=e===iT(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 Uu(this.browserStorage.setUserData.bind(this.browserStorage),Ap,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=zd(e);if(!(t.errorCode===Hd&&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&&dh.isAccountEntity(o)?$d.toObject(new dh,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===df&&r&&this.eventHandler.emitEvent(ET,void 0,e.getAccountInfo())}getAccountKeys(){return mT(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(tT(),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(tT());this.setItem(tT(),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===df&&this.eventHandler.emitEvent(OT,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 fT(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,i=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(iT(this.clientId,i),JSON.stringify(e),t):this.removeItem(iT(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)&&Vu(r)&&r.hasOwnProperty("realm")&&r.credentialType===Is.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&&zu(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&&$u(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(_s)&&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[_s,e,t].join(As).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(ws.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(Os)&&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(Ef,e),this.internalStorage.setItem(Of,t)}getWrapperMetadata(){return[this.internalStorage.getItem(Ef)||Da.EMPTY_STRING,this.internalStorage.getItem(Of)||Da.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(Za),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(Za);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:Fu().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(CT)}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(Ms));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===df){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(zg)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(zg)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(fp,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 Nd.startsWith(e,zg)?e:`${zg}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===Is.REFRESH_TOKEN&&e.familyId||e.clientId,i=e.tokenType&&e.tokenType.toLowerCase()!==vs.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${zg}.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[`${zg}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(Af)),this.removeTemporaryItem(this.generateCacheKey(yf)),this.removeTemporaryItem(this.generateCacheKey(gf)),this.removeTemporaryItem(this.generateCacheKey(Tf)),this.removeTemporaryItem(this.generateCacheKey(_f)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const i=Xf(JSON.stringify(e));if(this.setTemporaryCache(Af,i,!0),t){const e=Xf(t);this.setTemporaryCache(yf,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(Af,!0);if(!e)throw Hm(um);const t=this.getTemporaryCache(yf,!0);let i,o="";try{i=JSON.parse(tg(e)),t&&(o=tg(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),Hm(hm)}return[i,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(_f,!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=`${zg}.${If}`,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(),Sg(window),null}}setInteractionInProgress(e,t=mf){const i=`${zg}.${If}`;if(e){if(this.getInteractionInProgress())throw Hm(Xh);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=Hu(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:Yu(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?Bu(e.expiresOn):0,e.extExpiresOn?Bu(e.extExpiresOn):0,tg,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 Vd&&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 $T(e,t,i,o){try{switch(t){case df:return new AT(e,i,o);case cf:return new yT}}catch(e){i.error(e)}return new aT}class QT{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Ql({}),"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||gg();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 ET:case OT:case CT: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 jT{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||gg(),this.logger=o.clone(
|
|
127
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class zT extends Qd{constructor(e,t,i,o,r,n,a){super(e,i,o,r,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new aT,this.browserStorage=QT(e,t.cacheLocation,o,r),this.temporaryCacheStorage=QT(e,t.temporaryCacheLocation,o,r),this.cookieStorage=new hT,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=mT(this.browserStorage,0),i=fT(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=mT(this.browserStorage,1),r=fT(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(tT(0),JSON.stringify(t)):this.browserStorage.removeItem(tT(0)),o.length>0?this.browserStorage.setItem(tT(1),JSON.stringify(o)):this.browserStorage.removeItem(tT(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){VT(t,n);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(n,JSON.stringify(s),o));const l=gT(s)?await this.browserStorage.decryptData(n,s,o):s;let d;if(l&&(zu(l)||Qu(l))&&(d=l.expiresOn),!l||Gu(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||d&&Wu(d,300))this.browserStorage.removeItem(n),VT(t,n),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);else if(this.cacheConfig.cacheLocation!==df||gT(s)){const t=`${zg}.${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(Jg);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==Vg&&this.setItem(Jg,Vg,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=zd(a);if(!(s.errorCode===Hd&&n<20))throw s;if(!r.length){const i=e===iT(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,n=e===iT(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 Uu(this.browserStorage.setUserData.bind(this.browserStorage),Ap,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=zd(e);if(!(t.errorCode===Hd&&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&&dh.isAccountEntity(o)?Qd.toObject(new dh,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===df&&r&&this.eventHandler.emitEvent(ET,void 0,e.getAccountInfo())}getAccountKeys(){return mT(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(tT(),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(tT());this.setItem(tT(),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===df&&this.eventHandler.emitEvent(OT,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 fT(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,i=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(iT(this.clientId,i),JSON.stringify(e),t):this.removeItem(iT(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)&&Vu(r)&&r.hasOwnProperty("realm")&&r.credentialType===Is.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&&zu(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&&Qu(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(_s)&&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[_s,e,t].join(As).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(ws.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(Os)&&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(Ef,e),this.internalStorage.setItem(Of,t)}getWrapperMetadata(){return[this.internalStorage.getItem(Ef)||Da.EMPTY_STRING,this.internalStorage.getItem(Of)||Da.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(Za),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(Za);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:Fu().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(CT)}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(Ms));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===df){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(zg)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(zg)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(fp,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 Nd.startsWith(e,zg)?e:`${zg}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===Is.REFRESH_TOKEN&&e.familyId||e.clientId,i=e.tokenType&&e.tokenType.toLowerCase()!==vs.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${zg}.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[`${zg}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(Af)),this.removeTemporaryItem(this.generateCacheKey(yf)),this.removeTemporaryItem(this.generateCacheKey(gf)),this.removeTemporaryItem(this.generateCacheKey(Tf)),this.removeTemporaryItem(this.generateCacheKey(_f)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const i=Xf(JSON.stringify(e));if(this.setTemporaryCache(Af,i,!0),t){const e=Xf(t);this.setTemporaryCache(yf,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(Af,!0);if(!e)throw Hm(um);const t=this.getTemporaryCache(yf,!0);let i,o="";try{i=JSON.parse(tg(e)),t&&(o=tg(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),Hm(hm)}return[i,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(_f,!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=`${zg}.${If}`,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(),Sg(window),null}}setInteractionInProgress(e,t=mf){const i=`${zg}.${If}`;if(e){if(this.getInteractionInProgress())throw Hm(Xh);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=Hu(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:Yu(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?Bu(e.expiresOn):0,e.extExpiresOn?Bu(e.extExpiresOn):0,tg,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 Vd&&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 QT(e,t,i,o){try{switch(t){case df:return new AT(e,i,o);case cf:return new yT}}catch(e){i.error(e)}return new aT}class $T{constructor(e){this.eventCallbacks=new Map,this.logger=e||new $l({}),"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||gg();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 ET:case OT:case CT: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 jT{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||gg(),this.logger=o.clone($m,Vg,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 xd.getAbsoluteUrl(t,Dg())}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 Uh(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(hc,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(xd.getDomainFromUrl(r),t.environment):r,s=Xu.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await Uu(th,ep,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 Cd(yd);return l}}
|
|
129
129
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function ZT(e,t,i,o){i.addQueueMeasurement(bc,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===vs.SSH){if(!e.sshJwk)throw Cd(hd);if(!e.sshKid)throw Cd(md)}o.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}else a.authenticationScheme=vs.BEARER,o.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!Nd.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await Ng(e.claims)),a}async function JT(e,t,i,o,r){o.addQueueMeasurement(Pc,e.correlationId);const n=await Uu(ZT,bc,r,o,e.correlationId)(e,i,o,r);return{...e,...n,account:t,forceRefresh:e.forceRefresh||!1}}function XT(e,t){let i;const o=e.httpMethod;if(t===Jd){if(i=o||Ga,i!==Ga)throw Cd(Id)}else i=o||Wa;if(e.authorizePostBodyParameters&&i!==Ga)throw Cd(_d);return i}
|
|
130
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class eA extends jT{initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||gg(),...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=xd.getAbsoluteUrl(e.postLogoutRedirectUri,Dg())):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=xd.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Dg())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=xd.getAbsoluteUrl(Dg(),Dg())),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(Uc,this.correlationId);const t=await Uu(this.getClientConfiguration.bind(this),xc,this.logger,this.performanceClient,this.correlationId)(e);return new Ph(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}=e;this.performanceClient.addQueueMeasurement(xc,this.correlationId);const a=await Uu(this.getDiscoveredAuthority.bind(this),hc,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
|
|
130
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class eA extends jT{initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||gg(),...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=xd.getAbsoluteUrl(e.postLogoutRedirectUri,Dg())):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=xd.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Dg())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=xd.getAbsoluteUrl(Dg(),Dg())),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(Uc,this.correlationId);const t=await Uu(this.getClientConfiguration.bind(this),xc,this.logger,this.performanceClient,this.correlationId)(e);return new Ph(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}=e;this.performanceClient.addQueueMeasurement(xc,this.correlationId);const a=await Uu(this.getDiscoveredAuthority.bind(this),hc,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:$m,version:Vg,cpu:Da.EMPTY_STRING,os:Da.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(Fc,this.correlationId);const i=this.getRedirectUri(e.redirectUri),o={interactionType:t},r=_h.setRequestState(this.browserCrypto,e&&e.state||Da.EMPTY_STRING,o),n={...await Uu(ZT,bc,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:i,state:r,nonce:e.nonce||gg(),responseMode:this.config.auth.OIDCOptions.serverResponseType},a={...n,httpMethod:XT(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
131
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
132
132
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
133
|
-
function tA(e,t,i){const o=Dd(e);if(!o)throw Md(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}`),Hm(jh)):(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.`),Hm(
|
|
133
|
+
function tA(e,t,i){const o=Dd(e);if(!o)throw Md(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}`),Hm(jh)):(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.`),Hm(Qh));return o}function iA(e,t,i){if(!e.state)throw Hm($h);const o=function(e,t){if(!t)return null;try{return _h.parseRequestState(e,t).libraryState.meta}catch(e){throw Vl(ll)}}(t,e.state);if(!o)throw Hm(Zh);if(o.interactionType!==i)throw Hm(Jh)}
|
|
134
134
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class oA{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(Gc,t.correlationId);try{i=function(e,t){if(Dh(e,t),!e.code)throw Vl(kl);return e}(e,t.state)}catch(e){throw e instanceof ih&&e.subError===im?Hm(im):e}return Uu(this.handleCodeResponseFromServer.bind(this),Wc,this.logger,this.performanceClient,t.correlationId)(i,t)}async handleCodeResponseFromServer(e,t,i=!0){if(this.performanceClient.addQueueMeasurement(Wc,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await Uu(this.authModule.updateAuthority.bind(this.authModule),Vc,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 Uu(this.authModule.acquireToken.bind(this.authModule),zc,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Kp}:e.loginHint?{credential:e.loginHint,type:Vp}:null}}
|
|
135
135
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */const rA="user_switch",nA={[rA]:"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 aA extends Js{constructor(e,t,i){super(e,t),Object.setPrototypeOf(this,aA.prototype),this.name="NativeAuthError",this.ext=i}}function sA(e){return!(!e.ext||!e.ext.status||"DISABLED"!==e.ext.status)||(!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode)}function lA(e,t,i){if(i&&i.status)switch(i.status){case"ACCOUNT_UNAVAILABLE":return Ih(ph);case"USER_INTERACTION_REQUIRED":return new Ah(e,t);case"USER_CANCEL":return Hm(im);case"NO_NETWORK":return Hm(Am);case"UX_NOT_ALLOWED":return Ih(hh)}return new aA(e,nA[e]||t,i)}
|
|
136
136
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class dA extends eA{async acquireToken(e){this.performanceClient.addQueueMeasurement(lc,e.correlationId);const t=this.initializeServerTelemetryManager(wf),i=await Uu(this.getClientConfiguration.bind(this),xc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new vh(i,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await Uu(o.acquireCachedToken.bind(o),Cc,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(e){throw e instanceof Gm&&e.errorCode===Om&&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 cA extends jT{constructor(e,t,i,o,r,n,a,s,l,d,c,p){super(e,t,i,o,r,n,s,l,p),this.apiId=a,this.accountId=d,this.platformAuthProvider=l,this.nativeStorageManager=c,this.silentCacheClient=new dA(e,this.nativeStorageManager,i,o,r,n,s,l,p);const u=this.platformAuthProvider.getExtensionName();this.skus=Uh.makeExtraSkuString({libraryName:Qm,libraryVersion:Vg,extensionName:u,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[eu]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(mc,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const i=this.performanceClient.startMeasurement(mc,this.correlationId),o=Fu(),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===Kf)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 aA&&r.setNativeBrokerErrorCode(e.errorCode),i.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Rd.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Vl(bl);const i=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!i)throw Vl(bl);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 aA){if(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),sA(e))throw e}}this.browserStorage.setTemporaryCache(_f,JSON.stringify(o),!0);const r={apiId:Cf,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(_f));const n=Fu();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=vd(e.id_token,tg),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 lA(rA);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=Rh(this.browserStorage,a,r,tg,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 dh.generateHomeAccountId(e.client_info||Da.EMPTY_STRING,Lu,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?Rd.fromString(t):Rd.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===vs.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const i=new Oh(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw Vl(Fl);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||Da.EMPTY_STRING,c=l.TenantId||i.tid||Da.EMPTY_STRING,p=wd(o.getAccountInfo(),void 0,i,e.id_token);p.nativeAccountId!==e.account.id&&(p.nativeAccountId=e.account.id);const u=await this.generatePopAccessToken(e,t),h=t.tokenType===vs.POP?vs.POP:vs.BEARER;return{authority:r,uniqueId:d,tenantId:c,scopes:s.asArray(),account:p,idToken:e.id_token,idTokenClaims:i,accessToken:u,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:qu(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=Hu(i,t.authority,e.id_token||"",t.clientId,o.tid||""),l=a+(t.tokenType===vs.POP?Da.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:Yu(i,t.authority,r,t.clientId,o.tid||n,d.printScopes(),l,0,tg,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(c,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===vs.POP?Da.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 Rd(i||[]);r.appendScopes(Ha);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 Hm(km);if(this.handleExtraBrokerParams(n),n.extraParameters=n.extraParameters||{},n.extraParameters.telemetry=Jm,e.authenticationScheme===vs.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},i=new Oh(this.browserCrypto);let o;if(n.keyId)o=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:n.keyId})),n.signPopToken=!1;else{const e=await Uu(i.generateCnf.bind(i),jc,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 xd(t);return i.validateAsUri(),i}getPrompt(e){switch(this.apiId){case Rf:case wf:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),as}if(e)switch(e){case as:case ns:case os: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`),Hm(Mm)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(tu)&&e.extraParameters.hasOwnProperty(iu)&&e.extraParameters.hasOwnProperty(Qp);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[iu],i=e.extraParameters[Qp]),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 pA(e,t,i,o,r){const n=Sh({...e.auth,authority:t},i,o,r);if(fu(n,{sku
|
|
137
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class cA extends jT{constructor(e,t,i,o,r,n,a,s,l,d,c,p){super(e,t,i,o,r,n,s,l,p),this.apiId=a,this.accountId=d,this.platformAuthProvider=l,this.nativeStorageManager=c,this.silentCacheClient=new dA(e,this.nativeStorageManager,i,o,r,n,s,l,p);const u=this.platformAuthProvider.getExtensionName();this.skus=Uh.makeExtraSkuString({libraryName:$m,libraryVersion:Vg,extensionName:u,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[eu]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(mc,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const i=this.performanceClient.startMeasurement(mc,this.correlationId),o=Fu(),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===Kf)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 aA&&r.setNativeBrokerErrorCode(e.errorCode),i.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Rd.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Vl(bl);const i=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!i)throw Vl(bl);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 aA){if(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),sA(e))throw e}}this.browserStorage.setTemporaryCache(_f,JSON.stringify(o),!0);const r={apiId:Cf,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(_f));const n=Fu();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=vd(e.id_token,tg),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 lA(rA);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=Rh(this.browserStorage,a,r,tg,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 dh.generateHomeAccountId(e.client_info||Da.EMPTY_STRING,Lu,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?Rd.fromString(t):Rd.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===vs.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const i=new Oh(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw Vl(Fl);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||Da.EMPTY_STRING,c=l.TenantId||i.tid||Da.EMPTY_STRING,p=wd(o.getAccountInfo(),void 0,i,e.id_token);p.nativeAccountId!==e.account.id&&(p.nativeAccountId=e.account.id);const u=await this.generatePopAccessToken(e,t),h=t.tokenType===vs.POP?vs.POP:vs.BEARER;return{authority:r,uniqueId:d,tenantId:c,scopes:s.asArray(),account:p,idToken:e.id_token,idTokenClaims:i,accessToken:u,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:qu(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=Hu(i,t.authority,e.id_token||"",t.clientId,o.tid||""),l=a+(t.tokenType===vs.POP?Da.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:Yu(i,t.authority,r,t.clientId,o.tid||n,d.printScopes(),l,0,tg,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(c,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===vs.POP?Da.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 Rd(i||[]);r.appendScopes(Ha);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 Hm(km);if(this.handleExtraBrokerParams(n),n.extraParameters=n.extraParameters||{},n.extraParameters.telemetry=Jm,e.authenticationScheme===vs.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},i=new Oh(this.browserCrypto);let o;if(n.keyId)o=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:n.keyId})),n.signPopToken=!1;else{const e=await Uu(i.generateCnf.bind(i),jc,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 xd(t);return i.validateAsUri(),i}getPrompt(e){switch(this.apiId){case Rf:case wf:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),as}if(e)switch(e){case as:case ns:case os: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`),Hm(Mm)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(tu)&&e.extraParameters.hasOwnProperty(iu)&&e.extraParameters.hasOwnProperty($p);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[iu],i=e.extraParameters[$p]),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 pA(e,t,i,o,r){const n=Sh({...e.auth,authority:t},i,o,r);if(fu(n,{sku:$m,version:Vg,os:"",cpu:""}),e.auth.protocolMode!==Zd&&gu(n,e.telemetry.application),i.platformBroker&&(function(e){e.set("nativebroker","1")}(n),r.addFields({isPlatformAuthorizeRequest:!0},i.correlationId),i.authenticationScheme===vs.POP)){const e=new lT(o,r),t=new Oh(e);let a;if(i.popKid)a=e.encodeKid(i.popKid);else{a=(await Uu(t.generateCnf.bind(t),jc,o,r,i.correlationId)(i,o)).reqCnfString}Ru(n,a)}return ru(n,i.correlationId,r),n}async function uA(e,t,i,o,r){if(!i.codeChallenge)throw Cd(dd);const n=await Uu(pA,qc,o,r,i.correlationId)(e,t,i,o,r);return nu(n,ls),Au(n,i.codeChallenge,Da.S256_CODE_CHALLENGE_METHOD),Nu(n,i.extraQueryParameters||{}),Mh(t,n,e.auth.encodeExtraQueryParams,i.extraQueryParameters)}async function hA(e,t,i,o,r,n){if(!o.earJwk)throw Hm(Yh);const a=await pA(t,i,o,r,n);nu(a,ds),function(e,t){e.set("ear_jwk",encodeURIComponent(t)),e.set("ear_jwe_crypto","eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}(a,o.earJwk);const s=new Map;Nu(s,o.extraQueryParameters||{});return fA(e,Mh(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}async function mA(e,t,i,o,r,n){const a=await pA(t,i,o,r,n);nu(a,ls),Au(a,o.codeChallenge,o.codeChallengeMethod||Da.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;Nu(s,o.extraQueryParameters||{});return fA(e,Mh(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}function fA(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 gA(e,t,i,o,r,n,a,s,l,d){if(s.verbose("Account id found, calling WAM for token"),!d)throw Hm(Lm);const c=new lT(s,l),p=new cA(o,r,c,s,a,o.system.navigationClient,i,l,d,t,n,e.correlationId),{userRequestState:u}=_h.parseRequestState(c,e.state);return Uu(p.acquireToken.bind(p),mc,s,l,e.correlationId)({...e,state:u,prompt:void 0})}async function TA(e,t,i,o,r,n,a,s,l,d,c,p){if(rh.removeThrottle(a,r.auth.clientId,e),t.accountId)return Uu(gA,Yc,d,c,e.correlationId)(e,t.accountId,o,r,a,s,l,d,c,p);const u={...e,code:t.code||"",codeVerifier:i},h=new oA(n,a,u,d,c);return await Uu(h.handleCodeResponse.bind(h),Gc,d,c,e.correlationId)(t,e)}async function AA(e,t,i,o,r,n,a,s,l,d,c){if(rh.removeThrottle(n,o.auth.clientId,e),Dh(t,e.state),!t.ear_jwe)throw Hm(Kh);if(!e.earJwk)throw Hm(Yh);const p=JSON.parse(await Uu(yg,Sp,l,d,e.correlationId)(e.earJwk,t.ear_jwe));if(p.accountId)return Uu(gA,Yc,l,d,e.correlationId)(e,p.accountId,i,o,n,a,s,l,d,c);const u=new Nh(o.auth.clientId,n,new lT(l,d),l,null,null,d);u.validateTokenResponse(p);const h={code:"",state:e.state,nonce:e.nonce,client_info:p.client_info,cloud_graph_host_name:p.cloud_graph_host_name,cloud_instance_host_name:p.cloud_instance_host_name,cloud_instance_name:p.cloud_instance_name,msgraph_host:p.msgraph_host};return await Uu(u.handleServerTokenResponse.bind(u),Jc,l,d,e.correlationId)(p,r,Fu(),e,h,void 0,void 0,void 0,void 0)}
|
|
139
139
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function yA(e,t,i){e.addQueueMeasurement(Ip,i);const o=ku(IA,_p,t,e,i)(e,t,i);return{verifier:o,challenge:await Uu(_A,Ep,t,e,i)(o,e,t,i)}}function IA(e,t,i){try{const o=new Uint8Array(32);ku(mg,Cp,t,e,i)(o);return Jf(o)}catch(e){throw Hm(Hh)}}async function _A(e,t,i,o){t.addQueueMeasurement(Ep,o);try{const r=await Uu(hg,Op,i,t,o)(e,t,o);return Jf(new Uint8Array(r))}catch(e){throw Hm(Hh)}}
|
|
140
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class EA{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(hp),this.platformAuthType=rf}async sendMessage(e){this.logger.trace(this.platformAuthType+" - sendMessage called.");const t={method:sf,request:e},i={channel:jm,extensionId:this.extensionId,responseId:gg(),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 EA(e,t,i,Zm);return await o.sendHandshakeRequest(),o}catch(o){const r=new EA(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:jm,extensionId:this.extensionId,responseId:gg(),body:{method:nf}};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(Hm(wm)),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===jm&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===nf){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(Hm(vm))}}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===lf){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(lA(e.code,e.description,e.ext));else{if(!e.result)throw Xs(
|
|
141
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class OA{constructor(e,t,i){this.logger=e,this.performanceClient=t,this.correlationId=i,this.platformAuthType=of}static async createProvider(e,t,i){if(e.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication){const o=await window.navigator.platformAuthentication.getSupportedContracts(Xm);if(o?.includes(tf))return e.trace("Platform auth api available in DOM"),new OA(e,t,i)}}getExtensionId(){return Xm}getExtensionVersion(){return""}getExtensionName(){return ef}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,...p}=e,u=this.getDOMExtraParams(p);return{accountId:t,brokerId:this.getExtensionId(),authority:o,clientId:i,correlationId:a||this.correlationId,extraParameters:{...c,...u},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"),lA(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 Xs(
|
|
140
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class EA{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(hp),this.platformAuthType=rf}async sendMessage(e){this.logger.trace(this.platformAuthType+" - sendMessage called.");const t={method:sf,request:e},i={channel:jm,extensionId:this.extensionId,responseId:gg(),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 EA(e,t,i,Zm);return await o.sendHandshakeRequest(),o}catch(o){const r=new EA(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:jm,extensionId:this.extensionId,responseId:gg(),body:{method:nf}};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(Hm(wm)),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===jm&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===nf){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(Hm(vm))}}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===lf){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(lA(e.code,e.description,e.ext));else{if(!e.result)throw Xs($s,"Event does not contain result.");e.result.code&&e.result.description?i.reject(lA(e.result.code,e.result.description,e.result.ext)):i.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===af){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 Xs($s,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===Zm?"chrome":this.getExtensionId()?.length?"unknown":void 0}}
|
|
141
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class OA{constructor(e,t,i){this.logger=e,this.performanceClient=t,this.correlationId=i,this.platformAuthType=of}static async createProvider(e,t,i){if(e.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication){const o=await window.navigator.platformAuthentication.getSupportedContracts(Xm);if(o?.includes(tf))return e.trace("Platform auth api available in DOM"),new OA(e,t,i)}}getExtensionId(){return Xm}getExtensionVersion(){return""}getExtensionName(){return ef}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,...p}=e,u=this.getDOMExtraParams(p);return{accountId:t,brokerId:this.getExtensionId(),authority:o,clientId:i,correlationId:a||this.correlationId,extraParameters:{...c,...u},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"),lA(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 Xs($s,"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
142
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function CA(e,t,i,o){e.trace("getPlatformAuthProvider called",i);const r=function(){let e;try{return e=window[cf],"true"===e?.getItem(Zg)}catch(e){return!1}}();let n;e.trace("Has client allowed platform auth via DOM API: "+r);try{r&&(n=await OA.createProvider(e,t,i)),n||(e.trace("Platform auth via DOM API not available, checking for extension"),n=await EA.createProvider(e,o||2e3,t))}catch(t){e.trace("Platform auth not available",t)}return n}function NA(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 vs.BEARER:case vs.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
143
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class RA extends eA{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||Ha,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:XT(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 Uu(this.initializeAuthorizationRequest.bind(this),Fc,this.logger,this.performanceClient,this.correlationId)(e,Sf.Popup);t.popup&&qg(o.authority);const r=NA(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);return o.platformBroker=r,this.config.auth.protocolMode===Jd?this.executeEarFlow(o,t):this.executeCodeFlow(o,t,i)}async executeCodeFlow(e,t,i){const o=e.correlationId,r=this.initializeServerTelemetryManager(Nf),n=i||await Uu(yA,Ip,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),a={...e,codeChallenge:n.challenge};try{const i=await Uu(this.createAuthCodeClient.bind(this),Uc,this.logger,this.performanceClient,o)({serverTelemetryManager:r,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account});if(a.httpMethod===Ga)return await this.executeCodeFlowWithPost(a,t,i,n.verifier);{const r=await Uu(uA,Bc,this.logger,this.performanceClient,o)(this.config,i.authority,a,this.logger,this.performanceClient),s=this.initiateAuthRequest(r,t);this.eventHandler.emitEvent(qT,Sf.Popup,{popupWindow:s},null);const l=await this.monitorPopupForHash(s,t.popupWindowParent),d=ku(tA,Xc,this.logger,this.performanceClient,this.correlationId)(l,this.config.auth.OIDCOptions.serverResponseType,this.logger);return await Uu(TA,Kc,this.logger,this.performanceClient,o)(e,d,n.verifier,Nf,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(e){throw t.popup?.close(),e instanceof Js&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}async executeEarFlow(e,t){const i=e.correlationId,o=await Uu(this.getDiscoveredAuthority.bind(this),hc,this.logger,this.performanceClient,i)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),r=await Uu(Ag,Lp,this.logger,this.performanceClient,i)(),n={...e,earJwk:r},a=t.popup||this.openPopup("about:blank",t);(await hA(a.document,this.config,o,n,this.logger,this.performanceClient)).submit();const s=await Uu(this.monitorPopupForHash.bind(this),Mc,this.logger,this.performanceClient,i)(a,t.popupWindowParent),l=ku(tA,Xc,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return Uu(AA,Hc,this.logger,this.performanceClient,i)(n,l,Nf,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 Uu(this.getDiscoveredAuthority.bind(this),hc,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 mA(a.document,this.config,n,e,this.logger,this.performanceClient)).submit();const s=await Uu(this.monitorPopupForHash.bind(this),Mc,this.logger,this.performanceClient,r)(a,t.popupWindowParent),l=ku(tA,Xc,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return Uu(TA,Kc,this.logger,this.performanceClient,r)(e,l,o,Nf,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(WT,Sf.Popup,e);const r=this.initializeServerTelemetryManager(Lf);try{await this.clearCacheOnLogout(this.correlationId,e.account);const n=await Uu(this.createAuthCodeClient.bind(this),Uc,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===Zd){if(this.eventHandler.emitEvent(GT,Sf.Popup,e),o){const e={apiId:Lf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=xd.getAbsoluteUrl(o,Dg());await this.navigationClient.navigateInternal(t,e)}return void t.popup?.close()}}const a=n.getLogoutUri(e);this.eventHandler.emitEvent(GT,Sf.Popup,e);const s=this.openPopup(a,t);if(this.eventHandler.emitEvent(qT,Sf.Popup,{popupWindow:s},null),await this.monitorPopupForHash(s,t.popupWindowParent).catch(()=>{}),o){const e={apiId:Lf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=xd.getAbsoluteUrl(o,Dg());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 Js&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),this.eventHandler.emitEvent(HT,Sf.Popup,null,e),this.eventHandler.emitEvent(YT,Sf.Popup),e}this.eventHandler.emitEvent(YT,Sf.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"),Hm(zh)}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(Hm(im));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===cs?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 Hm(tm);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),Hm(em)}}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,p=i.popupPosition?.left;return(!l||l<0||l>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=Km),(!d||d<0||d>s)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),d=Vm),(!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-Vm/2+n)),(!p||p<0||p>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),p=Math.max(0,a/2-Km/2+r)),o.open(e,t,`width=${l}, height=${d}, top=${c}, left=${p}, 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`${zm}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${zm}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}
|
|
144
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class bA extends eA{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 Uu(this.initializeAuthorizationRequest.bind(this),Fc,this.logger,this.performanceClient,this.correlationId)(e,Sf.Redirect);t.platformBroker=NA(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(KT,Sf.Redirect))},o=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${o}`),this.browserStorage.setTemporaryCache(gf,o,!0),window.addEventListener("pageshow",i);try{this.config.auth.protocolMode===Jd?await this.executeEarFlow(t):await this.executeCodeFlow(t,e.onRedirectNavigate)}catch(e){throw e instanceof Js&&e.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),e}}async executeCodeFlow(e,t){const i=e.correlationId,o=this.initializeServerTelemetryManager(Cf),r=await Uu(yA,Ip,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===Ga)return await this.executeCodeFlowWithPost(n);{const i=await Uu(this.createAuthCodeClient.bind(this),Uc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=await Uu(uA,Bc,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 Js&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),e}}async executeEarFlow(e){const t=e.correlationId,i=await Uu(this.getDiscoveredAuthority.bind(this),hc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await Uu(Ag,Lp,this.logger,this.performanceClient,t)(),r={...e,earJwk:o};this.browserStorage.cacheAuthorizeRequest(r);return(await hA(document,this.config,i,r,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Hm(Bm,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,i=await Uu(this.getDiscoveredAuthority.bind(this),hc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});this.browserStorage.cacheAuthorizeRequest(e);return(await mA(document,this.config,i,e,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Hm(Bm,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e="",t,i,o){const r=this.initializeServerTelemetryManager(bf);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(gf,!0)||Da.EMPTY_STRING,l=Ud(s);if(l===Ud(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(!Mg()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Tf,a,!0);const e={apiId:bf,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 xd(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(gf,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 Js&&(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===cs?window.location.search:window.location.hash);let i=Dd(t);if(i){try{iA(i,this.browserCrypto,Sf.Redirect)}catch(e){return e instanceof Js&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return Sg(window),this.logger.verbose("Hash contains known properties, returning response hash"),[i,t]}const o=this.browserStorage.getTemporaryCache(Tf,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Tf)),o&&(i=Dd(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 Hm(
|
|
144
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class bA extends eA{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 Uu(this.initializeAuthorizationRequest.bind(this),Fc,this.logger,this.performanceClient,this.correlationId)(e,Sf.Redirect);t.platformBroker=NA(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(KT,Sf.Redirect))},o=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${o}`),this.browserStorage.setTemporaryCache(gf,o,!0),window.addEventListener("pageshow",i);try{this.config.auth.protocolMode===Jd?await this.executeEarFlow(t):await this.executeCodeFlow(t,e.onRedirectNavigate)}catch(e){throw e instanceof Js&&e.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),e}}async executeCodeFlow(e,t){const i=e.correlationId,o=this.initializeServerTelemetryManager(Cf),r=await Uu(yA,Ip,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===Ga)return await this.executeCodeFlowWithPost(n);{const i=await Uu(this.createAuthCodeClient.bind(this),Uc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=await Uu(uA,Bc,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 Js&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),e}}async executeEarFlow(e){const t=e.correlationId,i=await Uu(this.getDiscoveredAuthority.bind(this),hc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await Uu(Ag,Lp,this.logger,this.performanceClient,t)(),r={...e,earJwk:o};this.browserStorage.cacheAuthorizeRequest(r);return(await hA(document,this.config,i,r,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Hm(Bm,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,i=await Uu(this.getDiscoveredAuthority.bind(this),hc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});this.browserStorage.cacheAuthorizeRequest(e);return(await mA(document,this.config,i,e,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Hm(Bm,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e="",t,i,o){const r=this.initializeServerTelemetryManager(bf);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(gf,!0)||Da.EMPTY_STRING,l=Ud(s);if(l===Ud(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(!Mg()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Tf,a,!0);const e={apiId:bf,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 xd(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(gf,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 Js&&(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===cs?window.location.search:window.location.hash);let i=Dd(t);if(i){try{iA(i,this.browserCrypto,Sf.Redirect)}catch(e){return e instanceof Js&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return Sg(window),this.logger.verbose("Hash contains known properties, returning response hash"),[i,t]}const o=this.browserStorage.getTemporaryCache(Tf,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Tf)),o&&(i=Dd(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 Hm($h);if(e.ear_jwe){const i=await Uu(this.getDiscoveredAuthority.bind(this),hc,this.logger,this.performanceClient,t.correlationId)({requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account});return Uu(AA,Hc,this.logger,this.performanceClient,t.correlationId)(t,e,Cf,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}const r=await Uu(this.createAuthCodeClient.bind(this),Uc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:t.authority});return Uu(TA,Kc,this.logger,this.performanceClient,t.correlationId)(t,e,i,Cf,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:Cf,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"),Hm(zh)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),i=this.initializeServerTelemetryManager(vf);try{this.eventHandler.emitEvent(WT,Sf.Redirect,e),await this.clearCacheOnLogout(this.correlationId,t.account);const o={apiId:vf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=await Uu(this.createAuthCodeClient.bind(this),Uc,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===Zd)try{r.authority.endSessionEndpoint}catch{if(t.account?.homeAccountId)return void this.eventHandler.emitEvent(GT,Sf.Redirect,t)}const n=r.getLogoutUri(t);if(this.eventHandler.emitEvent(GT,Sf.Redirect,t),!e||"function"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,ff),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,ff),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 Js&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),this.eventHandler.emitEvent(HT,Sf.Redirect,null,e),this.eventHandler.emitEvent(YT,Sf.Redirect),e}this.eventHandler.emitEvent(YT,Sf.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return xd.getAbsoluteUrl(t,Dg())}}
|
|
145
145
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function PA(e,t,i,o,r){if(t.addQueueMeasurement(Sc,o),!e)throw i.info("Navigate url is empty"),Hm(zh);return r?Uu(SA,Dc,i,t,o)(e,r,t,o):ku(MA,kc,i,t,o)(e)}async function wA(e,t,i,o,r){const n=DA();if(!n.contentDocument)throw"No document associated with iframe!";return(await mA(n.contentDocument,e,t,i,o,r)).submit(),n}async function vA(e,t,i,o,r){const n=DA();if(!n.contentDocument)throw"No document associated with iframe!";return(await hA(n.contentDocument,e,t,i,o,r)).submit(),n}async function LA(e,t,i,o,r,n,a){return o.addQueueMeasurement(Mc,n),new Promise((o,n)=>{t<Kg&&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(Hm(rm))},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===cs?i.location.search:i.location.hash),window.clearTimeout(s),window.clearInterval(l),o(r)},i)}).finally(()=>{ku(kA,mp,r,o,n)(e)})}function SA(e,t,i,o){return i.addQueueMeasurement(Dc,o),new Promise((i,o)=>{const r=DA();window.setTimeout(()=>{r?(r.src=e,i(r)):o("Unable to load iframe")},t)})}function MA(e){const t=DA();return t.src=e,t}function DA(){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 kA(e){document.body===e.parentNode&&document.body.removeChild(e)}
|
|
146
146
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class UA extends eA{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(dc,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!==as&&t.prompt!==ss&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${as}`),t.prompt=as):t.prompt=as;const i=await Uu(this.initializeAuthorizationRequest.bind(this),Fc,this.logger,this.performanceClient,e.correlationId)(t,Sf.Silent);return i.platformBroker=NA(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme),qg(i.authority),this.config.auth.protocolMode===Jd?this.executeEarFlow(i):this.executeCodeFlow(i)}async executeCodeFlow(e){let t;const i=this.initializeServerTelemetryManager(this.apiId);try{return t=await Uu(this.createAuthCodeClient.bind(this),Uc,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),await Uu(this.silentTokenHelper.bind(this),Lc,this.logger,this.performanceClient,e.correlationId)(t,e)}catch(o){if(o instanceof Js&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),!(t&&o instanceof Js&&o.errorCode===Ym))throw o;return this.performanceClient.addFields({retryError:o.errorCode},this.correlationId),await Uu(this.silentTokenHelper.bind(this),Lc,this.logger,this.performanceClient,this.correlationId)(t,e)}}async executeEarFlow(e){const t=e.correlationId,i=await Uu(this.getDiscoveredAuthority.bind(this),hc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await Uu(Ag,Lp,this.logger,this.performanceClient,t)(),r={...e,earJwk:o},n=await Uu(vA,Sc,this.logger,this.performanceClient,t)(this.config,i,r,this.logger,this.performanceClient),a=this.config.auth.OIDCOptions.serverResponseType,s=await Uu(LA,Mc,this.logger,this.performanceClient,t)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,t,a),l=ku(tA,Xc,this.logger,this.performanceClient,t)(s,a,this.logger);return Uu(AA,Hc,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(Hm(dm))}async silentTokenHelper(e,t){const i=t.correlationId;this.performanceClient.addQueueMeasurement(Lc,i);const o=await Uu(yA,Ip,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),r={...t,codeChallenge:o.challenge};let n;if(t.httpMethod===Ga)n=await Uu(wA,Sc,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);else{const t=await Uu(uA,Bc,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);n=await Uu(PA,Sc,this.logger,this.performanceClient,i)(t,this.performanceClient,this.logger,i,this.config.system.navigateFrameWait)}const a=this.config.auth.OIDCOptions.serverResponseType,s=await Uu(LA,Mc,this.logger,this.performanceClient,i)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,i,a),l=ku(tA,Xc,this.logger,this.performanceClient,i)(s,a,this.logger);return Uu(TA,Kc,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
147
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class xA extends eA{async acquireToken(e){this.performanceClient.addQueueMeasurement(pc,e.correlationId);const t=await Uu(ZT,bc,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(wf),r=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:i.authority,azureCloudOptions:i.azureCloudOptions,account:i.account});return Uu(r.acquireTokenByRefreshToken.bind(r),_c,this.logger,this.performanceClient,e.correlationId)(i).catch(e=>{throw e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e),e})}logout(){return Promise.reject(Hm(dm))}async createRefreshTokenClient(e){const t=await Uu(this.getClientConfiguration.bind(this),xc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new wh(t,this.performanceClient)}}
|
|
@@ -150,17 +150,17 @@ function tA(e,t,i){const o=Dd(e);if(!o)throw Md(e)?(i.error(`A ${t} is present i
|
|
|
150
150
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class qA extends eA{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 Hm(Cm);const t=await Uu(this.initializeAuthorizationRequest.bind(this),Fc,this.logger,this.performanceClient,e.correlationId)(e,Sf.Silent),i=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},r=await Uu(this.getClientConfiguration.bind(this),xc,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),n=new BA(r);this.logger.verbose("Auth code client created");const a=new oA(n,this.browserStorage,o,this.logger,this.performanceClient);return await Uu(a.handleCodeResponseFromServer.bind(a),Wc,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 Js&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),e}}logout(){return Promise.reject(Hm(dm))}}
|
|
151
151
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
152
152
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
153
|
-
function WA(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 GA(e,t){try{Fg(e)}catch(e){throw t.end({success:!1},e),e}}class HA{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 lT(this.logger,this.performanceClient):zl,this.eventHandler=new QT(this.logger),this.browserStorage=this.isBrowserEnvironment?new zT(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 Cd(cd)}return{canonicalAuthority:e.authority?eh(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 zT(t,{cacheLocation:pf,cacheRetentionDays:5,temporaryCacheLocation:pf,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},zl,i,o,r));const n={cacheLocation:pf,cacheRetentionDays:5,temporaryCacheLocation:pf,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new zT(this.config.auth.clientId,n,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new FA(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 HA(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(_T);const i=e?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(wc,i);if(this.eventHandler.emitEvent(IT),!t)try{this.logMultipleInstances(r)}catch{}if(await Uu(this.browserStorage.initialize.bind(this.browserStorage),vc,this.logger,this.performanceClient,i)(i),o)try{this.platformAuthProvider=await CA(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"),ku(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),fp,this.logger,this.performanceClient,i)(i)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(i),this.initialized=!0,this.eventHandler.emitEvent(_T),r.end({allowPlatformBroker:o,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),xg(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===ff)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(FT,Sf.Redirect);try{if(r&&this.platformAuthProvider){n=this.performanceClient.startMeasurement(nc,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),n.add({isPlatformBrokerRequest:!0});const e=new cA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bf,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);a=Uu(e.handleRedirectPromise.bind(e),up,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(nc,o),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const r=this.createRedirectClient(o);a=Uu(r.handleRedirectPromise.bind(r),pp,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(RT,Sf.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(wT,Sf.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),n.end({success:!0,accountType:WA(e.account)})}else n.event.errorCode?n.end({success:!1}):n.discard();return this.eventHandler.emitEvent(BT,Sf.Redirect),e}).catch(e=>{this.browserStorage.resetRequestCache();const t=e;throw i.length>0?this.eventHandler.emitEvent(vT,Sf.Redirect,null,t):this.eventHandler.emitEvent(bT,Sf.Redirect,null,t),this.eventHandler.emitEvent(BT,Sf.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(rc,t);i.add({accountType:WA(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(Bg(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,mf),r?this.eventHandler.emitEvent(PT,Sf.Redirect,e):this.eventHandler.emitEvent(NT,Sf.Redirect,e),this.platformAuthProvider&&this.canUsePlatformBroker(e)){o=new cA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Cf,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 aA&&sA(o)){this.platformAuthProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(o instanceof Ah){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(nc,t).end({success:!1},e):i.end({success:!1},e),r?this.eventHandler.emitEvent(vT,Sf.Redirect,null,e):this.eventHandler.emitEvent(bT,Sf.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(oc,t);i.add({scenarioId:e.scenarioId,accountType:WA(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),GA(this.initialized,i),this.browserStorage.setInteractionInProgress(!0,mf)}catch(e){return Promise.reject(e)}const o=this.getAllAccounts();let r;o.length>0?this.eventHandler.emitEvent(PT,Sf.Popup,e):this.eventHandler.emitEvent(NT,Sf.Popup,e);const n=this.getPreGeneratedPkceCodes(t);if(this.canUsePlatformBroker(e))i.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative({...e,correlationId:t},Nf).then(e=>(i.end({success:!0,accountType:WA(e.account)}),e)).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof aA&&sA(o)){this.platformAuthProvider=void 0;return this.createPopupClient(t).acquireToken(e,n)}if(o instanceof Ah){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(RT,Sf.Popup,e):this.eventHandler.emitEvent(wT,Sf.Popup,e),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:WA(e.account)}),e)).catch(e=>(o.length>0?this.eventHandler.emitEvent(vT,Sf.Popup,null,e):this.eventHandler.emitEvent(bT,Sf.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(uc,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:WA(e.account)}),GA(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(ST,Sf.Silent,i),this.canUsePlatformBroker(i))this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(i,Rf).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof aA&&sA(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(MT,Sf.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:WA(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(DT,Sf.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(Xd,t);GA(this.initialized,i),this.eventHandler.emitEvent(kT,Sf.Silent,e),i.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Hm(Rm);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(UT,Sf.Silent,e),this.hybridAuthCodeResponses.delete(o),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:WA(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(xT,Sf.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},Pf,e.nativeAccountId).catch(e=>{throw e instanceof aA&&sA(e)&&(this.platformAuthProvider=void 0),i.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return i.end({accountType:WA(o.account),success:!0}),o}throw Hm(Pm)}throw Hm(Nm)}catch(e){throw this.eventHandler.emitEvent(xT,Sf.Silent,null,e),i.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(cp,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(Oc,e.correlationId),t){case Yf:case Kf:case Vf:const t=this.createSilentCacheClient(e.correlationId);return Uu(t.acquireToken.bind(t),lc,this.logger,this.performanceClient,e.correlationId)(e);default:throw Vl(Sl)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(ec,e.correlationId),t){case Yf:case Vf:case zf:case $f:const t=this.createSilentRefreshClient(e.correlationId);return Uu(t.acquireToken.bind(t),pc,this.logger,this.performanceClient,e.correlationId)(e);default:throw Vl(Sl)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(Rc,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return Uu(t.acquireToken.bind(t),dc,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);Bg(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,ff);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);Fg(this.initialized),this.browserStorage.setInteractionInProgress(!0,ff);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();
|
|
153
|
+
function WA(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 GA(e,t){try{Fg(e)}catch(e){throw t.end({success:!1},e),e}}class HA{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 lT(this.logger,this.performanceClient):zl,this.eventHandler=new $T(this.logger),this.browserStorage=this.isBrowserEnvironment?new zT(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 Cd(cd)}return{canonicalAuthority:e.authority?eh(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 zT(t,{cacheLocation:pf,cacheRetentionDays:5,temporaryCacheLocation:pf,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},zl,i,o,r));const n={cacheLocation:pf,cacheRetentionDays:5,temporaryCacheLocation:pf,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new zT(this.config.auth.clientId,n,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new FA(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 HA(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(_T);const i=e?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(wc,i);if(this.eventHandler.emitEvent(IT),!t)try{this.logMultipleInstances(r)}catch{}if(await Uu(this.browserStorage.initialize.bind(this.browserStorage),vc,this.logger,this.performanceClient,i)(i),o)try{this.platformAuthProvider=await CA(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"),ku(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),fp,this.logger,this.performanceClient,i)(i)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(i),this.initialized=!0,this.eventHandler.emitEvent(_T),r.end({allowPlatformBroker:o,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),xg(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===ff)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(FT,Sf.Redirect);try{if(r&&this.platformAuthProvider){n=this.performanceClient.startMeasurement(nc,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),n.add({isPlatformBrokerRequest:!0});const e=new cA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bf,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);a=Uu(e.handleRedirectPromise.bind(e),up,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(nc,o),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const r=this.createRedirectClient(o);a=Uu(r.handleRedirectPromise.bind(r),pp,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(RT,Sf.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(wT,Sf.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),n.end({success:!0,accountType:WA(e.account)})}else n.event.errorCode?n.end({success:!1}):n.discard();return this.eventHandler.emitEvent(BT,Sf.Redirect),e}).catch(e=>{this.browserStorage.resetRequestCache();const t=e;throw i.length>0?this.eventHandler.emitEvent(vT,Sf.Redirect,null,t):this.eventHandler.emitEvent(bT,Sf.Redirect,null,t),this.eventHandler.emitEvent(BT,Sf.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(rc,t);i.add({accountType:WA(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(Bg(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,mf),r?this.eventHandler.emitEvent(PT,Sf.Redirect,e):this.eventHandler.emitEvent(NT,Sf.Redirect,e),this.platformAuthProvider&&this.canUsePlatformBroker(e)){o=new cA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Cf,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 aA&&sA(o)){this.platformAuthProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(o instanceof Ah){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(nc,t).end({success:!1},e):i.end({success:!1},e),r?this.eventHandler.emitEvent(vT,Sf.Redirect,null,e):this.eventHandler.emitEvent(bT,Sf.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(oc,t);i.add({scenarioId:e.scenarioId,accountType:WA(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),GA(this.initialized,i),this.browserStorage.setInteractionInProgress(!0,mf)}catch(e){return Promise.reject(e)}const o=this.getAllAccounts();let r;o.length>0?this.eventHandler.emitEvent(PT,Sf.Popup,e):this.eventHandler.emitEvent(NT,Sf.Popup,e);const n=this.getPreGeneratedPkceCodes(t);if(this.canUsePlatformBroker(e))i.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative({...e,correlationId:t},Nf).then(e=>(i.end({success:!0,accountType:WA(e.account)}),e)).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof aA&&sA(o)){this.platformAuthProvider=void 0;return this.createPopupClient(t).acquireToken(e,n)}if(o instanceof Ah){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(RT,Sf.Popup,e):this.eventHandler.emitEvent(wT,Sf.Popup,e),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:WA(e.account)}),e)).catch(e=>(o.length>0?this.eventHandler.emitEvent(vT,Sf.Popup,null,e):this.eventHandler.emitEvent(bT,Sf.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(uc,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:WA(e.account)}),GA(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(ST,Sf.Silent,i),this.canUsePlatformBroker(i))this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(i,Rf).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof aA&&sA(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(MT,Sf.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:WA(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(DT,Sf.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(Xd,t);GA(this.initialized,i),this.eventHandler.emitEvent(kT,Sf.Silent,e),i.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Hm(Rm);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(UT,Sf.Silent,e),this.hybridAuthCodeResponses.delete(o),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:WA(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(xT,Sf.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},Pf,e.nativeAccountId).catch(e=>{throw e instanceof aA&&sA(e)&&(this.platformAuthProvider=void 0),i.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return i.end({accountType:WA(o.account),success:!0}),o}throw Hm(Pm)}throw Hm(Nm)}catch(e){throw this.eventHandler.emitEvent(xT,Sf.Silent,null,e),i.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(cp,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(Oc,e.correlationId),t){case Yf:case Kf:case Vf:const t=this.createSilentCacheClient(e.correlationId);return Uu(t.acquireToken.bind(t),lc,this.logger,this.performanceClient,e.correlationId)(e);default:throw Vl(Sl)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(ec,e.correlationId),t){case Yf:case Vf:case zf:case Qf:const t=this.createSilentRefreshClient(e.correlationId);return Uu(t.acquireToken.bind(t),pc,this.logger,this.performanceClient,e.correlationId)(e);default:throw Vl(Sl)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(Rc,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return Uu(t.acquireToken.bind(t),dc,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);Bg(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,ff);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);Fg(this.initialized),this.browserStorage.setInteractionInProgress(!0,ff);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
154
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
155
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
156
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */(this.browserStorage,e)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const i=dh.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 Hm(Lm);return new cA(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(!NA(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 as:case ns:case os: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 RA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createRedirectClient(e){return new bA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentIframeClient(e){return new UA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Rf,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentCacheClient(e){return new dA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentRefreshClient(e){return new xA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentAuthCodeClient(e){return new qA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Pf,this.performanceClient,this.platformAuthProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return Ug(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){this.config.cache.cacheLocation===df?this.eventHandler.subscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}disableAccountStorageEvents(){this.config.cache.cacheLocation===df?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?gg():Da.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||qf})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||qf})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(tc,t);i.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),GA(this.initialized,i),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw Hm(cm);return i.add({accountType:WA(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 Js&&e.setCorrelationId(t),i.end({success:!1},e),e})}async acquireTokenSilentDeduped(e,t,i){const o=oh(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=Uu(this.acquireTokenSilentAsync.bind(this),ic,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(ic,e.correlationId),this.eventHandler.emitEvent(PT,Sf.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",i);const o=await Uu(JT,Pc,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),r=e.cacheLookupPolicy||Yf;return this.acquireTokenSilentNoIframe(o,r).catch(async e=>{const t=function(e,t){const i=!(e instanceof Ah&&e.subError!==mh),o=e.errorCode===Ym||e.errorCode===Sl,r=i&&o||e.errorCode===ch||e.errorCode===uh,n=jf.includes(t);return r&&n}
|
|
157
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */(e,r);if(t){if(this.activeIframeRequest){if(r
|
|
157
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */(e,r);if(t){if(this.activeIframeRequest){if(r!==$f){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(cc,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),Uu(this.acquireTokenBySilentIframe.bind(this),Rc,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),Uu(this.acquireTokenBySilentIframe.bind(this),Rc,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(wT,Sf.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache},e.correlationId),t)).catch(e=>{throw this.eventHandler.emitEvent(vT,Sf.Silent,null,e),e}).finally(()=>{document.removeEventListener("visibilitychange",i)})}async acquireTokenSilentNoIframe(e,t){return NA(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,wf,e.account.nativeAccountId,t).catch(async t=>{if(this.performanceClient.addFields({brokerErrorName:t.name,brokerErrorCode:t.errorCode},e.correlationId),t instanceof aA&&sA(t))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,Vl(Sl);throw t})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),t===Kf&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),Uu(this.acquireTokenFromCache.bind(this),Oc,this.logger,this.performanceClient,e.correlationId)(e,t).catch(i=>{if(t===Kf)throw i;return this.eventHandler.emitEvent(LT,Sf.Silent,e),Uu(this.acquireTokenByRefreshToken.bind(this),ec,this.logger,this.performanceClient,e.correlationId)(e,t)}))}async preGeneratePkceCodes(e){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=await Uu(yA,Ip,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
158
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
159
159
|
class YA{static async createPublicClientApplication(e){const t=await async function(e,t){const i=new rT(e);return await i.initialize(),HA.createController(i,t)}(e);return new YA(e,t)}constructor(e,t){this.isBroker=!1,this.controller=t||new HA(new rT(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
160
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */const KA={initialize:()=>Promise.reject(Lg(bg)),acquireTokenPopup:()=>Promise.reject(Lg(bg)),acquireTokenRedirect:()=>Promise.reject(Lg(bg)),acquireTokenSilent:()=>Promise.reject(Lg(bg)),acquireTokenByCode:()=>Promise.reject(Lg(bg)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject(Lg(bg)),loginPopup:()=>Promise.reject(Lg(bg)),loginRedirect:()=>Promise.reject(Lg(bg)),logout:()=>Promise.reject(Lg(bg)),logoutRedirect:()=>Promise.reject(Lg(bg)),logoutPopup:()=>Promise.reject(Lg(bg)),ssoSilent:()=>Promise.reject(Lg(bg)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw Lg(bg)},getLogger:()=>{throw Lg(bg)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw Lg(bg)},hydrateCache:()=>Promise.reject(Lg(bg)),clearCache:()=>Promise.reject(Lg(bg))};
|
|
161
161
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */class VA{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case NT:return Df;case ST:return xf;case PT:if(e.interactionType===Sf.Redirect||e.interactionType===Sf.Popup)return Uf;break;case FT:return Ff;case WT:return kf;case MT:case DT:if(t&&t!==xf)break;return Bf;case YT:if(t&&t!==kf)break;return Bf;case BT:if(t&&t!==Ff)break;return Bf;case RT:case bT:case wT:case vT:case KT:if(e.interactionType===Sf.Redirect||e.interactionType===Sf.Popup){if(t&&t!==Df&&t!==Uf)break;return Bf}}return null}}
|
|
162
|
-
/*! @azure/msal-react v3.0.19 2025-08-19 */const zA={instance:KA,inProgress:Bf,accounts:[],logger:new
|
|
162
|
+
/*! @azure/msal-react v3.0.19 2025-08-19 */const zA={instance:KA,inProgress:Bf,accounts:[],logger:new $l({})},QA=ue.createContext(zA);
|
|
163
163
|
/*! @azure/msal-react v3.0.19 2025-08-19 */
|
|
164
|
-
function
|
|
165
|
-
/*! @azure/msal-react v3.0.19 2025-08-19 */$A.Consumer;const jA="3.0.19",ZA="UNBLOCK_INPROGRESS",JA="EVENT",XA=(e,t)=>{const{type:i,payload:o}=t;let r=e.inProgress;switch(i){case ZA:e.inProgress===Mf&&(r=Bf,o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case JA:const t=o.message,n=VA.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===Mf)return e;const n=o.instance.getAllAccounts();return r===e.inProgress||QA(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:QA(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function ey({instance:e,children:t}){fe(()=>{e.initializeWrapperLibrary(Wf,jA)},[e]);const i=Ae(()=>e.getLogger().clone("@azure/msal-react",jA),[e]),[o,r]=ye(XA,void 0,()=>({inProgress:Mf,accounts:[]}));fe(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:i,message:t},type:JA})});return i.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:i},type:ZA})})}).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 he.createElement($A.Provider,{value:n},t)}const ty=e=>{const t=A(),i=new YA({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}});kt.setLicenseKey(e.muiPremiumKey);const o={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||ui} #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||ui},secondary:{main:e.appTheme?.light?.secondaryColor||hi},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||mi} #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||mi},secondary:{main:e.appTheme?.dark?.secondaryColor||fi}}},n=y(e=>e.AppLayout);let a={...o};"dark"===n.themeMode&&(a={...r});const s=le({direction:n.appDirection,...a});return fe(()=>{document.title=e.documentTitle,t(La.setAppInfo(e));let i={};e.enableAdministrationModule&&(i={...Ma}),e.businessCommonStoresMetaData&&(i={...i,...e.businessCommonStoresMetaData}),t(ti(i))},[e]),g(pe,{theme:s,children:"AZURE"===e?.authenticationMethod?g(ey,{instance:i,children:g(wa,{msalInstance:i})}):g(wa,{msalInstance:i})})};var iy={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"},oy={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 ry={...iy,...oy,...{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 ny={"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:"عرض"},ay={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 sy={...ny,...ay,...{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"}};_.add(E),_.add(O),_.add(C);const ly=e=>{const[t,i]=me({AppLayout:qt,UserSession:$t,loadingMask:Yt,commonStores:ii,SideBar:Rn,AppInfo:Sa}),o=Pe({reducer:t}),[r,n]=me(!1);return fe(()=>{(()=>{const t={AppLayout:qt,UserSession:$t,loadingMask:Yt,commonStores:ii,SideBar:Rn,AppInfo:Sa,...e?.businessReduxReducers};i(e=>({...t}));const o={en:{translation:{...ry,...e?.businessLocals?.en}},ar:{translation:{...sy,...e?.businessLocals?.ar}}};Se.use(De).init({resources:o,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),n(!0)})()},[e]),r?g(I,{store:o,children:g(ty,{...e})}):g(T,{})};export{Yr as AttachmentCard,Hr as AttachmentImageViewer,Kr as AttachmentPanel,ly as BaseApp,li as CheckBox,di as ComboBox,mi as DARK_THEME_INITIAL_MAIN_COLOR,fi as DARK_THEME_INITIAL_SECANDARY_COLOR,ci as DATE_FORMAT,pi as DATE_TIME_FORMAT,_n as DashboardRouteView,In as DashboardViewer,gi as Datefield,Ti as DatetimeField,an as ExcelReportViewer,qr as FormElement,ui as LIGHT_THEME_INITIAL_MAIN_COLOR,hi as LIGHT_THEME_INITIAL_SECANDARY_COLOR,ln as ReportViewer,Ai as SystemLookupCombobox,un as TemplateBarChart,hn as TemplateDataCard,cn as TemplateForm,mn as TemplateGauge,rn as TemplateGrid,fn as TemplateLineChart,Tn as TemplateLineProgress,An as TemplatePieChart,ri as TemplateTextField,si as TransferList,dn as WorkflowDocumentPanel,Vr as WorkflowDocumentTimeLine,pn as WorkflowRouteComponent,kr as capitalizeFirstLetter,Ni as constructGridColumnsFromFields,Ri as constructValidationSchema,Fr as formatDate,Ci as getAllFields,Oi as getElementFields,bi as getGridSelection,Sr as hasDigitsOnly,Mr as isNumber,Dr as isNumeric,Ur as isValidEmail,Br as parseStringToDate,xr as timeAgo,oi as useApiActions,Qt as useAxios,jt as useConfirmationWindow,Ut as useIsMobile,Kt as useLoadingMask,Zt as useSession,Jt as useWindow};
|
|
164
|
+
function $A(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 */QA.Consumer;const jA="3.0.19",ZA="UNBLOCK_INPROGRESS",JA="EVENT",XA=(e,t)=>{const{type:i,payload:o}=t;let r=e.inProgress;switch(i){case ZA:e.inProgress===Mf&&(r=Bf,o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case JA:const t=o.message,n=VA.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===Mf)return e;const n=o.instance.getAllAccounts();return r===e.inProgress||$A(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:$A(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function ey({instance:e,children:t}){fe(()=>{e.initializeWrapperLibrary(Wf,jA)},[e]);const i=Ae(()=>e.getLogger().clone("@azure/msal-react",jA),[e]),[o,r]=ye(XA,void 0,()=>({inProgress:Mf,accounts:[]}));fe(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:i,message:t},type:JA})});return i.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:i},type:ZA})})}).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 he.createElement(QA.Provider,{value:n},t)}const ty=e=>{const t=A(),i=new YA({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}});kt.setLicenseKey(e.muiPremiumKey);const o={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||ui} #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||ui},secondary:{main:e.appTheme?.light?.secondaryColor||hi},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||mi} #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||mi},secondary:{main:e.appTheme?.dark?.secondaryColor||fi}}},n=y(e=>e.AppLayout);let a={...o};"dark"===n.themeMode&&(a={...r});const s=le({direction:n.appDirection,...a});return fe(()=>{document.title=e.documentTitle,t(La.setAppInfo(e));let i={};e.enableAdministrationModule&&(i={...Ma}),e.businessCommonStoresMetaData&&(i={...i,...e.businessCommonStoresMetaData}),t(ti(i))},[e]),g(pe,{theme:s,children:"AZURE"===e?.authenticationMethod?g(ey,{instance:i,children:g(wa,{msalInstance:i})}):g(wa,{msalInstance:i})})};var iy={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"},oy={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 ry={...iy,...oy,...{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 ny={"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:"عرض"},ay={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 sy={...ny,...ay,...{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"}};_.add(E),_.add(O),_.add(C);const ly=e=>{const[t,i]=me({AppLayout:qt,UserSession:Qt,loadingMask:Yt,commonStores:ii,SideBar:Rn,AppInfo:Sa}),o=Pe({reducer:t}),[r,n]=me(!1);return fe(()=>{(()=>{const t={AppLayout:qt,UserSession:Qt,loadingMask:Yt,commonStores:ii,SideBar:Rn,AppInfo:Sa,...e?.businessReduxReducers};i(e=>({...t}));const o={en:{translation:{...ry,...e?.businessLocals?.en}},ar:{translation:{...sy,...e?.businessLocals?.ar}}};Se.use(De).init({resources:o,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),n(!0)})()},[e]),r?g(I,{store:o,children:g(ty,{...e})}):g(T,{})};export{Yr as AttachmentCard,Hr as AttachmentImageViewer,Kr as AttachmentPanel,ly as BaseApp,li as CheckBox,di as ComboBox,mi as DARK_THEME_INITIAL_MAIN_COLOR,fi as DARK_THEME_INITIAL_SECANDARY_COLOR,ci as DATE_FORMAT,pi as DATE_TIME_FORMAT,_n as DashboardRouteView,In as DashboardViewer,gi as Datefield,Ti as DatetimeField,an as ExcelReportViewer,qr as FormElement,ui as LIGHT_THEME_INITIAL_MAIN_COLOR,hi as LIGHT_THEME_INITIAL_SECANDARY_COLOR,ln as ReportViewer,Ai as SystemLookupCombobox,un as TemplateBarChart,hn as TemplateDataCard,cn as TemplateForm,mn as TemplateGauge,rn as TemplateGrid,fn as TemplateLineChart,Tn as TemplateLineProgress,An as TemplatePieChart,ri as TemplateTextField,si as TransferList,dn as WorkflowDocumentPanel,Vr as WorkflowDocumentTimeLine,pn as WorkflowRouteComponent,kr as capitalizeFirstLetter,Ni as constructGridColumnsFromFields,Ri as constructValidationSchema,Fr as formatDate,Ci as getAllFields,Oi as getElementFields,bi as getGridSelection,Sr as hasDigitsOnly,Mr as isNumber,Dr as isNumeric,Ur as isValidEmail,Br as parseStringToDate,xr as timeAgo,oi as useApiActions,$t as useAxios,jt as useConfirmationWindow,Ut as useIsMobile,Kt as useLoadingMask,Zt as useSession,Jt as useWindow};
|
|
166
166
|
//# sourceMappingURL=index.mjs.map
|