aiware-js 2.26.0 → 2.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/index.esm.js +1 -1
  2. package/js-core.esm.js +14 -14
  3. package/js-core.esm16.js +1 -1
  4. package/js-core.esm2.js +1 -1
  5. package/js-core.esm20.js +1 -230
  6. package/js-core.esm21.js +211 -65
  7. package/js-core.esm22.js +78 -1
  8. package/js-core.esm23.js +1 -1
  9. package/js-core.esm24.js +1 -1
  10. package/js-core.esm25.js +1 -1
  11. package/js-core.esm26.js +1 -1
  12. package/js-core.esm27.js +1 -1
  13. package/js-core.esm28.js +1 -1
  14. package/js-core.esm29.js +1 -1
  15. package/js-core.esm30.js +1 -1
  16. package/js-core.esm31.js +1 -1
  17. package/js-core.esm32.js +1 -14
  18. package/js-core.esm33.js +1 -12
  19. package/js-core.esm34.js +1 -54
  20. package/js-core.esm35.js +1 -1
  21. package/js-core.esm36.js +1 -1
  22. package/js-core.esm37.js +1 -108
  23. package/js-core.esm38.js +14 -1
  24. package/js-core.esm39.js +12 -214
  25. package/js-core.esm4.js +1 -1
  26. package/js-core.esm40.js +54 -1
  27. package/js-core.esm41.js +1 -1
  28. package/js-core.esm42.js +1 -1
  29. package/js-core.esm43.js +108 -1
  30. package/js-core.esm44.js +1 -37
  31. package/js-core.esm45.js +214 -1
  32. package/js-core.esm46.js +1 -1
  33. package/js-core.esm47.js +37 -1
  34. package/js-core.esm48.js +1 -1
  35. package/js-core.esm49.js +1 -31
  36. package/js-core.esm5.js +3 -3
  37. package/js-core.esm50.js +1 -32
  38. package/js-core.esm51.js +1 -85
  39. package/js-core.esm52.js +1 -1
  40. package/js-core.esm53.js +1 -54
  41. package/js-core.esm54.js +1 -133
  42. package/js-core.esm55.js +26 -82
  43. package/js-core.esm56.js +32 -1
  44. package/js-core.esm57.js +80 -38
  45. package/js-core.esm58.js +1 -20
  46. package/js-core.esm59.js +55 -1
  47. package/js-core.esm60.js +133 -0
  48. package/js-core.esm61.js +87 -0
  49. package/js-core.esm62.js +1 -0
  50. package/js-core.esm63.js +1 -0
  51. package/js-core.esm64.js +90 -0
  52. package/js-core.esm65.js +20 -0
  53. package/js-core.esm66.js +1 -0
  54. package/js-core.esm7.js +3 -3
  55. package/js-core.umd.js +196 -148
  56. package/locales/en.json +1 -1
  57. package/locales/es.json +1 -1
  58. package/locales/fr.json +1 -1
  59. package/package.json +5 -4
