aiware-js 1.0.0-master.666 → 1.0.0-master.667

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js-core.esm.js CHANGED
@@ -1480,4 +1480,4 @@ createScheduledJob(input:{
1480
1480
  }
1481
1481
  `)}),n},[]).join("\r\n")}
1482
1482
  }
1483
- `,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$f(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$f(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:"ba2af9f5c",releaseDate:"2023-06-21T12:19:30.439Z"});export{DynamicModuleLoader as $,AIWareIntlProvider as A,Box$1 as B,resetPasswordRequest as C,InputAdornment$1 as D,IconButton$1 as E,FormattedMessage$1 as F,Grid$1 as G,Select$1 as H,InputLabel$1 as I,Location as J,Button$1 as K,LoadingButton$1 as L,MenuItem$1 as M,Divider$1 as N,OutlinedInput$1 as O,Provider$2 as P,createTheme$1 as Q,systemStyled as R,Switch$1 as S,Typography$1 as T,useThemeProps$1 as U,createAction as V,createReducer as W,createSlice as X,ENGINE_OWNER_TYPES as Y,ENGINE_FILTER_TYPES as Z,_extends as _,generateUtilityClasses as a,img$p as a$,preferredLanguageSelector as a0,baseUrlSelector as a1,rootApiSelector as a2,sessionTokenSelector as a3,graphEndpointSelector as a4,controllerNodeRedImageSelector as a5,controllerUrlSelector as a6,automateControllerUrlSelector as a7,flowCenterDialogSelector as a8,automateUrlSelector as a9,FormGroup$1 as aA,FormControlLabel$1 as aB,Checkbox$1 as aC,fetchTemplateGalleryFallback as aD,Card$1 as aE,CardContent$1 as aF,img$l as aG,CardActions$1 as aH,flowStyles as aI,NoResults as aJ,CircularProgress$1 as aK,img$b as aL,Dialog$1 as aM,setApiEndpoint as aN,TableContainer$1 as aO,Table$1 as aP,TableHead$1 as aQ,TableRow$1 as aR,TableCell$1 as aS,TableSortLabel$1 as aT,TableBody$1 as aU,img$g as aV,default_1 as aW,Popper$1 as aX,ClickAwayListener as aY,Fade$1 as aZ,img$s as a_,Portal$1 as aa,flowCenterDialogReducer as ab,List$2 as ac,ListItem$1 as ad,ListItemIcon$1 as ae,ListItemText$1 as af,flowCenterDialogAction as ag,all as ah,img$n as ai,img$o as aj,img$q as ak,img$r as al,Tooltip$1 as am,img$h as an,img$F as ao,Skeleton$1 as ap,takeLatest$1 as aq,fetchAllTags as ar,put as as,select as at,fetchFlows as au,call$f as av,fetchTemplateGallery as aw,isRevisionsExistOnServerRequest as ax,FormLabel$1 as ay,default_1$b as az,styled$1 as b,FormHelperText$2 as b$,img$P as b0,img$B as b1,DialogTitle$1 as b2,DialogContent$1 as b3,DialogActions$1 as b4,Snackbar$1 as b5,default_1$6 as b6,img$i as b7,img$k as b8,img$T as b9,__spread as bA,TransitionGroup$1 as bB,connect$1 as bC,Bookmark as bD,EngineFlagIcons as bE,createAsyncThunk as bF,withStyles as bG,getConfigModule as bH,getAuthModule as bI,getSnackbarModule as bJ,AIWareCacheProvider as bK,img$Q as bL,img$d as bM,img$c as bN,isEmpty_1 as bO,Backdrop$1 as bP,getDefaultMiddleware as bQ,isNil_1 as bR,UpDown as bS,Icon$1 as bT,get_1 as bU,map_1 as bV,keys_1 as bW,RadioGroup$1 as bX,Avatar$1 as bY,img$v as bZ,baseGraphQLApi as b_,Tabs$2 as ba,Tab$2 as bb,deleteEngine as bc,fetchEngine as bd,img$j as be,AIWareFormatMessage as bf,FormattedDate as bg,fetchVeritoneGraphQLApi as bh,useTheme as bi,KeyboardArrowRight as bj,KeyboardArrowLeft as bk,useId as bl,InputUnstyled as bm,isHostComponent as bn,getDefaultExportFromNamespaceIfNotNamed as bo,commonjsRequire as bp,_typeof$4 as bq,_inheritsLoose$2 as br,_assertThisInitialized$1 as bs,React as bt,hoistNonReactStatics_cjs as bu,_defineProperty$1 as bv,reactDom as bw,Transition$1 as bx,__awaiter$d as by,__generator$2 as bz,Paper$1 as c,_stringToArray as c$,img$f as c0,StyledEngineProvider as c1,ThemeProvider as c2,lightTheme$1 as c3,CssBaseline as c4,Hide as c5,has_1 as c6,showMessage as c7,MessageSeverity as c8,Radio$2 as c9,Menu$1 as cA,Edit as cB,Upload as cC,Delete as cD,CustomTabs as cE,useBackupImg as cF,img$1y as cG,validate as cH,configSelector as cI,baseGraphQLApiWithError as cJ,VerifiedFilled as cK,Add as cL,ExpandLess as cM,ExpandMore as cN,Collapse$1 as cO,img$15 as cP,Filter$1 as cQ,DynamicTable as cR,useTheme$3 as cS,getThemeProps as cT,useEnhancedEffect$1 as cU,React$1 as cV,_arrayPush as cW,isArray_1 as cX,_baseToString as cY,_baseTrim as cZ,_castSlice as c_,createSvgIcon$2 as ca,_createCompounder as cb,_baseIteratee as cc,isArrayLike_1 as cd,toInteger_1 as ce,_toPropertyKey as cf,_setPrototypeOf$3 as cg,commonjsGlobal$1 as ch,combineReducers as ci,createSelector$1 as cj,fork as ck,AIWareThemeProvider$1 as cl,Stack$4 as cm,Close$1 as cn,FullscreenExit as co,Fullscreen as cp,TabPanel as cq,default_1$8 as cr,unmountPanel$1 as cs,AvailableComponents as ct,delay$1 as cu,hidePanel$1 as cv,mountPanel$1 as cw,DialogContentText$1 as cx,userSelector$2 as cy,MoreVert$1 as cz,capitalize$2 as d,_overArg as d$,toString_1 as d0,ReactIs as d1,upperFirst_1 as d2,isString_1 as d3,_baseGet as d4,_baseSlice as d5,_castPath as d6,_toKey as d7,_isIndex as d8,channel$1 as d9,useForkRef as dA,getDefaultExportFromCjs as dB,isObject_1 as dC,MoreHor as dD,takeEvery$1 as dE,EngineCategoryIcons as dF,selectApiConfigs$2 as dG,panelsSelector as dH,tabsClasses$1 as dI,AlarmTwo as dJ,EditList as dK,Chip$1 as dL,usePreviousProps$1 as dM,setRef as dN,inputClasses$1 as dO,inputBaseClasses$1 as dP,outlinedInputClasses$1 as dQ,filledInputClasses$1 as dR,ClearIcon as dS,ArrowDropDownIcon as dT,_arrayMap as dU,_baseEach as dV,_arrayFilter as dW,_getNative as dX,eq_1 as dY,_root as dZ,_Uint8Array as d_,useIntl as da,VideoCamera as db,Image$1 as dc,Sound as dd,Description as de,toNumber_1 as df,ProgressStepper as dg,size_1 as dh,take as di,CurlyBraces as dj,UnknownDocument as dk,sdkEventManager as dl,SdkEvents as dm,SdkError as dn,EngineClassIcons as dp,Mode2 as dq,EngineModeIcons as dr,DeploymentModelIcons as ds,guid as dt,forceReflow as du,alpha as dv,useTheme$2 as dw,useControlled as dx,useEventCallback as dy,ButtonBase$1 as dz,_objectWithoutPropertiesLoose$2 as e,MoveFolder as e$,_isPrototype as e0,isObjectLike_1 as e1,_baseGetTag as e2,_arrayLikeKeys as e3,isArguments_1 as e4,isBuffer$3 as e5,isFunction_1 as e6,isTypedArray_1 as e7,_Stack as e8,_baseFor as e9,emphasize as eA,useSlotProps as eB,_arraySome as eC,EntityType as eD,injectIntl as eE,ErrorBoundary$1 as eF,EPermissionAction as eG,Process as eH,Information as eI,NewFolder as eJ,SpecialFolder as eK,User as eL,Source as eM,Search$1 as eN,selectIsOLPEnabled as eO,ListItemSecondaryAction$1 as eP,getLibraryModule as eQ,cmsUrlSelector as eR,betaFeaturesSelector as eS,SearchStructuredData as eT,Grow$1 as eU,index as eV,actions as eW,hasPermission as eX,UserAddFilled as eY,Popover$1 as eZ,MenuList$1 as e_,identity_1 as ea,_isIterateeCall as eb,isSymbol_1 as ec,_baseMap as ed,_baseUnary as ee,memoizeOne as ef,createBox$1 as eg,StepperContext$1 as eh,StepContext$1 as ei,SvgIcon$1 as ej,StepConnector$1 as ek,_Symbol as el,_Set as em,_setToArray as en,_SetCache as eo,_cacheHas as ep,img$M as eq,img$L as er,img$1u as es,img$1t as et,img$1s as eu,img$J as ev,img$1w as ew,img$I as ex,authSelector as ey,ListItemAvatar$1 as ez,clsx as f,ArrowDown as f$,EAuthResourceType as f0,Slide$1 as f1,img$9 as f2,selectPanelByPanelName as f3,FullScreenContainer as f4,isPermissionLoading as f5,Settings$2 as f6,Hamburger as f7,List as f8,Download as f9,NullState$2 as fA,Group as fB,PermissionChangedAction as fC,Lock as fD,useOrganizationPermissions as fE,EAuthSubResourceType as fF,AddGroup as fG,initialConfigSelector as fH,ConfirmationModal as fI,EnumHelpers as fJ,formatBytes as fK,LinearProgress$1 as fL,NotInterested as fM,mountPanelForResponse$1 as fN,Users as fO,ApplicationTabIcon as fP,SecurityGroup as fQ,getOrganizationPanelModule as fR,Lock2 as fS,NoApps as fT,green$1 as fU,md5 as fV,selectIsSuperAdmin as fW,organizations_selector as fX,actions$5 as fY,AddUser as fZ,ArrowUp as f_,Badge$1 as fa,convertEntityToAuthResource as fb,selectUserOrgEdgeVersion as fc,EditAttributes as fd,gqlIntrospection as fe,ProcessingDetail as ff,img$u as fg,img$w as fh,img$3 as fi,FilterRemove as fj,CheckCircle as fk,FolderOpen as fl,Voice as fm,useDoubleClick as fn,FolderFilled as fo,Time as fp,img$x as fq,Undefined as fr,PodcastSource as fs,YoutubeSource as ft,TVSource as fu,RadioSource as fv,selectOrgId as fw,selectIsUserAdmin as fx,AvatarGroup$1 as fy,ErrorState$2 as fz,generateUtilityClass as g,selectors as g0,LibraryDropdown as g1,Remove as g2,Save as g3,Input$3 as g4,Copy as g5,ArrowForward as g6,Modal$1 as g7,_baseIsEqual as g8,Slider$1 as g9,useSyncExternalStoreExports as gA,Packages as gB,Resources$1 as gC,selectUserCanCreatePackage as gD,Engines as gE,PackagesAvatar as gF,actionChannel as gG,cancelled as gH,flush$3 as gI,cancel as gJ,FlowCenter2 as gK,registry as gL,registerComponent as gM,AvailableWidgets as gN,updatePanelMicroFrontendProps as gO,setData as gP,root as gQ,mountWidget as gR,unmountWidget as gS,mountPanel as gT,unmountPanel as gU,hidePanel as gV,unmountAllPanel as gW,init as gX,aiwareEvents as gY,_getSymbols as ga,stubArray_1 as gb,_baseGetAllKeys as gc,_getTag as gd,_nodeUtil as ge,_getAllKeys as gf,_castFunction as gg,Article as gh,Task as gi,View as gj,_objectSpread2 as gk,serialize as gl,stringify$2 as gm,compile as gn,Check as go,FormattedRelativeTime$1 as gp,BottomQueue as gq,TopQueue as gr,Pause as gs,Cancel as gt,Folder as gu,Hidden as gv,toFinite_1 as gw,_baseForOwn as gx,_arrayReduce as gy,hasIn_1 as gz,composeClasses as h,createSvgIcon$1 as i,jsxRuntime as j,interopRequireDefault as k,useDispatch as l,makeStyles as m,useSelector as n,authStatusSelector as o,authContextSelector as p,AuthContext as q,react as r,store$4 as s,lodash as t,useThemeProps as u,Alert$1 as v,authErrorMessage as w,FormControl$1 as x,TextField$1 as y,classNames as z};
1483
+ `,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$f(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$f(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:"0c8b283ff",releaseDate:"2023-06-21T15:43:49.263Z"});export{DynamicModuleLoader as $,AIWareIntlProvider as A,Box$1 as B,resetPasswordRequest as C,InputAdornment$1 as D,IconButton$1 as E,FormattedMessage$1 as F,Grid$1 as G,Select$1 as H,InputLabel$1 as I,Location as J,Button$1 as K,LoadingButton$1 as L,MenuItem$1 as M,Divider$1 as N,OutlinedInput$1 as O,Provider$2 as P,createTheme$1 as Q,systemStyled as R,Switch$1 as S,Typography$1 as T,useThemeProps$1 as U,createAction as V,createReducer as W,createSlice as X,ENGINE_OWNER_TYPES as Y,ENGINE_FILTER_TYPES as Z,_extends as _,generateUtilityClasses as a,img$p as a$,preferredLanguageSelector as a0,baseUrlSelector as a1,rootApiSelector as a2,sessionTokenSelector as a3,graphEndpointSelector as a4,controllerNodeRedImageSelector as a5,controllerUrlSelector as a6,automateControllerUrlSelector as a7,flowCenterDialogSelector as a8,automateUrlSelector as a9,FormGroup$1 as aA,FormControlLabel$1 as aB,Checkbox$1 as aC,fetchTemplateGalleryFallback as aD,Card$1 as aE,CardContent$1 as aF,img$l as aG,CardActions$1 as aH,flowStyles as aI,NoResults as aJ,CircularProgress$1 as aK,img$b as aL,Dialog$1 as aM,setApiEndpoint as aN,TableContainer$1 as aO,Table$1 as aP,TableHead$1 as aQ,TableRow$1 as aR,TableCell$1 as aS,TableSortLabel$1 as aT,TableBody$1 as aU,img$g as aV,default_1 as aW,Popper$1 as aX,ClickAwayListener as aY,Fade$1 as aZ,img$s as a_,Portal$1 as aa,flowCenterDialogReducer as ab,List$2 as ac,ListItem$1 as ad,ListItemIcon$1 as ae,ListItemText$1 as af,flowCenterDialogAction as ag,all as ah,img$n as ai,img$o as aj,img$q as ak,img$r as al,Tooltip$1 as am,img$h as an,img$F as ao,Skeleton$1 as ap,takeLatest$1 as aq,fetchAllTags as ar,put as as,select as at,fetchFlows as au,call$f as av,fetchTemplateGallery as aw,isRevisionsExistOnServerRequest as ax,FormLabel$1 as ay,default_1$b as az,styled$1 as b,FormHelperText$2 as b$,img$P as b0,img$B as b1,DialogTitle$1 as b2,DialogContent$1 as b3,DialogActions$1 as b4,Snackbar$1 as b5,default_1$6 as b6,img$i as b7,img$k as b8,img$T as b9,__spread as bA,TransitionGroup$1 as bB,connect$1 as bC,Bookmark as bD,EngineFlagIcons as bE,createAsyncThunk as bF,withStyles as bG,getConfigModule as bH,getAuthModule as bI,getSnackbarModule as bJ,AIWareCacheProvider as bK,img$Q as bL,img$d as bM,img$c as bN,isEmpty_1 as bO,Backdrop$1 as bP,getDefaultMiddleware as bQ,isNil_1 as bR,UpDown as bS,Icon$1 as bT,get_1 as bU,map_1 as bV,keys_1 as bW,RadioGroup$1 as bX,Avatar$1 as bY,img$v as bZ,baseGraphQLApi as b_,Tabs$2 as ba,Tab$2 as bb,deleteEngine as bc,fetchEngine as bd,img$j as be,AIWareFormatMessage as bf,FormattedDate as bg,fetchVeritoneGraphQLApi as bh,useTheme as bi,KeyboardArrowRight as bj,KeyboardArrowLeft as bk,useId as bl,InputUnstyled as bm,isHostComponent as bn,getDefaultExportFromNamespaceIfNotNamed as bo,commonjsRequire as bp,_typeof$4 as bq,_inheritsLoose$2 as br,_assertThisInitialized$1 as bs,React as bt,hoistNonReactStatics_cjs as bu,_defineProperty$1 as bv,reactDom as bw,Transition$1 as bx,__awaiter$d as by,__generator$2 as bz,Paper$1 as c,_stringToArray as c$,img$f as c0,StyledEngineProvider as c1,ThemeProvider as c2,lightTheme$1 as c3,CssBaseline as c4,Hide as c5,has_1 as c6,showMessage as c7,MessageSeverity as c8,Radio$2 as c9,Menu$1 as cA,Edit as cB,Upload as cC,Delete as cD,CustomTabs as cE,useBackupImg as cF,img$1y as cG,validate as cH,configSelector as cI,baseGraphQLApiWithError as cJ,VerifiedFilled as cK,Add as cL,ExpandLess as cM,ExpandMore as cN,Collapse$1 as cO,img$15 as cP,Filter$1 as cQ,DynamicTable as cR,useTheme$3 as cS,getThemeProps as cT,useEnhancedEffect$1 as cU,React$1 as cV,_arrayPush as cW,isArray_1 as cX,_baseToString as cY,_baseTrim as cZ,_castSlice as c_,createSvgIcon$2 as ca,_createCompounder as cb,_baseIteratee as cc,isArrayLike_1 as cd,toInteger_1 as ce,_toPropertyKey as cf,_setPrototypeOf$3 as cg,commonjsGlobal$1 as ch,combineReducers as ci,createSelector$1 as cj,fork as ck,AIWareThemeProvider$1 as cl,Stack$4 as cm,Close$1 as cn,FullscreenExit as co,Fullscreen as cp,TabPanel as cq,default_1$8 as cr,unmountPanel$1 as cs,AvailableComponents as ct,delay$1 as cu,hidePanel$1 as cv,mountPanel$1 as cw,DialogContentText$1 as cx,userSelector$2 as cy,MoreVert$1 as cz,capitalize$2 as d,_overArg as d$,toString_1 as d0,ReactIs as d1,upperFirst_1 as d2,isString_1 as d3,_baseGet as d4,_baseSlice as d5,_castPath as d6,_toKey as d7,_isIndex as d8,channel$1 as d9,useForkRef as dA,getDefaultExportFromCjs as dB,isObject_1 as dC,MoreHor as dD,takeEvery$1 as dE,EngineCategoryIcons as dF,selectApiConfigs$2 as dG,panelsSelector as dH,tabsClasses$1 as dI,AlarmTwo as dJ,EditList as dK,Chip$1 as dL,usePreviousProps$1 as dM,setRef as dN,inputClasses$1 as dO,inputBaseClasses$1 as dP,outlinedInputClasses$1 as dQ,filledInputClasses$1 as dR,ClearIcon as dS,ArrowDropDownIcon as dT,_arrayMap as dU,_baseEach as dV,_arrayFilter as dW,_getNative as dX,eq_1 as dY,_root as dZ,_Uint8Array as d_,useIntl as da,VideoCamera as db,Image$1 as dc,Sound as dd,Description as de,toNumber_1 as df,ProgressStepper as dg,size_1 as dh,take as di,CurlyBraces as dj,UnknownDocument as dk,sdkEventManager as dl,SdkEvents as dm,SdkError as dn,EngineClassIcons as dp,Mode2 as dq,EngineModeIcons as dr,DeploymentModelIcons as ds,guid as dt,forceReflow as du,alpha as dv,useTheme$2 as dw,useControlled as dx,useEventCallback as dy,ButtonBase$1 as dz,_objectWithoutPropertiesLoose$2 as e,MoveFolder as e$,_isPrototype as e0,isObjectLike_1 as e1,_baseGetTag as e2,_arrayLikeKeys as e3,isArguments_1 as e4,isBuffer$3 as e5,isFunction_1 as e6,isTypedArray_1 as e7,_Stack as e8,_baseFor as e9,emphasize as eA,useSlotProps as eB,_arraySome as eC,EntityType as eD,injectIntl as eE,ErrorBoundary$1 as eF,EPermissionAction as eG,Process as eH,Information as eI,NewFolder as eJ,SpecialFolder as eK,User as eL,Source as eM,Search$1 as eN,selectIsOLPEnabled as eO,ListItemSecondaryAction$1 as eP,getLibraryModule as eQ,cmsUrlSelector as eR,betaFeaturesSelector as eS,SearchStructuredData as eT,Grow$1 as eU,index as eV,actions as eW,hasPermission as eX,UserAddFilled as eY,Popover$1 as eZ,MenuList$1 as e_,identity_1 as ea,_isIterateeCall as eb,isSymbol_1 as ec,_baseMap as ed,_baseUnary as ee,memoizeOne as ef,createBox$1 as eg,StepperContext$1 as eh,StepContext$1 as ei,SvgIcon$1 as ej,StepConnector$1 as ek,_Symbol as el,_Set as em,_setToArray as en,_SetCache as eo,_cacheHas as ep,img$M as eq,img$L as er,img$1u as es,img$1t as et,img$1s as eu,img$J as ev,img$1w as ew,img$I as ex,authSelector as ey,ListItemAvatar$1 as ez,clsx as f,ArrowDown as f$,EAuthResourceType as f0,Slide$1 as f1,img$9 as f2,selectPanelByPanelName as f3,FullScreenContainer as f4,isPermissionLoading as f5,Settings$2 as f6,Hamburger as f7,List as f8,Download as f9,NullState$2 as fA,Group as fB,PermissionChangedAction as fC,Lock as fD,useOrganizationPermissions as fE,EAuthSubResourceType as fF,AddGroup as fG,initialConfigSelector as fH,ConfirmationModal as fI,EnumHelpers as fJ,formatBytes as fK,LinearProgress$1 as fL,NotInterested as fM,mountPanelForResponse$1 as fN,Users as fO,ApplicationTabIcon as fP,SecurityGroup as fQ,getOrganizationPanelModule as fR,Lock2 as fS,NoApps as fT,green$1 as fU,md5 as fV,selectIsSuperAdmin as fW,organizations_selector as fX,actions$5 as fY,AddUser as fZ,ArrowUp as f_,Badge$1 as fa,convertEntityToAuthResource as fb,selectUserOrgEdgeVersion as fc,EditAttributes as fd,gqlIntrospection as fe,ProcessingDetail as ff,img$u as fg,img$w as fh,img$3 as fi,FilterRemove as fj,CheckCircle as fk,FolderOpen as fl,Voice as fm,useDoubleClick as fn,FolderFilled as fo,Time as fp,img$x as fq,Undefined as fr,PodcastSource as fs,YoutubeSource as ft,TVSource as fu,RadioSource as fv,selectOrgId as fw,selectIsUserAdmin as fx,AvatarGroup$1 as fy,ErrorState$2 as fz,generateUtilityClass as g,selectors as g0,LibraryDropdown as g1,Remove as g2,Save as g3,Input$3 as g4,Copy as g5,ArrowForward as g6,Modal$1 as g7,_baseIsEqual as g8,Slider$1 as g9,useSyncExternalStoreExports as gA,Packages as gB,Resources$1 as gC,selectUserCanCreatePackage as gD,Engines as gE,PackagesAvatar as gF,actionChannel as gG,cancelled as gH,flush$3 as gI,cancel as gJ,FlowCenter2 as gK,registry as gL,registerComponent as gM,AvailableWidgets as gN,updatePanelMicroFrontendProps as gO,setData as gP,root as gQ,mountWidget as gR,unmountWidget as gS,mountPanel as gT,unmountPanel as gU,hidePanel as gV,unmountAllPanel as gW,init as gX,aiwareEvents as gY,_getSymbols as ga,stubArray_1 as gb,_baseGetAllKeys as gc,_getTag as gd,_nodeUtil as ge,_getAllKeys as gf,_castFunction as gg,Article as gh,Task as gi,View as gj,_objectSpread2 as gk,serialize as gl,stringify$2 as gm,compile as gn,Check as go,FormattedRelativeTime$1 as gp,BottomQueue as gq,TopQueue as gr,Pause as gs,Cancel as gt,Folder as gu,Hidden as gv,toFinite_1 as gw,_baseForOwn as gx,_arrayReduce as gy,hasIn_1 as gz,composeClasses as h,createSvgIcon$1 as i,jsxRuntime as j,interopRequireDefault as k,useDispatch as l,makeStyles as m,useSelector as n,authStatusSelector as o,authContextSelector as p,AuthContext as q,react as r,store$4 as s,lodash as t,useThemeProps as u,Alert$1 as v,authErrorMessage as w,FormControl$1 as x,TextField$1 as y,classNames as z};
package/js-core.esm.js.gz CHANGED
Binary file
package/js-core.esm69.js CHANGED
@@ -85,4 +85,4 @@ import{ca as createSvgIcon,j as jsxRuntime,X as createSlice,ci as combineReducer
85
85
  }
86
86
  }
87
87
  }
88
- }`;const l=n.reduce((e,t)=>(e[t.name]=t.value,e),{});a.length&&(l.filter=a.reduce((e,t)=>(e[t.name]=t.value,e),{}));var c=yield gqlIntrospection.queryParser(t,r,e),e=(null==c?void 0:c.query)||e,c=(null!=(m=null==c?void 0:c.unsupportedArgs)&&m.forEach(e=>{console.warn("Removing unsupport argument for engines query",e),delete l[e]}),yield baseGraphQLApi({query:e,operationName:s,graphEndpoint:t,token:r,variables:l}));return c.data.engines.records})}const selectSchemaFilters=e=>e[namespace].schemas.filters,namespace$5="schemas",{slice:slice$4,selectors:selectors$3,sagas:sagas$3,initialState:initialState$5}=generateState({sliceName:SLICE_NAME,namespace:namespace$5,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getSchemas,pageSize:20,getAdditionalSelectors:()=>({schemaFilters:selectSchemaFilters})}}),selectUIStateStatus=e=>e[namespace].uiState.status,selectIsFiltersOpen=e=>e[namespace].uiState.isFiltersOpen,selectCategoryFilterSearchName=e=>e[namespace].uiState.categoryFilterSearchName,selectCategoryFilterSearchType=e=>e[namespace].uiState.categoryFilterSearchType;var uiState=Object.freeze({__proto__:null,selectUIStateStatus:selectUIStateStatus,selectIsFiltersOpen:selectIsFiltersOpen,selectCategoryFilterSearchName:selectCategoryFilterSearchName,selectCategoryFilterSearchType:selectCategoryFilterSearchType});const namespace$4="engineCategories",{slice:slice$3,selectors:selectors$2,sagas:sagas$2,initialState:initialState$4}=generateState({sliceName:SLICE_NAME,namespace:namespace$4,dedupeResponse:!0,apiCalls:{read:readEngineCategories,pageSize:50,getAdditionalSelectors:()=>({name:selectCategoryFilterSearchName,type:selectCategoryFilterSearchType})}}),selectFlowFilters=e=>e[namespace].flows.filters,namespace$3="flows",{slice:slice$2,selectors:selectors$1,sagas:sagas$1,initialState:initialState$3}=generateState({sliceName:SLICE_NAME,namespace:namespace$3,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:readFlows,pageSize:10,getAdditionalSelectors:()=>({flowFilters:selectFlowFilters})}}),namespace$2="schemaDetails",initialState$2={status:"idle",dataRegistry:{}},slice$1=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$2,reducers:{fetchSchemaDetailsStart(e,t){e.status="pending"},fetchSchemaDetailsSucceeded(e,t){e.dataRegistry=t.payload,e.status="success"},fetchEnginesFailed(e){e.status="failure"}}}),actions$1=slice$1.actions;var schemaDetails$1=slice$1.reducer;const selectApplicationFilters=e=>e[namespace].applications.filters,namespace$1="applications",{slice,selectors,sagas,initialState:initialState$1}=generateState({sliceName:SLICE_NAME,namespace:namespace$1,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getApplications,pageSize:20,getAdditionalSelectors:()=>({applicationFilters:selectApplicationFilters})}}),namespace=SLICE_NAME,initialState={[namespace$8]:initialState$8,[namespace$6]:initialState$6,[namespace$5]:initialState$5,[namespace$3]:initialState$3,[namespace$4]:initialState$4,[namespace$2]:initialState$2,[namespace$1]:initialState$1,[namespace$7]:initialState$7},actions={[namespace$8]:actions$4,[namespace$6]:actions$2,[namespace$5]:slice$4.actions,[namespace$3]:slice$2.actions,[namespace$4]:slice$3.actions,[namespace$2]:actions$1,[namespace$1]:slice.actions,[namespace$7]:actions$3},rootReducer=combineReducers({[namespace$8]:uiState$1,[namespace$6]:engines,[namespace$5]:slice$4.reducer,[namespace$3]:slice$2.reducer,[namespace$4]:slice$3.reducer,[namespace$2]:schemaDetails$1,[namespace$1]:slice.reducer,[namespace$7]:resourcesTab_slice}),selectEnginesLoadingStatus=e=>e[namespace].engines.status,selectEnginesOffset=e=>e[namespace].engines.offset,selectEnginesHasMore=e=>e[namespace].engines.hasMore,selectEngines=e=>e[namespace].engines.engines,selectDefaultCategories=e=>e[namespace].engines.defaultCategories,selectEngineFilters=e=>e[namespace].engines.filters,EngineStatusFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectEngineFilters).find(e=>e.type===EEngineFilterType.Status))?void 0:e.values)||[],r=Object.values(EEngineState).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.status-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-engine-status-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions$2.setFilter({type:EEngineFilterType.Status,values:e}))},isMultiselect:!0})};var anObject$4=anObject$f,regexpFlags$1=function(){var e=anObject$4(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},fails$4=fails$k,global$3=global$n,$RegExp$2=global$n.RegExp,UNSUPPORTED_Y$1=fails$4(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$1||fails$4(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$1||fails$4(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$1},fails$3=fails$k,global$2=global$n,$RegExp$1=global$n.RegExp,regexpUnsupportedDotAll=fails$3(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),fails$2=fails$k,global$1=global$n,$RegExp=global$n.RegExp,regexpUnsupportedNcg=fails$2(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$4=functionCall,uncurryThis$4=functionUncurryThis,toString$4=toString$7,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=shared$4.exports,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$3=uncurryThis$4("".charAt),indexOf=uncurryThis$4("".indexOf),replace$1=uncurryThis$4("".replace),stringSlice$3=uncurryThis$4("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return call$4(nativeExec,e,"a"),call$4(nativeExec,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$2=patchedExec=PATCH?function(e){var t,r,s,n,a,o,i=this,l=getInternalState(i),e=toString$4(e),c=l.raw;if(c)return c.lastIndex=i.lastIndex,p=call$4(patchedExec,c,e),i.lastIndex=c.lastIndex,p;var u=l.groups,c=UNSUPPORTED_Y&&i.sticky,p=call$4(regexpFlags,i),l=i.source,d=0,g=e;if(c&&(p=replace$1(p,"y",""),-1===indexOf(p,"g")&&(p+="g"),g=stringSlice$3(e,i.lastIndex),0<i.lastIndex&&(!i.multiline||i.multiline&&"\n"!==charAt$3(e,i.lastIndex-1))&&(l="(?: "+l+")",g=" "+g,d++),t=new RegExp("^(?:"+l+")",p)),NPCG_INCLUDED&&(t=new RegExp("^"+l+"$(?!\\s)",p)),UPDATES_LAST_INDEX_WRONG&&(r=i.lastIndex),s=call$4(nativeExec,c?t:i,g),c?s?(s.input=stringSlice$3(s.input,d),s[0]=stringSlice$3(s[0],d),s.index=i.lastIndex,i.lastIndex+=s[0].length):i.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&s&&(i.lastIndex=i.global?s.index+s[0].length:r),NPCG_INCLUDED&&s&&1<s.length&&call$4(nativeReplace,s[0],t,function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(s[n]=void 0)}),s&&u)for(s.groups=a=create(null),n=0;n<u.length;n++)a[(o=u[n])[0]]=s[o[1]];return s}:patchedExec,$=_export,exec=regexpExec$2,uncurryThis$3=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec:exec}),functionUncurryThis),defineBuiltIn=defineBuiltIn$6,regexpExec$1=regexpExec$2,fails$1=fails$k,wellKnownSymbol$1=wellKnownSymbol$g,createNonEnumerableProperty=createNonEnumerableProperty$5,SPECIES=wellKnownSymbol$1("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(r,e,t,s){var o,n=wellKnownSymbol$1(r),i=!fails$1(function(){var e={};return e[n]=function(){return 7},7!=""[r](e)}),a=i&&!fails$1(function(){var e=!1,t=/a/;return"split"===r&&((t={constructor:{}}).constructor[SPECIES]=function(){return t},t.flags="",t[n]=/./[n]),t.exec=function(){return e=!0,null},t[n](""),!e});i&&a&&!t||(o=uncurryThis$3(/./[n]),a=e(n,""[r],function(e,t,r,s,n){var e=uncurryThis$3(e),a=t.exec;return a===regexpExec$1||a===RegExpPrototype.exec?i&&!n?{done:!0,value:o(t,r,s)}:{done:!0,value:e(r,t,s)}:{done:!1}}),defineBuiltIn(String.prototype,r,a[0]),defineBuiltIn(RegExpPrototype,n,a[1])),s&&createNonEnumerableProperty(RegExpPrototype[n],"sham",!0)},uncurryThis$2=functionUncurryThis,toIntegerOrInfinity$1=toIntegerOrInfinity$4,toString$3=toString$7,requireObjectCoercible$3=requireObjectCoercible$7,charAt$2=uncurryThis$2("".charAt),charCodeAt=uncurryThis$2("".charCodeAt),stringSlice$2=uncurryThis$2("".slice),createMethod=function(n){return function(e,t){var r,e=toString$3(requireObjectCoercible$3(e)),t=toIntegerOrInfinity$1(t),s=e.length;return t<0||s<=t?n?"":void 0:(r=charCodeAt(e,t))<55296||56319<r||t+1===s||(s=charCodeAt(e,t+1))<56320||57343<s?n?charAt$2(e,t):r:n?stringSlice$2(e,t,t+2):s-56320+(r-55296<<10)+65536}},stringMultibyte={codeAt:createMethod(!1),charAt:createMethod(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex$2=function(e,t,r){return t+(r?charAt$1(e,t).length:1)},uncurryThis$1=functionUncurryThis,toObject=toObject$5,floor=Math.floor,charAt=uncurryThis$1("".charAt),replace=uncurryThis$1("".replace),stringSlice$1=uncurryThis$1("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(a,o,i,l,c,e){var u=i+a.length,p=l.length,t=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==c&&(c=toObject(c),t=SUBSTITUTION_SYMBOLS),replace(e,t,function(e,t){var r;switch(charAt(t,0)){case"$":return"$";case"&":return a;case"`":return stringSlice$1(o,0,i);case"'":return stringSlice$1(o,u);case"<":r=c[stringSlice$1(t,1,-1)];break;default:var s,n=+t;if(0==n)return e;if(p<n)return 0!==(s=floor(n/10))&&s<=p?void 0===l[s-1]?charAt(t,1):l[s-1]+charAt(t,1):e;r=l[n-1]}return void 0===r?"":r})},call$3=functionCall,anObject$3=anObject$f,isCallable$1=isCallable$n,classof=classofRaw$1,regexpExec=regexpExec$2,$TypeError=TypeError,regexpExecAbstract=function(e,t){var r=e.exec;if(isCallable$1(r))return null!==(r=call$3(r,e,t))&&anObject$3(r),r;if("RegExp"===classof(e))return call$3(regexpExec,e,t);throw $TypeError("RegExp#exec called on incompatible receiver")},apply=functionApply,call$2=functionCall,uncurryThis=functionUncurryThis,fixRegExpWellKnownSymbolLogic$2=fixRegexpWellKnownSymbolLogic,fails=fails$k,anObject$2=anObject$f,isCallable=isCallable$n,toIntegerOrInfinity=toIntegerOrInfinity$4,toLength$1=toLength$3,toString$2=toString$7,requireObjectCoercible$2=requireObjectCoercible$7,advanceStringIndex$1=advanceStringIndex$2,getMethod$2=getMethod$6,getSubstitution=getSubstitution$1,regExpExec$2=regexpExecAbstract,wellKnownSymbol=wellKnownSymbol$g,REPLACE=wellKnownSymbol$g("replace"),max=Math.max,min=Math.min,concat=uncurryThis([].concat),push=uncurryThis([].push),stringIndexOf=uncurryThis("".indexOf),stringSlice=uncurryThis("".slice),maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")});fixRegExpWellKnownSymbolLogic$2("replace",function(e,b,h){var x=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,t){var r=requireObjectCoercible$2(this),s=null==e?void 0:getMethod$2(e,REPLACE);return s?call$2(s,e,r,t):call$2(b,toString$2(r),e,t)},function(e,t){var r=anObject$2(this),s=toString$2(e);if("string"==typeof t&&-1===stringIndexOf(t,x)&&-1===stringIndexOf(t,"$<")){e=h(b,r,s,t);if(e.done)return e.value}for(var n,a=isCallable(t),o=(a||(t=toString$2(t)),r.global),i=(o&&(n=r.unicode,r.lastIndex=0),[]);null!==(p=regExpExec$2(r,s))&&(push(i,p),o);)""===toString$2(p[0])&&(r.lastIndex=advanceStringIndex$1(s,toLength$1(r.lastIndex),n));for(var l="",c=0,u=0;u<i.length;u++){for(var p,d=toString$2((p=i[u])[0]),g=max(min(toIntegerOrInfinity(p.index),s.length),0),m=[],$=1;$<p.length;$++)push(m,maybeToString(p[$]));var y=p.groups,f=a?(f=concat([d],m,g,s),void 0!==y&&push(f,y),toString$2(apply(t,void 0,f))):getSubstitution(d,s,g,m,y,t);c<=g&&(l+=stringSlice(s,c,g)+f,c=g+d.length)}return l+stringSlice(s,c)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);const selectSchemaDetailUiStatus=e=>e[namespace].schemaDetails.status,selectDataRegistry=e=>e[namespace].schemaDetails.dataRegistry,selectSchemaVersions=e=>{return(null==(e=null==(e=null==(e=e[namespace].schemaDetails)?void 0:e.dataRegistry)?void 0:e.schemas)?void 0:e.records)||[]};var schemaDetails=Object.freeze({__proto__:null,selectSchemaDetailUiStatus:selectSchemaDetailUiStatus,selectDataRegistry:selectDataRegistry,selectSchemaVersions:selectSchemaVersions});const selectActiveResourceTab=e=>e[namespace].resourcesTab.activeTab,selectActiveResourceSearchValues=e=>e[namespace].resourcesTab.searchValues,selectIsTypingTableSearch=e=>e[namespace].resourcesTab.isTypingTableSearch,selectIsTableSearchVisible=e=>e[namespace].resourcesTab.isTableSearchVisible;var ESchemaStatus,ESchemaFilterType,resourcesTab_selectors=Object.freeze({__proto__:null,selectActiveResourceTab:selectActiveResourceTab,selectActiveResourceSearchValues:selectActiveResourceSearchValues,selectIsTypingTableSearch:selectIsTypingTableSearch,selectIsTableSearchVisible:selectIsTableSearchVisible});const selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,r)=>({apiRoot:e,graphQLEndpoint:t,token:r}));function*initResourceCenterResources(){yield!0}function*watchResourceCenterResourcesInit(){yield takeLatest$1(actions.uiState.init.type,initResourceCenterResources)}function*watchFetchEngines(){yield takeLatest$1(actions.engines.fetchEnginesStart.type,fetchEnginesSaga)}function*watchFetchSchemaDetails(){yield takeLatest$1(actions.schemaDetails.fetchSchemaDetailsStart.type,fetchSchemaDetails)}function*fetchEnginesSaga(){try{var t,r=yield select(selectApiConfigs$1),s=yield select(selectEnginesOffset),n=yield select(selectEngineFilters);let e=yield select(selectDefaultCategories);e.length||(t=yield call$k(readEngineCategories,{apiConfigs:r,offset:0,limit:50,additionalSelectors:{type:"Cognition"}}),yield put(actions.engines.setDefaultCategories(t)),e=yield select(selectDefaultCategories));var a=yield call$k(getEngines,r,{offset:s,limit:10,filters:n,defaultCategories:e});yield put(actions.engines.fetchEnginesSucceeded(a)),10===a.length?yield put(actions.engines.setHasMore(!0)):yield put(actions.engines.setHasMore(!1)),yield put(actions.engines.setOffset(s+10))}catch(e){yield put(actions.engines.fetchEnginesFailed())}}function*fetchSchemaDetails(e){try{var t=yield select(selectApiConfigs$1),r=e.payload.dataRegistryId,s=yield call$k(readSchemaDetails,t,r);yield put(actions.schemaDetails.fetchSchemaDetailsSucceeded(s))}catch(e){console.log({e:e})}}function*rootSaga(){yield all([watchResourceCenterResourcesInit(),watchFetchEngines(),watchFetchSchemaDetails(),sagas$3.watchCreate(),sagas$3.watchRead(),sagas$3.watchUpdate(),sagas$3.watchDelete(),sagas$2.watchCreate(),sagas$2.watchRead(),sagas$2.watchUpdate(),sagas$2.watchDelete(),sagas.watchCreate(),sagas.watchRead(),sagas.watchUpdate(),sagas.watchDelete(),sagas$1.watchCreate(),sagas$1.watchRead(),sagas$1.watchUpdate(),sagas$1.watchDelete()])}function getResourceCenterResourcesModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const useStyles$6=makeStyles()(e=>({searchContainer:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",border:"2px solid #E1E6ED",borderRadius:"6px",margin:"10px 0",padding:"8px"},searchInput:{width:"100%",border:"0",outline:"none",fontFamily:"'Nunito'",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"left"}})),DropdownSearchInput=({onChange:t,testId:e,placeholderText:r})=>{var s=useStyles$6()["classes"];const[n,a]=react.exports.useState("");return jsxRuntime.exports.jsxs("div",Object.assign({className:s.searchContainer},{children:[jsxRuntime.exports.jsx(Search,{}),jsxRuntime.exports.jsx("input",{"data-test":e,onClick:e=>e.stopPropagation(),className:s.searchInput,onChange:e=>{e=e.target.value;a(e),t(e)},value:n,placeholder:r})]}))},{selectItems,selectHasMore,selectReadStatus,selectOffset}=selectors$2,{TableInfiniteScroll}=tableInfiniteScroll["jsx"],useStyles$5=makeStyles()(e=>({formControl:{marginRight:"20px"},removePadding:{padding:0},label:{fontFamily:"Nunito",fontWeight:700,fontSize:14,color:"#2A323C",marginBottom:0,display:"flex",justifyContent:"space-between"},field:{width:180},clearBtn:{color:"#0C53B0",cursor:"pointer",fontWeight:400},dropdownContainer:{display:"flex",width:"100%",alignItems:"flex-start",justifyContent:"center"},categoryList:{display:"flex",flexDirection:"column",position:"relative",width:"100%",padding:"0 15px 0 15px",boxSizing:"border-box"},category:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"5px",cursor:"pointer",height:"100%",boxSizing:"border-box","&:hover":{borderRadius:"6px",backgroundColor:"rgba(228, 240, 252, 0.5)"}},selected:{borderRadius:"6px",backgroundColor:"rgba(228, 240, 252, 0.8)"},categoryItem:{width:"100%",marginRight:"auto"},engineIcons:{width:"20px !important",height:"20px !important",verticalAlign:"middle",marginRight:"15px",fill:"#2A323C"}})),muiSelectStyleOverrides={height:"28px",fontSize:"0.8em","& fieldset":{borderColor:"#D5DFE9",borderWidth:"2px",borderRadius:"6px"},"&:hover":{"&& fieldset":{borderColor:"rgba(42,50,60,0.5)"}}},EngineCategoriesFilter=()=>{const n=useDispatch(),r=useStyles$5()["classes"];var e=react.exports.useRef(null);const[t,s]=react.exports.useState(!1),a=(null==(o=useSelector(selectEngineFilters).find(e=>e.type===EEngineFilterType.Category))?void 0:o.values)||[];var o=useSelector(selectItems).filter(e=>"Automation"!==e.name);var i=useSelector(selectHasMore),l=useSelector(selectOffset),c=useSelector(selectReadStatus);react.exports.useEffect(()=>(n(actions.uiState.setCategoryFilterSearchType(EEngineType.Cognition)),t&&u(),()=>{n(actions.uiState.setCategoryFilterSearchName("")),p()}),[t]);const u=()=>{n(actions.engineCategories.readStart(null))};const p=()=>{n(actions.engineCategories.resetList(null))};var d=lodash.exports.debounce(e=>{n(actions.uiState.setCategoryFilterSearchName(e)),p(),u()},500);var g=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.engines.category-filter.empty",defaultMessage:"No Categories Found",description:"Empty category search"});const m=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.engines.category-filter.label",defaultMessage:"Category",description:"Category filter label"});return jsxRuntime.exports.jsxs(FormControl,Object.assign({size:"small",className:r.formControl},{children:[jsxRuntime.exports.jsxs("label",Object.assign({htmlFor:"resource-center-resources-engine-category-filter",className:r.label},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.category-filter.label",defaultMessage:"Category",description:"Category filter label"}),0<a.length&&jsxRuntime.exports.jsx("span",Object.assign({onClick:()=>{n(actions.engines.setFilter({type:EEngineFilterType.Category,values:[]}))},className:r.clearBtn},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.category-filter.clear",defaultMessage:"Clear",description:"Status filter clear button"})}))]})),jsxRuntime.exports.jsx(Select,Object.assign({id:"resource-center-resources-engine-category-filter",sx:muiSelectStyleOverrides,variant:"outlined",multiple:!1,displayEmpty:!0,open:t,renderValue:()=>{var e;return 0===a.length?jsxRuntime.exports.jsx("div",{children:"All"}):(e=jsxRuntime.exports.jsxs(Stack,Object.assign({style:{opacity:.8,margin:0}},{children:[jsxRuntime.exports.jsxs("span",Object.assign({style:{borderBottom:"1px solid #fff",paddingBottom:"3px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-categories-filter-tooltip.selected-tooltip-title",defaultMessage:"Selected",description:"Selected tooltip title"})," ",m]})),jsxRuntime.exports.jsx("ul",Object.assign({style:{padding:0}},{children:a.map(e=>jsxRuntime.exports.jsxs("li",{children:[" • ",e]},e))}))]})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e,placement:"bottom-start"},{children:jsxRuntime.exports.jsx("span",{children:a.join(", ")})})))},className:r.field,onClick:()=>{t&&(n(actions.uiState.setCategoryFilterSearchName("")),p()),s(!t)},MenuProps:{sx:{padding:0,width:"100%"},anchorOrigin:{vertical:"bottom",horizontal:"center"},classes:{list:r.removePadding,paper:r.removePadding}}},{children:[jsxRuntime.exports.jsx("div",Object.assign({onClick:e=>e.stopPropagation(),id:"categoryMenu",className:r.dropdownContainer,ref:e},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.categoryList},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"resource-center-resources-engine-category-select-item",sx:{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"},padding:"0px"},disableRipple:!0,focusRipple:!1,dense:!0,onKeyDown:e=>e.stopPropagation()},{children:jsxRuntime.exports.jsx(DropdownSearchInput,{testId:"resource-center-resources-engine-category-search-input",onChange:d,placeholderText:"Search Category Name..."})})),jsxRuntime.exports.jsx("div",Object.assign({style:{width:"245px"}},{children:jsxRuntime.exports.jsx(Divider,{})})),jsxRuntime.exports.jsx("div",Object.assign({className:"aiware-el ",style:{height:"500px",width:"245px"}},{children:t&&jsxRuntime.exports.jsx(TableInfiniteScroll,{hasMore:i,fetchMore:u,offset:l,items:o,itemHeight:40,isLoading:"pending"===c,error:"failure"===c,TableRowComponent:({item:s})=>{return jsxRuntime.exports.jsx(Box,Object.assign({className:(t=s,0<=a.findIndex(e=>e===t.name)?r.selected:""),sx:{width:"100%",height:"40px"}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:()=>{{var t=s;let e=lodash.exports.cloneDeep(a);const r=e.findIndex(e=>e===t.name);r<0?e.push(t.name):e=e.filter((e,t)=>t!==r),n(actions.engines.setFilter({type:EEngineFilterType.Category,values:e}))}},className:r.category},{children:[jsxRuntime.exports.jsx(Icon,{"data-test":"resource-center-engine-category-icon-"+s.name,className:r.engineIcons,component:void 0!==(e=s.name)&&e?(e=e.replace(/[{()}[\]]/g,"").replace(/\s/g,""),EngineCategoryIcons[e]):null,color:"secondary",fontSize:"small"}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2","data-test":"resource-center-engine-category-"+s.name,className:r.categoryItem,noWrap:!0},{children:s.name}))]}))}));var e,t},MessageEmptyState:g})}))]}))}),"engineCategoryMenu")]}))]}))},EngineDeploymentModelFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectEngineFilters).find(e=>e.type===EEngineFilterType.DeploymentModel))?void 0:e.values)||[],r=Object.values(EEngineDeploymentModel).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-deployment-model-filter.label",defaultMessage:"Deployment Model",description:"Deployment Model filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-deployment-model-filter.clear",defaultMessage:"Clear",description:"Deployment Model filter clear button"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-engine-deployment-model-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions$2.setFilter({type:EEngineFilterType.DeploymentModel,values:e}))},isMultiselect:!0})},EngineCertifiedFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectEngineFilters).find(e=>e.type===EEngineFilterType.Certified))?void 0:e.values)||[],r=Object.values(EEngineCertified).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.certified-filter.label",defaultMessage:"Certified",description:"Certified filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.certified-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-engine-certified-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions$2.setFilter({type:EEngineFilterType.Certified,values:e}))}})},SHARED_TEXT={ui:{header:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-panel.resources.table.header",defaultMessage:"Resources",description:"Resources Header"}),description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-panel.resources.description",defaultMessage:"Browse all resources available in this Organization.",description:"Resources description"}),tableSettings:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.settings-btn",defaultMessage:"Table Settings",description:"tooltip message on the table data settings"}),hideFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.filters-hide-btn",defaultMessage:"Hide Filters",description:"tooltip message on the table filter settings"}),showFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.filters-show-btn",defaultMessage:"Show Filters",description:"tooltip message on the table filter settings"})},engines:{emptyState:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.engines-table.empty-state-message",defaultMessage:"No Engines found",description:"Engines Table empty state, nothing found message"}),errorState:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.engines-table.error-state-message",defaultMessage:"Error Loading Engines",description:"Engines Table error state, error loading engines message"})},schemaDetails:{name:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-name-label",defaultMessage:"Name",description:"Schema Detail Name label"}),version:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-version-lable",defaultMessage:"Version",description:"Schema versions label"}),schemaId:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-schema-id-label",defaultMessage:"Schema ID",description:"Schema Id label"}),dataRegistryId:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-data-registry-id",defaultMessage:"Data Registry ID",description:"Schema Data Registry ID label"}),developer:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-developer",defaultMessage:"Developer",description:"Schema Developer label"}),created:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-created-date",defaultMessage:"Created",description:"Schema Created date label"}),copiedTitle:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-copy-to-clipboard",defaultMessage:"Copy to clipboard",description:"Copy to clipboard tooltip"}),copyTitle:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-copied.tooltip.title",defaultMessage:"Copied!",description:"Copied tooltip"})},resourceCardText:{class:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.engine-category-class",defaultMessage:"Class:",description:"Engine category class"}),owner:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.engine-resource-owner",defaultMessage:"Owner:",description:"Engine Resource Owner"}),capability:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-capability",defaultMessage:"Capability:",description:"Engine Resource Capability"}),price:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-price",defaultMessage:"Price:",description:"Engine Resource Price"}),deployment:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-deployment",defaultMessage:"Deployment:",description:"Engine Resource Deployment"}),package:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-package",defaultMessage:"Package:",description:"Engine Resource Package"}),packages:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card.packages",defaultMessage:"Packages:",description:"Schema Resource Packages"}),industry:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-industry",defaultMessage:"Industry:",description:"Engine Resource Industry"}),majorVersion:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card.major-version",defaultMessage:"Major Version:",description:"Schema Resource Major Version"}),minorVersion:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card.minor-version",defaultMessage:"Minor Version:",description:"Schema Resource Minor Version"})},filters:{active:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-btn.active",defaultMessage:"Active",description:"badge message on the table data search"}),search:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-btn",defaultMessage:"Search",description:"tooltip message on the table data search"}),searchingFor:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-btn.searching-for",defaultMessage:"Searching for ",description:"tooltip message on the table data search"}),searchKeyword:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-banner-search-keyword",defaultMessage:"Search keyword",description:"Message on the table data search"}),hideSearch:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-btn.hide-search",defaultMessage:"Hide Search",description:"tooltip message on the table data search"}),clearAll:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.flows.filters.clear",defaultMessage:"Clear All",description:"Button to clear all selected filters"}),applyFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.flows.filters.apply",defaultMessage:"Apply Filters",description:"Button to apply selected filters"}),clear:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.industry-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"}),clearSearch:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.industry-filter.clear-search.label",defaultMessage:"Clear Search",description:"Label for the button to clear the filter"}),industry:{label:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.industry-filter.label",defaultMessage:"Industry",description:"Industry filter label"})}}},FilterButtons=({onApply:e,onClearAll:t})=>jsxRuntime.exports.jsxs(Box,Object.assign({sx:{pt:"14px",display:"flex",gap:"10px"}},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"os-resource-center-apply-filters-btn",variant:"outlined",onClick:e},{children:SHARED_TEXT.filters.applyFilters()})),jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"os-resource-center-clear-filters-btn",color:"secondary",onClick:t},{children:SHARED_TEXT.filters.clearAll()}))]})),EngineFilters=()=>{const e=useDispatch();return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{p:"10px 20px 20px",borderBottom:"0.5px solid #D5DFE9"}},{children:[jsxRuntime.exports.jsx(EngineStatusFilter,{}),jsxRuntime.exports.jsx(EngineCategoriesFilter,{}),jsxRuntime.exports.jsx(EngineDeploymentModelFilter,{}),jsxRuntime.exports.jsx(EngineCertifiedFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onApply:()=>{e(actions.engines.resetFetchedEngines()),e(actions.engines.fetchEnginesStart())},onClearAll:()=>{e(actions.engines.clearFilters()),e(actions.engines.resetFetchedEngines()),e(actions.engines.fetchEnginesStart()),e(actions.resourcesTab.setClearTableSearch({resourceType:"engine"}))}})]}))},SchemaStatusFilter=(!function(e){e.Published="published",e.Deleted="deleted",e.Draft="draft",e.Inactive="inactive"}(ESchemaStatus=ESchemaStatus||{}),!function(e){e.Status="Status",e.Name="Name"}(ESchemaFilterType=ESchemaFilterType||{}),()=>{const t=useDispatch();var e=(null==(e=useSelector(selectSchemaFilters).find(e=>e.type===ESchemaFilterType.Status))?void 0:e.values)||[],r=Object.values(ESchemaStatus).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.schema.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.schema-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-schema-status-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions.schemas.setFilter({type:ESchemaFilterType.Status,values:e}))},isMultiselect:!0})}),SchemaFilters=()=>{const e=useDispatch();return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{p:"10px 20px 20px",borderBottom:"0.5px solid #D5DFE9"}},{children:[jsxRuntime.exports.jsx(SchemaStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onApply:()=>{e(actions.schemas.resetList(null)),e(actions.schemas.readStart(null))},onClearAll:()=>{e(actions.schemas.clearFilters(null)),e(actions.schemas.readStart(null)),e(actions.resourcesTab.setClearTableSearch({resourceType:"schema"}))}})]}))},FlowsStatusFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectFlowFilters).find(e=>e.type===EEngineFilterType.Status))?void 0:e.values)||[],r=Object.values(EEngineState).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.flows.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.flows-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-flows-status-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions.flows.setFilter({type:EEngineFilterType.Status,values:e}))},isMultiselect:!0})},FlowsDeploymentModelFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectFlowFilters).find(e=>e.type===EEngineFilterType.DeploymentModel))?void 0:e.values)||[],r=Object.values(EEngineDeploymentModel).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-deployment-model-filter.label",defaultMessage:"Deployment Model",description:"Deployment Model filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-deployment-model-filter.clear",defaultMessage:"Clear",description:"Deployment Model filter clear button"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-engine-deployment-model-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions.flows.setFilter({type:EEngineFilterType.DeploymentModel,values:e}))},isMultiselect:!0})},FlowsCertifiedFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectFlowFilters).find(e=>e.type===EEngineFilterType.Certified))?void 0:e.values)||[],r=Object.values(EEngineCertified).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.flows.certified-filter.label",defaultMessage:"Certified",description:"Certified filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.flows.certified-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-flows-certified-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions.flows.setFilter({type:EEngineFilterType.Certified,values:e}))}})},FlowsFilters=()=>{const e=useDispatch();return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{p:"10px 20px 20px",borderBottom:"0.5px solid #D5DFE9"}},{children:[jsxRuntime.exports.jsx(FlowsStatusFilter,{}),jsxRuntime.exports.jsx(FlowsDeploymentModelFilter,{}),jsxRuntime.exports.jsx(FlowsCertifiedFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onApply:()=>{e(actions.flows.resetList(null)),e(actions.flows.readStart(null))},onClearAll:()=>{e(actions.flows.clearFilters(null)),e(actions.flows.readStart(null))}})]}))};class ResourcesTabErrorBoundary extends react.exports.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e){console.log("componentDidCatch",e)}render(){return this.state.hasError&&console.log("Render Error",this.state.hasError),this.state.hasError?jsxRuntime.exports.jsx("h3",{children:"An error has occurred."}):this.props.children}}var sameValue$1=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},call$1=functionCall,fixRegExpWellKnownSymbolLogic$1=fixRegexpWellKnownSymbolLogic,anObject$1=anObject$f,requireObjectCoercible$1=requireObjectCoercible$7,sameValue=sameValue$1,toString$1=toString$7,getMethod$1=getMethod$6,regExpExec$1=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("search",function(s,n,a){return[function(e){var t=requireObjectCoercible$1(this),r=null==e?void 0:getMethod$1(e,s);return r?call$1(r,e,t):new RegExp(e)[s](toString$1(t))},function(e){var t=anObject$1(this),e=toString$1(e),r=a(n,t,e);return r.done?r.value:(r=t.lastIndex,sameValue(r,0)||(t.lastIndex=0),e=regExpExec$1(t,e),sameValue(t.lastIndex,r)||(t.lastIndex=r),null===e?-1:e.index)}]});const useStyles$4=makeStyles()(e=>({searchInput:{opacity:0,width:"0px",MozTransition:"all 300ms ease",WebkitTransition:"all 300ms ease","&.is-visible":{width:"400px",opacity:1},"&:focus":{outline:"none",boxShadow:"0 -1px 1px rgba(255, 255, 255, 0.25), 0 1px 5px rgba(0, 0, 0, 0.15)"}},searchContainer:{display:"flex"}})),TableSearchInput=({activeResourceType:t,onChange:r,onToggleSearch:e,testId:s,placeholderText:n})=>{var a=useStyles$4()["classes"];const o=useDispatch(),[i,l]=react.exports.useState(""),c=useSelector(selectActiveResourceSearchValues)[t],u=useSelector(selectIsTableSearchVisible);var p=useSelector(selectIsTypingTableSearch),d=!!c&&!u;const g=react.exports.useRef(debounce_1(r,1e3)).current;return react.exports.useEffect(()=>{l("")},[t]),react.exports.useEffect(()=>{u&&l(c)},[u]),react.exports.useEffect(()=>{i&&!c&&i&&l("")},[c]),jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(TextField,{autoFocus:u,inputRef:e=>{null!==e&&u&&e.focus()},"data-test":s,onClick:e=>e.stopPropagation(),className:a.searchInput+" "+(u?"is-visible":""),onChange:u?e=>{e=e.target.value;l(e),e&&o(actions.resourcesTab.setIsTypingTableSearch(!0)),e||r("",t),g(e,t)}:void 0,value:i,placeholder:u?n:"",InputProps:{endAdornment:jsxRuntime.exports.jsxs(InputAdornment,Object.assign({position:"end"},{children:[p&&jsxRuntime.exports.jsx(CircularProgress,{size:20,thickness:5}),!p&&i&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.filters.clearSearch()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{r("",t),l("")}},{children:jsxRuntime.exports.jsx(Clear,{})}))}))]}))}}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:u?SHARED_TEXT.filters.hideSearch():c?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[SHARED_TEXT.filters.searchingFor()," ",`"${c}"`]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[SHARED_TEXT.filters.search(),jsxRuntime.exports.jsx("span",Object.assign({style:{textTransform:"capitalize"}},{children:` ${t}s`}))]})},{children:jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(Badge,Object.assign({invisible:!d,badgeContent:jsxRuntime.exports.jsx(Typography,Object.assign({fontWeight:"bold",color:"white",variant:"caption"},{children:SHARED_TEXT.filters.active()})),color:"primary"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{o(actions.resourcesTab.setIsTableSearchVisible(!u)),e&&e()},"data-testid":"resource-center.resources.search","aria-labelledby":"resource-center.resources.search",size:"large"},{children:jsxRuntime.exports.jsx(Search,{sx:d?{color:"#1871E8"}:{}})}))}))})}))]})},TableSearchBanner=({onChange:e})=>{const t=useSelector(selectActiveResourceTab);var r=useSelector(selectActiveResourceSearchValues)[t],s=useSelector(selectIsTypingTableSearch);return r?jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{padding:"10px 30px",background:"#f2f5f9",borderBottom:"1px solid #d5dfe9",gap:"10px"},direction:"row",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2"},{children:SHARED_TEXT.filters.searchKeyword()})),s?jsxRuntime.exports.jsx(Skeleton,{sx:{transform:"none"},width:"100px",height:"32px"}):jsxRuntime.exports.jsx(Chip,{sx:{backgroundColor:"rgb(255 255 255)",border:"1px solid #d5dfe9!important"},label:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption",fontWeight:"bold"},{children:['"',r,'"']})),onDelete:()=>e("",t)})]})):null},useStyles$3=makeStyles()(e=>({root:{display:"flex",flexDirection:"column",height:"100%"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(4),borderBottom:"0.5px solid #D5DFE9"},tableWrapper:{overflow:"hidden"},toolbar:{alignItems:"baseline","& button svg":{marginRight:"5px"},display:"flex",justifyContent:"center"},tabPanel:{flexGrow:1},resourceTypeTabs:{flex:"1",display:"flex",flexDirection:"column"}})),tabsStyle={borderBottom:"0.5px solid #D5DFE9","& .Sdk-MuiButtonBase-root.MuiTab-root.MuiTab-textColorPrimary.Mui-selected":{color:"#2A323C!important"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#2A323C"}},EnginesTableTab=react.exports.lazy(()=>import("./js-core.esm82.js")),SchemasTableTab=react.exports.lazy(()=>import("./js-core.esm84.js")),ApplicationsTableTab=react.exports.lazy(()=>import("./js-core.esm85.js")),FlowsTableTab=react.exports.lazy(()=>import("./js-core.esm86.js")),ResourcesTab=({isPanelFullScreen:e})=>{var t=useStyles$3()["classes"];const s=useDispatch();var r=useSelector(selectIsFiltersOpen),n=useSelector(selectActiveResourceTab),a=react.exports.useCallback((e,t)=>{s(actions.resourcesTab.setActiveTab(t))},[]),o=(e,t)=>{var r=e.trim().toLowerCase();switch(s(actions.resourcesTab.setResourceTableSearchValue({resourceType:t,searchValue:e})),t){case"engine":return s(actions.engines.setFilter({type:EEngineFilterType.Name,values:[r]})),s(actions.engines.resetFetchedEngines()),void s(actions.engines.fetchEnginesStart());case"schema":return s(actions.schemas.setFilter({type:ESchemaFilterType.Name,values:[r]})),s(actions.schemas.resetList(null)),void s(actions.schemas.readStart(null));case"application":s(actions.applications.setFilter({type:EEngineFilterType.Name,values:[r]})),s(actions.applications.resetList(null)),s(actions.applications.readStart(null));break;case"flow":s(actions.flows.setFilter({type:EEngineFilterType.Name,values:[e.trim().toLowerCase()]})),s(actions.flows.resetList(null)),s(actions.flows.readStart(null))}};return jsxRuntime.exports.jsxs("section",Object.assign({className:t.root},{children:[jsxRuntime.exports.jsxs("header",Object.assign({className:t.header},{children:[jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5","data-testid":"resource-panel.resources.header"},{children:SHARED_TEXT.ui.header()})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{mt:1},variant:"body2","data-testid":"resource-panel.resources.description"},{children:SHARED_TEXT.ui.description()}))]}),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",gap:"10px",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(TableSearchInput,{activeResourceType:n,testId:"resource-search",placeholderText:`Search by ${n} name`,onChange:o,onToggleSearch:()=>{}}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.ui.tableSettings()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{},"data-testid":"resource-center.resources.settings","aria-labelledby":"resource-center.resources.settings",size:"large"},{children:jsxRuntime.exports.jsx(Settings,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r?SHARED_TEXT.ui.hideFilters():SHARED_TEXT.ui.showFilters()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{s(actions.uiState.toggleFilters())},"data-testid":"resource-center.resources.filters","aria-labelledby":"resource-center.resources.filters",size:"large"},{children:r?jsxRuntime.exports.jsx(FilterRemove,{}):jsxRuntime.exports.jsx(Filter,{})}))}))]}))]})),r&&"engine"===n&&jsxRuntime.exports.jsx(EngineFilters,{}),r&&"schema"===n&&jsxRuntime.exports.jsx(SchemaFilters,{}),r&&"flow"===n&&jsxRuntime.exports.jsx(FlowsFilters,{}),jsxRuntime.exports.jsxs("section",Object.assign({className:t.resourceTypeTabs},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({value:n,onChange:a,variant:"scrollable",sx:Object.assign({["& ."+tabsClasses.scrollButtons]:{"&.Mui-disabled":{opacity:.3}}},tabsStyle),scrollButtons:!0},{children:Object.keys(ResourceType).filter(e=>!0===ResourceType[e].isVisible).map(e=>{e=ResourceType[e];return jsxRuntime.exports.jsx(Tab,{label:e.name,value:e.value,"data-testid":"resource-center.resources.tab."+e.value},e.value)})})),jsxRuntime.exports.jsx(TableSearchBanner,{onChange:o}),jsxRuntime.exports.jsx(ResourcesTabErrorBoundary,{children:jsxRuntime.exports.jsxs(react.exports.Suspense,Object.assign({fallback:jsxRuntime.exports.jsx(Loader,{})},{children:["engine"===n&&jsxRuntime.exports.jsx(EnginesTableTab,{isFullScreen:e}),"schema"===n&&jsxRuntime.exports.jsx(SchemasTableTab,{isFullScreen:e}),"application"===n&&jsxRuntime.exports.jsx(ApplicationsTableTab,{isFullScreen:e}),"flow"===n&&jsxRuntime.exports.jsx(FlowsTableTab,{})]}))})]}))]}))},Loader=()=>jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:"99.5%",height:"180px",sx:{margin:"5px 5px 10px 5px",transform:"none",borderRadius:"5px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:"99.5%",height:"180px",sx:{margin:"15px 5px 0px 5px",transform:"none",borderRadius:"5px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:"99.5%",height:"180px",sx:{margin:"15px 5px 0px 5px",transform:"none",borderRadius:"5px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:"99.5%",height:"180px",sx:{margin:"15px 5px 0px 5px",transform:"none",borderRadius:"5px"}})]}),TitleCase=e=>e.charAt(0).toUpperCase()+e.slice(1),Header=({dataRegistry:e})=>{var{name:e,organization:{name:t}={},schemas:{records:[r]=[]}={}}=e;return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"column",padding:"30px 30px 40px 30px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({sx:{color:"#2A323C",fontStyle:"normal",fontWeight:600,fontSize:"24px",lineHeight:"33px",letterSpacing:"-1.30385e-09px"}},{children:e&&TitleCase(e)})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{color:"#6098D1",mb:1,fontWeight:400,fontSize:"14px"}},{children:t&&TitleCase(t)})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",component:"h1"},{children:jsxRuntime.exports.jsx(StatusBadge,{status:null==r?void 0:r.status})}))]}))},colorMap={[ESchemaStatus.Published]:{background:"#B9E0BB",color:"#16961B"},[ESchemaStatus.Deleted]:{background:"rgba(183, 28, 28, 0.2)",color:"#B71C1C"},[ESchemaStatus.Draft]:{background:"#FFFFFF",color:"#4F5863"},[ESchemaStatus.Inactive]:{background:"rgba(33, 33, 33, 0.1)",color:"#212121"}},StatusBadge=({status:e})=>{var t;return jsxRuntime.exports.jsx(Box,Object.assign({sx:Object.assign(Object.assign({mt:1,background:(null==(t=colorMap[e])?void 0:t.background)||"rgba(0,0,0,.5)",borderRadius:"2px",padding:"0px 10px",display:"inline-block"},e===ESchemaStatus.Draft&&{borderColor:"#4F5863",borderStyle:"solid",borderWidth:"0.5px"}),{"& span":{color:(null==(t=colorMap[e])?void 0:t.color)||"#000",fontWeight:800}})},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption","data-testid":"schema-details-status"},{children:e.toLocaleUpperCase()}))}))};function _wrapRegExp(){_wrapRegExp=function(e,t){return new s(e,void 0,t)};var n=RegExp.prototype,o=new WeakMap;function s(e,t,r){t=new RegExp(e,t);return o.set(t,r||o.get(e)),_setPrototypeOf(t,s.prototype)}function a(n,e){var a=o.get(e);return Object.keys(a).reduce(function(e,t){var r=a[t];if("number"==typeof r)e[t]=n[r];else{for(var s=0;void 0===n[r[s]]&&s+1<r.length;)s++;e[t]=n[r[s]]}return e},Object.create(null))}return _inherits(s,RegExp),s.prototype.exec=function(e){var t,e=n.exec.call(this,e);return e&&(e.groups=a(e,this),t=e.indices)&&(t.groups=a(t,this)),e},s.prototype[Symbol.replace]=function(e,t){var r,s;return"string"==typeof t?(r=o.get(this),n[Symbol.replace].call(this,e,t.replace(/\$<([^>]+)>/g,function(e,t){t=r[t];return"$"+(Array.isArray(t)?t.join("$"):t)}))):"function"==typeof t?(s=this,n[Symbol.replace].call(this,e,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(a(e,s)),t.apply(this,e)})):n[Symbol.replace].call(this,e,t)},_wrapRegExp.apply(this,arguments)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var call=functionCall,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject=anObject$f,toLength=toLength$3,toString=toString$7,requireObjectCoercible=requireObjectCoercible$7,getMethod=getMethod$6,advanceStringIndex=advanceStringIndex$2,regExpExec=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("match",function(s,i,l){return[function(e){var t=requireObjectCoercible(this),r=null==e?void 0:getMethod(e,s);return r?call(r,e,t):new RegExp(e)[s](toString(t))},function(e){var t=anObject(this),r=toString(e),e=l(i,t,r);if(e.done)return e.value;if(!t.global)return regExpExec(t,r);for(var s=t.unicode,n=[],a=t.lastIndex=0;null!==(o=regExpExec(t,r));){var o=toString(o[0]);""===(n[a]=o)&&(t.lastIndex=advanceStringIndex(r,toLength(t.lastIndex),s)),a++}return 0===a?null:n}]});const parseSchema=e=>{try{return JSON.stringify(e,null,1).split("\n")}catch(e){}},getMatchGroup=(e,t)=>{return((null==e?void 0:e.groups)||{})[t]},parseSchemaLine=e=>{e=e.match(_wrapRegExp(/^[\s]*(([{[])?(("([^"]+)")(: ))?([{[])?(("([^"]+)")?([a-z0-9.-]+)?)?([}\]])?(,)?)$/,{jpre:2,jkey:4,jkeydelim:6,jmid:7,jval:8,jpost:12,jdelim:13}));return e?{indents:e[0].length-e[1].length,groupOpen:getMatchGroup(e,"jpre"),key:getMatchGroup(e,"jkey"),keyDelim:getMatchGroup(e,"jkeydelim"),valueGroupOpen:getMatchGroup(e,"jmid"),value:getMatchGroup(e,"jval"),groupClose:getMatchGroup(e,"jpost"),delim:getMatchGroup(e,"jdelim")}:null},getSchemaVersionNumber=e=>`${null==e?void 0:e.majorVersion}.`+(null==e?void 0:e.minorVersion),useStyles$2=makeStyles()(()=>({container:{height:"calc(100vh - 110px - 85px - 145px)",display:"flex",flexDirection:"column"},dropDown:{width:250,height:36,margin:"16px 0",fontSize:"12px",lineHeight:"16px",fontWeight:400},paper:{height:"100%",padding:"20px",overflowY:"auto",backgroundColor:"#F7F7F7",fontSize:"14px",lineHeight:"20px"},spacer:{height:"5px",width:"100%"},jsonGroupOpen:{fontWeight:600},jsonValueGroupOpen:{fontWeight:600},jsonGroupClose:{fontWeight:600},jsonKey:{color:"blue"},jsonKeyDelim:{fontWeight:600,margin:"0 2px"},jsonValue:{color:"green"},jsonDelim:{fontWeight:600}})),SchemaViewer=({index:t})=>{var e=useSelector(selectSchemaVersions);const r=useStyles$2()["classes"],s=react.exports.useRef();e=parseSchema(e[t].definition||null);return react.exports.useEffect(()=>{var e;void 0!==t&&null!=(e=s.current)&&e.scrollTo(0,0)},[t]),jsxRuntime.exports.jsx(Paper,Object.assign({"data-test":"schema-details-panel.schema-tab",ref:e=>s.current=e,elevation:1,className:r.paper},{children:null==e?void 0:e.map((e,t)=>{e=parseSchemaLine(e);return e?jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"schema-details-panel.schema-tab.line","data-index":t,style:{marginLeft:e.indents+"em"}},{children:[jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.group-open",className:r.jsonGroupOpen},{children:e.groupOpen})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.key",className:r.jsonKey},{children:e.key})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.key-delim",className:r.jsonKeyDelim},{children:e.keyDelim})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.value-group-open",className:r.jsonValueGroupOpen},{children:e.valueGroupOpen})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.value",className:r.jsonValue},{children:e.value})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.group-close",className:r.jsonGroupClose},{children:e.groupClose})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.delim",className:r.jsonDelim},{children:e.delim}))]}),t):null})}))},SchemaTab=()=>{const[e,r]=react.exports.useState(0),s=useSelector(selectSchemaVersions);var t=useStyles$2()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Select,Object.assign({className:t.dropDown,value:getSchemaVersionNumber(s[e]),onChange:t=>{r(s.findIndex(e=>t.target.value===getSchemaVersionNumber(e)))}},{children:s.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:getSchemaVersionNumber(e)},{children:getSchemaVersionNumber(e)}),e.id))}))}),null!==s&&void 0!==s&&s.length?jsxRuntime.exports.jsx(SchemaViewer,{index:e}):null]}))},useStyles$1=makeStyles()(()=>({overviewContainer:{padding:"0 30px"},description:{padding:"30px 0"},version:{padding:"30px 0 49px"},new:{display:"flex",justifyContent:"space-between"},noVersion:{paddingTop:"16px"},item:{margin:"10px auto"},copyContainer:{height:"24px",display:"flex",alignItems:"center",paddingRight:"6px","&:has(> span:hover)":{background:"#edebeb",borderRadius:"20px"}},copyButton:{"& svg":{cursor:"pointer",width:15,marginLeft:"10px",transform:"translateY(2px)"}},label:{fontWeight:"400",color:"#5C6269"},fw:{fontWeight:"400"},divider:{opacity:.9}})),OverviewTab=()=>{var e=useStyles$1()["classes"],t=useSelector(selectDataRegistry);const[r,s]=react.exports.useState({schemaId:!1,dataRegistryId:!1}),{name:n,organization:{name:a}={},schemas:{records:[o]=[]}={},createdDateTime:i}=t,l=(t,e)=>{s(e=>Object.assign(Object.assign({},e),{[t]:!0})),navigator.clipboard.writeText(e),setTimeout(()=>{s(e=>Object.assign(Object.assign({},e),{[t]:!1}))},1500)};return jsxRuntime.exports.jsxs(Box,Object.assign({className:e.overviewContainer},{children:[(null==t?void 0:t.description)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.description},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.label,"data-testid":"os-resource-center-resources-schema-details-overview-tab-description"},{children:TitleCase(null==t?void 0:t.description)}))})),jsxRuntime.exports.jsx(Divider,{className:e.divider})]}),jsxRuntime.exports.jsxs("div",Object.assign({className:e.version},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.new},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2",sx:{fontWeight:"600"}},{children:"What’s New"})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",onClick:()=>{}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:"400",color:"#9CA8B4"}},{children:"Version History"}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:e.noVersion},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.label},{children:"There are no new versions of this Schema."}))}))]})),jsxRuntime.exports.jsx(Divider,{className:e.divider}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{pt:6,pb:2}},{children:"Information"})),jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,justifyContent:"center",alignItems:"center"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.name})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:n?TitleCase(n):"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.version})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:(null===o||void 0===o?void 0:o.majorVersion)||"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.schemaId})),jsxRuntime.exports.jsxs(Box,Object.assign({className:e.copyContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:(null===o||void 0===o?void 0:o.id)&&index.truncatedString(null===o||void 0===o?void 0:o.id,30)||"--"})),(null===o||void 0===o?void 0:o.id)&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r.schemaId?SHARED_TEXT.schemaDetails.copiedTitle:SHARED_TEXT.schemaDetails.copyTitle,sx:{whiteSpace:"pre-line"}},{children:r.schemaId?jsxRuntime.exports.jsx("span",Object.assign({className:e.copyButton,onClick:()=>l("schemaId",(null===o||void 0===o?void 0:o.id)||"")},{children:jsxRuntime.exports.jsx(Check,{})})):jsxRuntime.exports.jsx("span",Object.assign({className:e.copyButton,onClick:()=>l("schemaId",(null===o||void 0===o?void 0:o.id)||"")},{children:jsxRuntime.exports.jsx(Copy,{})}))}))]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.dataRegistryId})),jsxRuntime.exports.jsxs(Box,Object.assign({className:e.copyContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:(null===o||void 0===o?void 0:o.dataRegistryId)&&index.truncatedString(null===o||void 0===o?void 0:o.dataRegistryId,30)||"--"})),(null===o||void 0===o?void 0:o.dataRegistryId)&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r.dataRegistryId?SHARED_TEXT.schemaDetails.copiedTitle:SHARED_TEXT.schemaDetails.copyTitle},{children:r.dataRegistryId?jsxRuntime.exports.jsx("span",Object.assign({className:e.copyButton,onClick:()=>l("dataRegistryId",(null===o||void 0===o?void 0:o.dataRegistryId)||"")},{children:jsxRuntime.exports.jsx(Check,{})})):jsxRuntime.exports.jsx("span",Object.assign({className:e.copyButton,onClick:()=>l("dataRegistryId",(null===o||void 0===o?void 0:o.dataRegistryId)||"")},{children:jsxRuntime.exports.jsx(Copy,{})}))}))]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.developer})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:a||"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.created})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:new Date(i).toLocaleDateString("en-us",{day:"numeric",year:"numeric",month:"short"})+" "+index.formatTime(new Date(i))||"--"}))]}))]}))]})]}))},tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center.schema-detail-overview",defaultMessage:"Overview",description:"the title of the Overview tab"}),disabled:!1,id:"schema-detail-overview-tab",component:jsxRuntime.exports.jsx(OverviewTab,{})},{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center.schema-detail-schema",defaultMessage:"Schema",description:"the title of the Schema tab"}),disabled:!1,id:"schema-detail-overview-schema",component:jsxRuntime.exports.jsx(SchemaTab,{})}],MainLayout=()=>{const r=useStyles({})["classes"],[s,n]=react.exports.useState(0);return jsxRuntime.exports.jsxs("div",Object.assign({className:r.tabsContainer,"data-testid":"resource-center-schema-details-panel-tabs"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:r.tabsParent},{children:jsxRuntime.exports.jsx(Tabs,Object.assign({onChange:(e,t)=>{n(t)},value:s},{children:tabsList.map((e,t)=>jsxRuntime.exports.jsx(Tab,{label:e.label,"data-testid":e.id+"-tab"},e.id))}))})),jsxRuntime.exports.jsx(Divider,{className:r.divider}),jsxRuntime.exports.jsx("div",{children:tabsList.map((e,t)=>jsxRuntime.exports.jsx("div",Object.assign({className:r.secondBox},{children:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:s,index:t},{children:e.component}))}),e.id))})]}))},Content=({dataRegistryId:e})=>{var t=useSelector(selectSchemaDetailUiStatus),r=useSelector(selectDataRegistry);const s=useDispatch();var n=useStyles({})["classes"];react.exports.useEffect(()=>{e&&s(actions.schemaDetails.fetchSchemaDetailsStart({dataRegistryId:e}))},[s,e]);return"pending"===t&&jsxRuntime.exports.jsxs(Container,Object.assign({className:n.panelLoading},{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:400,height:200}),jsxRuntime.exports.jsx(Divider,{sx:{my:2}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:960,height:300})]}))||"success"===t&&jsxRuntime.exports.jsxs(Container,Object.assign({className:n.panelContent},{children:[jsxRuntime.exports.jsx(Header,{dataRegistry:r}),jsxRuntime.exports.jsx(MainLayout,{})]}))||"failure"===t&&jsxRuntime.exports.jsx(Container,{children:jsxRuntime.exports.jsx(ErrorState,{onRetry:()=>{s(actions.schemaDetails.fetchSchemaDetailsStart({dataRegistryId:e}))},errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resources-center-schema-details-panel-error-message",defaultMessage:"Something went wrong while loading your application details.",description:"error message shown when the application details panel encounters a load error"})})})||null},PanelContainer=({children:e})=>{var t=useStyles({})["classes"];const r=useDispatch();return jsxRuntime.exports.jsx("div",Object.assign({className:t.panelRoot,"data-testid":"schame-details-panel"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.panelContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:t.panelHeader},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"schema-details-panel-title",variant:"h1",sx:{color:"#5C6269",ml:4}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-schema.detail-panel-title",defaultMessage:"Schema Details",description:"The title of the Schema Details panel"})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-schema.detail-panel-close",defaultMessage:"Close Panel",description:"The title of the Schema Details panel close button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{r(hidePanel("SCHEMA_DETAILS_PANEL"))},"aria-labelledby":"schema-details-close-panel","data-testid":"schema-details-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:t.panelBody},{children:e}))]}))}))},SchemaDetailsPanel=({dataRegistryId:e})=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(PanelContainer,{children:jsxRuntime.exports.jsx(Content,{dataRegistryId:e})})})}),useStyles=makeStyles()((e,{})=>({panelRoot:{width:"100%"},panelContainer:{display:"flex",flexDirection:"column",width:"100%"},panelBody:{display:"flex",flexGrow:1},panelHeader:{display:"flex",padding:e.spacing(2),background:"#FAFAFA",justifyContent:"space-between",alignItems:"center","&.with-secondary-title":{alignItems:"flex-start"}},panelLoading:{height:300},panelContent:{width:"100%",padding:"0"},tabsContainer:{"& .Sdk-Mui-selected":{color:"black"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#000"}},tabsParent:{paddingLeft:e.spacing(4),"& div":{borderBottom:"none"},"& div button":{fontFamily:"Nunito",fontWeight:400,flex:"0 1 auto !important",minWidth:"unset"}},divider:{opacity:.9},secondBox:{display:"flex",flexDirection:"column",flexGrow:1}}));export{Clear as C,ResourcesTab as R,SchemaDetailsPanel as S,actions as a,selectors$2 as b,selectors$1 as c,rootReducer as d,schemaDetails as e,selectors$3 as f,getResourceCenterResourcesModule as g,selectApiConfigs as h,initialState as i,selectEngines as j,selectEnginesHasMore as k,selectEnginesOffset as l,selectEnginesLoadingStatus as m,namespace as n,SHARED_TEXT as o,resourcesTab_selectors as r,selectors as s,uiState as u};
88
+ }`;const l=n.reduce((e,t)=>(e[t.name]=t.value,e),{});a.length&&(l.filter=a.reduce((e,t)=>(e[t.name]=t.value,e),{}));var c=yield gqlIntrospection.queryParser(t,r,e),e=(null==c?void 0:c.query)||e,c=(null!=(m=null==c?void 0:c.unsupportedArgs)&&m.forEach(e=>{console.warn("Removing unsupport argument for engines query",e),delete l[e]}),yield baseGraphQLApi({query:e,operationName:s,graphEndpoint:t,token:r,variables:l}));return c.data.engines.records})}const selectSchemaFilters=e=>e[namespace].schemas.filters,namespace$5="schemas",{slice:slice$4,selectors:selectors$3,sagas:sagas$3,initialState:initialState$5}=generateState({sliceName:SLICE_NAME,namespace:namespace$5,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getSchemas,pageSize:20,getAdditionalSelectors:()=>({schemaFilters:selectSchemaFilters})}}),selectUIStateStatus=e=>e[namespace].uiState.status,selectIsFiltersOpen=e=>e[namespace].uiState.isFiltersOpen,selectCategoryFilterSearchName=e=>e[namespace].uiState.categoryFilterSearchName,selectCategoryFilterSearchType=e=>e[namespace].uiState.categoryFilterSearchType;var uiState=Object.freeze({__proto__:null,selectUIStateStatus:selectUIStateStatus,selectIsFiltersOpen:selectIsFiltersOpen,selectCategoryFilterSearchName:selectCategoryFilterSearchName,selectCategoryFilterSearchType:selectCategoryFilterSearchType});const namespace$4="engineCategories",{slice:slice$3,selectors:selectors$2,sagas:sagas$2,initialState:initialState$4}=generateState({sliceName:SLICE_NAME,namespace:namespace$4,dedupeResponse:!0,apiCalls:{read:readEngineCategories,pageSize:50,getAdditionalSelectors:()=>({name:selectCategoryFilterSearchName,type:selectCategoryFilterSearchType})}}),selectFlowFilters=e=>e[namespace].flows.filters,namespace$3="flows",{slice:slice$2,selectors:selectors$1,sagas:sagas$1,initialState:initialState$3}=generateState({sliceName:SLICE_NAME,namespace:namespace$3,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:readFlows,pageSize:10,getAdditionalSelectors:()=>({flowFilters:selectFlowFilters})}}),namespace$2="schemaDetails",initialState$2={status:"idle",dataRegistry:{}},slice$1=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$2,reducers:{fetchSchemaDetailsStart(e,t){e.status="pending"},fetchSchemaDetailsSucceeded(e,t){e.dataRegistry=t.payload,e.status="success"},fetchEnginesFailed(e){e.status="failure"}}}),actions$1=slice$1.actions;var schemaDetails$1=slice$1.reducer;const selectApplicationFilters=e=>e[namespace].applications.filters,namespace$1="applications",{slice,selectors,sagas,initialState:initialState$1}=generateState({sliceName:SLICE_NAME,namespace:namespace$1,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getApplications,pageSize:20,getAdditionalSelectors:()=>({applicationFilters:selectApplicationFilters})}}),namespace=SLICE_NAME,initialState={[namespace$8]:initialState$8,[namespace$6]:initialState$6,[namespace$5]:initialState$5,[namespace$3]:initialState$3,[namespace$4]:initialState$4,[namespace$2]:initialState$2,[namespace$1]:initialState$1,[namespace$7]:initialState$7},actions={[namespace$8]:actions$4,[namespace$6]:actions$2,[namespace$5]:slice$4.actions,[namespace$3]:slice$2.actions,[namespace$4]:slice$3.actions,[namespace$2]:actions$1,[namespace$1]:slice.actions,[namespace$7]:actions$3},rootReducer=combineReducers({[namespace$8]:uiState$1,[namespace$6]:engines,[namespace$5]:slice$4.reducer,[namespace$3]:slice$2.reducer,[namespace$4]:slice$3.reducer,[namespace$2]:schemaDetails$1,[namespace$1]:slice.reducer,[namespace$7]:resourcesTab_slice}),selectEnginesLoadingStatus=e=>e[namespace].engines.status,selectEnginesOffset=e=>e[namespace].engines.offset,selectEnginesHasMore=e=>e[namespace].engines.hasMore,selectEngines=e=>e[namespace].engines.engines,selectDefaultCategories=e=>e[namespace].engines.defaultCategories,selectEngineFilters=e=>e[namespace].engines.filters,EngineStatusFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectEngineFilters).find(e=>e.type===EEngineFilterType.Status))?void 0:e.values)||[],r=Object.values(EEngineState).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.status-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-engine-status-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions$2.setFilter({type:EEngineFilterType.Status,values:e}))},isMultiselect:!0})};var anObject$4=anObject$f,regexpFlags$1=function(){var e=anObject$4(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},fails$4=fails$k,global$3=global$n,$RegExp$2=global$n.RegExp,UNSUPPORTED_Y$1=fails$4(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$1||fails$4(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$1||fails$4(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$1},fails$3=fails$k,global$2=global$n,$RegExp$1=global$n.RegExp,regexpUnsupportedDotAll=fails$3(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),fails$2=fails$k,global$1=global$n,$RegExp=global$n.RegExp,regexpUnsupportedNcg=fails$2(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$4=functionCall,uncurryThis$4=functionUncurryThis,toString$4=toString$7,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=shared$4.exports,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$3=uncurryThis$4("".charAt),indexOf=uncurryThis$4("".indexOf),replace$1=uncurryThis$4("".replace),stringSlice$3=uncurryThis$4("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return call$4(nativeExec,e,"a"),call$4(nativeExec,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$2=patchedExec=PATCH?function(e){var t,r,s,n,a,o,i=this,l=getInternalState(i),e=toString$4(e),c=l.raw;if(c)return c.lastIndex=i.lastIndex,p=call$4(patchedExec,c,e),i.lastIndex=c.lastIndex,p;var u=l.groups,c=UNSUPPORTED_Y&&i.sticky,p=call$4(regexpFlags,i),l=i.source,d=0,g=e;if(c&&(p=replace$1(p,"y",""),-1===indexOf(p,"g")&&(p+="g"),g=stringSlice$3(e,i.lastIndex),0<i.lastIndex&&(!i.multiline||i.multiline&&"\n"!==charAt$3(e,i.lastIndex-1))&&(l="(?: "+l+")",g=" "+g,d++),t=new RegExp("^(?:"+l+")",p)),NPCG_INCLUDED&&(t=new RegExp("^"+l+"$(?!\\s)",p)),UPDATES_LAST_INDEX_WRONG&&(r=i.lastIndex),s=call$4(nativeExec,c?t:i,g),c?s?(s.input=stringSlice$3(s.input,d),s[0]=stringSlice$3(s[0],d),s.index=i.lastIndex,i.lastIndex+=s[0].length):i.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&s&&(i.lastIndex=i.global?s.index+s[0].length:r),NPCG_INCLUDED&&s&&1<s.length&&call$4(nativeReplace,s[0],t,function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(s[n]=void 0)}),s&&u)for(s.groups=a=create(null),n=0;n<u.length;n++)a[(o=u[n])[0]]=s[o[1]];return s}:patchedExec,$=_export,exec=regexpExec$2,uncurryThis$3=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec:exec}),functionUncurryThis),defineBuiltIn=defineBuiltIn$6,regexpExec$1=regexpExec$2,fails$1=fails$k,wellKnownSymbol$1=wellKnownSymbol$g,createNonEnumerableProperty=createNonEnumerableProperty$5,SPECIES=wellKnownSymbol$1("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(r,e,t,s){var o,n=wellKnownSymbol$1(r),i=!fails$1(function(){var e={};return e[n]=function(){return 7},7!=""[r](e)}),a=i&&!fails$1(function(){var e=!1,t=/a/;return"split"===r&&((t={constructor:{}}).constructor[SPECIES]=function(){return t},t.flags="",t[n]=/./[n]),t.exec=function(){return e=!0,null},t[n](""),!e});i&&a&&!t||(o=uncurryThis$3(/./[n]),a=e(n,""[r],function(e,t,r,s,n){var e=uncurryThis$3(e),a=t.exec;return a===regexpExec$1||a===RegExpPrototype.exec?i&&!n?{done:!0,value:o(t,r,s)}:{done:!0,value:e(r,t,s)}:{done:!1}}),defineBuiltIn(String.prototype,r,a[0]),defineBuiltIn(RegExpPrototype,n,a[1])),s&&createNonEnumerableProperty(RegExpPrototype[n],"sham",!0)},uncurryThis$2=functionUncurryThis,toIntegerOrInfinity$1=toIntegerOrInfinity$4,toString$3=toString$7,requireObjectCoercible$3=requireObjectCoercible$7,charAt$2=uncurryThis$2("".charAt),charCodeAt=uncurryThis$2("".charCodeAt),stringSlice$2=uncurryThis$2("".slice),createMethod=function(n){return function(e,t){var r,e=toString$3(requireObjectCoercible$3(e)),t=toIntegerOrInfinity$1(t),s=e.length;return t<0||s<=t?n?"":void 0:(r=charCodeAt(e,t))<55296||56319<r||t+1===s||(s=charCodeAt(e,t+1))<56320||57343<s?n?charAt$2(e,t):r:n?stringSlice$2(e,t,t+2):s-56320+(r-55296<<10)+65536}},stringMultibyte={codeAt:createMethod(!1),charAt:createMethod(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex$2=function(e,t,r){return t+(r?charAt$1(e,t).length:1)},uncurryThis$1=functionUncurryThis,toObject=toObject$5,floor=Math.floor,charAt=uncurryThis$1("".charAt),replace=uncurryThis$1("".replace),stringSlice$1=uncurryThis$1("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(a,o,i,l,c,e){var u=i+a.length,p=l.length,t=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==c&&(c=toObject(c),t=SUBSTITUTION_SYMBOLS),replace(e,t,function(e,t){var r;switch(charAt(t,0)){case"$":return"$";case"&":return a;case"`":return stringSlice$1(o,0,i);case"'":return stringSlice$1(o,u);case"<":r=c[stringSlice$1(t,1,-1)];break;default:var s,n=+t;if(0==n)return e;if(p<n)return 0!==(s=floor(n/10))&&s<=p?void 0===l[s-1]?charAt(t,1):l[s-1]+charAt(t,1):e;r=l[n-1]}return void 0===r?"":r})},call$3=functionCall,anObject$3=anObject$f,isCallable$1=isCallable$n,classof=classofRaw$1,regexpExec=regexpExec$2,$TypeError=TypeError,regexpExecAbstract=function(e,t){var r=e.exec;if(isCallable$1(r))return null!==(r=call$3(r,e,t))&&anObject$3(r),r;if("RegExp"===classof(e))return call$3(regexpExec,e,t);throw $TypeError("RegExp#exec called on incompatible receiver")},apply=functionApply,call$2=functionCall,uncurryThis=functionUncurryThis,fixRegExpWellKnownSymbolLogic$2=fixRegexpWellKnownSymbolLogic,fails=fails$k,anObject$2=anObject$f,isCallable=isCallable$n,toIntegerOrInfinity=toIntegerOrInfinity$4,toLength$1=toLength$3,toString$2=toString$7,requireObjectCoercible$2=requireObjectCoercible$7,advanceStringIndex$1=advanceStringIndex$2,getMethod$2=getMethod$6,getSubstitution=getSubstitution$1,regExpExec$2=regexpExecAbstract,wellKnownSymbol=wellKnownSymbol$g,REPLACE=wellKnownSymbol$g("replace"),max=Math.max,min=Math.min,concat=uncurryThis([].concat),push=uncurryThis([].push),stringIndexOf=uncurryThis("".indexOf),stringSlice=uncurryThis("".slice),maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")});fixRegExpWellKnownSymbolLogic$2("replace",function(e,b,h){var x=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,t){var r=requireObjectCoercible$2(this),s=null==e?void 0:getMethod$2(e,REPLACE);return s?call$2(s,e,r,t):call$2(b,toString$2(r),e,t)},function(e,t){var r=anObject$2(this),s=toString$2(e);if("string"==typeof t&&-1===stringIndexOf(t,x)&&-1===stringIndexOf(t,"$<")){e=h(b,r,s,t);if(e.done)return e.value}for(var n,a=isCallable(t),o=(a||(t=toString$2(t)),r.global),i=(o&&(n=r.unicode,r.lastIndex=0),[]);null!==(p=regExpExec$2(r,s))&&(push(i,p),o);)""===toString$2(p[0])&&(r.lastIndex=advanceStringIndex$1(s,toLength$1(r.lastIndex),n));for(var l="",c=0,u=0;u<i.length;u++){for(var p,d=toString$2((p=i[u])[0]),g=max(min(toIntegerOrInfinity(p.index),s.length),0),m=[],$=1;$<p.length;$++)push(m,maybeToString(p[$]));var y=p.groups,f=a?(f=concat([d],m,g,s),void 0!==y&&push(f,y),toString$2(apply(t,void 0,f))):getSubstitution(d,s,g,m,y,t);c<=g&&(l+=stringSlice(s,c,g)+f,c=g+d.length)}return l+stringSlice(s,c)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);const selectSchemaDetailUiStatus=e=>e[namespace].schemaDetails.status,selectDataRegistry=e=>e[namespace].schemaDetails.dataRegistry,selectSchemaVersions=e=>{return(null==(e=null==(e=null==(e=e[namespace].schemaDetails)?void 0:e.dataRegistry)?void 0:e.schemas)?void 0:e.records)||[]};var schemaDetails=Object.freeze({__proto__:null,selectSchemaDetailUiStatus:selectSchemaDetailUiStatus,selectDataRegistry:selectDataRegistry,selectSchemaVersions:selectSchemaVersions});const selectActiveResourceTab=e=>e[namespace].resourcesTab.activeTab,selectActiveResourceSearchValues=e=>e[namespace].resourcesTab.searchValues,selectIsTypingTableSearch=e=>e[namespace].resourcesTab.isTypingTableSearch,selectIsTableSearchVisible=e=>e[namespace].resourcesTab.isTableSearchVisible;var ESchemaStatus,ESchemaFilterType,resourcesTab_selectors=Object.freeze({__proto__:null,selectActiveResourceTab:selectActiveResourceTab,selectActiveResourceSearchValues:selectActiveResourceSearchValues,selectIsTypingTableSearch:selectIsTypingTableSearch,selectIsTableSearchVisible:selectIsTableSearchVisible});const selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,r)=>({apiRoot:e,graphQLEndpoint:t,token:r}));function*initResourceCenterResources(){yield!0}function*watchResourceCenterResourcesInit(){yield takeLatest$1(actions.uiState.init.type,initResourceCenterResources)}function*watchFetchEngines(){yield takeLatest$1(actions.engines.fetchEnginesStart.type,fetchEnginesSaga)}function*watchFetchSchemaDetails(){yield takeLatest$1(actions.schemaDetails.fetchSchemaDetailsStart.type,fetchSchemaDetails)}function*fetchEnginesSaga(){try{var t,r=yield select(selectApiConfigs$1),s=yield select(selectEnginesOffset),n=yield select(selectEngineFilters);let e=yield select(selectDefaultCategories);e.length||(t=yield call$k(readEngineCategories,{apiConfigs:r,offset:0,limit:50,additionalSelectors:{type:"Cognition"}}),yield put(actions.engines.setDefaultCategories(t)),e=yield select(selectDefaultCategories));var a=yield call$k(getEngines,r,{offset:s,limit:10,filters:n,defaultCategories:e});yield put(actions.engines.fetchEnginesSucceeded(a)),10===a.length?yield put(actions.engines.setHasMore(!0)):yield put(actions.engines.setHasMore(!1)),yield put(actions.engines.setOffset(s+10))}catch(e){yield put(actions.engines.fetchEnginesFailed())}}function*fetchSchemaDetails(e){try{var t=yield select(selectApiConfigs$1),r=e.payload.dataRegistryId,s=yield call$k(readSchemaDetails,t,r);yield put(actions.schemaDetails.fetchSchemaDetailsSucceeded(s))}catch(e){console.log({e:e})}}function*rootSaga(){yield all([watchResourceCenterResourcesInit(),watchFetchEngines(),watchFetchSchemaDetails(),sagas$3.watchCreate(),sagas$3.watchRead(),sagas$3.watchUpdate(),sagas$3.watchDelete(),sagas$2.watchCreate(),sagas$2.watchRead(),sagas$2.watchUpdate(),sagas$2.watchDelete(),sagas.watchCreate(),sagas.watchRead(),sagas.watchUpdate(),sagas.watchDelete(),sagas$1.watchCreate(),sagas$1.watchRead(),sagas$1.watchUpdate(),sagas$1.watchDelete()])}function getResourceCenterResourcesModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const useStyles$6=makeStyles()(e=>({searchContainer:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",border:"2px solid #E1E6ED",borderRadius:"6px",margin:"10px 0",padding:"8px"},searchInput:{width:"100%",border:"0",outline:"none",fontFamily:"'Nunito'",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"left"}})),DropdownSearchInput=({onChange:t,testId:e,placeholderText:r})=>{var s=useStyles$6()["classes"];const[n,a]=react.exports.useState("");return jsxRuntime.exports.jsxs("div",Object.assign({className:s.searchContainer},{children:[jsxRuntime.exports.jsx(Search,{}),jsxRuntime.exports.jsx("input",{"data-test":e,onClick:e=>e.stopPropagation(),className:s.searchInput,onChange:e=>{e=e.target.value;a(e),t(e)},value:n,placeholder:r})]}))},{selectItems,selectHasMore,selectReadStatus,selectOffset}=selectors$2,{TableInfiniteScroll}=tableInfiniteScroll["jsx"],useStyles$5=makeStyles()(e=>({formControl:{marginRight:"20px"},removePadding:{padding:0},label:{fontFamily:"Nunito",fontWeight:700,fontSize:14,color:"#2A323C",marginBottom:0,display:"flex",justifyContent:"space-between"},field:{width:180},clearBtn:{color:"#0C53B0",cursor:"pointer",fontWeight:400},dropdownContainer:{display:"flex",width:"100%",alignItems:"flex-start",justifyContent:"center"},categoryList:{display:"flex",flexDirection:"column",position:"relative",width:"100%",padding:"0 15px 0 15px",boxSizing:"border-box"},category:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"5px",cursor:"pointer",height:"100%",boxSizing:"border-box","&:hover":{borderRadius:"6px",backgroundColor:"rgba(228, 240, 252, 0.5)"}},selected:{borderRadius:"6px",backgroundColor:"rgba(228, 240, 252, 0.8)"},categoryItem:{width:"100%",marginRight:"auto"},engineIcons:{width:"20px !important",height:"20px !important",verticalAlign:"middle",marginRight:"15px",fill:"#2A323C"}})),muiSelectStyleOverrides={height:"28px",fontSize:"0.8em","& fieldset":{borderColor:"#D5DFE9",borderWidth:"2px",borderRadius:"6px"},"&:hover":{"&& fieldset":{borderColor:"rgba(42,50,60,0.5)"}}},EngineCategoriesFilter=()=>{const n=useDispatch(),r=useStyles$5()["classes"];var e=react.exports.useRef(null);const[t,s]=react.exports.useState(!1),a=(null==(o=useSelector(selectEngineFilters).find(e=>e.type===EEngineFilterType.Category))?void 0:o.values)||[];var o=useSelector(selectItems).filter(e=>"Automation"!==e.name);var i=useSelector(selectHasMore),l=useSelector(selectOffset),c=useSelector(selectReadStatus);react.exports.useEffect(()=>(n(actions.uiState.setCategoryFilterSearchType(EEngineType.Cognition)),t&&u(),()=>{n(actions.uiState.setCategoryFilterSearchName("")),p()}),[t]);const u=()=>{n(actions.engineCategories.readStart(null))};const p=()=>{n(actions.engineCategories.resetList(null))};var d=lodash.exports.debounce(e=>{n(actions.uiState.setCategoryFilterSearchName(e)),p(),u()},500);var g=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.engines.category-filter.empty",defaultMessage:"No Categories Found",description:"Empty category search"});const m=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.engines.category-filter.label",defaultMessage:"Category",description:"Category filter label"});return jsxRuntime.exports.jsxs(FormControl,Object.assign({size:"small",className:r.formControl},{children:[jsxRuntime.exports.jsxs("label",Object.assign({htmlFor:"resource-center-resources-engine-category-filter",className:r.label},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.category-filter.label",defaultMessage:"Category",description:"Category filter label"}),0<a.length&&jsxRuntime.exports.jsx("span",Object.assign({onClick:()=>{n(actions.engines.setFilter({type:EEngineFilterType.Category,values:[]}))},className:r.clearBtn},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.category-filter.clear",defaultMessage:"Clear",description:"Status filter clear button"})}))]})),jsxRuntime.exports.jsx(Select,Object.assign({id:"resource-center-resources-engine-category-filter",sx:muiSelectStyleOverrides,variant:"outlined",multiple:!1,displayEmpty:!0,open:t,renderValue:()=>{var e;return 0===a.length?jsxRuntime.exports.jsx("div",{children:"All"}):(e=jsxRuntime.exports.jsxs(Stack,Object.assign({style:{opacity:.8,margin:0}},{children:[jsxRuntime.exports.jsxs("span",Object.assign({style:{borderBottom:"1px solid #fff",paddingBottom:"3px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-categories-filter-tooltip.selected-tooltip-title",defaultMessage:"Selected",description:"Selected tooltip title"})," ",m]})),jsxRuntime.exports.jsx("ul",Object.assign({style:{padding:0}},{children:a.map(e=>jsxRuntime.exports.jsxs("li",{children:[" • ",e]},e))}))]})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e,placement:"bottom-start"},{children:jsxRuntime.exports.jsx("span",{children:a.join(", ")})})))},className:r.field,onClick:()=>{t&&(n(actions.uiState.setCategoryFilterSearchName("")),p()),s(!t)},MenuProps:{sx:{padding:0,width:"100%"},anchorOrigin:{vertical:"bottom",horizontal:"center"},classes:{list:r.removePadding,paper:r.removePadding}}},{children:[jsxRuntime.exports.jsx("div",Object.assign({onClick:e=>e.stopPropagation(),id:"categoryMenu",className:r.dropdownContainer,ref:e},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.categoryList},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"resource-center-resources-engine-category-select-item",sx:{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"},padding:"0px"},disableRipple:!0,focusRipple:!1,dense:!0,onKeyDown:e=>e.stopPropagation()},{children:jsxRuntime.exports.jsx(DropdownSearchInput,{testId:"resource-center-resources-engine-category-search-input",onChange:d,placeholderText:"Search Category Name..."})})),jsxRuntime.exports.jsx("div",Object.assign({style:{width:"245px"}},{children:jsxRuntime.exports.jsx(Divider,{})})),jsxRuntime.exports.jsx("div",Object.assign({className:"aiware-el ",style:{height:"500px",width:"245px"}},{children:t&&jsxRuntime.exports.jsx(TableInfiniteScroll,{hasMore:i,fetchMore:u,offset:l,items:o,itemHeight:40,isLoading:"pending"===c,error:"failure"===c,TableRowComponent:({item:s})=>{return jsxRuntime.exports.jsx(Box,Object.assign({className:(t=s,0<=a.findIndex(e=>e===t.name)?r.selected:""),sx:{width:"100%",height:"40px"}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:()=>{{var t=s;let e=lodash.exports.cloneDeep(a);const r=e.findIndex(e=>e===t.name);r<0?e.push(t.name):e=e.filter((e,t)=>t!==r),n(actions.engines.setFilter({type:EEngineFilterType.Category,values:e}))}},className:r.category},{children:[jsxRuntime.exports.jsx(Icon,{"data-test":"resource-center-engine-category-icon-"+s.name,className:r.engineIcons,component:void 0!==(e=s.name)&&e?(e=e.replace(/[{()}[\]]/g,"").replace(/\s/g,""),EngineCategoryIcons[e]):null,color:"secondary",fontSize:"small"}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2","data-test":"resource-center-engine-category-"+s.name,className:r.categoryItem,noWrap:!0},{children:s.name}))]}))}));var e,t},MessageEmptyState:g})}))]}))}),"engineCategoryMenu")]}))]}))},EngineDeploymentModelFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectEngineFilters).find(e=>e.type===EEngineFilterType.DeploymentModel))?void 0:e.values)||[],r=Object.values(EEngineDeploymentModel).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-deployment-model-filter.label",defaultMessage:"Deployment Model",description:"Deployment Model filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-deployment-model-filter.clear",defaultMessage:"Clear",description:"Deployment Model filter clear button"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-engine-deployment-model-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions$2.setFilter({type:EEngineFilterType.DeploymentModel,values:e}))},isMultiselect:!0})},EngineCertifiedFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectEngineFilters).find(e=>e.type===EEngineFilterType.Certified))?void 0:e.values)||[],r=Object.values(EEngineCertified).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.certified-filter.label",defaultMessage:"Certified",description:"Certified filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.certified-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-engine-certified-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions$2.setFilter({type:EEngineFilterType.Certified,values:e}))}})},SHARED_TEXT={ui:{header:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-panel.resources.table.header",defaultMessage:"Resources",description:"Resources Header"}),description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-panel.resources.description",defaultMessage:"Browse all resources available in this Organization.",description:"Resources description"}),tableSettings:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.settings-btn",defaultMessage:"Table Settings",description:"tooltip message on the table data settings"}),hideFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.filters-hide-btn",defaultMessage:"Hide Filters",description:"tooltip message on the table filter settings"}),showFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.filters-show-btn",defaultMessage:"Show Filters",description:"tooltip message on the table filter settings"})},engines:{emptyState:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.engines-table.empty-state-message",defaultMessage:"No Engines found",description:"Engines Table empty state, nothing found message"}),errorState:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.engines-table.error-state-message",defaultMessage:"Error Loading Engines",description:"Engines Table error state, error loading engines message"})},schemaDetails:{name:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-name-label",defaultMessage:"Name",description:"Schema Detail Name label"}),version:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-version-lable",defaultMessage:"Version",description:"Schema versions label"}),schemaId:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-schema-id-label",defaultMessage:"Schema ID",description:"Schema Id label"}),dataRegistryId:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-data-registry-id",defaultMessage:"Data Registry ID",description:"Schema Data Registry ID label"}),developer:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-developer",defaultMessage:"Developer",description:"Schema Developer label"}),created:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-created-date",defaultMessage:"Created",description:"Schema Created date label"}),copiedTitle:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-copy-to-clipboard",defaultMessage:"Copy to clipboard",description:"Copy to clipboard tooltip"}),copyTitle:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-rc-resources.schema-details-table-overview-tab-copied.tooltip.title",defaultMessage:"Copied!",description:"Copied tooltip"})},resourceCardText:{class:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.engine-category-class",defaultMessage:"Class:",description:"Engine category class"}),owner:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.engine-resource-owner",defaultMessage:"Owner:",description:"Engine Resource Owner"}),capability:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-capability",defaultMessage:"Capability:",description:"Engine Resource Capability"}),price:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-price",defaultMessage:"Price:",description:"Engine Resource Price"}),deployment:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-deployment",defaultMessage:"Deployment:",description:"Engine Resource Deployment"}),package:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-package",defaultMessage:"Package:",description:"Engine Resource Package"}),packages:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card.packages",defaultMessage:"Packages:",description:"Schema Resource Packages"}),industry:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card-industry",defaultMessage:"Industry:",description:"Engine Resource Industry"}),majorVersion:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card.major-version",defaultMessage:"Major Version:",description:"Schema Resource Major Version"}),minorVersion:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.resource-card.minor-version",defaultMessage:"Minor Version:",description:"Schema Resource Minor Version"})},filters:{active:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-btn.active",defaultMessage:"Active",description:"badge message on the table data search"}),search:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-btn",defaultMessage:"Search",description:"tooltip message on the table data search"}),searchingFor:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-btn.searching-for",defaultMessage:"Searching for ",description:"tooltip message on the table data search"}),searchKeyword:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-banner-search-keyword",defaultMessage:"Search keyword",description:"Message on the table data search"}),hideSearch:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"resource-center.resources.search-btn.hide-search",defaultMessage:"Hide Search",description:"tooltip message on the table data search"}),clearAll:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.flows.filters.clear",defaultMessage:"Clear All",description:"Button to clear all selected filters"}),applyFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.flows.filters.apply",defaultMessage:"Apply Filters",description:"Button to apply selected filters"}),clear:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.industry-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"}),clearSearch:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.industry-filter.clear-search.label",defaultMessage:"Clear Search",description:"Label for the button to clear the filter"}),industry:{label:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.engines.industry-filter.label",defaultMessage:"Industry",description:"Industry filter label"})}}},FilterButtons=({onApply:e,onClearAll:t})=>jsxRuntime.exports.jsxs(Box,Object.assign({sx:{pt:"14px",display:"flex",gap:"10px"}},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"os-resource-center-apply-filters-btn",variant:"outlined",onClick:e},{children:SHARED_TEXT.filters.applyFilters()})),jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"os-resource-center-clear-filters-btn",color:"secondary",onClick:t},{children:SHARED_TEXT.filters.clearAll()}))]})),EngineFilters=()=>{const e=useDispatch();return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{p:"10px 20px 20px",borderBottom:"0.5px solid #D5DFE9"}},{children:[jsxRuntime.exports.jsx(EngineStatusFilter,{}),jsxRuntime.exports.jsx(EngineCategoriesFilter,{}),jsxRuntime.exports.jsx(EngineDeploymentModelFilter,{}),jsxRuntime.exports.jsx(EngineCertifiedFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onApply:()=>{e(actions.engines.resetFetchedEngines()),e(actions.engines.fetchEnginesStart())},onClearAll:()=>{e(actions.engines.clearFilters()),e(actions.engines.resetFetchedEngines()),e(actions.engines.fetchEnginesStart()),e(actions.resourcesTab.setClearTableSearch({resourceType:"engine"}))}})]}))},SchemaStatusFilter=(!function(e){e.Published="published",e.Deleted="deleted",e.Draft="draft",e.Inactive="inactive"}(ESchemaStatus=ESchemaStatus||{}),!function(e){e.Status="Status",e.Name="Name"}(ESchemaFilterType=ESchemaFilterType||{}),()=>{const t=useDispatch();var e=(null==(e=useSelector(selectSchemaFilters).find(e=>e.type===ESchemaFilterType.Status))?void 0:e.values)||[],r=Object.values(ESchemaStatus).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.schema.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.schema-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-schema-status-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions.schemas.setFilter({type:ESchemaFilterType.Status,values:e}))},isMultiselect:!0})}),SchemaFilters=()=>{const e=useDispatch();return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{p:"10px 20px 20px",borderBottom:"0.5px solid #D5DFE9"}},{children:[jsxRuntime.exports.jsx(SchemaStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onApply:()=>{e(actions.schemas.resetList(null)),e(actions.schemas.readStart(null))},onClearAll:()=>{e(actions.schemas.clearFilters(null)),e(actions.schemas.readStart(null)),e(actions.resourcesTab.setClearTableSearch({resourceType:"schema"}))}})]}))},FlowsStatusFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectFlowFilters).find(e=>e.type===EEngineFilterType.Status))?void 0:e.values)||[],r=Object.values(EEngineState).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.flows.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources.flows-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-flows-status-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions.flows.setFilter({type:EEngineFilterType.Status,values:e}))},isMultiselect:!0})},FlowsDeploymentModelFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectFlowFilters).find(e=>e.type===EEngineFilterType.DeploymentModel))?void 0:e.values)||[],r=Object.values(EEngineDeploymentModel).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-deployment-model-filter.label",defaultMessage:"Deployment Model",description:"Deployment Model filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-resources-engine-deployment-model-filter.clear",defaultMessage:"Clear",description:"Deployment Model filter clear button"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-engine-deployment-model-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions.flows.setFilter({type:EEngineFilterType.DeploymentModel,values:e}))},isMultiselect:!0})},FlowsCertifiedFilter=()=>{const t=useDispatch();var e=(null==(e=useSelector(selectFlowFilters).find(e=>e.type===EEngineFilterType.Certified))?void 0:e.values)||[],r=Object.values(EEngineCertified).map(e=>({value:e,label:e})),s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.flows.certified-filter.label",defaultMessage:"Certified",description:"Certified filter label"}),n=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resurce-center-resources.flows.certified-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"resource-center-resources-flows-certified-filter",filterLabel:s,clearButtonLabel:n,items:r,selectedValues:e,onChange:e=>{t(actions.flows.setFilter({type:EEngineFilterType.Certified,values:e}))}})},FlowsFilters=()=>{const e=useDispatch();return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{p:"10px 20px 20px",borderBottom:"0.5px solid #D5DFE9"}},{children:[jsxRuntime.exports.jsx(FlowsStatusFilter,{}),jsxRuntime.exports.jsx(FlowsDeploymentModelFilter,{}),jsxRuntime.exports.jsx(FlowsCertifiedFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onApply:()=>{e(actions.flows.resetList(null)),e(actions.flows.readStart(null))},onClearAll:()=>{e(actions.flows.clearFilters(null)),e(actions.flows.readStart(null))}})]}))};class ResourcesTabErrorBoundary extends react.exports.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e){console.log("componentDidCatch",e)}render(){return this.state.hasError&&console.log("Render Error",this.state.hasError),this.state.hasError?jsxRuntime.exports.jsx("h3",{children:"An error has occurred."}):this.props.children}}var sameValue$1=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},call$1=functionCall,fixRegExpWellKnownSymbolLogic$1=fixRegexpWellKnownSymbolLogic,anObject$1=anObject$f,requireObjectCoercible$1=requireObjectCoercible$7,sameValue=sameValue$1,toString$1=toString$7,getMethod$1=getMethod$6,regExpExec$1=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("search",function(s,n,a){return[function(e){var t=requireObjectCoercible$1(this),r=null==e?void 0:getMethod$1(e,s);return r?call$1(r,e,t):new RegExp(e)[s](toString$1(t))},function(e){var t=anObject$1(this),e=toString$1(e),r=a(n,t,e);return r.done?r.value:(r=t.lastIndex,sameValue(r,0)||(t.lastIndex=0),e=regExpExec$1(t,e),sameValue(t.lastIndex,r)||(t.lastIndex=r),null===e?-1:e.index)}]});const useStyles$4=makeStyles()(e=>({searchInput:{opacity:0,width:"0px",MozTransition:"all 300ms ease",WebkitTransition:"all 300ms ease","&.is-visible":{width:"400px",opacity:1},"&:focus":{outline:"none",boxShadow:"0 -1px 1px rgba(255, 255, 255, 0.25), 0 1px 5px rgba(0, 0, 0, 0.15)"}},searchContainer:{display:"flex"}})),TableSearchInput=({activeResourceType:t,onChange:r,onToggleSearch:e,testId:s,placeholderText:n})=>{var a=useStyles$4()["classes"];const o=useDispatch(),[i,l]=react.exports.useState(""),c=useSelector(selectActiveResourceSearchValues)[t],u=useSelector(selectIsTableSearchVisible);var p=useSelector(selectIsTypingTableSearch),d=!!c&&!u;const g=react.exports.useRef(debounce_1(r,1e3)).current;return react.exports.useEffect(()=>{l("")},[t]),react.exports.useEffect(()=>{u&&l(c)},[u]),react.exports.useEffect(()=>{i&&!c&&i&&l("")},[c]),jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(TextField,{autoFocus:u,inputRef:e=>{null!==e&&u&&e.focus()},"data-test":s,onClick:e=>e.stopPropagation(),className:a.searchInput+" "+(u?"is-visible":""),onChange:u?e=>{e=e.target.value;l(e),e&&o(actions.resourcesTab.setIsTypingTableSearch(!0)),e||r("",t),g(e,t)}:void 0,value:i,placeholder:u?n:"",InputProps:{style:{borderRadius:"50px",height:"35px"},endAdornment:jsxRuntime.exports.jsxs(InputAdornment,Object.assign({position:"end"},{children:[p&&jsxRuntime.exports.jsx(CircularProgress,{size:20,thickness:5}),!p&&i&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.filters.clearSearch()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{r("",t),l("")}},{children:jsxRuntime.exports.jsx(Clear,{})}))}))]}))}}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:u?SHARED_TEXT.filters.hideSearch():c?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[SHARED_TEXT.filters.searchingFor()," ",`"${c}"`]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[SHARED_TEXT.filters.search(),jsxRuntime.exports.jsx("span",Object.assign({style:{textTransform:"capitalize"}},{children:` ${t}s`}))]})},{children:jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(Badge,Object.assign({invisible:!d,badgeContent:jsxRuntime.exports.jsx(Typography,Object.assign({fontWeight:"bold",color:"white",variant:"caption"},{children:SHARED_TEXT.filters.active()})),color:"primary"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{o(actions.resourcesTab.setIsTableSearchVisible(!u)),e&&e()},"data-testid":"resource-center.resources.search","aria-labelledby":"resource-center.resources.search",size:"large"},{children:jsxRuntime.exports.jsx(Search,{sx:d?{color:"#1871E8"}:{}})}))}))})}))]})},TableSearchBanner=({onChange:e})=>{const t=useSelector(selectActiveResourceTab);var r=useSelector(selectActiveResourceSearchValues)[t],s=useSelector(selectIsTypingTableSearch);return r?jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{padding:"10px 30px",background:"#f2f5f9",borderBottom:"1px solid #d5dfe9",gap:"10px"},direction:"row",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2"},{children:SHARED_TEXT.filters.searchKeyword()})),s?jsxRuntime.exports.jsx(Skeleton,{sx:{transform:"none"},width:"100px",height:"32px"}):jsxRuntime.exports.jsx(Chip,{sx:{backgroundColor:"rgb(255 255 255)",border:"1px solid #d5dfe9!important"},label:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption",fontWeight:"bold"},{children:['"',r,'"']})),onDelete:()=>e("",t)})]})):null},useStyles$3=makeStyles()(e=>({root:{display:"flex",flexDirection:"column",height:"100%"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(4),borderBottom:"0.5px solid #D5DFE9"},tableWrapper:{overflow:"hidden"},toolbar:{alignItems:"baseline","& button svg":{marginRight:"5px"},display:"flex",justifyContent:"center"},tabPanel:{flexGrow:1},resourceTypeTabs:{flex:"1",display:"flex",flexDirection:"column"}})),tabsStyle={borderBottom:"0.5px solid #D5DFE9","& .Sdk-MuiButtonBase-root.MuiTab-root.MuiTab-textColorPrimary.Mui-selected":{color:"#2A323C!important"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#2A323C"}},EnginesTableTab=react.exports.lazy(()=>import("./js-core.esm82.js")),SchemasTableTab=react.exports.lazy(()=>import("./js-core.esm84.js")),ApplicationsTableTab=react.exports.lazy(()=>import("./js-core.esm85.js")),FlowsTableTab=react.exports.lazy(()=>import("./js-core.esm86.js")),ResourcesTab=({isPanelFullScreen:e})=>{var t=useStyles$3()["classes"];const s=useDispatch();var r=useSelector(selectIsFiltersOpen),n=useSelector(selectActiveResourceTab),a=react.exports.useCallback((e,t)=>{s(actions.resourcesTab.setActiveTab(t))},[]),o=(e,t)=>{var r=e.trim().toLowerCase();switch(s(actions.resourcesTab.setResourceTableSearchValue({resourceType:t,searchValue:e})),t){case"engine":return s(actions.engines.setFilter({type:EEngineFilterType.Name,values:[r]})),s(actions.engines.resetFetchedEngines()),void s(actions.engines.fetchEnginesStart());case"schema":return s(actions.schemas.setFilter({type:ESchemaFilterType.Name,values:[r]})),s(actions.schemas.resetList(null)),void s(actions.schemas.readStart(null));case"application":s(actions.applications.setFilter({type:EEngineFilterType.Name,values:[r]})),s(actions.applications.resetList(null)),s(actions.applications.readStart(null));break;case"flow":s(actions.flows.setFilter({type:EEngineFilterType.Name,values:[e.trim().toLowerCase()]})),s(actions.flows.resetList(null)),s(actions.flows.readStart(null))}};return jsxRuntime.exports.jsxs("section",Object.assign({className:t.root},{children:[jsxRuntime.exports.jsxs("header",Object.assign({className:t.header},{children:[jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5","data-testid":"resource-panel.resources.header"},{children:SHARED_TEXT.ui.header()})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{mt:1},variant:"body2","data-testid":"resource-panel.resources.description"},{children:SHARED_TEXT.ui.description()}))]}),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",gap:"10px",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(TableSearchInput,{activeResourceType:n,testId:"resource-search",placeholderText:`Search by ${n} name`,onChange:o,onToggleSearch:()=>{}}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.ui.tableSettings()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{},"data-testid":"resource-center.resources.settings","aria-labelledby":"resource-center.resources.settings",size:"large"},{children:jsxRuntime.exports.jsx(Settings,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r?SHARED_TEXT.ui.hideFilters():SHARED_TEXT.ui.showFilters()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{s(actions.uiState.toggleFilters())},"data-testid":"resource-center.resources.filters","aria-labelledby":"resource-center.resources.filters",size:"large"},{children:r?jsxRuntime.exports.jsx(FilterRemove,{}):jsxRuntime.exports.jsx(Filter,{})}))}))]}))]})),r&&"engine"===n&&jsxRuntime.exports.jsx(EngineFilters,{}),r&&"schema"===n&&jsxRuntime.exports.jsx(SchemaFilters,{}),r&&"flow"===n&&jsxRuntime.exports.jsx(FlowsFilters,{}),jsxRuntime.exports.jsxs("section",Object.assign({className:t.resourceTypeTabs},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({value:n,onChange:a,variant:"scrollable",sx:Object.assign({["& ."+tabsClasses.scrollButtons]:{"&.Mui-disabled":{opacity:.3}}},tabsStyle),scrollButtons:!0},{children:Object.keys(ResourceType).filter(e=>!0===ResourceType[e].isVisible).map(e=>{e=ResourceType[e];return jsxRuntime.exports.jsx(Tab,{label:e.name,value:e.value,"data-testid":"resource-center.resources.tab."+e.value},e.value)})})),jsxRuntime.exports.jsx(TableSearchBanner,{onChange:o}),jsxRuntime.exports.jsx(ResourcesTabErrorBoundary,{children:jsxRuntime.exports.jsxs(react.exports.Suspense,Object.assign({fallback:jsxRuntime.exports.jsx(Loader,{})},{children:["engine"===n&&jsxRuntime.exports.jsx(EnginesTableTab,{isFullScreen:e}),"schema"===n&&jsxRuntime.exports.jsx(SchemasTableTab,{isFullScreen:e}),"application"===n&&jsxRuntime.exports.jsx(ApplicationsTableTab,{isFullScreen:e}),"flow"===n&&jsxRuntime.exports.jsx(FlowsTableTab,{})]}))})]}))]}))},Loader=()=>jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:"99.5%",height:"180px",sx:{margin:"5px 5px 10px 5px",transform:"none",borderRadius:"5px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:"99.5%",height:"180px",sx:{margin:"15px 5px 0px 5px",transform:"none",borderRadius:"5px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:"99.5%",height:"180px",sx:{margin:"15px 5px 0px 5px",transform:"none",borderRadius:"5px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:"99.5%",height:"180px",sx:{margin:"15px 5px 0px 5px",transform:"none",borderRadius:"5px"}})]}),TitleCase=e=>e.charAt(0).toUpperCase()+e.slice(1),Header=({dataRegistry:e})=>{var{name:e,organization:{name:t}={},schemas:{records:[r]=[]}={}}=e;return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"column",padding:"30px 30px 40px 30px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({sx:{color:"#2A323C",fontStyle:"normal",fontWeight:600,fontSize:"24px",lineHeight:"33px",letterSpacing:"-1.30385e-09px"}},{children:e&&TitleCase(e)})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{color:"#6098D1",mb:1,fontWeight:400,fontSize:"14px"}},{children:t&&TitleCase(t)})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",component:"h1"},{children:jsxRuntime.exports.jsx(StatusBadge,{status:null==r?void 0:r.status})}))]}))},colorMap={[ESchemaStatus.Published]:{background:"#B9E0BB",color:"#16961B"},[ESchemaStatus.Deleted]:{background:"rgba(183, 28, 28, 0.2)",color:"#B71C1C"},[ESchemaStatus.Draft]:{background:"#FFFFFF",color:"#4F5863"},[ESchemaStatus.Inactive]:{background:"rgba(33, 33, 33, 0.1)",color:"#212121"}},StatusBadge=({status:e})=>{var t;return jsxRuntime.exports.jsx(Box,Object.assign({sx:Object.assign(Object.assign({mt:1,background:(null==(t=colorMap[e])?void 0:t.background)||"rgba(0,0,0,.5)",borderRadius:"2px",padding:"0px 10px",display:"inline-block"},e===ESchemaStatus.Draft&&{borderColor:"#4F5863",borderStyle:"solid",borderWidth:"0.5px"}),{"& span":{color:(null==(t=colorMap[e])?void 0:t.color)||"#000",fontWeight:800}})},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption","data-testid":"schema-details-status"},{children:e.toLocaleUpperCase()}))}))};function _wrapRegExp(){_wrapRegExp=function(e,t){return new s(e,void 0,t)};var n=RegExp.prototype,o=new WeakMap;function s(e,t,r){t=new RegExp(e,t);return o.set(t,r||o.get(e)),_setPrototypeOf(t,s.prototype)}function a(n,e){var a=o.get(e);return Object.keys(a).reduce(function(e,t){var r=a[t];if("number"==typeof r)e[t]=n[r];else{for(var s=0;void 0===n[r[s]]&&s+1<r.length;)s++;e[t]=n[r[s]]}return e},Object.create(null))}return _inherits(s,RegExp),s.prototype.exec=function(e){var t,e=n.exec.call(this,e);return e&&(e.groups=a(e,this),t=e.indices)&&(t.groups=a(t,this)),e},s.prototype[Symbol.replace]=function(e,t){var r,s;return"string"==typeof t?(r=o.get(this),n[Symbol.replace].call(this,e,t.replace(/\$<([^>]+)>/g,function(e,t){t=r[t];return"$"+(Array.isArray(t)?t.join("$"):t)}))):"function"==typeof t?(s=this,n[Symbol.replace].call(this,e,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(a(e,s)),t.apply(this,e)})):n[Symbol.replace].call(this,e,t)},_wrapRegExp.apply(this,arguments)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var call=functionCall,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject=anObject$f,toLength=toLength$3,toString=toString$7,requireObjectCoercible=requireObjectCoercible$7,getMethod=getMethod$6,advanceStringIndex=advanceStringIndex$2,regExpExec=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("match",function(s,i,l){return[function(e){var t=requireObjectCoercible(this),r=null==e?void 0:getMethod(e,s);return r?call(r,e,t):new RegExp(e)[s](toString(t))},function(e){var t=anObject(this),r=toString(e),e=l(i,t,r);if(e.done)return e.value;if(!t.global)return regExpExec(t,r);for(var s=t.unicode,n=[],a=t.lastIndex=0;null!==(o=regExpExec(t,r));){var o=toString(o[0]);""===(n[a]=o)&&(t.lastIndex=advanceStringIndex(r,toLength(t.lastIndex),s)),a++}return 0===a?null:n}]});const parseSchema=e=>{try{return JSON.stringify(e,null,1).split("\n")}catch(e){}},getMatchGroup=(e,t)=>{return((null==e?void 0:e.groups)||{})[t]},parseSchemaLine=e=>{e=e.match(_wrapRegExp(/^[\s]*(([{[])?(("([^"]+)")(: ))?([{[])?(("([^"]+)")?([a-z0-9.-]+)?)?([}\]])?(,)?)$/,{jpre:2,jkey:4,jkeydelim:6,jmid:7,jval:8,jpost:12,jdelim:13}));return e?{indents:e[0].length-e[1].length,groupOpen:getMatchGroup(e,"jpre"),key:getMatchGroup(e,"jkey"),keyDelim:getMatchGroup(e,"jkeydelim"),valueGroupOpen:getMatchGroup(e,"jmid"),value:getMatchGroup(e,"jval"),groupClose:getMatchGroup(e,"jpost"),delim:getMatchGroup(e,"jdelim")}:null},getSchemaVersionNumber=e=>`${null==e?void 0:e.majorVersion}.`+(null==e?void 0:e.minorVersion),useStyles$2=makeStyles()(()=>({container:{height:"calc(100vh - 110px - 85px - 145px)",display:"flex",flexDirection:"column"},dropDown:{width:250,height:36,margin:"16px 0",fontSize:"12px",lineHeight:"16px",fontWeight:400},paper:{height:"100%",padding:"20px",overflowY:"auto",backgroundColor:"#F7F7F7",fontSize:"14px",lineHeight:"20px"},spacer:{height:"5px",width:"100%"},jsonGroupOpen:{fontWeight:600},jsonValueGroupOpen:{fontWeight:600},jsonGroupClose:{fontWeight:600},jsonKey:{color:"blue"},jsonKeyDelim:{fontWeight:600,margin:"0 2px"},jsonValue:{color:"green"},jsonDelim:{fontWeight:600}})),SchemaViewer=({index:t})=>{var e=useSelector(selectSchemaVersions);const r=useStyles$2()["classes"],s=react.exports.useRef();e=parseSchema(e[t].definition||null);return react.exports.useEffect(()=>{var e;void 0!==t&&null!=(e=s.current)&&e.scrollTo(0,0)},[t]),jsxRuntime.exports.jsx(Paper,Object.assign({"data-test":"schema-details-panel.schema-tab",ref:e=>s.current=e,elevation:1,className:r.paper},{children:null==e?void 0:e.map((e,t)=>{e=parseSchemaLine(e);return e?jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"schema-details-panel.schema-tab.line","data-index":t,style:{marginLeft:e.indents+"em"}},{children:[jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.group-open",className:r.jsonGroupOpen},{children:e.groupOpen})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.key",className:r.jsonKey},{children:e.key})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.key-delim",className:r.jsonKeyDelim},{children:e.keyDelim})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.value-group-open",className:r.jsonValueGroupOpen},{children:e.valueGroupOpen})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.value",className:r.jsonValue},{children:e.value})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.group-close",className:r.jsonGroupClose},{children:e.groupClose})),jsxRuntime.exports.jsx("span",Object.assign({"data-test":"schema-details-panel.schema-tab.line.delim",className:r.jsonDelim},{children:e.delim}))]}),t):null})}))},SchemaTab=()=>{const[e,r]=react.exports.useState(0),s=useSelector(selectSchemaVersions);var t=useStyles$2()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Select,Object.assign({className:t.dropDown,value:getSchemaVersionNumber(s[e]),onChange:t=>{r(s.findIndex(e=>t.target.value===getSchemaVersionNumber(e)))}},{children:s.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:getSchemaVersionNumber(e)},{children:getSchemaVersionNumber(e)}),e.id))}))}),null!==s&&void 0!==s&&s.length?jsxRuntime.exports.jsx(SchemaViewer,{index:e}):null]}))},useStyles$1=makeStyles()(()=>({overviewContainer:{padding:"0 30px"},description:{padding:"30px 0"},version:{padding:"30px 0 49px"},new:{display:"flex",justifyContent:"space-between"},noVersion:{paddingTop:"16px"},item:{margin:"10px auto"},copyContainer:{height:"24px",display:"flex",alignItems:"center",paddingRight:"6px","&:has(> span:hover)":{background:"#edebeb",borderRadius:"20px"}},copyButton:{"& svg":{cursor:"pointer",width:15,marginLeft:"10px",transform:"translateY(2px)"}},label:{fontWeight:"400",color:"#5C6269"},fw:{fontWeight:"400"},divider:{opacity:.9}})),OverviewTab=()=>{var e=useStyles$1()["classes"],t=useSelector(selectDataRegistry);const[r,s]=react.exports.useState({schemaId:!1,dataRegistryId:!1}),{name:n,organization:{name:a}={},schemas:{records:[o]=[]}={},createdDateTime:i}=t,l=(t,e)=>{s(e=>Object.assign(Object.assign({},e),{[t]:!0})),navigator.clipboard.writeText(e),setTimeout(()=>{s(e=>Object.assign(Object.assign({},e),{[t]:!1}))},1500)};return jsxRuntime.exports.jsxs(Box,Object.assign({className:e.overviewContainer},{children:[(null==t?void 0:t.description)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.description},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.label,"data-testid":"os-resource-center-resources-schema-details-overview-tab-description"},{children:TitleCase(null==t?void 0:t.description)}))})),jsxRuntime.exports.jsx(Divider,{className:e.divider})]}),jsxRuntime.exports.jsxs("div",Object.assign({className:e.version},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.new},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2",sx:{fontWeight:"600"}},{children:"What’s New"})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",onClick:()=>{}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:"400",color:"#9CA8B4"}},{children:"Version History"}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:e.noVersion},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.label},{children:"There are no new versions of this Schema."}))}))]})),jsxRuntime.exports.jsx(Divider,{className:e.divider}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{pt:6,pb:2}},{children:"Information"})),jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,justifyContent:"center",alignItems:"center"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.name})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:n?TitleCase(n):"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.version})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:(null===o||void 0===o?void 0:o.majorVersion)||"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.schemaId})),jsxRuntime.exports.jsxs(Box,Object.assign({className:e.copyContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:(null===o||void 0===o?void 0:o.id)&&index.truncatedString(null===o||void 0===o?void 0:o.id,30)||"--"})),(null===o||void 0===o?void 0:o.id)&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r.schemaId?SHARED_TEXT.schemaDetails.copiedTitle:SHARED_TEXT.schemaDetails.copyTitle,sx:{whiteSpace:"pre-line"}},{children:r.schemaId?jsxRuntime.exports.jsx("span",Object.assign({className:e.copyButton,onClick:()=>l("schemaId",(null===o||void 0===o?void 0:o.id)||"")},{children:jsxRuntime.exports.jsx(Check,{})})):jsxRuntime.exports.jsx("span",Object.assign({className:e.copyButton,onClick:()=>l("schemaId",(null===o||void 0===o?void 0:o.id)||"")},{children:jsxRuntime.exports.jsx(Copy,{})}))}))]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.dataRegistryId})),jsxRuntime.exports.jsxs(Box,Object.assign({className:e.copyContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:(null===o||void 0===o?void 0:o.dataRegistryId)&&index.truncatedString(null===o||void 0===o?void 0:o.dataRegistryId,30)||"--"})),(null===o||void 0===o?void 0:o.dataRegistryId)&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r.dataRegistryId?SHARED_TEXT.schemaDetails.copiedTitle:SHARED_TEXT.schemaDetails.copyTitle},{children:r.dataRegistryId?jsxRuntime.exports.jsx("span",Object.assign({className:e.copyButton,onClick:()=>l("dataRegistryId",(null===o||void 0===o?void 0:o.dataRegistryId)||"")},{children:jsxRuntime.exports.jsx(Check,{})})):jsxRuntime.exports.jsx("span",Object.assign({className:e.copyButton,onClick:()=>l("dataRegistryId",(null===o||void 0===o?void 0:o.dataRegistryId)||"")},{children:jsxRuntime.exports.jsx(Copy,{})}))}))]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.developer})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:a||"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6,className:e.item},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:e.label},{children:SHARED_TEXT.schemaDetails.created})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:e.fw},{children:new Date(i).toLocaleDateString("en-us",{day:"numeric",year:"numeric",month:"short"})+" "+index.formatTime(new Date(i))||"--"}))]}))]}))]})]}))},tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center.schema-detail-overview",defaultMessage:"Overview",description:"the title of the Overview tab"}),disabled:!1,id:"schema-detail-overview-tab",component:jsxRuntime.exports.jsx(OverviewTab,{})},{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center.schema-detail-schema",defaultMessage:"Schema",description:"the title of the Schema tab"}),disabled:!1,id:"schema-detail-overview-schema",component:jsxRuntime.exports.jsx(SchemaTab,{})}],MainLayout=()=>{const r=useStyles({})["classes"],[s,n]=react.exports.useState(0);return jsxRuntime.exports.jsxs("div",Object.assign({className:r.tabsContainer,"data-testid":"resource-center-schema-details-panel-tabs"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:r.tabsParent},{children:jsxRuntime.exports.jsx(Tabs,Object.assign({onChange:(e,t)=>{n(t)},value:s},{children:tabsList.map((e,t)=>jsxRuntime.exports.jsx(Tab,{label:e.label,"data-testid":e.id+"-tab"},e.id))}))})),jsxRuntime.exports.jsx(Divider,{className:r.divider}),jsxRuntime.exports.jsx("div",{children:tabsList.map((e,t)=>jsxRuntime.exports.jsx("div",Object.assign({className:r.secondBox},{children:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:s,index:t},{children:e.component}))}),e.id))})]}))},Content=({dataRegistryId:e})=>{var t=useSelector(selectSchemaDetailUiStatus),r=useSelector(selectDataRegistry);const s=useDispatch();var n=useStyles({})["classes"];react.exports.useEffect(()=>{e&&s(actions.schemaDetails.fetchSchemaDetailsStart({dataRegistryId:e}))},[s,e]);return"pending"===t&&jsxRuntime.exports.jsxs(Container,Object.assign({className:n.panelLoading},{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:400,height:200}),jsxRuntime.exports.jsx(Divider,{sx:{my:2}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:960,height:300})]}))||"success"===t&&jsxRuntime.exports.jsxs(Container,Object.assign({className:n.panelContent},{children:[jsxRuntime.exports.jsx(Header,{dataRegistry:r}),jsxRuntime.exports.jsx(MainLayout,{})]}))||"failure"===t&&jsxRuntime.exports.jsx(Container,{children:jsxRuntime.exports.jsx(ErrorState,{onRetry:()=>{s(actions.schemaDetails.fetchSchemaDetailsStart({dataRegistryId:e}))},errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resources-center-schema-details-panel-error-message",defaultMessage:"Something went wrong while loading your application details.",description:"error message shown when the application details panel encounters a load error"})})})||null},PanelContainer=({children:e})=>{var t=useStyles({})["classes"];const r=useDispatch();return jsxRuntime.exports.jsx("div",Object.assign({className:t.panelRoot,"data-testid":"schame-details-panel"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.panelContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:t.panelHeader},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"schema-details-panel-title",variant:"h1",sx:{color:"#5C6269",ml:4}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-schema.detail-panel-title",defaultMessage:"Schema Details",description:"The title of the Schema Details panel"})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-schema.detail-panel-close",defaultMessage:"Close Panel",description:"The title of the Schema Details panel close button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{r(hidePanel("SCHEMA_DETAILS_PANEL"))},"aria-labelledby":"schema-details-close-panel","data-testid":"schema-details-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:t.panelBody},{children:e}))]}))}))},SchemaDetailsPanel=({dataRegistryId:e})=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(PanelContainer,{children:jsxRuntime.exports.jsx(Content,{dataRegistryId:e})})})}),useStyles=makeStyles()((e,{})=>({panelRoot:{width:"100%"},panelContainer:{display:"flex",flexDirection:"column",width:"100%"},panelBody:{display:"flex",flexGrow:1},panelHeader:{display:"flex",padding:e.spacing(2),background:"#FAFAFA",justifyContent:"space-between",alignItems:"center","&.with-secondary-title":{alignItems:"flex-start"}},panelLoading:{height:300},panelContent:{width:"100%",padding:"0"},tabsContainer:{"& .Sdk-Mui-selected":{color:"black"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#000"}},tabsParent:{paddingLeft:e.spacing(4),"& div":{borderBottom:"none"},"& div button":{fontFamily:"Nunito",fontWeight:400,flex:"0 1 auto !important",minWidth:"unset"}},divider:{opacity:.9},secondBox:{display:"flex",flexDirection:"column",flexGrow:1}}));export{Clear as C,ResourcesTab as R,SchemaDetailsPanel as S,actions as a,selectors$2 as b,selectors$1 as c,rootReducer as d,schemaDetails as e,selectors$3 as f,getResourceCenterResourcesModule as g,selectApiConfigs as h,initialState as i,selectEngines as j,selectEnginesHasMore as k,selectEnginesOffset as l,selectEnginesLoadingStatus as m,namespace as n,SHARED_TEXT as o,resourcesTab_selectors as r,selectors as s,uiState as u};
Binary file