aiware-js 2.19.0 → 2.20.0
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/index.esm.css +115 -115
- package/index.esm.js +1 -1
- package/js-core.esm.js +41 -41
- package/js-core.esm18.js +2 -2
- package/js-core.esm19.js +3 -3
- package/js-core.esm20.js +1 -1
- package/js-core.esm22.js +1 -1
- package/js-core.esm23.js +1 -1
- package/js-core.esm24.js +1 -1
- package/js-core.esm25.js +1 -1
- package/js-core.esm26.js +1 -1
- package/js-core.esm27.js +1 -1
- package/js-core.esm28.js +1 -1
- package/js-core.esm29.js +1 -1
- package/js-core.esm30.js +2 -2
- package/js-core.esm31.js +1 -1
- package/js-core.esm32.js +1 -1
- package/js-core.esm33.js +1 -1
- package/js-core.esm34.js +12 -18
- package/js-core.esm35.js +1 -1
- package/js-core.esm36.js +2 -2
- package/js-core.esm37.js +2 -2
- package/js-core.esm39.js +1 -1
- package/js-core.esm40.js +1 -1
- package/js-core.esm42.js +1 -1
- package/js-core.esm43.js +1 -1
- package/js-core.esm44.js +1 -1
- package/js-core.esm45.js +2 -2
- package/js-core.esm46.js +1 -1
- package/js-core.esm47.js +2 -2
- package/js-core.esm48.js +2 -2
- package/js-core.esm5.js +4 -4
- package/js-core.esm7.js +2 -2
- package/js-core.umd.css +23 -23
- package/js-core.umd.js +172 -178
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +3 -3
package/js-core.esm.js
CHANGED
|
@@ -924,7 +924,7 @@ createScheduledJob(input:{
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
|
-
}`,graphEndpoint:o,token:a});if(!n.errors&&(e=null==(l=null==n?void 0:n.data)?void 0:l.__type)){n=e["name"];const r={name:n,fields:[]};r.fields=(e.fields||[]).map(e=>({name:e.name,args:e.args.map(e=>({name:e.name,type:this.typeBuilder(e.type)})),type:this.typeBuilder(null==e?void 0:e.type)})),this.types.push(r),e=r}}if(s){const i=[];return null!==e&&void 0!==e&&e.fields.forEach(t=>{s.find(e=>t.name===e)&&i.push(t)}),i}return null===e||void 0===e?void 0:e.fields}})}typeBuilder(e){if(e.name)return e.name;let t="";return e.kind&&("NON_NULL"===e.kind&&(t=this.typeBuilder(e.ofType)+"!"),"LIST"===e.kind&&(t="["+this.typeBuilder(e.ofType)+"]")),t}getQueries(){return this.query}getMutations(){return this.mutation}getTypes(){return this.types}isOperationValid(t,e){return e?!!this[e].find(e=>e.name===t):!!this.query.find(e=>e.name===t)||!!this.mutation.find(e=>e.name===t)}indentationChecker(e){let t=0,n=0;for(;" "===e[n];)t+=1,n+=1;return t}nestingChecker(e){let t=0;for(;t<e.length;)"{"===e[t][e[t].length-1]&&e[t+1]&&"}"===e[t+1][e[t+1].length-1]?e.splice(t,2):t+=1;if(2===e.length)throw new Error("Provided operation payload is not supported");return e}recursiveFieldCheck(p,f,h,m,g=[],v,n=1,y=2){var x;return __awaiter$7(this,void 0,void 0,function*(){let e=" ",r="",t=y;for(;t-1;)e+=" ",r+=" ",--t;!this.types.find(e=>e.name===f)&&f&&(yield this.getAvailableFields(h,m,f));let i=n;for(;i<p.length;){let n;const s=p[i].includes("...");s?(n=p[i].split("on")[1].split("{")[0].trim(),yield this.getAvailableFields(h,m,n)):n=p[i].trim().split("(")[0].trim().split("{")[0].trim();let t;t=n.includes(":")?n.split(":")[1]:n;const l=this.types.find(e=>s?e.name===n:e.name===(f||"").replace(/[\[\]!]+/g,""));if(l||"}"===n||s){var o=s?l:null===l||void 0===l?void 0:l.fields.find(e=>e.name===t);if(o||"}"===n){let t="";if(p[i].includes("(")&&o){var a=this.getParameters(p,i);const c=this.paramsParser(a,v);if(c.length){const u=[],d=(null==(x=null===l||void 0===l?void 0:l.fields.find(e=>e.name===n))?void 0:x.args)||[];c.forEach(t=>{var e,n=d.find(e=>e.name in t&&t[e.name]===e.type);n&&(-1!==(e=this.params.findIndex(e=>t.field in e))&&(this.params[e].validated=!0),u.push(Object.assign(Object.assign({},n),{field:t.field})))}),u.length&&(t+="(",u.forEach(e=>t+=`${e.name}: ${e.field} `),t+=")")}}if(p[i].includes("{")&&o||s){s?g.push(`${e}... on ${n} ${t}{`):g.push(""+e+n+` ${t}{`);a=s?n:(null==o?void 0:o.type)||null;i=yield this.recursiveFieldCheck(p,a,h,m,g,v,i+1,y+1)}else{if(p[i].includes("}"))return g.push(r+"}"),i===p.length-1?this.nestingChecker(g).join("\n"):i;g.push(""+e+n)}}else if(p[i].includes("{")){let e=1;for(;e;)i+=1,p[i].includes("{")&&(e+=1),p[i].includes("}")&&--e}}i+=1}})}getParameters(e,t){return e[t].split("(")[1].split(")")[0].trim().replace(/:\s/g,":")}paramsParser(e,n){const t=e.split(":"),r=[],i=(t.forEach(e=>{const t=e.trim();let n;t.includes(" ")&&(n=t.split(" ")),(n=t.includes(",")?t.split(","):n)?n.forEach(e=>r.push(e.trim())):r.push(t)}),[]);for(let t=0;t<r.length-1;t++){var o=n.find(e=>r[t+1]in e);o&&(o={[r[t]]:o[r[t+1]],field:r[t+1],validated:!1},i.push(o)),t+=1}return i}queryParser(h,m,g){return __awaiter$7(this,void 0,void 0,function*(){try{this.initialized||(yield this.initialize(h,m,!1));const c=g.split("\n");let i,e="";c[0].includes("(")?(i=c[0].split("(")[0].trim(),(e=(e=(e=(e=this.getParameters(c,0)).includes(",")?e.split(",").join(""):e).split("$")).filter(e=>!!e)).forEach(e=>e="$"+e.trim()),this.params=e.map(e=>{const[t,n]=e.split(":");return{["$"+t]:n.trim(),validated:!1}})):i=c[0].split("{")[0].trim(),i=(i=i.includes(" ")?i.split(" ")[0]:i)||"query";var o,t=c[1],a=this.indentationChecker(t);const u=[];for(let r=1;r<c.length;r++){let n="";if(a===this.indentationChecker(c[r])){let t;let e;if(c[r].includes("(")?(t=c[r].split("(")[0].trim(),o=c[r].split("(")[1].split(")")[0].trim(),e=this.paramsParser(o,this.params)):t=c[r].split("{")[0].trim(),"}"!==t){const d=this[i].find(e=>e.name===t);if(e){const p=[];e.forEach(t=>{var e,n=d.args.find(e=>e.name in t&&t[e.name]===e.type);n&&(-1!==(e=this.params.findIndex(e=>t.field in e))&&(this.params[e].validated=!0),p.push(Object.assign(Object.assign({},n),{field:t.field})))}),p.length&&(n+="(",p.forEach(e=>n+=`${e.name}: ${e.field} `),n+=")")}u.push({operation:t,line:r,type:null===d||void 0===d?void 0:d.type,args:n})}}}let r="";for(let t=0;t<u.length;t++){var n=(u[t+1]||{}).line||c.length-1,s=u[t].type;const f=c.slice(u[t].line,n);var l=md5(f.join("").replace(/\s/g,""));let e;if("string"!=typeof(e=this.hashMap[l]?(console.log(`returning ${u[t].operation} from memory`),this.hashMap[l]):yield this.recursiveFieldCheck(f,s,h,m,[` ${u[t].operation} ${u[t].args} {`],this.params)))throw console.log(e),new Error("Introspection utility failed while validating operation");this.hashMap[l]=e,r+="\n"+e+"\n"}if(r){let n="";if(this.params.forEach(e=>{var t;e.validated&&([e,t]=Object.entries(e)[0],n+=e+`: ${t} `)}),this.params.length&&!n)throw new Error("No valid parameters found");return n=n&&"("+n+")",r=`${i} ${n} {`+r+"}"}if(this.safety)throw new Error("Instrospection utility failed. Safety is ON");return console.log("Instrospection utility failed. Safety is OFF. Proceeding with original operation payload"),g}catch(e){if(console.log(e),!this.safety)return g}})}}var AuthContext,Status,MessageSeverity,gqlIntrospection=new GqlInstrospection;(AuthContext=AuthContext||{}).ResetPassword="ResetPassword",function(e){e.idle="idle",e.loading="loading",e.success="success",e.failure="failure",e.skipped="skipped",e.ready="ready"}(Status=Status||{});const namespace$3$1="auth",initialState$3$1={oAuthToken:"",oAuthStatus:Status.idle,initStatus:Status.idle,userId:"",sessionToken:"",user:{},status:Status.idle,authContext:null,errorMessage:null,userIsActive:!0},authSlice=createSlice({name:namespace$3$1,initialState:initialState$3$1,reducers:{fetchUserRequest(e){e.status=Status.loading},fetchUserSuccess(e,t){var n;e.sessionToken=null==(n=t.payload)?void 0:n.token,e.userId=null==(n=t.payload)?void 0:n.userId,e.user=Object.assign({},t.payload),e.status=Status.success},fetchUserError(e){e.status=Status.failure},updateTokenRequest(e,t){e.status=Status.idle},updateTokenSuccess(e,t){t=t.payload.token;e.sessionToken=t,e.user.token=t,e.status=Status.success},updateTokenError(e){e.sessionToken="",e.status=Status.failure},updateUserLanguageStart(e,t){e.status=Status.loading},updateUserLanguageSuccess(e,t){e.user.preferredLanguage=t.payload,e.status=Status.success},refreshTokenRequest(e,t){e.status=Status.loading},refreshTokenSuccess(e,t){e.sessionToken=null==(t=null==(t=t.payload)?void 0:t.refreshToken)?void 0:t.token,e.status=Status.success},extendTokenRequest(e,t){e.status=Status.loading},extendTokenSuccess(e,t){e.sessionToken!==t.payload.token&&(e.sessionToken=t.payload.token),e.status=Status.success},setTokenExpiration(e,t){e.user=Object.assign(Object.assign({},e.user),{tokenExpiration:null==(e=t.payload)?void 0:e.expirationTime})},logoutRequest(e,t){e.status=Status.loading},logoutSuccess(e){e.status=Status.success},logoutError(e){e.status=Status.failure},resetPasswordRequest(e,t){e.status=Status.loading,e.errorMessage=null,e.authContext=AuthContext.ResetPassword},resetPasswordError(e,t){t=t.payload;e.status=Status.failure,e.errorMessage=t.message},resetPasswordSuccess(e){e.status=Status.success,e.errorMessage=null},oAuthGrantReadyToStart(e){e.oAuthStatus=Status.ready},oAuthGrantStart(e){e.oAuthStatus=Status.loading},oAuthGrantSkip(e){e.oAuthStatus=Status.skipped},oAuthGrantSuccess(e,t){e.oAuthToken=t.payload,e.oAuthStatus=Status.success},oAuthGrantFailure(e){e.oAuthStatus=Status.failure},sdkInitSuccess(e){e.initStatus=Status.success},sdkInitFailure(e){e.initStatus=Status.failure}}}),{fetchUserRequest,fetchUserSuccess,fetchUserError,refreshTokenRequest,refreshTokenSuccess,extendTokenRequest,extendTokenSuccess,setTokenExpiration,logoutRequest,logoutSuccess,logoutError,updateTokenRequest,updateTokenSuccess,updateTokenError,updateUserLanguageStart,updateUserLanguageSuccess,resetPasswordRequest,resetPasswordError,resetPasswordSuccess,oAuthGrantStart,oAuthGrantReadyToStart,oAuthGrantSkip,oAuthGrantSuccess,oAuthGrantFailure,sdkInitSuccess,sdkInitFailure}=authSlice.actions,authReducer=authSlice.reducer,namespace$2$1="configs",initialState$2$2={initConfig:{},config:null,status:"idle"},configsSlice=createSlice({name:namespace$2$1,initialState:initialState$2$2,reducers:{getInitConfig(e,t){e.initConfig=t.payload,e.status="loading"},getSessionTimeout(e,t){e.status="loading"},setSessionTimeout(e,t){e.status="success",e.config.sessionTimeout=t.payload},getConfigFail(e){e.status="failure"},getConfigSuccess(e,t){e.status="success",e.config=t.payload},enableBetaFeatures(e){e.initConfig=Object.assign(Object.assign({},e.initConfig),{betaFeatures:!0})},disableBetaFeatures(e){e.initConfig=Object.assign(Object.assign({},e.initConfig),{betaFeatures:!1})}}}),{getInitConfig,getConfigFail,getConfigSuccess,enableBetaFeatures,disableBetaFeatures,getSessionTimeout,setSessionTimeout}=configsSlice.actions,configsReducer=configsSlice.reducer,sessionTokenSelector=e=>{return null==(e=e[namespace$3$1])?void 0:e.sessionToken},authSelector=e=>(null==e?void 0:e[namespace$3$1])||{},userSelector$2=e=>{return null==(e=e[namespace$3$1])?void 0:e.user},selectOrgId=e=>{return null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.organization)?void 0:e.organizationId},authErrorMessage=e=>{return null==(e=e[namespace$3$1])?void 0:e.errorMessage},selectIsOLPEnabled=e=>{return"enabled"===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.enableRBACFeature)},authContextSelector=e=>{return null==(e=e[namespace$3$1])?void 0:e.authContext},authStatusSelector=e=>{return null==(e=e[namespace$3$1])?void 0:e.status},preferredLanguageSelector=e=>{var t;return null!=(t=null==(t=e[namespace$3$1])?void 0:t.user)&&t.preferredLanguage?null==(e=null==(t=e[namespace$3$1])?void 0:t.user)?void 0:e.preferredLanguage:"en"},selectIsUserAdmin=e=>{return null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.roles)?void 0:e.includes("superadmin")},oAuthTokenSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.oAuthToken},oAuthStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.oAuthStatus},initStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initStatus},rootApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.apiRoot},configSelector=e=>{return null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config},switchApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.switchAppUrl},cmsUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.cmsAppUrl},graphEndpointSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.graphEndpoint},loginUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.loginUrl},logoutUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.logoutUrl},hidePasswordResetSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.hidePasswordReset},logoutRedirectUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.logoutRedirectUrl},controllerNodeRedImageSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.controllerNodeRedImage},controllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.controllerUrl},automateControllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.automateControllerUrl},automateUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.automateUrl},baseUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.baseUrl},initialConfigSelector=e=>{return null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig},sessionTimeoutSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.sessionTimeout},betaFeaturesSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.betaFeatures},appIdSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.applicationId},oauthRedirectUriSelector=e=>{return(null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.oAuthRedirectUri)||window.location.protocol+"//"+window.location.hostname},selectApiConfigs$1=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n})),getAppConfig=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`query {
|
|
927
|
+
}`,graphEndpoint:o,token:a});if(!n.errors&&(e=null==(l=null==n?void 0:n.data)?void 0:l.__type)){n=e["name"];const r={name:n,fields:[]};r.fields=(e.fields||[]).map(e=>({name:e.name,args:e.args.map(e=>({name:e.name,type:this.typeBuilder(e.type)})),type:this.typeBuilder(null==e?void 0:e.type)})),this.types.push(r),e=r}}if(s){const i=[];return null!==e&&void 0!==e&&e.fields.forEach(t=>{s.find(e=>t.name===e)&&i.push(t)}),i}return null===e||void 0===e?void 0:e.fields}})}typeBuilder(e){if(e.name)return e.name;let t="";return e.kind&&("NON_NULL"===e.kind&&(t=this.typeBuilder(e.ofType)+"!"),"LIST"===e.kind&&(t="["+this.typeBuilder(e.ofType)+"]")),t}getQueries(){return this.query}getMutations(){return this.mutation}getTypes(){return this.types}isOperationValid(t,e){return e?!!this[e].find(e=>e.name===t):!!this.query.find(e=>e.name===t)||!!this.mutation.find(e=>e.name===t)}indentationChecker(e){let t=0,n=0;for(;" "===e[n];)t+=1,n+=1;return t}nestingChecker(e){let t=0;for(;t<e.length;)"{"===e[t][e[t].length-1]&&e[t+1]&&"}"===e[t+1][e[t+1].length-1]?e.splice(t,2):t+=1;if(2===e.length)throw new Error("Provided operation payload is not supported");return e}recursiveFieldCheck(p,f,h,m,g=[],v,n=1,y=2){var x;return __awaiter$7(this,void 0,void 0,function*(){let e=" ",r="",t=y;for(;t-1;)e+=" ",r+=" ",--t;!this.types.find(e=>e.name===f)&&f&&(yield this.getAvailableFields(h,m,f));let i=n;for(;i<p.length;){let n;const s=p[i].includes("...");s?(n=p[i].split("on")[1].split("{")[0].trim(),yield this.getAvailableFields(h,m,n)):n=p[i].trim().split("(")[0].trim().split("{")[0].trim();let t;t=n.includes(":")?n.split(":")[1]:n;const l=this.types.find(e=>s?e.name===n:e.name===(f||"").replace(/[\[\]!]+/g,""));if(l||"}"===n||s){var o=s?l:null===l||void 0===l?void 0:l.fields.find(e=>e.name===t);if(o||"}"===n){let t="";if(p[i].includes("(")&&o){var a=this.getParameters(p,i);const c=this.paramsParser(a,v);if(c.length){const u=[],d=(null==(x=null===l||void 0===l?void 0:l.fields.find(e=>e.name===n))?void 0:x.args)||[];c.forEach(t=>{var e,n=d.find(e=>e.name in t&&t[e.name]===e.type);n&&(-1!==(e=this.params.findIndex(e=>t.field in e))&&(this.params[e].validated=!0),u.push(Object.assign(Object.assign({},n),{field:t.field})))}),u.length&&(t+="(",u.forEach(e=>t+=`${e.name}: ${e.field} `),t+=")")}}if(p[i].includes("{")&&o||s){s?g.push(`${e}... on ${n} ${t}{`):g.push(""+e+n+` ${t}{`);a=s?n:(null==o?void 0:o.type)||null;i=yield this.recursiveFieldCheck(p,a,h,m,g,v,i+1,y+1)}else{if(p[i].includes("}"))return g.push(r+"}"),i===p.length-1?this.nestingChecker(g).join("\n"):i;g.push(""+e+n)}}else if(p[i].includes("{")){let e=1;for(;e;)i+=1,p[i].includes("{")&&(e+=1),p[i].includes("}")&&--e}}i+=1}})}getParameters(e,t){return e[t].split("(")[1].split(")")[0].trim().replace(/:\s/g,":")}paramsParser(e,n){const t=e.split(":"),r=[],i=(t.forEach(e=>{const t=e.trim();let n;t.includes(" ")&&(n=t.split(" ")),(n=t.includes(",")?t.split(","):n)?n.forEach(e=>r.push(e.trim())):r.push(t)}),[]);for(let t=0;t<r.length-1;t++){var o=n.find(e=>r[t+1]in e);o&&(o={[r[t]]:o[r[t+1]],field:r[t+1],validated:!1},i.push(o)),t+=1}return i}queryParser(m,g,v){return __awaiter$7(this,void 0,void 0,function*(){try{this.initialized||(yield this.initialize(m,g,!1));const u=v.split("\n");let i,e="";u[0].includes("(")?(i=u[0].split("(")[0].trim(),(e=(e=(e=(e=this.getParameters(u,0)).includes(",")?e.split(",").join(""):e).split("$")).filter(e=>!!e)).forEach(e=>e="$"+e.trim()),this.params=e.map(e=>{const[t,n]=e.split(":");return{["$"+t]:n.trim(),validated:!1}})):i=u[0].split("{")[0].trim(),i=(i=i.includes(" ")?i.split(" ")[0]:i)||"query";var o,t=u[1],a=this.indentationChecker(t);const d=[];for(let r=1;r<u.length;r++){let n="";if(a===this.indentationChecker(u[r])){let t;let e;if(u[r].includes("(")?(t=u[r].split("(")[0].trim(),o=u[r].split("(")[1].split(")")[0].trim(),e=this.paramsParser(o,this.params)):t=u[r].split("{")[0].trim(),"}"!==t){const p=this[i].find(e=>e.name===t);if(e){const f=[];e.forEach(t=>{var e,n=p.args.find(e=>e.name in t&&t[e.name]===e.type);n&&(-1!==(e=this.params.findIndex(e=>t.field in e))&&(this.params[e].validated=!0),f.push(Object.assign(Object.assign({},n),{field:t.field})))}),f.length&&(n+="(",f.forEach(e=>n+=`${e.name}: ${e.field} `),n+=")")}d.push({operation:t,line:r,type:null===p||void 0===p?void 0:p.type,args:n})}}}let r="";for(let t=0;t<d.length;t++){var n=(d[t+1]||{}).line||u.length-1,s=d[t].type;const h=u.slice(d[t].line,n);var l=md5(h.join("").replace(/\s/g,""));let e;if("string"!=typeof(e=this.hashMap[l]?(console.log(`returning ${d[t].operation} from memory`),this.hashMap[l]):yield this.recursiveFieldCheck(h,s,m,g,[` ${d[t].operation} ${d[t].args} {`],this.params)))throw console.log(e),new Error("Introspection utility failed while validating operation");this.hashMap[l]=e,r+="\n"+e+"\n"}if(r){let n="";if(this.params.forEach(e=>{var t;e.validated&&([e,t]=Object.entries(e)[0],n+=e+`: ${t} `)}),this.params.length&&!n)throw new Error("No valid parameters found");n=n&&"("+n+")",this.params=[],r=`${i} ${n} {`+r+"}";var c=this.params.filter(e=>!e.validated).map(e=>{var{}=e,e=__rest$4(e,["validated"]);return Object.keys(e)[0].replace("$","")});return this.params=[],{query:r,unsupportedArgs:c}}if(this.safety)throw new Error("Instrospection utility failed. Safety is ON");return console.log("Instrospection utility failed. Safety is OFF. Proceeding with original operation payload"),{query:v}}catch(e){if(this.params=[],console.log(e),!this.safety)return{query:v}}})}}var AuthContext,Status,MessageSeverity,gqlIntrospection=new GqlInstrospection;(AuthContext=AuthContext||{}).ResetPassword="ResetPassword",function(e){e.idle="idle",e.loading="loading",e.success="success",e.failure="failure",e.skipped="skipped",e.ready="ready"}(Status=Status||{});const namespace$3$1="auth",initialState$3$1={oAuthToken:"",oAuthStatus:Status.idle,initStatus:Status.idle,userId:"",sessionToken:"",user:{},status:Status.idle,authContext:null,errorMessage:null,userIsActive:!0},authSlice=createSlice({name:namespace$3$1,initialState:initialState$3$1,reducers:{fetchUserRequest(e){e.status=Status.loading},fetchUserSuccess(e,t){var n;e.sessionToken=null==(n=t.payload)?void 0:n.token,e.userId=null==(n=t.payload)?void 0:n.userId,e.user=Object.assign({},t.payload),e.status=Status.success},fetchUserError(e){e.status=Status.failure},updateTokenRequest(e,t){e.status=Status.idle},updateTokenSuccess(e,t){t=t.payload.token;e.sessionToken=t,e.user.token=t,e.status=Status.success},updateTokenError(e){e.sessionToken="",e.status=Status.failure},updateUserLanguageStart(e,t){e.status=Status.loading},updateUserLanguageSuccess(e,t){e.user.preferredLanguage=t.payload,e.status=Status.success},refreshTokenRequest(e,t){e.status=Status.loading},refreshTokenSuccess(e,t){e.sessionToken=null==(t=null==(t=t.payload)?void 0:t.refreshToken)?void 0:t.token,e.status=Status.success},extendTokenRequest(e,t){e.status=Status.loading},extendTokenSuccess(e,t){e.sessionToken!==t.payload.token&&(e.sessionToken=t.payload.token),e.status=Status.success},setTokenExpiration(e,t){e.user=Object.assign(Object.assign({},e.user),{tokenExpiration:null==(e=t.payload)?void 0:e.expirationTime})},logoutRequest(e,t){e.status=Status.loading},logoutSuccess(e){e.status=Status.success},logoutError(e){e.status=Status.failure},resetPasswordRequest(e,t){e.status=Status.loading,e.errorMessage=null,e.authContext=AuthContext.ResetPassword},resetPasswordError(e,t){t=t.payload;e.status=Status.failure,e.errorMessage=t.message},resetPasswordSuccess(e){e.status=Status.success,e.errorMessage=null},oAuthGrantReadyToStart(e){e.oAuthStatus=Status.ready},oAuthGrantStart(e){e.oAuthStatus=Status.loading},oAuthGrantSkip(e){e.oAuthStatus=Status.skipped},oAuthGrantSuccess(e,t){e.oAuthToken=t.payload,e.oAuthStatus=Status.success},oAuthGrantFailure(e){e.oAuthStatus=Status.failure},sdkInitSuccess(e){e.initStatus=Status.success},sdkInitFailure(e){e.initStatus=Status.failure},updateUserRecentApplicationsStart(e,t){e.status=Status.loading},updateUserRecentApplicationsSuccess(e,t){e.user.recentApplications=t.payload,e.status=Status.success}}}),{fetchUserRequest,fetchUserSuccess,fetchUserError,refreshTokenRequest,refreshTokenSuccess,extendTokenRequest,extendTokenSuccess,setTokenExpiration,logoutRequest,logoutSuccess,logoutError,updateTokenRequest,updateTokenSuccess,updateTokenError,updateUserLanguageStart,updateUserLanguageSuccess,resetPasswordRequest,resetPasswordError,resetPasswordSuccess,oAuthGrantStart,oAuthGrantReadyToStart,oAuthGrantSkip,oAuthGrantSuccess,oAuthGrantFailure,sdkInitSuccess,sdkInitFailure,updateUserRecentApplicationsStart,updateUserRecentApplicationsSuccess}=authSlice.actions,authReducer=authSlice.reducer,namespace$2$1="configs",initialState$2$2={initConfig:{},config:null,status:"idle"},configsSlice=createSlice({name:namespace$2$1,initialState:initialState$2$2,reducers:{getInitConfig(e,t){e.initConfig=t.payload,e.status="loading"},getSessionTimeout(e,t){e.status="loading"},setSessionTimeout(e,t){e.status="success",e.config.sessionTimeout=t.payload},getConfigFail(e){e.status="failure"},getConfigSuccess(e,t){e.status="success",e.config=t.payload},enableBetaFeatures(e){e.initConfig=Object.assign(Object.assign({},e.initConfig),{betaFeatures:!0})},disableBetaFeatures(e){e.initConfig=Object.assign(Object.assign({},e.initConfig),{betaFeatures:!1})}}}),{getInitConfig,getConfigFail,getConfigSuccess,enableBetaFeatures,disableBetaFeatures,getSessionTimeout,setSessionTimeout}=configsSlice.actions,configsReducer=configsSlice.reducer,sessionTokenSelector=e=>{return null==(e=e[namespace$3$1])?void 0:e.sessionToken},authSelector=e=>(null==e?void 0:e[namespace$3$1])||{},userSelector$2=e=>{return null==(e=e[namespace$3$1])?void 0:e.user},selectHasUserCreateRootFolderPermission=e=>{return((null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>["collections.collections.create","cms.media.create","veritone.superadmin"].includes(e))},selectOrgId=e=>{return null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.organization)?void 0:e.organizationId},authErrorMessage=e=>{return null==(e=e[namespace$3$1])?void 0:e.errorMessage},selectIsOLPEnabled=e=>{return"enabled"===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.enableRBACFeature)},authContextSelector=e=>{return null==(e=e[namespace$3$1])?void 0:e.authContext},authStatusSelector=e=>{return null==(e=e[namespace$3$1])?void 0:e.status},preferredLanguageSelector=e=>{var t;return null!=(t=null==(t=e[namespace$3$1])?void 0:t.user)&&t.preferredLanguage?null==(e=null==(t=e[namespace$3$1])?void 0:t.user)?void 0:e.preferredLanguage:"en"},selectIsUserAdmin=e=>{return null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.roles)?void 0:e.includes("superadmin")},oAuthTokenSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.oAuthToken},oAuthStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.oAuthStatus},initStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initStatus},userRecentApplicationsSelector=e=>{var t;return null!=(t=null==(t=e[namespace$3$1])?void 0:t.user)&&t.recentApplications?JSON.parse(null==(e=null==(t=e[namespace$3$1])?void 0:t.user)?void 0:e.recentApplications):[]},rootApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.apiRoot},configSelector=e=>{return null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config},switchApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.switchAppUrl},cmsUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.cmsAppUrl},graphEndpointSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.graphEndpoint},loginUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.loginUrl},logoutUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.logoutUrl},hidePasswordResetSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.hidePasswordReset},logoutRedirectUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.logoutRedirectUrl},controllerNodeRedImageSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.controllerNodeRedImage},controllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.controllerUrl},automateControllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.automateControllerUrl},automateUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.automateUrl},baseUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.baseUrl},initialConfigSelector=e=>{return null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig},sessionTimeoutSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.sessionTimeout},betaFeaturesSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.betaFeatures},appIdSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.applicationId},oauthRedirectUriSelector=e=>{return(null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.oAuthRedirectUri)||window.location.protocol+"//"+window.location.hostname},selectApiConfigs$1=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n})),getAppConfig=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`query {
|
|
928
928
|
staticAppConfig {
|
|
929
929
|
apiRoot
|
|
930
930
|
switchAppUrl
|
|
@@ -1060,7 +1060,7 @@ createScheduledJob(input:{
|
|
|
1060
1060
|
mutation logout($token: String!) {
|
|
1061
1061
|
userLogout(token: $token )
|
|
1062
1062
|
}
|
|
1063
|
-
`,variables:e,graphEndpoint:n,token:t})}catch(e){return{success:!1}}});let _authWindow=null,_authWindowListener=null,_OAuthToken=null;const _POLL_TIME=500,cleanupAuthWindow=()=>{_authWindow&&_authWindow.close&&_authWindow.close(),_authWindow=null},removeAuthWindowListener=()=>{_authWindowListener&&(window.removeEventListener("message",_authWindowListener),_authWindowListener=null)},createAuthWindowListener=(e,r,i)=>(removeAuthWindowListener(),function(e){var t=new URL(window.location.href);if(null!=(n=e.origin)&&n.startsWith(t.protocol+"//"+t.hostname)){var n=e.data;if(null!=n&&n.error)return removeAuthWindowListener(),cleanupAuthWindow(),void i(new Error("Veritone OAuth2 Error: "+n.error));null!=n&&n.OAuthToken&&(_OAuthToken=n.OAuthToken,removeAuthWindowListener(),cleanupAuthWindow(),r({OAuthToken:_OAuthToken}))}}),askOAuthServerForToken=(e,t,n)=>{setTimeout(()=>{_OAuthToken||(_authWindow&&_authWindow.postMessage("getOAuthToken","*"),_authWindow&&!_authWindow.closed?askOAuthServerForToken(e,t,n):_authWindow&&_authWindow.closed?(_authWindow=null,n(new Error("User cancelled OAuth flow"))):(removeAuthWindowListener(),cleanupAuthWindow()))},_POLL_TIME)},login=n=>__awaiter$7(void 0,void 0,void 0,function*(){if(n)return _OAuthToken&&(yield logout()),window.location.replace(n),new Promise((e,t)=>{_authWindowListener=createAuthWindowListener(n,e,t),window.addEventListener("message",_authWindowListener),askOAuthServerForToken(n,e,t)});throw new Error("Missing parameter: Need to include the backend OAuth2 URI")}),logout=()=>__awaiter$7(void 0,void 0,void 0,function*(){return new Promise(e=>{removeAuthWindowListener(),cleanupAuthWindow(),e(!(_OAuthToken=null))})}),handleImplicitRedirect=(e=window.location.hash||"",t=window.opener)=>{let n,r,i;try{n=e.match(/access_token=(.+)$/)[1].split("&")[0]}catch(e){}if(!n)try{r=e.match(/error=(.+)$/)[1].split("&")[0],i=e.match(/error_description=(.+)$/)[1].split("&")[0]}catch(e){}t.postMessage({OAuthToken:n,error:r,errorDescription:i},window.origin)};function*handleFetchUserSaga(){var e=yield select(rootApiSelector);if(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);const r=yield call$7(handleFetchUserRequest,e,n);var e=yield call$7(getUserRightRequest,t,n);if(r)if(null!==r&&void 0!==r&&r.errors||e.errors)yield put(fetchUserError());else{const i=null==(t=null==(t=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:t.roles)?void 0:t.map(e=>e.appName).filter((e,t,n)=>n.indexOf(e)===t);if(i.includes("admin"))for(const o of null==(t=null==(t=null==e?void 0:e.data)?void 0:t.myRights)?void 0:t.operations)if(o.includes("superadmin")){i.push("superadmin");break}t=null==(e=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:e.userSettings.find(e=>"preferredLanguage"===e.key),e=null==t?void 0:t.value;r.preferredLanguage=e||"en",yield put(fetchUserSuccess(Object.assign(Object.assign({},r),{roles:i,token:r.token||n}))),yield put(subscribeToEventsWebsocket())}else yield put(fetchUserError())}else yield take(getConfigSuccess({}).type),yield put(fetchUserRequest())}function*logoutHelper(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector);yield call$7(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.setCallLogout,value:!0,ephemeral:!0,contentType:"json"},!0,"json",aiwareEvent,e)}function*handleRefreshTokenSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"];try{const r=yield call$7(handleRefreshTokenRequest,e,t);if(null!==r&&void 0!==r&&r.errors){var n=yield select(preferredLanguageSelector);const i=AIWareFormatMessage(n);((null===r||void 0===r?void 0:r.errors)||[]).find(e=>{return((null==(e=null==e?void 0:e.data)?void 0:e.serviceMessage)||"").includes("40")})?(yield put(setDuration(1e4)),yield put(showMessage({content:i({id:"shared-redux.refresh-token-failure.4xx",defaultMessage:[{type:0,value:"Could not refresh session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):yield put(showMessage({content:i({id:"shared-redux.refresh-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not refresh session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))}else yield put(refreshTokenSuccess(Object.assign({},r.data))),yield put(fetchUserRequest())}catch(e){console.log(e)}}function*handleExtendTokenSaga(t){t=t.payload.token;try{var n=yield select(rootApiSelector),e=yield call$7(handleExtendTokenRequest,t,n);null!=e&&e.errors||(yield put(extendTokenSuccess({token:e.token})))}catch(e){n=yield select(preferredLanguageSelector);const r=AIWareFormatMessage(n);e instanceof CustomError&&e.isAuthErr?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.4xx",defaultMessage:[{type:0,value:"Could not extend session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(t)):yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not extend session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))}}function*handleLogoutSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"],e=yield call$7(handleLogoutRequest,e,t);null!=e&&e.errors?yield put(logoutError()):yield put(logoutSuccess())}function*handleUpdateSessionToken(e){e=e.payload.token;e&&"string"==typeof e?yield put(updateTokenSuccess({token:e})):yield put(updateTokenError())}function*handleUpdateUserLanguage(e){var t=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(t);try{var r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector),o=(yield select(userSelector$2))["userId"];if(!o)return sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed, user id is required"),null),void(yield put(showMessage({content:n({id:"shared-redux.snackbar.languageSelectionError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})));var a=e.payload,s=yield call$7(updateUserSettingsApi,r,i,o,"preferredLanguage",a);sdkEventManager.dispatch(SdkEvents.languageChange,null,{preferredLanguage:s}),yield put(updateUserLanguageSuccess(s))}catch(e){sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed"),null),yield put(showMessage({content:n({id:"shared-redux.snackbar.languageSelectionChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*handleResetPasswordSaga(e){var t,n,r=yield select(preferredLanguageSelector);const i=AIWareFormatMessage(r);try{var{resetToken:o,password:a,username:s,organizationInviteId:l}=e.payload,c=yield select(rootApiSelector),u=yield call$7(handleResetPasswordApi,c,{resetToken:o,username:s,password:a,organizationInviteId:l});if(null!=u&&u.success)yield put(resetPasswordSuccess());else{let e=i({id:"os-auth.reset-password.internalServerError",defaultMessage:[{type:0,value:"An error has occurred."}]});401===u.status&&"PasswordResetTokenExpired"===(null==(t=u.result)?void 0:t.errorCode)?e=i({id:"os-auth.reset-password.expireMessageDescriptive",defaultMessage:[{type:0,value:'The password reset link you used has expired. Please click the "Forgot Password" link on the login page to generate a new link.'}]}):403===u.status?e=(null==(n=u.result)?void 0:n.message)||e:404===u.status&&(e=i({id:"os-auth.reset-password.expireMessage",defaultMessage:[{type:0,value:"An error has occurred. The reset link might be expired."}]})),yield put(resetPasswordError({message:e}))}}catch(e){console.log(e),yield put(resetPasswordError({message:i({id:"os-auth.reset-password.internalError",defaultMessage:[{type:0,value:"Could not reset your password."}]})}))}}function*requestOAuthGrant(e){var t=yield select(appIdSelector),n=(yield select(selectApiConfigs$1))["apiRoot"];let r=yield select(sessionTokenSelector);var i=yield select(oauthRedirectUriSelector);if(r)yield put(oAuthGrantSuccess(r));else try{var o=yield call$7(login,n+`/v1/admin/oauth/authorize?response_type=token&client_id=${t}&redirect_uri=${i}&scope=all`);r=o.OAuthToken,yield put(oAuthGrantSuccess(r))}catch(e){console.log("oauth flow error",e),yield put(oAuthGrantFailure())}}function*callSdkInitCompleteCallbackOnError(){var e=yield select(initialConfigSelector),t=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(t);null!=(t=null==e?void 0:e.onComplete)&&t.call(e,n({id:"shared-redux.auth-saga.sdk-init-error-message",defaultMessage:[{type:0,value:"An error occurred during initialization."}]}))}function*watchOAuthReadiness(){for(;;){yield take([oAuthGrantReadyToStart.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(oAuthStatusSelector),t=yield select(authStatusSelector);if(t!==Status.loading&&e===Status.ready)switch(t){case Status.success:yield put(oAuthGrantSkip());break;case Status.failure:yield put(oAuthGrantStart())}}}function*watchInitAndAuthStatus(){for(var e,t,n;;){yield take([oAuthGrantSuccess.type,oAuthGrantSkip.type,oAuthGrantFailure.type,sdkInitSuccess.type,fetchUserSuccess.type,fetchUserError.type]);var r=yield select(initialConfigSelector),i=yield select(oAuthTokenSelector),o=yield select(oAuthStatusSelector),a=yield select(initStatusSelector),s=yield select(authStatusSelector),l=yield select(sessionTokenSelector),c=yield select(preferredLanguageSelector);const u=AIWareFormatMessage(c);if(s!==Status.loading)if(s===Status.success)switch(o){case Status.loading:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l),yield put(oAuthGrantSuccess(l));break;case Status.skipped:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l)}else if(a===Status.success)switch(o){case Status.skipped:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,l);break;case Status.success:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,i),s===Status.failure&&(yield put(fetchUserRequest()));break;case Status.failure:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,u({id:"shared-redux.auth-saga.oauth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]}))}}}function*authSaga(){yield all([takeLatest$1(fetchUserRequest.type,handleFetchUserSaga),takeLatest$1(updateTokenRequest.type,handleUpdateSessionToken),takeLatest$1(resetPasswordRequest.type,handleResetPasswordSaga),takeEvery$1(refreshTokenRequest.type,handleRefreshTokenSaga),takeEvery$1(extendTokenRequest.type,handleExtendTokenSaga),takeEvery$1(logoutRequest.type,handleLogoutSaga),takeEvery$1(updateUserLanguageStart.type,handleUpdateUserLanguage),takeEvery$1(oAuthGrantStart.type,requestOAuthGrant),takeEvery$1(sdkInitFailure.type,callSdkInitCompleteCallbackOnError),watchOAuthReadiness(),watchInitAndAuthStatus()])}function getAuthModule(){return{id:namespace$3$1,reducerMap:{[namespace$3$1]:authReducer},sagas:[authSaga],initialActions:[fetchUserRequest()]}}var NotificationFlag,CreateModes,TabId,AvailableWidgets,AvailablePanels,AvailableComponents,userActivityEvents={records:[{id:"ff9272fe-5e98-4ffb-96b6-5df2918d9b2b",event:"login_succeeded",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d",userName:"sys_graphql_citest_superadmin@veritone.com",organizationId:"7682",applicationId:"123",createdDateTime:"2020-10-26T06:40:12.928Z",payload:{organizationId:12333,organizationName:"name",userName:"user",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d"}}]},mockData={userActivityEvents:userActivityEvents};const fakeAPI=()=>new Promise((e,t)=>{setTimeout(()=>e({success:!0,data:mockData}),500)}),getActivityApi=()=>__awaiter$7(void 0,void 0,void 0,function*(){try{var{success:e,data:t}=yield fakeAPI();return e&&t.userActivityEvents?{data:t.userActivityEvents,success:!0}:{success:!1,data:null}}catch(e){return{success:!1,data:null,message:e}}}),getApplicationsApi=(t,n)=>__awaiter$7(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/v1/admin/current-user/applications",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},n&&{Authorization:"Bearer "+n}),credentials:"include"});return e.json()}catch(e){console.error(e)}}),getApplicationLogo=(n,r)=>__awaiter$7(void 0,void 0,void 0,function*(){var e=`query ($limit: Int $owned: Boolean) {
|
|
1063
|
+
`,variables:e,graphEndpoint:n,token:t})}catch(e){return{success:!1}}});let _authWindow=null,_authWindowListener=null,_OAuthToken=null;const _POLL_TIME=500,cleanupAuthWindow=()=>{_authWindow&&_authWindow.close&&_authWindow.close(),_authWindow=null},removeAuthWindowListener=()=>{_authWindowListener&&(window.removeEventListener("message",_authWindowListener),_authWindowListener=null)},createAuthWindowListener=(e,r,i)=>(removeAuthWindowListener(),function(e){var t=new URL(window.location.href);if(null!=(n=e.origin)&&n.startsWith(t.protocol+"//"+t.hostname)){var n=e.data;if(null!=n&&n.error)return removeAuthWindowListener(),cleanupAuthWindow(),void i(new Error("Veritone OAuth2 Error: "+n.error));null!=n&&n.OAuthToken&&(_OAuthToken=n.OAuthToken,removeAuthWindowListener(),cleanupAuthWindow(),r({OAuthToken:_OAuthToken}))}}),askOAuthServerForToken=(e,t,n)=>{setTimeout(()=>{_OAuthToken||(_authWindow&&_authWindow.postMessage("getOAuthToken","*"),_authWindow&&!_authWindow.closed?askOAuthServerForToken(e,t,n):_authWindow&&_authWindow.closed?(_authWindow=null,n(new Error("User cancelled OAuth flow"))):(removeAuthWindowListener(),cleanupAuthWindow()))},_POLL_TIME)},login=n=>__awaiter$7(void 0,void 0,void 0,function*(){if(n)return _OAuthToken&&(yield logout()),window.location.replace(n),new Promise((e,t)=>{_authWindowListener=createAuthWindowListener(n,e,t),window.addEventListener("message",_authWindowListener),askOAuthServerForToken(n,e,t)});throw new Error("Missing parameter: Need to include the backend OAuth2 URI")}),logout=()=>__awaiter$7(void 0,void 0,void 0,function*(){return new Promise(e=>{removeAuthWindowListener(),cleanupAuthWindow(),e(!(_OAuthToken=null))})}),handleImplicitRedirect=(e=window.location.hash||"",t=window.opener)=>{let n,r,i;try{n=e.match(/access_token=(.+)$/)[1].split("&")[0]}catch(e){}if(!n)try{r=e.match(/error=(.+)$/)[1].split("&")[0],i=e.match(/error_description=(.+)$/)[1].split("&")[0]}catch(e){}t.postMessage({OAuthToken:n,error:r,errorDescription:i},window.origin)};function*handleFetchUserSaga(){var e=yield select(rootApiSelector);if(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);const i=yield call$7(handleFetchUserRequest,e,n);e=yield call$7(getUserRightRequest,t,n);if(i)if(null!==i&&void 0!==i&&i.errors||e.errors)yield put(fetchUserError());else{const o=null==(t=null==(t=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:t.roles)?void 0:t.map(e=>e.appName).filter((e,t,n)=>n.indexOf(e)===t);if(o.includes("admin"))for(const a of null==(t=null==(t=null==e?void 0:e.data)?void 0:t.myRights)?void 0:t.operations)if(a.includes("superadmin")){o.push("superadmin");break}var t=null==(t=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:t.userSettings.find(e=>"preferredLanguage"===e.key),r=null==(r=null==(r=null==e?void 0:e.data)?void 0:r.me)?void 0:r.userSettings.find(e=>"recentApplications"===e.key),t=null==t?void 0:t.value,r=null==r?void 0:r.value;i.preferredLanguage=t||"en",i.recentApplications=r||"",yield put(fetchUserSuccess(Object.assign(Object.assign({},i),{roles:o,token:i.token||n,myRights:null==(r=null==(t=null==e?void 0:e.data)?void 0:t.myRights)?void 0:r.operations}))),yield put(subscribeToEventsWebsocket())}else yield put(fetchUserError())}else yield take(getConfigSuccess({}).type),yield put(fetchUserRequest())}function*logoutHelper(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector);yield call$7(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.setCallLogout,value:!0,ephemeral:!0,contentType:"json"},!0,"json",aiwareEvent,e)}function*handleRefreshTokenSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"];try{const r=yield call$7(handleRefreshTokenRequest,e,t);if(null!==r&&void 0!==r&&r.errors){var n=yield select(preferredLanguageSelector);const i=AIWareFormatMessage(n);((null===r||void 0===r?void 0:r.errors)||[]).find(e=>{return((null==(e=null==e?void 0:e.data)?void 0:e.serviceMessage)||"").includes("40")})?(yield put(setDuration(1e4)),yield put(showMessage({content:i({id:"shared-redux.refresh-token-failure.4xx",defaultMessage:[{type:0,value:"Could not refresh session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):yield put(showMessage({content:i({id:"shared-redux.refresh-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not refresh session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))}else yield put(refreshTokenSuccess(Object.assign({},r.data))),yield put(fetchUserRequest())}catch(e){console.log(e)}}function*handleExtendTokenSaga(t){t=t.payload.token;try{var n=yield select(rootApiSelector),e=yield call$7(handleExtendTokenRequest,t,n);null!=e&&e.errors||(yield put(extendTokenSuccess({token:e.token})))}catch(e){n=yield select(preferredLanguageSelector);const r=AIWareFormatMessage(n);e instanceof CustomError&&e.isAuthErr?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.4xx",defaultMessage:[{type:0,value:"Could not extend session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(t)):yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not extend session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))}}function*handleLogoutSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"],e=yield call$7(handleLogoutRequest,e,t);null!=e&&e.errors?yield put(logoutError()):yield put(logoutSuccess())}function*handleUpdateSessionToken(e){e=e.payload.token;e&&"string"==typeof e?yield put(updateTokenSuccess({token:e})):yield put(updateTokenError())}function*handleUpdateUserLanguage(e){var t=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(t);try{var r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector),o=(yield select(userSelector$2))["userId"];if(!o)return sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed, user id is required"),null),void(yield put(showMessage({content:n({id:"shared-redux.snackbar.languageSelectionError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})));var a=e.payload,s=yield call$7(updateUserSettingsApi,r,i,o,"preferredLanguage",a);sdkEventManager.dispatch(SdkEvents.languageChange,null,{preferredLanguage:s}),yield put(updateUserLanguageSuccess(s))}catch(e){sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed"),null),yield put(showMessage({content:n({id:"shared-redux.snackbar.languageSelectionChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*handleResetPasswordSaga(e){var t,n,r=yield select(preferredLanguageSelector);const i=AIWareFormatMessage(r);try{var{resetToken:o,password:a,username:s,organizationInviteId:l}=e.payload,c=yield select(rootApiSelector),u=yield call$7(handleResetPasswordApi,c,{resetToken:o,username:s,password:a,organizationInviteId:l});if(null!=u&&u.success)yield put(resetPasswordSuccess());else{let e=i({id:"os-auth.reset-password.internalServerError",defaultMessage:[{type:0,value:"An error has occurred."}]});401===u.status&&"PasswordResetTokenExpired"===(null==(t=u.result)?void 0:t.errorCode)?e=i({id:"os-auth.reset-password.expireMessageDescriptive",defaultMessage:[{type:0,value:'The password reset link you used has expired. Please click the "Forgot Password" link on the login page to generate a new link.'}]}):403===u.status?e=(null==(n=u.result)?void 0:n.message)||e:404===u.status&&(e=i({id:"os-auth.reset-password.expireMessage",defaultMessage:[{type:0,value:"An error has occurred. The reset link might be expired."}]})),yield put(resetPasswordError({message:e}))}}catch(e){console.log(e),yield put(resetPasswordError({message:i({id:"os-auth.reset-password.internalError",defaultMessage:[{type:0,value:"Could not reset your password."}]})}))}}function*requestOAuthGrant(e){var t=yield select(appIdSelector),n=(yield select(selectApiConfigs$1))["apiRoot"];let r=yield select(sessionTokenSelector);var i=yield select(oauthRedirectUriSelector);if(r)yield put(oAuthGrantSuccess(r));else try{var o=yield call$7(login,n+`/v1/admin/oauth/authorize?response_type=token&client_id=${t}&redirect_uri=${i}&scope=all`);r=o.OAuthToken,yield put(oAuthGrantSuccess(r))}catch(e){console.log("oauth flow error",e),yield put(oAuthGrantFailure())}}function*callSdkInitCompleteCallbackOnError(){var e=yield select(initialConfigSelector),t=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(t);null!=(t=null==e?void 0:e.onComplete)&&t.call(e,n({id:"shared-redux.auth-saga.sdk-init-error-message",defaultMessage:[{type:0,value:"An error occurred during initialization."}]}))}function*watchOAuthReadiness(){for(;;){yield take([oAuthGrantReadyToStart.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(oAuthStatusSelector),t=yield select(authStatusSelector);if(t!==Status.loading&&e===Status.ready)switch(t){case Status.success:yield put(oAuthGrantSkip());break;case Status.failure:yield put(oAuthGrantStart())}}}function*handleUpdateUserRecentApplications(e){var t=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(t);try{var r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector),o=(yield select(userSelector$2))["userId"],a=yield select(userRecentApplicationsSelector);if(!o)return void(yield put(showMessage({content:n({id:"shared-redux.snackbar.updateRecentApplicationsError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error})));var s=slice$2(uniq([e.payload,...a]),0,6),l=yield call$7(updateUserSettingsApi,r,i,o,"recentApplications",JSON.stringify(s));yield put(updateUserRecentApplicationsSuccess(l))}catch(e){yield put(showMessage({content:n({id:"shared-redux.snackbar.updatingRecentApplicationsChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*watchInitAndAuthStatus(){for(var e,t,n;;){yield take([oAuthGrantSuccess.type,oAuthGrantSkip.type,oAuthGrantFailure.type,sdkInitSuccess.type,fetchUserSuccess.type,fetchUserError.type]);var r=yield select(initialConfigSelector),i=yield select(oAuthTokenSelector),o=yield select(oAuthStatusSelector),a=yield select(initStatusSelector),s=yield select(authStatusSelector),l=yield select(sessionTokenSelector),c=yield select(preferredLanguageSelector);const u=AIWareFormatMessage(c);if(s!==Status.loading)if(s===Status.success)switch(o){case Status.loading:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l),yield put(oAuthGrantSuccess(l));break;case Status.skipped:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l)}else if(a===Status.success)switch(o){case Status.skipped:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,l);break;case Status.success:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,i),s===Status.failure&&(yield put(fetchUserRequest()));break;case Status.failure:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,u({id:"shared-redux.auth-saga.oauth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]}))}}}function*authSaga(){yield all([takeLatest$1(fetchUserRequest.type,handleFetchUserSaga),takeLatest$1(updateTokenRequest.type,handleUpdateSessionToken),takeLatest$1(resetPasswordRequest.type,handleResetPasswordSaga),takeEvery$1(refreshTokenRequest.type,handleRefreshTokenSaga),takeEvery$1(extendTokenRequest.type,handleExtendTokenSaga),takeEvery$1(logoutRequest.type,handleLogoutSaga),takeEvery$1(updateUserLanguageStart.type,handleUpdateUserLanguage),takeEvery$1(oAuthGrantStart.type,requestOAuthGrant),takeEvery$1(sdkInitFailure.type,callSdkInitCompleteCallbackOnError),takeEvery$1(updateUserRecentApplicationsStart.type,handleUpdateUserRecentApplications),watchOAuthReadiness(),watchInitAndAuthStatus()])}function getAuthModule(){return{id:namespace$3$1,reducerMap:{[namespace$3$1]:authReducer},sagas:[authSaga],initialActions:[fetchUserRequest()]}}var NotificationFlag,CreateModes,TabId,AvailableWidgets,AvailablePanels,AvailableComponents,userActivityEvents={records:[{id:"ff9272fe-5e98-4ffb-96b6-5df2918d9b2b",event:"login_succeeded",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d",userName:"sys_graphql_citest_superadmin@veritone.com",organizationId:"7682",applicationId:"123",createdDateTime:"2020-10-26T06:40:12.928Z",payload:{organizationId:12333,organizationName:"name",userName:"user",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d"}}]},mockData={userActivityEvents:userActivityEvents};const fakeAPI=()=>new Promise((e,t)=>{setTimeout(()=>e({success:!0,data:mockData}),500)}),getActivityApi=()=>__awaiter$7(void 0,void 0,void 0,function*(){try{var{success:e,data:t}=yield fakeAPI();return e&&t.userActivityEvents?{data:t.userActivityEvents,success:!0}:{success:!1,data:null}}catch(e){return{success:!1,data:null,message:e}}}),getApplicationsApi=(t,n)=>__awaiter$7(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/v1/admin/current-user/applications",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},n&&{Authorization:"Bearer "+n}),credentials:"include"});return e.json()}catch(e){console.error(e)}}),getApplicationLogo=(r,i)=>__awaiter$7(void 0,void 0,void 0,function*(){var e=`query ($limit: Int $owned: Boolean) {
|
|
1064
1064
|
applications (limit: $limit owned: $owned) {
|
|
1065
1065
|
records {
|
|
1066
1066
|
id
|
|
@@ -1068,7 +1068,7 @@ createScheduledJob(input:{
|
|
|
1068
1068
|
signedIconUrl
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
|
-
}`;let t=yield gqlIntrospection.queryParser(
|
|
1071
|
+
}`;let t;var n=yield gqlIntrospection.queryParser(r,i,e);t=n&&null!=n&&n.query?n.query:e;try{return yield baseGraphQLApi({query:t,graphEndpoint:r,token:i,variables:{limit:1e3,owned:!1}})}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_EVENT_PANEL="APP_CENTER_EVENT_PANEL",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$9={mailBoxIds:[],mailbox:[],status:"idle",failureMessage:""},mailboxReducer=createReducer(initialState$9,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:`
|
|
1072
1072
|
{
|
|
1073
1073
|
notificationMailboxes {
|
|
1074
1074
|
id
|
|
@@ -1271,9 +1271,9 @@ createScheduledJob(input:{
|
|
|
1271
1271
|
id
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
|
-
`,token:e,graphQLEndpoint:t})).createRootFolders}),fetchUserAppGroupsApi=(
|
|
1275
|
-
query
|
|
1276
|
-
folder(id: "${
|
|
1274
|
+
`,token:e,graphQLEndpoint:t})).createRootFolders}),fetchUserAppGroupsApi=(t,n,r)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="getUserAppGroups";return(yield baseGraphQLApiWithError({query:`
|
|
1275
|
+
query ${e} {
|
|
1276
|
+
folder(id: "${r}") {
|
|
1277
1277
|
childFolders(limit:50,offset:0) {
|
|
1278
1278
|
records {
|
|
1279
1279
|
name
|
|
@@ -1292,12 +1292,12 @@ createScheduledJob(input:{
|
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
|
-
}`,
|
|
1296
|
-
mutation
|
|
1297
|
-
|
|
1295
|
+
}`,operationName:e,token:t,graphQLEndpoint:n})).folder}),createUserGroupApi=(n,r,i,o)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="createApplicationGroup",t="createFolder";return null==(e=(yield baseGraphQLApiWithError({query:`
|
|
1296
|
+
mutation ${e} {
|
|
1297
|
+
${t}(
|
|
1298
1298
|
input : {
|
|
1299
|
-
parentId: "${
|
|
1300
|
-
name: "${
|
|
1299
|
+
parentId: "${o}",
|
|
1300
|
+
name: "${i}",
|
|
1301
1301
|
description: "",
|
|
1302
1302
|
rootFolderType: application
|
|
1303
1303
|
}
|
|
@@ -1305,66 +1305,66 @@ createScheduledJob(input:{
|
|
|
1305
1305
|
id
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
|
-
`,token:
|
|
1309
|
-
mutation
|
|
1310
|
-
|
|
1308
|
+
`,operationName:e,token:n,graphQLEndpoint:r}))[t])?void 0:e.id}),addAppToUserGroupApi=(n,r,i,o)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="addApplicationToGroup",t="fileApplication";return null==(e=(yield baseGraphQLApiWithError({query:`
|
|
1309
|
+
mutation ${e} {
|
|
1310
|
+
${t}(
|
|
1311
1311
|
input: {
|
|
1312
|
-
appId: "${
|
|
1313
|
-
folderId: "${
|
|
1312
|
+
appId: "${i}"
|
|
1313
|
+
folderId: "${o}"
|
|
1314
1314
|
}
|
|
1315
1315
|
) {
|
|
1316
1316
|
id
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
`,token:
|
|
1320
|
-
mutation
|
|
1321
|
-
|
|
1319
|
+
`,operationName:e,token:n,graphQLEndpoint:r}))[t])?void 0:e.id}),removeAppFromGroupApi=(n,r,i,o)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="removeApplicationFromGroup",t="unfileApplication";return null==(e=(yield baseGraphQLApiWithError({query:`
|
|
1320
|
+
mutation ${e} {
|
|
1321
|
+
${t}(
|
|
1322
1322
|
input: {
|
|
1323
|
-
appId: "${
|
|
1324
|
-
folderId: "${
|
|
1323
|
+
appId: "${i}"
|
|
1324
|
+
folderId: "${o}"
|
|
1325
1325
|
}
|
|
1326
1326
|
) {
|
|
1327
1327
|
id
|
|
1328
1328
|
}
|
|
1329
1329
|
}
|
|
1330
|
-
`,token:
|
|
1331
|
-
mutation
|
|
1332
|
-
|
|
1330
|
+
`,operationName:e,token:n,graphQLEndpoint:r}))[t])?void 0:e.id}),deleteAppGroupApi=(n,r,i,o)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="deleteAppGroup",t="deleteFolder";return null==(e=(yield baseGraphQLApiWithError({query:`
|
|
1331
|
+
mutation ${e} {
|
|
1332
|
+
${t}(
|
|
1333
1333
|
input: {
|
|
1334
|
-
id: "${
|
|
1335
|
-
orderIndex: ${
|
|
1334
|
+
id: "${i}"
|
|
1335
|
+
orderIndex: ${o}
|
|
1336
1336
|
}
|
|
1337
1337
|
) {
|
|
1338
1338
|
id
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
|
-
`,token:
|
|
1342
|
-
mutation
|
|
1343
|
-
|
|
1341
|
+
`,operationName:e,token:n,graphQLEndpoint:r}))[t])?void 0:e.id}),editAppGroupApi=(n,r,i,o)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="editAppGroupName",t="updateFolder";return null==(e=(yield baseGraphQLApiWithError({query:`
|
|
1342
|
+
mutation ${e} {
|
|
1343
|
+
${t}(
|
|
1344
1344
|
input: {
|
|
1345
|
-
id: "${
|
|
1346
|
-
name: "${
|
|
1345
|
+
id: "${i}"
|
|
1346
|
+
name: "${o}"
|
|
1347
1347
|
}
|
|
1348
1348
|
) {
|
|
1349
1349
|
id
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
|
-
`,token:
|
|
1353
|
-
mutation {
|
|
1354
|
-
|
|
1352
|
+
`,operationName:e,token:n,graphQLEndpoint:r}))[t])?void 0:e.id}),updateGroupPriorityApi=(n,r,i,o,a)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="updateGroupPriority",t="moveFolder";return null==(e=(yield baseGraphQLApiWithError({query:`
|
|
1353
|
+
mutation ${e} {
|
|
1354
|
+
${t} (
|
|
1355
1355
|
input : {
|
|
1356
|
-
newOrderIndex: ${
|
|
1357
|
-
newParentTreeObjectId: "${
|
|
1358
|
-
prevOrderIndex: ${
|
|
1359
|
-
prevParentTreeObjectId: "${
|
|
1356
|
+
newOrderIndex: ${i}
|
|
1357
|
+
newParentTreeObjectId: "${a.parentTreeObjectId}"
|
|
1358
|
+
prevOrderIndex: ${o}
|
|
1359
|
+
prevParentTreeObjectId: "${a.parentTreeObjectId}"
|
|
1360
1360
|
rootFolderType: application
|
|
1361
|
-
treeObjectId: "${
|
|
1361
|
+
treeObjectId: "${a.treeObjectId}"
|
|
1362
1362
|
}
|
|
1363
1363
|
) {
|
|
1364
1364
|
id
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
|
-
`,token:t,graphQLEndpoint:n})).moveFolder)?void 0:e.id}),selectUserAppGroups=e=>{return(null==(e=e[namespace$3])?void 0:e.appGroups)||[]},selectUserAppGroupsRootFolderId=e=>{return(null==(e=e[namespace$3])?void 0:e.appGroupsRootFolderId)||""},selectUserAppGroupsUiStatus=e=>{return null==(e=e[namespace$3])?void 0:e.uiStatus},selectAppGroupsEditMode=e=>{return!!((null==(e=null==(e=e[namespace$3])?void 0:e.user)?void 0:e.appGroups)||[]).find(e=>e.isEdited)};function*fetchUserGroupsSaga(){var t,n,r,i;try{var o=yield select(graphEndpointSelector),a=yield select(sessionTokenSelector);let e=yield select(selectUserAppGroupsRootFolderId);if(!e){var s=yield call$7(fetchUserAppGroupsRootFolderIdApi,a,o);if(!s||s.length<2||null==(t=s[1])||!t.id)return yield put(fetchUserAppGroupsFailed()),void console.log("Something went wrong while creating root folder for applications");e=null==(n=s[1])?void 0:n.id}var l=yield call$7(fetchUserAppGroupsApi,a,o,e);const c=(null==(i=null==(r=null==l?void 0:l.childFolders)?void 0:r.records)?void 0:i.map(e=>{var t;return{groupName:e.name,id:e.id,treeObjectId:e.treeObjectId,apps:null==(t=null==e?void 0:e.childApplications)?void 0:t.records.map(e=>e.id),priority:null==e?void 0:e.orderIndex,parentTreeObjectId:null==(t=null==e?void 0:e.parent)?void 0:t.treeObjectId,isNew:!1,expanded:!1,isEdited:!1,isExpanded:!0}}))||[];c.sort((e,t)=>(null==e?void 0:e.priority)-(null==t?void 0:t.priority)),yield put(fetchUserAppGroupsRootFolderIdSuccess(e)),yield put(fetchUserAppGroupSuccess(c))}catch(e){yield put(fetchUserAppGroupsFailed()),console.log("Something went wrong while creating root folder for applications",e)}}function*createNewAppGroupStartSaga(e){yield select(preferredLanguageSelector);try{const i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector);var t=yield select(selectUserAppGroupsRootFolderId),n=e.payload;const a=yield select(selectUserAppGroups);var r=a.find(e=>!0===e.isNew);const s=(null==r?void 0:r.apps)||[],l=yield call$7(createUserGroupApi,o,i,n,t);l&&0<s.length&&(yield all(s.map(e=>call$7(addAppToUserGroupApi,o,i,e,l)))),yield put(fetchUserAppGroupsStart())}catch(e){console.log("Something went wrong while creating application group",e),yield put(showMessage({content:"Something went wrong while creating your application group",severity:MessageSeverity.Error}))}}function*addAppToGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.destination,n=e.payload.appId;if(!validate(t)||!validate(n))return;var r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);yield call$7(addAppToUserGroupApi,i,r,n,t)}catch(e){console.log("Something went wrong while adding app to application group",e),yield put(showMessage({content:"Something went wrong while adding application to group",severity:MessageSeverity.Error}))}}function*removeAppFromGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.source,n=e.payload.appId,r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);yield call$7(removeAppFromGroupApi,i,r,n,t)}catch(e){console.log("Something went wrong while removing application from group",e),yield put(showMessage({content:"Something went wrong while removing application from group",severity:MessageSeverity.Error}))}}function*deleteAppGroupSaga(e){yield select(preferredLanguageSelector);try{const i=e.payload;var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);const o=yield select(selectUserAppGroups)||[];var r=o.find(e=>e.id===i);r&&r.treeObjectId&&(yield call$7(deleteAppGroupApi,n,t,r.treeObjectId,r.priority),yield put(fetchUserAppGroupsStart()))}catch(e){console.log("Something went wrong while deleting application group",e),yield put(showMessage({content:"Something went wrong while deleting application group",severity:MessageSeverity.Error}))}}function*editAppGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.groupId,n=e.payload.newGroupName,r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);t&&n&&(yield call$7(editAppGroupApi,i,r,t,n))}catch(e){console.log("Something went wrong while editing application group",e),yield put(showMessage({content:"Something went wrong while editing application group",severity:MessageSeverity.Error}))}}function*updateGroupPrioritySaga(e){yield select(preferredLanguageSelector);try{const a=e.payload.groupId;var t=e.payload.newPriority,n=e.payload.prevPriority;const s=yield select(selectUserAppGroups)||[];var r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector),o=s.find(e=>e.id===a);o&&void 0!==t&&void 0!==n&&(yield call$7(updateGroupPriorityApi,i,r,t,n,o))}catch(e){console.log("Something went wrong while updating application group order",e),yield put(showMessage({content:"Something went wrong while updating application group order",severity:MessageSeverity.Error}))}}function*rootSaga$1(){yield all([takeLatest$1(fetchUserAppGroupsStart.type,fetchUserGroupsSaga),takeLatest$1(createNewAppGroupStart.type,createNewAppGroupStartSaga),takeLatest$1(addAppToGroup.type,addAppToGroupSaga),takeLatest$1(removeAppFromGroup.type,removeAppFromGroupSaga),takeLatest$1(deleteAppGroup.type,deleteAppGroupSaga),takeLatest$1(editAppGroup.type,editAppGroupSaga),takeLatest$1(updateGroupPriority.type,updateGroupPrioritySaga)])}function getAppGroupModule(){return{id:"user-app-group",reducerMap:{[namespace$3]:appGroupReducer},sagas:[rootSaga$1],initialActions:[]}}const styles={title:{my:2},content:{minWidth:360,px:0,pt:3,pb:0},button:{fontSize:"12px"},actions:{px:4,pt:4,pb:2},cancelButton:{color:"black",py:2},deleteButton:{py:2}},iconMapper={CMS:img$V,Discovery:img$U,Collection:img$T,Library:img$S,Admin:img$1s,Developer:img$R};function AppIcon({id:t,icon:e,type:n,iconUrl:r,appName:i,onClick:o,appListV2:a=!1,isAppGroup:s,appGroupId:l}){a=useStyles$d({appListV2:a,type:n}).classes;const[c,u]=react.exports.useState(e||r||i&&iconMapper[i]||img$R),[d,p]=react.exports.useState(!1);const[f,h]=react.exports.useState(null);e=Boolean(f);const m=useDispatch();const g=e=>{e.stopPropagation(),h(null),p(!1)};return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:i||"",PopperProps:{disablePortal:!0}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:function(){o&&o(t)},className:classnames({[a.iconButton]:"grid"===n,[a.listItem]:"list"===n,[a.switcherGrid]:"switcherGrid"===n}),"data-test":"dt-button-app-icon","data-testid":"dt-button-app-icon",onContextMenu:s?e=>{e.preventDefault(),h(e.currentTarget)}:void 0},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.image},{children:jsxRuntime.exports.jsx("img",{alt:"app-icon",onError:function(){u(img$R)},src:c,draggable:"false",className:a.img})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:a.appName,"data-testid":"os-app-bar-panel.app-switcher.app-name"},{children:i})),jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"basic-menu",anchorEl:f,open:e,onClose:g,MenuListProps:{"aria-labelledby":"basic-button"},sx:{transform:"translate(60px, -60px)"}},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({sx:{display:"none"},onClick:e=>{e.stopPropagation(),mountPanel$1({panelId:"APPLICATION_DETAILS_PANEL",microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{applicationId:t}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}),g(e)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.application-details",defaultMessage:"Application Details",description:"Dropdown menu item that opens application details panel"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:e=>{e.stopPropagation(),h(null),p(!0)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.remove-from-group",defaultMessage:"Remove from Group",description:"Dropdown menu item that removes application from group"})}))]})),jsxRuntime.exports.jsx(Dialog$1,Object.assign({open:d,maxWidth:"xs",onClose:g,"data-testid":"os-app-bar-panel.delete-app-from-group.confirmation-dialog"},{children:jsxRuntime.exports.jsxs(DialogTitle$1,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.dialogTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirmation-title",defaultMessage:"Delete Application",description:"Delete App from Group confirmation title"})})),jsxRuntime.exports.jsxs(DialogContent$1,Object.assign({sx:styles.content},{children:[jsxRuntime.exports.jsx(DialogContentText$1,{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirmation-message",defaultMessage:"Are you sure you want to delete this application from the group?",description:"Delete Ap from Group confirmation message"})}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({sx:styles.actions},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({sx:styles.cancelButton,onClick:g,"data-testid":"app-switcher.delete-app.cancel-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.cancel-button",defaultMessage:"Cancel",description:"Delete App from Group cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained",sx:styles.deleteButton,onClick:e=>{e.stopPropagation(),m(removeAppFromGroup({source:l,appId:t.toString()})),g(e)},"data-testid":"app-switcher.delete-app.confirm-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirm-button",defaultMessage:"Yes, Delete",description:"Delete App from Group confirmation button"})}))]}))]}))]})}))]}))}))}const useStyles$c=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$c({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$b=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({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:i}){useStyles$b(),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$a=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"},airborne:{position:"absolute",background:"rgba(26, 140, 255, 0.9)",transform:"rotate(3.02deg)",color:"white","& *":{fontWeight:"900 !important"},"& img":{background:"white",borderRadius:"50%"}}})),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 AppListDnD({intl:e,selectedAppId:t,onSelectApplication:n,applications:i=[]}){const[a,r]=react.exports.useState(t),[o,s]=react.exports.useState({}),[l,c]=react.exports.useState(""),[u,d]=react.exports.useState("asc");var p=0!==i.length;function f(e){r(e),n(e)}function h(e,t){return e.name.toLowerCase()>t.name.toLowerCase()?1:e.name.toLowerCase()<t.name.toLowerCase()?-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!==a&&r(t)},[t,a]);e=translatableTextProps(e).searchLabel;const[m,g]=react.exports.useState(null);var v=Boolean(m);const y=e=>{if(e!==u){d(e);const t=Object.keys(o).reverse(),n={};t.forEach(e=>n[e]=o[e].reverse()),s(n)}g(null)},x=useStyles$a({sortOrder:u,hasApps:p,menuIsOpen:v})["classes"];p=jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"app-switcher.sort-menu",anchorEl:m,open:v,onClose:y},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>y("asc"),className:x.sortMenu},{children:"A - Z"})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>y("desc"),className:x.sortMenu},{children:"Z - A"}))]}));const b=(e,t,n,r,i,o)=>jsxRuntime.exports.jsx("div",Object.assign({},e.draggableProps,e.dragHandleProps,{ref:e.innerRef,className:t.isDragging?x.airborne:"",style:n},{children:((e,t,n)=>jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===a,onClick:f,iconUrl:t,id:e,appName:n,appListV2:!0}))(r,i,o)}));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$2,{})})}))}})})),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,onClick:e=>{i.length&&g(e.currentTarget)}},{children:jsxRuntime.exports.jsx("div",Object.assign({className:x.filterIcon},{children:jsxRuntime.exports.jsx(SortArrow,{"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(ConnectedDroppable,Object.assign({droppableId:"app-list"},{children:e=>jsxRuntime.exports.jsx("div",Object.assign({className:x.groupContainer},e.droppableProps,{ref:e.innerRef},{children:0<Object.keys(o).length&&Object.entries(o).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)=>{const{id:r=t,iconUrl:i,name:o}=e;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"os-app-bar-panel.app-switcher.app-row"},{children:[jsxRuntime.exports.jsx(PublicDraggable,Object.assign({draggableId:r.toString(),index:t},{children:(t,n)=>jsxRuntime.exports.jsx(NaturalDragAnimation,Object.assign({style:t.draggableProps.style,snapshot:n},{children:e=>b(t,n,e,r,i,o)}))}),t),jsxRuntime.exports.jsx(Divider$1,{})]}),r)})]},e):null)}))}))})]}))}var AppListDnD$1=injectIntl(AppListDnD);const useStyles$9=makeStyles()(e=>({root:{height:"calc(100vh - 64px - 55px - 5px)",overflowY:"scroll",borderRight:"15px solid #F9F9F9",boxShadow:"0px 1px 1px #809cb7","&::-webkit-scrollbar":{display:"none"}},appTile:{overflow:"hidden"},title:{fontWeight:700,padding:"15px 15px 0 15px"},groupTitle:{fontWeight:700,padding:"15px"},helperText:{paddingLeft:"15px",fontSize:"12px",fontWeight:"bold"},noApps:{textAlign:"center",marginTop:"30px","& svg":{width:"160px",height:"160px",marginBottom:"20px"},marginBottom:"20px"},appGroup:{borderTop:"1px solid #D5DFE9"},currentLanding:{position:"relative",minHeight:"155px !important"},idleLanding:{minHeight:"10px"},runway:{minHeight:"110px",position:"absolute",background:"rgba(255, 255, 255, 0.8)",width:"94%",height:"100%",border:"1px dashed #CAD7E3",borderRadius:"4px",display:"flex",textAlign:"center",flexDirection:"column",justifyContent:"center"},landingText:{fontSize:"16px !important",fontWeight:"600 !important",color:"rgba(124, 132, 141, 1)"},airborneGroup:{height:"50px !important",background:"rgba(26, 140, 255, 0.9)",color:"white","& div":{display:"none"}},groupHandler:{display:"flex",justifyContent:"space-between","&:hover":{background:"rgba(242, 242, 242, 0.5)"}}})),useStyles$8=makeStyles()(()=>({root:{padding:"15px"},groupNameInput:{height:"36px","& input":{width:"100% !important",height:"36px",padding:"0 0 0 15px",color:"rgba(92, 98, 105, 1)",borderRadius:"4px",border:"none"},marginBottom:"10px",width:"100% !important",background:"#F5FDFF"},notInterested:{height:"18px","& svg":{height:"18px",cursor:"pointer"}},confirm:{height:"20px",cursor:"pointer"},newGroupApps:{marginBottom:"20px",display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center",height:"101px",background:"#FAFAFA",borderRadius:"4px"},landingText:{color:"rgba(156, 168, 180, 1)"},relativeContainer:{position:"relative"},fullWidthRunway:{top:0,width:"100%"}})),AppGroupPlaceholder=({apps:n,classes:r})=>{useSelector(preferredLanguageSelector);const i=useStyles$8()["classes"],e=useDispatch(),[t,o]=react.exports.useState("");return jsxRuntime.exports.jsxs("div",Object.assign({className:i.root},{children:[jsxRuntime.exports.jsx(TextField$1,{value:t,onChange:e=>{o(e.target.value)},"data-testid":"os-app-bar.new-app-group.name-input",className:i.groupNameInput,InputProps:{endAdornment:jsxRuntime.exports.jsxs(InputAdornment$1,Object.assign({position:"end"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:i.confirm,onClick:()=>{t?e(createNewAppGroupStart(t)):e(showMessage({content:"Please provide a name for your new App group",severity:MessageSeverity.Error}))}},{children:jsxRuntime.exports.jsx(Checkmark,{})})),jsxRuntime.exports.jsx("div",Object.assign({className:i.notInterested,onClick:()=>{e(removeNewAppGroupPlaceholder())}},{children:jsxRuntime.exports.jsx(NotInterested,{})}))]}))}}),jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"new-group-placeholder"},{children:(e,t)=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:i.relativeContainer,style:{width:"100%"}},{children:[n.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{position:"relative",marginBottom:"15px"}},{children:n.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,sx:{padding:0,overflow:"hidden"},"data-testid":"app-switcher.new-app-group.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:!1,onClick:()=>{},iconUrl:t,id:e,appName:n,appListV2:!0})}),e)})})):jsxRuntime.exports.jsx("div",Object.assign({className:i.newGroupApps},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.landingText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.new-app-group.apps-landing",defaultMessage:"Drag Applications Here",description:"helper text to tell users where to drag apps for the new app group"})}))})),t.isDraggingOver&&n.length?jsxRuntime.exports.jsx(Runway,{classes:r,rootClassName:i.fullWidthRunway}):null]}))}))]}))},GroupDraggingPlaceholder=({isDragging:e,className:t,groupName:n,dragHandleProps:r})=>e?jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:t},r,{children:n})):null,useStyles$7=makeStyles()(()=>({root:{padding:"15px"},groupNameInput:{height:"36px","& input":{width:"100% !important",height:"36px",padding:"0 0 0 15px",color:"rgba(92, 98, 105, 1)",borderRadius:"4px",border:"none"},marginBottom:"10px",width:"100% !important",background:"#F5FDFF"},notInterested:{height:"18px",cursor:"pointer"},confirm:{cursor:"pointer"},groupHandler:{display:"flex",justifyContent:"space-between",alignItems:"center","&:hover":{background:"rgba(242, 242, 242, 0.5)"}},invisibleHandler:{display:"none"},groupTitle:{fontWeight:700,padding:"15px"},handlerMenu:{height:"40px",width:"40px",marginRight:"10px"}})),GroupHandler=({dragHandleProps:e,groupName:t,groupId:n,isExpanded:r=!0})=>{const i=useSelector(selectAppGroupsEditMode),o=useDispatch(),[a,s]=react.exports.useState(!1),[l,c]=react.exports.useState(""),[u,d]=react.exports.useState(null);var p=Boolean(u);const f=()=>{d(null)};var h=useStyles$7()["classes"];react.exports.useEffect(()=>{c(t)},[]);const m=()=>{o(editAppGroup({edit:!0,groupId:n})),s(!0)};return jsxRuntime.exports.jsx("div",Object.assign({className:a?h.root:h.groupHandler},{children:a?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(TextField$1,{value:l,onChange:e=>{c(e.target.value)},"data-testid":"os-app-bar.new-app-group.name-input",className:h.groupNameInput,InputProps:{endAdornment:jsxRuntime.exports.jsxs(InputAdornment$1,Object.assign({position:"end"},{children:[jsxRuntime.exports.jsx(Checkmark,{className:h.confirm,onClick:()=>{f(),o(editAppGroup({edit:!1,groupId:n,newGroupName:l})),s(!1)}}),jsxRuntime.exports.jsx(NotInterested,{className:h.notInterested,onClick:()=>{f(),o(editAppGroup({edit:!1,groupId:n})),s(!1)}})]}))}}),jsxRuntime.exports.jsx("div",Object.assign({},e))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:h.groupTitle},e,{onClick:e=>{2!==e.detail||i||m()}},{children:t})),jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:e=>{e.preventDefault(),d(e.currentTarget)},size:"small",className:h.handlerMenu},{children:jsxRuntime.exports.jsx(MoreHor,{fontSize:"small"})})),jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"basic-menu",anchorEl:u,open:p,onClose:f,MenuListProps:{"aria-labelledby":"basic-button"},sx:{transform:"translate(-95px, 0)"}},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>{f(),setTimeout(()=>{o(expandCollapse(n))},100)}},{children:r?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.hide",defaultMessage:"Hide Group",description:"Hide Group dropdown menu item"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.expand",defaultMessage:"Expand",description:"Expand dropdown menu item"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:m},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.rename",defaultMessage:"Rename",description:"Rename dropdown menu item"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>{o(deleteAppGroup(n))}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.delete",defaultMessage:"Delete",description:"Delete dropdown menu item"})}))]}))]})}))},GroupApps=({groupApps:e,appGroup:r,classes:i,snapshot:t,handleSelectApplication:o,currentSelected:a})=>jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px"}},{children:[t.isDraggingOver?jsxRuntime.exports.jsx(Runway,{classes:i}):null,e.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,className:i.appTile,sx:{padding:0},"data-testid":"app-switcher.app-group.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:e===a,onClick:o,iconUrl:t,id:e,appName:n,appListV2:!0,isAppGroup:!0,appGroupId:r.id})}),e)})]})),LoadingSkeleton=()=>jsxRuntime.exports.jsx(react.exports.Fragment,{children:[1,2].map(e=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:345,height:50}),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px"}},{children:[1,2,3].map(e=>jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,sx:{padding:0}},{children:jsxRuntime.exports.jsxs(Stack$4,Object.assign({sx:{justifyContent:"center",alignItems:"center",padding:"20px 0px"}},{children:[jsxRuntime.exports.jsx(Skeleton$1,{sx:{m:2},variant:"circular",width:40,height:40}),jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",sx:{fontSize:"10px"},width:30})]}))}),e))}),e)]}))}),Runway=({classes:e,rootClassName:t})=>jsxRuntime.exports.jsx("div",Object.assign({className:e.runway+" "+t},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.landingText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.app-landing",defaultMessage:"Drop Application Here",description:"Helper text to tell users where apps should be dropped"})}))})),RecentAppsDnD=({apps:e=[],allApps:t,onSelectApplication:n,selectedAppId:r})=>{const i=useStyles$9()["classes"],[o,a]=react.exports.useState(r),s=useDispatch();function l(e){a(e),n(e)}const c=useSelector(selectUserAppGroupsUiStatus),u=useSelector(selectUserAppGroups);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:l,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"})}))]})),c===Status.loading?jsxRuntime.exports.jsx(LoadingSkeleton,{}):c===Status.failure?jsxRuntime.exports.jsx(ErrorState$1,{onRetry:()=>s(fetchUserAppGroupsStart()),errorMessage:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-groups.error-message",defaultMessage:"Something went wrong while loading your application groups.",description:"application groups error state"})}):c===Status.success&&u.length?jsxRuntime.exports.jsx(AppGroups,{apps:e,allApps:t,userAppGroups:u,handleSelectApplication:l,currentSelected:o}):null]}))},AppGroups=({userAppGroups:t,allApps:n,apps:o,handleSelectApplication:a,currentSelected:s})=>{const l=useStyles$9()["classes"];return jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"group-list",direction:"vertical",type:"group-list"},{children:e=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{children:[t.map((r,e)=>{const i=[];return r.apps.forEach(t=>{var e=[...n,...o].find(e=>e.id===t);e&&i.push(e)}),r.isNew?jsxRuntime.exports.jsx(AppGroupPlaceholder,{apps:i,classes:l},r.id):jsxRuntime.exports.jsx(PublicDraggable,Object.assign({draggableId:r.id,index:e},{children:(n,e)=>jsxRuntime.exports.jsxs("div",Object.assign({className:e.isDragging?l.airborneGroup:l.appGroup,ref:n.innerRef},n.draggableProps,{children:[jsxRuntime.exports.jsx(GroupDraggingPlaceholder,{isDragging:e.isDragging,className:l.groupTitle,dragHandleProps:n.dragHandleProps,groupName:r.groupName}),jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:r.id},{children:(e,t)=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:t.isDraggingOver?l.currentLanding:l.idleLanding},{children:[jsxRuntime.exports.jsx(GroupHandler,{groupName:r.groupName,dragHandleProps:n.dragHandleProps,groupId:r.id,isExpanded:r.isExpanded}),t.isDraggingOver&&!i.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px",minHeight:"110px"}},{children:jsxRuntime.exports.jsx(Runway,{classes:l})})):null,jsxRuntime.exports.jsx(Collapse$1,Object.assign({in:(r.isExpanded||void 0===r.isExpanded)&&0<i.length,timeout:"auto",unmountOnExit:!0},{children:jsxRuntime.exports.jsx(GroupApps,{groupApps:i,classes:l,snapshot:t,handleSelectApplication:a,currentSelected:s,appGroup:r})}))]}))}))]}),r.id)}),r.id)}),e.placeholder]}))}))};function ApplicationPanelDnD({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:i}){var o=useStyles$b()["classes"],a=useSelector(preferredLanguageSelector);const s=useSelector(selectUserAppGroups)||[],l=AIWareFormatMessage(a),c=useDispatch(),[u,d]=react.exports.useState(0===n.length?0:n.length<4?1:2),[p,f]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;d(e)},[n]),react.exports.useState(e));function h(e){f(e),null!=t&&t(e),null!=i&&i(e)}react.exports.useEffect(()=>{e!==p&&f(e)},[e,p]);react.exports.useEffect(()=>{c(fetchUserAppGroupsStart())},[c]);return jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getAppGroupModule()]},{children:jsxRuntime.exports.jsx(DragDropContext,Object.assign({onDragEnd:e=>{const{destination:t,draggableId:n,type:r}=e;if("group-list"===r){e=s.find(e=>e.id===n);e&&c(updateGroupPriority({groupId:n,newPriority:t.index,prevPriority:e.priority}))}else{const i=s.find(e=>e.id===t.droppableId);((null===i||void 0===i?void 0:i.apps)||[]).find(e=>e===n)?c(showMessage({content:"This application has already been added to the group",severity:MessageSeverity.Error})):c(addAppToGroup({destination:t.droppableId,appId:n}))}}},{children: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(RecentAppsDnD,{apps:n,allApps:r,onSelectApplication:h,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(AppListDnD$1,{title:l({id:"os-app-bar-panel.name.moreApps",defaultMessage:[{type:0,value:"More Applications"}]}),type:"More",applications:r,onSelectApplication:h,selectedAppId:null,row:u})}))}))]}))}))}))}))}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$1,{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)},v=()=>{i(!1)};const y=()=>{e(getOpenIdConnectors())},x=(useInterval(()=>{e(getOpenIdConnectors())},o),e=>{l(e);e=window.open(e.loginUrl);u(e),a(2e3)}),b=react.exports.useCallback(t=>f.some(e=>e.connectId===t),[f]);react.exports.useEffect(()=>{""!==s.connectId&&null!==o&&b(s.connectId)&&(a(null),null!==c&&void 0!==c&&c.close(),i(!0))},[b,e]);return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:h.accountLinkingLabel,"data-test":"account-linking-label"},{children:SHARED_TEXT.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:y}):0===p.length?jsxRuntime.exports.jsx(NullState,{}):jsxRuntime.exports.jsx(OpenIdConnectors,{openIdItems:p,onOpenUnlinkModal:m,onClickOpenIdUrl:x,isOpenIdConnected:b}),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:t,maxWidth:"xs",onClose:g,"aria-labelledby":"unlink-dialog-title","aria-describedby":"unlink-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"unlink-dialog-title","data-test":"account-linking-unlink-dialog-title",className:h.dialogTitle},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT.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:v,"aria-labelledby":"success-dialog-title","aria-describedby":"success-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"success-dialog-title",className:h.dialogTitle,"data-test":"account-linking-success-dialog-title"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT.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:v,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$g=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$g()["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:""}),[v,y]=react.exports.useState({firstName:"",lastName:"",phoneNumber:""}),[x,b]=react.exports.useState(!1),[C,$]=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})),y(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:C,sortName:""+((null==(c=m.firstName)?void 0:c.substr(0,1))||"")+((null==(c=m.lastName)?void 0:c.substr(0,1))||""),onEditAvatarClick:()=>{var e={name:"EDIT_PROFILE_PICTURE",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",onClose: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:()=>{_(!1),S(!1),b(!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:""!==v.firstName,helperText:v.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:""!==v.lastName,helperText:v.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:""!==v.phoneNumber,helperText:v.phoneNumber,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}})]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{e&&O(e),b(!1)},color:"primary",id:"button-cancel-edit",className:classnames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qpPFGp",defaultMessage:"Cancel",description:"label of cancel button on profile panel"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){(()=>{let e=!0;return m.firstName||(y(Object.assign(Object.assign({},v),{firstName:"This field is required."})),e=!1),m.lastName||(y(Object.assign(Object.assign({},v),{lastName:"This field is required."})),e=!1),m.phoneNumber&&!/^\+?(\d){6,}$/.test(m.phoneNumber.toLowerCase())&&(y(Object.assign(Object.assign({},v),{phoneNumber:"Invalid phone number."})),e=!1),e})()&&(i(m),b(!1))},"data-test":"button-save-edit","data-testid":"button-save-edit",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.C1oyBr",defaultMessage:"Save",description:"label of save button on profile panel"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.a5aLpI",defaultMessage:"Name",description:"label of name field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-name",variant:"body1",className:d.valueItem},{children:`${(null===m||void 0===m?void 0:m.firstName)||""} `+((null===m||void 0===m?void 0:m.lastName)||"")}))]})),(null===m||void 0===m?void 0:m.phoneNumber)&&jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.73xPqY",defaultMessage:"Phone",description:"label of phone field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-phone",variant:"body1",className:d.valueItem},{children:null===m||void 0===m?void 0:m.phoneNumber}))]}))]}),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.zieKdP",defaultMessage:"Email",description:"label of email field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-email",variant:"body1",className:classnames(d.valueItem,d.disabledText)},{children:null==e?void 0:e.email}))]})),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:()=>{_(!1),S(!0),b(!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")]}))})]})]})),T?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.resetBiometric},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.+DTt+G",defaultMessage:"Biometric Reset",description:"label of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.nzzfrY",defaultMessage:"Your Biometric Profile will be reset.",description:"description of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{_(!1)},"data-test":"button-cancel-reset-biometric",color:"primary",className:classnames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{_(!1),t()},color:"primary",variant:"contained","data-test":"button-reset-biometric",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):!w&&s&&jsxRuntime.exports.jsx("div",Object.assign({id:"click-reset-biometric",onClick:()=>{_(!0),S(!1),b(!1)}},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.reset},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.OlJtmF",defaultMessage:"Reset Biometric Profile",description:"label of Reset Biometric Profile on profile panel"})}))}))]})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value: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,v]=react.exports.useState("");var y=useStyles$b()["classes"],m=(react.exports.useEffect(()=>{v(h.loading)},[h]),gqlIntrospection.isOperationValid("fileApplication","mutation")&&m);return jsxRuntime.exports.jsxs("div",Object.assign({className:y.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(ApplicationPanelDnD,{recentApplist:c,applications:u,onClickApp:d}):jsxRuntime.exports.jsx(ApplicationPanel,{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$5="activities",allActivitySeletor=e=>{return(null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$5])||[]},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$5}/get activity`,GET_ACTIVITY_SUCCESS=`os-app-bar-panel/${namespace$5}/get activity success`,UPDATE_ACTIVITY_FILTER=`os-app-bar-panel/${namespace$5}/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$4]:userReducer$1,[namespace$5]: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$2(uniq([e,...r]),0,6),localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:r})))):localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:[e]}))),yield select(switchApiSelector));window.open(r+"/"+e)}function*applicationSaga(){yield all([takeEvery$1(HANDLE_CLICK_APP,handleClickAppSaga),takeLatest$1(REQUEST_GET_APPLICATION_V1,getApplicationsSaga)])}function delay(t=1e3){return __awaiter$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$2(){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$2],initialActions:[getActivity(),getCurrentUser$1(),requestGetApplications()],retained:!0}}const initialState$5={openIdConnectors:[],connectedOpenIds:[],message:"",status:LoadingStatus.Idle};function openIdConReducer(e,t){if(void 0===e)return initialState$5;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$1())},handleUpdateProfile:function(e){t(updateProfile(e))},organizationRole:get$3(r,"organizationRole",{}),recentApp:u,applications:n,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=interopRequireDefault.exports,default_1=(Object.defineProperty(Close,"__esModule",{value:!0}),Close.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.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=Close.default=_default,dt=Object.create,Ie=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,ft=Object.getOwnPropertyNames,ht=Object.getPrototypeOf,vt=Object.prototype.hasOwnProperty,Tt=e=>Ie(e,"__esModule",{value:!0}),It=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Et=(t,n,r)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let e of ft(n))vt.call(t,e)||"default"===e||Ie(t,e,{get:()=>n[e],enumerable:!(r=pt(n,e))||r.enumerable});return t},bt=e=>Et(Tt(Ie(null!=e?dt(ht(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Be=It((e,t)=>{var n,r;r=function(e){function t(e){var t=o.get(e),n=void 0===t?e.size:t<1073741824?t+1:0;if(!e.has(n))return i(e,n);if(e.size<536870912){for(;e.has(n);)n=Math.floor(1073741824*Math.random());return i(e,n)}if(e.size>s)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(n);)n=Math.floor(Math.random()*s);return i(e,n)}function n(e){var t=r(e);return e.add(t),t}var r,i,o,a,s=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,l=new WeakMap;i=function(e,t){return a.set(e,t),t},o=a=l,r=t;e.addUniqueNumber=n,e.generateUniqueNumber=t,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof(n=e)&&void 0!==t?r(e):"function"==typeof define&&define.amd?define(["exports"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self).fastUniqueNumbers={})}),w=(bt(Be()),"object"==("undefined"==typeof window?"undefined":typeof window)),T={setTimeout:w?setTimeout.bind(window):setTimeout,clearTimeout:w?clearTimeout.bind(window):clearTimeout,setInterval:w?setInterval.bind(window):setInterval,clearInterval:w?clearInterval.bind(window):clearInterval};function $e(e){T.setTimeout=e.setTimeout,T.clearTimeout=e.clearTimeout,T.setInterval=e.setInterval,T.clearInterval=e.clearInterval}var l,Y={},Ke=class{constructor(e){this.closed=!1,this.mc=new MessageChannel,this.name=e,Y[e]=Y[e]||[],Y[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){e.storageArea===window.localStorage&&e.key.substring(0,this.name.length)===this.name&&null!==e.newValue&&(e=JSON.parse(e.newValue),this.mc.port2.postMessage(e))}postMessage(e){if(this.closed)throw new Error("InvalidStateError");let t=JSON.stringify(e),n=this.name+":"+String(Date.now())+String(Math.random());window.localStorage.setItem(n,t),T.setTimeout(()=>{window.localStorage.removeItem(n)},500),Y[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){var e;this.closed||(this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage),e=Y[this.name].indexOf(this),Y[this.name].splice(e,1))}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},Qe="undefined"==typeof window?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:Ke;function Ze(t=0){return new Promise(e=>T.setTimeout(e,t))}function le(){return Math.random().toString(36).substring(2)}!function(e){e[e.APPLY=0]="APPLY",e[e.TELL=1]="TELL",e[e.CLOSE=2]="CLOSE",e[e.REGISTER=3]="REGISTER",e[e.DEREGISTER=4]="DEREGISTER",e[e.IDLE=5]="IDLE",e[e.ACTIVE=6]="ACTIVE",e[e.PROMPT=7]="PROMPT",e[e.START=8]="START",e[e.RESET=9]="RESET",e[e.ACTIVATE=10]="ACTIVATE",e[e.PAUSE=11]="PAUSE",e[e.RESUME=12]="RESUME",e[e.MESSAGE=13]="MESSAGE"}(l=l||{});var k,Ee=class{constructor(e,t){this.token=le(),this.isLeader=!1,this.isDead=!1,this.isApplying=!1,this.reApply=!1,this.intervals=[],this.listeners=[],this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return!(this.reApply=!0);let n=!(this.isApplying=!0),e=e=>{var{token:e,action:t}=e.data;e!==this.token&&(t===l.APPLY&&e>this.token&&(n=!0),t===l.TELL&&(n=!0))};this.channel.addEventListener("message",e);try{return this.sendAction(l.APPLY),await Ze(this.options.responseTime),this.channel.removeEventListener("message",e),this.isApplying=!1,n?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let i=!1,o=null;return new Promise(t=>{let n=()=>{var e;i||(i=!0,T.clearInterval(o),e=this.intervals.indexOf(o),this.intervals.splice(e,1),this.channel.removeEventListener("message",r),t())},r=(o=T.setInterval(()=>{this.apply().then(()=>{this.isLeader&&n()})},this.options.fallbackInterval),this.intervals.push(o),e=>{e=e.data.action;e===l.CLOSE&&this.apply().then(()=>{this.isLeader&&n()})});this.channel.addEventListener("message",r)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;var e=e=>{e=e.data.action;e===l.APPLY&&this.sendAction(l.TELL)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(l.TELL)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership(),this.deferred)}close(){this.isDead||(this.isDead=!0,this.isLeader=!1,this.sendAction(l.CLOSE),this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>T.clearInterval(e)))}},be=(!function(e){e[e.PROMPTED=0]="PROMPTED",e[e.ACTIVE=1]="ACTIVE",e[e.IDLE=2]="IDLE"}(k=k||{}),class{constructor(e){this.token=le(),this.registry=new Map,this.allIdle=!1;var t=e["channelName"];this.options=e,this.channel=new Qe(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new Ee(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{var{action:e,token:t,data:n}=e.data;switch(e){case l.REGISTER:this.registry.set(t,2);break;case l.DEREGISTER:this.registry.delete(t);break;case l.IDLE:this.idle(t);break;case l.ACTIVE:this.active(t);break;case l.PROMPT:this.prompt(t);break;case l.START:this.start(t);break;case l.RESET:this.reset(t);break;case l.ACTIVATE:this.activate(t);break;case l.PAUSE:this.pause(t);break;case l.RESUME:this.resume(t);break;case l.MESSAGE:this.options.onMessage(n)}}),this.send(l.REGISTER)}get isLeader(){if(this.elector)return this.elector.isLeader;throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.')}prompt(e=this.token){this.registry.set(e,0);var t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(l.PROMPT),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);var t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(l.IDLE),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);var t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(l.ACTIVE),t&&this.options.onActive()}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.START):this.options.start(!0)}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.RESET):this.options.reset(!0)}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.ACTIVATE):this.options.activate(!0)}pause(e=this.token){e===this.token?this.send(l.PAUSE):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(l.RESUME):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:l.MESSAGE,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(l.DEREGISTER),this.channel.close()}}),et=w?document:null,ge=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"];function C(e){let t=react.exports.useRef(e);return react.exports.useEffect(()=>{t.current=e},[e]),t}function tt(t,n){let r;function e(...e){r&&clearTimeout(r),r=setTimeout(()=>{t(...e),r=null},n)}return e.cancel=function(){clearTimeout(r)},e}function ue(n,r){let i=0;return function(...e){var t=(new Date).getTime();if(!(t-i<r))return i=t,n(...e)}}var E=()=>(w?performance:Date).now();function $$3({timeout:e=12e5,promptTimeout:H=0,element:t=et,events:n=ge,timers:F=void 0,immediateEvents:r=[],onPrompt:B=()=>{},onIdle:U=()=>{},onActive:Z=()=>{},onAction:W=()=>{},onMessage:z=()=>{},debounce:i=0,throttle:o=0,eventsThrottle:a=200,startOnMount:s=!0,startManually:l=!1,stopOnIdle:G=!1,crossTab:c=!1,name:q="idle-timer",syncTimers:u=0,leaderElection:K=!1}={}){let d=react.exports.useRef(E()),Y=react.exports.useRef(Date.now()),p=react.exports.useRef(E()),f=react.exports.useRef(null),h=react.exports.useRef(null),Q=react.exports.useRef(null),m=react.exports.useRef(0),g=react.exports.useRef(!0),v=react.exports.useRef(!1),y=react.exports.useRef(!0),x=react.exports.useRef(!1),b=react.exports.useRef(!1),$=react.exports.useRef(0),S=react.exports.useRef(0),_=react.exports.useRef(null),j=react.exports.useRef(null),I=C(e),R=C(H),X=C(G),J=react.exports.useRef(r),O=react.exports.useRef(t),L=react.exports.useRef([...new Set([...n,...r]).values()]),ee=C(U),te=C(Z),ne=C(B),M=C(z),re=C(W),A=react.exports.useMemo(()=>{var e=e=>re.current(e);return 0<i?tt(e,i):0<o?ue(e,o):e},[o,i]),ie=react.exports.useRef(),k=(react.exports.useEffect(()=>{c&&u&&(ie.current=ue(()=>{j.current.active()},u))},[c,u]),()=>{null!==_.current&&(T.clearTimeout(_.current),_.current=null)}),N=(e,t=!0)=>{k(),_.current=T.setTimeout(le,e||I.current),t&&(h.current=E()),Q.current=Date.now()},oe=e=>{$.current=0,S.current=E(),b.current=!0,N(R.current,!1),ne.current(e)},ae=()=>{k(),g.current=!0,f.current=E(),X.current?D():b.current&&(S.current=0,b.current=!1),ee.current()},se=e=>{k(),b.current=!1,S.current=0,g.current=!1,m.current+=E()-f.current,P(),N(),te.current(e)},le=e=>{if(!g.current)return A.cancel&&A.cancel(),0<R.current&&!b.current?void(j.current?j.current.prompt():oe(e)):void(j.current?j.current.idle():ae());j.current?j.current.active():se(e)},ce=e=>{var t;A(e),b.current||(k(),!g.current&&J.current.includes(e.type)||!g.current&&Date.now()-Q.current>=I.current?le(e):(t=E()-h.current,g.current&&!G||!g.current&&t>=I.current?le(e):(v.current=!1,$.current=0,S.current=0,N(),c&&u&&ie.current())))},de=react.exports.useRef(),P=(react.exports.useEffect(()=>{var e=x.current;e&&D(),de.current=0<a?ue(ce,a):ce,e&&P()},[a,o,i,re,c,u]),()=>{w&&!x.current&&(L.current.forEach(e=>{O.current.addEventListener(e,de.current,{capture:!0,passive:!0})}),x.current=!0)}),D=(e=!1)=>{w&&(x.current||e)&&(L.current.forEach(e=>{O.current.removeEventListener(e,de.current,{capture:!0})}),x.current=!1)},V=react.exports.useCallback(e=>{k(),P(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,j.current&&!e&&j.current.start(),N()},[_,g,I,j]),pe=react.exports.useCallback(e=>{k(),P(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,d.current=E(),p.current=E(),j.current&&!e&&j.current.reset(),l||N()},[_,g,I,l,j]),fe=react.exports.useCallback(e=>{k(),P(),(g.current||b.current)&&se(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,p.current=E(),j.current&&!e&&j.current.activate(),N()},[_,g,I,j]),he=react.exports.useCallback((e=!1)=>!v.current&&($.current=Se(),v.current=!0,D(),k(),j.current&&!e&&j.current.pause(),!0),[_,j]),me=react.exports.useCallback((e=!1)=>!!v.current&&(v.current=!1,b.current||P(),g.current||N($.current),S.current&&(S.current=E()),j.current&&!e&&j.current.resume(),!0),[_,I,$,j]),ve=react.exports.useCallback((e,t)=>{j.current?(t&&M.current(e),j.current.message(e)):t&&M.current(e)},[z]),ye=react.exports.useCallback(()=>g.current,[g]),xe=react.exports.useCallback(()=>b.current,[b]),Ce=react.exports.useCallback(()=>{if(j.current)return j.current.isLeader;throw new Error('❌ Cross Tab feature is not enabled. To enable it set the "crossTab" property to true.')},[j]),we=react.exports.useCallback(()=>{if(j.current)return j.current.token;throw new Error('❌ Cross Tab feature is not enabled. To enable it set the "crossTab" property to true.')},[j]),Se=react.exports.useCallback(()=>{if(v.current)return $.current;var e=$.current||R.current+I.current,t=h.current?E()-h.current:0,e=Math.floor(e-t);return e<0?0:Math.abs(e)},[I,R,b,$,h]),Te=react.exports.useCallback(()=>Math.round(E()-p.current),[p]),_e=react.exports.useCallback(()=>Math.round(E()-d.current),[d]),Ee=react.exports.useCallback(()=>f.current?new Date(Y.current-d.current+f.current):null,[f]),je=react.exports.useCallback(()=>h.current?new Date(Y.current-d.current+h.current):null,[h]),Ie=react.exports.useCallback(()=>g.current?Math.round(E()-f.current+m.current):Math.round(m.current),[f,m]),Re=react.exports.useCallback(()=>{var e=Math.round(_e()-Ie());return 0<=e?e:0},[d,f,m]);return react.exports.useEffect(()=>{if(0<i&&0<o)throw new Error("❌ onAction can either be throttled or debounced, not both.");F&&$e(F);let e=()=>{j.current&&j.current.close(),A.cancel&&A.cancel(),k(),D(!0)};return w&&window.addEventListener("beforeunload",e),()=>{w&&window.removeEventListener("beforeunload",e),j.current&&j.current.close(),A.cancel&&A.cancel(),k(),D(!0)}},[]),react.exports.useEffect(()=>{j.current&&j.current.close(),j.current=c?new be({channelName:q,leaderElection:K,onPrompt:()=>{oe()},onIdle:()=>{ae()},onActive:()=>{se()},onMessage:M.current,start:V,reset:pe,activate:fe,pause:he,resume:me}):null},[c,q,K,ne,ee,te,M,V,pe,he,me]),react.exports.useEffect(()=>{k(),D(!0),y.current||(v.current=!0,g.current=!0,$.current=0),l||(s?V:P)()},[l,s,y]),react.exports.useEffect(()=>{var e;y.current||(e=[...new Set([...n,...r]).values()],D(),L.current=e,O.current=t,J.current=r,l||(s?V:P)())},[t,JSON.stringify(n),JSON.stringify(r),y,l,s]),react.exports.useEffect(()=>{y.current?y.current=!1:(I.current=e,l||(g.current&&(te.current(),j.current&&j.current.active()),V()))},[e,j,l,y,g]),{message:ve,start:V,reset:pe,activate:fe,pause:he,resume:me,isIdle:ye,isPrompted:xe,isLeader:Ce,getTabId:we,getRemainingTime:Se,getElapsedTime:Te,getTotalElapsedTime:_e,getLastIdleTime:Ee,getLastActiveTime:je,getTotalIdleTime:Ie,getTotalActiveTime:Re}}var WidgetsStatus,ce=react.exports.createContext(null),tinycolor$1=(ce.Consumer,{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:b(t[4]),format:n?"name":"hex8"};if(t=k.hex6.exec(e))return{r:g(t[1]),g:g(t[2]),b:g(t[3]),format:n?"name":"hex"};if(t=k.hex4.exec(e))return{r:g(t[1]+""+t[1]),g:g(t[2]+""+t[2]),b:g(t[3]+""+t[3]),a:b(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=k.hex3.exec(e))return{r:g(t[1]+""+t[1]),g:g(t[2]+""+t[2]),b:g(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(C(e.r)&&C(e.g)&&C(e.b)?(t=function(e,t,n){return{r:255*h(e,255),g:255*h(t,255),b:255*h(n,255)}}(e.r,e.g,e.b),a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):C(e.h)&&C(e.s)&&C(e.v)?(r=y(e.s),i=y(e.v),t=function(e,t,n){e=6*h(e,360),t=h(t,100),n=h(n,100);var r=$.floor(e),e=e-r,i=n*(1-t),o=n*(1-e*t),e=n*(1-(1-e)*t),t=r%6;return{r:255*[n,o,i,i,e,n][t],g:255*[e,n,n,o,i,i][t],b:255*[i,i,e,n,n,o][t]}}(e.h,r,i),a=!0,s="hsv"):C(e.h)&&C(e.s)&&C(e.l)&&(r=y(e.s),o=y(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=_(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=_(this._r)),this._g<1&&(this._g=_(this._g)),this._b<1&&(this._b=_(this._b)),this._ok=n.ok,this._tc_id=T++}function r(e,t,n){e=h(e,255),t=h(t,255),n=h(n,255);var r,i=j(e,t,n),o=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=[v(_(e).toString(16)),v(_(t).toString(16)),v(_(n).toString(16))];return r&&e[0].charAt(0)==e[0].charAt(1)&&e[1].charAt(0)==e[1].charAt(1)&&e[2].charAt(0)==e[2].charAt(1)?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0):e.join("")}function o(e,t,n,r){return[v(x(r)),v(_(e).toString(16)),v(_(t).toString(16)),v(_(n).toString(16))].join("")}function n(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.s-=t/100,e.s=m(e.s),u(e)}function a(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.s+=t/100,e.s=m(e.s),u(e)}function s(e){return u(e).desaturate(100)}function l(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.l+=t/100,e.l=m(e.l),u(e)}function c(e,t){t=0===t?0:t||10;e=u(e).toRgb();return e.r=j(0,E(255,e.r-_(-t/100*255))),e.g=j(0,E(255,e.g-_(-t/100*255))),e.b=j(0,E(255,e.b-_(-t/100*255))),u(e)}function d(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.l-=t/100,e.l=m(e.l),u(e)}function p(e,t){e=u(e).toHsl(),t=(e.h+t)%360;return e.h=t<0?360+t:t,u(e)}function N(e){e=u(e).toHsl();return e.h=(e.h+180)%360,u(e)}function P(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+120)%360,s:t.s,l:t.l}),u({h:(n+240)%360,s:t.s,l:t.l})]}function D(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+90)%360,s:t.s,l:t.l}),u({h:(n+180)%360,s:t.s,l:t.l}),u({h:(n+270)%360,s:t.s,l:t.l})]}function 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 v(e){return 1==e.length?"0"+e:""+e}function y(e){return e=e<=1?100*e+"%":e}function x(e){return $.round(255*parseFloat(e)).toString(16)}function b(e){return g(e)/255}function C(e){return k.CSS_UNIT.exec(e)}var $,w,S,T,_,E,j,I,R,O,L,M,A,k;$=Math,w=/^\s+/,S=/\s+$/,T=0,_=$.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=_(100*this._a)/100,this},toHsv:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=i(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),e=_(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+e+"%)":"hsva("+t+", "+n+"%, "+e+"%, "+this._roundA+")"},toHsl:function(){var e=r(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=r(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),e=_(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+e+"%)":"hsla("+t+", "+n+"%, "+e+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var t=this._r,n=this._g,r=this._b,i=this._a;return t=[v(_(t).toString(16)),v(_(n).toString(16)),v(_(r).toString(16)),v(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:_(this._r),g:_(this._g),b:_(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+_(this._r)+", "+_(this._g)+", "+_(this._b)+")":"rgba("+_(this._r)+", "+_(this._g)+", "+_(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:_(100*h(this._r,255))+"%",g:_(100*h(this._g,255))+"%",b:_(100*h(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+_(100*h(this._r,255))+"%, "+_(100*h(this._g,255))+"%, "+_(100*h(this._b,255))+"%)":"rgba("+_(100*h(this._r,255))+"%, "+_(100*h(this._g,255))+"%, "+_(100*h(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&O[t(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+o(this._r,this._g,this._b,this._a),n=t;return"progid:DXImageTransform.Microsoft.gradient("+(this._gradientType?"GradientType = 1, ":"")+"startColorstr="+t+",endColorstr="+(n=e?"#"+o((t=u(e))._r,t._g,t._b,t._a):n)+")"},toString:function(e){var t=!!e,n=(e=e||this._format,!1),r=this._a<1&&0<=this._a;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),(n="hsv"===e?this.toHsvString():n)||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(e,t){e=e.apply(null,[this].concat([].slice.call(t)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(n,arguments)},saturate:function(){return this._applyModification(a,arguments)},greyscale:function(){return this._applyModification(s,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(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]:y(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,displayChatWithSupport:a})=>{var s=useStyles$1$1()["classes"];const[l,c]=react.exports.useState(null);const u=()=>{c(null),null!=e&&e()};var d=n||r,p=null==(p=window.config)?void 0:p.appVersion;return jsxRuntime.exports.jsxs("div",Object.assign({className:s.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:s.barIcon,onClick:e=>{c(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(s.icon,s.helpIcon)})}))})),jsxRuntime.exports.jsx(Popover$1,Object.assign({open:Boolean(l),anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},onClose:u,className:s.popover,classes:{paper:s.popoverColor},disableScrollLock:!0},{children:jsxRuntime.exports.jsxs(List$2,Object.assign({disablePadding:!0,className:s.list},{children:[d&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{u(),null!=r&&r(),n&&window.open(n,"_blank")},"data-veritone-element":"show-help-doc-button","data-testid":"show-help-doc-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(AppBarArticleIcon,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.MSM3Vh",defaultMessage:"View Help Docs",description:"help tooltip: text for documentation"}),classes:{root:s.helpItemText}})]})),a&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{null!=i&&i(),sdkEventManager.dispatch(SdkEvents.openSupport),c(null)},"data-veritone-element":"open-chat-with-support-button","data-testid":"app-bar-show-chat-with-support-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(Chat,{fontSize:"small"})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-chat-with-support.MBM3Vh2",defaultMessage:"Chat with Support",description:"help tooltip: salesforce chat with support"}),classes:{root:s.helpItemText}})]})),o&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{null!=i&&i(),c(null)},"data-veritone-element":"open-support-chat-button","data-testid":"support-chat-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(AppBarInAppGuidance,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.8aLpuV",defaultMessage:"In-App Guidance",description:"help tooltip: text for documentation"}),classes:{root:s.helpItemText}})]})),p&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(ListItem$1,Object.assign({className:s.versionWrapper},{children:jsxRuntime.exports.jsx(ListItemText$1,{primary:p,classes:{primary:s.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,g]=react.exports.useState(new Date),[v,y]=react.exports.useState(),[x,b]=react.exports.useState(),[C,$]=react.exports.useState(!1),[w,S]=react.exports.useState(!1),T=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setIsIdle,value:e,ephemeral:!0,contentType:"json"}))},[n]),_=(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])),E=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setClickedLogout,value:e,ephemeral:!0,contentType:"json"}))},[n]),j=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setCallResetIdleTimer,value:e,ephemeral:!0,contentType:"json"}))},[n]),I=react.exports.useCallback(()=>{logoutCallCounter++,_(!0);var e=l?500:5e3;n(logoutRequest({token:o})),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},t?2e3:e)},[_,n,o,a,l]);var R=react.exports.useCallback(()=>{logoutCallCounter++,T(!1),setTimeout(()=>{_(!0),E(!0),n(logoutRequest({token:o}))},500),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},500)},[_,n,o,a,E,T]);var O=()=>{T(!0),clearInterval(timer),timer=setInterval(()=>{h(e=>e-1)},1e3)},L=()=>{!r&&p<RESET_IDLE_TIMER_CALL_LIMIT&&j(!0)};const M=$$3(t?{timeout:5e3,onIdle:O,onAction:L,debounce:1e3,crossTab:!0,syncTimers:200}:{timeout:6e4*i,onIdle:O,onAction:L,debounce:i/4*6e4,crossTab:!0,syncTimers:200})["reset"],A=react.exports.useCallback(()=>{j(!1),M()},[j]),k=react.exports.useCallback(()=>{w&&(n(extendTokenRequest({token:o})),S(!1)),T(!1),A(),clearInterval(timer),setTimeout(()=>{h(t?5:60)},500)},[T,A,w,n,o]);return react.exports.useEffect(()=>{setTimeout(()=>{g(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)),y(e)}},[c]),react.exports.useEffect(()=>{x&&x.getTime()<m.getTime()&&$(!0),v&&v.getTime()<m.getTime()&&S(!0)},[x,v,m]),react.exports.useEffect(()=>{C?I():w&&T(!0)},[x,v,w,C,I,T]),react.exports.useEffect(()=>{s&&logoutCallCounter<LOGOUT_CALL_LIMIT&&I()},[s,I]),react.exports.useEffect(()=>{r&&0===f&&(clearInterval(timer),setTimeout(()=>{h(10)},500),I())},[f,I,r]),react.exports.useEffect(()=>{!r&&u&&p===RESET_IDLE_TIMER_CALL_LIMIT&&A()},[u,r,p,A]),react.exports.useEffect(()=>{r||k()},[r,k]),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"}):w?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.bDessH",defaultMessage:"Your session will expire soon. For your security, we'll automatically sign you out in {signOutTimer} seconds. Choose 'Stay Signed In' to continue or 'Sign Out' if you're done.",description:"label for idle warning expiring soon",values:{signOutTimer:f}}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.Ca6Qq0",defaultMessage:"You've been inactive for a while. For your security, we'll automatically sign you out in {signOutTimer} seconds. Choose 'Stay Signed In' to continue or 'Sign Out' if you're done.",description:"label for idle warning inactive for a while",values:{signOutTimer:f}})}))}),s?null:jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:e.dialogActions},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:R,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:k,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:v,openSetting:y,organization:x={},panels:b=[],unseenCount:C,searchBarMountId:$,textColor:w,rightActions:S=[],applications:T=[],onClickAppSwitchIcon:_,displaySupportChat:E=!0,onDashboardClick:j,showDashboardIcon:I=!1,displayChatWithSupport:R=!0}){var O=tinycolor(o).isDark(),w=w||(O?"#fff":"#000"),O=O?"rgba(255,255,255,0.1)":"rgb(243,245,249)";const L=useStyles$2$1({titleColor:w,logo:i,activeColor:O})["classes"],[M,A]=react.exports.useState([]);O=useSelector(userSelector)||{};const[k,N]=react.exports.useState(!0);var{appIcon:O,currentUser:P}=getUserInfo(O),D=useSelector(betaFeaturesSelector);return react.exports.useEffect(()=>{var e=b.map(e=>e.panelId);!e.length&&!M.length||isEqual$2(e,M)||A(e)},[b,M]),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:L.appBar,style:{height:appBarHeight,background:o,zIndex:t}},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:L.menuButton},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-menu","data-testid":"app-bar-menu",className:L.iconButton,onClick:r,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.hamburgerIcon)})}))})),!!O&&""!==O&&jsxRuntime.exports.jsx("div",Object.assign({className:L.margin},{children:jsxRuntime.exports.jsx("img",{className:L.appIcon,src:O,alt:"appIcon"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:L.content,style:{color:w}},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.left,L.noSelect),onClick:function(){window.location.href="/"},"data-test":"appbarTitle","data-testid":"appbarTitle"},{children:i?jsxRuntime.exports.jsx("span",{className:L.appLogo}):jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:L.title},{children:a}))})),jsxRuntime.exports.jsx("div",{"data-test":"appbarSearch",id:$||"search-bar-id",className:L.searchBarHolder}),jsxRuntime.exports.jsx("div",Object.assign({className:L.right},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:L.controllers},{children:[0<S.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.iconGroup,L.noSelect)},{children:S.map(({label:e,onClick:t,isActive:n=!0},r)=>jsxRuntime.exports.jsx("div",Object.assign({className:L.iconGroupIcon},{children:jsxRuntime.exports.jsx("span",{onClick:e=>t?t(e):null,className:classnames(L.rightActionLabel,n?L.active:L.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:L.barIcon,onClick:j,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.dashboardIcon)})}))})),s&&jsxRuntime.exports.jsx("div",Object.assign({"data-test":"app-bar-help-container","data-testid":"app-bar-help-container",className:classnames(L.margin,{[L.panelActive]:M.includes(HELP_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Help,{tooltipTitle:"",helpDocLabel:"View Help Docs",chatWithSupportLabel:"Chat with Support",supportLabel:"In-App Guidance",helpDocCallback:()=>{null!=m&&m()},supportCallback:p,titleColor:w,displaySupportChat:E,displayChatWithSupport:R})})),l&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.margin,{[L.panelActive]:M.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:L.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:C,max:NOTIFICATION_BADGE_MAX_COUNT,color:"primary","data-test":"app-bar-notification-badge",className:L.notificationBadge},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.notificationIcon,{[L.openNotificationPanel]:null==y?void 0:y.openNotificationPanel})})}))}))}))})),D&&c&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.margin,{[L.panelActive]:M.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:L.barIcon,onClick:v,size:"large","data-testid":"app-bar-user-application-settings-button"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.applicationSettingsIcon)})}))}))})),1<T.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames({[L.panelActive]:M.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:L.barIcon,onClick:_,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.applicationIcon,{[L.openPanel]:null==y?void 0:y.openAppSwitchPanel})})}))}))})),(x.imageUrl||x.name)&&e&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.margin,{[L.panelActive]:M.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:L.barIcon+" "+L.orgButton,onClick:u,size:"large"},{children:x.imageUrl&&k?jsxRuntime.exports.jsx("img",{src:x.imageUrl,className:classnames(L.orgIcon),onError:function(){N(!1)},alt:"org_icon"}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:L.smallOrgAvatar,variant:"circular","data-testid":"app-bar-avatar"},{children:getSortName(x.name||"")}))}))}))})),P&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames({[L.panelActive]:M.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:L.barIcon,onClick:h,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.veritoneLogo,{[L.openPanel]:null==y?void 0:y.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,{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=`
|
|
1367
|
+
`,operationName:e,token:n,graphQLEndpoint:r}))[t])?void 0:e.id}),selectUserAppGroups=e=>{return(null==(e=e[namespace$3])?void 0:e.appGroups)||[]},selectUserAppGroupsRootFolderId=e=>{return(null==(e=e[namespace$3])?void 0:e.appGroupsRootFolderId)||""},selectUserAppGroupsUiStatus=e=>{return null==(e=e[namespace$3])?void 0:e.uiStatus},selectAppGroupsEditMode=e=>{return!!((null==(e=null==(e=e[namespace$3])?void 0:e.user)?void 0:e.appGroups)||[]).find(e=>e.isEdited)};function*fetchUserGroupsSaga(){var t,n,r,i;try{var o=yield select(graphEndpointSelector),a=yield select(sessionTokenSelector);let e=yield select(selectUserAppGroupsRootFolderId);if(!e){var s=yield call$7(fetchUserAppGroupsRootFolderIdApi,a,o);if(!s||s.length<2||null==(t=s[1])||!t.id)return yield put(fetchUserAppGroupsFailed()),void console.log("Something went wrong while creating root folder for applications");e=null==(n=s[1])?void 0:n.id}var l=yield call$7(fetchUserAppGroupsApi,a,o,e);const c=(null==(i=null==(r=null==l?void 0:l.childFolders)?void 0:r.records)?void 0:i.map(e=>{var t;return{groupName:e.name,id:e.id,treeObjectId:e.treeObjectId,apps:null==(t=null==e?void 0:e.childApplications)?void 0:t.records.map(e=>e.id),priority:null==e?void 0:e.orderIndex,parentTreeObjectId:null==(t=null==e?void 0:e.parent)?void 0:t.treeObjectId,isNew:!1,expanded:!1,isEdited:!1,isExpanded:!0}}))||[];c.sort((e,t)=>(null==e?void 0:e.priority)-(null==t?void 0:t.priority)),yield put(fetchUserAppGroupsRootFolderIdSuccess(e)),yield put(fetchUserAppGroupSuccess(c))}catch(e){yield put(fetchUserAppGroupsFailed()),console.log("Something went wrong while creating root folder for applications",e)}}function*createNewAppGroupStartSaga(e){yield select(preferredLanguageSelector);try{const i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector);var t=yield select(selectUserAppGroupsRootFolderId),n=e.payload;const a=yield select(selectUserAppGroups);var r=a.find(e=>!0===e.isNew);const s=(null==r?void 0:r.apps)||[],l=yield call$7(createUserGroupApi,o,i,n,t);l&&0<s.length&&(yield all(s.map(e=>call$7(addAppToUserGroupApi,o,i,e,l)))),yield put(fetchUserAppGroupsStart())}catch(e){console.log("Something went wrong while creating application group",e),yield put(showMessage({content:"Something went wrong while creating your application group",severity:MessageSeverity.Error}))}}function*addAppToGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.destination,n=e.payload.appId;if(!validate(t)||!validate(n))return;var r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);yield call$7(addAppToUserGroupApi,i,r,n,t)}catch(e){console.log("Something went wrong while adding app to application group",e),yield put(showMessage({content:"Something went wrong while adding application to group",severity:MessageSeverity.Error}))}}function*removeAppFromGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.source,n=e.payload.appId,r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);yield call$7(removeAppFromGroupApi,i,r,n,t)}catch(e){console.log("Something went wrong while removing application from group",e),yield put(showMessage({content:"Something went wrong while removing application from group",severity:MessageSeverity.Error}))}}function*deleteAppGroupSaga(e){yield select(preferredLanguageSelector);try{const i=e.payload;var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);const o=yield select(selectUserAppGroups)||[];var r=o.find(e=>e.id===i);r&&r.treeObjectId&&(yield call$7(deleteAppGroupApi,n,t,r.treeObjectId,r.priority),yield put(fetchUserAppGroupsStart()))}catch(e){console.log("Something went wrong while deleting application group",e),yield put(showMessage({content:"Something went wrong while deleting application group",severity:MessageSeverity.Error}))}}function*editAppGroupSaga(e){yield select(preferredLanguageSelector);try{var t=e.payload.groupId,n=e.payload.newGroupName,r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);t&&n&&(yield call$7(editAppGroupApi,i,r,t,n))}catch(e){console.log("Something went wrong while editing application group",e),yield put(showMessage({content:"Something went wrong while editing application group",severity:MessageSeverity.Error}))}}function*updateGroupPrioritySaga(e){yield select(preferredLanguageSelector);try{const a=e.payload.groupId;var t=e.payload.newPriority,n=e.payload.prevPriority;const s=yield select(selectUserAppGroups)||[];var r=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector),o=s.find(e=>e.id===a);o&&void 0!==t&&void 0!==n&&(yield call$7(updateGroupPriorityApi,i,r,t,n,o))}catch(e){console.log("Something went wrong while updating application group order",e),yield put(showMessage({content:"Something went wrong while updating application group order",severity:MessageSeverity.Error}))}}function*rootSaga$1(){yield all([takeLatest$1(fetchUserAppGroupsStart.type,fetchUserGroupsSaga),takeLatest$1(createNewAppGroupStart.type,createNewAppGroupStartSaga),takeLatest$1(addAppToGroup.type,addAppToGroupSaga),takeLatest$1(removeAppFromGroup.type,removeAppFromGroupSaga),takeLatest$1(deleteAppGroup.type,deleteAppGroupSaga),takeLatest$1(editAppGroup.type,editAppGroupSaga),takeLatest$1(updateGroupPriority.type,updateGroupPrioritySaga)])}function getAppGroupModule(){return{id:"user-app-group",reducerMap:{[namespace$3]:appGroupReducer},sagas:[rootSaga$1],initialActions:[]}}const styles={title:{my:2},content:{minWidth:360,px:0,pt:3,pb:0},button:{fontSize:"12px"},actions:{px:4,pt:4,pb:2},cancelButton:{color:"black",py:2},deleteButton:{py:2}},iconMapper={CMS:img$V,Discovery:img$U,Collection:img$T,Library:img$S,Admin:img$1s,Developer:img$R};function AppIcon({id:t,icon:e,type:n,iconUrl:r,appName:i,onClick:o,appListV2:a=!1,isAppGroup:s,appGroupId:l}){a=useStyles$d({appListV2:a,type:n}).classes;const[c,u]=react.exports.useState(e||r||i&&iconMapper[i]||img$R),[d,p]=react.exports.useState(!1);const[f,h]=react.exports.useState(null);e=Boolean(f);const m=useDispatch();const g=e=>{e.stopPropagation(),h(null),p(!1)};return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:i||"",PopperProps:{disablePortal:!0}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:function(){o&&o(t)},className:classnames({[a.iconButton]:"grid"===n,[a.listItem]:"list"===n,[a.switcherGrid]:"switcherGrid"===n}),"data-test":"dt-button-app-icon","data-testid":"dt-button-app-icon",onContextMenu:s?e=>{e.preventDefault(),h(e.currentTarget)}:void 0},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.image},{children:jsxRuntime.exports.jsx("img",{alt:"app-icon",onError:function(){u(img$R)},src:c,draggable:"false",className:a.img})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:a.appName,"data-testid":"os-app-bar-panel.app-switcher.app-name"},{children:i})),jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"basic-menu",anchorEl:f,open:e,onClose:g,MenuListProps:{"aria-labelledby":"basic-button"},sx:{transform:"translate(60px, -60px)"}},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({sx:{display:"none"},onClick:e=>{e.stopPropagation(),mountPanel$1({panelId:"APPLICATION_DETAILS_PANEL",microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{applicationId:t}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}),g(e)},"data-testid":`os-app-bar-panel.app-switcher.options-app-detail.${l}.`+t},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.application-details",defaultMessage:"Application Details",description:"Dropdown menu item that opens application details panel"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:e=>{e.stopPropagation(),h(null),p(!0)},"data-testid":`os-app-bar-panel.app-switcher.options-remove-app.${l}.`+t},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.remove-from-group",defaultMessage:"Remove from Group",description:"Dropdown menu item that removes application from group"})}))]})),jsxRuntime.exports.jsx(Dialog$1,Object.assign({open:d,maxWidth:"xs",onClose:g,"data-testid":"os-app-bar-panel.delete-app-from-group.confirmation-dialog"},{children:jsxRuntime.exports.jsxs(DialogTitle$1,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.dialogTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirmation-title",defaultMessage:"Delete Application",description:"Delete App from Group confirmation title"})})),jsxRuntime.exports.jsxs(DialogContent$1,Object.assign({sx:styles.content},{children:[jsxRuntime.exports.jsx(DialogContentText$1,{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirmation-message",defaultMessage:"Are you sure you want to delete this application from the group?",description:"Delete Ap from Group confirmation message"})}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({sx:styles.actions},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({sx:styles.cancelButton,onClick:g,"data-testid":"app-switcher.delete-app.cancel-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.cancel-button",defaultMessage:"Cancel",description:"Delete App from Group cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained",sx:styles.deleteButton,onClick:e=>{e.stopPropagation(),m(removeAppFromGroup({source:l,appId:t.toString()})),g(e)},"data-testid":"app-switcher.delete-app.confirm-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.delete-app-from-group.confirm-button",defaultMessage:"Yes, Delete",description:"Delete App from Group confirmation button"})}))]}))]}))]})}))]}))}))}const useStyles$c=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$c({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$b=makeStyles()(e=>({tabsBox:{height:"100%"},fullHeight:{height:"100%"},listContainer:{overflow:"hidden",height:"calc(100vh - 64px - 55px - 5px)",overflowY:"scroll"},skeletonContainer:{position:"absolute",width:"100%",height:"100%",zIndex:5,backgroundColor:"white"}})),useStyles$a=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"},airborne:{position:"absolute",background:"rgba(26, 140, 255, 0.9)",transform:"rotate(3.02deg)",color:"white","& *":{fontWeight:"900 !important"},"& img":{background:"white",borderRadius:"50%"}}})),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 AppListDnD({intl:e,selectedAppId:t,onSelectApplication:n,applications:i=[],showAppGroups:a=!1}){const[r,o]=react.exports.useState(t),[s,l]=react.exports.useState({}),[c,u]=react.exports.useState(""),[d,p]=react.exports.useState("asc");var f=0!==i.length;function h(e){o(e),n(e)}function m(e,t){return e.name.toLowerCase()>t.name.toLowerCase()?1:e.name.toLowerCase()<t.name.toLowerCase()?-1:0}react.exports.useEffect(()=>{if(0<i.length){const t=[...i];const n={};for(const r of t.sort(m)){var e=r.name.charAt(0).toUpperCase();n[e]?n[e]=[...n[e],r]:n[e]=[r]}l(n)}},[i]),react.exports.useEffect(()=>{t!==r&&o(t)},[t,r]);e=translatableTextProps(e).searchLabel;const[g,v]=react.exports.useState(null);var y=Boolean(g);const x=e=>{if(e!==d){p(e);const t=Object.keys(s).reverse(),n={};t.forEach(e=>n[e]=s[e].reverse()),l(n)}v(null)},b=useStyles$a({sortOrder:d,hasApps:f,menuIsOpen:y})["classes"];f=jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"app-switcher.sort-menu",anchorEl:g,open:y,onClose:x},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>x("asc"),className:b.sortMenu},{children:"A - Z"})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>x("desc"),className:b.sortMenu},{children:"Z - A"}))]}));const C=(e,t,n)=>jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===r,onClick:h,iconUrl:t,id:e,appName:n,appListV2:!0});return jsxRuntime.exports.jsxs("div",Object.assign({className:b.root,"data-testid":"os-app-bar-panel.app-switcher.applications-container"},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,spacing:2},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:5},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:b.title},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.applications-title",defaultMessage:"Applications",description:"Applications list title"})}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:5,className:b.searchBox},{children:jsxRuntime.exports.jsx(TextField$1,{"data-testid":"os-app-bar-panel.app-switcher.search",onChange:e=>{u(e.target.value)},placeholder:e,InputProps:{classes:{input:b.searchInput},startAdornment:jsxRuntime.exports.jsx(InputAdornment$1,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(IconButton$1,{children:jsxRuntime.exports.jsx(default_1$2,{})})}))}})})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:2,className:b.filterIcon},{children:[jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.sort-btn",defaultMessage:"Sort",description:"Application sort button"})},{children:jsxRuntime.exports.jsx("div",Object.assign({className:b.filterIconWrapper,onClick:e=>{i.length&&v(e.currentTarget)}},{children:jsxRuntime.exports.jsx("div",Object.assign({className:b.filterIcon},{children:jsxRuntime.exports.jsx(SortArrow,{"data-testid":"os-app-bar-panel.app-switcher.sort"})}))}))})),f]}))]})),jsxRuntime.exports.jsx("div",{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(ConnectedDroppable,Object.assign({droppableId:"app-list"},{children:e=>jsxRuntime.exports.jsx("div",Object.assign({className:b.groupContainer},e.droppableProps,{ref:e.innerRef},{children:0<Object.keys(s).length&&Object.entries(s).map(([e,t])=>t.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())).length?jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("div",Object.assign({className:b.groupTitle,"data-testid":"os-app-bar-panel.app-switcher.group-title"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"overline"},{children:e}))})),t.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())).map((e,t)=>{const{id:r=t,iconUrl:i,name:o}=e;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"os-app-bar-panel.app-switcher.app-row"},{children:[a?jsxRuntime.exports.jsx(PublicDraggable,Object.assign({draggableId:r.toString(),index:t},{children:(t,n)=>jsxRuntime.exports.jsx(NaturalDragAnimation,Object.assign({style:t.draggableProps.style,snapshot:n},{children:e=>((e,t,n,r,i,o)=>jsxRuntime.exports.jsx("div",Object.assign({},e.draggableProps,e.dragHandleProps,{ref:e.innerRef,className:t.isDragging?b.airborne:"",style:n},{children:C(r,i,o)})))(t,n,e,r,i,o)}))}),t):C(r,i,o),jsxRuntime.exports.jsx(Divider$1,{})]}),r)})]},e):null)}))}))})]}))}var AppListDnD$1=injectIntl(AppListDnD);const useStyles$9=makeStyles()(e=>({root:{height:"calc(100vh - 64px - 55px - 5px)",overflowY:"scroll",borderRight:"15px solid #F9F9F9",boxShadow:"0px 1px 1px #809cb7","&::-webkit-scrollbar":{display:"none"}},appTile:{overflow:"hidden"},title:{fontWeight:700,padding:"15px 15px 0 15px"},groupTitle:{fontWeight:700,padding:"15px"},helperText:{paddingLeft:"15px",fontSize:"12px",fontWeight:"bold"},noApps:{textAlign:"center",marginTop:"30px","& svg":{width:"160px",height:"160px",marginBottom:"20px"},marginBottom:"20px"},appGroup:{borderTop:"1px solid #D5DFE9"},currentLanding:{position:"relative",minHeight:"155px !important"},idleLanding:{minHeight:"10px"},runway:{minHeight:"110px",position:"absolute",background:"rgba(255, 255, 255, 0.8)",width:"94%",height:"100%",border:"1px dashed #CAD7E3",borderRadius:"4px",display:"flex",textAlign:"center",flexDirection:"column",justifyContent:"center"},landingText:{fontSize:"16px !important",fontWeight:"600 !important",color:"rgba(124, 132, 141, 1)"},airborneGroup:{height:"50px !important",background:"rgba(26, 140, 255, 0.9)",color:"white","& div":{display:"none"}},groupHandler:{display:"flex",justifyContent:"space-between","&:hover":{background:"rgba(242, 242, 242, 0.5)"}}})),useStyles$8=makeStyles()(()=>({root:{padding:"15px"},groupNameInput:{height:"36px","& input":{width:"100% !important",height:"36px",padding:"0 0 0 15px",color:"rgba(92, 98, 105, 1)",borderRadius:"4px",border:"none"},marginBottom:"10px",width:"100% !important",background:"#F5FDFF"},notInterested:{height:"18px","& svg":{height:"18px",cursor:"pointer"}},confirm:{height:"20px",cursor:"pointer"},newGroupApps:{marginBottom:"20px",display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center",height:"101px",background:"#FAFAFA",borderRadius:"4px"},landingText:{color:"rgba(156, 168, 180, 1)"},relativeContainer:{position:"relative"},fullWidthRunway:{top:0,width:"100%"}})),AppGroupPlaceholder=({apps:n,classes:r})=>{useSelector(preferredLanguageSelector);const i=useStyles$8()["classes"],e=useDispatch(),[t,o]=react.exports.useState("");return jsxRuntime.exports.jsxs("div",Object.assign({className:i.root},{children:[jsxRuntime.exports.jsx(TextField$1,{value:t,onChange:e=>{o(e.target.value)},"data-testid":"os-app-bar.new-app-group.name-input-container",className:i.groupNameInput,InputProps:{endAdornment:jsxRuntime.exports.jsxs(InputAdornment$1,Object.assign({position:"end"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:i.confirm,onClick:()=>{t?e(createNewAppGroupStart(t)):e(showMessage({content:"Please provide a name for your new App group",severity:MessageSeverity.Error}))},"data-testid":"os-app-bar.new-app-group.save-btn"},{children:jsxRuntime.exports.jsx(Checkmark,{})})),jsxRuntime.exports.jsx("div",Object.assign({className:i.notInterested,onClick:()=>{e(removeNewAppGroupPlaceholder())},"data-testid":"os-app-bar.new-app-group.cancel-btn"},{children:jsxRuntime.exports.jsx(NotInterested,{})}))]}))},inputProps:{"data-testid":"os-app-bar.new-app-group.name-input"}}),jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"new-group-placeholder"},{children:(e,t)=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:i.relativeContainer,style:{width:"100%"}},{children:[n.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{position:"relative",marginBottom:"15px"}},{children:n.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,sx:{padding:0,overflow:"hidden"},"data-testid":"app-switcher.new-app-group.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:!1,onClick:()=>{},iconUrl:t,id:e,appName:n,appListV2:!0})}),e)})})):jsxRuntime.exports.jsx("div",Object.assign({className:i.newGroupApps},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.landingText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.new-app-group.apps-landing",defaultMessage:"Drag Applications Here",description:"helper text to tell users where to drag apps for the new app group"})}))})),t.isDraggingOver&&n.length?jsxRuntime.exports.jsx(Runway,{classes:r,rootClassName:i.fullWidthRunway}):null]}))}))]}))},GroupDraggingPlaceholder=({isDragging:e,className:t,groupName:n,dragHandleProps:r})=>e?jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:t},r,{children:n})):null,useStyles$7=makeStyles()(()=>({root:{padding:"15px"},groupNameInput:{height:"36px","& input":{width:"100% !important",height:"36px",padding:"0 0 0 15px",color:"rgba(92, 98, 105, 1)",borderRadius:"4px",border:"none"},marginBottom:"10px",width:"100% !important",background:"#F5FDFF"},notInterested:{height:"18px",cursor:"pointer"},confirm:{cursor:"pointer"},groupHandler:{display:"flex",justifyContent:"space-between",alignItems:"center","&:hover":{background:"rgba(242, 242, 242, 0.5)"}},invisibleHandler:{display:"none"},groupTitle:{fontWeight:700,padding:"15px"},handlerMenu:{height:"40px",width:"40px",marginRight:"10px"}})),GroupHandler=({dragHandleProps:e,groupName:t,groupId:n,isExpanded:r=!0})=>{const i=useSelector(selectAppGroupsEditMode),o=useDispatch(),[a,s]=react.exports.useState(!1),[l,c]=react.exports.useState(""),[u,d]=react.exports.useState(null);var p=Boolean(u);const f=()=>{d(null)};var h=useStyles$7()["classes"];react.exports.useEffect(()=>{c(t)},[]);const m=()=>{o(editAppGroup({edit:!0,groupId:n})),s(!0)};return jsxRuntime.exports.jsx("div",Object.assign({className:a?h.root:h.groupHandler},{children:a?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(TextField$1,{value:l,onChange:e=>{c(e.target.value)},"data-testid":`os-app-bar.app-group.${n}.name-input-container`,className:h.groupNameInput,InputProps:{endAdornment:jsxRuntime.exports.jsxs(InputAdornment$1,Object.assign({position:"end"},{children:[jsxRuntime.exports.jsx(Checkmark,{className:h.confirm,onClick:()=>{f(),o(editAppGroup({edit:!1,groupId:n,newGroupName:l})),s(!1)},"data-testid":`os-app-bar.app-group.${n}.save-btn`}),jsxRuntime.exports.jsx(NotInterested,{className:h.notInterested,onClick:()=>{f(),o(editAppGroup({edit:!1,groupId:n})),s(!1)},"data-testid":`os-app-bar.app-group.${n}.cancel-btn`})]}))},inputProps:{"data-testid":`os-app-bar.app-group.${n}.name-input`}}),jsxRuntime.exports.jsx("div",Object.assign({},e))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:h.groupTitle},e,{onClick:e=>{2!==e.detail||i||m()},"data-testid":"os-app-bar-panel.app-switcher.group-name."+n},{children:t})),jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:e=>{e.preventDefault(),d(e.currentTarget)},size:"small",className:h.handlerMenu,"data-testid":"os-app-bar-panel.app-switcher.options-btn."+n},{children:jsxRuntime.exports.jsx(MoreHor,{fontSize:"small"})})),jsxRuntime.exports.jsxs(Menu$1,Object.assign({id:"basic-menu",anchorEl:u,open:p,onClose:f,MenuListProps:{"aria-labelledby":"basic-button"},sx:{transform:"translate(-95px, 0)"}},{children:[jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>{f(),setTimeout(()=>{o(expandCollapse(n))},100)},"data-testid":"os-app-bar-panel.app-switcher.options-toggle."+n},{children:r?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.hide",defaultMessage:"Hide Group",description:"Hide Group dropdown menu item"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.expand",defaultMessage:"Expand",description:"Expand dropdown menu item"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:m,"data-testid":"os-app-bar-panel.app-switcher.options-rename."+n},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.rename",defaultMessage:"Rename",description:"Rename dropdown menu item"})})),jsxRuntime.exports.jsx(MenuItem$1,Object.assign({onClick:()=>{o(deleteAppGroup(n))},"data-testid":"os-app-bar-panel.app-switcher.options-delete."+n},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-group.menu.delete",defaultMessage:"Delete",description:"Delete dropdown menu item"})}))]}))]})}))},GroupApps=({groupApps:e,appGroup:r,classes:i,snapshot:t,handleSelectApplication:o,currentSelected:a})=>jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px"},"data-testid":"app-switcher.app-group."+r.id},{children:[t.isDraggingOver?jsxRuntime.exports.jsx(Runway,{classes:i}):null,e.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,className:i.appTile,sx:{padding:0},"data-testid":"app-switcher.app-group.app-tile."+e},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:e===a,onClick:o,iconUrl:t,id:e,appName:n,appListV2:!0,isAppGroup:!0,appGroupId:r.id})}),e)})]})),LoadingSkeleton=()=>jsxRuntime.exports.jsx(react.exports.Fragment,{children:[1,2].map(e=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:345,height:50}),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px"}},{children:[1,2,3].map(e=>jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,sx:{padding:0}},{children:jsxRuntime.exports.jsxs(Stack$4,Object.assign({sx:{justifyContent:"center",alignItems:"center",padding:"20px 0px"}},{children:[jsxRuntime.exports.jsx(Skeleton$1,{sx:{m:2},variant:"circular",width:40,height:40}),jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",sx:{fontSize:"10px"},width:30})]}))}),e))}),e)]}))}),Runway=({classes:e,rootClassName:t})=>jsxRuntime.exports.jsx("div",Object.assign({className:e.runway+" "+t},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.landingText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-switcher.app-landing",defaultMessage:"Drop Application Here",description:"Helper text to tell users where apps should be dropped"})}))})),RecentAppsDnD=({apps:e=[],allApps:t,onSelectApplication:n,selectedAppId:r,showAppGroups:i})=>{const o=useStyles$9()["classes"],[a,s]=react.exports.useState(r),l=useDispatch();function c(e){s(e),n(e)}const u=useSelector(selectUserAppGroupsUiStatus),d=useSelector(selectUserAppGroups);return jsxRuntime.exports.jsxs("div",Object.assign({className:o.root,"data-testid":"app-switcher.recent-apps.container"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:o.title},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"app-bar.app-switcher.recent-apps",defaultMessage:"Recent Applications",description:"Recent Application container title"})})),e.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px"}},{children:e.map((e,t)=>{var{id:t=t,iconUrl:n,name:r}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4,className:o.appTile,sx:{padding:0},"data-testid":"app-switcher.recent-apps.app-tile"},{children:jsxRuntime.exports.jsx(AppIcon,{type:"switcherGrid",selected:t===a,onClick:c,iconUrl:n,id:t,appName:r,appListV2:!0})}),e.id)})})):jsxRuntime.exports.jsxs("div",Object.assign({className:o.noApps},{children:[jsxRuntime.exports.jsx(NoApps,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:o.helperText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"app-bar.app-switcher.no-recent-apps",defaultMessage:"You haven’t viewed any applications yet.",description:"No Recent Application title"})}))]})),i&&(u===Status.loading?jsxRuntime.exports.jsx(LoadingSkeleton,{}):u===Status.failure?jsxRuntime.exports.jsx(ErrorState$1,{onRetry:()=>l(fetchUserAppGroupsStart()),errorMessage:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.app-groups.error-message",defaultMessage:"Something went wrong while loading your application groups.",description:"application groups error state"})}):u===Status.success&&d.length?jsxRuntime.exports.jsx(AppGroups,{apps:e,allApps:t,userAppGroups:d,handleSelectApplication:c,currentSelected:a}):null)]}))},AppGroups=({userAppGroups:t,allApps:n,apps:o,handleSelectApplication:a,currentSelected:s})=>{const l=useStyles$9()["classes"];return jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:"group-list",direction:"vertical",type:"group-list"},{children:e=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{children:[t.map((r,e)=>{const i=[];return r.apps.forEach(t=>{var e=[...n,...o].find(e=>e.id===t);e&&i.push(e)}),r.isNew?jsxRuntime.exports.jsx(AppGroupPlaceholder,{apps:i,classes:l},r.id):jsxRuntime.exports.jsx(PublicDraggable,Object.assign({draggableId:r.id,index:e},{children:(n,e)=>jsxRuntime.exports.jsxs("div",Object.assign({className:e.isDragging?l.airborneGroup:l.appGroup,ref:n.innerRef},n.draggableProps,{children:[jsxRuntime.exports.jsx(GroupDraggingPlaceholder,{isDragging:e.isDragging,className:l.groupTitle,dragHandleProps:n.dragHandleProps,groupName:r.groupName}),jsxRuntime.exports.jsx(ConnectedDroppable,Object.assign({droppableId:r.id},{children:(e,t)=>jsxRuntime.exports.jsxs("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:t.isDraggingOver?l.currentLanding:l.idleLanding},{children:[jsxRuntime.exports.jsx(GroupHandler,{groupName:r.groupName,dragHandleProps:n.dragHandleProps,groupId:r.id,isExpanded:r.isExpanded}),t.isDraggingOver&&!i.length?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{paddingLeft:"10px",position:"relative",marginBottom:"15px",minHeight:"110px"}},{children:jsxRuntime.exports.jsx(Runway,{classes:l})})):null,jsxRuntime.exports.jsx(Collapse$1,Object.assign({in:(r.isExpanded||void 0===r.isExpanded)&&0<i.length,timeout:"auto",unmountOnExit:!0},{children:jsxRuntime.exports.jsx(GroupApps,{groupApps:i,classes:l,snapshot:t,handleSelectApplication:a,currentSelected:s,appGroup:r})}))]}))}))]}),r.id)}),r.id)}),e.placeholder]}))}))};function ApplicationPanelDnD({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:i,showAppGroups:o=!1}){var a=useStyles$b()["classes"],s=useSelector(preferredLanguageSelector);const l=useSelector(selectUserAppGroups)||[],c=AIWareFormatMessage(s),u=useDispatch(),[d,p]=react.exports.useState(0===n.length?0:n.length<4?1:2),[f,h]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;p(e)},[n]),react.exports.useState(e));function m(e){h(e),null!=t&&t(e),null!=i&&i(e)}react.exports.useEffect(()=>{e!==f&&h(e)},[e,f]);react.exports.useEffect(()=>{o&&u(fetchUserAppGroupsStart())},[u]);return jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getAppGroupModule()]},{children:jsxRuntime.exports.jsx(DragDropContext,Object.assign({onDragEnd:e=>{if(o){const{destination:t,draggableId:n,type:r}=e;if("group-list"===r){e=l.find(e=>e.id===n);e&&u(updateGroupPriority({groupId:n,newPriority:t.index,prevPriority:e.priority}))}else{const i=l.find(e=>e.id===t.droppableId);((null===i||void 0===i?void 0:i.apps)||[]).find(e=>e===n)?u(showMessage({content:"This application has already been added to the group",severity:MessageSeverity.Error})):u(addAppToGroup({destination:t.droppableId,appId:n}))}}}},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.fullHeight},{children:jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,className:a.fullHeight},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:a.fullHeight},{children:jsxRuntime.exports.jsx(RecentAppsDnD,{apps:n,allApps:r,onSelectApplication:m,selectedAppId:null,showAppGroups:o})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:a.fullHeight},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.listContainer},{children:jsxRuntime.exports.jsx(AppListDnD$1,{title:c({id:"os-app-bar-panel.name.moreApps",defaultMessage:[{type:0,value:"More Applications"}]}),type:"More",applications:r,onSelectApplication:m,selectedAppId:null,row:d,showAppGroups:o})}))}))]}))}))}))}))}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$1,{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)},v=()=>{i(!1)};const y=()=>{e(getOpenIdConnectors())},x=(useInterval(()=>{e(getOpenIdConnectors())},o),e=>{l(e);e=window.open(e.loginUrl);u(e),a(2e3)}),b=react.exports.useCallback(t=>f.some(e=>e.connectId===t),[f]);react.exports.useEffect(()=>{""!==s.connectId&&null!==o&&b(s.connectId)&&(a(null),null!==c&&void 0!==c&&c.close(),i(!0))},[b,e]);return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:h.accountLinkingLabel,"data-test":"account-linking-label"},{children:SHARED_TEXT.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:y}):0===p.length?jsxRuntime.exports.jsx(NullState,{}):jsxRuntime.exports.jsx(OpenIdConnectors,{openIdItems:p,onOpenUnlinkModal:m,onClickOpenIdUrl:x,isOpenIdConnected:b}),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:t,maxWidth:"xs",onClose:g,"aria-labelledby":"unlink-dialog-title","aria-describedby":"unlink-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"unlink-dialog-title","data-test":"account-linking-unlink-dialog-title",className:h.dialogTitle},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT.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:v,"aria-labelledby":"success-dialog-title","aria-describedby":"success-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"success-dialog-title",className:h.dialogTitle,"data-test":"account-linking-success-dialog-title"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT.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:v,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$g=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$g()["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:""}),[v,y]=react.exports.useState({firstName:"",lastName:"",phoneNumber:""}),[x,b]=react.exports.useState(!1),[C,$]=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})),y(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:C,sortName:""+((null==(c=m.firstName)?void 0:c.substr(0,1))||"")+((null==(c=m.lastName)?void 0:c.substr(0,1))||""),onEditAvatarClick:()=>{var e={name:"EDIT_PROFILE_PICTURE",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",onClose: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:()=>{_(!1),S(!1),b(!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:""!==v.firstName,helperText:v.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:""!==v.lastName,helperText:v.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:""!==v.phoneNumber,helperText:v.phoneNumber,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}})]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{e&&O(e),b(!1)},color:"primary",id:"button-cancel-edit",className:classnames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qpPFGp",defaultMessage:"Cancel",description:"label of cancel button on profile panel"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){(()=>{let e=!0;return m.firstName||(y(Object.assign(Object.assign({},v),{firstName:"This field is required."})),e=!1),m.lastName||(y(Object.assign(Object.assign({},v),{lastName:"This field is required."})),e=!1),m.phoneNumber&&!/^\+?(\d){6,}$/.test(m.phoneNumber.toLowerCase())&&(y(Object.assign(Object.assign({},v),{phoneNumber:"Invalid phone number."})),e=!1),e})()&&(i(m),b(!1))},"data-test":"button-save-edit","data-testid":"button-save-edit",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.C1oyBr",defaultMessage:"Save",description:"label of save button on profile panel"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.a5aLpI",defaultMessage:"Name",description:"label of name field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-name",variant:"body1",className:d.valueItem},{children:`${(null===m||void 0===m?void 0:m.firstName)||""} `+((null===m||void 0===m?void 0:m.lastName)||"")}))]})),(null===m||void 0===m?void 0:m.phoneNumber)&&jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.73xPqY",defaultMessage:"Phone",description:"label of phone field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-phone",variant:"body1",className:d.valueItem},{children:null===m||void 0===m?void 0:m.phoneNumber}))]}))]}),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.zieKdP",defaultMessage:"Email",description:"label of email field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-email",variant:"body1",className:classnames(d.valueItem,d.disabledText)},{children:null==e?void 0:e.email}))]})),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:()=>{_(!1),S(!0),b(!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")]}))})]})]})),T?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.resetBiometric},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.+DTt+G",defaultMessage:"Biometric Reset",description:"label of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.nzzfrY",defaultMessage:"Your Biometric Profile will be reset.",description:"description of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{_(!1)},"data-test":"button-cancel-reset-biometric",color:"primary",className:classnames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{_(!1),t()},color:"primary",variant:"contained","data-test":"button-reset-biometric",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):!w&&s&&jsxRuntime.exports.jsx("div",Object.assign({id:"click-reset-biometric",onClick:()=>{_(!0),S(!1),b(!1)}},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.reset},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.OlJtmF",defaultMessage:"Reset Biometric Profile",description:"label of Reset Biometric Profile on profile panel"})}))}))]})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value: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),[m,g]=react.exports.useState("");var v=useStyles$b()["classes"],y=(react.exports.useEffect(()=>{g(h.loading)},[h]),useSelector(selectHasUserCreateRootFolderPermission)),y=gqlIntrospection.isOperationValid("fileApplication","mutation")&&y;return jsxRuntime.exports.jsxs("div",Object.assign({className:v.tabsBox},{children:[l===TabId.PERSONAL_PANEL&&jsxRuntime.exports.jsx(PersonalProfile,{currentUser:e,handleLogout:a,handleResetBiometric:i,handleResetPassword:o,handleUpdateProfile:s,handleUploadAvatar:p,avatarHistory:f,loadingStatus:m}),l===TabId.APP_PANEL&&jsxRuntime.exports.jsx(ApplicationPanelDnD,{recentApplist:c,applications:u,onClickApp:d,showAppGroups:y}),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$5="activities",allActivitySeletor=e=>{return(null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$5])||[]},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$5}/get activity`,GET_ACTIVITY_SUCCESS=`os-app-bar-panel/${namespace$5}/get activity success`,UPDATE_ACTIVITY_FILTER=`os-app-bar-panel/${namespace$5}/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$4]:userReducer$1,[namespace$5]: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$2(uniq([e,...r]),0,6),localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:r})))):localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:[e]}))),yield select(switchApiSelector));window.open(r+"/"+e)}function*applicationSaga(){yield all([takeEvery$1(HANDLE_CLICK_APP,handleClickAppSaga),takeLatest$1(REQUEST_GET_APPLICATION_V1,getApplicationsSaga)])}function delay(t=1e3){return __awaiter$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$2(){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$2],initialActions:[getActivity(),getCurrentUser$1(),requestGetApplications()],retained:!0}}const initialState$5={openIdConnectors:[],connectedOpenIds:[],message:"",status:LoadingStatus.Idle};function openIdConReducer(e,t){if(void 0===e)return initialState$5;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:r=[]}=useSelector(applicationSelector)||{};var{currentUser:n={}}=useSelector(userSelector$1)||{},{avatarHistory:i=[]}=n,o=useSelector(activitySelector)||[],a=useSelector(allActivitySeletor)["filter"];const[s,l]=react.exports.useState(0),[c,u]=react.exports.useState([]),[d,p]=react.exports.useState([]),f=useSelector(userRecentApplicationsSelector);return react.exports.useEffect(()=>{p(f)},[f]),react.exports.useEffect(()=>{t(requestGetApplications()),t(getActivity()),t(getCurrentUser$1())},[t]),react.exports.useEffect(()=>{l(e||0)},[e]),react.exports.useEffect(()=>{if(0<d.length&&0<r.length){const t=[];for(const n of d){var e=r.find(e=>e.id===n);e&&t.push(e)}u(t)}},[d,r]),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:s,currentUser:n,activities:o,activityFilter:a,onChangeActivityFilter:function(e){t(updateActivityFilter({filter:e}))},handleResetBiometric:function(){t(resetBiometric())},handleResetPassword:function(e){t(resetPassword({email:e}))},handleLogout:function(){t(logout$1())},handleUpdateProfile:function(e){t(updateProfile(e))},organizationRole:get$3(n,"organizationRole",{}),recentApp:c,applications:r,onClickApp:function(e){t(appSwitcherHandleClick(""+e)),t(updateUserRecentApplicationsStart(""+e))},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=interopRequireDefault.exports,default_1=(Object.defineProperty(Close,"__esModule",{value:!0}),Close.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.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=Close.default=_default,dt=Object.create,Ie=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,ft=Object.getOwnPropertyNames,ht=Object.getPrototypeOf,vt=Object.prototype.hasOwnProperty,Tt=e=>Ie(e,"__esModule",{value:!0}),It=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Et=(t,n,r)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let e of ft(n))vt.call(t,e)||"default"===e||Ie(t,e,{get:()=>n[e],enumerable:!(r=pt(n,e))||r.enumerable});return t},bt=e=>Et(Tt(Ie(null!=e?dt(ht(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Be=It((e,t)=>{var n,r;r=function(e){function t(e){var t=o.get(e),n=void 0===t?e.size:t<1073741824?t+1:0;if(!e.has(n))return i(e,n);if(e.size<536870912){for(;e.has(n);)n=Math.floor(1073741824*Math.random());return i(e,n)}if(e.size>s)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(n);)n=Math.floor(Math.random()*s);return i(e,n)}function n(e){var t=r(e);return e.add(t),t}var r,i,o,a,s=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,l=new WeakMap;i=function(e,t){return a.set(e,t),t},o=a=l,r=t;e.addUniqueNumber=n,e.generateUniqueNumber=t,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof(n=e)&&void 0!==t?r(e):"function"==typeof define&&define.amd?define(["exports"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self).fastUniqueNumbers={})}),w=(bt(Be()),"object"==("undefined"==typeof window?"undefined":typeof window)),T={setTimeout:w?setTimeout.bind(window):setTimeout,clearTimeout:w?clearTimeout.bind(window):clearTimeout,setInterval:w?setInterval.bind(window):setInterval,clearInterval:w?clearInterval.bind(window):clearInterval};function $e(e){T.setTimeout=e.setTimeout,T.clearTimeout=e.clearTimeout,T.setInterval=e.setInterval,T.clearInterval=e.clearInterval}var l,Y={},Ke=class{constructor(e){this.closed=!1,this.mc=new MessageChannel,this.name=e,Y[e]=Y[e]||[],Y[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){e.storageArea===window.localStorage&&e.key.substring(0,this.name.length)===this.name&&null!==e.newValue&&(e=JSON.parse(e.newValue),this.mc.port2.postMessage(e))}postMessage(e){if(this.closed)throw new Error("InvalidStateError");let t=JSON.stringify(e),n=this.name+":"+String(Date.now())+String(Math.random());window.localStorage.setItem(n,t),T.setTimeout(()=>{window.localStorage.removeItem(n)},500),Y[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){var e;this.closed||(this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage),e=Y[this.name].indexOf(this),Y[this.name].splice(e,1))}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},Qe="undefined"==typeof window?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:Ke;function Ze(t=0){return new Promise(e=>T.setTimeout(e,t))}function le(){return Math.random().toString(36).substring(2)}!function(e){e[e.APPLY=0]="APPLY",e[e.TELL=1]="TELL",e[e.CLOSE=2]="CLOSE",e[e.REGISTER=3]="REGISTER",e[e.DEREGISTER=4]="DEREGISTER",e[e.IDLE=5]="IDLE",e[e.ACTIVE=6]="ACTIVE",e[e.PROMPT=7]="PROMPT",e[e.START=8]="START",e[e.RESET=9]="RESET",e[e.ACTIVATE=10]="ACTIVATE",e[e.PAUSE=11]="PAUSE",e[e.RESUME=12]="RESUME",e[e.MESSAGE=13]="MESSAGE"}(l=l||{});var k,Ee=class{constructor(e,t){this.token=le(),this.isLeader=!1,this.isDead=!1,this.isApplying=!1,this.reApply=!1,this.intervals=[],this.listeners=[],this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return!(this.reApply=!0);let n=!(this.isApplying=!0),e=e=>{var{token:e,action:t}=e.data;e!==this.token&&(t===l.APPLY&&e>this.token&&(n=!0),t===l.TELL&&(n=!0))};this.channel.addEventListener("message",e);try{return this.sendAction(l.APPLY),await Ze(this.options.responseTime),this.channel.removeEventListener("message",e),this.isApplying=!1,n?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let i=!1,o=null;return new Promise(t=>{let n=()=>{var e;i||(i=!0,T.clearInterval(o),e=this.intervals.indexOf(o),this.intervals.splice(e,1),this.channel.removeEventListener("message",r),t())},r=(o=T.setInterval(()=>{this.apply().then(()=>{this.isLeader&&n()})},this.options.fallbackInterval),this.intervals.push(o),e=>{e=e.data.action;e===l.CLOSE&&this.apply().then(()=>{this.isLeader&&n()})});this.channel.addEventListener("message",r)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;var e=e=>{e=e.data.action;e===l.APPLY&&this.sendAction(l.TELL)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(l.TELL)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership(),this.deferred)}close(){this.isDead||(this.isDead=!0,this.isLeader=!1,this.sendAction(l.CLOSE),this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>T.clearInterval(e)))}},be=(!function(e){e[e.PROMPTED=0]="PROMPTED",e[e.ACTIVE=1]="ACTIVE",e[e.IDLE=2]="IDLE"}(k=k||{}),class{constructor(e){this.token=le(),this.registry=new Map,this.allIdle=!1;var t=e["channelName"];this.options=e,this.channel=new Qe(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new Ee(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{var{action:e,token:t,data:n}=e.data;switch(e){case l.REGISTER:this.registry.set(t,2);break;case l.DEREGISTER:this.registry.delete(t);break;case l.IDLE:this.idle(t);break;case l.ACTIVE:this.active(t);break;case l.PROMPT:this.prompt(t);break;case l.START:this.start(t);break;case l.RESET:this.reset(t);break;case l.ACTIVATE:this.activate(t);break;case l.PAUSE:this.pause(t);break;case l.RESUME:this.resume(t);break;case l.MESSAGE:this.options.onMessage(n)}}),this.send(l.REGISTER)}get isLeader(){if(this.elector)return this.elector.isLeader;throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.')}prompt(e=this.token){this.registry.set(e,0);var t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(l.PROMPT),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);var t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(l.IDLE),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);var t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(l.ACTIVE),t&&this.options.onActive()}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.START):this.options.start(!0)}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.RESET):this.options.reset(!0)}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(l.ACTIVATE):this.options.activate(!0)}pause(e=this.token){e===this.token?this.send(l.PAUSE):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(l.RESUME):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:l.MESSAGE,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(l.DEREGISTER),this.channel.close()}}),et=w?document:null,ge=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"];function C(e){let t=react.exports.useRef(e);return react.exports.useEffect(()=>{t.current=e},[e]),t}function tt(t,n){let r;function e(...e){r&&clearTimeout(r),r=setTimeout(()=>{t(...e),r=null},n)}return e.cancel=function(){clearTimeout(r)},e}function ue(n,r){let i=0;return function(...e){var t=(new Date).getTime();if(!(t-i<r))return i=t,n(...e)}}var E=()=>(w?performance:Date).now();function $$3({timeout:e=12e5,promptTimeout:H=0,element:t=et,events:n=ge,timers:F=void 0,immediateEvents:r=[],onPrompt:B=()=>{},onIdle:U=()=>{},onActive:Z=()=>{},onAction:W=()=>{},onMessage:z=()=>{},debounce:i=0,throttle:o=0,eventsThrottle:a=200,startOnMount:s=!0,startManually:l=!1,stopOnIdle:G=!1,crossTab:c=!1,name:q="idle-timer",syncTimers:u=0,leaderElection:K=!1}={}){let d=react.exports.useRef(E()),Y=react.exports.useRef(Date.now()),p=react.exports.useRef(E()),f=react.exports.useRef(null),h=react.exports.useRef(null),Q=react.exports.useRef(null),m=react.exports.useRef(0),g=react.exports.useRef(!0),v=react.exports.useRef(!1),y=react.exports.useRef(!0),x=react.exports.useRef(!1),b=react.exports.useRef(!1),$=react.exports.useRef(0),S=react.exports.useRef(0),_=react.exports.useRef(null),j=react.exports.useRef(null),I=C(e),R=C(H),X=C(G),J=react.exports.useRef(r),O=react.exports.useRef(t),L=react.exports.useRef([...new Set([...n,...r]).values()]),ee=C(U),te=C(Z),ne=C(B),M=C(z),re=C(W),A=react.exports.useMemo(()=>{var e=e=>re.current(e);return 0<i?tt(e,i):0<o?ue(e,o):e},[o,i]),ie=react.exports.useRef(),k=(react.exports.useEffect(()=>{c&&u&&(ie.current=ue(()=>{j.current.active()},u))},[c,u]),()=>{null!==_.current&&(T.clearTimeout(_.current),_.current=null)}),N=(e,t=!0)=>{k(),_.current=T.setTimeout(le,e||I.current),t&&(h.current=E()),Q.current=Date.now()},oe=e=>{$.current=0,S.current=E(),b.current=!0,N(R.current,!1),ne.current(e)},ae=()=>{k(),g.current=!0,f.current=E(),X.current?D():b.current&&(S.current=0,b.current=!1),ee.current()},se=e=>{k(),b.current=!1,S.current=0,g.current=!1,m.current+=E()-f.current,P(),N(),te.current(e)},le=e=>{if(!g.current)return A.cancel&&A.cancel(),0<R.current&&!b.current?void(j.current?j.current.prompt():oe(e)):void(j.current?j.current.idle():ae());j.current?j.current.active():se(e)},ce=e=>{var t;A(e),b.current||(k(),!g.current&&J.current.includes(e.type)||!g.current&&Date.now()-Q.current>=I.current?le(e):(t=E()-h.current,g.current&&!G||!g.current&&t>=I.current?le(e):(v.current=!1,$.current=0,S.current=0,N(),c&&u&&ie.current())))},de=react.exports.useRef(),P=(react.exports.useEffect(()=>{var e=x.current;e&&D(),de.current=0<a?ue(ce,a):ce,e&&P()},[a,o,i,re,c,u]),()=>{w&&!x.current&&(L.current.forEach(e=>{O.current.addEventListener(e,de.current,{capture:!0,passive:!0})}),x.current=!0)}),D=(e=!1)=>{w&&(x.current||e)&&(L.current.forEach(e=>{O.current.removeEventListener(e,de.current,{capture:!0})}),x.current=!1)},V=react.exports.useCallback(e=>{k(),P(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,j.current&&!e&&j.current.start(),N()},[_,g,I,j]),pe=react.exports.useCallback(e=>{k(),P(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,d.current=E(),p.current=E(),j.current&&!e&&j.current.reset(),l||N()},[_,g,I,l,j]),fe=react.exports.useCallback(e=>{k(),P(),(g.current||b.current)&&se(),g.current=!1,b.current=!1,v.current=!1,$.current=0,S.current=0,p.current=E(),j.current&&!e&&j.current.activate(),N()},[_,g,I,j]),he=react.exports.useCallback((e=!1)=>!v.current&&($.current=Se(),v.current=!0,D(),k(),j.current&&!e&&j.current.pause(),!0),[_,j]),me=react.exports.useCallback((e=!1)=>!!v.current&&(v.current=!1,b.current||P(),g.current||N($.current),S.current&&(S.current=E()),j.current&&!e&&j.current.resume(),!0),[_,I,$,j]),ve=react.exports.useCallback((e,t)=>{j.current?(t&&M.current(e),j.current.message(e)):t&&M.current(e)},[z]),ye=react.exports.useCallback(()=>g.current,[g]),xe=react.exports.useCallback(()=>b.current,[b]),Ce=react.exports.useCallback(()=>{if(j.current)return j.current.isLeader;throw new Error('❌ Cross Tab feature is not enabled. To enable it set the "crossTab" property to true.')},[j]),we=react.exports.useCallback(()=>{if(j.current)return j.current.token;throw new Error('❌ Cross Tab feature is not enabled. To enable it set the "crossTab" property to true.')},[j]),Se=react.exports.useCallback(()=>{if(v.current)return $.current;var e=$.current||R.current+I.current,t=h.current?E()-h.current:0,e=Math.floor(e-t);return e<0?0:Math.abs(e)},[I,R,b,$,h]),Te=react.exports.useCallback(()=>Math.round(E()-p.current),[p]),_e=react.exports.useCallback(()=>Math.round(E()-d.current),[d]),Ee=react.exports.useCallback(()=>f.current?new Date(Y.current-d.current+f.current):null,[f]),je=react.exports.useCallback(()=>h.current?new Date(Y.current-d.current+h.current):null,[h]),Ie=react.exports.useCallback(()=>g.current?Math.round(E()-f.current+m.current):Math.round(m.current),[f,m]),Re=react.exports.useCallback(()=>{var e=Math.round(_e()-Ie());return 0<=e?e:0},[d,f,m]);return react.exports.useEffect(()=>{if(0<i&&0<o)throw new Error("❌ onAction can either be throttled or debounced, not both.");F&&$e(F);let e=()=>{j.current&&j.current.close(),A.cancel&&A.cancel(),k(),D(!0)};return w&&window.addEventListener("beforeunload",e),()=>{w&&window.removeEventListener("beforeunload",e),j.current&&j.current.close(),A.cancel&&A.cancel(),k(),D(!0)}},[]),react.exports.useEffect(()=>{j.current&&j.current.close(),j.current=c?new be({channelName:q,leaderElection:K,onPrompt:()=>{oe()},onIdle:()=>{ae()},onActive:()=>{se()},onMessage:M.current,start:V,reset:pe,activate:fe,pause:he,resume:me}):null},[c,q,K,ne,ee,te,M,V,pe,he,me]),react.exports.useEffect(()=>{k(),D(!0),y.current||(v.current=!0,g.current=!0,$.current=0),l||(s?V:P)()},[l,s,y]),react.exports.useEffect(()=>{var e;y.current||(e=[...new Set([...n,...r]).values()],D(),L.current=e,O.current=t,J.current=r,l||(s?V:P)())},[t,JSON.stringify(n),JSON.stringify(r),y,l,s]),react.exports.useEffect(()=>{y.current?y.current=!1:(I.current=e,l||(g.current&&(te.current(),j.current&&j.current.active()),V()))},[e,j,l,y,g]),{message:ve,start:V,reset:pe,activate:fe,pause:he,resume:me,isIdle:ye,isPrompted:xe,isLeader:Ce,getTabId:we,getRemainingTime:Se,getElapsedTime:Te,getTotalElapsedTime:_e,getLastIdleTime:Ee,getLastActiveTime:je,getTotalIdleTime:Ie,getTotalActiveTime:Re}}var WidgetsStatus,ce=react.exports.createContext(null),tinycolor$1=(ce.Consumer,{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:b(t[4]),format:n?"name":"hex8"};if(t=k.hex6.exec(e))return{r:g(t[1]),g:g(t[2]),b:g(t[3]),format:n?"name":"hex"};if(t=k.hex4.exec(e))return{r:g(t[1]+""+t[1]),g:g(t[2]+""+t[2]),b:g(t[3]+""+t[3]),a:b(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=k.hex3.exec(e))return{r:g(t[1]+""+t[1]),g:g(t[2]+""+t[2]),b:g(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(C(e.r)&&C(e.g)&&C(e.b)?(t=function(e,t,n){return{r:255*h(e,255),g:255*h(t,255),b:255*h(n,255)}}(e.r,e.g,e.b),a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):C(e.h)&&C(e.s)&&C(e.v)?(r=y(e.s),i=y(e.v),t=function(e,t,n){e=6*h(e,360),t=h(t,100),n=h(n,100);var r=$.floor(e),e=e-r,i=n*(1-t),o=n*(1-e*t),e=n*(1-(1-e)*t),t=r%6;return{r:255*[n,o,i,i,e,n][t],g:255*[e,n,n,o,i,i][t],b:255*[i,i,e,n,n,o][t]}}(e.h,r,i),a=!0,s="hsv"):C(e.h)&&C(e.s)&&C(e.l)&&(r=y(e.s),o=y(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=_(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=_(this._r)),this._g<1&&(this._g=_(this._g)),this._b<1&&(this._b=_(this._b)),this._ok=n.ok,this._tc_id=T++}function r(e,t,n){e=h(e,255),t=h(t,255),n=h(n,255);var r,i=j(e,t,n),o=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=[v(_(e).toString(16)),v(_(t).toString(16)),v(_(n).toString(16))];return r&&e[0].charAt(0)==e[0].charAt(1)&&e[1].charAt(0)==e[1].charAt(1)&&e[2].charAt(0)==e[2].charAt(1)?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0):e.join("")}function o(e,t,n,r){return[v(x(r)),v(_(e).toString(16)),v(_(t).toString(16)),v(_(n).toString(16))].join("")}function n(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.s-=t/100,e.s=m(e.s),u(e)}function a(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.s+=t/100,e.s=m(e.s),u(e)}function s(e){return u(e).desaturate(100)}function l(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.l+=t/100,e.l=m(e.l),u(e)}function c(e,t){t=0===t?0:t||10;e=u(e).toRgb();return e.r=j(0,E(255,e.r-_(-t/100*255))),e.g=j(0,E(255,e.g-_(-t/100*255))),e.b=j(0,E(255,e.b-_(-t/100*255))),u(e)}function d(e,t){t=0===t?0:t||10;e=u(e).toHsl();return e.l-=t/100,e.l=m(e.l),u(e)}function p(e,t){e=u(e).toHsl(),t=(e.h+t)%360;return e.h=t<0?360+t:t,u(e)}function N(e){e=u(e).toHsl();return e.h=(e.h+180)%360,u(e)}function P(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+120)%360,s:t.s,l:t.l}),u({h:(n+240)%360,s:t.s,l:t.l})]}function D(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+90)%360,s:t.s,l:t.l}),u({h:(n+180)%360,s:t.s,l:t.l}),u({h:(n+270)%360,s:t.s,l:t.l})]}function 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 v(e){return 1==e.length?"0"+e:""+e}function y(e){return e=e<=1?100*e+"%":e}function x(e){return $.round(255*parseFloat(e)).toString(16)}function b(e){return g(e)/255}function C(e){return k.CSS_UNIT.exec(e)}var $,w,S,T,_,E,j,I,R,O,L,M,A,k;$=Math,w=/^\s+/,S=/\s+$/,T=0,_=$.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=_(100*this._a)/100,this},toHsv:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=i(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),e=_(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+e+"%)":"hsva("+t+", "+n+"%, "+e+"%, "+this._roundA+")"},toHsl:function(){var e=r(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=r(this._r,this._g,this._b),t=_(360*e.h),n=_(100*e.s),e=_(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+e+"%)":"hsla("+t+", "+n+"%, "+e+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var t=this._r,n=this._g,r=this._b,i=this._a;return t=[v(_(t).toString(16)),v(_(n).toString(16)),v(_(r).toString(16)),v(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:_(this._r),g:_(this._g),b:_(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+_(this._r)+", "+_(this._g)+", "+_(this._b)+")":"rgba("+_(this._r)+", "+_(this._g)+", "+_(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:_(100*h(this._r,255))+"%",g:_(100*h(this._g,255))+"%",b:_(100*h(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+_(100*h(this._r,255))+"%, "+_(100*h(this._g,255))+"%, "+_(100*h(this._b,255))+"%)":"rgba("+_(100*h(this._r,255))+"%, "+_(100*h(this._g,255))+"%, "+_(100*h(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&O[t(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+o(this._r,this._g,this._b,this._a),n=t;return"progid:DXImageTransform.Microsoft.gradient("+(this._gradientType?"GradientType = 1, ":"")+"startColorstr="+t+",endColorstr="+(n=e?"#"+o((t=u(e))._r,t._g,t._b,t._a):n)+")"},toString:function(e){var t=!!e,n=(e=e||this._format,!1),r=this._a<1&&0<=this._a;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),(n="hsv"===e?this.toHsvString():n)||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(e,t){e=e.apply(null,[this].concat([].slice.call(t)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(n,arguments)},saturate:function(){return this._applyModification(a,arguments)},greyscale:function(){return this._applyModification(s,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(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]:y(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,displayChatWithSupport:a})=>{var s=useStyles$1$1()["classes"];const[l,c]=react.exports.useState(null);const u=()=>{c(null),null!=e&&e()};var d=n||r,p=null==(p=window.config)?void 0:p.appVersion;return jsxRuntime.exports.jsxs("div",Object.assign({className:s.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:s.barIcon,onClick:e=>{c(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(s.icon,s.helpIcon)})}))})),jsxRuntime.exports.jsx(Popover$1,Object.assign({open:Boolean(l),anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},onClose:u,className:s.popover,classes:{paper:s.popoverColor},disableScrollLock:!0},{children:jsxRuntime.exports.jsxs(List$2,Object.assign({disablePadding:!0,className:s.list},{children:[d&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{u(),null!=r&&r(),n&&window.open(n,"_blank")},"data-veritone-element":"show-help-doc-button","data-testid":"show-help-doc-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(AppBarArticleIcon,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.MSM3Vh",defaultMessage:"View Help Docs",description:"help tooltip: text for documentation"}),classes:{root:s.helpItemText}})]})),a&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{null!=i&&i(),sdkEventManager.dispatch(SdkEvents.openSupport),c(null)},"data-veritone-element":"open-chat-with-support-button","data-testid":"app-bar-show-chat-with-support-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(Chat,{fontSize:"small"})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-chat-with-support.MBM3Vh2",defaultMessage:"Chat with Support",description:"help tooltip: salesforce chat with support"}),classes:{root:s.helpItemText}})]})),o&&jsxRuntime.exports.jsxs(ListItemButton$1,Object.assign({onClick:()=>{null!=i&&i(),c(null)},"data-veritone-element":"open-support-chat-button","data-testid":"support-chat-button"},{children:[jsxRuntime.exports.jsx(ListItemIcon$1,{children:jsxRuntime.exports.jsx(AppBarInAppGuidance,{})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.8aLpuV",defaultMessage:"In-App Guidance",description:"help tooltip: text for documentation"}),classes:{root:s.helpItemText}})]})),p&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(ListItem$1,Object.assign({className:s.versionWrapper},{children:jsxRuntime.exports.jsx(ListItemText$1,{primary:p,classes:{primary:s.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,g]=react.exports.useState(new Date),[v,y]=react.exports.useState(),[x,b]=react.exports.useState(),[C,$]=react.exports.useState(!1),[w,S]=react.exports.useState(!1),T=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setIsIdle,value:e,ephemeral:!0,contentType:"json"}))},[n]),_=(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])),E=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setClickedLogout,value:e,ephemeral:!0,contentType:"json"}))},[n]),j=react.exports.useCallback(e=>{n(postNotificationCommand({eventType:aiwareEvent,command:notificationCommands.setCallResetIdleTimer,value:e,ephemeral:!0,contentType:"json"}))},[n]),I=react.exports.useCallback(()=>{logoutCallCounter++,_(!0);var e=l?500:5e3;n(logoutRequest({token:o})),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},t?2e3:e)},[_,n,o,a,l]);var R=react.exports.useCallback(()=>{logoutCallCounter++,T(!1),setTimeout(()=>{_(!0),E(!0),n(logoutRequest({token:o}))},500),setTimeout(()=>{window.location.href=a+"/#/?redirect="+window.location.href},500)},[_,n,o,a,E,T]);var O=()=>{T(!0),clearInterval(timer),timer=setInterval(()=>{h(e=>e-1)},1e3)},L=()=>{!r&&p<RESET_IDLE_TIMER_CALL_LIMIT&&j(!0)};const M=$$3(t?{timeout:5e3,onIdle:O,onAction:L,debounce:1e3,crossTab:!0,syncTimers:200}:{timeout:6e4*i,onIdle:O,onAction:L,debounce:i/4*6e4,crossTab:!0,syncTimers:200})["reset"],A=react.exports.useCallback(()=>{j(!1),M()},[j]),k=react.exports.useCallback(()=>{w&&(n(extendTokenRequest({token:o})),S(!1)),T(!1),A(),clearInterval(timer),setTimeout(()=>{h(t?5:60)},500)},[T,A,w,n,o]);return react.exports.useEffect(()=>{setTimeout(()=>{g(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)),y(e)}},[c]),react.exports.useEffect(()=>{x&&x.getTime()<m.getTime()&&$(!0),v&&v.getTime()<m.getTime()&&S(!0)},[x,v,m]),react.exports.useEffect(()=>{C?I():w&&T(!0)},[x,v,w,C,I,T]),react.exports.useEffect(()=>{s&&logoutCallCounter<LOGOUT_CALL_LIMIT&&I()},[s,I]),react.exports.useEffect(()=>{r&&0===f&&(clearInterval(timer),setTimeout(()=>{h(10)},500),I())},[f,I,r]),react.exports.useEffect(()=>{!r&&u&&p===RESET_IDLE_TIMER_CALL_LIMIT&&A()},[u,r,p,A]),react.exports.useEffect(()=>{r||k()},[r,k]),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"}):w?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.bDessH",defaultMessage:"Your session will expire soon. For your security, we'll automatically sign you out in {signOutTimer} seconds. Choose 'Stay Signed In' to continue or 'Sign Out' if you're done.",description:"label for idle warning expiring soon",values:{signOutTimer:f}}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.Ca6Qq0",defaultMessage:"You've been inactive for a while. For your security, we'll automatically sign you out in {signOutTimer} seconds. Choose 'Stay Signed In' to continue or 'Sign Out' if you're done.",description:"label for idle warning inactive for a while",values:{signOutTimer:f}})}))}),s?null:jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:e.dialogActions},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:R,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:k,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:v,openSetting:y,organization:x={},panels:b=[],unseenCount:C,searchBarMountId:$,textColor:w,rightActions:S=[],applications:T=[],onClickAppSwitchIcon:_,displaySupportChat:E=!0,onDashboardClick:j,showDashboardIcon:I=!1,displayChatWithSupport:R=!0}){var O=tinycolor(o).isDark(),w=w||(O?"#fff":"#000"),O=O?"rgba(255,255,255,0.1)":"rgb(243,245,249)";const L=useStyles$2$1({titleColor:w,logo:i,activeColor:O})["classes"],[M,A]=react.exports.useState([]);O=useSelector(userSelector)||{};const[k,N]=react.exports.useState(!0);var{appIcon:O,currentUser:P}=getUserInfo(O),D=useSelector(betaFeaturesSelector);return react.exports.useEffect(()=>{var e=b.map(e=>e.panelId);!e.length&&!M.length||isEqual$2(e,M)||A(e)},[b,M]),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:L.appBar,style:{height:appBarHeight,background:o,zIndex:t}},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:L.menuButton},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"app-bar-menu","data-testid":"app-bar-menu",className:L.iconButton,onClick:r,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.hamburgerIcon)})}))})),!!O&&""!==O&&jsxRuntime.exports.jsx("div",Object.assign({className:L.margin},{children:jsxRuntime.exports.jsx("img",{className:L.appIcon,src:O,alt:"appIcon"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:L.content,style:{color:w}},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.left,L.noSelect),onClick:function(){window.location.href="/"},"data-test":"appbarTitle","data-testid":"appbarTitle"},{children:i?jsxRuntime.exports.jsx("span",{className:L.appLogo}):jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:L.title},{children:a}))})),jsxRuntime.exports.jsx("div",{"data-test":"appbarSearch",id:$||"search-bar-id",className:L.searchBarHolder}),jsxRuntime.exports.jsx("div",Object.assign({className:L.right},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:L.controllers},{children:[0<S.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.iconGroup,L.noSelect)},{children:S.map(({label:e,onClick:t,isActive:n=!0},r)=>jsxRuntime.exports.jsx("div",Object.assign({className:L.iconGroupIcon},{children:jsxRuntime.exports.jsx("span",{onClick:e=>t?t(e):null,className:classnames(L.rightActionLabel,n?L.active:L.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:L.barIcon,onClick:j,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.dashboardIcon)})}))})),s&&jsxRuntime.exports.jsx("div",Object.assign({"data-test":"app-bar-help-container","data-testid":"app-bar-help-container",className:classnames(L.margin,{[L.panelActive]:M.includes(HELP_PANEL_ID)})},{children:jsxRuntime.exports.jsx(Help,{tooltipTitle:"",helpDocLabel:"View Help Docs",chatWithSupportLabel:"Chat with Support",supportLabel:"In-App Guidance",helpDocCallback:()=>{null!=m&&m()},supportCallback:p,titleColor:w,displaySupportChat:E,displayChatWithSupport:R})})),l&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.margin,{[L.panelActive]:M.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:L.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:C,max:NOTIFICATION_BADGE_MAX_COUNT,color:"primary","data-test":"app-bar-notification-badge",className:L.notificationBadge},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.notificationIcon,{[L.openNotificationPanel]:null==y?void 0:y.openNotificationPanel})})}))}))}))})),D&&c&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.margin,{[L.panelActive]:M.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:L.barIcon,onClick:v,size:"large","data-testid":"app-bar-user-application-settings-button"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.applicationSettingsIcon)})}))}))})),1<T.length&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames({[L.panelActive]:M.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:L.barIcon,onClick:_,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.applicationIcon,{[L.openPanel]:null==y?void 0:y.openAppSwitchPanel})})}))}))})),(x.imageUrl||x.name)&&e&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames(L.margin,{[L.panelActive]:M.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:L.barIcon+" "+L.orgButton,onClick:u,size:"large"},{children:x.imageUrl&&k?jsxRuntime.exports.jsx("img",{src:x.imageUrl,className:classnames(L.orgIcon),onError:function(){N(!1)},alt:"org_icon"}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:L.smallOrgAvatar,variant:"circular","data-testid":"app-bar-avatar"},{children:getSortName(x.name||"")}))}))}))})),P&&jsxRuntime.exports.jsx("div",Object.assign({className:classnames({[L.panelActive]:M.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:L.barIcon,onClick:h,size:"large"},{children:jsxRuntime.exports.jsx("div",{className:classnames(L.icon,L.veritoneLogo,{[L.openPanel]:null==y?void 0:y.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,{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=`
|
|
1368
1368
|
query {
|
|
1369
1369
|
application(id:"${t}"){
|
|
1370
1370
|
iconUrl
|
|
@@ -1383,4 +1383,4 @@ createScheduledJob(input:{
|
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
|
-
`,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$1),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),[v,y]=react.exports.useState(!1),[x,b]=react.exports.useState(!1);var C=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var w=useSelector(unseenNotificationSelector);const S=useSelector(notificationStatusSelector);var T=useSelector(betaFeaturesSelector),C=(C||{})["organization"];const _=useSelector(authSelector)["user"];var{application:E=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);var R=T;const O=useSelector(appIdSelector),L=useSelector(selectApplicationConfig),[N,P]=react.exports.useState(!1),M=gqlIntrospection.isOperationValid("fileApplication","mutation")&&T;function A(){u(!1),h(!1),g(!1),p(!1),y(!1),b(!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&&P(!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(){k()},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===_||void 0===_?void 0:_.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(),v?(y(!1),k()):(A(),k(),y(!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?(b(!1),k()):(A(),k(),b(!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:C,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:M?720:420,header:{divider:!0,title:M?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle-app-switcher",defaultMessage:"App Switcher",description:"Title of applications panel list"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle-applications",defaultMessage:"Applications",description:"Title of applications panel list"}),actions:M?[{action:{type:"user-app-group/createNewAppGroupPlaceholder"},label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header-action.new-app-group",defaultMessage:"New App Group",description:"New App Group action button"}),variant:"contained",size:"large",color:"primary",submit:!0}]:void 0}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:E,showDashboardIcon:R,userApplicationSettingsIcon:N},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.esm27.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm29.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm29.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm29.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.esm27.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm27.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm27.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm33.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm30.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm30.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm30.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm30.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm30.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm34.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm34.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm34.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm40.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm42.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm43.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm44.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm46.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm19.js").then(function(e){return e.j}),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.j}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm19.js").then(function(e){return e.j}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm19.js").then(function(e){return e.j}),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.esm40.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm40.js"),t=e.EditFileMetadata;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm47.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm47.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_EVENT_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterEventPanel;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_ADD_ENGINE_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterAddEnginePanel;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm46.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm37.js").then(function(e){return e.a}),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm36.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm36.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm36.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm36.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm34.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm34.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm34.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm37.js").then(function(e){return e.a}),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm37.js").then(function(e){return e.a}),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm45.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm48.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$1())},1e3)):store$4.dispatch(logout$1())},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"),"_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):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:"0df45aee4"});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 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$5 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,_createCompounder 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$9 as bA,isEmpty_1 as bB,Backdrop$1 as bC,CircularProgress$1 as bD,getDefaultMiddleware as bE,isNil_1 as bF,UpDown as bG,Icon$1 as bH,get_1 as bI,map_1 as bJ,keys_1 as bK,RadioGroup$1 as bL,Avatar$1 as bM,img$s as bN,FormHelperText$2 as bO,img$c as bP,StyledEngineProvider as bQ,ThemeProvider as bR,lightTheme as bS,CssBaseline as bT,Hide as bU,showMessage as bV,MessageSeverity as bW,baseGraphQLApi as bX,Radio$1 as bY,fetchEngine as bZ,_hasPath 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,connect as bo,Bookmark as bp,EngineFlagIcons as bq,createAsyncThunk as br,withStyles as bs,getConfigModule as bt,getAuthModule as bu,getSnackbarModule as bv,CacheProvider as bw,muiCache as bx,img$N as by,img$a as bz,Paper$1 as c,orange$1 as c$,_baseIteratee as c0,isArrayLike_1 as c1,toInteger_1 as c2,hoistNonReactStatics_cjs as c3,Transition$1 as c4,useControlled as c5,ButtonBase$1 as c6,alpha as c7,commonjsGlobal$1 as c8,getDefaultExportFromCjs as c9,img$1u as cA,configSelector as cB,baseGraphQLApiWithError as cC,useDoubleClick as cD,VerifiedFilled as cE,Add as cF,img$12 as cG,Filter$1 as cH,Collapse$1 as cI,DynamicTable as cJ,useTheme$2 as cK,getThemeProps as cL,React$2 as cM,_arrayPush as cN,isArray_1 as cO,_castPath as cP,_isIndex as cQ,isObject_1 as cR,_toKey as cS,_baseToString as cT,_baseTrim as cU,_castSlice as cV,_stringToArray as cW,toString_1 as cX,lib as cY,getThunkExtension_1 as cZ,composeWithDevTools as c_,TransitionGroup$1 as ca,useForkRef as cb,useEnhancedEffect$1 as cc,combineReducers as cd,createSelector as ce,fork as cf,AIWareThemeProvider as cg,Stack$4 as ch,Close$1 as ci,FullscreenExit as cj,Fullscreen as ck,TabPanel as cl,default_1$2 as cm,InputAdornment$1 as cn,unmountPanel$1 as co,AvailableComponents as cp,delay$1 as cq,mountPanel$1 as cr,DialogContentText$1 as cs,MoreVert as ct,Menu$1 as cu,Edit as cv,Upload as cw,Delete as cx,CustomTabs as cy,useBackupImg as cz,capitalize$2 as d,_isIterateeCall as d$,deepOrange$1 as d0,createTheme$1 as d1,createIntl as d2,SvgIcon$1 as d3,unmountAllPanel$1 as d4,takeEvery$1 as d5,isNull_1 as d6,size_1 as d7,take as d8,startCase_1 as d9,useEventCallback as dA,setRef as dB,inputClasses$1 as dC,inputBaseClasses$1 as dD,outlinedInputClasses$1 as dE,filledInputClasses$1 as dF,ClearIcon as dG,ArrowDropDownIcon as dH,memoizeOne as dI,_baseEach as dJ,_arrayFilter as dK,_getNative as dL,eq_1 as dM,_root as dN,_Uint8Array as dO,_overArg as dP,_isPrototype as dQ,isObjectLike_1 as dR,_baseGetTag as dS,_arrayLikeKeys as dT,isArguments_1 as dU,isBuffer$3 as dV,isFunction_1 as dW,isTypedArray_1 as dX,_Stack as dY,_baseFor as dZ,identity_1 as d_,times_1 as da,ReactIs as db,upperFirst_1 as dc,_arrayMap as dd,isString_1 as de,_baseGet as df,_baseSlice as dg,channel as dh,useIntl as di,VideoCamera as dj,Image$1 as dk,Sound as dl,Description as dm,toNumber_1 as dn,ProgressStepper as dp,CurlyBraces as dq,UnknownDocument as dr,sdkEventManager as ds,SdkEvents as dt,SdkError as du,EngineClassIcons as dv,Mode2 as dw,EngineModeIcons as dx,DeploymentModelIcons as dy,guid as dz,_objectWithoutPropertiesLoose$2 as e,img$1p as e$,_Set as e0,_setToArray as e1,_SetCache as e2,_cacheHas as e3,isSymbol_1 as e4,_baseMap as e5,_baseUnary as e6,emStyled as e7,deepmerge as e8,isPlainObject as e9,userSelector$2 as eA,enableBetaFeatures as eB,Badge$1 as eC,openLinkOnNewTab as eD,authSelector as eE,injectIntl as eF,headerBarSelector as eG,getSortName as eH,img$5 as eI,InputLabel$1 as eJ,ListItemAvatar$1 as eK,OrganizationTabIcon as eL,ScopedCssBaseline$1 as eM,AlarmTwo as eN,getApplicationsApi as eO,ListItemSecondaryAction$1 as eP,updateTokenSuccess as eQ,postNotificationCommand as eR,aiwareEvent as eS,notificationCommands as eT,panelsSelector as eU,css as eV,avatarClasses as eW,img$J as eX,img$I as eY,img$1r as eZ,img$1q as e_,useTheme$3 as ea,_Symbol as eb,Slide$1 as ec,hidePanel$1 as ed,updatePanelMicroFrontendProps as ee,setData as ef,useIsFocusVisible as eg,ownerDocument as eh,appendOwnerState as ei,lighten as ej,darken as ek,slotShouldForwardProp as el,shouldSpreadAdditionalProps$1 as em,keyframes as en,TabId as eo,PersonalProfile$1 as ep,Organizations as eq,DataCenter as er,FlowCenter2 as es,DeveloperCenter as et,Marketplace as eu,LibraryCenter as ev,AdminCenter as ew,img$P as ex,img$1 as ey,img$w as ez,clsx as f,formatBytes as f$,img$G as f0,img$1s as f1,img$F as f2,emphasize as f3,_arraySome as f4,Process as f5,Information as f6,NewFolder as f7,SpecialFolder as f8,User as f9,img as fA,FilterRemove as fB,FolderOpen as fC,Voice as fD,FolderFilled as fE,Time as fF,img$u as fG,Undefined as fH,YoutubeSource as fI,PodcastSource as fJ,TVSource as fK,RadioSource as fL,validate as fM,selectOrgId as fN,selectIsUserAdmin as fO,ErrorState$1 as fP,StepConnector$1 as fQ,NullState$2 as fR,Group as fS,PermissionChangedAction as fT,Lock as fU,AddGroup as fV,StepperContext$1 as fW,StepContext$1 as fX,initialConfigSelector as fY,ConfirmationModal as fZ,EnumHelpers as f_,Source as fa,ProcessingDetail as fb,Search$1 as fc,betaFeaturesSelector as fd,getLibraryModule as fe,selectApiConfigs$1 as ff,selectIsOLPEnabled as fg,FullScreenContainer as fh,cmsUrlSelector as fi,UserAddFilled as fj,Popover$1 as fk,MenuList$1 as fl,MoveFolder as fm,ErrorBoundary$1 as fn,Download as fo,img$6 as fp,selectPanelByPanelName as fq,EngineCategoryIcons as fr,Settings$2 as fs,Hamburger as ft,List as fu,EditAttributes as fv,MoreHor as fw,ExpandMore as fx,img$r as fy,img$t as fz,generateUtilityClass as g,NotInterested as g0,mountPanelForResponse$1 as g1,ApplicationTabIcon as g2,SecurityGroup as g3,NoApps as g4,green$1 as g5,selectors as g6,LibraryDropdown as g7,Remove as g8,Save as g9,Input$2 as ga,Copy as gb,ArrowForward as gc,_getSymbols as gd,stubArray_1 as ge,_baseGetAllKeys as gf,_getTag as gg,_nodeUtil as gh,_getAllKeys as gi,_baseIsEqual as gj,_castFunction as gk,Input as gl,AddUser as gm,Modal$1 as gn,registry as go,registerComponent as gp,AvailableWidgets as gq,root as gr,mountWidget as gs,unmountWidget as gt,mountPanel as gu,unmountPanel as gv,hidePanel as gw,unmountAllPanel as gx,init as gy,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};
|
|
1386
|
+
`,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$1),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),[v,y]=react.exports.useState(!1),[x,b]=react.exports.useState(!1);var C=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var w=useSelector(unseenNotificationSelector);const S=useSelector(notificationStatusSelector);var T=useSelector(betaFeaturesSelector),C=(C||{})["organization"];const _=useSelector(authSelector)["user"];var{application:E=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);const R=useSelector(appIdSelector),O=useSelector(selectApplicationConfig),[L,M]=react.exports.useState(!1);var N=useSelector(selectHasUserCreateRootFolderPermission);const P=gqlIntrospection.isOperationValid("fileApplication","mutation")&&N;function A(){u(!1),h(!1),g(!1),p(!1),y(!1),b(!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:R})),"?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!==O&&void 0!==O&&O.length&&M(!0)},[O]),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(){k()},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===_||void 0===_?void 0:_.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(),v?(y(!1),k()):(A(),k(),y(!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?(b(!1),k()):(A(),k(),b(!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:C,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,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle-app-switcher",defaultMessage:"App Switcher",description:"Title of applications panel list"}),actions:P?[{action:{type:"user-app-group/createNewAppGroupPlaceholder"},label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header-action.new-app-group",defaultMessage:"New App Group",description:"New App Group action button"}),variant:"contained",size:"large",color:"primary",submit:!0}]:void 0}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:E,showDashboardIcon:T,userApplicationSettingsIcon:L},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.esm27.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm29.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm29.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm29.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.esm27.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm27.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm27.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm33.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm30.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm30.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm30.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm30.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm30.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm34.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm34.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm34.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm40.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm42.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm43.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm44.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm46.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm19.js").then(function(e){return e.j}),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.j}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm19.js").then(function(e){return e.j}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm19.js").then(function(e){return e.j}),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.esm40.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm40.js"),t=e.EditFileMetadata;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm47.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm47.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_EVENT_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterEventPanel;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_ADD_ENGINE_PANEL:e=yield import("./js-core.esm47.js"),t=e.AppCenterAddEnginePanel;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm46.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm37.js").then(function(e){return e.a}),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm36.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm36.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm36.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm36.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm34.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm34.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm34.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm37.js").then(function(e){return e.a}),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm37.js").then(function(e){return e.a}),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm45.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm48.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,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),!0}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});!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://support.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://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(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$1())},1e3)):store$4.dispatch(logout$1())},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"),"_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):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:"6d205c494"});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 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$5 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,flowStyles as av,NoResults as aw,fetchVeritoneGraphQLApi as ax,img$8 as ay,setApiEndpoint as az,styled$1 as b,_createCompounder 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$9 as bA,isEmpty_1 as bB,Backdrop$1 as bC,CircularProgress$1 as bD,getDefaultMiddleware as bE,isNil_1 as bF,UpDown as bG,Icon$1 as bH,get_1 as bI,map_1 as bJ,keys_1 as bK,RadioGroup$1 as bL,Avatar$1 as bM,img$s as bN,FormHelperText$2 as bO,img$c as bP,StyledEngineProvider as bQ,ThemeProvider as bR,lightTheme as bS,CssBaseline as bT,Hide as bU,showMessage as bV,MessageSeverity as bW,baseGraphQLApi as bX,Radio$1 as bY,fetchEngine as bZ,_hasPath 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,connect as bo,Bookmark as bp,EngineFlagIcons as bq,createAsyncThunk as br,withStyles as bs,getConfigModule as bt,getAuthModule as bu,getSnackbarModule as bv,CacheProvider as bw,muiCache as bx,img$N as by,img$a as bz,Paper$1 as c,deepOrange$1 as c$,_baseIteratee as c0,isArrayLike_1 as c1,toInteger_1 as c2,hoistNonReactStatics_cjs as c3,useControlled as c4,ButtonBase$1 as c5,alpha as c6,commonjsGlobal$1 as c7,getDefaultExportFromCjs as c8,useEnhancedEffect$1 as c9,configSelector as cA,baseGraphQLApiWithError as cB,useDoubleClick as cC,VerifiedFilled as cD,Add as cE,img$12 as cF,Filter$1 as cG,Collapse$1 as cH,DynamicTable as cI,useTheme$2 as cJ,getThemeProps as cK,React$2 as cL,_arrayPush as cM,isArray_1 as cN,_castPath as cO,_isIndex as cP,isObject_1 as cQ,_toKey as cR,_baseToString as cS,_baseTrim as cT,_castSlice as cU,_stringToArray as cV,toString_1 as cW,lib as cX,getThunkExtension_1 as cY,composeWithDevTools as cZ,orange$1 as c_,useEventCallback as ca,useForkRef as cb,combineReducers as cc,createSelector as cd,fork as ce,AIWareThemeProvider as cf,Stack$4 as cg,Close$1 as ch,FullscreenExit as ci,Fullscreen as cj,TabPanel as ck,default_1$2 as cl,InputAdornment$1 as cm,unmountPanel$1 as cn,AvailableComponents as co,delay$1 as cp,mountPanel$1 as cq,DialogContentText$1 as cr,MoreVert as cs,Menu$1 as ct,Edit as cu,Upload as cv,Delete as cw,CustomTabs as cx,useBackupImg as cy,img$1u as cz,capitalize$2 as d,_setToArray as d$,createTheme$1 as d0,createIntl as d1,SvgIcon$1 as d2,unmountAllPanel$1 as d3,takeEvery$1 as d4,isNull_1 as d5,size_1 as d6,take as d7,startCase_1 as d8,times_1 as d9,inputClasses$1 as dA,inputBaseClasses$1 as dB,outlinedInputClasses$1 as dC,filledInputClasses$1 as dD,ClearIcon as dE,ArrowDropDownIcon as dF,memoizeOne as dG,_baseEach as dH,_arrayFilter as dI,_getNative as dJ,eq_1 as dK,_root as dL,_Uint8Array as dM,_overArg as dN,_isPrototype as dO,isObjectLike_1 as dP,_baseGetTag as dQ,_arrayLikeKeys as dR,isArguments_1 as dS,isBuffer$3 as dT,isFunction_1 as dU,isTypedArray_1 as dV,_Stack as dW,_baseFor as dX,identity_1 as dY,_isIterateeCall as dZ,_Set as d_,ReactIs as da,upperFirst_1 as db,_arrayMap as dc,isString_1 as dd,_baseGet as de,_baseSlice as df,channel as dg,useIntl as dh,VideoCamera as di,Image$1 as dj,Sound as dk,Description as dl,toNumber_1 as dm,ProgressStepper as dn,CurlyBraces as dp,UnknownDocument as dq,sdkEventManager as dr,SdkEvents as ds,SdkError as dt,EngineClassIcons as du,Mode2 as dv,EngineModeIcons as dw,DeploymentModelIcons as dx,guid as dy,setRef as dz,_objectWithoutPropertiesLoose$2 as e,img$1s as e$,_SetCache as e0,_cacheHas as e1,isSymbol_1 as e2,_baseMap as e3,_baseUnary as e4,emStyled as e5,deepmerge as e6,isPlainObject as e7,useTheme$3 as e8,_Symbol as e9,Badge$1 as eA,openLinkOnNewTab as eB,authSelector as eC,injectIntl as eD,headerBarSelector as eE,getSortName as eF,img$5 as eG,InputLabel$1 as eH,ListItemAvatar$1 as eI,OrganizationTabIcon as eJ,ScopedCssBaseline$1 as eK,AlarmTwo as eL,getApplicationsApi as eM,ListItemSecondaryAction$1 as eN,updateTokenSuccess as eO,postNotificationCommand as eP,aiwareEvent as eQ,notificationCommands as eR,panelsSelector as eS,css as eT,avatarClasses as eU,img$J as eV,img$I as eW,img$1r as eX,img$1q as eY,img$1p as eZ,img$G as e_,Slide$1 as ea,hidePanel$1 as eb,updatePanelMicroFrontendProps as ec,setData as ed,useIsFocusVisible as ee,ownerDocument as ef,appendOwnerState as eg,lighten as eh,darken as ei,slotShouldForwardProp as ej,shouldSpreadAdditionalProps$1 as ek,keyframes as el,TabId as em,PersonalProfile$1 as en,Organizations as eo,DataCenter as ep,FlowCenter2 as eq,DeveloperCenter as er,Marketplace as es,LibraryCenter as et,AdminCenter as eu,img$P as ev,img$1 as ew,img$w as ex,userSelector$2 as ey,enableBetaFeatures as ez,clsx as f,mountPanelForResponse$1 as f$,img$F as f0,emphasize as f1,_arraySome as f2,Process as f3,Information as f4,NewFolder as f5,SpecialFolder as f6,User as f7,Source as f8,ProcessingDetail as f9,FolderOpen as fA,Voice as fB,FolderFilled as fC,Time as fD,img$u as fE,Undefined as fF,YoutubeSource as fG,PodcastSource as fH,TVSource as fI,RadioSource as fJ,validate as fK,selectOrgId as fL,selectIsUserAdmin as fM,ErrorState$1 as fN,StepConnector$1 as fO,NullState$2 as fP,Group as fQ,PermissionChangedAction as fR,Lock as fS,AddGroup as fT,StepperContext$1 as fU,StepContext$1 as fV,initialConfigSelector as fW,ConfirmationModal as fX,EnumHelpers as fY,formatBytes as fZ,NotInterested as f_,Search$1 as fa,betaFeaturesSelector as fb,getLibraryModule as fc,selectApiConfigs$1 as fd,selectIsOLPEnabled as fe,FullScreenContainer as ff,cmsUrlSelector as fg,UserAddFilled as fh,Popover$1 as fi,MenuList$1 as fj,MoveFolder as fk,ErrorBoundary$1 as fl,Download as fm,img$6 as fn,selectPanelByPanelName as fo,EngineCategoryIcons as fp,Settings$2 as fq,Hamburger as fr,List as fs,EditAttributes as ft,MoreHor as fu,ExpandMore as fv,img$r as fw,img$t as fx,img as fy,FilterRemove as fz,generateUtilityClass as g,ApplicationTabIcon as g0,SecurityGroup as g1,NoApps as g2,green$1 as g3,selectors as g4,LibraryDropdown as g5,Remove as g6,Save as g7,Input$2 as g8,Copy as g9,ArrowForward as ga,_getSymbols as gb,stubArray_1 as gc,_baseGetAllKeys as gd,_getTag as ge,_nodeUtil as gf,_getAllKeys as gg,_baseIsEqual as gh,_castFunction as gi,Input as gj,AddUser as gk,Modal$1 as gl,registry as gm,registerComponent as gn,AvailableWidgets as go,root as gp,mountWidget as gq,unmountWidget as gr,mountPanel as gs,unmountPanel as gt,hidePanel as gu,unmountAllPanel as gv,init as gw,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};
|