package/js-core.esm59.js CHANGED
@@ -1 +1,55 @@
1
- import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime,H as createSlice,cc as combineReducers,cd as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,m as makeStyles,i as useDispatch,bv as CacheProvider,bw as muiCache,cf as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,a2 as all,r as react,k as useSelector,v as FormControl,T as Typography$1,aV as Select,aW as MenuItem,a7 as Divider$1,at as Button,af as takeLatest$1,F as FormattedMessage,cq as mountPanel,ai as select,ak as call$7,ah as put,bC as CircularProgress,cC as baseGraphQLApiWithError}from"./js-core.esm.js";import{F as FixedSizeList}from"./js-core.esm27.js";import{I as InfiniteLoader}from"./js-core.esm40.js";import{d as default_1$1}from"./js-core.esm8.js";import{S as Search}from"./js-core.esm12.js";var match,version,store,wmget,wmhas,wmset,set,get,has,STATE,LoadingStatus,Settings={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Settings,"__esModule",{value:!0}),Settings.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings"),default_1=Settings.default=_default,commonjsGlobal=(!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}(),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}),check=function(e){return e&&e.Math==Math&&e},global$b=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$b=function(e){try{return!!e()}catch(e){return!0}},fails$a=fails$b,descriptors=!fails$b(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$9=fails$b,functionBindNative=!fails$b(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$1=functionBindNative,call$6=Function.prototype.call,functionCall=NATIVE_BIND$1?call$6.bind(call$6):function(){return call$6.apply(call$6,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND=functionBindNative,FunctionPrototype$1=Function.prototype,bind=FunctionPrototype$1.bind,call$5=FunctionPrototype$1.call,uncurryThis$b=NATIVE_BIND&&bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?function(e){return e&&uncurryThis$b(e)}:function(e){return e&&function(){return call$5.apply(e,arguments)}},uncurryThis$a=functionUncurryThis,toString$1=uncurryThis$a({}.toString),stringSlice=uncurryThis$a("".slice),classofRaw=function(e){return stringSlice(toString$1(e),8,-1)},uncurryThis$9=functionUncurryThis,fails$8=fails$b,classof=classofRaw,$Object$3=Object,split=functionUncurryThis("".split),indexedObject=fails$8(function(){return!$Object$3("z").propertyIsEnumerable(0)})?function(e){return"String"==classof(e)?split(e,""):$Object$3(e)}:$Object$3,$TypeError$6=TypeError,requireObjectCoercible$2=function(e){if(null==e)throw $TypeError$6("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$1=requireObjectCoercible$2,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$1(e))},isCallable$e=function(e){return"function"==typeof e},isCallable$d=isCallable$e,isObject$5=function(e){return"object"==typeof e?null!==e:isCallable$d(e)},global$a=global$b,isCallable$c=isCallable$e,aFunction=function(e){return isCallable$c(e)?e:void 0},getBuiltIn$4=function(e,t){return arguments.length<2?aFunction(global$a[e]):global$a[e]&&global$a[e][t]},uncurryThis$8=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$3=getBuiltIn$4,engineUserAgent=getBuiltIn$4("navigator","userAgent")||"",global$9=global$b,userAgent=engineUserAgent,process$1=global$9.process,Deno=global$9.Deno,versions=process$1&&process$1.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent&&(!(match=userAgent.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=version,fails$7=fails$b,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$7(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$4,isCallable$b=isCallable$e,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$2=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$b(t)&&isPrototypeOf(t.prototype,$Object$2(e))},$String$2=String,tryToString$1=function(e){try{return $String$2(e)}catch(e){return"Object"}},isCallable$a=isCallable$e,tryToString=tryToString$1,$TypeError$5=TypeError,aCallable$1=function(e){if(isCallable$a(e))return e;throw $TypeError$5(tryToString(e)+" is not a function")},aCallable=aCallable$1,getMethod$1=function(e,t){e=e[t];return null==e?void 0:aCallable(e)},call$4=functionCall,isCallable$9=isCallable$e,isObject$4=isObject$5,$TypeError$4=TypeError,ordinaryToPrimitive$1=function(e,t){var r,o;if("string"===t&&isCallable$9(r=e.toString)&&!isObject$4(o=call$4(r,e)))return o;if(isCallable$9(r=e.valueOf)&&!isObject$4(o=call$4(r,e)))return o;if("string"!==t&&isCallable$9(r=e.toString)&&!isObject$4(o=call$4(r,e)))return o;throw $TypeError$4("Can't convert object to primitive value")},shared$3={exports:{}},global$8=global$b,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,r){try{defineProperty$5(global$8,t,{value:r,configurable:!0,writable:!0})}catch(e){global$8[t]=r}return r},global$7=global$b,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$b[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$2),$Object$1=Object,toObject$3=function(e){return $Object$1(requireObjectCoercible(e))},uncurryThis$7=functionUncurryThis,toObject$2=toObject$3,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$2(e),t)},uncurryThis$6=functionUncurryThis,id=0,postfix=Math.random(),toString=uncurryThis$6(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString(++id+postfix,36)},global$6=global$b,shared$2=shared$3.exports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$6.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$6=function(e){var t;return hasOwn$8(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$3=functionCall,isObject$3=isObject$5,isSymbol$1=isSymbol$2,getMethod=getMethod$1,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$5=wellKnownSymbol$6,$TypeError$3=TypeError,TO_PRIMITIVE=wellKnownSymbol$6("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$3(e)||isSymbol$1(e))return e;var r=getMethod(e,TO_PRIMITIVE);if(r){if(r=call$3(r,e,t=void 0===t?"default":t),!isObject$3(r)||isSymbol$1(r))return r;throw $TypeError$3("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$5=global$b,isObject$2=isObject$5,document$1=global$b.document,EXISTS$1=isObject$2(document$1)&&isObject$2(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$6=fails$b,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$b(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$7(e,t))return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$5=fails$b,v8PrototypeDefineBug=descriptors&&fails$b(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$1=isObject$5,$String$1=String,$TypeError$2=TypeError,anObject$5=function(e){if(isObject$1(e))return e;throw $TypeError$2($String$1(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$4=anObject$5,toPropertyKey=toPropertyKey$2,$TypeError$1=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){var o;return anObject$4(e),t=toPropertyKey(t),anObject$4(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]&&((o=$getOwnPropertyDescriptor(e,t))&&o[WRITABLE]&&(e[t]=r.value,r={configurable:(CONFIGURABLE$1 in r?r:o)[CONFIGURABLE$1],enumerable:(ENUMERABLE in r?r:o)[ENUMERABLE],writable:!1})),$defineProperty(e,t,r)}:$defineProperty:function(e,t,r){if(anObject$4(e),t=toPropertyKey(t),anObject$4(r),IE8_DOM_DEFINE)try{return $defineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$1("Accessors not supported");return"value"in r&&(e[t]=r.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$4=DESCRIPTORS$5?function(e,t,r){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$5=functionUncurryThis,isCallable$8=isCallable$e,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$2=(isCallable$8(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$4=global$b,isCallable$7=isCallable$e,inspectSource$1=inspectSource$2,WeakMap$1=global$b.WeakMap,nativeWeakMap=isCallable$7(WeakMap$1)&&/native code/.test(inspectSource$1(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$3=global$b,uncurryThis$4=functionUncurryThis,isObject=isObject$5,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$5=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$3.TypeError,WeakMap=global$3.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject(e)&&(e=get(e)).type===t)return e;throw TypeError$1("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap),wmget=uncurryThis$4(store.get),wmhas=uncurryThis$4(store.has),wmset=uncurryThis$4(store.set),set=function(e,t){if(wmhas(store,e))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$4=fails$b,isCallable$6=isCallable$e,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$2,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,defineProperty$4=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$4(function(){return 8!==defineProperty$4(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&r&&hasOwn$4(r,"arity")&&e.length!==r.arity&&defineProperty$4(e,"length",{value:r.arity});try{r&&hasOwn$4(r,"constructor")&&r.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=enforceInternalState(e);return hasOwn$4(r,"source")||(r.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$5=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$6(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$e),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,r,o){var n=(o=o||{}).enumerable,s=void 0!==o.name?o.name:t;if(isCallable$5(r)&&makeBuiltIn(r,s,o),o.global)n?e[t]=r:defineGlobalProperty$1(t,r);else{try{o.unsafe?e[t]&&(n=!0):delete e[t]}catch(e){}n?e[t]=r:definePropertyModule$2.f(e,t,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max=Math.max,min$1=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$1=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike=lengthOfArrayLike$1,createMethod=function(a){return function(e,t,r){var o,n=toIndexedObject$3(e),s=lengthOfArrayLike(n),i=toAbsoluteIndex(r,s);if(a&&t!=t){for(;i<s;)if((o=n[i++])!=o)return!0}else for(;i<s;i++)if((a||i in n)&&n[i]===t)return a||i||0;return!a&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$3=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push=uncurryThis$3([].push),objectKeysInternal=function(e,t){var r,o=toIndexedObject$2(e),n=0,s=[];for(r in o)!hasOwn$3(hiddenKeys$2,r)&&hasOwn$3(o,r)&&push(s,r);for(;t.length>n;)!hasOwn$3(o,r=t[n++])||~indexOf(s,r)||push(s,r);return s},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$4),uncurryThis$2=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$3=anObject$5,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$3(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$1(t,r(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var o=ownKeys(t),n=definePropertyModule$1.f,s=getOwnPropertyDescriptorModule.f,i=0;i<o.length;i++){var a=o[i];hasOwn$2(e,a)||r&&hasOwn$2(r,a)||n(e,a,s(t,a))}},fails$3=fails$b,isCallable$4=isCallable$e,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$4(t)?fails$3(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$2=global$b,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var r,o,n,s=e.target,i=e.global,a=e.stat,c=i?global$2:a?global$2[s]||defineGlobalProperty(s,{}):(global$2[s]||{}).prototype;if(c)for(r in t){if(o=t[r],n=e.dontCallGetSet?(n=getOwnPropertyDescriptor(c,r))&&n.value:c[r],!isForced(i?r:s+(a?".":"#")+r,e.forced)&&void 0!==n){if(typeof o==typeof n)continue;copyConstructorProperties(o,n)}(e.sham||n&&n.sham)&&createNonEnumerableProperty$2(o,"sham",!0),defineBuiltIn$2(c,r,o,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$1=functionUncurryThis,call$1=functionCall,fails$2=fails$b,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$3,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$1([].concat),objectAssign=!$assign||fails$2(function(){if(DESCRIPTORS$2&&1!==$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[r]||objectKeys$1($assign({},t)).join("")!=o})?function(e,t){for(var r=toObject$1(e),o=arguments.length,n=1,s=getOwnPropertySymbolsModule.f,i=propertyIsEnumerableModule.f;n<o;)for(var a,c=IndexedObject(arguments[n++]),l=s?concat(objectKeys$1(c),s(c)):objectKeys$1(c),u=l.length,p=0;p<u;)a=l[p++],DESCRIPTORS$2&&!call$1(i,c,a)||(r[a]=c[a]);return r}:$assign,$$1=_export,assign=objectAssign;_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign});const SLICE_NAME="processingCenterIngestion",namespace$3=(!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending",e.Complete="complete"}(LoadingStatus=LoadingStatus||{}),"uiState"),initialState$2={status:LoadingStatus.Idle},slice=createSlice({name:SLICE_NAME+"/"+namespace$3,initialState:initialState$2,reducers:{init(e){e.status=LoadingStatus.Pending},initDone(e){e.status=LoadingStatus.Idle},initFailed(e){e.status=LoadingStatus.Failed}}}),actions$3=slice.actions;var uiState=slice.reducer;const namespace$2="ingestionJobsWizard",initialState$1={ingestionJobsWizard:{currentStep:0},selectSourceStep:{},basicInfoStep:{},contentTemplatesStep:{},scheduleStep:{},processingStep:{},locationAndPermissionsStep:{}},ingestionJobsWizardSlice=createSlice({name:"ingestionJobsWizard",initialState:initialState$1,reducers:{}}),actions$2=ingestionJobsWizardSlice.actions;var activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,ingestionJobsWizard_slice=ingestionJobsWizardSlice.reducer,objectDefineProperties={},DESCRIPTORS$1=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$2=anObject$5,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn=(objectDefineProperties.f=DESCRIPTORS$1&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$2(e);for(var r,o=toIndexedObject$1(t),n=objectKeys(t),s=n.length,i=0;i<s;)definePropertyModule.f(e,r=n[i++],o[r]);return e},getBuiltIn$4),html$1=getBuiltIn$4("document","documentElement"),anObject$1=anObject$5,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$1(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule.f(r,t)}),wellKnownSymbol$4=wellKnownSymbol$6,create$1=objectCreate,defineProperty$2=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$4("unscopables"),ArrayPrototype=Array.prototype,addToUnscopables$1=(null==ArrayPrototype[UNSCOPABLES]&&defineProperty$2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype[UNSCOPABLES][e]=!0}),iterators={},fails$1=fails$b,correctPrototypeGetter=!fails$b(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$1=hasOwnProperty_1,isCallable$3=isCallable$e,toObject=toObject$3,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object=Object,ObjectPrototype=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object.getPrototypeOf:function(e){e=toObject(e);if(hasOwn$1(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$3(t)&&e instanceof t?t.prototype:e instanceof $Object?ObjectPrototype:null},fails=fails$b,isCallable$2=isCallable$e,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$1=defineBuiltIn$3,wellKnownSymbol$3=wellKnownSymbol$6,ITERATOR$2=wellKnownSymbol$6("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails(function(){var e={};return IteratorPrototype$2[ITERATOR$2].call(e)!==e})),iteratorsCore=(isCallable$2((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$2])||defineBuiltIn$1(IteratorPrototype$2,ITERATOR$2,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$1=objectDefineProperty.f,hasOwn=hasOwnProperty_1,wellKnownSymbol$2=wellKnownSymbol$6,TO_STRING_TAG$1=wellKnownSymbol$6("toStringTag"),setToStringTag$2=function(e,t,r){(e=e&&!r?e.prototype:e)&&!hasOwn(e,TO_STRING_TAG$1)&&defineProperty$1(e,TO_STRING_TAG$1,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,r,o){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor(+!o,r)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$1=isCallable$e,$String=String,$TypeError=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$1(e))return e;throw $TypeError("Can't set "+$String(e)+" as a prototype")},uncurryThis=functionUncurryThis,anObject=anObject$5,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var r,o=!1,e={};try{(r=uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),o=e instanceof Array}catch(e){}return function(e,t){return anObject(e),aPossiblePrototype(t),o?r(e,t):e.__proto__=t,e}}():void 0),$=_export,call=functionCall,FunctionName=functionName,isCallable=isCallable$e,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn=defineBuiltIn$3,wellKnownSymbol$1=wellKnownSymbol$6,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol$1("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,r,o,n,s,i){createIteratorConstructor(r,t,o);function a(e){if(e===n&&y)return y;if(!BUGGY_SAFARI_ITERATORS&&e in p)return p[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}}var c,l,o=t+" Iterator",u=!1,p=e.prototype,d=p[ITERATOR$1]||p["@@iterator"]||n&&p[n],y=!BUGGY_SAFARI_ITERATORS&&d||a(n),b="Array"==t&&p.entries||d;if(b&&(b=getPrototypeOf(b.call(new e)))!==Object.prototype&&b.next&&(getPrototypeOf(b)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(b,IteratorPrototype):isCallable(b[ITERATOR$1])||defineBuiltIn(b,ITERATOR$1,returnThis)),setToStringTag(b,o,!0)),PROPER_FUNCTION_NAME&&n==VALUES&&d&&d.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(p,"name",VALUES):(u=!0,y=function(){return call(d,this)})),n)if(c={values:a(VALUES),keys:s?y:a(KEYS),entries:a(ENTRIES)},i)for(l in c)!BUGGY_SAFARI_ITERATORS&&!u&&l in p||defineBuiltIn(p,l,c[l]);else $({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},c);return p[ITERATOR$1]!==y&&defineBuiltIn(p,ITERATOR$1,y,{name:n}),Iterators$1[t]=y,c},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators=iterators,InternalStateModule=internalState,defineProperty=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,r=e.kind,o=e.index++;return!t||o>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:o,done:!1}:"values"==r?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}},"values"),values=Iterators.Arguments=Iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS&&"values"!==values.name)try{defineProperty(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$1=global$b,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol=wellKnownSymbol$6,ITERATOR=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR,ArrayValues)}catch(e){t[ITERATOR]=ArrayValues}if(t[TO_STRING_TAG]||createNonEnumerableProperty(t,TO_STRING_TAG,e),DOMIterables[e])for(var r in ArrayIteratorMethods)if(t[r]!==ArrayIteratorMethods[r])try{createNonEnumerableProperty(t,r,ArrayIteratorMethods[r])}catch(e){t[r]=ArrayIteratorMethods[r]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");const namespace$1="sourceStep",initialState={sourceSearchTerm:"",sourceTypeId:"",searchedSources:[],sourceSelected:null,isLoading:!1,error:null,hasMore:!1,offset:0},sourceStepSlice=createSlice({name:"sourceStep",initialState:initialState,reducers:{sourcesSearchStart:e=>{0===e.offset&&(e.isLoading=!0)},sourcesSearchSucceeded:(e,{payload:t})=>{e.searchedSources=[...e.searchedSources,...t],e.error=null,e.isLoading=!1},resetSourcesSearch:e=>{e.searchedSources=[],e.isLoading=!1,e.offset=0,e.hasMore=!1,e.error=null},setSourceTypeId:(e,{payload:t})=>{e.sourceTypeId=t},setSourceSelected:(e,{payload:t})=>{e.sourceSelected=t},setOffset:(e,{payload:t})=>{e.offset=t},setHasMore:(e,{payload:t})=>{e.hasMore=t},setError:(e,{payload:t})=>{e.error=t},setLoading:(e,{payload:t})=>{e.isLoading=t},setSourceSearchTerm:(e,{payload:t})=>{e.sourceSearchTerm=t}}}),actions$1=sourceStepSlice.actions;var selectSourceStep_slice=sourceStepSlice.reducer;const namespace=SLICE_NAME,actions={[namespace$3]:actions$3,[namespace$2]:actions$2,[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$3]:uiState,[namespace$2]:ingestionJobsWizard_slice,[namespace$1]:selectSourceStep_slice}),selectUIStateStatus=e=>e[namespace].uiState.status,selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,r)=>({apiRoot:e,graphQLEndpoint:t,token:r}));function __awaiter(e,i,a,c){return new(a=a||Promise)(function(r,t){function o(e){try{s(c.next(e))}catch(e){t(e)}}function n(e){try{s(c.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(o,n)}s((c=c.apply(e,i||[])).next())})}function getSourcesBySearchTerm(t,r=0,o,n,s){return __awaiter(this,void 0,void 0,function*(){var e="getSourcesSearch";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getSourcesSearch($sourceTypeIds: [ID!], $offset: Int, $name: String, $limit: Int ){\n sources(\n sourceTypeIds: $sourceTypeIds,\n offset: $offset,\n limit: $limit,\n name: $name,\n includePublic: false,\n permission: owner,\n nameMatch: contains,\n orderBy:{\n direction: asc\n field: name\n }\n ) {\n count\n records {\n id\n name\n sourceTypeId\n thumbnailUrl\n createdDateTime\n modifiedDateTime\n permission\n }\n }\n }\n ",operationName:e,variables:{sourceTypeIds:[n],name:o,offset:r,limit:s}},t))).sources})}const selectSearchTerm=e=>e.processingCenterIngestion.sourceStep.sourceSearchTerm||"",selectSourceTypeId=e=>e.processingCenterIngestion.sourceStep.sourceTypeId||"",selectSourceSelected=e=>e.processingCenterIngestion.sourceStep.sourceSelected||null,selectOffset=e=>e.processingCenterIngestion.sourceStep.offset,selectError=e=>e.processingCenterIngestion.sourceStep.error,selectIsLoading=e=>e.processingCenterIngestion.sourceStep.isLoading,selectHasMore=e=>e.processingCenterIngestion.sourceStep.hasMore,selectSearchedSources=e=>e.processingCenterIngestion.sourceStep.searchedSources||[];function*sourcesSearchTermSaga(){try{var e=yield select(selectApiConfigs),t=yield select(selectOffset),r=yield select(selectSourceTypeId),o=yield select(selectSearchTerm),n=yield call$7(getSourcesBySearchTerm,e,t,o,r,30);yield put(actions$1.sourcesSearchSucceeded(n.records)),30===n.count?yield put(actions$1.setHasMore(!0)):yield put(actions$1.setHasMore(!1)),yield put(actions$1.setOffset(t+30))}catch(e){yield put(actions$1.setError(e))}}function*getSourcesSearchTermWatcher(){yield takeLatest$1(actions$1.sourcesSearchStart.type,sourcesSearchTermSaga)}function*initProcessingCenterIngestion(){(yield select(selectUIStateStatus))===LoadingStatus.Pending&&(yield put(actions.uiState.initDone()))}function*watchProcessingCenterIngestionInit(){yield takeLatest$1(actions.uiState.init.type,initProcessingCenterIngestion)}function*rootSaga(){yield all([watchProcessingCenterIngestionInit(),getSourcesSearchTermWatcher()])}function getProcessingCenterIngestionModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const useStyles=makeStyles()(e=>({selectSourceContainer:{height:"100%vh - 200px"},title:{marginBottom:"4px"},subtitle:{marginBottom:"8px"},removePadding:{padding:0},dropdownContainer:{padding:"5px",display:"flex",alignItems:"flex-start",justifyContent:"center"},searchContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",border:"2px solid #E1E6ED",borderRadius:"7px",margin:"9px",padding:"8px",minWidth:"240px"},searchInput:{border:"0",outline:"none",width:"700px",fontFamily:"'Nunito'",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"left"},divLoader:{width:"300px",height:"350px",display:"flex",alignItems:"center",justifyContent:"center"},rowLoader:{height:"50px",display:"flex",justifyContent:"center",alignItems:"center"},source:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"5px"},sourceItem:{cursor:"pointer",width:"100%",marginRight:"auto","&:hover":{color:"#1871E8"}},sourceList:{height:"400px",display:"flex",flexDirection:"column",position:"relative"},sourceScrollContainer:{maxHeight:"360px",overflow:"hidden",overflowY:"scroll"},overlay:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"all",background:"rgba(255,255,255,0.5)",zIndex:1},newSourceButton:{marginTop:"10px",marginBottom:"10px",width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},advancedSettings:{marginTop:"10px",marginBottom:"10px",width:"100%",display:"flex",justifyContent:"flex-start",alignItems:"center"},buttonRow:{position:"fixed",bottom:"30px",right:"110px",display:"flex",flexDirection:"row"}})),sharedStyles=makeStyles()(e=>({formControl:{marginRight:"15px"},label:{fontFamily:"Nunito",fontWeight:700,fontSize:14,color:"#2A323C",marginBottom:0,display:"flex",justifyContent:"space-between"},field:{width:660,paddingTop:20,paddingBottom:20},clearBtn:{color:"#0C53B0",cursor:"pointer",fontWeight:400}})),muiSelectStyleOverrides={height:"28px",fontSize:"0.8em","& fieldset":{borderColor:"#D5DFE9",borderWidth:"2px",borderRadius:"6px"},"&:hover":{"&& fieldset":{borderColor:"rgba(42,50,60,0.5)"}}},SelectSourceSearchInput=({onChange:e,value:t})=>{var r=useStyles()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:r.searchContainer},{children:[jsxRuntime.exports.jsx(Search,{}),jsxRuntime.exports.jsx("input",{"data-test":"ingestion-sources-search-input",onClick:e=>e.stopPropagation(),className:r.searchInput,onChange:e,value:t,placeholder:"Search Source name.."})]}))},SelectSourceItem=({source:t})=>{var e=useStyles()["classes"],{id:r,name:o}=t;const n=useDispatch();return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.source},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"ingestion-source-"+r,onClick:()=>{var e=t;n(actions$1.setSourceSelected(e))},className:e.sourceItem,noWrap:!0},{children:o||r}))}),r),jsxRuntime.exports.jsx(Divider$1,{})]})},LoadingStateRow=()=>{var e=useStyles()["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:e.rowLoader},{children:jsxRuntime.exports.jsx(CircularProgress,{})}))},SelectSourceInfiniteList=({hasNextPage:t,isNextPageLoading:e,items:n,loadNextPage:r})=>{const o=t?n.length+1:n.length;const s=e=>!t||e<n.length,i=({index:e,style:t})=>{let r;var o;return r=s(e)?(o=n[e],jsxRuntime.exports.jsx(SelectSourceItem,{source:o},e)):jsxRuntime.exports.jsx(LoadingStateRow,{}),jsxRuntime.exports.jsx("div",Object.assign({style:t},{children:r}))};return jsxRuntime.exports.jsx(InfiniteLoader,Object.assign({isItemLoaded:s,itemCount:o,loadMoreItems:e?()=>{}:r},{children:({onItemsRendered:e,ref:t})=>jsxRuntime.exports.jsx(FixedSizeList,Object.assign({height:300,itemCount:o,itemSize:40,onItemsRendered:e,ref:t,width:"100%"},{children:i}))}))},SHARED_TEXT={sourceSelectDefaultMessage:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-default-select",defaultMessage:"Choose a Source",description:"default select text"}),sourceSelectTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-title",defaultMessage:"Select a Source",description:"title text"}),sourceSelectSubTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-subtitle",defaultMessage:"Select the data source for this scheduled job",description:"subtitle text"}),loadingSources:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-loading-sources",defaultMessage:"Loading Sources",description:"Search Filter by Source Schedule, loader message Loading Sources"}),retryButtonText:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-retry-button",defaultMessage:"Retry",description:"text for button to allow retry of failed api call"}),sourcesErrorMessageText:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-sources-error",defaultMessage:"There was an error loading the sources",description:"text for error with source fetching"}),sourcesNotFoundText:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-sources-not-found",defaultMessage:"No sources match your search name or source type.",description:"text for no sources found"}),createSourceButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-sources-create-source",defaultMessage:"Create New Source",description:"button for create new source"}),advancedSettingsButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-sources-advanced-settings",defaultMessage:"Advanced Settings",description:"button for advanced settings for source"}),nextButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-sources-next-button",defaultMessage:"Next",description:"button for next step"}),cancelButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-panel-ingestion-source-step-sources-cancel-button",defaultMessage:"Cancel",description:"button for cancel"})},SelectSourceStep=({sourceTypeId:e})=>{const t=useDispatch();var r=useStyles()["classes"],o=sharedStyles()["classes"],n=react.exports.useRef(null);const[s,i]=react.exports.useState(!1),a=useSelector(selectSourceSelected);var c=useSelector(selectSearchTerm),l=useSelector(selectSearchedSources),u=useSelector(selectHasMore),p=useSelector(selectError);const d=useSelector(selectIsLoading);react.exports.useEffect(()=>{i(!1)},[a]),react.exports.useEffect(()=>{t(actions$1.setSourceTypeId(e)),t(actions$1.sourcesSearchStart())},[]);return jsxRuntime.exports.jsxs("div",Object.assign({className:r.selectSourceContainer},{children:[jsxRuntime.exports.jsxs(FormControl,Object.assign({id:"selectSourceStep",size:"small",className:o.formControl},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h5",className:r.title},{children:SHARED_TEXT.sourceSelectTitle()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",className:r.subtitle},{children:SHARED_TEXT.sourceSelectSubTitle()})),jsxRuntime.exports.jsxs(Select,Object.assign({id:"sources",sx:muiSelectStyleOverrides,variant:"outlined",multiple:!1,displayEmpty:!0,onClick:()=>{i(!s),t(actions$1.setSourceSearchTerm(""))},className:o.field,open:s,onOpen:()=>d,renderValue:()=>a?a.name:SHARED_TEXT.sourceSelectDefaultMessage(),MenuProps:{sx:{padding:0},anchorOrigin:{vertical:"bottom",horizontal:"center"},classes:{list:r.removePadding,paper:r.removePadding}}},{children:[[jsxRuntime.exports.jsx("div",Object.assign({id:"sourceMenu",className:r.dropdownContainer,ref:n},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.sourceList},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({disableRipple:!0,focusRipple:!1,sx:{width:"600px",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},dense:!0,onKeyDown:e=>e.stopPropagation()},{children:jsxRuntime.exports.jsx(SelectSourceSearchInput,{onChange:e=>{e=e.target.value;t(actions$1.resetSourcesSearch()),t(actions$1.setSourceSearchTerm(e)),t(actions$1.sourcesSearchStart())},value:c})})),jsxRuntime.exports.jsx(Divider$1,{}),!p&&!d&&0===l.length&&jsxRuntime.exports.jsx("div",Object.assign({style:{width:"100%",display:"flex",alignItems:"center",flexDirection:"column"}},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"ingestion-sources-not-found",align:"center",variant:"caption",sx:{marginTop:"15px"}},{children:SHARED_TEXT.sourcesNotFoundText()}))})),p&&jsxRuntime.exports.jsxs("div",Object.assign({style:{width:"100%",display:"flex",alignItems:"center",flexDirection:"column"}},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"ingestion-sources-has-error-message",align:"center",variant:"caption",sx:{marginTop:"15px"}},{children:SHARED_TEXT.sourcesErrorMessageText()})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"ingestion-sources-has-error-retry-button",onClick:()=>{t(actions$1.sourcesSearchStart())},sx:{marginTop:"20px"},variant:"contained"},{children:SHARED_TEXT.retryButtonText()}))]})),!p&&0<l.length&&jsxRuntime.exports.jsx("div",Object.assign({id:"sourcesInfiniteList",className:"aiware-el "},{children:jsxRuntime.exports.jsx(SelectSourceInfiniteList,{hasNextPage:u,isNextPageLoading:d,items:l,loadNextPage:()=>{t(actions$1.sourcesSearchStart())}})}))]}))}))],[!p&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Divider$1,{sx:{marginLeft:"30px",width:"595px"}}),jsxRuntime.exports.jsx("div",Object.assign({className:r.newSourceButton},{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"processing-center-ingestion-create-source-button",onClick:()=>{t(mountPanel({panelId:"PROCESSING_CENTER_SOURCES",microFrontend:{name:"PROCESSING_CENTER_SOURCES",config:{}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"large",zIndex:1001,parentPanelId:"DATA_CENTER",dimmed:0,dimmedStatus:"dimParent"}}))},variant:"text",startIcon:jsxRuntime.exports.jsx(default_1$1,{})},{children:SHARED_TEXT.createSourceButton()}))}))]})]]})),jsxRuntime.exports.jsx("div",Object.assign({className:r.advancedSettings},{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"processing-center-ingestion-advanced-settings-button",onClick:()=>console.log("advanced settings clicked"),variant:"outlined",startIcon:jsxRuntime.exports.jsx(default_1,{}),disabled:!a},{children:SHARED_TEXT.advancedSettingsButton()}))}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:r.buttonRow},{children:[jsxRuntime.exports.jsx(Button,Object.assign({sx:{color:"#2A323C"},onClick:()=>console.log("cancel button clicked")},{children:SHARED_TEXT.cancelButton()})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>console.log("next button clicked"),variant:"contained",disabled:!a},{children:SHARED_TEXT.nextButton()}))]}))]}))},IngestionJobsWizard=e=>jsxRuntime.exports.jsxs("div",Object.assign({style:{height:"700px"}},{children:[jsxRuntime.exports.jsx("h1",{children:"Ingestion Jobs Wizard"}),jsxRuntime.exports.jsx("div",Object.assign({style:{padding:"30px"}},{children:jsxRuntime.exports.jsx(SelectSourceStep,{sourceTypeId:"1"})}))]})),ProcessingCenterIngestion=e=>(useDispatch(),jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getProcessingCenterIngestionModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(IngestionJobsWizard,Object.assign({},e))})}))})})));export{ProcessingCenterIngestion};
1
+ import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime,m as makeStyles,H as createSlice,c8 as combineReducers,c9 as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,cb as AIWareThemeProvider,K as lib,fe as getLibraryModule,A as AIWareIntlProvider,bv as CacheProvider,bw as muiCache,k as useSelector,r as react,i as useDispatch,F as FormattedMessage,T as Typography$2,a8 as Tooltip$1,a9 as IconButton,cd as Close,B as Box,q as Alert,at as Button,bC as CircularProgress,Y as Portal,fy as img$t,ch as default_1$2,p as lodash,eE as Badge,bG as Icon,fq as EngineCategoryIcons,aX as Snackbar,aY as default_1$3,f$ as ConfirmationModal,a2 as all,gc as selectors$1,gd as LibraryDropdown,bN as FormHelperText$2,ge as Remove,gf as Save,cA as Add,cs as Delete,cq as Edit,ae as Skeleton,cm as mountPanel,x as classNames,af as takeLatest$1,v as FormControl$1,ai as select,M as preferredLanguageSelector,b4 as AIWareFormatMessage,ah as put,bU as showMessage,bV as MessageSeverity,ak as call,dm as sdkEventManager,dn as SdkEvents,dp as SdkError,w as TextField$1,aV as Select$1,aW as MenuItem$1,gg as Input,cy as baseGraphQLApiWithError}from"./js-core.esm.js";import{selectors}from"./js-core.esm43.js";import{C as Chip}from"./js-core.esm32.js";import"./js-core.esm28.js";import"./js-core.esm44.js";import"./js-core.esm33.js";import"./js-core.esm45.js";import"./js-core.esm47.js";import"./js-core.esm8.js";import"./js-core.esm31.js";import"./js-core.esm46.js";import"./js-core.esm24.js";import"./js-core.esm50.js";import"./js-core.esm41.js";import"./js-core.esm51.js";import"./js-core.esm48.js";import"./js-core.esm12.js";import"./js-core.esm13.js";import"./js-core.esm18.js";import"./js-core.esm17.js";import"./js-core.esm49.js";var LoadingStatus,ProcessAIView,CheckCircle={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(CheckCircle,"__esModule",{value:!0}),CheckCircle.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),default_1$1=CheckCircle.default=_default$1,Info={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Info,"__esModule",{value:!0}),Info.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info"),default_1=Info.default=_default;!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const SHARED_TEXT={processAiHeaderTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.eA9TAY",defaultMessage:"AI PROCESSING",description:"Title of AI categories list"}),closePanel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"}),processAiHeaderDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.p3BcDi",defaultMessage:"Select from a list of AI capabilities to apply available AI processing to your selected files.",description:"Detailed text below the process AI header title"}),processAiEngineUnavailable:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.PwcA3J",defaultMessage:"This engine does not specify a default single job template.",description:"Detailed text if an engine is not available to use"}),processAiFailedStatus:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.UBu61T",defaultMessage:"An error happened while fetching the engine capabilities.",description:"Error message for process ai failures"}),processAiNoEngineCapability:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.IC5L+j",defaultMessage:"No available engine found for this file.",description:"Warning message when no engine found"}),processAiRetryBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.8U+Kek",defaultMessage:"Retry",description:"Retry button text"}),cancel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.6PdOcy",defaultMessage:"Cancel",description:"Cancel"}),processAiAddEngines:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.e5+f7H",defaultMessage:"Save Changes",description:"Add engines button text"}),engineSettings:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.3Phobj",defaultMessage:"Engine Settings",description:"The label for the engine settings component"}),saveSettings:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.UOkssC",defaultMessage:"Save Settings",description:"The label for the engine settings savings"}),engineSelected:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.Ki+AeV",defaultMessage:"Selected & Configured",description:"The label for the selected engine"}),removeEngine:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.eZW4Lt",defaultMessage:"Remove Engine",description:"The button to deselected a selected engine"}),editConfigurations:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.GSlIPA",defaultMessage:"Edit Configurations",description:"The button to edit the engine configurations"}),useThisEngine:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai-use-engine",defaultMessage:"Use this Engine",description:"The label for the use engine button when no engine has not been selected yet"})},useStyles$5=makeStyles()(e=>({aiProcessingWrapper:{padding:"8px 20px 20px 20px",display:"flex",flexDirection:"column",height:"100%",position:"absolute",top:"0",bottom:"0"},processAiHeader:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",marginBottom:10},loaderIcon:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:20}})),SLICE_NAME="dataCenterProcessAI",namespace$3=(!function(e){e.failed="failed",e.idle="idle",e.pending="pending",e.success="success"}(LoadingStatus=LoadingStatus||{}),!function(e){e.aiCapabilities="aiCapabilities",e.engineSelection="engineSelection",e.engineConfiguration="engineConfiguration"}(ProcessAIView=ProcessAIView||{}),"capabilitiesState"),initialState$3={status:LoadingStatus.idle,capabilities:[],engines:{}},capabilitiesSlice=createSlice({name:SLICE_NAME+"/"+namespace$3,initialState:initialState$3,reducers:{capabilitiesFetchStart(e,t){e.status=LoadingStatus.pending},capabilitiesFetchSucceed(e){e.status=LoadingStatus.idle},capabilitiesFetchFailed(e){e.status=LoadingStatus.failed},setCapabilities:(e,t)=>{e.capabilities=t.payload},setEngines:(e,t)=>{e.engines=t.payload}}}),actions$4=capabilitiesSlice.actions;var capabilities_state=capabilitiesSlice.reducer;const namespace$2="processAiConfig",initialState$2={status:LoadingStatus.idle,selectedEngines:{}},configurationSlice=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$2,reducers:{setConfigurations(e,t){var{capabilityId:t,selectedEngines:s}=t.payload;e.selectedEngines[t]=s},updateSingleJobStatus(e,t){const{engineId:s,status:n}=t.payload;for(const a in e.selectedEngines){var i=e.selectedEngines[a].findIndex(e=>e.id===s);if(-1!==i){e.selectedEngines[a][i].status=n;break}}}}}),actions$3=configurationSlice.actions;var configuration_state=configurationSlice.reducer;const namespace$1="uiState",initialState$1={status:LoadingStatus.idle,currentView:ProcessAIView.aiCapabilities},uiSlice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{setCurrentView:(e,t)=>{e.currentView=t.payload},setStatus:(e,t)=>{e.status=t.payload}}}),actions$2=uiSlice.actions;var ui_state=uiSlice.reducer;const namespace="job",initialState={status:LoadingStatus.idle},jobSlice=createSlice({name:SLICE_NAME+"/"+namespace,initialState:initialState,reducers:{launchJobStart(e,t){e.status=LoadingStatus.pending},launchJobSucceed(e){e.status=LoadingStatus.success},launchJobFailed(e){e.status=LoadingStatus.failed}}}),actions$1=jobSlice.actions;var EngineFieldType,job_state=jobSlice.reducer;const actions={[namespace$1]:actions$2,[namespace$3]:actions$4,[namespace$2]:actions$3,[namespace]:actions$1},rootReducer=combineReducers({[namespace$1]:ui_state,[namespace$3]:capabilities_state,[namespace$2]:configuration_state,[namespace]:job_state}),selectCapabilitiesStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.status},selectCapabilities=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.capabilities},selectEnginesByCapabilityId=t=>e=>{return null==(e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.engines)?void 0:e[t]},selectAllEngines=e=>{e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.engines;return e&&0<Object.values(e).length?Object.values(e).reduce((e,t)=>lodash.exports.concat(e,t)):[]},selectSelectedEnginesByCapabilityId=t=>e=>{return null==(e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$2])?void 0:e.selectedEngines)?void 0:e[t]},selectSelectedEngines=e=>{e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$2])?void 0:e.selectedEngines;return Object.values(e).reduce((e,t)=>e.concat(t),[])},selectSelectedEnginesObj=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$2])?void 0:e.selectedEngines},selectJobStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace])?void 0:e.status},selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,s)=>({apiRoot:e,graphQLEndpoint:t,token:s})),useStyles$4=makeStyles()(e=>({processingContainer:{marginTop:25,flex:1,overflowY:"scroll"},instructions:{marginBottom:"30px"},name:{fontSize:"14px",fontWeight:400,lineHeight:"19.1px"},description:{fontSize:"14px",fontWeight:400,maxWidth:"276px",lineHeight:"16.37px",overflow:"hidden",textOverflow:"ellipsis"},iconBackground:{display:"flex",justifyContent:"center",alignItems:"center",height:"40px",borderRadius:"25px",width:"40px",minHeight:"40px",minWidth:"40px",background:"#F2F5F9",marginRight:"15px"},processingRow:{padding:"20px 0",display:"flex",flexDirection:"row",height:"auto",borderBottom:"0.5px solid #D5DFE9",cursor:"pointer"},processingColumn:{display:"flex",flexDirection:"column",maxHeight:"auto"},engineIcons:{verticalAlign:"middle"},badge:{backgroundColor:"#D43060",left:e.spacing(1),top:e.spacing(1)},badgeContent:{fontSize:"11px",fontWeight:600,lineHeight:0}})),AICategories=({categories:e,closeSnackbar:i,enableNonSingleEngineJobEngines:a,marginStart:o,parentPanel:r})=>{const s=useStyles$4()["classes"],l=useDispatch(),c=useSelector(selectSelectedEnginesObj),d=useSelector(selectors.uiState.selectIsFullScreen),u=useSelector(selectors.uiState.selectIsMdpFullScreen);return jsxRuntime.exports.jsx("div",Object.assign({className:s.processingContainer},{children:e.map(n=>{var e,t=n.name.replace(/[^a-zA-Z]/g,"");return jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"engine-category-row",className:s.processingRow,onClick:()=>{{var t=n,t=(i(),{name:"DATA_CENTER_ENGINE_SELECTION",config:{name:"DATA CENTER ENGINE SELECTION",capability:t,enableNonSingleEngineJobEngines:a}}),s=d||u;let e=1001;return e="DATA_CENTER_MDP_IFRAME_PANEL"===r?s?1008:1001:s?1007:1e3,s={type:"APP_BAR_PANEL_TEMPLATE",marginTop:s?0:55,marginStart:(s?380:460)+(o||0),size:"small",zIndex:e,parentPanelId:"DATA_CENTER_PROCESS_AI",dimmed:0,dimmedStatus:"dimParent"},void l(mountPanel({panelId:"DATA_CENTER_ENGINE_SELECTION",microFrontend:t,panelConfig:s}))}}},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:s.iconBackground},{children:jsxRuntime.exports.jsx(Badge,Object.assign({"data-test":"engine-category-badge-"+t,badgeContent:null!=(e=c[n.id])&&e.length?jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"overline",className:s.badgeContent},{children:c[n.id].length})):0,color:"secondary",classes:{badge:s.badge},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:jsxRuntime.exports.jsx(Icon,{"data-test":"engine-category-icon-"+t,className:s.engineIcons,component:EngineCategoryIcons[t],color:"secondary",fontSize:"small"})}))})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.processingColumn},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({"data-test":"engine-category-name-"+n.name,variant:"h6",color:"textPrimary",className:s.name},{children:n.name})),jsxRuntime.exports.jsx(Typography$2,Object.assign({"data-test":"engine-category-description-"+n.name,variant:"body2",color:"textSecondary",className:s.description},{children:n.description}))]}))]}),t)})}))},useStyles$3=makeStyles()(e=>({jobLaunchSnackbarContainer:{backgroundColor:e.palette.common.white,padding:"6px 16px",borderRadius:"4px",width:"440px",boxShadow:"rgba(0, 0, 0, 0.2) 0px 3px 3px -2px, rgba(0, 0, 0, 0.14) 0px 3px 4px 0px, rgba(0, 0, 0, 0.12) 0px 1px 8px 0px"},jobLaunchSnackbarTitle:{display:"flex",justifyContent:"space-between",padding:"10px 4px"},jobLaunchItemList:{maxHeight:"80vh",overflowY:"scroll",width:"102%"},jobLaunchItem:{transition:"all 0.5s ease-in-out",display:"flex",flexDirection:"row",padding:"6px 0px 5px 16px",borderRadius:"4px",marginBottom:"10px",marginTop:"5px"},jobLaunchItemMessage:{display:"flex",flexDirection:"column",width:"80%"},jobLaunchItemFeedback:{display:"flex",justifyContent:"center",alignItems:"center",width:"20%"},jobLaunchItemLoading:{color:"rgb(13, 60, 97)",backgroundColor:"rgb(232, 244, 253)"},jobLaunchItemSuccess:{backgroundColor:"rgb(237, 247, 237)",color:"rgb(30, 70, 32)"},jobLaunchItemFail:{backgroundColor:"rgb(253, 236, 234)",color:"rgb(97, 26, 21)"}})),JobLaunchItem=({name:e,status:t,onRetry:s,limitAnimation:n=!1})=>{const[i,a]=react.exports.useState(!0);react.exports.useEffect(()=>{setTimeout(()=>{a(!1)},500*Math.random()+700)});var o=useStyles$3()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(o.jobLaunchItem,{[o.jobLaunchItemLoading]:t===LoadingStatus.pending||i,[o.jobLaunchItemSuccess]:t===LoadingStatus.success,[o.jobLaunchItemFail]:t===LoadingStatus.failed})},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.jobLaunchItemMessage},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({style:{width:"90%"},variant:"h4",noWrap:!0},{children:e})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:t===LoadingStatus.pending||i?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.dSA4RS",defaultMessage:"Launching AI Processing...",description:"Job Launch item description loading job"}):t===LoadingStatus.success?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.b+iNpN",defaultMessage:"This processing job started successfully.",description:"Job Launch item description success"}):t===LoadingStatus.failed?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.50UABM",defaultMessage:"Unable to start processing job.",description:"Job Launch item description failed"}):void 0}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.jobLaunchItemFeedback},{children:t===LoadingStatus.pending||i?jsxRuntime.exports.jsx(CircularProgress,{size:20,disableShrink:n}):t===LoadingStatus.success?jsxRuntime.exports.jsx(default_1$1,{style:{color:"#4caf50"}}):t===LoadingStatus.failed?jsxRuntime.exports.jsx(Button,Object.assign({color:"inherit",onClick:s},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.BnINsu",defaultMessage:"RETRY",description:"Button label to retry the failed job"})})):void 0}))]}))},JobLaunchSnackbar=({open:e,onClose:s,jobLaunchItems:t,onRetry:n,hidePanel:i})=>{var a=(e,t)=>{"clickaway"!==t&&s()},o=useStyles$3()["classes"];const r=10<t.length;var l=()=>{for(const e of t)if(e.status===LoadingStatus.failed||e.status===LoadingStatus.pending)return null;return 2500};return jsxRuntime.exports.jsx(Snackbar,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:e,autoHideDuration:l(),onClose:a,TransitionProps:{onExited:l()&&i}},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:"aiware-el "+o.jobLaunchSnackbarContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.jobLaunchSnackbarTitle},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"h3"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.HJnKOv",defaultMessage:"AI Processing",description:"AI Processing snackbar title"})})),jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"close",color:"inherit",size:"small",onClick:a},{children:jsxRuntime.exports.jsx(default_1$3,{fontSize:"inherit"})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.jobLaunchItemList},{children:t.map((e,t)=>jsxRuntime.exports.jsx(JobLaunchItem,{name:e.name,status:e.status,onRetry:()=>n(e),limitAnimation:r},t))}))]}))}))},useStyles$2=makeStyles()(e=>({root:{display:"flex",justifyContent:"end",marginTop:"25px"},cancelButton:{marginRight:e.spacing(2),textTransform:"none",color:e.palette.text.primary},actionButton:{textTransform:"none"}})),ActionsFooter=({title:e,actionButton:t,cancelButton:s,confirmationOnCancel:n=!1,children:i=null})=>{const[a,o]=react.exports.useState(!1);var r=useStyles$2()["classes"];const l=e=>{o(!1),e&&e()};return jsxRuntime.exports.jsxs("div",Object.assign({className:r.root,"data-test":"data-center-action-footer"},{children:[e,i,jsxRuntime.exports.jsx(ConfirmationModal,{showConfirmationModal:a,closeConfirmationModal:l,onClosePanel:()=>l(s.action)}),jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>{n&&!t.disabled?o(!0):s.action()},disabled:s.disabled,"data-test":s.dataTest,className:r.cancelButton},{children:s.label})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:t.action,disabled:t.disabled,"data-test":t.dataTest,className:r.actionButton},{children:t.label}))]}))},ProcessAIManager=t=>{var e=useStyles$5()["classes"];const{apiRoot:s,graphQLEndpoint:n,token:i}=useSelector(selectApiConfigs),a=useSelector(selectJobStatus),[o,r]=react.exports.useState(!1);var l=useSelector(selectCapabilitiesStatus);const c=useSelector(selectSelectedEngines),d=useSelector(selectAllEngines),{onSaveEngineSelection:u,enableNonSingleEngineJobEngines:p}=t;var g=useSelector(selectCapabilities);const x=useDispatch(),m=()=>{x(actions.capabilitiesState.capabilitiesFetchStart(t.tdoId))};if(react.exports.useEffect(()=>{[LoadingStatus.pending,LoadingStatus.success,LoadingStatus.failed].includes(a)&&r(!0)},[a]),react.exports.useEffect(()=>{s&&n&&i&&m()},[s,n,i,x,t.tdoId]),!(s&&n&&i&&t.panelRendered))return null;var j={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.J0sEvH",defaultMessage:"Process with AI",description:"action button label"}),action:()=>{var e;u?(e=c.map(t=>{var e=d.find(e=>e.id===t.id);return Object.assign(Object.assign({},e),t)}),u(e),null!=t&&t.hidePanel()):x(actions.job.launchJobStart({tdoId:t.tdoId,selectedEngines:c}))},disabled:!c.length,dataTest:"data-center-process-ai-action-btn"},b={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.uT5L4h",defaultMessage:"Cancel",description:"cancel button label"}),action:()=>null==t?void 0:t.hidePanel(),disabled:!1,dataTest:"data-center-process-ai-cancel-btn"};return jsxRuntime.exports.jsxs("div",Object.assign({className:e.aiProcessingWrapper},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.processAiHeader},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"h1",color:"secondary","data-test":"data-center-process-ai-panel-header-title"},{children:SHARED_TEXT.processAiHeaderTitle()})),jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:SHARED_TEXT.closePanel()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:null==t?void 0:t.hidePanel,"aria-labelledby":"data-center-process-ai-close-panel","data-test":"data-center-process-ai-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2",color:"textSecondary","data-test":"data-center-process-ai-supported-files-title"},{children:SHARED_TEXT.processAiHeaderDescription()})),l===LoadingStatus.failed&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("br",{}),jsxRuntime.exports.jsx(Box,Object.assign({mt:4},{children:jsxRuntime.exports.jsxs(Alert,Object.assign({variant:"outlined",severity:"error"},{children:[jsxRuntime.exports.jsx("span",Object.assign({"data-test":"data-center-process-ai-failed-text"},{children:SHARED_TEXT.processAiFailedStatus()})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"data-center-process-ai-failed-retry-button",onClick:m},{children:SHARED_TEXT.processAiRetryBtn()}))})]}))}))]}),l===LoadingStatus.idle&&!(null!=g&&g.length)&&jsxRuntime.exports.jsx(Box,Object.assign({mt:4},{children:jsxRuntime.exports.jsx(Alert,Object.assign({variant:"outlined",severity:"info"},{children:SHARED_TEXT.processAiNoEngineCapability()}))})),l===LoadingStatus.pending&&jsxRuntime.exports.jsx("div",Object.assign({className:e.loaderIcon},{children:jsxRuntime.exports.jsx(CircularProgress,{})})),l===LoadingStatus.idle&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(AICategories,{categories:g,closeSnackbar:()=>r(!1),enableNonSingleEngineJobEngines:!!p,marginStart:null==t?void 0:t.marginStart,parentPanel:t.parentPanelId}),jsxRuntime.exports.jsx(ActionsFooter,{confirmationOnCancel:!0,actionButton:j,cancelButton:b})]}),jsxRuntime.exports.jsx(Portal,{children:jsxRuntime.exports.jsx(JobLaunchSnackbar,{open:o,onClose:()=>r(!1),jobLaunchItems:c,onRetry:e=>{x(actions.job.launchJobStart({tdoId:t.tdoId,selectedEngines:[e]}))},hidePanel:null==t?void 0:t.hidePanel})})]}))};function __awaiter(e,o,r,l){return new(r=r||Promise)(function(s,t){function n(e){try{a(l.next(e))}catch(e){t(e)}}function i(e){try{a(l.throw(e))}catch(e){t(e)}}function a(e){var t;e.done?s(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(n,i)}a((l=l.apply(e,o||[])).next())})}function fetchEngineCapabilities(s,n,i){return __awaiter(this,void 0,void 0,function*(){var e="fetchEngineCapabilities",t="engineCategories";return(yield baseGraphQLApiWithError(Object.assign({query:`
2
+ query ${e}($limit: Int${n?", $format: String!":""}) {
3
+ ${t}(limit: $limit) {
4
+ count
5
+ offset
6
+ limit
7
+ records {
8
+ name
9
+ iconClass
10
+ description
11
+ name
12
+ id
13
+ engines(
14
+ limit: $limit
15
+ filter: {
16
+ ${n?"supportedInputFormats: [$format],":""}
17
+ state: active
18
+ }
19
+ ) {
20
+ count
21
+ offset
22
+ limit
23
+ records {
24
+ id
25
+ description
26
+ name
27
+ state
28
+ signedIconPath
29
+ edgeVersion
30
+ fields {
31
+ name
32
+ type
33
+ defaultValue
34
+ defaultValues
35
+ required
36
+ max
37
+ min
38
+ options {
39
+ __typename
40
+ key
41
+ value
42
+ }
43
+ }
44
+ standaloneJobTemplates {
45
+ type
46
+ }
47
+ libraryRequired
48
+ supportedInputFormats
49
+ mode
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ `,variables:{format:n,limit:i},operationName:e},s)))[t]})}function getTdoContentType(s,n){var i;return __awaiter(this,void 0,void 0,function*(){var e="getTdoContentType",t="temporalDataObject",e=yield baseGraphQLApiWithError(Object.assign({query:'\n query getTdoContentType($tdoId: ID!) {\n temporalDataObject(id: $tdoId) {\n primaryAsset(assetType: "media") {\n contentType\n }\n }\n }\n ',variables:{tdoId:n},operationName:e},s));return null==(i=null==(i=e[t])?void 0:i.primaryAsset)?void 0:i.contentType})}function launchSingleEngineJob(n,i,a,o,r){var l;return __awaiter(this,void 0,void 0,function*(){var e="launchSingleEngineJob",t="launchSingleEngineJob",s=null==o?void 0:o.filter(e=>null!==e.fieldValue),s={input:Object.assign(Object.assign(Object.assign({engineId:i},r&&{uploadUrl:r}),a&&{targetId:a}),(null==s?void 0:s.length)&&{fields:s})},s=yield baseGraphQLApiWithError(Object.assign({query:"\n mutation launchSingleEngineJob($input: SingleEngineJobInput!) {\n launchSingleEngineJob(input: $input) {\n id\n }\n }\n ",variables:s,operationName:e},n));return null==(l=s[t])?void 0:l.id})}function*fetchCapabilitiesHandler(e){try{var t=yield select(selectApiConfigs),s=yield select(preferredLanguageSelector),n=e.payload,i=n?yield getTdoContentType(t,n):null;const a=AIWareFormatMessage(s);if(n&&!i)return yield put(showMessage({content:a({id:"os-data-center-process-ai.snackbar.processAiEngineError",defaultMessage:[{type:0,value:"This file can not be processed through any AI engines!"}]}),severity:MessageSeverity.Info})),void(yield put(actions.capabilitiesState.capabilitiesFetchSucceed()));const o=yield fetchEngineCapabilities(t,i,200),r=[],l={};null!==o&&void 0!==o&&o.records.forEach(e=>{0<e.engines.count&&(r.push({iconClass:e.iconClass,id:e.id,name:e.name,description:e.description}),l[e.id]=e.engines.records)}),yield put(actions.capabilitiesState.setCapabilities(r)),yield put(actions.capabilitiesState.setEngines(l)),yield put(actions.capabilitiesState.capabilitiesFetchSucceed())}catch(e){yield put(actions.capabilitiesState.capabilitiesFetchFailed()),console.log(e)}}function*getCapabilitiesWatcher(){yield takeLatest$1(actions.capabilitiesState.capabilitiesFetchStart.type,fetchCapabilitiesHandler)}function*launchSingleEngineJobSaga(e){try{const t=yield select(selectApiConfigs),{tdoId:s,selectedEngines:n}=e.payload;yield all(n.map(e=>launchSingleEngine(t,e.id,s,e.fields))),yield put(actions.job.launchJobSucceed())}catch(e){yield put(actions.job.launchJobFailed()),console.log(e)}}function*launchSingleEngine(e,t,s,n){try{yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.pending}));var i=yield call(launchSingleEngineJob,e,t,s,n);i||(yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.failed})),sdkEventManager.dispatch(SdkEvents.jobCreated,new SdkError("Job could not be created!"),{tdoId:s,engineId:t})),yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.success})),sdkEventManager.dispatch(SdkEvents.jobCreated,null,{jobId:i,engineId:t,tdoId:s})}catch(e){yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.failed})),sdkEventManager.dispatch(SdkEvents.jobCreated,new SdkError("Job could not be created!"),{tdoId:s,engineId:t}),console.log(e)}}function*getJobWatcher(){yield takeLatest$1(actions.job.launchJobStart.type,launchSingleEngineJobSaga)}function*rootSaga(){yield all([getCapabilitiesWatcher(),getJobWatcher()])}function getDataCenterProcessAIModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const DataCenterProcessAI=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getDataCenterProcessAIModule(),getLibraryModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(ProcessAIManager,Object.assign({},e))}))})}))}),formatLabel=(!function(e){e.Number="Number",e.Picklist="Picklist",e.MultiPicklist="MultiPicklist",e.Text="Text",e.SchemaSelection="SchemaSelection"}(EngineFieldType=EngineFieldType||{}),(e="")=>lodash.exports.startCase(e)),getFieldErrorMessage=e=>{const{required:t,value:s,min:n,max:i,type:a,values:o}=e;if(lodash.exports.isEmpty(a===EngineFieldType.MultiPicklist?o:s))return t?"This field can't be blank!":"";if(a===EngineFieldType.Number){if(lodash.exports.isNumber(n)&&Number(s)<n)return"The value can't be lower than "+n.toFixed(2);if(lodash.exports.isNumber(i)&&Number(s)>i)return"The value can't be higher than "+i.toFixed(2)}return""},checkFieldsValidation=(e,o)=>e.every(e=>{let t=!0;var{required:e,type:s,min:n,max:i,name:a}=e,a=o[a];return e&&lodash.exports.isEmpty(a)&&(t=!1),t=s===EngineFieldType.Number&&(lodash.exports.isNumber(n)&&Number(a)<n||lodash.exports.isNumber(i)&&Number(a)>i)?!1:t}),useStyles$1=makeStyles()(e=>({engineOuterContainer:{position:"relative",overflow:"hidden",borderRadius:"4px",marginTop:10},engineContainer:{border:"0.5px solid #D5DFE9",borderRadius:"4px",transition:"border-color 250ms"},engineUnavailable:{opacity:.5},engineUnavailableWarningContainer:{top:"0",left:"0",width:"100%",height:"100%",opacity:"1",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 500ms ease-in-out",borderRadius:"4px",boxSizing:"border-box"},engineUnavailableWarning:{color:"rgb(13, 60, 97)",width:"80%",display:"flex",padding:"13px 6px",paddingTop:"8px",textAlign:"center",alignItems:"center",borderRadius:"7px",backgroundColor:"rgb(232, 244, 253)",boxShadow:"rgb(0 0 0 / 7%) 0px 3px 5px -1px, rgb(0 0 0 / 4%) 0px 6px 10px 0px, rgb(0 0 0 / 3%) 0px 1px 18px 0px"},engineUnavailableWarningIcon:{marginRight:"5px"},engineContainerActive:{borderColor:"#187600"},engineHeader:{display:"flex",flexDirection:"row",padding:"20px"},libraryWrapper:{marginTop:12,"& > div":{width:"100%"}},iconBackground:{display:"flex",justifyContent:"center",alignItems:"center",height:"40px",borderRadius:"25px",width:"40px",minHeight:"40px",minWidth:"40px",background:"#F2F5F9",marginRight:"15px"},engineImgIcon:{width:"30px",height:"30px"},engineInfoContainer:{position:"relative",flex:1},engineName:{fontSize:"14px",fontWeight:400,lineHeight:"19.1px"},engineDescription:{fontSize:"12px",fontWeight:400,lineHeight:"16.37px",overflow:"hidden",textOverflow:"ellipsis"},engineEstimatedCost:{color:"#1B1D1F",marginTop:"10px",fontSize:"12px"},engineContent:{overflowX:"hidden",overflowY:"auto",height:"auto",boxSizing:"border-box",width:"100%",padding:"16px 20px 20px 20px",display:"none"},engineSettingsLabel:{fontSize:14,fontWeight:600,color:"#1B1D1F"},footerActionBtn:{width:"100%",backgroundColor:"#FAFAFA",color:e.palette.text.primary,fontSize:"12px",padding:"10px"},isExpanded:{height:"auto",display:"flex",borderTop:"0.5px solid #D5DFE9",flexDirection:"column"},savedAndConfiguredBtn:{backgroundColor:"#ECFAE4",color:"#187600",width:"100%",fontSize:"12px",padding:"10px",pointerEvents:"none",cursor:"default","&:hover":{backgroundColor:"#ECFAE4",color:"#187600"}},icon:{fontSize:"15px",marginRight:"13px"},savedAndConfiguredBtnIcon:{color:"#187600"},deselectBtn:{fontSize:"8px",position:"absolute",right:"-20px",top:"-20px"},field:{width:"100%"},footerBtnContainer:{display:"flex",alignItems:"center",flex:1,padding:4,backgroundColor:"#fafafa",borderBottomLeftRadius:4,borderBottomRightRadius:4,border:"1px solid #FFF","& button":{flex:1,fontSize:12}},footerBtnContainerActive:{backgroundColor:"#ECFAE4","& .btnContBorder":{background:"#187600"},"& button":{color:"#187600"}},btnContBorder:{margin:"0 4px",height:18,width:1,background:"#555f7c"},formControlWrapper:{marginTop:15},inputLabel:{fontFamily:"Nunito",fontWeight:300,display:"block",fontSize:14,color:"#5C6269",marginBottom:6},inputLabelError:{color:e.palette.error.main}})),TxtField=({id:e,required:t,type:s,value:n,onChange:i,error:a=!1})=>{var o=useStyles$1()["classes"];return jsxRuntime.exports.jsx(TextField$1,{id:e,InputLabelProps:{shrink:!0},autoComplete:"off",required:t,value:n,type:s||"",className:o.field,onChange:i,size:"small",error:a})},SelectList=({id:e,value:t,required:s,options:n,onChange:i,error:a=!1})=>{var o=useStyles$1()["classes"];return jsxRuntime.exports.jsx(Select$1,Object.assign({id:e,required:s,value:void 0!==t?t:null,className:o.field,onChange:i,variant:"outlined",style:{width:"100%"},error:a,inputProps:{name:e,id:e}},{children:null==n?void 0:n.map(e=>jsxRuntime.exports.jsx(MenuItem$1,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.key})))}))},MultiSelectList=({id:e,values:t,required:s,options:n,onChange:i,error:a=!1})=>{var o={PaperProps:{style:{maxHeight:224,width:250}}};return jsxRuntime.exports.jsx(Select$1,Object.assign({id:e,required:s,value:t,multiple:!0,onChange:i,variant:"outlined",error:a,input:jsxRuntime.exports.jsx(Input,{id:"select-multiple-chip-"+e}),renderValue:e=>jsxRuntime.exports.jsx("div",{children:null==e?void 0:e.map(e=>jsxRuntime.exports.jsx(Chip,{style:{marginRight:6},label:e},e))}),MenuProps:o},{children:null==n?void 0:n.map(e=>jsxRuntime.exports.jsx(MenuItem$1,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.key})))}))},ComponentLoader=({fields:e,onChange:r,showErrors:l=!1})=>{const c=useStyles$1()["classes"];return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:null==(e=e)?void 0:e.map((t,e)=>{var s=formatLabel((null==t?void 0:t.name)||""),n=`engine-configuration-input--${null==t?void 0:t.name}-idx-`+e,i=e=>{r({fieldName:null==t?void 0:t.name,fieldValue:e.target.value})};let a;var o=!!getFieldErrorMessage(t)&&l;switch(null==t?void 0:t.type){case EngineFieldType.Picklist:a=jsxRuntime.exports.jsx(SelectList,{id:n,label:s,required:null==t?void 0:t.required,options:null==t?void 0:t.options,value:null==t?void 0:t.value,onChange:i,error:o});break;case EngineFieldType.Text:a=jsxRuntime.exports.jsx(TxtField,{id:n,label:s,required:null==t?void 0:t.required,value:null==t?void 0:t.value,onChange:i,error:o});break;case EngineFieldType.Number:a=jsxRuntime.exports.jsx(TxtField,{id:n,label:s,required:null==t?void 0:t.required,value:null==t?void 0:t.value,type:"number",onChange:i,error:o});break;case EngineFieldType.MultiPicklist:a=jsxRuntime.exports.jsx(MultiSelectList,{id:n,label:null==t?void 0:t.name,required:null==t?void 0:t.required,options:null==t?void 0:t.options,values:(null==t?void 0:t.values)||[],onChange:i,error:o});break;default:return null}return jsxRuntime.exports.jsxs(FormControl$1,Object.assign({error:o,size:"small",className:c.formControlWrapper},{children:[jsxRuntime.exports.jsx("label",Object.assign({htmlFor:n,className:c.inputLabel+" "+(o&&c.inputLabelError)},{children:s})),a,o&&jsxRuntime.exports.jsx(FormHelperText$2,{children:getFieldErrorMessage(t)})]}))})})},Engine=({id:e,name:t,description:s,saved:n,libraryRequired:i,fields:a,onSave:o,onDeselect:r,iconName:l,defaultConfiguration:c,isEngineAvailable:d=!0,signedIconPath:u})=>{const p=useStyles$1()["classes"];var g=useSelector(selectors$1.selectLoadingStatus);const[x,m]=react.exports.useState(!1),[j,b]=react.exports.useState({}),[h,f]=react.exports.useState(!1),[S,v]=react.exports.useState(!1),[y,R]=react.exports.useState(!1),[E,C]=react.exports.useState(null),[I,A]=react.exports.useState(null);g=i&&"pending"===g;const T=t=>{b(e=>Object.assign(Object.assign({},e),{[t.fieldName]:t.fieldValue}))};const L=()=>checkFieldsValidation(a,j)?i&&!j.libraryId?v(!0):(o&&o({id:e,name:t,fields:Object.keys(j).map(e=>({fieldName:e,fieldValue:j[e]}))}),void m(!1)):f(!0);const N=()=>{const s={};c?c.forEach(e=>s[e.fieldName]=e.fieldValue):(i&&(s.libraryId=""),null!=a&&a.length&&a.forEach(e=>{var t=e.type===EngineFieldType.MultiPicklist?e.defaultValues:e.defaultValue;s[e.name]=t})),b(s)};react.exports.useEffect(()=>{N()},[]);var O=null==a?void 0:a.map(e=>{const t=Object.assign({},e);var s=e.type===EngineFieldType.MultiPicklist?"values":"value";return t[s]=j[e.name],t});return jsxRuntime.exports.jsxs("div",Object.assign({onMouseEnter:()=>{var e;d||(e=setTimeout(()=>{R(!0)},500),C(e))},onMouseLeave:()=>{d||(R(!1),clearTimeout(E))},className:p.engineOuterContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:`${p.engineContainer} ${n&&p.engineContainerActive} `+(!d&&p.engineUnavailable)},{children:[jsxRuntime.exports.jsxs("header",Object.assign({className:p.engineHeader},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:p.iconBackground},{children:u&&!1!==I?jsxRuntime.exports.jsx("img",{alt:"Engine Logo",className:p.engineImgIcon,src:u,onLoad:e=>{A(!0)},onError:e=>{A(!1)}}):jsxRuntime.exports.jsx(Icon,{color:"secondary",fontSize:"small",component:EngineCategoryIcons[l]})})),jsxRuntime.exports.jsxs("div",Object.assign({className:p.engineInfoContainer},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({"data-test":"engine-category-name-"+t,variant:"h6",color:"textPrimary",className:p.engineName},{children:t})),jsxRuntime.exports.jsx(Typography$2,Object.assign({"data-test":"engine-category-description-"+t,variant:"body2",color:"textSecondary",className:p.engineDescription},{children:s}))]}))]})),jsxRuntime.exports.jsxs("main",Object.assign({id:"engine-main-content-"+e,className:p.engineContent+" "+(x?p.isExpanded:"")},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"subtitle2",color:"textSecondary",className:p.engineSettingsLabel},{children:SHARED_TEXT.engineSettings()})),i&&jsxRuntime.exports.jsxs("div",Object.assign({className:p.libraryWrapper},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:p.inputLabel},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.ro5ll8",defaultMessage:"Libraries",description:"The label for the library selection"})})),jsxRuntime.exports.jsx(LibraryDropdown,{engineId:e,defaultSelected:j.libraryId,onSelectedLibraryId:e=>{T({fieldName:"libraryId",fieldValue:e})}}),S&&jsxRuntime.exports.jsx(FormHelperText$2,Object.assign({error:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.ro4mn3",defaultMessage:"Please select a library.",description:"Missing library message"})}))]})),jsxRuntime.exports.jsx(ComponentLoader,{showErrors:h,fields:O,onChange:T})]})),jsxRuntime.exports.jsxs("footer",{children:[x&&jsxRuntime.exports.jsxs("div",Object.assign({className:p.footerBtnContainer},{children:[jsxRuntime.exports.jsxs(Button,Object.assign({id:"selected-engine-cancel-btn-"+e,className:p.footerActionBtn,onClick:()=>{m(!1),N()}},{children:[jsxRuntime.exports.jsx(Icon,{component:Remove,color:"secondary",fontSize:"small",className:""+p.icon}),SHARED_TEXT.cancel()]})),(0<(null==a?void 0:a.length)||i)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("span",{className:p.btnContBorder}),jsxRuntime.exports.jsxs(Button,Object.assign({id:"engine-save-settings-btn-"+e,className:p.footerActionBtn,onClick:L,disabled:g},{children:[jsxRuntime.exports.jsx(Icon,{component:Save,color:"secondary",fontSize:"small",className:p.icon}),SHARED_TEXT.saveSettings()]}))]})]})),!n&&!x&&jsxRuntime.exports.jsxs(Button,Object.assign({id:"engine-use-engine-btn-"+e,className:p.footerActionBtn,onClick:()=>{null!=a&&a.length||i?m(e=>!e):L()},disabled:!d},{children:[jsxRuntime.exports.jsx(Icon,{component:Add,color:"secondary",fontSize:"small",className:p.icon}),SHARED_TEXT.useThisEngine()]})),n&&!x&&jsxRuntime.exports.jsxs("div",Object.assign({className:p.footerBtnContainer+" "+p.footerBtnContainerActive},{children:[jsxRuntime.exports.jsxs(Button,Object.assign({id:"selected-engine-remove-btn-"+e,onClick:()=>{r&&r(e),N()}},{children:[jsxRuntime.exports.jsx(Icon,{component:Delete,color:"secondary",fontSize:"small",className:p.icon+" "+p.savedAndConfiguredBtnIcon}),SHARED_TEXT.removeEngine()]})),(0<(null==a?void 0:a.length)||i)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("span",{className:p.btnContBorder}),jsxRuntime.exports.jsxs(Button,Object.assign({id:"selected-engine-edit-configration-btn-"+e,onClick:()=>m(!0)},{children:[jsxRuntime.exports.jsx(Icon,{component:Edit,color:"secondary",className:p.icon+" "+p.savedAndConfiguredBtnIcon}),SHARED_TEXT.editConfigurations()]}))]})]}))]})]})),!d&&y&&jsxRuntime.exports.jsx("div",Object.assign({className:p.engineUnavailableWarningContainer},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:p.engineUnavailableWarning},{children:[jsxRuntime.exports.jsx(default_1,{className:p.engineUnavailableWarningIcon,style:{color:"#2196f3"}})," ",jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"subtitle2"},{children:SHARED_TEXT.processAiEngineUnavailable()}))]}))}))]}))},useStyles=makeStyles()(e=>({engineSelectionWrapper:{padding:20,display:"flex",flexDirection:"column",height:"calc(100vh - 60px)"},enginSelectionHeader:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",marginBottom:20},loaderIcon:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:20},engineListWrapper:{flex:1,overflowY:"scroll"},footerActionButtons:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:25,"& > *":{marginLeft:e.spacing(2)}},engineSearchContainer:{display:"flex",background:"#f7f7f7",padding:"5px",borderRadius:"7px",marginBottom:"10px",border:"1px solid #c9c9c9"},engineSearchDisabled:{opacity:.5,cursor:"not-allowed","& input":{pointerEvents:"none"}},engineSearchInput:{display:"flex",outline:0,border:0,width:"80%",marginLeft:"10px",background:"transparent"},engineSearchIcon:{display:"flex",color:"#a6a6a6"},engineSearchLoader:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:"5px",marginLeft:"auto"},engineSearchSkeleton:{height:"160px",width:"100%",display:"flex",flexDirection:"column",border:"0.5px solid #D5DFE9",borderRadius:"4px",marginTop:"10px"},engineSearchEmptyState:{display:"flex",flexDirection:"column",padding:"50px",justifyContent:"center",alignItems:"center",gap:"10px","& img":{width:"100px"}}})),EngineSelection=({capability:e,hidePanel:t,enableNonSingleEngineJobEngines:i})=>{var s=useStyles()["classes"];const n=useDispatch(),a=useSelector(selectEnginesByCapabilityId(e.id)),o=useSelector(selectSelectedEnginesByCapabilityId(e.id)),[r,l]=react.exports.useState([]),c=e.name.replace(/[^a-zA-Z]/g,""),d=t=>{l(e=>e.filter(e=>e.id!==t))},u=t=>{l(e=>[...e.filter(e=>e.id!==t.id),t])};react.exports.useEffect(()=>{o&&l(o)},[]);const[p,g]=react.exports.useState(""),[x,m]=react.exports.useState(!1),[j,b]=react.exports.useState([...a]),[h,f]=react.exports.useState(10);const S=react.exports.useRef();return react.exports.useEffect(()=>{var e=a["length"];const t=setTimeout(()=>m(!1),15<e?1e3:0);return()=>clearTimeout(t)},[j]),jsxRuntime.exports.jsxs("div",Object.assign({className:s.engineSelectionWrapper},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:s.enginSelectionHeader},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"h1",color:"secondary","data-test":"data-center-engine-selection-panel-header-title"},{children:e.name}))})),jsxRuntime.exports.jsx(EngineSearchInput,{disabled:a.length<4,onChange:({target:{value:s}})=>{if(g(s),f(10),!s)return b([...a]),m(!1);m(!0);var e=[...a].filter(e=>{const t=((null==e?void 0:e.name)||"").toLowerCase()+((null==e?void 0:e.description)||"").toLowerCase();return t.includes(s.toLowerCase().trim())});b(e)},value:p,isSearching:x}),jsxRuntime.exports.jsxs("div",Object.assign({className:s.engineListWrapper,onScroll:()=>{var e,t,s;S.current&&({scrollTop:e,scrollHeight:t,clientHeight:s}=S.current,t-500<=e+s&&(h>=j.length||f(e=>e+10)))},ref:S},{children:[!x&&j.slice(0,h>j.length?j.length:h).map(e=>{var t,s,n;return jsxRuntime.exports.jsx(Engine,{id:e.id,name:e.name,description:e.description,estimatedCost:"4.00",fields:(null==e?void 0:e.fields)||[],saved:(n=e.id,null===r||void 0===r?void 0:r.some(e=>e.id===n)),onSave:u,onDeselect:d,iconName:c,signedIconPath:null==e?void 0:e.signedIconPath,defaultConfiguration:(t=e.id,null==(s=null===o||void 0===o?void 0:o.find(e=>e.id===t))?void 0:s.fields),libraryRequired:e.libraryRequired,isEngineAvailable:i||0<(null==(s=e.standaloneJobTemplates)?void 0:s.length)},e.id)}),(x||h<j.length)&&jsxRuntime.exports.jsx(EngineSearchSkeleton,{}),!x&&0===j.length&&jsxRuntime.exports.jsx(EngineSearchEmptyState,{})]})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.footerActionButtons},{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:t},{children:SHARED_TEXT.cancel()})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:()=>{n(actions.processAiConfig.setConfigurations({capabilityId:e.id,selectedEngines:r})),null!=t&&t()},disabled:!(null!==o&&void 0!==o&&o.length||null!==r&&void 0!==r&&r.length)},{children:SHARED_TEXT.processAiAddEngines()}))]}))]}))},EngineSearchEmptyState=()=>{var e=useStyles()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.engineSearchEmptyState},{children:[jsxRuntime.exports.jsx("img",{src:img$t,alt:"Search empty state"}),jsxRuntime.exports.jsx(Typography$2,{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-dc-process-ai-search-engine-empty-state",defaultMessage:"No Engines Found",description:"Data Center Process Ai Empty State Message"})})]}))},EngineSearchSkeleton=()=>{const e=useStyles()["classes"];var t=()=>jsxRuntime.exports.jsxs("div",Object.assign({className:e.engineSearchSkeleton},{children:[jsxRuntime.exports.jsxs("div",Object.assign({style:{display:"flex",height:"150px",width:"100%",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(Skeleton,{animation:"wave",sx:{marginLeft:"20px"},width:"50px",height:"50px",variant:"circular"}),jsxRuntime.exports.jsx(Skeleton,{animation:"wave",sx:{marginLeft:"20px",transform:"none"},width:"70%",height:"40px"})]})),jsxRuntime.exports.jsx("div",Object.assign({style:{height:"50px",width:"100%"}},{children:jsxRuntime.exports.jsx(Skeleton,{animation:"wave",sx:{transform:"none",borderRadius:"0px"},width:"100%",height:"100%"})}))]}));return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(t,{}),jsxRuntime.exports.jsx(t,{}),jsxRuntime.exports.jsx(t,{})]})},EngineSearchInput=({value:e,onChange:t,isSearching:s,disabled:n})=>{var i=useStyles()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:i.engineSearchContainer+" "+(n?i.engineSearchDisabled:"")},{children:[jsxRuntime.exports.jsx(default_1$2,{className:i.engineSearchIcon}),jsxRuntime.exports.jsx("input",{placeholder:"Search Engines",value:e,onChange:t,className:i.engineSearchInput,disabled:n}),s&&jsxRuntime.exports.jsx("div",Object.assign({className:i.engineSearchLoader},{children:jsxRuntime.exports.jsx(CircularProgress,{size:15,thickness:6,sx:{color:"#a6a6a6"}})}))]}))},DataCenterEngineSelection=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getDataCenterProcessAIModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(EngineSelection,Object.assign({},e))})}))})}));export{DataCenterEngineSelection,DataCenterProcessAI};