aiware-js 2.16.0 → 2.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js-core.esm.js +2 -4
- package/js-core.esm18.js +15 -15
- package/js-core.esm19.js +1 -1
- package/js-core.umd.css +92 -92
- package/js-core.umd.js +73 -75
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm.js
CHANGED
|
@@ -945,8 +945,6 @@ createScheduledJob(input:{
|
|
|
945
945
|
) {
|
|
946
946
|
records {
|
|
947
947
|
id
|
|
948
|
-
signedIconSvg
|
|
949
|
-
signedIconUrl
|
|
950
948
|
}
|
|
951
949
|
}
|
|
952
950
|
}`,graphEndpoint:e,token:t})}catch(e){console.error(e)}}),getNodeRedVersionEdgeApi=t=>__awaiter$7(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/edge/v1/flow/engineId/image/",{method:"GET"});return e.json()}catch(e){return{success:!1}}});function __awaiter$6(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(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const AIWareIntlProvider=e=>{const n=useSelector(preferredLanguageSelector)||"en";var t=e.style;const[r,i]=react.exports.useState({});return react.exports.useEffect(()=>{__awaiter$6(void 0,void 0,void 0,function*(){try{if(r[n])return;const t=yield fetchTranslationJson(n);i(e=>Object.assign(Object.assign({},e),{[n]:t}))}catch(e){console.log(e),i(e=>Object.assign(Object.assign({},e),{[n]:{}}))}})},[n,r]),jsxRuntime.exports.jsx(IntlProvider,Object.assign({messages:r[n],locale:n,defaultLocale:"en"},{children:jsxRuntime.exports.jsx("div",Object.assign({style:t},{children:e.children}))}))},nameSpace$4=(!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}(),!function(e){e.unread="unread",e.read="read",e.actionPending="actionPending",e.actionDone="actionDone",e.seen="seen",e.unseen="unseen",e.starred="starred"}(NotificationFlag=NotificationFlag||{}),!function(e){e[e.ADD=0]="ADD",e[e.STACK=1]="STACK",e[e.SLIDE_MORE=2]="SLIDE_MORE",e[e.OVERLAY_OVER_PARENT=3]="OVERLAY_OVER_PARENT"}(CreateModes=CreateModes||{}),!function(e){e.APP_PANEL="APP_PANEL",e.PERSONAL_PANEL="PERSONAL_PANEL",e.ORGANIZATION_PANEL="ORGANIZATION_PANEL",e.MARKET_PANEL="MARKET_PANEL",e.SETTING_PREFERENCE_PANEL="SETTING_PREFERENCE_PANEL",e.ACTIVITY_PANEL="ACTIVITY_PANEL",e.PERFORMANCE_MONITOR="PERFORMANCE_MONITOR",e.CMS_SHORTCUT="CMS_SHORTCUT",e.FLOW_CENTER="FLOW_CENTER",e.ADMIN_SHORTCUT="ADMIN_CENTER_BROWSE",e.DATA_CENTER="DATA_CENTER",e.ENGINE_CENTER="ENGINE_CENTER",e.LIBRARY_CENTER="LIBRARY_CENTER",e.MARKETPLACE_CENTER="MARKETPLACE_CENTER"}(TabId=TabId||{}),!function(e){e.SAMPLE_APP_BAR="SAMPLE_APP_BAR",e.APP_BAR="APP_BAR",e.FLOW_CENTER="FLOW_CENTER",e.FLOW_WIDGET="FLOW_WIDGET",e.ENGINE_CENTER_BROWSE="ENGINE_CENTER_BROWSE",e.RESET_PASSWORD="RESET_PASSWORD"}(AvailableWidgets=AvailableWidgets||{}),!function(e){e.SIMPLE_PANEL="SIMPLE_PANEL",e.APP_BAR_PANEL_TEMPLATE="APP_BAR_PANEL_TEMPLATE",e.APP_BAR_TAB_PANEL_TEMPLATE="APP_BAR_TAB_PANEL_TEMPLATE",e.TAB_TEMPLATE="TAB_TEMPLATE"}(AvailablePanels=AvailablePanels||{}),!function(e){e.TEST_COMPONENT="TEST_COMPONENT",e.TEST_COMPONENT2="TEST_COMPONENT2",e.TEST_COMPONENT3="TEST_COMPONENT3",e.HELP_PANEL="HELP_PANEL",e.NOTIFICATION_PANEL="NOTIFICATION_PANEL",e.USER_APPLICATION_SETTINGS_PANEL="USER_APPLICATION_SETTINGS_PANEL",e.APP_BAR_PANEL="APP_BAR_PANEL",e.NOTIFICATION_DETAIL="NOTIFICATION_DETAIL",e.EDIT_PROFILE_PICTURE="EDIT_PROFILE_PICTURE",e.NOTIFICATION_SETTING="NOTIFICATION_SETTING",e.NOTIFICATION_UTILITY="NOTIFICATION_UTILITY",e.NOTIFICATION_APPLICATION="NOTIFICATION_APPLICATION",e.SETTING_PREFERENCE="SETTING_PREFERENCE",e.ORGANIZATION_PANEL="ORGANIZATION_PANEL",e.DATA_CENTER_BROWSE="DATA_CENTER_BROWSE",e.DATA_CENTER_FOLDERS_AND_FILES="DATA_CENTER_FOLDERS_AND_FILES",e.DATA_CENTER_IMPORTER="DATA_CENTER_IMPORTER",e.DATA_LABELER="DATA_LABELER",e.ADMIN_CENTER_OPEN_ID="ADMIN_CENTER_OPEN_ID",e.ADMIN_CENTER_BROWSE="ADMIN_CENTER_BROWSE",e.DATA_CENTER_PROCESS_AI="DATA_CENTER_PROCESS_AI",e.ENGINE_CENTER_NEW="ENGINE_CENTER_NEW",e.ENGINE_CENTER_FILTER="ENGINE_CENTER_FILTER",e.ENGINE_CENTER_DETAILS="ENGINE_CENTER_DETAILS",e.ENGINE_CENTER_NEW_BUILD="ENGINE_CENTER_NEW_BUILD",e.ENGINE_CENTER_CUSTOM_FIELDS_FORM="ENGINE_CENTER_CUSTOM_FIELDS_FORM",e.ENGINE_CENTER_INPUT_TYPE_FLYOUT="ENGINE_CENTER_INPUT_TYPE_FLYOUT",e.ENGINE_CENTER_EDIT_RELEASE_NOTES="ENGINE_CENTER_EDIT_RELEASE_NOTES",e.ENGINE_CENTER_SCHEMAS_FORM_PANEL="ENGINE_CENTER_SCHEMAS_FORM_PANEL",e.ENGINE_CENTER_VERSION_HISTORY_PANEL="ENGINE_CENTER_VERSION_HISTORY_PANEL",e.SUPPORTED_FILE_TYPES="SUPPORTED_FILE_TYPES",e.EDIT_FILE_METADATA="EDIT_FILE_METADATA",e.APP_CENTER_NEW="APP_CENTER_NEW",e.APP_CENTER_ADD_ENGINE_PANEL="APP_CENTER_ADD_ENGINE_PANEL",e.APP_CENTER_ADD_FLOW_PANEL="APP_CENTER_ADD_FLOW_PANEL",e.APP_CENTER_ADD_SCHEMA_PANEL="APP_CENTER_ADD_SCHEMA_PANEL",e.APP_CENTER_CONFIG_FIELDS_FORM="APP_CENTER_CONFIG_FIELDS_FORM",e.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL="APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL",e.DATA_CENTER_ENGINE_SELECTION="DATA_CENTER_ENGINE_SELECTION",e.INVITE_USERS_PANEL="INVITE_USERS_PANEL",e.INVITE_REQUESTS_PANEL="INVITE_REQUESTS_PANEL",e.REVIEW_ORG_INVITE_PANEL="REVIEW_ORG_INVITE_PANEL",e.ADD_APPLICATIONS="ADD_APPLICATIONS",e.ADMIN_CENTER_NEW_GROUP_PANEL="ADMIN_CENTER_NEW_GROUP_PANEL",e.PERMISSIONS_PANEL="PERMISSIONS_PANEL",e.NEW_PERMISSION_SET_PANEL="NEW_PERMISSION_SET_PANEL",e.DATA_CENTER_MDP_IFRAME_PANEL="DATA_CENTER_MDP_IFRAME_PANEL",e.DATA_CENTER_INGESTION_CREATION_PANEL="DATA_CENTER_INGESTION_CREATION_PANEL",e.DATA_CENTER_SOURCE_CREATION_PANEL="DATA_CENTER_SOURCE_CREATION_PANEL",e.DATA_CENTER_FILE_INFO_PANEL="DATA_CENTER_FILE_INFO_PANEL",e.ADMIN_CENTER_GROUP_DETAILS_PANEL="ADMIN_CENTER_GROUP_DETAILS_PANEL",e.ADMIN_CENTER_ADD_MEMBER_PANEL="ADMIN_CENTER_ADD_MEMBER_PANEL",e.GROUP_INFO_PANEL="GROUP_INFO_PANEL",e.APPLICATION_DETAILS_PANEL="APPLICATION_DETAILS_PANEL",e.PERMISSION_SET_DETAILS_PANEL="PERMISSION_SET_DETAILS_PANEL",e.PROCESSING_CENTER_SOURCES="PROCESSING_CENTER_SOURCES"}(AvailableComponents=AvailableComponents||{}),!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}(),"mailbox"),mailboxIdSelector=e=>{return null==(e=e[nameSpace$4])?void 0:e.mailBoxIds},unseenNotificationSelector=e=>{const t=null==(e=null==e?void 0:e[nameSpace$4])?void 0:e.mailbox;return null===t||void 0===t?void 0:t.reduce((e,t)=>e+t.unseenCount,0)},panelSelector=e=>e.panels||[],SUBSCRIBER_MAILBOX=nameSpace$4+"/SUBSCRIBER_MAILBOX",SUBSCRIBER_MAILBOX_START=nameSpace$4+"/SUBSCRIBER_MAILBOX_START",UPDATE_MAILBOX_DATA=nameSpace$4+"/UPDATE_MAILBOX_DATA",SUBSCRIBING_MAILBOX=nameSpace$4+"/SUBSCRIBING_MAILBOX",SUBSCRIBER_MAILBOX_SUCCESS=nameSpace$4+"/SUBSCRIBER_MAILBOX_SUCCESS",SUBSCRIBER_MAILBOX_ERROR=nameSpace$4+"/SUBSCRIBER_MAILBOX_ERROR",UPDATE_UNSEEN_COUNT=nameSpace$4+"/UPDATE_UNSEEN_COUNT",MARK_ALL_NOTIFICATIONS_SEEN=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN",MARK_ALL_NOTIFICATIONS_SEEN_REQUEST=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN_REQUEST",MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS",MARK_ALL_NOTIFICATIONS_SEEN_FAIL=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN_FAIL",SUBSCRIBE_DEFAULT_MAILBOX_REQUEST=nameSpace$4+"/SUBSCRIBE_DEFAULT_MAILBOX_REQUEST",PUSH_NOTIFICATION=nameSpace$4+"/PUSH_NOTIFICATION",PUSH_DEFAULT_MAILBOX=nameSpace$4+"/PUSH_DEFAULT_MAILBOX",requestSubscriber=createAction(SUBSCRIBER_MAILBOX),subscriberStart=createAction(SUBSCRIBER_MAILBOX_START),setMailboxData=createAction(UPDATE_MAILBOX_DATA,function(e){return{payload:e}}),subscriberSuccess=createAction(SUBSCRIBER_MAILBOX_SUCCESS,function(e){return{payload:e}}),subscriberError=createAction(SUBSCRIBER_MAILBOX_ERROR,function(e){return{payload:e}}),subscribing=createAction(SUBSCRIBING_MAILBOX),pushNotification=createAction(PUSH_NOTIFICATION,function(e){return{payload:e}}),pushDefaultMailBox=createAction(PUSH_DEFAULT_MAILBOX,function(e){return{payload:e}}),updateUnseenCount=createAction(UPDATE_UNSEEN_COUNT,function(e){return{payload:e}}),markAllNotificationsSeenRequest=createAction(MARK_ALL_NOTIFICATIONS_SEEN_REQUEST),markAllNotificationsSeenSuccess=createAction(MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS),markAllNotificationsSeenFail=createAction(MARK_ALL_NOTIFICATIONS_SEEN_FAIL),subscribeDefaultMailboxRequest=createAction(SUBSCRIBE_DEFAULT_MAILBOX_REQUEST),initialState$8={mailBoxIds:[],mailbox:[],status:"idle",failureMessage:""},mailboxReducer=createReducer(initialState$8,e=>{e.addCase(subscriberStart,e=>Object.assign(Object.assign({},e),{status:"loading"})).addCase(subscriberSuccess,e=>Object.assign(Object.assign({},e),{status:"subscribing"})).addCase(setMailboxData,(e,t)=>Object.assign(Object.assign({},e),{mailbox:[...t.payload],mailBoxIds:[...t.payload.map(e=>e.id)]})).addCase(subscriberError,(e,t)=>Object.assign(Object.assign({},e),{status:"failure",failureMessage:t.payload})).addCase(updateUnseenCount,(e,n)=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(t=>{var e;return Object.assign(Object.assign({},t),{unseenCount:null==(e=null==(e=n.payload.notificationMailboxes)?void 0:e.find(e=>e.id===t.id))?void 0:e.unseenCount})})})).addCase(markAllNotificationsSeenRequest,e=>Object.assign({},e)).addCase(markAllNotificationsSeenSuccess,e=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(e=>Object.assign(Object.assign({},e),{unseenCount:0}))})).addCase(markAllNotificationsSeenFail,e=>Object.assign(Object.assign({},e),{status:"failure"}))});function __awaiter$5(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 getMailboxApi=(e,t)=>__awaiter$5(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`
|
|
@@ -1146,7 +1144,7 @@ createScheduledJob(input:{
|
|
|
1146
1144
|
unreadCount
|
|
1147
1145
|
}
|
|
1148
1146
|
}
|
|
1149
|
-
`,variables:e,graphEndpoint:n,token:r})}catch(e){return{success:!1}}});function*refetchNotificationSetting(){yield put(getNotification(0,30))}function*getNotificationListByMailBoxSaga(e){const{status:t,mailBoxIds:n,mailbox:r}=yield select(mailBoxSelector),{limit:i,offset:o,callback:a}=e.payload;var e=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector),l="success"===t||"failure"===t;if(0!==Object.keys(r).length||l){yield put(getNotificationStart(o,i));l=yield call$7(handleNotificationListByMailBox,e,s,n,o,i);if(null!==a&&void 0!==a&&a(),0<(null==(e=null==l?void 0:l.errors)?void 0:e.length))yield put(getNotificationListByMailBoxFail());else{let n=0;const c=null==(e=null==(s=null==l?void 0:l.data)?void 0:s.notificationMailboxes)?void 0:e.map(t=>{var e;return 0<(null==(e=null==t?void 0:t.notifications)?void 0:e.count)?(e=null==(e=null==(e=null==t?void 0:t.notifications)?void 0:e.records)?void 0:e.map(e=>Object.assign(Object.assign({},e),{mailboxId:t.id})),n++,e):[]}),u=(null===c||void 0===c?void 0:c.flat())||[];l=u.map(t=>{var e,n=r.find(e=>e.id===t.mailboxId);return Object.assign(Object.assign({},t),{appId:(null==(e=null==n?void 0:n.application)?void 0:e.applicationId)||"",appName:(null==(e=null==n?void 0:n.application)?void 0:e.name)||"",eventNames:(null==(e=null==n?void 0:n.eventFilter)?void 0:e.eventNames)||[],icon:(null==(e=null==n?void 0:n.application)?void 0:e.icon)||"",title:t.title||""})});yield put(getNotificationListByMailBoxSuccess({offset:o,limit:i,availableMailBoxes:n,data:l}))}}else yield take(subscriberSuccess({}).type)}function*listenToPushNotificationSaga(e){var t;const n=(yield select(mailBoxSelector))["mailbox"],r=e["payload"];e=n.find(e=>e.id===r.mailboxId);yield put(updateNotificationList(Object.assign(Object.assign({},r),{appId:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",appName:(null==(t=null==e?void 0:e.application)?void 0:t.name)||"",icon:(null==(t=null==e?void 0:e.application)?void 0:t.icon)||""})))}function*updateNotificationReadSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);try{var r=yield call$7(handleUpdateNotificationRead,t,n,e.payload);return null!=r&&r.error?void(yield put(updateNotificationReadFail())):void(yield put(updateNotificationReadSuccess(Object.assign({},r))))}catch(e){yield put(updateNotificationReadFail())}}function*updateMarkAllReadNotificationSaga(){var e=(yield select(mailBoxSelector))["mailBoxIds"],t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call$7(handleMarkAllReadNotification,e,t,n)).error?yield put(markAllReadNotificationFail()):yield put(markAllReadNotificationSuccess())}catch(e){yield put(markAllReadNotificationFail())}}function*getNotificationActionSaga(e){var t,n,{eventType:r,appId:i,eventName:o}=yield select(notificationDetailSelector(e.payload)),a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector);try{var l,c=yield call$7(handleGetNotificationAction,o,r,i,a,s);c.error?yield put(getNotificationActionError()):(l=(null==(n=null==(t=null==c?void 0:c.data)?void 0:t.notificationActions)?void 0:n.records)||[],yield put(getNotificationActionSuccess(e.payload,l)))}catch(e){yield put(getNotificationActionError())}}function*notificationSaga(){yield all([takeEvery$1(getNotification.type,getNotificationListByMailBoxSaga),takeLatest$1(updateUtilitySetting.type,refetchNotificationSetting),takeEvery$1(getNotificationListByMailBoxRequest.type,getNotificationListByMailBoxSaga),takeEvery$1("mailbox/PUSH_NOTIFICATION",listenToPushNotificationSaga),takeEvery$1(updateNotificationReadRequest.type,updateNotificationReadSaga),takeEvery$1(GET_NOTIFICATION_ACTION_REQUEST,getNotificationActionSaga),takeLatest$1(markAllReadNotificationRequest.type,updateMarkAllReadNotificationSaga)])}function getNotificationModule(){return{id:"os-notification-panel",reducerMap:{[nameSpace$3]:notificationReducer},sagas:[notificationSaga],initialActions:[],retained:!0}}const useStyles$b$1=makeStyles()(e=>({root:{width:"100%",height:"100%"},noData:{paddingTop:66,display:"flex",justifyContent:"center"},iconNoData:{width:235,height:235,display:"flex",justifyContent:"center",borderRadius:"50%",padding:"20px",border:"20px solid #F9F9F9"},noDataDescription:{display:"flex",justifyContent:"center",marginTop:66},noDataDescriptionText:{fontSize:"18px",lineHeight:"23px",textTransform:"uppercase",color:e.palette.secondary.main}}));function NotificationContent(){var e=useStyles$b$1()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.root,"data-testid":"notification-content"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.noData},{children:jsxRuntime.exports.jsx("div",Object.assign({className:e.iconNoData},{children:jsxRuntime.exports.jsx("img",{src:img$E,draggable:"false",alt:"noNotification"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.noDataDescription},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-test":"no-notification",className:e.noDataDescriptionText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.pBrbyj",defaultMessage:"You don’t have any notifications!",description:"Notification panel: no notification message"})}))}))]}))}const useStyles$a$1=makeStyles()(e=>({cardContainer:{width:"100%","&:hover":{backgroundColor:"#EEF3F9"}},rootCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer"},unreadCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer",paddingLeft:e.spacing(2)},iconCard:{marginTop:e.spacing(-.4)},leftContent:{width:"345px",padding:e.spacing(0,6,0,3)},titleCard:{display:"flex"},appsCard:{fontSize:"14px",fontWeight:600},timestampCard:{fontSize:"12px",paddingLeft:e.spacing(3),color:e.palette.text.secondary},contentCard:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:e.palette.text.secondary},dividerCard:{margin:e.spacing(0,6),height:"0.5px"},notificationIcon:{width:24,height:24},unread:{width:"auto",marginRight:e.spacing(2.4),fontSize:"unset"},unreadIcon:{width:8,height:8,color:e.palette.primary.main},appName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"calc(100% - 85px)"}})),NotificationCard=react.exports.forwardRef(({data:e,onViewDetail:t},n)=>{var r=useStyles$a$1()["classes"];const i=useDispatch(),[o,a]=react.exports.useState(!1);const{createdDateTime:s,icon:l,title:c,appName:u,body:d,id:p,flags:f}=e;return jsxRuntime.exports.jsxs("div",Object.assign({ref:n,className:r.cardContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({onClick:t,className:null!==f&&void 0!==f&&f.includes(NotificationFlag.unread)?r.unreadCard:r.rootCard},{children:[(null===f||void 0===f?void 0:f.includes(NotificationFlag.unread))&&jsxRuntime.exports.jsx(Icon$1,{"data-test":"notification-unread-icon","data-testid":"notification-unread-icon",className:r.unread,children:jsxRuntime.exports.jsx(default_1$6,{className:r.unreadIcon}),onClick:function(e){e.stopPropagation(),i(updateNotificationReadRequest(p))}}),jsxRuntime.exports.jsx("div",Object.assign({className:r.iconCard},{children:l&&!o?jsxRuntime.exports.jsx("img",{src:l,className:r.notificationIcon,draggable:"false",alt:"notification-card-icon",onError:function(){a(!0)}}):jsxRuntime.exports.jsx(Notifications,{})})),jsxRuntime.exports.jsxs("div",Object.assign({className:r.leftContent},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.titleCard},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.appName},{children:null!==f&&void 0!==f&&f.includes(NotificationFlag.unread)?jsxRuntime.exports.jsx("strong",{children:u}):u})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.timestampCard},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(s),unit:"minute",updateIntervalInSeconds:60,children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react.exports.createElement("span",{},e)})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.contentCard},{children:convertHTMLEntities(c||d)}))})]}))]})),jsxRuntime.exports.jsx(Divider$1,{className:r.dividerCard})]}))}),useStyles$9$1=makeStyles()(e=>({header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(3.5,6,4,6),position:"sticky",width:"fit-content",fontSize:"14px",fontWeight:400,top:0},scrollContent:{overflow:"hidden"},infinityLoading:{display:"flex",justifyContent:"center",padding:e.spacing(4)}}));function NotificationList({title:e,data:n,loading:t,handleGetNotification:r,onOpenNotificationDetail:i}){var o=useStyles$9$1()["classes"];const a=react.exports.useRef(),s=react.exports.useCallback(e=>{t||(a.current&&a.current.disconnect(),console.log(IntersectionObserver),a.current=new IntersectionObserver(e=>{e[0].isIntersecting&&r()}),e&&a.current.observe(e))},[r,t]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.header},{children:e.toUpperCase()})),jsxRuntime.exports.jsxs("div",Object.assign({className:o.scrollContent},{children:[n.map((e,t)=>n.length===t+1?jsxRuntime.exports.jsx(NotificationCard,{ref:s,onViewDetail:()=>null==i?void 0:i(e),data:e},t):jsxRuntime.exports.jsx(NotificationCard,{onViewDetail:()=>null==i?void 0:i(e),data:e},t)),t&&jsxRuntime.exports.jsx("div",Object.assign({className:o.infinityLoading},{children:jsxRuntime.exports.jsx(CircularProgress$1,{size:30})}))]}))]})}const useStyles$8$1=makeStyles()(e=>({loadingContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},filterContainer:{position:"absolute",top:e.spacing(12.4),right:0,paddingTop:e.spacing(3),paddingRight:e.spacing(6),paddingBottom:e.spacing(2),width:"100%",display:"flex",justifyContent:"flex-end",backgroundColor:e.palette.background.default},markAllReadButton:{cursor:"pointer",marginRight:e.spacing(4),backgroundColor:e.palette.background.default,textTransform:"capitalize"}})),NotificationPanel=()=>{const r=useDispatch();var e=useStyles$8$1()["classes"],t=useSelector(applicationFilterSelector)||[];const[n,i]=react.exports.useState(!1),o=useSelector(mailboxIdSelector);var a=useSelector(notificationWithFilterSelector);const{filter:s,status:l,notifications:c,availableMailBoxes:u,offset:d,limit:p}=useSelector(notificationSelector),f=e=>Math.max(Math.ceil(50/e),5);react.exports.useEffect(()=>{var e=(null===o||void 0===o?void 0:o.length)||0;0<e&&0===p&&(e=f(e),r(getNotification(0,e)))},[r,p,o]);var h=react.exports.useCallback(()=>{var e;0<u&&(i(!0),e=f(u),r(getNotification(d+p,e,()=>{i(!1)})))},[u,r,p,d]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getNotificationModule()]},{children:0===a.length&&"success"!==l&&"failure"!==l&&0<o.length?jsxRuntime.exports.jsx("div",Object.assign({className:e.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})):0<(null==c?void 0:c.length)?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.filterContainer,id:"notification-list-header"},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){r(markAllReadNotificationRequest())},className:e.markAllReadButton,"data-test":"notification-mark-all-read-button","data-testid":"notification-mark-all-read-button"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.PtPIns",defaultMessage:"Mark All Read",description:"label of Mark All Read button"})}))})),jsxRuntime.exports.jsx(Filter,{data:[...filters$3,...t],filter:s,onFilter:function(e){e=e.target.value,r(updateFilterValue(e))}})]})),jsxRuntime.exports.jsx(NotificationList,{title:"All time",onOpenNotificationDetail:function(e){var t="DETAIL_PANEL_ID",n={name:"NOTIFICATION_DETAIL",config:{mode:"actionable",id:e.id,data:Object.assign({},e),actionIconButtons:null!=(n=e.actions)?n:[],onClose:()=>{console.log("onClose")}}};r(unmountPanel$1(t)),r(mountPanel$1({panelId:t,microFrontend:n,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:413,width:420,header:{title:"Notification detail"},dimmed:0,parentPanelId:"NOTIFICATION_PANEL_ID"}})),r(updateNotificationReadRequest(e.id))},data:a,loading:n,handleGetNotification:h})]}):jsxRuntime.exports.jsx(NotificationContent,{})}))})};function CustomWorkFlow(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center","data-testid":"custom-workflow-box"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.1+8+OX",defaultMessage:"Custom Workflows",description:"custom-workflows"})}),jsxRuntime.exports.jsx(Button$1,{variant:"outlined",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.gAFAOA",defaultMessage:"Create New",description:"creat-new-btn"}),color:"primary"})]})),jsxRuntime.exports.jsx(Typography$1,{style:{fontSize:14,marginTop:20},children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.9+Qhjr",defaultMessage:"You don’t have any custom workflows yet. Get started by clicking the Create New button above!",description:"text"})})]})}const useStyles$7$1=makeStyles()(e=>({dividerSmallMargin:{marginTop:e.spacing(3.6),marginBottom:e.spacing(4)},utilityItem:{padding:0,cursor:"pointer"},utilityItemHover:{padding:e.spacing(2,0),"&:hover":{backgroundColor:e.palette.background.paper}},utilityDetail:{fontSize:12}}));function NotificationSettingItem(e){const{imgSrc:t,primaryText:n,secondaryText:r,bigSize:i,onOpenUtility:o,onOpenApplication:a,hideDivider:s,applicationId:l,applicationTitle:c,utilityId:u="",utilityTitle:d="Finder",disabled:p,isHover:f}=e;e=useStyles$7$1().classes;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:classnames(e.utilityItem,f?e.utilityItemHover:""),onClick:function(){null!==o&&void 0!==o&&o(u,d),null!==a&&void 0!==a&&a(l,c)},disabled:p,"data-testid":"notification-setting-item"},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,{children:jsxRuntime.exports.jsx(Avatar$1,{style:{width:i?60:40,height:i?60:40,borderRadius:"50%",marginRight:19},src:t})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"h3":"body2",children:n}),secondary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"body2":"caption",children:r})})]})),!s&&jsxRuntime.exports.jsx(Divider$1,{className:f?"":e.dividerSmallMargin})]})}const useStyles$6$1=makeStyles()(e=>({notificationTypeItemBox:{background:e.palette.background.paper,borderRadius:e.shape.borderRadius,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",padding:e.spacing(4,1,1),height:"100%",fontSize:10,lineHeight:"16px",justifyContent:"center"},disableType:{color:e.palette.grey[500]}}));function NotificationTypeItem(e){const{notificationTypeIcon:t,notificationTypeName:n,defaultSelected:r,onSelectNotificationType:i,notificationTypeId:o,isDisabled:a}=e,[s,l]=react.exports.useState(r);e=useStyles$6$1().classes;return jsxRuntime.exports.jsxs("div",Object.assign({className:classnames(e.notificationTypeItemBox,a?e.disableType:""),"data-testid":"notification-type-item"},{children:[jsxRuntime.exports.jsx("div",{children:"string"==typeof t?jsxRuntime.exports.jsx("img",{src:t,alt:"icon",draggable:"false"}):t}),jsxRuntime.exports.jsx("div",{children:n}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Checkbox$1,{icon:jsxRuntime.exports.jsx("img",{src:img$1k,alt:"uncheck icon",draggable:"false"}),checkedIcon:jsxRuntime.exports.jsx("img",{src:img$1j,alt:"checked icon",draggable:"false"}),checked:s,onChange:function(){l(e=>(null!==i&&void 0!==i&&i(o,!e),!e))},disabled:!!a})})]}))}const useStyles$5$1=makeStyles()(e=>({notificationTypeBox:{paddingBottom:e.spacing(0)},notificationTypeHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:16,lineHeight:"22px",fontWeight:600,marginBottom:e.spacing(2)},notificationList:{display:"inline-grid",gridColumnGap:e.spacing(2.8),gridTemplateColumns:"1fr 1fr 1fr",width:"100%",marginBottom:e.spacing(4.4)},divider:{marginTop:e.spacing(4),marginBottom:e.spacing(4.4)},dividerWithoutDescription:{marginBottom:e.spacing(3)}})),defaultNotificationTypeList=[{id:INotificationType.EMAIL,notificationTypeIcon:jsxRuntime.exports.jsx(Email,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.rTFvFj",defaultMessage:"Email",description:"allow notification types: email"}),isSelected:!0},{id:INotificationType.NOTIFICATION_CENTER,notificationTypeIcon:jsxRuntime.exports.jsx(HelpCenter$1,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.SmyvFq",defaultMessage:"Notification Center",description:"allow notification types: Notification Center"}),isSelected:!0},{id:INotificationType.BANNER,notificationTypeIcon:jsxRuntime.exports.jsx(Banner,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.r7Whww",defaultMessage:"Banners",description:"allow notification types: Banners"}),isSelected:!0}];function NotificationType(e){const{notificationTypeTitle:t,children:n,description:r,allowTypes:i=[],allowNotification:o,onChangeAllowType:a,hideDivider:s,onChangeNotificationType:l,disabledTypes:c=[]}=e,[u,d]=react.exports.useState(!!o),[p,f]=react.exports.useState(defaultNotificationTypeList);e=useStyles$5$1().classes;const h=[...i],[m,g]=react.exports.useState(i);var y=t||"Allow Notifications";return react.exports.useEffect(()=>{var e=defaultNotificationTypeList.map(t=>{var e=-1!==m.findIndex(e=>e===t.id),n=-1!==c.findIndex(e=>e===t.id);return Object.assign(Object.assign({},t),{isSelected:e,isDisabled:n})});f(e)},[h.join(", "),m]),react.exports.useEffect(()=>{null!==a&&void 0!==a&&a(u),u?0===m.length&&u&&g([INotificationType.EMAIL]):g([])},[u]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeBox},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeHeader},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.8Z0yyD",defaultMessage:"{title}",description:"notification setting: allow notification types",values:{title:y}})}),jsxRuntime.exports.jsx(Switch$1,{checked:u,onChange:function(){d(e=>!e)},color:"primary",name:"notificationTypeChecked","data-testid":"notification-type-switch"})]})),n,jsxRuntime.exports.jsx("div",Object.assign({className:e.notificationList},{children:p.map(t=>{var e=-1!==c.findIndex(e=>e===t.id)||!u;return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationTypeItem,{notificationTypeIcon:t.notificationTypeIcon,notificationTypeName:t.notificationTypeName,defaultSelected:t.isSelected,onSelectNotificationType:l,notificationTypeId:t.id,isDisabled:e})},t.id+"-"+t.isSelected)})})),r,!s&&jsxRuntime.exports.jsx(Divider$1,{className:r?e.divider:e.dividerWithoutDescription})]}))}const useStyles$4$1=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},itemCell:{padding:0,"& > span":{padding:e.spacing(0,2)}},eventNameContainer:{display:"flex",alignItems:"center"},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0},customLineHeight:{lineHeight:e.spacing(8)},disabledCheckBox:{"& svg":{color:"green"}}}));function NotificationUtilityActionItem(e){const{events:t,disabled:n}=e,r=useStyles$4$1()["classes"],i=[{type:INotificationType.EMAIL,iconUrl:img$1n},{type:INotificationType.NOTIFICATION_CENTER,iconUrl:img$1m},{type:INotificationType.BANNER,iconUrl:img$1l}];return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"customized table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:r.itemCell},{children:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:e.type})}),e.type))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null===t||void 0===t?void 0:t.map(t=>jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsxs(TableCell$1,Object.assign({className:classnames(r.eventNameContainer,r.tableCell)},{children:[jsxRuntime.exports.jsx(Checkbox$1,{id:t.id,disabled:n,className:r.tableRowCheckbox}),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.VNVmyk",defaultMessage:"{defaultMessage}",description:"Finder notifications: {defaultMessage}",values:{defaultMessage:t.title,id:t.id}})})})]})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.itemCell},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t.id,icon:jsxRuntime.exports.jsx(default_1$5,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{})})}),e.type+"-type"))]},t.id))})]}))})}const useStyles$3$2=makeStyles()(e=>({finderNotification:{padding:e.spacing(4,6),maxHeight:"100%",overflow:"auto"},buttonBox:{display:"flex",justifyContent:"flex-end",marginTop:e.spacing(8)},buttonLeft:{marginRight:e.spacing(4)},settingItem:{marginBottom:e.spacing(6)},sharedItem:{padding:0}}));function NotificationUtilityPanel(e){const t=e["dataId"];e=useStyles$3$2().classes;const n=useSelector(notificationSelector).settings,r=n.utility;var i=null===r||void 0===r?void 0:r.find(e=>e.id===t);const[o,a]=react.exports.useState(i||{}),s=[],l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER];return l.forEach(t=>{-1===n.allowType.findIndex(e=>e===t)&&s.push(t)}),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.finderNotification},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null==o?void 0:o.allowType,allowNotification:null==o?void 0:o.allow,onChangeAllowType:function(r){a(e=>{var t=r?[...e.allowType]:[],n=r?[...e.action]:[...e.action].map(e=>Object.assign(Object.assign({},e),{allow:!1}));return Object.assign(Object.assign({},e),{allow:r,allowType:t,action:n})})},onChangeNotificationType:function(r,i){a(e=>{const t=[...e.allowType];var n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})},disabledTypes:s,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==o?void 0:o.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.ubNxKs",defaultMessage:"{utilityTitle}",description:"title of notification utility: {utilityTitle}",values:{id:null==o?void 0:o.id,utilityTitle:null==o?void 0:o.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.XkH621",defaultMessage:"Chose which events you’d like to be notified about.",description:"content of notification utility description"}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"})}),jsxRuntime.exports.jsx(NotificationUtilityActionItem,{events:null==o?void 0:o.action,onSelectAction:function(r){a(e=>{const t=[...e.action];var n=t.findIndex(e=>e.id===r.id);return t[n]=r,Object.assign(Object.assign({},e),{action:t})})},disabled:!o.allow}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}const useStyles$2$3=makeStyles()(e=>({notificationSetting:{padding:e.spacing(3,6,4.4),overflowY:"scroll",height:"100%"},appAllowTitle:{paddingTop:e.spacing(2.4)},dividerBigMargin:{marginTop:e.spacing(2.4),marginBottom:e.spacing(3)},notificationSettingItem:{padding:0},bannerStyleLabel:{fontWeight:"normal"}}));function NotificationSetting(e){var t=useStyles$2$3()["classes"];const i=useDispatch(),[n,r]=react.exports.useState(!0),[o,a]=react.exports.useState(!0);var s=useSelector(notificationSettingSelector);const[l,c]=react.exports.useState(s.bannerStyle),u=useSelector(notificationUtilitiesSelector),d=useSelector(notificationApplicationsSelector),[p,f]=react.exports.useState(null==s?void 0:s.allow),[h,m]=react.exports.useState(s);var s=-1!==(null==(s=null===h||void 0===h?void 0:h.allowType)?void 0:s.findIndex(e=>e===INotificationType.BANNER));const[g,y]=react.exports.useState(s);function v(e,t){var n={name:"NOTIFICATION_UTILITY",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},r={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"finder notifications"}};i(mountPanel$1({panelId:e||"",microFrontend:n,panelConfig:r}))}function x(e,t){var n={name:"NOTIFICATION_APPLICATION",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},r={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"app notifications"}};i(mountPanel$1({panelId:e||"",microFrontend:n,panelConfig:r}))}return react.exports.useEffect(()=>{i(updateNotificationSetting(h))},[h,i]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.notificationSetting},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null===h||void 0===h?void 0:h.allowType,allowNotification:null===h||void 0===h?void 0:h.allow,onChangeAllowType:function(n){f(n),n||(r(n),a(n)),m(e=>{var t=n?[...e.allowType]:[];return Object.assign(Object.assign({},e),{allow:n,allowType:t})})},hideDivider:g,onChangeNotificationType:function(r,i){r===INotificationType.BANNER&&y(i),m(e=>{const t=[...e.allowType];var n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})}}),p&&g&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Banner Style"}),jsxRuntime.exports.jsx(FormControl$1,Object.assign({component:"fieldset"},{children:jsxRuntime.exports.jsxs(RadioGroup$1,Object.assign({"aria-label":"bannerStyle",name:"bannerStyle",value:l,onChange:e=>{c(e.target.value),i(updateBannerStyle(e.target.value))},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel$1,{value:"temporary",control:jsxRuntime.exports.jsx(Radio$1,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Temporary"})})}),jsxRuntime.exports.jsx(FormControlLabel$1,{value:"persistent",control:jsxRuntime.exports.jsx(Radio$1,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Persistent"})})})]}))})),jsxRuntime.exports.jsx(Divider$1,{className:t.dividerBigMargin})]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.qJ0Sxo",defaultMessage:"Allow Utility Notifications",description:"allow-utility-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:n,onChange:e=>{e=e.target.checked;r(e)},color:"primary",name:"enableUtilityNotification",disabled:!p})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:t.notificationSettingItem},{children:null===u||void 0===u?void 0:u.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:e.iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tadsU0",defaultMessage:"{defaultMessage}",description:"title of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.allowType.join(", ")}}),onOpenUtility:v,utilityId:e.id,utilityTitle:e.title,disabled:!n},e.id))}))]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",className:t.appAllowTitle},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.swIpqY",defaultMessage:"Allow Application Notifications",description:"allow-application-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:o,onChange:e=>{e=e.target.checked;a(e)},color:"primary",name:"checkedB",disabled:!p})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:t.notificationSettingItem},{children:null==(s=null===d||void 0===d?void 0:d.allIds)?void 0:s.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:null===d||void 0===d?void 0:d.byId[e].iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.JvsYLn",defaultMessage:"{defaultMessage}",description:"title of notification application: {defaultMessage}",values:{idMessage:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].allowType.join(", ")}}),onOpenApplication:x,applicationId:e,applicationTitle:null===d||void 0===d?void 0:d.byId[e].name,disabled:!o},e))}))]})]}))})}const useStyles$1$3=makeStyles()(e=>({appNoti:{padding:e.spacing(6),paddingTop:e.spacing(4.4),overflowY:"scroll",height:"100%"}})),useStyles$f=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0,paddingTop:0,paddingBottom:0,height:"20px"},disabledCheckBox:{"& svg":{color:"green"}},firstColumn:{paddingRight:e.spacing(2)},secondColumn:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},thirdColumn:{paddingLeft:e.spacing(2)}}));function NotificationAllowCell(e){const{id:t,type:n,allowType:r,currentApplicationAllowType:i,isLineEnable:o,onChangeAppAction:a}=e,s=useStyles$f()["classes"];e=(e,t)=>{switch(t){case"email":return e.includes(INotificationType.EMAIL);case"banners":return e.includes(INotificationType.BANNER);case"notification-center":return e.includes(INotificationType.NOTIFICATION_CENTER)}};return jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:s.tableCell+" "+(()=>{switch(t){case"email":return s.firstColumn;case"notification-center":return s.secondColumn;case"banners":return s.thirdColumn;default:return""}})()},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t,checked:e(r,t),disabled:!e(i,t)||!o,icon:jsxRuntime.exports.jsx(default_1$5,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{color:e(i,t)&&o?"primary":"disabled"}),onChange:e=>{a(e,n)}})}))}function NotificationAllowRow(e){const{allowNotificationTitle:t,checked:n,allowType:r,appId:i,id:o}=e;e=useStyles$f().classes;const a=useDispatch();var s=useSelector(notificationApplicationSelector(i));const[l,c]=react.exports.useState(n),u=null==s?void 0:s.allowType,[d,p]=react.exports.useState(r),f=[{id:"email",type:INotificationType.EMAIL},{id:"notification-center",type:INotificationType.NOTIFICATION_CENTER},{id:"banners",type:INotificationType.BANNER}];const h=(e,t)=>{let n;n=e.currentTarget.checked?[...d,t]:d.filter(e=>e!==t),p(n),a(updateAppActionAllowNotification(i,o,n,"allowType"))};return jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({component:"th",scope:"row",className:e.tableCell},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Checkbox$1,{"data-test":"row-check-"+o,"data-testid":"row-check-"+o,className:e.rowCheckbox,checked:l,onChange:e=>{e=e.currentTarget.checked;c(e),a(updateAppActionAllowNotification(i,o,e,"allow"))}}),jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tSG+Bv",defaultMessage:"{text}",description:"allow-notification-table-{text}",values:{text:t}})})]}))})),f.map(e=>jsxRuntime.exports.jsx(NotificationAllowCell,{id:e.id,type:e.type,allowType:r,currentApplicationAllowType:u,isLineEnable:l,onChangeAppAction:h},e.id))]})}function NotificationAllowTable(e){const{action:n,appId:r}=e;var e=useStyles$f()["classes"],t=classnames(e.tableCell,e.firstColumn),i=classnames(e.tableCell,e.secondColumn),o=classnames(e.tableCell,e.thirdColumn);return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"notification-table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:e.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:t},{children:jsxRuntime.exports.jsx("img",{src:img$1n,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:i},{children:jsxRuntime.exports.jsx("img",{src:img$1m,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:o},{children:jsxRuntime.exports.jsx("img",{src:img$1l,alt:"img-icon"})}))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==(e=null===n||void 0===n?void 0:n.allIds)?void 0:e.map(e=>{var t;return jsxRuntime.exports.jsx(NotificationAllowRow,{allowNotificationTitle:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.title,checked:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allow,allowType:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allowType,appId:r,id:e},e)})})]}))})}function NotificationApplication(e){const o=e["dataId"];var e=useStyles$1$3()["classes"];const t=useDispatch();var n=useSelector(notificationApplicationsSelector);const[r,a]=react.exports.useState(n),i=useSelector(notificationSelector).settings;var s=useSelector(notificationApplicationSelector(o));react.exports.useEffect(()=>{t(updateApplicationSetting(r))},[r]);const l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER],c=[];l.forEach(t=>{-1===(null===i||void 0===i?void 0:i.allowType.findIndex(e=>e===t))&&c.push(t)});return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.appNoti},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationType,{notificationTypeTitle:"Allow Notifications",allowNotification:null==n?void 0:n.byId[o].allow,allowTypes:null==(e=null==n?void 0:n.byId[o])?void 0:e.allowType,disabledTypes:c,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==(e=null==n?void 0:n.byId[o])?void 0:e.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.OR1ivL",defaultMessage:"{text}",description:"notification-app-id",values:{text:null==s?void 0:s.name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.QgzNQa",defaultMessage:"{text}",description:"notification application detail text",values:{text:null==s?void 0:s.description}}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"}),onChangeNotificationType:function(r,i){a(e=>{const t=[...e.byId[o].allowType];var n=t.indexOf(r);return i&&-1===n?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[o]:Object.assign(Object.assign({},e.byId[o]),{allowType:t})})})})},onChangeAllowType:e=>{t(updateAppAllowNotification(o,e))}})}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(NotificationAllowTable,{action:null==(e=null==n?void 0:n.byId[o])?void 0:e.action,appId:o}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}})]}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}var index_esm$2=Object.freeze({__proto__:null,NotificationApplication:NotificationApplication,NotificationDetailPanel:NotificationDetailPanel,NotificationPanel:NotificationPanel,NotificationSetting:NotificationSetting,NotificationUtilityPanel:NotificationUtilityPanel,initNotificationAction:initNotificationAction,onNotificationActionClicked:onNotificationActionClicked}),Search={},_interopRequireDefault$4=interopRequireDefault.exports,default_1$4=(Object.defineProperty(Search,"__esModule",{value:!0}),Search.default=void 0),_createSvgIcon$4=_interopRequireDefault$4(createSvgIcon),_jsxRuntime$4=jsxRuntime.exports,_default$4=(0,_createSvgIcon$4.default)((0,_jsxRuntime$4.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");function getLoadingButtonUtilityClass(e){return generateUtilityClass("MuiLoadingButton",e)}default_1$4=Search.default=_default$4;const loadingButtonClasses=generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var loadingButtonClasses$1=loadingButtonClasses;const _excluded=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],useUtilityClasses=e=>{var{loading:e,loadingPosition:t,classes:n}=e;return _extends({},n,composeClasses({root:["root",e&&"loading"],startIcon:[e&&"startIconLoading"+capitalize$2(t)],endIcon:[e&&"endIconLoading"+capitalize$2(t)],loadingIndicator:["loadingIndicator",e&&"loadingIndicator"+capitalize$2(t)]},getLoadingButtonUtilityClass,n))},rootShouldForwardProp=e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e,LoadingButtonRoot=styled$1(Button$1,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& ."+loadingButtonClasses$1.startIconLoadingStart]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& ."+loadingButtonClasses$1.endIconLoadingEnd]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>_extends({[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),["&."+loadingButtonClasses$1.loading]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),LoadingButtonLoadingIndicator=styled$1("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{e=e.ownerState;return[t.loadingIndicator,t["loadingIndicator"+capitalize$2(e.loadingPosition)]]}})(({theme:e,ownerState:t})=>_extends({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:e.palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10})),LoadingButton=react.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiLoadingButton"}),{children:n,disabled:r=!1,id:i,loading:o=!1,loadingIndicator:a,loadingPosition:s="center",variant:l="text"}=e,c=_objectWithoutPropertiesLoose$2(e,_excluded),i=useId(i),a=null!=a?a:jsxRuntime.exports.jsx(CircularProgress$1,{"aria-labelledby":i,color:"inherit",size:16}),e=_extends({},e,{disabled:r,loading:o,loadingIndicator:a,loadingPosition:s,variant:l}),s=useUtilityClasses(e);return jsxRuntime.exports.jsx(LoadingButtonRoot,_extends({disabled:r||o,id:i,ref:t},c,{variant:l,classes:s,ownerState:e,children:"end"===e.loadingPosition?jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[n,o&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a})]}):jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[o&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a}),n]})}))});var LoadingButton$1=LoadingButton,Link={},_interopRequireDefault$3=interopRequireDefault.exports,default_1$3=(Object.defineProperty(Link,"__esModule",{value:!0}),Link.default=void 0),_createSvgIcon$3=_interopRequireDefault$3(createSvgIcon),_jsxRuntime$3=jsxRuntime.exports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link"),default_1$3=Link.default=_default$3,cropper={exports:{}},Cropper=(!function(){function N(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function P(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?N(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):N(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e){return"number"==typeof e&&!ie(e)}function i(e){return void 0===e}function o(e){return"object"===D(e)&&null!==e}function f(e){if(!o(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&ae.call(n,"isPrototypeOf")}catch(e){return!1}}function c(e){return"function"==typeof e}function F(e){return Array.from?Array.from(e):se.call(e)}function _(n,r){return n&&c(r)&&(Array.isArray(n)||p(n.length)?F(n).forEach(function(e,t){r.call(n,e,t,n)}):o(n)&&Object.keys(n).forEach(function(e){r.call(n,n[e],e,n)})),n}function j(e,t){var n=1<arguments.length&&void 0!==t?t:1e11;return le.test(e)?Math.round(e*n)/n:e}function h(e,t){var n=e.style;_(t,function(e,t){ce.test(t)&&p(e)&&(e="".concat(e,"px")),n[t]=e})}function u(e,t){var n;t&&(p(e.length)?_(e,function(e){u(e,t)}):e.classList?e.classList.add(t):(n=e.className.trim())?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t)}function T(e,t){t&&(p(e.length)?_(e,function(e){T(e,t)}):e.classList?e.classList.remove(t):0<=e.className.indexOf(t)&&(e.className=e.className.replace(t,"")))}function a(e,t,n){t&&(p(e.length)?_(e,function(e){a(e,t,n)}):(n?u:T)(e,t))}function s(e){return e.replace(ue,"$1-$2").toLowerCase()}function B(e,t){return o(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(s(t)))}function d(e,t,n){o(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(s(t)),n)}function l(n,e,r,t){var i=3<arguments.length&&void 0!==t?t:{},o=r;e.trim().split(de).forEach(function(e){var t;pe||(t=n.listeners)&&t[e]&&t[e][r]&&(o=t[e][r],delete t[e][r],0===Object.keys(t[e]).length&&delete t[e],0===Object.keys(t).length&&delete n.listeners),n.removeEventListener(e,o,i)})}function m(o,e,a,t){var s=3<arguments.length&&void 0!==t?t:{},l=a;e.trim().split(de).forEach(function(r){var e,i;s.once&&!pe&&(e=o.listeners,l=function(){delete i[r][a],o.removeEventListener(r,l,s);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(o,t)},(i=void 0===e?{}:e)[r]||(i[r]={}),i[r][a]&&o.removeEventListener(r,i[r][a],s),i[r][a]=l,o.listeners=i),o.addEventListener(r,l,s)})}function g(e,t,n){var r;return c(Event)&&c(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function U(e){e=e.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}function Z(e){e=e.match(fe);return null!==e&&(e[1]!==t.protocol||e[2]!==t.hostname||e[3]!==t.port)}function z(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function y(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,e=e.translateY,o=[],i=(p(i)&&0!==i&&o.push("translateX(".concat(i,"px)")),p(e)&&0!==e&&o.push("translateY(".concat(e,"px)")),p(t)&&0!==t&&o.push("rotate(".concat(t,"deg)")),p(n)&&1!==n&&o.push("scaleX(".concat(n,")")),p(r)&&1!==r&&o.push("scaleY(".concat(r,")")),o.length?o.join(" "):"none");return{WebkitTransform:i,msTransform:i,transform:i}}function v(e,t){var n=e.pageX,e=e.pageY,r={endX:n,endY:e};return t?r:P({startX:n,startY:e},r)}function I(e,t){var n,r=e.aspectRatio,i=e.height,o=e.width,a=1<arguments.length&&void 0!==t?t:"contain",s=oe(o),l=oe(i);return s&&l?(n=i*r,"contain"===a&&o<n||"cover"===a&&n<o?i=o/r:o=i*r):s?i=o/r:l&&(o=i*r),{width:o,height:i}}var x,C,b,$,W,E,G,q,w,S,R,O,L,M,A,K,Y,Q,X,J,ee,te,ne,re,ie,oe,ae,se,k,le,ce,ue,de,pe,t,fe,he,me,e,n,ge,ye,ve,xe,Ce,be;cropper.exports=(x="undefined"!=typeof window&&void 0!==window.document,C=x?window:{},n=!(!x||!C.document.documentElement)&&"ontouchstart"in C.document.documentElement,e=x&&"PointerEvent"in C,$="".concat(b="cropper","-crop"),W="".concat(b,"-disabled"),E="".concat(b,"-hidden"),G="".concat(b,"-hide"),q="".concat(b,"-invisible"),w="".concat(b,"-modal"),S="".concat(b,"-move"),R="".concat(b,"Action"),O="".concat(b,"Preview"),L="cropend",M="cropmove",A="cropstart",K=e?"pointerdown":n?"touchstart":"mousedown",Y=e?"pointermove":n?"touchmove":"mousemove",Q=e?"pointerup pointercancel":n?"touchend touchcancel":"mouseup",X="image/jpeg",J=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ee=/^data:/,te=/^data:image\/jpeg;base64,/,ne=/^img|canvas$/i,re={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},ie=Number.isNaN||C.isNaN,oe=function(e){return 0<e&&e<1/0},ae=Object.prototype.hasOwnProperty,se=Array.prototype.slice,k=Object.assign||function(n){for(var e=arguments.length,t=new Array(1<e?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return o(n)&&0<t.length&&t.forEach(function(t){o(t)&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},le=/\.\d*(?:0|9){12}\d*$/,ce=/^width|height|left|top|marginLeft|marginTop$/,ue=/([a-z\d])([A-Z])/g,de=/\s\s*/,pe=function(){var t,e,n,r=!1;return x&&(t=!1,e=function(){},n=Object.defineProperty({},"once",{get:function(){return r=!0,t},set:function(e){t=e}}),C.addEventListener("test",e,n),C.removeEventListener("test",e,n)),r}(),t=C.location,fe=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i,he=String.fromCharCode,me=/^data:.*,/,e={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,n=this.container,r=this.cropper,i=Number(t.minContainerWidth),t=Number(t.minContainerHeight),i=(u(r,E),T(e,E),{width:Math.max(n.offsetWidth,0<=i?i:200),height:Math.max(n.offsetHeight,0<=t?t:100)});h(r,{width:(this.containerData=i).width,height:i.height}),u(e,E),T(r,E)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180==90,i=r?t.naturalHeight:t.naturalWidth,r=r?t.naturalWidth:t.naturalHeight,t=i/r,o=e.width,a=e.height,t=(e.height*t>e.width?3===n?o=e.height*t:a=e.width/t:3===n?a=e.width/t:o=e.height*t,{aspectRatio:t,naturalWidth:i,naturalHeight:r,width:o,height:a});this.canvasData=t,this.limited=1===n||2===n,this.limitCanvas(!0,!0),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),t.left=(e.width-t.width)/2,t.top=(e.height-t.height)/2,t.oldLeft=t.left,t.oldTop=t.top,this.initialCanvasData=k({},t)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=i.aspectRatio,l=this.cropped&&o;e&&(e=Number(n.minCanvasWidth)||0,n=Number(n.minCanvasHeight)||0,1<a?(e=Math.max(e,r.width),n=Math.max(n,r.height),3===a&&(e<n*s?e=n*s:n=e/s)):0<a&&(e?e=Math.max(e,l?o.width:0):n?n=Math.max(n,l?o.height:0):l&&((e=o.width)<(n=o.height)*s?e=n*s:n=e/s)),e=(s=I({aspectRatio:s,width:e,height:n})).width,n=s.height,i.minWidth=e,i.minHeight=n,i.maxWidth=1/0,i.maxHeight=1/0),t&&((l?0:1)<a?(s=r.width-i.width,e=r.height-i.height,i.minLeft=Math.min(0,s),i.minTop=Math.min(0,e),i.maxLeft=Math.max(0,s),i.maxTop=Math.max(0,e),l&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,2===a&&(i.width>=r.width&&(i.minLeft=Math.min(0,s),i.maxLeft=Math.max(0,s)),i.height>=r.height&&(i.minTop=Math.min(0,e),i.maxTop=Math.max(0,e))))):(i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=r.width,i.maxTop=r.height))},renderCanvas:function(e,t){var n,r,i=this.canvasData,o=this.imageData;t&&(o=(t=function(e){var t=e.width,n=e.height,e=e.degree;if(90==(e=Math.abs(e)%180))return{width:n,height:t};var r=e%90*Math.PI/180,i=Math.sin(r),r=Math.cos(r),o=t*r+n*i,t=t*i+n*r;return 90<e?{width:t,height:o}:{width:o,height:t}}({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0})).width,t=t.height,n=i.width*(o/i.naturalWidth),r=i.height*(t/i.naturalHeight),i.left-=(n-i.width)/2,i.top-=(r-i.height)/2,i.width=n,i.height=r,i.aspectRatio=o/t,i.naturalWidth=o,i.naturalHeight=t,this.limitCanvas(!0,!1)),(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,h(this.canvas,k({width:i.width,height:i.height},y({translateX:i.left,translateY:i.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,n=this.imageData,r=n.naturalWidth*(t.width/t.naturalWidth),i=n.naturalHeight*(t.height/t.naturalHeight);k(n,{width:r,height:i,left:(t.width-r)/2,top:(t.height-i)/2}),h(this.image,k({width:n.width,height:n.height},y(k({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,e=Number(e.autoCropArea)||.8,r={width:t.width,height:t.height};n&&(t.height*n>t.width?r.height=r.width/n:r.width=r.height*n),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*e),r.height=Math.max(r.minHeight,r.height*e),r.left=t.left+(t.width-r.width)/2,r.top=t.top+(t.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=k({},r)},limitCropBox:function(e,t){var n,r,i=this.options,o=this.containerData,a=this.canvasData,s=this.cropBoxData,l=this.limited,c=i.aspectRatio;e&&(e=Number(i.minCropBoxWidth)||0,i=Number(i.minCropBoxHeight)||0,n=l?Math.min(o.width,a.width,a.width+a.left,o.width-a.left):o.width,r=l?Math.min(o.height,a.height,a.height+a.top,o.height-a.top):o.height,e=Math.min(e,o.width),i=Math.min(i,o.height),c&&(e&&i?e<i*c?i=e/c:e=i*c:e?i=e/c:i&&(e=i*c),n<r*c?r=n/c:n=r*c),s.minWidth=Math.min(e,n),s.minHeight=Math.min(i,r),s.maxWidth=n,s.maxHeight=r),t&&(l?(s.minLeft=Math.max(0,a.left),s.minTop=Math.max(0,a.top),s.maxLeft=Math.min(o.width,a.left+a.width)-s.width,s.maxTop=Math.min(o.height,a.top+a.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=o.width-s.width,s.maxTop=o.height-s.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&d(this.face,R,n.width>=t.width&&n.height>=t.height?"move":"all"),h(this.cropBox,k({width:n.width,height:n.height},y({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),g(this.element,"crop",this.getData())}},n={initPreview:function(){var e=this.element,n=this.crossOrigin,t=this.options.preview,r=n?this.crossOriginUrl:this.url,i=e.alt||"The image to preview",o=document.createElement("img");n&&(o.crossOrigin=n),o.src=r,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,t&&("string"==typeof(o=t)?o=e.ownerDocument.querySelectorAll(t):t.querySelector&&(o=[t]),_(this.previews=o,function(e){var t=document.createElement("img");d(e,O,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),n&&(t.crossOrigin=n),t.src=r,t.alt=i,t.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(t)}))},resetPreview:function(){_(this.previews,function(t){var n=B(t,O),n=(h(t,{width:n.width,height:n.height}),t.innerHTML=n.html,t),t=O;if(o(n[t]))try{delete n[t]}catch(e){n[t]=void 0}else if(n.dataset)try{delete n.dataset[t]}catch(e){n.dataset[t]=void 0}else n.removeAttribute("data-".concat(s(t)))})},preview:function(){var a=this.imageData,e=this.canvasData,t=this.cropBoxData,s=t.width,l=t.height,c=a.width,u=a.height,d=t.left-e.left-a.left,p=t.top-e.top-a.top;this.cropped&&!this.disabled&&(h(this.viewBoxImage,k({width:c,height:u},y(k({translateX:-d,translateY:-p},a)))),_(this.previews,function(e){var t=B(e,O),n=t.width,t=t.height,r=n,i=t,o=1;s&&(i=l*(o=n/s)),l&&t<i&&(r=s*(o=t/l),i=t),h(e,{width:r,height:i}),h(e.getElementsByTagName("img")[0],k({width:c*o,height:u*o},y(k({translateX:-d*o,translateY:-p*o},a))))}))}},ge={bind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&m(e,A,t.cropstart),c(t.cropmove)&&m(e,M,t.cropmove),c(t.cropend)&&m(e,L,t.cropend),c(t.crop)&&m(e,"crop",t.crop),c(t.zoom)&&m(e,"zoom",t.zoom),m(n,K,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&m(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&m(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),m(e.ownerDocument,Y,this.onCropMove=this.cropMove.bind(this)),m(e.ownerDocument,Q,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&m(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&l(e,A,t.cropstart),c(t.cropmove)&&l(e,M,t.cropmove),c(t.cropend)&&l(e,L,t.cropend),c(t.crop)&&l(e,"crop",t.crop),c(t.zoom)&&l(e,"zoom",t.zoom),l(n,K,this.onCropStart),t.zoomable&&t.zoomOnWheel&&l(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&l(n,"dblclick",this.onDblclick),l(e.ownerDocument,Y,this.onCropMove),l(e.ownerDocument,Q,this.onCropEnd),t.responsive&&l(window,"resize",this.onResize)}},ye={resize:function(){var e,t,n,r,i,o,a;this.disabled||(e=this.options,r=this.container,t=this.containerData,n=r.offsetWidth/t.width,r=r.offsetHeight/t.height,1!=(i=Math.abs(n-1)>Math.abs(r-1)?n:r)&&(e.restore&&(o=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(_(o,function(e,t){o[t]=e*i})),this.setCropBoxData(_(a,function(e,t){a[t]=e*i})))))},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=$,(e.classList?e.classList.contains(t):-1<e.className.indexOf(t))?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),e.deltaY?r=0<e.deltaY?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=0<e.detail?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t,n=e.buttons,r=e.button;this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(p(n)&&1!==n||p(r)&&0!==r||e.ctrlKey)||(n=this.options,t=this.pointers,e.changedTouches?_(e.changedTouches,function(e){t[e.identifier]=v(e)}):t[e.pointerId||0]=v(e),r=1<Object.keys(t).length&&n.zoomable&&n.zoomOnTouch?"zoom":B(e.target,R),J.test(r)&&!1!==g(this.element,A,{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r&&(this.cropping=!0,u(this.dragBox,w))))},cropMove:function(e){var t,n=this.action;!this.disabled&&n&&(t=this.pointers,e.preventDefault(),!1!==g(this.element,M,{originalEvent:e,action:n})&&(e.changedTouches?_(e.changedTouches,function(e){k(t[e.identifier]||{},v(e,!0))}):k(t[e.pointerId||0]||{},v(e,!0)),this.change(e)))},cropEnd:function(e){var t,n;this.disabled||(t=this.action,n=this.pointers,e.changedTouches?_(e.changedTouches,function(e){delete n[e.identifier]}):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,a(this.dragBox,w,this.cropped&&this.options.modal)),g(this.element,L,{originalEvent:e,action:t})))}},ve={change:function(e){function t(e){switch(e){case"e":g+S.x>C&&(S.x=C-g);break;case"w":p+S.x<v&&(S.x=v-p);break;case"n":f+S.y<x&&(S.y=x-f);break;case"s":y+S.y>b&&(S.y=b-y)}}var n,r,o,i=this.options,a=this.canvasData,s=this.containerData,l=this.cropBoxData,c=this.pointers,u=this.action,d=i.aspectRatio,p=l.left,f=l.top,h=l.width,m=l.height,g=p+h,y=f+m,v=0,x=0,C=s.width,b=s.height,$=!0,w=(!d&&e.shiftKey&&(d=h&&m?h/m:1),this.limited&&(v=l.minLeft,x=l.minTop,C=v+Math.min(s.width,a.width,a.left+a.width),b=x+Math.min(s.height,a.height,a.top+a.height)),c[Object.keys(c)[0]]),S={x:w.endX-w.startX,y:w.endY-w.startY};switch(u){case"all":p+=S.x,f+=S.y;break;case"e":if(0<=S.x&&(C<=g||d&&(f<=x||b<=y))){$=!1;break}t("e"),(h+=S.x)<0&&(u="w",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2);break;case"n":if(S.y<=0&&(f<=x||d&&(p<=v||C<=g))){$=!1;break}t("n"),m-=S.y,f+=S.y,m<0&&(u="s",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2);break;case"w":if(S.x<=0&&(p<=v||d&&(f<=x||b<=y))){$=!1;break}t("w"),h-=S.x,p+=S.x,h<0&&(u="e",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2);break;case"s":if(0<=S.y&&(b<=y||d&&(p<=v||C<=g))){$=!1;break}t("s"),(m+=S.y)<0&&(u="n",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2);break;case"ne":if(d){if(S.y<=0&&(f<=x||C<=g)){$=!1;break}t("n"),m-=S.y,f+=S.y,h=m*d}else t("n"),t("e"),!(0<=S.x)||g<C?h+=S.x:S.y<=0&&f<=x&&($=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="sw",f-=m=-m,p-=h=-h):h<0?(u="nw",p-=h=-h):m<0&&(u="se",f-=m=-m);break;case"nw":if(d){if(S.y<=0&&(f<=x||p<=v)){$=!1;break}t("n"),m-=S.y,f+=S.y,p+=l.width-(h=m*d)}else t("n"),t("w"),!(S.x<=0)||v<p?(h-=S.x,p+=S.x):S.y<=0&&f<=x&&($=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="se",f-=m=-m,p-=h=-h):h<0?(u="ne",p-=h=-h):m<0&&(u="sw",f-=m=-m);break;case"sw":if(d){if(S.x<=0&&(p<=v||b<=y)){$=!1;break}t("w"),h-=S.x,p+=S.x,m=h/d}else t("s"),t("w"),!(S.x<=0)||v<p?(h-=S.x,p+=S.x):0<=S.y&&b<=y&&($=!1),(!(0<=S.y)||y<b)&&(m+=S.y);h<0&&m<0?(u="ne",f-=m=-m,p-=h=-h):h<0?(u="se",p-=h=-h):m<0&&(u="nw",f-=m=-m);break;case"se":if(d){if(0<=S.x&&(C<=g||b<=y)){$=!1;break}t("e"),m=(h+=S.x)/d}else t("s"),t("e"),!(0<=S.x)||g<C?h+=S.x:0<=S.y&&b<=y&&($=!1),(!(0<=S.y)||y<b)&&(m+=S.y);h<0&&m<0?(u="nw",f-=m=-m,p-=h=-h):h<0?(u="sw",p-=h=-h):m<0&&(u="ne",f-=m=-m);break;case"move":this.move(S.x,S.y),$=!1;break;case"zoom":this.zoom((r=P({},n=c),o=0,_(n,function(i,e){delete r[e],_(r,function(e){var t=Math.abs(i.startX-e.startX),n=Math.abs(i.startY-e.startY),r=Math.abs(i.endX-e.endX),e=Math.abs(i.endY-e.endY),t=Math.sqrt(t*t+n*n),n=(Math.sqrt(r*r+e*e)-t)/t;Math.abs(n)>Math.abs(o)&&(o=n)})}),o),e),$=!1;break;case"crop":if(!S.x||!S.y){$=!1;break}n=U(this.cropper),p=w.startX-n.left,f=w.startY-n.top,h=l.minWidth,m=l.minHeight,0<S.x?u=0<S.y?"se":"ne":S.x<0&&(p-=h,u=0<S.y?"sw":"nw"),S.y<0&&(f-=m),this.cropped||(T(this.cropBox,E),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}$&&(l.width=h,l.height=m,l.left=p,l.top=f,this.action=u,this.renderCropBox()),_(c,function(e){e.startX=e.endX,e.startY=e.endY})}},xe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&u(this.dragBox,w),T(this.cropBox,E),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=k({},this.initialImageData),this.canvasData=k({},this.initialCanvasData),this.cropBoxData=k({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(k(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),T(this.dragBox,w),u(this.cropBox,E)),this},replace:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,_(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,T(this.cropper,W)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,u(this.cropper,W)),this},destroy:function(){var e=this.element;return e[b]&&(e[b]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate()),this},move:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,n=n.top;return this.moveTo(i(e)?e:r+Number(e),i(t)?t:n+Number(t))},moveTo:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(p(e)&&(n.left=e,r=!0),p(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=Number(e),this.zoomTo(n.width*(e=e<0?1/(1-e):1+e)/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r,i,o,a=this.options,s=this.canvasData,l=s.width,c=s.height,u=s.naturalWidth,d=s.naturalHeight;if(0<=(e=Number(e))&&this.ready&&!this.disabled&&a.zoomable){a=u*e,d=d*e;if(!1===g(this.element,"zoom",{ratio:e,oldRatio:l/u,originalEvent:n}))return this;n?(e=this.pointers,u=U(this.cropper),e=e&&Object.keys(e).length?(o=i=r=0,_(e,function(e){var t=e.startX,e=e.startY;r+=t,i+=e,o+=1}),{pageX:r/=o,pageY:i/=o}):{pageX:n.pageX,pageY:n.pageY},s.left-=(a-l)*((e.pageX-u.left-s.left)/l),s.top-=(d-c)*((e.pageY-u.top-s.top)/c)):f(t)&&p(t.x)&&p(t.y)?(s.left-=(a-l)*((t.x-s.left)/l),s.top-=(d-c)*((t.y-s.top)/c)):(s.left-=(a-l)/2,s.top-=(d-c)/2),s.width=a,s.height=d,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return p(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,p(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(p(t)?t:1,e)},scale:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(p(e)&&(n.scaleX=e,r=!0),p(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var n,r,e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.options,i=this.imageData,o=this.canvasData,a=this.cropBoxData;return this.ready&&this.cropped?(n={x:a.left-o.left,y:a.top-o.top,width:a.width,height:a.height},r=i.width/i.naturalWidth,_(n,function(e,t){n[t]=e/r}),e&&(o=Math.round(n.y+n.height),a=Math.round(n.x+n.width),n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=a-n.x,n.height=o-n.y)):n={x:0,y:0,width:0,height:0},t.rotatable&&(n.rotate=i.rotate||0),t.scalable&&(n.scaleX=i.scaleX||1,n.scaleY=i.scaleY||1),n},setData:function(e){var t,n=this.options,r=this.imageData,i=this.canvasData,o={};return this.ready&&!this.disabled&&f(e)&&(t=!1,n.rotatable&&p(e.rotate)&&e.rotate!==r.rotate&&(r.rotate=e.rotate,t=!0),n.scalable&&(p(e.scaleX)&&e.scaleX!==r.scaleX&&(r.scaleX=e.scaleX,t=!0),p(e.scaleY)&&e.scaleY!==r.scaleY&&(r.scaleY=e.scaleY,t=!0)),t&&this.renderCanvas(!0,!0),n=r.width/r.naturalWidth,p(e.x)&&(o.left=e.x*n+i.left),p(e.y)&&(o.top=e.y*n+i.top),p(e.width)&&(o.width=e.width*n),p(e.height)&&(o.height=e.height*n),this.setCropBoxData(o)),this},getContainerData:function(){return this.ready?k({},this.containerData):{}},getImageData:function(){return this.sized?k({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,n={};return this.ready&&_(["left","top","width","height","naturalWidth","naturalHeight"],function(e){n[e]=t[e]}),n},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&f(e)&&(p(e.left)&&(t.left=e.left),p(e.top)&&(t.top=e.top),p(e.width)?(t.width=e.width,t.height=e.width/n):p(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return(e=this.ready&&this.cropped?{left:t.left,top:t.top,width:t.width,height:t.height}:e)||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,i=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&f(e)&&(p(e.left)&&(r.left=e.left),p(e.top)&&(r.top=e.top),p(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),p(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),i&&(t?r.height=r.width/i:n&&(r.width=r.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=(S=this.image,b=this.imageData,p=t,c=e,_=b.aspectRatio,u=b.naturalWidth,f=b.naturalHeight,x=void 0===(x=b.rotate)?0:x,C=void 0===(C=b.scaleX)?1:C,b=void 0===(b=b.scaleY)?1:b,d=p.aspectRatio,y=p.naturalWidth,p=p.naturalHeight,g=void 0===(g=c.fillColor)?"transparent":g,$=void 0===($=c.imageSmoothingEnabled)||$,w=void 0===(w=c.imageSmoothingQuality)?"low":w,h=void 0===(h=c.maxWidth)?1/0:h,m=void 0===(m=c.maxHeight)?1/0:m,n=void 0===(n=c.minWidth)?0:n,c=void 0===(c=c.minHeight)?0:c,E=document.createElement("canvas"),T=E.getContext("2d"),v=I({aspectRatio:d,width:h,height:m}),d=I({aspectRatio:d,width:n,height:c},"cover"),y=Math.min(v.width,Math.max(d.width,y)),v=Math.min(v.height,Math.max(d.height,p)),d=I({aspectRatio:_,width:h,height:m}),p=I({aspectRatio:_,width:n,height:c},"cover"),h=Math.min(d.width,Math.max(p.width,u)),m=Math.min(d.height,Math.max(p.height,f)),_=[-h/2,-m/2,h,m],E.width=j(y),E.height=j(v),T.fillStyle=g,T.fillRect(0,0,y,v),T.save(),T.translate(y/2,v/2),T.rotate(x*Math.PI/180),T.scale(C,b),T.imageSmoothingEnabled=$,T.imageSmoothingQuality=w,T.drawImage.apply(T,[S].concat(H(_.map(function(e){return Math.floor(j(e))})))),T.restore(),E);if(!this.cropped)return n;var r,i,o,a,s,l,c=this.getData(),u=c.x,d=c.y,p=c.width,f=c.height,h=n.width/Math.floor(t.naturalWidth),m=(1!=h&&(u*=h,d*=h,p*=h,f*=h),p/f),g=I({aspectRatio:m,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),y=I({aspectRatio:m,width:e.minWidth||0,height:e.minHeight||0},"cover"),v=I({aspectRatio:m,width:e.width||(1!=h?n.width:p),height:e.height||(1!=h?n.height:f)}),x=v.width,C=v.height,x=Math.min(g.width,Math.max(y.width,x)),C=Math.min(g.height,Math.max(y.height,C)),b=document.createElement("canvas"),$=b.getContext("2d"),w=(b.width=j(x),b.height=j(C),$.fillStyle=e.fillColor||"transparent",$.fillRect(0,0,x,C),e.imageSmoothingEnabled),S=e.imageSmoothingQuality,_=($.imageSmoothingEnabled=void 0===w||w,S&&($.imageSmoothingQuality=S),n.width),T=n.height,E=u,c=d,t=(E<=-p||_<E?s=o=r=E=0:E<=0?(o=-E,E=0,s=r=Math.min(_,p+E)):E<=_&&(o=0,s=r=Math.min(p,_-E)),r<=0||c<=-f||T<c?l=a=i=c=0:c<=0?(a=-c,c=0,l=i=Math.min(T,f+c)):c<=T&&(a=0,l=i=Math.min(f,T-c)),[E,c,r,i]);return 0<s&&0<l&&t.push(o*(m=x/p),a*m,s*m,l*m),$.drawImage.apply($,[n].concat(H(t.map(function(e){return Math.floor(j(e))})))),b},setAspectRatio:function(e){var t=this.options;return this.disabled||i(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t,n,r=this.options,i=this.dragBox,o=this.face;return this.ready&&!this.disabled&&(n=r.movable&&"move"===e,r.dragMode=e=(t="crop"===e)||n?e:"none",d(i,R,e),a(i,$,t),a(i,S,n),r.cropBoxMovable||(d(o,R,e),a(o,$,t),a(o,S,n))),this}},Ce=C.Cropper,be=function(){function i(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this,r=i;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");if(!e||!ne.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=k({},re,f(t)&&t),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var e=i,t=[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t[b]){if(t[b]=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",!(this.originalUrl=e))return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t,n,r,i,o,a,s=this;e&&(this.url=e,this.imageData={},t=this.element,(n=this.options).rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer?ee.test(e)?te.test(e)?this.read((a=(a=e).replace(me,""),r=atob(a),a=new ArrayBuffer(r.length),_(i=new Uint8Array(a),function(e,t){i[t]=r.charCodeAt(t)}),a)):this.clone():(o=new XMLHttpRequest,a=this.clone.bind(this),this.reloading=!0,(this.xhr=o).onabort=a,o.onerror=a,o.ontimeout=a,o.onprogress=function(){o.getResponseHeader("content-type")!==X&&o.abort()},o.onload=function(){s.read(o.response)},o.onloadend=function(){s.reloading=!1,s.xhr=null},n.checkCrossOrigin&&Z(e)&&t.crossOrigin&&(e=z(e)),o.open("GET",e,!0),o.responseType="arraybuffer",o.withCredentials="use-credentials"===t.crossOrigin,o.send()):this.clone())}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=function(e){var t,n,r,i,o,a,s=new DataView(e);try{if(255===s.getUint8(0)&&216===s.getUint8(1))for(var l=s.byteLength,c=2;c+1<l;){if(255===s.getUint8(c)&&225===s.getUint8(c+1)){r=c;break}c+=1}var u,d,p;if(r&&(u=r+10,"Exif"===function(e,t,n){var r="";n+=t;for(var i=t;i<n;i+=1)r+=he(e.getUint8(i));return r}(s,r+4,4)&&(d=s.getUint16(u),!(n=18761===d)&&19789!==d||42===s.getUint16(u+2,n)&&8<=(p=s.getUint32(u+4,n))&&(i=u+p))),i){var f=s.getUint16(i,n);for(a=0;a<f;a+=1)if(o=i+12*a+2,274===s.getUint16(o,n)){o+=8,t=s.getUint16(o,n),s.setUint16(o,1,n);break}}}catch(e){t=1}return t}(e),i=0,o=1,a=1;1<r&&(this.url=function(e,t){var n=[],r=new Uint8Array(e);for(;0<r.length;)n.push(he.apply(null,F(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}(e,X),i=(e=function(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90}return{rotate:t,scaleX:n,scaleY:r}}(r)).rotate,o=e.scaleX,a=e.scaleY),t.rotatable&&(n.rotate=i),t.scalable&&(n.scaleX=o,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t,i=(this.options.checkCrossOrigin&&Z(t)&&(n=n||"anonymous",r=z(t)),this.crossOrigin=n,this.crossOriginUrl=r,document.createElement("img"));n&&(i.crossOrigin=n),i.src=r||t,i.alt=e.alt||"The image to crop",(this.image=i).onload=this.start.bind(this),i.onerror=this.stop.bind(this),u(i,G),e.parentNode.insertBefore(i,e.nextSibling)}},{key:"start",value:function(){function e(e,t){k(r.imageData,{naturalWidth:e,naturalHeight:t,aspectRatio:e/t}),r.initialImageData=k({},r.imageData),r.sizing=!1,r.sized=!0,r.build()}var t,n,r=this,i=this.image,o=(i.onload=null,i.onerror=null,this.sizing=!0,C.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(C.navigator.userAgent));i.naturalWidth&&!o?e(i.naturalWidth,i.naturalHeight):(t=document.createElement("img"),n=document.body||document.documentElement,(this.sizingImage=t).onload=function(){e(t.width,t.height),o||n.removeChild(t)},t.src=i.src,o||(t.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",n.appendChild(t)))}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){var e,t,n,r,i,o,a,s,l;this.sized&&!this.ready&&(e=this.element,t=this.options,n=this.image,r=e.parentNode,(i=document.createElement("div")).innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',o=(i=i.querySelector(".".concat(b,"-container"))).querySelector(".".concat(b,"-canvas")),a=i.querySelector(".".concat(b,"-drag-box")),l=(s=i.querySelector(".".concat(b,"-crop-box"))).querySelector(".".concat(b,"-face")),this.container=r,this.cropper=i,this.canvas=o,this.dragBox=a,this.cropBox=s,this.viewBox=i.querySelector(".".concat(b,"-view-box")),this.face=l,o.appendChild(n),u(e,E),r.insertBefore(i,e.nextSibling),this.isImg||T(n,G),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,u(s,E),t.guides||u(s.getElementsByClassName("".concat(b,"-dashed")),E),t.center||u(s.getElementsByClassName("".concat(b,"-center")),E),t.background&&u(i,"".concat(b,"-bg")),t.highlight||u(l,q),t.cropBoxMovable&&(u(l,S),d(l,R,"all")),t.cropBoxResizable||(u(s.getElementsByClassName("".concat(b,"-line")),E),u(s.getElementsByClassName("".concat(b,"-point")),E)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),c(t.ready)&&m(e,"ready",t.ready,{once:!0}),g(e,"ready"))}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),T(this.element,E))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],n=[{key:"noConflict",value:function(){return window.Cropper=Ce,i}},{key:"setDefaults",value:function(e){k(re,f(e)&&e)}}];return t&&V(e.prototype,t),n&&V(e,n),i}(),k(be.prototype,e,n,ge,ye,ve,xe),be)}(),cropper.exports),__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};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}var AuthStatus,applyDefaultOptions=function(e,t){var n=(t=void 0===t?{}:t).enable,r=t.scaleX,r=void 0===r?1:r,i=t.scaleY,i=void 0===i?1:i,o=t.zoomTo,o=void 0===o?0:o,t=t.rotateTo;void 0===n||n?e.enable():e.disable(),e.scaleX(r),e.scaleY(i),void 0!==t&&e.rotateTo(t),0<o&&e.zoomTo(o)},useCombinedRefs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=react.exports.useRef(null);return React$1.useEffect(function(){e.forEach(function(e){e&&("function"==typeof e?e(n.current):e.current=n.current)})},[e]),n},ReactCropper=React$1.forwardRef(function(e,t){var e=__rest$1(e,[]),n=e.dragMode,r=void 0===n?"crop":n,i=e.src,n=e.style,o=e.className,a=e.crossOrigin,s=e.scaleX,l=e.scaleY,c=e.enable,u=e.zoomTo,d=e.rotateTo,p=e.alt,p=void 0===p?"picture":p,f=e.ready,h=e.onInitialized,m=__rest$1(e,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),g={scaleY:l,scaleX:s,enable:c,zoomTo:u,rotateTo:d},l=react.exports.useRef(null),y=useCombinedRefs(t,l);return react.exports.useEffect(function(){var e;null!=(e=y.current)&&e.cropper&&"number"==typeof u&&y.current.cropper.zoomTo(u)},[e.zoomTo]),react.exports.useEffect(function(){var e;null!=(e=y.current)&&e.cropper&&void 0!==i&&y.current.cropper.reset().clear().replace(i)},[i]),react.exports.useEffect(function(){var e;return null!==y.current&&(e=new Cropper(y.current,__assign(__assign({dragMode:r},m),{ready:function(e){null!==e.currentTarget&&applyDefaultOptions(e.currentTarget.cropper,g),f&&f(e)}})),h&&h(e)),function(){var e;null!=(e=null==(e=y.current)?void 0:e.cropper)&&e.destroy()}},[y]),React$1.createElement("div",{style:n,className:o},React$1.createElement("img",{crossOrigin:a,src:i,alt:p,style:{opacity:0,maxWidth:"100%"},ref:y}))});!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const namespace$3="users",userSelector$1=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$3]},userAuthStatusSelector=e=>{return null==(e=null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$3])?void 0:e.authStatus},GET_CURRENT_USER$1=`os-app-bar-panel/${namespace$3}/get current user`,GET_CURRENT_USER_SUCCESS$1=`os-app-bar-panel/${namespace$3}/get current user success`,RESET_BIOMETRIC=`os-app-bar-panel/${namespace$3}/reset biometric`,RESET_PASSWORD=`os-app-bar-panel/${namespace$3}/reset password`,RESET_PASSWORD_FAIL=`os-app-bar-panel/${namespace$3}/reset password fail`,UPDATE_PROFILE=`os-app-bar-panel/${namespace$3}/update profile`,UPDATE_PROFILE_FAIL=`os-app-bar-panel/${namespace$3}/update profile fail`,UPLOAD__AVATAR=`os-app-bar-panel/${namespace$3}/upload avatar`,UPDATE__AVATAR=`os-app-bar-panel/${namespace$3}/update avatar`,LOGOUT_USER=`os-app-bar-panel/${namespace$3}/logout`,LOGOUT_SUCCESS=`os-app-bar-panel/${namespace$3}/logout success`,LOGOUT_FAIL=`os-app-bar-panel/${namespace$3}/logout fail`,UPLOADING_AVATAR=`os-app-bar-panel/${namespace$3}/uploading`,UPDATE_ACTIVITY=`os-app-bar-panel/${namespace$3}/updateActivityStatus`;function getCurrentUser$1(){return{type:GET_CURRENT_USER$1}}function getCurrentUserSuccess$1(e){return{type:GET_CURRENT_USER_SUCCESS$1,payload:e}}function resetBiometric(){return{type:RESET_BIOMETRIC}}function resetPassword(e){return{type:RESET_PASSWORD,payload:e}}function resetPasswordFail(){return{type:RESET_PASSWORD_FAIL}}function updateProfile(e){return{type:UPDATE_PROFILE,payload:e}}function updateProfileFail(){return{type:UPDATE_PROFILE_FAIL}}function uploadAvatar(e){return{type:UPLOAD__AVATAR,payload:e}}function updateAvatar(e){return{type:UPDATE__AVATAR,payload:e}}function logoutUserSuccess(){return{type:LOGOUT_SUCCESS}}function logoutUserFail(){return{type:LOGOUT_FAIL}}function uploadingAvatar(e){return{type:UPLOADING_AVATAR,payload:e}}!function(e){e.AUTHENTICATED="authenticated",e.LOGGING_OUT="logging_out",e.LOGGED_OUT="logged_out"}(AuthStatus=AuthStatus||{});const initialState$3={currentUser:{},status:"idle",authStatus:AuthStatus.AUTHENTICATED};function userReducer$1(e,t){return void 0===e?initialState$3:t.type===GET_CURRENT_USER_SUCCESS$1?Object.assign(Object.assign({},e),{currentUser:t.payload,status:"success"}):t.type===UPLOADING_AVATAR?Object.assign(Object.assign({},e),{loading:t.payload}):t.type===LOGOUT_USER?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGING_OUT}):t.type===LOGOUT_SUCCESS?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGED_OUT}):t.type===LOGOUT_FAIL?Object.assign(Object.assign({},e),{authStatus:AuthStatus.AUTHENTICATED}):e}var luxon={};function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);t=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),o=0;o<i.length;o++)n=i[o],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelperLoose(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=_unsupportedIterableToArray(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(luxon,"__esModule",{value:!0});var LuxonError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(_wrapNativeSuper(Error)),InvalidDateTimeError=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidIntervalError=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidDurationError=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),ConflictingSpecificationError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),InvalidUnitError=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidArgumentError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),ZoneIsAbstractError=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(t,e),t}(LuxonError),n="numeric",s$1="short",l$1="long",DATE_SHORT={year:n,month:n,day:n},DATE_MED={year:n,month:s$1,day:n},DATE_MED_WITH_WEEKDAY={year:n,month:s$1,day:n,weekday:s$1},DATE_FULL={year:n,month:l$1,day:n},DATE_HUGE={year:n,month:l$1,day:n,weekday:l$1},TIME_SIMPLE={hour:n,minute:n},TIME_WITH_SECONDS={hour:n,minute:n,second:n},TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s$1},TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l$1},TIME_24_SIMPLE={hour:n,minute:n,hour12:!1},TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:!1},TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:s$1},TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:l$1},DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n},DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n},DATETIME_MED={year:n,month:s$1,day:n,hour:n,minute:n},DATETIME_MED_WITH_SECONDS={year:n,month:s$1,day:n,hour:n,minute:n,second:n},DATETIME_MED_WITH_WEEKDAY={year:n,month:s$1,day:n,weekday:s$1,hour:n,minute:n},DATETIME_FULL={year:n,month:l$1,day:n,hour:n,minute:n,timeZoneName:s$1},DATETIME_FULL_WITH_SECONDS={year:n,month:l$1,day:n,hour:n,minute:n,second:n,timeZoneName:s$1},DATETIME_HUGE={year:n,month:l$1,day:n,weekday:l$1,hour:n,minute:n,timeZoneName:l$1},DATETIME_HUGE_WITH_SECONDS={year:n,month:l$1,day:n,weekday:l$1,hour:n,minute:n,second:n,timeZoneName:l$1};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function isString(e){return"string"==typeof e}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function hasIntl(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts)}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,n,r){if(0!==e.length)return e.reduce(function(e,t){t=[n(t),t];return e&&r(e[0],t[0])===e[0]?e:t},null)[1]}function pick(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function hasOwnProperty$1(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,n){return isInteger(e)&&t<=e&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t){void 0===t&&(t=2);var n=e<0?"-":"",e=n?-1*e:e,t=e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString();return n+t}function parseInteger(e){if(!isUndefined(e)&&null!==e&&""!==e)return parseInt(e,10)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e)return e=1e3*parseFloat("0."+e),Math.floor(e)}function roundTo(e,t,n){void 0===n&&(n=!1);t=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*t)/t}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var n=floorMod(t-1,12)+1;return 2===n?isLeapYear(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function untruncateYear(e){return 99<e?e:60<e?1900+e:2e3+e}function parseZoneInfo(e,t,n,r){void 0===r&&(r=null);var i,e=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},r=(r&&(o.timeZone=r),Object.assign({timeZoneName:t},o)),t=hasIntl();return t&&hasFormatToParts()?(i=new Intl.DateTimeFormat(n,r).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?i.value:null:t?(i=new Intl.DateTimeFormat(n,o).format(e),new Intl.DateTimeFormat(n,r).format(e).substring(i.length).replace(/^[, \u200e]+/,"")):null}function signedOffset(e,t){e=parseInt(e,10),Number.isNaN(e)&&(e=0),t=parseInt(t,10)||0;return 60*e+(e<0||Object.is(e,-0)?-t:t)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError("Invalid unit value "+e);return t}function normalizeObject(e,t,n){var r,i,o={};for(r in e)!hasOwnProperty$1(e,r)||0<=n.indexOf(r)||null!=(i=e[r])&&(o[t(r)]=asNumber(i));return o}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=0<=e?"+":"-";switch(t){case"short":return i+padStart(n,2)+":"+padStart(r,2);case"narrow":return i+n+(0<r?":"+r:"");case"techie":return i+padStart(n,2)+padStart(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(e){return JSON.stringify(e,Object.keys(e).sort())}var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(monthsNarrow);case"short":return[].concat(monthsShort);case"long":return[].concat(monthsLong);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(weekdaysNarrow);case"short":return[].concat(weekdaysShort);case"long":return[].concat(weekdaysLong);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(erasNarrow);case"short":return[].concat(erasShort);case"long":return[].concat(erasLong);default:return null}}function meridiemForDateTime(e){return meridiems[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var a="days"===e;switch(t){case 1:return a?"tomorrow":"next "+i[e][0];case-1:return a?"yesterday":"last "+i[e][0];case 0:return a?"today":"this "+i[e][0]}}var n=Object.is(t,-0)||t<0,o=Math.abs(t),t=1===o,s=i[e],r=r?!t&&s[2]||s[1]:t?i[e][0]:e;return n?o+" "+r+" ago":"in "+o+" "+r}function formatString(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(stringify(pick(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return t;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}function stringifyTokens(e,t){for(var n="",r=_createForOfIteratorHelperLoose(e);!(i=r()).done;){var i=i.value;i.literal?n+=i.val:n+=t(i.val)}return n}var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS},Formatter=function(){function p(e,t){this.opts=t,this.loc=e,this.systemLoc=null}p.create=function(e,t){return new p(e,t=void 0===t?{}:t)},p.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],o=0;o<e.length;o++){var a=e.charAt(o);"'"===a?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||a===t?n+=a:(0<n.length&&i.push({literal:!1,val:n}),t=n=a)}return 0<n.length&&i.push({literal:r,val:n}),i},p.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=p.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return padStart(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},e.formatDateTimeFromString=function(n,e){var r=this,i="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),o=function(e,t){return r.loc.extract(n,e,t)},a=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},s=function(){return i?meridiemForDateTime(n):o({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return i?monthForDateTime(n,e):o(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return i?weekdayForDateTime(n,e):o(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=p.macroTokenToFormatOpts(e);return t?r.formatWithSystemDefault(n,t):e},d=function(e){return i?eraForDateTime(n,e):o({era:e},"era")};return stringifyTokens(p.parseFormat(e),function(e){switch(e){case"S":return r.num(n.millisecond);case"u":case"SSS":return r.num(n.millisecond,3);case"s":return r.num(n.second);case"ss":return r.num(n.second,2);case"m":return r.num(n.minute);case"mm":return r.num(n.minute,2);case"h":return r.num(n.hour%12==0?12:n.hour%12);case"hh":return r.num(n.hour%12==0?12:n.hour%12,2);case"H":return r.num(n.hour);case"HH":return r.num(n.hour,2);case"Z":return a({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return a({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:r.loc.locale});case"z":return n.zoneName;case"a":return s();case"d":return t?o({day:"numeric"},"day"):r.num(n.day);case"dd":return t?o({day:"2-digit"},"day"):r.num(n.day,2);case"c":return r.num(n.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return r.num(n.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return t?o({month:"numeric",day:"numeric"},"month"):r.num(n.month);case"LL":return t?o({month:"2-digit",day:"numeric"},"month"):r.num(n.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return t?o({month:"numeric"},"month"):r.num(n.month);case"MM":return t?o({month:"2-digit"},"month"):r.num(n.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return t?o({year:"numeric"},"year"):r.num(n.year);case"yy":return t?o({year:"2-digit"},"year"):r.num(n.year.toString().slice(-2),2);case"yyyy":return t?o({year:"numeric"},"year"):r.num(n.year,4);case"yyyyyy":return t?o({year:"numeric"},"year"):r.num(n.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(n.weekYear.toString().slice(-2),2);case"kkkk":return r.num(n.weekYear,4);case"W":return r.num(n.weekNumber);case"WW":return r.num(n.weekNumber,2);case"o":return r.num(n.ordinal);case"ooo":return r.num(n.ordinal,3);case"q":return r.num(n.quarter);case"qq":return r.num(n.quarter,2);case"X":return r.num(Math.floor(n.ts/1e3));case"x":return r.num(n.ts);default:return u(e)}})},e.formatDurationFromString=function(e,t){var n,r=this,i=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},t=p.parseFormat(t),o=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,o.map(i).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=i(e);return t?r.num(n.get(t),e.length):e}))},p}(),Invalid=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Zone=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new ZoneIsAbstractError},t.formatOffset=function(e,t){throw new ZoneIsAbstractError},t.offset=function(e){throw new ZoneIsAbstractError},t.equals=function(e){throw new ZoneIsAbstractError},_createClass(e,[{key:"type",get:function(){throw new ZoneIsAbstractError}},{key:"name",get:function(){throw new ZoneIsAbstractError}},{key:"universal",get:function(){throw new ZoneIsAbstractError}},{key:"isValid",get:function(){throw new ZoneIsAbstractError}}]),e}(),singleton=null,LocalZone=function(e){function t(){return e.apply(this,arguments)||this}_inheritsLoose(t,e);var n=t.prototype;return n.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale)},n.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},_createClass(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return hasIntl()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return singleton=null===singleton?new t:singleton}}]),t}(Zone),matchingRegex=RegExp("^"+ianaRegex.source+"$"),dtfCache={};function makeDTF(e){return dtfCache[e]||(dtfCache[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),dtfCache[e]}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(e,t){var e=e.format(t).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e),e=t[1],n=t[2];return[t[3],e,n,t[4],t[5],t[6]]}function partsOffset(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var o=n[i],a=o.type,o=o.value,a=typeToPos[a];isUndefined(a)||(r[a]=parseInt(o,10))}return r}var ianaZoneCache={},IANAZone=function(n){function r(e){var t=n.call(this)||this;return t.zoneName=e,t.valid=r.isValidZone(e),t}_inheritsLoose(r,n),r.create=function(e){return ianaZoneCache[e]||(ianaZoneCache[e]=new r(e)),ianaZoneCache[e]},r.resetCache=function(){ianaZoneCache={},dtfCache={}},r.isValidSpecifier=function(e){return!(!e||!e.match(matchingRegex))},r.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},r.parseGMTOffset=function(e){if(e){e=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var e=r.prototype;return e.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},e.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},e.offset=function(e){e=new Date(e);if(isNaN(e))return NaN;var t=makeDTF(this.name),t=(t.formatToParts?partsOffset:hackyOffset)(t,e),n=t[0],r=t[1],i=t[2],o=t[3],e=+e,a=e%1e3;return(objToLocalTS({year:n,month:r,day:i,hour:24===o?0:o,minute:t[4],second:t[5],millisecond:0})-(e-=0<=a?a:1e3+a))/6e4},e.equals=function(e){return"iana"===e.type&&e.name===this.name},_createClass(r,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),r}(Zone),singleton$1=null,FixedOffsetZone=function(n){function t(e){var t=n.call(this)||this;return t.fixed=e,t}_inheritsLoose(t,n),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){e=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(signedOffset(e[1],e[2]))}return null},_createClass(t,null,[{key:"utcInstance",get:function(){return singleton$1=null===singleton$1?new t(0):singleton$1}}]);var e=t.prototype;return e.offsetName=function(){return this.name},e.formatOffset=function(e,t){return formatOffset(this.fixed,t)},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Zone),InvalidZone=function(n){function e(e){var t=n.call(this)||this;return t.zoneName=e,t}_inheritsLoose(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},_createClass(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Zone);function normalizeZone(e,t){var n;return isUndefined(e)||null===e?t:e instanceof Zone?e:isString(e)?"local"===(n=e.toLowerCase())?t:"utc"===n||"gmt"===n?FixedOffsetZone.utcInstance:null!=(t=IANAZone.parseGMTOffset(e))?FixedOffsetZone.instance(t):IANAZone.isValidSpecifier(n)?IANAZone.create(e):FixedOffsetZone.parseSpecifier(n)||new InvalidZone(e):isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}var now=function(){return Date.now()},defaultZone=null,defaultLocale$1=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=!1,Settings=function(){function e(){}return e.resetCaches=function(){Locale.resetCache(),IANAZone.resetCache()},_createClass(e,null,[{key:"now",get:function(){return now},set:function(e){now=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){defaultZone=e?normalizeZone(e):null}},{key:"defaultZone",get:function(){return defaultZone||LocalZone.instance}},{key:"defaultLocale",get:function(){return defaultLocale$1},set:function(e){defaultLocale$1=e}},{key:"defaultNumberingSystem",get:function(){return defaultNumberingSystem},set:function(e){defaultNumberingSystem=e}},{key:"defaultOutputCalendar",get:function(){return defaultOutputCalendar},set:function(e){defaultOutputCalendar=e}},{key:"throwOnInvalid",get:function(){return throwOnInvalid},set:function(e){throwOnInvalid=e}}]),e}(),intlDTCache={};function getCachedDTF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlDTCache[n];return r||(r=new Intl.DateTimeFormat(e,t),intlDTCache[n]=r),r}var intlNumCache={};function getCachedINF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlNumCache[n];return r||(r=new Intl.NumberFormat(e,t),intlNumCache[n]=r),r}var intlRelCache={};function getCachedRTF(e,t){var n=t=void 0===t?{}:t,n=(n.base,_objectWithoutPropertiesLoose(n,["base"])),n=JSON.stringify([e,n]),r=intlRelCache[n];return r||(r=new Intl.RelativeTimeFormat(e,t),intlRelCache[n]=r),r}var sysLocaleCache=null;function systemLocale(){var e;return sysLocaleCache=sysLocaleCache||(hasIntl()?(e=(new Intl.DateTimeFormat).resolvedOptions().locale)&&"und"!==e?e:"en-US":"en-US")}function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,t=e.substring(0,t);try{n=getCachedDTF(e).resolvedOptions()}catch(e){n=getCachedDTF(t).resolvedOptions()}e=n;return[t,e.numberingSystem,e.calendar]}function intlConfigString(e,t,n){return hasIntl()?((n||t)&&(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t)),e):[]}function mapMonths(e){for(var t=[],n=1;n<=12;n++){var r=DateTime.utc(2016,n,1);t.push(e(r))}return t}function mapWeekdays(e){for(var t=[],n=1;n<=7;n++){var r=DateTime.utc(2016,11,13+n);t.push(e(r))}return t}function listStuff(e,t,n,r,i){e=e.listingMode(n);return"error"===e?null:("en"===e?r:i)(t)}function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||hasIntl()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var PolyNumberFormatter=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&hasIntl()&&(t={useGrouping:!1},0<n.padTo&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t))}return e.prototype.format=function(e){var t;return this.inf?(t=this.floor?Math.floor(e):e,this.inf.format(t)):padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},e}(),PolyDateFormatter=function(){function e(e,t,n){var r,i,o;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(i=e.offset/60*-1,o=IANAZone.isValidZone(i=0<=i?"Etc/GMT+"+i:"Etc/GMT"+i),0!==e.offset&&o?(r=i,this.dt=e):(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl&&(o=Object.assign({},this.opts),r&&(o.timeZone=r),this.dtf=getCachedDTF(t,o))}var t=e.prototype;return t.format=function(){var e,t;return this.hasIntl?this.dtf.format(this.dt.toJSDate()):(e=formatString(this.opts),t=Locale.create("en-US"),Formatter.create(t).formatDateTimeFromString(this.dt,e))},t.formatToParts=function(){return this.hasIntl&&hasFormatToParts()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),PolyRelFormatter=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Locale=function(){function i(e,t,n,r){var e=parseLocaleString(e),i=e[0],o=e[1],e=e[2];this.locale=i,this.numberingSystem=t||o||null,this.outputCalendar=n||e||null,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}i.fromOpts=function(e){return i.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},i.create=function(e,t,n,r){void 0===r&&(r=!1);e=e||Settings.defaultLocale;return new i(e||(r?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},i.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},i.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return i.create(t,n,e)};var e=i.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=hasIntl()&&hasFormatToParts(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?i.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,months,function(){var t=r?{month:n,day:"numeric"}:{month:n},e=r?"format":"standalone";return i.monthsCache[e][n]||(i.monthsCache[e][n]=mapMonths(function(e){return i.extract(e,t,"month")})),i.monthsCache[e][n]})},e.weekdays=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,weekdays,function(){var t=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=r?"format":"standalone";return i.weekdaysCache[e][n]||(i.weekdaysCache[e][n]=mapWeekdays(function(e){return i.extract(e,t,"weekday")})),i.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return listStuff(this,void 0,e=void 0===e?!0:e,function(){return meridiems},function(){var t;return n.meridiemCache||(t={hour:"numeric",hour12:!0},n.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})),n.meridiemCache})},e.eras=function(e,t){var n=this;return listStuff(this,e,t=void 0===t?!0:t,eras,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){e=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return e?e.value:null},e.numberFormatter=function(e){return new PolyNumberFormatter(this.intl,(e=void 0===e?{}:e).forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return new PolyDateFormatter(e,this.intl,t=void 0===t?{}:t)},e.relFormatter=function(e){return void 0===e&&(e={}),new PolyRelFormatter(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(i,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),i}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+r+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(o){return t.reduce(function(e,t){var n=e[0],r=e[1],e=e[2],t=t(o,e),e=t[0],i=t[1],t=t[2];return[Object.assign(n,e),r||i,t]},[{},null,1]).slice(0,2)}}function parse(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i],s=a[0],a=a[1],s=s.exec(e);if(s)return a(s)}return[null,null]}function simpleParse(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];return function(e,t){for(var n={},r=0;r<i.length;r++)n[i[r]]=parseInteger(e[t+r]);return[n,null,t+r]}}var offsetRegex=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(""+isoTimeBaseRegex.source+offsetRegex.source+"?"),isoTimeExtensionRegex=RegExp("(?:T"+isoTimeRegex.source+")?"),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(isoTimeBaseRegex.source+" ?(?:"+offsetRegex.source+"|("+ianaRegex.source+"))?"),sqlTimeExtensionRegex=RegExp("(?: "+sqlTimeRegex.source+")?");function int(e,t,n){e=e[t];return isUndefined(e)?n:parseInteger(e)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var n=!e[t]&&!e[t+1],e=signedOffset(e[t+1],e[t+2]);return[{},n?null:FixedOffsetZone.instance(e),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}var isoTimeOnly=RegExp("^T?"+isoTimeBaseRegex.source+"$"),isoDuration=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){function t(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e}var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],e=e[8],u="-"===n[0],n=c&&"-"===c[0];return[{years:t(parseInteger(r)),months:t(parseInteger(i)),weeks:t(parseInteger(o)),days:t(parseInteger(a)),hours:t(parseInteger(s)),minutes:t(parseInteger(l)),seconds:t(parseInteger(c),"-0"===c),milliseconds:t(parseMillis(e),n)}]}var obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,r,i,o,a){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(i),minute:parseInteger(o)};return a&&(t.second=parseInteger(a)),e&&(t.weekday=3<e.length?weekdaysLong.indexOf(e)+1:weekdaysShort.indexOf(e)+1),t}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6],s=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,i,r,n,o,a,s),i=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(i)]}function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],n=e[2],r=e[3];return[fromStrings(t,e[4],r,n,e[5],e[6],e[7]),FixedOffsetZone.utcInstance]}function extractASCII(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6];return[fromStrings(t,e[7],n,r,i,o,a),FixedOffsetZone.utcInstance]}var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(e){return parse(e,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[rfc2822,extractRFC2822])}function parseHTTPDate(e){return parse(e,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(e){return parse(e,[isoDuration,extractISODuration])}var extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[isoTimeOnly,extractISOTimeOnly])}var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}var INVALID="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},lowOrderMatrix),daysInYearAccurate=365.2425,daysInMonthAccurate=30.436875,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:24*daysInYearAccurate,minutes:24*daysInYearAccurate*60,seconds:24*daysInYearAccurate*60*60,milliseconds:24*daysInYearAccurate*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:24*daysInYearAccurate/4,minutes:24*daysInYearAccurate*60/4,seconds:24*daysInYearAccurate*60*60/4,milliseconds:24*daysInYearAccurate*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:24*daysInMonthAccurate,minutes:24*daysInMonthAccurate*60,seconds:24*daysInMonthAccurate*60*60,milliseconds:24*daysInMonthAccurate*60*60*1e3}},lowOrderMatrix),orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits.slice(0).reverse();function clone(e,t,n){n={values:(n=void 0===n?!1:n)?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Duration(n)}function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}function convert(e,t,n,r,i){var e=e[i][n],o=t[n]/e,o=!(Math.sign(o)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(o)<=1?antiTrunc(o):Math.trunc(o);r[i]+=o,t[n]-=o*e}function normalizeValues(n,r){reverseUnits.reduce(function(e,t){return isUndefined(r[t])?e:(e&&convert(n,r,e,r,t),t)},null)}var Duration=function(){function h(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?accurateMatrix:casualMatrix,this.isLuxonDuration=!0}h.fromMillis=function(e,t){return h.fromObject(Object.assign({milliseconds:e},t))},h.fromObject=function(e){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new h({values:normalizeObject(e,h.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},h.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(e);return new h({invalid:e})},h.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)},h.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=h.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});t=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Formatter.create(this.loc,t).formatDurationFromString(this,e):INVALID},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},e.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var t=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm",t=(e.suppressSeconds&&0===t.seconds&&0===t.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===t.milliseconds||(n+=".SSS")),t.toFormat(n));return t=e.includePrefix?"T"+t:t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var t=friendlyDuration(e),n={},r=_createForOfIteratorHelperLoose(orderedUnits);!(i=r()).done;){var i=i.value;(hasOwnProperty$1(t.values,i)||hasOwnProperty$1(this.values,i))&&(n[i]=t.get(i)+this.get(i))}return clone(this,{values:n},!0)},e.minus=function(e){if(!this.isValid)return this;e=friendlyDuration(e);return this.plus(e.negate())},e.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=asNumber(e(this.values[i],i))}return clone(this,{values:t},!0)},e.get=function(e){return this[h.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,h.normalizeUnit,[]))}):this},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.conversionAccuracy,t={loc:this.loc.clone({locale:t,numberingSystem:n})};return e&&(t.conversionAccuracy=e),clone(this,t)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return normalizeValues(this.matrix,e),clone(this,{values:e},!0)},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;for(var r,t=t.map(function(e){return h.normalizeUnit(e)}),i={},o={},a=this.toObject(),s=_createForOfIteratorHelperLoose(orderedUnits);!(f=s()).done;){var l=f.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in o)d+=this.matrix[c][l]*o[c],o[c]=0;isNumber(a[l])&&(d+=a[l]);var p,f=Math.trunc(d);for(p in i[l]=f,o[l]=d-f,a)orderedUnits.indexOf(p)>orderedUnits.indexOf(l)&&convert(this.matrix,a,p,i,l)}else isNumber(a[l])&&(o[l]=a[l])}for(r in o)0!==o[r]&&(i[u]+=r===u?o[r]:o[r]/this.matrix[u][r]);return clone(this,{values:i},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return clone(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=_createForOfIteratorHelperLoose(orderedUnits);!(r=n()).done;){var r=r.value;if(t=this.values[r],r=e.values[r],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1}return!0},_createClass(h,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),h}();function friendlyDuration(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError("Unknown duration argument "+e+" of type "+typeof e)}var INVALID$1="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}var Interval=function(){function c(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}c.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(e);return new c({invalid:e})},c.fromDateTimes=function(e,t){var e=friendlyDateTime(e),t=friendlyDateTime(t),n=validateStartEnd(e,t);return null==n?new c({start:e,end:t}):n},c.after=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e,e.plus(t))},c.before=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e.minus(t),e)},c.fromISO=function(e,t){var n,r,i,o=(e||"").split("/",2),a=o[0],s=o[1];if(a&&s){try{l=(n=DateTime.fromISO(a,t)).isValid}catch(s){l=!1}try{i=(r=DateTime.fromISO(s,t)).isValid}catch(s){i=!1}if(l&&i)return c.fromDateTimes(n,r);if(l){o=Duration.fromISO(s,t);if(o.isValid)return c.after(n,o)}else if(i){var l=Duration.fromISO(a,t);if(l.isValid)return c.before(r,l)}}return c.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},c.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=c.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){if(!this.isValid)return NaN;var t=this.start.startOf(e=void 0===e?"milliseconds":e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},e.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function(e){var e=void 0===e?{}:e,t=e.start,e=e.end;return this.isValid?c.fromDateTimes(t||this.s,e||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),o=[],a=this.s,s=0;a<this.e;){var l=i[s]||this.e,l=+l>+this.e?this.e:l;o.push(c.fromDateTimes(a,l)),a=l,s+=1}return o},e.splitBy=function(e){var t=friendlyDuration(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n=this.s,r=1,i=[];n<this.e;){var o=this.start.plus(t.mapUnits(function(e){return e*r})),o=+o>+this.e?this.e:o;i.push(c.fromDateTimes(n,o)),n=o,r+=1}return i},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},e.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function(e){if(!this.isValid)return this;var t=(this.s>e.s?this:e).s,e=(this.e<e.e?this:e).e;return e<=t?null:c.fromDateTimes(t,e)},e.union=function(e){if(!this.isValid)return this;var t=(this.s<e.s?this:e).s,e=(this.e>e.e?this:e).e;return c.fromDateTimes(t,e)},c.merge=function(e){var e=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],e=e[1];return e?e.overlaps(t)||e.abutsStart(t)?[n,e.union(t)]:[n.concat([e]),t]:[n,t]},[[],null]),t=e[0],e=e[1];return e&&t.push(e),t},c.xor=function(e){for(var t,n=null,r=0,i=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),o=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(a=o()).done;)var a=a.value,n=1===(r+="s"===a.type?1:-1)?a.time:(n&&+n!=+a.time&&i.push(c.fromDateTimes(n,a.time)),null);return c.merge(i)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return c.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":INVALID$1},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):INVALID$1},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():INVALID$1},e.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):INVALID$1},e.toFormat=function(e,t){t=(void 0===t?{}:t).separator,t=void 0===t?" – ":t;return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):INVALID$1},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)},e.mapEndpoints=function(e){return c.fromDateTimes(e(this.s),e(this.e))},_createClass(c,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),c}(),Info=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Settings.defaultZone);var t=DateTime.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return IANAZone.isValidSpecifier(e)&&IANAZone.isValidZone(e)},e.normalizeZone=function(e){return normalizeZone(e,Settings.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e,!0)},e.meridiems=function(e){e=(void 0===e?{}:e).locale;return Locale.create(void 0===e?null:e).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");t=(void 0===t?{}:t).locale;return Locale.create(void 0===t?null:t,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(hasIntl()){e=!0,t=hasFormatToParts(),r=hasRelative();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function dayDiff(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}t=n(t)-n(e);return Math.floor(Duration.fromMillis(t).as("days"))}function highOrderDiffs(e,t,n){for(var r={},i=0,o=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){e=dayDiff(e,t);return(e-e%7)/7}],["days",dayDiff]];i<o.length;i++){var a,s,l,c=o[i],u=c[0],c=c[1];0<=n.indexOf(u)&&(a=u,c=c(e,t),t<(l=e.plus(((s={})[u]=c,s)))?(e=e.plus(((s={})[u]=c-1,s)),--c):e=l,r[u]=c)}return[e,r,l,a]}function _diff(e,t,n,r){var e=highOrderDiffs(e,t,n),i=e[0],o=e[1],a=e[2],e=e[3],s=t-i,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(a=a<t?i.plus(((t={})[e]=1,t)):a)!==i&&(o[e]=(o[e]||0)+s/(a-i)),Duration.fromObject(Object.assign(o,r)));return 0<n.length?(e=Duration.fromMillis(s,r)).shiftTo.apply(e,n).plus(t):t}var numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(numberingSystems.hanidec))t+=hanidecChars.indexOf(e[n]);else for(var i in numberingSystemsUTF16){var i=numberingSystemsUTF16[i],o=i[0],i=i[1];o<=r&&r<=i&&(t+=r-o)}}return parseInt(t,10)}return t}function digitRegex(e,t){e=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+numberingSystems[e||"latn"]+t)}var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){e=e[0];return t(parseDigits(e))}}}var NBSP=String.fromCharCode(160),spaceOrNBSP="( |"+NBSP+")",spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(n,r){return null===n?null:{regex:RegExp(n.map(fixListRegex).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return stripInsensitivities(t)===stripInsensitivities(e)})+r}}}function offset(e,t){return{regex:e,deser:function(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(t,n){function r(e){return{regex:RegExp(escapeToken(e.val)),deser:function(e){return e[0]},literal:!0}}var i=digitRegex(n),o=digitRegex(n,"{2}"),a=digitRegex(n,"{3}"),s=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),p=digitRegex(n,"{1,9}"),f=digitRegex(n,"{2,4}"),h=digitRegex(n,"{4,6}"),e=function(e){if(t.literal)return r(e);switch(e.val){case"G":return oneOf(n.eras("short",!1),0);case"GG":return oneOf(n.eras("long",!1),0);case"y":return intUnit(d);case"yy":return intUnit(f,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(h);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(o);case"MMM":return oneOf(n.months("short",!0,!1),1);case"MMMM":return oneOf(n.months("long",!0,!1),1);case"L":return intUnit(c);case"LL":return intUnit(o);case"LLL":return oneOf(n.months("short",!1,!1),1);case"LLLL":return oneOf(n.months("long",!1,!1),1);case"d":return intUnit(c);case"dd":return intUnit(o);case"o":return intUnit(u);case"ooo":return intUnit(a);case"HH":return intUnit(o);case"H":return intUnit(c);case"hh":return intUnit(o);case"h":return intUnit(c);case"mm":return intUnit(o);case"m":case"q":return intUnit(c);case"qq":return intUnit(o);case"s":return intUnit(c);case"ss":return intUnit(o);case"S":return intUnit(u);case"SSS":return intUnit(a);case"u":return simple(p);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(f,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(o);case"E":case"c":return intUnit(i);case"EEE":return oneOf(n.weekdays("short",!1,!1),1);case"EEEE":return oneOf(n.weekdays("long",!1,!1),1);case"ccc":return oneOf(n.weekdays("short",!0,!1),1);case"cccc":return oneOf(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+c.source+")(?::("+o.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+o.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return r(e)}}(t)||{invalidReason:MISSING_FTP};return e.token=t,e}var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(e,t,n){var r=e.type,e=e.value;if("literal"===r)return{literal:!0,val:e};e=n[r],n=partTypeStyleToTokenVal[r];return(n="object"==typeof n?n[e]:n)?{literal:!1,val:n}:void 0}function buildRegex(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}function match$1(e,t,n){var r=e.match(t);if(r){var i,o,a,s={},l=1;for(i in n)hasOwnProperty$1(n,i)&&(a=(o=n[i]).groups?o.groups+1:1,!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(l,l+a))),l+=a);return[r,s]}return[r,{}]}function dateTimeFromMatches(r){var e=isUndefined(r.Z)?isUndefined(r.z)?null:IANAZone.create(r.z):new FixedOffsetZone(r.Z);return isUndefined(r.q)||(r.M=3*(r.q-1)+1),isUndefined(r.h)||(r.h<12&&1===r.a?r.h+=12:12===r.h&&0===r.a&&(r.h=0)),0===r.G&&r.y&&(r.y=-r.y),isUndefined(r.u)||(r.S=parseMillis(r.u)),[Object.keys(r).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=r[t]),e},{}),e]}var dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache=dummyDateTimeCache||DateTime.fromMillis(1555555555555)}function maybeExpandMacroToken(e,t){if(e.literal)return e;var n=Formatter.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Formatter.create(t,n).formatDateTimeParts(getDummyDateTime()).map(function(e){return tokenForPart(e,t,n)});return r.includes(void 0)?e:r}function expandMacroTokens(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return maybeExpandMacroToken(e,t)}))}function explainFromTokens(t,e,n){var n=expandMacroTokens(Formatter.parseFormat(n),t),r=n.map(function(e){return unitForToken(e,t)}),i=r.find(function(e){return e.invalidReason});if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};var i=buildRegex(r),r=i[0],i=i[1],r=RegExp(r,"i"),i=match$1(e,r,i),o=i[0],i=i[1],a=i?dateTimeFromMatches(i):[null,null],s=a[0],a=a[1];if(hasOwnProperty$1(i,"a")&&hasOwnProperty$1(i,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:r,rawMatches:o,matches:i,result:s,zone:a}}function parseFromTokens(e,t,n){e=explainFromTokens(e,t,n);return[e.result,e.zone,e.invalidReason]}var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,n){e=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===e?7:e}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?leapLadder:nonLeapLadder)[t-1]}function uncomputeOrdinal(e,t){var e=isLeapYear(e)?leapLadder:nonLeapLadder,n=e.findIndex(function(e){return e<t});return{month:n+1,day:t-e[n]}}function gregorianToWeek(e){var t,n=e.year,r=e.month,i=e.day,o=computeOrdinal(n,r,i),r=dayOfWeek(n,r,i),i=Math.floor((o-r+10)/7);return i<1?i=weeksInWeekYear(t=n-1):i>weeksInWeekYear(n)?(t=n+1,i=1):t=n,Object.assign({weekYear:t,weekNumber:i,weekday:r},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,o=dayOfWeek(n,1,4),a=daysInYear(n),r=7*r+i-o-3,i=(r<1?r+=daysInYear(t=n-1):a<r?(t=n+1,r-=daysInYear(n)):t=n,uncomputeOrdinal(t,r)),o=i.month,a=i.day;return Object.assign({year:t,month:o,day:a},timeObject(e))}function gregorianToOrdinal(e){var t=e.year,n=computeOrdinal(t,e.month,e.day);return Object.assign({year:t,ordinal:n},timeObject(e))}function ordinalToGregorian(e){var t=e.year,n=uncomputeOrdinal(t,e.ordinal),r=n.month,n=n.day;return Object.assign({year:t,month:r,day:n},timeObject(e))}function hasInvalidWeekData(e){var t=isInteger(e.weekYear),n=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),r=integerBetween(e.weekday,1,7);return t?n?!r&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}function hasInvalidOrdinalData(e){var t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}function hasInvalidGregorianData(e){var t=isInteger(e.year),n=integerBetween(e.month,1,12),r=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!r&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,n=e.minute,r=e.second,e=e.millisecond,i=integerBetween(t,0,23)||24===t&&0===n&&0===r&&0===e,o=integerBetween(n,0,59),a=integerBetween(r,0,59),s=integerBetween(e,0,999);return i?o?a?!s&&unitOutOfRange("millisecond",e):unitOutOfRange("second",r):unitOutOfRange("minute",n):unitOutOfRange("hour",t)}var INVALID$2="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone$1(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime(Object.assign({},e,t,{old:e}))}function fixOffset(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];n=n.offset(r-=60*(i-t)*1e3);return i===n?[r,i]:[e-60*Math.min(i,n)*1e3,Math.max(i,n)]}function tsToObj(e,t){e+=60*t*1e3;t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,daysInMonth(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),i=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),t=fixOffset(objToLocalTS(r),n,e.zone),r=t[0],n=t[1];return 0!==i&&(n=e.zone.offset(r+=i)),{ts:r,o:n}}function parseDataToDateTime(e,t,n,r,i){var o=n.setZone,a=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||a,setZone:void 0})),o?e:e.setZone(a)):DateTime.invalid(new Invalid("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function toTechFormat(e,t,n){return void 0===n&&(n=!0),e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toTechTimeFormat(e,t){var n=t.suppressSeconds,r=t.suppressMilliseconds,i=t.includeOffset,o=t.includePrefix,o=void 0!==o&&o,a=t.includeZone,a=void 0!==a&&a,s=t.spaceZone,t=t.format,t=void 0===t?"extended":t,l="basic"===t?"HHmm":"HH:mm",n=(void 0!==n&&n&&0===e.second&&0===e.millisecond||(l+="basic"===t?"ss":":ss",void 0!==r&&r&&0===e.millisecond||(l+=".SSS")),(a||i)&&(void 0!==s&&s)&&(l+=" "),a?l+="z":i&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=o?"T"+n:n}var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)}function quickDT(e,t){for(var n=_createForOfIteratorHelperLoose(orderedUnits$1);!(r=n()).done;){var r=r.value;isUndefined(e[r])&&(e[r]=defaultUnitValues[r])}var i=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(i)return DateTime.invalid(i);var i=Settings.now(),i=objToTS(e,t.offset(i),t),o=i[0],i=i[1];return new DateTime({ts:o,zone:t,o:i})}function diffRelative(t,n,r){function e(e,t){return e=roundTo(e,o||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)}function i(e){return r.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)}var o=!!isUndefined(r.round)||r.round;if(r.unit)return e(i(r.unit),r.unit);for(var a=_createForOfIteratorHelperLoose(r.units);!(s=a()).done;){var s=s.value,l=i(s);if(1<=Math.abs(l))return e(l,s)}return e(n<t?-0:0,r.units[r.units.length-1])}var DateTime=function(){function g(e){var t,n=e.zone||Settings.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(n.isValid?null:unsupportedZone(n)),i=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),o=null;r||(o=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(i=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),i=tsToObj(this.ts,t),i=(r=Number.isNaN(i.year)?new Invalid("invalid input"):null)?null:i,r?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}g.now=function(){return new g({})},g.local=function(e,t,n,r,i,o,a){return isUndefined(e)?g.now():quickDT({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},Settings.defaultZone)},g.utc=function(e,t,n,r,i,o,a){return isUndefined(e)?new g({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},FixedOffsetZone.utcInstance)},g.fromJSDate=function(e,t){void 0===t&&(t={});e=isDate(e)?e.valueOf():NaN;if(Number.isNaN(e))return g.invalid("invalid input");var n=normalizeZone(t.zone,Settings.defaultZone);return n.isValid?new g({ts:e,zone:n,loc:Locale.fromObject(t)}):g.invalid(unsupportedZone(n))},g.fromMillis=function(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-MAX_DATE||MAX_DATE<e?g.invalid("Timestamp out of range"):new g({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},g.fromSeconds=function(e,t){if(void 0===t&&(t={}),isNumber(e))return new g({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")},g.fromObject=function(e){var t=normalizeZone(e.zone,Settings.defaultZone);if(!t.isValid)return g.invalid(unsupportedZone(t));var n=Settings.now(),r=t.offset(n),i=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),o=!isUndefined(i.ordinal),a=!isUndefined(i.year),s=!isUndefined(i.month)||!isUndefined(i.day),a=a||s,l=i.weekYear||i.weekNumber,c=Locale.fromObject(e);if((a||o)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&o)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,s=l||i.weekday&&!a,d=tsToObj(n,r),p=(s?(m=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):o?(m=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(m=orderedUnits$1,u=defaultUnitValues),!1),f=_createForOfIteratorHelperLoose(m);!(h=f()).done;){var h=h.value;isUndefined(i[h])?i[h]=(p?u:d)[h]:p=!0}l=(s?hasInvalidWeekData:o?hasInvalidOrdinalData:hasInvalidGregorianData)(i)||hasInvalidTimeData(i);if(l)return g.invalid(l);var n=objToTS(s?weekToGregorian(i):o?ordinalToGregorian(i):i,r,t),m=new g({ts:n[0],zone:t,o:n[1],loc:c});return i.weekday&&a&&e.weekday!==m.weekday?g.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+m.toISO()):m},g.fromISO=function(e,t){void 0===t&&(t={});var n=parseISODate(e);return parseDataToDateTime(n[0],n[1],t,"ISO 8601",e)},g.fromRFC2822=function(e,t){void 0===t&&(t={});var n=parseRFC2822Date(e);return parseDataToDateTime(n[0],n[1],t,"RFC 2822",e)},g.fromHTTP=function(e,t){void 0===t&&(t={});e=parseHTTPDate(e);return parseDataToDateTime(e[0],e[1],t,"HTTP",t)},g.fromFormat=function(e,t,n){if(void 0===n&&(n={}),isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");var r=n,i=r.locale,r=r.numberingSystem,i=parseFromTokens(Locale.fromOpts({locale:void 0===i?null:i,numberingSystem:void 0===r?null:r,defaultToEN:!0}),e,t),r=i[0],o=i[1],i=i[2];return i?g.invalid(i):parseDataToDateTime(r,o,n,"format "+t,e)},g.fromString=function(e,t,n){return g.fromFormat(e,t,n=void 0===n?{}:n)},g.fromSQL=function(e,t){void 0===t&&(t={});var n=parseSQL(e);return parseDataToDateTime(n[0],n[1],t,"SQL",e)},g.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(e);return new g({invalid:e})},g.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=g.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){e=Formatter.create(this.loc.clone(e=void 0===e?{}:e),e).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(e,t){return void 0===t&&(t={}),this.setZone(FixedOffsetZone.instance(e=void 0===e?0:e),t)},e.toLocal=function(){return this.setZone(Settings.defaultZone)},e.setZone=function(e,t){var n,t=void 0===t?{}:t,r=t.keepLocalTime,r=void 0!==r&&r,t=t.keepCalendarTime,t=void 0!==t&&t;return(e=normalizeZone(e,Settings.defaultZone)).equals(this.zone)?this:e.isValid?(n=this.ts,(r||t)&&(r=e.offset(this.ts),n=objToTS(this.toObject(),r,e)[0]),clone$1(this,{ts:n,zone:e})):g.invalid(unsupportedZone(e))},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar,t=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:e});return clone$1(this,{loc:t})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,e=normalizeObject(e,normalizeUnit,[]),n=!isUndefined(e.weekYear)||!isUndefined(e.weekNumber)||!isUndefined(e.weekday),r=!isUndefined(e.ordinal),i=!isUndefined(e.year),o=!isUndefined(e.month)||!isUndefined(e.day),a=e.weekYear||e.weekNumber;if((i||o||r)&&a)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&r)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");n?t=weekToGregorian(Object.assign(gregorianToWeek(this.c),e)):isUndefined(e.ordinal)?(t=Object.assign(this.toObject(),e),isUndefined(e.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),e));i=objToTS(t,this.o,this.zone);return clone$1(this,{ts:i[0],o:i[1]})},e.plus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e))):this},e.minus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},e=Duration.normalizeUnit(e);switch(e){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===e&&(t.weekday=1),"quarters"===e&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):INVALID$2},e.toLocaleString=function(e){return void 0===e&&(e=DATE_SHORT),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTime(this):INVALID$2},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},e.toISODate=function(e){e=(void 0===e?{}:e).format,e="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return toTechFormat(this,e=9999<this.year?"+"+e:e)},e.toISOWeekDate=function(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var e=void 0===e?{}:e,t=e.suppressMilliseconds,n=e.suppressSeconds,r=e.includeOffset,i=e.includePrefix,e=e.format;return toTechTimeFormat(this,{suppressSeconds:void 0!==n&&n,suppressMilliseconds:void 0!==t&&t,includeOffset:void 0===r||r,includePrefix:void 0!==i&&i,format:void 0===e?"extended":e})},e.toRFC2822=function(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return toTechFormat(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var e=void 0===e?{}:e,t=e.includeOffset,e=e.includeZone;return toTechTimeFormat(this,{includeOffset:void 0===t||t,includeZone:void 0!==e&&e,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():INVALID$2},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Duration.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var n=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),t=maybeArray(t).map(Duration.normalizeUnit),r=e.valueOf()>this.valueOf(),e=_diff(r?this:e,r?e:this,t,n);return r?e.negate():e},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(g.now(),e,t)},e.until=function(e){return this.isValid?Interval.fromDateTimes(this,e):this},e.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),e=this.setZone(e.zone,{keepLocalTime:!0});return e.startOf(t)<=n&&n<=e.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){if(!this.isValid)return null;var t=(e=void 0===e?{}:e).base||g.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:r,unit:i}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||g.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},g.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.min);throw new InvalidArgumentError("min requires all arguments be DateTimes")},g.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.max);throw new InvalidArgumentError("max requires all arguments be DateTimes")},g.fromFormatExplain=function(e,t,n){var n=n=void 0===n?{}:n,r=n.locale,n=n.numberingSystem;return explainFromTokens(Locale.fromOpts({locale:void 0===r?null:r,numberingSystem:void 0===n?null:n,defaultToEN:!0}),e,t)},g.fromStringExplain=function(e,t,n){return g.fromFormatExplain(e,t,n=void 0===n?{}:n)},_createClass(g,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return DATE_SHORT}},{key:"DATE_MED",get:function(){return DATE_MED}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return DATE_MED_WITH_WEEKDAY}},{key:"DATE_FULL",get:function(){return DATE_FULL}},{key:"DATE_HUGE",get:function(){return DATE_HUGE}},{key:"TIME_SIMPLE",get:function(){return TIME_SIMPLE}},{key:"TIME_WITH_SECONDS",get:function(){return TIME_WITH_SECONDS}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return TIME_WITH_SHORT_OFFSET}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return TIME_WITH_LONG_OFFSET}},{key:"TIME_24_SIMPLE",get:function(){return TIME_24_SIMPLE}},{key:"TIME_24_WITH_SECONDS",get:function(){return TIME_24_WITH_SECONDS}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return TIME_24_WITH_SHORT_OFFSET}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return TIME_24_WITH_LONG_OFFSET}},{key:"DATETIME_SHORT",get:function(){return DATETIME_SHORT}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return DATETIME_SHORT_WITH_SECONDS}},{key:"DATETIME_MED",get:function(){return DATETIME_MED}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return DATETIME_MED_WITH_SECONDS}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return DATETIME_MED_WITH_WEEKDAY}},{key:"DATETIME_FULL",get:function(){return DATETIME_FULL}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return DATETIME_FULL_WITH_SECONDS}},{key:"DATETIME_HUGE",get:function(){return DATETIME_HUGE}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return DATETIME_HUGE_WITH_SECONDS}}]),g}();function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError("Unknown datetime argument: "+e+", of type "+typeof e)}var VERSION="1.28.0",DateTime_1=luxon.DateTime=DateTime;luxon.Duration=Duration,luxon.FixedOffsetZone=FixedOffsetZone,luxon.IANAZone=IANAZone,luxon.Info=Info,luxon.Interval=Interval,luxon.InvalidZone=InvalidZone,luxon.LocalZone=LocalZone,luxon.Settings=Settings,luxon.VERSION=VERSION,luxon.Zone=Zone;const useStyles$d=makeStyles()(()=>({root:{padding:"15px 30px"},title:{display:"flex"},action:{fontWeight:600},time:{fontSize:"12px",paddingLeft:"15px",lineHeight:"21px"},description:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},divider:{margin:"0 30px",backgroundColor:"#D5DFE9",height:"0.5px"}})),ActivityCard=({longFormatTime:e=!1,data:{createdDateTime:t,event:n,description:r}})=>{var i=useStyles$d()["classes"];return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.root,"data-testid":"activity-card"},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.title},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.action},{children:n})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.time},{children:e?DateTime_1.fromISO(t||"").toFormat("F"):DateTime_1.fromISO(t||"").toFormat("tt")}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({placement:"top-start",title:r||""},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.description},{children:r}))}))})]})),jsxRuntime.exports.jsx(Divider$1,{className:i.divider})]})},useStyles$c=makeStyles()(e=>({root:{width:"100%",height:"100%"},header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(4,6),position:"relative"},title:{opacity:.9,padding:e.spacing(4,6,2,6)},titleText:{textTransform:"uppercase",color:e.palette.secondary.main},scrollContent:{overflowY:"auto",height:"calc(100% - 65px)"}})),filters$2=[{value:"all",title:"All Activities"},{value:"today",title:"Activities today"}],today$1=DateTime_1.local().startOf("day"),yesterday=DateTime_1.local().plus({days:-1}).startOf("day"),ActivityPanel=({data:e,filter:t,onChangeFilter:n})=>{var r=useStyles$c()["classes"];const i=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(today$1,"day")),o=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(yesterday,"day")),a=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").startOf("day")<yesterday);return jsxRuntime.exports.jsxs("div",Object.assign({className:r.root},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Today"})),jsxRuntime.exports.jsx(Filter,{data:filters$2,filter:t,onFilter:e=>{n(null==(e=null==e?void 0:e.target)?void 0:e.value)}})]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.scrollContent},{children:[jsxRuntime.exports.jsx(Box$1,{children:null===i||void 0===i?void 0:i.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))}),"all"===t&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[0<(null===o||void 0===o?void 0:o.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title,"data-testid":"filter-all-box"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Yesterday"}))})),jsxRuntime.exports.jsx(Box$1,{children:o.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))})]}),0<(null===a||void 0===a?void 0:a.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Older"}))})),jsxRuntime.exports.jsx(Box$1,{children:a.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!0,data:e},t))})]})]})]}))]}))},useStyles$b=makeStyles()((e,{appListV2:t,type:n},r)=>({listItem:{display:"flex",cursor:"pointer",alignItems:"center",height:t?"unset":70,width:"100%",padding:t?0:e.spacing(0,6),"&:hover":{backgroundColor:"#EEF3F9"},["& ."+r.appName]:{marginLeft:e.spacing(3)}},iconButton:{borderRadius:4,textAlign:"center",width:"94px",height:"110px",cursor:"pointer",["& ."+r.appName]:{marginBottom:e.spacing(3)}},appName:{textAlign:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",textTransform:"capitalize",width:"switcherGrid"===n?"80%":"unset",margin:"switcherGrid"===n?"auto":"unset"},image:{display:"flex",justifyContent:"center",alignItems:"center",margin:t?"10px":e.spacing(3.8,0)},bounding:{padding:"17px 27px 19px 27px"},img:{width:40,height:40},switcherGrid:{borderRadius:4,textAlign:"center",padding:"20px 0 20px 0",cursor:"pointer","&:hover":{backgroundColor:"#EEF3F9"}}})),iconMapper={CMS:img$V,Discovery:img$U,Collection:img$T,Library:img$S,Admin:img$1s,Developer:img$R};function AppIcon({id:e,icon:t,type:n,iconUrl:r,appName:i,onClick:o,appListV2:a=!1}){a=useStyles$b({appListV2:a,type:n}).classes;const[s,l]=react.exports.useState(t||r||i&&iconMapper[i]||img$R);return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:i||"",PopperProps:{disablePortal:!0}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:function(){o&&o(e)},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"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.image},{children:jsxRuntime.exports.jsx("img",{alt:"app-icon",onError:function(){l(img$R)},src:s,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}))]}))}))}const useStyles$a=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$a({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(()=>{if(0<r.length){const t=[...r];var e=t.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)})}))}))]}))}const useStyles$9=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"}}));function ApplicationPanel$1({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:i}){useStyles$9(),useSelector(preferredLanguageSelector);const[o,a]=react.exports.useState(0===n.length?0:n.length<4?1:2),[s,l]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;a(e)},[n]),react.exports.useState(e));function c(e){l(e),null!=t&&t(e),null!=i&&i(e)}return react.exports.useEffect(()=>{e!==s&&l(e)},[e,s]),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(AppList,{useGrid:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.name.recentApps",defaultMessage:"Recent Applications",description:"Header title of recent apps"}),type:"Recent",applications:n,onSelectApplication:c,selectedAppId:null})}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(AppList,{useGrid:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.name.moreApps",defaultMessage:"More Applications",description:"Header title of more apps"}),type:"More",applications:r,onSelectApplication:c,selectedAppId:null,row:o})})]})}const useStyles$8=makeStyles()((e,{sortOrder:t,hasApps:n,menuIsOpen:r})=>({root:{},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-MuiOutlinedInput-root":{borderRadius:"1em",height:"30px"},"& .Sdk-MuiButtonBase-root":{padding:0},"& svg":{width:"14px"},"& input":{"&::placeholder":{color:"#5C6269 !important",fontWeight:600,opacity:1}},"& .Sdk-MuiOutlinedInput-notchedOutline":{borderColor:"#D5DFE9"}},searchInput:{fontSize:"11px","&::placeholder":{color:"#5C6269 !important"}},sortMenu:{width:"143px"}})),SHARED_TEXT={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 AppListV2({intl:e,selectedAppId:t,onSelectApplication:n,applications:i=[]}){const[r,o]=react.exports.useState(t),[a,s]=react.exports.useState({}),[l,c]=react.exports.useState(""),[u,d]=react.exports.useState("asc");var p=0!==i.length;function f(e){o(e),n(e)}function h(e,t){return e.name>t.name?1:e.name<t.name?-1:0}react.exports.useEffect(()=>{if(0<i.length){const t=[...i];const n={};for(const r of t.sort(h)){var e=r.name.charAt(0).toUpperCase();n[e]?n[e]=[...n[e],r]:n[e]=[r]}s(n)}},[i]),react.exports.useEffect(()=>{t!==r&&o(t)},[t,r]);e=translatableTextProps(e).searchLabel;const[m,g]=react.exports.useState(null);var y=Boolean(m);const v=e=>{if(e!==u){d(e);const t=Object.keys(a).reverse(),n={};t.forEach(e=>n[e]=a[e].reverse()),s(n)}g(null)},x=useStyles$8({sortOrder:u,hasApps:p,menuIsOpen:y})["classes"];p=jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"app-switcher.sort-menu",anchorEl:m,open:y,onClose:v},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>v("asc"),className:x.sortMenu},{children:"A - Z"})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>v("desc"),className:x.sortMenu},{children:"Z - A"}))]}));return jsxRuntime.exports.jsxs("div",Object.assign({className:x.root,"data-testid":"os-app-bar-panel.app-switcher.applications-container"},{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:x.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:x.searchBox},{children:jsxRuntime.exports.jsx(TextField$1,{"data-testid":"os-app-bar-panel.app-switcher.search",onChange:e=>{c(e.target.value)},placeholder:e,InputProps:{classes:{input:x.searchInput},startAdornment:jsxRuntime.exports.jsx(InputAdornment$1,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(IconButton$1,{children:jsxRuntime.exports.jsx(default_1$4,{})})}))}})})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:2,className:x.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:x.filterIconWrapper},{children:jsxRuntime.exports.jsx(SortArrow,{onClick:e=>{i.length&&g(e.currentTarget)},className:x.filterIcon,"data-testid":"os-app-bar-panel.app-switcher.sort"})}))})),p]}))]})),jsxRuntime.exports.jsx("div",{children:0===i.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("div",Object.assign({className:x.groupContainer},{children:0<Object.keys(a).length&&Object.entries(a).map(([e,t])=>t.filter(e=>e.name.toLowerCase().includes(l.toLowerCase())).length?jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("div",Object.assign({className:x.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(l.toLowerCase())).map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"os-app-bar-panel.app-switcher.app-row"},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===r,onClick:f,iconUrl:t,id:e,appName:n,appListV2:!0})}),jsxRuntime.exports.jsx(Divider$1,{})]}),e)})]},e):null)}))})]}))}var AppListV2$1=injectIntl(AppListV2);const useStyles$7=makeStyles()(e=>({root:{height:"calc(100vh - 64px - 55px - 5px)",overflowY:"scroll",borderRight:"15px solid #F9F9F9",boxShadow:"0px 1px 1px #809cb7"},appTile:{overflow:"hidden"},title:{fontWeight:900,padding:"15px"},helperText:{paddingLeft:"15px",fontSize:"12px",fontWeight:"bold"},noApps:{textAlign:"center",marginTop:"30px","& svg":{width:"160px",height:"160px",marginBottom:"20px"}}})),RecentApps=({apps:e=[],onSelectApplication:t,selectedAppId:n})=>{const i=useStyles$7()["classes"],[o,r]=react.exports.useState(n);function a(e){r(e),t(e)}return jsxRuntime.exports.jsxs("div",Object.assign({className:i.root,"data-testid":"app-switcher.recent-apps.container"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.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:i.appTile,sx:{padding:0},"data-testid":"app-switcher.recent-apps.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:t===o,onClick:a,iconUrl:n,id:t,appName:r,appListV2:!0})}),e.id)})})):jsxRuntime.exports.jsxs("div",Object.assign({className:i.noApps},{children:[jsxRuntime.exports.jsx(NoApps,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.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"})}))]}))]}))};function ApplicationPanel({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:i}){var o=useStyles$9()["classes"],a=useSelector(preferredLanguageSelector);const s=AIWareFormatMessage(a),[l,c]=react.exports.useState(0===n.length?0:n.length<4?1:2),[u,d]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;c(e)},[n]),react.exports.useState(e));function p(e){d(e),null!=t&&t(e),null!=i&&i(e)}return react.exports.useEffect(()=>{e!==u&&d(e)},[e,u]),jsxRuntime.exports.jsx("div",Object.assign({className:o.fullHeight},{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,className:o.fullHeight},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:o.fullHeight},{children:jsxRuntime.exports.jsx(RecentApps,{apps:n,onSelectApplication:p,selectedAppId:null})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:o.fullHeight},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.listContainer},{children:jsxRuntime.exports.jsx(AppListV2$1,{title:s({id:"os-app-bar-panel.name.moreApps",defaultMessage:[{type:0,value:"More Applications"}]}),type:"More",applications:r,onSelectApplication:p,selectedAppId:null,row:l})}))}))]}))}))}const useStyles$6=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$6()["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$5=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$5()["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=[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$6()["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$1})}))]}))}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$6()["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$4=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$4()["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$16,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$3$1=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$3$1()["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.nullState()})),jsxRuntime.exports.jsx(Box$1,{mb:9})]}))},ErrorState=({onRetry:e})=>{var t=useStyles$3$1()["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.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.retry()}))]}))};var LoadingStatus,useStyles$2$2=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$2$2()["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.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$3,{className:r.linkIcon}),SHARED_TEXT.buttonLink()]}))})};function OpenIdConnectors({openIdItems:o,onOpenUnlinkModal:a,onClickOpenIdUrl:s,isOpenIdConnected:l}){const c=useStyles$2$2()["classes"];return jsxRuntime.exports.jsx(List$2,{children:o.map((e,t)=>{const{name:n,loginButtonStyle:r}=e;var i=null==r?void 0:r.btnLogo;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:c.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:c.listAvatar},{children:jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:c.openIdLogo,src:i},{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:c.accountLinkingLabel},{children:25<n.length?n.substring(0,25)+"...":n}))}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:c.secondaryAction},{children:jsxRuntime.exports.jsx(OpenIdConnectorButton,{isConnected:l(e.connectId),onLink:()=>s(e),onUnlink:()=>a(e)})}))]})),t!==o.length-1&&jsxRuntime.exports.jsx(Divider$1,{})]})})})}const LoaderSkeletonItem=()=>{var e=useStyles$2$2()["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,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{})]}),namespace$2=(!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{}),"openId"),selectOpenIdConnectors=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.openIdConnectors},selectConnectedOpenIds=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.connectedOpenIds},selectLoadingStatus=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.status},GET_OPEN_ID_CONNECTORS=`aiware/${namespace$2}/get open id connectors`,GET_OPEN_ID_SUCCESS=`aiware/${namespace$2}/get open id connectors success`,GET_CONNECTED_OPEN_ID_SUCCESS=`aiware/${namespace$2}/get connected open id connectors success`,GET_OPEN_ID_ERROR=`aiware/${namespace$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)||"",p=useSelector(selectOpenIdConnectors)||[],f=useSelector(selectConnectedOpenIds)||[];var h=useStyles$2$2()["classes"];react.exports.useEffect(()=>{e(getOpenIdConnectors())},[e]);const m=e=>{l(e),n(!0)};var g=()=>{n(!1)},y=()=>{i(!1)};const v=()=>{e(getOpenIdConnectors())},x=(useInterval(()=>{e(getOpenIdConnectors())},o),e=>{l(e);e=window.open(e.loginUrl);u(e),a(2e3)}),C=react.exports.useCallback(t=>f.some(e=>e.connectId===t),[f]);react.exports.useEffect(()=>{""!==s.connectId&&null!==o&&C(s.connectId)&&(a(null),null!==c&&void 0!==c&&c.close(),i(!0))},[C,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.accountLinkingLabel()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT.accountLinkingDescription()})),d===LoadingStatus.Pending?jsxRuntime.exports.jsx(LoaderSkeleton,{}):d===LoadingStatus.Failed?jsxRuntime.exports.jsx(ErrorState,{onRetry:v}):0===p.length?jsxRuntime.exports.jsx(NullState,{}):jsxRuntime.exports.jsx(OpenIdConnectors,{openIdItems:p,onOpenUnlinkModal:m,onClickOpenIdUrl:x,isOpenIdConnected:C}),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.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.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.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.unlinkDialogConfirm()}))]}))]})),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:r,maxWidth:"xs",onClose:y,"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.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.successDialogContent(s.name)}))})),jsxRuntime.exports.jsx(DialogActions$1,Object.assign({className:h.dialogAction},{children:jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:y,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-success-dialog-confirm-btn"},{children:SHARED_TEXT.successDialogConfirm()}))}))]}))]})};var useStyles$1$2=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$e=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$e()["classes"];react.exports.useEffect(()=>{r(e)},[e]);const o=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.settingsHeader()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT.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?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.basicInfoTabLabel(),disabled:!1,id:"Basic Info"},{label:SHARED_TEXT.accountLinkingTabLabel(),disabled:!1,id:"Account Linking"},{label:SHARED_TEXT.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$1$2()["classes"];const p=useDispatch();var f=useSelector(hidePasswordResetSelector)||!1,h=useSelector(preferredLanguageSelector)||"en";const[m,g]=react.exports.useState({firstName:"",lastName:"",phoneNumber:"",email:""}),[y,v]=react.exports.useState({firstName:"",lastName:"",phoneNumber:""}),[x,C]=react.exports.useState(!1),[b,$]=react.exports.useState(null),[w,S]=react.exports.useState(!1),[_,T]=react.exports.useState(!1),[E,j]=react.exports.useState(0);var I=useSelector(userAuthStatusSelector);const R=AIWareFormatMessage(h);react.exports.useEffect(()=>{e&&O(e)},[e]);const O=e=>{const{firstName:t,lastName:n,imageUrl:r,userSettings:i}=e;e=null===i||void 0===i?void 0:i.find(e=>"phoneNumber"===e.key);g({firstName:t||"",lastName:n||"",phoneNumber:(null==e?void 0:e.value)||"",email:""}),r&&$(r)};var L=react.exports.useCallback(()=>{null!=e&&e.email&&(S(!1),n(null==e?void 0:e.email))},[e,n]);var M=n=>e=>{const t=e.target.value;g(e=>Object.assign(Object.assign({},e),{[n]:t})),v(e=>Object.assign(Object.assign({},e),{[n]:""}))};const A=()=>{p(hidePanel$1(u))},k=e=>{o(e),setTimeout(()=>{p(hidePanel$1(u))},500)};I=[AuthStatus.LOGGING_OUT,AuthStatus.LOGGED_OUT].includes(I);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:b,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:A,onSaveAvatar:k,avatarHistory:a}},t={panelId:u,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,withTab:!1,marginStart:490,width:450,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:I},{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:E,onChangeTab:e=>{j(e)},tabsList:tabsList$2})}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.secondBox},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:E,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:!x&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"button-edit",onClick:()=>{T(!1),S(!1),C(!0)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$13,alt:""})}))}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formBox},{children:[x?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(TextField$1,{id:"firstName",label:R({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: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:R({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: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:R({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: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&&O(e),C(!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||(v(Object.assign(Object.assign({},y),{firstName:"This field is required."})),e=!1),m.lastName||(v(Object.assign(Object.assign({},y),{lastName:"This field is required."})),e=!1),m.phoneNumber&&!/^\+?(\d){6,}$/.test(m.phoneNumber.toLowerCase())&&(v(Object.assign(Object.assign({},y),{phoneNumber:"Invalid phone number."})),e=!1),e})()&&(i(m),C(!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}))]})),w?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:()=>{S(!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:[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:"********"})),!f&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"btn-click-pw-reset",className:d.iconResetPw,onClick:()=>{T(!1),S(!0),C(!1)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$12,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")]}))})]})]})),_?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:()=>{T(!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:()=>{T(!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"})}))]}))]}):!w&&s&&jsxRuntime.exports.jsx("div",Object.assign({id:"click-reset-biometric",onClick:()=>{T(!0),S(!1),C(!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:E,index:1},{children:jsxRuntime.exports.jsx(AccountLinking,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:E,index:2},{children:jsxRuntime.exports.jsx(ProfileSettings,{selectedLanguage:h,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);var m=useSelector(betaFeaturesSelector);const[g,y]=react.exports.useState("");var v=useStyles$9()["classes"];return react.exports.useEffect(()=>{y(h.loading)},[h]),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:g}),l===TabId.APP_PANEL&&(m?jsxRuntime.exports.jsx(ApplicationPanel,{recentApplist:c,applications:u,onClickApp:d}):jsxRuntime.exports.jsx(ApplicationPanel$1,{recentApplist:c,applications:u,onClickApp:d})),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$1="applications",applicationSelector=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$1$1]},HANDLE_CLICK_APP=`aiware/${namespace$1$1}/get handle click app`,REQUEST_GET_APPLICATION_V1=`aiware/${namespace$1$1}/request get app`,GET_APPLICATION_V1_START=`aiware/${namespace$1$1}/get app list start`,GET_APPLICATION_V1_SUCCESS=`aiware/${namespace$1$1}/get app list success`,GET_APPLICATION_V1_ERROR=`aiware/${namespace$1$1}/get app list error`;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$1={application:[],message:"",status:"idle"};function applicationReducer(e,t){if(void 0===e)return initialState$2$1;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"});default:return e}}const namespace$4="activities",allActivitySeletor=e=>{return(null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$4])||[]},today=DateTime_1.local().startOf("day"),activitySelector=createSelector([allActivitySeletor],e=>{const{records:t,filter:n}=e;return"today"===n?t.filter(e=>DateTime_1.fromISO(e.createdDateTime).hasSame(today,"day")):t}),GET_ACTIVITY=`os-app-bar-panel/${namespace$4}/get activity`,GET_ACTIVITY_SUCCESS=`os-app-bar-panel/${namespace$4}/get activity success`,UPDATE_ACTIVITY_FILTER=`os-app-bar-panel/${namespace$4}/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$1={records:[],filter:"all",fetched:!1,fetching:!1,processing:!1};function activityReducer(e,t){if(void 0===e)return initialState$1$1;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$3]:userReducer$1,[namespace$4]:activityReducer,[namespace$1$1]:applicationReducer});const nameSpace$2="aiWareHeaderBarPanel";function*handleClickAppSaga(e){yield call$7(storeRecentApplications,e.payload)}function*getApplicationsSaga(){yield put(getApplicationStart());var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);const n=yield call$7(getApplicationsApi,e,t);e=yield select(graphEndpointSelector),e=yield call$7(getApplicationLogo,e,t);const r=null==(t=null==e?void 0:e.data.applications)?void 0:t.records,i=r.reduce((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t}),{});n&&n.results?yield put(getApplicationSuccess(((null===n||void 0===n?void 0:n.results)||[]).map(e=>{var t;let n=null!=(t=i[e.applicationId])&&t.signedIconUrl?decodeURIComponent(decodeURI(null==(t=i[e.applicationId])?void 0:t.signedIconUrl)):"";return n=(n=n.replaceAll("&","&")).replaceAll("host?","host&"),{id:e.applicationId,name:e.applicationName,iconUrl:n||(null==(t=i[e.applicationId])?void 0:t.signedIconSvg)||e.applicationIconUrl||e.applicationIconSvg||e.signedApplicationIconUrl,description:e.applicationDescription}}))):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$3(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 __awaiter$1(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 delay(t=1e3){return __awaiter$1(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=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),t=yield call$7(getCurrentUserGraphQLApi,t,n);if(null!=t&&t.errors&&0<(null==t?void 0:t.errors.length)&&(null==(n=t.errors[0].path)||!n.includes("userSettings")))console.error("getCurrentUser error");else{n=(null==(n=null==(n=null==t?void 0:t.data)?void 0:n.me)?void 0:n.recentImageUrls)||[];const r=(null==(e=null==(e=null==t?void 0:t.data)?void 0:e.myRights)?void 0:e.operations)||[];yield put(getCurrentUserSuccess$1(Object.assign(Object.assign({},(null==(e=null==t?void 0:t.data)?void 0:e.me)||{}),{organizationRole:{organizationId:get$3(t,"data.me.organization.id",""),role:r.includes("veritone.superadmin")?"superadmin":r.includes("admin.access")?"admin":"user"},organization:Object.assign({},(null==(e=null==(e=null==t?void 0:t.data)?void 0:e.me)?void 0:e.organization)||{}),roles:((null==(t=null==(e=null==t?void 0:t.data)?void 0:e.me)?void 0:t.roles)||[]).map(e=>e.appName),avatarHistory:n})))}}function*resetBiometricSaga(){var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);yield call$7(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$7(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$7(()=>updateUserProfileApi(t,n,r));const o=AIWareFormatMessage(e);!1===(null==i?void 0:i.success)?yield put(updateProfileFail()):(yield put(getCurrentUser$1()),yield put(showMessage({content:o({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$7(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$7(updateUserAvatarApi,e,t,n);const i=AIWareFormatMessage(r);e.errors?yield put(updateProfileFail()):(yield put(showMessage({content:i({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);const t=AIWareFormatMessage(e);yield put(showMessage({content:t({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$7(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$7(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=yield select(graphEndpointSelector),t=yield select(authSelector),n=yield select(sessionTokenSelector),r=yield select(loginUrlSelector),i=yield select(logoutRedirectUrlSelector);try{if(!n)return yield put(logoutUserSuccess()),void(yield call$7(hardLogout));window.__logout_requested=!0,yield call$7(postNotificationApi,e,null==t?void 0:t.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.goToLoginPage,value:window.navigator.userAgent},!0,"json",aiwareEvent,n),yield delay(500);var o=yield call$7(logoutUserApi,n,e);if(null!=o&&o.errors||!1===(null==o?void 0:o.success))return yield call$7(redirectToLogoutOrError),void(yield put(logoutUserFail()));yield put(logoutUserSuccess()),goToPage(i||r)}catch(e){yield call$7(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$7(getActivityApi);if(e.success){const t=e.data["records"];yield put(getActivitySuccess(t.map(formatActivityData)))}else{e=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(e);yield put(showMessage({content:n({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$1(){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$1],initialActions:[getActivity(),getCurrentUser$1(),requestGetApplications()],retained:!0}}const initialState$4={openIdConnectors:[],connectedOpenIds:[],message:"",status:LoadingStatus.Idle};function openIdConReducer(e,t){if(void 0===e)return initialState$4;switch(t.type){case GET_OPEN_ID_CONNECTORS:return Object.assign(Object.assign({},e),{status:0===e.openIdConnectors.length&&LoadingStatus.Pending});case GET_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{openIdConnectors:t.payload.data,status:LoadingStatus.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:LoadingStatus.Failed});default:return e}}const getAllOpenIdConnectorApi=(t,n,r)=>__awaiter$1(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/api/admin/openid/org/"+n,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"});return e.json()}catch(e){console.error(e)}}),getConnectedOpenIdConnectorApi=(t,n,r)=>__awaiter$1(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/api/admin/openid/user/"+n,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"});return e.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$7(getAllOpenIdConnectorApi,r,i,n),a=call$7(getConnectedOpenIdConnectorApi,r,i,n);if(0===(null===e||void 0===e?void 0:e.results.length)?[e,t]=yield all([o,a]):t=yield a,!e||!t)return void(yield put(getOpenIdConnectorError("error on loading open ids")));yield put(getOpenIdConnectorSuccess(e.results)),yield put(getConnectedOpenIdsSuccess(t.results))}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]:openIdConReducer},sagas:[openIdRootSaga],initialActions:[]}}function SettingPanelComponent({tabId:e}){const t=useDispatch(),{application:n=[]}=useSelector(applicationSelector)||{};var{currentUser:r={}}=useSelector(userSelector$1)||{};const{avatarHistory:i=[],id:o}=r;var a=useSelector(activitySelector)||[],s=useSelector(allActivitySeletor)["filter"];const[l,c]=react.exports.useState(0),[u,d]=react.exports.useState([]),[p,f]=react.exports.useState([]),h=react.exports.useCallback(()=>{var e=get$3(JSON.parse(localStorage.getItem("recentApplicationWithUserId")||"{}"),[o],[]);f(e)},[o]);return react.exports.useEffect(()=>{o&&h()},[o,h]),react.exports.useEffect(()=>{t(requestGetApplications()),t(getActivity()),t(getCurrentUser$1())},[t]),react.exports.useEffect(()=>{c(e||0)},[e]),react.exports.useEffect(()=>{if(0<p.length&&0<n.length){const t=p.join(",");var e=n.filter(e=>t.includes(""+e.id));d(e)}},[p,n]),jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getAppbarPanelModule(),getOpenIdModule()]},{children:jsxRuntime.exports.jsx(SettingPanel,{tabId:l,currentUser:r,activities:a,activityFilter:s,onChangeActivityFilter:function(e){t(updateActivityFilter({filter:e}))},handleResetBiometric:function(){t(resetBiometric())},handleResetPassword:function(e){t(resetPassword({email:e}))},handleLogout:function(){t(logout())},handleUpdateProfile:function(e){t(updateProfile(e))},organizationRole:get$3(r,"organizationRole",{}),recentApp:u,applications:function(){const t=p.join(",");return n.filter(e=>!t.includes(""+e.id))}(),onClickApp:function(e){t(appSwitcherHandleClick(""+e)),setTimeout(()=>{h()},500)},handleUploadAvatar:function(e){t(uploadAvatar(e))},avatarHistory:i})}))})})}))}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$1$2()["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$1t,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"})}))]}))]}))})}var index_esm$1=Object.freeze({__proto__:null,AppList:AppList,EditProFilePicture:EditProFilePicture,VeritonePanel:SettingPanelComponent,applicationSelector:applicationSelector,getAppbarPanelModule:getAppbarPanelModule,requestGetApplications:requestGetApplications}),Close={},_interopRequireDefault$2=interopRequireDefault.exports,default_1$2=(Object.defineProperty(Close,"__esModule",{value:!0}),Close.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(createSvgIcon),_jsxRuntime$2=jsxRuntime.exports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.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$2=Close.default=_default$2,Message={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(Message,"__esModule",{value:!0}),Message.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"}),"Message"),default_1$1=Message.default=_default$1,Description={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Description,"__esModule",{value:!0}),Description.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"}),"Description");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?c(e):t}function s(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=u(n);return a(this,r?(e=u(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}var default_1=Description.default=_default,d="object"===("undefined"==typeof window||"undefined"==typeof window?"undefined":i(window)),f=d?document:{},v=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"];function p(r,i){var o;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o&&clearTimeout(o),o=setTimeout(function(){r.apply(void 0,t),o=null},i)}}function h(t,n){var r=0;return function(){var e=(new Date).getTime();if(!(e-r<n))return r=e,t.apply(void 0,arguments)}}var m=function(){var e=r,t=react.exports.Component;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t);var n=s(r);function r(e){var t;if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");if((t=n.call(this,e)).state={idle:!1,oldDate:+new Date,lastActive:+new Date,lastIdle:null,idleTime:0,remaining:null,pageX:null,pageY:null},t.tId=null,t.eventsBound=!1,0<e.debounce&&0<e.throttle)throw new Error("onAction can either be throttled or debounced (not both)");return 0<e.debounce?t._onAction=p(e.onAction,e.debounce):0<e.throttle?t._onAction=h(e.onAction,e.throttle):e.onAction?t._onAction=e.onAction:t._onAction=function(){},0<e.eventsThrottle?t._handleEvent=h(t._handleEvent.bind(c(t)),e.eventsThrottle):t._handleEvent=t._handleEvent.bind(c(t)),e.startOnMount||(t.state.idle=!0),t._toggleIdleState=t._toggleIdleState.bind(c(t)),t.reset=t.reset.bind(c(t)),t.pause=t.pause.bind(c(t)),t.resume=t.resume.bind(c(t)),t.isIdle=t.isIdle.bind(c(t)),t.getRemainingTime=t.getRemainingTime.bind(c(t)),t.getElapsedTime=t.getElapsedTime.bind(c(t)),t.getLastActiveTime=t.getLastActiveTime.bind(c(t)),t.getLastIdleTime=t.getLastIdleTime.bind(c(t)),t.getTotalIdleTime=t.getTotalIdleTime.bind(c(t)),t.getTotalActiveTime=t.getTotalActiveTime.bind(c(t)),t}return o(r.prototype,[{key:"componentDidMount",value:function(){this._bindEvents(),this.props.startOnMount&&this.reset()}},{key:"componentDidUpdate",value:function(e){e.debounce!==this.props.debounce&&(this._onAction=p(this._onAction,this.props.debounce)),e.throttle!==this.props.throttle&&(this._onAction=h(this._onAction,this.props.throttle)),e.eventsThrottle!==this.props.eventsThrottle&&(this._handleEvent=h(this._handleEvent,this.props.eventsThrottle)),e.timeout!==this.props.timeout&&null!==this.tid&&this.reset()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.tId),this._unbindEvents(!0)}},{key:"render",value:function(){return this.props.children||null}},{key:"_bindEvents",value:function(){var e,t,n,r,i,o=this;d&&(e=this.props,t=e.element,n=e.events,r=e.passive,i=e.capture,this.eventsBound||(n.forEach(function(e){t.addEventListener(e,o._handleEvent,{capture:i,passive:r})}),this.eventsBound=!0))}},{key:"_unbindEvents",value:function(){var e,t,n,r,i,o=this;d&&(e=this.props,t=e.element,n=e.events,r=e.passive,i=e.capture,(this.eventsBound||0<arguments.length&&void 0!==arguments[0]&&arguments[0])&&(n.forEach(function(e){t.removeEventListener(e,o._handleEvent,{capture:i,passive:r})}),this.eventsBound=!1))}},{key:"_toggleIdleState",value:function(r){var i=this;this.setState(function(e){return{idle:!e.idle,lastIdle:e.idle?e.lastIdle:+new Date-i.props.timeout,idleTime:e.idle?e.idleTime+ +new Date-e.lastIdle:e.idleTime}},function(){var e=i.props,t=e.onActive,n=e.onIdle,e=e.stopOnIdle;i.state.idle?(e&&(clearTimeout(i.tId),i.tId=null,i._unbindEvents()),n(r)):e||(i._bindEvents(),t(r))})}},{key:"_handleEvent",value:function(e){var t=this.state,n=t.remaining,r=t.pageX,i=t.pageY,t=t.idle,o=this.props,a=o.timeout,o=o.stopOnIdle;if(this._onAction(e),!n){if("mousemove"===e.type){if(e.pageX===r&&e.pageY===i)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(this.getElapsedTime()<200)return}clearTimeout(this.tId),this.tId=null;n=+new Date-this.getLastActiveTime();(t&&!o||!t&&a<n)&&this._toggleIdleState(e),this.setState({lastActive:+new Date,pageX:e.pageX,pageY:e.pageY}),t&&o||(this.tId=setTimeout(this._toggleIdleState,a))}}},{key:"reset",value:function(){clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null});var e=this.props.timeout;this.tId=setTimeout(this._toggleIdleState,e)}},{key:"pause",value:function(){null===this.state.remaining&&(this._unbindEvents(),clearTimeout(this.tId),this.tId=null,this.setState({remaining:this.getRemainingTime()}))}},{key:"resume",value:function(){var e=this.state,t=e.remaining,e=e.idle;null!==t&&(this._bindEvents(),e||(this.tId=setTimeout(this._toggleIdleState,t),this.setState({remaining:null,lastActive:+new Date})))}},{key:"getRemainingTime",value:function(){var e=this.state,t=e.remaining,e=e.lastActive,n=this.props.timeout;if(null!==t)return t<0?0:t;t=n-(+new Date-e);return t<0?0:t}},{key:"getElapsedTime",value:function(){var e=this.state.oldDate;return+new Date-e}},{key:"getLastIdleTime",value:function(){return this.state.lastIdle}},{key:"getTotalIdleTime",value:function(){var e=this.state,t=e.idle,n=e.lastIdle,e=e.idleTime;return t?+new Date-n+e:e}},{key:"getLastActiveTime",value:function(){return this.state.lastActive}},{key:"getTotalActiveTime",value:function(){return this.getElapsedTime()-this.getTotalIdleTime()}},{key:"isIdle",value:function(){return this.state.idle}}]),r}();function g(){function n(e){var t=!T.current;(T.current=t)?($&&(clearTimeout(O.current),O.current=null,V()),M.current=+new Date-k.current,N.current(e)):$||(A.current+=+new Date-M.current,D(),F.current(e))}function e(){if(null!==j.current)return j.current<0?0:j.current;var e=k.current-(+new Date-L.current);return e<0?0:e}function r(){return+new Date-E.current}function t(){return T.current?+new Date-M.current+A.current:A.current}function i(){return L.current}function o(){clearTimeout(O.current),O.current=null,D(),T.current=!1,E.current=+new Date,L.current=+new Date,j.current=null,O.current=setTimeout(n,k.current)}var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},s=a.timeout,l=void 0===s?12e5:s,s=a.element,c=void 0===s?f:s,s=a.events,u=void 0===s?v:s,s=a.onIdle,m=void 0===s?function(){}:s,s=a.onActive,g=void 0===s?function(){}:s,s=a.onAction,y=void 0===s?function(){}:s,s=a.debounce,x=void 0===s?0:s,s=a.throttle,C=void 0===s?0:s,s=a.eventsThrottle,b=void 0===s?200:s,s=a.startOnMount,H=void 0===s||s,s=a.stopOnIdle,$=void 0!==s&&s,s=a.capture,w=void 0===s||s,s=a.passive,S=void 0===s||s,_=react.exports.useRef(!1),T=react.exports.useRef(!0),E=react.exports.useRef(+new Date),j=react.exports.useRef(null),I=react.exports.useRef(null),R=react.exports.useRef(null),O=react.exports.useRef(null),L=react.exports.useRef(null),M=react.exports.useRef(null),A=react.exports.useRef(0),k=react.exports.useRef(l),N=react.exports.useRef(m),F=react.exports.useRef(g),B=react.exports.useRef(y),P=function(e){if(B.current(e),!j.current){if("mousemove"===e.type){if(e.pageX===I&&e.pageY===R)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(r()<200)return}clearTimeout(O.current),O.current=null;var t=+new Date-i();(T.current&&!$||!T.current&&t>k.current)&&n(e),L.current=+new Date,I.current=e.pageX,R.current=e.pageY,T.current&&$||(O.current=setTimeout(n,k.current))}},D=function(){!d||_.current||(u.forEach(function(e){c.addEventListener(e,P,{capture:w,passive:S})}),_.current=!0)},V=function(){d&&(_.current||0<arguments.length&&void 0!==arguments[0]&&arguments[0])&&(u.forEach(function(e){c.removeEventListener(e,P,{capture:w,passive:S})}),_.current=!1)};return react.exports.useEffect(function(){if(0<x&&0<C)throw new Error("onAction can either be throttled or debounced (not both)");return 0<b&&(P=h(P,b)),D(),H&&o(),function(){clearTimeout(O.current),V(!0)}},[]),react.exports.useEffect(function(){N.current=m},[m]),react.exports.useEffect(function(){F.current=g},[g]),react.exports.useEffect(function(){B.current=0<x?p(y,x):0<C?h(y,C):y},[y]),react.exports.useEffect(function(){k.current=l,null!==O.current&&o()},[l]),{isIdle:function(){return T.current},pause:function(){null===j.current&&(V(),clearTimeout(O.current),O.current=null,j.current=e())},reset:o,resume:function(){null!==j.current&&(D(),T.current||(O.current=setTimeout(n,j.current),j.current=null,L.current=+new Date))},getLastIdleTime:function(){return M.current},getTotalIdleTime:t,getLastActiveTime:i,getTotalActiveTime:function(){return r()-t()},getElapsedTime:r,getRemainingTime:e}}m.propTypes={timeout:PropTypes.number,events:PropTypes.arrayOf(PropTypes.string),onIdle:PropTypes.func,onActive:PropTypes.func,onAction:PropTypes.func,debounce:PropTypes.number,throttle:PropTypes.number,eventsThrottle:PropTypes.number,element:PropTypes.oneOfType([PropTypes.object,PropTypes.element]),startOnMount:PropTypes.bool,stopOnIdle:PropTypes.bool,passive:PropTypes.bool,capture:PropTypes.bool},m.defaultProps={timeout:12e5,element:f,events:v,onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,eventsThrottle:200,startOnMount:!0,stopOnIdle:!1,capture:!0,passive:!0},g.propTypes={timeout:PropTypes.number,events:PropTypes.arrayOf(PropTypes.string),onIdle:PropTypes.func,onActive:PropTypes.func,onAction:PropTypes.func,debounce:PropTypes.number,throttle:PropTypes.number,eventsThrottle:PropTypes.number,element:PropTypes.oneOfType([PropTypes.object,PropTypes.element]),startOnMount:PropTypes.bool,stopOnIdle:PropTypes.bool,passive:PropTypes.bool,capture:PropTypes.bool},g.defaultProps={timeout:12e5,element:f,events:v,onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,eventsThrottle:200,startOnMount:!0,stopOnIdle:!1,capture:!0,passive:!0};var WidgetsStatus,tinycolor$1={exports:{}},tinycolor=(!function(e){function u(e,t){if(t=t||{},(e=e||"")instanceof u)return e;if(!(this instanceof u))return new u(e,t);var 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(w,"").replace(S,"").toLowerCase();var t,n=!1;if(R[e])e=R[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:C(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:C(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&&(b(e.r)&&b(e.g)&&b(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"):b(e.h)&&b(e.s)&&b(e.v)?(r=v(e.s),i=v(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"):b(e.h)&&b(e.s)&&b(e.l)&&(r=v(e.s),o=v(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:E(255,j(t.r,0)),g:E(255,j(t.g,0)),b:E(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=T(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=T(this._r)),this._g<1&&(this._g=T(this._g)),this._b<1&&(this._b=T(this._b)),this._ok=n.ok,this._tc_id=_++}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=E(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=E(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=[y(T(e).toString(16)),y(T(t).toString(16)),y(T(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[y(x(r)),y(T(e).toString(16)),y(T(t).toString(16)),y(T(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,E(255,e.r-T(-t/100*255))),e.g=j(0,E(255,e.g-T(-t/100*255))),e.b=j(0,E(255,e.b-T(-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 V(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 H(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 F(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=E(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 E(1,j(0,e))}function g(e){return parseInt(e,16)}function y(e){return 1==e.length?"0"+e:""+e}function v(e){return e=e<=1?100*e+"%":e}function x(e){return $.round(255*parseFloat(e)).toString(16)}function C(e){return g(e)/255}function b(e){return k.CSS_UNIT.exec(e)}var $,w,S,_,T,E,j,I,R,O,L,M,A,k;$=Math,w=/^\s+/,S=/\s+$/,_=0,T=$.round,E=$.min,j=$.max,I=$.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=T(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=T(360*e.h),n=T(100*e.s),e=T(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=T(360*e.h),n=T(100*e.s),e=T(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=[y(T(t).toString(16)),y(T(n).toString(16)),y(T(r).toString(16)),y(x(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:T(this._r),g:T(this._g),b:T(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+T(this._r)+", "+T(this._g)+", "+T(this._b)+")":"rgba("+T(this._r)+", "+T(this._g)+", "+T(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:T(100*h(this._r,255))+"%",g:T(100*h(this._g,255))+"%",b:T(100*h(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+T(100*h(this._r,255))+"%, "+T(100*h(this._g,255))+"%, "+T(100*h(this._b,255))+"%)":"rgba("+T(100*h(this._r,255))+"%, "+T(100*h(this._g,255))+"%, "+T(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(H,arguments)},complement:function(){return this._applyCombination(N,arguments)},monochromatic:function(){return this._applyCombination(F,arguments)},splitcomplement:function(){return this._applyCombination(V,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]:v(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:I(),g:I(),b:I()})},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))},R=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}(R),M="[\\s|\\(]+("+(L="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",A="[\\s|\\(]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",k={CSS_UNIT:new RegExp(L),rgb:new RegExp("rgb"+M),rgba:new RegExp("rgba"+A),hsl:new RegExp("hsl"+M),hsla:new RegExp("hsla"+A),hsv:new RegExp("hsv"+M),hsva:new RegExp("hsva"+A),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(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(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(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const useStyles$2$1=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,"-webkit-mask":`url("${img$1v}") 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:{"-webkit-mask":`url("${img$_}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},veritoneLogo:{"-webkit-mask":`url("${img$1u}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openPanel:{backgroundImage:`url("${img$19}") !important`},notificationIcon:{"-webkit-mask":`url("${img$2}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},applicationSettingsIcon:{"-webkit-mask":`url("${img$1o}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},dashboardIcon:{"-webkit-mask":`url("${img$4}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openNotificationPanel:{backgroundImage:`url(${img$18}) !important`},orgIcon:{borderRadius:"50%",width:30,height:30,backgroundRepeat:"no-repeat",backgroundPosition:"center"},logoIcon:{"-webkit-mask":`url("${n}") no-repeat 50% 50%`,backgroundColor:t},helpIcon:{"-webkit-mask":`url("${img$3}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openHelp:{backgroundImage:`url(${img$17}) !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$1=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:{"-webkit-mask":`url("${img$3}") 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})=>{var a=useStyles$1$1()["classes"];const[s,l]=react.exports.useState(null);const c=()=>{l(null),null!=e&&e()};var u=n||r,d=null==(d=window.config)?void 0:d.appVersion;return jsxRuntime.exports.jsxs("div",Object.assign({className:a.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:a.barIcon,onClick:e=>{l(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(a.icon,a.helpIcon)})}))})),jsxRuntime.exports.jsx(Popover$1,Object.assign({open:Boolean(s),anchorEl:s,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},onClose:c,className:a.popover,classes:{paper:a.popoverColor},disableScrollLock:!0},{children:jsxRuntime.exports.jsxs(List$2,Object.assign({disablePadding:!0,className:a.list},{children:[u&&jsxRuntime.exports.jsxs(ListItem$1,Object.assign({button:!0,onClick:()=>{c(),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(default_1,{})}),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:a.helpItemText}})]})),o&&jsxRuntime.exports.jsxs(ListItem$1,Object.assign({button:!0,onClick:()=>{null!=i&&i(),l(null)},"data-veritone-element":"open-support-chat-button","data-testid":"support-chat-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(default_1$1,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.8aLpuV",defaultMessage:"Support Center",description:"help tooltip: text for documentation"}),classes:{root:a.helpItemText}})]})),d&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(ListItem$1,Object.assign({className:a.versionWrapper},{children:jsxRuntime.exports.jsx(ListItemText$1,{primary:d,classes:{primary:a.versionText}})}))]})]}))}))]}))},namespace$1="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$3=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$3().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,y]=react.exports.useState(new Date),[v,x]=react.exports.useState(),[C,b]=react.exports.useState(),[$,w]=react.exports.useState(!1),[S,_]=react.exports.useState(!1),T=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setIsIdle,value:e,ephemeral:!0,contentType:"json"}))},[n]),E=(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]),I=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setCallResetIdleTimer,value:e,ephemeral:!0,contentType:"json"}))},[n]),R=react.exports.useCallback(()=>{logoutCallCounter++,E(!0);var e=l?500:5e3;n(logoutRequest({token:o})),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},t?2e3:e)},[E,n,o,a,l]);var O=react.exports.useCallback(()=>{logoutCallCounter++,T(!1),setTimeout(()=>{E(!0),j(!0),n(logoutRequest({token:o}))},500),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},500)},[E,n,o,a,j,T]);var L=()=>{T(!0),clearInterval(timer),timer=setInterval(()=>{h(e=>e-1)},1e3)},M=()=>{!r&&p<RESET_IDLE_TIMER_CALL_LIMIT&&I(!0)};const A=g(t?{timeout:5e3,onIdle:L,onAction:M,debounce:1e3}:{timeout:6e4*i,onIdle:L,onAction:M,debounce:i/4*6e4})["reset"],k=react.exports.useCallback(()=>{I(!1),A()},[I]),N=react.exports.useCallback(()=>{S&&(n(extendTokenRequest({token:o})),_(!1)),T(!1),k(),clearInterval(timer),setTimeout(()=>{h(t?5:60)},500)},[T,k,S,n,o]);return react.exports.useEffect(()=>{setTimeout(()=>{y(new Date)},1e3)},[m]),react.exports.useEffect(()=>{if(c){const e=new Date(c);e.setMinutes(e.getMinutes()-MINUTES_BEFORE_SESSION_EXPIRATION),b(new Date(c)),x(e)}},[c]),react.exports.useEffect(()=>{C&&C.getTime()<m.getTime()&&w(!0),v&&v.getTime()<m.getTime()&&_(!0)},[C,v,m]),react.exports.useEffect(()=>{$?R():S&&T(!0)},[C,v,S,$,R,T]),react.exports.useEffect(()=>{s&&logoutCallCounter<LOGOUT_CALL_LIMIT&&R()},[s,R]),react.exports.useEffect(()=>{r&&0===f&&(clearInterval(timer),setTimeout(()=>{h(10)},500),R())},[f,R,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,{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"}):S?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,title:a,help:s,notification:l=!0,userApplicationSettingsIcon:c,onClickOrgIcon:u,closeButton:d,onCloseSetting:p,onClose:f,onOpenSetting:h,onOpenHelpCenter:m,onOpenNotification:g,onOpenUserApplicationSettings:y,openSetting:v,organization:x={},panels:C=[],unseenCount:b,searchBarMountId:$,textColor:w,rightActions:S=[],applications:_=[],onClickAppSwitchIcon:T,displaySupportChat:E=!0,onDashboardClick:j,showDashboardIcon:I=!1}){var R=tinycolor(o).isDark(),w=w||(R?"#fff":"#000"),R=R?"rgba(255,255,255,0.1)":"rgb(243,245,249)";const O=useStyles$2$1({titleColor:w,logo:i,activeColor:R})["classes"],[L,M]=react.exports.useState([]);R=useSelector(userSelector)||{};const[A,k]=react.exports.useState(!0);var{appIcon:R,currentUser:N}=getUserInfo(R),P=useSelector(betaFeaturesSelector);return react.exports.useEffect(()=>{var e=C.map(e=>e.panelId);!e.length&&!L.length||isEqual(e,L)||M(e)},[C,L]),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:O.appBar,style:{height:appBarHeight,background:o,zIndex:t}},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:O.menuButton},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-menu","data-testid":"app-bar-menu",className:O.iconButton,onClick:r,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.hamburgerIcon)})}))})),!!R&&""!==R&&jsxRuntime.exports.jsx("div",Object.assign({className:O.margin},{children:jsxRuntime.exports.jsx("img",{className:O.appIcon,src:R,alt:"appIcon"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:O.content,style:{color:w}},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.left,O.noSelect),onClick:function(){window.location.href="/"},"data-test":"appbarTitle","data-testid":"appbarTitle"},{children:i?jsxRuntime.exports.jsx("span",{className:O.appLogo}):jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:O.title},{children:a}))})),jsxRuntime.exports.jsx("div",{"data-test":"appbarSearch",id:$||"search-bar-id",className:O.searchBarHolder}),jsxRuntime.exports.jsx("div",Object.assign({className:O.right},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:O.controllers},{children:[0<S.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.iconGroup,O.noSelect)},{children:S.map(({label:e,onClick:t,isActive:n=!0},r)=>jsxRuntime.exports.jsx("div",Object.assign({className:O.iconGroupIcon},{children:jsxRuntime.exports.jsx("span",{onClick:e=>t?t(e):null,className:classnames(O.rightActionLabel,n?O.active:O.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:O.barIcon,onClick:j,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.dashboardIcon)})}))})),s&&jsxRuntime.exports.jsx("div",Object.assign({"data-test":"app-bar-help-container","data-testid":"app-bar-help-container",className:classnames(O.margin,{[O.panelActive]:L.includes(HELP_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Help,{tooltipTitle:"",helpDocLabel:"View Help Docs",supportLabel:"Support Center",helpDocCallback:()=>{null!=m&&m()},supportCallback:p,titleColor:w,displaySupportChat:E})})),l&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.margin,{[O.panelActive]:L.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:O.barIcon,onClick:g,"data-test":"app-bar-notification-button",size:"large","data-testid":"app-bar-notification-button"},{children:jsxRuntime.exports.jsx(Badge$1,Object.assign({badgeContent:b,max:NOTIFICATION_BADGE_MAX_COUNT,color:"primary","data-test":"app-bar-notification-badge",className:O.notificationBadge},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.notificationIcon,{[O.openNotificationPanel]:null==v?void 0:v.openNotificationPanel})})}))}))}))})),P&&c&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.margin,{[O.panelActive]:L.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:O.barIcon,onClick:y,size:"large","data-testid":"app-bar-user-application-settings-button"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.applicationSettingsIcon)})}))}))})),1<_.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames({[O.panelActive]:L.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:O.barIcon,onClick:T,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.applicationIcon,{[O.openPanel]:null==v?void 0:v.openAppSwitchPanel})})}))}))})),(x.imageUrl||x.name)&&e&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.margin,{[O.panelActive]:L.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:O.barIcon+" "+O.orgButton,onClick:u,size:"large"},{children:x.imageUrl&&A?jsxRuntime.exports.jsx("img",{src:x.imageUrl,className:classnames(O.orgIcon),onError:function(){k(!1)},alt:"org_icon"}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:O.smallOrgAvatar,variant:"circular","data-testid":"app-bar-avatar"},{children:getSortName(x.name||"")}))}))}))})),N&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames({[O.panelActive]:L.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:O.barIcon,onClick:h,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.veritoneLogo,{[O.openPanel]:null==v?void 0:v.openVeritonePanel})})}))}))})),d&&f&&jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("div",Object.assign({style:{marginLeft:"auto"}},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:f,"data-test":"app-bar-close-button",size:"large","data-testid":"app-bar-close-button"},{children:jsxRuntime.exports.jsx(default_1$2,{htmlColor:w})}))}))})]}))}))]}))]}))]})}const GET_CURRENT_USER=`os-app-bar/${namespace$1}/get current user`,GET_CURRENT_USER_SUCCESS=`os-app-bar/${namespace$1}/get current user success`,GET_CURRENT_USER_FAIL=`os-app-bar/${namespace$1}/get current user fail`,GET_CURRENT_APP_ICON=`os-app-bar/${namespace$1}/get current app icon`,GET_CURRENT_APP_ICON_SUCCESS=`os-app-bar/${namespace$1}/get app icon success`,getCurrentUser=()=>({type:GET_CURRENT_USER}),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$2={currentUser:{},fetched:!1,fetching:!1,error:!1};function userReducer(e,t){if(void 0===e)return initialState$2;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(void 0,void 0,void 0,function*(){var e=`
|
|
1147
|
+
`,variables:e,graphEndpoint:n,token:r})}catch(e){return{success:!1}}});function*refetchNotificationSetting(){yield put(getNotification(0,30))}function*getNotificationListByMailBoxSaga(e){const{status:t,mailBoxIds:n,mailbox:r}=yield select(mailBoxSelector),{limit:i,offset:o,callback:a}=e.payload;var e=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector),l="success"===t||"failure"===t;if(0!==Object.keys(r).length||l){yield put(getNotificationStart(o,i));l=yield call$7(handleNotificationListByMailBox,e,s,n,o,i);if(null!==a&&void 0!==a&&a(),0<(null==(e=null==l?void 0:l.errors)?void 0:e.length))yield put(getNotificationListByMailBoxFail());else{let n=0;const c=null==(e=null==(s=null==l?void 0:l.data)?void 0:s.notificationMailboxes)?void 0:e.map(t=>{var e;return 0<(null==(e=null==t?void 0:t.notifications)?void 0:e.count)?(e=null==(e=null==(e=null==t?void 0:t.notifications)?void 0:e.records)?void 0:e.map(e=>Object.assign(Object.assign({},e),{mailboxId:t.id})),n++,e):[]}),u=(null===c||void 0===c?void 0:c.flat())||[];l=u.map(t=>{var e,n=r.find(e=>e.id===t.mailboxId);return Object.assign(Object.assign({},t),{appId:(null==(e=null==n?void 0:n.application)?void 0:e.applicationId)||"",appName:(null==(e=null==n?void 0:n.application)?void 0:e.name)||"",eventNames:(null==(e=null==n?void 0:n.eventFilter)?void 0:e.eventNames)||[],icon:(null==(e=null==n?void 0:n.application)?void 0:e.icon)||"",title:t.title||""})});yield put(getNotificationListByMailBoxSuccess({offset:o,limit:i,availableMailBoxes:n,data:l}))}}else yield take(subscriberSuccess({}).type)}function*listenToPushNotificationSaga(e){var t;const n=(yield select(mailBoxSelector))["mailbox"],r=e["payload"];e=n.find(e=>e.id===r.mailboxId);yield put(updateNotificationList(Object.assign(Object.assign({},r),{appId:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",appName:(null==(t=null==e?void 0:e.application)?void 0:t.name)||"",icon:(null==(t=null==e?void 0:e.application)?void 0:t.icon)||""})))}function*updateNotificationReadSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);try{var r=yield call$7(handleUpdateNotificationRead,t,n,e.payload);return null!=r&&r.error?void(yield put(updateNotificationReadFail())):void(yield put(updateNotificationReadSuccess(Object.assign({},r))))}catch(e){yield put(updateNotificationReadFail())}}function*updateMarkAllReadNotificationSaga(){var e=(yield select(mailBoxSelector))["mailBoxIds"],t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call$7(handleMarkAllReadNotification,e,t,n)).error?yield put(markAllReadNotificationFail()):yield put(markAllReadNotificationSuccess())}catch(e){yield put(markAllReadNotificationFail())}}function*getNotificationActionSaga(e){var t,n,{eventType:r,appId:i,eventName:o}=yield select(notificationDetailSelector(e.payload)),a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector);try{var l,c=yield call$7(handleGetNotificationAction,o,r,i,a,s);c.error?yield put(getNotificationActionError()):(l=(null==(n=null==(t=null==c?void 0:c.data)?void 0:t.notificationActions)?void 0:n.records)||[],yield put(getNotificationActionSuccess(e.payload,l)))}catch(e){yield put(getNotificationActionError())}}function*notificationSaga(){yield all([takeEvery$1(getNotification.type,getNotificationListByMailBoxSaga),takeLatest$1(updateUtilitySetting.type,refetchNotificationSetting),takeEvery$1(getNotificationListByMailBoxRequest.type,getNotificationListByMailBoxSaga),takeEvery$1("mailbox/PUSH_NOTIFICATION",listenToPushNotificationSaga),takeEvery$1(updateNotificationReadRequest.type,updateNotificationReadSaga),takeEvery$1(GET_NOTIFICATION_ACTION_REQUEST,getNotificationActionSaga),takeLatest$1(markAllReadNotificationRequest.type,updateMarkAllReadNotificationSaga)])}function getNotificationModule(){return{id:"os-notification-panel",reducerMap:{[nameSpace$3]:notificationReducer},sagas:[notificationSaga],initialActions:[],retained:!0}}const useStyles$b$1=makeStyles()(e=>({root:{width:"100%",height:"100%"},noData:{paddingTop:66,display:"flex",justifyContent:"center"},iconNoData:{width:235,height:235,display:"flex",justifyContent:"center",borderRadius:"50%",padding:"20px",border:"20px solid #F9F9F9"},noDataDescription:{display:"flex",justifyContent:"center",marginTop:66},noDataDescriptionText:{fontSize:"18px",lineHeight:"23px",textTransform:"uppercase",color:e.palette.secondary.main}}));function NotificationContent(){var e=useStyles$b$1()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.root,"data-testid":"notification-content"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.noData},{children:jsxRuntime.exports.jsx("div",Object.assign({className:e.iconNoData},{children:jsxRuntime.exports.jsx("img",{src:img$E,draggable:"false",alt:"noNotification"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.noDataDescription},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-test":"no-notification",className:e.noDataDescriptionText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.pBrbyj",defaultMessage:"You don’t have any notifications!",description:"Notification panel: no notification message"})}))}))]}))}const useStyles$a$1=makeStyles()(e=>({cardContainer:{width:"100%","&:hover":{backgroundColor:"#EEF3F9"}},rootCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer"},unreadCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer",paddingLeft:e.spacing(2)},iconCard:{marginTop:e.spacing(-.4)},leftContent:{width:"345px",padding:e.spacing(0,6,0,3)},titleCard:{display:"flex"},appsCard:{fontSize:"14px",fontWeight:600},timestampCard:{fontSize:"12px",paddingLeft:e.spacing(3),color:e.palette.text.secondary},contentCard:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:e.palette.text.secondary},dividerCard:{margin:e.spacing(0,6),height:"0.5px"},notificationIcon:{width:24,height:24},unread:{width:"auto",marginRight:e.spacing(2.4),fontSize:"unset"},unreadIcon:{width:8,height:8,color:e.palette.primary.main},appName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"calc(100% - 85px)"}})),NotificationCard=react.exports.forwardRef(({data:e,onViewDetail:t},n)=>{var r=useStyles$a$1()["classes"];const i=useDispatch(),[o,a]=react.exports.useState(!1);const{createdDateTime:s,icon:l,title:c,appName:u,body:d,id:p,flags:f}=e;return jsxRuntime.exports.jsxs("div",Object.assign({ref:n,className:r.cardContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({onClick:t,className:null!==f&&void 0!==f&&f.includes(NotificationFlag.unread)?r.unreadCard:r.rootCard},{children:[(null===f||void 0===f?void 0:f.includes(NotificationFlag.unread))&&jsxRuntime.exports.jsx(Icon$1,{"data-test":"notification-unread-icon","data-testid":"notification-unread-icon",className:r.unread,children:jsxRuntime.exports.jsx(default_1$6,{className:r.unreadIcon}),onClick:function(e){e.stopPropagation(),i(updateNotificationReadRequest(p))}}),jsxRuntime.exports.jsx("div",Object.assign({className:r.iconCard},{children:l&&!o?jsxRuntime.exports.jsx("img",{src:l,className:r.notificationIcon,draggable:"false",alt:"notification-card-icon",onError:function(){a(!0)}}):jsxRuntime.exports.jsx(Notifications,{})})),jsxRuntime.exports.jsxs("div",Object.assign({className:r.leftContent},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.titleCard},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.appName},{children:null!==f&&void 0!==f&&f.includes(NotificationFlag.unread)?jsxRuntime.exports.jsx("strong",{children:u}):u})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.timestampCard},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(s),unit:"minute",updateIntervalInSeconds:60,children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react.exports.createElement("span",{},e)})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.contentCard},{children:convertHTMLEntities(c||d)}))})]}))]})),jsxRuntime.exports.jsx(Divider$1,{className:r.dividerCard})]}))}),useStyles$9$1=makeStyles()(e=>({header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(3.5,6,4,6),position:"sticky",width:"fit-content",fontSize:"14px",fontWeight:400,top:0},scrollContent:{overflow:"hidden"},infinityLoading:{display:"flex",justifyContent:"center",padding:e.spacing(4)}}));function NotificationList({title:e,data:n,loading:t,handleGetNotification:r,onOpenNotificationDetail:i}){var o=useStyles$9$1()["classes"];const a=react.exports.useRef(),s=react.exports.useCallback(e=>{t||(a.current&&a.current.disconnect(),console.log(IntersectionObserver),a.current=new IntersectionObserver(e=>{e[0].isIntersecting&&r()}),e&&a.current.observe(e))},[r,t]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.header},{children:e.toUpperCase()})),jsxRuntime.exports.jsxs("div",Object.assign({className:o.scrollContent},{children:[n.map((e,t)=>n.length===t+1?jsxRuntime.exports.jsx(NotificationCard,{ref:s,onViewDetail:()=>null==i?void 0:i(e),data:e},t):jsxRuntime.exports.jsx(NotificationCard,{onViewDetail:()=>null==i?void 0:i(e),data:e},t)),t&&jsxRuntime.exports.jsx("div",Object.assign({className:o.infinityLoading},{children:jsxRuntime.exports.jsx(CircularProgress$1,{size:30})}))]}))]})}const useStyles$8$1=makeStyles()(e=>({loadingContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},filterContainer:{position:"absolute",top:e.spacing(12.4),right:0,paddingTop:e.spacing(3),paddingRight:e.spacing(6),paddingBottom:e.spacing(2),width:"100%",display:"flex",justifyContent:"flex-end",backgroundColor:e.palette.background.default},markAllReadButton:{cursor:"pointer",marginRight:e.spacing(4),backgroundColor:e.palette.background.default,textTransform:"capitalize"}})),NotificationPanel=()=>{const r=useDispatch();var e=useStyles$8$1()["classes"],t=useSelector(applicationFilterSelector)||[];const[n,i]=react.exports.useState(!1),o=useSelector(mailboxIdSelector);var a=useSelector(notificationWithFilterSelector);const{filter:s,status:l,notifications:c,availableMailBoxes:u,offset:d,limit:p}=useSelector(notificationSelector),f=e=>Math.max(Math.ceil(50/e),5);react.exports.useEffect(()=>{var e=(null===o||void 0===o?void 0:o.length)||0;0<e&&0===p&&(e=f(e),r(getNotification(0,e)))},[r,p,o]);var h=react.exports.useCallback(()=>{var e;0<u&&(i(!0),e=f(u),r(getNotification(d+p,e,()=>{i(!1)})))},[u,r,p,d]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getNotificationModule()]},{children:0===a.length&&"success"!==l&&"failure"!==l&&0<o.length?jsxRuntime.exports.jsx("div",Object.assign({className:e.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})):0<(null==c?void 0:c.length)?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.filterContainer,id:"notification-list-header"},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){r(markAllReadNotificationRequest())},className:e.markAllReadButton,"data-test":"notification-mark-all-read-button","data-testid":"notification-mark-all-read-button"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.PtPIns",defaultMessage:"Mark All Read",description:"label of Mark All Read button"})}))})),jsxRuntime.exports.jsx(Filter,{data:[...filters$3,...t],filter:s,onFilter:function(e){e=e.target.value,r(updateFilterValue(e))}})]})),jsxRuntime.exports.jsx(NotificationList,{title:"All time",onOpenNotificationDetail:function(e){var t="DETAIL_PANEL_ID",n={name:"NOTIFICATION_DETAIL",config:{mode:"actionable",id:e.id,data:Object.assign({},e),actionIconButtons:null!=(n=e.actions)?n:[],onClose:()=>{console.log("onClose")}}};r(unmountPanel$1(t)),r(mountPanel$1({panelId:t,microFrontend:n,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:413,width:420,header:{title:"Notification detail"},dimmed:0,parentPanelId:"NOTIFICATION_PANEL_ID"}})),r(updateNotificationReadRequest(e.id))},data:a,loading:n,handleGetNotification:h})]}):jsxRuntime.exports.jsx(NotificationContent,{})}))})};function CustomWorkFlow(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center","data-testid":"custom-workflow-box"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.1+8+OX",defaultMessage:"Custom Workflows",description:"custom-workflows"})}),jsxRuntime.exports.jsx(Button$1,{variant:"outlined",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.gAFAOA",defaultMessage:"Create New",description:"creat-new-btn"}),color:"primary"})]})),jsxRuntime.exports.jsx(Typography$1,{style:{fontSize:14,marginTop:20},children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.9+Qhjr",defaultMessage:"You don’t have any custom workflows yet. Get started by clicking the Create New button above!",description:"text"})})]})}const useStyles$7$1=makeStyles()(e=>({dividerSmallMargin:{marginTop:e.spacing(3.6),marginBottom:e.spacing(4)},utilityItem:{padding:0,cursor:"pointer"},utilityItemHover:{padding:e.spacing(2,0),"&:hover":{backgroundColor:e.palette.background.paper}},utilityDetail:{fontSize:12}}));function NotificationSettingItem(e){const{imgSrc:t,primaryText:n,secondaryText:r,bigSize:i,onOpenUtility:o,onOpenApplication:a,hideDivider:s,applicationId:l,applicationTitle:c,utilityId:u="",utilityTitle:d="Finder",disabled:p,isHover:f}=e;e=useStyles$7$1().classes;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:classnames(e.utilityItem,f?e.utilityItemHover:""),onClick:function(){null!==o&&void 0!==o&&o(u,d),null!==a&&void 0!==a&&a(l,c)},disabled:p,"data-testid":"notification-setting-item"},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,{children:jsxRuntime.exports.jsx(Avatar$1,{style:{width:i?60:40,height:i?60:40,borderRadius:"50%",marginRight:19},src:t})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"h3":"body2",children:n}),secondary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"body2":"caption",children:r})})]})),!s&&jsxRuntime.exports.jsx(Divider$1,{className:f?"":e.dividerSmallMargin})]})}const useStyles$6$1=makeStyles()(e=>({notificationTypeItemBox:{background:e.palette.background.paper,borderRadius:e.shape.borderRadius,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",padding:e.spacing(4,1,1),height:"100%",fontSize:10,lineHeight:"16px",justifyContent:"center"},disableType:{color:e.palette.grey[500]}}));function NotificationTypeItem(e){const{notificationTypeIcon:t,notificationTypeName:n,defaultSelected:r,onSelectNotificationType:i,notificationTypeId:o,isDisabled:a}=e,[s,l]=react.exports.useState(r);e=useStyles$6$1().classes;return jsxRuntime.exports.jsxs("div",Object.assign({className:classnames(e.notificationTypeItemBox,a?e.disableType:""),"data-testid":"notification-type-item"},{children:[jsxRuntime.exports.jsx("div",{children:"string"==typeof t?jsxRuntime.exports.jsx("img",{src:t,alt:"icon",draggable:"false"}):t}),jsxRuntime.exports.jsx("div",{children:n}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Checkbox$1,{icon:jsxRuntime.exports.jsx("img",{src:img$1k,alt:"uncheck icon",draggable:"false"}),checkedIcon:jsxRuntime.exports.jsx("img",{src:img$1j,alt:"checked icon",draggable:"false"}),checked:s,onChange:function(){l(e=>(null!==i&&void 0!==i&&i(o,!e),!e))},disabled:!!a})})]}))}const useStyles$5$1=makeStyles()(e=>({notificationTypeBox:{paddingBottom:e.spacing(0)},notificationTypeHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:16,lineHeight:"22px",fontWeight:600,marginBottom:e.spacing(2)},notificationList:{display:"inline-grid",gridColumnGap:e.spacing(2.8),gridTemplateColumns:"1fr 1fr 1fr",width:"100%",marginBottom:e.spacing(4.4)},divider:{marginTop:e.spacing(4),marginBottom:e.spacing(4.4)},dividerWithoutDescription:{marginBottom:e.spacing(3)}})),defaultNotificationTypeList=[{id:INotificationType.EMAIL,notificationTypeIcon:jsxRuntime.exports.jsx(Email,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.rTFvFj",defaultMessage:"Email",description:"allow notification types: email"}),isSelected:!0},{id:INotificationType.NOTIFICATION_CENTER,notificationTypeIcon:jsxRuntime.exports.jsx(HelpCenter$1,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.SmyvFq",defaultMessage:"Notification Center",description:"allow notification types: Notification Center"}),isSelected:!0},{id:INotificationType.BANNER,notificationTypeIcon:jsxRuntime.exports.jsx(Banner,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.r7Whww",defaultMessage:"Banners",description:"allow notification types: Banners"}),isSelected:!0}];function NotificationType(e){const{notificationTypeTitle:t,children:n,description:r,allowTypes:i=[],allowNotification:o,onChangeAllowType:a,hideDivider:s,onChangeNotificationType:l,disabledTypes:c=[]}=e,[u,d]=react.exports.useState(!!o),[p,f]=react.exports.useState(defaultNotificationTypeList);e=useStyles$5$1().classes;const h=[...i],[m,g]=react.exports.useState(i);var y=t||"Allow Notifications";return react.exports.useEffect(()=>{var e=defaultNotificationTypeList.map(t=>{var e=-1!==m.findIndex(e=>e===t.id),n=-1!==c.findIndex(e=>e===t.id);return Object.assign(Object.assign({},t),{isSelected:e,isDisabled:n})});f(e)},[h.join(", "),m]),react.exports.useEffect(()=>{null!==a&&void 0!==a&&a(u),u?0===m.length&&u&&g([INotificationType.EMAIL]):g([])},[u]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeBox},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeHeader},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.8Z0yyD",defaultMessage:"{title}",description:"notification setting: allow notification types",values:{title:y}})}),jsxRuntime.exports.jsx(Switch$1,{checked:u,onChange:function(){d(e=>!e)},color:"primary",name:"notificationTypeChecked","data-testid":"notification-type-switch"})]})),n,jsxRuntime.exports.jsx("div",Object.assign({className:e.notificationList},{children:p.map(t=>{var e=-1!==c.findIndex(e=>e===t.id)||!u;return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationTypeItem,{notificationTypeIcon:t.notificationTypeIcon,notificationTypeName:t.notificationTypeName,defaultSelected:t.isSelected,onSelectNotificationType:l,notificationTypeId:t.id,isDisabled:e})},t.id+"-"+t.isSelected)})})),r,!s&&jsxRuntime.exports.jsx(Divider$1,{className:r?e.divider:e.dividerWithoutDescription})]}))}const useStyles$4$1=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},itemCell:{padding:0,"& > span":{padding:e.spacing(0,2)}},eventNameContainer:{display:"flex",alignItems:"center"},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0},customLineHeight:{lineHeight:e.spacing(8)},disabledCheckBox:{"& svg":{color:"green"}}}));function NotificationUtilityActionItem(e){const{events:t,disabled:n}=e,r=useStyles$4$1()["classes"],i=[{type:INotificationType.EMAIL,iconUrl:img$1n},{type:INotificationType.NOTIFICATION_CENTER,iconUrl:img$1m},{type:INotificationType.BANNER,iconUrl:img$1l}];return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"customized table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:r.itemCell},{children:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:e.type})}),e.type))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null===t||void 0===t?void 0:t.map(t=>jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsxs(TableCell$1,Object.assign({className:classnames(r.eventNameContainer,r.tableCell)},{children:[jsxRuntime.exports.jsx(Checkbox$1,{id:t.id,disabled:n,className:r.tableRowCheckbox}),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.VNVmyk",defaultMessage:"{defaultMessage}",description:"Finder notifications: {defaultMessage}",values:{defaultMessage:t.title,id:t.id}})})})]})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.itemCell},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t.id,icon:jsxRuntime.exports.jsx(default_1$5,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{})})}),e.type+"-type"))]},t.id))})]}))})}const useStyles$3$2=makeStyles()(e=>({finderNotification:{padding:e.spacing(4,6),maxHeight:"100%",overflow:"auto"},buttonBox:{display:"flex",justifyContent:"flex-end",marginTop:e.spacing(8)},buttonLeft:{marginRight:e.spacing(4)},settingItem:{marginBottom:e.spacing(6)},sharedItem:{padding:0}}));function NotificationUtilityPanel(e){const t=e["dataId"];e=useStyles$3$2().classes;const n=useSelector(notificationSelector).settings,r=n.utility;var i=null===r||void 0===r?void 0:r.find(e=>e.id===t);const[o,a]=react.exports.useState(i||{}),s=[],l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER];return l.forEach(t=>{-1===n.allowType.findIndex(e=>e===t)&&s.push(t)}),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.finderNotification},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null==o?void 0:o.allowType,allowNotification:null==o?void 0:o.allow,onChangeAllowType:function(r){a(e=>{var t=r?[...e.allowType]:[],n=r?[...e.action]:[...e.action].map(e=>Object.assign(Object.assign({},e),{allow:!1}));return Object.assign(Object.assign({},e),{allow:r,allowType:t,action:n})})},onChangeNotificationType:function(r,i){a(e=>{const t=[...e.allowType];var n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})},disabledTypes:s,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==o?void 0:o.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.ubNxKs",defaultMessage:"{utilityTitle}",description:"title of notification utility: {utilityTitle}",values:{id:null==o?void 0:o.id,utilityTitle:null==o?void 0:o.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.XkH621",defaultMessage:"Chose which events you’d like to be notified about.",description:"content of notification utility description"}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"})}),jsxRuntime.exports.jsx(NotificationUtilityActionItem,{events:null==o?void 0:o.action,onSelectAction:function(r){a(e=>{const t=[...e.action];var n=t.findIndex(e=>e.id===r.id);return t[n]=r,Object.assign(Object.assign({},e),{action:t})})},disabled:!o.allow}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}const useStyles$2$3=makeStyles()(e=>({notificationSetting:{padding:e.spacing(3,6,4.4),overflowY:"scroll",height:"100%"},appAllowTitle:{paddingTop:e.spacing(2.4)},dividerBigMargin:{marginTop:e.spacing(2.4),marginBottom:e.spacing(3)},notificationSettingItem:{padding:0},bannerStyleLabel:{fontWeight:"normal"}}));function NotificationSetting(e){var t=useStyles$2$3()["classes"];const i=useDispatch(),[n,r]=react.exports.useState(!0),[o,a]=react.exports.useState(!0);var s=useSelector(notificationSettingSelector);const[l,c]=react.exports.useState(s.bannerStyle),u=useSelector(notificationUtilitiesSelector),d=useSelector(notificationApplicationsSelector),[p,f]=react.exports.useState(null==s?void 0:s.allow),[h,m]=react.exports.useState(s);var s=-1!==(null==(s=null===h||void 0===h?void 0:h.allowType)?void 0:s.findIndex(e=>e===INotificationType.BANNER));const[g,y]=react.exports.useState(s);function v(e,t){var n={name:"NOTIFICATION_UTILITY",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},r={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"finder notifications"}};i(mountPanel$1({panelId:e||"",microFrontend:n,panelConfig:r}))}function x(e,t){var n={name:"NOTIFICATION_APPLICATION",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},r={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"app notifications"}};i(mountPanel$1({panelId:e||"",microFrontend:n,panelConfig:r}))}return react.exports.useEffect(()=>{i(updateNotificationSetting(h))},[h,i]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.notificationSetting},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null===h||void 0===h?void 0:h.allowType,allowNotification:null===h||void 0===h?void 0:h.allow,onChangeAllowType:function(n){f(n),n||(r(n),a(n)),m(e=>{var t=n?[...e.allowType]:[];return Object.assign(Object.assign({},e),{allow:n,allowType:t})})},hideDivider:g,onChangeNotificationType:function(r,i){r===INotificationType.BANNER&&y(i),m(e=>{const t=[...e.allowType];var n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})}}),p&&g&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Banner Style"}),jsxRuntime.exports.jsx(FormControl$1,Object.assign({component:"fieldset"},{children:jsxRuntime.exports.jsxs(RadioGroup$1,Object.assign({"aria-label":"bannerStyle",name:"bannerStyle",value:l,onChange:e=>{c(e.target.value),i(updateBannerStyle(e.target.value))},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel$1,{value:"temporary",control:jsxRuntime.exports.jsx(Radio$1,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Temporary"})})}),jsxRuntime.exports.jsx(FormControlLabel$1,{value:"persistent",control:jsxRuntime.exports.jsx(Radio$1,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Persistent"})})})]}))})),jsxRuntime.exports.jsx(Divider$1,{className:t.dividerBigMargin})]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.qJ0Sxo",defaultMessage:"Allow Utility Notifications",description:"allow-utility-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:n,onChange:e=>{e=e.target.checked;r(e)},color:"primary",name:"enableUtilityNotification",disabled:!p})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:t.notificationSettingItem},{children:null===u||void 0===u?void 0:u.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:e.iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tadsU0",defaultMessage:"{defaultMessage}",description:"title of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.allowType.join(", ")}}),onOpenUtility:v,utilityId:e.id,utilityTitle:e.title,disabled:!n},e.id))}))]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",className:t.appAllowTitle},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.swIpqY",defaultMessage:"Allow Application Notifications",description:"allow-application-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:o,onChange:e=>{e=e.target.checked;a(e)},color:"primary",name:"checkedB",disabled:!p})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:t.notificationSettingItem},{children:null==(s=null===d||void 0===d?void 0:d.allIds)?void 0:s.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:null===d||void 0===d?void 0:d.byId[e].iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.JvsYLn",defaultMessage:"{defaultMessage}",description:"title of notification application: {defaultMessage}",values:{idMessage:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].allowType.join(", ")}}),onOpenApplication:x,applicationId:e,applicationTitle:null===d||void 0===d?void 0:d.byId[e].name,disabled:!o},e))}))]})]}))})}const useStyles$1$3=makeStyles()(e=>({appNoti:{padding:e.spacing(6),paddingTop:e.spacing(4.4),overflowY:"scroll",height:"100%"}})),useStyles$f=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0,paddingTop:0,paddingBottom:0,height:"20px"},disabledCheckBox:{"& svg":{color:"green"}},firstColumn:{paddingRight:e.spacing(2)},secondColumn:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},thirdColumn:{paddingLeft:e.spacing(2)}}));function NotificationAllowCell(e){const{id:t,type:n,allowType:r,currentApplicationAllowType:i,isLineEnable:o,onChangeAppAction:a}=e,s=useStyles$f()["classes"];e=(e,t)=>{switch(t){case"email":return e.includes(INotificationType.EMAIL);case"banners":return e.includes(INotificationType.BANNER);case"notification-center":return e.includes(INotificationType.NOTIFICATION_CENTER)}};return jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:s.tableCell+" "+(()=>{switch(t){case"email":return s.firstColumn;case"notification-center":return s.secondColumn;case"banners":return s.thirdColumn;default:return""}})()},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t,checked:e(r,t),disabled:!e(i,t)||!o,icon:jsxRuntime.exports.jsx(default_1$5,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{color:e(i,t)&&o?"primary":"disabled"}),onChange:e=>{a(e,n)}})}))}function NotificationAllowRow(e){const{allowNotificationTitle:t,checked:n,allowType:r,appId:i,id:o}=e;e=useStyles$f().classes;const a=useDispatch();var s=useSelector(notificationApplicationSelector(i));const[l,c]=react.exports.useState(n),u=null==s?void 0:s.allowType,[d,p]=react.exports.useState(r),f=[{id:"email",type:INotificationType.EMAIL},{id:"notification-center",type:INotificationType.NOTIFICATION_CENTER},{id:"banners",type:INotificationType.BANNER}];const h=(e,t)=>{let n;n=e.currentTarget.checked?[...d,t]:d.filter(e=>e!==t),p(n),a(updateAppActionAllowNotification(i,o,n,"allowType"))};return jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({component:"th",scope:"row",className:e.tableCell},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Checkbox$1,{"data-test":"row-check-"+o,"data-testid":"row-check-"+o,className:e.rowCheckbox,checked:l,onChange:e=>{e=e.currentTarget.checked;c(e),a(updateAppActionAllowNotification(i,o,e,"allow"))}}),jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tSG+Bv",defaultMessage:"{text}",description:"allow-notification-table-{text}",values:{text:t}})})]}))})),f.map(e=>jsxRuntime.exports.jsx(NotificationAllowCell,{id:e.id,type:e.type,allowType:r,currentApplicationAllowType:u,isLineEnable:l,onChangeAppAction:h},e.id))]})}function NotificationAllowTable(e){const{action:n,appId:r}=e;var e=useStyles$f()["classes"],t=classnames(e.tableCell,e.firstColumn),i=classnames(e.tableCell,e.secondColumn),o=classnames(e.tableCell,e.thirdColumn);return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"notification-table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:e.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:t},{children:jsxRuntime.exports.jsx("img",{src:img$1n,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:i},{children:jsxRuntime.exports.jsx("img",{src:img$1m,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:o},{children:jsxRuntime.exports.jsx("img",{src:img$1l,alt:"img-icon"})}))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==(e=null===n||void 0===n?void 0:n.allIds)?void 0:e.map(e=>{var t;return jsxRuntime.exports.jsx(NotificationAllowRow,{allowNotificationTitle:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.title,checked:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allow,allowType:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allowType,appId:r,id:e},e)})})]}))})}function NotificationApplication(e){const o=e["dataId"];var e=useStyles$1$3()["classes"];const t=useDispatch();var n=useSelector(notificationApplicationsSelector);const[r,a]=react.exports.useState(n),i=useSelector(notificationSelector).settings;var s=useSelector(notificationApplicationSelector(o));react.exports.useEffect(()=>{t(updateApplicationSetting(r))},[r]);const l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER],c=[];l.forEach(t=>{-1===(null===i||void 0===i?void 0:i.allowType.findIndex(e=>e===t))&&c.push(t)});return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.appNoti},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationType,{notificationTypeTitle:"Allow Notifications",allowNotification:null==n?void 0:n.byId[o].allow,allowTypes:null==(e=null==n?void 0:n.byId[o])?void 0:e.allowType,disabledTypes:c,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==(e=null==n?void 0:n.byId[o])?void 0:e.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.OR1ivL",defaultMessage:"{text}",description:"notification-app-id",values:{text:null==s?void 0:s.name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.QgzNQa",defaultMessage:"{text}",description:"notification application detail text",values:{text:null==s?void 0:s.description}}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"}),onChangeNotificationType:function(r,i){a(e=>{const t=[...e.byId[o].allowType];var n=t.indexOf(r);return i&&-1===n?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[o]:Object.assign(Object.assign({},e.byId[o]),{allowType:t})})})})},onChangeAllowType:e=>{t(updateAppAllowNotification(o,e))}})}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(NotificationAllowTable,{action:null==(e=null==n?void 0:n.byId[o])?void 0:e.action,appId:o}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}})]}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}var index_esm$2=Object.freeze({__proto__:null,NotificationApplication:NotificationApplication,NotificationDetailPanel:NotificationDetailPanel,NotificationPanel:NotificationPanel,NotificationSetting:NotificationSetting,NotificationUtilityPanel:NotificationUtilityPanel,initNotificationAction:initNotificationAction,onNotificationActionClicked:onNotificationActionClicked}),Search={},_interopRequireDefault$4=interopRequireDefault.exports,default_1$4=(Object.defineProperty(Search,"__esModule",{value:!0}),Search.default=void 0),_createSvgIcon$4=_interopRequireDefault$4(createSvgIcon),_jsxRuntime$4=jsxRuntime.exports,_default$4=(0,_createSvgIcon$4.default)((0,_jsxRuntime$4.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");function getLoadingButtonUtilityClass(e){return generateUtilityClass("MuiLoadingButton",e)}default_1$4=Search.default=_default$4;const loadingButtonClasses=generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var loadingButtonClasses$1=loadingButtonClasses;const _excluded=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],useUtilityClasses=e=>{var{loading:e,loadingPosition:t,classes:n}=e;return _extends({},n,composeClasses({root:["root",e&&"loading"],startIcon:[e&&"startIconLoading"+capitalize$2(t)],endIcon:[e&&"endIconLoading"+capitalize$2(t)],loadingIndicator:["loadingIndicator",e&&"loadingIndicator"+capitalize$2(t)]},getLoadingButtonUtilityClass,n))},rootShouldForwardProp=e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e,LoadingButtonRoot=styled$1(Button$1,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& ."+loadingButtonClasses$1.startIconLoadingStart]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& ."+loadingButtonClasses$1.endIconLoadingEnd]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>_extends({[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),["&."+loadingButtonClasses$1.loading]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),LoadingButtonLoadingIndicator=styled$1("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{e=e.ownerState;return[t.loadingIndicator,t["loadingIndicator"+capitalize$2(e.loadingPosition)]]}})(({theme:e,ownerState:t})=>_extends({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:e.palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10})),LoadingButton=react.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiLoadingButton"}),{children:n,disabled:r=!1,id:i,loading:o=!1,loadingIndicator:a,loadingPosition:s="center",variant:l="text"}=e,c=_objectWithoutPropertiesLoose$2(e,_excluded),i=useId(i),a=null!=a?a:jsxRuntime.exports.jsx(CircularProgress$1,{"aria-labelledby":i,color:"inherit",size:16}),e=_extends({},e,{disabled:r,loading:o,loadingIndicator:a,loadingPosition:s,variant:l}),s=useUtilityClasses(e);return jsxRuntime.exports.jsx(LoadingButtonRoot,_extends({disabled:r||o,id:i,ref:t},c,{variant:l,classes:s,ownerState:e,children:"end"===e.loadingPosition?jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[n,o&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a})]}):jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[o&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a}),n]})}))});var LoadingButton$1=LoadingButton,Link={},_interopRequireDefault$3=interopRequireDefault.exports,default_1$3=(Object.defineProperty(Link,"__esModule",{value:!0}),Link.default=void 0),_createSvgIcon$3=_interopRequireDefault$3(createSvgIcon),_jsxRuntime$3=jsxRuntime.exports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link"),default_1$3=Link.default=_default$3,cropper={exports:{}},Cropper=(!function(){function N(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function P(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?N(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):N(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e){return"number"==typeof e&&!ie(e)}function i(e){return void 0===e}function o(e){return"object"===D(e)&&null!==e}function f(e){if(!o(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&ae.call(n,"isPrototypeOf")}catch(e){return!1}}function c(e){return"function"==typeof e}function F(e){return Array.from?Array.from(e):se.call(e)}function _(n,r){return n&&c(r)&&(Array.isArray(n)||p(n.length)?F(n).forEach(function(e,t){r.call(n,e,t,n)}):o(n)&&Object.keys(n).forEach(function(e){r.call(n,n[e],e,n)})),n}function j(e,t){var n=1<arguments.length&&void 0!==t?t:1e11;return le.test(e)?Math.round(e*n)/n:e}function h(e,t){var n=e.style;_(t,function(e,t){ce.test(t)&&p(e)&&(e="".concat(e,"px")),n[t]=e})}function u(e,t){var n;t&&(p(e.length)?_(e,function(e){u(e,t)}):e.classList?e.classList.add(t):(n=e.className.trim())?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t)}function T(e,t){t&&(p(e.length)?_(e,function(e){T(e,t)}):e.classList?e.classList.remove(t):0<=e.className.indexOf(t)&&(e.className=e.className.replace(t,"")))}function a(e,t,n){t&&(p(e.length)?_(e,function(e){a(e,t,n)}):(n?u:T)(e,t))}function s(e){return e.replace(ue,"$1-$2").toLowerCase()}function B(e,t){return o(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(s(t)))}function d(e,t,n){o(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(s(t)),n)}function l(n,e,r,t){var i=3<arguments.length&&void 0!==t?t:{},o=r;e.trim().split(de).forEach(function(e){var t;pe||(t=n.listeners)&&t[e]&&t[e][r]&&(o=t[e][r],delete t[e][r],0===Object.keys(t[e]).length&&delete t[e],0===Object.keys(t).length&&delete n.listeners),n.removeEventListener(e,o,i)})}function m(o,e,a,t){var s=3<arguments.length&&void 0!==t?t:{},l=a;e.trim().split(de).forEach(function(r){var e,i;s.once&&!pe&&(e=o.listeners,l=function(){delete i[r][a],o.removeEventListener(r,l,s);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(o,t)},(i=void 0===e?{}:e)[r]||(i[r]={}),i[r][a]&&o.removeEventListener(r,i[r][a],s),i[r][a]=l,o.listeners=i),o.addEventListener(r,l,s)})}function g(e,t,n){var r;return c(Event)&&c(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function U(e){e=e.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}function Z(e){e=e.match(fe);return null!==e&&(e[1]!==t.protocol||e[2]!==t.hostname||e[3]!==t.port)}function z(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function y(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,e=e.translateY,o=[],i=(p(i)&&0!==i&&o.push("translateX(".concat(i,"px)")),p(e)&&0!==e&&o.push("translateY(".concat(e,"px)")),p(t)&&0!==t&&o.push("rotate(".concat(t,"deg)")),p(n)&&1!==n&&o.push("scaleX(".concat(n,")")),p(r)&&1!==r&&o.push("scaleY(".concat(r,")")),o.length?o.join(" "):"none");return{WebkitTransform:i,msTransform:i,transform:i}}function v(e,t){var n=e.pageX,e=e.pageY,r={endX:n,endY:e};return t?r:P({startX:n,startY:e},r)}function I(e,t){var n,r=e.aspectRatio,i=e.height,o=e.width,a=1<arguments.length&&void 0!==t?t:"contain",s=oe(o),l=oe(i);return s&&l?(n=i*r,"contain"===a&&o<n||"cover"===a&&n<o?i=o/r:o=i*r):s?i=o/r:l&&(o=i*r),{width:o,height:i}}var x,C,b,$,W,E,G,q,w,S,R,O,L,M,A,K,Y,Q,X,J,ee,te,ne,re,ie,oe,ae,se,k,le,ce,ue,de,pe,t,fe,he,me,e,n,ge,ye,ve,xe,Ce,be;cropper.exports=(x="undefined"!=typeof window&&void 0!==window.document,C=x?window:{},n=!(!x||!C.document.documentElement)&&"ontouchstart"in C.document.documentElement,e=x&&"PointerEvent"in C,$="".concat(b="cropper","-crop"),W="".concat(b,"-disabled"),E="".concat(b,"-hidden"),G="".concat(b,"-hide"),q="".concat(b,"-invisible"),w="".concat(b,"-modal"),S="".concat(b,"-move"),R="".concat(b,"Action"),O="".concat(b,"Preview"),L="cropend",M="cropmove",A="cropstart",K=e?"pointerdown":n?"touchstart":"mousedown",Y=e?"pointermove":n?"touchmove":"mousemove",Q=e?"pointerup pointercancel":n?"touchend touchcancel":"mouseup",X="image/jpeg",J=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ee=/^data:/,te=/^data:image\/jpeg;base64,/,ne=/^img|canvas$/i,re={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},ie=Number.isNaN||C.isNaN,oe=function(e){return 0<e&&e<1/0},ae=Object.prototype.hasOwnProperty,se=Array.prototype.slice,k=Object.assign||function(n){for(var e=arguments.length,t=new Array(1<e?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return o(n)&&0<t.length&&t.forEach(function(t){o(t)&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},le=/\.\d*(?:0|9){12}\d*$/,ce=/^width|height|left|top|marginLeft|marginTop$/,ue=/([a-z\d])([A-Z])/g,de=/\s\s*/,pe=function(){var t,e,n,r=!1;return x&&(t=!1,e=function(){},n=Object.defineProperty({},"once",{get:function(){return r=!0,t},set:function(e){t=e}}),C.addEventListener("test",e,n),C.removeEventListener("test",e,n)),r}(),t=C.location,fe=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i,he=String.fromCharCode,me=/^data:.*,/,e={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,n=this.container,r=this.cropper,i=Number(t.minContainerWidth),t=Number(t.minContainerHeight),i=(u(r,E),T(e,E),{width:Math.max(n.offsetWidth,0<=i?i:200),height:Math.max(n.offsetHeight,0<=t?t:100)});h(r,{width:(this.containerData=i).width,height:i.height}),u(e,E),T(r,E)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180==90,i=r?t.naturalHeight:t.naturalWidth,r=r?t.naturalWidth:t.naturalHeight,t=i/r,o=e.width,a=e.height,t=(e.height*t>e.width?3===n?o=e.height*t:a=e.width/t:3===n?a=e.width/t:o=e.height*t,{aspectRatio:t,naturalWidth:i,naturalHeight:r,width:o,height:a});this.canvasData=t,this.limited=1===n||2===n,this.limitCanvas(!0,!0),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),t.left=(e.width-t.width)/2,t.top=(e.height-t.height)/2,t.oldLeft=t.left,t.oldTop=t.top,this.initialCanvasData=k({},t)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=i.aspectRatio,l=this.cropped&&o;e&&(e=Number(n.minCanvasWidth)||0,n=Number(n.minCanvasHeight)||0,1<a?(e=Math.max(e,r.width),n=Math.max(n,r.height),3===a&&(e<n*s?e=n*s:n=e/s)):0<a&&(e?e=Math.max(e,l?o.width:0):n?n=Math.max(n,l?o.height:0):l&&((e=o.width)<(n=o.height)*s?e=n*s:n=e/s)),e=(s=I({aspectRatio:s,width:e,height:n})).width,n=s.height,i.minWidth=e,i.minHeight=n,i.maxWidth=1/0,i.maxHeight=1/0),t&&((l?0:1)<a?(s=r.width-i.width,e=r.height-i.height,i.minLeft=Math.min(0,s),i.minTop=Math.min(0,e),i.maxLeft=Math.max(0,s),i.maxTop=Math.max(0,e),l&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,2===a&&(i.width>=r.width&&(i.minLeft=Math.min(0,s),i.maxLeft=Math.max(0,s)),i.height>=r.height&&(i.minTop=Math.min(0,e),i.maxTop=Math.max(0,e))))):(i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=r.width,i.maxTop=r.height))},renderCanvas:function(e,t){var n,r,i=this.canvasData,o=this.imageData;t&&(o=(t=function(e){var t=e.width,n=e.height,e=e.degree;if(90==(e=Math.abs(e)%180))return{width:n,height:t};var r=e%90*Math.PI/180,i=Math.sin(r),r=Math.cos(r),o=t*r+n*i,t=t*i+n*r;return 90<e?{width:t,height:o}:{width:o,height:t}}({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0})).width,t=t.height,n=i.width*(o/i.naturalWidth),r=i.height*(t/i.naturalHeight),i.left-=(n-i.width)/2,i.top-=(r-i.height)/2,i.width=n,i.height=r,i.aspectRatio=o/t,i.naturalWidth=o,i.naturalHeight=t,this.limitCanvas(!0,!1)),(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,h(this.canvas,k({width:i.width,height:i.height},y({translateX:i.left,translateY:i.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,n=this.imageData,r=n.naturalWidth*(t.width/t.naturalWidth),i=n.naturalHeight*(t.height/t.naturalHeight);k(n,{width:r,height:i,left:(t.width-r)/2,top:(t.height-i)/2}),h(this.image,k({width:n.width,height:n.height},y(k({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,e=Number(e.autoCropArea)||.8,r={width:t.width,height:t.height};n&&(t.height*n>t.width?r.height=r.width/n:r.width=r.height*n),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*e),r.height=Math.max(r.minHeight,r.height*e),r.left=t.left+(t.width-r.width)/2,r.top=t.top+(t.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=k({},r)},limitCropBox:function(e,t){var n,r,i=this.options,o=this.containerData,a=this.canvasData,s=this.cropBoxData,l=this.limited,c=i.aspectRatio;e&&(e=Number(i.minCropBoxWidth)||0,i=Number(i.minCropBoxHeight)||0,n=l?Math.min(o.width,a.width,a.width+a.left,o.width-a.left):o.width,r=l?Math.min(o.height,a.height,a.height+a.top,o.height-a.top):o.height,e=Math.min(e,o.width),i=Math.min(i,o.height),c&&(e&&i?e<i*c?i=e/c:e=i*c:e?i=e/c:i&&(e=i*c),n<r*c?r=n/c:n=r*c),s.minWidth=Math.min(e,n),s.minHeight=Math.min(i,r),s.maxWidth=n,s.maxHeight=r),t&&(l?(s.minLeft=Math.max(0,a.left),s.minTop=Math.max(0,a.top),s.maxLeft=Math.min(o.width,a.left+a.width)-s.width,s.maxTop=Math.min(o.height,a.top+a.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=o.width-s.width,s.maxTop=o.height-s.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&d(this.face,R,n.width>=t.width&&n.height>=t.height?"move":"all"),h(this.cropBox,k({width:n.width,height:n.height},y({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),g(this.element,"crop",this.getData())}},n={initPreview:function(){var e=this.element,n=this.crossOrigin,t=this.options.preview,r=n?this.crossOriginUrl:this.url,i=e.alt||"The image to preview",o=document.createElement("img");n&&(o.crossOrigin=n),o.src=r,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,t&&("string"==typeof(o=t)?o=e.ownerDocument.querySelectorAll(t):t.querySelector&&(o=[t]),_(this.previews=o,function(e){var t=document.createElement("img");d(e,O,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),n&&(t.crossOrigin=n),t.src=r,t.alt=i,t.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(t)}))},resetPreview:function(){_(this.previews,function(t){var n=B(t,O),n=(h(t,{width:n.width,height:n.height}),t.innerHTML=n.html,t),t=O;if(o(n[t]))try{delete n[t]}catch(e){n[t]=void 0}else if(n.dataset)try{delete n.dataset[t]}catch(e){n.dataset[t]=void 0}else n.removeAttribute("data-".concat(s(t)))})},preview:function(){var a=this.imageData,e=this.canvasData,t=this.cropBoxData,s=t.width,l=t.height,c=a.width,u=a.height,d=t.left-e.left-a.left,p=t.top-e.top-a.top;this.cropped&&!this.disabled&&(h(this.viewBoxImage,k({width:c,height:u},y(k({translateX:-d,translateY:-p},a)))),_(this.previews,function(e){var t=B(e,O),n=t.width,t=t.height,r=n,i=t,o=1;s&&(i=l*(o=n/s)),l&&t<i&&(r=s*(o=t/l),i=t),h(e,{width:r,height:i}),h(e.getElementsByTagName("img")[0],k({width:c*o,height:u*o},y(k({translateX:-d*o,translateY:-p*o},a))))}))}},ge={bind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&m(e,A,t.cropstart),c(t.cropmove)&&m(e,M,t.cropmove),c(t.cropend)&&m(e,L,t.cropend),c(t.crop)&&m(e,"crop",t.crop),c(t.zoom)&&m(e,"zoom",t.zoom),m(n,K,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&m(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&m(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),m(e.ownerDocument,Y,this.onCropMove=this.cropMove.bind(this)),m(e.ownerDocument,Q,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&m(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&l(e,A,t.cropstart),c(t.cropmove)&&l(e,M,t.cropmove),c(t.cropend)&&l(e,L,t.cropend),c(t.crop)&&l(e,"crop",t.crop),c(t.zoom)&&l(e,"zoom",t.zoom),l(n,K,this.onCropStart),t.zoomable&&t.zoomOnWheel&&l(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&l(n,"dblclick",this.onDblclick),l(e.ownerDocument,Y,this.onCropMove),l(e.ownerDocument,Q,this.onCropEnd),t.responsive&&l(window,"resize",this.onResize)}},ye={resize:function(){var e,t,n,r,i,o,a;this.disabled||(e=this.options,r=this.container,t=this.containerData,n=r.offsetWidth/t.width,r=r.offsetHeight/t.height,1!=(i=Math.abs(n-1)>Math.abs(r-1)?n:r)&&(e.restore&&(o=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(_(o,function(e,t){o[t]=e*i})),this.setCropBoxData(_(a,function(e,t){a[t]=e*i})))))},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=$,(e.classList?e.classList.contains(t):-1<e.className.indexOf(t))?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),e.deltaY?r=0<e.deltaY?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=0<e.detail?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t,n=e.buttons,r=e.button;this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(p(n)&&1!==n||p(r)&&0!==r||e.ctrlKey)||(n=this.options,t=this.pointers,e.changedTouches?_(e.changedTouches,function(e){t[e.identifier]=v(e)}):t[e.pointerId||0]=v(e),r=1<Object.keys(t).length&&n.zoomable&&n.zoomOnTouch?"zoom":B(e.target,R),J.test(r)&&!1!==g(this.element,A,{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r&&(this.cropping=!0,u(this.dragBox,w))))},cropMove:function(e){var t,n=this.action;!this.disabled&&n&&(t=this.pointers,e.preventDefault(),!1!==g(this.element,M,{originalEvent:e,action:n})&&(e.changedTouches?_(e.changedTouches,function(e){k(t[e.identifier]||{},v(e,!0))}):k(t[e.pointerId||0]||{},v(e,!0)),this.change(e)))},cropEnd:function(e){var t,n;this.disabled||(t=this.action,n=this.pointers,e.changedTouches?_(e.changedTouches,function(e){delete n[e.identifier]}):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,a(this.dragBox,w,this.cropped&&this.options.modal)),g(this.element,L,{originalEvent:e,action:t})))}},ve={change:function(e){function t(e){switch(e){case"e":g+S.x>C&&(S.x=C-g);break;case"w":p+S.x<v&&(S.x=v-p);break;case"n":f+S.y<x&&(S.y=x-f);break;case"s":y+S.y>b&&(S.y=b-y)}}var n,r,o,i=this.options,a=this.canvasData,s=this.containerData,l=this.cropBoxData,c=this.pointers,u=this.action,d=i.aspectRatio,p=l.left,f=l.top,h=l.width,m=l.height,g=p+h,y=f+m,v=0,x=0,C=s.width,b=s.height,$=!0,w=(!d&&e.shiftKey&&(d=h&&m?h/m:1),this.limited&&(v=l.minLeft,x=l.minTop,C=v+Math.min(s.width,a.width,a.left+a.width),b=x+Math.min(s.height,a.height,a.top+a.height)),c[Object.keys(c)[0]]),S={x:w.endX-w.startX,y:w.endY-w.startY};switch(u){case"all":p+=S.x,f+=S.y;break;case"e":if(0<=S.x&&(C<=g||d&&(f<=x||b<=y))){$=!1;break}t("e"),(h+=S.x)<0&&(u="w",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2);break;case"n":if(S.y<=0&&(f<=x||d&&(p<=v||C<=g))){$=!1;break}t("n"),m-=S.y,f+=S.y,m<0&&(u="s",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2);break;case"w":if(S.x<=0&&(p<=v||d&&(f<=x||b<=y))){$=!1;break}t("w"),h-=S.x,p+=S.x,h<0&&(u="e",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2);break;case"s":if(0<=S.y&&(b<=y||d&&(p<=v||C<=g))){$=!1;break}t("s"),(m+=S.y)<0&&(u="n",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2);break;case"ne":if(d){if(S.y<=0&&(f<=x||C<=g)){$=!1;break}t("n"),m-=S.y,f+=S.y,h=m*d}else t("n"),t("e"),!(0<=S.x)||g<C?h+=S.x:S.y<=0&&f<=x&&($=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="sw",f-=m=-m,p-=h=-h):h<0?(u="nw",p-=h=-h):m<0&&(u="se",f-=m=-m);break;case"nw":if(d){if(S.y<=0&&(f<=x||p<=v)){$=!1;break}t("n"),m-=S.y,f+=S.y,p+=l.width-(h=m*d)}else t("n"),t("w"),!(S.x<=0)||v<p?(h-=S.x,p+=S.x):S.y<=0&&f<=x&&($=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="se",f-=m=-m,p-=h=-h):h<0?(u="ne",p-=h=-h):m<0&&(u="sw",f-=m=-m);break;case"sw":if(d){if(S.x<=0&&(p<=v||b<=y)){$=!1;break}t("w"),h-=S.x,p+=S.x,m=h/d}else t("s"),t("w"),!(S.x<=0)||v<p?(h-=S.x,p+=S.x):0<=S.y&&b<=y&&($=!1),(!(0<=S.y)||y<b)&&(m+=S.y);h<0&&m<0?(u="ne",f-=m=-m,p-=h=-h):h<0?(u="se",p-=h=-h):m<0&&(u="nw",f-=m=-m);break;case"se":if(d){if(0<=S.x&&(C<=g||b<=y)){$=!1;break}t("e"),m=(h+=S.x)/d}else t("s"),t("e"),!(0<=S.x)||g<C?h+=S.x:0<=S.y&&b<=y&&($=!1),(!(0<=S.y)||y<b)&&(m+=S.y);h<0&&m<0?(u="nw",f-=m=-m,p-=h=-h):h<0?(u="sw",p-=h=-h):m<0&&(u="ne",f-=m=-m);break;case"move":this.move(S.x,S.y),$=!1;break;case"zoom":this.zoom((r=P({},n=c),o=0,_(n,function(i,e){delete r[e],_(r,function(e){var t=Math.abs(i.startX-e.startX),n=Math.abs(i.startY-e.startY),r=Math.abs(i.endX-e.endX),e=Math.abs(i.endY-e.endY),t=Math.sqrt(t*t+n*n),n=(Math.sqrt(r*r+e*e)-t)/t;Math.abs(n)>Math.abs(o)&&(o=n)})}),o),e),$=!1;break;case"crop":if(!S.x||!S.y){$=!1;break}n=U(this.cropper),p=w.startX-n.left,f=w.startY-n.top,h=l.minWidth,m=l.minHeight,0<S.x?u=0<S.y?"se":"ne":S.x<0&&(p-=h,u=0<S.y?"sw":"nw"),S.y<0&&(f-=m),this.cropped||(T(this.cropBox,E),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}$&&(l.width=h,l.height=m,l.left=p,l.top=f,this.action=u,this.renderCropBox()),_(c,function(e){e.startX=e.endX,e.startY=e.endY})}},xe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&u(this.dragBox,w),T(this.cropBox,E),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=k({},this.initialImageData),this.canvasData=k({},this.initialCanvasData),this.cropBoxData=k({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(k(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),T(this.dragBox,w),u(this.cropBox,E)),this},replace:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,_(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,T(this.cropper,W)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,u(this.cropper,W)),this},destroy:function(){var e=this.element;return e[b]&&(e[b]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate()),this},move:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,n=n.top;return this.moveTo(i(e)?e:r+Number(e),i(t)?t:n+Number(t))},moveTo:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(p(e)&&(n.left=e,r=!0),p(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=Number(e),this.zoomTo(n.width*(e=e<0?1/(1-e):1+e)/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r,i,o,a=this.options,s=this.canvasData,l=s.width,c=s.height,u=s.naturalWidth,d=s.naturalHeight;if(0<=(e=Number(e))&&this.ready&&!this.disabled&&a.zoomable){a=u*e,d=d*e;if(!1===g(this.element,"zoom",{ratio:e,oldRatio:l/u,originalEvent:n}))return this;n?(e=this.pointers,u=U(this.cropper),e=e&&Object.keys(e).length?(o=i=r=0,_(e,function(e){var t=e.startX,e=e.startY;r+=t,i+=e,o+=1}),{pageX:r/=o,pageY:i/=o}):{pageX:n.pageX,pageY:n.pageY},s.left-=(a-l)*((e.pageX-u.left-s.left)/l),s.top-=(d-c)*((e.pageY-u.top-s.top)/c)):f(t)&&p(t.x)&&p(t.y)?(s.left-=(a-l)*((t.x-s.left)/l),s.top-=(d-c)*((t.y-s.top)/c)):(s.left-=(a-l)/2,s.top-=(d-c)/2),s.width=a,s.height=d,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return p(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,p(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(p(t)?t:1,e)},scale:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(p(e)&&(n.scaleX=e,r=!0),p(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var n,r,e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.options,i=this.imageData,o=this.canvasData,a=this.cropBoxData;return this.ready&&this.cropped?(n={x:a.left-o.left,y:a.top-o.top,width:a.width,height:a.height},r=i.width/i.naturalWidth,_(n,function(e,t){n[t]=e/r}),e&&(o=Math.round(n.y+n.height),a=Math.round(n.x+n.width),n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=a-n.x,n.height=o-n.y)):n={x:0,y:0,width:0,height:0},t.rotatable&&(n.rotate=i.rotate||0),t.scalable&&(n.scaleX=i.scaleX||1,n.scaleY=i.scaleY||1),n},setData:function(e){var t,n=this.options,r=this.imageData,i=this.canvasData,o={};return this.ready&&!this.disabled&&f(e)&&(t=!1,n.rotatable&&p(e.rotate)&&e.rotate!==r.rotate&&(r.rotate=e.rotate,t=!0),n.scalable&&(p(e.scaleX)&&e.scaleX!==r.scaleX&&(r.scaleX=e.scaleX,t=!0),p(e.scaleY)&&e.scaleY!==r.scaleY&&(r.scaleY=e.scaleY,t=!0)),t&&this.renderCanvas(!0,!0),n=r.width/r.naturalWidth,p(e.x)&&(o.left=e.x*n+i.left),p(e.y)&&(o.top=e.y*n+i.top),p(e.width)&&(o.width=e.width*n),p(e.height)&&(o.height=e.height*n),this.setCropBoxData(o)),this},getContainerData:function(){return this.ready?k({},this.containerData):{}},getImageData:function(){return this.sized?k({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,n={};return this.ready&&_(["left","top","width","height","naturalWidth","naturalHeight"],function(e){n[e]=t[e]}),n},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&f(e)&&(p(e.left)&&(t.left=e.left),p(e.top)&&(t.top=e.top),p(e.width)?(t.width=e.width,t.height=e.width/n):p(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return(e=this.ready&&this.cropped?{left:t.left,top:t.top,width:t.width,height:t.height}:e)||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,i=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&f(e)&&(p(e.left)&&(r.left=e.left),p(e.top)&&(r.top=e.top),p(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),p(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),i&&(t?r.height=r.width/i:n&&(r.width=r.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=(S=this.image,b=this.imageData,p=t,c=e,_=b.aspectRatio,u=b.naturalWidth,f=b.naturalHeight,x=void 0===(x=b.rotate)?0:x,C=void 0===(C=b.scaleX)?1:C,b=void 0===(b=b.scaleY)?1:b,d=p.aspectRatio,y=p.naturalWidth,p=p.naturalHeight,g=void 0===(g=c.fillColor)?"transparent":g,$=void 0===($=c.imageSmoothingEnabled)||$,w=void 0===(w=c.imageSmoothingQuality)?"low":w,h=void 0===(h=c.maxWidth)?1/0:h,m=void 0===(m=c.maxHeight)?1/0:m,n=void 0===(n=c.minWidth)?0:n,c=void 0===(c=c.minHeight)?0:c,E=document.createElement("canvas"),T=E.getContext("2d"),v=I({aspectRatio:d,width:h,height:m}),d=I({aspectRatio:d,width:n,height:c},"cover"),y=Math.min(v.width,Math.max(d.width,y)),v=Math.min(v.height,Math.max(d.height,p)),d=I({aspectRatio:_,width:h,height:m}),p=I({aspectRatio:_,width:n,height:c},"cover"),h=Math.min(d.width,Math.max(p.width,u)),m=Math.min(d.height,Math.max(p.height,f)),_=[-h/2,-m/2,h,m],E.width=j(y),E.height=j(v),T.fillStyle=g,T.fillRect(0,0,y,v),T.save(),T.translate(y/2,v/2),T.rotate(x*Math.PI/180),T.scale(C,b),T.imageSmoothingEnabled=$,T.imageSmoothingQuality=w,T.drawImage.apply(T,[S].concat(H(_.map(function(e){return Math.floor(j(e))})))),T.restore(),E);if(!this.cropped)return n;var r,i,o,a,s,l,c=this.getData(),u=c.x,d=c.y,p=c.width,f=c.height,h=n.width/Math.floor(t.naturalWidth),m=(1!=h&&(u*=h,d*=h,p*=h,f*=h),p/f),g=I({aspectRatio:m,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),y=I({aspectRatio:m,width:e.minWidth||0,height:e.minHeight||0},"cover"),v=I({aspectRatio:m,width:e.width||(1!=h?n.width:p),height:e.height||(1!=h?n.height:f)}),x=v.width,C=v.height,x=Math.min(g.width,Math.max(y.width,x)),C=Math.min(g.height,Math.max(y.height,C)),b=document.createElement("canvas"),$=b.getContext("2d"),w=(b.width=j(x),b.height=j(C),$.fillStyle=e.fillColor||"transparent",$.fillRect(0,0,x,C),e.imageSmoothingEnabled),S=e.imageSmoothingQuality,_=($.imageSmoothingEnabled=void 0===w||w,S&&($.imageSmoothingQuality=S),n.width),T=n.height,E=u,c=d,t=(E<=-p||_<E?s=o=r=E=0:E<=0?(o=-E,E=0,s=r=Math.min(_,p+E)):E<=_&&(o=0,s=r=Math.min(p,_-E)),r<=0||c<=-f||T<c?l=a=i=c=0:c<=0?(a=-c,c=0,l=i=Math.min(T,f+c)):c<=T&&(a=0,l=i=Math.min(f,T-c)),[E,c,r,i]);return 0<s&&0<l&&t.push(o*(m=x/p),a*m,s*m,l*m),$.drawImage.apply($,[n].concat(H(t.map(function(e){return Math.floor(j(e))})))),b},setAspectRatio:function(e){var t=this.options;return this.disabled||i(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t,n,r=this.options,i=this.dragBox,o=this.face;return this.ready&&!this.disabled&&(n=r.movable&&"move"===e,r.dragMode=e=(t="crop"===e)||n?e:"none",d(i,R,e),a(i,$,t),a(i,S,n),r.cropBoxMovable||(d(o,R,e),a(o,$,t),a(o,S,n))),this}},Ce=C.Cropper,be=function(){function i(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this,r=i;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");if(!e||!ne.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=k({},re,f(t)&&t),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var e=i,t=[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t[b]){if(t[b]=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",!(this.originalUrl=e))return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t,n,r,i,o,a,s=this;e&&(this.url=e,this.imageData={},t=this.element,(n=this.options).rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer?ee.test(e)?te.test(e)?this.read((a=(a=e).replace(me,""),r=atob(a),a=new ArrayBuffer(r.length),_(i=new Uint8Array(a),function(e,t){i[t]=r.charCodeAt(t)}),a)):this.clone():(o=new XMLHttpRequest,a=this.clone.bind(this),this.reloading=!0,(this.xhr=o).onabort=a,o.onerror=a,o.ontimeout=a,o.onprogress=function(){o.getResponseHeader("content-type")!==X&&o.abort()},o.onload=function(){s.read(o.response)},o.onloadend=function(){s.reloading=!1,s.xhr=null},n.checkCrossOrigin&&Z(e)&&t.crossOrigin&&(e=z(e)),o.open("GET",e,!0),o.responseType="arraybuffer",o.withCredentials="use-credentials"===t.crossOrigin,o.send()):this.clone())}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=function(e){var t,n,r,i,o,a,s=new DataView(e);try{if(255===s.getUint8(0)&&216===s.getUint8(1))for(var l=s.byteLength,c=2;c+1<l;){if(255===s.getUint8(c)&&225===s.getUint8(c+1)){r=c;break}c+=1}var u,d,p;if(r&&(u=r+10,"Exif"===function(e,t,n){var r="";n+=t;for(var i=t;i<n;i+=1)r+=he(e.getUint8(i));return r}(s,r+4,4)&&(d=s.getUint16(u),!(n=18761===d)&&19789!==d||42===s.getUint16(u+2,n)&&8<=(p=s.getUint32(u+4,n))&&(i=u+p))),i){var f=s.getUint16(i,n);for(a=0;a<f;a+=1)if(o=i+12*a+2,274===s.getUint16(o,n)){o+=8,t=s.getUint16(o,n),s.setUint16(o,1,n);break}}}catch(e){t=1}return t}(e),i=0,o=1,a=1;1<r&&(this.url=function(e,t){var n=[],r=new Uint8Array(e);for(;0<r.length;)n.push(he.apply(null,F(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}(e,X),i=(e=function(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90}return{rotate:t,scaleX:n,scaleY:r}}(r)).rotate,o=e.scaleX,a=e.scaleY),t.rotatable&&(n.rotate=i),t.scalable&&(n.scaleX=o,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t,i=(this.options.checkCrossOrigin&&Z(t)&&(n=n||"anonymous",r=z(t)),this.crossOrigin=n,this.crossOriginUrl=r,document.createElement("img"));n&&(i.crossOrigin=n),i.src=r||t,i.alt=e.alt||"The image to crop",(this.image=i).onload=this.start.bind(this),i.onerror=this.stop.bind(this),u(i,G),e.parentNode.insertBefore(i,e.nextSibling)}},{key:"start",value:function(){function e(e,t){k(r.imageData,{naturalWidth:e,naturalHeight:t,aspectRatio:e/t}),r.initialImageData=k({},r.imageData),r.sizing=!1,r.sized=!0,r.build()}var t,n,r=this,i=this.image,o=(i.onload=null,i.onerror=null,this.sizing=!0,C.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(C.navigator.userAgent));i.naturalWidth&&!o?e(i.naturalWidth,i.naturalHeight):(t=document.createElement("img"),n=document.body||document.documentElement,(this.sizingImage=t).onload=function(){e(t.width,t.height),o||n.removeChild(t)},t.src=i.src,o||(t.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",n.appendChild(t)))}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){var e,t,n,r,i,o,a,s,l;this.sized&&!this.ready&&(e=this.element,t=this.options,n=this.image,r=e.parentNode,(i=document.createElement("div")).innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',o=(i=i.querySelector(".".concat(b,"-container"))).querySelector(".".concat(b,"-canvas")),a=i.querySelector(".".concat(b,"-drag-box")),l=(s=i.querySelector(".".concat(b,"-crop-box"))).querySelector(".".concat(b,"-face")),this.container=r,this.cropper=i,this.canvas=o,this.dragBox=a,this.cropBox=s,this.viewBox=i.querySelector(".".concat(b,"-view-box")),this.face=l,o.appendChild(n),u(e,E),r.insertBefore(i,e.nextSibling),this.isImg||T(n,G),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,u(s,E),t.guides||u(s.getElementsByClassName("".concat(b,"-dashed")),E),t.center||u(s.getElementsByClassName("".concat(b,"-center")),E),t.background&&u(i,"".concat(b,"-bg")),t.highlight||u(l,q),t.cropBoxMovable&&(u(l,S),d(l,R,"all")),t.cropBoxResizable||(u(s.getElementsByClassName("".concat(b,"-line")),E),u(s.getElementsByClassName("".concat(b,"-point")),E)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),c(t.ready)&&m(e,"ready",t.ready,{once:!0}),g(e,"ready"))}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),T(this.element,E))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],n=[{key:"noConflict",value:function(){return window.Cropper=Ce,i}},{key:"setDefaults",value:function(e){k(re,f(e)&&e)}}];return t&&V(e.prototype,t),n&&V(e,n),i}(),k(be.prototype,e,n,ge,ye,ve,xe),be)}(),cropper.exports),__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};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}var AuthStatus,applyDefaultOptions=function(e,t){var n=(t=void 0===t?{}:t).enable,r=t.scaleX,r=void 0===r?1:r,i=t.scaleY,i=void 0===i?1:i,o=t.zoomTo,o=void 0===o?0:o,t=t.rotateTo;void 0===n||n?e.enable():e.disable(),e.scaleX(r),e.scaleY(i),void 0!==t&&e.rotateTo(t),0<o&&e.zoomTo(o)},useCombinedRefs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=react.exports.useRef(null);return React$1.useEffect(function(){e.forEach(function(e){e&&("function"==typeof e?e(n.current):e.current=n.current)})},[e]),n},ReactCropper=React$1.forwardRef(function(e,t){var e=__rest$1(e,[]),n=e.dragMode,r=void 0===n?"crop":n,i=e.src,n=e.style,o=e.className,a=e.crossOrigin,s=e.scaleX,l=e.scaleY,c=e.enable,u=e.zoomTo,d=e.rotateTo,p=e.alt,p=void 0===p?"picture":p,f=e.ready,h=e.onInitialized,m=__rest$1(e,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),g={scaleY:l,scaleX:s,enable:c,zoomTo:u,rotateTo:d},l=react.exports.useRef(null),y=useCombinedRefs(t,l);return react.exports.useEffect(function(){var e;null!=(e=y.current)&&e.cropper&&"number"==typeof u&&y.current.cropper.zoomTo(u)},[e.zoomTo]),react.exports.useEffect(function(){var e;null!=(e=y.current)&&e.cropper&&void 0!==i&&y.current.cropper.reset().clear().replace(i)},[i]),react.exports.useEffect(function(){var e;return null!==y.current&&(e=new Cropper(y.current,__assign(__assign({dragMode:r},m),{ready:function(e){null!==e.currentTarget&&applyDefaultOptions(e.currentTarget.cropper,g),f&&f(e)}})),h&&h(e)),function(){var e;null!=(e=null==(e=y.current)?void 0:e.cropper)&&e.destroy()}},[y]),React$1.createElement("div",{style:n,className:o},React$1.createElement("img",{crossOrigin:a,src:i,alt:p,style:{opacity:0,maxWidth:"100%"},ref:y}))});!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const namespace$3="users",userSelector$1=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$3]},userAuthStatusSelector=e=>{return null==(e=null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$3])?void 0:e.authStatus},GET_CURRENT_USER$1=`os-app-bar-panel/${namespace$3}/get current user`,GET_CURRENT_USER_SUCCESS$1=`os-app-bar-panel/${namespace$3}/get current user success`,RESET_BIOMETRIC=`os-app-bar-panel/${namespace$3}/reset biometric`,RESET_PASSWORD=`os-app-bar-panel/${namespace$3}/reset password`,RESET_PASSWORD_FAIL=`os-app-bar-panel/${namespace$3}/reset password fail`,UPDATE_PROFILE=`os-app-bar-panel/${namespace$3}/update profile`,UPDATE_PROFILE_FAIL=`os-app-bar-panel/${namespace$3}/update profile fail`,UPLOAD__AVATAR=`os-app-bar-panel/${namespace$3}/upload avatar`,UPDATE__AVATAR=`os-app-bar-panel/${namespace$3}/update avatar`,LOGOUT_USER=`os-app-bar-panel/${namespace$3}/logout`,LOGOUT_SUCCESS=`os-app-bar-panel/${namespace$3}/logout success`,LOGOUT_FAIL=`os-app-bar-panel/${namespace$3}/logout fail`,UPLOADING_AVATAR=`os-app-bar-panel/${namespace$3}/uploading`,UPDATE_ACTIVITY=`os-app-bar-panel/${namespace$3}/updateActivityStatus`;function getCurrentUser$1(){return{type:GET_CURRENT_USER$1}}function getCurrentUserSuccess$1(e){return{type:GET_CURRENT_USER_SUCCESS$1,payload:e}}function resetBiometric(){return{type:RESET_BIOMETRIC}}function resetPassword(e){return{type:RESET_PASSWORD,payload:e}}function resetPasswordFail(){return{type:RESET_PASSWORD_FAIL}}function updateProfile(e){return{type:UPDATE_PROFILE,payload:e}}function updateProfileFail(){return{type:UPDATE_PROFILE_FAIL}}function uploadAvatar(e){return{type:UPLOAD__AVATAR,payload:e}}function updateAvatar(e){return{type:UPDATE__AVATAR,payload:e}}function logoutUserSuccess(){return{type:LOGOUT_SUCCESS}}function logoutUserFail(){return{type:LOGOUT_FAIL}}function uploadingAvatar(e){return{type:UPLOADING_AVATAR,payload:e}}!function(e){e.AUTHENTICATED="authenticated",e.LOGGING_OUT="logging_out",e.LOGGED_OUT="logged_out"}(AuthStatus=AuthStatus||{});const initialState$3={currentUser:{},status:"idle",authStatus:AuthStatus.AUTHENTICATED};function userReducer$1(e,t){return void 0===e?initialState$3:t.type===GET_CURRENT_USER_SUCCESS$1?Object.assign(Object.assign({},e),{currentUser:t.payload,status:"success"}):t.type===UPLOADING_AVATAR?Object.assign(Object.assign({},e),{loading:t.payload}):t.type===LOGOUT_USER?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGING_OUT}):t.type===LOGOUT_SUCCESS?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGED_OUT}):t.type===LOGOUT_FAIL?Object.assign(Object.assign({},e),{authStatus:AuthStatus.AUTHENTICATED}):e}var luxon={};function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);t=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),o=0;o<i.length;o++)n=i[o],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelperLoose(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=_unsupportedIterableToArray(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(luxon,"__esModule",{value:!0});var LuxonError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(_wrapNativeSuper(Error)),InvalidDateTimeError=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidIntervalError=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidDurationError=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),ConflictingSpecificationError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),InvalidUnitError=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidArgumentError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),ZoneIsAbstractError=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(t,e),t}(LuxonError),n="numeric",s$1="short",l$1="long",DATE_SHORT={year:n,month:n,day:n},DATE_MED={year:n,month:s$1,day:n},DATE_MED_WITH_WEEKDAY={year:n,month:s$1,day:n,weekday:s$1},DATE_FULL={year:n,month:l$1,day:n},DATE_HUGE={year:n,month:l$1,day:n,weekday:l$1},TIME_SIMPLE={hour:n,minute:n},TIME_WITH_SECONDS={hour:n,minute:n,second:n},TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s$1},TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l$1},TIME_24_SIMPLE={hour:n,minute:n,hour12:!1},TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:!1},TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:s$1},TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:l$1},DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n},DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n},DATETIME_MED={year:n,month:s$1,day:n,hour:n,minute:n},DATETIME_MED_WITH_SECONDS={year:n,month:s$1,day:n,hour:n,minute:n,second:n},DATETIME_MED_WITH_WEEKDAY={year:n,month:s$1,day:n,weekday:s$1,hour:n,minute:n},DATETIME_FULL={year:n,month:l$1,day:n,hour:n,minute:n,timeZoneName:s$1},DATETIME_FULL_WITH_SECONDS={year:n,month:l$1,day:n,hour:n,minute:n,second:n,timeZoneName:s$1},DATETIME_HUGE={year:n,month:l$1,day:n,weekday:l$1,hour:n,minute:n,timeZoneName:l$1},DATETIME_HUGE_WITH_SECONDS={year:n,month:l$1,day:n,weekday:l$1,hour:n,minute:n,second:n,timeZoneName:l$1};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function isString(e){return"string"==typeof e}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function hasIntl(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts)}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,n,r){if(0!==e.length)return e.reduce(function(e,t){t=[n(t),t];return e&&r(e[0],t[0])===e[0]?e:t},null)[1]}function pick(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function hasOwnProperty$1(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,n){return isInteger(e)&&t<=e&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t){void 0===t&&(t=2);var n=e<0?"-":"",e=n?-1*e:e,t=e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString();return n+t}function parseInteger(e){if(!isUndefined(e)&&null!==e&&""!==e)return parseInt(e,10)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e)return e=1e3*parseFloat("0."+e),Math.floor(e)}function roundTo(e,t,n){void 0===n&&(n=!1);t=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*t)/t}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var n=floorMod(t-1,12)+1;return 2===n?isLeapYear(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function untruncateYear(e){return 99<e?e:60<e?1900+e:2e3+e}function parseZoneInfo(e,t,n,r){void 0===r&&(r=null);var i,e=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},r=(r&&(o.timeZone=r),Object.assign({timeZoneName:t},o)),t=hasIntl();return t&&hasFormatToParts()?(i=new Intl.DateTimeFormat(n,r).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?i.value:null:t?(i=new Intl.DateTimeFormat(n,o).format(e),new Intl.DateTimeFormat(n,r).format(e).substring(i.length).replace(/^[, \u200e]+/,"")):null}function signedOffset(e,t){e=parseInt(e,10),Number.isNaN(e)&&(e=0),t=parseInt(t,10)||0;return 60*e+(e<0||Object.is(e,-0)?-t:t)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError("Invalid unit value "+e);return t}function normalizeObject(e,t,n){var r,i,o={};for(r in e)!hasOwnProperty$1(e,r)||0<=n.indexOf(r)||null!=(i=e[r])&&(o[t(r)]=asNumber(i));return o}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=0<=e?"+":"-";switch(t){case"short":return i+padStart(n,2)+":"+padStart(r,2);case"narrow":return i+n+(0<r?":"+r:"");case"techie":return i+padStart(n,2)+padStart(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(e){return JSON.stringify(e,Object.keys(e).sort())}var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(monthsNarrow);case"short":return[].concat(monthsShort);case"long":return[].concat(monthsLong);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(weekdaysNarrow);case"short":return[].concat(weekdaysShort);case"long":return[].concat(weekdaysLong);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(erasNarrow);case"short":return[].concat(erasShort);case"long":return[].concat(erasLong);default:return null}}function meridiemForDateTime(e){return meridiems[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var a="days"===e;switch(t){case 1:return a?"tomorrow":"next "+i[e][0];case-1:return a?"yesterday":"last "+i[e][0];case 0:return a?"today":"this "+i[e][0]}}var n=Object.is(t,-0)||t<0,o=Math.abs(t),t=1===o,s=i[e],r=r?!t&&s[2]||s[1]:t?i[e][0]:e;return n?o+" "+r+" ago":"in "+o+" "+r}function formatString(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(stringify(pick(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return t;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}function stringifyTokens(e,t){for(var n="",r=_createForOfIteratorHelperLoose(e);!(i=r()).done;){var i=i.value;i.literal?n+=i.val:n+=t(i.val)}return n}var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS},Formatter=function(){function p(e,t){this.opts=t,this.loc=e,this.systemLoc=null}p.create=function(e,t){return new p(e,t=void 0===t?{}:t)},p.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],o=0;o<e.length;o++){var a=e.charAt(o);"'"===a?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||a===t?n+=a:(0<n.length&&i.push({literal:!1,val:n}),t=n=a)}return 0<n.length&&i.push({literal:r,val:n}),i},p.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=p.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return padStart(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},e.formatDateTimeFromString=function(n,e){var r=this,i="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),o=function(e,t){return r.loc.extract(n,e,t)},a=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},s=function(){return i?meridiemForDateTime(n):o({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return i?monthForDateTime(n,e):o(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return i?weekdayForDateTime(n,e):o(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=p.macroTokenToFormatOpts(e);return t?r.formatWithSystemDefault(n,t):e},d=function(e){return i?eraForDateTime(n,e):o({era:e},"era")};return stringifyTokens(p.parseFormat(e),function(e){switch(e){case"S":return r.num(n.millisecond);case"u":case"SSS":return r.num(n.millisecond,3);case"s":return r.num(n.second);case"ss":return r.num(n.second,2);case"m":return r.num(n.minute);case"mm":return r.num(n.minute,2);case"h":return r.num(n.hour%12==0?12:n.hour%12);case"hh":return r.num(n.hour%12==0?12:n.hour%12,2);case"H":return r.num(n.hour);case"HH":return r.num(n.hour,2);case"Z":return a({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return a({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:r.loc.locale});case"z":return n.zoneName;case"a":return s();case"d":return t?o({day:"numeric"},"day"):r.num(n.day);case"dd":return t?o({day:"2-digit"},"day"):r.num(n.day,2);case"c":return r.num(n.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return r.num(n.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return t?o({month:"numeric",day:"numeric"},"month"):r.num(n.month);case"LL":return t?o({month:"2-digit",day:"numeric"},"month"):r.num(n.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return t?o({month:"numeric"},"month"):r.num(n.month);case"MM":return t?o({month:"2-digit"},"month"):r.num(n.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return t?o({year:"numeric"},"year"):r.num(n.year);case"yy":return t?o({year:"2-digit"},"year"):r.num(n.year.toString().slice(-2),2);case"yyyy":return t?o({year:"numeric"},"year"):r.num(n.year,4);case"yyyyyy":return t?o({year:"numeric"},"year"):r.num(n.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(n.weekYear.toString().slice(-2),2);case"kkkk":return r.num(n.weekYear,4);case"W":return r.num(n.weekNumber);case"WW":return r.num(n.weekNumber,2);case"o":return r.num(n.ordinal);case"ooo":return r.num(n.ordinal,3);case"q":return r.num(n.quarter);case"qq":return r.num(n.quarter,2);case"X":return r.num(Math.floor(n.ts/1e3));case"x":return r.num(n.ts);default:return u(e)}})},e.formatDurationFromString=function(e,t){var n,r=this,i=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},t=p.parseFormat(t),o=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,o.map(i).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=i(e);return t?r.num(n.get(t),e.length):e}))},p}(),Invalid=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Zone=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new ZoneIsAbstractError},t.formatOffset=function(e,t){throw new ZoneIsAbstractError},t.offset=function(e){throw new ZoneIsAbstractError},t.equals=function(e){throw new ZoneIsAbstractError},_createClass(e,[{key:"type",get:function(){throw new ZoneIsAbstractError}},{key:"name",get:function(){throw new ZoneIsAbstractError}},{key:"universal",get:function(){throw new ZoneIsAbstractError}},{key:"isValid",get:function(){throw new ZoneIsAbstractError}}]),e}(),singleton=null,LocalZone=function(e){function t(){return e.apply(this,arguments)||this}_inheritsLoose(t,e);var n=t.prototype;return n.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale)},n.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},_createClass(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return hasIntl()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return singleton=null===singleton?new t:singleton}}]),t}(Zone),matchingRegex=RegExp("^"+ianaRegex.source+"$"),dtfCache={};function makeDTF(e){return dtfCache[e]||(dtfCache[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),dtfCache[e]}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(e,t){var e=e.format(t).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e),e=t[1],n=t[2];return[t[3],e,n,t[4],t[5],t[6]]}function partsOffset(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var o=n[i],a=o.type,o=o.value,a=typeToPos[a];isUndefined(a)||(r[a]=parseInt(o,10))}return r}var ianaZoneCache={},IANAZone=function(n){function r(e){var t=n.call(this)||this;return t.zoneName=e,t.valid=r.isValidZone(e),t}_inheritsLoose(r,n),r.create=function(e){return ianaZoneCache[e]||(ianaZoneCache[e]=new r(e)),ianaZoneCache[e]},r.resetCache=function(){ianaZoneCache={},dtfCache={}},r.isValidSpecifier=function(e){return!(!e||!e.match(matchingRegex))},r.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},r.parseGMTOffset=function(e){if(e){e=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var e=r.prototype;return e.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},e.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},e.offset=function(e){e=new Date(e);if(isNaN(e))return NaN;var t=makeDTF(this.name),t=(t.formatToParts?partsOffset:hackyOffset)(t,e),n=t[0],r=t[1],i=t[2],o=t[3],e=+e,a=e%1e3;return(objToLocalTS({year:n,month:r,day:i,hour:24===o?0:o,minute:t[4],second:t[5],millisecond:0})-(e-=0<=a?a:1e3+a))/6e4},e.equals=function(e){return"iana"===e.type&&e.name===this.name},_createClass(r,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),r}(Zone),singleton$1=null,FixedOffsetZone=function(n){function t(e){var t=n.call(this)||this;return t.fixed=e,t}_inheritsLoose(t,n),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){e=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(signedOffset(e[1],e[2]))}return null},_createClass(t,null,[{key:"utcInstance",get:function(){return singleton$1=null===singleton$1?new t(0):singleton$1}}]);var e=t.prototype;return e.offsetName=function(){return this.name},e.formatOffset=function(e,t){return formatOffset(this.fixed,t)},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Zone),InvalidZone=function(n){function e(e){var t=n.call(this)||this;return t.zoneName=e,t}_inheritsLoose(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},_createClass(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Zone);function normalizeZone(e,t){var n;return isUndefined(e)||null===e?t:e instanceof Zone?e:isString(e)?"local"===(n=e.toLowerCase())?t:"utc"===n||"gmt"===n?FixedOffsetZone.utcInstance:null!=(t=IANAZone.parseGMTOffset(e))?FixedOffsetZone.instance(t):IANAZone.isValidSpecifier(n)?IANAZone.create(e):FixedOffsetZone.parseSpecifier(n)||new InvalidZone(e):isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}var now=function(){return Date.now()},defaultZone=null,defaultLocale$1=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=!1,Settings=function(){function e(){}return e.resetCaches=function(){Locale.resetCache(),IANAZone.resetCache()},_createClass(e,null,[{key:"now",get:function(){return now},set:function(e){now=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){defaultZone=e?normalizeZone(e):null}},{key:"defaultZone",get:function(){return defaultZone||LocalZone.instance}},{key:"defaultLocale",get:function(){return defaultLocale$1},set:function(e){defaultLocale$1=e}},{key:"defaultNumberingSystem",get:function(){return defaultNumberingSystem},set:function(e){defaultNumberingSystem=e}},{key:"defaultOutputCalendar",get:function(){return defaultOutputCalendar},set:function(e){defaultOutputCalendar=e}},{key:"throwOnInvalid",get:function(){return throwOnInvalid},set:function(e){throwOnInvalid=e}}]),e}(),intlDTCache={};function getCachedDTF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlDTCache[n];return r||(r=new Intl.DateTimeFormat(e,t),intlDTCache[n]=r),r}var intlNumCache={};function getCachedINF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlNumCache[n];return r||(r=new Intl.NumberFormat(e,t),intlNumCache[n]=r),r}var intlRelCache={};function getCachedRTF(e,t){var n=t=void 0===t?{}:t,n=(n.base,_objectWithoutPropertiesLoose(n,["base"])),n=JSON.stringify([e,n]),r=intlRelCache[n];return r||(r=new Intl.RelativeTimeFormat(e,t),intlRelCache[n]=r),r}var sysLocaleCache=null;function systemLocale(){var e;return sysLocaleCache=sysLocaleCache||(hasIntl()?(e=(new Intl.DateTimeFormat).resolvedOptions().locale)&&"und"!==e?e:"en-US":"en-US")}function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,t=e.substring(0,t);try{n=getCachedDTF(e).resolvedOptions()}catch(e){n=getCachedDTF(t).resolvedOptions()}e=n;return[t,e.numberingSystem,e.calendar]}function intlConfigString(e,t,n){return hasIntl()?((n||t)&&(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t)),e):[]}function mapMonths(e){for(var t=[],n=1;n<=12;n++){var r=DateTime.utc(2016,n,1);t.push(e(r))}return t}function mapWeekdays(e){for(var t=[],n=1;n<=7;n++){var r=DateTime.utc(2016,11,13+n);t.push(e(r))}return t}function listStuff(e,t,n,r,i){e=e.listingMode(n);return"error"===e?null:("en"===e?r:i)(t)}function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||hasIntl()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var PolyNumberFormatter=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&hasIntl()&&(t={useGrouping:!1},0<n.padTo&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t))}return e.prototype.format=function(e){var t;return this.inf?(t=this.floor?Math.floor(e):e,this.inf.format(t)):padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},e}(),PolyDateFormatter=function(){function e(e,t,n){var r,i,o;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(i=e.offset/60*-1,o=IANAZone.isValidZone(i=0<=i?"Etc/GMT+"+i:"Etc/GMT"+i),0!==e.offset&&o?(r=i,this.dt=e):(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl&&(o=Object.assign({},this.opts),r&&(o.timeZone=r),this.dtf=getCachedDTF(t,o))}var t=e.prototype;return t.format=function(){var e,t;return this.hasIntl?this.dtf.format(this.dt.toJSDate()):(e=formatString(this.opts),t=Locale.create("en-US"),Formatter.create(t).formatDateTimeFromString(this.dt,e))},t.formatToParts=function(){return this.hasIntl&&hasFormatToParts()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),PolyRelFormatter=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Locale=function(){function i(e,t,n,r){var e=parseLocaleString(e),i=e[0],o=e[1],e=e[2];this.locale=i,this.numberingSystem=t||o||null,this.outputCalendar=n||e||null,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}i.fromOpts=function(e){return i.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},i.create=function(e,t,n,r){void 0===r&&(r=!1);e=e||Settings.defaultLocale;return new i(e||(r?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},i.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},i.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return i.create(t,n,e)};var e=i.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=hasIntl()&&hasFormatToParts(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?i.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,months,function(){var t=r?{month:n,day:"numeric"}:{month:n},e=r?"format":"standalone";return i.monthsCache[e][n]||(i.monthsCache[e][n]=mapMonths(function(e){return i.extract(e,t,"month")})),i.monthsCache[e][n]})},e.weekdays=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,weekdays,function(){var t=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=r?"format":"standalone";return i.weekdaysCache[e][n]||(i.weekdaysCache[e][n]=mapWeekdays(function(e){return i.extract(e,t,"weekday")})),i.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return listStuff(this,void 0,e=void 0===e?!0:e,function(){return meridiems},function(){var t;return n.meridiemCache||(t={hour:"numeric",hour12:!0},n.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})),n.meridiemCache})},e.eras=function(e,t){var n=this;return listStuff(this,e,t=void 0===t?!0:t,eras,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){e=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return e?e.value:null},e.numberFormatter=function(e){return new PolyNumberFormatter(this.intl,(e=void 0===e?{}:e).forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return new PolyDateFormatter(e,this.intl,t=void 0===t?{}:t)},e.relFormatter=function(e){return void 0===e&&(e={}),new PolyRelFormatter(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(i,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),i}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+r+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(o){return t.reduce(function(e,t){var n=e[0],r=e[1],e=e[2],t=t(o,e),e=t[0],i=t[1],t=t[2];return[Object.assign(n,e),r||i,t]},[{},null,1]).slice(0,2)}}function parse(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i],s=a[0],a=a[1],s=s.exec(e);if(s)return a(s)}return[null,null]}function simpleParse(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];return function(e,t){for(var n={},r=0;r<i.length;r++)n[i[r]]=parseInteger(e[t+r]);return[n,null,t+r]}}var offsetRegex=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(""+isoTimeBaseRegex.source+offsetRegex.source+"?"),isoTimeExtensionRegex=RegExp("(?:T"+isoTimeRegex.source+")?"),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(isoTimeBaseRegex.source+" ?(?:"+offsetRegex.source+"|("+ianaRegex.source+"))?"),sqlTimeExtensionRegex=RegExp("(?: "+sqlTimeRegex.source+")?");function int(e,t,n){e=e[t];return isUndefined(e)?n:parseInteger(e)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var n=!e[t]&&!e[t+1],e=signedOffset(e[t+1],e[t+2]);return[{},n?null:FixedOffsetZone.instance(e),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}var isoTimeOnly=RegExp("^T?"+isoTimeBaseRegex.source+"$"),isoDuration=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){function t(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e}var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],e=e[8],u="-"===n[0],n=c&&"-"===c[0];return[{years:t(parseInteger(r)),months:t(parseInteger(i)),weeks:t(parseInteger(o)),days:t(parseInteger(a)),hours:t(parseInteger(s)),minutes:t(parseInteger(l)),seconds:t(parseInteger(c),"-0"===c),milliseconds:t(parseMillis(e),n)}]}var obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,r,i,o,a){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(i),minute:parseInteger(o)};return a&&(t.second=parseInteger(a)),e&&(t.weekday=3<e.length?weekdaysLong.indexOf(e)+1:weekdaysShort.indexOf(e)+1),t}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6],s=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,i,r,n,o,a,s),i=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(i)]}function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],n=e[2],r=e[3];return[fromStrings(t,e[4],r,n,e[5],e[6],e[7]),FixedOffsetZone.utcInstance]}function extractASCII(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6];return[fromStrings(t,e[7],n,r,i,o,a),FixedOffsetZone.utcInstance]}var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(e){return parse(e,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[rfc2822,extractRFC2822])}function parseHTTPDate(e){return parse(e,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(e){return parse(e,[isoDuration,extractISODuration])}var extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[isoTimeOnly,extractISOTimeOnly])}var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}var INVALID="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},lowOrderMatrix),daysInYearAccurate=365.2425,daysInMonthAccurate=30.436875,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:24*daysInYearAccurate,minutes:24*daysInYearAccurate*60,seconds:24*daysInYearAccurate*60*60,milliseconds:24*daysInYearAccurate*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:24*daysInYearAccurate/4,minutes:24*daysInYearAccurate*60/4,seconds:24*daysInYearAccurate*60*60/4,milliseconds:24*daysInYearAccurate*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:24*daysInMonthAccurate,minutes:24*daysInMonthAccurate*60,seconds:24*daysInMonthAccurate*60*60,milliseconds:24*daysInMonthAccurate*60*60*1e3}},lowOrderMatrix),orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits.slice(0).reverse();function clone(e,t,n){n={values:(n=void 0===n?!1:n)?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Duration(n)}function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}function convert(e,t,n,r,i){var e=e[i][n],o=t[n]/e,o=!(Math.sign(o)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(o)<=1?antiTrunc(o):Math.trunc(o);r[i]+=o,t[n]-=o*e}function normalizeValues(n,r){reverseUnits.reduce(function(e,t){return isUndefined(r[t])?e:(e&&convert(n,r,e,r,t),t)},null)}var Duration=function(){function h(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?accurateMatrix:casualMatrix,this.isLuxonDuration=!0}h.fromMillis=function(e,t){return h.fromObject(Object.assign({milliseconds:e},t))},h.fromObject=function(e){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new h({values:normalizeObject(e,h.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},h.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(e);return new h({invalid:e})},h.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)},h.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=h.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});t=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Formatter.create(this.loc,t).formatDurationFromString(this,e):INVALID},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},e.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var t=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm",t=(e.suppressSeconds&&0===t.seconds&&0===t.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===t.milliseconds||(n+=".SSS")),t.toFormat(n));return t=e.includePrefix?"T"+t:t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var t=friendlyDuration(e),n={},r=_createForOfIteratorHelperLoose(orderedUnits);!(i=r()).done;){var i=i.value;(hasOwnProperty$1(t.values,i)||hasOwnProperty$1(this.values,i))&&(n[i]=t.get(i)+this.get(i))}return clone(this,{values:n},!0)},e.minus=function(e){if(!this.isValid)return this;e=friendlyDuration(e);return this.plus(e.negate())},e.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=asNumber(e(this.values[i],i))}return clone(this,{values:t},!0)},e.get=function(e){return this[h.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,h.normalizeUnit,[]))}):this},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.conversionAccuracy,t={loc:this.loc.clone({locale:t,numberingSystem:n})};return e&&(t.conversionAccuracy=e),clone(this,t)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return normalizeValues(this.matrix,e),clone(this,{values:e},!0)},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;for(var r,t=t.map(function(e){return h.normalizeUnit(e)}),i={},o={},a=this.toObject(),s=_createForOfIteratorHelperLoose(orderedUnits);!(f=s()).done;){var l=f.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in o)d+=this.matrix[c][l]*o[c],o[c]=0;isNumber(a[l])&&(d+=a[l]);var p,f=Math.trunc(d);for(p in i[l]=f,o[l]=d-f,a)orderedUnits.indexOf(p)>orderedUnits.indexOf(l)&&convert(this.matrix,a,p,i,l)}else isNumber(a[l])&&(o[l]=a[l])}for(r in o)0!==o[r]&&(i[u]+=r===u?o[r]:o[r]/this.matrix[u][r]);return clone(this,{values:i},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return clone(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=_createForOfIteratorHelperLoose(orderedUnits);!(r=n()).done;){var r=r.value;if(t=this.values[r],r=e.values[r],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1}return!0},_createClass(h,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),h}();function friendlyDuration(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError("Unknown duration argument "+e+" of type "+typeof e)}var INVALID$1="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}var Interval=function(){function c(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}c.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(e);return new c({invalid:e})},c.fromDateTimes=function(e,t){var e=friendlyDateTime(e),t=friendlyDateTime(t),n=validateStartEnd(e,t);return null==n?new c({start:e,end:t}):n},c.after=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e,e.plus(t))},c.before=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e.minus(t),e)},c.fromISO=function(e,t){var n,r,i,o=(e||"").split("/",2),a=o[0],s=o[1];if(a&&s){try{l=(n=DateTime.fromISO(a,t)).isValid}catch(s){l=!1}try{i=(r=DateTime.fromISO(s,t)).isValid}catch(s){i=!1}if(l&&i)return c.fromDateTimes(n,r);if(l){o=Duration.fromISO(s,t);if(o.isValid)return c.after(n,o)}else if(i){var l=Duration.fromISO(a,t);if(l.isValid)return c.before(r,l)}}return c.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},c.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=c.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){if(!this.isValid)return NaN;var t=this.start.startOf(e=void 0===e?"milliseconds":e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},e.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function(e){var e=void 0===e?{}:e,t=e.start,e=e.end;return this.isValid?c.fromDateTimes(t||this.s,e||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),o=[],a=this.s,s=0;a<this.e;){var l=i[s]||this.e,l=+l>+this.e?this.e:l;o.push(c.fromDateTimes(a,l)),a=l,s+=1}return o},e.splitBy=function(e){var t=friendlyDuration(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n=this.s,r=1,i=[];n<this.e;){var o=this.start.plus(t.mapUnits(function(e){return e*r})),o=+o>+this.e?this.e:o;i.push(c.fromDateTimes(n,o)),n=o,r+=1}return i},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},e.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function(e){if(!this.isValid)return this;var t=(this.s>e.s?this:e).s,e=(this.e<e.e?this:e).e;return e<=t?null:c.fromDateTimes(t,e)},e.union=function(e){if(!this.isValid)return this;var t=(this.s<e.s?this:e).s,e=(this.e>e.e?this:e).e;return c.fromDateTimes(t,e)},c.merge=function(e){var e=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],e=e[1];return e?e.overlaps(t)||e.abutsStart(t)?[n,e.union(t)]:[n.concat([e]),t]:[n,t]},[[],null]),t=e[0],e=e[1];return e&&t.push(e),t},c.xor=function(e){for(var t,n=null,r=0,i=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),o=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(a=o()).done;)var a=a.value,n=1===(r+="s"===a.type?1:-1)?a.time:(n&&+n!=+a.time&&i.push(c.fromDateTimes(n,a.time)),null);return c.merge(i)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return c.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":INVALID$1},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):INVALID$1},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():INVALID$1},e.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):INVALID$1},e.toFormat=function(e,t){t=(void 0===t?{}:t).separator,t=void 0===t?" – ":t;return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):INVALID$1},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)},e.mapEndpoints=function(e){return c.fromDateTimes(e(this.s),e(this.e))},_createClass(c,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),c}(),Info=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Settings.defaultZone);var t=DateTime.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return IANAZone.isValidSpecifier(e)&&IANAZone.isValidZone(e)},e.normalizeZone=function(e){return normalizeZone(e,Settings.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e,!0)},e.meridiems=function(e){e=(void 0===e?{}:e).locale;return Locale.create(void 0===e?null:e).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");t=(void 0===t?{}:t).locale;return Locale.create(void 0===t?null:t,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(hasIntl()){e=!0,t=hasFormatToParts(),r=hasRelative();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function dayDiff(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}t=n(t)-n(e);return Math.floor(Duration.fromMillis(t).as("days"))}function highOrderDiffs(e,t,n){for(var r={},i=0,o=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){e=dayDiff(e,t);return(e-e%7)/7}],["days",dayDiff]];i<o.length;i++){var a,s,l,c=o[i],u=c[0],c=c[1];0<=n.indexOf(u)&&(a=u,c=c(e,t),t<(l=e.plus(((s={})[u]=c,s)))?(e=e.plus(((s={})[u]=c-1,s)),--c):e=l,r[u]=c)}return[e,r,l,a]}function _diff(e,t,n,r){var e=highOrderDiffs(e,t,n),i=e[0],o=e[1],a=e[2],e=e[3],s=t-i,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(a=a<t?i.plus(((t={})[e]=1,t)):a)!==i&&(o[e]=(o[e]||0)+s/(a-i)),Duration.fromObject(Object.assign(o,r)));return 0<n.length?(e=Duration.fromMillis(s,r)).shiftTo.apply(e,n).plus(t):t}var numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(numberingSystems.hanidec))t+=hanidecChars.indexOf(e[n]);else for(var i in numberingSystemsUTF16){var i=numberingSystemsUTF16[i],o=i[0],i=i[1];o<=r&&r<=i&&(t+=r-o)}}return parseInt(t,10)}return t}function digitRegex(e,t){e=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+numberingSystems[e||"latn"]+t)}var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){e=e[0];return t(parseDigits(e))}}}var NBSP=String.fromCharCode(160),spaceOrNBSP="( |"+NBSP+")",spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(n,r){return null===n?null:{regex:RegExp(n.map(fixListRegex).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return stripInsensitivities(t)===stripInsensitivities(e)})+r}}}function offset(e,t){return{regex:e,deser:function(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(t,n){function r(e){return{regex:RegExp(escapeToken(e.val)),deser:function(e){return e[0]},literal:!0}}var i=digitRegex(n),o=digitRegex(n,"{2}"),a=digitRegex(n,"{3}"),s=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),p=digitRegex(n,"{1,9}"),f=digitRegex(n,"{2,4}"),h=digitRegex(n,"{4,6}"),e=function(e){if(t.literal)return r(e);switch(e.val){case"G":return oneOf(n.eras("short",!1),0);case"GG":return oneOf(n.eras("long",!1),0);case"y":return intUnit(d);case"yy":return intUnit(f,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(h);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(o);case"MMM":return oneOf(n.months("short",!0,!1),1);case"MMMM":return oneOf(n.months("long",!0,!1),1);case"L":return intUnit(c);case"LL":return intUnit(o);case"LLL":return oneOf(n.months("short",!1,!1),1);case"LLLL":return oneOf(n.months("long",!1,!1),1);case"d":return intUnit(c);case"dd":return intUnit(o);case"o":return intUnit(u);case"ooo":return intUnit(a);case"HH":return intUnit(o);case"H":return intUnit(c);case"hh":return intUnit(o);case"h":return intUnit(c);case"mm":return intUnit(o);case"m":case"q":return intUnit(c);case"qq":return intUnit(o);case"s":return intUnit(c);case"ss":return intUnit(o);case"S":return intUnit(u);case"SSS":return intUnit(a);case"u":return simple(p);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(f,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(o);case"E":case"c":return intUnit(i);case"EEE":return oneOf(n.weekdays("short",!1,!1),1);case"EEEE":return oneOf(n.weekdays("long",!1,!1),1);case"ccc":return oneOf(n.weekdays("short",!0,!1),1);case"cccc":return oneOf(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+c.source+")(?::("+o.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+o.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return r(e)}}(t)||{invalidReason:MISSING_FTP};return e.token=t,e}var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(e,t,n){var r=e.type,e=e.value;if("literal"===r)return{literal:!0,val:e};e=n[r],n=partTypeStyleToTokenVal[r];return(n="object"==typeof n?n[e]:n)?{literal:!1,val:n}:void 0}function buildRegex(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}function match$1(e,t,n){var r=e.match(t);if(r){var i,o,a,s={},l=1;for(i in n)hasOwnProperty$1(n,i)&&(a=(o=n[i]).groups?o.groups+1:1,!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(l,l+a))),l+=a);return[r,s]}return[r,{}]}function dateTimeFromMatches(r){var e=isUndefined(r.Z)?isUndefined(r.z)?null:IANAZone.create(r.z):new FixedOffsetZone(r.Z);return isUndefined(r.q)||(r.M=3*(r.q-1)+1),isUndefined(r.h)||(r.h<12&&1===r.a?r.h+=12:12===r.h&&0===r.a&&(r.h=0)),0===r.G&&r.y&&(r.y=-r.y),isUndefined(r.u)||(r.S=parseMillis(r.u)),[Object.keys(r).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=r[t]),e},{}),e]}var dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache=dummyDateTimeCache||DateTime.fromMillis(1555555555555)}function maybeExpandMacroToken(e,t){if(e.literal)return e;var n=Formatter.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Formatter.create(t,n).formatDateTimeParts(getDummyDateTime()).map(function(e){return tokenForPart(e,t,n)});return r.includes(void 0)?e:r}function expandMacroTokens(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return maybeExpandMacroToken(e,t)}))}function explainFromTokens(t,e,n){var n=expandMacroTokens(Formatter.parseFormat(n),t),r=n.map(function(e){return unitForToken(e,t)}),i=r.find(function(e){return e.invalidReason});if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};var i=buildRegex(r),r=i[0],i=i[1],r=RegExp(r,"i"),i=match$1(e,r,i),o=i[0],i=i[1],a=i?dateTimeFromMatches(i):[null,null],s=a[0],a=a[1];if(hasOwnProperty$1(i,"a")&&hasOwnProperty$1(i,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:r,rawMatches:o,matches:i,result:s,zone:a}}function parseFromTokens(e,t,n){e=explainFromTokens(e,t,n);return[e.result,e.zone,e.invalidReason]}var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,n){e=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===e?7:e}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?leapLadder:nonLeapLadder)[t-1]}function uncomputeOrdinal(e,t){var e=isLeapYear(e)?leapLadder:nonLeapLadder,n=e.findIndex(function(e){return e<t});return{month:n+1,day:t-e[n]}}function gregorianToWeek(e){var t,n=e.year,r=e.month,i=e.day,o=computeOrdinal(n,r,i),r=dayOfWeek(n,r,i),i=Math.floor((o-r+10)/7);return i<1?i=weeksInWeekYear(t=n-1):i>weeksInWeekYear(n)?(t=n+1,i=1):t=n,Object.assign({weekYear:t,weekNumber:i,weekday:r},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,o=dayOfWeek(n,1,4),a=daysInYear(n),r=7*r+i-o-3,i=(r<1?r+=daysInYear(t=n-1):a<r?(t=n+1,r-=daysInYear(n)):t=n,uncomputeOrdinal(t,r)),o=i.month,a=i.day;return Object.assign({year:t,month:o,day:a},timeObject(e))}function gregorianToOrdinal(e){var t=e.year,n=computeOrdinal(t,e.month,e.day);return Object.assign({year:t,ordinal:n},timeObject(e))}function ordinalToGregorian(e){var t=e.year,n=uncomputeOrdinal(t,e.ordinal),r=n.month,n=n.day;return Object.assign({year:t,month:r,day:n},timeObject(e))}function hasInvalidWeekData(e){var t=isInteger(e.weekYear),n=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),r=integerBetween(e.weekday,1,7);return t?n?!r&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}function hasInvalidOrdinalData(e){var t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}function hasInvalidGregorianData(e){var t=isInteger(e.year),n=integerBetween(e.month,1,12),r=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!r&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,n=e.minute,r=e.second,e=e.millisecond,i=integerBetween(t,0,23)||24===t&&0===n&&0===r&&0===e,o=integerBetween(n,0,59),a=integerBetween(r,0,59),s=integerBetween(e,0,999);return i?o?a?!s&&unitOutOfRange("millisecond",e):unitOutOfRange("second",r):unitOutOfRange("minute",n):unitOutOfRange("hour",t)}var INVALID$2="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone$1(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime(Object.assign({},e,t,{old:e}))}function fixOffset(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];n=n.offset(r-=60*(i-t)*1e3);return i===n?[r,i]:[e-60*Math.min(i,n)*1e3,Math.max(i,n)]}function tsToObj(e,t){e+=60*t*1e3;t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,daysInMonth(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),i=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),t=fixOffset(objToLocalTS(r),n,e.zone),r=t[0],n=t[1];return 0!==i&&(n=e.zone.offset(r+=i)),{ts:r,o:n}}function parseDataToDateTime(e,t,n,r,i){var o=n.setZone,a=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||a,setZone:void 0})),o?e:e.setZone(a)):DateTime.invalid(new Invalid("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function toTechFormat(e,t,n){return void 0===n&&(n=!0),e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toTechTimeFormat(e,t){var n=t.suppressSeconds,r=t.suppressMilliseconds,i=t.includeOffset,o=t.includePrefix,o=void 0!==o&&o,a=t.includeZone,a=void 0!==a&&a,s=t.spaceZone,t=t.format,t=void 0===t?"extended":t,l="basic"===t?"HHmm":"HH:mm",n=(void 0!==n&&n&&0===e.second&&0===e.millisecond||(l+="basic"===t?"ss":":ss",void 0!==r&&r&&0===e.millisecond||(l+=".SSS")),(a||i)&&(void 0!==s&&s)&&(l+=" "),a?l+="z":i&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=o?"T"+n:n}var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)}function quickDT(e,t){for(var n=_createForOfIteratorHelperLoose(orderedUnits$1);!(r=n()).done;){var r=r.value;isUndefined(e[r])&&(e[r]=defaultUnitValues[r])}var i=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(i)return DateTime.invalid(i);var i=Settings.now(),i=objToTS(e,t.offset(i),t),o=i[0],i=i[1];return new DateTime({ts:o,zone:t,o:i})}function diffRelative(t,n,r){function e(e,t){return e=roundTo(e,o||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)}function i(e){return r.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)}var o=!!isUndefined(r.round)||r.round;if(r.unit)return e(i(r.unit),r.unit);for(var a=_createForOfIteratorHelperLoose(r.units);!(s=a()).done;){var s=s.value,l=i(s);if(1<=Math.abs(l))return e(l,s)}return e(n<t?-0:0,r.units[r.units.length-1])}var DateTime=function(){function g(e){var t,n=e.zone||Settings.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(n.isValid?null:unsupportedZone(n)),i=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),o=null;r||(o=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(i=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),i=tsToObj(this.ts,t),i=(r=Number.isNaN(i.year)?new Invalid("invalid input"):null)?null:i,r?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}g.now=function(){return new g({})},g.local=function(e,t,n,r,i,o,a){return isUndefined(e)?g.now():quickDT({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},Settings.defaultZone)},g.utc=function(e,t,n,r,i,o,a){return isUndefined(e)?new g({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},FixedOffsetZone.utcInstance)},g.fromJSDate=function(e,t){void 0===t&&(t={});e=isDate(e)?e.valueOf():NaN;if(Number.isNaN(e))return g.invalid("invalid input");var n=normalizeZone(t.zone,Settings.defaultZone);return n.isValid?new g({ts:e,zone:n,loc:Locale.fromObject(t)}):g.invalid(unsupportedZone(n))},g.fromMillis=function(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-MAX_DATE||MAX_DATE<e?g.invalid("Timestamp out of range"):new g({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},g.fromSeconds=function(e,t){if(void 0===t&&(t={}),isNumber(e))return new g({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")},g.fromObject=function(e){var t=normalizeZone(e.zone,Settings.defaultZone);if(!t.isValid)return g.invalid(unsupportedZone(t));var n=Settings.now(),r=t.offset(n),i=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),o=!isUndefined(i.ordinal),a=!isUndefined(i.year),s=!isUndefined(i.month)||!isUndefined(i.day),a=a||s,l=i.weekYear||i.weekNumber,c=Locale.fromObject(e);if((a||o)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&o)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,s=l||i.weekday&&!a,d=tsToObj(n,r),p=(s?(m=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):o?(m=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(m=orderedUnits$1,u=defaultUnitValues),!1),f=_createForOfIteratorHelperLoose(m);!(h=f()).done;){var h=h.value;isUndefined(i[h])?i[h]=(p?u:d)[h]:p=!0}l=(s?hasInvalidWeekData:o?hasInvalidOrdinalData:hasInvalidGregorianData)(i)||hasInvalidTimeData(i);if(l)return g.invalid(l);var n=objToTS(s?weekToGregorian(i):o?ordinalToGregorian(i):i,r,t),m=new g({ts:n[0],zone:t,o:n[1],loc:c});return i.weekday&&a&&e.weekday!==m.weekday?g.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+m.toISO()):m},g.fromISO=function(e,t){void 0===t&&(t={});var n=parseISODate(e);return parseDataToDateTime(n[0],n[1],t,"ISO 8601",e)},g.fromRFC2822=function(e,t){void 0===t&&(t={});var n=parseRFC2822Date(e);return parseDataToDateTime(n[0],n[1],t,"RFC 2822",e)},g.fromHTTP=function(e,t){void 0===t&&(t={});e=parseHTTPDate(e);return parseDataToDateTime(e[0],e[1],t,"HTTP",t)},g.fromFormat=function(e,t,n){if(void 0===n&&(n={}),isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");var r=n,i=r.locale,r=r.numberingSystem,i=parseFromTokens(Locale.fromOpts({locale:void 0===i?null:i,numberingSystem:void 0===r?null:r,defaultToEN:!0}),e,t),r=i[0],o=i[1],i=i[2];return i?g.invalid(i):parseDataToDateTime(r,o,n,"format "+t,e)},g.fromString=function(e,t,n){return g.fromFormat(e,t,n=void 0===n?{}:n)},g.fromSQL=function(e,t){void 0===t&&(t={});var n=parseSQL(e);return parseDataToDateTime(n[0],n[1],t,"SQL",e)},g.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(e);return new g({invalid:e})},g.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=g.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){e=Formatter.create(this.loc.clone(e=void 0===e?{}:e),e).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(e,t){return void 0===t&&(t={}),this.setZone(FixedOffsetZone.instance(e=void 0===e?0:e),t)},e.toLocal=function(){return this.setZone(Settings.defaultZone)},e.setZone=function(e,t){var n,t=void 0===t?{}:t,r=t.keepLocalTime,r=void 0!==r&&r,t=t.keepCalendarTime,t=void 0!==t&&t;return(e=normalizeZone(e,Settings.defaultZone)).equals(this.zone)?this:e.isValid?(n=this.ts,(r||t)&&(r=e.offset(this.ts),n=objToTS(this.toObject(),r,e)[0]),clone$1(this,{ts:n,zone:e})):g.invalid(unsupportedZone(e))},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar,t=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:e});return clone$1(this,{loc:t})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,e=normalizeObject(e,normalizeUnit,[]),n=!isUndefined(e.weekYear)||!isUndefined(e.weekNumber)||!isUndefined(e.weekday),r=!isUndefined(e.ordinal),i=!isUndefined(e.year),o=!isUndefined(e.month)||!isUndefined(e.day),a=e.weekYear||e.weekNumber;if((i||o||r)&&a)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&r)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");n?t=weekToGregorian(Object.assign(gregorianToWeek(this.c),e)):isUndefined(e.ordinal)?(t=Object.assign(this.toObject(),e),isUndefined(e.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),e));i=objToTS(t,this.o,this.zone);return clone$1(this,{ts:i[0],o:i[1]})},e.plus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e))):this},e.minus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},e=Duration.normalizeUnit(e);switch(e){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===e&&(t.weekday=1),"quarters"===e&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):INVALID$2},e.toLocaleString=function(e){return void 0===e&&(e=DATE_SHORT),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTime(this):INVALID$2},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},e.toISODate=function(e){e=(void 0===e?{}:e).format,e="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return toTechFormat(this,e=9999<this.year?"+"+e:e)},e.toISOWeekDate=function(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var e=void 0===e?{}:e,t=e.suppressMilliseconds,n=e.suppressSeconds,r=e.includeOffset,i=e.includePrefix,e=e.format;return toTechTimeFormat(this,{suppressSeconds:void 0!==n&&n,suppressMilliseconds:void 0!==t&&t,includeOffset:void 0===r||r,includePrefix:void 0!==i&&i,format:void 0===e?"extended":e})},e.toRFC2822=function(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return toTechFormat(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var e=void 0===e?{}:e,t=e.includeOffset,e=e.includeZone;return toTechTimeFormat(this,{includeOffset:void 0===t||t,includeZone:void 0!==e&&e,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():INVALID$2},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Duration.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var n=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),t=maybeArray(t).map(Duration.normalizeUnit),r=e.valueOf()>this.valueOf(),e=_diff(r?this:e,r?e:this,t,n);return r?e.negate():e},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(g.now(),e,t)},e.until=function(e){return this.isValid?Interval.fromDateTimes(this,e):this},e.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),e=this.setZone(e.zone,{keepLocalTime:!0});return e.startOf(t)<=n&&n<=e.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){if(!this.isValid)return null;var t=(e=void 0===e?{}:e).base||g.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:r,unit:i}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||g.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},g.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.min);throw new InvalidArgumentError("min requires all arguments be DateTimes")},g.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.max);throw new InvalidArgumentError("max requires all arguments be DateTimes")},g.fromFormatExplain=function(e,t,n){var n=n=void 0===n?{}:n,r=n.locale,n=n.numberingSystem;return explainFromTokens(Locale.fromOpts({locale:void 0===r?null:r,numberingSystem:void 0===n?null:n,defaultToEN:!0}),e,t)},g.fromStringExplain=function(e,t,n){return g.fromFormatExplain(e,t,n=void 0===n?{}:n)},_createClass(g,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return DATE_SHORT}},{key:"DATE_MED",get:function(){return DATE_MED}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return DATE_MED_WITH_WEEKDAY}},{key:"DATE_FULL",get:function(){return DATE_FULL}},{key:"DATE_HUGE",get:function(){return DATE_HUGE}},{key:"TIME_SIMPLE",get:function(){return TIME_SIMPLE}},{key:"TIME_WITH_SECONDS",get:function(){return TIME_WITH_SECONDS}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return TIME_WITH_SHORT_OFFSET}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return TIME_WITH_LONG_OFFSET}},{key:"TIME_24_SIMPLE",get:function(){return TIME_24_SIMPLE}},{key:"TIME_24_WITH_SECONDS",get:function(){return TIME_24_WITH_SECONDS}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return TIME_24_WITH_SHORT_OFFSET}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return TIME_24_WITH_LONG_OFFSET}},{key:"DATETIME_SHORT",get:function(){return DATETIME_SHORT}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return DATETIME_SHORT_WITH_SECONDS}},{key:"DATETIME_MED",get:function(){return DATETIME_MED}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return DATETIME_MED_WITH_SECONDS}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return DATETIME_MED_WITH_WEEKDAY}},{key:"DATETIME_FULL",get:function(){return DATETIME_FULL}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return DATETIME_FULL_WITH_SECONDS}},{key:"DATETIME_HUGE",get:function(){return DATETIME_HUGE}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return DATETIME_HUGE_WITH_SECONDS}}]),g}();function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError("Unknown datetime argument: "+e+", of type "+typeof e)}var VERSION="1.28.0",DateTime_1=luxon.DateTime=DateTime;luxon.Duration=Duration,luxon.FixedOffsetZone=FixedOffsetZone,luxon.IANAZone=IANAZone,luxon.Info=Info,luxon.Interval=Interval,luxon.InvalidZone=InvalidZone,luxon.LocalZone=LocalZone,luxon.Settings=Settings,luxon.VERSION=VERSION,luxon.Zone=Zone;const useStyles$d=makeStyles()(()=>({root:{padding:"15px 30px"},title:{display:"flex"},action:{fontWeight:600},time:{fontSize:"12px",paddingLeft:"15px",lineHeight:"21px"},description:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},divider:{margin:"0 30px",backgroundColor:"#D5DFE9",height:"0.5px"}})),ActivityCard=({longFormatTime:e=!1,data:{createdDateTime:t,event:n,description:r}})=>{var i=useStyles$d()["classes"];return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.root,"data-testid":"activity-card"},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.title},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.action},{children:n})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.time},{children:e?DateTime_1.fromISO(t||"").toFormat("F"):DateTime_1.fromISO(t||"").toFormat("tt")}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({placement:"top-start",title:r||""},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.description},{children:r}))}))})]})),jsxRuntime.exports.jsx(Divider$1,{className:i.divider})]})},useStyles$c=makeStyles()(e=>({root:{width:"100%",height:"100%"},header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(4,6),position:"relative"},title:{opacity:.9,padding:e.spacing(4,6,2,6)},titleText:{textTransform:"uppercase",color:e.palette.secondary.main},scrollContent:{overflowY:"auto",height:"calc(100% - 65px)"}})),filters$2=[{value:"all",title:"All Activities"},{value:"today",title:"Activities today"}],today$1=DateTime_1.local().startOf("day"),yesterday=DateTime_1.local().plus({days:-1}).startOf("day"),ActivityPanel=({data:e,filter:t,onChangeFilter:n})=>{var r=useStyles$c()["classes"];const i=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(today$1,"day")),o=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(yesterday,"day")),a=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").startOf("day")<yesterday);return jsxRuntime.exports.jsxs("div",Object.assign({className:r.root},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Today"})),jsxRuntime.exports.jsx(Filter,{data:filters$2,filter:t,onFilter:e=>{n(null==(e=null==e?void 0:e.target)?void 0:e.value)}})]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.scrollContent},{children:[jsxRuntime.exports.jsx(Box$1,{children:null===i||void 0===i?void 0:i.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))}),"all"===t&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[0<(null===o||void 0===o?void 0:o.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title,"data-testid":"filter-all-box"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Yesterday"}))})),jsxRuntime.exports.jsx(Box$1,{children:o.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))})]}),0<(null===a||void 0===a?void 0:a.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Older"}))})),jsxRuntime.exports.jsx(Box$1,{children:a.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!0,data:e},t))})]})]})]}))]}))},useStyles$b=makeStyles()((e,{appListV2:t,type:n},r)=>({listItem:{display:"flex",cursor:"pointer",alignItems:"center",height:t?"unset":70,width:"100%",padding:t?0:e.spacing(0,6),"&:hover":{backgroundColor:"#EEF3F9"},["& ."+r.appName]:{marginLeft:e.spacing(3)}},iconButton:{borderRadius:4,textAlign:"center",width:"94px",height:"110px",cursor:"pointer",["& ."+r.appName]:{marginBottom:e.spacing(3)}},appName:{textAlign:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",textTransform:"capitalize",width:"switcherGrid"===n?"80%":"unset",margin:"switcherGrid"===n?"auto":"unset"},image:{display:"flex",justifyContent:"center",alignItems:"center",margin:t?"10px":e.spacing(3.8,0)},bounding:{padding:"17px 27px 19px 27px"},img:{width:40,height:40},switcherGrid:{borderRadius:4,textAlign:"center",padding:"20px 0 20px 0",cursor:"pointer","&:hover":{backgroundColor:"#EEF3F9"}}})),iconMapper={CMS:img$V,Discovery:img$U,Collection:img$T,Library:img$S,Admin:img$1s,Developer:img$R};function AppIcon({id:e,icon:t,type:n,iconUrl:r,appName:i,onClick:o,appListV2:a=!1}){a=useStyles$b({appListV2:a,type:n}).classes;const[s,l]=react.exports.useState(t||r||i&&iconMapper[i]||img$R);return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:i||"",PopperProps:{disablePortal:!0}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:function(){o&&o(e)},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"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.image},{children:jsxRuntime.exports.jsx("img",{alt:"app-icon",onError:function(){l(img$R)},src:s,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}))]}))}))}const useStyles$a=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$a({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(()=>{if(0<r.length){const t=[...r];var e=t.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)})}))}))]}))}const useStyles$9=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"}}));function ApplicationPanel$1({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:i}){useStyles$9(),useSelector(preferredLanguageSelector);const[o,a]=react.exports.useState(0===n.length?0:n.length<4?1:2),[s,l]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;a(e)},[n]),react.exports.useState(e));function c(e){l(e),null!=t&&t(e),null!=i&&i(e)}return react.exports.useEffect(()=>{e!==s&&l(e)},[e,s]),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(AppList,{useGrid:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.name.recentApps",defaultMessage:"Recent Applications",description:"Header title of recent apps"}),type:"Recent",applications:n,onSelectApplication:c,selectedAppId:null})}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(AppList,{useGrid:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.name.moreApps",defaultMessage:"More Applications",description:"Header title of more apps"}),type:"More",applications:r,onSelectApplication:c,selectedAppId:null,row:o})})]})}const useStyles$8=makeStyles()((e,{sortOrder:t,hasApps:n,menuIsOpen:r})=>({root:{},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-MuiOutlinedInput-root":{borderRadius:"1em",height:"30px"},"& .Sdk-MuiButtonBase-root":{padding:0},"& svg":{width:"14px"},"& input":{"&::placeholder":{color:"#5C6269 !important",fontWeight:600,opacity:1}},"& .Sdk-MuiOutlinedInput-notchedOutline":{borderColor:"#D5DFE9"}},searchInput:{fontSize:"11px","&::placeholder":{color:"#5C6269 !important"}},sortMenu:{width:"143px"}})),SHARED_TEXT={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 AppListV2({intl:e,selectedAppId:t,onSelectApplication:n,applications:i=[]}){const[r,o]=react.exports.useState(t),[a,s]=react.exports.useState({}),[l,c]=react.exports.useState(""),[u,d]=react.exports.useState("asc");var p=0!==i.length;function f(e){o(e),n(e)}function h(e,t){return e.name>t.name?1:e.name<t.name?-1:0}react.exports.useEffect(()=>{if(0<i.length){const t=[...i];const n={};for(const r of t.sort(h)){var e=r.name.charAt(0).toUpperCase();n[e]?n[e]=[...n[e],r]:n[e]=[r]}s(n)}},[i]),react.exports.useEffect(()=>{t!==r&&o(t)},[t,r]);e=translatableTextProps(e).searchLabel;const[m,g]=react.exports.useState(null);var y=Boolean(m);const v=e=>{if(e!==u){d(e);const t=Object.keys(a).reverse(),n={};t.forEach(e=>n[e]=a[e].reverse()),s(n)}g(null)},x=useStyles$8({sortOrder:u,hasApps:p,menuIsOpen:y})["classes"];p=jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"app-switcher.sort-menu",anchorEl:m,open:y,onClose:v},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>v("asc"),className:x.sortMenu},{children:"A - Z"})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>v("desc"),className:x.sortMenu},{children:"Z - A"}))]}));return jsxRuntime.exports.jsxs("div",Object.assign({className:x.root,"data-testid":"os-app-bar-panel.app-switcher.applications-container"},{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:x.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:x.searchBox},{children:jsxRuntime.exports.jsx(TextField$1,{"data-testid":"os-app-bar-panel.app-switcher.search",onChange:e=>{c(e.target.value)},placeholder:e,InputProps:{classes:{input:x.searchInput},startAdornment:jsxRuntime.exports.jsx(InputAdornment$1,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(IconButton$1,{children:jsxRuntime.exports.jsx(default_1$4,{})})}))}})})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:2,className:x.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:x.filterIconWrapper},{children:jsxRuntime.exports.jsx(SortArrow,{onClick:e=>{i.length&&g(e.currentTarget)},className:x.filterIcon,"data-testid":"os-app-bar-panel.app-switcher.sort"})}))})),p]}))]})),jsxRuntime.exports.jsx("div",{children:0===i.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("div",Object.assign({className:x.groupContainer},{children:0<Object.keys(a).length&&Object.entries(a).map(([e,t])=>t.filter(e=>e.name.toLowerCase().includes(l.toLowerCase())).length?jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("div",Object.assign({className:x.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(l.toLowerCase())).map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"os-app-bar-panel.app-switcher.app-row"},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===r,onClick:f,iconUrl:t,id:e,appName:n,appListV2:!0})}),jsxRuntime.exports.jsx(Divider$1,{})]}),e)})]},e):null)}))})]}))}var AppListV2$1=injectIntl(AppListV2);const useStyles$7=makeStyles()(e=>({root:{height:"calc(100vh - 64px - 55px - 5px)",overflowY:"scroll",borderRight:"15px solid #F9F9F9",boxShadow:"0px 1px 1px #809cb7"},appTile:{overflow:"hidden"},title:{fontWeight:900,padding:"15px"},helperText:{paddingLeft:"15px",fontSize:"12px",fontWeight:"bold"},noApps:{textAlign:"center",marginTop:"30px","& svg":{width:"160px",height:"160px",marginBottom:"20px"}}})),RecentApps=({apps:e=[],onSelectApplication:t,selectedAppId:n})=>{const i=useStyles$7()["classes"],[o,r]=react.exports.useState(n);function a(e){r(e),t(e)}return jsxRuntime.exports.jsxs("div",Object.assign({className:i.root,"data-testid":"app-switcher.recent-apps.container"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.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:i.appTile,sx:{padding:0},"data-testid":"app-switcher.recent-apps.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:t===o,onClick:a,iconUrl:n,id:t,appName:r,appListV2:!0})}),e.id)})})):jsxRuntime.exports.jsxs("div",Object.assign({className:i.noApps},{children:[jsxRuntime.exports.jsx(NoApps,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.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"})}))]}))]}))};function ApplicationPanel({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:i}){var o=useStyles$9()["classes"],a=useSelector(preferredLanguageSelector);const s=AIWareFormatMessage(a),[l,c]=react.exports.useState(0===n.length?0:n.length<4?1:2),[u,d]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;c(e)},[n]),react.exports.useState(e));function p(e){d(e),null!=t&&t(e),null!=i&&i(e)}return react.exports.useEffect(()=>{e!==u&&d(e)},[e,u]),jsxRuntime.exports.jsx("div",Object.assign({className:o.fullHeight},{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,className:o.fullHeight},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:o.fullHeight},{children:jsxRuntime.exports.jsx(RecentApps,{apps:n,onSelectApplication:p,selectedAppId:null})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:o.fullHeight},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.listContainer},{children:jsxRuntime.exports.jsx(AppListV2$1,{title:s({id:"os-app-bar-panel.name.moreApps",defaultMessage:[{type:0,value:"More Applications"}]}),type:"More",applications:r,onSelectApplication:p,selectedAppId:null,row:l})}))}))]}))}))}const useStyles$6=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$6()["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$5=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$5()["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=[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$6()["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$1})}))]}))}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$6()["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$4=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$4()["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$16,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$3$1=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$3$1()["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.nullState()})),jsxRuntime.exports.jsx(Box$1,{mb:9})]}))},ErrorState=({onRetry:e})=>{var t=useStyles$3$1()["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.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.retry()}))]}))};var LoadingStatus,useStyles$2$2=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$2$2()["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.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$3,{className:r.linkIcon}),SHARED_TEXT.buttonLink()]}))})};function OpenIdConnectors({openIdItems:o,onOpenUnlinkModal:a,onClickOpenIdUrl:s,isOpenIdConnected:l}){const c=useStyles$2$2()["classes"];return jsxRuntime.exports.jsx(List$2,{children:o.map((e,t)=>{const{name:n,loginButtonStyle:r}=e;var i=null==r?void 0:r.btnLogo;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:c.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:c.listAvatar},{children:jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:c.openIdLogo,src:i},{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:c.accountLinkingLabel},{children:25<n.length?n.substring(0,25)+"...":n}))}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:c.secondaryAction},{children:jsxRuntime.exports.jsx(OpenIdConnectorButton,{isConnected:l(e.connectId),onLink:()=>s(e),onUnlink:()=>a(e)})}))]})),t!==o.length-1&&jsxRuntime.exports.jsx(Divider$1,{})]})})})}const LoaderSkeletonItem=()=>{var e=useStyles$2$2()["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,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{})]}),namespace$2=(!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{}),"openId"),selectOpenIdConnectors=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.openIdConnectors},selectConnectedOpenIds=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.connectedOpenIds},selectLoadingStatus=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.status},GET_OPEN_ID_CONNECTORS=`aiware/${namespace$2}/get open id connectors`,GET_OPEN_ID_SUCCESS=`aiware/${namespace$2}/get open id connectors success`,GET_CONNECTED_OPEN_ID_SUCCESS=`aiware/${namespace$2}/get connected open id connectors success`,GET_OPEN_ID_ERROR=`aiware/${namespace$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)||"",p=useSelector(selectOpenIdConnectors)||[],f=useSelector(selectConnectedOpenIds)||[];var h=useStyles$2$2()["classes"];react.exports.useEffect(()=>{e(getOpenIdConnectors())},[e]);const m=e=>{l(e),n(!0)};var g=()=>{n(!1)},y=()=>{i(!1)};const v=()=>{e(getOpenIdConnectors())},x=(useInterval(()=>{e(getOpenIdConnectors())},o),e=>{l(e);e=window.open(e.loginUrl);u(e),a(2e3)}),C=react.exports.useCallback(t=>f.some(e=>e.connectId===t),[f]);react.exports.useEffect(()=>{""!==s.connectId&&null!==o&&C(s.connectId)&&(a(null),null!==c&&void 0!==c&&c.close(),i(!0))},[C,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.accountLinkingLabel()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT.accountLinkingDescription()})),d===LoadingStatus.Pending?jsxRuntime.exports.jsx(LoaderSkeleton,{}):d===LoadingStatus.Failed?jsxRuntime.exports.jsx(ErrorState,{onRetry:v}):0===p.length?jsxRuntime.exports.jsx(NullState,{}):jsxRuntime.exports.jsx(OpenIdConnectors,{openIdItems:p,onOpenUnlinkModal:m,onClickOpenIdUrl:x,isOpenIdConnected:C}),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.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.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.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.unlinkDialogConfirm()}))]}))]})),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:r,maxWidth:"xs",onClose:y,"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.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.successDialogContent(s.name)}))})),jsxRuntime.exports.jsx(DialogActions$1,Object.assign({className:h.dialogAction},{children:jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:y,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-success-dialog-confirm-btn"},{children:SHARED_TEXT.successDialogConfirm()}))}))]}))]})};var useStyles$1$2=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$e=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$e()["classes"];react.exports.useEffect(()=>{r(e)},[e]);const o=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.settingsHeader()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT.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?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.basicInfoTabLabel(),disabled:!1,id:"Basic Info"},{label:SHARED_TEXT.accountLinkingTabLabel(),disabled:!1,id:"Account Linking"},{label:SHARED_TEXT.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$1$2()["classes"];const p=useDispatch();var f=useSelector(hidePasswordResetSelector)||!1,h=useSelector(preferredLanguageSelector)||"en";const[m,g]=react.exports.useState({firstName:"",lastName:"",phoneNumber:"",email:""}),[y,v]=react.exports.useState({firstName:"",lastName:"",phoneNumber:""}),[x,C]=react.exports.useState(!1),[b,$]=react.exports.useState(null),[w,S]=react.exports.useState(!1),[_,T]=react.exports.useState(!1),[E,j]=react.exports.useState(0);var I=useSelector(userAuthStatusSelector);const R=AIWareFormatMessage(h);react.exports.useEffect(()=>{e&&O(e)},[e]);const O=e=>{const{firstName:t,lastName:n,imageUrl:r,userSettings:i}=e;e=null===i||void 0===i?void 0:i.find(e=>"phoneNumber"===e.key);g({firstName:t||"",lastName:n||"",phoneNumber:(null==e?void 0:e.value)||"",email:""}),r&&$(r)};var L=react.exports.useCallback(()=>{null!=e&&e.email&&(S(!1),n(null==e?void 0:e.email))},[e,n]);var M=n=>e=>{const t=e.target.value;g(e=>Object.assign(Object.assign({},e),{[n]:t})),v(e=>Object.assign(Object.assign({},e),{[n]:""}))};const A=()=>{p(hidePanel$1(u))},k=e=>{o(e),setTimeout(()=>{p(hidePanel$1(u))},500)};I=[AuthStatus.LOGGING_OUT,AuthStatus.LOGGED_OUT].includes(I);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:b,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:A,onSaveAvatar:k,avatarHistory:a}},t={panelId:u,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,withTab:!1,marginStart:490,width:450,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:I},{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:E,onChangeTab:e=>{j(e)},tabsList:tabsList$2})}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.secondBox},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:E,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:!x&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"button-edit",onClick:()=>{T(!1),S(!1),C(!0)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$13,alt:""})}))}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formBox},{children:[x?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(TextField$1,{id:"firstName",label:R({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: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:R({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: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:R({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: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&&O(e),C(!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||(v(Object.assign(Object.assign({},y),{firstName:"This field is required."})),e=!1),m.lastName||(v(Object.assign(Object.assign({},y),{lastName:"This field is required."})),e=!1),m.phoneNumber&&!/^\+?(\d){6,}$/.test(m.phoneNumber.toLowerCase())&&(v(Object.assign(Object.assign({},y),{phoneNumber:"Invalid phone number."})),e=!1),e})()&&(i(m),C(!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}))]})),w?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:()=>{S(!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:[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:"********"})),!f&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"btn-click-pw-reset",className:d.iconResetPw,onClick:()=>{T(!1),S(!0),C(!1)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$12,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")]}))})]})]})),_?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:()=>{T(!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:()=>{T(!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"})}))]}))]}):!w&&s&&jsxRuntime.exports.jsx("div",Object.assign({id:"click-reset-biometric",onClick:()=>{T(!0),S(!1),C(!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:E,index:1},{children:jsxRuntime.exports.jsx(AccountLinking,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:E,index:2},{children:jsxRuntime.exports.jsx(ProfileSettings,{selectedLanguage:h,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);var m=useSelector(betaFeaturesSelector);const[g,y]=react.exports.useState("");var v=useStyles$9()["classes"];return react.exports.useEffect(()=>{y(h.loading)},[h]),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:g}),l===TabId.APP_PANEL&&(m?jsxRuntime.exports.jsx(ApplicationPanel,{recentApplist:c,applications:u,onClickApp:d}):jsxRuntime.exports.jsx(ApplicationPanel$1,{recentApplist:c,applications:u,onClickApp:d})),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$1="applications",applicationSelector=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$1$1]},HANDLE_CLICK_APP=`aiware/${namespace$1$1}/get handle click app`,REQUEST_GET_APPLICATION_V1=`aiware/${namespace$1$1}/request get app`,GET_APPLICATION_V1_START=`aiware/${namespace$1$1}/get app list start`,GET_APPLICATION_V1_SUCCESS=`aiware/${namespace$1$1}/get app list success`,GET_APPLICATION_V1_ERROR=`aiware/${namespace$1$1}/get app list error`;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$1={application:[],message:"",status:"idle"};function applicationReducer(e,t){if(void 0===e)return initialState$2$1;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"});default:return e}}const namespace$4="activities",allActivitySeletor=e=>{return(null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$4])||[]},today=DateTime_1.local().startOf("day"),activitySelector=createSelector([allActivitySeletor],e=>{const{records:t,filter:n}=e;return"today"===n?t.filter(e=>DateTime_1.fromISO(e.createdDateTime).hasSame(today,"day")):t}),GET_ACTIVITY=`os-app-bar-panel/${namespace$4}/get activity`,GET_ACTIVITY_SUCCESS=`os-app-bar-panel/${namespace$4}/get activity success`,UPDATE_ACTIVITY_FILTER=`os-app-bar-panel/${namespace$4}/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$1={records:[],filter:"all",fetched:!1,fetching:!1,processing:!1};function activityReducer(e,t){if(void 0===e)return initialState$1$1;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$3]:userReducer$1,[namespace$4]:activityReducer,[namespace$1$1]:applicationReducer});const nameSpace$2="aiWareHeaderBarPanel";function*handleClickAppSaga(e){yield call$7(storeRecentApplications,e.payload)}function*getApplicationsSaga(){yield put(getApplicationStart());var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);const n=yield call$7(getApplicationsApi,e,t);var e=yield select(graphEndpointSelector),e=yield call$7(getApplicationLogo,e,t);const r=(null==(e=null==(t=null==e?void 0:e.data)?void 0:t.applications)?void 0:e.records)||[],i=r.reduce((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t}),{});n&&n.results?yield put(getApplicationSuccess(((null===n||void 0===n?void 0:n.results)||[]).map(e=>{var t;let n=null!=(t=i[e.applicationId])&&t.signedIconUrl?decodeURIComponent(decodeURI(null==(t=i[e.applicationId])?void 0:t.signedIconUrl)):"";return n=(n=n.replaceAll("&","&")).replaceAll("host?","host&"),{id:e.applicationId,name:e.applicationName,iconUrl:n||(null==(t=i[e.applicationId])?void 0:t.signedIconSvg)||e.applicationIconUrl||e.applicationIconSvg||e.signedApplicationIconUrl,description:e.applicationDescription}}))):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$3(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 __awaiter$1(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 delay(t=1e3){return __awaiter$1(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=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),t=yield call$7(getCurrentUserGraphQLApi,t,n);if(null!=t&&t.errors&&0<(null==t?void 0:t.errors.length)&&(null==(n=t.errors[0].path)||!n.includes("userSettings")))console.error("getCurrentUser error");else{n=(null==(n=null==(n=null==t?void 0:t.data)?void 0:n.me)?void 0:n.recentImageUrls)||[];const r=(null==(e=null==(e=null==t?void 0:t.data)?void 0:e.myRights)?void 0:e.operations)||[];yield put(getCurrentUserSuccess$1(Object.assign(Object.assign({},(null==(e=null==t?void 0:t.data)?void 0:e.me)||{}),{organizationRole:{organizationId:get$3(t,"data.me.organization.id",""),role:r.includes("veritone.superadmin")?"superadmin":r.includes("admin.access")?"admin":"user"},organization:Object.assign({},(null==(e=null==(e=null==t?void 0:t.data)?void 0:e.me)?void 0:e.organization)||{}),roles:((null==(t=null==(e=null==t?void 0:t.data)?void 0:e.me)?void 0:t.roles)||[]).map(e=>e.appName),avatarHistory:n})))}}function*resetBiometricSaga(){var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);yield call$7(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$7(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$7(()=>updateUserProfileApi(t,n,r));const o=AIWareFormatMessage(e);!1===(null==i?void 0:i.success)?yield put(updateProfileFail()):(yield put(getCurrentUser$1()),yield put(showMessage({content:o({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$7(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$7(updateUserAvatarApi,e,t,n);const i=AIWareFormatMessage(r);e.errors?yield put(updateProfileFail()):(yield put(showMessage({content:i({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);const t=AIWareFormatMessage(e);yield put(showMessage({content:t({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$7(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$7(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=yield select(graphEndpointSelector),t=yield select(authSelector),n=yield select(sessionTokenSelector),r=yield select(loginUrlSelector),i=yield select(logoutRedirectUrlSelector);try{if(!n)return yield put(logoutUserSuccess()),void(yield call$7(hardLogout));window.__logout_requested=!0,yield call$7(postNotificationApi,e,null==t?void 0:t.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.goToLoginPage,value:window.navigator.userAgent},!0,"json",aiwareEvent,n),yield delay(500);var o=yield call$7(logoutUserApi,n,e);if(null!=o&&o.errors||!1===(null==o?void 0:o.success))return yield call$7(redirectToLogoutOrError),void(yield put(logoutUserFail()));yield put(logoutUserSuccess()),goToPage(i||r)}catch(e){yield call$7(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$7(getActivityApi);if(e.success){const t=e.data["records"];yield put(getActivitySuccess(t.map(formatActivityData)))}else{e=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(e);yield put(showMessage({content:n({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$1(){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$1],initialActions:[getActivity(),getCurrentUser$1(),requestGetApplications()],retained:!0}}const initialState$4={openIdConnectors:[],connectedOpenIds:[],message:"",status:LoadingStatus.Idle};function openIdConReducer(e,t){if(void 0===e)return initialState$4;switch(t.type){case GET_OPEN_ID_CONNECTORS:return Object.assign(Object.assign({},e),{status:0===e.openIdConnectors.length&&LoadingStatus.Pending});case GET_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{openIdConnectors:t.payload.data,status:LoadingStatus.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:LoadingStatus.Failed});default:return e}}const getAllOpenIdConnectorApi=(t,n,r)=>__awaiter$1(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/api/admin/openid/org/"+n,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"});return e.json()}catch(e){console.error(e)}}),getConnectedOpenIdConnectorApi=(t,n,r)=>__awaiter$1(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/api/admin/openid/user/"+n,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"});return e.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$7(getAllOpenIdConnectorApi,r,i,n),a=call$7(getConnectedOpenIdConnectorApi,r,i,n);if(0===(null===e||void 0===e?void 0:e.results.length)?[e,t]=yield all([o,a]):t=yield a,!e||!t)return void(yield put(getOpenIdConnectorError("error on loading open ids")));yield put(getOpenIdConnectorSuccess(e.results)),yield put(getConnectedOpenIdsSuccess(t.results))}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]:openIdConReducer},sagas:[openIdRootSaga],initialActions:[]}}function SettingPanelComponent({tabId:e}){const t=useDispatch(),{application:n=[]}=useSelector(applicationSelector)||{};var{currentUser:r={}}=useSelector(userSelector$1)||{};const{avatarHistory:i=[],id:o}=r;var a=useSelector(activitySelector)||[],s=useSelector(allActivitySeletor)["filter"];const[l,c]=react.exports.useState(0),[u,d]=react.exports.useState([]),[p,f]=react.exports.useState([]),h=react.exports.useCallback(()=>{var e=get$3(JSON.parse(localStorage.getItem("recentApplicationWithUserId")||"{}"),[o],[]);f(e)},[o]);return react.exports.useEffect(()=>{o&&h()},[o,h]),react.exports.useEffect(()=>{t(requestGetApplications()),t(getActivity()),t(getCurrentUser$1())},[t]),react.exports.useEffect(()=>{c(e||0)},[e]),react.exports.useEffect(()=>{if(0<p.length&&0<n.length){const t=p.join(",");var e=n.filter(e=>t.includes(""+e.id));d(e)}},[p,n]),jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getAppbarPanelModule(),getOpenIdModule()]},{children:jsxRuntime.exports.jsx(SettingPanel,{tabId:l,currentUser:r,activities:a,activityFilter:s,onChangeActivityFilter:function(e){t(updateActivityFilter({filter:e}))},handleResetBiometric:function(){t(resetBiometric())},handleResetPassword:function(e){t(resetPassword({email:e}))},handleLogout:function(){t(logout())},handleUpdateProfile:function(e){t(updateProfile(e))},organizationRole:get$3(r,"organizationRole",{}),recentApp:u,applications:function(){const t=p.join(",");return n.filter(e=>!t.includes(""+e.id))}(),onClickApp:function(e){t(appSwitcherHandleClick(""+e)),setTimeout(()=>{h()},500)},handleUploadAvatar:function(e){t(uploadAvatar(e))},avatarHistory:i})}))})})}))}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$1$2()["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$1t,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"})}))]}))]}))})}var index_esm$1=Object.freeze({__proto__:null,AppList:AppList,EditProFilePicture:EditProFilePicture,VeritonePanel:SettingPanelComponent,applicationSelector:applicationSelector,getAppbarPanelModule:getAppbarPanelModule,requestGetApplications:requestGetApplications}),Close={},_interopRequireDefault$2=interopRequireDefault.exports,default_1$2=(Object.defineProperty(Close,"__esModule",{value:!0}),Close.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(createSvgIcon),_jsxRuntime$2=jsxRuntime.exports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.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$2=Close.default=_default$2,Message={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(Message,"__esModule",{value:!0}),Message.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"}),"Message"),default_1$1=Message.default=_default$1,Description={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Description,"__esModule",{value:!0}),Description.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"}),"Description");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?c(e):t}function s(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=u(n);return a(this,r?(e=u(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}var default_1=Description.default=_default,d="object"===("undefined"==typeof window||"undefined"==typeof window?"undefined":i(window)),f=d?document:{},v=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"];function p(r,i){var o;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o&&clearTimeout(o),o=setTimeout(function(){r.apply(void 0,t),o=null},i)}}function h(t,n){var r=0;return function(){var e=(new Date).getTime();if(!(e-r<n))return r=e,t.apply(void 0,arguments)}}var m=function(){var e=r,t=react.exports.Component;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t);var n=s(r);function r(e){var t;if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");if((t=n.call(this,e)).state={idle:!1,oldDate:+new Date,lastActive:+new Date,lastIdle:null,idleTime:0,remaining:null,pageX:null,pageY:null},t.tId=null,t.eventsBound=!1,0<e.debounce&&0<e.throttle)throw new Error("onAction can either be throttled or debounced (not both)");return 0<e.debounce?t._onAction=p(e.onAction,e.debounce):0<e.throttle?t._onAction=h(e.onAction,e.throttle):e.onAction?t._onAction=e.onAction:t._onAction=function(){},0<e.eventsThrottle?t._handleEvent=h(t._handleEvent.bind(c(t)),e.eventsThrottle):t._handleEvent=t._handleEvent.bind(c(t)),e.startOnMount||(t.state.idle=!0),t._toggleIdleState=t._toggleIdleState.bind(c(t)),t.reset=t.reset.bind(c(t)),t.pause=t.pause.bind(c(t)),t.resume=t.resume.bind(c(t)),t.isIdle=t.isIdle.bind(c(t)),t.getRemainingTime=t.getRemainingTime.bind(c(t)),t.getElapsedTime=t.getElapsedTime.bind(c(t)),t.getLastActiveTime=t.getLastActiveTime.bind(c(t)),t.getLastIdleTime=t.getLastIdleTime.bind(c(t)),t.getTotalIdleTime=t.getTotalIdleTime.bind(c(t)),t.getTotalActiveTime=t.getTotalActiveTime.bind(c(t)),t}return o(r.prototype,[{key:"componentDidMount",value:function(){this._bindEvents(),this.props.startOnMount&&this.reset()}},{key:"componentDidUpdate",value:function(e){e.debounce!==this.props.debounce&&(this._onAction=p(this._onAction,this.props.debounce)),e.throttle!==this.props.throttle&&(this._onAction=h(this._onAction,this.props.throttle)),e.eventsThrottle!==this.props.eventsThrottle&&(this._handleEvent=h(this._handleEvent,this.props.eventsThrottle)),e.timeout!==this.props.timeout&&null!==this.tid&&this.reset()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.tId),this._unbindEvents(!0)}},{key:"render",value:function(){return this.props.children||null}},{key:"_bindEvents",value:function(){var e,t,n,r,i,o=this;d&&(e=this.props,t=e.element,n=e.events,r=e.passive,i=e.capture,this.eventsBound||(n.forEach(function(e){t.addEventListener(e,o._handleEvent,{capture:i,passive:r})}),this.eventsBound=!0))}},{key:"_unbindEvents",value:function(){var e,t,n,r,i,o=this;d&&(e=this.props,t=e.element,n=e.events,r=e.passive,i=e.capture,(this.eventsBound||0<arguments.length&&void 0!==arguments[0]&&arguments[0])&&(n.forEach(function(e){t.removeEventListener(e,o._handleEvent,{capture:i,passive:r})}),this.eventsBound=!1))}},{key:"_toggleIdleState",value:function(r){var i=this;this.setState(function(e){return{idle:!e.idle,lastIdle:e.idle?e.lastIdle:+new Date-i.props.timeout,idleTime:e.idle?e.idleTime+ +new Date-e.lastIdle:e.idleTime}},function(){var e=i.props,t=e.onActive,n=e.onIdle,e=e.stopOnIdle;i.state.idle?(e&&(clearTimeout(i.tId),i.tId=null,i._unbindEvents()),n(r)):e||(i._bindEvents(),t(r))})}},{key:"_handleEvent",value:function(e){var t=this.state,n=t.remaining,r=t.pageX,i=t.pageY,t=t.idle,o=this.props,a=o.timeout,o=o.stopOnIdle;if(this._onAction(e),!n){if("mousemove"===e.type){if(e.pageX===r&&e.pageY===i)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(this.getElapsedTime()<200)return}clearTimeout(this.tId),this.tId=null;n=+new Date-this.getLastActiveTime();(t&&!o||!t&&a<n)&&this._toggleIdleState(e),this.setState({lastActive:+new Date,pageX:e.pageX,pageY:e.pageY}),t&&o||(this.tId=setTimeout(this._toggleIdleState,a))}}},{key:"reset",value:function(){clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null});var e=this.props.timeout;this.tId=setTimeout(this._toggleIdleState,e)}},{key:"pause",value:function(){null===this.state.remaining&&(this._unbindEvents(),clearTimeout(this.tId),this.tId=null,this.setState({remaining:this.getRemainingTime()}))}},{key:"resume",value:function(){var e=this.state,t=e.remaining,e=e.idle;null!==t&&(this._bindEvents(),e||(this.tId=setTimeout(this._toggleIdleState,t),this.setState({remaining:null,lastActive:+new Date})))}},{key:"getRemainingTime",value:function(){var e=this.state,t=e.remaining,e=e.lastActive,n=this.props.timeout;if(null!==t)return t<0?0:t;t=n-(+new Date-e);return t<0?0:t}},{key:"getElapsedTime",value:function(){var e=this.state.oldDate;return+new Date-e}},{key:"getLastIdleTime",value:function(){return this.state.lastIdle}},{key:"getTotalIdleTime",value:function(){var e=this.state,t=e.idle,n=e.lastIdle,e=e.idleTime;return t?+new Date-n+e:e}},{key:"getLastActiveTime",value:function(){return this.state.lastActive}},{key:"getTotalActiveTime",value:function(){return this.getElapsedTime()-this.getTotalIdleTime()}},{key:"isIdle",value:function(){return this.state.idle}}]),r}();function g(){function n(e){var t=!T.current;(T.current=t)?($&&(clearTimeout(O.current),O.current=null,V()),M.current=+new Date-k.current,N.current(e)):$||(A.current+=+new Date-M.current,D(),F.current(e))}function e(){if(null!==j.current)return j.current<0?0:j.current;var e=k.current-(+new Date-L.current);return e<0?0:e}function r(){return+new Date-E.current}function t(){return T.current?+new Date-M.current+A.current:A.current}function i(){return L.current}function o(){clearTimeout(O.current),O.current=null,D(),T.current=!1,E.current=+new Date,L.current=+new Date,j.current=null,O.current=setTimeout(n,k.current)}var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},s=a.timeout,l=void 0===s?12e5:s,s=a.element,c=void 0===s?f:s,s=a.events,u=void 0===s?v:s,s=a.onIdle,m=void 0===s?function(){}:s,s=a.onActive,g=void 0===s?function(){}:s,s=a.onAction,y=void 0===s?function(){}:s,s=a.debounce,x=void 0===s?0:s,s=a.throttle,C=void 0===s?0:s,s=a.eventsThrottle,b=void 0===s?200:s,s=a.startOnMount,H=void 0===s||s,s=a.stopOnIdle,$=void 0!==s&&s,s=a.capture,w=void 0===s||s,s=a.passive,S=void 0===s||s,_=react.exports.useRef(!1),T=react.exports.useRef(!0),E=react.exports.useRef(+new Date),j=react.exports.useRef(null),I=react.exports.useRef(null),R=react.exports.useRef(null),O=react.exports.useRef(null),L=react.exports.useRef(null),M=react.exports.useRef(null),A=react.exports.useRef(0),k=react.exports.useRef(l),N=react.exports.useRef(m),F=react.exports.useRef(g),B=react.exports.useRef(y),P=function(e){if(B.current(e),!j.current){if("mousemove"===e.type){if(e.pageX===I&&e.pageY===R)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(r()<200)return}clearTimeout(O.current),O.current=null;var t=+new Date-i();(T.current&&!$||!T.current&&t>k.current)&&n(e),L.current=+new Date,I.current=e.pageX,R.current=e.pageY,T.current&&$||(O.current=setTimeout(n,k.current))}},D=function(){!d||_.current||(u.forEach(function(e){c.addEventListener(e,P,{capture:w,passive:S})}),_.current=!0)},V=function(){d&&(_.current||0<arguments.length&&void 0!==arguments[0]&&arguments[0])&&(u.forEach(function(e){c.removeEventListener(e,P,{capture:w,passive:S})}),_.current=!1)};return react.exports.useEffect(function(){if(0<x&&0<C)throw new Error("onAction can either be throttled or debounced (not both)");return 0<b&&(P=h(P,b)),D(),H&&o(),function(){clearTimeout(O.current),V(!0)}},[]),react.exports.useEffect(function(){N.current=m},[m]),react.exports.useEffect(function(){F.current=g},[g]),react.exports.useEffect(function(){B.current=0<x?p(y,x):0<C?h(y,C):y},[y]),react.exports.useEffect(function(){k.current=l,null!==O.current&&o()},[l]),{isIdle:function(){return T.current},pause:function(){null===j.current&&(V(),clearTimeout(O.current),O.current=null,j.current=e())},reset:o,resume:function(){null!==j.current&&(D(),T.current||(O.current=setTimeout(n,j.current),j.current=null,L.current=+new Date))},getLastIdleTime:function(){return M.current},getTotalIdleTime:t,getLastActiveTime:i,getTotalActiveTime:function(){return r()-t()},getElapsedTime:r,getRemainingTime:e}}m.propTypes={timeout:PropTypes.number,events:PropTypes.arrayOf(PropTypes.string),onIdle:PropTypes.func,onActive:PropTypes.func,onAction:PropTypes.func,debounce:PropTypes.number,throttle:PropTypes.number,eventsThrottle:PropTypes.number,element:PropTypes.oneOfType([PropTypes.object,PropTypes.element]),startOnMount:PropTypes.bool,stopOnIdle:PropTypes.bool,passive:PropTypes.bool,capture:PropTypes.bool},m.defaultProps={timeout:12e5,element:f,events:v,onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,eventsThrottle:200,startOnMount:!0,stopOnIdle:!1,capture:!0,passive:!0},g.propTypes={timeout:PropTypes.number,events:PropTypes.arrayOf(PropTypes.string),onIdle:PropTypes.func,onActive:PropTypes.func,onAction:PropTypes.func,debounce:PropTypes.number,throttle:PropTypes.number,eventsThrottle:PropTypes.number,element:PropTypes.oneOfType([PropTypes.object,PropTypes.element]),startOnMount:PropTypes.bool,stopOnIdle:PropTypes.bool,passive:PropTypes.bool,capture:PropTypes.bool},g.defaultProps={timeout:12e5,element:f,events:v,onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,eventsThrottle:200,startOnMount:!0,stopOnIdle:!1,capture:!0,passive:!0};var WidgetsStatus,tinycolor$1={exports:{}},tinycolor=(!function(e){function u(e,t){if(t=t||{},(e=e||"")instanceof u)return e;if(!(this instanceof u))return new u(e,t);var 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(w,"").replace(S,"").toLowerCase();var t,n=!1;if(R[e])e=R[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:C(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:C(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&&(b(e.r)&&b(e.g)&&b(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"):b(e.h)&&b(e.s)&&b(e.v)?(r=v(e.s),i=v(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"):b(e.h)&&b(e.s)&&b(e.l)&&(r=v(e.s),o=v(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:E(255,j(t.r,0)),g:E(255,j(t.g,0)),b:E(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=T(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=T(this._r)),this._g<1&&(this._g=T(this._g)),this._b<1&&(this._b=T(this._b)),this._ok=n.ok,this._tc_id=_++}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=E(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=E(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=[y(T(e).toString(16)),y(T(t).toString(16)),y(T(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[y(x(r)),y(T(e).toString(16)),y(T(t).toString(16)),y(T(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,E(255,e.r-T(-t/100*255))),e.g=j(0,E(255,e.g-T(-t/100*255))),e.b=j(0,E(255,e.b-T(-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 V(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 H(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 F(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=E(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 E(1,j(0,e))}function g(e){return parseInt(e,16)}function y(e){return 1==e.length?"0"+e:""+e}function v(e){return e=e<=1?100*e+"%":e}function x(e){return $.round(255*parseFloat(e)).toString(16)}function C(e){return g(e)/255}function b(e){return k.CSS_UNIT.exec(e)}var $,w,S,_,T,E,j,I,R,O,L,M,A,k;$=Math,w=/^\s+/,S=/\s+$/,_=0,T=$.round,E=$.min,j=$.max,I=$.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=T(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=T(360*e.h),n=T(100*e.s),e=T(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=T(360*e.h),n=T(100*e.s),e=T(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=[y(T(t).toString(16)),y(T(n).toString(16)),y(T(r).toString(16)),y(x(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:T(this._r),g:T(this._g),b:T(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+T(this._r)+", "+T(this._g)+", "+T(this._b)+")":"rgba("+T(this._r)+", "+T(this._g)+", "+T(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:T(100*h(this._r,255))+"%",g:T(100*h(this._g,255))+"%",b:T(100*h(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+T(100*h(this._r,255))+"%, "+T(100*h(this._g,255))+"%, "+T(100*h(this._b,255))+"%)":"rgba("+T(100*h(this._r,255))+"%, "+T(100*h(this._g,255))+"%, "+T(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(H,arguments)},complement:function(){return this._applyCombination(N,arguments)},monochromatic:function(){return this._applyCombination(F,arguments)},splitcomplement:function(){return this._applyCombination(V,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]:v(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:I(),g:I(),b:I()})},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))},R=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}(R),M="[\\s|\\(]+("+(L="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",A="[\\s|\\(]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",k={CSS_UNIT:new RegExp(L),rgb:new RegExp("rgb"+M),rgba:new RegExp("rgba"+A),hsl:new RegExp("hsl"+M),hsla:new RegExp("hsla"+A),hsv:new RegExp("hsv"+M),hsva:new RegExp("hsva"+A),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(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(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(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const useStyles$2$1=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,"-webkit-mask":`url("${img$1v}") 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:{"-webkit-mask":`url("${img$_}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},veritoneLogo:{"-webkit-mask":`url("${img$1u}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openPanel:{backgroundImage:`url("${img$19}") !important`},notificationIcon:{"-webkit-mask":`url("${img$2}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},applicationSettingsIcon:{"-webkit-mask":`url("${img$1o}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},dashboardIcon:{"-webkit-mask":`url("${img$4}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openNotificationPanel:{backgroundImage:`url(${img$18}) !important`},orgIcon:{borderRadius:"50%",width:30,height:30,backgroundRepeat:"no-repeat",backgroundPosition:"center"},logoIcon:{"-webkit-mask":`url("${n}") no-repeat 50% 50%`,backgroundColor:t},helpIcon:{"-webkit-mask":`url("${img$3}") no-repeat 50% 50%`,backgroundColor:t,"&:hover":{backgroundColor:t}},openHelp:{backgroundImage:`url(${img$17}) !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$1=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:{"-webkit-mask":`url("${img$3}") 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})=>{var a=useStyles$1$1()["classes"];const[s,l]=react.exports.useState(null);const c=()=>{l(null),null!=e&&e()};var u=n||r,d=null==(d=window.config)?void 0:d.appVersion;return jsxRuntime.exports.jsxs("div",Object.assign({className:a.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:a.barIcon,onClick:e=>{l(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(a.icon,a.helpIcon)})}))})),jsxRuntime.exports.jsx(Popover$1,Object.assign({open:Boolean(s),anchorEl:s,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},onClose:c,className:a.popover,classes:{paper:a.popoverColor},disableScrollLock:!0},{children:jsxRuntime.exports.jsxs(List$2,Object.assign({disablePadding:!0,className:a.list},{children:[u&&jsxRuntime.exports.jsxs(ListItem$1,Object.assign({button:!0,onClick:()=>{c(),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(default_1,{})}),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:a.helpItemText}})]})),o&&jsxRuntime.exports.jsxs(ListItem$1,Object.assign({button:!0,onClick:()=>{null!=i&&i(),l(null)},"data-veritone-element":"open-support-chat-button","data-testid":"support-chat-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(default_1$1,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.8aLpuV",defaultMessage:"Support Center",description:"help tooltip: text for documentation"}),classes:{root:a.helpItemText}})]})),d&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(ListItem$1,Object.assign({className:a.versionWrapper},{children:jsxRuntime.exports.jsx(ListItemText$1,{primary:d,classes:{primary:a.versionText}})}))]})]}))}))]}))},namespace$1="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$3=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$3().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,y]=react.exports.useState(new Date),[v,x]=react.exports.useState(),[C,b]=react.exports.useState(),[$,w]=react.exports.useState(!1),[S,_]=react.exports.useState(!1),T=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setIsIdle,value:e,ephemeral:!0,contentType:"json"}))},[n]),E=(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]),I=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setCallResetIdleTimer,value:e,ephemeral:!0,contentType:"json"}))},[n]),R=react.exports.useCallback(()=>{logoutCallCounter++,E(!0);var e=l?500:5e3;n(logoutRequest({token:o})),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},t?2e3:e)},[E,n,o,a,l]);var O=react.exports.useCallback(()=>{logoutCallCounter++,T(!1),setTimeout(()=>{E(!0),j(!0),n(logoutRequest({token:o}))},500),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},500)},[E,n,o,a,j,T]);var L=()=>{T(!0),clearInterval(timer),timer=setInterval(()=>{h(e=>e-1)},1e3)},M=()=>{!r&&p<RESET_IDLE_TIMER_CALL_LIMIT&&I(!0)};const A=g(t?{timeout:5e3,onIdle:L,onAction:M,debounce:1e3}:{timeout:6e4*i,onIdle:L,onAction:M,debounce:i/4*6e4})["reset"],k=react.exports.useCallback(()=>{I(!1),A()},[I]),N=react.exports.useCallback(()=>{S&&(n(extendTokenRequest({token:o})),_(!1)),T(!1),k(),clearInterval(timer),setTimeout(()=>{h(t?5:60)},500)},[T,k,S,n,o]);return react.exports.useEffect(()=>{setTimeout(()=>{y(new Date)},1e3)},[m]),react.exports.useEffect(()=>{if(c){const e=new Date(c);e.setMinutes(e.getMinutes()-MINUTES_BEFORE_SESSION_EXPIRATION),b(new Date(c)),x(e)}},[c]),react.exports.useEffect(()=>{C&&C.getTime()<m.getTime()&&w(!0),v&&v.getTime()<m.getTime()&&_(!0)},[C,v,m]),react.exports.useEffect(()=>{$?R():S&&T(!0)},[C,v,S,$,R,T]),react.exports.useEffect(()=>{s&&logoutCallCounter<LOGOUT_CALL_LIMIT&&R()},[s,R]),react.exports.useEffect(()=>{r&&0===f&&(clearInterval(timer),setTimeout(()=>{h(10)},500),R())},[f,R,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,{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"}):S?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,title:a,help:s,notification:l=!0,userApplicationSettingsIcon:c,onClickOrgIcon:u,closeButton:d,onCloseSetting:p,onClose:f,onOpenSetting:h,onOpenHelpCenter:m,onOpenNotification:g,onOpenUserApplicationSettings:y,openSetting:v,organization:x={},panels:C=[],unseenCount:b,searchBarMountId:$,textColor:w,rightActions:S=[],applications:_=[],onClickAppSwitchIcon:T,displaySupportChat:E=!0,onDashboardClick:j,showDashboardIcon:I=!1}){var R=tinycolor(o).isDark(),w=w||(R?"#fff":"#000"),R=R?"rgba(255,255,255,0.1)":"rgb(243,245,249)";const O=useStyles$2$1({titleColor:w,logo:i,activeColor:R})["classes"],[L,M]=react.exports.useState([]);R=useSelector(userSelector)||{};const[A,k]=react.exports.useState(!0);var{appIcon:R,currentUser:N}=getUserInfo(R),P=useSelector(betaFeaturesSelector);return react.exports.useEffect(()=>{var e=C.map(e=>e.panelId);!e.length&&!L.length||isEqual(e,L)||M(e)},[C,L]),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:O.appBar,style:{height:appBarHeight,background:o,zIndex:t}},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:O.menuButton},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-menu","data-testid":"app-bar-menu",className:O.iconButton,onClick:r,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.hamburgerIcon)})}))})),!!R&&""!==R&&jsxRuntime.exports.jsx("div",Object.assign({className:O.margin},{children:jsxRuntime.exports.jsx("img",{className:O.appIcon,src:R,alt:"appIcon"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:O.content,style:{color:w}},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.left,O.noSelect),onClick:function(){window.location.href="/"},"data-test":"appbarTitle","data-testid":"appbarTitle"},{children:i?jsxRuntime.exports.jsx("span",{className:O.appLogo}):jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:O.title},{children:a}))})),jsxRuntime.exports.jsx("div",{"data-test":"appbarSearch",id:$||"search-bar-id",className:O.searchBarHolder}),jsxRuntime.exports.jsx("div",Object.assign({className:O.right},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:O.controllers},{children:[0<S.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.iconGroup,O.noSelect)},{children:S.map(({label:e,onClick:t,isActive:n=!0},r)=>jsxRuntime.exports.jsx("div",Object.assign({className:O.iconGroupIcon},{children:jsxRuntime.exports.jsx("span",{onClick:e=>t?t(e):null,className:classnames(O.rightActionLabel,n?O.active:O.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:O.barIcon,onClick:j,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.dashboardIcon)})}))})),s&&jsxRuntime.exports.jsx("div",Object.assign({"data-test":"app-bar-help-container","data-testid":"app-bar-help-container",className:classnames(O.margin,{[O.panelActive]:L.includes(HELP_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Help,{tooltipTitle:"",helpDocLabel:"View Help Docs",supportLabel:"Support Center",helpDocCallback:()=>{null!=m&&m()},supportCallback:p,titleColor:w,displaySupportChat:E})})),l&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.margin,{[O.panelActive]:L.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:O.barIcon,onClick:g,"data-test":"app-bar-notification-button",size:"large","data-testid":"app-bar-notification-button"},{children:jsxRuntime.exports.jsx(Badge$1,Object.assign({badgeContent:b,max:NOTIFICATION_BADGE_MAX_COUNT,color:"primary","data-test":"app-bar-notification-badge",className:O.notificationBadge},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.notificationIcon,{[O.openNotificationPanel]:null==v?void 0:v.openNotificationPanel})})}))}))}))})),P&&c&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.margin,{[O.panelActive]:L.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:O.barIcon,onClick:y,size:"large","data-testid":"app-bar-user-application-settings-button"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.applicationSettingsIcon)})}))}))})),1<_.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames({[O.panelActive]:L.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:O.barIcon,onClick:T,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.applicationIcon,{[O.openPanel]:null==v?void 0:v.openAppSwitchPanel})})}))}))})),(x.imageUrl||x.name)&&e&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(O.margin,{[O.panelActive]:L.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:O.barIcon+" "+O.orgButton,onClick:u,size:"large"},{children:x.imageUrl&&A?jsxRuntime.exports.jsx("img",{src:x.imageUrl,className:classnames(O.orgIcon),onError:function(){k(!1)},alt:"org_icon"}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:O.smallOrgAvatar,variant:"circular","data-testid":"app-bar-avatar"},{children:getSortName(x.name||"")}))}))}))})),N&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames({[O.panelActive]:L.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:O.barIcon,onClick:h,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(O.icon,O.veritoneLogo,{[O.openPanel]:null==v?void 0:v.openVeritonePanel})})}))}))})),d&&f&&jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("div",Object.assign({style:{marginLeft:"auto"}},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:f,"data-test":"app-bar-close-button",size:"large","data-testid":"app-bar-close-button"},{children:jsxRuntime.exports.jsx(default_1$2,{htmlColor:w})}))}))})]}))}))]}))]}))]})}const GET_CURRENT_USER=`os-app-bar/${namespace$1}/get current user`,GET_CURRENT_USER_SUCCESS=`os-app-bar/${namespace$1}/get current user success`,GET_CURRENT_USER_FAIL=`os-app-bar/${namespace$1}/get current user fail`,GET_CURRENT_APP_ICON=`os-app-bar/${namespace$1}/get current app icon`,GET_CURRENT_APP_ICON_SUCCESS=`os-app-bar/${namespace$1}/get app icon success`,getCurrentUser=()=>({type:GET_CURRENT_USER}),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$2={currentUser:{},fetched:!1,fetching:!1,error:!1};function userReducer(e,t){if(void 0===e)return initialState$2;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(void 0,void 0,void 0,function*(){var e=`
|
|
1150
1148
|
query {
|
|
1151
1149
|
application(id:"${t}"){
|
|
1152
1150
|
iconUrl
|
|
@@ -1165,4 +1163,4 @@ createScheduledJob(input:{
|
|
|
1165
1163
|
}
|
|
1166
1164
|
}
|
|
1167
1165
|
}
|
|
1168
|
-
`,graphEndpoint:e,token:t})}catch(e){return{success:!1}}});function*getCurrentUserSaga(){var e=yield select(graphEndpointSelector),t=yield select(sessionTokenSelector),e=yield call$7(getCurrentUserApi,e,t);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)&&(null==(t=e.errors[0].path)||!t.includes("userSettings"))?console.error("getCurrentUser error"):(t=Object.assign(Object.assign({},null==(t=null==e?void 0:e.data)?void 0:t.me),{organizationRole:{organizationId:get$3(e,"data.me.organization.id","")},organization:Object.assign({},null==(e=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:e.organization)}),yield put(getCurrentUserSuccess(t)))}function*getCurrentApplicationInfoSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=e.payload["applicationId"],e=yield call$7(getApplicationInfo,e,t,n);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)?console.error("getCurrentApplicationInfo error"):yield put(getCurrentAppIconSuccess(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.application)?void 0:n.iconUrl))}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga)]),yield all([takeEvery$1(GET_CURRENT_APP_ICON,getCurrentApplicationInfoSaga)])}function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*logoutListener(e){const t=e.payload;for(;;)yield take(logout),t?null!==t&&void 0!==t&&t():yield put(logoutUser$1())}function*notificationActionClickedSaga(e){const t=e.payload;yield takeEvery$1(onNotificationActionClicked,function*(e){t&&(yield call$7(t,e.payload))})}function*handleAppSwitchListenerSetup(e){const t=e.payload;yield takeEvery$1(appSwitcherHandleClick,function*(e){e=e.payload;t?t(e):yield put(appSwitcherHandleClickAppNatively(e))})}function*rootSaga(){yield all([fork(userSaga),fork(booting),takeLatest$1(listenLogout,logoutListener),takeLatest$1(appSwitcherSetupListener,handleAppSwitchListenerSetup),takeLatest$1(initNotificationAction,notificationActionClickedSaga)])}function getAppbarModule(){return{id:"os-app-bar",reducerMap:{[nameSpace$1]:userReducer},sagas:[rootSaga],initialActions:[]}}function App(e){var{onLogout:t,onClickNotificationAction:n,onAppSwitch:r,onClickOrgIcon:i,showNotifications:o,applicationId:a,searchBarMountId:s}=e,e=__rest(e,["onLogout","onClickNotificationAction","onAppSwitch","onShowSettingPanel","onClickOrgIcon","onClickHelpIcon","showNotifications","applicationId","searchBarMountId"]);const l=useDispatch(),[c,u]=react.exports.useState(!1),[d,p]=react.exports.useState(!1),[f,h]=react.exports.useState(!1),[m,g]=react.exports.useState(!1),[y,v]=react.exports.useState(!1),[x,C]=react.exports.useState(!1);var b=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var w=useSelector(unseenNotificationSelector);const S=useSelector(notificationStatusSelector),_=useSelector(betaFeaturesSelector);b=(b||{}).organization;const T=useSelector(authSelector)["user"];var{application:E=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);var R=_;const O=useSelector(appIdSelector),L=useSelector(selectApplicationConfig),[M,N]=react.exports.useState(!1);function A(){u(!1),h(!1),g(!1),p(!1),v(!1),C(!1)}function k(){null!==$&&void 0!==$&&$.forEach(e=>{l(hidePanel$1(e.panelId))})}return react.exports.useEffect(()=>{var e,t=window.location["search"];l(actions$2.userApplicationSettings.fetchApplicationConfigStart({appId:O})),"?panel=invite-requests"!==t||j||(I(!0),t={name:"INVITE_REQUESTS_PANEL",config:{name:"Invite Requests"}},e={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"medium",zIndex:1001,parentPanelId:null,dimmed:0,dimmedStatus:"dimParent",header:{title:"INVITE REQUESTS"}},l(mountPanel$1({panelId:"INVITE_REQUESTS_PANEL",microFrontend:t,panelConfig:e})))},[]),react.exports.useEffect(()=>{null!==L&&void 0!==L&&L.length&&N(!0)},[L]),react.exports.useEffect(()=>{"success"===S&&l(markAllNotificationsSeenRequest())},[S,l]),react.exports.useEffect(()=>{l(getCurrentUser()),a&&l(getCurrentAppIcon({applicationId:a}))},[l,a]),react.exports.useEffect(()=>{l({type:listenLogout().type,payload:t})},[l,t]),react.exports.useEffect(()=>{n&&l(initNotificationAction(n))},[l,n]),react.exports.useEffect(()=>{l({type:appSwitcherSetupListener().type,payload:r})},[l,r]),react.exports.useEffect(()=>{l(onBooted())},[l]),react.exports.useEffect(()=>{$&&0!==$.length||A()},[$]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getAppbarModule(),getAppbarPanelModule(),getNotificationModule$1(),getEventsModule(),getUserApplicationSettingsModule()]},{children:jsxRuntime.exports.jsx("div",Object.assign({className:"App",id:"aiware-app-bar","data-testid":"aiware-app-bar"},{children:jsxRuntime.exports.jsx(NewAppBar,Object.assign({isEnableOrgPanel:!1,onCloseSetting:function(){},onOpenSetting:function(){var e,t;c?(u(!1),k()):(A(),u(!0),k(),e={name:"APP_BAR_PANEL",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:VERITONE_PANEL_ID,type:"TAB_TEMPLATE",marginTop:55,withTab:!0,width:80,zIndex:1003,userRoles:null===T||void 0===T?void 0:T.roles,header:{divider:!0,title:""},footer:{logo:!0},size:"xlarge",fullScreen:!1},l(mountPanel$1({panelId:VERITONE_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenHelpCenter:function(){var e,t;d?(p(!1),k()):(A(),k(),p(!0),e={name:"HELP_PANEL",config:{name:"Help panel",dataId:"helpDataId",type:"SIMPLE_PANEL"}},t={panelId:HELP_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,size:"large",header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.headerTitle.helpCenter",defaultMessage:"Help Center",description:"The header title for the help center."}),actions:[{iconUrl:img$O,action:{type:"OPEN_HELP_LINK"}}]}},l(mountPanel$1({panelId:HELP_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenNotification:function(){var e,t;null!=o&&o(),y?(v(!1),k()):(A(),k(),v(!0),e={name:"NOTIFICATION_PANEL",config:{name:"Notification Panel",dataId:"notificationDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:413,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.panel.notifications",defaultMessage:"Notifications Center",description:"Title of the notifications center panel"}),actions:[]}},l(mountPanel$1({panelId:NOTIFICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenUserApplicationSettings:function(){var e,t;x?(C(!1),k()):(A(),k(),C(!0),e={name:"USER_APPLICATION_SETTINGS_PANEL",config:{name:"User application settings",dataId:"userApplicationSettingsDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:USER_APPLICATION_SETTINGS_PANEL,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:320,header:{divider:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle.user-application-name-settings",defaultMessage:"Application Settings",description:"Title of user application name settings panel"})}},l(mountPanel$1({panelId:USER_APPLICATION_SETTINGS_PANEL,microFrontend:e,panelConfig:t})))},onDashboardClick:function(){console.log("HANDLE DASHBOARD CLICK!")},organization:b,onClickOrgIcon:function(){var e,t;null!=i&&i(),m?(g(!1),k()):(A(),k(),g(!0),e={name:"ORGANIZATION_PANEL",config:{name:"Veritone",tabId:TabId.ORGANIZATION_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:ORGANIZATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:420,header:{divider:!0,title:"ORGANIZATIONS"}},l(mountPanel$1({panelId:ORGANIZATION_PANEL_ID,microFrontend:e,panelConfig:t})))},panels:$,searchBarMountId:s,openSetting:{openHelpPanel:!1,openNotificationPanel:!1,openAppSwitchPanel:!1,openOrgSwitchPanel:!1,openVeritonePanel:!1,openUserApplicationSettingsPanel:!1},unseenCount:w,onClickAppSwitchIcon:function(){var e,t;f?(h(!1),k()):(A(),k(),h(!0),e={name:"APP_BAR_PANEL",config:{name:"APP_BAR_PANEL",tabId:TabId.APP_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:APPLICATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:_?720:420,header:{divider:!0,title:_?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle",defaultMessage:"App Switcher",description:"Title of applications panel list"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle",defaultMessage:"Applications",description:"Title of applications panel list"})}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:E,showDashboardIcon:R,userApplicationSettingsIcon:M},e))}))}))})})}const headerBarSelector=e=>null==e?void 0:e.aiWareHeaderBar,registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent},registryLookup=n=>__awaiter$a(void 0,void 0,void 0,function*(){if(registry[n])return registry[n];let e,t=null;switch(n){case AvailableWidgets.SAMPLE_APP_BAR:e=yield import("./js-core.esm2.js"),t=e.SampleAppBar;break;case AvailableWidgets.RESET_PASSWORD:e=yield import("./js-core.esm4.js"),t=e.ResetPassword;break;case AvailableWidgets.FLOW_CENTER:e=yield import("./js-core.esm5.js"),t=e.App;break;case AvailableWidgets.FLOW_WIDGET:e=yield import("./js-core.esm7.js").then(function(e){return e.i}),t=e.App;break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=yield import("./js-core.esm18.js"),t=e.EngineCenterBrowse;break;case AvailablePanels.SIMPLE_PANEL:e=yield import("./js-core.esm26.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm27.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm27.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm27.js"),t=e.TabPanel;break;case AvailableComponents.NOTIFICATION_PANEL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationPanel;break;case AvailableComponents.NOTIFICATION_DETAIL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationDetailPanel;break;case AvailableComponents.NOTIFICATION_SETTING:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationSetting;break;case AvailableComponents.NOTIFICATION_UTILITY:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationUtilityPanel;break;case AvailableComponents.NOTIFICATION_APPLICATION:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationApplication;break;case AvailableComponents.HELP_PANEL:e=yield Promise.resolve().then(function(){return index_esm}),t=e.HelpCenterPanel;break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=yield Promise.resolve().then(function(){return index_esm$1}),t=e.EditProFilePicture;break;case AvailableComponents.TEST_COMPONENT:e=yield import("./js-core.esm26.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm26.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm26.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm30.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm28.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm28.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm28.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm28.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm28.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm31.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm31.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm31.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm35.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm37.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm38.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm39.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm41.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm19.js").then(function(e){return e.k}),t=e.EngineCenterNew;break;case AvailableComponents.ENGINE_CENTER_FILTER:e=yield import("./js-core.esm18.js"),t=e.EngineCenterFilter;break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=yield import("./js-core.esm18.js"),t=e.EngineDetails;break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=yield import("./js-core.esm18.js"),t=e.CreateNewBuildPanel;break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=yield import("./js-core.esm19.js").then(function(e){return e.k}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm19.js").then(function(e){return e.k}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm19.js").then(function(e){return e.k}),t=e.InputTypeFlyout;break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=yield import("./js-core.esm18.js"),t=e.EditReleaseNotes;break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=yield import("./js-core.esm18.js"),t=e.VersionHistoryPanel;break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=yield import("./js-core.esm35.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm35.js"),t=e.EditFileMetadata;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm42.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm42.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm42.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm42.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm42.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_ADD_ENGINE_PANEL:e=yield import("./js-core.esm42.js"),t=e.AppCenterAddEnginePanel;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm41.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm33.js").then(function(e){return e.a}),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm32.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm32.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm32.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm32.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm31.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm31.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm31.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm33.js").then(function(e){return e.a}),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm33.js").then(function(e){return e.a}),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm40.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm43.js"),t=e.ProcessingCenterSources;break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=yield Promise.resolve().then(function(){return index_esm$3}),t=e.UserApplicationSettingsPanel}return registry[n]=t}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$1=(!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)=>{const n=e.find(e=>e.widgetName===t);null!==n&&void 0!==n&&n.onComplete&&n.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$1,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(){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$7(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."}));const o=getElement(r,n);o.classList.add("aiware-el"),ReactDOM.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})})),o),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*(n){try{var e=yield select(e=>{const t=widgetsSelector(e);return(null==(e=t.find(e=>e.widgetId===n.payload))?void 0:e.elementId)||""});ReactDOM.unmountComponentAtNode(document.getElementById(e)||new DocumentFragment),yield put(unmountWidgetSuccess(n.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:[]}}var match,version,store,wmget,wmhas,wmset,set,get,has,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math==Math&&e},global$b=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$b=function(e){try{return!!e()}catch(e){return!0}},fails$a=fails$b,descriptors=!fails$b(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$9=fails$b,functionBindNative=!fails$b(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$1=functionBindNative,call$6=Function.prototype.call,functionCall=NATIVE_BIND$1?call$6.bind(call$6):function(){return call$6.apply(call$6,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND=functionBindNative,FunctionPrototype$1=Function.prototype,bind=FunctionPrototype$1.bind,call$5=FunctionPrototype$1.call,uncurryThis$c=NATIVE_BIND&&bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?function(e){return e&&uncurryThis$c(e)}:function(e){return e&&function(){return call$5.apply(e,arguments)}},uncurryThis$b=functionUncurryThis,toString$3=uncurryThis$b({}.toString),stringSlice=uncurryThis$b("".slice),classofRaw$1=function(e){return stringSlice(toString$3(e),8,-1)},uncurryThis$a=functionUncurryThis,fails$8=fails$b,classof$3=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$8(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$3(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$7=TypeError,requireObjectCoercible$3=function(e){if(null==e)throw $TypeError$7("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$2=requireObjectCoercible$3,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$2(e))},isCallable$f=function(e){return"function"==typeof e},isCallable$e=isCallable$f,isObject$6=function(e){return"object"==typeof e?null!==e:isCallable$e(e)},global$a=global$b,isCallable$d=isCallable$f,aFunction=function(e){return isCallable$d(e)?e:void 0},getBuiltIn$4=function(e,t){return arguments.length<2?aFunction(global$a[e]):global$a[e]&&global$a[e][t]},uncurryThis$9=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$3=getBuiltIn$4,engineUserAgent=getBuiltIn$4("navigator","userAgent")||"",global$9=global$b,userAgent=engineUserAgent,process$1=global$9.process,Deno=global$9.Deno,versions=process$1&&process$1.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent&&(!(match=userAgent.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=version,fails$7=fails$b,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$7(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$4,isCallable$c=isCallable$f,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$c(t)&&isPrototypeOf(t.prototype,$Object$3(e))},$String$3=String,tryToString$1=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$b=isCallable$f,tryToString=tryToString$1,$TypeError$6=TypeError,aCallable$1=function(e){if(isCallable$b(e))return e;throw $TypeError$6(tryToString(e)+" is not a function")},aCallable=aCallable$1,getMethod$1=function(e,t){e=e[t];return null==e?void 0:aCallable(e)},call$4=functionCall,isCallable$a=isCallable$f,isObject$5=isObject$6,$TypeError$5=TypeError,ordinaryToPrimitive$1=function(e,t){var n,r;if("string"===t&&isCallable$a(n=e.toString)&&!isObject$5(r=call$4(n,e)))return r;if(isCallable$a(n=e.valueOf)&&!isObject$5(r=call$4(n,e)))return r;if("string"!==t&&isCallable$a(n=e.toString)&&!isObject$5(r=call$4(n,e)))return r;throw $TypeError$5("Can't convert object to primitive value")},shared$3={exports:{}},global$8=global$b,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$5(global$8,t,{value:n,configurable:!0,writable:!0})}catch(e){global$8[t]=n}return n},global$7=global$b,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$b[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible$1=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$3),$Object$2=Object,toObject$3=function(e){return $Object$2(requireObjectCoercible$1(e))},uncurryThis$8=functionUncurryThis,toObject$2=toObject$3,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$2(e),t)},uncurryThis$7=functionUncurryThis,id=0,postfix=Math.random(),toString$2=uncurryThis$7(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$2(++id+postfix,36)},global$6=global$b,shared$2=shared$3.exports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$6.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$a=function(e){var t;return hasOwn$8(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$3=functionCall,isObject$4=isObject$6,isSymbol$1=isSymbol$2,getMethod=getMethod$1,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$9=wellKnownSymbol$a,$TypeError$4=TypeError,TO_PRIMITIVE=wellKnownSymbol$a("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$4(e)||isSymbol$1(e))return e;var n=getMethod(e,TO_PRIMITIVE);if(n){if(n=call$3(n,e,t=void 0===t?"default":t),!isObject$4(n)||isSymbol$1(n))return n;throw $TypeError$4("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$5=global$b,isObject$3=isObject$6,document$1=global$b.document,EXISTS$1=isObject$3(document$1)&&isObject$3(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$6=fails$b,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$b(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$7(e,t))return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$5=fails$b,v8PrototypeDefineBug=descriptors&&fails$b(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$2=isObject$6,$String$2=String,$TypeError$3=TypeError,anObject$5=function(e){if(isObject$2(e))return e;throw $TypeError$3($String$2(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$4=anObject$5,toPropertyKey=toPropertyKey$2,$TypeError$2=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var r;return anObject$4(e),t=toPropertyKey(t),anObject$4(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&((r=$getOwnPropertyDescriptor(e,t))&&r[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:r)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:r)[ENUMERABLE],writable:!1})),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$4(e),t=toPropertyKey(t),anObject$4(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $TypeError$2("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$4=DESCRIPTORS$5?function(e,t,n){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$6=functionUncurryThis,isCallable$9=isCallable$f,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$2=(isCallable$9(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$4=global$b,isCallable$8=isCallable$f,inspectSource$1=inspectSource$2,WeakMap$1=global$b.WeakMap,nativeWeakMap=isCallable$8(WeakMap$1)&&/native code/.test(inspectSource$1(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$3=global$b,uncurryThis$5=functionUncurryThis,isObject$1=isObject$6,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$5=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$3.TypeError,WeakMap$2=global$3.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject$1(e)&&(e=get(e)).type===t)return e;throw TypeError$1("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap$2),wmget=uncurryThis$5(store.get),wmhas=uncurryThis$5(store.has),wmset=uncurryThis$5(store.set),set=function(e,t){if(wmhas(store,e))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$4=fails$b,isCallable$7=isCallable$f,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$2,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,defineProperty$4=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$4(function(){return 8!==defineProperty$4(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$4(n,"arity")&&e.length!==n.arity&&defineProperty$4(e,"length",{value:n.arity});try{n&&hasOwn$4(n,"constructor")&&n.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$4(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$6=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$7(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$f),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,n,r){var i=(r=r||{}).enumerable,o=void 0!==r.name?r.name:t;if(isCallable$6(n)&&makeBuiltIn(n,o,r),r.global)i?e[t]=n:defineGlobalProperty$1(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:definePropertyModule$2.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max=Math.max,min$1=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$1=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike=lengthOfArrayLike$1,createMethod=function(s){return function(e,t,n){var r,i=toIndexedObject$3(e),o=lengthOfArrayLike(i),a=toAbsoluteIndex(n,o);if(s&&t!=t){for(;a<o;)if((r=i[a++])!=r)return!0}else for(;a<o;a++)if((s||a in i)&&i[a]===t)return s||a||0;return!s&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$4=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push=uncurryThis$4([].push),objectKeysInternal=function(e,t){var n,r=toIndexedObject$2(e),i=0,o=[];for(n in r)!hasOwn$3(hiddenKeys$2,n)&&hasOwn$3(r,n)&&push(o,n);for(;t.length>i;)!hasOwn$3(r,n=t[i++])||~indexOf(o,n)||push(o,n);return o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$4),uncurryThis$3=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$3=anObject$5,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$3(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,n){for(var r=ownKeys(t),i=definePropertyModule$1.f,o=getOwnPropertyDescriptorModule.f,a=0;a<r.length;a++){var s=r[a];hasOwn$2(e,s)||n&&hasOwn$2(n,s)||i(e,s,o(t,s))}},fails$3=fails$b,isCallable$5=isCallable$f,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$5(t)?fails$3(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$2=global$b,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var n,r,i,o=e.target,a=e.global,s=e.stat,l=a?global$2:s?global$2[o]||defineGlobalProperty(o,{}):(global$2[o]||{}).prototype;if(l)for(n in t){if(r=t[n],i=e.dontCallGetSet?(i=getOwnPropertyDescriptor(l,n))&&i.value:l[n],!isForced(a?n:o+(s?".":"#")+n,e.forced)&&void 0!==i){if(typeof r==typeof i)continue;copyConstructorProperties(r,i)}(e.sham||i&&i.sham)&&createNonEnumerableProperty$2(r,"sham",!0),defineBuiltIn$2(l,n,r,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$2=functionUncurryThis,call$1=functionCall,fails$2=fails$b,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$3,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$2([].concat),objectAssign=!$assign||fails$2(function(){if(DESCRIPTORS$2&&1!==$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n]||objectKeys$1($assign({},t)).join("")!=r})?function(e,t){for(var n=toObject$1(e),r=arguments.length,i=1,o=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;i<r;)for(var s,l=IndexedObject(arguments[i++]),c=o?concat(objectKeys$1(l),o(l)):objectKeys$1(l),u=c.length,d=0;d<u;)s=c[d++],DESCRIPTORS$2&&!call$1(a,l,s)||(n[s]=l[s]);return n}:$assign,$$2=_export,assign=objectAssign,objectDefineProperties=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),{}),DESCRIPTORS$1=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$2=anObject$5,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn=(objectDefineProperties.f=DESCRIPTORS$1&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$2(e);for(var n,r=toIndexedObject$1(t),i=objectKeys(t),o=i.length,a=0;a<o;)definePropertyModule.f(e,n=i[a++],r[n]);return e},getBuiltIn$4),html$1=getBuiltIn$4("document","documentElement"),anObject$1=anObject$5,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var n;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$1(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:definePropertiesModule.f(n,t)}),wellKnownSymbol$8=wellKnownSymbol$a,create$1=objectCreate,defineProperty$2=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$8("unscopables"),ArrayPrototype=Array.prototype,addToUnscopables$1=(null==ArrayPrototype[UNSCOPABLES]&&defineProperty$2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype[UNSCOPABLES][e]=!0}),iterators={},fails$1=fails$b,correctPrototypeGetter=!fails$b(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$1=hasOwnProperty_1,isCallable$4=isCallable$f,toObject=toObject$3,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){e=toObject(e);if(hasOwn$1(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$4(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null},fails=fails$b,isCallable$3=isCallable$f,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$1=defineBuiltIn$3,wellKnownSymbol$7=wellKnownSymbol$a,ITERATOR$2=wellKnownSymbol$a("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails(function(){var e={};return IteratorPrototype$2[ITERATOR$2].call(e)!==e})),iteratorsCore=(isCallable$3((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$2])||defineBuiltIn$1(IteratorPrototype$2,ITERATOR$2,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$1=objectDefineProperty.f,hasOwn=hasOwnProperty_1,wellKnownSymbol$6=wellKnownSymbol$a,TO_STRING_TAG$3=wellKnownSymbol$a("toStringTag"),setToStringTag$2=function(e,t,n){(e=e&&!n?e.prototype:e)&&!hasOwn(e,TO_STRING_TAG$3)&&defineProperty$1(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,n,r){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor(+!r,n)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$2=isCallable$f,$String$1=String,$TypeError$1=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$2(e))return e;throw $TypeError$1("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$1=functionUncurryThis,anObject=anObject$5,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{(n=uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return anObject(e),aPossiblePrototype(t),r?n(e,t):e.__proto__=t,e}}():void 0),$$1=_export,call=functionCall,FunctionName=functionName,isCallable$1=isCallable$f,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn=defineBuiltIn$3,wellKnownSymbol$5=wellKnownSymbol$a,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol$5("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,n,r,i,o,a){createIteratorConstructor(n,t,r);function s(e){if(e===i&&f)return f;if(!BUGGY_SAFARI_ITERATORS&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,r=t+" Iterator",u=!1,d=e.prototype,p=d[ITERATOR$1]||d["@@iterator"]||i&&d[i],f=!BUGGY_SAFARI_ITERATORS&&p||s(i),h="Array"==t&&d.entries||p;if(h&&(h=getPrototypeOf(h.call(new e)))!==Object.prototype&&h.next&&(getPrototypeOf(h)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(h,IteratorPrototype):isCallable$1(h[ITERATOR$1])||defineBuiltIn(h,ITERATOR$1,returnThis)),setToStringTag(h,r,!0)),PROPER_FUNCTION_NAME&&i==VALUES&&p&&p.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(d,"name",VALUES):(u=!0,f=function(){return call(p,this)})),i)if(l={values:s(VALUES),keys:o?f:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in d||defineBuiltIn(d,c,l[c]);else $$1({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return d[ITERATOR$1]!==f&&defineBuiltIn(d,ITERATOR$1,f,{name:i}),Iterators$1[t]=f,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators=iterators,InternalStateModule=internalState,defineProperty=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),values=Iterators.Arguments=Iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS&&"values"!==values.name)try{defineProperty(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$1=global$b,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$4=wellKnownSymbol$a,ITERATOR=wellKnownSymbol$4("iterator"),TO_STRING_TAG$2=wellKnownSymbol$4("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR,ArrayValues)}catch(e){t[ITERATOR]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var n in ArrayIteratorMethods)if(t[n]!==ArrayIteratorMethods[n])try{createNonEnumerableProperty(t,n,ArrayIteratorMethods[n])}catch(e){t[n]=ArrayIteratorMethods[n]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var isObject=isObject$6,classof$2=classofRaw$1,wellKnownSymbol$3=wellKnownSymbol$a,MATCH$1=wellKnownSymbol$a("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$2(e))},isRegExp=isRegexp,$TypeError=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError("The method doesn't accept regular expressions");return e},wellKnownSymbol$2=wellKnownSymbol$a,TO_STRING_TAG$1=wellKnownSymbol$a("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$1]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable=isCallable$f,classofRaw=classofRaw$1,wellKnownSymbol$1=wellKnownSymbol$a,TO_STRING_TAG=wellKnownSymbol$a("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$1=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable(e.callee)?"Arguments":t},classof=classof$1,$String=String,toString$1=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},wellKnownSymbol=wellKnownSymbol$a,MATCH=wellKnownSymbol$a("match"),correctIsRegexpLogic=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[MATCH]=!1,"/./"[t](n)}catch(e){}}return!1},$=_export,uncurryThis=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$3,toString=toString$1,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=functionUncurryThis("".indexOf);$({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString(requireObjectCoercible(this)),toString(notARegExp(e)),1<arguments.length?arguments[1]:void 0)}});const clickAwayListener=e=>{var t=null==(t=null==(n=null==e?void 0:e.path)?void 0:n.find)?void 0:t.call(n,e=>{var t;return(null==(t=null==e?void 0:e.id)?void 0:t.toLowerCase().includes("aiware-app-bar"))||(null==(t=null==e?void 0:e.id)?void 0:t.toLowerCase().includes("panel"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("APP_BAR"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("undefined"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("-root"))||(null==(t=null==(e=null==(t=null==e?void 0:e.attributes)?void 0:t.role)?void 0:e.value)?void 0:t.includes("presentation"))}),n="BODY"===(null==(e=null==(n=null==e?void 0:e.path)?void 0:n[0])?void 0:e.tagName);t||n||store$4.dispatch(unmountAllPanel$1("null"))};class RefHolder extends react.exports.Component{render(){return jsxRuntime.exports.jsx("div",{children:this.props.children})}}const rootPostfix="root";function mountPanelListenerSagaGenerator(p,f){return function*(){yield takeEvery$1(mountPanel$1({}).type,function*(e){const{panelId:t,microFrontend:{name:n},panelConfig:r}=null==e?void 0:e.payload;let i=null,o=void 0;f&&(o=yield call$7(f,r.type),i=yield call$7(f,n));var a,s,l,c,e=i||p[n]||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),u=o||p[r.type];r.parent&&({panelConfig:{marginTop:a=0,marginStart:s=0,zIndex:l=1e3},panelId:c}=yield select(e=>e.panels.find(e=>e.panelId===r.parent)),c=(null==(c=null===document||void 0===document?void 0:document.getElementById(c))?void 0:c.clientWidth)||650,r.marginTop=r.marginTop||a,r.marginStart=r.marginStart||s+c,r.zIndex=r.zIndex||l);const d=getElement(t+"-"+rootPostfix);d.classList.add("aiware-el"),ReactDOM.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(ClickAwayListener,Object.assign({onClickAway:clickAwayListener},{children:jsxRuntime.exports.jsx(RefHolder,{children:jsxRuntime.exports.jsx(u,Object.assign({type:"SIMPLE_PANEL",panelId:t,"data-test":"panel-"+t},{children:jsxRuntime.exports.jsx(e,{})}))})}))}))})})),d)}),yield takeEvery$1(unmountPanel$1("").type,function*(t){var e=yield select(e=>e.panels.find(e=>{return(null==(e=null==e?void 0:e.panelConfig)?void 0:e.parentPanelId)===t.payload}));e&&0<Object.keys(e).length&&(yield put(unmountPanel$1(e.panelId))),ReactDOM.unmountComponentAtNode(document.getElementById(t.payload+"-"+rootPostfix)||new DocumentFragment)}),yield takeEvery$1(openLinkOnNewTab({url:""}).type,function(e){e=null==(e=null==e?void 0:e.payload)?void 0:e.url;const t=document.createElement("a");t.target="_blank",t.href=e,t.click()})}}function getPanelsModule(e,t){return{id:name$1,reducerMap:{panels:(t,{type:e,payload:n})=>{switch(e){case mountPanel$1({}).type:{const o=[...t];n.panelConfig.show=!0;var r=n.panelConfig;const a=null==r?void 0:r.parentPanelId;var r=null==r?void 0:r.dimmedStatus;return"dimAllParents"===r?[...o.map(e=>{return Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},e.panelConfig),{dimmed:((null==(e=e.panelConfig)?void 0:e.dimmed)||0)+1})})}),n]:a&&r?(r=t.findIndex(e=>e.panelId===a),o[r]=Object.assign(Object.assign({},o[r]),{panelConfig:Object.assign(Object.assign({},null==(i=o[r])?void 0:i.panelConfig),{dimmed:((null==(r=null==(i=o[r])?void 0:i.panelConfig)?void 0:r.dimmed)||0)+1})}),[...o,n]):[...t,n]}case unmountPanel$1("").type:{r=null==(i=t.find(e=>e.panelId===n))?void 0:i.panelConfig;const s=null==r?void 0:r.parentPanelId;var i=null==r?void 0:r.dimmedStatus;const l=t.filter(e=>e.panelId!==n);return"dimAllParents"===i?l.map(e=>{return Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},e.panelConfig),{dimmed:((null==(e=e.panelConfig)?void 0:e.dimmed)||0)-1})})}):(s&&i&&-1!==(r=t.findIndex(e=>e.panelId===s))&&(l[r]=Object.assign(Object.assign({},l[r]),{panelConfig:Object.assign(Object.assign({},l[r].panelConfig),{dimmed:((null==(i=l[r].panelConfig)?void 0:i.dimmed)||0)-1})})),l)}case hidePanel$1("").type:{let e=t.find(e=>e.panelId===n);r=t.filter(e=>e.panelId!==n);return e=Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},null===e||void 0===e?void 0:e.panelConfig),{show:!1})}),[...r,e]}case unmountAllPanel$1("").type:return t.map(e=>Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},null==e?void 0:e.panelConfig),{show:!1})}));case updatePanelMicroFrontendProps({}).type:{let e=t.find(e=>e.panelId===n.id);i=t.filter(e=>e.panelId!==n.id);return e=Object.assign(Object.assign({},e),{microFrontend:Object.assign(Object.assign({},null===e||void 0===e?void 0:e.microFrontend),{config:n.props})}),[...i,e]}}return t||[]}},sagas:[mountPanelListenerSagaGenerator(e,t)],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},{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}})});!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();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={selectedTabId:0,tabLink:"https://help.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,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="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]: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://help.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(e){var t=useSelector(initialConfigSelector),n=useSelector(customKnowledgeBaseUrlSelector),r=useSelector(customDocsUrlSelector),i=useSelector(helpCenterSelectedTabIdSelector);const o=useSelector(e=>null==e?void 0:e.panels);var a=useStyles$1()["classes"],[s]=react.exports.useState(defaultLocale);const l=useDispatch();var c=null===o||void 0===o?void 0:o.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),n=c&&n?n:t.knowledgeBaseURL,c=c&&r?r:t.docsURL;return jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:s},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:a.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:i,onChangeTab:e=>{l(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:i,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:n})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:i,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:c})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:a.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$w,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var 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=()=>{var e=useSelector(userSelector$2),t=useStyles()["classes"];const n=useSelector(initialConfigSelector).applicationId;var r=useSelector(applicationSelector);const i=useSelector(switchApiSelector),o=(null==r?void 0:r.application)||[];r=null==r?void 0:r.status;const a=[...o];var s=a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),l=o.findIndex(e=>e.id===n);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(n)&&l<0&&"success"===r?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:t.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:t.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:t.orgName},{children:null!=(l=null==e?void 0:e.organization)&&l.organizationName?e.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"})})),jsxRuntime.exports.jsx("div",Object.assign({className:t.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(i+"/"+e,"_self")},applications:s,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)}}const rateLimiter=new RateLimiter;function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);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$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),mountWidget=(root.classList.add("aiware-el"),ReactDOM.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),root),(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){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){const e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){const 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,lightTheme:lightTheme}},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,commit:"2e86539d3"});export{ListItem$1 as $,AIWareIntlProvider as A,Box$1 as B,interopRequireDefault as C,createAction as D,createReducer as E,FormattedMessage$1 as F,Grid$1 as G,createSlice as H,ENGINE_OWNER_TYPES as I,ENGINE_FILTER_TYPES as J,lib$4 as K,LoadingButton$1 as L,preferredLanguageSelector as M,baseUrlSelector as N,rootApiSelector as O,Provider$1 as P,sessionTokenSelector as Q,graphEndpointSelector as R,Switch$1 as S,Typography$1 as T,controllerNodeRedImageSelector as U,controllerUrlSelector as V,automateControllerUrlSelector as W,automateUrlSelector as X,Portal$1 as Y,List$2 as Z,_extends as _,generateUtilityClasses as a,img$Q as a$,ListItemIcon$1 as a0,ListItemText$1 as a1,all as a2,img$k as a3,img$l as a4,img$n as a5,img$o as a6,Divider$1 as a7,Tooltip$1 as a8,IconButton$1 as a9,getTemplateById as aA,getTemplateByIdFallback as aB,TableContainer$1 as aC,Table$1 as aD,TableHead$1 as aE,TableRow$1 as aF,TableCell$1 as aG,TableSortLabel$1 as aH,TableBody$1 as aI,img$d as aJ,Popper$1 as aK,ClickAwayListener as aL,Fade$1 as aM,img$p as aN,img$m as aO,img$M as aP,img$y as aQ,Dialog$1 as aR,DialogTitle$1 as aS,DialogContent$1 as aT,DialogActions$1 as aU,Select$1 as aV,MenuItem$1 as aW,Snackbar$1 as aX,default_1$2 as aY,img$f as aZ,img$h as a_,img$e as aa,img$C as ab,getNodeRedVersionEdgeApi as ac,createEnginebuild as ad,Skeleton$1 as ae,takeLatest$1 as af,fetchAllTags as ag,put as ah,select as ai,fetchFlows as aj,call$7 as ak,fetchTemplateGallery as al,isRevisionsExistOnServerRequest as am,FormLabel$1 as an,default_1$7 as ao,FormGroup$1 as ap,FormControlLabel$1 as aq,Checkbox$1 as ar,fetchTemplateGalleryFallback as as,Button$1 as at,img$i as au,fetchVeritoneGraphQLApi as av,flowStyles as aw,NoResults as ax,img$8 as ay,setApiEndpoint as az,styled$1 as b,_hasPath as b$,Tabs$1 as b0,Tab$1 as b1,deleteEngine as b2,img$g as b3,AIWareFormatMessage as b4,FormattedDate as b5,useTheme as b6,KeyboardArrowRight as b7,KeyboardArrowLeft as b8,useId as b9,img$a as bA,img$9 as bB,isEmpty_1 as bC,Backdrop$1 as bD,CircularProgress$1 as bE,getDefaultMiddleware as bF,isNil_1 as bG,UpDown as bH,Icon$1 as bI,get_1 as bJ,map_1 as bK,keys_1 as bL,RadioGroup$1 as bM,Avatar$1 as bN,img$s as bO,FormHelperText$1 as bP,img$c as bQ,StyledEngineProvider as bR,ThemeProvider as bS,lightTheme as bT,CssBaseline as bU,Hide as bV,showMessage as bW,MessageSeverity as bX,baseGraphQLApi as bY,Radio$1 as bZ,fetchEngine as b_,InputUnstyled as ba,isHostComponent as bb,createSvgIcon$2 as bc,getDefaultExportFromNamespaceIfNotNamed as bd,commonjsRequire as be,_assertThisInitialized$1 as bf,_setPrototypeOf$3 as bg,reactDom as bh,React$1 as bi,_inheritsLoose$2 as bj,ReactDOM as bk,__awaiter$a as bl,__generator$2 as bm,__spread as bn,PropTypes as bo,connect as bp,Bookmark as bq,EngineFlagIcons as br,createAsyncThunk as bs,withStyles as bt,getConfigModule as bu,getAuthModule as bv,getSnackbarModule as bw,CacheProvider as bx,muiCache as by,img$N as bz,Paper$1 as c,_arrayLikeKeys as c$,_createCompounder as c0,_baseIteratee as c1,isArrayLike_1 as c2,toInteger_1 as c3,hoistNonReactStatics_cjs as c4,Transition$1 as c5,useControlled as c6,Collapse$1 as c7,ButtonBase$1 as c8,alpha as c9,useBackupImg as cA,img$1u as cB,configSelector as cC,baseGraphQLApiWithError as cD,useDoubleClick as cE,VerifiedFilled as cF,Add as cG,img$12 as cH,Filter$1 as cI,DynamicTable as cJ,useTheme$2 as cK,getThemeProps as cL,React$2 as cM,_arrayPush as cN,isArray_1 as cO,_getNative as cP,eq_1 as cQ,_castPath as cR,_isIndex as cS,isObject_1 as cT,_toKey as cU,_root as cV,_Uint8Array as cW,_overArg as cX,_isPrototype as cY,isObjectLike_1 as cZ,_baseGetTag as c_,commonjsGlobal$1 as ca,getDefaultExportFromCjs as cb,TransitionGroup$1 as cc,useForkRef as cd,useEnhancedEffect$1 as ce,combineReducers as cf,createSelector as cg,fork as ch,AIWareThemeProvider as ci,Close$1 as cj,FullscreenExit as ck,Fullscreen as cl,TabPanel as cm,default_1$4 as cn,InputAdornment$1 as co,unmountPanel$1 as cp,AvailableComponents as cq,delay$1 as cr,mountPanel$1 as cs,DialogContentText$1 as ct,MoreVert as cu,Menu$1 as cv,Edit as cw,Upload as cx,Delete as cy,CustomTabs as cz,capitalize$2 as d,createUnarySpacing as d$,isArguments_1 as d0,isBuffer$3 as d1,isFunction_1 as d2,isTypedArray_1 as d3,_Stack as d4,_baseFor as d5,identity_1 as d6,_isIterateeCall as d7,_Set as d8,_setToArray as d9,startCase_1 as dA,times_1 as dB,ReactIs as dC,upperFirst_1 as dD,isString_1 as dE,_baseSlice as dF,channel as dG,useIntl as dH,VideoCamera as dI,Image$1 as dJ,Sound as dK,Description$1 as dL,toNumber_1 as dM,ProgressStepper as dN,CurlyBraces as dO,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,extendSxProp as dY,handleBreakpoints as dZ,resolveBreakpointValues as d_,_SetCache as da,_cacheHas as db,_baseToString as dc,_baseTrim as dd,_castSlice as de,_stringToArray as df,toString_1 as dg,isSymbol_1 as dh,_arrayMap as di,_baseMap as dj,_baseGet as dk,_baseUnary as dl,lib as dm,getThunkExtension_1 as dn,composeWithDevTools as dp,orange$1 as dq,deepOrange$1 as dr,createTheme$1 as ds,createIntl as dt,SvgIcon$1 as du,unmountAllPanel$1 as dv,takeEvery$1 as dw,isNull_1 as dx,size_1 as dy,take as dz,_objectWithoutPropertiesLoose$2 as e,img$J as e$,deepmerge as e0,getValue$2 as e1,useEventCallback as e2,setRef as e3,inputClasses$1 as e4,inputBaseClasses$1 as e5,outlinedInputClasses$1 as e6,filledInputClasses$1 as e7,ClearIcon as e8,ArrowDropDownIcon as e9,AdminCenter as eA,img$P as eB,img$1 as eC,img$w as eD,userSelector$2 as eE,enableBetaFeatures as eF,Badge$1 as eG,openLinkOnNewTab as eH,avatarClasses as eI,authSelector as eJ,injectIntl as eK,headerBarSelector as eL,getSortName as eM,img$5 as eN,InputLabel$1 as eO,ListItemAvatar$1 as eP,OrganizationTabIcon as eQ,ScopedCssBaseline$1 as eR,AlarmTwo as eS,getApplicationsApi as eT,ListItemSecondaryAction$1 as eU,updateTokenSuccess as eV,postNotificationCommand as eW,aiwareEvent as eX,notificationCommands as eY,panelsSelector as eZ,css as e_,_Symbol as ea,_baseEach as eb,_arrayFilter as ec,emStyled as ed,isPlainObject as ee,useTheme$3 as ef,useIsFocusVisible as eg,ownerDocument as eh,appendOwnerState as ei,lighten as ej,darken as ek,slotShouldForwardProp as el,shouldSpreadAdditionalProps$1 as em,Slide$1 as en,hidePanel$1 as eo,updatePanelMicroFrontendProps as ep,setData as eq,keyframes as er,TabId as es,PersonalProfile$1 as et,Organizations as eu,DataCenter as ev,FlowCenter2 as ew,DeveloperCenter as ex,Marketplace as ey,LibraryCenter as ez,clsx as f,EnumHelpers as f$,img$I as f0,img$1r as f1,img$1q as f2,img$1p as f3,img$G as f4,img$1s as f5,img$F as f6,emphasize as f7,_arraySome as f8,Process as f9,ExpandMore as fA,img$r as fB,img$t as fC,img as fD,FilterRemove as fE,FolderOpen as fF,Voice as fG,FolderFilled as fH,Time as fI,img$u as fJ,Undefined as fK,YoutubeSource as fL,PodcastSource as fM,TVSource as fN,RadioSource as fO,selectOrgId as fP,selectIsUserAdmin as fQ,ErrorState$1 as fR,StepConnector$1 as fS,NullState$2 as fT,Group as fU,PermissionChangedAction as fV,AddGroup as fW,StepperContext$1 as fX,StepContext$1 as fY,initialConfigSelector as fZ,ConfirmationModal as f_,Information as fa,NewFolder as fb,SpecialFolder as fc,User as fd,Source as fe,ProcessingDetail as ff,Search$1 as fg,getLibraryModule as fh,selectApiConfigs$1 as fi,FullScreenContainer as fj,betaFeaturesSelector as fk,cmsUrlSelector as fl,UserAddFilled as fm,Popover$1 as fn,MenuList$1 as fo,MoveFolder as fp,ErrorBoundary as fq,Download as fr,img$6 as fs,selectPanelByPanelName as ft,EngineCategoryIcons as fu,Settings$2 as fv,Hamburger as fw,List as fx,EditAttributes as fy,MoreHor as fz,generateUtilityClass as g,formatBytes as g0,NotInterested as g1,mountPanelForResponse$1 as g2,ApplicationTabIcon as g3,Lock as g4,SecurityGroup as g5,NoApps as g6,green$1 as g7,selectors as g8,LibraryDropdown as g9,Remove as ga,Save as gb,Input$1 as gc,AddUser as gd,Modal$1 as ge,registry as gf,registerComponent as gg,AvailableWidgets as gh,root as gi,mountWidget as gj,unmountWidget as gk,mountPanel as gl,unmountPanel as gm,hidePanel as gn,unmountAllPanel as go,init as gp,composeClasses as h,useDispatch as i,jsxRuntime as j,useSelector as k,authStatusSelector as l,makeStyles as m,authContextSelector as n,AuthContext as o,lodash as p,Alert$1 as q,react as r,store$4 as s,authErrorMessage as t,useThemeProps as u,FormControl$1 as v,TextField$1 as w,classnames as x,resetPasswordRequest as y,createSvgIcon as z};
|
|
1166
|
+
`,graphEndpoint:e,token:t})}catch(e){return{success:!1}}});function*getCurrentUserSaga(){var e=yield select(graphEndpointSelector),t=yield select(sessionTokenSelector),e=yield call$7(getCurrentUserApi,e,t);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)&&(null==(t=e.errors[0].path)||!t.includes("userSettings"))?console.error("getCurrentUser error"):(t=Object.assign(Object.assign({},null==(t=null==e?void 0:e.data)?void 0:t.me),{organizationRole:{organizationId:get$3(e,"data.me.organization.id","")},organization:Object.assign({},null==(e=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:e.organization)}),yield put(getCurrentUserSuccess(t)))}function*getCurrentApplicationInfoSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=e.payload["applicationId"],e=yield call$7(getApplicationInfo,e,t,n);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)?console.error("getCurrentApplicationInfo error"):yield put(getCurrentAppIconSuccess(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.application)?void 0:n.iconUrl))}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga)]),yield all([takeEvery$1(GET_CURRENT_APP_ICON,getCurrentApplicationInfoSaga)])}function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*logoutListener(e){const t=e.payload;for(;;)yield take(logout),t?null!==t&&void 0!==t&&t():yield put(logoutUser$1())}function*notificationActionClickedSaga(e){const t=e.payload;yield takeEvery$1(onNotificationActionClicked,function*(e){t&&(yield call$7(t,e.payload))})}function*handleAppSwitchListenerSetup(e){const t=e.payload;yield takeEvery$1(appSwitcherHandleClick,function*(e){e=e.payload;t?t(e):yield put(appSwitcherHandleClickAppNatively(e))})}function*rootSaga(){yield all([fork(userSaga),fork(booting),takeLatest$1(listenLogout,logoutListener),takeLatest$1(appSwitcherSetupListener,handleAppSwitchListenerSetup),takeLatest$1(initNotificationAction,notificationActionClickedSaga)])}function getAppbarModule(){return{id:"os-app-bar",reducerMap:{[nameSpace$1]:userReducer},sagas:[rootSaga],initialActions:[]}}function App(e){var{onLogout:t,onClickNotificationAction:n,onAppSwitch:r,onClickOrgIcon:i,showNotifications:o,applicationId:a,searchBarMountId:s}=e,e=__rest(e,["onLogout","onClickNotificationAction","onAppSwitch","onShowSettingPanel","onClickOrgIcon","onClickHelpIcon","showNotifications","applicationId","searchBarMountId"]);const l=useDispatch(),[c,u]=react.exports.useState(!1),[d,p]=react.exports.useState(!1),[f,h]=react.exports.useState(!1),[m,g]=react.exports.useState(!1),[y,v]=react.exports.useState(!1),[x,C]=react.exports.useState(!1);var b=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var w=useSelector(unseenNotificationSelector);const S=useSelector(notificationStatusSelector),_=useSelector(betaFeaturesSelector);b=(b||{}).organization;const T=useSelector(authSelector)["user"];var{application:E=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);var R=_;const O=useSelector(appIdSelector),L=useSelector(selectApplicationConfig),[M,N]=react.exports.useState(!1);function A(){u(!1),h(!1),g(!1),p(!1),v(!1),C(!1)}function k(){null!==$&&void 0!==$&&$.forEach(e=>{l(hidePanel$1(e.panelId))})}return react.exports.useEffect(()=>{var e,t=window.location["search"];l(actions$2.userApplicationSettings.fetchApplicationConfigStart({appId:O})),"?panel=invite-requests"!==t||j||(I(!0),t={name:"INVITE_REQUESTS_PANEL",config:{name:"Invite Requests"}},e={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"medium",zIndex:1001,parentPanelId:null,dimmed:0,dimmedStatus:"dimParent",header:{title:"INVITE REQUESTS"}},l(mountPanel$1({panelId:"INVITE_REQUESTS_PANEL",microFrontend:t,panelConfig:e})))},[]),react.exports.useEffect(()=>{null!==L&&void 0!==L&&L.length&&N(!0)},[L]),react.exports.useEffect(()=>{"success"===S&&l(markAllNotificationsSeenRequest())},[S,l]),react.exports.useEffect(()=>{l(getCurrentUser()),a&&l(getCurrentAppIcon({applicationId:a}))},[l,a]),react.exports.useEffect(()=>{l({type:listenLogout().type,payload:t})},[l,t]),react.exports.useEffect(()=>{n&&l(initNotificationAction(n))},[l,n]),react.exports.useEffect(()=>{l({type:appSwitcherSetupListener().type,payload:r})},[l,r]),react.exports.useEffect(()=>{l(onBooted())},[l]),react.exports.useEffect(()=>{$&&0!==$.length||A()},[$]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getAppbarModule(),getAppbarPanelModule(),getNotificationModule$1(),getEventsModule(),getUserApplicationSettingsModule()]},{children:jsxRuntime.exports.jsx("div",Object.assign({className:"App",id:"aiware-app-bar","data-testid":"aiware-app-bar"},{children:jsxRuntime.exports.jsx(NewAppBar,Object.assign({isEnableOrgPanel:!1,onCloseSetting:function(){},onOpenSetting:function(){var e,t;c?(u(!1),k()):(A(),u(!0),k(),e={name:"APP_BAR_PANEL",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:VERITONE_PANEL_ID,type:"TAB_TEMPLATE",marginTop:55,withTab:!0,width:80,zIndex:1003,userRoles:null===T||void 0===T?void 0:T.roles,header:{divider:!0,title:""},footer:{logo:!0},size:"xlarge",fullScreen:!1},l(mountPanel$1({panelId:VERITONE_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenHelpCenter:function(){var e,t;d?(p(!1),k()):(A(),k(),p(!0),e={name:"HELP_PANEL",config:{name:"Help panel",dataId:"helpDataId",type:"SIMPLE_PANEL"}},t={panelId:HELP_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,size:"large",header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.headerTitle.helpCenter",defaultMessage:"Help Center",description:"The header title for the help center."}),actions:[{iconUrl:img$O,action:{type:"OPEN_HELP_LINK"}}]}},l(mountPanel$1({panelId:HELP_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenNotification:function(){var e,t;null!=o&&o(),y?(v(!1),k()):(A(),k(),v(!0),e={name:"NOTIFICATION_PANEL",config:{name:"Notification Panel",dataId:"notificationDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:413,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.panel.notifications",defaultMessage:"Notifications Center",description:"Title of the notifications center panel"}),actions:[]}},l(mountPanel$1({panelId:NOTIFICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenUserApplicationSettings:function(){var e,t;x?(C(!1),k()):(A(),k(),C(!0),e={name:"USER_APPLICATION_SETTINGS_PANEL",config:{name:"User application settings",dataId:"userApplicationSettingsDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:USER_APPLICATION_SETTINGS_PANEL,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:320,header:{divider:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle.user-application-name-settings",defaultMessage:"Application Settings",description:"Title of user application name settings panel"})}},l(mountPanel$1({panelId:USER_APPLICATION_SETTINGS_PANEL,microFrontend:e,panelConfig:t})))},onDashboardClick:function(){console.log("HANDLE DASHBOARD CLICK!")},organization:b,onClickOrgIcon:function(){var e,t;null!=i&&i(),m?(g(!1),k()):(A(),k(),g(!0),e={name:"ORGANIZATION_PANEL",config:{name:"Veritone",tabId:TabId.ORGANIZATION_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:ORGANIZATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:420,header:{divider:!0,title:"ORGANIZATIONS"}},l(mountPanel$1({panelId:ORGANIZATION_PANEL_ID,microFrontend:e,panelConfig:t})))},panels:$,searchBarMountId:s,openSetting:{openHelpPanel:!1,openNotificationPanel:!1,openAppSwitchPanel:!1,openOrgSwitchPanel:!1,openVeritonePanel:!1,openUserApplicationSettingsPanel:!1},unseenCount:w,onClickAppSwitchIcon:function(){var e,t;f?(h(!1),k()):(A(),k(),h(!0),e={name:"APP_BAR_PANEL",config:{name:"APP_BAR_PANEL",tabId:TabId.APP_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:APPLICATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:_?720:420,header:{divider:!0,title:_?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle",defaultMessage:"App Switcher",description:"Title of applications panel list"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle",defaultMessage:"Applications",description:"Title of applications panel list"})}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:E,showDashboardIcon:R,userApplicationSettingsIcon:M},e))}))}))})})}const headerBarSelector=e=>null==e?void 0:e.aiWareHeaderBar,registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent},registryLookup=n=>__awaiter$a(void 0,void 0,void 0,function*(){if(registry[n])return registry[n];let e,t=null;switch(n){case AvailableWidgets.SAMPLE_APP_BAR:e=yield import("./js-core.esm2.js"),t=e.SampleAppBar;break;case AvailableWidgets.RESET_PASSWORD:e=yield import("./js-core.esm4.js"),t=e.ResetPassword;break;case AvailableWidgets.FLOW_CENTER:e=yield import("./js-core.esm5.js"),t=e.App;break;case AvailableWidgets.FLOW_WIDGET:e=yield import("./js-core.esm7.js").then(function(e){return e.i}),t=e.App;break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=yield import("./js-core.esm18.js"),t=e.EngineCenterBrowse;break;case AvailablePanels.SIMPLE_PANEL:e=yield import("./js-core.esm26.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm27.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm27.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm27.js"),t=e.TabPanel;break;case AvailableComponents.NOTIFICATION_PANEL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationPanel;break;case AvailableComponents.NOTIFICATION_DETAIL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationDetailPanel;break;case AvailableComponents.NOTIFICATION_SETTING:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationSetting;break;case AvailableComponents.NOTIFICATION_UTILITY:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationUtilityPanel;break;case AvailableComponents.NOTIFICATION_APPLICATION:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationApplication;break;case AvailableComponents.HELP_PANEL:e=yield Promise.resolve().then(function(){return index_esm}),t=e.HelpCenterPanel;break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=yield Promise.resolve().then(function(){return index_esm$1}),t=e.EditProFilePicture;break;case AvailableComponents.TEST_COMPONENT:e=yield import("./js-core.esm26.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm26.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm26.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm30.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm28.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm28.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm28.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm28.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm28.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm31.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm31.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm31.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm35.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm37.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm38.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm39.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm41.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm19.js").then(function(e){return e.k}),t=e.EngineCenterNew;break;case AvailableComponents.ENGINE_CENTER_FILTER:e=yield import("./js-core.esm18.js"),t=e.EngineCenterFilter;break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=yield import("./js-core.esm18.js"),t=e.EngineDetails;break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=yield import("./js-core.esm18.js"),t=e.CreateNewBuildPanel;break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=yield import("./js-core.esm19.js").then(function(e){return e.k}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm19.js").then(function(e){return e.k}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm19.js").then(function(e){return e.k}),t=e.InputTypeFlyout;break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=yield import("./js-core.esm18.js"),t=e.EditReleaseNotes;break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=yield import("./js-core.esm18.js"),t=e.VersionHistoryPanel;break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=yield import("./js-core.esm35.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm35.js"),t=e.EditFileMetadata;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm42.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm42.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm42.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm42.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm42.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_ADD_ENGINE_PANEL:e=yield import("./js-core.esm42.js"),t=e.AppCenterAddEnginePanel;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm41.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm33.js").then(function(e){return e.a}),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm32.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm32.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm32.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm32.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm31.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm31.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm31.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm33.js").then(function(e){return e.a}),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm33.js").then(function(e){return e.a}),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm40.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm43.js"),t=e.ProcessingCenterSources;break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=yield Promise.resolve().then(function(){return index_esm$3}),t=e.UserApplicationSettingsPanel}return registry[n]=t}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$1=(!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)=>{const n=e.find(e=>e.widgetName===t);null!==n&&void 0!==n&&n.onComplete&&n.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$1,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(){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$7(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."}));const o=getElement(r,n);o.classList.add("aiware-el"),ReactDOM.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})})),o),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*(n){try{var e=yield select(e=>{const t=widgetsSelector(e);return(null==(e=t.find(e=>e.widgetId===n.payload))?void 0:e.elementId)||""});ReactDOM.unmountComponentAtNode(document.getElementById(e)||new DocumentFragment),yield put(unmountWidgetSuccess(n.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:[]}}var match,version,store,wmget,wmhas,wmset,set,get,has,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math==Math&&e},global$b=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$b=function(e){try{return!!e()}catch(e){return!0}},fails$a=fails$b,descriptors=!fails$b(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$9=fails$b,functionBindNative=!fails$b(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$1=functionBindNative,call$6=Function.prototype.call,functionCall=NATIVE_BIND$1?call$6.bind(call$6):function(){return call$6.apply(call$6,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND=functionBindNative,FunctionPrototype$1=Function.prototype,bind=FunctionPrototype$1.bind,call$5=FunctionPrototype$1.call,uncurryThis$c=NATIVE_BIND&&bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?function(e){return e&&uncurryThis$c(e)}:function(e){return e&&function(){return call$5.apply(e,arguments)}},uncurryThis$b=functionUncurryThis,toString$3=uncurryThis$b({}.toString),stringSlice=uncurryThis$b("".slice),classofRaw$1=function(e){return stringSlice(toString$3(e),8,-1)},uncurryThis$a=functionUncurryThis,fails$8=fails$b,classof$3=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$8(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$3(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$7=TypeError,requireObjectCoercible$3=function(e){if(null==e)throw $TypeError$7("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$2=requireObjectCoercible$3,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$2(e))},isCallable$f=function(e){return"function"==typeof e},isCallable$e=isCallable$f,isObject$6=function(e){return"object"==typeof e?null!==e:isCallable$e(e)},global$a=global$b,isCallable$d=isCallable$f,aFunction=function(e){return isCallable$d(e)?e:void 0},getBuiltIn$4=function(e,t){return arguments.length<2?aFunction(global$a[e]):global$a[e]&&global$a[e][t]},uncurryThis$9=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$3=getBuiltIn$4,engineUserAgent=getBuiltIn$4("navigator","userAgent")||"",global$9=global$b,userAgent=engineUserAgent,process$1=global$9.process,Deno=global$9.Deno,versions=process$1&&process$1.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent&&(!(match=userAgent.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=version,fails$7=fails$b,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$7(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$4,isCallable$c=isCallable$f,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$c(t)&&isPrototypeOf(t.prototype,$Object$3(e))},$String$3=String,tryToString$1=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$b=isCallable$f,tryToString=tryToString$1,$TypeError$6=TypeError,aCallable$1=function(e){if(isCallable$b(e))return e;throw $TypeError$6(tryToString(e)+" is not a function")},aCallable=aCallable$1,getMethod$1=function(e,t){e=e[t];return null==e?void 0:aCallable(e)},call$4=functionCall,isCallable$a=isCallable$f,isObject$5=isObject$6,$TypeError$5=TypeError,ordinaryToPrimitive$1=function(e,t){var n,r;if("string"===t&&isCallable$a(n=e.toString)&&!isObject$5(r=call$4(n,e)))return r;if(isCallable$a(n=e.valueOf)&&!isObject$5(r=call$4(n,e)))return r;if("string"!==t&&isCallable$a(n=e.toString)&&!isObject$5(r=call$4(n,e)))return r;throw $TypeError$5("Can't convert object to primitive value")},shared$3={exports:{}},global$8=global$b,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$5(global$8,t,{value:n,configurable:!0,writable:!0})}catch(e){global$8[t]=n}return n},global$7=global$b,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$b[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible$1=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$3),$Object$2=Object,toObject$3=function(e){return $Object$2(requireObjectCoercible$1(e))},uncurryThis$8=functionUncurryThis,toObject$2=toObject$3,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$2(e),t)},uncurryThis$7=functionUncurryThis,id=0,postfix=Math.random(),toString$2=uncurryThis$7(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$2(++id+postfix,36)},global$6=global$b,shared$2=shared$3.exports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$6.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$a=function(e){var t;return hasOwn$8(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$3=functionCall,isObject$4=isObject$6,isSymbol$1=isSymbol$2,getMethod=getMethod$1,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$9=wellKnownSymbol$a,$TypeError$4=TypeError,TO_PRIMITIVE=wellKnownSymbol$a("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$4(e)||isSymbol$1(e))return e;var n=getMethod(e,TO_PRIMITIVE);if(n){if(n=call$3(n,e,t=void 0===t?"default":t),!isObject$4(n)||isSymbol$1(n))return n;throw $TypeError$4("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$5=global$b,isObject$3=isObject$6,document$1=global$b.document,EXISTS$1=isObject$3(document$1)&&isObject$3(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$6=fails$b,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$b(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$7(e,t))return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$5=fails$b,v8PrototypeDefineBug=descriptors&&fails$b(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$2=isObject$6,$String$2=String,$TypeError$3=TypeError,anObject$5=function(e){if(isObject$2(e))return e;throw $TypeError$3($String$2(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$4=anObject$5,toPropertyKey=toPropertyKey$2,$TypeError$2=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var r;return anObject$4(e),t=toPropertyKey(t),anObject$4(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&((r=$getOwnPropertyDescriptor(e,t))&&r[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:r)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:r)[ENUMERABLE],writable:!1})),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$4(e),t=toPropertyKey(t),anObject$4(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $TypeError$2("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$4=DESCRIPTORS$5?function(e,t,n){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$6=functionUncurryThis,isCallable$9=isCallable$f,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$2=(isCallable$9(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$4=global$b,isCallable$8=isCallable$f,inspectSource$1=inspectSource$2,WeakMap$1=global$b.WeakMap,nativeWeakMap=isCallable$8(WeakMap$1)&&/native code/.test(inspectSource$1(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$3=global$b,uncurryThis$5=functionUncurryThis,isObject$1=isObject$6,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$5=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$3.TypeError,WeakMap$2=global$3.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject$1(e)&&(e=get(e)).type===t)return e;throw TypeError$1("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap$2),wmget=uncurryThis$5(store.get),wmhas=uncurryThis$5(store.has),wmset=uncurryThis$5(store.set),set=function(e,t){if(wmhas(store,e))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$4=fails$b,isCallable$7=isCallable$f,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$2,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,defineProperty$4=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$4(function(){return 8!==defineProperty$4(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$4(n,"arity")&&e.length!==n.arity&&defineProperty$4(e,"length",{value:n.arity});try{n&&hasOwn$4(n,"constructor")&&n.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$4(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$6=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$7(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$f),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,n,r){var i=(r=r||{}).enumerable,o=void 0!==r.name?r.name:t;if(isCallable$6(n)&&makeBuiltIn(n,o,r),r.global)i?e[t]=n:defineGlobalProperty$1(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:definePropertyModule$2.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max=Math.max,min$1=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$1=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike=lengthOfArrayLike$1,createMethod=function(s){return function(e,t,n){var r,i=toIndexedObject$3(e),o=lengthOfArrayLike(i),a=toAbsoluteIndex(n,o);if(s&&t!=t){for(;a<o;)if((r=i[a++])!=r)return!0}else for(;a<o;a++)if((s||a in i)&&i[a]===t)return s||a||0;return!s&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$4=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push=uncurryThis$4([].push),objectKeysInternal=function(e,t){var n,r=toIndexedObject$2(e),i=0,o=[];for(n in r)!hasOwn$3(hiddenKeys$2,n)&&hasOwn$3(r,n)&&push(o,n);for(;t.length>i;)!hasOwn$3(r,n=t[i++])||~indexOf(o,n)||push(o,n);return o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$4),uncurryThis$3=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$3=anObject$5,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$3(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,n){for(var r=ownKeys(t),i=definePropertyModule$1.f,o=getOwnPropertyDescriptorModule.f,a=0;a<r.length;a++){var s=r[a];hasOwn$2(e,s)||n&&hasOwn$2(n,s)||i(e,s,o(t,s))}},fails$3=fails$b,isCallable$5=isCallable$f,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$5(t)?fails$3(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$2=global$b,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var n,r,i,o=e.target,a=e.global,s=e.stat,l=a?global$2:s?global$2[o]||defineGlobalProperty(o,{}):(global$2[o]||{}).prototype;if(l)for(n in t){if(r=t[n],i=e.dontCallGetSet?(i=getOwnPropertyDescriptor(l,n))&&i.value:l[n],!isForced(a?n:o+(s?".":"#")+n,e.forced)&&void 0!==i){if(typeof r==typeof i)continue;copyConstructorProperties(r,i)}(e.sham||i&&i.sham)&&createNonEnumerableProperty$2(r,"sham",!0),defineBuiltIn$2(l,n,r,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$2=functionUncurryThis,call$1=functionCall,fails$2=fails$b,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$3,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$2([].concat),objectAssign=!$assign||fails$2(function(){if(DESCRIPTORS$2&&1!==$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n]||objectKeys$1($assign({},t)).join("")!=r})?function(e,t){for(var n=toObject$1(e),r=arguments.length,i=1,o=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;i<r;)for(var s,l=IndexedObject(arguments[i++]),c=o?concat(objectKeys$1(l),o(l)):objectKeys$1(l),u=c.length,d=0;d<u;)s=c[d++],DESCRIPTORS$2&&!call$1(a,l,s)||(n[s]=l[s]);return n}:$assign,$$2=_export,assign=objectAssign,objectDefineProperties=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),{}),DESCRIPTORS$1=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$2=anObject$5,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn=(objectDefineProperties.f=DESCRIPTORS$1&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$2(e);for(var n,r=toIndexedObject$1(t),i=objectKeys(t),o=i.length,a=0;a<o;)definePropertyModule.f(e,n=i[a++],r[n]);return e},getBuiltIn$4),html$1=getBuiltIn$4("document","documentElement"),anObject$1=anObject$5,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var n;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$1(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:definePropertiesModule.f(n,t)}),wellKnownSymbol$8=wellKnownSymbol$a,create$1=objectCreate,defineProperty$2=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$8("unscopables"),ArrayPrototype=Array.prototype,addToUnscopables$1=(null==ArrayPrototype[UNSCOPABLES]&&defineProperty$2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype[UNSCOPABLES][e]=!0}),iterators={},fails$1=fails$b,correctPrototypeGetter=!fails$b(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$1=hasOwnProperty_1,isCallable$4=isCallable$f,toObject=toObject$3,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){e=toObject(e);if(hasOwn$1(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$4(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null},fails=fails$b,isCallable$3=isCallable$f,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$1=defineBuiltIn$3,wellKnownSymbol$7=wellKnownSymbol$a,ITERATOR$2=wellKnownSymbol$a("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails(function(){var e={};return IteratorPrototype$2[ITERATOR$2].call(e)!==e})),iteratorsCore=(isCallable$3((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$2])||defineBuiltIn$1(IteratorPrototype$2,ITERATOR$2,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$1=objectDefineProperty.f,hasOwn=hasOwnProperty_1,wellKnownSymbol$6=wellKnownSymbol$a,TO_STRING_TAG$3=wellKnownSymbol$a("toStringTag"),setToStringTag$2=function(e,t,n){(e=e&&!n?e.prototype:e)&&!hasOwn(e,TO_STRING_TAG$3)&&defineProperty$1(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,n,r){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor(+!r,n)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$2=isCallable$f,$String$1=String,$TypeError$1=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$2(e))return e;throw $TypeError$1("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$1=functionUncurryThis,anObject=anObject$5,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{(n=uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return anObject(e),aPossiblePrototype(t),r?n(e,t):e.__proto__=t,e}}():void 0),$$1=_export,call=functionCall,FunctionName=functionName,isCallable$1=isCallable$f,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn=defineBuiltIn$3,wellKnownSymbol$5=wellKnownSymbol$a,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol$5("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,n,r,i,o,a){createIteratorConstructor(n,t,r);function s(e){if(e===i&&f)return f;if(!BUGGY_SAFARI_ITERATORS&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,r=t+" Iterator",u=!1,d=e.prototype,p=d[ITERATOR$1]||d["@@iterator"]||i&&d[i],f=!BUGGY_SAFARI_ITERATORS&&p||s(i),h="Array"==t&&d.entries||p;if(h&&(h=getPrototypeOf(h.call(new e)))!==Object.prototype&&h.next&&(getPrototypeOf(h)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(h,IteratorPrototype):isCallable$1(h[ITERATOR$1])||defineBuiltIn(h,ITERATOR$1,returnThis)),setToStringTag(h,r,!0)),PROPER_FUNCTION_NAME&&i==VALUES&&p&&p.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(d,"name",VALUES):(u=!0,f=function(){return call(p,this)})),i)if(l={values:s(VALUES),keys:o?f:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in d||defineBuiltIn(d,c,l[c]);else $$1({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return d[ITERATOR$1]!==f&&defineBuiltIn(d,ITERATOR$1,f,{name:i}),Iterators$1[t]=f,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators=iterators,InternalStateModule=internalState,defineProperty=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),values=Iterators.Arguments=Iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS&&"values"!==values.name)try{defineProperty(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$1=global$b,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$4=wellKnownSymbol$a,ITERATOR=wellKnownSymbol$4("iterator"),TO_STRING_TAG$2=wellKnownSymbol$4("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR,ArrayValues)}catch(e){t[ITERATOR]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var n in ArrayIteratorMethods)if(t[n]!==ArrayIteratorMethods[n])try{createNonEnumerableProperty(t,n,ArrayIteratorMethods[n])}catch(e){t[n]=ArrayIteratorMethods[n]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var isObject=isObject$6,classof$2=classofRaw$1,wellKnownSymbol$3=wellKnownSymbol$a,MATCH$1=wellKnownSymbol$a("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$2(e))},isRegExp=isRegexp,$TypeError=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError("The method doesn't accept regular expressions");return e},wellKnownSymbol$2=wellKnownSymbol$a,TO_STRING_TAG$1=wellKnownSymbol$a("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$1]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable=isCallable$f,classofRaw=classofRaw$1,wellKnownSymbol$1=wellKnownSymbol$a,TO_STRING_TAG=wellKnownSymbol$a("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$1=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable(e.callee)?"Arguments":t},classof=classof$1,$String=String,toString$1=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},wellKnownSymbol=wellKnownSymbol$a,MATCH=wellKnownSymbol$a("match"),correctIsRegexpLogic=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[MATCH]=!1,"/./"[t](n)}catch(e){}}return!1},$=_export,uncurryThis=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$3,toString=toString$1,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=functionUncurryThis("".indexOf);$({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString(requireObjectCoercible(this)),toString(notARegExp(e)),1<arguments.length?arguments[1]:void 0)}});const clickAwayListener=e=>{var t=null==(t=null==(n=null==e?void 0:e.path)?void 0:n.find)?void 0:t.call(n,e=>{var t;return(null==(t=null==e?void 0:e.id)?void 0:t.toLowerCase().includes("aiware-app-bar"))||(null==(t=null==e?void 0:e.id)?void 0:t.toLowerCase().includes("panel"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("APP_BAR"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("undefined"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("-root"))||(null==(t=null==(e=null==(t=null==e?void 0:e.attributes)?void 0:t.role)?void 0:e.value)?void 0:t.includes("presentation"))}),n="BODY"===(null==(e=null==(n=null==e?void 0:e.path)?void 0:n[0])?void 0:e.tagName);t||n||store$4.dispatch(unmountAllPanel$1("null"))};class RefHolder extends react.exports.Component{render(){return jsxRuntime.exports.jsx("div",{children:this.props.children})}}const rootPostfix="root";function mountPanelListenerSagaGenerator(p,f){return function*(){yield takeEvery$1(mountPanel$1({}).type,function*(e){const{panelId:t,microFrontend:{name:n},panelConfig:r}=null==e?void 0:e.payload;let i=null,o=void 0;f&&(o=yield call$7(f,r.type),i=yield call$7(f,n));var a,s,l,c,e=i||p[n]||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),u=o||p[r.type];r.parent&&({panelConfig:{marginTop:a=0,marginStart:s=0,zIndex:l=1e3},panelId:c}=yield select(e=>e.panels.find(e=>e.panelId===r.parent)),c=(null==(c=null===document||void 0===document?void 0:document.getElementById(c))?void 0:c.clientWidth)||650,r.marginTop=r.marginTop||a,r.marginStart=r.marginStart||s+c,r.zIndex=r.zIndex||l);const d=getElement(t+"-"+rootPostfix);d.classList.add("aiware-el"),ReactDOM.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(ClickAwayListener,Object.assign({onClickAway:clickAwayListener},{children:jsxRuntime.exports.jsx(RefHolder,{children:jsxRuntime.exports.jsx(u,Object.assign({type:"SIMPLE_PANEL",panelId:t,"data-test":"panel-"+t},{children:jsxRuntime.exports.jsx(e,{})}))})}))}))})})),d)}),yield takeEvery$1(unmountPanel$1("").type,function*(t){var e=yield select(e=>e.panels.find(e=>{return(null==(e=null==e?void 0:e.panelConfig)?void 0:e.parentPanelId)===t.payload}));e&&0<Object.keys(e).length&&(yield put(unmountPanel$1(e.panelId))),ReactDOM.unmountComponentAtNode(document.getElementById(t.payload+"-"+rootPostfix)||new DocumentFragment)}),yield takeEvery$1(openLinkOnNewTab({url:""}).type,function(e){e=null==(e=null==e?void 0:e.payload)?void 0:e.url;const t=document.createElement("a");t.target="_blank",t.href=e,t.click()})}}function getPanelsModule(e,t){return{id:name$1,reducerMap:{panels:(t,{type:e,payload:n})=>{switch(e){case mountPanel$1({}).type:{const o=[...t];n.panelConfig.show=!0;var r=n.panelConfig;const a=null==r?void 0:r.parentPanelId;var r=null==r?void 0:r.dimmedStatus;return"dimAllParents"===r?[...o.map(e=>{return Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},e.panelConfig),{dimmed:((null==(e=e.panelConfig)?void 0:e.dimmed)||0)+1})})}),n]:a&&r?(r=t.findIndex(e=>e.panelId===a),o[r]=Object.assign(Object.assign({},o[r]),{panelConfig:Object.assign(Object.assign({},null==(i=o[r])?void 0:i.panelConfig),{dimmed:((null==(r=null==(i=o[r])?void 0:i.panelConfig)?void 0:r.dimmed)||0)+1})}),[...o,n]):[...t,n]}case unmountPanel$1("").type:{r=null==(i=t.find(e=>e.panelId===n))?void 0:i.panelConfig;const s=null==r?void 0:r.parentPanelId;var i=null==r?void 0:r.dimmedStatus;const l=t.filter(e=>e.panelId!==n);return"dimAllParents"===i?l.map(e=>{return Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},e.panelConfig),{dimmed:((null==(e=e.panelConfig)?void 0:e.dimmed)||0)-1})})}):(s&&i&&-1!==(r=t.findIndex(e=>e.panelId===s))&&(l[r]=Object.assign(Object.assign({},l[r]),{panelConfig:Object.assign(Object.assign({},l[r].panelConfig),{dimmed:((null==(i=l[r].panelConfig)?void 0:i.dimmed)||0)-1})})),l)}case hidePanel$1("").type:{let e=t.find(e=>e.panelId===n);r=t.filter(e=>e.panelId!==n);return e=Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},null===e||void 0===e?void 0:e.panelConfig),{show:!1})}),[...r,e]}case unmountAllPanel$1("").type:return t.map(e=>Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},null==e?void 0:e.panelConfig),{show:!1})}));case updatePanelMicroFrontendProps({}).type:{let e=t.find(e=>e.panelId===n.id);i=t.filter(e=>e.panelId!==n.id);return e=Object.assign(Object.assign({},e),{microFrontend:Object.assign(Object.assign({},null===e||void 0===e?void 0:e.microFrontend),{config:n.props})}),[...i,e]}}return t||[]}},sagas:[mountPanelListenerSagaGenerator(e,t)],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},{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}})});!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();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={selectedTabId:0,tabLink:"https://help.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,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="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]: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://help.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(e){var t=useSelector(initialConfigSelector),n=useSelector(customKnowledgeBaseUrlSelector),r=useSelector(customDocsUrlSelector),i=useSelector(helpCenterSelectedTabIdSelector);const o=useSelector(e=>null==e?void 0:e.panels);var a=useStyles$1()["classes"],[s]=react.exports.useState(defaultLocale);const l=useDispatch();var c=null===o||void 0===o?void 0:o.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),n=c&&n?n:t.knowledgeBaseURL,c=c&&r?r:t.docsURL;return jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:s},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:a.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:i,onChangeTab:e=>{l(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:i,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:n})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:i,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:c})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:a.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$w,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var 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=()=>{var e=useSelector(userSelector$2),t=useStyles()["classes"];const n=useSelector(initialConfigSelector).applicationId;var r=useSelector(applicationSelector);const i=useSelector(switchApiSelector),o=(null==r?void 0:r.application)||[];r=null==r?void 0:r.status;const a=[...o];var s=a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),l=o.findIndex(e=>e.id===n);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(n)&&l<0&&"success"===r?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:t.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:t.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:t.orgName},{children:null!=(l=null==e?void 0:e.organization)&&l.organizationName?e.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"})})),jsxRuntime.exports.jsx("div",Object.assign({className:t.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(i+"/"+e,"_self")},applications:s,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)}}const rateLimiter=new RateLimiter;function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);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$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),mountWidget=(root.classList.add("aiware-el"),ReactDOM.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),root),(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){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){const e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){const 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,lightTheme:lightTheme}},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,commit:"312d7854a"});export{ListItem$1 as $,AIWareIntlProvider as A,Box$1 as B,interopRequireDefault as C,createAction as D,createReducer as E,FormattedMessage$1 as F,Grid$1 as G,createSlice as H,ENGINE_OWNER_TYPES as I,ENGINE_FILTER_TYPES as J,lib$4 as K,LoadingButton$1 as L,preferredLanguageSelector as M,baseUrlSelector as N,rootApiSelector as O,Provider$1 as P,sessionTokenSelector as Q,graphEndpointSelector as R,Switch$1 as S,Typography$1 as T,controllerNodeRedImageSelector as U,controllerUrlSelector as V,automateControllerUrlSelector as W,automateUrlSelector as X,Portal$1 as Y,List$2 as Z,_extends as _,generateUtilityClasses as a,img$Q as a$,ListItemIcon$1 as a0,ListItemText$1 as a1,all as a2,img$k as a3,img$l as a4,img$n as a5,img$o as a6,Divider$1 as a7,Tooltip$1 as a8,IconButton$1 as a9,getTemplateById as aA,getTemplateByIdFallback as aB,TableContainer$1 as aC,Table$1 as aD,TableHead$1 as aE,TableRow$1 as aF,TableCell$1 as aG,TableSortLabel$1 as aH,TableBody$1 as aI,img$d as aJ,Popper$1 as aK,ClickAwayListener as aL,Fade$1 as aM,img$p as aN,img$m as aO,img$M as aP,img$y as aQ,Dialog$1 as aR,DialogTitle$1 as aS,DialogContent$1 as aT,DialogActions$1 as aU,Select$1 as aV,MenuItem$1 as aW,Snackbar$1 as aX,default_1$2 as aY,img$f as aZ,img$h as a_,img$e as aa,img$C as ab,getNodeRedVersionEdgeApi as ac,createEnginebuild as ad,Skeleton$1 as ae,takeLatest$1 as af,fetchAllTags as ag,put as ah,select as ai,fetchFlows as aj,call$7 as ak,fetchTemplateGallery as al,isRevisionsExistOnServerRequest as am,FormLabel$1 as an,default_1$7 as ao,FormGroup$1 as ap,FormControlLabel$1 as aq,Checkbox$1 as ar,fetchTemplateGalleryFallback as as,Button$1 as at,img$i as au,fetchVeritoneGraphQLApi as av,flowStyles as aw,NoResults as ax,img$8 as ay,setApiEndpoint as az,styled$1 as b,_hasPath as b$,Tabs$1 as b0,Tab$1 as b1,deleteEngine as b2,img$g as b3,AIWareFormatMessage as b4,FormattedDate as b5,useTheme as b6,KeyboardArrowRight as b7,KeyboardArrowLeft as b8,useId as b9,img$a as bA,img$9 as bB,isEmpty_1 as bC,Backdrop$1 as bD,CircularProgress$1 as bE,getDefaultMiddleware as bF,isNil_1 as bG,UpDown as bH,Icon$1 as bI,get_1 as bJ,map_1 as bK,keys_1 as bL,RadioGroup$1 as bM,Avatar$1 as bN,img$s as bO,FormHelperText$1 as bP,img$c as bQ,StyledEngineProvider as bR,ThemeProvider as bS,lightTheme as bT,CssBaseline as bU,Hide as bV,showMessage as bW,MessageSeverity as bX,baseGraphQLApi as bY,Radio$1 as bZ,fetchEngine as b_,InputUnstyled as ba,isHostComponent as bb,createSvgIcon$2 as bc,getDefaultExportFromNamespaceIfNotNamed as bd,commonjsRequire as be,_assertThisInitialized$1 as bf,_setPrototypeOf$3 as bg,reactDom as bh,React$1 as bi,_inheritsLoose$2 as bj,ReactDOM as bk,__awaiter$a as bl,__generator$2 as bm,__spread as bn,PropTypes as bo,connect as bp,Bookmark as bq,EngineFlagIcons as br,createAsyncThunk as bs,withStyles as bt,getConfigModule as bu,getAuthModule as bv,getSnackbarModule as bw,CacheProvider as bx,muiCache as by,img$N as bz,Paper$1 as c,_arrayLikeKeys as c$,_createCompounder as c0,_baseIteratee as c1,isArrayLike_1 as c2,toInteger_1 as c3,hoistNonReactStatics_cjs as c4,Transition$1 as c5,useControlled as c6,Collapse$1 as c7,ButtonBase$1 as c8,alpha as c9,useBackupImg as cA,img$1u as cB,configSelector as cC,baseGraphQLApiWithError as cD,useDoubleClick as cE,VerifiedFilled as cF,Add as cG,img$12 as cH,Filter$1 as cI,DynamicTable as cJ,useTheme$2 as cK,getThemeProps as cL,React$2 as cM,_arrayPush as cN,isArray_1 as cO,_getNative as cP,eq_1 as cQ,_castPath as cR,_isIndex as cS,isObject_1 as cT,_toKey as cU,_root as cV,_Uint8Array as cW,_overArg as cX,_isPrototype as cY,isObjectLike_1 as cZ,_baseGetTag as c_,commonjsGlobal$1 as ca,getDefaultExportFromCjs as cb,TransitionGroup$1 as cc,useForkRef as cd,useEnhancedEffect$1 as ce,combineReducers as cf,createSelector as cg,fork as ch,AIWareThemeProvider as ci,Close$1 as cj,FullscreenExit as ck,Fullscreen as cl,TabPanel as cm,default_1$4 as cn,InputAdornment$1 as co,unmountPanel$1 as cp,AvailableComponents as cq,delay$1 as cr,mountPanel$1 as cs,DialogContentText$1 as ct,MoreVert as cu,Menu$1 as cv,Edit as cw,Upload as cx,Delete as cy,CustomTabs as cz,capitalize$2 as d,createUnarySpacing as d$,isArguments_1 as d0,isBuffer$3 as d1,isFunction_1 as d2,isTypedArray_1 as d3,_Stack as d4,_baseFor as d5,identity_1 as d6,_isIterateeCall as d7,_Set as d8,_setToArray as d9,startCase_1 as dA,times_1 as dB,ReactIs as dC,upperFirst_1 as dD,isString_1 as dE,_baseSlice as dF,channel as dG,useIntl as dH,VideoCamera as dI,Image$1 as dJ,Sound as dK,Description$1 as dL,toNumber_1 as dM,ProgressStepper as dN,CurlyBraces as dO,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,extendSxProp as dY,handleBreakpoints as dZ,resolveBreakpointValues as d_,_SetCache as da,_cacheHas as db,_baseToString as dc,_baseTrim as dd,_castSlice as de,_stringToArray as df,toString_1 as dg,isSymbol_1 as dh,_arrayMap as di,_baseMap as dj,_baseGet as dk,_baseUnary as dl,lib as dm,getThunkExtension_1 as dn,composeWithDevTools as dp,orange$1 as dq,deepOrange$1 as dr,createTheme$1 as ds,createIntl as dt,SvgIcon$1 as du,unmountAllPanel$1 as dv,takeEvery$1 as dw,isNull_1 as dx,size_1 as dy,take as dz,_objectWithoutPropertiesLoose$2 as e,img$J as e$,deepmerge as e0,getValue$2 as e1,useEventCallback as e2,setRef as e3,inputClasses$1 as e4,inputBaseClasses$1 as e5,outlinedInputClasses$1 as e6,filledInputClasses$1 as e7,ClearIcon as e8,ArrowDropDownIcon as e9,AdminCenter as eA,img$P as eB,img$1 as eC,img$w as eD,userSelector$2 as eE,enableBetaFeatures as eF,Badge$1 as eG,openLinkOnNewTab as eH,avatarClasses as eI,authSelector as eJ,injectIntl as eK,headerBarSelector as eL,getSortName as eM,img$5 as eN,InputLabel$1 as eO,ListItemAvatar$1 as eP,OrganizationTabIcon as eQ,ScopedCssBaseline$1 as eR,AlarmTwo as eS,getApplicationsApi as eT,ListItemSecondaryAction$1 as eU,updateTokenSuccess as eV,postNotificationCommand as eW,aiwareEvent as eX,notificationCommands as eY,panelsSelector as eZ,css as e_,_Symbol as ea,_baseEach as eb,_arrayFilter as ec,emStyled as ed,isPlainObject as ee,useTheme$3 as ef,useIsFocusVisible as eg,ownerDocument as eh,appendOwnerState as ei,lighten as ej,darken as ek,slotShouldForwardProp as el,shouldSpreadAdditionalProps$1 as em,Slide$1 as en,hidePanel$1 as eo,updatePanelMicroFrontendProps as ep,setData as eq,keyframes as er,TabId as es,PersonalProfile$1 as et,Organizations as eu,DataCenter as ev,FlowCenter2 as ew,DeveloperCenter as ex,Marketplace as ey,LibraryCenter as ez,clsx as f,EnumHelpers as f$,img$I as f0,img$1r as f1,img$1q as f2,img$1p as f3,img$G as f4,img$1s as f5,img$F as f6,emphasize as f7,_arraySome as f8,Process as f9,ExpandMore as fA,img$r as fB,img$t as fC,img as fD,FilterRemove as fE,FolderOpen as fF,Voice as fG,FolderFilled as fH,Time as fI,img$u as fJ,Undefined as fK,YoutubeSource as fL,PodcastSource as fM,TVSource as fN,RadioSource as fO,selectOrgId as fP,selectIsUserAdmin as fQ,ErrorState$1 as fR,StepConnector$1 as fS,NullState$2 as fT,Group as fU,PermissionChangedAction as fV,AddGroup as fW,StepperContext$1 as fX,StepContext$1 as fY,initialConfigSelector as fZ,ConfirmationModal as f_,Information as fa,NewFolder as fb,SpecialFolder as fc,User as fd,Source as fe,ProcessingDetail as ff,Search$1 as fg,getLibraryModule as fh,selectApiConfigs$1 as fi,FullScreenContainer as fj,betaFeaturesSelector as fk,cmsUrlSelector as fl,UserAddFilled as fm,Popover$1 as fn,MenuList$1 as fo,MoveFolder as fp,ErrorBoundary as fq,Download as fr,img$6 as fs,selectPanelByPanelName as ft,EngineCategoryIcons as fu,Settings$2 as fv,Hamburger as fw,List as fx,EditAttributes as fy,MoreHor as fz,generateUtilityClass as g,formatBytes as g0,NotInterested as g1,mountPanelForResponse$1 as g2,ApplicationTabIcon as g3,Lock as g4,SecurityGroup as g5,NoApps as g6,green$1 as g7,selectors as g8,LibraryDropdown as g9,Remove as ga,Save as gb,Input$1 as gc,AddUser as gd,Modal$1 as ge,registry as gf,registerComponent as gg,AvailableWidgets as gh,root as gi,mountWidget as gj,unmountWidget as gk,mountPanel as gl,unmountPanel as gm,hidePanel as gn,unmountAllPanel as go,init as gp,composeClasses as h,useDispatch as i,jsxRuntime as j,useSelector as k,authStatusSelector as l,makeStyles as m,authContextSelector as n,AuthContext as o,lodash as p,Alert$1 as q,react as r,store$4 as s,authErrorMessage as t,useThemeProps as u,FormControl$1 as v,TextField$1 as w,classnames as x,resetPasswordRequest as y,createSvgIcon as z};
|