aiware-js 1.0.0-master.717 → 1.0.0-master.718
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/js-core.esm.js +3 -3
- package/js-core.esm.js.gz +0 -0
- package/js-core.esm20.js +1 -1
- package/js-core.esm20.js.gz +0 -0
- package/js-core.esm66.js +1 -1
- package/js-core.esm66.js.gz +0 -0
- package/js-core.esm67.js +3 -3
- package/js-core.esm67.js.gz +0 -0
- package/js-core.esm68.js +12 -2
- package/js-core.esm68.js.gz +0 -0
- package/js-core.esm71.js +1 -1
- package/js-core.esm71.js.gz +0 -0
- package/js-core.esm79.js +1 -1
- package/js-core.esm79.js.gz +0 -0
- package/js-core.esm80.js +1 -1
- package/js-core.esm80.js.gz +0 -0
- package/js-core.esm81.js +1 -1
- package/js-core.esm81.js.gz +0 -0
- package/js-core.esm87.js +1 -1
- package/js-core.esm87.js.gz +0 -0
- package/js-core.esm88.js +1 -1
- package/js-core.esm88.js.gz +0 -0
- package/js-core.esm89.js +1 -1
- package/js-core.esm89.js.gz +0 -0
- package/js-core.esm90.js +1 -1
- package/js-core.esm90.js.gz +0 -0
- package/js-core.esm91.js +1 -1
- package/js-core.esm91.js.gz +0 -0
- package/js-core.umd.js +111 -101
- package/js-core.umd.js.gz +0 -0
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm.js
CHANGED
|
@@ -1432,7 +1432,7 @@ createScheduledJob(input:{
|
|
|
1432
1432
|
id
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
|
-
`,operationName:e,token:n,graphQLEndpoint:r}))[t])?void 0:e.id}),selectUserAppGroups=e=>{return(null==(e=e[namespace$3$1])?void 0:e.appGroups)||[]},selectUserAppGroupsRootFolderId=e=>{return(null==(e=e[namespace$3$1])?void 0:e.appGroupsRootFolderId)||""},selectUserAppGroupsUiStatus=e=>{return null==(e=e[namespace$3$1])?void 0:e.uiStatus},selectAppGroupsEditMode=e=>{return!!((null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.appGroups)||[]).find(e=>e.isEdited)};function*fetchUserGroupsSaga(){var t,n,r,i;try{var o=yield select(graphEndpointSelector),a=yield select(sessionTokenSelector);let e=yield select(selectUserAppGroupsRootFolderId);if(!e){var s=yield call$i(fetchUserAppGroupsRootFolderIdApi,a,o);if(!s||s.length<2||null==(t=s[1])||!t.id)return yield put(fetchUserAppGroupsFailed()),void console.log("Something went wrong while creating root folder for applications");e=null==(n=s[1])?void 0:n.id}var l=yield call$i(fetchUserAppGroupsApi,a,o,e),c=(null==(i=null==(r=null==l?void 0:l.childFolders)?void 0:r.records)?void 0:i.map(e=>{var t;return{groupName:e.name,id:e.id,treeObjectId:e.treeObjectId,apps:null==(t=null==e?void 0:e.childApplications)?void 0:t.records.map(e=>e.id),priority:null==e?void 0:e.orderIndex,parentTreeObjectId:null==(t=null==e?void 0:e.parent)?void 0:t.treeObjectId,isNew:!1,expanded:!1,isEdited:!1,isExpanded:!0}}))||[];c.sort((e,t)=>(null==e?void 0:e.priority)-(null==t?void 0:t.priority)),yield put(fetchUserAppGroupsRootFolderIdSuccess(e)),yield put(fetchUserAppGroupSuccess(c))}catch(e){yield put(fetchUserAppGroupsFailed()),console.log("Something went wrong while creating root folder for applications",e)}}function*createNewAppGroupStartSaga(e){yield select(preferredLanguageSelector);try{const o=yield select(graphEndpointSelector),a=yield select(sessionTokenSelector);var t=yield select(selectUserAppGroupsRootFolderId),n=e.payload,r=(yield select(selectUserAppGroups)).find(e=>!0===e.isNew),i=(null==r?void 0:r.apps)||[];const s=yield call$i(createUserGroupApi,a,o,n,t);s&&0<i.length&&(yield all(i.map(e=>call$i(addAppToUserGroupApi,a,o,e,s)))),yield put(fetchUserAppGroupsStart())}catch(e){console.log("Something went wrong while creating application group",e),yield put(showMessage({content:"Something went wrong while creating your application group",severity:MessageSeverity.Error}))}}function*addAppToGroupSaga(e){yield select(preferredLanguageSelector);try{var t,n,r=e.payload.destination,i=e.payload.appId;validate(r)&&validate(i)&&(t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),yield call$i(addAppToUserGroupApi,n,t,i,r))}catch(e){console.log("Something went wrong while adding app to application group",e),yield put(showMessage({content:"Something went wrong while adding application to group",severity:MessageSeverity.Error}))}}function*removeAppFromGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.source,n=e.payload.appId,r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);yield call$i(removeAppFromGroupApi,i,r,n,t)}catch(e){console.log("Something went wrong while removing application from group",e),yield put(showMessage({content:"Something went wrong while removing application from group",severity:MessageSeverity.Error}))}}function*deleteAppGroupSaga(e){yield select(preferredLanguageSelector);try{const i=e.payload;var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),r=(yield select(selectUserAppGroups)||[]).find(e=>e.id===i);r&&r.treeObjectId&&(yield call$i(deleteAppGroupApi,n,t,r.treeObjectId,r.priority),yield put(fetchUserAppGroupsStart()))}catch(e){console.log("Something went wrong while deleting application group",e),yield put(showMessage({content:"Something went wrong while deleting application group",severity:MessageSeverity.Error}))}}function*editAppGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.groupId,n=e.payload.newGroupName,r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);t&&n&&(yield call$i(editAppGroupApi,i,r,t,n))}catch(e){console.log("Something went wrong while editing application group",e),yield put(showMessage({content:"Something went wrong while editing application group",severity:MessageSeverity.Error}))}}function*updateGroupPrioritySaga(e){yield select(preferredLanguageSelector);try{const s=e.payload.groupId;var t=e.payload.newPriority,n=e.payload.prevPriority,r=yield select(selectUserAppGroups)||[],i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=r.find(e=>e.id===s);a&&void 0!==t&&void 0!==n&&(yield call$i(updateGroupPriorityApi,o,i,t,n,a))}catch(e){console.log("Something went wrong while updating application group order",e),yield put(showMessage({content:"Something went wrong while updating application group order",severity:MessageSeverity.Error}))}}function*rootSaga$1$1(){yield all([takeLatest$1(fetchUserAppGroupsStart.type,fetchUserGroupsSaga),takeLatest$1(createNewAppGroupStart.type,createNewAppGroupStartSaga),takeLatest$1(addAppToGroup.type,addAppToGroupSaga),takeLatest$1(removeAppFromGroup.type,removeAppFromGroupSaga),takeLatest$1(deleteAppGroup.type,deleteAppGroupSaga),takeLatest$1(editAppGroup.type,editAppGroupSaga),takeLatest$1(updateGroupPriority.type,updateGroupPrioritySaga)])}function getAppGroupModule(){return{id:"user-app-group",reducerMap:{[namespace$3$1]:appGroupReducer},sagas:[rootSaga$1$1],initialActions:[]}}const styles={title:{my:2},content:{minWidth:360,px:0,pt:3,pb:0},button:{fontSize:"12px"},actions:{px:4,pt:4,pb:2},cancelButton:{color:"black",py:2},deleteButton:{py:2}},iconMapper={CMS:img$Z,Discovery:img$Y,Collection:img$X,Library:img$W,Admin:img$1x,Developer:img$V};function AppIcon({id:t,icon:e,type:n,iconUrl:r,appName:i,onClick:o,appListV2:a=!1,isAppGroup:s,appGroupId:l}){a=useStyles$d$1({appListV2:a,type:n}).classes;const[c,u]=react.exports.useState(e||r||i&&iconMapper[i]||img$V),[d,p]=react.exports.useState(!1);const[f,h]=react.exports.useState(null);e=Boolean(f);const m=useDispatch();const g=e=>{e.stopPropagation(),h(null),p(!1)};return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:i||"",PopperProps:{disablePortal:!0}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:function(){o&&o(t)},className:classNames({[a.iconButton]:"grid"===n,[a.listItem]:"list"===n,[a.switcherGrid]:"switcherGrid"===n}),"data-test":"dt-button-app-icon","data-testid":"dt-button-app-icon",onContextMenu:s?e=>{e.preventDefault(),h(e.currentTarget)}:void 0},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.image},{children:jsxRuntime.exports.jsx("img",{alt:"app-icon",onError:function(){u(img$V)},src:c,draggable:"false",className:a.img})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:a.appName,"data-testid":"os-app-bar-panel.app-switcher.app-name"},{children:i})),jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"basic-menu",anchorEl:f,open:e,onClose:g,MenuListProps:{"aria-labelledby":"basic-button"},sx:{transform:"translate(60px, -60px)"}},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({sx:{display:"none"},onClick:e=>{e.stopPropagation(),mountPanel$1({panelId:"APPLICATION_DETAILS_PANEL",microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{applicationId:t}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}),g(e)},"data-testid":`os-app-bar-panel.app-switcher.options-app-detail.${l}.`+t},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.application-details",defaultMessage:"Application Details",description:"Dropdown menu item that opens application details panel"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:e=>{e.stopPropagation(),h(null),p(!0)},"data-testid":`os-app-bar-panel.app-switcher.options-remove-app.${l}.`+t},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.remove-from-group",defaultMessage:"Remove from Group",description:"Dropdown menu item that removes application from group"})}))]})),jsxRuntime.exports.jsx(Dialog$1,Object.assign({open:d,maxWidth:"xs",onClose:g,"data-testid":"os-app-bar-panel.delete-app-from-group.confirmation-dialog"},{children:jsxRuntime.exports.jsxs(DialogTitle$1,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.dialogTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirmation-title",defaultMessage:"Delete Application",description:"Delete App from Group confirmation title"})})),jsxRuntime.exports.jsxs(DialogContent$1,Object.assign({sx:styles.content},{children:[jsxRuntime.exports.jsx(DialogContentText$1,{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirmation-message",defaultMessage:"Are you sure you want to delete this application from the group?",description:"Delete Ap from Group confirmation message"})}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({sx:styles.actions},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({sx:styles.cancelButton,onClick:g,"data-testid":"app-switcher.delete-app.cancel-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.cancel-button",defaultMessage:"Cancel",description:"Delete App from Group cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained",sx:styles.deleteButton,onClick:e=>{e.stopPropagation(),m(removeAppFromGroup({source:l,appId:t.toString()})),g(e)},"data-testid":"app-switcher.delete-app.confirm-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirm-button",defaultMessage:"Yes, Delete",description:"Delete App from Group confirmation button"})}))]}))]}))]})}))]}))}))}const useStyles$c$1=makeStyles()((e,{sortOrder:t,hasApps:n,menuIsOpen:r})=>({root:{},header:{height:"60px",position:"sticky"},groupContainer:{padding:"0 15px"},title:{fontWeight:700,padding:"15px"},groupTitle:{background:"#F9F9F9",paddingLeft:"5px",position:"relative",height:"16px","& .Sdk-MuiTypography-root":{fontSize:"10px",fontWeight:700,lineHeight:"10px",position:"absolute",margin:"3px"}},filterIcon:{display:"flex",flexDirection:"column",justifyContent:"center","& svg":{transform:"asc"===t?"scaleY(-1)":"scaleY(1)",cursor:n?"pointer":"not-allowed"}},filterIconWrapper:{width:"24px",height:"24px",borderRadius:"24px",background:r?"rgba(228, 240, 252, 0.8)":"unset","& path":{fill:r?"#0C53B0":"#555F7C"},"&:hover":{background:"rgba(228, 240, 252, 0.8)","& path":{fill:"#0C53B0"}}},searchBox:{display:"flex",flexDirection:"column",justifyContent:"center","& .Sdk-MuiButtonBase-root":{padding:0},"& svg":{width:"14px"},"& input":{"&::placeholder":{color:"#5C6269 !important",fontWeight:600,opacity:1}}},searchField:{borderRadius:"1em",height:"30px"},searchOutline:{borderColor:"#D5DFE9"},searchInput:{fontSize:"11px","&::placeholder":{color:"#5C6269 !important"}},sortMenu:{width:"143px"},airborne:{position:"absolute",background:"rgba(26, 140, 255, 0.9)",transform:"rotate(3.02deg)",color:"white","& *":{fontWeight:"900 !important"},"& img":{background:"white",borderRadius:"50%"}},applicationList:{overflow:"hidden",height:"calc(100vh - 64px - 55px - 60px - 5px)",overflowY:"scroll"}})),SHARED_TEXT$1={buttonLink:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.aaaaa1",defaultMessage:"Link",description:"label of link open id connector button on profile panel"}),buttonUnlink:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.L4gr2p",defaultMessage:"Unlink",description:"label of unlink open id connector button on profile panel"}),basicInfoTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.lpZXMT",defaultMessage:"Basic Info",description:"Personal Profile: Basic info name, email etc"}),accountLinkingTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.AgbO9g",defaultMessage:"Account Linking",description:"Personal Profile: Open ID Connector Account Linking"}),settingsTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.oYYEos",defaultMessage:"Settings",description:"Profile Settings"}),accountLinkingLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.JxMDBr",defaultMessage:"Link your Account",description:"label of manage basic infomation container"}),accountLinkingDescription:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.77MHtz",defaultMessage:"View your accounts from other identify providers that are linked with this account.",description:"description of manage account linking"}),unlinkDialogTitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.naysir",defaultMessage:"Unlink this Identity Provider?",description:"title for unlink identity provider"}),unlinkDialogContent:e=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dwZfY7",defaultMessage:"Are you sure you want to unlink {name} from your account?",description:"content for unlink identity provider",values:{name:e||""}}),unlinkDialogCancel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.SNjPPT",defaultMessage:"Cancel",description:"cancel for unlink identity provider"}),unlinkDialogConfirm:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.KJyVd9",defaultMessage:"Yes, Unlink",description:"confirm for unlink identity provider"}),successDialogTitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZaKL3e",defaultMessage:"Account Successfully linked!",description:"title for success identity provider"}),successDialogContent:e=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IP+fpM",defaultMessage:"You can now log into this account using {name}.",description:"content for success identity provider",values:{name:e||""}}),successDialogConfirm:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.1DTtvD",defaultMessage:"Okay",description:"confirm for success identity provider"}),nullState:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.u6gP99",defaultMessage:"Your account currently has no available account linking options",description:"account linking null state"}),errorState:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.KG2JIz",defaultMessage:"There was an error while loading the available account linking options",description:"account linking error state"}),retry:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IYUdD6",defaultMessage:"Retry",description:"account linking retry"}),settingsHeader:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IIE3bM",defaultMessage:"Application Preferences",description:"account settings header"}),settingsSubHeader:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.9xcAYc",defaultMessage:"Manage the settings of aiWARE services and applications.",description:"account settings sub header"})},translatableTextProps=e=>({searchLabel:e.formatMessage({id:"os-app-bar-panel.search.label",defaultMessage:[{type:0,value:"Search"}]})});function AppListDnD({intl:e,selectedAppId:t,onSelectApplication:n,applications:r=[],showAppGroups:i=!1}){const[o,a]=react.exports.useState(t),[s,l]=react.exports.useState({}),[c,u]=react.exports.useState(""),[d,p]=react.exports.useState("asc");var f=0!==r.length;function h(e){a(e),n(e)}function m(e,t){return e.name.toLowerCase()>t.name.toLowerCase()?1:e.name.toLowerCase()<t.name.toLowerCase()?-1:0}react.exports.useEffect(()=>{if(0<r.length){var e={};for(const n of[...r].sort(m)){var t=n.name.charAt(0).toUpperCase();e[t]=e[t]?[...e[t],n]:[n]}l(e)}},[r]),react.exports.useEffect(()=>{t!==o&&a(t)},[t,o]);e=translatableTextProps(e).searchLabel;const[g,v]=react.exports.useState(null);var x=Boolean(g);const y=e=>{if(e!==d){p(e);e=Object.keys(s).reverse();const t={};e.forEach(e=>t[e]=s[e].reverse()),l(t)}v(null)},b=useStyles$c$1({sortOrder:d,hasApps:f,menuIsOpen:x})["classes"];f=jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"app-switcher.sort-menu",anchorEl:g,open:x,onClose:y},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>y("asc"),className:b.sortMenu},{children:"A - Z"})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>y("desc"),className:b.sortMenu},{children:"Z - A"}))]}));const C=(e,t,n)=>jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===o,onClick:h,iconUrl:t,id:e,appName:n,appListV2:!0});return jsxRuntime.exports.jsxs("div",Object.assign({className:b.root,"data-testid":"os-app-bar-panel.app-switcher.applications-container"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:b.header},{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,spacing:2},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:5},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:b.title},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.applications-title",defaultMessage:"Applications",description:"Applications list title"})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:5,className:b.searchBox},{children:jsxRuntime.exports.jsx(TextField$1,{"data-testid":"os-app-bar-panel.app-switcher.search",onChange:e=>{u(e.target.value)},placeholder:e,InputProps:{classes:{root:b.searchField,input:b.searchInput,notchedOutline:b.searchOutline},startAdornment:jsxRuntime.exports.jsx(InputAdornment$1,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(IconButton$1,{children:jsxRuntime.exports.jsx(default_1$8,{})})}))}})})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:2,className:b.filterIcon},{children:[jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.sort-btn",defaultMessage:"Sort",description:"Application sort button"})},{children:jsxRuntime.exports.jsx("div",Object.assign({className:b.filterIconWrapper,onClick:e=>{r.length&&v(e.currentTarget)}},{children:jsxRuntime.exports.jsx("div",Object.assign({className:b.filterIcon},{children:jsxRuntime.exports.jsx(SortArrow,{"data-testid":"os-app-bar-panel.app-switcher.sort"})}))}))})),f]}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:b.applicationList},{children:0===r.length?jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dyhBih",defaultMessage:"No Applications",description:"the label no app will show if we have no application for list view"})}))}):jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"app-list"},{children:e=>jsxRuntime.exports.jsx("div",Object.assign({className:b.groupContainer},e.droppableProps,{ref:e.innerRef},{children:0<Object.keys(s).length&&Object.entries(s).map(([e,t])=>t.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())).length?jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("div",Object.assign({className:b.groupTitle,"data-testid":"os-app-bar-panel.app-switcher.group-title"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"overline"},{children:e}))})),t.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())).map((e,t)=>{const{id:l=t,iconUrl:c,name:u}=e;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"os-app-bar-panel.app-switcher.app-row"},{children:[i?jsxRuntime.exports.jsx(PublicDraggable,Object.assign({draggableId:l.toString(),index:t},{children:(a,s)=>jsxRuntime.exports.jsx(NaturalDragAnimation,Object.assign({style:a.draggableProps.style,snapshot:s},{children:e=>{return t=a,n=s,e=e,r=l,i=c,o=u,jsxRuntime.exports.jsx("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef,className:n.isDragging?b.airborne:"",style:e},{children:C(r,i,o)}));var t,n,r,i,o}}))}),t):C(l,c,u),jsxRuntime.exports.jsx(Divider$1,{})]}),l)})]},e):null)}))}))}))]}))}var AppListDnD$1=injectIntl(AppListDnD);const useStyles$b$1=makeStyles()(e=>({tabsBox:{height:"100%"},fullHeight:{height:"100%"},listContainer:{overflow:"hidden",height:"calc(100vh - 64px - 55px - 5px)",overflowY:"scroll"},skeletonContainer:{position:"absolute",width:"100%",height:"100%",zIndex:5,backgroundColor:"white"}})),useStyles$a$1=makeStyles()(e=>({root:{height:"calc(100vh - 64px - 55px - 5px)",overflowY:"scroll",borderRight:"15px solid #F9F9F9",boxShadow:"0px 1px 1px #809cb7","&::-webkit-scrollbar":{display:"none"}},appTile:{overflow:"hidden"},title:{fontWeight:700,padding:"15px 15px 0 15px"},groupTitle:{fontWeight:700,padding:"15px"},helperText:{paddingLeft:"15px",fontSize:"12px",fontWeight:"bold"},noApps:{textAlign:"center",marginTop:"30px","& svg":{width:"160px",height:"160px",marginBottom:"20px"},marginBottom:"20px"},appGroup:{borderTop:"1px solid #D5DFE9"},currentLanding:{position:"relative",minHeight:"155px !important"},idleLanding:{minHeight:"10px"},runway:{minHeight:"110px",position:"absolute",background:"rgba(255, 255, 255, 0.8)",width:"94%",height:"100%",border:"1px dashed #CAD7E3",borderRadius:"4px",display:"flex",textAlign:"center",flexDirection:"column",justifyContent:"center"},landingText:{fontSize:"16px !important",fontWeight:"600 !important",color:"rgba(124, 132, 141, 1)"},airborneGroup:{height:"50px !important",background:"rgba(26, 140, 255, 0.9)",color:"white","& div":{display:"none"}},groupHandler:{display:"flex",justifyContent:"space-between","&:hover":{background:"rgba(242, 242, 242, 0.5)"}}})),useStyles$9$1=makeStyles()(()=>({root:{padding:"15px"},groupNameInput:{height:"36px","& input":{width:"100% !important",height:"36px",padding:"0 0 0 15px",color:"rgba(92, 98, 105, 1)",borderRadius:"4px",border:"none"},marginBottom:"10px",width:"100% !important",background:"#F5FDFF"},notInterested:{height:"18px","& svg":{height:"18px",cursor:"pointer"}},confirm:{height:"20px",cursor:"pointer"},newGroupApps:{marginBottom:"20px",display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center",height:"101px",background:"#FAFAFA",borderRadius:"4px"},landingText:{color:"rgba(156, 168, 180, 1)"},relativeContainer:{position:"relative"},fullWidthRunway:{top:0,width:"100%"}})),AppGroupPlaceholder=({apps:n,classes:r})=>{useSelector(preferredLanguageSelector);const i=useStyles$9$1()["classes"],e=useDispatch(),[t,o]=react.exports.useState("");return jsxRuntime.exports.jsxs("div",Object.assign({className:i.root},{children:[jsxRuntime.exports.jsx(TextField$1,{value:t,onChange:e=>{o(e.target.value)},"data-testid":"os-app-bar.new-app-group.name-input-container",className:i.groupNameInput,InputProps:{endAdornment:jsxRuntime.exports.jsxs(InputAdornment$1,Object.assign({position:"end"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:i.confirm,onClick:()=>{t?e(createNewAppGroupStart(t)):e(showMessage({content:"Please provide a name for your new App group",severity:MessageSeverity.Error}))},"data-testid":"os-app-bar.new-app-group.save-btn"},{children:jsxRuntime.exports.jsx(Checkmark,{})})),jsxRuntime.exports.jsx("div",Object.assign({className:i.notInterested,onClick:()=>{e(removeNewAppGroupPlaceholder())},"data-testid":"os-app-bar.new-app-group.cancel-btn"},{children:jsxRuntime.exports.jsx(NotInterested,{})}))]}))},inputProps:{"data-testid":"os-app-bar.new-app-group.name-input"}}),jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"new-group-placeholder"},{children:(e,t)=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:i.relativeContainer,style:{width:"100%"}},{children:[n.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{position:"relative",marginBottom:"15px"}},{children:n.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,sx:{padding:0,overflow:"hidden"},"data-testid":"app-switcher.new-app-group.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:!1,onClick:()=>{},iconUrl:t,id:e,appName:n,appListV2:!0})}),e)})})):jsxRuntime.exports.jsx("div",Object.assign({className:i.newGroupApps},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.landingText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.new-app-group.apps-landing",defaultMessage:"Drag Applications Here",description:"helper text to tell users where to drag apps for the new app group"})}))})),t.isDraggingOver&&n.length?jsxRuntime.exports.jsx(Runway,{classes:r,rootClassName:i.fullWidthRunway}):null]}))}))]}))},GroupDraggingPlaceholder=({isDragging:e,className:t,groupName:n,dragHandleProps:r})=>e?jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:t},r,{children:n})):null,useStyles$8$1=makeStyles()(()=>({root:{padding:"15px"},groupNameInput:{height:"36px","& input":{width:"100% !important",height:"36px",padding:"0 0 0 15px",color:"rgba(92, 98, 105, 1)",borderRadius:"4px",border:"none"},marginBottom:"10px",width:"100% !important",background:"#F5FDFF"},notInterested:{height:"18px",cursor:"pointer"},confirm:{cursor:"pointer"},groupHandler:{display:"flex",justifyContent:"space-between",alignItems:"center","&:hover":{background:"rgba(242, 242, 242, 0.5)"}},invisibleHandler:{display:"none"},groupTitle:{fontWeight:700,padding:"15px"},handlerMenu:{height:"40px",width:"40px",marginRight:"10px"}})),GroupHandler=({dragHandleProps:e,groupName:t,groupId:n,isExpanded:r=!0})=>{const i=useSelector(selectAppGroupsEditMode),o=useDispatch(),[a,s]=react.exports.useState(!1),[l,c]=react.exports.useState(""),[u,d]=react.exports.useState(null);var p=Boolean(u);const f=()=>{d(null)};var h=useStyles$8$1()["classes"];react.exports.useEffect(()=>{c(t)},[]);const m=()=>{o(editAppGroup({edit:!0,groupId:n})),s(!0)};return jsxRuntime.exports.jsx("div",Object.assign({className:a?h.root:h.groupHandler},{children:a?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(TextField$1,{value:l,onChange:e=>{c(e.target.value)},"data-testid":`os-app-bar.app-group.${n}.name-input-container`,className:h.groupNameInput,InputProps:{endAdornment:jsxRuntime.exports.jsxs(InputAdornment$1,Object.assign({position:"end"},{children:[jsxRuntime.exports.jsx(Checkmark,{className:h.confirm,onClick:()=>{f(),o(editAppGroup({edit:!1,groupId:n,newGroupName:l})),s(!1)},"data-testid":`os-app-bar.app-group.${n}.save-btn`}),jsxRuntime.exports.jsx(NotInterested,{className:h.notInterested,onClick:()=>{f(),o(editAppGroup({edit:!1,groupId:n})),s(!1)},"data-testid":`os-app-bar.app-group.${n}.cancel-btn`})]}))},inputProps:{"data-testid":`os-app-bar.app-group.${n}.name-input`}}),jsxRuntime.exports.jsx("div",Object.assign({},e))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:h.groupTitle},e,{onClick:e=>{2!==e.detail||i||m()},"data-testid":"os-app-bar-panel.app-switcher.group-name."+n},{children:t})),jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:e=>{e.preventDefault(),d(e.currentTarget)},size:"small",className:h.handlerMenu,"data-testid":"os-app-bar-panel.app-switcher.options-btn."+n},{children:jsxRuntime.exports.jsx(MoreHor,{fontSize:"small"})})),jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"basic-menu",anchorEl:u,open:p,onClose:f,MenuListProps:{"aria-labelledby":"basic-button"},sx:{transform:"translate(-95px, 0)"}},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>{f(),setTimeout(()=>{o(expandCollapse(n))},100)},"data-testid":"os-app-bar-panel.app-switcher.options-toggle."+n},{children:r?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.hide",defaultMessage:"Hide Group",description:"Hide Group dropdown menu item"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.expand",defaultMessage:"Expand",description:"Expand dropdown menu item"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:m,"data-testid":"os-app-bar-panel.app-switcher.options-rename."+n},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.rename",defaultMessage:"Rename",description:"Rename dropdown menu item"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>{o(deleteAppGroup(n))},"data-testid":"os-app-bar-panel.app-switcher.options-delete."+n},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.delete",defaultMessage:"Delete",description:"Delete dropdown menu item"})}))]}))]})}))},GroupApps=({groupApps:e,appGroup:r,classes:i,snapshot:t,handleSelectApplication:o,currentSelected:a})=>jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px"},"data-testid":"app-switcher.app-group."+r.id},{children:[t.isDraggingOver?jsxRuntime.exports.jsx(Runway,{classes:i}):null,e.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,className:i.appTile,sx:{padding:0},"data-testid":"app-switcher.app-group.app-tile."+e},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:e===a,onClick:o,iconUrl:t,id:e,appName:n,appListV2:!0,isAppGroup:!0,appGroupId:r.id})}),e)})]})),LoadingSkeleton=()=>jsxRuntime.exports.jsx(react.exports.Fragment,{children:[1,2].map(e=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:345,height:50}),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px"}},{children:[1,2,3].map(e=>jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,sx:{padding:0}},{children:jsxRuntime.exports.jsxs(Stack$4,Object.assign({sx:{justifyContent:"center",alignItems:"center",padding:"20px 0px"}},{children:[jsxRuntime.exports.jsx(Skeleton$1,{sx:{m:2},variant:"circular",width:40,height:40}),jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",sx:{fontSize:"10px"},width:30})]}))}),e))}),e)]}))}),Runway=({classes:e,rootClassName:t})=>jsxRuntime.exports.jsx("div",Object.assign({className:e.runway+" "+t},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.landingText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.app-landing",defaultMessage:"Drop Application Here",description:"Helper text to tell users where apps should be dropped"})}))})),RecentAppsDnD=({apps:e=[],allApps:t,onSelectApplication:n,selectedAppId:r,showAppGroups:i})=>{const o=useStyles$a$1()["classes"],[a,s]=react.exports.useState(r),l=useDispatch();function c(e){s(e),n(e)}const u=useSelector(selectUserAppGroupsUiStatus),d=useSelector(selectUserAppGroups);return jsxRuntime.exports.jsxs("div",Object.assign({className:o.root,"data-testid":"app-switcher.recent-apps.container"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:o.title},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"app-bar.app-switcher.recent-apps",defaultMessage:"Recent Applications",description:"Recent Application container title"})})),e.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px"}},{children:e.map((e,t)=>{var{id:t=t,iconUrl:n,name:r}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,className:o.appTile,sx:{padding:0},"data-testid":"app-switcher.recent-apps.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:t===a,onClick:c,iconUrl:n,id:t,appName:r,appListV2:!0})}),e.id)})})):jsxRuntime.exports.jsxs("div",Object.assign({className:o.noApps},{children:[jsxRuntime.exports.jsx(NoApps,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:o.helperText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"app-bar.app-switcher.no-recent-apps",defaultMessage:"You haven’t viewed any applications yet.",description:"No Recent Application title"})}))]})),i&&(u===Status.loading?jsxRuntime.exports.jsx(LoadingSkeleton,{}):u===Status.failure?jsxRuntime.exports.jsx(ErrorState$2,{onRetry:()=>l(fetchUserAppGroupsStart()),errorMessage:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-groups.error-message",defaultMessage:"Something went wrong while loading your application groups.",description:"application groups error state"})}):u===Status.success&&d.length?jsxRuntime.exports.jsx(AppGroups,{apps:e,allApps:t,userAppGroups:d,handleSelectApplication:c,currentSelected:a}):null)]}))},AppGroups=({userAppGroups:t,allApps:n,apps:o,handleSelectApplication:a,currentSelected:s})=>{const l=useStyles$a$1()["classes"];return jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"group-list",direction:"vertical",type:"group-list"},{children:e=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{children:[t.map((r,e)=>{const i=[];return r.apps.forEach(t=>{var e=[...n,...o].find(e=>e.id===t);e&&i.push(e)}),r.isNew?jsxRuntime.exports.jsx(AppGroupPlaceholder,{apps:i,classes:l},r.id):jsxRuntime.exports.jsx(PublicDraggable,Object.assign({draggableId:r.id,index:e},{children:(n,e)=>jsxRuntime.exports.jsxs("div",Object.assign({className:e.isDragging?l.airborneGroup:l.appGroup,ref:n.innerRef},n.draggableProps,{children:[jsxRuntime.exports.jsx(GroupDraggingPlaceholder,{isDragging:e.isDragging,className:l.groupTitle,dragHandleProps:n.dragHandleProps,groupName:r.groupName}),jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:r.id},{children:(e,t)=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:t.isDraggingOver?l.currentLanding:l.idleLanding},{children:[jsxRuntime.exports.jsx(GroupHandler,{groupName:r.groupName,dragHandleProps:n.dragHandleProps,groupId:r.id,isExpanded:r.isExpanded}),t.isDraggingOver&&!i.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px",minHeight:"110px"}},{children:jsxRuntime.exports.jsx(Runway,{classes:l})})):null,jsxRuntime.exports.jsx(Collapse$1,Object.assign({in:(r.isExpanded||void 0===r.isExpanded)&&0<i.length,timeout:"auto",unmountOnExit:!0},{children:jsxRuntime.exports.jsx(GroupApps,{groupApps:i,classes:l,snapshot:t,handleSelectApplication:a,currentSelected:s,appGroup:r})}))]}))}))]}),r.id)}),r.id)}),e.placeholder]}))}))};function ApplicationPanelDnD({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:i,showAppGroups:o=!1}){var a=useStyles$b$1()["classes"],s=useSelector(preferredLanguageSelector);const l=useSelector(selectUserAppGroups)||[];s=AIWareFormatMessage(s);const c=useDispatch(),[u,d]=react.exports.useState(0===n.length?0:n.length<4?1:2),[p,f]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;d(e)},[n]),react.exports.useState(e));function h(e){f(e),null!=t&&t(e),null!=i&&i(e)}react.exports.useEffect(()=>{e!==p&&f(e)},[e,p]);react.exports.useEffect(()=>{o&&c(fetchUserAppGroupsStart())},[c]);return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppGroupModule()]},{children:jsxRuntime.exports.jsx(DragDropContext,Object.assign({onDragEnd:e=>{if(o){const{destination:t,draggableId:n,type:r}=e;"group-list"===r?(e=l.find(e=>e.id===n))&&t&&c(updateGroupPriority({groupId:n,newPriority:t.index,prevPriority:e.priority})):((null==(e=l.find(e=>e.id===(null===t||void 0===t?void 0:t.droppableId)))?void 0:e.apps)||[]).find(e=>e===n)?c(showMessage({content:"This application has already been added to the group",severity:MessageSeverity.Error})):t&&c(addAppToGroup({destination:null===t||void 0===t?void 0:t.droppableId,appId:n}))}}},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.fullHeight},{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,className:a.fullHeight},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:a.fullHeight},{children:jsxRuntime.exports.jsx(RecentAppsDnD,{apps:n,allApps:r,onSelectApplication:h,selectedAppId:null,showAppGroups:o})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:a.fullHeight},{children:jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(AppListDnD$1,{title:s({id:"os-app-bar-panel.name.moreApps",defaultMessage:[{type:0,value:"More Applications"}]}),type:"More",applications:r,onSelectApplication:h,selectedAppId:null,row:u,showAppGroups:o})})}))]}))}))}))}))}const useStyles$7$1=makeStyles()(e=>({root:{width:"100%",height:"calc(100% - 30px)"},tabs:{margin:e.spacing(6)},tabPanels:{width:"100%",height:"calc(100% - 80px)"},logRoot:{padding:e.spacing(0,6)},logHeader:{display:"flex",justifyContent:"space-between"},logTitleText:{paddingTop:"4px"},logContent:{marginTop:"12px"},overviewRoot:{padding:e.spacing(0,6),height:"100%"},overviewHeader:{display:"flex",justifyContent:"space-between"},overviewTitleText:{fontWeight:600},overviewContent:{width:"100%",height:"calc(100% - 50px)",display:"flex",flexDirection:"column",overflowY:"auto"},overviewLineChart:{padding:e.spacing(6,0),flex:1},overviewPieChart:{marginTop:0}})),filters$1=[{value:"all",title:"View Current Week"},{value:"no data",title:"View Current Month"}];function Overview(){var e=useStyles$7$1()["classes"];const[t,n]=react.exports.useState("all");return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.overviewRoot,"data-testid":"performance-monitor-overview"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.overviewHeader},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:e.overviewTitleText},{children:"CPU Load"})),jsxRuntime.exports.jsx(Filter,{data:filters$1,filter:t,onFilter:e=>{n(e.target.value)}})]})),jsxRuntime.exports.jsx(Box$1,{className:e.overviewContent})]}))}const useStyles$6$1=makeStyles()(e=>({table:{minWidth:650},SdkTableCellData:{fontSize:12,color:"#000"},SdkTableCellHeader:{fontSize:12,color:"#9CA8B4",borderBottom:"none",paddingBottom:0},SdkTableCellAvatar:{width:"32px",padding:e.spacing(3,0,3,1)},smallAvatar:{width:32,height:32},SdkTableCellStatus:{color:"#219653",textTransform:"capitalize"},SdkTableCellStatusDeactived:{color:"#8D0707",textTransform:"capitalize"}}));function MuiTable({columns:t=[],data:e=[]}){const r=useStyles$6$1()["classes"];return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({className:r.table,"aria-label":"simple table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsx(TableRow$1,{children:t.map((e,t)=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({classes:{root:r.SdkTableCellHeader},align:e.align},{children:e.label}),t))})}),jsxRuntime.exports.jsx(TableBody$1,{children:e.map((n,e)=>jsxRuntime.exports.jsx(TableRow$1,{children:t.map((e,t)=>"avatar"===e.value?jsxRuntime.exports.jsx(TableCell$1,Object.assign({padding:"checkbox",classes:{root:classNames(r.SdkTableCellData,r.SdkTableCellAvatar)},align:"right"},{children:jsxRuntime.exports.jsx(Avatar$1,{alt:"",src:n[e.value],className:r.smallAvatar})}),t):"status"===e.value?jsxRuntime.exports.jsx(TableCell$1,Object.assign({padding:"checkbox",classes:{root:r.SdkTableCellData},align:e.align},{children:jsxRuntime.exports.jsx("span",Object.assign({className:"deactived"===n[e.value]||"failed"===n[e.value]?r.SdkTableCellStatusDeactived:r.SdkTableCellStatus},{children:n[e.value]}))}),t):jsxRuntime.exports.jsx(TableCell$1,Object.assign({classes:{root:r.SdkTableCellData},align:e.align},{children:n[e.value]}),t))},e))})]}))})}const data=[1,2,3,4,5,6,7,8].map(e=>[{name:"LogoGrab - V3F - "+e,engineId:"0006676754"+e,jobId:"20104106_6WnM4rGlXj",status:"Pending",duration:"1s",appName:"Attribute"}]),columns=[{value:"name",label:"Engine Name",align:"left"},{value:"engineId",label:"Engine ID",align:"left"},{value:"jobId",label:"Job ID",align:"left"},{value:"status",label:"Status",align:"left"},{value:"duration",label:"Time",align:"left"},{value:"appName",label:"App Name",align:"left"}],filters=[{value:"all",title:"View All Applications"},{value:"no data",title:"Active Applications"}];function PerformanceLogs(){var e=useStyles$7$1()["classes"];const[t,n]=react.exports.useState("all");return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.logRoot,"data-testid":"performance-monitor-logs"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.logHeader},{children:[jsxRuntime.exports.jsx(Filter,{data:filters,filter:t,onFilter:e=>{n(e.target.value)}}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.logTitleText},{children:"Last 24 Hours"}))]})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.logContent},{children:jsxRuntime.exports.jsx(MuiTable,{columns:columns,data:data})}))]}))}const Resources=()=>jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"performance-monitor-resources"},{children:"Resources"}));function PerformanceErrors(){return jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"performance-monitor-errors"},{children:"Performance Errors"}))}const tabsList$1=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.xgDIjO",defaultMessage:"Overview",description:"tab label: Overview"}),disabled:!1},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.NXAxMt",defaultMessage:"Logs",description:"tab label: Logs"}),disabled:!1},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Mxysi8",defaultMessage:"Resources",description:"tab label: Resources"}),disabled:!0},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Qj95LF",defaultMessage:"Errors",description:"tab label: Errors"}),disabled:!0}];function PerformanceMonitor(){var e=useStyles$7$1()["classes"];const[t,n]=react.exports.useState(0);return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.root,"data-testid":"performance-monitor"},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.tabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:t,onChangeTab:e=>{n(Number(e))},tabsList:tabsList$1})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:0},{children:jsxRuntime.exports.jsx(Overview,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:1},{children:jsxRuntime.exports.jsx(PerformanceLogs,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:2},{children:jsxRuntime.exports.jsx(Resources,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:3},{children:jsxRuntime.exports.jsx(PerformanceErrors,{})}))]}))]}))}const useStyles$5$2=makeStyles()(e=>({root:{display:"flex",justifyContent:"center"},changeAvatarIcon:{color:"#121212 !important",backgroundColor:"#ffffff !important",padding:e.spacing(1.2)+" !important","&:hover":{backgroundColor:"#ffffff !important"}},avatarLarge:{color:e.palette.secondary.main,backgroundColor:"#ffffff !important",fontSize:"30px !important",width:"84px !important",height:"84px !important",border:"5px solid #E8E8E8"}})),AvatarProfile=({avatar:e,sortName:t,onEditAvatarClick:n,loadingStatus:r})=>{var i=useStyles$5$2()["classes"];return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("div",Object.assign({className:i.root},{children:jsxRuntime.exports.jsx(Badge$1,Object.assign({"data-test":"dt-button-upload-avatar-icon",overlap:"circular","data-testid":"dt-button-upload-avatar-icon",anchorOrigin:{vertical:"bottom",horizontal:"right"},badgeContent:jsxRuntime.exports.jsx(IconButton$1,Object.assign({color:"primary","aria-label":"upload picture",className:i.changeAvatarIcon,onClick:()=>{n()},"data-test":"app-bar-update-avatar",size:"large","data-testid":"app-bar-update-avatar"},{children:jsxRuntime.exports.jsx("img",{src:img$1a,alt:""})}))},{children:"loading"===r?jsxRuntime.exports.jsx(CircularProgress$1,{}):e?jsxRuntime.exports.jsx(Avatar$1,{"data-test":"dt-user-avatar-image",src:e,className:i.avatarLarge}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:i.avatarLarge},{children:null==t?void 0:t.toUpperCase()}))}))}))})},useStyles$4$2=makeStyles()(e=>({container:{marginTop:e.spacing(4),padding:e.spacing(4,4),textAlign:"center",border:"0.5px solid #D5DFE9",borderRadius:e.spacing(2)},text:{marginTop:e.spacing(3)},icon:{display:"inline !important"}})),NullState=()=>{var e=useStyles$4$2()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:e.icon},{children:jsxRuntime.exports.jsx(NoLink,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.text},{children:SHARED_TEXT$1.nullState()})),jsxRuntime.exports.jsx(Box$1,{mb:9})]}))},ErrorState$1=({onRetry:e})=>{var t=useStyles$4$2()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:t.icon},{children:jsxRuntime.exports.jsx(AlarmTwo,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:t.text,"data-test":"account-linking-error-message"},{children:SHARED_TEXT$1.errorState()})),jsxRuntime.exports.jsx(Box$1,{mt:4}),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text",size:"large","data-test":"account-linking-retry-btn",onClick:e},{children:SHARED_TEXT$1.retry()}))]}))};var useStyles$3$3=makeStyles()(e=>({accountLinkingLabel:{fontWeight:"normal",userSelect:"none"},openIdLogo:{width:e.spacing(5),height:e.spacing(5),backgroundColor:"#ffffff",color:"#555F7C"},listAvatar:{minWidth:"45px"},openIdContainer:{marginTop:e.spacing(3)},openIdItem:{padding:e.spacing(3)+"px 0px"},openIdTextContainer:{marginLeft:e.spacing(3.5),display:"inline-block",verticalAlign:"top"},secondaryAction:{right:"0"},linkBtn:{textTransform:"capitalize"},linkIcon:{marginRight:e.spacing(1),color:e.palette.primary.main},dialogTitle:{padding:`${e.spacing(6)} ${e.spacing(6)} ${e.spacing(1)}px !important `},dialogContent:{padding:`${e.spacing(1)} ${e.spacing(6)} !important `},dialogTitleText:{fontWeight:600},dialogAction:{padding:e.spacing(4)},displayNone:{display:"none"},displayInlineBlock:{display:"inline-block"}}));const OpenIdConnectorButton=({isConnected:e,onLink:t,onUnlink:n})=>{var r=useStyles$3$3()["classes"];return jsxRuntime.exports.jsx("div",{children:e?jsxRuntime.exports.jsx(Button$1,Object.assign({className:r.linkBtn+" "+r.displayNone,variant:"text","data-test":"account-linking-unlink-btn",onClick:n},{children:SHARED_TEXT$1.buttonUnlink()})):jsxRuntime.exports.jsxs(Button$1,Object.assign({variant:"outlined",color:"primary",className:r.linkBtn,"data-test":"account-linking-link-btn",onClick:t},{children:[jsxRuntime.exports.jsx(default_1$7,{className:r.linkIcon}),SHARED_TEXT$1.buttonLink()]}))})};function OpenIdConnectors({openIdItems:i,onOpenUnlinkModal:o,onClickOpenIdUrl:a,isOpenIdConnected:s}){const l=useStyles$3$3()["classes"];return jsxRuntime.exports.jsx(List$2,{children:i.map((e,t)=>{var{name:n,loginButtonStyle:r}=e,r=null==r?void 0:r.btnLogo;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:l.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:l.listAvatar},{children:jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:l.openIdLogo,src:r},{children:jsxRuntime.exports.jsx(OrgFilled,{})}))})),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:25<n.length?n:"",placement:"bottom-end"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:l.accountLinkingLabel},{children:25<n.length?n.substring(0,25)+"...":n}))}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:l.secondaryAction},{children:jsxRuntime.exports.jsx(OpenIdConnectorButton,{isConnected:s(e.connectId),onLink:()=>a(e),onUnlink:()=>o(e)})}))]})),t!==i.length-1&&jsxRuntime.exports.jsx(Divider$1,{})]})})})}const LoaderSkeletonItem$1=()=>{var e=useStyles$3$3()["classes"];return jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:e.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:e.listAvatar},{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"circular",width:25,height:25})})),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",width:150,height:21})}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:e.secondaryAction},{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:87,height:35})}))]}))},LoaderSkeleton=()=>jsxRuntime.exports.jsxs(List$2,{children:[jsxRuntime.exports.jsx(LoaderSkeletonItem$1,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem$1,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem$1,{})]}),namespace$2$2="openId",selectOpenIdConnectors=e=>{return null==(e=null==e?void 0:e[namespace$2$2])?void 0:e.openIdConnectors},selectConnectedOpenIds=e=>{return null==(e=null==e?void 0:e[namespace$2$2])?void 0:e.connectedOpenIds},selectLoadingStatus$1=e=>{return null==(e=null==e?void 0:e[namespace$2$2])?void 0:e.status},GET_OPEN_ID_CONNECTORS=`aiware/${namespace$2$2}/get open id connectors`,GET_OPEN_ID_SUCCESS=`aiware/${namespace$2$2}/get open id connectors success`,GET_CONNECTED_OPEN_ID_SUCCESS=`aiware/${namespace$2$2}/get connected open id connectors success`,GET_OPEN_ID_ERROR=`aiware/${namespace$2$2}/get open id connectors error`;function getOpenIdConnectors(){return{type:GET_OPEN_ID_CONNECTORS}}function getOpenIdConnectorSuccess(e){return{type:GET_OPEN_ID_SUCCESS,payload:{data:e}}}function getConnectedOpenIdsSuccess(e){return{type:GET_CONNECTED_OPEN_ID_SUCCESS,payload:{data:e}}}function getOpenIdConnectorError(e){return{type:GET_OPEN_ID_ERROR,payload:{message:e}}}const AccountLinking=()=>{const e=useDispatch(),[t,n]=react.exports.useState(!1),[r,i]=react.exports.useState(!1),[o,a]=react.exports.useState(null);const[s,l]=react.exports.useState({}),[c,u]=react.exports.useState(),d=useSelector(selectLoadingStatus$1)||"",p=useSelector(selectOpenIdConnectors)||[],f=useSelector(selectConnectedOpenIds)||[];var h=useStyles$3$3()["classes"];react.exports.useEffect(()=>{e(getOpenIdConnectors())},[e]);const m=e=>{l(e),n(!0)};var g=()=>{n(!1)},v=()=>{i(!1)};const x=()=>{e(getOpenIdConnectors())},y=(useInterval(()=>{e(getOpenIdConnectors())},o),e=>{l(e);e=window.open(e.loginUrl);u(e),a(2e3)}),b=react.exports.useCallback(t=>f.some(e=>e.connectId===t),[f]);react.exports.useEffect(()=>{""!==s.connectId&&null!==o&&b(s.connectId)&&(a(null),null!==c&&void 0!==c&&c.close(),i(!0))},[b,e]);return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:h.accountLinkingLabel,"data-test":"account-linking-label"},{children:SHARED_TEXT$1.accountLinkingLabel()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT$1.accountLinkingDescription()})),"pending"===d?jsxRuntime.exports.jsx(LoaderSkeleton,{}):"failure"===d?jsxRuntime.exports.jsx(ErrorState$1,{onRetry:x}):0===p.length?jsxRuntime.exports.jsx(NullState,{}):jsxRuntime.exports.jsx(OpenIdConnectors,{openIdItems:p,onOpenUnlinkModal:m,onClickOpenIdUrl:y,isOpenIdConnected:b}),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:t,maxWidth:"xs",onClose:g,"aria-labelledby":"unlink-dialog-title","aria-describedby":"unlink-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"unlink-dialog-title","data-test":"account-linking-unlink-dialog-title",className:h.dialogTitle},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT$1.unlinkDialogTitle()}))})),jsxRuntime.exports.jsx(DialogContent$1,Object.assign({className:h.dialogContent},{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"unlink-dialog-description"},{children:SHARED_TEXT$1.unlinkDialogContent(s.name)}))})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:h.dialogAction},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:g,variant:"text",size:"large",className:h.linkBtn,"data-test":"account-linking-unlink-dialog-cancel-btn"},{children:SHARED_TEXT$1.unlinkDialogCancel()})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:g,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-unlink-dialog-confirm-btn"},{children:SHARED_TEXT$1.unlinkDialogConfirm()}))]}))]})),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:r,maxWidth:"xs",onClose:v,"aria-labelledby":"success-dialog-title","aria-describedby":"success-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"success-dialog-title",className:h.dialogTitle,"data-test":"account-linking-success-dialog-title"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT$1.successDialogTitle()}))})),jsxRuntime.exports.jsx(DialogContent$1,Object.assign({className:h.dialogContent},{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"success-dialog-description"},{children:SHARED_TEXT$1.successDialogContent(s.name)}))})),jsxRuntime.exports.jsx(DialogActions$1,Object.assign({className:h.dialogAction},{children:jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:v,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-success-dialog-confirm-btn"},{children:SHARED_TEXT$1.successDialogConfirm()}))}))]}))]})};var useStyles$2$4=makeStyles()(e=>({personalProfileContainer:{overflowY:"auto"},firstBox:{paddingTop:e.spacing(6),textAlign:"center",borderBottom:"0.5px solid "+e.palette.divider},loggedBox:{fontWeight:400,paddingTop:e.spacing(2),paddingBottom:e.spacing(5)},email:{color:e.palette.primary.main},logoutBox:{paddingBottom:e.spacing(8)},btnLogin:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px",padding:e.spacing(1,7)},secondBox:{padding:e.spacing(5,6),"& div":{height:"auto !important"}},headerBox:{display:"flex"},editIconBox:{margin:e.spacing(0,-2.4,0,0)},descBox:{fontSize:"14px",color:e.palette.secondary.main},formBox:{marginTop:e.spacing(4)},formItem:{borderBottom:"0.5px solid "+e.palette.divider,marginBottom:e.spacing(4)},formItemPw:{marginBottom:e.spacing(4)+" !important"},titleItem:{color:e.palette.text.disabled,marginBottom:e.spacing(2),cursor:"default"},valueItem:{fontWeight:"normal",color:e.palette.text.secondary,marginBottom:e.spacing(2)},disabledText:{opacity:.6},lastUpdate:{color:"#9CA8B4"},reset:{color:e.palette.primary.main,opacity:.9,marginTop:"35px",cursor:"pointer"},passwordBox:{display:"flex",justifyContent:"space-between",alignItems:"center"},iconResetPw:{margin:"-18px -12px 0 0"},textField:{marginLeft:0,marginRight:0,marginTop:0,marginBottom:"30px",width:"100%"},actionForm:{padding:0,marginBottom:e.spacing(4)},inputBase:{padding:e.spacing(3.4,2.8)},notchedOutline:{"& legend":{height:"16px"}},btnAction:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px"},btnSave:{marginLeft:e.spacing(1.6)},btnActionCancel:{color:e.palette.secondary.main},pwResetTitle:{color:"#D43060 !important"},pwResetDes1:{marginBottom:"20px"},mainTitleText:{color:e.palette.text.secondary,userSelect:"none",fontSize:"18px",lineHeight:"23px",letterSpacing:"0.25px",textTransform:"uppercase"},contentUserView:{height:"100%",textAlign:"left",position:"relative"},headerDrawer:{padding:e.spacing(3,6),display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider},contentEditAvatar:{padding:e.spacing(6)},areaUpload:{background:e.palette.background.default,textAlign:"center",height:"300px",border:"1px solid "+e.palette.divider,boxSizing:"border-box",borderRadius:"4px",padding:e.spacing(10)},descDrag:{fontSize:"16px",color:"#828282",marginBottom:e.spacing(4)},descDrag2:{color:"#828282",margin:e.spacing(4,0)},btnSelectPhoto:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px"},recentlyBox:{marginTop:e.spacing(4)},recentlyText:{margin:e.spacing(2,0)},imgRecently:{width:"113px",height:"113px",background:"#C4C4C4",borderRadius:"4px"},imgRecentlyRow:{display:"flex",justifyContent:"space-between",marginBottom:"20px"},resetBiometric:{marginTop:e.spacing(7)},actionButton:{},inputFile:{display:"none !important"},imageGrid:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:e.spacing(4)},dragging:{filter:"blur(2px)"},currentlyLoggedIn:{fontWeight:"normal",color:e.palette.info.main,lineHeight:e.spacing(3.8),display:"flex",flexDirection:"column",cursor:"default"},manageBasicInfoLabel:{fontWeight:"normal",cursor:"default"},tabsParent:{"& div":{padding:e.spacing(0,0,0,1.6),borderBottom:"none"},"& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},editProfilePictureContainer:{height:"calc(100vh - 60px)",display:"flex",flexDirection:"column",position:"relative"},editProfilePictureFooterButtons:{right:"30px",bottom:"30px",position:"absolute"}})),useStyles$1$4=makeStyles()(e=>({settingsHeader:{fontWeight:"normal",cursor:"default"},topMargin:{marginTop:"30px"},fullWidth:{width:"100%"},inputLabel:{fontFamily:"Nunito",fontWeight:300,display:"block",fontSize:14,color:"#5C6269",marginBottom:6},disclaimerText:{fontWeight:400,display:"block",fontSize:12,color:"#9CA8B4",marginTop:12}}));const ProfileSettings=({onPreferredLanguageChange:t,selectedLanguage:e})=>{const[n,r]=react.exports.useState("");var i=useStyles$1$4()["classes"],o=(react.exports.useEffect(()=>{r(e)},[e]),langs.map(({locale:e,name:t})=>({value:e,name:t})));return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.settingsHeader},{children:SHARED_TEXT$1.settingsHeader()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT$1.settingsSubHeader()})),jsxRuntime.exports.jsxs(FormControl$1,Object.assign({className:i.fullWidth+" "+i.topMargin},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:i.inputLabel,htmlFor:"personal-profile-settings-preferred-language"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.preferredLanguage",defaultMessage:"Preferred Language",description:"Language selection label"})})),jsxRuntime.exports.jsx(Select$1,Object.assign({id:"personal-profile-settings-preferred-language",className:""+i.fullWidth,value:n,onChange:function(e){e=e.target.value,r(e),t(e)}},{children:null==o?void 0:o.map(e=>jsxRuntime.exports.jsx(MenuItem$1,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.name})))})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:i.disclaimerText,variant:"subtitle1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.preferredLanguageDisclaimer",defaultMessage:"Not all products within aiWARE may support your preferred language selection. If you choose a primary language that isn’t available, you may not see it reflected in the product you are currently viewing.",description:"Disclaimer text for preferred language"})}))]}))]})},tabsList$2=[{label:SHARED_TEXT$1.basicInfoTabLabel(),disabled:!1,id:"Basic Info"},{label:SHARED_TEXT$1.accountLinkingTabLabel(),disabled:!1,id:"Account Linking"},{label:SHARED_TEXT$1.settingsTabLabel(),disabled:!1,id:"Settings"}],PersonalProfile=({currentUser:e,handleResetBiometric:t,handleResetPassword:n,handleLogout:r,handleUpdateProfile:i,handleUploadAvatar:o,avatarHistory:a=[],enableResetBiometric:s=!1,loadingStatus:l})=>{var c;const u="EDIT_PROFILE_PICTURE";var d=useStyles$2$4()["classes"];const p=useDispatch();var f=useSelector(userSelector$2),f=null==f?void 0:f.scimConnectId,h=["us-fed-1","us-fed-2"].find(e=>window.location.href.includes(e)),h=useSelector(hidePasswordResetSelector)||h||f||!1,f=useSelector(preferredLanguageSelector)||"en";const[m,g]=react.exports.useState({firstName:"",lastName:"",phoneNumber:"",email:""}),[v,x]=react.exports.useState({firstName:"",lastName:"",phoneNumber:""}),[y,b]=react.exports.useState(!1),[C,$]=react.exports.useState(null),[S,w]=react.exports.useState(!1),[E,_]=react.exports.useState(!1),[T,j]=react.exports.useState(0);var R=useSelector(userAuthStatusSelector),I=AIWareFormatMessage(f);react.exports.useEffect(()=>{e&&O(e)},[e]);const O=e=>{var{firstName:e,lastName:t,imageUrl:n,userSettings:r}=e,r=null==r?void 0:r.find(e=>"phoneNumber"===e.key);g({firstName:e||"",lastName:t||"",phoneNumber:(null==r?void 0:r.value)||"",email:""}),n&&$(n)};var A=react.exports.useCallback(()=>{null!=e&&e.email&&(w(!1),n(null==e?void 0:e.email))},[e,n]);var L=n=>e=>{const t=e.target.value;g(e=>Object.assign(Object.assign({},e),{[n]:t})),x(e=>Object.assign(Object.assign({},e),{[n]:""}))};const M=()=>{p(hidePanel$1(u))},k=e=>{o(e),setTimeout(()=>{p(hidePanel$1(u))},500)};R=[AuthStatus.LOGGING_OUT,AuthStatus.LOGGED_OUT].includes(R);return jsxRuntime.exports.jsxs("div",Object.assign({className:d.personalProfileContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.firstBox},{children:[jsxRuntime.exports.jsx(AvatarProfile,{avatar:C,sortName:""+((null==(c=m.firstName)?void 0:c.substr(0,1))||"")+((null==(c=m.lastName)?void 0:c.substr(0,1))||""),onEditAvatarClick:()=>{var e={name:"EDIT_PROFILE_PICTURE",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",onClose:M,onSaveAvatar:k,avatarHistory:a}},t={panelId:u,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,withTab:!1,marginStart:490,width:450,siblingPanelId:"PERSONAL_PANEL",parentPanelId:"PERSONAL_PANEL",dimmed:0,dimmedStatus:"dimParent"};p(mountPanel$1({panelId:u,microFrontend:e,panelConfig:t}))},loadingStatus:l}),jsxRuntime.exports.jsx("div",Object.assign({className:d.loggedBox},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",className:d.currentlyLoggedIn},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ch1heq",defaultMessage:"Currently logged in as:",description:"personal profile panel currently logged in label"})," ",jsxRuntime.exports.jsx("span",Object.assign({"data-test":"Currently-logged-in-as-email",className:d.email},{children:null==e?void 0:e.email}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:d.logoutBox},{children:jsxRuntime.exports.jsx(LoadingButton$1,Object.assign({onClick:r,variant:"outlined",color:"primary","data-test":"dt-button-logout",className:d.btnLogin,loading:R},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.bRcFCr",defaultMessage:"Logout",description:"label of logout button on profile panel"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:d.tabsParent},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:T,onChangeTab:e=>{j(e)},tabsList:tabsList$2})}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.secondBox},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:T,index:0},{children:jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.headerBox},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.manageBasicInfoLabel},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.5oScQa",defaultMessage:"Manage Your Basic Information",description:"label of manage basic infomation container"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.DjVGBt",defaultMessage:"Basic info, like your name and photo, that you use on Veritone services.",description:"description of manage basic infomation container"})}))]}),jsxRuntime.exports.jsx("div",Object.assign({className:d.editIconBox},{children:!y&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"button-edit",onClick:()=>{_(!1),w(!1),b(!0)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$17,alt:""})}))}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formBox},{children:[y?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(TextField$1,{id:"firstName",label:I({id:"os-app-bar-panel.firstName",defaultMessage:[{type:0,value:"First Name"}]}),variant:"outlined",className:d.textField,value:null===m||void 0===m?void 0:m.firstName,onChange:L("firstName"),margin:"normal",error:""!==v.firstName,helperText:v.firstName,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}}),jsxRuntime.exports.jsx(TextField$1,{id:"lastName",label:I({id:"os-app-bar-panel.lastName",defaultMessage:[{type:0,value:"Last Name"}]}),variant:"outlined",className:d.textField,value:null===m||void 0===m?void 0:m.lastName,onChange:L("lastName"),margin:"normal",error:""!==v.lastName,helperText:v.lastName,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}}),jsxRuntime.exports.jsx(TextField$1,{id:"phoneNumber",label:I({id:"os-app-bar-panel.phone",defaultMessage:[{type:0,value:"Phone"}]}),variant:"outlined",className:d.textField,value:null===m||void 0===m?void 0:m.phoneNumber,onChange:L("phoneNumber"),margin:"normal",error:""!==v.phoneNumber,helperText:v.phoneNumber,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}})]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{e&&O(e),b(!1)},color:"primary",id:"button-cancel-edit",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qpPFGp",defaultMessage:"Cancel",description:"label of cancel button on profile panel"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){(()=>{let e=!0;return m.firstName||(x(Object.assign(Object.assign({},v),{firstName:"This field is required."})),e=!1),m.lastName||(x(Object.assign(Object.assign({},v),{lastName:"This field is required."})),e=!1),m.phoneNumber&&!/^\+?(\d){6,}$/.test(m.phoneNumber.toLowerCase())&&(x(Object.assign(Object.assign({},v),{phoneNumber:"Invalid phone number."})),e=!1),e})()&&(i(m),b(!1))},"data-test":"button-save-edit","data-testid":"button-save-edit",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.C1oyBr",defaultMessage:"Save",description:"label of save button on profile panel"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.a5aLpI",defaultMessage:"Name",description:"label of name field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-name",variant:"body1",className:d.valueItem},{children:`${(null===m||void 0===m?void 0:m.firstName)||""} `+((null===m||void 0===m?void 0:m.lastName)||"")}))]})),(null===m||void 0===m?void 0:m.phoneNumber)&&jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.73xPqY",defaultMessage:"Phone",description:"label of phone field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-phone",variant:"body1",className:d.valueItem},{children:null===m||void 0===m?void 0:m.phoneNumber}))]}))]}),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.zieKdP",defaultMessage:"Email",description:"label of email field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-email",variant:"body1",className:classNames(d.valueItem,d.disabledText)},{children:null==e?void 0:e.email}))]})),S?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.I7feCi",defaultMessage:"Password Reset",description:"reset password label on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Zcj+4v",defaultMessage:"Veritone will send a reset password link via the email on your account.",description:"reset password description on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{w(!1)},color:"primary","data-test":"button-cancel-reset-password","data-testid":"button-cancel-reset-password",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:A,"data-test":"button-reset-password","data-testid":"button-reset-password",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(d.formItem,d.formItemPw)},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.uIEJAQ",defaultMessage:"Password",description:"label of pasword field on profile panel"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.passwordBox},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.valueItem},{children:"********"})),!h&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"btn-click-pw-reset",className:d.iconResetPw,onClick:()=>{_(!1),w(!0),b(!1)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$16,alt:""})}))]}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"subtitle1",className:d.lastUpdate},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qTqazR",defaultMessage:"Last updated",description:"last updated text label text on profile panel"})," ",(null!=e&&e.lastUpdated?DateTime_1.fromISO(null==e?void 0:e.lastUpdated):DateTime_1.local()).toFormat("LLL dd, yyyy")]}))})]})]})),E?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.resetBiometric},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.+DTt+G",defaultMessage:"Biometric Reset",description:"label of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.nzzfrY",defaultMessage:"Your Biometric Profile will be reset.",description:"description of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{_(!1)},"data-test":"button-cancel-reset-biometric",color:"primary",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{_(!1),t()},color:"primary",variant:"contained","data-test":"button-reset-biometric",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):!S&&s&&jsxRuntime.exports.jsx("div",Object.assign({id:"click-reset-biometric",onClick:()=>{_(!0),w(!1),b(!1)}},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.reset},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.OlJtmF",defaultMessage:"Reset Biometric Profile",description:"label of Reset Biometric Profile on profile panel"})}))}))]})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:T,index:1},{children:jsxRuntime.exports.jsx(AccountLinking,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:T,index:2},{children:jsxRuntime.exports.jsx(ProfileSettings,{selectedLanguage:f,onPreferredLanguageChange:e=>{p(updateUserLanguageStart(e))}})}))]}))]}))};function SettingPanel({currentUser:e,activities:t,activityFilter:n,onChangeActivityFilter:r,handleResetBiometric:i,handleResetPassword:o,handleLogout:a,handleUpdateProfile:s,tabId:l,recentApp:c,applications:u,onClickApp:d,handleUploadAvatar:p,avatarHistory:f}){const h=useSelector(userSelector$1),[m,g]=react.exports.useState("");var v=useStyles$b$1()["classes"],x=(react.exports.useEffect(()=>{g(h.loading)},[h]),useSelector(selectHasUserCreateRootFolderPermission)),x=gqlIntrospection.isOperationValid("fileApplication","mutation")&&x;return jsxRuntime.exports.jsxs("div",Object.assign({className:v.tabsBox},{children:[l===TabId.PERSONAL_PANEL&&jsxRuntime.exports.jsx(PersonalProfile,{currentUser:e,handleLogout:a,handleResetBiometric:i,handleResetPassword:o,handleUpdateProfile:s,handleUploadAvatar:p,avatarHistory:f,loadingStatus:m}),l===TabId.APP_PANEL&&jsxRuntime.exports.jsx(ApplicationPanelDnD,{recentApplist:c,applications:u,onClickApp:d,showAppGroups:x}),l===TabId.ACTIVITY_PANEL&&jsxRuntime.exports.jsx(ActivityPanel,{filter:n,onChangeFilter:r,data:t||[]}),l===TabId.PERFORMANCE_MONITOR&&jsxRuntime.exports.jsx(PerformanceMonitor,{})]}))}const namespace$1$2="applications",applicationSelector=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$1$2]},visibleApplicationsSelector=createSelector$1([applicationSelector,selectUserOrgHideCmsFromAppList],({application:e},t)=>(e||[]).filter(e=>!(t&&"cms"===e.key))),selectAppFromStore=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$1$2].selectedApp},HANDLE_CLICK_APP=`aiware/${namespace$1$2}/get handle click app`,REQUEST_GET_APPLICATION_V1=`aiware/${namespace$1$2}/request get app`,GET_APPLICATION_V1_START=`aiware/${namespace$1$2}/get app list start`,GET_APPLICATION_V1_SUCCESS=`aiware/${namespace$1$2}/get app list success`,GET_APPLICATION_V1_ERROR=`aiware/${namespace$1$2}/get app list error`,SET_APPLICATION_IN_STORE=`aiware/${namespace$1$2}/set application`;function setApplicationInStore(e){return{type:SET_APPLICATION_IN_STORE,payload:{data:e}}}function requestGetApplications(){return{type:REQUEST_GET_APPLICATION_V1,payload:{}}}function getApplicationStart(){return{type:GET_APPLICATION_V1_START}}function getApplicationSuccess(e){return{type:GET_APPLICATION_V1_SUCCESS,payload:{data:e}}}function getApplicationError(e){return{type:GET_APPLICATION_V1_ERROR,payload:{message:e}}}const initialState$2$2={application:[],message:"",status:"idle",selectedApp:null};function applicationReducer(e,t){if(void 0===e)return initialState$2$2;switch(t.type){case GET_APPLICATION_V1_START:return Object.assign(Object.assign({},e),{status:"loading"});case GET_APPLICATION_V1_SUCCESS:return Object.assign(Object.assign({},e),{application:t.payload.data,status:"success"});case GET_APPLICATION_V1_ERROR:return Object.assign(Object.assign({},e),{message:t.payload.message,status:"failure"});case SET_APPLICATION_IN_STORE:return Object.assign(Object.assign({},e),{selectedApp:t.payload.data});default:return e}}const namespace$6="activities",allActivitySeletor=e=>{return(null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$6])||[]},today=DateTime_1.local().startOf("day"),activitySelector=createSelector([allActivitySeletor],e=>{var{records:e,filter:t}=e;return"today"===t?e.filter(e=>DateTime_1.fromISO(e.createdDateTime).hasSame(today,"day")):e}),GET_ACTIVITY=`os-app-bar-panel/${namespace$6}/get activity`,GET_ACTIVITY_SUCCESS=`os-app-bar-panel/${namespace$6}/get activity success`,UPDATE_ACTIVITY_FILTER=`os-app-bar-panel/${namespace$6}/update activity filter`;function getActivity(){return{type:GET_ACTIVITY}}function updateActivityFilter(e){return{type:UPDATE_ACTIVITY_FILTER,payload:e}}function getActivitySuccess(e){return{type:GET_ACTIVITY_SUCCESS,payload:e}}const initialState$1$2={records:[],filter:"all",fetched:!1,fetching:!1,processing:!1};function activityReducer(e,t){if(void 0===e)return initialState$1$2;switch(t.type){case GET_ACTIVITY_SUCCESS:return Object.assign(Object.assign({},e),{records:t.payload});case UPDATE_ACTIVITY_FILTER:var n=t.payload["filter"];return Object.assign(Object.assign({},e),{filter:n});default:return e}}combineReducers({[namespace$4$1]:userReducer$1,[namespace$6]:activityReducer,[namespace$1$2]:applicationReducer});const nameSpace$2="aiWareHeaderBarPanel";function*handleClickAppSaga(e){yield call$i(storeRecentApplications,e.payload)}function*getApplicationsSaga(){yield put(getApplicationStart());var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector),e=yield call$i(getApplicationsApi,e,t),n=yield select(graphEndpointSelector),n=yield call$i(getApplicationLogo,n,t);const r=((null==(n=null==(t=null==n?void 0:n.data)?void 0:t.applications)?void 0:n.records)||[]).reduce((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t}),{});e&&e.results?yield put(getApplicationSuccess(((null==e?void 0:e.results)||[]).map(e=>{var t;let n=null!=(t=r[e.applicationId])&&t.signedIconUrl?decodeURIComponent(decodeURI(null==(t=r[e.applicationId])?void 0:t.signedIconUrl)):"";return n=(n=n.replaceAll("&","&")).replaceAll("host?","host&"),{id:e.applicationId,name:e.applicationName,key:e.applicationKey,iconUrl:n||(null==(t=r[e.applicationId])?void 0:t.signedIconSvg)||e.applicationIconUrl||e.applicationIconSvg||e.signedApplicationIconUrl,description:e.applicationDescription,headerbarEnabled:(null==e?void 0:e.headerbarEnabled)||!1,applicationUrl:(null==e?void 0:e.applicationUrl)||""}}))):yield put(getApplicationError("something wrong"))}function*storeRecentApplications(e){var t=yield select(userSelector$1),t=(null==(t=null==t?void 0:t.currentUser)?void 0:t.id)||"",n=JSON.parse(localStorage.getItem("recentApplicationWithUserId")||"{}"),r=(null==n?void 0:n[t])||[],r=(r?(r=slice$4(uniq([e,...r]),0,6),localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:r})))):localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:[e]}))),yield select(switchApiSelector));window.open(r+"/"+e)}function*applicationSaga(){yield all([takeEvery$1(HANDLE_CLICK_APP,handleClickAppSaga),takeLatest$1(REQUEST_GET_APPLICATION_V1,getApplicationsSaga)])}function delay(t=1e3){return __awaiter$4(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function goToPage(e){window.location.href=e}const uploadingStatus={LOADING:"loading",DONE:"done"};function*getCurrentUserSaga$1(){var e,t,n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector),n=yield call$i(getCurrentUserGraphQLApi,n,r);null!=n&&n.errors&&0<(null==n?void 0:n.errors.length)&&(null==(r=n.errors[0].path)||!r.includes("userSettings"))?(console.error("getCurrentUser error"),yield put(getCurrentUserFail$1())):(r=(null==(r=null==(r=null==n?void 0:n.data)?void 0:r.me)?void 0:r.recentImageUrls)||[],t=(null==(t=null==(t=null==n?void 0:n.data)?void 0:t.myRights)?void 0:t.operations)||[],yield put(getCurrentUserSuccess$1(Object.assign(Object.assign({},(null==(e=null==n?void 0:n.data)?void 0:e.me)||{}),{organizationRole:{organizationId:get$3(n,"data.me.organization.id",""),role:t.includes("veritone.superadmin")?"superadmin":t.includes("admin.access")?"admin":"user"},organization:Object.assign({},(null==(t=null==(e=null==n?void 0:n.data)?void 0:e.me)?void 0:t.organization)||{}),roles:((null==(t=null==(e=null==n?void 0:n.data)?void 0:e.me)?void 0:t.roles)||[]).map(e=>e.appName),avatarHistory:r}))))}function*resetBiometricSaga(){var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);yield call$i(resetBiometricApi,e,t)}function*resetPasswordSaga(e){var e=(null==(e=null==e?void 0:e.payload)?void 0:e.email)||"",t=yield select(graphEndpointSelector),e=yield call$i(resetPasswordApi,e,t);!1===(null==e?void 0:e.success)?yield put(resetPasswordFail()):yield put(showMessage({content:(null==(e=null==(t=null==e?void 0:e.data)?void 0:t.createPasswordResetRequest)?void 0:e.message)||"",severity:MessageSeverity.Info}))}function*updateProfileSaga(e){const t=null==e?void 0:e.payload,n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector);var e=yield select(preferredLanguageSelector),i=yield call$i(()=>updateUserProfileApi(t,n,r)),e=AIWareFormatMessage(e);!1===(null==i?void 0:i.success)?yield put(updateProfileFail()):(yield put(getCurrentUser$1()),yield put(showMessage({content:e({id:"os-app-bar-panel.snackbar.updateProfileSuccess",defaultMessage:[{type:0,value:"Success"}]}),severity:MessageSeverity.Success})))}function*uploadAvatarSaga(e){var e=null==e?void 0:e.payload,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=yield call$i(uploadUserAvatarApi,e,t,n);yield put(uploadingAvatar(uploadingStatus.LOADING)),e&&(yield put(updateAvatar(e)))}function*updateAvatarSaga(e){var e=null==e?void 0:e.payload,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),r=yield select(preferredLanguageSelector),e=yield call$i(updateUserAvatarApi,e,t,n),t=AIWareFormatMessage(r);e.errors?yield put(updateProfileFail()):(yield put(showMessage({content:t({id:"os-app-bar-panel.snackbar.updateAvatarSuccess",defaultMessage:[{type:0,value:"Update avatar successfully"}]}),severity:MessageSeverity.Success})),yield put(getCurrentUser$1()),yield put(uploadingAvatar(uploadingStatus.DONE)))}function*hardLogout(){goToPage(yield select(logoutUrlSelector))}function*handleLogoutError(){var e=yield select(preferredLanguageSelector),e=AIWareFormatMessage(e);yield put(showMessage({content:e({id:"os-app-bar-panel.snackbar.logoutError",defaultMessage:[{type:0,value:"Could not log out current user"}]}),severity:MessageSeverity.Error}))}function*redirectToLogoutOrError(){var e=yield select(logoutRedirectUrlSelector);e?goToPage(e):yield call$i(handleLogoutError)}function*updateActivityStatus(){try{var e=yield select(graphEndpointSelector),t=yield select(authSelector),n=yield select(sessionTokenSelector);yield put(extendTokenRequest({token:n})),yield put(setIsIdle(!1)),yield call$i(postNotificationApi,e,null==t?void 0:t.userId,{eventType:aiwareEvent,command:notificationCommands.setCallResetIdleTimer,value:window.navigator.userAgent},!0,"json",aiwareEvent,n),yield delay(500)}catch(e){console.log(e)}}function*logoutUser(){var e,t=yield select(graphEndpointSelector),n=yield select(authSelector),r=yield select(sessionTokenSelector),i=yield select(loginUrlSelector),o=yield select(logoutRedirectUrlSelector);try{r?(window.__logout_requested=!0,yield call$i(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.goToLoginPage,value:window.navigator.userAgent},!0,"json",aiwareEvent,r),yield delay(500),null!=(e=yield call$i(logoutUserApi,r,t))&&e.errors||!1===(null==e?void 0:e.success)?(yield call$i(redirectToLogoutOrError),yield put(logoutUserFail())):(yield put(logoutUserSuccess()),goToPage(o||i))):(yield put(logoutUserSuccess()),yield call$i(hardLogout))}catch(e){yield call$i(handleLogoutError),yield put(logoutUserFail()),console.log(e)}}function*userSaga$1(){yield all([takeEvery$1(GET_CURRENT_USER$1,getCurrentUserSaga$1),takeLatest$1(RESET_BIOMETRIC,resetBiometricSaga),takeLatest$1(RESET_PASSWORD,resetPasswordSaga),takeLatest$1(UPDATE_PROFILE,updateProfileSaga),takeLatest$1(UPLOAD__AVATAR,uploadAvatarSaga),takeLatest$1(UPDATE__AVATAR,updateAvatarSaga),takeLatest$1(LOGOUT_USER,logoutUser),takeLatest$1(UPDATE_ACTIVITY,updateActivityStatus)])}const formatActivityData=e=>{var t,{id:e,event:n,userId:r,userName:i,payload:o,createdDateTime:a}=e;return"login_succeeded"===n?{id:e,userId:r,createdDateTime:a,event:"Login succeeded",description:i+" logged in to Veritone"}:"logout_succeeded"===n?{id:e,userId:r,createdDateTime:a,event:"Logout succeeded",description:i+" successfully logged out"}:"add_user_succeeded"===n?(t=o["userName"],{id:e,userId:r,createdDateTime:a,event:"Add user succeeded",description:t+" successfully added"}):"org_updated"===n?(t=o["organizationName"],{id:e,userId:r,createdDateTime:a,event:"Org Name Changed",description:i+` updated org "${t}"`}):{id:e,userId:r,createdDateTime:a,event:"Unknown activity",description:"Unknown activity"}};function*getActivitySaga(){var e=yield call$i(getActivityApi);e.success?(e=e.data["records"],yield put(getActivitySuccess(e.map(formatActivityData)))):(e=yield select(preferredLanguageSelector),e=AIWareFormatMessage(e),yield put(showMessage({content:e({id:"os-app-bar-panel.snackbar.activityError",defaultMessage:[{type:0,value:"Something went wrong!"}]}),severity:MessageSeverity.Error})))}function*activitySaga(){yield takeEvery$1(GET_ACTIVITY,getActivitySaga)}const BOOTING$1="aiware-header-bar/booting",BOOTED$1="aiware-header-bar/booted";function*bootFunction$1(){yield take(BOOTED$1)}function*booting$1(){yield takeEvery$1(BOOTING$1,bootFunction$1)}function*rootSaga$3(){yield all([fork(applicationSaga),fork(userSaga$1),fork(booting$1),fork(activitySaga)])}function getAppbarPanelModule(){return{id:"os-appbar-panel",reducerMap:{[nameSpace$2]:combineReducers({users:userReducer$1,activities:activityReducer,applications:applicationReducer})},sagas:[rootSaga$3],initialActions:[getActivity(),getCurrentUser$1(),requestGetApplications()],retained:!0}}const initialState$6={openIdConnectors:[],connectedOpenIds:[],message:"",status:"idle"};function openIdConReducer(e,t){if(void 0===e)return initialState$6;switch(t.type){case GET_OPEN_ID_CONNECTORS:return Object.assign(Object.assign({},e),{status:0===e.openIdConnectors.length&&"pending"});case GET_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{openIdConnectors:t.payload.data,status:"idle"});case GET_CONNECTED_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{connectedOpenIds:t.payload.data});case GET_OPEN_ID_ERROR:return Object.assign(Object.assign({},e),{message:t.payload.message,status:"failure"});default:return e}}const getAllOpenIdConnectorApi=(e,t,n)=>__awaiter$4(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/api/admin/openid/org/"+t,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},n&&{Authorization:"Bearer "+n}),credentials:"include"})).json()}catch(e){console.error(e)}}),getConnectedOpenIdConnectorApi=(e,t,n)=>__awaiter$4(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/api/admin/openid/user/"+t,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},n&&{Authorization:"Bearer "+n}),credentials:"include"})).json()}catch(e){console.error(e)}});function*getOpenIdConnectorSaga(){var n=yield select(sessionTokenSelector),r=yield select(rootApiSelector),i=(yield select(userSelector$2))["userName"];if(n&&r&&i){let e={},t={};e.results=yield select(selectOpenIdConnectors);try{var o=call$i(getAllOpenIdConnectorApi,r,i,n),a=call$i(getConnectedOpenIdConnectorApi,r,i,n);0===(null===e||void 0===e?void 0:e.results.length)?[e,t]=yield all([o,a]):t=yield a,e&&t?(yield put(getOpenIdConnectorSuccess(e.results)),yield put(getConnectedOpenIdsSuccess(t.results))):yield put(getOpenIdConnectorError("error on loading open ids"))}catch(e){yield put(getOpenIdConnectorError("error on loading open ids"))}}else yield put(getOpenIdConnectorError("Missing token,base url or username"))}function*openIdRootSaga(){yield takeEvery$1(GET_OPEN_ID_CONNECTORS,getOpenIdConnectorSaga)}function getOpenIdModule(){return{id:"open-id",reducerMap:{[namespace$2$2]:openIdConReducer},sagas:[openIdRootSaga],initialActions:[]}}function SettingPanelComponent_({tabId:e}){const r=useDispatch(),i=useSelector(visibleApplicationsSelector);var{currentUser:t={}}=useSelector(userSelector$1)||{},{avatarHistory:n=[]}=t,o=useSelector(activitySelector)||[],a=useSelector(allActivitySeletor)["filter"];const[s,l]=react.exports.useState(0),[c,u]=react.exports.useState([]),[d,p]=react.exports.useState([]),f=useSelector(userRecentApplicationsSelector);const h="e4739d44-53d2-4153-b55f-5e246fc989b1"===useSelector(appIdSelector),m=useSelector(selectDesktopUrl);function g(e){r(appSwitcherHandleClick(""+e)),r(updateUserRecentApplicationsStart(""+e))}react.exports.useEffect(()=>{p(f)},[f]),react.exports.useEffect(()=>{r(requestGetApplications()),r(getActivity()),r(getCurrentUser$1())},[r]),react.exports.useEffect(()=>{l(e||0)},[e]),react.exports.useEffect(()=>{if(0<d.length&&0<i.length){var e=[];for(const n of d){var t=i.find(e=>e.id===n);t&&e.push(t)}u(e)}},[d,i]);const v={invalidUrl:"Selected Application does not have a valid destination URL",urlValidationError:"Application loading has failed. Please try again later"};const x=useNavigate();function y(t,e){var{error:e,message:n}=function(e){let t;try{t=new URL(e)}catch(e){return{error:!0,message:v.invalidUrl}}return"https:"===t.protocol||"http:"===t.protocol?{error:!1}:{error:!0,message:v.urlValidationError}}(e);e&&n?r(showMessage({content:n,severity:MessageSeverity.Error})):(r(hidePanel$1("APPLICATION_PANEL_ID")),e=i.find(e=>e.id===t),x("/ui/app/"+(null==e?void 0:e.key)),r(setApplicationInStore(e)))}return jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarPanelModule(),getOpenIdModule()]},{children:jsxRuntime.exports.jsx(SettingPanel,{tabId:s,currentUser:t,activities:o,activityFilter:a,onChangeActivityFilter:function(e){r(updateActivityFilter({filter:e}))},handleResetBiometric:function(){r(resetBiometric())},handleResetPassword:function(e){r(resetPassword({email:e}))},handleLogout:function(){r(logout())},handleUpdateProfile:function(e){r(updateProfile(e))},organizationRole:get$3(t,"organizationRole",{}),recentApp:c,applications:i,onClickApp:function(t){var{headerbarEnabled:e,applicationUrl:n=""}=i.find(e=>e.id===t)||{};if(h)e?y(t,n):g(t);else if(e&&m){n=(i.find(e=>e.id===t)||{})["key"];let e="";e=n?(m.endsWith("/")?"":"/")+"ui/app/"+n:(m.endsWith("/")?"":"/")+"ui/app/"+t,window.open(m+e)}else g(t)},handleUploadAvatar:function(e){r(uploadAvatar(e))},avatarHistory:n})}))})})})}function SettingPanelComponent(e){return jsxRuntime.exports.jsx(BrowserRouter,{children:jsxRuntime.exports.jsx(SettingPanelComponent_,Object.assign({},e))})}const CropImage=({url:e,handleCroppedImage:t})=>{const n=react.exports.useRef();return jsxRuntime.exports.jsx("div",Object.assign({style:{padding:"10px",background:"#F8F8F8",borderRadius:"4px",border:"1px solid #D5DFE9"}},{children:jsxRuntime.exports.jsx(ReactCropper,{ref:n,src:e,style:{height:"100%",width:"100%",borderRadius:"4px",maxHeight:"300px"},dragMode:"move",viewMode:1,width:"",aspectRatio:1,guides:!0,crop:()=>{n.current&&n.current.cropper.getCroppedCanvas().toBlob(function(e){t(e)},"image/jpeg")},cropBoxMovable:!1,cropBoxResizable:!1,toggleDragModeOnDblclick:!1})}))};function EditProFilePicture({onClose:e,onSaveAvatar:t,avatarHistory:n}){const r=useStyles$2$4()["classes"],[i,o]=react.exports.useState(""),[a,s]=react.exports.useState(),[l,c]=react.exports.useState(!1),[u,d]=react.exports.useState(!1);var p=react.exports.useRef(null);const f=react.exports.useRef(0),h=react.exports.useRef(null);const m=e=>{h.current&&(h.current.value=""),o(e),c(!0)};return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.editProfilePictureContainer},{children:[jsxRuntime.exports.jsx("input",{accept:"image/*",className:r.inputFile,id:"icon-button-file",type:"file",onChange:e=>{e=e.target.files;if(e&&0<e.length){e=e[0];if(URL)m(URL.createObjectURL(e));else if(FileReader){const t=new FileReader;t.onload=function(){m(t.result)},t.readAsDataURL(e)}}},ref:h,"data-test":"image-upload-input","data-testid":"image-upload-input"}),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.contentUserView},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.headerDrawer},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:r.mainTitleText,"data-test":"edit-profile-picture-header"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.npW7Np",defaultMessage:"Edit Profile Picture",description:"The title of edit profile picture panel"})}))})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.contentEditAvatar},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames(u&&r.dragging),ref:p,onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),f.current++,e.dataTransfer.items&&0<e.dataTransfer.items.length&&d(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),f.current--,0<f.current||d(!1)},onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),d(!1),e.dataTransfer.files&&0<e.dataTransfer.files.length){var t=e.dataTransfer.files;if(FileReader&&0<t.length){const n=new FileReader;n.onload=function(){m(n.result)},n.readAsDataURL(t[0])}e.dataTransfer.clearData(),f.current=0}}},{children:l?jsxRuntime.exports.jsx(CropImage,{url:i,handleCroppedImage:e=>{s(e)}}):jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.areaUpload},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:r.descDrag},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.LeafC8",defaultMessage:"Drag a profile photo here",description:"the label of upload file container"})})),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx("img",{src:img$1y,alt:""})}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle2",className:r.descDrag2},{children:"- or -"})),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"outlined",color:"primary",id:"on-select-photo",className:r.btnSelectPhoto,onClick:()=>{h.current&&h.current.click()},"data-test":"edit-profile-picture-upload-file-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.CaHXXC",defaultMessage:"Select a photo from your computer",description:"edit profile picture panel: select photo label"})}))]}))})),0<(null==n?void 0:n.length)&&jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.recentlyBox},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:r.recentlyText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.3gg72P",defaultMessage:"Recently Used Photos",description:"the label of recently used profile picture container"})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0},{children:0<n.length&&n.map(e=>jsxRuntime.exports.jsx(Grid$1,Object.assign({xs:4,item:!0,className:r.imageGrid,"data-test":"recent-profile-picture"},{children:jsxRuntime.exports.jsx("img",{className:r.imgRecently,src:e,alt:"avatar"})}),e))}))]}))]}))]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.actionButton+" "+r.editProfilePictureFooterButtons},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",onClick:()=>{o(""),s(void 0),c(!1),null!=e&&e()},className:classNames(r.btnAction,r.btnActionCancel),"data-test":"edit-profile-picture-cancel-button","data-testid":"edit-profile-picture-cancel-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained",id:"button-save-cropped-image",className:classNames(r.btnAction,r.btnSave),onClick:()=>{var e;a&&(e="avatar-"+(new Date).toISOString()+".jpeg",e=new File([a],e,{type:"image/jpeg"}),t(e),setTimeout(()=>{o(""),c(!1)},250))},"data-test":"edit-profile-picture-save-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.tcZkqy",defaultMessage:"Save",description:"label of save button in edit profile picture panel"})}))]}))]}))})}const useStyles$l=makeStyles()((e,{row:t})=>({tabsContainer:{width:"100%"},gridContainer:{display:"flex"},listContainer:{},gridItem:{display:"flex",justifyContent:"center",paddingBottom:e.spacing(1.6),"&:hover":{backgroundColor:"#EEF3F9",borderRadius:"4px"}},padding:{padding:e.spacing(0,6,3,6)},moreAppContainer:{height:`calc(100vh - ${0===t?175:1===t?275:2===t?395:500}px - 66px - 10px - 55px)`,minHeight:3===t?300:0,overflow:"overlay",overflowX:"hidden"},relativeParent:{position:"relative"},noMoreApps:{padding:e.spacing(0,9,3,9)},noSelect:{userSelect:"none",paddingTop:"16px"},gridTitle:{padding:"24px 30px 32px 30px",margin:"-5px 0 -5px","& > $noSelect":{marginBottom:15}},appItemDivider:{margin:e.spacing(0,6)}}));function AppList({title:e,selectedAppId:t,onSelectApplication:n,applications:r=[],useGrid:i=!1,row:o=0}){const a=useStyles$l({row:o})["classes"],[s,l]=react.exports.useState(t),[c,u]=react.exports.useState([]);function d(e){l(e),n(e)}function p(e,t){return e.name>t.name?1:e.name<t.name?-1:0}return react.exports.useEffect(()=>{var e;0<r.length&&(e=[...r].sort(p),u(e))},[r]),react.exports.useEffect(()=>{t!==s&&l(t)},[t,s]),jsxRuntime.exports.jsxs("div",Object.assign({className:classNames({[a.gridTitle]:i},a.tabsContainer)},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames({[a.padding]:!i},a.noSelect)},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",sx:{marginBottom:"10px"}},{children:e}))})),i&&jsxRuntime.exports.jsx("div",Object.assign({className:a.gridContainer},{children:jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0},{children:0===r.length?jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Xzhf45",defaultMessage:"No Applications",description:"the label no app will show if we have no application for grid view"})})):0<c.length&&c.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.gridItem},{children:jsxRuntime.exports.jsx(AppIcon,{type:"grid",selected:e===s,onClick:d,iconUrl:t,id:e,appName:n})}))}),e)})}))})),!i&&jsxRuntime.exports.jsx("div",Object.assign({className:a.listContainer},{children:0===r.length?jsxRuntime.exports.jsx("div",Object.assign({className:a.noMoreApps},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dyhBih",defaultMessage:"No Applications",description:"the label no app will show if we have no application for list view"})}))})):jsxRuntime.exports.jsx("div",Object.assign({className:a.moreAppContainer},{children:0<r.length&&r.sort(p).map((e,t)=>{var{id:e=t,iconUrl:n,name:r}=e;return jsxRuntime.exports.jsxs("div",Object.assign({className:a.relativeParent},{children:[jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===s,onClick:d,iconUrl:n,id:e,appName:r}),jsxRuntime.exports.jsx(Divider$1,{className:a.appItemDivider})]}),e+"_"+t)})}))}))]}))}var index_esm$4=Object.freeze({__proto__:null,AppList:AppList,EditProFilePicture:EditProFilePicture,VeritonePanel:SettingPanelComponent,applicationSelector:applicationSelector,getAppbarPanelModule:getAppbarPanelModule,requestGetApplications:requestGetApplications,selectAppFromStore:selectAppFromStore,setApplicationInStore:setApplicationInStore}),Close={},_interopRequireDefault$6=interopRequireDefault.exports,default_1$6=(Object.defineProperty(Close,"__esModule",{value:!0}),Close.default=void 0),_createSvgIcon$6=_interopRequireDefault$6(createSvgIcon$1),_jsxRuntime$6=jsxRuntime.exports,_default$6=(0,_createSvgIcon$6.default)((0,_jsxRuntime$6.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),default_1$6=Close.default=_default$6,dt=Object.create,Ie=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,ft=Object.getOwnPropertyNames,ht=Object.getPrototypeOf,vt=Object.prototype.hasOwnProperty,Tt=e=>Ie(e,"__esModule",{value:!0}),It=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Et=(t,n,r)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let e of ft(n))vt.call(t,e)||"default"===e||Ie(t,e,{get:()=>n[e],enumerable:!(r=pt(n,e))||r.enumerable});return t},bt=e=>Et(Tt(Ie(null!=e?dt(ht(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Be=It((e,t)=>{var n,r;r=function(e){function t(e){var t=o.get(e),n=void 0===t?e.size:t<1073741824?t+1:0;if(e.has(n))if(e.size<536870912)for(;e.has(n);)n=Math.floor(1073741824*Math.random());else{if(e.size>s)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(n);)n=Math.floor(Math.random()*s)}return i(e,n)}function n(e){var t=r(e);return e.add(t),t}var r,i,o,a,s=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,l=new WeakMap;i=function(e,t){return a.set(e,t),t},o=a=l,r=t;e.addUniqueNumber=n,e.generateUniqueNumber=t,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof(n=e)&&void 0!==t?r(e):"function"==typeof define&&define.amd?define(["exports"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self).fastUniqueNumbers={})}),w=(bt(Be()),"object"==("undefined"==typeof window?"undefined":typeof window)),T={setTimeout:w?setTimeout.bind(window):setTimeout,clearTimeout:w?clearTimeout.bind(window):clearTimeout,setInterval:w?setInterval.bind(window):setInterval,clearInterval:w?clearInterval.bind(window):clearInterval};function $e(e){T.setTimeout=e.setTimeout,T.clearTimeout=e.clearTimeout,T.setInterval=e.setInterval,T.clearInterval=e.clearInterval}var l,Y={},Ke=class{constructor(e){this.closed=!1,this.mc=new MessageChannel,this.name=e,Y[e]=Y[e]||[],Y[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){e.storageArea===window.localStorage&&e.key.substring(0,this.name.length)===this.name&&null!==e.newValue&&(e=JSON.parse(e.newValue),this.mc.port2.postMessage(e))}postMessage(e){if(this.closed)throw new Error("InvalidStateError");let t=JSON.stringify(e),n=this.name+":"+String(Date.now())+String(Math.random());window.localStorage.setItem(n,t),T.setTimeout(()=>{window.localStorage.removeItem(n)},500),Y[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){var e;this.closed||(this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage),e=Y[this.name].indexOf(this),Y[this.name].splice(e,1))}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},Qe="undefined"==typeof window?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:Ke;function Ze(t=0){return new Promise(e=>T.setTimeout(e,t))}function le(){return Math.random().toString(36).substring(2)}!function(e){e[e.APPLY=0]="APPLY",e[e.TELL=1]="TELL",e[e.CLOSE=2]="CLOSE",e[e.REGISTER=3]="REGISTER",e[e.DEREGISTER=4]="DEREGISTER",e[e.IDLE=5]="IDLE",e[e.ACTIVE=6]="ACTIVE",e[e.PROMPT=7]="PROMPT",e[e.START=8]="START",e[e.RESET=9]="RESET",e[e.ACTIVATE=10]="ACTIVATE",e[e.PAUSE=11]="PAUSE",e[e.RESUME=12]="RESUME",e[e.MESSAGE=13]="MESSAGE"}(l=l||{});var k,Ee=class{constructor(e,t){this.token=le(),this.isLeader=!1,this.isDead=!1,this.isApplying=!1,this.reApply=!1,this.intervals=[],this.listeners=[],this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return!(this.reApply=!0);let n=!(this.isApplying=!0),e=e=>{var{token:e,action:t}=e.data;e!==this.token&&(t===l.APPLY&&e>this.token&&(n=!0),t===l.TELL)&&(n=!0)};this.channel.addEventListener("message",e);try{return this.sendAction(l.APPLY),await Ze(this.options.responseTime),this.channel.removeEventListener("message",e),this.isApplying=!1,n?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let i=!1,o=null;return new Promise(t=>{let n=()=>{var e;i||(i=!0,T.clearInterval(o),e=this.intervals.indexOf(o),this.intervals.splice(e,1),this.channel.removeEventListener("message",r),t())},r=(o=T.setInterval(()=>{this.apply().then(()=>{this.isLeader&&n()})},this.options.fallbackInterval),this.intervals.push(o),e=>{e=e.data.action;e===l.CLOSE&&this.apply().then(()=>{this.isLeader&&n()})});this.channel.addEventListener("message",r)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;var e=e=>{e=e.data.action;e===l.APPLY&&this.sendAction(l.TELL)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(l.TELL)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership(),this.deferred)}close(){this.isDead||(this.isDead=!0,this.isLeader=!1,this.sendAction(l.CLOSE),this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>T.clearInterval(e)))}},be=(!function(e){e[e.PROMPTED=0]="PROMPTED",e[e.ACTIVE=1]="ACTIVE",e[e.IDLE=2]="IDLE"}(k=k||{}),class{constructor(e){this.token=le(),this.registry=new Map,this.allIdle=!1;var t=e["channelName"];this.options=e,this.channel=new Qe(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new Ee(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{var{action:e,token:t,data:n}=e.data;switch(e){case l.REGISTER:this.registry.set(t,2);break;case l.DEREGISTER:this.registry.delete(t);break;case l.IDLE:this.idle(t);break;case l.ACTIVE:this.active(t);break;case l.PROMPT:this.prompt(t);break;case l.START:this.start(t);break;case l.RESET:this.reset(t);break;case l.ACTIVATE:this.activate(t);break;case l.PAUSE:this.pause(t);break;case l.RESUME:this.resume(t);break;case l.MESSAGE:this.options.onMessage(n)}}),this.send(l.REGISTER)}get isLeader(){if(this.elector)return this.elector.isLeader;throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.')}prompt(e=this.token){this.registry.set(e,0);var t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(l.PROMPT),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);var t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(l.IDLE),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);var t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(l.ACTIVE),t&&this.options.onActive()}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.START):this.options.start(!0)}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.RESET):this.options.reset(!0)}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.ACTIVATE):this.options.activate(!0)}pause(e=this.token){e===this.token?this.send(l.PAUSE):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(l.RESUME):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:l.MESSAGE,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(l.DEREGISTER),this.channel.close()}}),et=w?document:null,ge=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"];function C(e){let t=react.exports.useRef(e);return react.exports.useEffect(()=>{t.current=e},[e]),t}function tt(t,n){let r;function e(...e){r&&clearTimeout(r),r=setTimeout(()=>{t(...e),r=null},n)}return e.cancel=function(){clearTimeout(r)},e}function ue(n,r){let i=0;return function(...e){var t=(new Date).getTime();if(!(t-i<r))return i=t,n(...e)}}var E=()=>(w?performance:Date).now();function $({timeout:e=12e5,promptTimeout:V=0,element:t=et,events:n=ge,timers:H=void 0,immediateEvents:r=[],onPrompt:B=()=>{},onIdle:U=()=>{},onActive:z=()=>{},onAction:Z=()=>{},onMessage:W=()=>{},debounce:i=0,throttle:o=0,eventsThrottle:a=200,startOnMount:s=!0,startManually:l=!1,stopOnIdle:G=!1,crossTab:c=!1,name:q="idle-timer",syncTimers:u=0,leaderElection:K=!1}={}){let d=react.exports.useRef(E()),Y=react.exports.useRef(Date.now()),p=react.exports.useRef(E()),f=react.exports.useRef(null),h=react.exports.useRef(null),Q=react.exports.useRef(null),m=react.exports.useRef(0),g=react.exports.useRef(!0),v=react.exports.useRef(!1),x=react.exports.useRef(!0),y=react.exports.useRef(!1),b=react.exports.useRef(!1),$=react.exports.useRef(0),S=react.exports.useRef(0),_=react.exports.useRef(null),j=react.exports.useRef(null),R=C(e),I=C(V),X=C(G),J=react.exports.useRef(r),O=react.exports.useRef(t),A=react.exports.useRef([...new Set([...n,...r]).values()]),ee=C(U),te=C(z),ne=C(B),L=C(W),re=C(Z),M=react.exports.useMemo(()=>{var e=e=>re.current(e);return 0<i?tt(e,i):0<o?ue(e,o):e},[o,i]),ie=react.exports.useRef(),k=(react.exports.useEffect(()=>{c&&u&&(ie.current=ue(()=>{j.current.active()},u))},[c,u]),()=>{null!==_.current&&(T.clearTimeout(_.current),_.current=null)}),N=(e,t=!0)=>{k(),_.current=T.setTimeout(le,e||R.current),t&&(h.current=E()),Q.current=Date.now()},oe=e=>{$.current=0,S.current=E(),b.current=!0,N(I.current,!1),ne.current(e)},ae=()=>{k(),g.current=!0,f.current=E(),X.current?D():b.current&&(S.current=0,b.current=!1),ee.current()},se=e=>{k(),b.current=!1,S.current=0,g.current=!1,m.current+=E()-f.current,P(),N(),te.current(e)},le=e=>{if(!g.current)return M.cancel&&M.cancel(),0<I.current&&!b.current?void(j.current?j.current.prompt():oe(e)):void(j.current?j.current.idle():ae());j.current?j.current.active():se(e)},ce=e=>{var t;M(e),b.current||(k(),!g.current&&J.current.includes(e.type)||!g.current&&Date.now()-Q.current>=R.current||(t=E()-h.current,g.current&&!G)||!g.current&&t>=R.current?le(e):(v.current=!1,$.current=0,S.current=0,N(),c&&u&&ie.current()))},de=react.exports.useRef(),P=(react.exports.useEffect(()=>{var e=y.current;e&&D(),de.current=0<a?ue(ce,a):ce,e&&P()},[a,o,i,re,c,u]),()=>{w&&!y.current&&(A.current.forEach(e=>{O.current.addEventListener(e,de.current,{capture:!0,passive:!0})}),y.current=!0)}),D=(e=!1)=>{w&&(y.current||e)&&(A.current.forEach(e=>{O.current.removeEventListener(e,de.current,{capture:!0})}),y.current=!1)},F=react.exports.useCallback(e=>{k(),P(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,j.current&&!e&&j.current.start(),N()},[_,g,R,j]),pe=react.exports.useCallback(e=>{k(),P(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,d.current=E(),p.current=E(),j.current&&!e&&j.current.reset(),l||N()},[_,g,R,l,j]),fe=react.exports.useCallback(e=>{k(),P(),(g.current||b.current)&&se(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,p.current=E(),j.current&&!e&&j.current.activate(),N()},[_,g,R,j]),he=react.exports.useCallback((e=!1)=>!v.current&&($.current=we(),v.current=!0,D(),k(),j.current&&!e&&j.current.pause(),!0),[_,j]),me=react.exports.useCallback((e=!1)=>!!v.current&&(v.current=!1,b.current||P(),g.current||N($.current),S.current&&(S.current=E()),j.current&&!e&&j.current.resume(),!0),[_,R,$,j]),ve=react.exports.useCallback((e,t)=>{j.current?(t&&L.current(e),j.current.message(e)):t&&L.current(e)},[W]),xe=react.exports.useCallback(()=>g.current,[g]),ye=react.exports.useCallback(()=>b.current,[b]),Ce=react.exports.useCallback(()=>{if(j.current)return j.current.isLeader;throw new Error('❌ Cross Tab feature is not enabled. To enable it set the "crossTab" property to true.')},[j]),Se=react.exports.useCallback(()=>{if(j.current)return j.current.token;throw new Error('❌ Cross Tab feature is not enabled. To enable it set the "crossTab" property to true.')},[j]),we=react.exports.useCallback(()=>{var e,t;return v.current?$.current:(t=$.current||I.current+R.current,e=h.current?E()-h.current:0,(t=Math.floor(t-e))<0?0:Math.abs(t))},[R,I,b,$,h]),Ee=react.exports.useCallback(()=>Math.round(E()-p.current),[p]),_e=react.exports.useCallback(()=>Math.round(E()-d.current),[d]),Te=react.exports.useCallback(()=>f.current?new Date(Y.current-d.current+f.current):null,[f]),je=react.exports.useCallback(()=>h.current?new Date(Y.current-d.current+h.current):null,[h]),Re=react.exports.useCallback(()=>g.current?Math.round(E()-f.current+m.current):Math.round(m.current),[f,m]),Ie=react.exports.useCallback(()=>{var e=Math.round(_e()-Re());return 0<=e?e:0},[d,f,m]);return react.exports.useEffect(()=>{if(0<i&&0<o)throw new Error("❌ onAction can either be throttled or debounced, not both.");H&&$e(H);let e=()=>{j.current&&j.current.close(),M.cancel&&M.cancel(),k(),D(!0)};return w&&window.addEventListener("beforeunload",e),()=>{w&&window.removeEventListener("beforeunload",e),j.current&&j.current.close(),M.cancel&&M.cancel(),k(),D(!0)}},[]),react.exports.useEffect(()=>{j.current&&j.current.close(),j.current=c?new be({channelName:q,leaderElection:K,onPrompt:()=>{oe()},onIdle:()=>{ae()},onActive:()=>{se()},onMessage:L.current,start:F,reset:pe,activate:fe,pause:he,resume:me}):null},[c,q,K,ne,ee,te,L,F,pe,he,me]),react.exports.useEffect(()=>{k(),D(!0),x.current||(v.current=!0,g.current=!0,$.current=0),l||(s?F:P)()},[l,s,x]),react.exports.useEffect(()=>{var e;x.current||(e=[...new Set([...n,...r]).values()],D(),A.current=e,O.current=t,J.current=r,l)||(s?F:P)()},[t,JSON.stringify(n),JSON.stringify(r),x,l,s]),react.exports.useEffect(()=>{x.current?x.current=!1:(R.current=e,l||(g.current&&(te.current(),j.current)&&j.current.active(),F()))},[e,j,l,x,g]),{message:ve,start:F,reset:pe,activate:fe,pause:he,resume:me,isIdle:xe,isPrompted:ye,isLeader:Ce,getTabId:Se,getRemainingTime:we,getElapsedTime:Ee,getTotalElapsedTime:_e,getLastIdleTime:Te,getLastActiveTime:je,getTotalIdleTime:Re,getTotalActiveTime:Ie}}var ce=react.exports.createContext(null),tinycolor$1=(ce.Consumer,{exports:{}}),tinycolor=(!function(e){function u(e,t){var n;return t=t||{},(e=e||"")instanceof u?e:this instanceof u?(n=function(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(S,"").replace(w,"").toLowerCase();var t,n=!1;if(I[e])e=I[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=k.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=k.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=k.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=k.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=k.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=k.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=k.hex8.exec(e))return{r:g(t[1]),g:g(t[2]),b:g(t[3]),a:b(t[4]),format:n?"name":"hex8"};if(t=k.hex6.exec(e))return{r:g(t[1]),g:g(t[2]),b:g(t[3]),format:n?"name":"hex"};if(t=k.hex4.exec(e))return{r:g(t[1]+""+t[1]),g:g(t[2]+""+t[2]),b:g(t[3]+""+t[3]),a:b(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=k.hex3.exec(e))return{r:g(t[1]+""+t[1]),g:g(t[2]+""+t[2]),b:g(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(C(e.r)&&C(e.g)&&C(e.b)?(t=function(e,t,n){return{r:255*h(e,255),g:255*h(t,255),b:255*h(n,255)}}(e.r,e.g,e.b),a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):C(e.h)&&C(e.s)&&C(e.v)?(r=x(e.s),i=x(e.v),t=function(e,t,n){e=6*h(e,360),t=h(t,100),n=h(n,100);var r=$.floor(e),e=e-r,i=n*(1-t),o=n*(1-e*t),e=n*(1-(1-e)*t),t=r%6;return{r:255*[n,o,i,i,e,n][t],g:255*[e,n,n,o,i,i][t],b:255*[i,i,e,n,n,o][t]}}(e.h,r,i),a=!0,s="hsv"):C(e.h)&&C(e.s)&&C(e.l)&&(r=x(e.s),o=x(e.l),t=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),1<n&&--n,n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}e=h(e,360),t=h(t,100),n=h(n,100),0===t?r=i=o=n:(r=a(t=2*n-(n=n<.5?n*(1+t):n+t-n*t),n,e+1/3),i=a(t,n,e),o=a(t,n,e-1/3));return{r:255*r,g:255*i,b:255*o}}(e.h,r,o),a=!0,s="hsl"),e.hasOwnProperty("a"))&&(n=e.a);return n=f(n),{ok:a,format:e.format||s,r:T(255,j(t.r,0)),g:T(255,j(t.g,0)),b:T(255,j(t.b,0)),a:n}}(e),this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=_(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=_(this._r)),this._g<1&&(this._g=_(this._g)),this._b<1&&(this._b=_(this._b)),this._ok=n.ok,void(this._tc_id=E++)):new u(e,t)}function r(e,t,n){e=h(e,255),t=h(t,255),n=h(n,255);var r,i=j(e,t,n),o=T(e,t,n),a=(i+o)/2;if(i==o)r=l=0;else{var s=i-o,l=.5<a?s/(2-i-o):s/(i+o);switch(i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:l,l:a}}function i(e,t,n){e=h(e,255),t=h(t,255),n=h(n,255);var r,i=j(e,t,n),o=T(e,t,n),a=i,s=i-o,l=0===i?0:s/i;if(i==o)r=0;else{switch(i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:l,v:a}}function t(e,t,n,r){e=[v(_(e).toString(16)),v(_(t).toString(16)),v(_(n).toString(16))];return r&&e[0].charAt(0)==e[0].charAt(1)&&e[1].charAt(0)==e[1].charAt(1)&&e[2].charAt(0)==e[2].charAt(1)?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0):e.join("")}function o(e,t,n,r){return[v(y(r)),v(_(e).toString(16)),v(_(t).toString(16)),v(_(n).toString(16))].join("")}function n(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.s-=t/100,e.s=m(e.s),u(e)}function a(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.s+=t/100,e.s=m(e.s),u(e)}function s(e){return u(e).desaturate(100)}function l(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.l+=t/100,e.l=m(e.l),u(e)}function c(e,t){t=0===t?0:t||10;e=u(e).toRgb();return e.r=j(0,T(255,e.r-_(-t/100*255))),e.g=j(0,T(255,e.g-_(-t/100*255))),e.b=j(0,T(255,e.b-_(-t/100*255))),u(e)}function d(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.l-=t/100,e.l=m(e.l),u(e)}function p(e,t){e=u(e).toHsl(),t=(e.h+t)%360;return e.h=t<0?360+t:t,u(e)}function N(e){e=u(e).toHsl();return e.h=(e.h+180)%360,u(e)}function P(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+120)%360,s:t.s,l:t.l}),u({h:(n+240)%360,s:t.s,l:t.l})]}function D(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+90)%360,s:t.s,l:t.l}),u({h:(n+180)%360,s:t.s,l:t.l}),u({h:(n+270)%360,s:t.s,l:t.l})]}function F(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+72)%360,s:t.s,l:t.l}),u({h:(n+216)%360,s:t.s,l:t.l})]}function V(e,t,n){t=t||6,n=n||30;var r=u(e).toHsl(),i=360/n,o=[u(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(u(r));return o}function H(e,t){t=t||6;for(var e=u(e).toHsv(),n=e.h,r=e.s,i=e.v,o=[],a=1/t;t--;)o.push(u({h:n,s:r,v:i})),i=(i+a)%1;return o}function f(e){return e=parseFloat(e),e=isNaN(e)||e<0||1<e?1:e}function h(e,t){"string"==typeof(n=e)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(e="100%");var n="string"==typeof(n=e)&&-1!=n.indexOf("%");return e=T(t,j(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),$.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function m(e){return T(1,j(0,e))}function g(e){return parseInt(e,16)}function v(e){return 1==e.length?"0"+e:""+e}function x(e){return e=e<=1?100*e+"%":e}function y(e){return $.round(255*parseFloat(e)).toString(16)}function b(e){return g(e)/255}function C(e){return k.CSS_UNIT.exec(e)}var $,S,w,E,_,T,j,R,I,O,A,L,M,k;$=Math,S=/^\s+/,w=/\s+$/,E=0,_=$.round,T=$.min,j=$.max,R=$.random,u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,e=e.b/255,t=t<=.03928?t/12.92:$.pow((.055+t)/1.055,2.4),n=n<=.03928?n/12.92:$.pow((.055+n)/1.055,2.4),e=e<=.03928?e/12.92:$.pow((.055+e)/1.055,2.4);return.2126*t+.7152*n+.0722*e},setAlpha:function(e){return this._a=f(e),this._roundA=_(100*this._a)/100,this},toHsv:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=i(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),e=_(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+e+"%)":"hsva("+t+", "+n+"%, "+e+"%, "+this._roundA+")"},toHsl:function(){var e=r(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=r(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),e=_(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+e+"%)":"hsla("+t+", "+n+"%, "+e+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var t=this._r,n=this._g,r=this._b,i=this._a;return t=[v(_(t).toString(16)),v(_(n).toString(16)),v(_(r).toString(16)),v(y(i))],e&&t[0].charAt(0)==t[0].charAt(1)&&t[1].charAt(0)==t[1].charAt(1)&&t[2].charAt(0)==t[2].charAt(1)&&t[3].charAt(0)==t[3].charAt(1)?t[0].charAt(0)+t[1].charAt(0)+t[2].charAt(0)+t[3].charAt(0):t.join("")},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:_(this._r),g:_(this._g),b:_(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+_(this._r)+", "+_(this._g)+", "+_(this._b)+")":"rgba("+_(this._r)+", "+_(this._g)+", "+_(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:_(100*h(this._r,255))+"%",g:_(100*h(this._g,255))+"%",b:_(100*h(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+_(100*h(this._r,255))+"%, "+_(100*h(this._g,255))+"%, "+_(100*h(this._b,255))+"%)":"rgba("+_(100*h(this._r,255))+"%, "+_(100*h(this._g,255))+"%, "+_(100*h(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&O[t(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+o(this._r,this._g,this._b,this._a),n=t;return"progid:DXImageTransform.Microsoft.gradient("+(this._gradientType?"GradientType = 1, ":"")+"startColorstr="+t+",endColorstr="+(n=e?"#"+o((t=u(e))._r,t._g,t._b,t._a):n)+")"},toString:function(e){var t=!!e,n=(e=e||this._format,!1),r=this._a<1&&0<=this._a;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),(n="hsv"===e?this.toHsvString():n)||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(e,t){e=e.apply(null,[this].concat([].slice.call(t)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(n,arguments)},saturate:function(){return this._applyModification(a,arguments)},greyscale:function(){return this._applyModification(s,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(V,arguments)},complement:function(){return this._applyCombination(N,arguments)},monochromatic:function(){return this._applyCombination(H,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(D,arguments)}},u.fromRatio=function(e,t){if("object"==typeof e){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:x(e[n]));e=r}return u(e,t)},u.equals=function(e,t){return!(!e||!t)&&u(e).toRgbString()==u(t).toRgbString()},u.random=function(){return u.fromRatio({r:R(),g:R(),b:R()})},u.mix=function(e,t,n){n=0===n?0:n||50;e=u(e).toRgb(),t=u(t).toRgb(),n/=100;return u({r:(t.r-e.r)*n+e.r,g:(t.g-e.g)*n+e.g,b:(t.b-e.b)*n+e.b,a:(t.a-e.a)*n+e.a})},u.readability=function(e,t){e=u(e),t=u(t);return($.max(e.getLuminance(),t.getLuminance())+.05)/($.min(e.getLuminance(),t.getLuminance())+.05)},u.isReadable=function(e,t,n){var r=u.readability(e,t),i=!1,e=function(e){var t;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==e&&"large"!==e&&(e="small");return{level:t,size:e}}(n);switch(e.level+e.size){case"AAsmall":case"AAAlarge":i=4.5<=r;break;case"AAlarge":i=3<=r;break;case"AAAsmall":i=7<=r}return i},u.mostReadable=function(e,t,n){for(var r,i=null,o=0,a=(n=n||{}).includeFallbackColors,s=n.level,l=n.size,c=0;c<t.length;c++)o<(r=u.readability(e,t[c]))&&(o=r,i=u(t[c]));return u.isReadable(e,i,{level:s,size:l})||!a?i:(n.includeFallbackColors=!1,u.mostReadable(e,["#fff","#000"],n))},I=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=u.hexNames=function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}(I),L="[\\s|\\(]+("+(A="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+A+")[,|\\s]+("+A+")\\s*\\)?",M="[\\s|\\(]+("+A+")[,|\\s]+("+A+")[,|\\s]+("+A+")[,|\\s]+("+A+")\\s*\\)?",k={CSS_UNIT:new RegExp(A),rgb:new RegExp("rgb"+L),rgba:new RegExp("rgba"+M),hsl:new RegExp("hsl"+L),hsla:new RegExp("hsla"+M),hsv:new RegExp("hsv"+L),hsva:new RegExp("hsva"+M),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/},e.exports?e.exports=u:window.tinycolor=u}(tinycolor$1),tinycolor$1.exports);function __rest$1(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function __awaiter$3(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}const useStyles$2$3=makeStyles()((e,{titleColor:t,logo:n,activeColor:r},i)=>({appBar:{top:0,left:0,right:0,display:"flex",position:"fixed",boxShadow:"none",borderBottom:"0.5px solid "+e.palette.divider,["& ."+i.logo]:{cursor:"pointer","& img":{width:"100%",height:"100%",objectFit:"scale-down",userSelect:"none"}},backgroundColor:e.palette.background.default},menuButton:{display:"flex",justifyContent:"center",alignItems:"center",padding:"0",marginLeft:e.spacing(5)},margin:{marginRight:e.spacing(.4),display:"flex",alignItems:"center"},barIcon:{padding:e.spacing(.8)},iconButton:{padding:0},hamburgerIcon:{padding:e.spacing(1.4),width:32,height:32,WebkitMask:`url("${img$1A}") no-repeat 50% 50%`,backgroundColor:t},appLogo:{display:"inline-block",width:150,height:32,backgroundImage:`url("${n}")`,backgroundRepeat:"no-repeat",backgroundPosition:"left center"},title:{fontStyle:"normal !important",fontWeight:600,fontSize:"18px !important",lineHeight:"22px !important",letterSpacing:"0.225px !important",mixBlendMode:"normal",textTransform:"uppercase",color:t+" important",whiteSpace:"nowrap","&:hover":{cursor:"pointer"}},content:{height:"100%",flexGrow:1,display:"flex",flexWrap:"nowrap",flexDirection:"row",alignItems:"center",padding:e.spacing(0,3.2),"& > div":{display:"flex",flexWrap:"nowrap",flexDirection:"row"},["& ."+i.left]:{justifyContent:"flex-start"},["& ."+i.right]:{justifyContent:"flex-end"},["& ."+i.searchBarHolder]:{flexGrow:1},["& ."+i.appLogo]:{userSelect:"none"},["& ."+i.controllers]:{display:"flex",alignItems:"center"}},iconGroup:{display:"flex",justifyContent:"space-between",alignItems:"center"},iconGroupIcon:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},rightActionLabel:{fontWeight:400,fontSize:14,lineHeight:"16px",textDecoration:"none",color:"white",cursor:"pointer",display:"block"},noSelect:{userSelect:"none"},active:{opacity:1},smallOrgAvatar:{width:"30px !important",height:"30px !important",fontSize:"16px !important"},passive:{opacity:.8},icon:{width:"40px !important",height:"40px !important",padding:0,backgroundPosition:"center",backgroundRepeat:"no-repeat"},logo:{},left:{},right:{},searchBarHolder:{},controllers:{},appIcon:{height:"32px",width:"32px",borderRadius:"50%",marginLeft:e.spacing(4.4),"&:hover":{cursor:"pointer"}},applicationIcon:{WebkitMask:`url("${img$12}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},veritoneLogo:{WebkitMask:`url("${img$1z}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openPanel:{backgroundImage:`url("${img$1d}") !important`},notificationIcon:{WebkitMask:`url("${img$6}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},applicationSettingsIcon:{WebkitMask:`url("${img$1s}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},dashboardIcon:{WebkitMask:`url("${img$8}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openNotificationPanel:{backgroundImage:`url(${img$1c}) !important`},orgIcon:{borderRadius:"50%",width:30,height:30,backgroundRepeat:"no-repeat",backgroundPosition:"center"},logoIcon:{WebkitMask:`url("${n}") no-repeat 50% 50%`,backgroundColor:t},helpIcon:{WebkitMask:`url("${img$7}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openHelp:{backgroundImage:`url(${img$1b}) !important`},orgButton:{padding:e.spacing(2)},panelActive:{borderRadius:"50%",backgroundColor:r},notificationBadge:{"& > span":{top:e.spacing(2),right:e.spacing(2)}},appBarSkeleton:{position:"absolute",zIndex:1005,height:55},marginRightSkeleton:{marginRight:e.spacing(4)},leftContainerSkeleton:{display:"flex",alignItems:"center",paddingLeft:e.spacing(5)}})),useStyles$1$3=makeStyles()((e,t,n)=>({popover:{marginTop:18,["& "+n.helpItemText]:{padding:e.spacing(0),fontSize:15},["& "+n.versionWrapper]:{padding:e.spacing(3.2,0),["& "+n.versionText]:{fontSize:12,color:"#757575"}}},helpItemText:{},versionWrapper:{},versionText:{},help:{},barIcon:{padding:e.spacing(.8)},icon:{width:"40px !important",height:"40px !important",padding:e.spacing(0),backgroundPosition:"center",backgroundRepeat:"no-repeat"},helpIcon:{WebkitMask:`url("${img$7}") no-repeat 50% 50%`,backgroundColor:e.palette.background.default,"&:hover":{backgroundColor:e.palette.background.default}},list:{backgroundColor:e.palette.background.default},popoverColor:{backgroundColor:e.palette.background.default}})),Help=({onOpen:t,onClose:e,helpDocLink:n,helpDocCallback:r,supportCallback:i,displaySupportChat:o,displayChatWithSupport:a,desktopIconStyle:s})=>{var l=useStyles$1$3()["classes"];const[c,u]=react.exports.useState(null);const d=()=>{u(null),null!=e&&e()};var p=n||r,f=null==(f=window.config)?void 0:f.appVersion;return jsxRuntime.exports.jsxs("div",Object.assign({className:l.help},{children:[jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.KrqRIg",defaultMessage:"Help Center",description:"appbar tooltip: help-center button text"}),"aria-label":"help"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:l.barIcon,onClick:e=>{u(e.currentTarget),null!=t&&t()},"data-veritone-element":"help-button","data-testid":"help-button","aria-label":"help",size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(l.icon,l.helpIcon),style:s})}))})),jsxRuntime.exports.jsx(Popover$1,Object.assign({open:Boolean(c),anchorEl:c,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},onClose:d,className:l.popover,classes:{paper:l.popoverColor},disableScrollLock:!0},{children:jsxRuntime.exports.jsxs(List$2,Object.assign({disablePadding:!0,className:l.list},{children:[p&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{d(),null!=r&&r(),n&&window.open(n,"_blank")},"data-veritone-element":"show-help-doc-button","data-testid":"show-help-doc-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(AppBarArticleIcon,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.MSM3Vh",defaultMessage:"View Help Docs",description:"help tooltip: text for documentation"}),classes:{root:l.helpItemText}})]})),a&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{null!=i&&i(),sdkEventManager.dispatch(SdkEvents.openSupport),u(null)},"data-veritone-element":"open-chat-with-support-button","data-testid":"app-bar-show-chat-with-support-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(Chat,{fontSize:"small"})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-chat-with-support.MBM3Vh2",defaultMessage:"Chat with Support",description:"help tooltip: salesforce chat with support"}),classes:{root:l.helpItemText}})]})),o&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{null!=i&&i(),u(null)},"data-veritone-element":"open-support-chat-button","data-testid":"support-chat-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(AppBarInAppGuidance,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.8aLpuV",defaultMessage:"In-App Guidance",description:"help tooltip: text for documentation"}),classes:{root:l.helpItemText}})]})),f&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(ListItem$1,Object.assign({className:l.versionWrapper},{children:jsxRuntime.exports.jsx(ListItemText$1,{primary:f,classes:{primary:l.versionText}})}))]})]}))}))]}))},namespace$5="users",userSelector=e=>null==e?void 0:e.aiWareHeaderBar,rootSelector=e=>e,notificationStatusSelector=e=>null!=e&&e.osNotificationPanel?null==e?void 0:e.osNotificationPanel.status:"",useStyles$k=makeStyles()(e=>({title:{paddingTop:e.spacing(5.5)},contentText:{fontSize:14},dialogActions:{marginBottom:e.spacing(3),paddingRight:e.spacing(5)},signOutButton:{height:34,marginRight:e.spacing(1)},staySignedInButton:{height:34}})),LOGOUT_CALL_LIMIT=1;let logoutCallCounter=0;const RESET_IDLE_TIMER_CALL_LIMIT=1,MINUTES_BEFORE_SESSION_EXPIRATION=3;let timer;const SessionTimeout=e=>{const t=e["test"],n=useDispatch();e=useStyles$k().classes;const r=useSelector(isIdleSelector);var i=useSelector(userSelector$2);const o=useSelector(sessionTokenSelector),a=useSelector(loginUrlSelector),s=useSelector(callLogoutSelector),l=useSelector(clickedLogoutSelector),c=null==i?void 0:i.tokenExpiration,u=useSelector(callResetIdleTimerSelector);i=useSelector(sessionTimeoutSelector)||60;const d=useSelector(reloadPageSelector),p=useSelector(resetIdleTimerCallCounterSelector),[f,h]=react.exports.useState(t?5:60),[m,g]=react.exports.useState(new Date),[v,x]=react.exports.useState(),[y,b]=react.exports.useState(),[C,S]=react.exports.useState(!1),[w,E]=react.exports.useState(!1),_=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setIsIdle,value:e,ephemeral:!0,contentType:"json"}))},[n]),T=(react.exports.useEffect(()=>{n(getSessionTimeout(o))},[]),react.exports.useEffect(()=>{d&&window.location.replace("/")},[d]),react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setCallLogout,value:e,ephemeral:!0,contentType:"json"}))},[n])),j=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setClickedLogout,value:e,ephemeral:!0,contentType:"json"}))},[n]),R=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setCallResetIdleTimer,value:e,ephemeral:!0,contentType:"json"}))},[n]),I=react.exports.useCallback(()=>{logoutCallCounter++,T(!0);var e=l?500:5e3;n(logoutRequest({token:o})),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},t?2e3:e)},[T,n,o,a,l]);var O=react.exports.useCallback(()=>{logoutCallCounter++,_(!1),setTimeout(()=>{T(!0),j(!0),n(logoutRequest({token:o}))},500),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},500)},[T,n,o,a,j,_]);var A=()=>{_(!0),clearInterval(timer),timer=setInterval(()=>{h(e=>e-1)},1e3)},L=()=>{!r&&p<RESET_IDLE_TIMER_CALL_LIMIT&&R(!0)};const M=$(t?{timeout:5e3,onIdle:A,onAction:L,debounce:1e3,crossTab:!0,syncTimers:200}:{timeout:6e4*i,onIdle:A,onAction:L,debounce:i/4*6e4,crossTab:!0,syncTimers:200})["reset"],k=react.exports.useCallback(()=>{R(!1),M()},[R]),N=react.exports.useCallback(()=>{w&&(n(extendTokenRequest({token:o})),E(!1)),_(!1),k(),clearInterval(timer),setTimeout(()=>{h(t?5:60)},500)},[_,k,w,n,o]);return react.exports.useEffect(()=>{setTimeout(()=>{g(new Date)},1e3)},[m]),react.exports.useEffect(()=>{var e;c&&((e=new Date(c)).setMinutes(e.getMinutes()-MINUTES_BEFORE_SESSION_EXPIRATION),b(new Date(c)),x(e))},[c]),react.exports.useEffect(()=>{y&&y.getTime()<m.getTime()&&S(!0),v&&v.getTime()<m.getTime()&&E(!0)},[y,v,m]),react.exports.useEffect(()=>{C?I():w&&_(!0)},[y,v,w,C,I,_]),react.exports.useEffect(()=>{s&&logoutCallCounter<LOGOUT_CALL_LIMIT&&I()},[s,I]),react.exports.useEffect(()=>{r&&0===f&&(clearInterval(timer),setTimeout(()=>{h(10)},500),I())},[f,I,r]),react.exports.useEffect(()=>{!r&&u&&p===RESET_IDLE_TIMER_CALL_LIMIT&&k()},[u,r,p,k]),react.exports.useEffect(()=>{r||N()},[r,N]),jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:r&&!l,"aria-labelledby":"session timeout dialog","aria-describedby":"session timeout dialog",disableEscapeKeyDown:!0,maxWidth:"xs","data-test":"session-timeout-dialog"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"session timeout dialog title",className:e.title},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.JEUssf",defaultMessage:"Session Timeout",description:"label session timeout dialog"})})),jsxRuntime.exports.jsx(DialogContent$1,{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"session timeout dialog text",className:e.contentText},{children:s?l?null:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.l85HEz",defaultMessage:"You have been signed due to inactivity or due to your session being expired.",description:"signed out message"}):w?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.bDessH",defaultMessage:"Your session will expire soon. For your security, we'll automatically sign you out in {signOutTimer} seconds. Choose 'Stay Signed In' to continue or 'Sign Out' if you're done.",description:"label for idle warning expiring soon",values:{signOutTimer:f}}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.Ca6Qq0",defaultMessage:"You've been inactive for a while. For your security, we'll automatically sign you out in {signOutTimer} seconds. Choose 'Stay Signed In' to continue or 'Sign Out' if you're done.",description:"label for idle warning inactive for a while",values:{signOutTimer:f}})}))}),s?null:jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:e.dialogActions},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:O,color:"primary",variant:"outlined",className:e.signOutButton,"data-test":"sign-out-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.jN92ox",defaultMessage:"Sign Out",description:"label for sign out button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:N,color:"primary",variant:"contained",className:e.staySignedInButton,"data-test":"stay-signed-in-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.WvKhS2",defaultMessage:"Stay Signed In",description:"label for stay signed in button"})}))]}))]}))})})},appBarHeight=55,defaultAppBarZIndex=0,VERITONE_PANEL_ID="VERITONE_PANEL_ID",ORGANIZATION_PANEL_ID="ORGANIZATION_PANEL_ID",NOTIFICATION_PANEL_ID="NOTIFICATION_PANEL_ID",APPLICATION_PANEL_ID="APPLICATION_PANEL_ID",HELP_PANEL_ID="HELP_PANEL_ID",USER_APPLICATION_SETTINGS_PANEL="USER_APPLICATION_SETTINGS_PANEL",NOTIFICATION_BADGE_MAX_COUNT=20,getUserInfo=({appIcon:e="",currentUser:t})=>({appIcon:e,currentUser:null!=t&&t.organization?t:void 0});function NewAppBar({isEnableOrgPanel:e,zIndex:t=defaultAppBarZIndex,leftNav:n,onClickAppbarMenu:r,logoSrc:i,backgroundColor:o="rgb(32.9, 43.1, 47.8)",iconColor:a,title:s,help:l,notification:c=!0,userApplicationSettingsIcon:u,onClickOrgIcon:d,closeButton:p,onCloseSetting:f,onClose:h,onOpenSetting:m,onOpenHelpCenter:g,onOpenNotification:v,onOpenUserApplicationSettings:x,openSetting:y,organization:b={},panels:C=[],unseenCount:$,searchBarMountId:S,textColor:w,rightActions:E=[],applications:_=[],onClickAppSwitchIcon:T,displaySupportChat:j=!0,onDashboardClick:R,showDashboardIcon:I=!1,displayChatWithSupport:O=!0,disableGoHome:A}){var L=tinycolor(o).isDark(),w=w||(L?"#fff":"#000"),L=L?"rgba(255,255,255,0.1)":"rgb(243,245,249)";const M=useStyles$2$3({titleColor:w,logo:i,activeColor:L})["classes"],[k,N]=react.exports.useState([]);L=useSelector(userSelector)||{};const[P,D]=react.exports.useState(!0);var{appIcon:L,currentUser:F}=getUserInfo(L),V=useSelector(betaFeaturesSelector);react.exports.useEffect(()=>("true"===localStorage.getItem("DEBUG")&&console.log("AppBar mounted"),()=>{"true"===localStorage.getItem("DEBUG")&&console.log("AppBar unmounted")}),[]),react.exports.useEffect(()=>{var e=C.map(e=>e.panelId);!e.length&&!k.length||isEqual$3(e,k)||N(e)},[C,k]);a={background:a||void 0};return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SessionTimeout,{}),jsxRuntime.exports.jsx("div",{style:{height:appBarHeight}}),jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"appbar",className:M.appBar,style:{height:appBarHeight,background:o,zIndex:t}},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:M.menuButton},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-menu","data-testid":"app-bar-menu",className:M.iconButton,onClick:r,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.hamburgerIcon)})}))})),!!L&&""!==L&&jsxRuntime.exports.jsx("div",Object.assign({className:M.margin},{children:jsxRuntime.exports.jsx("img",{className:M.appIcon,src:L,alt:"appIcon"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:M.content,style:{color:w}},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.left,M.noSelect),onClick:A?void 0:function(){window.location.href="/"},"data-test":"appbarTitle","data-testid":"appbarTitle"},{children:i?jsxRuntime.exports.jsx("span",{className:M.appLogo}):jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:M.title},{children:s}))})),jsxRuntime.exports.jsx("div",{"data-test":"appbarSearch",id:S||"search-bar-id",className:M.searchBarHolder}),jsxRuntime.exports.jsx("div",Object.assign({className:M.right},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:M.controllers},{children:[0<E.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.iconGroup,M.noSelect)},{children:E.map(({label:e,onClick:t,isActive:n=!0},r)=>jsxRuntime.exports.jsx("div",Object.assign({className:M.iconGroupIcon},{children:jsxRuntime.exports.jsx("span",{onClick:e=>t?t(e):null,className:classNames(M.rightActionLabel,n?M.active:M.passive),dangerouslySetInnerHTML:{__html:e}})}),"label-"+r))})),I&&jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.dashboard-button",defaultMessage:"aiWARE Dashboard",description:"aiWARE Dashboard label"}),"aria-label":"dashboard"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-dashboard-button",className:M.barIcon,onClick:R,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.dashboardIcon),style:a})}))})),l&&jsxRuntime.exports.jsx("div",Object.assign({"data-test":"app-bar-help-container","data-testid":"app-bar-help-container",className:classNames(M.margin,{[M.panelActive]:k.includes(HELP_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Help,{tooltipTitle:"",helpDocLabel:"View Help Docs",chatWithSupportLabel:"Chat with Support",supportLabel:"In-App Guidance",helpDocCallback:()=>{null!=g&&g()},supportCallback:f,titleColor:w,displaySupportChat:j,displayChatWithSupport:O,desktopIconStyle:a})})),c&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.margin,{[M.panelActive]:k.includes(NOTIFICATION_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.KFXxNr",defaultMessage:"Notifications",description:"appbar tooltip: notification button text"}),"aria-label":"notifications"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:M.barIcon,onClick:v,"data-test":"app-bar-notification-button",size:"large","data-testid":"app-bar-notification-button"},{children:jsxRuntime.exports.jsx(Badge$1,Object.assign({badgeContent:$,max:NOTIFICATION_BADGE_MAX_COUNT,color:"primary","data-test":"app-bar-notification-badge",className:M.notificationBadge},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.notificationIcon,{[M.openNotificationPanel]:null==y?void 0:y.openNotificationPanel}),style:a})}))}))}))})),V&&u&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.margin,{[M.panelActive]:k.includes(USER_APPLICATION_SETTINGS_PANEL)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.application-settings-button",defaultMessage:"Application Settings",description:"appbar tooltip: application settings button text"}),"aria-label":"application-settings"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:M.barIcon,onClick:x,size:"large","data-testid":"app-bar-user-application-settings-button"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.applicationSettingsIcon)})}))}))})),1<_.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames({[M.panelActive]:k.includes(APPLICATION_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.3v499g",defaultMessage:"Applications",description:"applications tooltip: text for applications button"}),"aria-label":"applications"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-switch-app-button",className:M.barIcon,onClick:T,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.applicationIcon,{[M.openPanel]:null==y?void 0:y.openAppSwitchPanel}),style:a})}))}))})),(b.imageUrl||b.name)&&e&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.margin,{[M.panelActive]:k.includes(ORGANIZATION_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.7qOwBg",defaultMessage:"Organization",description:"organization tooltip: text for documentation"}),"aria-label":"organization"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-org-button",className:M.barIcon+" "+M.orgButton,onClick:d,size:"large"},{children:b.imageUrl&&P?jsxRuntime.exports.jsx("img",{src:b.imageUrl,className:classNames(M.orgIcon),onError:function(){D(!1)},alt:"org_icon"}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:M.smallOrgAvatar,variant:"circular","data-testid":"app-bar-avatar"},{children:getSortName(b.name||"")}))}))}))})),F&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames({[M.panelActive]:k.includes(VERITONE_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.eOxvvM",defaultMessage:"Utilities",description:"utilities tooltip: text for documentation"}),"aria-label":"utilities"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-setting-button","data-testid":"app-bar-setting-button",className:M.barIcon,onClick:m,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.veritoneLogo,{[M.openPanel]:null==y?void 0:y.openVeritonePanel}),style:a})}))}))})),p&&h&&jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("div",Object.assign({style:{marginLeft:"auto"}},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:h,"data-test":"app-bar-close-button",size:"large","data-testid":"app-bar-close-button"},{children:jsxRuntime.exports.jsx(default_1$6,{htmlColor:w})}))}))})]}))}))]}))]}))]})}const GET_CURRENT_USER=`os-app-bar/${namespace$5}/get current user`,GET_CURRENT_USER_SUCCESS=`os-app-bar/${namespace$5}/get current user success`,GET_CURRENT_USER_FAIL=`os-app-bar/${namespace$5}/get current user fail`,GET_CURRENT_APP_ICON=`os-app-bar/${namespace$5}/get current app icon`,GET_CURRENT_APP_ICON_SUCCESS=`os-app-bar/${namespace$5}/get app icon success`,getCurrentUser=()=>({type:GET_CURRENT_USER}),getCurrentUserFail=()=>({type:GET_CURRENT_USER_FAIL}),getCurrentUserSuccess=e=>({type:GET_CURRENT_USER_SUCCESS,payload:e}),getCurrentAppIcon=({applicationId:e})=>({type:GET_CURRENT_APP_ICON,payload:{applicationId:e}}),getCurrentAppIconSuccess=e=>({type:GET_CURRENT_APP_ICON_SUCCESS,payload:e}),initialState$5={currentUser:{},fetched:!1,fetching:!1,error:!1};function userReducer(e,t){if(void 0===e)return initialState$5;switch(t.type){case GET_CURRENT_USER_FAIL:return Object.assign(Object.assign({},e),{fetching:!1,fetched:!0,error:!0});case GET_CURRENT_USER_SUCCESS:return Object.assign(Object.assign({},e),{currentUser:t.payload,fetching:!1,fetched:!0,error:!1});case GET_CURRENT_APP_ICON_SUCCESS:return Object.assign(Object.assign({},e),{appIcon:t.payload});default:return e}}const nameSpace$1="aiWareHeaderBar",BOOTING="APP_BAR/booting",BOOTED="APP_BAR/booted",onBooted=()=>({type:BOOTED}),getApplicationInfo=(t,n,r)=>__awaiter$3(void 0,void 0,void 0,function*(){var e=`
|
|
1435
|
+
`,operationName:e,token:n,graphQLEndpoint:r}))[t])?void 0:e.id}),selectUserAppGroups=e=>{return(null==(e=e[namespace$3$1])?void 0:e.appGroups)||[]},selectUserAppGroupsRootFolderId=e=>{return(null==(e=e[namespace$3$1])?void 0:e.appGroupsRootFolderId)||""},selectUserAppGroupsUiStatus=e=>{return null==(e=e[namespace$3$1])?void 0:e.uiStatus},selectAppGroupsEditMode=e=>{return!!((null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.appGroups)||[]).find(e=>e.isEdited)};function*fetchUserGroupsSaga(){var t,n,r,i;try{var o=yield select(graphEndpointSelector),a=yield select(sessionTokenSelector);let e=yield select(selectUserAppGroupsRootFolderId);if(!e){var s=yield call$i(fetchUserAppGroupsRootFolderIdApi,a,o);if(!s||s.length<2||null==(t=s[1])||!t.id)return yield put(fetchUserAppGroupsFailed()),void console.log("Something went wrong while creating root folder for applications");e=null==(n=s[1])?void 0:n.id}var l=yield call$i(fetchUserAppGroupsApi,a,o,e),c=(null==(i=null==(r=null==l?void 0:l.childFolders)?void 0:r.records)?void 0:i.map(e=>{var t;return{groupName:e.name,id:e.id,treeObjectId:e.treeObjectId,apps:null==(t=null==e?void 0:e.childApplications)?void 0:t.records.map(e=>e.id),priority:null==e?void 0:e.orderIndex,parentTreeObjectId:null==(t=null==e?void 0:e.parent)?void 0:t.treeObjectId,isNew:!1,expanded:!1,isEdited:!1,isExpanded:!0}}))||[];c.sort((e,t)=>(null==e?void 0:e.priority)-(null==t?void 0:t.priority)),yield put(fetchUserAppGroupsRootFolderIdSuccess(e)),yield put(fetchUserAppGroupSuccess(c))}catch(e){yield put(fetchUserAppGroupsFailed()),console.log("Something went wrong while creating root folder for applications",e)}}function*createNewAppGroupStartSaga(e){yield select(preferredLanguageSelector);try{const o=yield select(graphEndpointSelector),a=yield select(sessionTokenSelector);var t=yield select(selectUserAppGroupsRootFolderId),n=e.payload,r=(yield select(selectUserAppGroups)).find(e=>!0===e.isNew),i=(null==r?void 0:r.apps)||[];const s=yield call$i(createUserGroupApi,a,o,n,t);s&&0<i.length&&(yield all(i.map(e=>call$i(addAppToUserGroupApi,a,o,e,s)))),yield put(fetchUserAppGroupsStart())}catch(e){console.log("Something went wrong while creating application group",e),yield put(showMessage({content:"Something went wrong while creating your application group",severity:MessageSeverity.Error}))}}function*addAppToGroupSaga(e){yield select(preferredLanguageSelector);try{var t,n,r=e.payload.destination,i=e.payload.appId;validate(r)&&validate(i)&&(t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),yield call$i(addAppToUserGroupApi,n,t,i,r))}catch(e){console.log("Something went wrong while adding app to application group",e),yield put(showMessage({content:"Something went wrong while adding application to group",severity:MessageSeverity.Error}))}}function*removeAppFromGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.source,n=e.payload.appId,r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);yield call$i(removeAppFromGroupApi,i,r,n,t)}catch(e){console.log("Something went wrong while removing application from group",e),yield put(showMessage({content:"Something went wrong while removing application from group",severity:MessageSeverity.Error}))}}function*deleteAppGroupSaga(e){yield select(preferredLanguageSelector);try{const i=e.payload;var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),r=(yield select(selectUserAppGroups)||[]).find(e=>e.id===i);r&&r.treeObjectId&&(yield call$i(deleteAppGroupApi,n,t,r.treeObjectId,r.priority),yield put(fetchUserAppGroupsStart()))}catch(e){console.log("Something went wrong while deleting application group",e),yield put(showMessage({content:"Something went wrong while deleting application group",severity:MessageSeverity.Error}))}}function*editAppGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.groupId,n=e.payload.newGroupName,r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);t&&n&&(yield call$i(editAppGroupApi,i,r,t,n))}catch(e){console.log("Something went wrong while editing application group",e),yield put(showMessage({content:"Something went wrong while editing application group",severity:MessageSeverity.Error}))}}function*updateGroupPrioritySaga(e){yield select(preferredLanguageSelector);try{const s=e.payload.groupId;var t=e.payload.newPriority,n=e.payload.prevPriority,r=yield select(selectUserAppGroups)||[],i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=r.find(e=>e.id===s);a&&void 0!==t&&void 0!==n&&(yield call$i(updateGroupPriorityApi,o,i,t,n,a))}catch(e){console.log("Something went wrong while updating application group order",e),yield put(showMessage({content:"Something went wrong while updating application group order",severity:MessageSeverity.Error}))}}function*rootSaga$1$1(){yield all([takeLatest$1(fetchUserAppGroupsStart.type,fetchUserGroupsSaga),takeLatest$1(createNewAppGroupStart.type,createNewAppGroupStartSaga),takeLatest$1(addAppToGroup.type,addAppToGroupSaga),takeLatest$1(removeAppFromGroup.type,removeAppFromGroupSaga),takeLatest$1(deleteAppGroup.type,deleteAppGroupSaga),takeLatest$1(editAppGroup.type,editAppGroupSaga),takeLatest$1(updateGroupPriority.type,updateGroupPrioritySaga)])}function getAppGroupModule(){return{id:"user-app-group",reducerMap:{[namespace$3$1]:appGroupReducer},sagas:[rootSaga$1$1],initialActions:[]}}const styles={title:{my:2},content:{minWidth:360,px:0,pt:3,pb:0},button:{fontSize:"12px"},actions:{px:4,pt:4,pb:2},cancelButton:{color:"black",py:2},deleteButton:{py:2}},iconMapper={CMS:img$Z,Discovery:img$Y,Collection:img$X,Library:img$W,Admin:img$1x,Developer:img$V};function AppIcon({id:t,icon:e,type:n,iconUrl:r,appName:i,onClick:o,appListV2:a=!1,isAppGroup:s,appGroupId:l}){a=useStyles$d$1({appListV2:a,type:n}).classes;const[c,u]=react.exports.useState(e||r||i&&iconMapper[i]||img$V),[d,p]=react.exports.useState(!1);const[f,h]=react.exports.useState(null);e=Boolean(f);const m=useDispatch();const g=e=>{e.stopPropagation(),h(null),p(!1)};return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:i||"",PopperProps:{disablePortal:!0}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:function(){o&&o(t)},className:classNames({[a.iconButton]:"grid"===n,[a.listItem]:"list"===n,[a.switcherGrid]:"switcherGrid"===n}),"data-test":"dt-button-app-icon","data-testid":"dt-button-app-icon",onContextMenu:s?e=>{e.preventDefault(),h(e.currentTarget)}:void 0},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.image},{children:jsxRuntime.exports.jsx("img",{alt:"app-icon",onError:function(){u(img$V)},src:c,draggable:"false",className:a.img})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:a.appName,"data-testid":"os-app-bar-panel.app-switcher.app-name"},{children:i})),jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"basic-menu",anchorEl:f,open:e,onClose:g,MenuListProps:{"aria-labelledby":"basic-button"},sx:{transform:"translate(60px, -60px)"}},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({sx:{display:"none"},onClick:e=>{e.stopPropagation(),mountPanel$1({panelId:"APPLICATION_DETAILS_PANEL",microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{applicationId:t}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}),g(e)},"data-testid":`os-app-bar-panel.app-switcher.options-app-detail.${l}.`+t},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.application-details",defaultMessage:"Application Details",description:"Dropdown menu item that opens application details panel"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:e=>{e.stopPropagation(),h(null),p(!0)},"data-testid":`os-app-bar-panel.app-switcher.options-remove-app.${l}.`+t},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.remove-from-group",defaultMessage:"Remove from Group",description:"Dropdown menu item that removes application from group"})}))]})),jsxRuntime.exports.jsx(Dialog$1,Object.assign({open:d,maxWidth:"xs",onClose:g,"data-testid":"os-app-bar-panel.delete-app-from-group.confirmation-dialog"},{children:jsxRuntime.exports.jsxs(DialogTitle$1,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.dialogTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirmation-title",defaultMessage:"Delete Application",description:"Delete App from Group confirmation title"})})),jsxRuntime.exports.jsxs(DialogContent$1,Object.assign({sx:styles.content},{children:[jsxRuntime.exports.jsx(DialogContentText$1,{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirmation-message",defaultMessage:"Are you sure you want to delete this application from the group?",description:"Delete Ap from Group confirmation message"})}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({sx:styles.actions},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({sx:styles.cancelButton,onClick:g,"data-testid":"app-switcher.delete-app.cancel-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.cancel-button",defaultMessage:"Cancel",description:"Delete App from Group cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained",sx:styles.deleteButton,onClick:e=>{e.stopPropagation(),m(removeAppFromGroup({source:l,appId:t.toString()})),g(e)},"data-testid":"app-switcher.delete-app.confirm-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirm-button",defaultMessage:"Yes, Delete",description:"Delete App from Group confirmation button"})}))]}))]}))]})}))]}))}))}const useStyles$c$1=makeStyles()((e,{sortOrder:t,hasApps:n,menuIsOpen:r})=>({root:{},header:{height:"60px",position:"sticky"},groupContainer:{padding:"0 15px"},title:{fontWeight:700,padding:"15px"},groupTitle:{background:"#F9F9F9",paddingLeft:"5px",position:"relative",height:"16px","& .Sdk-MuiTypography-root":{fontSize:"10px",fontWeight:700,lineHeight:"10px",position:"absolute",margin:"3px"}},filterIcon:{display:"flex",flexDirection:"column",justifyContent:"center","& svg":{transform:"asc"===t?"scaleY(-1)":"scaleY(1)",cursor:n?"pointer":"not-allowed"}},filterIconWrapper:{width:"24px",height:"24px",borderRadius:"24px",background:r?"rgba(228, 240, 252, 0.8)":"unset","& path":{fill:r?"#0C53B0":"#555F7C"},"&:hover":{background:"rgba(228, 240, 252, 0.8)","& path":{fill:"#0C53B0"}}},searchBox:{display:"flex",flexDirection:"column",justifyContent:"center","& .Sdk-MuiButtonBase-root":{padding:0},"& svg":{width:"14px"},"& input":{"&::placeholder":{color:"#5C6269 !important",fontWeight:600,opacity:1}}},searchField:{borderRadius:"1em",height:"30px"},searchOutline:{borderColor:"#D5DFE9"},searchInput:{fontSize:"11px","&::placeholder":{color:"#5C6269 !important"}},sortMenu:{width:"143px"},airborne:{position:"absolute",background:"rgba(26, 140, 255, 0.9)",transform:"rotate(3.02deg)",color:"white","& *":{fontWeight:"900 !important"},"& img":{background:"white",borderRadius:"50%"}},applicationList:{overflow:"hidden",height:"calc(100vh - 64px - 55px - 60px - 5px)",overflowY:"scroll"}})),SHARED_TEXT$1={buttonLink:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.aaaaa1",defaultMessage:"Link",description:"label of link open id connector button on profile panel"}),buttonUnlink:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.L4gr2p",defaultMessage:"Unlink",description:"label of unlink open id connector button on profile panel"}),basicInfoTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.lpZXMT",defaultMessage:"Basic Info",description:"Personal Profile: Basic info name, email etc"}),accountLinkingTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.AgbO9g",defaultMessage:"Account Linking",description:"Personal Profile: Open ID Connector Account Linking"}),settingsTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.oYYEos",defaultMessage:"Settings",description:"Profile Settings"}),accountLinkingLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.JxMDBr",defaultMessage:"Link your Account",description:"label of manage basic infomation container"}),accountLinkingDescription:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.77MHtz",defaultMessage:"View your accounts from other identify providers that are linked with this account.",description:"description of manage account linking"}),unlinkDialogTitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.naysir",defaultMessage:"Unlink this Identity Provider?",description:"title for unlink identity provider"}),unlinkDialogContent:e=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dwZfY7",defaultMessage:"Are you sure you want to unlink {name} from your account?",description:"content for unlink identity provider",values:{name:e||""}}),unlinkDialogCancel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.SNjPPT",defaultMessage:"Cancel",description:"cancel for unlink identity provider"}),unlinkDialogConfirm:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.KJyVd9",defaultMessage:"Yes, Unlink",description:"confirm for unlink identity provider"}),successDialogTitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZaKL3e",defaultMessage:"Account Successfully linked!",description:"title for success identity provider"}),successDialogContent:e=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IP+fpM",defaultMessage:"You can now log into this account using {name}.",description:"content for success identity provider",values:{name:e||""}}),successDialogConfirm:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.1DTtvD",defaultMessage:"Okay",description:"confirm for success identity provider"}),nullState:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.u6gP99",defaultMessage:"Your account currently has no available account linking options",description:"account linking null state"}),errorState:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.KG2JIz",defaultMessage:"There was an error while loading the available account linking options",description:"account linking error state"}),retry:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IYUdD6",defaultMessage:"Retry",description:"account linking retry"}),settingsHeader:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IIE3bM",defaultMessage:"Application Preferences",description:"account settings header"}),settingsSubHeader:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.9xcAYc",defaultMessage:"Manage the settings of aiWARE services and applications.",description:"account settings sub header"})},translatableTextProps=e=>({searchLabel:e.formatMessage({id:"os-app-bar-panel.search.label",defaultMessage:[{type:0,value:"Search"}]})});function AppListDnD({intl:e,selectedAppId:t,onSelectApplication:n,applications:r=[],showAppGroups:i=!1}){const[o,a]=react.exports.useState(t),[s,l]=react.exports.useState({}),[c,u]=react.exports.useState(""),[d,p]=react.exports.useState("asc");var f=0!==r.length;function h(e){a(e),n(e)}function m(e,t){return e.name.toLowerCase()>t.name.toLowerCase()?1:e.name.toLowerCase()<t.name.toLowerCase()?-1:0}react.exports.useEffect(()=>{if(0<r.length){var e={};for(const n of[...r].sort(m)){var t=n.name.charAt(0).toUpperCase();e[t]=e[t]?[...e[t],n]:[n]}l(e)}},[r]),react.exports.useEffect(()=>{t!==o&&a(t)},[t,o]);e=translatableTextProps(e).searchLabel;const[g,v]=react.exports.useState(null);var x=Boolean(g);const y=e=>{if(e!==d){p(e);e=Object.keys(s).reverse();const t={};e.forEach(e=>t[e]=s[e].reverse()),l(t)}v(null)},b=useStyles$c$1({sortOrder:d,hasApps:f,menuIsOpen:x})["classes"];f=jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"app-switcher.sort-menu",anchorEl:g,open:x,onClose:y},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>y("asc"),className:b.sortMenu},{children:"A - Z"})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>y("desc"),className:b.sortMenu},{children:"Z - A"}))]}));const C=(e,t,n)=>jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===o,onClick:h,iconUrl:t,id:e,appName:n,appListV2:!0});return jsxRuntime.exports.jsxs("div",Object.assign({className:b.root,"data-testid":"os-app-bar-panel.app-switcher.applications-container"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:b.header},{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,spacing:2},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:5},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:b.title},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.applications-title",defaultMessage:"Applications",description:"Applications list title"})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:5,className:b.searchBox},{children:jsxRuntime.exports.jsx(TextField$1,{"data-testid":"os-app-bar-panel.app-switcher.search",onChange:e=>{u(e.target.value)},placeholder:e,InputProps:{classes:{root:b.searchField,input:b.searchInput,notchedOutline:b.searchOutline},startAdornment:jsxRuntime.exports.jsx(InputAdornment$1,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(IconButton$1,{children:jsxRuntime.exports.jsx(default_1$8,{})})}))}})})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:2,className:b.filterIcon},{children:[jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.sort-btn",defaultMessage:"Sort",description:"Application sort button"})},{children:jsxRuntime.exports.jsx("div",Object.assign({className:b.filterIconWrapper,onClick:e=>{r.length&&v(e.currentTarget)}},{children:jsxRuntime.exports.jsx("div",Object.assign({className:b.filterIcon},{children:jsxRuntime.exports.jsx(SortArrow,{"data-testid":"os-app-bar-panel.app-switcher.sort"})}))}))})),f]}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:b.applicationList},{children:0===r.length?jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dyhBih",defaultMessage:"No Applications",description:"the label no app will show if we have no application for list view"})}))}):jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"app-list"},{children:e=>jsxRuntime.exports.jsx("div",Object.assign({className:b.groupContainer},e.droppableProps,{ref:e.innerRef},{children:0<Object.keys(s).length&&Object.entries(s).map(([e,t])=>t.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())).length?jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("div",Object.assign({className:b.groupTitle,"data-testid":"os-app-bar-panel.app-switcher.group-title"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"overline"},{children:e}))})),t.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())).map((e,t)=>{const{id:l=t,iconUrl:c,name:u}=e;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"os-app-bar-panel.app-switcher.app-row"},{children:[i?jsxRuntime.exports.jsx(PublicDraggable,Object.assign({draggableId:l.toString(),index:t},{children:(a,s)=>jsxRuntime.exports.jsx(NaturalDragAnimation,Object.assign({style:a.draggableProps.style,snapshot:s},{children:e=>{return t=a,n=s,e=e,r=l,i=c,o=u,jsxRuntime.exports.jsx("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef,className:n.isDragging?b.airborne:"",style:e},{children:C(r,i,o)}));var t,n,r,i,o}}))}),t):C(l,c,u),jsxRuntime.exports.jsx(Divider$1,{})]}),l)})]},e):null)}))}))}))]}))}var AppListDnD$1=injectIntl(AppListDnD);const useStyles$b$1=makeStyles()(e=>({tabsBox:{height:"100%"},fullHeight:{height:"100%"},listContainer:{overflow:"hidden",height:"calc(100vh - 64px - 55px - 5px)",overflowY:"scroll"},skeletonContainer:{position:"absolute",width:"100%",height:"100%",zIndex:5,backgroundColor:"white"}})),useStyles$a$1=makeStyles()(e=>({root:{height:"calc(100vh - 64px - 55px - 5px)",overflowY:"scroll",borderRight:"15px solid #F9F9F9",boxShadow:"0px 1px 1px #809cb7","&::-webkit-scrollbar":{display:"none"}},appTile:{overflow:"hidden"},title:{fontWeight:700,padding:"15px 15px 0 15px"},groupTitle:{fontWeight:700,padding:"15px"},helperText:{paddingLeft:"15px",fontSize:"12px",fontWeight:"bold"},noApps:{textAlign:"center",marginTop:"30px","& svg":{width:"160px",height:"160px",marginBottom:"20px"},marginBottom:"20px"},appGroup:{borderTop:"1px solid #D5DFE9"},currentLanding:{position:"relative",minHeight:"155px !important"},idleLanding:{minHeight:"10px"},runway:{minHeight:"110px",position:"absolute",background:"rgba(255, 255, 255, 0.8)",width:"94%",height:"100%",border:"1px dashed #CAD7E3",borderRadius:"4px",display:"flex",textAlign:"center",flexDirection:"column",justifyContent:"center"},landingText:{fontSize:"16px !important",fontWeight:"600 !important",color:"rgba(124, 132, 141, 1)"},airborneGroup:{height:"50px !important",background:"rgba(26, 140, 255, 0.9)",color:"white","& div":{display:"none"}},groupHandler:{display:"flex",justifyContent:"space-between","&:hover":{background:"rgba(242, 242, 242, 0.5)"}}})),useStyles$9$1=makeStyles()(()=>({root:{padding:"15px"},groupNameInput:{height:"36px","& input":{width:"100% !important",height:"36px",padding:"0 0 0 15px",color:"rgba(92, 98, 105, 1)",borderRadius:"4px",border:"none"},marginBottom:"10px",width:"100% !important",background:"#F5FDFF"},notInterested:{height:"18px","& svg":{height:"18px",cursor:"pointer"}},confirm:{height:"20px",cursor:"pointer"},newGroupApps:{marginBottom:"20px",display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center",height:"101px",background:"#FAFAFA",borderRadius:"4px"},landingText:{color:"rgba(156, 168, 180, 1)"},relativeContainer:{position:"relative"},fullWidthRunway:{top:0,width:"100%"}})),AppGroupPlaceholder=({apps:n,classes:r})=>{useSelector(preferredLanguageSelector);const i=useStyles$9$1()["classes"],e=useDispatch(),[t,o]=react.exports.useState("");return jsxRuntime.exports.jsxs("div",Object.assign({className:i.root},{children:[jsxRuntime.exports.jsx(TextField$1,{value:t,onChange:e=>{o(e.target.value)},"data-testid":"os-app-bar.new-app-group.name-input-container",className:i.groupNameInput,InputProps:{endAdornment:jsxRuntime.exports.jsxs(InputAdornment$1,Object.assign({position:"end"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:i.confirm,onClick:()=>{t?e(createNewAppGroupStart(t)):e(showMessage({content:"Please provide a name for your new App group",severity:MessageSeverity.Error}))},"data-testid":"os-app-bar.new-app-group.save-btn"},{children:jsxRuntime.exports.jsx(Checkmark,{})})),jsxRuntime.exports.jsx("div",Object.assign({className:i.notInterested,onClick:()=>{e(removeNewAppGroupPlaceholder())},"data-testid":"os-app-bar.new-app-group.cancel-btn"},{children:jsxRuntime.exports.jsx(NotInterested,{})}))]}))},inputProps:{"data-testid":"os-app-bar.new-app-group.name-input"}}),jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"new-group-placeholder"},{children:(e,t)=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:i.relativeContainer,style:{width:"100%"}},{children:[n.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{position:"relative",marginBottom:"15px"}},{children:n.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,sx:{padding:0,overflow:"hidden"},"data-testid":"app-switcher.new-app-group.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:!1,onClick:()=>{},iconUrl:t,id:e,appName:n,appListV2:!0})}),e)})})):jsxRuntime.exports.jsx("div",Object.assign({className:i.newGroupApps},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.landingText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.new-app-group.apps-landing",defaultMessage:"Drag Applications Here",description:"helper text to tell users where to drag apps for the new app group"})}))})),t.isDraggingOver&&n.length?jsxRuntime.exports.jsx(Runway,{classes:r,rootClassName:i.fullWidthRunway}):null]}))}))]}))},GroupDraggingPlaceholder=({isDragging:e,className:t,groupName:n,dragHandleProps:r})=>e?jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:t},r,{children:n})):null,useStyles$8$1=makeStyles()(()=>({root:{padding:"15px"},groupNameInput:{height:"36px","& input":{width:"100% !important",height:"36px",padding:"0 0 0 15px",color:"rgba(92, 98, 105, 1)",borderRadius:"4px",border:"none"},marginBottom:"10px",width:"100% !important",background:"#F5FDFF"},notInterested:{height:"18px",cursor:"pointer"},confirm:{cursor:"pointer"},groupHandler:{display:"flex",justifyContent:"space-between",alignItems:"center","&:hover":{background:"rgba(242, 242, 242, 0.5)"}},invisibleHandler:{display:"none"},groupTitle:{fontWeight:700,padding:"15px"},handlerMenu:{height:"40px",width:"40px",marginRight:"10px"}})),GroupHandler=({dragHandleProps:e,groupName:t,groupId:n,isExpanded:r=!0})=>{const i=useSelector(selectAppGroupsEditMode),o=useDispatch(),[a,s]=react.exports.useState(!1),[l,c]=react.exports.useState(""),[u,d]=react.exports.useState(null);var p=Boolean(u);const f=()=>{d(null)};var h=useStyles$8$1()["classes"];react.exports.useEffect(()=>{c(t)},[]);const m=()=>{o(editAppGroup({edit:!0,groupId:n})),s(!0)};return jsxRuntime.exports.jsx("div",Object.assign({className:a?h.root:h.groupHandler},{children:a?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(TextField$1,{value:l,onChange:e=>{c(e.target.value)},"data-testid":`os-app-bar.app-group.${n}.name-input-container`,className:h.groupNameInput,InputProps:{endAdornment:jsxRuntime.exports.jsxs(InputAdornment$1,Object.assign({position:"end"},{children:[jsxRuntime.exports.jsx(Checkmark,{className:h.confirm,onClick:()=>{f(),o(editAppGroup({edit:!1,groupId:n,newGroupName:l})),s(!1)},"data-testid":`os-app-bar.app-group.${n}.save-btn`}),jsxRuntime.exports.jsx(NotInterested,{className:h.notInterested,onClick:()=>{f(),o(editAppGroup({edit:!1,groupId:n})),s(!1)},"data-testid":`os-app-bar.app-group.${n}.cancel-btn`})]}))},inputProps:{"data-testid":`os-app-bar.app-group.${n}.name-input`}}),jsxRuntime.exports.jsx("div",Object.assign({},e))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:h.groupTitle},e,{onClick:e=>{2!==e.detail||i||m()},"data-testid":"os-app-bar-panel.app-switcher.group-name."+n},{children:t})),jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:e=>{e.preventDefault(),d(e.currentTarget)},size:"small",className:h.handlerMenu,"data-testid":"os-app-bar-panel.app-switcher.options-btn."+n},{children:jsxRuntime.exports.jsx(MoreHor,{fontSize:"small"})})),jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"basic-menu",anchorEl:u,open:p,onClose:f,MenuListProps:{"aria-labelledby":"basic-button"},sx:{transform:"translate(-95px, 0)"}},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>{f(),setTimeout(()=>{o(expandCollapse(n))},100)},"data-testid":"os-app-bar-panel.app-switcher.options-toggle."+n},{children:r?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.hide",defaultMessage:"Hide Group",description:"Hide Group dropdown menu item"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.expand",defaultMessage:"Expand",description:"Expand dropdown menu item"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:m,"data-testid":"os-app-bar-panel.app-switcher.options-rename."+n},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.rename",defaultMessage:"Rename",description:"Rename dropdown menu item"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>{o(deleteAppGroup(n))},"data-testid":"os-app-bar-panel.app-switcher.options-delete."+n},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.delete",defaultMessage:"Delete",description:"Delete dropdown menu item"})}))]}))]})}))},GroupApps=({groupApps:e,appGroup:r,classes:i,snapshot:t,handleSelectApplication:o,currentSelected:a})=>jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px"},"data-testid":"app-switcher.app-group."+r.id},{children:[t.isDraggingOver?jsxRuntime.exports.jsx(Runway,{classes:i}):null,e.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,className:i.appTile,sx:{padding:0},"data-testid":"app-switcher.app-group.app-tile."+e},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:e===a,onClick:o,iconUrl:t,id:e,appName:n,appListV2:!0,isAppGroup:!0,appGroupId:r.id})}),e)})]})),LoadingSkeleton=()=>jsxRuntime.exports.jsx(react.exports.Fragment,{children:[1,2].map(e=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:345,height:50}),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px"}},{children:[1,2,3].map(e=>jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,sx:{padding:0}},{children:jsxRuntime.exports.jsxs(Stack$4,Object.assign({sx:{justifyContent:"center",alignItems:"center",padding:"20px 0px"}},{children:[jsxRuntime.exports.jsx(Skeleton$1,{sx:{m:2},variant:"circular",width:40,height:40}),jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",sx:{fontSize:"10px"},width:30})]}))}),e))}),e)]}))}),Runway=({classes:e,rootClassName:t})=>jsxRuntime.exports.jsx("div",Object.assign({className:e.runway+" "+t},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.landingText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.app-landing",defaultMessage:"Drop Application Here",description:"Helper text to tell users where apps should be dropped"})}))})),RecentAppsDnD=({apps:e=[],allApps:t,onSelectApplication:n,selectedAppId:r,showAppGroups:i})=>{const o=useStyles$a$1()["classes"],[a,s]=react.exports.useState(r),l=useDispatch();function c(e){s(e),n(e)}const u=useSelector(selectUserAppGroupsUiStatus),d=useSelector(selectUserAppGroups);return jsxRuntime.exports.jsxs("div",Object.assign({className:o.root,"data-testid":"app-switcher.recent-apps.container"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:o.title},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"app-bar.app-switcher.recent-apps",defaultMessage:"Recent Applications",description:"Recent Application container title"})})),e.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px"}},{children:e.map((e,t)=>{var{id:t=t,iconUrl:n,name:r}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,className:o.appTile,sx:{padding:0},"data-testid":"app-switcher.recent-apps.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:t===a,onClick:c,iconUrl:n,id:t,appName:r,appListV2:!0})}),e.id)})})):jsxRuntime.exports.jsxs("div",Object.assign({className:o.noApps},{children:[jsxRuntime.exports.jsx(NoApps,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:o.helperText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"app-bar.app-switcher.no-recent-apps",defaultMessage:"You haven’t viewed any applications yet.",description:"No Recent Application title"})}))]})),i&&(u===Status.loading?jsxRuntime.exports.jsx(LoadingSkeleton,{}):u===Status.failure?jsxRuntime.exports.jsx(ErrorState$2,{onRetry:()=>l(fetchUserAppGroupsStart()),errorMessage:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-groups.error-message",defaultMessage:"Something went wrong while loading your application groups.",description:"application groups error state"})}):u===Status.success&&d.length?jsxRuntime.exports.jsx(AppGroups,{apps:e,allApps:t,userAppGroups:d,handleSelectApplication:c,currentSelected:a}):null)]}))},AppGroups=({userAppGroups:t,allApps:n,apps:o,handleSelectApplication:a,currentSelected:s})=>{const l=useStyles$a$1()["classes"];return jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"group-list",direction:"vertical",type:"group-list"},{children:e=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{children:[t.map((r,e)=>{const i=[];return r.apps.forEach(t=>{var e=[...n,...o].find(e=>e.id===t);e&&i.push(e)}),r.isNew?jsxRuntime.exports.jsx(AppGroupPlaceholder,{apps:i,classes:l},r.id):jsxRuntime.exports.jsx(PublicDraggable,Object.assign({draggableId:r.id,index:e},{children:(n,e)=>jsxRuntime.exports.jsxs("div",Object.assign({className:e.isDragging?l.airborneGroup:l.appGroup,ref:n.innerRef},n.draggableProps,{children:[jsxRuntime.exports.jsx(GroupDraggingPlaceholder,{isDragging:e.isDragging,className:l.groupTitle,dragHandleProps:n.dragHandleProps,groupName:r.groupName}),jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:r.id},{children:(e,t)=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:t.isDraggingOver?l.currentLanding:l.idleLanding},{children:[jsxRuntime.exports.jsx(GroupHandler,{groupName:r.groupName,dragHandleProps:n.dragHandleProps,groupId:r.id,isExpanded:r.isExpanded}),t.isDraggingOver&&!i.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px",minHeight:"110px"}},{children:jsxRuntime.exports.jsx(Runway,{classes:l})})):null,jsxRuntime.exports.jsx(Collapse$1,Object.assign({in:(r.isExpanded||void 0===r.isExpanded)&&0<i.length,timeout:"auto",unmountOnExit:!0},{children:jsxRuntime.exports.jsx(GroupApps,{groupApps:i,classes:l,snapshot:t,handleSelectApplication:a,currentSelected:s,appGroup:r})}))]}))}))]}),r.id)}),r.id)}),e.placeholder]}))}))};function ApplicationPanelDnD({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:i,showAppGroups:o=!1}){var a=useStyles$b$1()["classes"],s=useSelector(preferredLanguageSelector);const l=useSelector(selectUserAppGroups)||[];s=AIWareFormatMessage(s);const c=useDispatch(),[u,d]=react.exports.useState(0===n.length?0:n.length<4?1:2),[p,f]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;d(e)},[n]),react.exports.useState(e));function h(e){f(e),null!=t&&t(e),null!=i&&i(e)}react.exports.useEffect(()=>{e!==p&&f(e)},[e,p]);react.exports.useEffect(()=>{o&&c(fetchUserAppGroupsStart())},[c]);return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppGroupModule()]},{children:jsxRuntime.exports.jsx(DragDropContext,Object.assign({onDragEnd:e=>{if(o){const{destination:t,draggableId:n,type:r}=e;"group-list"===r?(e=l.find(e=>e.id===n))&&t&&c(updateGroupPriority({groupId:n,newPriority:t.index,prevPriority:e.priority})):((null==(e=l.find(e=>e.id===(null===t||void 0===t?void 0:t.droppableId)))?void 0:e.apps)||[]).find(e=>e===n)?c(showMessage({content:"This application has already been added to the group",severity:MessageSeverity.Error})):t&&c(addAppToGroup({destination:null===t||void 0===t?void 0:t.droppableId,appId:n}))}}},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.fullHeight},{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,className:a.fullHeight},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:a.fullHeight},{children:jsxRuntime.exports.jsx(RecentAppsDnD,{apps:n,allApps:r,onSelectApplication:h,selectedAppId:null,showAppGroups:o})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:a.fullHeight},{children:jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(AppListDnD$1,{title:s({id:"os-app-bar-panel.name.moreApps",defaultMessage:[{type:0,value:"More Applications"}]}),type:"More",applications:r,onSelectApplication:h,selectedAppId:null,row:u,showAppGroups:o})})}))]}))}))}))}))}const useStyles$7$1=makeStyles()(e=>({root:{width:"100%",height:"calc(100% - 30px)"},tabs:{margin:e.spacing(6)},tabPanels:{width:"100%",height:"calc(100% - 80px)"},logRoot:{padding:e.spacing(0,6)},logHeader:{display:"flex",justifyContent:"space-between"},logTitleText:{paddingTop:"4px"},logContent:{marginTop:"12px"},overviewRoot:{padding:e.spacing(0,6),height:"100%"},overviewHeader:{display:"flex",justifyContent:"space-between"},overviewTitleText:{fontWeight:600},overviewContent:{width:"100%",height:"calc(100% - 50px)",display:"flex",flexDirection:"column",overflowY:"auto"},overviewLineChart:{padding:e.spacing(6,0),flex:1},overviewPieChart:{marginTop:0}})),filters$1=[{value:"all",title:"View Current Week"},{value:"no data",title:"View Current Month"}];function Overview(){var e=useStyles$7$1()["classes"];const[t,n]=react.exports.useState("all");return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.overviewRoot,"data-testid":"performance-monitor-overview"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.overviewHeader},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:e.overviewTitleText},{children:"CPU Load"})),jsxRuntime.exports.jsx(Filter,{data:filters$1,filter:t,onFilter:e=>{n(e.target.value)}})]})),jsxRuntime.exports.jsx(Box$1,{className:e.overviewContent})]}))}const useStyles$6$1=makeStyles()(e=>({table:{minWidth:650},SdkTableCellData:{fontSize:12,color:"#000"},SdkTableCellHeader:{fontSize:12,color:"#9CA8B4",borderBottom:"none",paddingBottom:0},SdkTableCellAvatar:{width:"32px",padding:e.spacing(3,0,3,1)},smallAvatar:{width:32,height:32},SdkTableCellStatus:{color:"#219653",textTransform:"capitalize"},SdkTableCellStatusDeactived:{color:"#8D0707",textTransform:"capitalize"}}));function MuiTable({columns:t=[],data:e=[]}){const r=useStyles$6$1()["classes"];return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({className:r.table,"aria-label":"simple table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsx(TableRow$1,{children:t.map((e,t)=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({classes:{root:r.SdkTableCellHeader},align:e.align},{children:e.label}),t))})}),jsxRuntime.exports.jsx(TableBody$1,{children:e.map((n,e)=>jsxRuntime.exports.jsx(TableRow$1,{children:t.map((e,t)=>"avatar"===e.value?jsxRuntime.exports.jsx(TableCell$1,Object.assign({padding:"checkbox",classes:{root:classNames(r.SdkTableCellData,r.SdkTableCellAvatar)},align:"right"},{children:jsxRuntime.exports.jsx(Avatar$1,{alt:"",src:n[e.value],className:r.smallAvatar})}),t):"status"===e.value?jsxRuntime.exports.jsx(TableCell$1,Object.assign({padding:"checkbox",classes:{root:r.SdkTableCellData},align:e.align},{children:jsxRuntime.exports.jsx("span",Object.assign({className:"deactived"===n[e.value]||"failed"===n[e.value]?r.SdkTableCellStatusDeactived:r.SdkTableCellStatus},{children:n[e.value]}))}),t):jsxRuntime.exports.jsx(TableCell$1,Object.assign({classes:{root:r.SdkTableCellData},align:e.align},{children:n[e.value]}),t))},e))})]}))})}const data=[1,2,3,4,5,6,7,8].map(e=>[{name:"LogoGrab - V3F - "+e,engineId:"0006676754"+e,jobId:"20104106_6WnM4rGlXj",status:"Pending",duration:"1s",appName:"Attribute"}]),columns=[{value:"name",label:"Engine Name",align:"left"},{value:"engineId",label:"Engine ID",align:"left"},{value:"jobId",label:"Job ID",align:"left"},{value:"status",label:"Status",align:"left"},{value:"duration",label:"Time",align:"left"},{value:"appName",label:"App Name",align:"left"}],filters=[{value:"all",title:"View All Applications"},{value:"no data",title:"Active Applications"}];function PerformanceLogs(){var e=useStyles$7$1()["classes"];const[t,n]=react.exports.useState("all");return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.logRoot,"data-testid":"performance-monitor-logs"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.logHeader},{children:[jsxRuntime.exports.jsx(Filter,{data:filters,filter:t,onFilter:e=>{n(e.target.value)}}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.logTitleText},{children:"Last 24 Hours"}))]})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.logContent},{children:jsxRuntime.exports.jsx(MuiTable,{columns:columns,data:data})}))]}))}const Resources=()=>jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"performance-monitor-resources"},{children:"Resources"}));function PerformanceErrors(){return jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"performance-monitor-errors"},{children:"Performance Errors"}))}const tabsList$1=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.xgDIjO",defaultMessage:"Overview",description:"tab label: Overview"}),disabled:!1},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.NXAxMt",defaultMessage:"Logs",description:"tab label: Logs"}),disabled:!1},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Mxysi8",defaultMessage:"Resources",description:"tab label: Resources"}),disabled:!0},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Qj95LF",defaultMessage:"Errors",description:"tab label: Errors"}),disabled:!0}];function PerformanceMonitor(){var e=useStyles$7$1()["classes"];const[t,n]=react.exports.useState(0);return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.root,"data-testid":"performance-monitor"},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.tabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:t,onChangeTab:e=>{n(Number(e))},tabsList:tabsList$1})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:0},{children:jsxRuntime.exports.jsx(Overview,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:1},{children:jsxRuntime.exports.jsx(PerformanceLogs,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:2},{children:jsxRuntime.exports.jsx(Resources,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:3},{children:jsxRuntime.exports.jsx(PerformanceErrors,{})}))]}))]}))}const useStyles$5$2=makeStyles()(e=>({root:{display:"flex",justifyContent:"center"},changeAvatarIcon:{color:"#121212 !important",backgroundColor:"#ffffff !important",padding:e.spacing(1.2)+" !important","&:hover":{backgroundColor:"#ffffff !important"}},avatarLarge:{color:e.palette.secondary.main,backgroundColor:"#ffffff !important",fontSize:"30px !important",width:"84px !important",height:"84px !important",border:"5px solid #E8E8E8"}})),AvatarProfile=({avatar:e,sortName:t,onEditAvatarClick:n,loadingStatus:r})=>{var i=useStyles$5$2()["classes"];return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("div",Object.assign({className:i.root},{children:jsxRuntime.exports.jsx(Badge$1,Object.assign({"data-test":"dt-button-upload-avatar-icon",overlap:"circular","data-testid":"dt-button-upload-avatar-icon",anchorOrigin:{vertical:"bottom",horizontal:"right"},badgeContent:jsxRuntime.exports.jsx(IconButton$1,Object.assign({color:"primary","aria-label":"upload picture",className:i.changeAvatarIcon,onClick:()=>{n()},"data-test":"app-bar-update-avatar",size:"large","data-testid":"app-bar-update-avatar"},{children:jsxRuntime.exports.jsx("img",{src:img$1a,alt:""})}))},{children:"loading"===r?jsxRuntime.exports.jsx(CircularProgress$1,{}):e?jsxRuntime.exports.jsx(Avatar$1,{"data-test":"dt-user-avatar-image",src:e,className:i.avatarLarge}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:i.avatarLarge},{children:null==t?void 0:t.toUpperCase()}))}))}))})},useStyles$4$2=makeStyles()(e=>({container:{marginTop:e.spacing(4),padding:e.spacing(4,4),textAlign:"center",border:"0.5px solid #D5DFE9",borderRadius:e.spacing(2)},text:{marginTop:e.spacing(3)},icon:{display:"inline !important"}})),NullState=()=>{var e=useStyles$4$2()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:e.icon},{children:jsxRuntime.exports.jsx(NoLink,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.text},{children:SHARED_TEXT$1.nullState()})),jsxRuntime.exports.jsx(Box$1,{mb:9})]}))},ErrorState$1=({onRetry:e})=>{var t=useStyles$4$2()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:t.icon},{children:jsxRuntime.exports.jsx(AlarmTwo,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:t.text,"data-test":"account-linking-error-message"},{children:SHARED_TEXT$1.errorState()})),jsxRuntime.exports.jsx(Box$1,{mt:4}),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text",size:"large","data-test":"account-linking-retry-btn",onClick:e},{children:SHARED_TEXT$1.retry()}))]}))};var useStyles$3$3=makeStyles()(e=>({accountLinkingLabel:{fontWeight:"normal",userSelect:"none"},openIdLogo:{width:e.spacing(5),height:e.spacing(5),backgroundColor:"#ffffff",color:"#555F7C"},listAvatar:{minWidth:"45px"},openIdContainer:{marginTop:e.spacing(3)},openIdItem:{padding:e.spacing(3)+"px 0px"},openIdTextContainer:{marginLeft:e.spacing(3.5),display:"inline-block",verticalAlign:"top"},secondaryAction:{right:"0"},linkBtn:{textTransform:"capitalize"},linkIcon:{marginRight:e.spacing(1),color:e.palette.primary.main},dialogTitle:{padding:`${e.spacing(6)} ${e.spacing(6)} ${e.spacing(1)}px !important `},dialogContent:{padding:`${e.spacing(1)} ${e.spacing(6)} !important `},dialogTitleText:{fontWeight:600},dialogAction:{padding:e.spacing(4)},displayNone:{display:"none"},displayInlineBlock:{display:"inline-block"}}));const OpenIdConnectorButton=({isConnected:e,onLink:t,onUnlink:n})=>{var r=useStyles$3$3()["classes"];return jsxRuntime.exports.jsx("div",{children:e?jsxRuntime.exports.jsx(Button$1,Object.assign({className:r.linkBtn+" "+r.displayNone,variant:"text","data-test":"account-linking-unlink-btn",onClick:n},{children:SHARED_TEXT$1.buttonUnlink()})):jsxRuntime.exports.jsxs(Button$1,Object.assign({variant:"outlined",color:"primary",className:r.linkBtn,"data-test":"account-linking-link-btn",onClick:t},{children:[jsxRuntime.exports.jsx(default_1$7,{className:r.linkIcon}),SHARED_TEXT$1.buttonLink()]}))})};function OpenIdConnectors({openIdItems:i,onOpenUnlinkModal:o,onClickOpenIdUrl:a,isOpenIdConnected:s}){const l=useStyles$3$3()["classes"];return jsxRuntime.exports.jsx(List$2,{children:i.map((e,t)=>{var{name:n,loginButtonStyle:r}=e,r=null==r?void 0:r.btnLogo;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:l.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:l.listAvatar},{children:jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:l.openIdLogo,src:r},{children:jsxRuntime.exports.jsx(OrgFilled,{})}))})),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:25<n.length?n:"",placement:"bottom-end"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:l.accountLinkingLabel},{children:25<n.length?n.substring(0,25)+"...":n}))}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:l.secondaryAction},{children:jsxRuntime.exports.jsx(OpenIdConnectorButton,{isConnected:s(e.connectId),onLink:()=>a(e),onUnlink:()=>o(e)})}))]})),t!==i.length-1&&jsxRuntime.exports.jsx(Divider$1,{})]})})})}const LoaderSkeletonItem$1=()=>{var e=useStyles$3$3()["classes"];return jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:e.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:e.listAvatar},{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"circular",width:25,height:25})})),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",width:150,height:21})}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:e.secondaryAction},{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:87,height:35})}))]}))},LoaderSkeleton=()=>jsxRuntime.exports.jsxs(List$2,{children:[jsxRuntime.exports.jsx(LoaderSkeletonItem$1,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem$1,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem$1,{})]}),namespace$2$2="openId",selectOpenIdConnectors=e=>{return null==(e=null==e?void 0:e[namespace$2$2])?void 0:e.openIdConnectors},selectConnectedOpenIds=e=>{return null==(e=null==e?void 0:e[namespace$2$2])?void 0:e.connectedOpenIds},selectLoadingStatus$1=e=>{return null==(e=null==e?void 0:e[namespace$2$2])?void 0:e.status},GET_OPEN_ID_CONNECTORS=`aiware/${namespace$2$2}/get open id connectors`,GET_OPEN_ID_SUCCESS=`aiware/${namespace$2$2}/get open id connectors success`,GET_CONNECTED_OPEN_ID_SUCCESS=`aiware/${namespace$2$2}/get connected open id connectors success`,GET_OPEN_ID_ERROR=`aiware/${namespace$2$2}/get open id connectors error`;function getOpenIdConnectors(){return{type:GET_OPEN_ID_CONNECTORS}}function getOpenIdConnectorSuccess(e){return{type:GET_OPEN_ID_SUCCESS,payload:{data:e}}}function getConnectedOpenIdsSuccess(e){return{type:GET_CONNECTED_OPEN_ID_SUCCESS,payload:{data:e}}}function getOpenIdConnectorError(e){return{type:GET_OPEN_ID_ERROR,payload:{message:e}}}const AccountLinking=({openIdConnectors:e})=>{const t=useDispatch(),[n,r]=react.exports.useState(!1),[i,o]=react.exports.useState(!1),[a,s]=react.exports.useState(null);const[l,c]=react.exports.useState({}),[u,d]=react.exports.useState(),p=useSelector(selectLoadingStatus$1)||"",f=useSelector(selectConnectedOpenIds)||[];var h=useStyles$3$3()["classes"];const m=e=>{c(e),r(!0)};var g=()=>{r(!1)},v=()=>{o(!1)};const x=()=>{t(getOpenIdConnectors())},y=(useInterval(()=>{t(getOpenIdConnectors())},a),e=>{c(e);e=window.open(e.loginUrl);d(e),s(2e3)}),b=react.exports.useCallback(t=>f.some(e=>e.connectId===t),[f]);react.exports.useEffect(()=>{""!==l.connectId&&null!==a&&b(l.connectId)&&(s(null),null!==u&&void 0!==u&&u.close(),o(!0))},[b,t]);return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:h.accountLinkingLabel,"data-test":"account-linking-label"},{children:SHARED_TEXT$1.accountLinkingLabel()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT$1.accountLinkingDescription()})),"pending"===p?jsxRuntime.exports.jsx(LoaderSkeleton,{}):"failure"===p?jsxRuntime.exports.jsx(ErrorState$1,{onRetry:x}):0===e.length?jsxRuntime.exports.jsx(NullState,{}):jsxRuntime.exports.jsx(OpenIdConnectors,{openIdItems:e,onOpenUnlinkModal:m,onClickOpenIdUrl:y,isOpenIdConnected:b}),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:n,maxWidth:"xs",onClose:g,"aria-labelledby":"unlink-dialog-title","aria-describedby":"unlink-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"unlink-dialog-title","data-test":"account-linking-unlink-dialog-title",className:h.dialogTitle},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT$1.unlinkDialogTitle()}))})),jsxRuntime.exports.jsx(DialogContent$1,Object.assign({className:h.dialogContent},{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"unlink-dialog-description"},{children:SHARED_TEXT$1.unlinkDialogContent(l.name)}))})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:h.dialogAction},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:g,variant:"text",size:"large",className:h.linkBtn,"data-test":"account-linking-unlink-dialog-cancel-btn"},{children:SHARED_TEXT$1.unlinkDialogCancel()})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:g,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-unlink-dialog-confirm-btn"},{children:SHARED_TEXT$1.unlinkDialogConfirm()}))]}))]})),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:i,maxWidth:"xs",onClose:v,"aria-labelledby":"success-dialog-title","aria-describedby":"success-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"success-dialog-title",className:h.dialogTitle,"data-test":"account-linking-success-dialog-title"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT$1.successDialogTitle()}))})),jsxRuntime.exports.jsx(DialogContent$1,Object.assign({className:h.dialogContent},{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"success-dialog-description"},{children:SHARED_TEXT$1.successDialogContent(l.name)}))})),jsxRuntime.exports.jsx(DialogActions$1,Object.assign({className:h.dialogAction},{children:jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:v,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-success-dialog-confirm-btn"},{children:SHARED_TEXT$1.successDialogConfirm()}))}))]}))]})};var useStyles$2$4=makeStyles()(e=>({personalProfileContainer:{overflowY:"auto"},firstBox:{paddingTop:e.spacing(6),textAlign:"center",borderBottom:"0.5px solid "+e.palette.divider},loggedBox:{fontWeight:400,paddingTop:e.spacing(2),paddingBottom:e.spacing(5)},email:{color:e.palette.primary.main},logoutBox:{paddingBottom:e.spacing(8)},btnLogin:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px",padding:e.spacing(1,7)},secondBox:{padding:e.spacing(5,6),"& div":{height:"auto !important"}},headerBox:{display:"flex"},editIconBox:{margin:e.spacing(0,-2.4,0,0)},descBox:{fontSize:"14px",color:e.palette.secondary.main},formBox:{marginTop:e.spacing(4)},formItem:{borderBottom:"0.5px solid "+e.palette.divider,marginBottom:e.spacing(4)},formItemPw:{marginBottom:e.spacing(4)+" !important"},titleItem:{color:e.palette.text.disabled,marginBottom:e.spacing(2),cursor:"default"},valueItem:{fontWeight:"normal",color:e.palette.text.secondary,marginBottom:e.spacing(2)},disabledText:{opacity:.6},lastUpdate:{color:"#9CA8B4"},reset:{color:e.palette.primary.main,opacity:.9,marginTop:"35px",cursor:"pointer"},passwordBox:{display:"flex",justifyContent:"space-between",alignItems:"center"},iconResetPw:{margin:"-18px -12px 0 0"},textField:{marginLeft:0,marginRight:0,marginTop:0,marginBottom:"30px",width:"100%"},actionForm:{padding:0,marginBottom:e.spacing(4)},inputBase:{padding:e.spacing(3.4,2.8)},notchedOutline:{"& legend":{height:"16px"}},btnAction:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px"},btnSave:{marginLeft:e.spacing(1.6)},btnActionCancel:{color:e.palette.secondary.main},pwResetTitle:{color:"#D43060 !important"},pwResetDes1:{marginBottom:"20px"},mainTitleText:{color:e.palette.text.secondary,userSelect:"none",fontSize:"18px",lineHeight:"23px",letterSpacing:"0.25px",textTransform:"uppercase"},contentUserView:{height:"100%",textAlign:"left",position:"relative"},headerDrawer:{padding:e.spacing(3,6),display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider},contentEditAvatar:{padding:e.spacing(6)},areaUpload:{background:e.palette.background.default,textAlign:"center",height:"300px",border:"1px solid "+e.palette.divider,boxSizing:"border-box",borderRadius:"4px",padding:e.spacing(10)},descDrag:{fontSize:"16px",color:"#828282",marginBottom:e.spacing(4)},descDrag2:{color:"#828282",margin:e.spacing(4,0)},btnSelectPhoto:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px"},recentlyBox:{marginTop:e.spacing(4)},recentlyText:{margin:e.spacing(2,0)},imgRecently:{width:"113px",height:"113px",background:"#C4C4C4",borderRadius:"4px"},imgRecentlyRow:{display:"flex",justifyContent:"space-between",marginBottom:"20px"},resetBiometric:{marginTop:e.spacing(7)},actionButton:{},inputFile:{display:"none !important"},imageGrid:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:e.spacing(4)},dragging:{filter:"blur(2px)"},currentlyLoggedIn:{fontWeight:"normal",color:e.palette.info.main,lineHeight:e.spacing(3.8),display:"flex",flexDirection:"column",cursor:"default"},manageBasicInfoLabel:{fontWeight:"normal",cursor:"default"},tabsParent:{"& div":{padding:e.spacing(0,0,0,1.6),borderBottom:"none"},"& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},editProfilePictureContainer:{height:"calc(100vh - 60px)",display:"flex",flexDirection:"column",position:"relative"},editProfilePictureFooterButtons:{right:"30px",bottom:"30px",position:"absolute"}})),useStyles$1$4=makeStyles()(e=>({settingsHeader:{fontWeight:"normal",cursor:"default"},topMargin:{marginTop:"30px"},fullWidth:{width:"100%"},inputLabel:{fontFamily:"Nunito",fontWeight:300,display:"block",fontSize:14,color:"#5C6269",marginBottom:6},disclaimerText:{fontWeight:400,display:"block",fontSize:12,color:"#9CA8B4",marginTop:12}}));const ProfileSettings=({onPreferredLanguageChange:t,selectedLanguage:e})=>{const[n,r]=react.exports.useState("");var i=useStyles$1$4()["classes"],o=(react.exports.useEffect(()=>{r(e)},[e]),langs.map(({locale:e,name:t})=>({value:e,name:t})));return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.settingsHeader},{children:SHARED_TEXT$1.settingsHeader()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT$1.settingsSubHeader()})),jsxRuntime.exports.jsxs(FormControl$1,Object.assign({className:i.fullWidth+" "+i.topMargin},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:i.inputLabel,htmlFor:"personal-profile-settings-preferred-language"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.preferredLanguage",defaultMessage:"Preferred Language",description:"Language selection label"})})),jsxRuntime.exports.jsx(Select$1,Object.assign({id:"personal-profile-settings-preferred-language",className:""+i.fullWidth,value:n,onChange:function(e){e=e.target.value,r(e),t(e)}},{children:null==o?void 0:o.map(e=>jsxRuntime.exports.jsx(MenuItem$1,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.name})))})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:i.disclaimerText,variant:"subtitle1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.preferredLanguageDisclaimer",defaultMessage:"Not all products within aiWARE may support your preferred language selection. If you choose a primary language that isn’t available, you may not see it reflected in the product you are currently viewing.",description:"Disclaimer text for preferred language"})}))]}))]})},tabsList$2=[{label:SHARED_TEXT$1.basicInfoTabLabel(),disabled:!1,id:"Basic Info"},{label:SHARED_TEXT$1.accountLinkingTabLabel(),disabled:!1,id:"Account Linking"},{label:SHARED_TEXT$1.settingsTabLabel(),disabled:!1,id:"Settings"}],PersonalProfile=({currentUser:e,handleResetBiometric:t,handleResetPassword:n,handleLogout:r,handleUpdateProfile:i,handleUploadAvatar:o,avatarHistory:a=[],enableResetBiometric:s=!1,loadingStatus:l})=>{var c;const u="EDIT_PROFILE_PICTURE";var d=useStyles$2$4()["classes"];const p=useDispatch();var f=useSelector(userSelector$2),f=null==f?void 0:f.scimConnectId,h=["us-fed-1","us-fed-2"].find(e=>window.location.href.includes(e)),m=useSelector(selectOpenIdConnectors)||[],g=m.some(e=>e.required),h=useSelector(hidePasswordResetSelector)||h||f||g||!1,f=useSelector(preferredLanguageSelector)||"en";const[v,x]=react.exports.useState({firstName:"",lastName:"",phoneNumber:"",email:""}),[y,b]=react.exports.useState({firstName:"",lastName:"",phoneNumber:""}),[C,$]=react.exports.useState(!1),[S,w]=react.exports.useState(null),[E,_]=react.exports.useState(!1),[T,j]=react.exports.useState(!1),[R,I]=react.exports.useState(0);var g=useSelector(userAuthStatusSelector),O=AIWareFormatMessage(f);react.exports.useEffect(()=>{e&&A(e)},[e]),react.exports.useEffect(()=>{p(getOpenIdConnectors())},[p]);const A=e=>{var{firstName:e,lastName:t,imageUrl:n,userSettings:r}=e,r=null==r?void 0:r.find(e=>"phoneNumber"===e.key);x({firstName:e||"",lastName:t||"",phoneNumber:(null==r?void 0:r.value)||"",email:""}),n&&w(n)};var L=react.exports.useCallback(()=>{null!=e&&e.email&&(_(!1),n(null==e?void 0:e.email))},[e,n]);var M=n=>e=>{const t=e.target.value;x(e=>Object.assign(Object.assign({},e),{[n]:t})),b(e=>Object.assign(Object.assign({},e),{[n]:""}))};const k=()=>{p(hidePanel$1(u))},N=e=>{o(e),setTimeout(()=>{p(hidePanel$1(u))},500)};g=[AuthStatus.LOGGING_OUT,AuthStatus.LOGGED_OUT].includes(g);return jsxRuntime.exports.jsxs("div",Object.assign({className:d.personalProfileContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.firstBox},{children:[jsxRuntime.exports.jsx(AvatarProfile,{avatar:S,sortName:""+((null==(c=v.firstName)?void 0:c.substr(0,1))||"")+((null==(c=v.lastName)?void 0:c.substr(0,1))||""),onEditAvatarClick:()=>{var e={name:"EDIT_PROFILE_PICTURE",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",onClose:k,onSaveAvatar:N,avatarHistory:a}},t={panelId:u,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,withTab:!1,marginStart:490,width:450,siblingPanelId:"PERSONAL_PANEL",parentPanelId:"PERSONAL_PANEL",dimmed:0,dimmedStatus:"dimParent"};p(mountPanel$1({panelId:u,microFrontend:e,panelConfig:t}))},loadingStatus:l}),jsxRuntime.exports.jsx("div",Object.assign({className:d.loggedBox},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",className:d.currentlyLoggedIn},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ch1heq",defaultMessage:"Currently logged in as:",description:"personal profile panel currently logged in label"})," ",jsxRuntime.exports.jsx("span",Object.assign({"data-test":"Currently-logged-in-as-email",className:d.email},{children:null==e?void 0:e.email}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:d.logoutBox},{children:jsxRuntime.exports.jsx(LoadingButton$1,Object.assign({onClick:r,variant:"outlined",color:"primary","data-test":"dt-button-logout",className:d.btnLogin,loading:g},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.bRcFCr",defaultMessage:"Logout",description:"label of logout button on profile panel"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:d.tabsParent},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:R,onChangeTab:e=>{I(e)},tabsList:tabsList$2})}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.secondBox},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:R,index:0},{children:jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.headerBox},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.manageBasicInfoLabel},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.5oScQa",defaultMessage:"Manage Your Basic Information",description:"label of manage basic infomation container"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.DjVGBt",defaultMessage:"Basic info, like your name and photo, that you use on Veritone services.",description:"description of manage basic infomation container"})}))]}),jsxRuntime.exports.jsx("div",Object.assign({className:d.editIconBox},{children:!C&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"button-edit",onClick:()=>{j(!1),_(!1),$(!0)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$17,alt:""})}))}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formBox},{children:[C?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(TextField$1,{id:"firstName",label:O({id:"os-app-bar-panel.firstName",defaultMessage:[{type:0,value:"First Name"}]}),variant:"outlined",className:d.textField,value:null===v||void 0===v?void 0:v.firstName,onChange:M("firstName"),margin:"normal",error:""!==y.firstName,helperText:y.firstName,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}}),jsxRuntime.exports.jsx(TextField$1,{id:"lastName",label:O({id:"os-app-bar-panel.lastName",defaultMessage:[{type:0,value:"Last Name"}]}),variant:"outlined",className:d.textField,value:null===v||void 0===v?void 0:v.lastName,onChange:M("lastName"),margin:"normal",error:""!==y.lastName,helperText:y.lastName,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}}),jsxRuntime.exports.jsx(TextField$1,{id:"phoneNumber",label:O({id:"os-app-bar-panel.phone",defaultMessage:[{type:0,value:"Phone"}]}),variant:"outlined",className:d.textField,value:null===v||void 0===v?void 0:v.phoneNumber,onChange:M("phoneNumber"),margin:"normal",error:""!==y.phoneNumber,helperText:y.phoneNumber,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}})]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{e&&A(e),$(!1)},color:"primary",id:"button-cancel-edit",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qpPFGp",defaultMessage:"Cancel",description:"label of cancel button on profile panel"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){(()=>{let e=!0;return v.firstName||(b(Object.assign(Object.assign({},y),{firstName:"This field is required."})),e=!1),v.lastName||(b(Object.assign(Object.assign({},y),{lastName:"This field is required."})),e=!1),v.phoneNumber&&!/^\+?(\d){6,}$/.test(v.phoneNumber.toLowerCase())&&(b(Object.assign(Object.assign({},y),{phoneNumber:"Invalid phone number."})),e=!1),e})()&&(i(v),$(!1))},"data-test":"button-save-edit","data-testid":"button-save-edit",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.C1oyBr",defaultMessage:"Save",description:"label of save button on profile panel"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.a5aLpI",defaultMessage:"Name",description:"label of name field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-name",variant:"body1",className:d.valueItem},{children:`${(null===v||void 0===v?void 0:v.firstName)||""} `+((null===v||void 0===v?void 0:v.lastName)||"")}))]})),(null===v||void 0===v?void 0:v.phoneNumber)&&jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.73xPqY",defaultMessage:"Phone",description:"label of phone field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-phone",variant:"body1",className:d.valueItem},{children:null===v||void 0===v?void 0:v.phoneNumber}))]}))]}),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.zieKdP",defaultMessage:"Email",description:"label of email field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-email",variant:"body1",className:classNames(d.valueItem,d.disabledText)},{children:null==e?void 0:e.email}))]})),E?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.I7feCi",defaultMessage:"Password Reset",description:"reset password label on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Zcj+4v",defaultMessage:"Veritone will send a reset password link via the email on your account.",description:"reset password description on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{_(!1)},color:"primary","data-test":"button-cancel-reset-password","data-testid":"button-cancel-reset-password",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:L,"data-test":"button-reset-password","data-testid":"button-reset-password",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[!h&&jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(d.formItem,d.formItemPw)},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.uIEJAQ",defaultMessage:"Password",description:"label of pasword field on profile panel"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.passwordBox},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.valueItem},{children:"********"})),!h&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"btn-click-pw-reset",className:d.iconResetPw,onClick:()=>{j(!1),_(!0),$(!1)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$16,alt:""})}))]}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"subtitle1",className:d.lastUpdate},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qTqazR",defaultMessage:"Last updated",description:"last updated text label text on profile panel"})," ",(null!=e&&e.lastUpdated?DateTime_1.fromISO(null==e?void 0:e.lastUpdated):DateTime_1.local()).toFormat("LLL dd, yyyy")]}))})]})]})),T?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.resetBiometric},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.+DTt+G",defaultMessage:"Biometric Reset",description:"label of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.nzzfrY",defaultMessage:"Your Biometric Profile will be reset.",description:"description of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{j(!1)},"data-test":"button-cancel-reset-biometric",color:"primary",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{j(!1),t()},color:"primary",variant:"contained","data-test":"button-reset-biometric",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):!E&&s&&jsxRuntime.exports.jsx("div",Object.assign({id:"click-reset-biometric",onClick:()=>{j(!0),_(!1),$(!1)}},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.reset},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.OlJtmF",defaultMessage:"Reset Biometric Profile",description:"label of Reset Biometric Profile on profile panel"})}))}))]})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:R,index:1},{children:jsxRuntime.exports.jsx(AccountLinking,{openIdConnectors:m})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:R,index:2},{children:jsxRuntime.exports.jsx(ProfileSettings,{selectedLanguage:f,onPreferredLanguageChange:e=>{p(updateUserLanguageStart(e))}})}))]}))]}))};function SettingPanel({currentUser:e,activities:t,activityFilter:n,onChangeActivityFilter:r,handleResetBiometric:i,handleResetPassword:o,handleLogout:a,handleUpdateProfile:s,tabId:l,recentApp:c,applications:u,onClickApp:d,handleUploadAvatar:p,avatarHistory:f}){const h=useSelector(userSelector$1),[m,g]=react.exports.useState("");var v=useStyles$b$1()["classes"],x=(react.exports.useEffect(()=>{g(h.loading)},[h]),useSelector(selectHasUserCreateRootFolderPermission)),x=gqlIntrospection.isOperationValid("fileApplication","mutation")&&x;return jsxRuntime.exports.jsxs("div",Object.assign({className:v.tabsBox},{children:[l===TabId.PERSONAL_PANEL&&jsxRuntime.exports.jsx(PersonalProfile,{currentUser:e,handleLogout:a,handleResetBiometric:i,handleResetPassword:o,handleUpdateProfile:s,handleUploadAvatar:p,avatarHistory:f,loadingStatus:m}),l===TabId.APP_PANEL&&jsxRuntime.exports.jsx(ApplicationPanelDnD,{recentApplist:c,applications:u,onClickApp:d,showAppGroups:x}),l===TabId.ACTIVITY_PANEL&&jsxRuntime.exports.jsx(ActivityPanel,{filter:n,onChangeFilter:r,data:t||[]}),l===TabId.PERFORMANCE_MONITOR&&jsxRuntime.exports.jsx(PerformanceMonitor,{})]}))}const namespace$1$2="applications",applicationSelector=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$1$2]},visibleApplicationsSelector=createSelector$1([applicationSelector,selectUserOrgHideCmsFromAppList],({application:e},t)=>(e||[]).filter(e=>!(t&&"cms"===e.key))),selectAppFromStore=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$1$2].selectedApp},HANDLE_CLICK_APP=`aiware/${namespace$1$2}/get handle click app`,REQUEST_GET_APPLICATION_V1=`aiware/${namespace$1$2}/request get app`,GET_APPLICATION_V1_START=`aiware/${namespace$1$2}/get app list start`,GET_APPLICATION_V1_SUCCESS=`aiware/${namespace$1$2}/get app list success`,GET_APPLICATION_V1_ERROR=`aiware/${namespace$1$2}/get app list error`,SET_APPLICATION_IN_STORE=`aiware/${namespace$1$2}/set application`;function setApplicationInStore(e){return{type:SET_APPLICATION_IN_STORE,payload:{data:e}}}function requestGetApplications(){return{type:REQUEST_GET_APPLICATION_V1,payload:{}}}function getApplicationStart(){return{type:GET_APPLICATION_V1_START}}function getApplicationSuccess(e){return{type:GET_APPLICATION_V1_SUCCESS,payload:{data:e}}}function getApplicationError(e){return{type:GET_APPLICATION_V1_ERROR,payload:{message:e}}}const initialState$2$2={application:[],message:"",status:"idle",selectedApp:null};function applicationReducer(e,t){if(void 0===e)return initialState$2$2;switch(t.type){case GET_APPLICATION_V1_START:return Object.assign(Object.assign({},e),{status:"loading"});case GET_APPLICATION_V1_SUCCESS:return Object.assign(Object.assign({},e),{application:t.payload.data,status:"success"});case GET_APPLICATION_V1_ERROR:return Object.assign(Object.assign({},e),{message:t.payload.message,status:"failure"});case SET_APPLICATION_IN_STORE:return Object.assign(Object.assign({},e),{selectedApp:t.payload.data});default:return e}}const namespace$6="activities",allActivitySeletor=e=>{return(null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$6])||[]},today=DateTime_1.local().startOf("day"),activitySelector=createSelector([allActivitySeletor],e=>{var{records:e,filter:t}=e;return"today"===t?e.filter(e=>DateTime_1.fromISO(e.createdDateTime).hasSame(today,"day")):e}),GET_ACTIVITY=`os-app-bar-panel/${namespace$6}/get activity`,GET_ACTIVITY_SUCCESS=`os-app-bar-panel/${namespace$6}/get activity success`,UPDATE_ACTIVITY_FILTER=`os-app-bar-panel/${namespace$6}/update activity filter`;function getActivity(){return{type:GET_ACTIVITY}}function updateActivityFilter(e){return{type:UPDATE_ACTIVITY_FILTER,payload:e}}function getActivitySuccess(e){return{type:GET_ACTIVITY_SUCCESS,payload:e}}const initialState$1$2={records:[],filter:"all",fetched:!1,fetching:!1,processing:!1};function activityReducer(e,t){if(void 0===e)return initialState$1$2;switch(t.type){case GET_ACTIVITY_SUCCESS:return Object.assign(Object.assign({},e),{records:t.payload});case UPDATE_ACTIVITY_FILTER:var n=t.payload["filter"];return Object.assign(Object.assign({},e),{filter:n});default:return e}}combineReducers({[namespace$4$1]:userReducer$1,[namespace$6]:activityReducer,[namespace$1$2]:applicationReducer});const nameSpace$2="aiWareHeaderBarPanel";function*handleClickAppSaga(e){yield call$i(storeRecentApplications,e.payload)}function*getApplicationsSaga(){yield put(getApplicationStart());var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector),e=yield call$i(getApplicationsApi,e,t),n=yield select(graphEndpointSelector),n=yield call$i(getApplicationLogo,n,t);const r=((null==(n=null==(t=null==n?void 0:n.data)?void 0:t.applications)?void 0:n.records)||[]).reduce((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t}),{});e&&e.results?yield put(getApplicationSuccess(((null==e?void 0:e.results)||[]).map(e=>{var t;let n=null!=(t=r[e.applicationId])&&t.signedIconUrl?decodeURIComponent(decodeURI(null==(t=r[e.applicationId])?void 0:t.signedIconUrl)):"";return n=(n=n.replaceAll("&","&")).replaceAll("host?","host&"),{id:e.applicationId,name:e.applicationName,key:e.applicationKey,iconUrl:n||(null==(t=r[e.applicationId])?void 0:t.signedIconSvg)||e.applicationIconUrl||e.applicationIconSvg||e.signedApplicationIconUrl,description:e.applicationDescription,headerbarEnabled:(null==e?void 0:e.headerbarEnabled)||!1,applicationUrl:(null==e?void 0:e.applicationUrl)||""}}))):yield put(getApplicationError("something wrong"))}function*storeRecentApplications(e){var t=yield select(userSelector$1),t=(null==(t=null==t?void 0:t.currentUser)?void 0:t.id)||"",n=JSON.parse(localStorage.getItem("recentApplicationWithUserId")||"{}"),r=(null==n?void 0:n[t])||[],r=(r?(r=slice$4(uniq([e,...r]),0,6),localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:r})))):localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:[e]}))),yield select(switchApiSelector));window.open(r+"/"+e)}function*applicationSaga(){yield all([takeEvery$1(HANDLE_CLICK_APP,handleClickAppSaga),takeLatest$1(REQUEST_GET_APPLICATION_V1,getApplicationsSaga)])}function delay(t=1e3){return __awaiter$4(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function goToPage(e){window.location.href=e}const uploadingStatus={LOADING:"loading",DONE:"done"};function*getCurrentUserSaga$1(){var e,t,n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector),n=yield call$i(getCurrentUserGraphQLApi,n,r);null!=n&&n.errors&&0<(null==n?void 0:n.errors.length)&&(null==(r=n.errors[0].path)||!r.includes("userSettings"))?(console.error("getCurrentUser error"),yield put(getCurrentUserFail$1())):(r=(null==(r=null==(r=null==n?void 0:n.data)?void 0:r.me)?void 0:r.recentImageUrls)||[],t=(null==(t=null==(t=null==n?void 0:n.data)?void 0:t.myRights)?void 0:t.operations)||[],yield put(getCurrentUserSuccess$1(Object.assign(Object.assign({},(null==(e=null==n?void 0:n.data)?void 0:e.me)||{}),{organizationRole:{organizationId:get$3(n,"data.me.organization.id",""),role:t.includes("veritone.superadmin")?"superadmin":t.includes("admin.access")?"admin":"user"},organization:Object.assign({},(null==(t=null==(e=null==n?void 0:n.data)?void 0:e.me)?void 0:t.organization)||{}),roles:((null==(t=null==(e=null==n?void 0:n.data)?void 0:e.me)?void 0:t.roles)||[]).map(e=>e.appName),avatarHistory:r}))))}function*resetBiometricSaga(){var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);yield call$i(resetBiometricApi,e,t)}function*resetPasswordSaga(e){var e=(null==(e=null==e?void 0:e.payload)?void 0:e.email)||"",t=yield select(graphEndpointSelector),e=yield call$i(resetPasswordApi,e,t);!1===(null==e?void 0:e.success)?yield put(resetPasswordFail()):yield put(showMessage({content:(null==(e=null==(t=null==e?void 0:e.data)?void 0:t.createPasswordResetRequest)?void 0:e.message)||"",severity:MessageSeverity.Info}))}function*updateProfileSaga(e){const t=null==e?void 0:e.payload,n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector);var e=yield select(preferredLanguageSelector),i=yield call$i(()=>updateUserProfileApi(t,n,r)),e=AIWareFormatMessage(e);!1===(null==i?void 0:i.success)?yield put(updateProfileFail()):(yield put(getCurrentUser$1()),yield put(showMessage({content:e({id:"os-app-bar-panel.snackbar.updateProfileSuccess",defaultMessage:[{type:0,value:"Success"}]}),severity:MessageSeverity.Success})))}function*uploadAvatarSaga(e){var e=null==e?void 0:e.payload,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=yield call$i(uploadUserAvatarApi,e,t,n);yield put(uploadingAvatar(uploadingStatus.LOADING)),e&&(yield put(updateAvatar(e)))}function*updateAvatarSaga(e){var e=null==e?void 0:e.payload,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),r=yield select(preferredLanguageSelector),e=yield call$i(updateUserAvatarApi,e,t,n),t=AIWareFormatMessage(r);e.errors?yield put(updateProfileFail()):(yield put(showMessage({content:t({id:"os-app-bar-panel.snackbar.updateAvatarSuccess",defaultMessage:[{type:0,value:"Update avatar successfully"}]}),severity:MessageSeverity.Success})),yield put(getCurrentUser$1()),yield put(uploadingAvatar(uploadingStatus.DONE)))}function*hardLogout(){goToPage(yield select(logoutUrlSelector))}function*handleLogoutError(){var e=yield select(preferredLanguageSelector),e=AIWareFormatMessage(e);yield put(showMessage({content:e({id:"os-app-bar-panel.snackbar.logoutError",defaultMessage:[{type:0,value:"Could not log out current user"}]}),severity:MessageSeverity.Error}))}function*redirectToLogoutOrError(){var e=yield select(logoutRedirectUrlSelector);e?goToPage(e):yield call$i(handleLogoutError)}function*updateActivityStatus(){try{var e=yield select(graphEndpointSelector),t=yield select(authSelector),n=yield select(sessionTokenSelector);yield put(extendTokenRequest({token:n})),yield put(setIsIdle(!1)),yield call$i(postNotificationApi,e,null==t?void 0:t.userId,{eventType:aiwareEvent,command:notificationCommands.setCallResetIdleTimer,value:window.navigator.userAgent},!0,"json",aiwareEvent,n),yield delay(500)}catch(e){console.log(e)}}function*logoutUser(){var e,t=yield select(graphEndpointSelector),n=yield select(authSelector),r=yield select(sessionTokenSelector),i=yield select(loginUrlSelector),o=yield select(logoutRedirectUrlSelector);try{r?(window.__logout_requested=!0,yield call$i(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.goToLoginPage,value:window.navigator.userAgent},!0,"json",aiwareEvent,r),yield delay(500),null!=(e=yield call$i(logoutUserApi,r,t))&&e.errors||!1===(null==e?void 0:e.success)?(yield call$i(redirectToLogoutOrError),yield put(logoutUserFail())):(yield put(logoutUserSuccess()),goToPage(o||i))):(yield put(logoutUserSuccess()),yield call$i(hardLogout))}catch(e){yield call$i(handleLogoutError),yield put(logoutUserFail()),console.log(e)}}function*userSaga$1(){yield all([takeEvery$1(GET_CURRENT_USER$1,getCurrentUserSaga$1),takeLatest$1(RESET_BIOMETRIC,resetBiometricSaga),takeLatest$1(RESET_PASSWORD,resetPasswordSaga),takeLatest$1(UPDATE_PROFILE,updateProfileSaga),takeLatest$1(UPLOAD__AVATAR,uploadAvatarSaga),takeLatest$1(UPDATE__AVATAR,updateAvatarSaga),takeLatest$1(LOGOUT_USER,logoutUser),takeLatest$1(UPDATE_ACTIVITY,updateActivityStatus)])}const formatActivityData=e=>{var t,{id:e,event:n,userId:r,userName:i,payload:o,createdDateTime:a}=e;return"login_succeeded"===n?{id:e,userId:r,createdDateTime:a,event:"Login succeeded",description:i+" logged in to Veritone"}:"logout_succeeded"===n?{id:e,userId:r,createdDateTime:a,event:"Logout succeeded",description:i+" successfully logged out"}:"add_user_succeeded"===n?(t=o["userName"],{id:e,userId:r,createdDateTime:a,event:"Add user succeeded",description:t+" successfully added"}):"org_updated"===n?(t=o["organizationName"],{id:e,userId:r,createdDateTime:a,event:"Org Name Changed",description:i+` updated org "${t}"`}):{id:e,userId:r,createdDateTime:a,event:"Unknown activity",description:"Unknown activity"}};function*getActivitySaga(){var e=yield call$i(getActivityApi);e.success?(e=e.data["records"],yield put(getActivitySuccess(e.map(formatActivityData)))):(e=yield select(preferredLanguageSelector),e=AIWareFormatMessage(e),yield put(showMessage({content:e({id:"os-app-bar-panel.snackbar.activityError",defaultMessage:[{type:0,value:"Something went wrong!"}]}),severity:MessageSeverity.Error})))}function*activitySaga(){yield takeEvery$1(GET_ACTIVITY,getActivitySaga)}const BOOTING$1="aiware-header-bar/booting",BOOTED$1="aiware-header-bar/booted";function*bootFunction$1(){yield take(BOOTED$1)}function*booting$1(){yield takeEvery$1(BOOTING$1,bootFunction$1)}function*rootSaga$3(){yield all([fork(applicationSaga),fork(userSaga$1),fork(booting$1),fork(activitySaga)])}function getAppbarPanelModule(){return{id:"os-appbar-panel",reducerMap:{[nameSpace$2]:combineReducers({users:userReducer$1,activities:activityReducer,applications:applicationReducer})},sagas:[rootSaga$3],initialActions:[getActivity(),getCurrentUser$1(),requestGetApplications()],retained:!0}}const initialState$6={openIdConnectors:[],connectedOpenIds:[],message:"",status:"idle"};function openIdConReducer(e,t){if(void 0===e)return initialState$6;switch(t.type){case GET_OPEN_ID_CONNECTORS:return Object.assign(Object.assign({},e),{status:0===e.openIdConnectors.length&&"pending"});case GET_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{openIdConnectors:t.payload.data,status:"idle"});case GET_CONNECTED_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{connectedOpenIds:t.payload.data});case GET_OPEN_ID_ERROR:return Object.assign(Object.assign({},e),{message:t.payload.message,status:"failure"});default:return e}}const getAllOpenIdConnectorApi=(e,t,n)=>__awaiter$4(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/api/admin/openid/org/"+t,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},n&&{Authorization:"Bearer "+n}),credentials:"include"})).json()}catch(e){console.error(e)}}),getConnectedOpenIdConnectorApi=(e,t,n)=>__awaiter$4(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/api/admin/openid/user/"+t,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},n&&{Authorization:"Bearer "+n}),credentials:"include"})).json()}catch(e){console.error(e)}});function*getOpenIdConnectorSaga(){var n=yield select(sessionTokenSelector),r=yield select(rootApiSelector),i=(yield select(userSelector$2))["userName"];if(n&&r&&i){let e={},t={};e.results=yield select(selectOpenIdConnectors);try{var o=call$i(getAllOpenIdConnectorApi,r,i,n),a=call$i(getConnectedOpenIdConnectorApi,r,i,n);0===(null===e||void 0===e?void 0:e.results.length)?[e,t]=yield all([o,a]):t=yield a,e&&t?(yield put(getOpenIdConnectorSuccess(e.results)),yield put(getConnectedOpenIdsSuccess(t.results))):yield put(getOpenIdConnectorError("error on loading open ids"))}catch(e){yield put(getOpenIdConnectorError("error on loading open ids"))}}else yield put(getOpenIdConnectorError("Missing token,base url or username"))}function*openIdRootSaga(){yield takeEvery$1(GET_OPEN_ID_CONNECTORS,getOpenIdConnectorSaga)}function getOpenIdModule(){return{id:"open-id",reducerMap:{[namespace$2$2]:openIdConReducer},sagas:[openIdRootSaga],initialActions:[]}}function SettingPanelComponent_({tabId:e}){const r=useDispatch(),i=useSelector(visibleApplicationsSelector);var{currentUser:t={}}=useSelector(userSelector$1)||{},{avatarHistory:n=[]}=t,o=useSelector(activitySelector)||[],a=useSelector(allActivitySeletor)["filter"];const[s,l]=react.exports.useState(0),[c,u]=react.exports.useState([]),[d,p]=react.exports.useState([]),f=useSelector(userRecentApplicationsSelector);const h="e4739d44-53d2-4153-b55f-5e246fc989b1"===useSelector(appIdSelector),m=useSelector(selectDesktopUrl);function g(e){r(appSwitcherHandleClick(""+e)),r(updateUserRecentApplicationsStart(""+e))}react.exports.useEffect(()=>{p(f)},[f]),react.exports.useEffect(()=>{r(requestGetApplications()),r(getActivity()),r(getCurrentUser$1())},[r]),react.exports.useEffect(()=>{l(e||0)},[e]),react.exports.useEffect(()=>{if(0<d.length&&0<i.length){var e=[];for(const n of d){var t=i.find(e=>e.id===n);t&&e.push(t)}u(e)}},[d,i]);const v={invalidUrl:"Selected Application does not have a valid destination URL",urlValidationError:"Application loading has failed. Please try again later"};const x=useNavigate();function y(t,e){var{error:e,message:n}=function(e){let t;try{t=new URL(e)}catch(e){return{error:!0,message:v.invalidUrl}}return"https:"===t.protocol||"http:"===t.protocol?{error:!1}:{error:!0,message:v.urlValidationError}}(e);e&&n?r(showMessage({content:n,severity:MessageSeverity.Error})):(r(hidePanel$1("APPLICATION_PANEL_ID")),e=i.find(e=>e.id===t),x("/ui/app/"+(null==e?void 0:e.key)),r(setApplicationInStore(e)))}return jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarPanelModule(),getOpenIdModule()]},{children:jsxRuntime.exports.jsx(SettingPanel,{tabId:s,currentUser:t,activities:o,activityFilter:a,onChangeActivityFilter:function(e){r(updateActivityFilter({filter:e}))},handleResetBiometric:function(){r(resetBiometric())},handleResetPassword:function(e){r(resetPassword({email:e}))},handleLogout:function(){r(logout())},handleUpdateProfile:function(e){r(updateProfile(e))},organizationRole:get$3(t,"organizationRole",{}),recentApp:c,applications:i,onClickApp:function(t){var{headerbarEnabled:e,applicationUrl:n=""}=i.find(e=>e.id===t)||{};if(h)e?y(t,n):g(t);else if(e&&m){n=(i.find(e=>e.id===t)||{})["key"];let e="";e=n?(m.endsWith("/")?"":"/")+"ui/app/"+n:(m.endsWith("/")?"":"/")+"ui/app/"+t,window.open(m+e)}else g(t)},handleUploadAvatar:function(e){r(uploadAvatar(e))},avatarHistory:n})}))})})})}function SettingPanelComponent(e){return jsxRuntime.exports.jsx(BrowserRouter,{children:jsxRuntime.exports.jsx(SettingPanelComponent_,Object.assign({},e))})}const CropImage=({url:e,handleCroppedImage:t})=>{const n=react.exports.useRef();return jsxRuntime.exports.jsx("div",Object.assign({style:{padding:"10px",background:"#F8F8F8",borderRadius:"4px",border:"1px solid #D5DFE9"}},{children:jsxRuntime.exports.jsx(ReactCropper,{ref:n,src:e,style:{height:"100%",width:"100%",borderRadius:"4px",maxHeight:"300px"},dragMode:"move",viewMode:1,width:"",aspectRatio:1,guides:!0,crop:()=>{n.current&&n.current.cropper.getCroppedCanvas().toBlob(function(e){t(e)},"image/jpeg")},cropBoxMovable:!1,cropBoxResizable:!1,toggleDragModeOnDblclick:!1})}))};function EditProFilePicture({onClose:e,onSaveAvatar:t,avatarHistory:n}){const r=useStyles$2$4()["classes"],[i,o]=react.exports.useState(""),[a,s]=react.exports.useState(),[l,c]=react.exports.useState(!1),[u,d]=react.exports.useState(!1);var p=react.exports.useRef(null);const f=react.exports.useRef(0),h=react.exports.useRef(null);const m=e=>{h.current&&(h.current.value=""),o(e),c(!0)};return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.editProfilePictureContainer},{children:[jsxRuntime.exports.jsx("input",{accept:"image/*",className:r.inputFile,id:"icon-button-file",type:"file",onChange:e=>{e=e.target.files;if(e&&0<e.length){e=e[0];if(URL)m(URL.createObjectURL(e));else if(FileReader){const t=new FileReader;t.onload=function(){m(t.result)},t.readAsDataURL(e)}}},ref:h,"data-test":"image-upload-input","data-testid":"image-upload-input"}),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.contentUserView},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.headerDrawer},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:r.mainTitleText,"data-test":"edit-profile-picture-header"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.npW7Np",defaultMessage:"Edit Profile Picture",description:"The title of edit profile picture panel"})}))})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.contentEditAvatar},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames(u&&r.dragging),ref:p,onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),f.current++,e.dataTransfer.items&&0<e.dataTransfer.items.length&&d(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),f.current--,0<f.current||d(!1)},onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),d(!1),e.dataTransfer.files&&0<e.dataTransfer.files.length){var t=e.dataTransfer.files;if(FileReader&&0<t.length){const n=new FileReader;n.onload=function(){m(n.result)},n.readAsDataURL(t[0])}e.dataTransfer.clearData(),f.current=0}}},{children:l?jsxRuntime.exports.jsx(CropImage,{url:i,handleCroppedImage:e=>{s(e)}}):jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.areaUpload},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:r.descDrag},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.LeafC8",defaultMessage:"Drag a profile photo here",description:"the label of upload file container"})})),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx("img",{src:img$1y,alt:""})}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle2",className:r.descDrag2},{children:"- or -"})),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"outlined",color:"primary",id:"on-select-photo",className:r.btnSelectPhoto,onClick:()=>{h.current&&h.current.click()},"data-test":"edit-profile-picture-upload-file-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.CaHXXC",defaultMessage:"Select a photo from your computer",description:"edit profile picture panel: select photo label"})}))]}))})),0<(null==n?void 0:n.length)&&jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.recentlyBox},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:r.recentlyText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.3gg72P",defaultMessage:"Recently Used Photos",description:"the label of recently used profile picture container"})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0},{children:0<n.length&&n.map(e=>jsxRuntime.exports.jsx(Grid$1,Object.assign({xs:4,item:!0,className:r.imageGrid,"data-test":"recent-profile-picture"},{children:jsxRuntime.exports.jsx("img",{className:r.imgRecently,src:e,alt:"avatar"})}),e))}))]}))]}))]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.actionButton+" "+r.editProfilePictureFooterButtons},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",onClick:()=>{o(""),s(void 0),c(!1),null!=e&&e()},className:classNames(r.btnAction,r.btnActionCancel),"data-test":"edit-profile-picture-cancel-button","data-testid":"edit-profile-picture-cancel-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained",id:"button-save-cropped-image",className:classNames(r.btnAction,r.btnSave),onClick:()=>{var e;a&&(e="avatar-"+(new Date).toISOString()+".jpeg",e=new File([a],e,{type:"image/jpeg"}),t(e),setTimeout(()=>{o(""),c(!1)},250))},"data-test":"edit-profile-picture-save-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.tcZkqy",defaultMessage:"Save",description:"label of save button in edit profile picture panel"})}))]}))]}))})}const useStyles$l=makeStyles()((e,{row:t})=>({tabsContainer:{width:"100%"},gridContainer:{display:"flex"},listContainer:{},gridItem:{display:"flex",justifyContent:"center",paddingBottom:e.spacing(1.6),"&:hover":{backgroundColor:"#EEF3F9",borderRadius:"4px"}},padding:{padding:e.spacing(0,6,3,6)},moreAppContainer:{height:`calc(100vh - ${0===t?175:1===t?275:2===t?395:500}px - 66px - 10px - 55px)`,minHeight:3===t?300:0,overflow:"overlay",overflowX:"hidden"},relativeParent:{position:"relative"},noMoreApps:{padding:e.spacing(0,9,3,9)},noSelect:{userSelect:"none",paddingTop:"16px"},gridTitle:{padding:"24px 30px 32px 30px",margin:"-5px 0 -5px","& > $noSelect":{marginBottom:15}},appItemDivider:{margin:e.spacing(0,6)}}));function AppList({title:e,selectedAppId:t,onSelectApplication:n,applications:r=[],useGrid:i=!1,row:o=0}){const a=useStyles$l({row:o})["classes"],[s,l]=react.exports.useState(t),[c,u]=react.exports.useState([]);function d(e){l(e),n(e)}function p(e,t){return e.name>t.name?1:e.name<t.name?-1:0}return react.exports.useEffect(()=>{var e;0<r.length&&(e=[...r].sort(p),u(e))},[r]),react.exports.useEffect(()=>{t!==s&&l(t)},[t,s]),jsxRuntime.exports.jsxs("div",Object.assign({className:classNames({[a.gridTitle]:i},a.tabsContainer)},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames({[a.padding]:!i},a.noSelect)},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",sx:{marginBottom:"10px"}},{children:e}))})),i&&jsxRuntime.exports.jsx("div",Object.assign({className:a.gridContainer},{children:jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0},{children:0===r.length?jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Xzhf45",defaultMessage:"No Applications",description:"the label no app will show if we have no application for grid view"})})):0<c.length&&c.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.gridItem},{children:jsxRuntime.exports.jsx(AppIcon,{type:"grid",selected:e===s,onClick:d,iconUrl:t,id:e,appName:n})}))}),e)})}))})),!i&&jsxRuntime.exports.jsx("div",Object.assign({className:a.listContainer},{children:0===r.length?jsxRuntime.exports.jsx("div",Object.assign({className:a.noMoreApps},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dyhBih",defaultMessage:"No Applications",description:"the label no app will show if we have no application for list view"})}))})):jsxRuntime.exports.jsx("div",Object.assign({className:a.moreAppContainer},{children:0<r.length&&r.sort(p).map((e,t)=>{var{id:e=t,iconUrl:n,name:r}=e;return jsxRuntime.exports.jsxs("div",Object.assign({className:a.relativeParent},{children:[jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===s,onClick:d,iconUrl:n,id:e,appName:r}),jsxRuntime.exports.jsx(Divider$1,{className:a.appItemDivider})]}),e+"_"+t)})}))}))]}))}var index_esm$4=Object.freeze({__proto__:null,AppList:AppList,EditProFilePicture:EditProFilePicture,VeritonePanel:SettingPanelComponent,applicationSelector:applicationSelector,getAppbarPanelModule:getAppbarPanelModule,requestGetApplications:requestGetApplications,selectAppFromStore:selectAppFromStore,setApplicationInStore:setApplicationInStore}),Close={},_interopRequireDefault$6=interopRequireDefault.exports,default_1$6=(Object.defineProperty(Close,"__esModule",{value:!0}),Close.default=void 0),_createSvgIcon$6=_interopRequireDefault$6(createSvgIcon$1),_jsxRuntime$6=jsxRuntime.exports,_default$6=(0,_createSvgIcon$6.default)((0,_jsxRuntime$6.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),default_1$6=Close.default=_default$6,dt=Object.create,Ie=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,ft=Object.getOwnPropertyNames,ht=Object.getPrototypeOf,vt=Object.prototype.hasOwnProperty,Tt=e=>Ie(e,"__esModule",{value:!0}),It=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Et=(t,n,r)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let e of ft(n))vt.call(t,e)||"default"===e||Ie(t,e,{get:()=>n[e],enumerable:!(r=pt(n,e))||r.enumerable});return t},bt=e=>Et(Tt(Ie(null!=e?dt(ht(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Be=It((e,t)=>{var n,r;r=function(e){function t(e){var t=o.get(e),n=void 0===t?e.size:t<1073741824?t+1:0;if(e.has(n))if(e.size<536870912)for(;e.has(n);)n=Math.floor(1073741824*Math.random());else{if(e.size>s)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(n);)n=Math.floor(Math.random()*s)}return i(e,n)}function n(e){var t=r(e);return e.add(t),t}var r,i,o,a,s=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,l=new WeakMap;i=function(e,t){return a.set(e,t),t},o=a=l,r=t;e.addUniqueNumber=n,e.generateUniqueNumber=t,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof(n=e)&&void 0!==t?r(e):"function"==typeof define&&define.amd?define(["exports"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self).fastUniqueNumbers={})}),w=(bt(Be()),"object"==("undefined"==typeof window?"undefined":typeof window)),T={setTimeout:w?setTimeout.bind(window):setTimeout,clearTimeout:w?clearTimeout.bind(window):clearTimeout,setInterval:w?setInterval.bind(window):setInterval,clearInterval:w?clearInterval.bind(window):clearInterval};function $e(e){T.setTimeout=e.setTimeout,T.clearTimeout=e.clearTimeout,T.setInterval=e.setInterval,T.clearInterval=e.clearInterval}var l,Y={},Ke=class{constructor(e){this.closed=!1,this.mc=new MessageChannel,this.name=e,Y[e]=Y[e]||[],Y[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){e.storageArea===window.localStorage&&e.key.substring(0,this.name.length)===this.name&&null!==e.newValue&&(e=JSON.parse(e.newValue),this.mc.port2.postMessage(e))}postMessage(e){if(this.closed)throw new Error("InvalidStateError");let t=JSON.stringify(e),n=this.name+":"+String(Date.now())+String(Math.random());window.localStorage.setItem(n,t),T.setTimeout(()=>{window.localStorage.removeItem(n)},500),Y[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){var e;this.closed||(this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage),e=Y[this.name].indexOf(this),Y[this.name].splice(e,1))}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},Qe="undefined"==typeof window?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:Ke;function Ze(t=0){return new Promise(e=>T.setTimeout(e,t))}function le(){return Math.random().toString(36).substring(2)}!function(e){e[e.APPLY=0]="APPLY",e[e.TELL=1]="TELL",e[e.CLOSE=2]="CLOSE",e[e.REGISTER=3]="REGISTER",e[e.DEREGISTER=4]="DEREGISTER",e[e.IDLE=5]="IDLE",e[e.ACTIVE=6]="ACTIVE",e[e.PROMPT=7]="PROMPT",e[e.START=8]="START",e[e.RESET=9]="RESET",e[e.ACTIVATE=10]="ACTIVATE",e[e.PAUSE=11]="PAUSE",e[e.RESUME=12]="RESUME",e[e.MESSAGE=13]="MESSAGE"}(l=l||{});var k,Ee=class{constructor(e,t){this.token=le(),this.isLeader=!1,this.isDead=!1,this.isApplying=!1,this.reApply=!1,this.intervals=[],this.listeners=[],this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return!(this.reApply=!0);let n=!(this.isApplying=!0),e=e=>{var{token:e,action:t}=e.data;e!==this.token&&(t===l.APPLY&&e>this.token&&(n=!0),t===l.TELL)&&(n=!0)};this.channel.addEventListener("message",e);try{return this.sendAction(l.APPLY),await Ze(this.options.responseTime),this.channel.removeEventListener("message",e),this.isApplying=!1,n?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let i=!1,o=null;return new Promise(t=>{let n=()=>{var e;i||(i=!0,T.clearInterval(o),e=this.intervals.indexOf(o),this.intervals.splice(e,1),this.channel.removeEventListener("message",r),t())},r=(o=T.setInterval(()=>{this.apply().then(()=>{this.isLeader&&n()})},this.options.fallbackInterval),this.intervals.push(o),e=>{e=e.data.action;e===l.CLOSE&&this.apply().then(()=>{this.isLeader&&n()})});this.channel.addEventListener("message",r)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;var e=e=>{e=e.data.action;e===l.APPLY&&this.sendAction(l.TELL)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(l.TELL)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership(),this.deferred)}close(){this.isDead||(this.isDead=!0,this.isLeader=!1,this.sendAction(l.CLOSE),this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>T.clearInterval(e)))}},be=(!function(e){e[e.PROMPTED=0]="PROMPTED",e[e.ACTIVE=1]="ACTIVE",e[e.IDLE=2]="IDLE"}(k=k||{}),class{constructor(e){this.token=le(),this.registry=new Map,this.allIdle=!1;var t=e["channelName"];this.options=e,this.channel=new Qe(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new Ee(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{var{action:e,token:t,data:n}=e.data;switch(e){case l.REGISTER:this.registry.set(t,2);break;case l.DEREGISTER:this.registry.delete(t);break;case l.IDLE:this.idle(t);break;case l.ACTIVE:this.active(t);break;case l.PROMPT:this.prompt(t);break;case l.START:this.start(t);break;case l.RESET:this.reset(t);break;case l.ACTIVATE:this.activate(t);break;case l.PAUSE:this.pause(t);break;case l.RESUME:this.resume(t);break;case l.MESSAGE:this.options.onMessage(n)}}),this.send(l.REGISTER)}get isLeader(){if(this.elector)return this.elector.isLeader;throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.')}prompt(e=this.token){this.registry.set(e,0);var t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(l.PROMPT),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);var t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(l.IDLE),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);var t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(l.ACTIVE),t&&this.options.onActive()}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.START):this.options.start(!0)}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.RESET):this.options.reset(!0)}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.ACTIVATE):this.options.activate(!0)}pause(e=this.token){e===this.token?this.send(l.PAUSE):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(l.RESUME):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:l.MESSAGE,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(l.DEREGISTER),this.channel.close()}}),et=w?document:null,ge=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"];function C(e){let t=react.exports.useRef(e);return react.exports.useEffect(()=>{t.current=e},[e]),t}function tt(t,n){let r;function e(...e){r&&clearTimeout(r),r=setTimeout(()=>{t(...e),r=null},n)}return e.cancel=function(){clearTimeout(r)},e}function ue(n,r){let i=0;return function(...e){var t=(new Date).getTime();if(!(t-i<r))return i=t,n(...e)}}var E=()=>(w?performance:Date).now();function $({timeout:e=12e5,promptTimeout:V=0,element:t=et,events:n=ge,timers:H=void 0,immediateEvents:r=[],onPrompt:B=()=>{},onIdle:U=()=>{},onActive:z=()=>{},onAction:Z=()=>{},onMessage:W=()=>{},debounce:i=0,throttle:o=0,eventsThrottle:a=200,startOnMount:s=!0,startManually:l=!1,stopOnIdle:G=!1,crossTab:c=!1,name:q="idle-timer",syncTimers:u=0,leaderElection:K=!1}={}){let d=react.exports.useRef(E()),Y=react.exports.useRef(Date.now()),p=react.exports.useRef(E()),f=react.exports.useRef(null),h=react.exports.useRef(null),Q=react.exports.useRef(null),m=react.exports.useRef(0),g=react.exports.useRef(!0),v=react.exports.useRef(!1),x=react.exports.useRef(!0),y=react.exports.useRef(!1),b=react.exports.useRef(!1),$=react.exports.useRef(0),S=react.exports.useRef(0),_=react.exports.useRef(null),j=react.exports.useRef(null),R=C(e),I=C(V),X=C(G),J=react.exports.useRef(r),O=react.exports.useRef(t),A=react.exports.useRef([...new Set([...n,...r]).values()]),ee=C(U),te=C(z),ne=C(B),L=C(W),re=C(Z),M=react.exports.useMemo(()=>{var e=e=>re.current(e);return 0<i?tt(e,i):0<o?ue(e,o):e},[o,i]),ie=react.exports.useRef(),k=(react.exports.useEffect(()=>{c&&u&&(ie.current=ue(()=>{j.current.active()},u))},[c,u]),()=>{null!==_.current&&(T.clearTimeout(_.current),_.current=null)}),N=(e,t=!0)=>{k(),_.current=T.setTimeout(le,e||R.current),t&&(h.current=E()),Q.current=Date.now()},oe=e=>{$.current=0,S.current=E(),b.current=!0,N(I.current,!1),ne.current(e)},ae=()=>{k(),g.current=!0,f.current=E(),X.current?D():b.current&&(S.current=0,b.current=!1),ee.current()},se=e=>{k(),b.current=!1,S.current=0,g.current=!1,m.current+=E()-f.current,P(),N(),te.current(e)},le=e=>{if(!g.current)return M.cancel&&M.cancel(),0<I.current&&!b.current?void(j.current?j.current.prompt():oe(e)):void(j.current?j.current.idle():ae());j.current?j.current.active():se(e)},ce=e=>{var t;M(e),b.current||(k(),!g.current&&J.current.includes(e.type)||!g.current&&Date.now()-Q.current>=R.current||(t=E()-h.current,g.current&&!G)||!g.current&&t>=R.current?le(e):(v.current=!1,$.current=0,S.current=0,N(),c&&u&&ie.current()))},de=react.exports.useRef(),P=(react.exports.useEffect(()=>{var e=y.current;e&&D(),de.current=0<a?ue(ce,a):ce,e&&P()},[a,o,i,re,c,u]),()=>{w&&!y.current&&(A.current.forEach(e=>{O.current.addEventListener(e,de.current,{capture:!0,passive:!0})}),y.current=!0)}),D=(e=!1)=>{w&&(y.current||e)&&(A.current.forEach(e=>{O.current.removeEventListener(e,de.current,{capture:!0})}),y.current=!1)},F=react.exports.useCallback(e=>{k(),P(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,j.current&&!e&&j.current.start(),N()},[_,g,R,j]),pe=react.exports.useCallback(e=>{k(),P(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,d.current=E(),p.current=E(),j.current&&!e&&j.current.reset(),l||N()},[_,g,R,l,j]),fe=react.exports.useCallback(e=>{k(),P(),(g.current||b.current)&&se(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,p.current=E(),j.current&&!e&&j.current.activate(),N()},[_,g,R,j]),he=react.exports.useCallback((e=!1)=>!v.current&&($.current=we(),v.current=!0,D(),k(),j.current&&!e&&j.current.pause(),!0),[_,j]),me=react.exports.useCallback((e=!1)=>!!v.current&&(v.current=!1,b.current||P(),g.current||N($.current),S.current&&(S.current=E()),j.current&&!e&&j.current.resume(),!0),[_,R,$,j]),ve=react.exports.useCallback((e,t)=>{j.current?(t&&L.current(e),j.current.message(e)):t&&L.current(e)},[W]),xe=react.exports.useCallback(()=>g.current,[g]),ye=react.exports.useCallback(()=>b.current,[b]),Ce=react.exports.useCallback(()=>{if(j.current)return j.current.isLeader;throw new Error('❌ Cross Tab feature is not enabled. To enable it set the "crossTab" property to true.')},[j]),Se=react.exports.useCallback(()=>{if(j.current)return j.current.token;throw new Error('❌ Cross Tab feature is not enabled. To enable it set the "crossTab" property to true.')},[j]),we=react.exports.useCallback(()=>{var e,t;return v.current?$.current:(t=$.current||I.current+R.current,e=h.current?E()-h.current:0,(t=Math.floor(t-e))<0?0:Math.abs(t))},[R,I,b,$,h]),Ee=react.exports.useCallback(()=>Math.round(E()-p.current),[p]),_e=react.exports.useCallback(()=>Math.round(E()-d.current),[d]),Te=react.exports.useCallback(()=>f.current?new Date(Y.current-d.current+f.current):null,[f]),je=react.exports.useCallback(()=>h.current?new Date(Y.current-d.current+h.current):null,[h]),Re=react.exports.useCallback(()=>g.current?Math.round(E()-f.current+m.current):Math.round(m.current),[f,m]),Ie=react.exports.useCallback(()=>{var e=Math.round(_e()-Re());return 0<=e?e:0},[d,f,m]);return react.exports.useEffect(()=>{if(0<i&&0<o)throw new Error("❌ onAction can either be throttled or debounced, not both.");H&&$e(H);let e=()=>{j.current&&j.current.close(),M.cancel&&M.cancel(),k(),D(!0)};return w&&window.addEventListener("beforeunload",e),()=>{w&&window.removeEventListener("beforeunload",e),j.current&&j.current.close(),M.cancel&&M.cancel(),k(),D(!0)}},[]),react.exports.useEffect(()=>{j.current&&j.current.close(),j.current=c?new be({channelName:q,leaderElection:K,onPrompt:()=>{oe()},onIdle:()=>{ae()},onActive:()=>{se()},onMessage:L.current,start:F,reset:pe,activate:fe,pause:he,resume:me}):null},[c,q,K,ne,ee,te,L,F,pe,he,me]),react.exports.useEffect(()=>{k(),D(!0),x.current||(v.current=!0,g.current=!0,$.current=0),l||(s?F:P)()},[l,s,x]),react.exports.useEffect(()=>{var e;x.current||(e=[...new Set([...n,...r]).values()],D(),A.current=e,O.current=t,J.current=r,l)||(s?F:P)()},[t,JSON.stringify(n),JSON.stringify(r),x,l,s]),react.exports.useEffect(()=>{x.current?x.current=!1:(R.current=e,l||(g.current&&(te.current(),j.current)&&j.current.active(),F()))},[e,j,l,x,g]),{message:ve,start:F,reset:pe,activate:fe,pause:he,resume:me,isIdle:xe,isPrompted:ye,isLeader:Ce,getTabId:Se,getRemainingTime:we,getElapsedTime:Ee,getTotalElapsedTime:_e,getLastIdleTime:Te,getLastActiveTime:je,getTotalIdleTime:Re,getTotalActiveTime:Ie}}var ce=react.exports.createContext(null),tinycolor$1=(ce.Consumer,{exports:{}}),tinycolor=(!function(e){function u(e,t){var n;return t=t||{},(e=e||"")instanceof u?e:this instanceof u?(n=function(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(S,"").replace(w,"").toLowerCase();var t,n=!1;if(I[e])e=I[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=k.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=k.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=k.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=k.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=k.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=k.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=k.hex8.exec(e))return{r:g(t[1]),g:g(t[2]),b:g(t[3]),a:b(t[4]),format:n?"name":"hex8"};if(t=k.hex6.exec(e))return{r:g(t[1]),g:g(t[2]),b:g(t[3]),format:n?"name":"hex"};if(t=k.hex4.exec(e))return{r:g(t[1]+""+t[1]),g:g(t[2]+""+t[2]),b:g(t[3]+""+t[3]),a:b(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=k.hex3.exec(e))return{r:g(t[1]+""+t[1]),g:g(t[2]+""+t[2]),b:g(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(C(e.r)&&C(e.g)&&C(e.b)?(t=function(e,t,n){return{r:255*h(e,255),g:255*h(t,255),b:255*h(n,255)}}(e.r,e.g,e.b),a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):C(e.h)&&C(e.s)&&C(e.v)?(r=x(e.s),i=x(e.v),t=function(e,t,n){e=6*h(e,360),t=h(t,100),n=h(n,100);var r=$.floor(e),e=e-r,i=n*(1-t),o=n*(1-e*t),e=n*(1-(1-e)*t),t=r%6;return{r:255*[n,o,i,i,e,n][t],g:255*[e,n,n,o,i,i][t],b:255*[i,i,e,n,n,o][t]}}(e.h,r,i),a=!0,s="hsv"):C(e.h)&&C(e.s)&&C(e.l)&&(r=x(e.s),o=x(e.l),t=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),1<n&&--n,n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}e=h(e,360),t=h(t,100),n=h(n,100),0===t?r=i=o=n:(r=a(t=2*n-(n=n<.5?n*(1+t):n+t-n*t),n,e+1/3),i=a(t,n,e),o=a(t,n,e-1/3));return{r:255*r,g:255*i,b:255*o}}(e.h,r,o),a=!0,s="hsl"),e.hasOwnProperty("a"))&&(n=e.a);return n=f(n),{ok:a,format:e.format||s,r:T(255,j(t.r,0)),g:T(255,j(t.g,0)),b:T(255,j(t.b,0)),a:n}}(e),this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=_(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=_(this._r)),this._g<1&&(this._g=_(this._g)),this._b<1&&(this._b=_(this._b)),this._ok=n.ok,void(this._tc_id=E++)):new u(e,t)}function r(e,t,n){e=h(e,255),t=h(t,255),n=h(n,255);var r,i=j(e,t,n),o=T(e,t,n),a=(i+o)/2;if(i==o)r=l=0;else{var s=i-o,l=.5<a?s/(2-i-o):s/(i+o);switch(i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:l,l:a}}function i(e,t,n){e=h(e,255),t=h(t,255),n=h(n,255);var r,i=j(e,t,n),o=T(e,t,n),a=i,s=i-o,l=0===i?0:s/i;if(i==o)r=0;else{switch(i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:l,v:a}}function t(e,t,n,r){e=[v(_(e).toString(16)),v(_(t).toString(16)),v(_(n).toString(16))];return r&&e[0].charAt(0)==e[0].charAt(1)&&e[1].charAt(0)==e[1].charAt(1)&&e[2].charAt(0)==e[2].charAt(1)?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0):e.join("")}function o(e,t,n,r){return[v(y(r)),v(_(e).toString(16)),v(_(t).toString(16)),v(_(n).toString(16))].join("")}function n(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.s-=t/100,e.s=m(e.s),u(e)}function a(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.s+=t/100,e.s=m(e.s),u(e)}function s(e){return u(e).desaturate(100)}function l(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.l+=t/100,e.l=m(e.l),u(e)}function c(e,t){t=0===t?0:t||10;e=u(e).toRgb();return e.r=j(0,T(255,e.r-_(-t/100*255))),e.g=j(0,T(255,e.g-_(-t/100*255))),e.b=j(0,T(255,e.b-_(-t/100*255))),u(e)}function d(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.l-=t/100,e.l=m(e.l),u(e)}function p(e,t){e=u(e).toHsl(),t=(e.h+t)%360;return e.h=t<0?360+t:t,u(e)}function N(e){e=u(e).toHsl();return e.h=(e.h+180)%360,u(e)}function P(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+120)%360,s:t.s,l:t.l}),u({h:(n+240)%360,s:t.s,l:t.l})]}function D(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+90)%360,s:t.s,l:t.l}),u({h:(n+180)%360,s:t.s,l:t.l}),u({h:(n+270)%360,s:t.s,l:t.l})]}function F(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+72)%360,s:t.s,l:t.l}),u({h:(n+216)%360,s:t.s,l:t.l})]}function V(e,t,n){t=t||6,n=n||30;var r=u(e).toHsl(),i=360/n,o=[u(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(u(r));return o}function H(e,t){t=t||6;for(var e=u(e).toHsv(),n=e.h,r=e.s,i=e.v,o=[],a=1/t;t--;)o.push(u({h:n,s:r,v:i})),i=(i+a)%1;return o}function f(e){return e=parseFloat(e),e=isNaN(e)||e<0||1<e?1:e}function h(e,t){"string"==typeof(n=e)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(e="100%");var n="string"==typeof(n=e)&&-1!=n.indexOf("%");return e=T(t,j(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),$.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function m(e){return T(1,j(0,e))}function g(e){return parseInt(e,16)}function v(e){return 1==e.length?"0"+e:""+e}function x(e){return e=e<=1?100*e+"%":e}function y(e){return $.round(255*parseFloat(e)).toString(16)}function b(e){return g(e)/255}function C(e){return k.CSS_UNIT.exec(e)}var $,S,w,E,_,T,j,R,I,O,A,L,M,k;$=Math,S=/^\s+/,w=/\s+$/,E=0,_=$.round,T=$.min,j=$.max,R=$.random,u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,e=e.b/255,t=t<=.03928?t/12.92:$.pow((.055+t)/1.055,2.4),n=n<=.03928?n/12.92:$.pow((.055+n)/1.055,2.4),e=e<=.03928?e/12.92:$.pow((.055+e)/1.055,2.4);return.2126*t+.7152*n+.0722*e},setAlpha:function(e){return this._a=f(e),this._roundA=_(100*this._a)/100,this},toHsv:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=i(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),e=_(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+e+"%)":"hsva("+t+", "+n+"%, "+e+"%, "+this._roundA+")"},toHsl:function(){var e=r(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=r(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),e=_(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+e+"%)":"hsla("+t+", "+n+"%, "+e+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var t=this._r,n=this._g,r=this._b,i=this._a;return t=[v(_(t).toString(16)),v(_(n).toString(16)),v(_(r).toString(16)),v(y(i))],e&&t[0].charAt(0)==t[0].charAt(1)&&t[1].charAt(0)==t[1].charAt(1)&&t[2].charAt(0)==t[2].charAt(1)&&t[3].charAt(0)==t[3].charAt(1)?t[0].charAt(0)+t[1].charAt(0)+t[2].charAt(0)+t[3].charAt(0):t.join("")},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:_(this._r),g:_(this._g),b:_(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+_(this._r)+", "+_(this._g)+", "+_(this._b)+")":"rgba("+_(this._r)+", "+_(this._g)+", "+_(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:_(100*h(this._r,255))+"%",g:_(100*h(this._g,255))+"%",b:_(100*h(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+_(100*h(this._r,255))+"%, "+_(100*h(this._g,255))+"%, "+_(100*h(this._b,255))+"%)":"rgba("+_(100*h(this._r,255))+"%, "+_(100*h(this._g,255))+"%, "+_(100*h(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&O[t(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+o(this._r,this._g,this._b,this._a),n=t;return"progid:DXImageTransform.Microsoft.gradient("+(this._gradientType?"GradientType = 1, ":"")+"startColorstr="+t+",endColorstr="+(n=e?"#"+o((t=u(e))._r,t._g,t._b,t._a):n)+")"},toString:function(e){var t=!!e,n=(e=e||this._format,!1),r=this._a<1&&0<=this._a;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),(n="hsv"===e?this.toHsvString():n)||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(e,t){e=e.apply(null,[this].concat([].slice.call(t)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(n,arguments)},saturate:function(){return this._applyModification(a,arguments)},greyscale:function(){return this._applyModification(s,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(V,arguments)},complement:function(){return this._applyCombination(N,arguments)},monochromatic:function(){return this._applyCombination(H,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(D,arguments)}},u.fromRatio=function(e,t){if("object"==typeof e){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:x(e[n]));e=r}return u(e,t)},u.equals=function(e,t){return!(!e||!t)&&u(e).toRgbString()==u(t).toRgbString()},u.random=function(){return u.fromRatio({r:R(),g:R(),b:R()})},u.mix=function(e,t,n){n=0===n?0:n||50;e=u(e).toRgb(),t=u(t).toRgb(),n/=100;return u({r:(t.r-e.r)*n+e.r,g:(t.g-e.g)*n+e.g,b:(t.b-e.b)*n+e.b,a:(t.a-e.a)*n+e.a})},u.readability=function(e,t){e=u(e),t=u(t);return($.max(e.getLuminance(),t.getLuminance())+.05)/($.min(e.getLuminance(),t.getLuminance())+.05)},u.isReadable=function(e,t,n){var r=u.readability(e,t),i=!1,e=function(e){var t;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==e&&"large"!==e&&(e="small");return{level:t,size:e}}(n);switch(e.level+e.size){case"AAsmall":case"AAAlarge":i=4.5<=r;break;case"AAlarge":i=3<=r;break;case"AAAsmall":i=7<=r}return i},u.mostReadable=function(e,t,n){for(var r,i=null,o=0,a=(n=n||{}).includeFallbackColors,s=n.level,l=n.size,c=0;c<t.length;c++)o<(r=u.readability(e,t[c]))&&(o=r,i=u(t[c]));return u.isReadable(e,i,{level:s,size:l})||!a?i:(n.includeFallbackColors=!1,u.mostReadable(e,["#fff","#000"],n))},I=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=u.hexNames=function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}(I),L="[\\s|\\(]+("+(A="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+A+")[,|\\s]+("+A+")\\s*\\)?",M="[\\s|\\(]+("+A+")[,|\\s]+("+A+")[,|\\s]+("+A+")[,|\\s]+("+A+")\\s*\\)?",k={CSS_UNIT:new RegExp(A),rgb:new RegExp("rgb"+L),rgba:new RegExp("rgba"+M),hsl:new RegExp("hsl"+L),hsla:new RegExp("hsla"+M),hsv:new RegExp("hsv"+L),hsva:new RegExp("hsva"+M),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/},e.exports?e.exports=u:window.tinycolor=u}(tinycolor$1),tinycolor$1.exports);function __rest$1(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function __awaiter$3(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}const useStyles$2$3=makeStyles()((e,{titleColor:t,logo:n,activeColor:r},i)=>({appBar:{top:0,left:0,right:0,display:"flex",position:"fixed",boxShadow:"none",borderBottom:"0.5px solid "+e.palette.divider,["& ."+i.logo]:{cursor:"pointer","& img":{width:"100%",height:"100%",objectFit:"scale-down",userSelect:"none"}},backgroundColor:e.palette.background.default},menuButton:{display:"flex",justifyContent:"center",alignItems:"center",padding:"0",marginLeft:e.spacing(5)},margin:{marginRight:e.spacing(.4),display:"flex",alignItems:"center"},barIcon:{padding:e.spacing(.8)},iconButton:{padding:0},hamburgerIcon:{padding:e.spacing(1.4),width:32,height:32,WebkitMask:`url("${img$1A}") no-repeat 50% 50%`,backgroundColor:t},appLogo:{display:"inline-block",width:150,height:32,backgroundImage:`url("${n}")`,backgroundRepeat:"no-repeat",backgroundPosition:"left center"},title:{fontStyle:"normal !important",fontWeight:600,fontSize:"18px !important",lineHeight:"22px !important",letterSpacing:"0.225px !important",mixBlendMode:"normal",textTransform:"uppercase",color:t+" important",whiteSpace:"nowrap","&:hover":{cursor:"pointer"}},content:{height:"100%",flexGrow:1,display:"flex",flexWrap:"nowrap",flexDirection:"row",alignItems:"center",padding:e.spacing(0,3.2),"& > div":{display:"flex",flexWrap:"nowrap",flexDirection:"row"},["& ."+i.left]:{justifyContent:"flex-start"},["& ."+i.right]:{justifyContent:"flex-end"},["& ."+i.searchBarHolder]:{flexGrow:1},["& ."+i.appLogo]:{userSelect:"none"},["& ."+i.controllers]:{display:"flex",alignItems:"center"}},iconGroup:{display:"flex",justifyContent:"space-between",alignItems:"center"},iconGroupIcon:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},rightActionLabel:{fontWeight:400,fontSize:14,lineHeight:"16px",textDecoration:"none",color:"white",cursor:"pointer",display:"block"},noSelect:{userSelect:"none"},active:{opacity:1},smallOrgAvatar:{width:"30px !important",height:"30px !important",fontSize:"16px !important"},passive:{opacity:.8},icon:{width:"40px !important",height:"40px !important",padding:0,backgroundPosition:"center",backgroundRepeat:"no-repeat"},logo:{},left:{},right:{},searchBarHolder:{},controllers:{},appIcon:{height:"32px",width:"32px",borderRadius:"50%",marginLeft:e.spacing(4.4),"&:hover":{cursor:"pointer"}},applicationIcon:{WebkitMask:`url("${img$12}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},veritoneLogo:{WebkitMask:`url("${img$1z}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openPanel:{backgroundImage:`url("${img$1d}") !important`},notificationIcon:{WebkitMask:`url("${img$6}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},applicationSettingsIcon:{WebkitMask:`url("${img$1s}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},dashboardIcon:{WebkitMask:`url("${img$8}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openNotificationPanel:{backgroundImage:`url(${img$1c}) !important`},orgIcon:{borderRadius:"50%",width:30,height:30,backgroundRepeat:"no-repeat",backgroundPosition:"center"},logoIcon:{WebkitMask:`url("${n}") no-repeat 50% 50%`,backgroundColor:t},helpIcon:{WebkitMask:`url("${img$7}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openHelp:{backgroundImage:`url(${img$1b}) !important`},orgButton:{padding:e.spacing(2)},panelActive:{borderRadius:"50%",backgroundColor:r},notificationBadge:{"& > span":{top:e.spacing(2),right:e.spacing(2)}},appBarSkeleton:{position:"absolute",zIndex:1005,height:55},marginRightSkeleton:{marginRight:e.spacing(4)},leftContainerSkeleton:{display:"flex",alignItems:"center",paddingLeft:e.spacing(5)}})),useStyles$1$3=makeStyles()((e,t,n)=>({popover:{marginTop:18,["& "+n.helpItemText]:{padding:e.spacing(0),fontSize:15},["& "+n.versionWrapper]:{padding:e.spacing(3.2,0),["& "+n.versionText]:{fontSize:12,color:"#757575"}}},helpItemText:{},versionWrapper:{},versionText:{},help:{},barIcon:{padding:e.spacing(.8)},icon:{width:"40px !important",height:"40px !important",padding:e.spacing(0),backgroundPosition:"center",backgroundRepeat:"no-repeat"},helpIcon:{WebkitMask:`url("${img$7}") no-repeat 50% 50%`,backgroundColor:e.palette.background.default,"&:hover":{backgroundColor:e.palette.background.default}},list:{backgroundColor:e.palette.background.default},popoverColor:{backgroundColor:e.palette.background.default}})),Help=({onOpen:t,onClose:e,helpDocLink:n,helpDocCallback:r,supportCallback:i,displaySupportChat:o,displayChatWithSupport:a,desktopIconStyle:s})=>{var l=useStyles$1$3()["classes"];const[c,u]=react.exports.useState(null);const d=()=>{u(null),null!=e&&e()};var p=n||r,f=null==(f=window.config)?void 0:f.appVersion;return jsxRuntime.exports.jsxs("div",Object.assign({className:l.help},{children:[jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.KrqRIg",defaultMessage:"Help Center",description:"appbar tooltip: help-center button text"}),"aria-label":"help"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:l.barIcon,onClick:e=>{u(e.currentTarget),null!=t&&t()},"data-veritone-element":"help-button","data-testid":"help-button","aria-label":"help",size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(l.icon,l.helpIcon),style:s})}))})),jsxRuntime.exports.jsx(Popover$1,Object.assign({open:Boolean(c),anchorEl:c,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},onClose:d,className:l.popover,classes:{paper:l.popoverColor},disableScrollLock:!0},{children:jsxRuntime.exports.jsxs(List$2,Object.assign({disablePadding:!0,className:l.list},{children:[p&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{d(),null!=r&&r(),n&&window.open(n,"_blank")},"data-veritone-element":"show-help-doc-button","data-testid":"show-help-doc-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(AppBarArticleIcon,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.MSM3Vh",defaultMessage:"View Help Docs",description:"help tooltip: text for documentation"}),classes:{root:l.helpItemText}})]})),a&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{null!=i&&i(),sdkEventManager.dispatch(SdkEvents.openSupport),u(null)},"data-veritone-element":"open-chat-with-support-button","data-testid":"app-bar-show-chat-with-support-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(Chat,{fontSize:"small"})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-chat-with-support.MBM3Vh2",defaultMessage:"Chat with Support",description:"help tooltip: salesforce chat with support"}),classes:{root:l.helpItemText}})]})),o&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{null!=i&&i(),u(null)},"data-veritone-element":"open-support-chat-button","data-testid":"support-chat-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(AppBarInAppGuidance,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.8aLpuV",defaultMessage:"In-App Guidance",description:"help tooltip: text for documentation"}),classes:{root:l.helpItemText}})]})),f&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(ListItem$1,Object.assign({className:l.versionWrapper},{children:jsxRuntime.exports.jsx(ListItemText$1,{primary:f,classes:{primary:l.versionText}})}))]})]}))}))]}))},namespace$5="users",userSelector=e=>null==e?void 0:e.aiWareHeaderBar,rootSelector=e=>e,notificationStatusSelector=e=>null!=e&&e.osNotificationPanel?null==e?void 0:e.osNotificationPanel.status:"",useStyles$k=makeStyles()(e=>({title:{paddingTop:e.spacing(5.5)},contentText:{fontSize:14},dialogActions:{marginBottom:e.spacing(3),paddingRight:e.spacing(5)},signOutButton:{height:34,marginRight:e.spacing(1)},staySignedInButton:{height:34}})),LOGOUT_CALL_LIMIT=1;let logoutCallCounter=0;const RESET_IDLE_TIMER_CALL_LIMIT=1,MINUTES_BEFORE_SESSION_EXPIRATION=3;let timer;const SessionTimeout=e=>{const t=e["test"],n=useDispatch();e=useStyles$k().classes;const r=useSelector(isIdleSelector);var i=useSelector(userSelector$2);const o=useSelector(sessionTokenSelector),a=useSelector(loginUrlSelector),s=useSelector(callLogoutSelector),l=useSelector(clickedLogoutSelector),c=null==i?void 0:i.tokenExpiration,u=useSelector(callResetIdleTimerSelector);i=useSelector(sessionTimeoutSelector)||60;const d=useSelector(reloadPageSelector),p=useSelector(resetIdleTimerCallCounterSelector),[f,h]=react.exports.useState(t?5:60),[m,g]=react.exports.useState(new Date),[v,x]=react.exports.useState(),[y,b]=react.exports.useState(),[C,S]=react.exports.useState(!1),[w,E]=react.exports.useState(!1),_=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setIsIdle,value:e,ephemeral:!0,contentType:"json"}))},[n]),T=(react.exports.useEffect(()=>{n(getSessionTimeout(o))},[]),react.exports.useEffect(()=>{d&&window.location.replace("/")},[d]),react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setCallLogout,value:e,ephemeral:!0,contentType:"json"}))},[n])),j=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setClickedLogout,value:e,ephemeral:!0,contentType:"json"}))},[n]),R=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setCallResetIdleTimer,value:e,ephemeral:!0,contentType:"json"}))},[n]),I=react.exports.useCallback(()=>{logoutCallCounter++,T(!0);var e=l?500:5e3;n(logoutRequest({token:o})),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},t?2e3:e)},[T,n,o,a,l]);var O=react.exports.useCallback(()=>{logoutCallCounter++,_(!1),setTimeout(()=>{T(!0),j(!0),n(logoutRequest({token:o}))},500),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},500)},[T,n,o,a,j,_]);var A=()=>{_(!0),clearInterval(timer),timer=setInterval(()=>{h(e=>e-1)},1e3)},L=()=>{!r&&p<RESET_IDLE_TIMER_CALL_LIMIT&&R(!0)};const M=$(t?{timeout:5e3,onIdle:A,onAction:L,debounce:1e3,crossTab:!0,syncTimers:200}:{timeout:6e4*i,onIdle:A,onAction:L,debounce:i/4*6e4,crossTab:!0,syncTimers:200})["reset"],k=react.exports.useCallback(()=>{R(!1),M()},[R]),N=react.exports.useCallback(()=>{w&&(n(extendTokenRequest({token:o})),E(!1)),_(!1),k(),clearInterval(timer),setTimeout(()=>{h(t?5:60)},500)},[_,k,w,n,o]);return react.exports.useEffect(()=>{setTimeout(()=>{g(new Date)},1e3)},[m]),react.exports.useEffect(()=>{var e;c&&((e=new Date(c)).setMinutes(e.getMinutes()-MINUTES_BEFORE_SESSION_EXPIRATION),b(new Date(c)),x(e))},[c]),react.exports.useEffect(()=>{y&&y.getTime()<m.getTime()&&S(!0),v&&v.getTime()<m.getTime()&&E(!0)},[y,v,m]),react.exports.useEffect(()=>{C?I():w&&_(!0)},[y,v,w,C,I,_]),react.exports.useEffect(()=>{s&&logoutCallCounter<LOGOUT_CALL_LIMIT&&I()},[s,I]),react.exports.useEffect(()=>{r&&0===f&&(clearInterval(timer),setTimeout(()=>{h(10)},500),I())},[f,I,r]),react.exports.useEffect(()=>{!r&&u&&p===RESET_IDLE_TIMER_CALL_LIMIT&&k()},[u,r,p,k]),react.exports.useEffect(()=>{r||N()},[r,N]),jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:r&&!l,"aria-labelledby":"session timeout dialog","aria-describedby":"session timeout dialog",disableEscapeKeyDown:!0,maxWidth:"xs","data-test":"session-timeout-dialog"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"session timeout dialog title",className:e.title},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.JEUssf",defaultMessage:"Session Timeout",description:"label session timeout dialog"})})),jsxRuntime.exports.jsx(DialogContent$1,{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"session timeout dialog text",className:e.contentText},{children:s?l?null:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.l85HEz",defaultMessage:"You have been signed due to inactivity or due to your session being expired.",description:"signed out message"}):w?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.bDessH",defaultMessage:"Your session will expire soon. For your security, we'll automatically sign you out in {signOutTimer} seconds. Choose 'Stay Signed In' to continue or 'Sign Out' if you're done.",description:"label for idle warning expiring soon",values:{signOutTimer:f}}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.Ca6Qq0",defaultMessage:"You've been inactive for a while. For your security, we'll automatically sign you out in {signOutTimer} seconds. Choose 'Stay Signed In' to continue or 'Sign Out' if you're done.",description:"label for idle warning inactive for a while",values:{signOutTimer:f}})}))}),s?null:jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:e.dialogActions},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:O,color:"primary",variant:"outlined",className:e.signOutButton,"data-test":"sign-out-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.jN92ox",defaultMessage:"Sign Out",description:"label for sign out button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:N,color:"primary",variant:"contained",className:e.staySignedInButton,"data-test":"stay-signed-in-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.WvKhS2",defaultMessage:"Stay Signed In",description:"label for stay signed in button"})}))]}))]}))})})},appBarHeight=55,defaultAppBarZIndex=0,VERITONE_PANEL_ID="VERITONE_PANEL_ID",ORGANIZATION_PANEL_ID="ORGANIZATION_PANEL_ID",NOTIFICATION_PANEL_ID="NOTIFICATION_PANEL_ID",APPLICATION_PANEL_ID="APPLICATION_PANEL_ID",HELP_PANEL_ID="HELP_PANEL_ID",USER_APPLICATION_SETTINGS_PANEL="USER_APPLICATION_SETTINGS_PANEL",NOTIFICATION_BADGE_MAX_COUNT=20,getUserInfo=({appIcon:e="",currentUser:t})=>({appIcon:e,currentUser:null!=t&&t.organization?t:void 0});function NewAppBar({isEnableOrgPanel:e,zIndex:t=defaultAppBarZIndex,leftNav:n,onClickAppbarMenu:r,logoSrc:i,backgroundColor:o="rgb(32.9, 43.1, 47.8)",iconColor:a,title:s,help:l,notification:c=!0,userApplicationSettingsIcon:u,onClickOrgIcon:d,closeButton:p,onCloseSetting:f,onClose:h,onOpenSetting:m,onOpenHelpCenter:g,onOpenNotification:v,onOpenUserApplicationSettings:x,openSetting:y,organization:b={},panels:C=[],unseenCount:$,searchBarMountId:S,textColor:w,rightActions:E=[],applications:_=[],onClickAppSwitchIcon:T,displaySupportChat:j=!0,onDashboardClick:R,showDashboardIcon:I=!1,displayChatWithSupport:O=!0,disableGoHome:A}){var L=tinycolor(o).isDark(),w=w||(L?"#fff":"#000"),L=L?"rgba(255,255,255,0.1)":"rgb(243,245,249)";const M=useStyles$2$3({titleColor:w,logo:i,activeColor:L})["classes"],[k,N]=react.exports.useState([]);L=useSelector(userSelector)||{};const[P,D]=react.exports.useState(!0);var{appIcon:L,currentUser:F}=getUserInfo(L),V=useSelector(betaFeaturesSelector);react.exports.useEffect(()=>("true"===localStorage.getItem("DEBUG")&&console.log("AppBar mounted"),()=>{"true"===localStorage.getItem("DEBUG")&&console.log("AppBar unmounted")}),[]),react.exports.useEffect(()=>{var e=C.map(e=>e.panelId);!e.length&&!k.length||isEqual$3(e,k)||N(e)},[C,k]);a={background:a||void 0};return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SessionTimeout,{}),jsxRuntime.exports.jsx("div",{style:{height:appBarHeight}}),jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"appbar",className:M.appBar,style:{height:appBarHeight,background:o,zIndex:t}},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:M.menuButton},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-menu","data-testid":"app-bar-menu",className:M.iconButton,onClick:r,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.hamburgerIcon)})}))})),!!L&&""!==L&&jsxRuntime.exports.jsx("div",Object.assign({className:M.margin},{children:jsxRuntime.exports.jsx("img",{className:M.appIcon,src:L,alt:"appIcon"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:M.content,style:{color:w}},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.left,M.noSelect),onClick:A?void 0:function(){window.location.href="/"},"data-test":"appbarTitle","data-testid":"appbarTitle"},{children:i?jsxRuntime.exports.jsx("span",{className:M.appLogo}):jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:M.title},{children:s}))})),jsxRuntime.exports.jsx("div",{"data-test":"appbarSearch",id:S||"search-bar-id",className:M.searchBarHolder}),jsxRuntime.exports.jsx("div",Object.assign({className:M.right},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:M.controllers},{children:[0<E.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.iconGroup,M.noSelect)},{children:E.map(({label:e,onClick:t,isActive:n=!0},r)=>jsxRuntime.exports.jsx("div",Object.assign({className:M.iconGroupIcon},{children:jsxRuntime.exports.jsx("span",{onClick:e=>t?t(e):null,className:classNames(M.rightActionLabel,n?M.active:M.passive),dangerouslySetInnerHTML:{__html:e}})}),"label-"+r))})),I&&jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.dashboard-button",defaultMessage:"aiWARE Dashboard",description:"aiWARE Dashboard label"}),"aria-label":"dashboard"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-dashboard-button",className:M.barIcon,onClick:R,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.dashboardIcon),style:a})}))})),l&&jsxRuntime.exports.jsx("div",Object.assign({"data-test":"app-bar-help-container","data-testid":"app-bar-help-container",className:classNames(M.margin,{[M.panelActive]:k.includes(HELP_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Help,{tooltipTitle:"",helpDocLabel:"View Help Docs",chatWithSupportLabel:"Chat with Support",supportLabel:"In-App Guidance",helpDocCallback:()=>{null!=g&&g()},supportCallback:f,titleColor:w,displaySupportChat:j,displayChatWithSupport:O,desktopIconStyle:a})})),c&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.margin,{[M.panelActive]:k.includes(NOTIFICATION_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.KFXxNr",defaultMessage:"Notifications",description:"appbar tooltip: notification button text"}),"aria-label":"notifications"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:M.barIcon,onClick:v,"data-test":"app-bar-notification-button",size:"large","data-testid":"app-bar-notification-button"},{children:jsxRuntime.exports.jsx(Badge$1,Object.assign({badgeContent:$,max:NOTIFICATION_BADGE_MAX_COUNT,color:"primary","data-test":"app-bar-notification-badge",className:M.notificationBadge},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.notificationIcon,{[M.openNotificationPanel]:null==y?void 0:y.openNotificationPanel}),style:a})}))}))}))})),V&&u&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.margin,{[M.panelActive]:k.includes(USER_APPLICATION_SETTINGS_PANEL)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.application-settings-button",defaultMessage:"Application Settings",description:"appbar tooltip: application settings button text"}),"aria-label":"application-settings"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:M.barIcon,onClick:x,size:"large","data-testid":"app-bar-user-application-settings-button"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.applicationSettingsIcon)})}))}))})),1<_.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames({[M.panelActive]:k.includes(APPLICATION_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.3v499g",defaultMessage:"Applications",description:"applications tooltip: text for applications button"}),"aria-label":"applications"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-switch-app-button",className:M.barIcon,onClick:T,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.applicationIcon,{[M.openPanel]:null==y?void 0:y.openAppSwitchPanel}),style:a})}))}))})),(b.imageUrl||b.name)&&e&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames(M.margin,{[M.panelActive]:k.includes(ORGANIZATION_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.7qOwBg",defaultMessage:"Organization",description:"organization tooltip: text for documentation"}),"aria-label":"organization"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-org-button",className:M.barIcon+" "+M.orgButton,onClick:d,size:"large"},{children:b.imageUrl&&P?jsxRuntime.exports.jsx("img",{src:b.imageUrl,className:classNames(M.orgIcon),onError:function(){D(!1)},alt:"org_icon"}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:M.smallOrgAvatar,variant:"circular","data-testid":"app-bar-avatar"},{children:getSortName(b.name||"")}))}))}))})),F&&jsxRuntime.exports.jsx("div",Object.assign({className:classNames({[M.panelActive]:k.includes(VERITONE_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.eOxvvM",defaultMessage:"Utilities",description:"utilities tooltip: text for documentation"}),"aria-label":"utilities"},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-setting-button","data-testid":"app-bar-setting-button",className:M.barIcon,onClick:m,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classNames(M.icon,M.veritoneLogo,{[M.openPanel]:null==y?void 0:y.openVeritonePanel}),style:a})}))}))})),p&&h&&jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("div",Object.assign({style:{marginLeft:"auto"}},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:h,"data-test":"app-bar-close-button",size:"large","data-testid":"app-bar-close-button"},{children:jsxRuntime.exports.jsx(default_1$6,{htmlColor:w})}))}))})]}))}))]}))]}))]})}const GET_CURRENT_USER=`os-app-bar/${namespace$5}/get current user`,GET_CURRENT_USER_SUCCESS=`os-app-bar/${namespace$5}/get current user success`,GET_CURRENT_USER_FAIL=`os-app-bar/${namespace$5}/get current user fail`,GET_CURRENT_APP_ICON=`os-app-bar/${namespace$5}/get current app icon`,GET_CURRENT_APP_ICON_SUCCESS=`os-app-bar/${namespace$5}/get app icon success`,getCurrentUser=()=>({type:GET_CURRENT_USER}),getCurrentUserFail=()=>({type:GET_CURRENT_USER_FAIL}),getCurrentUserSuccess=e=>({type:GET_CURRENT_USER_SUCCESS,payload:e}),getCurrentAppIcon=({applicationId:e})=>({type:GET_CURRENT_APP_ICON,payload:{applicationId:e}}),getCurrentAppIconSuccess=e=>({type:GET_CURRENT_APP_ICON_SUCCESS,payload:e}),initialState$5={currentUser:{},fetched:!1,fetching:!1,error:!1};function userReducer(e,t){if(void 0===e)return initialState$5;switch(t.type){case GET_CURRENT_USER_FAIL:return Object.assign(Object.assign({},e),{fetching:!1,fetched:!0,error:!0});case GET_CURRENT_USER_SUCCESS:return Object.assign(Object.assign({},e),{currentUser:t.payload,fetching:!1,fetched:!0,error:!1});case GET_CURRENT_APP_ICON_SUCCESS:return Object.assign(Object.assign({},e),{appIcon:t.payload});default:return e}}const nameSpace$1="aiWareHeaderBar",BOOTING="APP_BAR/booting",BOOTED="APP_BAR/booted",onBooted=()=>({type:BOOTED}),getApplicationInfo=(t,n,r)=>__awaiter$3(void 0,void 0,void 0,function*(){var e=`
|
|
1436
1436
|
query {
|
|
1437
1437
|
application(id:"${t}"){
|
|
1438
1438
|
iconUrl
|
|
@@ -1475,7 +1475,7 @@ createScheduledJob(input:{
|
|
|
1475
1475
|
100% {
|
|
1476
1476
|
opacity: 0;
|
|
1477
1477
|
}
|
|
1478
|
-
`),useStyles$2$1=makeStyles()(()=>({fullScreen:{position:"fixed",width:"100%",height:"100vh",top:"0",left:"0",backgroundColor:"#ffffff",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center",fontSize:"14px",zIndex:99999,animation:fadeInOut+" 5s linear forwards"},loaderBox:{height:"200px",width:"200px"},veritoneDarkLogo:{height:"200px",width:"200px"}})),useStyles$1$1=makeStyles()(e=>({flexContainer:{display:"flex",alignItems:"center"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",padding:e.spacing(6,0,6,6),borderBottom:"1px solid rgb(219, 226, 234)"},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},title:{color:"#2A323C"},panelRoot:{padding:"15px",height:"calc(100% - 70px);",overflowY:"scroll"},row:{display:"flex","& svg":{marginRight:"12px",marginBottom:"24px"}},widgets:{"& svg":{fill:"#555F7C"}},veriLogo:{transform:"translate(3px, 2px)"},versionText:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",marginBottom:"5px"},wrapperBox:{padding:"15px 0 15px 0px",marginBottom:"14px"},aiwareLogo:{marginBottom:"10px",marginTop:"10px",width:"151px"},boldTitle:{fontWeight:700},gridBox:{background:"#F7F7F7",padding:"10px",color:"#2A323C"},imageContainer:{textAlign:"center"},falconLogo:{width:"148px"},osInfo:{display:"flex",justifyContent:"center","& *":{textAlign:"center"}},osName:{padding:"5px 8px",background:"#465364",color:"white",textTransform:"uppercase",fontWeight:"700",borderRadius:"4px"},osVersion:{color:"#5C6269"}})),versionPanelLabels=e=>({closePanelTooltip:e.formatMessage({id:"version-panel.header.close-btn-tooltip",defaultMessage:[{type:0,value:"Close panel"}]}),versionInformationLabel:e.formatMessage({id:"version-panel.version-information-title",defaultMessage:[{type:0,value:"Version Information"}]}),versionLabel:e.formatMessage({id:"version-panel.version-title",defaultMessage:[{type:0,value:"Version"}]}),viewReleaseNotes:e.formatMessage({id:"version-panel.view-release-notes",defaultMessage:[{type:0,value:"View Release Notes"}]}),noVersionInfo:e.formatMessage({id:"version-panel.no-info-label",defaultMessage:[{type:0,value:"Cannot get version information"}]})}),Header$1=()=>{const e=useDispatch();var t=useStyles$1$1()["classes"],n=useIntl(),{versionInformationLabel:n,closePanelTooltip:r}=versionPanelLabels(n);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-testid":"create-or-update-token-panel.header"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-testid":"permissions-panel-header-title",className:t.title},{children:n})),jsxRuntime.exports.jsx("div",Object.assign({className:t.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:r},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>e(hidePanel$1(VERSION_PANEL)),"aria-labelledby":"version-panel.close-button","data-testid":"version-panel.close-button",size:"large"},{children:jsxRuntime.exports.jsx(Close$1,{})}))}))}))]}))},VERSION_PANEL="VERSION_PANEL",VersionChangelogNullState=({label:e})=>{var t=useStyles$1$1()["classes"];return jsxRuntime.exports.jsx(Box$1,Object.assign({className:t.gridBox,sx:{fontWeight:700,textAlign:"center",mb:"5px"}},{children:e}))},VersionPanelComponent=({sdk:e,edge:t,core:n})=>{const r=useStyles$1$1()["classes"];var i=useIntl();const{versionLabel:o,viewReleaseNotes:a,noVersionInfo:s}=versionPanelLabels(i);i=useSelector(betaFeaturesSelector);const l={sdk:e,edge:t,core:n};var c=jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osInfo},{children:jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osName},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{fontWeight:700}},{children:"Falcon"}))})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osVersion},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"caption"},{children:[o," 2.0"]}))}))]})}));return jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Header$1,{}),jsxRuntime.exports.jsxs("div",Object.assign({className:r.panelRoot},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.wrapperBox},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{p:"20px"}},{children:[i&&(e||t||n)&&jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.imageContainer},{children:jsxRuntime.exports.jsx("img",{src:img,className:r.falconLogo,alt:"system-logo"})})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.imageContainer},{children:jsxRuntime.exports.jsx("img",{src:img$1,className:r.aiwareLogo,alt:"aiware-logo"})})),i&&(e||t||n)&&c]})),e||t||n?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{mt:"10px"}},{children:Object.keys(l).map(e=>l[e]?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:9,sx:{p:"2px"}},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.gridBox,sx:{fontWeight:700}},{children:[e.charAt(0).toUpperCase()+e.slice(1)," ",o,":"]}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:3,sx:{p:"2px"}},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.gridBox},{children:l[e]}))}))]}):null)})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:s})]})),i&&jsxRuntime.exports.jsx(Button$1,Object.assign({sx:{width:"100%",cursor:"pointer"},variant:"outlined",onClick:()=>{}},{children:a}))]}))]})},VersionPanel=e=>jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(VersionPanelComponent,Object.assign({},e))})),dateFormatter=e=>{e=new Date(e||"");return(8<e.getMonth()?e.getMonth()+1:"0"+(e.getMonth()+1))+"/"+(9<e.getDate()?e.getDate():"0"+e.getDate())+"/"+e.getFullYear()};let lottieScript,audio;const theme=createTheme({palette:{secondary:{main:"#1871E8"}}}),Logo_=({intl:n})=>{const r=useDispatch();var e=useStyles$2$1()["classes"];const[i,o]=react.exports.useState(0),[t,a]=react.exports.useState(!1),[s,l]=react.exports.useState(!1),c=jsxRuntime.exports.jsx("p",Object.assign({style:{pointerEvents:"none"}},{children:"Loading Beta Features"})),[u,d]=react.exports.useState(c),p=useSelector(organizations_selector.selectOrgSwitchInitiated),f=useSelector(e=>{return null==(e=null==(e=null==e?void 0:e.configs)?void 0:e.initConfig)?void 0:e.betaFeatures}),[h,m]=react.exports.useState(!1),[g,v]=react.exports.useState(""),[x,y]=react.exports.useState(""),[b,C]=react.exports.useState(""),[$,S]=react.exports.useState(!1);react.exports.useEffect(()=>{h||(m(!0),(lottieScript=document.createElement("script")).setAttribute("src","https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.7.8/lottie.min.js"),lottieScript.onload=()=>l(!0),(audio=document.createElement("audio")).id="player",audio.src="https://static.veritone.com/aiware-js-animation/sound-effects/chime.wav",document.head.appendChild(lottieScript),document.body.appendChild(audio)),has_1(window,"aiware.version")&&((t=null==(t=window.aiware)?void 0:t.version)&&"undefined"!==t&&v(t),t=null==(t=window.aiware)?void 0:t.releaseDate,y(dateFormatter(t)));var t=document.getElementsByTagName("script");if(t.length){let e=Array.from(t).find(e=>e.src.includes("get.aiware.com"));(e=e||Array.from(t).find(e=>e.src.includes("https://cdn.jsdelivr.net/npm/aiware-js")))&&fetch(e.getAttribute("src")).then(e=>{v(e.url.split("@")[1].split("/")[0])})}fetch("https://get.aiware.com/aiware-versions/aiware-latest.txt",{headers:{"Content-Type":"text/plain"}}).then(e=>e.text()).then(e=>C(e))},[]),react.exports.useEffect(()=>{if(f&&!p)return;p&&d(jsxRuntime.exports.jsx("p",{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-organization-panel.organizations-switching-loader-message",defaultMessage:"Changing your Organization",description:"organizations switching loader message"})}));const e=10===i;if((e||p)&&(a(!0),s)){const t=window.bodymovin.loadAnimation({container:document.getElementById("loaderAnimation"),path:"https://static.veritone.com/aiware-js-animation/particle-explosion.json",renderer:"svg",loop:!1,autoplay:!0,name:"unicorn"});t.onComplete=()=>{e?(r(enableBetaFeatures()),o(0)):p&&d(c),a(!1),t.destroy()},null!==audio&&void 0!==audio&&audio.play()}},[i,f,r,t,p]);return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[t&&jsxRuntime.exports.jsxs("div",Object.assign({className:e.fullScreen},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.loaderBox,id:"loaderAnimation"},{children:!s&&jsxRuntime.exports.jsx("img",{src:img$5,alt:"veritone-logo",className:e.veritoneDarkLogo})})),jsxRuntime.exports.jsxs("div",Object.assign({className:e.loaderBox},{children:[jsxRuntime.exports.jsx(StyledEngineProvider,Object.assign({injectFirst:!0},{children:jsxRuntime.exports.jsx(ThemeProvider,Object.assign({theme:theme},{children:jsxRuntime.exports.jsx(LinearProgress$1,{color:"secondary"})}))})),u]}))]})),jsxRuntime.exports.jsxs("div",{children:[g?jsxRuntime.exports.jsxs(Typography$1,Object.assign({sx:{color:"#9CA8B4",fontSize:"10px",textAlign:"center",cursor:"pointer",width:"60px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},onClick:()=>{var e,t;$?(S(!1),r(hidePanel$1(VERSION_PANEL))):(S(!0),e={name:VERSION_PANEL,config:{name:"Version Information",sdk:g,sdkRelease:x,edge:b}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"small",zIndex:1001,dimmed:0,borderBottom:!0,header:{title:n.formatMessage({id:"os-panel.version-information.panel-header",defaultMessage:[{type:0,value:"Version Information"}]})}},r(mountPanel$1({panelId:VERSION_PANEL,microFrontend:e,panelConfig:t})))}},{children:["V. ",g]})):null,jsxRuntime.exports.jsx("img",{onClick:()=>o(i+1),src:img$A,alt:"footer-icon",draggable:"false"})]})]})},Logo=injectIntl(Logo_);function getTabAction(e,t,n,r="APP_BAR_PANEL"){return{type:mountPanel$1({}).type,payload:{panelId:e,microFrontend:{name:r,config:{name:"Veritone",tabId:e,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,fullScreen:!1,width:n,header:{divider:!0,title:t}}}}}const tabsListDefault=[{id:TabId.PERSONAL_PANEL,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.personalProfile",defaultMessage:"Personal Profile",description:"Tooltip pops on the sidebar for personal profile"}),iconComponent:jsxRuntime.exports.jsx(PersonalProfile$1,{}),role:"",action:getTabAction(TabId.PERSONAL_PANEL,jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.panelTitle.personalProfile",defaultMessage:"Personal Profile",description:"Header title for personal profile"}),410)},{id:TabId.ORGANIZATION_PANEL,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.organizations",defaultMessage:"Organizations",description:"Tooltip pops on the sidebar for organizations"}),iconComponent:jsxRuntime.exports.jsx(Organizations,{}),role:"",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.ORGANIZATION_PANEL,microFrontend:{name:"ORGANIZATION_PANEL"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,width:560,zIndex:1e3}}}},{id:TabId.CMS_SHORTCUT,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dataCenter",defaultMessage:"Data Center",description:"Tooltip pops on the sidebar for data center"}),iconComponent:jsxRuntime.exports.jsx(DataCenter,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"cms"}},{id:TabId.DATA_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dataCenter",defaultMessage:"Data Center",description:"Tooltip pops on the sidebar for data center"}),iconComponent:jsxRuntime.exports.jsx(DataCenter,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.DATA_CENTER,microFrontend:{name:"DATA_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.PROCESSING_CENTER_BROWSE,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.processingCenter",defaultMessage:"Processing Center",description:"Tooltip pops on the sidebar for processing center"}),iconComponent:jsxRuntime.exports.jsx(Process,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.PROCESSING_CENTER_BROWSE,microFrontend:{name:"PROCESSING_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge",zIndex:1e3}}}},{id:TabId.FLOW_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.flowCenter",defaultMessage:"Flow Center",description:"Tooltip pops on the sidebar for flow center"}),iconComponent:jsxRuntime.exports.jsx(FlowCenter2,{}),role:"automate",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.FLOW_CENTER,microFrontend:{name:"FLOW_CENTER",config:{name:"Veritone",tabId:TabId.FLOW_CENTER,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",zIndex:1200}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge"}}}},{id:TabId.ENGINE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.developerCenter",defaultMessage:"Developer Center",description:"Tooltip pops on the sidebar for developer center"}),iconComponent:jsxRuntime.exports.jsx(DeveloperCenter,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"developer"}},{id:TabId.MARKETPLACE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.marketplaceCenter",defaultMessage:"Marketplace",description:"Tooltip pops on the sidebar for marketplace center"}),iconComponent:jsxRuntime.exports.jsx(Marketplace$1,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"marketplace"}},{id:TabId.LIBRARY_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.libraryCenter",defaultMessage:"Library Center",description:"Tooltip pops on the sidebar for library center"}),iconComponent:jsxRuntime.exports.jsx(LibraryCenter,{}),role:"",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"libray"}},{id:TabId.ADMIN_SHORTCUT,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.adminCenter",defaultMessage:"Admin Center",description:"Tooltip pops on the sidebar for admin center"}),iconComponent:jsxRuntime.exports.jsx(AdminCenter,{}),role:"admin",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.ADMIN_SHORTCUT,microFrontend:{name:"ADMIN_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.INSTANCE_ADMIN_CENTER_BROWSE,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.instanceAdminCenter",defaultMessage:"Instance Admin Center",description:"Tooltip pops on the sidebar for instance admin center"}),iconComponent:jsxRuntime.exports.jsx(AdminTabIcon,{}),role:"admin",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.INSTANCE_ADMIN_CENTER_BROWSE,microFrontend:{name:"INSTANCE_ADMIN_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.RESOURCE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.resourceCenter",defaultMessage:"Resource Center",description:"Tooltip pops on the sidebar for resource center"}),iconComponent:jsxRuntime.exports.jsx(Resources$1,{}),role:"",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.RESOURCE_CENTER,microFrontend:{name:"RESOURCE_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge",zIndex:1e3}}}},{id:TabId.PROCESSING_CENTER_DAG_BUILDER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dagBuilder",defaultMessage:"DAG Builder (Beta)",description:"Tooltip pops on the sidebar for dag builder"}),iconComponent:jsxRuntime.exports.jsx(DagBuilder,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.PROCESSING_CENTER_DAG_BUILDER,microFrontend:{name:"PROCESSING_CENTER_DAG_BUILDER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}}];function AppbarTabPanel({panelId:t,children:e,withTab:r=!0,withChild:n=!0}){const i=useDispatch(),[o,a]=react.exports.useState(),[s,l]=react.exports.useState([]),[c,u]=react.exports.useState(!1);var d=useSelector(e=>e.panels.find(e=>e.panelId===t))||{};const p=useSelector(e=>e.panels);const{microFrontend:f,panelConfig:h}=d,{minWidth:m,padding:g=0,header:v,footer:x,marginTop:y=0,marginStart:b=0,show:C,tabs:$=[],zIndex:S=1e3,userRoles:w=[],panelId:E,size:_,fullScreen:T,width:j,dimmed:R=0,parentPanelId:I,borderBottom:O}=h||{};const A=I?("ORGANIZATION_PANEL"!==I?"":"solid 5px #4D81B7")||("DATA_CENTER"!==I?"":"solid 5px #4D81B7"):"solid 5px #4D81B7",L=makeStyles()(e=>{return{container:{position:"fixed",top:y,right:T?0:b,height:`calc(100vh - ${y}px)`,minWidth:m,width:j||(T?"100%":function(){switch(_){case"xxlarge":return 1280;case"xlarge":return 1020;case"large":return 720;case"medium":return 560;case"small":return 380;default:return 560}}()),borderBottom:O?"solid 5px #4D81B7":A,zIndex:T?1500:S,transitionTimingFunction:"ease-in-out !important"},padding:{padding:e.spacing(g),paddingTop:e.spacing(g/2)},margin:{margin:e.spacing()},headerContainer:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},headerTitle:{margin:e.spacing(),marginTop:e.spacing(2)},actionButton:{margin:e.spacing()},footer:{},actionContainer:{"&:last-child":{marginRight:e.spacing(2)}},content:{overflow:"overlay",overflowX:"hidden",height:(t=v?64:0,n=x?64:0,`calc(100vh - ${y}px - ${t}px - ${n}px - 5px)`)},paperContainer:{top:56,backgroundColor:"unset !important",boxShadow:"none"},tabContainer:{overflow:"hidden",width:"100%"},tabSelect:{paddingTop:e.spacing(6),width:80,display:"flex",flexDirection:"column"},drawerContainer:{display:"flex",background:e.palette.background.default},tabName:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"61px",padding:e.spacing(0,4,0,6)},actionIcons:{margin:e.spacing(-2.4)},title:{userSelect:"none",fontStyle:"normal",fontSize:"18px",lineHeight:e.spacing(5),letterSpacing:"0.25px",textTransform:"uppercase",color:e.palette.text.secondary},tabContent:{borderRight:r?"0.5px solid "+e.palette.divider:"none",overflowY:"auto",overflowX:"hidden",width:"100%"},buttonAction:{textTransform:"unset"},aiWareIcon:{padding:e.spacing(2.4,0),display:"flex",justifyContent:"center",position:"fixed",bottom:"0",right:"10px"},noShadow:{boxShadow:"none",borderLeft:"0.5px solid "+e.palette.divider},panelMask:{position:"absolute",zIndex:1150,width:"100%",height:"100%",backgroundColor:e.palette.grey[50],opacity:.5}};var t,n})()["classes"];react.exports.useEffect(()=>{0<$.length?l([...tabsListDefault,...$]):l(tabsListDefault)},[$]),react.exports.useEffect(()=>{var e;null!==f&&void 0!==f&&f.config&&null!=(e=f.config)&&e.tabId&&a(f.config.tabId)},[f]),react.exports.useEffect(()=>{0<p.length&&o&&r&&(p.find(e=>e.panelId===o)||a(void 0))},[p,o,r]);n=jsxRuntime.exports.jsxs(Paper$1,Object.assign({className:`${L.container} ${n?"":L.noShadow} `,elevation:3,id:t,square:!0,"data-test":"panel-"+(E||"unknown")},{children:[0<R&&jsxRuntime.exports.jsx("div",{className:L.panelMask}),jsxRuntime.exports.jsxs("div",Object.assign({className:L.drawerContainer},{children:[n&&jsxRuntime.exports.jsxs("div",Object.assign({className:L.tabContent},{children:[v&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:L.tabName},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:L.title},{children:v.title||(null==(d=s.find(e=>e.id===o))?void 0:d.label)})),jsxRuntime.exports.jsxs("div",Object.assign({className:L.actionIcons},{children:[null==(n=v.actions)?void 0:n.map(e=>e.label?jsxRuntime.exports.jsx(Button$1,Object.assign({size:e.size,variant:e.variant,onClick:()=>i(e.action)},{children:e.label}),e.action.type):jsxRuntime.exports.jsxs(IconButton$1,Object.assign({onClick:()=>i(e.action),size:"large"},{children:[e.iconUrl&&jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"icon",draggable:"false"}),e.icon&&jsxRuntime.exports.jsx("div",{children:e.icon})]}),e.action.type)),jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>i(hidePanel$1(t)),"data-test":"close-button-"+t,size:"large"},{children:jsxRuntime.exports.jsx("img",{src:I?img$T:img$U,alt:"icon",draggable:"false"})}))]}))]})),v.divider&&jsxRuntime.exports.jsx(Divider$1,{})]}),jsxRuntime.exports.jsx("div",Object.assign({className:L.content},{children:e?react.exports.cloneElement(e,Object.assign(Object.assign({},(null===f||void 0===f?void 0:f.config)||{}),{dataId:t,hidePanel:()=>i(hidePanel$1(t)),tabId:o,panelRendered:c})):jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"No micro frontend passed!"})})})),x&&jsxRuntime.exports.jsxs("div",Object.assign({className:L.footer},{children:[x.divider&&jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx("div",Object.assign({className:L.headerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:L.actionContainer},{children:null==(d=x.actions)?void 0:d.map(e=>{var t;if(e.iconUrl)return jsxRuntime.exports.jsxs(IconButton$1,Object.assign({className:L.actionButton,onClick:(t=e.action,()=>{i(t)}),size:"large"},{children:[e.iconUrl&&jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"icon",draggable:"false"}),e.icon&&jsxRuntime.exports.jsx("div",{children:e.icon})]}),e.action.type);const n=e;return jsxRuntime.exports.jsx(Button$1,Object.assign({className:L.actionButton,size:n.size,variant:n.variant,onClick:()=>i(n.action)},{children:n.label}),e.action.type)})}))}))]}))]})),r&&jsxRuntime.exports.jsxs("div",Object.assign({id:"tabs-content",className:L.tabSelect},{children:[jsxRuntime.exports.jsx(Tabs,{selectedId:o,tabsList:s,onChangeTab:function(t){0<=p.map(e=>e.panelId).indexOf(VERSION_PANEL)&&i(hidePanel$1(VERSION_PANEL)),o&&i(hidePanel$1(o)),a(t);var e,n=s.find(e=>e.id===t);null!=(e=null==n?void 0:n.onClick)&&e.call(n,t),null!=n&&n.action&&i(n.action)},roles:w}),(null===x||void 0===x?void 0:x.logo)&&jsxRuntime.exports.jsx("div",Object.assign({className:L.aiWareIcon},{children:jsxRuntime.exports.jsx(Logo,{})}))]}))]}))]}));return jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(Slide$1,Object.assign({"data-id":"123456",in:C,direction:"left",onEntered:()=>u(!0),onExited:()=>i(unmountPanel$1(t))},{children:n}))}))})})}const AppbarPanel=e=>jsxRuntime.exports.jsx(AppbarTabPanel,Object.assign({},e,{withChild:!0,withTab:!1})),Tab=e=>jsxRuntime.exports.jsx(AppbarTabPanel,Object.assign({},e,{withChild:!1,withTab:!0})),changelogPanelLabels=e=>({changelog:e.formatMessage({id:"changelog-panel.header.title",defaultMessage:[{type:0,value:"Release Notes"}]}),closePanelTooltip:e.formatMessage({id:"changelog-panel.header.close-btn-tooltip",defaultMessage:[{type:0,value:"Close panel"}]}),versionLabel:e.formatMessage({id:"changelog-panel.version-title",defaultMessage:[{type:0,value:"Version"}]}),updateRequiredLabel:e.formatMessage({id:"changelog-panel.update-required",defaultMessage:[{type:0,value:"Update required"}]}),deploymentLabel:e.formatMessage({id:"changelog-panel.deployment",defaultMessage:[{type:0,value:"Deployment"}]}),currentVersionLabel:e.formatMessage({id:"changelog-panel.current-version",defaultMessage:[{type:0,value:"Current Version"}]}),previousVersionLabel:e.formatMessage({id:"changelog-panel.previous-version",defaultMessage:[{type:0,value:"Previous Version"}]}),apiUnavailable:e.formatMessage({id:"changelog-panel.no-api",defaultMessage:[{type:0,value:"Cannot retrieve platform information"}]}),current:e.formatMessage({id:"changelog-panel.current",defaultMessage:[{type:0,value:"Current"}]}),previous:e.formatMessage({id:"changelog-panel.previous",defaultMessage:[{type:0,value:"Previous"}]}),noVersionHighlightsCurrent:e.formatMessage({id:"changelog-panel.no-current-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Current Version"}]}),noVersionHighlightsPrevious:e.formatMessage({id:"changelog-panel.no-prev-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Previous Version"}]}),noHighlights:e.formatMessage({id:"changelog-panel.no-highlights",defaultMessage:[{type:0,value:"Cannot retrieve version highlights"}]}),unknown:e.formatMessage({id:"changelog-panel.unknown",defaultMessage:[{type:0,value:"unknown"}]}),viewReleaseNotes:e.formatMessage({id:"version-panel.view-release-notes",defaultMessage:[{type:0,value:"View Release Notes"}]}),error:e.formatMessage({id:"version-panel.error-state",defaultMessage:[{type:0,value:"Error while fetching release notes"}]}),errorHelperText:e.formatMessage({id:"version-panel.error-state-helper-text",defaultMessage:[{type:0,value:"Please try again later"}]})}),useStyles$5=makeStyles()(e=>({flexContainer:{display:"flex",alignItems:"center"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",padding:e.spacing(6,0,6,6),borderBottom:"1px solid rgb(219, 226, 234)"},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},title:{color:"#2A323C"},panelRoot:{padding:"15px",height:"calc(100% - 70px);",overflowY:"scroll"},row:{display:"flex","& svg":{marginRight:"12px",marginBottom:"24px"}},widgets:{"& svg":{fill:"#555F7C"}},veriLogo:{transform:"translate(3px, 2px)"},versionText:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",marginBottom:"5px"},wrapperBox:{padding:"15px 0 15px 15px",border:".5px solid #D5DFE9",borderRadius:"4px",marginBottom:"14px","& iframe":{width:"100%",border:"none"}},aiwareLogo:{marginBottom:"10px"},boldTitle:{fontWeight:700},releaseNotesBtn:{width:"100%",cursor:"pointer",height:"36px",border:"1px solid #5C6269",color:"#5C6269",marginTop:"15px","&:hover":{border:"1px solid #5C6269"}},errorStateContainer:{padding:"40px",textAlign:"center","& img":{width:"40%",marginBottom:"20px"}}})),Header=()=>{const e=useDispatch();var t=useStyles$5()["classes"],n=useIntl(),{changelog:n,closePanelTooltip:r}=changelogPanelLabels(n);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-testid":"create-or-update-token-panel.header"},{children:[jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h1","data-testid":"permissions-panel-header-title",className:t.title},{children:["AIWARE ",n]})),jsxRuntime.exports.jsx("div",Object.assign({className:t.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:r},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>e(hidePanel$1(CHANGELOG_PANEL)),"aria-labelledby":"version-panel.close-button","data-testid":"version-panel.close-button",size:"large"},{children:jsxRuntime.exports.jsx(Close$1,{})}))}))}))]}))},selectLoadingStatus=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.status},selectCurrentVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.currentVersion},selectPreviousVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.previousVersion},CHANGELOG_PANEL="CHANGELOG_PANEL",ChangelogPanelComponent=()=>{var e=useStyles$5()["classes"],t=useIntl(),{versionLabel:t,updateRequiredLabel:n,deploymentLabel:r,previousVersionLabel:i,currentVersionLabel:o,apiUnavailable:a,noHighlights:s,noVersionHighlightsCurrent:l,noVersionHighlightsPrevious:c,unknown:u,viewReleaseNotes:d,error:p,errorHelperText:f}=changelogPanelLabels(t);const h=useDispatch(),[m,g]=react.exports.useState(!1);var v=useSelector(selectLoadingStatus);const[x,y]=react.exports.useState({}),b=e=>{if("https://get.aiware.com"===e.origin){const{height:t,source:n}=e.data;y(e=>Object.assign(Object.assign({},e),{[n]:t+1}))}};var C=useSelector(betaFeaturesSelector),$=(react.exports.useEffect(()=>{var e=gqlIntrospection.getQueries().find(e=>"platformInfo"===e.name);return g(!!e),e&&h(actions$2.versionPanel.fetchVersionInfoStart()),window.addEventListener("message",b),()=>window.removeEventListener("message",b)},[]),(e="")=>{let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol}),S=useSelector(selectCurrentVersion),w=useSelector(selectPreviousVersion),[E,,]=react.exports.useState(!1),o=$(null==S?void 0:S.highlightsUrl)?jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.wrapperBox},{children:[S&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",sx:{mb:"10px"}},{children:o})),jsxRuntime.exports.jsx("iframe",{id:"current-version",src:null==S?void 0:S.highlightsUrl,height:x[(null==(o=null==S?void 0:S.highlightsUrl)?void 0:o.toString())||""]})]})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:l}),$=$(null==w?void 0:w.highlightsUrl)?jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.wrapperBox},{children:[S&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",sx:{mb:"10px"}},{children:i})),jsxRuntime.exports.jsx("iframe",{id:"previous-version",src:null==w?void 0:w.highlightsUrl,height:x[(null==(l=null==w?void 0:w.highlightsUrl)?void 0:l.toString())||""]})]})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:c}),i=jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%"}},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.wrapperBox},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.flexContainer},{children:[jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h1"},{children:[t," ",null!=S&&S.version?null==S?void 0:S.version:u]})),E?jsxRuntime.exports.jsxs(Typography$1,Object.assign({sx:{ml:"10px"},variant:"caption"},{children:["(",n,")"]})):null]})),jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{mt:"5px"}},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2"},{children:[r," -"," ",S&&S.createdAt?dateFormatter((null==S?void 0:S.createdAt)||null):u]}))}))]})),S?o:null]})),w?$:null,!S&&!w&&jsxRuntime.exports.jsx(VersionChangelogNullState,{label:s}),C&&jsxRuntime.exports.jsxs(Button$1,Object.assign({className:e.releaseNotesBtn,variant:"outlined",onClick:()=>({})},{children:[jsxRuntime.exports.jsx(Launch,{sx:{mr:"5px",width:"18px"}})," ",d]}))]}),l=jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.errorStateContainer},{children:[jsxRuntime.exports.jsx("img",{src:img$a,alt:"error"}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",sx:{fontWeight:700}},{children:p}))}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:f}))})]}));return jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{height:"calc(100vh - 60px)",overflow:"hidden"}},{children:[jsxRuntime.exports.jsx(Header,{}),"pending"===v&&jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{p:"15px",display:"flex",justifyContent:"center"}},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),"success"===v&&jsxRuntime.exports.jsx("div",Object.assign({className:e.panelRoot},{children:m?i:jsxRuntime.exports.jsx(VersionChangelogNullState,{label:a})})),"failure"===v&&l]}))},ChangelogPanel=()=>jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(ChangelogPanelComponent,{})}));var index_esm$2=Object.freeze({__proto__:null,AppbarPanel:AppbarPanel,AppbarTabPanel:AppbarTabPanel,ChangelogPanel:ChangelogPanel,TabPanel:Tab,VersionPanel:VersionPanel});const Panel=({panelId:t,children:e})=>{var n;const r=useDispatch(),{microFrontend:i,panelConfig:{minWidth:o,padding:a=0,header:s,footer:l,marginTop:c=0,marginStart:u=0,show:d,width:p=500,zIndex:f=1}}=useSelector(e=>e.panels.find(e=>e.panelId===t)),h=makeStyles()(e=>({container:{position:"fixed",top:c,right:u,height:"100%",minWidth:o,width:p,zIndex:f},padding:{padding:e.spacing(a),paddingTop:e.spacing(a/2)},margin:{margin:e.spacing()},headerContainer:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},headerTitle:{margin:e.spacing()},actionButton:{margin:e.spacing()},actionContainer:{"&:last-child":{marginRight:e.spacing(2)}},footer:{}}))()["classes"],m=e=>{var t;return e.icon?jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:h.actionButton,onClick:()=>r(e.action),size:"large"},{children:e.icon})):(t=e,jsxRuntime.exports.jsx(Button$1,Object.assign({className:h.actionButton,size:t.size,variant:t.variant,onClick:()=>r(e.action)},{children:t.label})))};return jsxRuntime.exports.jsx(Slide$1,Object.assign({in:d,direction:"left",onExited:()=>r(unmountPanel$1(t))},{children:jsxRuntime.exports.jsxs(Paper$1,Object.assign({elevation:3,id:t,"data-test":"panel-"+(t||"unknown"),className:h.container},{children:[s&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:h.headerContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({gutterBottom:!0,className:h.headerTitle,variant:"h4"},{children:s.title})),jsxRuntime.exports.jsxs("div",Object.assign({className:h.actionContainer},{children:[null==(n=s.actions)?void 0:n.map(e=>m(e)),jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"close-button-"+t,className:h.actionButton,onClick:()=>r(hidePanel$1(t)),size:"large"},{children:jsxRuntime.exports.jsx(default_1$6,{})}))]}))]})),s.divider&&jsxRuntime.exports.jsx(Divider$1,{})]}),jsxRuntime.exports.jsx("div",Object.assign({className:h.padding},{children:e?react.exports.cloneElement(e,Object.assign(Object.assign({},i.config||{}),{dataId:t,hidePanel:()=>r(hidePanel$1(t))})):jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"No micro frontend passed!"})})})),l&&jsxRuntime.exports.jsxs("div",Object.assign({className:h.footer},{children:[l.divider&&jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsxs("div",Object.assign({className:h.headerContainer},{children:[jsxRuntime.exports.jsx("div",{}),jsxRuntime.exports.jsx("div",Object.assign({className:h.actionContainer},{children:null==(n=l.actions)?void 0:n.map(e=>m(e))}))]}))]}))]}))}))},SamplePanel5=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel5!"})}),SamplePanel4=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel4!"})}),SamplePanel3=n=>{const r=useDispatch();return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("h1",{children:"Welcome to picker!"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({id:"discrete-slider",gutterBottom:!0},{children:"Temperature"})),jsxRuntime.exports.jsx(Slider$1,{"data-test":"slider",defaultValue:n.value,value:n.value,"aria-labelledby":"discrete-slider",valueLabelDisplay:"auto",step:10,marks:!0,min:0,max:110,onChange:(e,t)=>{r(updatePanelMicroFrontendProps({id:n.dataId,props:Object.assign(Object.assign({},n),{value:t})}))},onChangeCommitted:(e,t)=>{r(updatePanelMicroFrontendProps({id:n.dataId,props:Object.assign(Object.assign({},n),{value:t})})),r(setData({id:n.dataId,data:t}))}})]})},SamplePanel2=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel2!"})}),useStyles$3=makeStyles()(e=>({container:{},root:{minWidth:50},bullet:{display:"inline-block",margin:"0 2px",transform:"scale(0.8)"},title:{fontSize:14},pos:{marginBottom:12}})),SamplePanel1=e=>{var t=useStyles$3()["classes"],n=jsxRuntime.exports.jsx("span",Object.assign({className:t.bullet},{children:"•"}));return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsxs("h1",{children:["Welcome to SamplePanel1 ",e.name||"Unknown Person","!"]}),jsxRuntime.exports.jsxs(Card$1,Object.assign({className:t.root},{children:[jsxRuntime.exports.jsxs(CardContent$1,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({className:t.title,color:"textSecondary",gutterBottom:!0},{children:"Word of the Day"})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h5",component:"h2"},{children:["be",n,"nev",n,"o",n,"lent"]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:t.pos,color:"textSecondary"},{children:"adjective"})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",component:"p"},{children:["well meaning and kindly.",jsxRuntime.exports.jsx("br",{}),'"a benevolent smile"']}))]}),jsxRuntime.exports.jsx(CardActions$1,{children:jsxRuntime.exports.jsx(Button$1,Object.assign({size:"small"},{children:"Learn More"}))})]}))]}))};var WidgetsStatus,index_esm$1=Object.freeze({__proto__:null,Panel:Panel,SamplePanel1:SamplePanel1,SamplePanel2:SamplePanel2,SamplePanel3:SamplePanel3,SamplePanel4:SamplePanel4,SamplePanel5:SamplePanel5});const registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent,[AvailablePanels.APP_BAR_PANEL_TEMPLATE]:AppbarPanel,[AvailablePanels.TAB_TEMPLATE]:Tab,[AvailablePanels.SIMPLE_PANEL]:Panel},registryLookup=t=>__awaiter$d(void 0,void 0,void 0,function*(){if(registry[t])return yield registry[t];let e=Promise.resolve(null);switch(t){case AvailableWidgets.SAMPLE_APP_BAR:e=import("./js-core.esm2.js").then(e=>e.SampleAppBar);break;case AvailableWidgets.RESET_PASSWORD:e=import("./js-core.esm4.js").then(e=>e.ResetPassword);break;case AvailableWidgets.FLOW_CENTER:e=import("./js-core.esm7.js").then(e=>e.App);break;case AvailableWidgets.FLOW_WIDGET:e=import("./js-core.esm8.js").then(function(e){return e.i}).then(e=>e.App);break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=import("./js-core.esm18.js").then(e=>e.EngineCenterBrowse);break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.AppbarTabPanel);break;case AvailableComponents.NOTIFICATION_PANEL:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationPanel);break;case AvailableComponents.NOTIFICATION_DETAIL:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationDetailPanel);break;case AvailableComponents.NOTIFICATION_SETTING:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationSetting);break;case AvailableComponents.NOTIFICATION_UTILITY:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationUtilityPanel);break;case AvailableComponents.NOTIFICATION_APPLICATION:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationApplication);break;case AvailableComponents.HELP_PANEL:e=Promise.resolve().then(function(){return index_esm}).then(e=>e.HelpCenterPanel);break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=Promise.resolve().then(function(){return index_esm$4}).then(e=>e.EditProFilePicture);break;case AvailableComponents.TEST_COMPONENT:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel1);break;case AvailableComponents.TEST_COMPONENT2:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel2);break;case AvailableComponents.TEST_COMPONENT3:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel3);break;case AvailableComponents.SETTING_PREFERENCE:e=import("./js-core.esm36.js").then(e=>e.SettingsPreferencesPanel);break;case AvailableComponents.ORGANIZATION_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.OrganizationPanel);break;case AvailableComponents.INVITE_USERS_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.InviteUsersPanel);break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.InviteRequestsPanel);break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.ReviewRequestPanel);break;case AvailableComponents.ADD_APPLICATIONS:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.AddApplicationsPanel);break;case AvailableComponents.DATA_CENTER_BROWSE:e=import("./js-core.esm37.js").then(e=>e.DataCenterBrowse);break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=import("./js-core.esm37.js").then(e=>e.FoldersAndFilesPanel);break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=import("./js-core.esm37.js").then(e=>e.FileInfoPanel);break;case AvailableComponents.DATA_CENTER_IMPORTER:e=import("./js-core.esm45.js").then(e=>e.DataCenterImporter);break;case AvailableComponents.DATA_LABELER:e=import("./js-core.esm46.js").then(e=>e.DataLabelerPanel);break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=import("./js-core.esm47.js").then(e=>e.AdminCenterOpenId);break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=import("./js-core.esm49.js").then(e=>e.AdminCenterBrowse);break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=import("./js-core.esm54.js").then(e=>e.DataCenterProcessAI);break;case AvailableComponents.ENGINE_CENTER_NEW:e=import("./js-core.esm19.js").then(function(e){return e.k}).then(e=>e.EngineCenterNew);break;case AvailableComponents.ENGINE_CENTER_FILTER:e=import("./js-core.esm18.js").then(e=>e.EngineCenterFilter);break;case AvailableComponents.APP_CENTER_FILTER:e=import("./js-core.esm55.js").then(e=>e.AppCenterFilter);break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=import("./js-core.esm18.js").then(e=>e.EngineDetails);break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=import("./js-core.esm18.js").then(e=>e.CreateNewBuildPanel);break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=import("./js-core.esm19.js").then(function(e){return e.k}).then(e=>e.EngineCenterCustomFieldsForm);break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=import("./js-core.esm19.js").then(function(e){return e.k}).then(e=>e.SchemasFormPanel);break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=import("./js-core.esm19.js").then(function(e){return e.k}).then(e=>e.InputTypeFlyout);break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=import("./js-core.esm18.js").then(e=>e.EditReleaseNotes);break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=import("./js-core.esm18.js").then(e=>e.VersionHistoryPanel);break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=import("./js-core.esm45.js").then(e=>e.SupportedFileTypes);break;case AvailableComponents.EDIT_FILE_METADATA:e=import("./js-core.esm45.js").then(e=>e.EditFileMetadata);break;case AvailableWidgets.APP_CENTER_BROWSE:e=import("./js-core.esm55.js").then(e=>e.AppCenterBrowse);break;case AvailableComponents.APP_CENTER_NEW:e=import("./js-core.esm56.js").then(e=>e.AppCenterNew);break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=import("./js-core.esm56.js").then(e=>e.AppCenterConfigFieldsForm);break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=import("./js-core.esm56.js").then(e=>e.AppCenterContextMenuExtensionPanel);break;case AvailableComponents.APP_CENTER_BROWSE:e=import("./js-core.esm55.js").then(e=>e.AppCenterBrowse);break;case AvailableComponents.APP_CENTER_DETAILS:e=import("./js-core.esm55.js").then(e=>e.AppCenterDetails);break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=import("./js-core.esm54.js").then(e=>e.DataCenterEngineSelection);break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=import("./js-core.esm43.js").then(e=>e.NewGroupPanel);break;case AvailableComponents.PERMISSIONS_PANEL:e=import("./js-core.esm39.js").then(e=>e.PermissionsPanel);break;case AvailableComponents.GROUP_INFO_PANEL:e=import("./js-core.esm39.js").then(e=>e.GroupInfoPanel);break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=import("./js-core.esm39.js").then(e=>e.NewPermissionSetPanel);break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=import("./js-core.esm39.js").then(e=>e.PermissionSetDetailsPanel);break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=import("./js-core.esm37.js").then(e=>e.MediaDetailsPanelIframe);break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=import("./js-core.esm37.js").then(e=>e.IngestionCreationPanel);break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=import("./js-core.esm37.js").then(e=>e.SelectImportSource);break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=import("./js-core.esm37.js").then(e=>e.SourceCreationPanel);break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=import("./js-core.esm43.js").then(e=>e.GroupDetailsPanel);break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=import("./js-core.esm43.js").then(e=>e.AddMemberPanel);break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=import("./js-core.esm50.js").then(e=>e.ApplicationDetailsPanel);break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=import("./js-core.esm57.js").then(e=>e.ProcessingCenterSources);break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=import("./js-core.esm57.js").then(e=>e.ErrorDetailPanel);break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=Promise.resolve().then(function(){return index_esm$6}).then(e=>e.UserApplicationSettingsPanel);break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=import("./js-core.esm50.js").then(e=>e.AddUsersPanel);break;case AvailableComponents.PROCESSING_CENTER_BROWSE:e=import("./js-core.esm60.js").then(e=>e.ProcessingCenterBrowse);break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=import("./js-core.esm61.js").then(e=>e.JobsTableSettingsPanel);break;case AvailableComponents.VERSION_PANEL:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.VersionPanel);break;case AvailableComponents.CHANGELOG_PANEL:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.ChangelogPanel);break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=import("./js-core.esm63.js").then(e=>e.DagBuilder);break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=import("./js-core.esm64.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterIngestion);break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=import("./js-core.esm64.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterAdvancedSettings);break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=import("./js-core.esm64.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterAffiliatePanel);break;case AvailableComponents.JOBS_DETAILS_PANEL:e=import("./js-core.esm61.js").then(e=>e.JobsDetailsPanel);break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=import("./js-core.esm62.js").then(e=>e.TasksTableSettingsPanel);break;case AvailableComponents.RESOURCE_CENTER_BROWSE:e=import("./js-core.esm66.js").then(e=>e.ResourceCenterBrowse);break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=import("./js-core.esm70.js").then(e=>e.PackageDetails);break;case AvailableComponents.PACKAGE_MANAGER_PANEL:e=import("./js-core.esm71.js").then(function(e){return e.a6}).then(e=>e.PackageManager);break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=import("./js-core.esm72.js").then(e=>e.InstanceAdminCenterBrowse);break;case AvailableComponents.MANAGE_GRANTS:e=import("./js-core.esm70.js").then(e=>e.ManageGrantsPanel);break;case AvailableComponents.SCHEMA_DETAILS_PANEL:e=import("./js-core.esm73.js").then(e=>e.SchemaDetailsPanel);break;case AvailableComponents.USER_DETAILS_PANEL:e=import("./js-core.esm51.js").then(e=>e.UserDetailsPanel);break;case AvailableComponents.CREATE_OR_UPDATE_TOKEN_PANEL:e=import("./js-core.esm52.js").then(e=>e.CreateOrUpdateApiTokenPanel)}return yield registry[t]=e}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$2=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$2,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$i(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})})),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react.exports.useState([]),[r,i]=react.exports.useState(!1),[o,a]=react.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),!0}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState$1={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState$1,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace$1="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace$1]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(){var e=useSelector(initialConfigSelector),t=useSelector(customKnowledgeBaseUrlSelector),n=useSelector(customDocsUrlSelector),r=useSelector(helpCenterSelectedTabIdSelector),i=useSelector(e=>null==e?void 0:e.panels),o=useStyles$1()["classes"],[a]=react.exports.useState(defaultLocale);const s=useDispatch();i=null==i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),t=i&&t?t:e.knowledgeBaseURL,i=i&&n?n:e.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:a},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:o.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{s(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:i})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$A,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var EPermissionAction,EAuthResourceType,EAuthSubResourceType,index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react.exports.useState(null),[n,r]=react.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}!function(e){e.Create="create",e.Read="read",e.Update="update",e.Delete="delete",e.File="file",e.CustomerService="customerService",e.Access="access"}(EPermissionAction=EPermissionAction||{}),function(e){e.Folder="Folder",e.TDO="TDO",e.Organization="Organization",e.Source="Sources",e.Schedule="Schedules",e.Job="Job"}(EAuthResourceType=EAuthResourceType||{}),function(e){e.Group="group",e.Media="media",e.Package="package",e.User="user",e.Workflow="workflow",e.ProcessingCenter="processingCenter",e.ResourceCenter="resourceCenter"}(EAuthSubResourceType=EAuthSubResourceType||{});const orgRightsByObjectPermission={[EAuthResourceType.TDO]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update"],delete:["cms.media.delete","recording.delete"]},[EAuthResourceType.Folder]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update"],delete:["cms.media.delete","recording.delete"],file:["cms.media.create","recording.create"]},[EAuthResourceType.Source]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update","source.update"],delete:["cms.media.delete","recording.delete"]},[EAuthResourceType.Job]:{customerService:["cms.customerservice"],create:["job.create"],read:["job.read"],update:["job.update"],delete:["job.delete"]},[EAuthResourceType.Schedule]:{customerService:["cms.customerservice"],create:["job.create"],read:["job.read"],update:["job.update"],delete:["job.delete"]},[EAuthSubResourceType.User]:{create:["admin.user.create"],delete:["admin.user.delete"]},[EAuthSubResourceType.Group]:{create:["admin.group.create"],delete:["admin.group.delete"]},[EAuthSubResourceType.Package]:{update:["developer.build.update"]}},permissionActionsToFetchByObjectType={[EAuthResourceType.TDO]:{create:"AIWARE_TDO_CREATE",read:"AIWARE_TDO_READ",update:"AIWARE_TDO_UPDATE",delete:"AIWARE_TDO_DELETE"},[EAuthResourceType.Folder]:{create:"AIWARE_FOLDER_CREATE",read:"AIWARE_FOLDER_READ",update:"AIWARE_FOLDER_UPDATE",delete:"AIWARE_FOLDER_DELETE",file:"AIWARE_FOLDER_FILE"},[EAuthResourceType.Source]:{create:"AIWARE_SOURCES_CREATE",read:"AIWARE_SOURCES_READ",update:"AIWARE_SOURCES_UPDATE",delete:"AIWARE_SOURCES_DELETE"},[EAuthResourceType.Job]:{customerService:"CMS_CUSTOMERSERVICE",create:"AIWARE_JOB_CREATE",read:"AIWARE_JOB_READ",update:"AIWARE_JOB_UPDATE",delete:"AIWARE_JOB_DELETE"},[EAuthResourceType.Schedule]:{customerService:"CMS_CUSTOMERSERVICE",create:"AIWARE_JOB_CREATE",read:"AIWARE_JOB_READ",update:"AIWARE_JOB_UPDATE",delete:"AIWARE_JOB_DELETE"},[EAuthResourceType.Organization]:{[EAuthSubResourceType.Group]:{create:"AIWARE_GROUP_CREATE",delete:"AIWARE_GROUP_DELETE"},[EAuthSubResourceType.Package]:{create:"AIWARE_PACKAGE_CREATE",read:"AIWARE_PACKAGE_READ",update:"AIWARE_PACKAGE_UPDATE",delete:"AIWARE_PACKAGE_DELETE"},[EAuthSubResourceType.User]:{create:"AIWARE_USER_CREATE",delete:"AIWARE_USER_DELETE"},[EAuthSubResourceType.ResourceCenter]:{access:"AIWARE_RESOURCE_CENTER_ACCESS"}}},permissionTypeToFetchByEntityType={[EAuthResourceType.TDO]:[EAuthResourceType.TDO],[EAuthResourceType.Folder]:[EAuthResourceType.Folder],[EAuthResourceType.Source]:[EAuthResourceType.Source],[EAuthResourceType.Job]:[EAuthResourceType.Job],[EAuthResourceType.Schedule]:[EAuthResourceType.Schedule],[EAuthResourceType.Organization]:[EAuthResourceType.Organization,EAuthResourceType.TDO,EAuthResourceType.Folder,EAuthResourceType.Source,EAuthResourceType.Schedule,EAuthResourceType.Job]},authResourcesByEntityType={[EntityType.Folders]:EAuthResourceType.Folder,[EntityType.Tdos]:EAuthResourceType.TDO,[EntityType.Sources]:[EAuthResourceType.Source],[EntityType.Schedules]:[EAuthResourceType.Schedule]},convertEntityToAuthResource=e=>authResourcesByEntityType[e],convertPermissionsToRights=(e,t,n)=>{const r=(null==(e=orgRightsByObjectPermission[e])?void 0:e[t])||[];return 0<n.filter(e=>r&&r.includes(e)).length},permissionDetailIsActionPair=e=>Object.keys(e).some(e=>Object.values(EPermissionAction).includes(e)),getQueryActions=(e,t,n)=>({targetObjectType:e,targetActions:Object.keys(t).map(e=>({targetAction:e,serverName:t[e],resource:n}))}),getPermissionActions=(t,n)=>{return permissionDetailIsActionPair(t)?[getQueryActions(n,t)]:Object.keys(t).map(e=>getQueryActions(n,t[e]||{},e))},getPermissionTypesToQuery=e=>{return(permissionTypeToFetchByEntityType[e]||[]).flatMap(e=>getPermissionActions(permissionActionsToFetchByObjectType[e]||{},e))},isPermissionLoading=e=>!e||"pending"===e.status||"idle"===e.status,hasPermission=(e,t)=>!!e&&("failure"===e.status||e&&"success"===e.status&&e.permissions&&e.permissions[t]),namespace="permissions",initialState={permissionsByObject:{},rights:{status:"idle"}},slice=createSlice({name:namespace,initialState:initialState,reducers:{fetchObjectPermissionsStart(e,t){var{entityType:t,entityId:n}=t.payload;Object.prototype.hasOwnProperty.call(e.permissionsByObject,t)||(e.permissionsByObject[t]={}),Object.prototype.hasOwnProperty.call(e.permissionsByObject[t],n)||(e.permissionsByObject[t][n]={}),Object.prototype.hasOwnProperty.call(e.permissionsByObject[t][n],t)||(e.permissionsByObject[t][n][t]={status:"idle"})},fetchObjectPermissionsStarted(e,t){var{entityId:t,entityType:n}=t.payload;e.permissionsByObject[n][t][n].status="pending"},fetchObjectPermissionsSucceeded(t,e){const{entityType:n,entityId:r,permissions:i}=e.payload;Object.keys(i).forEach(e=>{t.permissionsByObject[n][r][e]={status:"success",permissions:i[e]}})},fetchObjectPermissionsFailed(e,t){var{entityType:t,entityId:n}=t.payload;e.permissionsByObject[t][n][t]={status:"failure"}},fetchMyRightsStarted(e){e.rights.status="pending"},fetchMyRightsSucceeded(e,t){e.rights.status="success",e.rights.myRights=t.payload},fetchMyRightsFailed(e){e.rights.status="failure"}}}),actions=slice.actions;var permissionsReducer=slice.reducer;function __awaiter(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}function getObjectPermissions(u,d,p){var f;return __awaiter(this,void 0,void 0,function*(){var{entityType:e,entityId:t}=p,n="getPermissions",r=getPermissionTypesToQuery(e);let i=!1,o=[],a={};for(;!i;){var s=`
|
|
1478
|
+
`),useStyles$2$1=makeStyles()(()=>({fullScreen:{position:"fixed",width:"100%",height:"100vh",top:"0",left:"0",backgroundColor:"#ffffff",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center",fontSize:"14px",zIndex:99999,animation:fadeInOut+" 5s linear forwards"},loaderBox:{height:"200px",width:"200px"},veritoneDarkLogo:{height:"200px",width:"200px"}})),useStyles$1$1=makeStyles()(e=>({flexContainer:{display:"flex",alignItems:"center"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",padding:e.spacing(6,0,6,6),borderBottom:"1px solid rgb(219, 226, 234)"},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},title:{color:"#2A323C"},panelRoot:{padding:"15px",height:"calc(100% - 70px);",overflowY:"scroll"},row:{display:"flex","& svg":{marginRight:"12px",marginBottom:"24px"}},widgets:{"& svg":{fill:"#555F7C"}},veriLogo:{transform:"translate(3px, 2px)"},versionText:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",marginBottom:"5px"},wrapperBox:{padding:"15px 0 15px 0px",marginBottom:"14px"},aiwareLogo:{marginBottom:"10px",marginTop:"10px",width:"151px"},boldTitle:{fontWeight:700},gridBox:{background:"#F7F7F7",padding:"10px",color:"#2A323C"},imageContainer:{textAlign:"center"},falconLogo:{width:"148px"},osInfo:{display:"flex",justifyContent:"center","& *":{textAlign:"center"}},osName:{padding:"5px 8px",background:"#465364",color:"white",textTransform:"uppercase",fontWeight:"700",borderRadius:"4px"},osVersion:{color:"#5C6269"}})),versionPanelLabels=e=>({closePanelTooltip:e.formatMessage({id:"version-panel.header.close-btn-tooltip",defaultMessage:[{type:0,value:"Close panel"}]}),versionInformationLabel:e.formatMessage({id:"version-panel.version-information-title",defaultMessage:[{type:0,value:"Version Information"}]}),versionLabel:e.formatMessage({id:"version-panel.version-title",defaultMessage:[{type:0,value:"Version"}]}),viewReleaseNotes:e.formatMessage({id:"version-panel.view-release-notes",defaultMessage:[{type:0,value:"View Release Notes"}]}),noVersionInfo:e.formatMessage({id:"version-panel.no-info-label",defaultMessage:[{type:0,value:"Cannot get version information"}]})}),Header$1=()=>{const e=useDispatch();var t=useStyles$1$1()["classes"],n=useIntl(),{versionInformationLabel:n,closePanelTooltip:r}=versionPanelLabels(n);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-testid":"create-or-update-token-panel.header"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-testid":"permissions-panel-header-title",className:t.title},{children:n})),jsxRuntime.exports.jsx("div",Object.assign({className:t.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:r},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>e(hidePanel$1(VERSION_PANEL)),"aria-labelledby":"version-panel.close-button","data-testid":"version-panel.close-button",size:"large"},{children:jsxRuntime.exports.jsx(Close$1,{})}))}))}))]}))},VERSION_PANEL="VERSION_PANEL",VersionChangelogNullState=({label:e})=>{var t=useStyles$1$1()["classes"];return jsxRuntime.exports.jsx(Box$1,Object.assign({className:t.gridBox,sx:{fontWeight:700,textAlign:"center",mb:"5px"}},{children:e}))},VersionPanelComponent=({sdk:e,edge:t,core:n})=>{const r=useStyles$1$1()["classes"];var i=useIntl();const{versionLabel:o,viewReleaseNotes:a,noVersionInfo:s}=versionPanelLabels(i);i=useSelector(betaFeaturesSelector);const l={sdk:e,edge:t,core:n};var c=jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osInfo},{children:jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osName},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{fontWeight:700}},{children:"Falcon"}))})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osVersion},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"caption"},{children:[o," 2.0"]}))}))]})}));return jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Header$1,{}),jsxRuntime.exports.jsxs("div",Object.assign({className:r.panelRoot},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.wrapperBox},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{p:"20px"}},{children:[i&&(e||t||n)&&jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.imageContainer},{children:jsxRuntime.exports.jsx("img",{src:img,className:r.falconLogo,alt:"system-logo"})})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.imageContainer},{children:jsxRuntime.exports.jsx("img",{src:img$1,className:r.aiwareLogo,alt:"aiware-logo"})})),i&&(e||t||n)&&c]})),e||t||n?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{mt:"10px"}},{children:Object.keys(l).map(e=>l[e]?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:9,sx:{p:"2px"}},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.gridBox,sx:{fontWeight:700}},{children:[e.charAt(0).toUpperCase()+e.slice(1)," ",o,":"]}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:3,sx:{p:"2px"}},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.gridBox},{children:l[e]}))}))]}):null)})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:s})]})),i&&jsxRuntime.exports.jsx(Button$1,Object.assign({sx:{width:"100%",cursor:"pointer"},variant:"outlined",onClick:()=>{}},{children:a}))]}))]})},VersionPanel=e=>jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(VersionPanelComponent,Object.assign({},e))})),dateFormatter=e=>{e=new Date(e||"");return(8<e.getMonth()?e.getMonth()+1:"0"+(e.getMonth()+1))+"/"+(9<e.getDate()?e.getDate():"0"+e.getDate())+"/"+e.getFullYear()};let lottieScript,audio;const theme=createTheme({palette:{secondary:{main:"#1871E8"}}}),Logo_=({intl:n})=>{const r=useDispatch();var e=useStyles$2$1()["classes"];const[i,o]=react.exports.useState(0),[t,a]=react.exports.useState(!1),[s,l]=react.exports.useState(!1),c=jsxRuntime.exports.jsx("p",Object.assign({style:{pointerEvents:"none"}},{children:"Loading Beta Features"})),[u,d]=react.exports.useState(c),p=useSelector(organizations_selector.selectOrgSwitchInitiated),f=useSelector(e=>{return null==(e=null==(e=null==e?void 0:e.configs)?void 0:e.initConfig)?void 0:e.betaFeatures}),[h,m]=react.exports.useState(!1),[g,v]=react.exports.useState(""),[x,y]=react.exports.useState(""),[b,C]=react.exports.useState(""),[$,S]=react.exports.useState(!1);react.exports.useEffect(()=>{h||(m(!0),(lottieScript=document.createElement("script")).setAttribute("src","https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.7.8/lottie.min.js"),lottieScript.onload=()=>l(!0),(audio=document.createElement("audio")).id="player",audio.src="https://static.veritone.com/aiware-js-animation/sound-effects/chime.wav",document.head.appendChild(lottieScript),document.body.appendChild(audio)),has_1(window,"aiware.version")&&((t=null==(t=window.aiware)?void 0:t.version)&&"undefined"!==t&&v(t),t=null==(t=window.aiware)?void 0:t.releaseDate,y(dateFormatter(t)));var t=document.getElementsByTagName("script");if(t.length){let e=Array.from(t).find(e=>e.src.includes("get.aiware.com"));(e=e||Array.from(t).find(e=>e.src.includes("https://cdn.jsdelivr.net/npm/aiware-js")))&&fetch(e.getAttribute("src")).then(e=>{v(e.url.split("@")[1].split("/")[0])})}fetch("https://get.aiware.com/aiware-versions/aiware-latest.txt",{headers:{"Content-Type":"text/plain"}}).then(e=>e.text()).then(e=>C(e))},[]),react.exports.useEffect(()=>{if(f&&!p)return;p&&d(jsxRuntime.exports.jsx("p",{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-organization-panel.organizations-switching-loader-message",defaultMessage:"Changing your Organization",description:"organizations switching loader message"})}));const e=10===i;if((e||p)&&(a(!0),s)){const t=window.bodymovin.loadAnimation({container:document.getElementById("loaderAnimation"),path:"https://static.veritone.com/aiware-js-animation/particle-explosion.json",renderer:"svg",loop:!1,autoplay:!0,name:"unicorn"});t.onComplete=()=>{e?(r(enableBetaFeatures()),o(0)):p&&d(c),a(!1),t.destroy()},null!==audio&&void 0!==audio&&audio.play()}},[i,f,r,t,p]);return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[t&&jsxRuntime.exports.jsxs("div",Object.assign({className:e.fullScreen},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.loaderBox,id:"loaderAnimation"},{children:!s&&jsxRuntime.exports.jsx("img",{src:img$5,alt:"veritone-logo",className:e.veritoneDarkLogo})})),jsxRuntime.exports.jsxs("div",Object.assign({className:e.loaderBox},{children:[jsxRuntime.exports.jsx(StyledEngineProvider,Object.assign({injectFirst:!0},{children:jsxRuntime.exports.jsx(ThemeProvider,Object.assign({theme:theme},{children:jsxRuntime.exports.jsx(LinearProgress$1,{color:"secondary"})}))})),u]}))]})),jsxRuntime.exports.jsxs("div",{children:[g?jsxRuntime.exports.jsxs(Typography$1,Object.assign({sx:{color:"#9CA8B4",fontSize:"10px",textAlign:"center",cursor:"pointer",width:"60px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},onClick:()=>{var e,t;$?(S(!1),r(hidePanel$1(VERSION_PANEL))):(S(!0),e={name:VERSION_PANEL,config:{name:"Version Information",sdk:g,sdkRelease:x,edge:b}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"small",zIndex:1001,dimmed:0,borderBottom:!0,header:{title:n.formatMessage({id:"os-panel.version-information.panel-header",defaultMessage:[{type:0,value:"Version Information"}]})}},r(mountPanel$1({panelId:VERSION_PANEL,microFrontend:e,panelConfig:t})))}},{children:["V. ",g]})):null,jsxRuntime.exports.jsx("img",{onClick:()=>o(i+1),src:img$A,alt:"footer-icon",draggable:"false"})]})]})},Logo=injectIntl(Logo_);function getTabAction(e,t,n,r="APP_BAR_PANEL"){return{type:mountPanel$1({}).type,payload:{panelId:e,microFrontend:{name:r,config:{name:"Veritone",tabId:e,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,fullScreen:!1,width:n,header:{divider:!0,title:t}}}}}const tabsListDefault=[{id:TabId.PERSONAL_PANEL,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.personalProfile",defaultMessage:"Personal Profile",description:"Tooltip pops on the sidebar for personal profile"}),iconComponent:jsxRuntime.exports.jsx(PersonalProfile$1,{}),role:"",action:getTabAction(TabId.PERSONAL_PANEL,jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.panelTitle.personalProfile",defaultMessage:"Personal Profile",description:"Header title for personal profile"}),410)},{id:TabId.ORGANIZATION_PANEL,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.organizations",defaultMessage:"Organizations",description:"Tooltip pops on the sidebar for organizations"}),iconComponent:jsxRuntime.exports.jsx(Organizations,{}),role:"",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.ORGANIZATION_PANEL,microFrontend:{name:"ORGANIZATION_PANEL"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,width:560,zIndex:1e3}}}},{id:TabId.CMS_SHORTCUT,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dataCenter",defaultMessage:"Data Center",description:"Tooltip pops on the sidebar for data center"}),iconComponent:jsxRuntime.exports.jsx(DataCenter,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"cms"}},{id:TabId.DATA_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dataCenter",defaultMessage:"Data Center",description:"Tooltip pops on the sidebar for data center"}),iconComponent:jsxRuntime.exports.jsx(DataCenter,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.DATA_CENTER,microFrontend:{name:"DATA_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.PROCESSING_CENTER_BROWSE,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.processingCenter",defaultMessage:"Processing Center",description:"Tooltip pops on the sidebar for processing center"}),iconComponent:jsxRuntime.exports.jsx(Process,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.PROCESSING_CENTER_BROWSE,microFrontend:{name:"PROCESSING_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge",zIndex:1e3}}}},{id:TabId.FLOW_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.flowCenter",defaultMessage:"Flow Center",description:"Tooltip pops on the sidebar for flow center"}),iconComponent:jsxRuntime.exports.jsx(FlowCenter2,{}),role:"automate",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.FLOW_CENTER,microFrontend:{name:"FLOW_CENTER",config:{name:"Veritone",tabId:TabId.FLOW_CENTER,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",zIndex:1200}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge"}}}},{id:TabId.ENGINE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.developerCenter",defaultMessage:"Developer Center",description:"Tooltip pops on the sidebar for developer center"}),iconComponent:jsxRuntime.exports.jsx(DeveloperCenter,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"developer"}},{id:TabId.MARKETPLACE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.marketplaceCenter",defaultMessage:"Marketplace",description:"Tooltip pops on the sidebar for marketplace center"}),iconComponent:jsxRuntime.exports.jsx(Marketplace$1,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"marketplace"}},{id:TabId.LIBRARY_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.libraryCenter",defaultMessage:"Library Center",description:"Tooltip pops on the sidebar for library center"}),iconComponent:jsxRuntime.exports.jsx(LibraryCenter,{}),role:"",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"libray"}},{id:TabId.ADMIN_SHORTCUT,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.adminCenter",defaultMessage:"Admin Center",description:"Tooltip pops on the sidebar for admin center"}),iconComponent:jsxRuntime.exports.jsx(AdminCenter,{}),role:"admin",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.ADMIN_SHORTCUT,microFrontend:{name:"ADMIN_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.INSTANCE_ADMIN_CENTER_BROWSE,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.instanceAdminCenter",defaultMessage:"Instance Admin Center",description:"Tooltip pops on the sidebar for instance admin center"}),iconComponent:jsxRuntime.exports.jsx(AdminTabIcon,{}),role:"admin",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.INSTANCE_ADMIN_CENTER_BROWSE,microFrontend:{name:"INSTANCE_ADMIN_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.RESOURCE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.resourceCenter",defaultMessage:"Resource Center",description:"Tooltip pops on the sidebar for resource center"}),iconComponent:jsxRuntime.exports.jsx(Resources$1,{}),role:"",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.RESOURCE_CENTER,microFrontend:{name:"RESOURCE_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge",zIndex:1e3}}}},{id:TabId.PROCESSING_CENTER_DAG_BUILDER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dagBuilder",defaultMessage:"DAG Builder (Beta)",description:"Tooltip pops on the sidebar for dag builder"}),iconComponent:jsxRuntime.exports.jsx(DagBuilder,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.PROCESSING_CENTER_DAG_BUILDER,microFrontend:{name:"PROCESSING_CENTER_DAG_BUILDER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}}];function AppbarTabPanel({panelId:t,children:e,withTab:r=!0,withChild:n=!0}){const i=useDispatch(),[o,a]=react.exports.useState(),[s,l]=react.exports.useState([]),[c,u]=react.exports.useState(!1);var d=useSelector(e=>e.panels.find(e=>e.panelId===t))||{};const p=useSelector(e=>e.panels);const{microFrontend:f,panelConfig:h}=d,{minWidth:m,padding:g=0,header:v,footer:x,marginTop:y=0,marginStart:b=0,show:C,tabs:$=[],zIndex:S=1e3,userRoles:w=[],panelId:E,size:_,fullScreen:T,width:j,dimmed:R=0,parentPanelId:I,borderBottom:O}=h||{};const A=I?("ORGANIZATION_PANEL"!==I?"":"solid 5px #4D81B7")||("DATA_CENTER"!==I?"":"solid 5px #4D81B7"):"solid 5px #4D81B7",L=makeStyles()(e=>{return{container:{position:"fixed",top:y,right:T?0:b,height:`calc(100vh - ${y}px)`,minWidth:m,width:j||(T?"100%":function(){switch(_){case"xxlarge":return 1280;case"xlarge":return 1020;case"large":return 720;case"medium":return 560;case"small":return 380;default:return 560}}()),borderBottom:O?"solid 5px #4D81B7":A,zIndex:T?1500:S,transitionTimingFunction:"ease-in-out !important"},padding:{padding:e.spacing(g),paddingTop:e.spacing(g/2)},margin:{margin:e.spacing()},headerContainer:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},headerTitle:{margin:e.spacing(),marginTop:e.spacing(2)},actionButton:{margin:e.spacing()},footer:{},actionContainer:{"&:last-child":{marginRight:e.spacing(2)}},content:{overflow:"overlay",overflowX:"hidden",height:(t=v?64:0,n=x?64:0,`calc(100vh - ${y}px - ${t}px - ${n}px - 5px)`)},paperContainer:{top:56,backgroundColor:"unset !important",boxShadow:"none"},tabContainer:{overflow:"hidden",width:"100%"},tabSelect:{paddingTop:e.spacing(6),width:80,display:"flex",flexDirection:"column"},drawerContainer:{display:"flex",background:e.palette.background.default},tabName:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"61px",padding:e.spacing(0,4,0,6)},actionIcons:{margin:e.spacing(-2.4)},title:{userSelect:"none",fontStyle:"normal",fontSize:"18px",lineHeight:e.spacing(5),letterSpacing:"0.25px",textTransform:"uppercase",color:e.palette.text.secondary},tabContent:{borderRight:r?"0.5px solid "+e.palette.divider:"none",overflowY:"auto",overflowX:"hidden",width:"100%"},buttonAction:{textTransform:"unset"},aiWareIcon:{padding:e.spacing(2.4,0),display:"flex",justifyContent:"center",position:"fixed",bottom:"0",right:"10px"},noShadow:{boxShadow:"none",borderLeft:"0.5px solid "+e.palette.divider},panelMask:{position:"absolute",zIndex:1150,width:"100%",height:"100%",backgroundColor:e.palette.grey[50],opacity:.5}};var t,n})()["classes"];react.exports.useEffect(()=>{0<$.length?l([...tabsListDefault,...$]):l(tabsListDefault)},[$]),react.exports.useEffect(()=>{var e;null!==f&&void 0!==f&&f.config&&null!=(e=f.config)&&e.tabId&&a(f.config.tabId)},[f]),react.exports.useEffect(()=>{0<p.length&&o&&r&&(p.find(e=>e.panelId===o)||a(void 0))},[p,o,r]);n=jsxRuntime.exports.jsxs(Paper$1,Object.assign({className:`${L.container} ${n?"":L.noShadow} `,elevation:3,id:t,square:!0,"data-test":"panel-"+(E||"unknown")},{children:[0<R&&jsxRuntime.exports.jsx("div",{className:L.panelMask}),jsxRuntime.exports.jsxs("div",Object.assign({className:L.drawerContainer},{children:[n&&jsxRuntime.exports.jsxs("div",Object.assign({className:L.tabContent},{children:[v&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:L.tabName},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:L.title},{children:v.title||(null==(d=s.find(e=>e.id===o))?void 0:d.label)})),jsxRuntime.exports.jsxs("div",Object.assign({className:L.actionIcons},{children:[null==(n=v.actions)?void 0:n.map(e=>e.label?jsxRuntime.exports.jsx(Button$1,Object.assign({size:e.size,variant:e.variant,onClick:()=>i(e.action)},{children:e.label}),e.action.type):jsxRuntime.exports.jsxs(IconButton$1,Object.assign({onClick:()=>i(e.action),size:"large"},{children:[e.iconUrl&&jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"icon",draggable:"false"}),e.icon&&jsxRuntime.exports.jsx("div",{children:e.icon})]}),e.action.type)),jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>i(hidePanel$1(t)),"data-test":"close-button-"+t,size:"large"},{children:jsxRuntime.exports.jsx("img",{src:I?img$T:img$U,alt:"icon",draggable:"false"})}))]}))]})),v.divider&&jsxRuntime.exports.jsx(Divider$1,{})]}),jsxRuntime.exports.jsx("div",Object.assign({className:L.content},{children:e?react.exports.cloneElement(e,Object.assign(Object.assign({},(null===f||void 0===f?void 0:f.config)||{}),{dataId:t,hidePanel:()=>i(hidePanel$1(t)),tabId:o,panelRendered:c})):jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"No micro frontend passed!"})})})),x&&jsxRuntime.exports.jsxs("div",Object.assign({className:L.footer},{children:[x.divider&&jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx("div",Object.assign({className:L.headerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:L.actionContainer},{children:null==(d=x.actions)?void 0:d.map(e=>{var t;if(e.iconUrl)return jsxRuntime.exports.jsxs(IconButton$1,Object.assign({className:L.actionButton,onClick:(t=e.action,()=>{i(t)}),size:"large"},{children:[e.iconUrl&&jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"icon",draggable:"false"}),e.icon&&jsxRuntime.exports.jsx("div",{children:e.icon})]}),e.action.type);const n=e;return jsxRuntime.exports.jsx(Button$1,Object.assign({className:L.actionButton,size:n.size,variant:n.variant,onClick:()=>i(n.action)},{children:n.label}),e.action.type)})}))}))]}))]})),r&&jsxRuntime.exports.jsxs("div",Object.assign({id:"tabs-content",className:L.tabSelect},{children:[jsxRuntime.exports.jsx(Tabs,{selectedId:o,tabsList:s,onChangeTab:function(t){0<=p.map(e=>e.panelId).indexOf(VERSION_PANEL)&&i(hidePanel$1(VERSION_PANEL)),o&&i(hidePanel$1(o)),a(t);var e,n=s.find(e=>e.id===t);null!=(e=null==n?void 0:n.onClick)&&e.call(n,t),null!=n&&n.action&&i(n.action)},roles:w}),(null===x||void 0===x?void 0:x.logo)&&jsxRuntime.exports.jsx("div",Object.assign({className:L.aiWareIcon},{children:jsxRuntime.exports.jsx(Logo,{})}))]}))]}))]}));return jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(Slide$1,Object.assign({"data-id":"123456",in:C,direction:"left",onEntered:()=>u(!0),onExited:()=>i(unmountPanel$1(t))},{children:n}))}))})})}const AppbarPanel=e=>jsxRuntime.exports.jsx(AppbarTabPanel,Object.assign({},e,{withChild:!0,withTab:!1})),Tab=e=>jsxRuntime.exports.jsx(AppbarTabPanel,Object.assign({},e,{withChild:!1,withTab:!0})),changelogPanelLabels=e=>({changelog:e.formatMessage({id:"changelog-panel.header.title",defaultMessage:[{type:0,value:"Release Notes"}]}),closePanelTooltip:e.formatMessage({id:"changelog-panel.header.close-btn-tooltip",defaultMessage:[{type:0,value:"Close panel"}]}),versionLabel:e.formatMessage({id:"changelog-panel.version-title",defaultMessage:[{type:0,value:"Version"}]}),updateRequiredLabel:e.formatMessage({id:"changelog-panel.update-required",defaultMessage:[{type:0,value:"Update required"}]}),deploymentLabel:e.formatMessage({id:"changelog-panel.deployment",defaultMessage:[{type:0,value:"Deployment"}]}),currentVersionLabel:e.formatMessage({id:"changelog-panel.current-version",defaultMessage:[{type:0,value:"Current Version"}]}),previousVersionLabel:e.formatMessage({id:"changelog-panel.previous-version",defaultMessage:[{type:0,value:"Previous Version"}]}),apiUnavailable:e.formatMessage({id:"changelog-panel.no-api",defaultMessage:[{type:0,value:"Cannot retrieve platform information"}]}),current:e.formatMessage({id:"changelog-panel.current",defaultMessage:[{type:0,value:"Current"}]}),previous:e.formatMessage({id:"changelog-panel.previous",defaultMessage:[{type:0,value:"Previous"}]}),noVersionHighlightsCurrent:e.formatMessage({id:"changelog-panel.no-current-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Current Version"}]}),noVersionHighlightsPrevious:e.formatMessage({id:"changelog-panel.no-prev-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Previous Version"}]}),noHighlights:e.formatMessage({id:"changelog-panel.no-highlights",defaultMessage:[{type:0,value:"Cannot retrieve version highlights"}]}),unknown:e.formatMessage({id:"changelog-panel.unknown",defaultMessage:[{type:0,value:"unknown"}]}),viewReleaseNotes:e.formatMessage({id:"version-panel.view-release-notes",defaultMessage:[{type:0,value:"View Release Notes"}]}),error:e.formatMessage({id:"version-panel.error-state",defaultMessage:[{type:0,value:"Error while fetching release notes"}]}),errorHelperText:e.formatMessage({id:"version-panel.error-state-helper-text",defaultMessage:[{type:0,value:"Please try again later"}]})}),useStyles$5=makeStyles()(e=>({flexContainer:{display:"flex",alignItems:"center"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",padding:e.spacing(6,0,6,6),borderBottom:"1px solid rgb(219, 226, 234)"},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},title:{color:"#2A323C"},panelRoot:{padding:"15px",height:"calc(100% - 70px);",overflowY:"scroll"},row:{display:"flex","& svg":{marginRight:"12px",marginBottom:"24px"}},widgets:{"& svg":{fill:"#555F7C"}},veriLogo:{transform:"translate(3px, 2px)"},versionText:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",marginBottom:"5px"},wrapperBox:{padding:"15px 0 15px 15px",border:".5px solid #D5DFE9",borderRadius:"4px",marginBottom:"14px","& iframe":{width:"100%",border:"none"}},aiwareLogo:{marginBottom:"10px"},boldTitle:{fontWeight:700},releaseNotesBtn:{width:"100%",cursor:"pointer",height:"36px",border:"1px solid #5C6269",color:"#5C6269",marginTop:"15px","&:hover":{border:"1px solid #5C6269"}},errorStateContainer:{padding:"40px",textAlign:"center","& img":{width:"40%",marginBottom:"20px"}}})),Header=()=>{const e=useDispatch();var t=useStyles$5()["classes"],n=useIntl(),{changelog:n,closePanelTooltip:r}=changelogPanelLabels(n);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-testid":"create-or-update-token-panel.header"},{children:[jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h1","data-testid":"permissions-panel-header-title",className:t.title},{children:["AIWARE ",n]})),jsxRuntime.exports.jsx("div",Object.assign({className:t.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:r},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>e(hidePanel$1(CHANGELOG_PANEL)),"aria-labelledby":"version-panel.close-button","data-testid":"version-panel.close-button",size:"large"},{children:jsxRuntime.exports.jsx(Close$1,{})}))}))}))]}))},selectLoadingStatus=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.status},selectCurrentVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.currentVersion},selectPreviousVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.previousVersion},CHANGELOG_PANEL="CHANGELOG_PANEL",ChangelogPanelComponent=()=>{var e=useStyles$5()["classes"],t=useIntl(),{versionLabel:t,updateRequiredLabel:n,deploymentLabel:r,previousVersionLabel:i,currentVersionLabel:o,apiUnavailable:a,noHighlights:s,noVersionHighlightsCurrent:l,noVersionHighlightsPrevious:c,unknown:u,viewReleaseNotes:d,error:p,errorHelperText:f}=changelogPanelLabels(t);const h=useDispatch(),[m,g]=react.exports.useState(!1);var v=useSelector(selectLoadingStatus);const[x,y]=react.exports.useState({}),b=e=>{if("https://get.aiware.com"===e.origin){const{height:t,source:n}=e.data;y(e=>Object.assign(Object.assign({},e),{[n]:t+1}))}};var C=useSelector(betaFeaturesSelector),$=(react.exports.useEffect(()=>{var e=gqlIntrospection.getQueries().find(e=>"platformInfo"===e.name);return g(!!e),e&&h(actions$2.versionPanel.fetchVersionInfoStart()),window.addEventListener("message",b),()=>window.removeEventListener("message",b)},[]),(e="")=>{let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol}),S=useSelector(selectCurrentVersion),w=useSelector(selectPreviousVersion),[E,,]=react.exports.useState(!1),o=$(null==S?void 0:S.highlightsUrl)?jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.wrapperBox},{children:[S&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",sx:{mb:"10px"}},{children:o})),jsxRuntime.exports.jsx("iframe",{id:"current-version",src:null==S?void 0:S.highlightsUrl,height:x[(null==(o=null==S?void 0:S.highlightsUrl)?void 0:o.toString())||""]})]})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:l}),$=$(null==w?void 0:w.highlightsUrl)?jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.wrapperBox},{children:[S&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",sx:{mb:"10px"}},{children:i})),jsxRuntime.exports.jsx("iframe",{id:"previous-version",src:null==w?void 0:w.highlightsUrl,height:x[(null==(l=null==w?void 0:w.highlightsUrl)?void 0:l.toString())||""]})]})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:c}),i=jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%"}},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.wrapperBox},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.flexContainer},{children:[jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h1"},{children:[t," ",null!=S&&S.version?null==S?void 0:S.version:u]})),E?jsxRuntime.exports.jsxs(Typography$1,Object.assign({sx:{ml:"10px"},variant:"caption"},{children:["(",n,")"]})):null]})),jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{mt:"5px"}},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2"},{children:[r," -"," ",S&&S.createdAt?dateFormatter((null==S?void 0:S.createdAt)||null):u]}))}))]})),S?o:null]})),w?$:null,!S&&!w&&jsxRuntime.exports.jsx(VersionChangelogNullState,{label:s}),C&&jsxRuntime.exports.jsxs(Button$1,Object.assign({className:e.releaseNotesBtn,variant:"outlined",onClick:()=>({})},{children:[jsxRuntime.exports.jsx(Launch,{sx:{mr:"5px",width:"18px"}})," ",d]}))]}),l=jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.errorStateContainer},{children:[jsxRuntime.exports.jsx("img",{src:img$a,alt:"error"}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",sx:{fontWeight:700}},{children:p}))}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:f}))})]}));return jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{height:"calc(100vh - 60px)",overflow:"hidden"}},{children:[jsxRuntime.exports.jsx(Header,{}),"pending"===v&&jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{p:"15px",display:"flex",justifyContent:"center"}},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),"success"===v&&jsxRuntime.exports.jsx("div",Object.assign({className:e.panelRoot},{children:m?i:jsxRuntime.exports.jsx(VersionChangelogNullState,{label:a})})),"failure"===v&&l]}))},ChangelogPanel=()=>jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(ChangelogPanelComponent,{})}));var index_esm$2=Object.freeze({__proto__:null,AppbarPanel:AppbarPanel,AppbarTabPanel:AppbarTabPanel,ChangelogPanel:ChangelogPanel,TabPanel:Tab,VersionPanel:VersionPanel});const Panel=({panelId:t,children:e})=>{var n;const r=useDispatch(),{microFrontend:i,panelConfig:{minWidth:o,padding:a=0,header:s,footer:l,marginTop:c=0,marginStart:u=0,show:d,width:p=500,zIndex:f=1}}=useSelector(e=>e.panels.find(e=>e.panelId===t)),h=makeStyles()(e=>({container:{position:"fixed",top:c,right:u,height:"100%",minWidth:o,width:p,zIndex:f},padding:{padding:e.spacing(a),paddingTop:e.spacing(a/2)},margin:{margin:e.spacing()},headerContainer:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},headerTitle:{margin:e.spacing()},actionButton:{margin:e.spacing()},actionContainer:{"&:last-child":{marginRight:e.spacing(2)}},footer:{}}))()["classes"],m=e=>{var t;return e.icon?jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:h.actionButton,onClick:()=>r(e.action),size:"large"},{children:e.icon})):(t=e,jsxRuntime.exports.jsx(Button$1,Object.assign({className:h.actionButton,size:t.size,variant:t.variant,onClick:()=>r(e.action)},{children:t.label})))};return jsxRuntime.exports.jsx(Slide$1,Object.assign({in:d,direction:"left",onExited:()=>r(unmountPanel$1(t))},{children:jsxRuntime.exports.jsxs(Paper$1,Object.assign({elevation:3,id:t,"data-test":"panel-"+(t||"unknown"),className:h.container},{children:[s&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:h.headerContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({gutterBottom:!0,className:h.headerTitle,variant:"h4"},{children:s.title})),jsxRuntime.exports.jsxs("div",Object.assign({className:h.actionContainer},{children:[null==(n=s.actions)?void 0:n.map(e=>m(e)),jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"close-button-"+t,className:h.actionButton,onClick:()=>r(hidePanel$1(t)),size:"large"},{children:jsxRuntime.exports.jsx(default_1$6,{})}))]}))]})),s.divider&&jsxRuntime.exports.jsx(Divider$1,{})]}),jsxRuntime.exports.jsx("div",Object.assign({className:h.padding},{children:e?react.exports.cloneElement(e,Object.assign(Object.assign({},i.config||{}),{dataId:t,hidePanel:()=>r(hidePanel$1(t))})):jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"No micro frontend passed!"})})})),l&&jsxRuntime.exports.jsxs("div",Object.assign({className:h.footer},{children:[l.divider&&jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsxs("div",Object.assign({className:h.headerContainer},{children:[jsxRuntime.exports.jsx("div",{}),jsxRuntime.exports.jsx("div",Object.assign({className:h.actionContainer},{children:null==(n=l.actions)?void 0:n.map(e=>m(e))}))]}))]}))]}))}))},SamplePanel5=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel5!"})}),SamplePanel4=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel4!"})}),SamplePanel3=n=>{const r=useDispatch();return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("h1",{children:"Welcome to picker!"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({id:"discrete-slider",gutterBottom:!0},{children:"Temperature"})),jsxRuntime.exports.jsx(Slider$1,{"data-test":"slider",defaultValue:n.value,value:n.value,"aria-labelledby":"discrete-slider",valueLabelDisplay:"auto",step:10,marks:!0,min:0,max:110,onChange:(e,t)=>{r(updatePanelMicroFrontendProps({id:n.dataId,props:Object.assign(Object.assign({},n),{value:t})}))},onChangeCommitted:(e,t)=>{r(updatePanelMicroFrontendProps({id:n.dataId,props:Object.assign(Object.assign({},n),{value:t})})),r(setData({id:n.dataId,data:t}))}})]})},SamplePanel2=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel2!"})}),useStyles$3=makeStyles()(e=>({container:{},root:{minWidth:50},bullet:{display:"inline-block",margin:"0 2px",transform:"scale(0.8)"},title:{fontSize:14},pos:{marginBottom:12}})),SamplePanel1=e=>{var t=useStyles$3()["classes"],n=jsxRuntime.exports.jsx("span",Object.assign({className:t.bullet},{children:"•"}));return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsxs("h1",{children:["Welcome to SamplePanel1 ",e.name||"Unknown Person","!"]}),jsxRuntime.exports.jsxs(Card$1,Object.assign({className:t.root},{children:[jsxRuntime.exports.jsxs(CardContent$1,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({className:t.title,color:"textSecondary",gutterBottom:!0},{children:"Word of the Day"})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h5",component:"h2"},{children:["be",n,"nev",n,"o",n,"lent"]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:t.pos,color:"textSecondary"},{children:"adjective"})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",component:"p"},{children:["well meaning and kindly.",jsxRuntime.exports.jsx("br",{}),'"a benevolent smile"']}))]}),jsxRuntime.exports.jsx(CardActions$1,{children:jsxRuntime.exports.jsx(Button$1,Object.assign({size:"small"},{children:"Learn More"}))})]}))]}))};var WidgetsStatus,index_esm$1=Object.freeze({__proto__:null,Panel:Panel,SamplePanel1:SamplePanel1,SamplePanel2:SamplePanel2,SamplePanel3:SamplePanel3,SamplePanel4:SamplePanel4,SamplePanel5:SamplePanel5});const registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent,[AvailablePanels.APP_BAR_PANEL_TEMPLATE]:AppbarPanel,[AvailablePanels.TAB_TEMPLATE]:Tab,[AvailablePanels.SIMPLE_PANEL]:Panel},registryLookup=t=>__awaiter$d(void 0,void 0,void 0,function*(){if(registry[t])return yield registry[t];let e=Promise.resolve(null);switch(t){case AvailableWidgets.SAMPLE_APP_BAR:e=import("./js-core.esm2.js").then(e=>e.SampleAppBar);break;case AvailableWidgets.RESET_PASSWORD:e=import("./js-core.esm4.js").then(e=>e.ResetPassword);break;case AvailableWidgets.FLOW_CENTER:e=import("./js-core.esm7.js").then(e=>e.App);break;case AvailableWidgets.FLOW_WIDGET:e=import("./js-core.esm8.js").then(function(e){return e.i}).then(e=>e.App);break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=import("./js-core.esm18.js").then(e=>e.EngineCenterBrowse);break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.AppbarTabPanel);break;case AvailableComponents.NOTIFICATION_PANEL:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationPanel);break;case AvailableComponents.NOTIFICATION_DETAIL:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationDetailPanel);break;case AvailableComponents.NOTIFICATION_SETTING:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationSetting);break;case AvailableComponents.NOTIFICATION_UTILITY:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationUtilityPanel);break;case AvailableComponents.NOTIFICATION_APPLICATION:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationApplication);break;case AvailableComponents.HELP_PANEL:e=Promise.resolve().then(function(){return index_esm}).then(e=>e.HelpCenterPanel);break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=Promise.resolve().then(function(){return index_esm$4}).then(e=>e.EditProFilePicture);break;case AvailableComponents.TEST_COMPONENT:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel1);break;case AvailableComponents.TEST_COMPONENT2:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel2);break;case AvailableComponents.TEST_COMPONENT3:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel3);break;case AvailableComponents.SETTING_PREFERENCE:e=import("./js-core.esm36.js").then(e=>e.SettingsPreferencesPanel);break;case AvailableComponents.ORGANIZATION_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.OrganizationPanel);break;case AvailableComponents.INVITE_USERS_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.InviteUsersPanel);break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.InviteRequestsPanel);break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.ReviewRequestPanel);break;case AvailableComponents.ADD_APPLICATIONS:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.AddApplicationsPanel);break;case AvailableComponents.DATA_CENTER_BROWSE:e=import("./js-core.esm37.js").then(e=>e.DataCenterBrowse);break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=import("./js-core.esm37.js").then(e=>e.FoldersAndFilesPanel);break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=import("./js-core.esm37.js").then(e=>e.FileInfoPanel);break;case AvailableComponents.DATA_CENTER_IMPORTER:e=import("./js-core.esm45.js").then(e=>e.DataCenterImporter);break;case AvailableComponents.DATA_LABELER:e=import("./js-core.esm46.js").then(e=>e.DataLabelerPanel);break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=import("./js-core.esm47.js").then(e=>e.AdminCenterOpenId);break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=import("./js-core.esm49.js").then(e=>e.AdminCenterBrowse);break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=import("./js-core.esm54.js").then(e=>e.DataCenterProcessAI);break;case AvailableComponents.ENGINE_CENTER_NEW:e=import("./js-core.esm19.js").then(function(e){return e.k}).then(e=>e.EngineCenterNew);break;case AvailableComponents.ENGINE_CENTER_FILTER:e=import("./js-core.esm18.js").then(e=>e.EngineCenterFilter);break;case AvailableComponents.APP_CENTER_FILTER:e=import("./js-core.esm55.js").then(e=>e.AppCenterFilter);break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=import("./js-core.esm18.js").then(e=>e.EngineDetails);break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=import("./js-core.esm18.js").then(e=>e.CreateNewBuildPanel);break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=import("./js-core.esm19.js").then(function(e){return e.k}).then(e=>e.EngineCenterCustomFieldsForm);break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=import("./js-core.esm19.js").then(function(e){return e.k}).then(e=>e.SchemasFormPanel);break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=import("./js-core.esm19.js").then(function(e){return e.k}).then(e=>e.InputTypeFlyout);break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=import("./js-core.esm18.js").then(e=>e.EditReleaseNotes);break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=import("./js-core.esm18.js").then(e=>e.VersionHistoryPanel);break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=import("./js-core.esm45.js").then(e=>e.SupportedFileTypes);break;case AvailableComponents.EDIT_FILE_METADATA:e=import("./js-core.esm45.js").then(e=>e.EditFileMetadata);break;case AvailableWidgets.APP_CENTER_BROWSE:e=import("./js-core.esm55.js").then(e=>e.AppCenterBrowse);break;case AvailableComponents.APP_CENTER_NEW:e=import("./js-core.esm56.js").then(e=>e.AppCenterNew);break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=import("./js-core.esm56.js").then(e=>e.AppCenterConfigFieldsForm);break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=import("./js-core.esm56.js").then(e=>e.AppCenterContextMenuExtensionPanel);break;case AvailableComponents.APP_CENTER_BROWSE:e=import("./js-core.esm55.js").then(e=>e.AppCenterBrowse);break;case AvailableComponents.APP_CENTER_DETAILS:e=import("./js-core.esm55.js").then(e=>e.AppCenterDetails);break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=import("./js-core.esm54.js").then(e=>e.DataCenterEngineSelection);break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=import("./js-core.esm43.js").then(e=>e.NewGroupPanel);break;case AvailableComponents.PERMISSIONS_PANEL:e=import("./js-core.esm39.js").then(e=>e.PermissionsPanel);break;case AvailableComponents.GROUP_INFO_PANEL:e=import("./js-core.esm39.js").then(e=>e.GroupInfoPanel);break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=import("./js-core.esm39.js").then(e=>e.NewPermissionSetPanel);break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=import("./js-core.esm39.js").then(e=>e.PermissionSetDetailsPanel);break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=import("./js-core.esm37.js").then(e=>e.MediaDetailsPanelIframe);break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=import("./js-core.esm37.js").then(e=>e.IngestionCreationPanel);break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=import("./js-core.esm37.js").then(e=>e.SelectImportSource);break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=import("./js-core.esm37.js").then(e=>e.SourceCreationPanel);break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=import("./js-core.esm43.js").then(e=>e.GroupDetailsPanel);break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=import("./js-core.esm43.js").then(e=>e.AddMemberPanel);break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=import("./js-core.esm50.js").then(e=>e.ApplicationDetailsPanel);break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=import("./js-core.esm57.js").then(e=>e.ProcessingCenterSources);break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=import("./js-core.esm57.js").then(e=>e.ErrorDetailPanel);break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=Promise.resolve().then(function(){return index_esm$6}).then(e=>e.UserApplicationSettingsPanel);break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=import("./js-core.esm50.js").then(e=>e.AddUsersPanel);break;case AvailableComponents.PROCESSING_CENTER_BROWSE:e=import("./js-core.esm60.js").then(e=>e.ProcessingCenterBrowse);break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=import("./js-core.esm61.js").then(e=>e.JobsTableSettingsPanel);break;case AvailableComponents.VERSION_PANEL:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.VersionPanel);break;case AvailableComponents.CHANGELOG_PANEL:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.ChangelogPanel);break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=import("./js-core.esm63.js").then(e=>e.DagBuilder);break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=import("./js-core.esm64.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterIngestion);break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=import("./js-core.esm64.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterAdvancedSettings);break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=import("./js-core.esm64.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterAffiliatePanel);break;case AvailableComponents.JOBS_DETAILS_PANEL:e=import("./js-core.esm61.js").then(e=>e.JobsDetailsPanel);break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=import("./js-core.esm62.js").then(e=>e.TasksTableSettingsPanel);break;case AvailableComponents.RESOURCE_CENTER_BROWSE:e=import("./js-core.esm66.js").then(e=>e.ResourceCenterBrowse);break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=import("./js-core.esm70.js").then(e=>e.PackageDetails);break;case AvailableComponents.PACKAGE_MANAGER_PANEL:e=import("./js-core.esm71.js").then(function(e){return e.O}).then(e=>e.PackageManager);break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=import("./js-core.esm72.js").then(e=>e.InstanceAdminCenterBrowse);break;case AvailableComponents.MANAGE_GRANTS:e=import("./js-core.esm70.js").then(e=>e.ManageGrantsPanel);break;case AvailableComponents.SCHEMA_DETAILS_PANEL:e=import("./js-core.esm73.js").then(e=>e.SchemaDetailsPanel);break;case AvailableComponents.USER_DETAILS_PANEL:e=import("./js-core.esm51.js").then(e=>e.UserDetailsPanel);break;case AvailableComponents.CREATE_OR_UPDATE_TOKEN_PANEL:e=import("./js-core.esm52.js").then(e=>e.CreateOrUpdateApiTokenPanel)}return yield registry[t]=e}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$2=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$2,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$i(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})})),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react.exports.useState([]),[r,i]=react.exports.useState(!1),[o,a]=react.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),!0}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState$1={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState$1,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace$1="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace$1]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(){var e=useSelector(initialConfigSelector),t=useSelector(customKnowledgeBaseUrlSelector),n=useSelector(customDocsUrlSelector),r=useSelector(helpCenterSelectedTabIdSelector),i=useSelector(e=>null==e?void 0:e.panels),o=useStyles$1()["classes"],[a]=react.exports.useState(defaultLocale);const s=useDispatch();i=null==i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),t=i&&t?t:e.knowledgeBaseURL,i=i&&n?n:e.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:a},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:o.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{s(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:i})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$A,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var EPermissionAction,EAuthResourceType,EAuthSubResourceType,index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react.exports.useState(null),[n,r]=react.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}!function(e){e.Create="create",e.Read="read",e.Update="update",e.Delete="delete",e.File="file",e.CustomerService="customerService",e.Access="access"}(EPermissionAction=EPermissionAction||{}),function(e){e.Folder="Folder",e.TDO="TDO",e.Organization="Organization",e.Source="Sources",e.Schedule="Schedules",e.Job="Job"}(EAuthResourceType=EAuthResourceType||{}),function(e){e.Group="group",e.Media="media",e.Package="package",e.User="user",e.Workflow="workflow",e.ProcessingCenter="processingCenter",e.ResourceCenter="resourceCenter"}(EAuthSubResourceType=EAuthSubResourceType||{});const orgRightsByObjectPermission={[EAuthResourceType.TDO]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update"],delete:["cms.media.delete","recording.delete"]},[EAuthResourceType.Folder]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update"],delete:["cms.media.delete","recording.delete"],file:["cms.media.create","recording.create"]},[EAuthResourceType.Source]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update","source.update"],delete:["cms.media.delete","recording.delete"]},[EAuthResourceType.Job]:{customerService:["cms.customerservice"],create:["job.create"],read:["job.read"],update:["job.update"],delete:["job.delete"]},[EAuthResourceType.Schedule]:{customerService:["cms.customerservice"],create:["job.create"],read:["job.read"],update:["job.update"],delete:["job.delete"]},[EAuthSubResourceType.User]:{create:["admin.user.create"],delete:["admin.user.delete"]},[EAuthSubResourceType.Group]:{create:["admin.group.create"],delete:["admin.group.delete"]},[EAuthSubResourceType.Package]:{update:["developer.build.update"]}},permissionActionsToFetchByObjectType={[EAuthResourceType.TDO]:{create:"AIWARE_TDO_CREATE",read:"AIWARE_TDO_READ",update:"AIWARE_TDO_UPDATE",delete:"AIWARE_TDO_DELETE"},[EAuthResourceType.Folder]:{create:"AIWARE_FOLDER_CREATE",read:"AIWARE_FOLDER_READ",update:"AIWARE_FOLDER_UPDATE",delete:"AIWARE_FOLDER_DELETE",file:"AIWARE_FOLDER_FILE"},[EAuthResourceType.Source]:{create:"AIWARE_SOURCES_CREATE",read:"AIWARE_SOURCES_READ",update:"AIWARE_SOURCES_UPDATE",delete:"AIWARE_SOURCES_DELETE"},[EAuthResourceType.Job]:{customerService:"CMS_CUSTOMERSERVICE",create:"AIWARE_JOB_CREATE",read:"AIWARE_JOB_READ",update:"AIWARE_JOB_UPDATE",delete:"AIWARE_JOB_DELETE"},[EAuthResourceType.Schedule]:{customerService:"CMS_CUSTOMERSERVICE",create:"AIWARE_JOB_CREATE",read:"AIWARE_JOB_READ",update:"AIWARE_JOB_UPDATE",delete:"AIWARE_JOB_DELETE"},[EAuthResourceType.Organization]:{[EAuthSubResourceType.Group]:{create:"AIWARE_GROUP_CREATE",delete:"AIWARE_GROUP_DELETE"},[EAuthSubResourceType.Package]:{create:"AIWARE_PACKAGE_CREATE",read:"AIWARE_PACKAGE_READ",update:"AIWARE_PACKAGE_UPDATE",delete:"AIWARE_PACKAGE_DELETE"},[EAuthSubResourceType.User]:{create:"AIWARE_USER_CREATE",delete:"AIWARE_USER_DELETE"},[EAuthSubResourceType.ResourceCenter]:{access:"AIWARE_RESOURCE_CENTER_ACCESS"}}},permissionTypeToFetchByEntityType={[EAuthResourceType.TDO]:[EAuthResourceType.TDO],[EAuthResourceType.Folder]:[EAuthResourceType.Folder],[EAuthResourceType.Source]:[EAuthResourceType.Source],[EAuthResourceType.Job]:[EAuthResourceType.Job],[EAuthResourceType.Schedule]:[EAuthResourceType.Schedule],[EAuthResourceType.Organization]:[EAuthResourceType.Organization,EAuthResourceType.TDO,EAuthResourceType.Folder,EAuthResourceType.Source,EAuthResourceType.Schedule,EAuthResourceType.Job]},authResourcesByEntityType={[EntityType.Folders]:EAuthResourceType.Folder,[EntityType.Tdos]:EAuthResourceType.TDO,[EntityType.Sources]:[EAuthResourceType.Source],[EntityType.Schedules]:[EAuthResourceType.Schedule]},convertEntityToAuthResource=e=>authResourcesByEntityType[e],convertPermissionsToRights=(e,t,n)=>{const r=(null==(e=orgRightsByObjectPermission[e])?void 0:e[t])||[];return 0<n.filter(e=>r&&r.includes(e)).length},permissionDetailIsActionPair=e=>Object.keys(e).some(e=>Object.values(EPermissionAction).includes(e)),getQueryActions=(e,t,n)=>({targetObjectType:e,targetActions:Object.keys(t).map(e=>({targetAction:e,serverName:t[e],resource:n}))}),getPermissionActions=(t,n)=>{return permissionDetailIsActionPair(t)?[getQueryActions(n,t)]:Object.keys(t).map(e=>getQueryActions(n,t[e]||{},e))},getPermissionTypesToQuery=e=>{return(permissionTypeToFetchByEntityType[e]||[]).flatMap(e=>getPermissionActions(permissionActionsToFetchByObjectType[e]||{},e))},isPermissionLoading=e=>!e||"pending"===e.status||"idle"===e.status,hasPermission=(e,t)=>!!e&&("failure"===e.status||e&&"success"===e.status&&e.permissions&&e.permissions[t]),namespace="permissions",initialState={permissionsByObject:{},rights:{status:"idle"}},slice=createSlice({name:namespace,initialState:initialState,reducers:{fetchObjectPermissionsStart(e,t){var{entityType:t,entityId:n}=t.payload;Object.prototype.hasOwnProperty.call(e.permissionsByObject,t)||(e.permissionsByObject[t]={}),Object.prototype.hasOwnProperty.call(e.permissionsByObject[t],n)||(e.permissionsByObject[t][n]={}),Object.prototype.hasOwnProperty.call(e.permissionsByObject[t][n],t)||(e.permissionsByObject[t][n][t]={status:"idle"})},fetchObjectPermissionsStarted(e,t){var{entityId:t,entityType:n}=t.payload;e.permissionsByObject[n][t][n].status="pending"},fetchObjectPermissionsSucceeded(t,e){const{entityType:n,entityId:r,permissions:i}=e.payload;Object.keys(i).forEach(e=>{t.permissionsByObject[n][r][e]={status:"success",permissions:i[e]}})},fetchObjectPermissionsFailed(e,t){var{entityType:t,entityId:n}=t.payload;e.permissionsByObject[t][n][t]={status:"failure"}},fetchMyRightsStarted(e){e.rights.status="pending"},fetchMyRightsSucceeded(e,t){e.rights.status="success",e.rights.myRights=t.payload},fetchMyRightsFailed(e){e.rights.status="failure"}}}),actions=slice.actions;var permissionsReducer=slice.reducer;function __awaiter(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}function getObjectPermissions(u,d,p){var f;return __awaiter(this,void 0,void 0,function*(){var{entityType:e,entityId:t}=p,n="getPermissions",r=getPermissionTypesToQuery(e);let i=!1,o=[],a={};for(;!i;){var s=`
|
|
1479
1479
|
query ${n}($entityType: AuthResourceType!, $entityId: ID!) {
|
|
1480
1480
|
${r.reduce((n,e)=>{const{targetObjectType:r,targetActions:t}=e;return t.forEach(e=>{var t=e.resource?`${r}__${e.resource}__`+e.targetAction:r+"__"+e.targetAction;o.includes(e.serverName)||n.push(`
|
|
1481
1481
|
${t}: hasPermissions(resourceType: $entityType, ids: [$entityId], permissions: [${e.serverName}]) {
|
|
@@ -1483,4 +1483,4 @@ createScheduledJob(input:{
|
|
|
1483
1483
|
}
|
|
1484
1484
|
`)}),n},[]).join("\r\n")}
|
|
1485
1485
|
}
|
|
1486
|
-
`,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$i(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$i(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule(),getPermissionsModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){var n;validateConfig(e)&&(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t}))))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme$1,lightTheme:lightTheme$1}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"24ee7bfbc",releaseDate:"2023-07-13T00:57:59.063Z"});export{createReducer as $,AIWareIntlProvider as A,Box$1 as B,FormControl$1 as C,TextField$1 as D,classNames as E,FormattedMessage$1 as F,Grid$1 as G,resetPasswordRequest as H,InputLabel$1 as I,InputAdornment$1 as J,IconButton$1 as K,LoadingButton$1 as L,Select$1 as M,Location as N,OutlinedInput$1 as O,Provider$2 as P,MenuItem$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,Button$1 as U,Divider$1 as V,createTheme$1 as W,systemStyled as X,useThemeProps$1 as Y,createAction as Z,_extends$2 as _,generateUtilityClasses as a,Popper$1 as a$,createSlice as a0,ENGINE_OWNER_TYPES as a1,ENGINE_FILTER_TYPES as a2,DynamicModuleLoader as a3,preferredLanguageSelector as a4,baseUrlSelector as a5,rootApiSelector as a6,sessionTokenSelector as a7,graphEndpointSelector as a8,controllerNodeRedImageSelector as a9,fetchTemplateGallery as aA,isRevisionsExistOnServerRequest as aB,FormLabel$1 as aC,default_1$b as aD,FormGroup$1 as aE,FormControlLabel$1 as aF,Checkbox$1 as aG,fetchTemplateGalleryFallback as aH,Card$1 as aI,CardContent$1 as aJ,img$m as aK,CardActions$1 as aL,flowStyles as aM,NoResults as aN,CircularProgress$1 as aO,img$c as aP,Dialog$1 as aQ,setApiEndpoint as aR,TableContainer$1 as aS,Table$1 as aT,TableHead$1 as aU,TableRow$1 as aV,TableCell$1 as aW,TableSortLabel$1 as aX,TableBody$1 as aY,img$h as aZ,default_1 as a_,controllerUrlSelector as aa,automateControllerUrlSelector as ab,flowCenterDialogSelector as ac,automateUrlSelector as ad,Portal$1 as ae,flowCenterDialogReducer as af,List$2 as ag,ListItem$1 as ah,ListItemIcon$1 as ai,ListItemText$1 as aj,flowCenterDialogAction as ak,all as al,img$o as am,img$p as an,img$r as ao,img$s as ap,Tooltip$1 as aq,img$i as ar,img$G as as,Skeleton$1 as at,takeLatest$1 as au,fetchAllTags as av,put as aw,select as ax,fetchFlows as ay,call$i as az,styled$1 as b,RadioGroup$1 as b$,ClickAwayListener as b0,Fade$1 as b1,img$t as b2,img$q as b3,img$Q as b4,img$C as b5,DialogTitle$1 as b6,DialogContent$1 as b7,DialogActions$1 as b8,Snackbar$1 as b9,reactDom as bA,Transition$1 as bB,__awaiter$d as bC,__generator$2 as bD,__spread as bE,TransitionGroup$1 as bF,connect$1 as bG,Bookmark as bH,EngineFlagIcons as bI,createAsyncThunk as bJ,withStyles as bK,getConfigModule as bL,getAuthModule as bM,getSnackbarModule as bN,AIWareCacheProvider as bO,img$R as bP,img$e as bQ,img$d as bR,isEmpty_1 as bS,Backdrop$1 as bT,getDefaultMiddleware as bU,isNil_1 as bV,UpDown as bW,Icon$1 as bX,get_1 as bY,map_1 as bZ,keys_1 as b_,default_1$6 as ba,img$j as bb,img$l as bc,img$U as bd,Tabs$2 as be,Tab$2 as bf,deleteEngine as bg,fetchEngine as bh,img$k as bi,AIWareFormatMessage as bj,FormattedDate as bk,fetchVeritoneGraphQLApi as bl,useTheme as bm,KeyboardArrowRight as bn,KeyboardArrowLeft as bo,useId as bp,InputUnstyled as bq,isHostComponent as br,getDefaultExportFromNamespaceIfNotNamed as bs,commonjsRequire as bt,_typeof$4 as bu,_inheritsLoose$2 as bv,_assertThisInitialized$1 as bw,React as bx,hoistNonReactStatics_cjs as by,_defineProperty$1 as bz,Paper$1 as c,isArray_1 as c$,Avatar$1 as c0,img$w as c1,baseGraphQLApi as c2,FormHelperText$2 as c3,img$g as c4,StyledEngineProvider as c5,ThemeProvider as c6,lightTheme$1 as c7,CssBaseline as c8,Hide as c9,mountPanel$1 as cA,DialogContentText$1 as cB,userSelector$2 as cC,MoreVert$1 as cD,Menu$1 as cE,Edit as cF,Upload as cG,Delete as cH,CustomTabs as cI,useBackupImg as cJ,img$1z as cK,validate as cL,configSelector as cM,baseGraphQLApiWithError as cN,VerifiedFilled as cO,Add as cP,ExpandLess as cQ,ExpandMore as cR,Collapse$1 as cS,img$16 as cT,Filter$1 as cU,DynamicTable as cV,useTheme$3 as cW,getThemeProps as cX,useEnhancedEffect$1 as cY,React$1 as cZ,_arrayPush as c_,has_1 as ca,showMessage as cb,MessageSeverity as cc,Radio$2 as cd,createSvgIcon$2 as ce,_createCompounder as cf,_baseIteratee as cg,isArrayLike_1 as ch,toInteger_1 as ci,_toPropertyKey as cj,_setPrototypeOf$3 as ck,commonjsGlobal$1 as cl,combineReducers as cm,createSelector$1 as cn,fork as co,AIWareThemeProvider$1 as cp,Stack$4 as cq,Close$1 as cr,FullscreenExit as cs,Fullscreen as ct,TabPanel as cu,default_1$8 as cv,unmountPanel$1 as cw,AvailableComponents as cx,delay$1 as cy,hidePanel$1 as cz,capitalize$2 as d,_baseEach as d$,_baseToString as d0,_baseTrim as d1,_castSlice as d2,_stringToArray as d3,toString_1 as d4,ReactIs as d5,upperFirst_1 as d6,isString_1 as d7,_baseGet as d8,_baseSlice as d9,useTheme$2 as dA,useControlled as dB,useEventCallback as dC,ButtonBase$1 as dD,useForkRef as dE,getDefaultExportFromCjs as dF,isObject_1 as dG,MoreHor as dH,takeEvery$1 as dI,EngineCategoryIcons as dJ,selectApiConfigs$2 as dK,panelsSelector as dL,tabsClasses$1 as dM,AlarmTwo as dN,EditList as dO,Chip$1 as dP,usePreviousProps$1 as dQ,setRef as dR,inputClasses$1 as dS,inputBaseClasses$1 as dT,outlinedInputClasses$1 as dU,filledInputClasses$1 as dV,ClearIcon as dW,ArrowDropDownIcon as dX,_arrayMap as dY,_Symbol as dZ,isArguments_1 as d_,_castPath as da,_toKey as db,_isIndex as dc,channel$1 as dd,useIntl as de,VideoCamera as df,Image$1 as dg,Sound as dh,Description as di,toNumber_1 as dj,ProgressStepper as dk,size_1 as dl,take as dm,CurlyBraces as dn,UnknownDocument as dp,sdkEventManager as dq,SdkEvents as dr,SdkError as ds,EngineClassIcons as dt,Mode2 as du,EngineModeIcons as dv,DeploymentModelIcons as dw,guid as dx,forceReflow as dy,alpha as dz,_objectWithoutPropertiesLoose$2 as e,hasPermission as e$,_arrayFilter as e0,_getNative as e1,eq_1 as e2,_root as e3,_Uint8Array as e4,_overArg as e5,_isPrototype as e6,isObjectLike_1 as e7,_baseGetTag as e8,_arrayLikeKeys as e9,img$1x as eA,img$J as eB,authSelector as eC,ListItemAvatar$1 as eD,emphasize as eE,useSlotProps as eF,_arraySome as eG,EntityType as eH,injectIntl as eI,ErrorBoundary$1 as eJ,EPermissionAction as eK,Process as eL,Information as eM,NewFolder as eN,SpecialFolder as eO,User as eP,Source as eQ,Search$1 as eR,selectIsOLPEnabled as eS,ListItemSecondaryAction$1 as eT,getLibraryModule as eU,cmsUrlSelector as eV,betaFeaturesSelector as eW,SearchStructuredData as eX,Grow$1 as eY,index as eZ,actions as e_,isBuffer$3 as ea,isFunction_1 as eb,isTypedArray_1 as ec,_Stack as ed,_baseFor as ee,identity_1 as ef,_isIterateeCall as eg,isSymbol_1 as eh,_baseMap as ei,_baseUnary as ej,memoizeOne as ek,createBox$1 as el,StepperContext$1 as em,StepContext$1 as en,SvgIcon$1 as eo,StepConnector$1 as ep,_Set as eq,_setToArray as er,_SetCache as es,_cacheHas as et,img$N as eu,img$M as ev,img$1v as ew,img$1u as ex,img$1t as ey,img$K as ez,clsx as f,green$1 as f$,UserAddFilled as f0,Popover$1 as f1,MenuList$1 as f2,MoveFolder as f3,EAuthResourceType as f4,Slide$1 as f5,img$a as f6,selectPanelByPanelName as f7,FullScreenContainer as f8,isPermissionLoading as f9,selectOrgId as fA,selectIsUserAdmin as fB,AvatarGroup$1 as fC,ErrorState$2 as fD,NullState$2 as fE,Group as fF,PermissionChangedAction as fG,Lock as fH,useOrganizationPermissions as fI,EAuthSubResourceType as fJ,AddGroup as fK,initialConfigSelector as fL,ConfirmationModal as fM,EnumHelpers as fN,formatBytes as fO,LinearProgress$1 as fP,NotInterested as fQ,mountPanelForResponse$1 as fR,ArrowDown as fS,ArrowUp as fT,useInterval as fU,Iam as fV,Users as fW,SecurityGroup as fX,getOrganizationPanelModule as fY,Lock2 as fZ,NoApps as f_,Settings$2 as fa,Hamburger as fb,List as fc,Download as fd,Badge$1 as fe,convertEntityToAuthResource as ff,selectUserOrgEdgeVersion as fg,EditAttributes as fh,gqlIntrospection as fi,ProcessingDetail as fj,img$v as fk,img$x as fl,img$4 as fm,FilterRemove as fn,CheckCircle as fo,FolderOpen as fp,Voice as fq,useDoubleClick as fr,FolderFilled as fs,Time as ft,img$y as fu,Undefined as fv,PodcastSource as fw,YoutubeSource as fx,TVSource as fy,RadioSource as fz,generateUtilityClass as g,unmountAllPanel as g$,md5 as g0,selectIsSuperAdmin as g1,organizations_selector as g2,actions$5 as g3,AddUser as g4,selectors as g5,LibraryDropdown as g6,Remove as g7,Save as g8,Input$3 as g9,Hidden as gA,toFinite_1 as gB,_baseForOwn as gC,_arrayReduce as gD,hasIn_1 as gE,useSyncExternalStoreExports as gF,Packages as gG,Resources$1 as gH,selectUserCanCreatePackage as gI,Engines as gJ,PackagesAvatar as gK,actionChannel as gL,cancelled as gM,flush$3 as gN,cancel as gO,FlowCenter2 as gP,registry as gQ,registerComponent as gR,AvailableWidgets as gS,updatePanelMicroFrontendProps as gT,setData as gU,root as gV,mountWidget as gW,unmountWidget as gX,mountPanel as gY,unmountPanel as gZ,hidePanel as g_,Copy as ga,ArrowForward as gb,Modal$1 as gc,_baseIsEqual as gd,Slider$1 as ge,_getSymbols as gf,stubArray_1 as gg,_baseGetAllKeys as gh,_getTag as gi,_nodeUtil as gj,_getAllKeys as gk,_castFunction as gl,Article as gm,Task as gn,View as go,_objectSpread2 as gp,serialize as gq,stringify$2 as gr,compile as gs,Check as gt,FormattedRelativeTime$1 as gu,BottomQueue as gv,TopQueue as gw,Pause as gx,Cancel as gy,Folder as gz,composeClasses as h,init as h0,aiwareEvents as h1,createSvgIcon$1 as i,jsxRuntime as j,interopRequireDefault as k,Route as l,makeStyles as m,useDispatch as n,useSelector as o,authStatusSelector as p,authContextSelector as q,react as r,store$4 as s,AuthContext as t,useThemeProps as u,lodash as v,Alert$1 as w,useNavigate as x,useLocation as y,authErrorMessage as z};
|
|
1486
|
+
`,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$i(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$i(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule(),getPermissionsModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){var n;validateConfig(e)&&(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t}))))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme$1,lightTheme:lightTheme$1}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"8e5965319",releaseDate:"2023-07-13T15:01:44.567Z"});export{createReducer as $,AIWareIntlProvider as A,Box$1 as B,FormControl$1 as C,TextField$1 as D,classNames as E,FormattedMessage$1 as F,Grid$1 as G,resetPasswordRequest as H,InputLabel$1 as I,InputAdornment$1 as J,IconButton$1 as K,LoadingButton$1 as L,Select$1 as M,Location as N,OutlinedInput$1 as O,Provider$2 as P,MenuItem$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,Button$1 as U,Divider$1 as V,createTheme$1 as W,systemStyled as X,useThemeProps$1 as Y,createAction as Z,_extends$2 as _,generateUtilityClasses as a,Popper$1 as a$,createSlice as a0,ENGINE_OWNER_TYPES as a1,ENGINE_FILTER_TYPES as a2,DynamicModuleLoader as a3,preferredLanguageSelector as a4,baseUrlSelector as a5,rootApiSelector as a6,sessionTokenSelector as a7,graphEndpointSelector as a8,controllerNodeRedImageSelector as a9,fetchTemplateGallery as aA,isRevisionsExistOnServerRequest as aB,FormLabel$1 as aC,default_1$b as aD,FormGroup$1 as aE,FormControlLabel$1 as aF,Checkbox$1 as aG,fetchTemplateGalleryFallback as aH,Card$1 as aI,CardContent$1 as aJ,img$m as aK,CardActions$1 as aL,flowStyles as aM,NoResults as aN,CircularProgress$1 as aO,img$c as aP,Dialog$1 as aQ,setApiEndpoint as aR,TableContainer$1 as aS,Table$1 as aT,TableHead$1 as aU,TableRow$1 as aV,TableCell$1 as aW,TableSortLabel$1 as aX,TableBody$1 as aY,img$h as aZ,default_1 as a_,controllerUrlSelector as aa,automateControllerUrlSelector as ab,flowCenterDialogSelector as ac,automateUrlSelector as ad,Portal$1 as ae,flowCenterDialogReducer as af,List$2 as ag,ListItem$1 as ah,ListItemIcon$1 as ai,ListItemText$1 as aj,flowCenterDialogAction as ak,all as al,img$o as am,img$p as an,img$r as ao,img$s as ap,Tooltip$1 as aq,img$i as ar,img$G as as,Skeleton$1 as at,takeLatest$1 as au,fetchAllTags as av,put as aw,select as ax,fetchFlows as ay,call$i as az,styled$1 as b,RadioGroup$1 as b$,ClickAwayListener as b0,Fade$1 as b1,img$t as b2,img$q as b3,img$Q as b4,img$C as b5,DialogTitle$1 as b6,DialogContent$1 as b7,DialogActions$1 as b8,Snackbar$1 as b9,reactDom as bA,Transition$1 as bB,__awaiter$d as bC,__generator$2 as bD,__spread as bE,TransitionGroup$1 as bF,connect$1 as bG,Bookmark as bH,EngineFlagIcons as bI,createAsyncThunk as bJ,withStyles as bK,getConfigModule as bL,getAuthModule as bM,getSnackbarModule as bN,AIWareCacheProvider as bO,img$R as bP,img$e as bQ,img$d as bR,isEmpty_1 as bS,Backdrop$1 as bT,getDefaultMiddleware as bU,isNil_1 as bV,UpDown as bW,Icon$1 as bX,get_1 as bY,map_1 as bZ,keys_1 as b_,default_1$6 as ba,img$j as bb,img$l as bc,img$U as bd,Tabs$2 as be,Tab$2 as bf,deleteEngine as bg,fetchEngine as bh,img$k as bi,AIWareFormatMessage as bj,FormattedDate as bk,fetchVeritoneGraphQLApi as bl,useTheme as bm,KeyboardArrowRight as bn,KeyboardArrowLeft as bo,useId as bp,InputUnstyled as bq,isHostComponent as br,getDefaultExportFromNamespaceIfNotNamed as bs,commonjsRequire as bt,_typeof$4 as bu,_inheritsLoose$2 as bv,_assertThisInitialized$1 as bw,React as bx,hoistNonReactStatics_cjs as by,_defineProperty$1 as bz,Paper$1 as c,isArray_1 as c$,Avatar$1 as c0,img$w as c1,baseGraphQLApi as c2,FormHelperText$2 as c3,img$g as c4,StyledEngineProvider as c5,ThemeProvider as c6,lightTheme$1 as c7,CssBaseline as c8,Hide as c9,mountPanel$1 as cA,DialogContentText$1 as cB,userSelector$2 as cC,MoreVert$1 as cD,Menu$1 as cE,Edit as cF,Upload as cG,Delete as cH,CustomTabs as cI,useBackupImg as cJ,img$1z as cK,validate as cL,configSelector as cM,baseGraphQLApiWithError as cN,VerifiedFilled as cO,Add as cP,ExpandLess as cQ,ExpandMore as cR,Collapse$1 as cS,img$16 as cT,Filter$1 as cU,DynamicTable as cV,useTheme$3 as cW,getThemeProps as cX,useEnhancedEffect$1 as cY,React$1 as cZ,_arrayPush as c_,has_1 as ca,showMessage as cb,MessageSeverity as cc,Radio$2 as cd,createSvgIcon$2 as ce,_createCompounder as cf,_baseIteratee as cg,isArrayLike_1 as ch,toInteger_1 as ci,_toPropertyKey as cj,_setPrototypeOf$3 as ck,commonjsGlobal$1 as cl,combineReducers as cm,createSelector$1 as cn,fork as co,AIWareThemeProvider$1 as cp,Stack$4 as cq,Close$1 as cr,FullscreenExit as cs,Fullscreen as ct,TabPanel as cu,default_1$8 as cv,unmountPanel$1 as cw,AvailableComponents as cx,delay$1 as cy,hidePanel$1 as cz,capitalize$2 as d,_baseEach as d$,_baseToString as d0,_baseTrim as d1,_castSlice as d2,_stringToArray as d3,toString_1 as d4,ReactIs as d5,upperFirst_1 as d6,isString_1 as d7,_baseGet as d8,_baseSlice as d9,useTheme$2 as dA,useControlled as dB,useEventCallback as dC,ButtonBase$1 as dD,useForkRef as dE,getDefaultExportFromCjs as dF,isObject_1 as dG,MoreHor as dH,takeEvery$1 as dI,EngineCategoryIcons as dJ,selectApiConfigs$2 as dK,panelsSelector as dL,tabsClasses$1 as dM,AlarmTwo as dN,EditList as dO,Chip$1 as dP,usePreviousProps$1 as dQ,setRef as dR,inputClasses$1 as dS,inputBaseClasses$1 as dT,outlinedInputClasses$1 as dU,filledInputClasses$1 as dV,ClearIcon as dW,ArrowDropDownIcon as dX,_arrayMap as dY,_Symbol as dZ,isArguments_1 as d_,_castPath as da,_toKey as db,_isIndex as dc,channel$1 as dd,useIntl as de,VideoCamera as df,Image$1 as dg,Sound as dh,Description as di,toNumber_1 as dj,ProgressStepper as dk,size_1 as dl,take as dm,CurlyBraces as dn,UnknownDocument as dp,sdkEventManager as dq,SdkEvents as dr,SdkError as ds,EngineClassIcons as dt,Mode2 as du,EngineModeIcons as dv,DeploymentModelIcons as dw,guid as dx,forceReflow as dy,alpha as dz,_objectWithoutPropertiesLoose$2 as e,hasPermission as e$,_arrayFilter as e0,_getNative as e1,eq_1 as e2,_root as e3,_Uint8Array as e4,_overArg as e5,_isPrototype as e6,isObjectLike_1 as e7,_baseGetTag as e8,_arrayLikeKeys as e9,img$1x as eA,img$J as eB,authSelector as eC,ListItemAvatar$1 as eD,emphasize as eE,useSlotProps as eF,_arraySome as eG,EntityType as eH,injectIntl as eI,ErrorBoundary$1 as eJ,EPermissionAction as eK,Process as eL,Information as eM,NewFolder as eN,SpecialFolder as eO,User as eP,Source as eQ,Search$1 as eR,selectIsOLPEnabled as eS,ListItemSecondaryAction$1 as eT,getLibraryModule as eU,cmsUrlSelector as eV,betaFeaturesSelector as eW,SearchStructuredData as eX,Grow$1 as eY,index as eZ,actions as e_,isBuffer$3 as ea,isFunction_1 as eb,isTypedArray_1 as ec,_Stack as ed,_baseFor as ee,identity_1 as ef,_isIterateeCall as eg,isSymbol_1 as eh,_baseMap as ei,_baseUnary as ej,memoizeOne as ek,createBox$1 as el,StepperContext$1 as em,StepContext$1 as en,SvgIcon$1 as eo,StepConnector$1 as ep,_Set as eq,_setToArray as er,_SetCache as es,_cacheHas as et,img$N as eu,img$M as ev,img$1v as ew,img$1u as ex,img$1t as ey,img$K as ez,clsx as f,green$1 as f$,UserAddFilled as f0,Popover$1 as f1,MenuList$1 as f2,MoveFolder as f3,EAuthResourceType as f4,Slide$1 as f5,img$a as f6,selectPanelByPanelName as f7,FullScreenContainer as f8,isPermissionLoading as f9,selectOrgId as fA,selectIsUserAdmin as fB,AvatarGroup$1 as fC,ErrorState$2 as fD,NullState$2 as fE,Group as fF,PermissionChangedAction as fG,Lock as fH,useOrganizationPermissions as fI,EAuthSubResourceType as fJ,AddGroup as fK,initialConfigSelector as fL,ConfirmationModal as fM,EnumHelpers as fN,formatBytes as fO,LinearProgress$1 as fP,NotInterested as fQ,mountPanelForResponse$1 as fR,ArrowDown as fS,ArrowUp as fT,useInterval as fU,Iam as fV,Users as fW,SecurityGroup as fX,getOrganizationPanelModule as fY,Lock2 as fZ,NoApps as f_,Settings$2 as fa,Hamburger as fb,List as fc,Download as fd,Badge$1 as fe,convertEntityToAuthResource as ff,selectUserOrgEdgeVersion as fg,EditAttributes as fh,gqlIntrospection as fi,ProcessingDetail as fj,img$v as fk,img$x as fl,img$4 as fm,FilterRemove as fn,CheckCircle as fo,FolderOpen as fp,Voice as fq,useDoubleClick as fr,FolderFilled as fs,Time as ft,img$y as fu,Undefined as fv,PodcastSource as fw,YoutubeSource as fx,TVSource as fy,RadioSource as fz,generateUtilityClass as g,unmountAllPanel as g$,md5 as g0,selectIsSuperAdmin as g1,organizations_selector as g2,actions$5 as g3,AddUser as g4,selectors as g5,LibraryDropdown as g6,Remove as g7,Save as g8,Input$3 as g9,Hidden as gA,toFinite_1 as gB,_baseForOwn as gC,_arrayReduce as gD,hasIn_1 as gE,useSyncExternalStoreExports as gF,Packages as gG,Resources$1 as gH,selectUserCanCreatePackage as gI,Engines as gJ,PackagesAvatar as gK,actionChannel as gL,cancelled as gM,flush$3 as gN,cancel as gO,FlowCenter2 as gP,registry as gQ,registerComponent as gR,AvailableWidgets as gS,updatePanelMicroFrontendProps as gT,setData as gU,root as gV,mountWidget as gW,unmountWidget as gX,mountPanel as gY,unmountPanel as gZ,hidePanel as g_,Copy as ga,ArrowForward as gb,Modal$1 as gc,_baseIsEqual as gd,Slider$1 as ge,_getSymbols as gf,stubArray_1 as gg,_baseGetAllKeys as gh,_getTag as gi,_nodeUtil as gj,_getAllKeys as gk,_castFunction as gl,Article as gm,Task as gn,View as go,_objectSpread2 as gp,serialize as gq,stringify$2 as gr,compile as gs,Check as gt,FormattedRelativeTime$1 as gu,BottomQueue as gv,TopQueue as gw,Pause as gx,Cancel as gy,Folder as gz,composeClasses as h,init as h0,aiwareEvents as h1,createSvgIcon$1 as i,jsxRuntime as j,interopRequireDefault as k,Route as l,makeStyles as m,useDispatch as n,useSelector as o,authStatusSelector as p,authContextSelector as q,react as r,store$4 as s,AuthContext as t,useThemeProps as u,lodash as v,Alert$1 as w,useNavigate as x,useLocation as y,authErrorMessage as z};
|