aiware-js 1.0.0-master.725 → 1.0.0-master.727
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.js +1 -1
- package/index.esm.js.gz +0 -0
- package/js-core.esm.js +2 -2
- package/js-core.esm.js.gz +0 -0
- package/js-core.esm60.js +6 -5
- package/js-core.esm60.js.gz +0 -0
- package/js-core.esm62.js +1 -1
- package/js-core.esm62.js.gz +0 -0
- package/js-core.esm65.js +1 -1
- package/js-core.esm65.js.gz +0 -0
- package/js-core.esm66.js +1 -1
- package/js-core.esm66.js.gz +0 -0
- package/js-core.esm79.js +1 -1
- package/js-core.esm79.js.gz +0 -0
- package/js-core.esm81.js +1 -1
- package/js-core.esm81.js.gz +0 -0
- package/js-core.esm82.js +1 -1
- package/js-core.esm82.js.gz +0 -0
- package/js-core.esm85.js +1 -1
- package/js-core.esm85.js.gz +0 -0
- package/js-core.esm86.js +1 -1
- package/js-core.esm86.js.gz +0 -0
- package/js-core.esm90.js +1 -1
- package/js-core.esm90.js.gz +0 -0
- package/js-core.umd.css +92 -92
- package/js-core.umd.css.gz +0 -0
- package/js-core.umd.js +157 -156
- package/js-core.umd.js.gz +0 -0
- package/js-core.umd.min.css +92 -92
- package/js-core.umd.min.css.gz +0 -0
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{h2 as AvailableWidgets,hd as aiwareEvents,ha as hidePanel,cz as hidePanelAction,hc as init,h8 as mountPanel,cA as mountPanelAction,h6 as mountWidget,h1 as registerComponent,h0 as registry,h5 as root,h4 as setData,s as store,hb as unmountAllPanel,h9 as unmountPanel,cw as unmountPanelAction,h7 as unmountWidget,h3 as updatePanelMicroFrontendPropsAction}from"./js-core.esm.js";
|
package/index.esm.js.gz
CHANGED
|
Binary file
|
package/js-core.esm.js
CHANGED
|
@@ -992,7 +992,7 @@ createScheduledJob(input:{
|
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
}`,graphEndpoint:i,token:o})).errors||(e=null==(s=null==n?void 0:n.data)?void 0:s.__type)&&(n=e["name"],(n={name:n,fields:[]}).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(n),e=n),a){const r=[];return null!==e&&void 0!==e&&e.fields.forEach(t=>{a.find(e=>t.name===e)&&r.push(t)}),r}return null===e||void 0===e?void 0:e.fields}})}typeBuilder(e){if(e.name)return e.name;let t="";return t=e.kind&&("NON_NULL"===e.kind&&(t=this.typeBuilder(e.ofType)+"!"),"LIST"===e.kind)?"["+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(d,p,f,h,m=[],g,n=1,v=2){var x;return __awaiter$a(this,void 0,void 0,function*(){let e=" ",r="",t=v;for(;t-1;)e+=" ",r+=" ",--t;!this.types.find(e=>e.name===p)&&p&&(yield this.getAvailableFields(f,h,p));let i=n;for(;i<d.length;){let n;const l=d[i].includes("...");l?(n=d[i].split("on")[1].split("{")[0].trim(),yield this.getAvailableFields(f,h,n)):n=d[i].trim().split("(")[0].trim().split("{")[0].trim();let t;t=n.includes(":")?n.split(":")[1]:n;var o=this.types.find(e=>l?e.name===n:e.name===(p||"").replace(/[\[\]!]+/g,""));if(o||"}"===n||l){var a=l?o:null==o?void 0:o.fields.find(e=>e.name===t);if(a||"}"===n){let t="";if(d[i].includes("(")&&a){var s=this.getParameters(d,i),s=this.paramsParser(s,g);if(s.length){const c=[],u=(null==(x=null==o?void 0:o.fields.find(e=>e.name===n))?void 0:x.args)||[];s.forEach(t=>{var e,n=u.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),c.push(Object.assign(Object.assign({},n),{field:t.field})))}),c.length&&(t+="(",c.forEach(e=>t+=`${e.name}: ${e.field} `),t+=")")}}if(d[i].includes("{")&&a||l){l?m.push(`${e}... on ${n} ${t}{`):m.push(""+e+n+` ${t}{`);o=l?n:(null==a?void 0:a.type)||null;i=yield this.recursiveFieldCheck(d,o,f,h,m,g,i+1,v+1)}else{if(d[i].includes("}"))return m.push(r+"}"),i===d.length-1?this.nestingChecker(m).join("\n"):i;m.push(""+e+n)}}else if(d[i].includes("{")){let e=1;for(;e;)i+=1,d[i].includes("{")&&(e+=1),d[i].includes("}")&&--e}}i+=1}})}getParameters(e,t){return e[t].split("(")[1].split(")")[0].trim().replace(/:\s/g,":")}paramsParser(e,n){e=e.split(":");const r=[];e.forEach(e=>{e=e.trim();let t;e.includes(" ")&&(t=e.split(" ")),(t=e.includes(",")?e.split(","):t)?t.forEach(e=>r.push(e.trim())):r.push(e)});var i=[];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(g,v,x){return __awaiter$a(this,void 0,void 0,function*(){this.params=[];try{this.initialized||(yield this.initialize(g,v,!1));var o=x.split("\n");let i,e="",t="";o[0].includes("(")?(1<(i=o[0].split("(")[0].trim()).split(" ").length&&([i,e]=i.split(" ")),(t=(t=(t=(t=this.getParameters(o,0)).includes(",")?t.split(",").join(""):t).split("$")).filter(e=>!!e)).forEach(e=>"$"+e.trim()),this.params=t.map(e=>{var[e,t]=e.split(":");return{["$"+e]:t.trim(),validated:!1}})):i=o[0].split("{")[0].trim(),i.includes(" ")&&([i,e]=i.split(" ")),i=i||"query";var a,n=o[1],s=this.indentationChecker(n),l=[];for(let r=1;r<o.length;r++){let n="";if(s===this.indentationChecker(o[r])){let t;let e;if(o[r].includes("(")?(t=o[r].split("(")[0].trim(),a=o[r].split("(")[1].split(")")[0].trim(),e=this.paramsParser(a,this.params)):t=o[r].split("{")[0].trim(),"}"!==t){const h=this[i].find(e=>e.name===t);if(e){const m=[];e.forEach(t=>{var e,n=h.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),m.push(Object.assign(Object.assign({},n),{field:t.field})))}),m.length&&(n+="(",m.forEach(e=>n+=`${e.name}: ${e.field} `),n+=")")}l.push({operation:t,line:r,type:null===h||void 0===h?void 0:h.type,args:n})}}}let r="";for(let t=0;t<l.length;t++){var c=(l[t+1]||{}).line||o.length-1,u=l[t].type,d=o.slice(l[t].line,c),p=md5(d.join("").replace(/\s/g,""));let e;if("string"!=typeof(e=this.hashMap[p]?(console.log(`returning ${l[t].operation} from memory`),this.hashMap[p]):yield this.recursiveFieldCheck(d,u,g,v,[` ${l[t].operation} ${l[t].args} {`],this.params)))throw new Error("Introspection utility failed while validating operation");this.hashMap[p]=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+")",r=`${i} ${e} ${n} {`+r+"}";var f=this.params.filter(e=>!e.validated).map(e=>{var{}=e,e=__rest$5(e,["validated"]);return Object.keys(e)[0].replace("$","")});return{query:r,unsupportedArgs:f}}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:x}}catch(e){if(console.log(e),!this.safety)return{query:x}}})}}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$4$2="auth",initialState$4$2={oAuthToken:"",oAuthStatus:Status.idle,initStatus:Status.idle,userId:"",sessionToken:"",user:{},status:Status.idle,authContext:null,errorMessage:null,userIsActive:!0},authSlice=createSlice({name:namespace$4$2,initialState:initialState$4$2,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.oAuthStatus!==Status.success&&e.oAuthStatus!==Status.skipped||(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$3$2="configs",initialState$3$3={initConfig:{},config:null,status:"idle"},configsSlice=createSlice({name:namespace$3$2,initialState:initialState$3$3,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$4$2])?void 0:e.sessionToken},authSelector=e=>(null==e?void 0:e[namespace$4$2])||{},userSelector$2=e=>{return null==(e=e[namespace$4$2])?void 0:e.user},selectHasUserCreateRootFolderPermission=e=>{return((null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>["collections.collections.create","cms.media.create","veritone.superadmin"].includes(e))},selectUserCanAccessResourceCenter=e=>{return((null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>{var t=["admin.access"].includes(e),n=["developer.engine.update","developer.engine.create","developer.engine.delete","developer.engine.disable","developer.engine.enable"].includes(e),e=["developer.docker.admin"].includes(e);return!(!t||!n&&!e)||!!n||!!e})},selectUserCanCreatePackage=e=>selectUserCanAccessResourceCenter(e),selectIsSuperAdmin=e=>{return((null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>["superadmin","veritone.superadmin"].includes(e))},selectOrgId=e=>{return null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.organization)?void 0:e.organizationId},authErrorMessage=e=>{return null==(e=e[namespace$4$2])?void 0:e.errorMessage},selectIsOLPEnabled=e=>{return"enabled"===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.enableRBACFeature)},selectUserOrgEdgeVersion=e=>{return null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.edgeVersion},selectUserOrgHideCmsFromAppList=e=>{return!0===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.hideCMSFromAppList)},authContextSelector=e=>{return null==(e=e[namespace$4$2])?void 0:e.authContext},authStatusSelector=e=>{return null==(e=e[namespace$4$2])?void 0:e.status},preferredLanguageSelector=e=>{var t;return null!=(t=null==(t=e[namespace$4$2])?void 0:t.user)&&t.preferredLanguage?null==(e=null==(t=e[namespace$4$2])?void 0:t.user)?void 0:e.preferredLanguage:"en"},selectIsUserAdmin=e=>{return null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.roles)?void 0:e.includes("superadmin")},oAuthTokenSelector=e=>{return null==(e=null==e?void 0:e[namespace$4$2])?void 0:e.oAuthToken},oAuthStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$4$2])?void 0:e.oAuthStatus},initStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$4$2])?void 0:e.initStatus},userRecentApplicationsSelector=e=>{var t;return null!=(t=null==(t=e[namespace$4$2])?void 0:t.user)&&t.recentApplications?JSON.parse(null==(e=null==(t=e[namespace$4$2])?void 0:t.user)?void 0:e.recentApplications):[]},rootApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.apiRoot},configSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config},switchApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.switchAppUrl},cmsUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.cmsAppUrl},graphEndpointSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.graphEndpoint},loginUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.loginUrl},logoutUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.logoutUrl},hidePasswordResetSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.hidePasswordReset},logoutRedirectUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.logoutRedirectUrl},controllerNodeRedImageSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.controllerNodeRedImage},controllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.controllerUrl},automateControllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.automateControllerUrl},automateUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.automateUrl},baseUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.baseUrl},initialConfigSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig},sessionTimeoutSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.sessionTimeout},betaFeaturesSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.betaFeatures},appIdSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.applicationId},selectDesktopUrl=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.desktopAppUrl},oauthRedirectUriSelector=e=>{return(null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.oAuthRedirectUri)||window.location.protocol+"//"+window.location.hostname},selectApiConfigs$2=createSelector$1([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n})),getAppConfig=(e,t)=>__awaiter$a(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`query {
|
|
995
|
+
}`,graphEndpoint:i,token:o})).errors||(e=null==(s=null==n?void 0:n.data)?void 0:s.__type)&&(n=e["name"],(n={name:n,fields:[]}).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(n),e=n),a){const r=[];return null!==e&&void 0!==e&&e.fields.forEach(t=>{a.find(e=>t.name===e)&&r.push(t)}),r}return null===e||void 0===e?void 0:e.fields}})}typeBuilder(e){if(e.name)return e.name;let t="";return t=e.kind&&("NON_NULL"===e.kind&&(t=this.typeBuilder(e.ofType)+"!"),"LIST"===e.kind)?"["+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(d,p,f,h,m=[],g,n=1,v=2){var x;return __awaiter$a(this,void 0,void 0,function*(){let e=" ",r="",t=v;for(;t-1;)e+=" ",r+=" ",--t;!this.types.find(e=>e.name===p)&&p&&(yield this.getAvailableFields(f,h,p));let i=n;for(;i<d.length;){let n;const l=d[i].includes("...");l?(n=d[i].split("on")[1].split("{")[0].trim(),yield this.getAvailableFields(f,h,n)):n=d[i].trim().split("(")[0].trim().split("{")[0].trim();let t;t=n.includes(":")?n.split(":")[1]:n;var o=this.types.find(e=>l?e.name===n:e.name===(p||"").replace(/[\[\]!]+/g,""));if(o||"}"===n||l){var a=l?o:null==o?void 0:o.fields.find(e=>e.name===t);if(a||"}"===n){let t="";if(d[i].includes("(")&&a){var s=this.getParameters(d,i),s=this.paramsParser(s,g);if(s.length){const c=[],u=(null==(x=null==o?void 0:o.fields.find(e=>e.name===n))?void 0:x.args)||[];s.forEach(t=>{var e,n=u.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),c.push(Object.assign(Object.assign({},n),{field:t.field})))}),c.length&&(t+="(",c.forEach(e=>t+=`${e.name}: ${e.field} `),t+=")")}}if(d[i].includes("{")&&a||l){l?m.push(`${e}... on ${n} ${t}{`):m.push(""+e+n+` ${t}{`);o=l?n:(null==a?void 0:a.type)||null;i=yield this.recursiveFieldCheck(d,o,f,h,m,g,i+1,v+1)}else{if(d[i].includes("}"))return m.push(r+"}"),i===d.length-1?this.nestingChecker(m).join("\n"):i;m.push(""+e+n)}}else if(d[i].includes("{")){let e=1;for(;e;)i+=1,d[i].includes("{")&&(e+=1),d[i].includes("}")&&--e}}i+=1}})}getParameters(e,t){return e[t].split("(")[1].split(")")[0].trim().replace(/:\s/g,":")}paramsParser(e,n){e=e.split(":");const r=[];e.forEach(e=>{e=e.trim();let t;e.includes(" ")&&(t=e.split(" ")),(t=e.includes(",")?e.split(","):t)?t.forEach(e=>r.push(e.trim())):r.push(e)});var i=[];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(g,v,x){return __awaiter$a(this,void 0,void 0,function*(){this.params=[];try{this.initialized||(yield this.initialize(g,v,!1));var o=x.split("\n");let i,e="",t="";o[0].includes("(")?(1<(i=o[0].split("(")[0].trim()).split(" ").length&&([i,e]=i.split(" ")),(t=(t=(t=(t=this.getParameters(o,0)).includes(",")?t.split(",").join(""):t).split("$")).filter(e=>!!e)).forEach(e=>"$"+e.trim()),this.params=t.map(e=>{var[e,t]=e.split(":");return{["$"+e]:t.trim(),validated:!1}})):i=o[0].split("{")[0].trim(),i.includes(" ")&&([i,e]=i.split(" ")),i=i||"query";var a,n=o[1],s=this.indentationChecker(n),l=[];for(let r=1;r<o.length;r++){let n="";if(s===this.indentationChecker(o[r])){let t;let e;if(o[r].includes("(")?(t=o[r].split("(")[0].trim(),a=o[r].split("(")[1].split(")")[0].trim(),e=this.paramsParser(a,this.params)):t=o[r].split("{")[0].trim(),"}"!==t){const h=this[i].find(e=>e.name===t);if(e){const m=[];e.forEach(t=>{var e,n=h.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),m.push(Object.assign(Object.assign({},n),{field:t.field})))}),m.length&&(n+="(",m.forEach(e=>n+=`${e.name}: ${e.field} `),n+=")")}l.push({operation:t,line:r,type:null===h||void 0===h?void 0:h.type,args:n})}}}let r="";for(let t=0;t<l.length;t++){var c=(l[t+1]||{}).line||o.length-1,u=l[t].type,d=o.slice(l[t].line,c),p=md5(d.join("").replace(/\s/g,""));let e;if("string"!=typeof(e=this.hashMap[p]||(yield this.recursiveFieldCheck(d,u,g,v,[` ${l[t].operation} ${l[t].args} {`],this.params))))throw new Error("Introspection utility failed while validating operation");this.hashMap[p]=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+")",r=`${i} ${e} ${n} {`+r+"}";var f=this.params.filter(e=>!e.validated).map(e=>{var{}=e,e=__rest$5(e,["validated"]);return Object.keys(e)[0].replace("$","")});return{query:r,unsupportedArgs:f}}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:x}}catch(e){if(console.log(e),!this.safety)return{query:x}}})}}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$4$2="auth",initialState$4$2={oAuthToken:"",oAuthStatus:Status.idle,initStatus:Status.idle,userId:"",sessionToken:"",user:{},status:Status.idle,authContext:null,errorMessage:null,userIsActive:!0},authSlice=createSlice({name:namespace$4$2,initialState:initialState$4$2,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.oAuthStatus!==Status.success&&e.oAuthStatus!==Status.skipped||(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$3$2="configs",initialState$3$3={initConfig:{},config:null,status:"idle"},configsSlice=createSlice({name:namespace$3$2,initialState:initialState$3$3,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$4$2])?void 0:e.sessionToken},authSelector=e=>(null==e?void 0:e[namespace$4$2])||{},userSelector$2=e=>{return null==(e=e[namespace$4$2])?void 0:e.user},selectHasUserCreateRootFolderPermission=e=>{return((null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>["collections.collections.create","cms.media.create","veritone.superadmin"].includes(e))},selectUserCanAccessResourceCenter=e=>{return((null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>{var t=["admin.access"].includes(e),n=["developer.engine.update","developer.engine.create","developer.engine.delete","developer.engine.disable","developer.engine.enable"].includes(e),e=["developer.docker.admin"].includes(e);return!(!t||!n&&!e)||!!n||!!e})},selectUserCanCreatePackage=e=>selectUserCanAccessResourceCenter(e),selectIsSuperAdmin=e=>{return((null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>["superadmin","veritone.superadmin"].includes(e))},selectOrgId=e=>{return null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.organization)?void 0:e.organizationId},authErrorMessage=e=>{return null==(e=e[namespace$4$2])?void 0:e.errorMessage},selectIsOLPEnabled=e=>{return"enabled"===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.enableRBACFeature)},selectUserOrgEdgeVersion=e=>{return null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.edgeVersion},selectUserOrgHideCmsFromAppList=e=>{return!0===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.hideCMSFromAppList)},authContextSelector=e=>{return null==(e=e[namespace$4$2])?void 0:e.authContext},authStatusSelector=e=>{return null==(e=e[namespace$4$2])?void 0:e.status},preferredLanguageSelector=e=>{var t;return null!=(t=null==(t=e[namespace$4$2])?void 0:t.user)&&t.preferredLanguage?null==(e=null==(t=e[namespace$4$2])?void 0:t.user)?void 0:e.preferredLanguage:"en"},selectIsUserAdmin=e=>{return null==(e=null==(e=null==(e=e[namespace$4$2])?void 0:e.user)?void 0:e.roles)?void 0:e.includes("superadmin")},oAuthTokenSelector=e=>{return null==(e=null==e?void 0:e[namespace$4$2])?void 0:e.oAuthToken},oAuthStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$4$2])?void 0:e.oAuthStatus},initStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$4$2])?void 0:e.initStatus},userRecentApplicationsSelector=e=>{var t;return null!=(t=null==(t=e[namespace$4$2])?void 0:t.user)&&t.recentApplications?JSON.parse(null==(e=null==(t=e[namespace$4$2])?void 0:t.user)?void 0:e.recentApplications):[]},rootApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.apiRoot},configSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config},switchApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.switchAppUrl},cmsUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.cmsAppUrl},graphEndpointSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.graphEndpoint},loginUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.loginUrl},logoutUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.logoutUrl},hidePasswordResetSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.hidePasswordReset},logoutRedirectUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.logoutRedirectUrl},controllerNodeRedImageSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.controllerNodeRedImage},controllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.controllerUrl},automateControllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.automateControllerUrl},automateUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.automateUrl},baseUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.baseUrl},initialConfigSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig},sessionTimeoutSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.sessionTimeout},betaFeaturesSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.betaFeatures},appIdSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.applicationId},selectDesktopUrl=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.config)?void 0:e.desktopAppUrl},oauthRedirectUriSelector=e=>{return(null==(e=null==(e=null==e?void 0:e[namespace$3$2])?void 0:e.initConfig)?void 0:e.oAuthRedirectUri)||window.location.protocol+"//"+window.location.hostname},selectApiConfigs$2=createSelector$1([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n})),getAppConfig=(e,t)=>__awaiter$a(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`query {
|
|
996
996
|
staticAppConfig {
|
|
997
997
|
apiRoot
|
|
998
998
|
switchAppUrl
|
|
@@ -1483,4 +1483,4 @@ createScheduledJob(input:{
|
|
|
1483
1483
|
}
|
|
1484
1484
|
`)}),n},[]).join("\r\n")}
|
|
1485
1485
|
}
|
|
1486
|
-
`,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$i(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$i(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule(),getPermissionsModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){var n;validateConfig(e)&&(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t}))))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme$1,lightTheme:lightTheme$1}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"fd409f79b",releaseDate:"2023-07-18T19:25:27.994Z"});export{createReducer as $,AIWareIntlProvider as A,Box$1 as B,FormControl$1 as C,TextField$1 as D,classNames as E,FormattedMessage$1 as F,Grid$1 as G,resetPasswordRequest as H,InputLabel$1 as I,InputAdornment$1 as J,IconButton$1 as K,LoadingButton$1 as L,Select$1 as M,Location as N,OutlinedInput$1 as O,Provider$2 as P,MenuItem$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,Button$1 as U,Divider$1 as V,createTheme$1 as W,systemStyled as X,useThemeProps$1 as Y,createAction as Z,_extends$2 as _,generateUtilityClasses as a,Popper$1 as a$,createSlice as a0,ENGINE_OWNER_TYPES as a1,ENGINE_FILTER_TYPES as a2,DynamicModuleLoader as a3,preferredLanguageSelector as a4,baseUrlSelector as a5,rootApiSelector as a6,sessionTokenSelector as a7,graphEndpointSelector as a8,controllerNodeRedImageSelector as a9,fetchTemplateGallery as aA,isRevisionsExistOnServerRequest as aB,FormLabel$1 as aC,default_1$b as aD,FormGroup$1 as aE,FormControlLabel$1 as aF,Checkbox$1 as aG,fetchTemplateGalleryFallback as aH,Card$1 as aI,CardContent$1 as aJ,img$m as aK,CardActions$1 as aL,flowStyles as aM,NoResults as aN,CircularProgress$1 as aO,img$c as aP,Dialog$1 as aQ,setApiEndpoint as aR,TableContainer$1 as aS,Table$1 as aT,TableHead$1 as aU,TableRow$1 as aV,TableCell$1 as aW,TableSortLabel$1 as aX,TableBody$1 as aY,img$h as aZ,default_1 as a_,controllerUrlSelector as aa,automateControllerUrlSelector as ab,flowCenterDialogSelector as ac,automateUrlSelector as ad,Portal$1 as ae,flowCenterDialogReducer as af,List$2 as ag,ListItem$1 as ah,ListItemIcon$1 as ai,ListItemText$1 as aj,flowCenterDialogAction as ak,all as al,img$o as am,img$p as an,img$r as ao,img$s as ap,Tooltip$1 as aq,img$i as ar,img$H as as,Skeleton$1 as at,takeLatest$1 as au,fetchAllTags as av,put as aw,select as ax,fetchFlows as ay,call$i as az,styled$1 as b,RadioGroup$1 as b$,ClickAwayListener as b0,Fade$1 as b1,img$t as b2,img$q as b3,img$R as b4,img$D as b5,DialogTitle$1 as b6,DialogContent$1 as b7,DialogActions$1 as b8,Snackbar$1 as b9,reactDom as bA,Transition$1 as bB,__awaiter$d as bC,__generator$2 as bD,__spread as bE,TransitionGroup$1 as bF,connect$1 as bG,Bookmark as bH,EngineFlagIcons as bI,createAsyncThunk as bJ,withStyles as bK,getConfigModule as bL,getAuthModule as bM,getSnackbarModule as bN,AIWareCacheProvider as bO,img$S as bP,img$e as bQ,img$d as bR,isEmpty_1 as bS,Backdrop$1 as bT,getDefaultMiddleware as bU,isNil_1 as bV,UpDown as bW,Icon$1 as bX,get_1 as bY,map_1 as bZ,keys_1 as b_,default_1$6 as ba,img$j as bb,img$l as bc,img$V as bd,Tabs$2 as be,Tab$2 as bf,deleteEngine as bg,fetchEngine as bh,img$k as bi,AIWareFormatMessage as bj,FormattedDate as bk,fetchVeritoneGraphQLApi as bl,useTheme as bm,KeyboardArrowRight as bn,KeyboardArrowLeft as bo,useId as bp,InputUnstyled as bq,isHostComponent as br,getDefaultExportFromNamespaceIfNotNamed as bs,commonjsRequire as bt,_typeof$4 as bu,_inheritsLoose$2 as bv,_assertThisInitialized$1 as bw,React as bx,hoistNonReactStatics_cjs as by,_defineProperty$1 as bz,Paper$1 as c,isArray_1 as c$,Avatar$1 as c0,img$x as c1,baseGraphQLApi as c2,FormHelperText$2 as c3,img$g as c4,StyledEngineProvider as c5,ThemeProvider as c6,lightTheme$1 as c7,CssBaseline as c8,Hide as c9,mountPanel$1 as cA,DialogContentText$1 as cB,userSelector$2 as cC,MoreVert$1 as cD,Menu$1 as cE,Edit as cF,Upload as cG,Delete as cH,CustomTabs as cI,useBackupImg as cJ,img$1A as cK,validate as cL,configSelector as cM,baseGraphQLApiWithError as cN,VerifiedFilled as cO,Add as cP,ExpandLess as cQ,ExpandMore as cR,Collapse$1 as cS,img$17 as cT,Filter$1 as cU,DynamicTable as cV,useTheme$3 as cW,getThemeProps as cX,useEnhancedEffect$1 as cY,React$1 as cZ,_arrayPush as c_,has_1 as ca,showMessage as cb,MessageSeverity as cc,Radio$2 as cd,createSvgIcon$2 as ce,_createCompounder as cf,_baseIteratee as cg,isArrayLike_1 as ch,toInteger_1 as ci,_toPropertyKey as cj,_setPrototypeOf$3 as ck,commonjsGlobal$1 as cl,combineReducers as cm,createSelector$1 as cn,fork as co,AIWareThemeProvider$1 as cp,Stack$4 as cq,Close$1 as cr,FullscreenExit as cs,Fullscreen as ct,TabPanel as cu,default_1$8 as cv,unmountPanel$1 as cw,AvailableComponents as cx,delay$1 as cy,hidePanel$1 as cz,capitalize$2 as d,isArguments_1 as d$,_baseToString as d0,_baseTrim as d1,_castSlice as d2,_stringToArray as d3,toString_1 as d4,ReactIs as d5,upperFirst_1 as d6,isString_1 as d7,_baseGet as d8,_baseSlice as d9,useTheme$2 as dA,useControlled as dB,useEventCallback as dC,ButtonBase$1 as dD,useForkRef as dE,getDefaultExportFromCjs as dF,isObject_1 as dG,MoreHor as dH,takeEvery$1 as dI,EngineCategoryIcons as dJ,selectApiConfigs$2 as dK,Chip$1 as dL,Badge$1 as dM,panelsSelector as dN,tabsClasses$1 as dO,AlarmTwo as dP,EditList as dQ,usePreviousProps$1 as dR,setRef as dS,inputClasses$1 as dT,inputBaseClasses$1 as dU,outlinedInputClasses$1 as dV,filledInputClasses$1 as dW,ClearIcon as dX,ArrowDropDownIcon as dY,_arrayMap as dZ,_Symbol as d_,_castPath as da,_toKey as db,_isIndex as dc,channel$1 as dd,useIntl as de,VideoCamera as df,Image$1 as dg,Sound as dh,Description as di,toNumber_1 as dj,ProgressStepper as dk,size_1 as dl,take as dm,CurlyBraces as dn,UnknownDocument as dp,sdkEventManager as dq,SdkEvents as dr,SdkError as ds,EngineClassIcons as dt,Mode2 as du,EngineModeIcons as dv,DeploymentModelIcons as dw,guid as dx,forceReflow as dy,alpha as dz,_objectWithoutPropertiesLoose$2 as e,actions as e$,_baseEach as e0,_arrayFilter as e1,_getNative as e2,eq_1 as e3,_root as e4,_Uint8Array as e5,_overArg as e6,_isPrototype as e7,isObjectLike_1 as e8,_baseGetTag as e9,img$L as eA,img$1y as eB,img$K as eC,authSelector as eD,ListItemAvatar$1 as eE,emphasize as eF,useSlotProps as eG,_arraySome as eH,EntityType as eI,injectIntl as eJ,ErrorBoundary$1 as eK,EPermissionAction as eL,Process as eM,Information as eN,NewFolder as eO,SpecialFolder as eP,User as eQ,Source as eR,Search$1 as eS,selectIsOLPEnabled as eT,ListItemSecondaryAction$1 as eU,getLibraryModule as eV,cmsUrlSelector as eW,betaFeaturesSelector as eX,SearchStructuredData as eY,Grow$1 as eZ,index as e_,_arrayLikeKeys as ea,isBuffer$3 as eb,isFunction_1 as ec,isTypedArray_1 as ed,_Stack as ee,_baseFor as ef,identity_1 as eg,_isIterateeCall as eh,isSymbol_1 as ei,_baseMap as ej,_baseUnary as ek,memoizeOne as el,createBox$1 as em,StepperContext$1 as en,StepContext$1 as eo,SvgIcon$1 as ep,StepConnector$1 as eq,_Set as er,_setToArray as es,_SetCache as et,_cacheHas as eu,img$O as ev,img$N as ew,img$1w as ex,img$1v as ey,img$1u as ez,clsx as f,SecurityGroup as f$,hasPermission as f0,UserAddFilled as f1,Popover$1 as f2,MenuList$1 as f3,MoveFolder as f4,EAuthResourceType as f5,Slide$1 as f6,img$a as f7,selectPanelByPanelName as f8,FullScreenContainer as f9,selectOrgId as fA,navSectionStyles as fB,selectIsUserAdmin as fC,AvatarGroup$1 as fD,ErrorState$2 as fE,NullState$2 as fF,Group as fG,PermissionChangedAction as fH,Lock as fI,useOrganizationPermissions as fJ,EAuthSubResourceType as fK,AddGroup as fL,initialConfigSelector as fM,ConfirmationModal as fN,EnumHelpers as fO,formatBytes as fP,LinearProgress$1 as fQ,NotInterested as fR,mountPanelForResponse$1 as fS,tableStyles as fT,ArrowDown as fU,ArrowUp as fV,useInterval as fW,Iam as fX,contextMenuStyles as fY,safeFormatMessage as fZ,Users as f_,isPermissionLoading as fa,Settings$2 as fb,Hamburger as fc,List as fd,Download as fe,convertEntityToAuthResource as ff,selectUserOrgEdgeVersion as fg,EditAttributes as fh,gqlIntrospection as fi,ProcessingDetail as fj,img$w as fk,img$y as fl,img$4 as fm,FilterRemove as fn,CheckCircle as fo,FolderOpen as fp,Voice as fq,useDoubleClick as fr,FolderFilled as fs,Time as ft,img$z as fu,Undefined as fv,PodcastSource as fw,YoutubeSource as fx,TVSource as fy,RadioSource as fz,generateUtilityClass as g,registerComponent as g$,getOrganizationPanelModule as g0,Lock2 as g1,EApplicationConfigLevel as g2,NoApps as g3,EApplicationConfigType as g4,green$1 as g5,md5 as g6,selectIsSuperAdmin as g7,organizations_selector as g8,actions$5 as g9,compile as gA,Check as gB,FormattedRelativeTime$1 as gC,BottomQueue as gD,TopQueue as gE,Pause as gF,Cancel as gG,Folder as gH,Hidden as gI,toFinite_1 as gJ,_baseForOwn as gK,_arrayReduce as gL,hasIn_1 as gM,useSyncExternalStoreExports as gN,getTabPanelWidthBySize as gO,Packages as gP,Resources$1 as gQ,selectUserCanCreatePackage as gR,Engines as gS,PackagesAvatar as gT,actionChannel as gU,cancelled as gV,flush$3 as gW,cancel as gX,img$v as gY,FlowCenter2 as gZ,registry as g_,AddUser as ga,selectors as gb,LibraryDropdown as gc,Remove as gd,Save as ge,Input$3 as gf,getElement as gg,client$1 as gh,Copy as gi,ArrowForward as gj,Modal$1 as gk,_baseIsEqual as gl,Slider$1 as gm,_getSymbols as gn,stubArray_1 as go,_baseGetAllKeys as gp,_getTag as gq,_nodeUtil as gr,_getAllKeys as gs,_castFunction as gt,Article as gu,Task as gv,View as gw,_objectSpread2 as gx,serialize as gy,stringify$2 as gz,composeClasses as h,AvailableWidgets as h0,updatePanelMicroFrontendProps as h1,setData as h2,root as h3,mountWidget as h4,unmountWidget as h5,mountPanel as h6,unmountPanel as h7,hidePanel as h8,unmountAllPanel as h9,init as ha,aiwareEvents as hb,createSvgIcon$1 as i,jsxRuntime as j,interopRequireDefault as k,Route as l,makeStyles as m,useDispatch as n,useSelector as o,authStatusSelector as p,authContextSelector as q,react as r,store$4 as s,AuthContext as t,useThemeProps as u,lodash as v,Alert$1 as w,useNavigate as x,useLocation as y,authErrorMessage as z};
|
|
1486
|
+
`,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$i(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$i(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule(),getPermissionsModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){var n;validateConfig(e)&&(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t}))))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme$1,lightTheme:lightTheme$1}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"8ba9bfec4",releaseDate:"2023-07-18T21:12:39.139Z"});export{createReducer as $,AIWareIntlProvider as A,Box$1 as B,FormControl$1 as C,TextField$1 as D,classNames as E,FormattedMessage$1 as F,Grid$1 as G,resetPasswordRequest as H,InputLabel$1 as I,InputAdornment$1 as J,IconButton$1 as K,LoadingButton$1 as L,Select$1 as M,Location as N,OutlinedInput$1 as O,Provider$2 as P,MenuItem$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,Button$1 as U,Divider$1 as V,createTheme$1 as W,systemStyled as X,useThemeProps$1 as Y,createAction as Z,_extends$2 as _,generateUtilityClasses as a,Popper$1 as a$,createSlice as a0,ENGINE_OWNER_TYPES as a1,ENGINE_FILTER_TYPES as a2,DynamicModuleLoader as a3,preferredLanguageSelector as a4,baseUrlSelector as a5,rootApiSelector as a6,sessionTokenSelector as a7,graphEndpointSelector as a8,controllerNodeRedImageSelector as a9,fetchTemplateGallery as aA,isRevisionsExistOnServerRequest as aB,FormLabel$1 as aC,default_1$b as aD,FormGroup$1 as aE,FormControlLabel$1 as aF,Checkbox$1 as aG,fetchTemplateGalleryFallback as aH,Card$1 as aI,CardContent$1 as aJ,img$m as aK,CardActions$1 as aL,flowStyles as aM,NoResults as aN,CircularProgress$1 as aO,img$c as aP,Dialog$1 as aQ,setApiEndpoint as aR,TableContainer$1 as aS,Table$1 as aT,TableHead$1 as aU,TableRow$1 as aV,TableCell$1 as aW,TableSortLabel$1 as aX,TableBody$1 as aY,img$h as aZ,default_1 as a_,controllerUrlSelector as aa,automateControllerUrlSelector as ab,flowCenterDialogSelector as ac,automateUrlSelector as ad,Portal$1 as ae,flowCenterDialogReducer as af,List$2 as ag,ListItem$1 as ah,ListItemIcon$1 as ai,ListItemText$1 as aj,flowCenterDialogAction as ak,all as al,img$o as am,img$p as an,img$r as ao,img$s as ap,Tooltip$1 as aq,img$i as ar,img$H as as,Skeleton$1 as at,takeLatest$1 as au,fetchAllTags as av,put as aw,select as ax,fetchFlows as ay,call$i as az,styled$1 as b,RadioGroup$1 as b$,ClickAwayListener as b0,Fade$1 as b1,img$t as b2,img$q as b3,img$R as b4,img$D as b5,DialogTitle$1 as b6,DialogContent$1 as b7,DialogActions$1 as b8,Snackbar$1 as b9,reactDom as bA,Transition$1 as bB,__awaiter$d as bC,__generator$2 as bD,__spread as bE,TransitionGroup$1 as bF,connect$1 as bG,Bookmark as bH,EngineFlagIcons as bI,createAsyncThunk as bJ,withStyles as bK,getConfigModule as bL,getAuthModule as bM,getSnackbarModule as bN,AIWareCacheProvider as bO,img$S as bP,img$e as bQ,img$d as bR,isEmpty_1 as bS,Backdrop$1 as bT,getDefaultMiddleware as bU,isNil_1 as bV,UpDown as bW,Icon$1 as bX,get_1 as bY,map_1 as bZ,keys_1 as b_,default_1$6 as ba,img$j as bb,img$l as bc,img$V as bd,Tabs$2 as be,Tab$2 as bf,deleteEngine as bg,fetchEngine as bh,img$k as bi,AIWareFormatMessage as bj,FormattedDate as bk,fetchVeritoneGraphQLApi as bl,useTheme as bm,KeyboardArrowRight as bn,KeyboardArrowLeft as bo,useId as bp,InputUnstyled as bq,isHostComponent as br,getDefaultExportFromNamespaceIfNotNamed as bs,commonjsRequire as bt,_typeof$4 as bu,_inheritsLoose$2 as bv,_assertThisInitialized$1 as bw,React as bx,hoistNonReactStatics_cjs as by,_defineProperty$1 as bz,Paper$1 as c,isArray_1 as c$,Avatar$1 as c0,img$x as c1,baseGraphQLApi as c2,FormHelperText$2 as c3,img$g as c4,StyledEngineProvider as c5,ThemeProvider as c6,lightTheme$1 as c7,CssBaseline as c8,Hide as c9,mountPanel$1 as cA,DialogContentText$1 as cB,userSelector$2 as cC,MoreVert$1 as cD,Menu$1 as cE,Edit as cF,Upload as cG,Delete as cH,CustomTabs as cI,useBackupImg as cJ,img$1A as cK,validate as cL,configSelector as cM,baseGraphQLApiWithError as cN,VerifiedFilled as cO,Add as cP,ExpandLess as cQ,ExpandMore as cR,Collapse$1 as cS,img$17 as cT,Filter$1 as cU,DynamicTable as cV,useTheme$3 as cW,getThemeProps as cX,useEnhancedEffect$1 as cY,React$1 as cZ,_arrayPush as c_,has_1 as ca,showMessage as cb,MessageSeverity as cc,Radio$2 as cd,createSvgIcon$2 as ce,_createCompounder as cf,_baseIteratee as cg,isArrayLike_1 as ch,toInteger_1 as ci,_toPropertyKey as cj,_setPrototypeOf$3 as ck,commonjsGlobal$1 as cl,combineReducers as cm,createSelector$1 as cn,fork as co,AIWareThemeProvider$1 as cp,Stack$4 as cq,Close$1 as cr,FullscreenExit as cs,Fullscreen as ct,TabPanel as cu,default_1$8 as cv,unmountPanel$1 as cw,AvailableComponents as cx,delay$1 as cy,hidePanel$1 as cz,capitalize$2 as d,isArguments_1 as d$,_baseToString as d0,_baseTrim as d1,_castSlice as d2,_stringToArray as d3,toString_1 as d4,ReactIs as d5,upperFirst_1 as d6,isString_1 as d7,_baseGet as d8,_baseSlice as d9,useTheme$2 as dA,useControlled as dB,useEventCallback as dC,ButtonBase$1 as dD,useForkRef as dE,getDefaultExportFromCjs as dF,isObject_1 as dG,MoreHor as dH,takeEvery$1 as dI,EngineCategoryIcons as dJ,selectApiConfigs$2 as dK,Chip$1 as dL,Badge$1 as dM,panelsSelector as dN,tabsClasses$1 as dO,AlarmTwo as dP,EditList as dQ,usePreviousProps$1 as dR,setRef as dS,inputClasses$1 as dT,inputBaseClasses$1 as dU,outlinedInputClasses$1 as dV,filledInputClasses$1 as dW,ClearIcon as dX,ArrowDropDownIcon as dY,_arrayMap as dZ,_Symbol as d_,_castPath as da,_toKey as db,_isIndex as dc,channel$1 as dd,useIntl as de,VideoCamera as df,Image$1 as dg,Sound as dh,Description as di,toNumber_1 as dj,ProgressStepper as dk,size_1 as dl,take as dm,CurlyBraces as dn,UnknownDocument as dp,sdkEventManager as dq,SdkEvents as dr,SdkError as ds,EngineClassIcons as dt,Mode2 as du,EngineModeIcons as dv,DeploymentModelIcons as dw,guid as dx,forceReflow as dy,alpha as dz,_objectWithoutPropertiesLoose$2 as e,actions as e$,_baseEach as e0,_arrayFilter as e1,_getNative as e2,eq_1 as e3,_root as e4,_Uint8Array as e5,_overArg as e6,_isPrototype as e7,isObjectLike_1 as e8,_baseGetTag as e9,img$L as eA,img$1y as eB,img$K as eC,authSelector as eD,ListItemAvatar$1 as eE,emphasize as eF,useSlotProps as eG,_arraySome as eH,EntityType as eI,injectIntl as eJ,ErrorBoundary$1 as eK,EPermissionAction as eL,Process as eM,Information as eN,NewFolder as eO,SpecialFolder as eP,User as eQ,Source as eR,Search$1 as eS,selectIsOLPEnabled as eT,ListItemSecondaryAction$1 as eU,getLibraryModule as eV,cmsUrlSelector as eW,betaFeaturesSelector as eX,SearchStructuredData as eY,Grow$1 as eZ,index as e_,_arrayLikeKeys as ea,isBuffer$3 as eb,isFunction_1 as ec,isTypedArray_1 as ed,_Stack as ee,_baseFor as ef,identity_1 as eg,_isIterateeCall as eh,isSymbol_1 as ei,_baseMap as ej,_baseUnary as ek,memoizeOne as el,createBox$1 as em,StepperContext$1 as en,StepContext$1 as eo,SvgIcon$1 as ep,StepConnector$1 as eq,_Set as er,_setToArray as es,_SetCache as et,_cacheHas as eu,img$O as ev,img$N as ew,img$1w as ex,img$1v as ey,img$1u as ez,clsx as f,SecurityGroup as f$,hasPermission as f0,UserAddFilled as f1,Popover$1 as f2,MenuList$1 as f3,MoveFolder as f4,EAuthResourceType as f5,Slide$1 as f6,img$a as f7,selectPanelByPanelName as f8,FullScreenContainer as f9,selectOrgId as fA,navSectionStyles as fB,selectIsUserAdmin as fC,AvatarGroup$1 as fD,ErrorState$2 as fE,NullState$2 as fF,Group as fG,PermissionChangedAction as fH,Lock as fI,useOrganizationPermissions as fJ,EAuthSubResourceType as fK,AddGroup as fL,initialConfigSelector as fM,ConfirmationModal as fN,EnumHelpers as fO,formatBytes as fP,LinearProgress$1 as fQ,NotInterested as fR,mountPanelForResponse$1 as fS,tableStyles as fT,ArrowDown as fU,ArrowUp as fV,useInterval as fW,Iam as fX,contextMenuStyles as fY,safeFormatMessage as fZ,Users as f_,isPermissionLoading as fa,Settings$2 as fb,Hamburger as fc,List as fd,Download as fe,convertEntityToAuthResource as ff,selectUserOrgEdgeVersion as fg,EditAttributes as fh,gqlIntrospection as fi,ProcessingDetail as fj,img$w as fk,img$y as fl,img$4 as fm,FilterRemove as fn,CheckCircle as fo,FolderOpen as fp,Voice as fq,useDoubleClick as fr,FolderFilled as fs,Time as ft,img$z as fu,Undefined as fv,PodcastSource as fw,YoutubeSource as fx,TVSource as fy,RadioSource as fz,generateUtilityClass as g,FlowCenter2 as g$,getOrganizationPanelModule as g0,Lock2 as g1,EApplicationConfigLevel as g2,NoApps as g3,EApplicationConfigType as g4,green$1 as g5,md5 as g6,selectIsSuperAdmin as g7,organizations_selector as g8,actions$5 as g9,compile as gA,Check as gB,FormattedRelativeTime$1 as gC,BottomQueue as gD,TopQueue as gE,Pause as gF,Cancel as gG,Folder as gH,Hidden as gI,setDuration as gJ,resetDuration as gK,toFinite_1 as gL,_baseForOwn as gM,_arrayReduce as gN,hasIn_1 as gO,useSyncExternalStoreExports as gP,getTabPanelWidthBySize as gQ,Packages as gR,Resources$1 as gS,selectUserCanCreatePackage as gT,Engines as gU,PackagesAvatar as gV,actionChannel as gW,cancelled as gX,flush$3 as gY,cancel as gZ,img$v as g_,AddUser as ga,selectors as gb,LibraryDropdown as gc,Remove as gd,Save as ge,Input$3 as gf,getElement as gg,client$1 as gh,Copy as gi,ArrowForward as gj,Modal$1 as gk,_baseIsEqual as gl,Slider$1 as gm,_getSymbols as gn,stubArray_1 as go,_baseGetAllKeys as gp,_getTag as gq,_nodeUtil as gr,_getAllKeys as gs,_castFunction as gt,Article as gu,Task as gv,View as gw,_objectSpread2 as gx,serialize as gy,stringify$2 as gz,composeClasses as h,registry as h0,registerComponent as h1,AvailableWidgets as h2,updatePanelMicroFrontendProps as h3,setData as h4,root as h5,mountWidget as h6,unmountWidget as h7,mountPanel as h8,unmountPanel as h9,hidePanel as ha,unmountAllPanel as hb,init as hc,aiwareEvents as hd,createSvgIcon$1 as i,jsxRuntime as j,interopRequireDefault as k,Route as l,makeStyles as m,useDispatch as n,useSelector as o,authStatusSelector as p,authContextSelector as q,react as r,store$4 as s,AuthContext as t,useThemeProps as u,lodash as v,Alert$1 as w,useNavigate as x,useLocation as y,authErrorMessage as z};
|
package/js-core.esm.js.gz
CHANGED
|
Binary file
|