aiware-js 1.0.0-master.1173 → 1.0.0-master.1174

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js-core.esm19.js CHANGED
@@ -1 +1 @@
1
- import{aq as unmountPanel$1,a2 as hidePanel$1,dX as unmountAllPanel$1,dY as getUniqueID,ar as mountPanel$1,bL as AvailableWidgets,bK as updatePanelMicroFrontendProps,dZ as mountWidget,d_ as unmountWidget,d$ as updateTokenRequest,e0 as HelpCenter,D as takeEvery$1,e1 as mountPanelForResponse$1,e2 as DataCenter,E as select}from"./js-core.esm.js";import{s as setData,b as logout,u as updateActivityStatus}from"./js-core.esm4.js";import{setCustomKnowledgeBaseUrl,setCustomDocsUrl,updateSelectedTab}from"./js-core.esm20.js";import"./js-core.esm5.js";import"./js-core.esm7.js";class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter,createAuthHelpers=t=>({updateToken(e){e?t.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{t.dispatch(logout())},1e3)):t.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&t.dispatch(updateActivityStatus())}}),helpCenter=()=>{var e=new HelpCenter({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}},dataCenter=()=>{var e=new DataCenter;return{openImporterPanel:e.openImporterPanel.bind(e)}},unmountPanel=t=>e=>(t.dispatch(unmountPanel$1(e)),!0),hidePanel=t=>e=>(t.dispatch(hidePanel$1(e)),!0),unmountAllPanel=e=>()=>{e.dispatch(unmountAllPanel$1(""))},mountPanel=s=>(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:a}=e;s.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:a}));const o=[...(null==(e=null==a?void 0:a.header)?void 0:e.actions)||[],...(null==(e=null==a?void 0:a.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);a={id:n,sagas:[function*(){yield takeEvery$1(o.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return s.addModule(a),n},mountPanelForResponse=t=>e=>mountPanelForResponse$1(e,t),attachSdkToWindow=e=>{var{init:e,store:t,aiwareEvents:n,bootstrapOptions:a}=e;!window||void 0!==window.aiware&&0!==Object.keys(window.aiware).length||(window.aiware={init:e,store:t,auth:createAuthHelpers(t),helpCenter:helpCenter(),dataCenter:dataCenter(),on:n.on,off:n.off,hidePanel:hidePanel(t),unmountPanel:unmountPanel(t),mountPanel:mountPanel(t),mountPanelForResponse:mountPanelForResponse(t),registry:a.registry,registryLookup:a.registryLookup,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,unmountWidget:unmountWidget,commit:"0b8bfac43b"})};export{attachSdkToWindow,hidePanel,mountPanel,unmountAllPanel,unmountPanel};
1
+ import{aq as unmountPanel$1,a2 as hidePanel$1,dX as unmountAllPanel$1,dY as getUniqueID,ar as mountPanel$1,bL as AvailableWidgets,bK as updatePanelMicroFrontendProps,dZ as mountWidget,d_ as unmountWidget,d$ as updateTokenRequest,e0 as HelpCenter,D as takeEvery$1,e1 as mountPanelForResponse$1,e2 as DataCenter,E as select}from"./js-core.esm.js";import{s as setData,b as logout,u as updateActivityStatus}from"./js-core.esm4.js";import{setCustomKnowledgeBaseUrl,setCustomDocsUrl,updateSelectedTab}from"./js-core.esm20.js";import"./js-core.esm5.js";import"./js-core.esm7.js";class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter,createAuthHelpers=t=>({updateToken(e){e?t.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{t.dispatch(logout())},1e3)):t.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&t.dispatch(updateActivityStatus())}}),helpCenter=()=>{var e=new HelpCenter({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}},dataCenter=()=>{var e=new DataCenter;return{openImporterPanel:e.openImporterPanel.bind(e)}},unmountPanel=t=>e=>(t.dispatch(unmountPanel$1(e)),!0),hidePanel=t=>e=>(t.dispatch(hidePanel$1(e)),!0),unmountAllPanel=e=>()=>{e.dispatch(unmountAllPanel$1(""))},mountPanel=s=>(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:a}=e;s.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:a}));const o=[...(null==(e=null==a?void 0:a.header)?void 0:e.actions)||[],...(null==(e=null==a?void 0:a.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);a={id:n,sagas:[function*(){yield takeEvery$1(o.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return s.addModule(a),n},mountPanelForResponse=t=>e=>mountPanelForResponse$1(e,t),attachSdkToWindow=e=>{var{init:e,store:t,aiwareEvents:n,bootstrapOptions:a}=e;!window||void 0!==window.aiware&&0!==Object.keys(window.aiware).length||(window.aiware={init:e,store:t,auth:createAuthHelpers(t),helpCenter:helpCenter(),dataCenter:dataCenter(),on:n.on,off:n.off,hidePanel:hidePanel(t),unmountPanel:unmountPanel(t),mountPanel:mountPanel(t),mountPanelForResponse:mountPanelForResponse(t),registry:a.registry,registryLookup:a.registryLookup,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,unmountWidget:unmountWidget,commit:"09723f8a92"})};export{attachSdkToWindow,hidePanel,mountPanel,unmountAllPanel,unmountPanel};
Binary file
package/js-core.esm67.js CHANGED
@@ -39,4 +39,4 @@ import{Y as createSlice,Z as combineReducers,j as jsxRuntime,bT as AIWareCachePr
39
39
  slug
40
40
  }
41
41
  }
42
- `;try{var n=yield gqlIntrospection.queryParser(s,l,o);let e=o;null!=n&&n.query&&(e=null==n?void 0:n.query);var{data:r,errors:i}=yield baseGraphQLApi({query:e,graphEndpoint:s,token:l,operationName:t,variables:{querySlug:a,input:{enabled:!0,name:c.name,slug:c.slug,buttonColor:c.buttonColor,buttonTextColor:c.buttonTextColor,logo:c.logo}},extraHeaders:void 0});if(!i&&r&&(null===(null==r?void 0:r.updateInstanceLoginConfiguration)||null!=r&&r.updateInstanceLoginConfiguration))return r.updateInstanceLoginConfiguration;throw new Error("Updating API Custom Login Configuration failed. Please try again later")}catch(e){return devErrorLogger(JSON.stringify(e)),e}});function*fetchCustomLoginConfigSaga(e){let t=null;try{var{graphQLEndpoint:o,token:n}=yield select(selectApiConfigs),r=e.payload.orgId;if(r){var i=yield call$f(fetchCustomLoginConfig,r,o,n);if((t=i)instanceof Error)throw new Error(t.message);yield put(actions$2.fetchLoginConfigSuccess(t))}}catch(e){yield put(actions$2.fetchLoginConfigFailure()),yield put(showMessage({content:"Failed to fetch Custom Login for Organization.",severity:MessageSeverity.Error}))}}function*updateCustomLoginConfigSaga(e){try{var{graphQLEndpoint:t,token:o}=yield select(selectApiConfigs),n=yield select(selectQuerySlug),r=yield select(selectLoginOrgID),i=yield select(selectBasicInfoStep),a=yield select(selectConfigurationStep),s={name:i.loginName||"",slug:i.urlSlug,logo:i.logoUrl||"",buttonColor:a.buttonColor,buttonTextColor:a.buttonTextColor,enabled:!0};let e;if(r&&(e=yield call$f(updateCustomLoginConfig,r,t,o,s)),r||n||(e=yield call$f(createInstanceLoginConfig,t,o,s)),(e=!r&&n?yield call$f(updateInstanceLoginConfig,n,t,o,s):e)instanceof Error)throw new Error(e.message);yield put(actions$2.updateLoginConfigSuccess()),r&&(yield put(showMessage({content:"Custom Login Updated!",severity:MessageSeverity.Success})),yield put(actions$2.fetchLoginConfigStart({orgId:r||void 0}))),r||n||(yield put(showMessage({content:"Instance Login Created!",severity:MessageSeverity.Success})),yield put({type:"ADMIN_CENTER_CUSTOM_LOGIN_PANEL_RESPONSE",payload:!0})),!r&&n&&(yield put(showMessage({content:"Instance Login Updated!",severity:MessageSeverity.Success})),yield put({type:"ADMIN_CENTER_CUSTOM_LOGIN_PANEL_RESPONSE",payload:!0}))}catch(e){i=yield select(selectLoginOrgID);console.error("error:",e),yield put(actions$2.updateLoginConfigFailure()),yield put(showMessage({content:"Failed to update Custom Login for Organization.",severity:MessageSeverity.Error})),i||(yield put({type:"ADMIN_CENTER_CUSTOM_LOGIN_PANEL_RESPONSE",payload:!1}))}}function*deleteCustomLoginConfigSaga(e){try{var{graphQLEndpoint:t,token:o}=yield select(selectApiConfigs),n=yield select(selectLoginOrgID),r=yield call$f(deleteCustomLoginConfig,n,t,o);if(r instanceof Error)throw new Error(r.message);yield put(actions$2.deleteLoginConfigSuccess()),yield put(showMessage({content:"Custom Login Deleted",severity:MessageSeverity.Success})),yield put(actions$2.fetchLoginConfigStart({}))}catch(e){console.error("error:",e),yield put(actions$2.deleteLoginConfigFailure()),yield put(showMessage({content:"Failed to delete Custom Login for Organization.",severity:MessageSeverity.Error}))}}function*fetchCustomLoginConfigWatcher(){yield takeLatest$1(actions$2.fetchLoginConfigStart.type,fetchCustomLoginConfigSaga)}function*updateCustomLoginConfigWatcher(){yield takeLatest$1(actions$2.updateLoginConfigStart.type,updateCustomLoginConfigSaga)}function*deleteCustomLoginConfigWatcher(){yield takeLatest$1(actions$2.deleteLoginConfigStart.type,deleteCustomLoginConfigSaga)}function*rootSaga(){yield all([fetchCustomLoginConfigWatcher(),updateCustomLoginConfigWatcher(),deleteCustomLoginConfigWatcher()])}function getAdminCenterCustomLoginModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const SHARED_TEXT={title:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.title",defaultMessage:"Custom Login",description:"Admin Center Custom Login Title"}),subTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.sub-title",defaultMessage:"Create a custom branded login for users of this Organization.",description:"Admin Center Custom Login Subtitle"}),panel:{createTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.panel.create-title",defaultMessage:"New Login",description:"Admin Center Custom Login Panel Create Title"}),editTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.panel.edit-title",defaultMessage:"Edit Login",description:"Admin Center Custom Login Panel Edit Title"})},emptyState:{title:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.empty-state.title",defaultMessage:"No Custom Login Found",description:"Admin Center custom login table empty state"}),description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.empty-state.description",defaultMessage:"You haven’t created a custom login for this Organization",description:"Admin Center custom login table empty state"}),createButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.empty-state.create-button",defaultMessage:"Create Custom Login",description:"Admin Center custom login table empty state"})},basicInfoStep:{description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.description",defaultMessage:"Create a custom branded login page for this organization, with a didicated domain for users to access their aiWARE account.",description:"Admin Center Custom Login Basic Info Step Description"}),customUrlSlugTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.custom-url-slug-title",defaultMessage:"Custom Login URL Slug",description:"Admin Center Custom Login Basic Info Step Custom URL Slug Title"}),customUrlSlugDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.custom-url-slug-description",defaultMessage:"Type in the slug name that will be added to your login url. (Field is required)",description:"Admin Center Custom Login Basic Info Step Custom URL Slug Description"}),brandLogoTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.brand-logo-title",defaultMessage:"Brand Logo",description:"Admin Center Custom Login Basic Info Step Brand Logo Title"}),brandLogoDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.brand-logo-description",defaultMessage:"This logo will be used on your login page. ",description:"Admin Center Custom Login Basic Info Step Brand Logo Description"}),loginNameInputPlaceholder:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.login-name-input-placeholder",defaultMessage:"Login Name",description:"Admin Center Custom Login Basic Info Step Login Name Input Placeholder"}),cancelBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.cancel-btn",defaultMessage:"Cancel",description:"Admin Center Custom Login Basic Info Step Cancel Button"}),saveBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.save-btn",defaultMessage:"Save",description:"Admin Center Custom Login Basic Info Step Save Button"}),nextBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.next-btn",defaultMessage:"Next",description:"Admin Center Custom Login Basic Info Step Next Button"}),customUrlSlugError:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.custom-url-slug-error",defaultMessage:"Please enter a valid URL slug",description:"Admin Center Custom Login Basic Info Step Custom URL Slug Error"}),showMeLink:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.show-me-link",defaultMessage:"Show me",description:"Admin Center Custom Login Basic Info Step Show Me Link"})},configurationStep:{title:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.configuration-step.title",defaultMessage:"Customize Colors",description:"Admin Center Custom Login Configuration Step Title"}),description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.configuration-step.description",defaultMessage:"Change the primary and secondary colors of the login and sign up pages to match your brand.",description:"Admin Center Custom Login Configuration Step Description"}),backBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.configuration-step.back-btn",defaultMessage:"Back",description:"Admin Center Custom Login Configuration Step Back Button"}),createBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.configuration-step.create-btn",defaultMessage:"Create",description:"Admin Center Custom Login Configuration Step Create Button"})}},formattedMessages=e=>({loginNamePlaceholder:e.formatMessage({id:"os-admin-center-custom-login.basic-info-step.login-name-input-placeholder",defaultMessage:[{type:0,value:"Login Name"}]}),customLoginUrlSlugPlaceholder:e.formatMessage({id:"os-admin-center-custom-login.basic-info-step.custom-url-slug-placeholder",defaultMessage:[{type:0,value:"login.veritone.com/"}]})});var activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,objectDefineProperties={},DESCRIPTORS$3=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$7=anObject$a,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn$4=(objectDefineProperties.f=DESCRIPTORS$3&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$7(e);for(var o,n=toIndexedObject$1(t),r=objectKeys(t),i=r.length,a=0;a<i;)definePropertyModule.f(e,o=r[a++],n[o]);return e},getBuiltIn$7),html$2=getBuiltIn$7("document","documentElement"),anObject$6=anObject$a,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html$1=html$2,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$1.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 o;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$6(e),o=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,o[IE_PROTO$1]=e):o=NullProtoObject(),void 0===t?o:definePropertiesModule.f(o,t)}),wellKnownSymbol$c=wellKnownSymbol$e,create$1=objectCreate,defineProperty$3=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$c("unscopables"),ArrayPrototype$1=Array.prototype,addToUnscopables$1=(null==ArrayPrototype$1[UNSCOPABLES]&&defineProperty$3(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0}),iterators={},fails$3=fails$d,correctPrototypeGetter=!fails$d(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$3=hasOwnProperty_1,isCallable$a=isCallable$l,toObject=toObject$3,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){var t,e=toObject(e);return hasOwn$3(e,IE_PROTO)?e[IE_PROTO]:(t=e.constructor,isCallable$a(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null)},fails$2=fails$d,isCallable$9=isCallable$l,isObject$2=isObject$8,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$3=defineBuiltIn$5,wellKnownSymbol$b=wellKnownSymbol$e,ITERATOR$5=wellKnownSymbol$e("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),!isObject$2(IteratorPrototype$2)||fails$2(function(){var e={};return IteratorPrototype$2[ITERATOR$5].call(e)!==e})),iteratorsCore=(isCallable$9((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$5])||defineBuiltIn$3(IteratorPrototype$2,ITERATOR$5,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$2=objectDefineProperty.f,hasOwn$2=hasOwnProperty_1,wellKnownSymbol$a=wellKnownSymbol$e,TO_STRING_TAG$3=wellKnownSymbol$e("toStringTag"),setToStringTag$3=function(e,t,o){(e=e&&!o?e.prototype:e)&&!hasOwn$2(e,TO_STRING_TAG$3)&&defineProperty$2(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$2=setToStringTag$3,Iterators$4=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,o,n){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor(+!n,o)}),setToStringTag$2(e,t,!1),Iterators$4[t]=returnThis$1,e},uncurryThis$5=functionUncurryThis,aCallable$6=aCallable$8,functionUncurryThisAccessor=function(e,t,o){try{return uncurryThis$5(aCallable$6(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}},isCallable$8=isCallable$l,$String$1=String,$TypeError$6=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$8(e))return e;throw $TypeError$6("Can't set "+$String$1(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$5=anObject$a,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var o,n=!1,e={};try{(o=uncurryThisAccessor(Object.prototype,"__proto__","set"))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return anObject$5(e),aPossiblePrototype(t),n?o(e,t):e.__proto__=t,e}}():void 0),$$7=_export,call$8=functionCall,FunctionName=functionName,isCallable$7=isCallable$l,createIteratorConstructor=iteratorCreateConstructor,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$1=setToStringTag$3,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$5,wellKnownSymbol$9=wellKnownSymbol$e,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol$9("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,o,n,r,i,a){createIteratorConstructor(o,t,n);function s(e){if(e===r&&p)return p;if(!BUGGY_SAFARI_ITERATORS&&e in $)return $[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new o(this,e)}}return function(){return new o(this)}}var l,c,n=t+" Iterator",u=!1,$=e.prototype,d=$[ITERATOR$4]||$["@@iterator"]||r&&$[r],p=!BUGGY_SAFARI_ITERATORS&&d||s(r),g="Array"==t&&$.entries||d;if(g&&(g=getPrototypeOf(g.call(new e)))!==Object.prototype&&g.next&&(getPrototypeOf(g)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(g,IteratorPrototype):isCallable$7(g[ITERATOR$4])||defineBuiltIn$2(g,ITERATOR$4,returnThis)),setToStringTag$1(g,n,!0)),PROPER_FUNCTION_NAME&&r==VALUES&&d&&d.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1($,"name",VALUES):(u=!0,p=function(){return call$8(d,this)})),r)if(l={values:s(VALUES),keys:i?p:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in $||defineBuiltIn$2($,c,l[c]);else $$7({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return $[ITERATOR$4]!==p&&defineBuiltIn$2($,ITERATOR$4,p,{name:r}),Iterators$3[t]=p,l},createIterResultObject$1=function(e,t){return{value:e,done:t}},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators$2=iterators,InternalStateModule$1=internalState,defineProperty$1=objectDefineProperty.f,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$1,DESCRIPTORS$2=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$1=InternalStateModule$1.set,getInternalState=InternalStateModule$1.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,o=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject(void 0,!0)):createIterResultObject("keys"==o?n:"values"==o?t[n]:[n,t[n]],!1)},"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS$2&&"values"!==values.name)try{defineProperty$1(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$7=global$h,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$8=wellKnownSymbol$e,ITERATOR$3=wellKnownSymbol$8("iterator"),TO_STRING_TAG$2=wellKnownSymbol$8("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR$3]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR$3,ArrayValues)}catch(e){t[ITERATOR$3]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var o in ArrayIteratorMethods)if(t[o]!==ArrayIteratorMethods[o])try{createNonEnumerableProperty(t,o,ArrayIteratorMethods[o])}catch(e){t[o]=ArrayIteratorMethods[o]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$7[COLLECTION_NAME]&&global$7[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var EmptyStringDescriptionStore,SymbolWrapper,NATIVE_SYMBOL,thisSymbolValue,symbolDescriptiveString,regexp,replace,stringSlice,wellKnownSymbol$7=wellKnownSymbol$e,TO_STRING_TAG$1=wellKnownSymbol$e("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$1]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$6=isCallable$l,classofRaw$1=classofRaw$2,wellKnownSymbol$6=wellKnownSymbol$e,TO_STRING_TAG=wellKnownSymbol$e("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw$1(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$4=TO_STRING_TAG_SUPPORT?classofRaw$1:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw$1(e):"Object"==(t=classofRaw$1(e))&&isCallable$6(e.callee)?"Arguments":t},classof$3=classof$4,$String=String,toString$1=function(e){if("Symbol"===classof$3(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},makeBuiltIn=makeBuiltIn$3.exports,defineProperty=objectDefineProperty,defineBuiltInAccessor$2=function(e,t,o){return o.get&&makeBuiltIn(o.get,t,{getter:!0}),o.set&&makeBuiltIn(o.set,t,{setter:!0}),defineProperty.f(e,t,o)},$$6=_export,DESCRIPTORS$1=descriptors,global$6=global$h,uncurryThis$4=functionUncurryThis,hasOwn$1=hasOwnProperty_1,isCallable$5=isCallable$l,isPrototypeOf$2=objectIsPrototypeOf,toString=toString$1,defineBuiltInAccessor$1=defineBuiltInAccessor$2,copyConstructorProperties=copyConstructorProperties$2,NativeSymbol=global$h.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype;!DESCRIPTORS$1||!isCallable$5(NativeSymbol)||"description"in SymbolPrototype&&void 0===NativeSymbol().description||(EmptyStringDescriptionStore={},copyConstructorProperties(SymbolWrapper=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:toString(arguments[0]),t=isPrototypeOf$2(SymbolPrototype,this)?new NativeSymbol(e):void 0===e?NativeSymbol():NativeSymbol(e);return""===e&&(EmptyStringDescriptionStore[t]=!0),t},NativeSymbol),(SymbolWrapper.prototype=SymbolPrototype).constructor=SymbolWrapper,NATIVE_SYMBOL="Symbol(test)"==String(NativeSymbol("test")),thisSymbolValue=uncurryThis$4(SymbolPrototype.valueOf),symbolDescriptiveString=uncurryThis$4(SymbolPrototype.toString),regexp=/^Symbol\((.*)\)[^)]+$/,replace=uncurryThis$4("".replace),stringSlice=uncurryThis$4("".slice),defineBuiltInAccessor$1(SymbolPrototype,"description",{configurable:!0,get:function(){var e=thisSymbolValue(this);return hasOwn$1(EmptyStringDescriptionStore,e)?"":(e=symbolDescriptiveString(e),""===(e=NATIVE_SYMBOL?stringSlice(e,7,-1):replace(e,regexp,"$1"))?void 0:e)}}),$$6({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper}));const{TableInfiniteScroll}=tableInfiniteScroll["jsx"],itemHeight=60,LoginTable=()=>{const o=useDispatch(),n=useSelector(selectIsFullscreenEnabled),[e,r]=react.exports.useState(!1),[t,i]=react.exports.useState(null),[a,s]=react.exports.useState(!1),l=useSelector(selectAdminCenterOrgId);var c=useSelector(selectCustomLoginConfig),c=c?[c]:[],u=useSelector(selectCustomLoginConfigStatus),$="pending"===u,u="failure"===u;return jsxRuntime.exports.jsxs(Box,Object.assign({height:"500px"},{children:[jsxRuntime.exports.jsx(TableInfiniteScroll,{hasMore:!1,fetchMore:()=>{o(actions$2.fetchLoginConfigStart({orgId:l}))},fetchOnMount:0===c.length,offset:0,items:c,itemHeight:itemHeight,isLoading:$,error:u,TableHeaderComponent:jsxRuntime.exports.jsx(CustomLoginTableHeader,{}),TableRowComponent:({item:t,index:e})=>jsxRuntime.exports.jsx(CustomLoginTableRow,{index:e,onEdit:()=>{var e;e=t,o(mountPanel({panelId:CUSTOM_LOGIN_PANEL_ID,microFrontend:{name:CUSTOM_LOGIN_PANEL_ID,config:{customLoginId:e.name,isFullScreen:n,orgId:l}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:n?0:55,marginStart:n?0:80,size:"medium",parentPanelId:"ADMIN_CENTER",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))},onPreview:()=>{return e=t,i(e),void r(!0);var e},onDelete:()=>{return e=t,s(!0),void i(e);var e},buttonColor:t.buttonColor,buttonTextColor:t.buttonTextColor,logoUrl:t.logo,name:t.name,slug:t.slug,enabled:t.enabled,testId:TEST_ID}),TableEmptyStateComponent:jsxRuntime.exports.jsx(LoginEmptyState,{}),testId:TEST_ID}),jsxRuntime.exports.jsx(CustomLoginPreviewModal,Object.assign({},{onClose:()=>r(!1),isOpen:e,buttonTextColor:(null===t||void 0===t?void 0:t.buttonTextColor)||"",buttonColor:(null===t||void 0===t?void 0:t.buttonColor)||"",logoUrl:(null===t||void 0===t?void 0:t.logo)||""})),jsxRuntime.exports.jsx(DeleteModal,{isOpen:a,onClose:()=>s(!1),onConfirmDelete:()=>{o(actions$2.deleteLoginConfigStart())}})]}))},LoginEmptyState=()=>{const e=useDispatch(),t=useSelector(selectIsFullscreenEnabled);return jsxRuntime.exports.jsx(EmptyState,{title:SHARED_TEXT.emptyState.title(),description:SHARED_TEXT.emptyState.description(),buttonLabel:SHARED_TEXT.emptyState.createButton(),onClick:()=>{e(mountPanel({panelId:CUSTOM_LOGIN_PANEL_ID,microFrontend:{name:CUSTOM_LOGIN_PANEL_ID,config:{customLoginId:null,isFullScreen:t}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:t?0:55,marginStart:t?0:80,size:"medium",parentPanelId:"ADMIN_CENTER",dimmed:0,dimmedStatus:"dimParent"}}))}})},DeleteModal=({onConfirmDelete:e,isOpen:t,onClose:o})=>{return jsxRuntime.exports.jsx(ConfirmDialog,{testId:TEST_ID,title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login-delete-modal-title",defaultMessage:"Delete this Custom Login",description:"Admin Center Custom Login Delete Modal Title"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login-delete-modal-body",defaultMessage:"Deleting this Custom Login Configuration will revert the login page to the default logo and colors. This action is permanent and cannot be undone.",description:"Admin Center Custom Login Delete Modal body"}),isOpen:t,onClose:o,onConfirm:()=>{o(),e()},confirmLabel:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login-delete-modal-button-confirm-delete",defaultMessage:"Confirm Delete",description:"Admin Center Custom Login Delete Modal button confirm delete"}),cancelLabel:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login-delete-modal-button-go-back",defaultMessage:"Go Back",description:"Admin Center Custom Login Delete Modal button go back"})})},{CenterTabHeading,CenterTabContainer,CenterTabContent}=centerComponents,MainLayout=()=>jsxRuntime.exports.jsxs(CenterTabContainer,Object.assign({testId:TEST_ID},{children:[jsxRuntime.exports.jsx(CenterTabHeading,{title:SHARED_TEXT.title(),subtitle:SHARED_TEXT.subTitle(),testId:TEST_ID}),jsxRuntime.exports.jsx(CenterTabContent,Object.assign({testId:TEST_ID},{children:jsxRuntime.exports.jsx(LoginTable,{})}))]})),CustomLoginTab=()=>jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterCustomLoginModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(MainLayout,{})})}))})});var $location,defer,channel,port,toggle,node,promise,then,queue,flush,notify$1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,classof$2=classofRaw$2,engineIsNode="undefined"!=typeof process&&"process"==classofRaw$2(process),getBuiltIn$3=getBuiltIn$7,defineBuiltInAccessor=defineBuiltInAccessor$2,wellKnownSymbol$5=wellKnownSymbol$e,DESCRIPTORS=descriptors,SPECIES$2=wellKnownSymbol$e("species"),setSpecies$1=function(e){e=getBuiltIn$3(e);DESCRIPTORS&&e&&!e[SPECIES$2]&&defineBuiltInAccessor(e,SPECIES$2,{configurable:!0,get:function(){return this}})},isPrototypeOf$1=objectIsPrototypeOf,$TypeError$5=TypeError,anInstance$1=function(e,t){if(isPrototypeOf$1(t,e))return e;throw $TypeError$5("Incorrect invocation")},uncurryThis$3=functionUncurryThis,fails$1=fails$d,isCallable$4=isCallable$l,classof$1=classof$4,getBuiltIn$2=getBuiltIn$7,inspectSource$1=inspectSource$3,noop=function(){},empty=[],construct=getBuiltIn$7("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=uncurryThis$3(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$4(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$4(e))return!1;switch(classof$1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource$1(e))}catch(e){return!0}},isConstructor$1=(isConstructorLegacy.sham=!0,!construct||fails$1(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isConstructor=isConstructor$1,tryToString$2=tryToString$4,$TypeError$4=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw $TypeError$4(tryToString$2(e)+" is not a constructor")},anObject$4=anObject$a,aConstructor=aConstructor$1,isNullOrUndefined$1=isNullOrUndefined$4,wellKnownSymbol$4=wellKnownSymbol$e,SPECIES$1=wellKnownSymbol$e("species"),speciesConstructor$1=function(e,t){var e=anObject$4(e).constructor;return void 0===e||isNullOrUndefined$1(e=anObject$4(e)[SPECIES$1])?t:aConstructor(e)},NATIVE_BIND$1=functionBindNative,FunctionPrototype=Function.prototype,apply$1=FunctionPrototype.apply,call$7=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$1?call$7.bind(apply$1):function(){return call$7.apply(apply$1,arguments)}),classofRaw=classofRaw$2,uncurryThis$2=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw(e))return uncurryThis$2(e)},uncurryThis$1=functionUncurryThisClause,aCallable$5=aCallable$8,NATIVE_BIND=functionBindNative,bind$4=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$5(e),void 0===t?e:NATIVE_BIND?bind$4(e,t):function(){return e.apply(t,arguments)}},uncurryThis=functionUncurryThis,arraySlice$1=functionUncurryThis([].slice),$TypeError$3=TypeError,validateArgumentsLength$1=function(e,t){if(e<t)throw $TypeError$3("Not enough arguments");return e},userAgent$2=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2),global$5=global$h,apply=functionApply,bind$3=functionBindContext,isCallable$3=isCallable$l,hasOwn=hasOwnProperty_1,fails=fails$d,html=html$2,arraySlice=arraySlice$1,createElement=documentCreateElement$2,validateArgumentsLength=validateArgumentsLength$1,IS_IOS$1=engineIsIos,IS_NODE$3=engineIsNode,set=global$5.setImmediate,clear=global$5.clearImmediate,process$3=global$5.process,Dispatch=global$5.Dispatch,Function$1=global$5.Function,MessageChannel=global$5.MessageChannel,String$1=global$5.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange",run=(fails(function(){$location=global$5.location}),function(e){var t;hasOwn(queue$2,e)&&(t=queue$2[e],delete queue$2[e],t())}),runner=function(e){return function(){run(e)}},eventListener=function(e){run(e.data)},globalPostMessageDefer=function(e){global$5.postMessage(String$1(e),$location.protocol+"//"+$location.host)},task$1=(set&&clear||(set=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable$3(e)?e:Function$1(e),o=arraySlice(arguments,1);return queue$2[++counter]=function(){apply(t,void 0,o)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$3?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$3(port.postMessage,port)):global$5.addEventListener&&isCallable$3(global$5.postMessage)&&!global$5.importScripts&&$location&&"file:"!==$location.protocol&&!fails(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$5.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)}),{set:set,clear:clear}),Queue$2=function(){this.head=null,this.tail=null},queue$1=(Queue$2.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},Queue$2),userAgent$1=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$1)&&"undefined"!=typeof Pebble,userAgent=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent),global$4=global$h,bind$2=functionBindContext,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$2=engineIsNode,MutationObserver=global$4.MutationObserver||global$4.WebKitMutationObserver,document$2=global$4.document,process$2=global$4.process,Promise$1=global$4.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor(global$4,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,microtask_1=(microtask$1||(queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$2&&(e=process$2.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&&notify$1(),e}e&&e.enter()},notify$1=IS_IOS||IS_NODE$2||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$2(promise.then,promise),function(){then(flush)}):IS_NODE$2?function(){process$2.nextTick(flush)}:(macrotask=bind$2(macrotask,global$4),function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}),microtask$1),hostReportErrors$1=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$3=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$3=global$h,promiseNativeConstructor=global$h.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$1=engineIsNode,engineIsBrowser=!engineIsDeno&&!engineIsNode&&"object"==typeof window&&"object"==typeof document,global$2=global$h,NativePromiseConstructor$3=promiseNativeConstructor,isCallable$2=isCallable$l,isForced=isForced_1,inspectSource=inspectSource$3,wellKnownSymbol$3=wellKnownSymbol$e,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,SPECIES=(NativePromiseConstructor$3&&NativePromiseConstructor$3.prototype,wellKnownSymbol$3("species")),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$2(global$2.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",function(){var e=inspectSource(NativePromiseConstructor$3),t=e!==String(NativePromiseConstructor$3);if(!t&&66===V8_VERSION)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){function o(e){e(function(){},function(){})}e=new NativePromiseConstructor$3(function(e){e(1)});if((e.constructor={})[SPECIES]=o,!(SUBCLASSING=e.then(function(){})instanceof o))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1}),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$4=aCallable$8,$TypeError$2=TypeError,PromiseCapability=function(e){var o,n;this.promise=new e(function(e,t){if(void 0!==o||void 0!==n)throw $TypeError$2("Bad Promise constructor");o=e,n=t}),this.resolve=aCallable$4(o),this.reject=aCallable$4(n)},$$5=(newPromiseCapability$2.f=function(e){return new PromiseCapability(e)},_export),IS_NODE=engineIsNode,global$1=global$h,call$6=functionCall,defineBuiltIn$1=defineBuiltIn$5,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$3,setSpecies=setSpecies$1,aCallable$3=aCallable$8,isCallable$1=isCallable$l,isObject$1=isObject$8,anInstance=anInstance$1,speciesConstructor=speciesConstructor$1,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$2=perform$3,Queue=queue$1,InternalStateModule=internalState,NativePromiseConstructor$2=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$3=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=PromiseConstructorDetection.SUBCLASSING,getInternalPromiseState=InternalStateModule.getterFor(PROMISE),setInternalState=InternalStateModule.set,NativePromisePrototype$1=NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype,PromiseConstructor=NativePromiseConstructor$2,PromisePrototype=NativePromisePrototype$1,TypeError$1=global$1.TypeError,document$1=global$1.document,process$1=global$1.process,newPromiseCapability$1=newPromiseCapabilityModule$3.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$1(e)||!isCallable$1(t=e.then))&&t},callReaction=function(e,t){var o,n,r,i=t.value,a=t.state==FULFILLED,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?o=i:(u&&u.enter(),o=s(i),u&&(u.exit(),r=!0)),o===e.promise?c(TypeError$1("Promise-chain cycle")):(n=isThenable(o))?call$6(n,o,l,c):l(o)):c(i)}catch(e){u&&!r&&u.exit(),c(e)}},notify=function(o,n){o.notified||(o.notified=!0,microtask(function(){for(var e,t=o.reactions;e=t.get();)callReaction(e,o);o.notified=!1,n&&!o.rejection&&onUnhandled(o)}))},dispatchEvent=function(e,t,o){var n;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=o,n.initEvent(e,!1,!0),global$1.dispatchEvent(n)):n={promise:t,reason:o},!NATIVE_PROMISE_REJECTION_EVENT&&(t=global$1["on"+e])?t(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",o)},onUnhandled=function(n){call$6(task,global$1,function(){var e=n.facade,t=n.value,o=isUnhandled(n);if(o&&(o=perform$2(function(){IS_NODE?process$1.emit("unhandledRejection",t,e):dispatchEvent(UNHANDLED_REJECTION,e,t)}),n.rejection=IS_NODE||isUnhandled(n)?UNHANDLED:HANDLED,o.error))throw o.value})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(t){call$6(task,global$1,function(){var e=t.facade;IS_NODE?process$1.emit("rejectionHandled",e):dispatchEvent(REJECTION_HANDLED,e,t.value)})},bind$1=function(t,o,n){return function(e){t(o,e,n)}},internalReject=function(e,t,o){e.done||(e.done=!0,(e=o?o:e).value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(o,e,t){if(!o.done){o.done=!0,t&&(o=t);try{if(o.facade===e)throw TypeError$1("Promise can't be resolved itself");var n=isThenable(e);n?microtask(function(){var t={done:!1};try{call$6(n,e,bind$1(internalResolve,t,o),bind$1(internalReject,t,o))}catch(e){internalReject(t,e,o)}}):(o.value=e,o.state=FULFILLED,notify(o,!1))}catch(e){internalReject({done:!1},e,o)}}};if(FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance(this,PromisePrototype),aCallable$3(e),call$6(Internal,this);var t=getInternalPromiseState(this);try{e(bind$1(internalResolve,t),bind$1(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$1(PromisePrototype,"then",function(e,t){var o=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return o.parent=!0,n.ok=!isCallable$1(e)||e,n.fail=isCallable$1(t)&&t,n.domain=IS_NODE?process$1.domain:void 0,o.state==PENDING?o.reactions.add(n):microtask(function(){callReaction(n,o)}),n.promise}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$1(internalResolve,t),this.reject=bind$1(internalReject,t)},newPromiseCapabilityModule$3.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable$1(NativePromiseConstructor$2))&&NativePromisePrototype$1!==Object.prototype){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$1(NativePromisePrototype$1,"then",function(e,t){var o=this;return new PromiseConstructor(function(e,t){call$6(nativeThen,o,e,t)}).then(e,t)},{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}setPrototypeOf&&setPrototypeOf(NativePromisePrototype$1,PromisePrototype)}$$5({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE);var wellKnownSymbol$2=wellKnownSymbol$e,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$e("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype[ITERATOR$2]===e)},classof=classof$4,getMethod$1=getMethod$3,isNullOrUndefined=isNullOrUndefined$4,Iterators=iterators,wellKnownSymbol$1=wellKnownSymbol$e,ITERATOR$1=wellKnownSymbol$e("iterator"),getIteratorMethod$2=function(e){if(!isNullOrUndefined(e))return getMethod$1(e,ITERATOR$1)||getMethod$1(e,"@@iterator")||Iterators[classof(e)]},call$5=functionCall,aCallable$2=aCallable$8,anObject$3=anObject$a,tryToString$1=tryToString$4,getIteratorMethod$1=getIteratorMethod$2,$TypeError$1=TypeError,getIterator$1=function(e,t){var o=arguments.length<2?getIteratorMethod$1(e):t;if(aCallable$2(o))return anObject$3(call$5(o,e));throw $TypeError$1(tryToString$1(e)+" is not iterable")},call$4=functionCall,anObject$2=anObject$a,getMethod=getMethod$3,iteratorClose$1=function(e,t,o){var n,r;anObject$2(e);try{if(!(n=getMethod(e,"return"))){if("throw"===t)throw o;return o}n=call$4(n,e)}catch(e){r=!0,n=e}if("throw"===t)throw o;if(r)throw n;return anObject$2(n),o},bind=functionBindContext,call$3=functionCall,anObject$1=anObject$a,tryToString=tryToString$4,isArrayIteratorMethod=isArrayIteratorMethod$1,lengthOfArrayLike=lengthOfArrayLike$2,isPrototypeOf=objectIsPrototypeOf,getIterator=getIterator$1,getIteratorMethod=getIteratorMethod$2,iteratorClose=iteratorClose$1,$TypeError=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$2=function(e,t,o){function n(e){return i&&iteratorClose(i,"normal",e),new Result(!0,e)}function r(e){return d?(anObject$1(e),f?m(e[0],e[1],n):m(e[0],e[1])):f?m(e,n):m(e)}var i,a,s,l,c,u,$=o&&o.that,d=!(!o||!o.AS_ENTRIES),p=!(!o||!o.IS_RECORD),g=!(!o||!o.IS_ITERATOR),f=!(!o||!o.INTERRUPTED),m=bind(t,$);if(p)i=e.iterator;else if(g)i=e;else{if(!(o=getIteratorMethod(e)))throw $TypeError(tryToString(e)+" is not iterable");if(isArrayIteratorMethod(o)){for(a=0,s=lengthOfArrayLike(e);a<s;a++)if((l=r(e[a]))&&isPrototypeOf(ResultPrototype,l))return l;return new Result(!1)}i=getIterator(e,o)}for(c=(p?e:i).next;!(u=call$3(c,i)).done;){try{l=r(u.value)}catch(e){iteratorClose(i,"throw",e)}if("object"==typeof l&&l&&isPrototypeOf(ResultPrototype,l))return l}return new Result(!1)},wellKnownSymbol=wellKnownSymbol$e,ITERATOR=wellKnownSymbol$e("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(e){}var method,STEP_ID,checkCorrectnessOfIteration$1=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var o=!1;try{var n={};n[ITERATOR]=function(){return{next:function(){return{done:o=!0}}}},e(n)}catch(e){}return o},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration(function(e){NativePromiseConstructor$1.all(e).then(void 0,function(){})}),$$4=_export,call$2=functionCall,aCallable$1=aCallable$8,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$1=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration,$$3=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{all:function(e){var s=this,t=newPromiseCapabilityModule$2.f(s),l=t.resolve,c=t.reject,o=perform$1(function(){var n=aCallable$1(s.resolve),r=[],i=0,a=1;iterate$1(e,function(e){var t=i++,o=!1;a++,call$2(n,s,e).then(function(e){o||(o=!0,r[t]=e,--a)||l(r)},c)}),--a||l(r)});return o.error&&c(o.value),t.promise}}),_export),FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$1=getBuiltIn$7,isCallable=isCallable$l,defineBuiltIn=defineBuiltIn$5,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,$$2=($$3({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable(NativePromiseConstructor)&&(method=getBuiltIn$1("Promise").prototype.catch,NativePromisePrototype.catch!==method)&&defineBuiltIn(NativePromisePrototype,"catch",method,{unsafe:!0}),_export),call$1=functionCall,aCallable=aCallable$8,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,$$1=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{race:function(e){var o=this,n=newPromiseCapabilityModule$1.f(o),r=n.reject,t=perform(function(){var t=aCallable(o.resolve);iterate(e,function(e){call$1(t,o,e).then(n.resolve,r)})});return t.error&&r(t.value),n.promise}}),_export),call=functionCall,newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR,anObject=($$1({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule.f(this);return call(t.reject,void 0,e),t.promise}}),anObject$a),isObject=isObject$8,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(e,t){return anObject(e),isObject(t)&&t.constructor===e?t:((0,(e=newPromiseCapability.f(e)).resolve)(t),e.promise)},$=_export,getBuiltIn=getBuiltIn$7,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;getBuiltIn("Promise"),$({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function(e){return promiseResolve(this,e)}}),function(e){e[e.BASIC_INFO=1]="BASIC_INFO",e[e.CONFIGURATION=2]="CONFIGURATION"}(STEP_ID=STEP_ID||{});const{header:PanelHeader,container:PanelContainer,content:PanelContent,stepper:PanelStepper}=panelComponents,stepLabels=[{stepNumber:STEP_ID.BASIC_INFO,stepLabel:"Basic Info"},{stepNumber:STEP_ID.CONFIGURATION,stepLabel:"Configuration"}],BasicInfoStep=react.exports.lazy(()=>import("./js-core.esm99.js")),ConfigurationStep=react.exports.lazy(()=>import("./js-core.esm100.js")),CustomLoginPanelWizard=({customLoginId:e,isFullScreen:t,orgId:o,querySlug:n,instanceLoginConfig:r})=>{const i=useDispatch();var a=useSelector(selectSteps),s=useSelector(selectActiveStep);const l=!!e;var c=useSelector(selectCustomLoginConfigStatus),u="pending"===c,c="failure"===c;const $=useSelector(selectCustomLoginConfig);function d(){n&&r?(i(actions$2.setQuerySlug(n)),i(actions$2.fetchLoginConfigSuccess(r))):i(actions$2.fetchLoginConfigStart({orgId:o||void 0}))}return react.exports.useEffect(()=>{l&&d()},[e,l]),react.exports.useEffect(()=>{var e,t,o,n,r;$&&({buttonTextColor:e,buttonColor:t,logo:o,name:n,slug:r}=$,i(actions$1.setLogoUrl(o)),i(actions$1.setLoginName(n)),i(actions$1.setUrlSlug(r)),i(actions.setButtonColor(t)),i(actions.setButtonTextColor(e)))},[$]),jsxRuntime.exports.jsxs(PanelContainer,Object.assign({testId:TEST_ID_PANEL+"-panel-container",panelId:CUSTOM_LOGIN_PANEL_ID,isFullScreen:t},{children:[jsxRuntime.exports.jsx(PanelHeader,{title:l?SHARED_TEXT.panel.editTitle():SHARED_TEXT.panel.createTitle(),testId:TEST_ID_PANEL+"-panel-header",onPanelClose:function(){i(actions$1.resetBasicInfo()),i(actions.resetButton()),i(actions$2.setActiveStep(1)),i(hidePanel(CUSTOM_LOGIN_PANEL_ID))}}),jsxRuntime.exports.jsx(PanelStepper,{enableTabs:l,steps:a,stepLabels:stepLabels,activeStep:s,TabsProps:{scrollButtons:!1},onClickTab:e=>{},testId:"custom-login-stepper"}),jsxRuntime.exports.jsx(PanelContent,Object.assign({isLoading:u,isErrored:c,onRetry:d,style:{padding:"0 30px",height:"100vh"},testId:TEST_ID_PANEL+"-panel-content"},{children:jsxRuntime.exports.jsxs(react.exports.Suspense,Object.assign({fallback:jsxRuntime.exports.jsx(Loader,{})},{children:[s===STEP_ID.BASIC_INFO&&jsxRuntime.exports.jsx(BasicInfoStep,{}),s===STEP_ID.CONFIGURATION&&jsxRuntime.exports.jsx(ConfigurationStep,{})]}))}))]}))},Loader=()=>jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",width:"30%",height:40,sx:{marginBottom:"10px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",width:"100%",height:40,sx:{marginBottom:"10px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",width:"100%",height:40,sx:{marginBottom:"10px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",width:"100%",height:150,sx:{marginBottom:"10px"}})]}),CustomLoginPanel=e=>jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterCustomLoginModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CustomLoginPanelWizard,Object.assign({},e))})}))})});export{CustomLoginTab as C,SHARED_TEXT as S,_export as _,CustomLoginPanel as a,selectUrlSlug as b,selectLogoUrl as c,selectButtonColor as d,selectButtonTextColor as e,formattedMessages as f,selectIsPreviewModalOpen as g,actions$1 as h,fails$d as i,global$h as j,functionCall as k,functionUncurryThis as l,shared$3 as m,arrayIncludes as n,addToUnscopables$1 as o,actions as p,CUSTOM_LOGIN_PANEL_ID as q,actions$2 as r,selectLoginName as s,toString$1 as t,objectCreate as u,internalState as v,anObject$a as w};
42
+ `;try{var n=yield gqlIntrospection.queryParser(s,l,o);let e=o;null!=n&&n.query&&(e=null==n?void 0:n.query);var{data:r,errors:i}=yield baseGraphQLApi({query:e,graphEndpoint:s,token:l,operationName:t,variables:{querySlug:a,input:{enabled:!0,name:c.name,slug:c.slug,buttonColor:c.buttonColor,buttonTextColor:c.buttonTextColor,logo:c.logo}},extraHeaders:void 0});if(!i&&r&&(null===(null==r?void 0:r.updateInstanceLoginConfiguration)||null!=r&&r.updateInstanceLoginConfiguration))return r.updateInstanceLoginConfiguration;throw new Error("Updating API Custom Login Configuration failed. Please try again later")}catch(e){return devErrorLogger(JSON.stringify(e)),e}});function*fetchCustomLoginConfigSaga(e){let t=null;try{var{graphQLEndpoint:o,token:n}=yield select(selectApiConfigs),r=e.payload.orgId;if(r){var i=yield call$f(fetchCustomLoginConfig,r,o,n);if((t=i)instanceof Error)throw new Error(t.message);yield put(actions$2.fetchLoginConfigSuccess(t))}}catch(e){yield put(actions$2.fetchLoginConfigFailure()),yield put(showMessage({content:"Failed to fetch Custom Login for Organization.",severity:MessageSeverity.Error}))}}function*updateCustomLoginConfigSaga(e){try{var{graphQLEndpoint:t,token:o}=yield select(selectApiConfigs),n=yield select(selectQuerySlug),r=yield select(selectLoginOrgID),i=yield select(selectBasicInfoStep),a=yield select(selectConfigurationStep),s={name:i.loginName||"",slug:i.urlSlug,logo:i.logoUrl||"",buttonColor:a.buttonColor,buttonTextColor:a.buttonTextColor,enabled:!0};let e;if(r&&(e=yield call$f(updateCustomLoginConfig,r,t,o,s)),r||n||(e=yield call$f(createInstanceLoginConfig,t,o,s)),(e=!r&&n?yield call$f(updateInstanceLoginConfig,n,t,o,s):e)instanceof Error)throw new Error(e.message);yield put(actions$2.updateLoginConfigSuccess()),r&&(yield put(showMessage({content:"Custom Login Updated!",severity:MessageSeverity.Success})),yield put(actions$2.fetchLoginConfigStart({orgId:r||void 0}))),r||n||(yield put(showMessage({content:"Instance Login Created!",severity:MessageSeverity.Success})),yield put({type:"ADMIN_CENTER_CUSTOM_LOGIN_PANEL_RESPONSE",payload:!0})),!r&&n&&(yield put(showMessage({content:"Instance Login Updated!",severity:MessageSeverity.Success})),yield put({type:"ADMIN_CENTER_CUSTOM_LOGIN_PANEL_RESPONSE",payload:!0}))}catch(e){i=yield select(selectLoginOrgID);console.error("error:",e),yield put(actions$2.updateLoginConfigFailure()),yield put(showMessage({content:"Failed to update Custom Login for Organization.",severity:MessageSeverity.Error})),i||(yield put({type:"ADMIN_CENTER_CUSTOM_LOGIN_PANEL_RESPONSE",payload:!1}))}}function*deleteCustomLoginConfigSaga(e){try{var{graphQLEndpoint:t,token:o}=yield select(selectApiConfigs),n=yield select(selectLoginOrgID),r=yield call$f(deleteCustomLoginConfig,n,t,o);if(r instanceof Error)throw new Error(r.message);yield put(actions$2.deleteLoginConfigSuccess()),yield put(showMessage({content:"Custom Login Deleted",severity:MessageSeverity.Success})),yield put(actions$2.fetchLoginConfigStart({orgId:n}))}catch(e){console.error("error:",e),yield put(actions$2.deleteLoginConfigFailure()),yield put(showMessage({content:"Failed to delete Custom Login for Organization.",severity:MessageSeverity.Error}))}}function*fetchCustomLoginConfigWatcher(){yield takeLatest$1(actions$2.fetchLoginConfigStart.type,fetchCustomLoginConfigSaga)}function*updateCustomLoginConfigWatcher(){yield takeLatest$1(actions$2.updateLoginConfigStart.type,updateCustomLoginConfigSaga)}function*deleteCustomLoginConfigWatcher(){yield takeLatest$1(actions$2.deleteLoginConfigStart.type,deleteCustomLoginConfigSaga)}function*rootSaga(){yield all([fetchCustomLoginConfigWatcher(),updateCustomLoginConfigWatcher(),deleteCustomLoginConfigWatcher()])}function getAdminCenterCustomLoginModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const SHARED_TEXT={title:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.title",defaultMessage:"Custom Login",description:"Admin Center Custom Login Title"}),subTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.sub-title",defaultMessage:"Create a custom branded login for users of this Organization.",description:"Admin Center Custom Login Subtitle"}),panel:{createTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.panel.create-title",defaultMessage:"New Login",description:"Admin Center Custom Login Panel Create Title"}),editTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.panel.edit-title",defaultMessage:"Edit Login",description:"Admin Center Custom Login Panel Edit Title"})},emptyState:{title:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.empty-state.title",defaultMessage:"No Custom Login Found",description:"Admin Center custom login table empty state"}),description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.empty-state.description",defaultMessage:"You haven’t created a custom login for this Organization",description:"Admin Center custom login table empty state"}),createButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.empty-state.create-button",defaultMessage:"Create Custom Login",description:"Admin Center custom login table empty state"})},basicInfoStep:{description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.description",defaultMessage:"Create a custom branded login page for this organization, with a didicated domain for users to access their aiWARE account.",description:"Admin Center Custom Login Basic Info Step Description"}),customUrlSlugTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.custom-url-slug-title",defaultMessage:"Custom Login URL Slug",description:"Admin Center Custom Login Basic Info Step Custom URL Slug Title"}),customUrlSlugDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.custom-url-slug-description",defaultMessage:"Type in the slug name that will be added to your login url. (Field is required)",description:"Admin Center Custom Login Basic Info Step Custom URL Slug Description"}),brandLogoTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.brand-logo-title",defaultMessage:"Brand Logo",description:"Admin Center Custom Login Basic Info Step Brand Logo Title"}),brandLogoDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.brand-logo-description",defaultMessage:"This logo will be used on your login page. ",description:"Admin Center Custom Login Basic Info Step Brand Logo Description"}),loginNameInputPlaceholder:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.login-name-input-placeholder",defaultMessage:"Login Name",description:"Admin Center Custom Login Basic Info Step Login Name Input Placeholder"}),cancelBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.cancel-btn",defaultMessage:"Cancel",description:"Admin Center Custom Login Basic Info Step Cancel Button"}),saveBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.save-btn",defaultMessage:"Save",description:"Admin Center Custom Login Basic Info Step Save Button"}),nextBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.next-btn",defaultMessage:"Next",description:"Admin Center Custom Login Basic Info Step Next Button"}),customUrlSlugError:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.custom-url-slug-error",defaultMessage:"Please enter a valid URL slug",description:"Admin Center Custom Login Basic Info Step Custom URL Slug Error"}),showMeLink:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.basic-info-step.show-me-link",defaultMessage:"Show me",description:"Admin Center Custom Login Basic Info Step Show Me Link"})},configurationStep:{title:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.configuration-step.title",defaultMessage:"Customize Colors",description:"Admin Center Custom Login Configuration Step Title"}),description:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.configuration-step.description",defaultMessage:"Change the primary and secondary colors of the login and sign up pages to match your brand.",description:"Admin Center Custom Login Configuration Step Description"}),backBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.configuration-step.back-btn",defaultMessage:"Back",description:"Admin Center Custom Login Configuration Step Back Button"}),createBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login.configuration-step.create-btn",defaultMessage:"Create",description:"Admin Center Custom Login Configuration Step Create Button"})}},formattedMessages=e=>({loginNamePlaceholder:e.formatMessage({id:"os-admin-center-custom-login.basic-info-step.login-name-input-placeholder",defaultMessage:[{type:0,value:"Login Name"}]}),customLoginUrlSlugPlaceholder:e.formatMessage({id:"os-admin-center-custom-login.basic-info-step.custom-url-slug-placeholder",defaultMessage:[{type:0,value:"login.veritone.com/"}]})});var activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,objectDefineProperties={},DESCRIPTORS$3=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$7=anObject$a,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn$4=(objectDefineProperties.f=DESCRIPTORS$3&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$7(e);for(var o,n=toIndexedObject$1(t),r=objectKeys(t),i=r.length,a=0;a<i;)definePropertyModule.f(e,o=r[a++],n[o]);return e},getBuiltIn$7),html$2=getBuiltIn$7("document","documentElement"),anObject$6=anObject$a,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html$1=html$2,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$1.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 o;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$6(e),o=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,o[IE_PROTO$1]=e):o=NullProtoObject(),void 0===t?o:definePropertiesModule.f(o,t)}),wellKnownSymbol$c=wellKnownSymbol$e,create$1=objectCreate,defineProperty$3=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$c("unscopables"),ArrayPrototype$1=Array.prototype,addToUnscopables$1=(null==ArrayPrototype$1[UNSCOPABLES]&&defineProperty$3(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0}),iterators={},fails$3=fails$d,correctPrototypeGetter=!fails$d(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$3=hasOwnProperty_1,isCallable$a=isCallable$l,toObject=toObject$3,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){var t,e=toObject(e);return hasOwn$3(e,IE_PROTO)?e[IE_PROTO]:(t=e.constructor,isCallable$a(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null)},fails$2=fails$d,isCallable$9=isCallable$l,isObject$2=isObject$8,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$3=defineBuiltIn$5,wellKnownSymbol$b=wellKnownSymbol$e,ITERATOR$5=wellKnownSymbol$e("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),!isObject$2(IteratorPrototype$2)||fails$2(function(){var e={};return IteratorPrototype$2[ITERATOR$5].call(e)!==e})),iteratorsCore=(isCallable$9((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$5])||defineBuiltIn$3(IteratorPrototype$2,ITERATOR$5,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$2=objectDefineProperty.f,hasOwn$2=hasOwnProperty_1,wellKnownSymbol$a=wellKnownSymbol$e,TO_STRING_TAG$3=wellKnownSymbol$e("toStringTag"),setToStringTag$3=function(e,t,o){(e=e&&!o?e.prototype:e)&&!hasOwn$2(e,TO_STRING_TAG$3)&&defineProperty$2(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$2=setToStringTag$3,Iterators$4=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,o,n){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor(+!n,o)}),setToStringTag$2(e,t,!1),Iterators$4[t]=returnThis$1,e},uncurryThis$5=functionUncurryThis,aCallable$6=aCallable$8,functionUncurryThisAccessor=function(e,t,o){try{return uncurryThis$5(aCallable$6(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}},isCallable$8=isCallable$l,$String$1=String,$TypeError$6=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$8(e))return e;throw $TypeError$6("Can't set "+$String$1(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$5=anObject$a,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var o,n=!1,e={};try{(o=uncurryThisAccessor(Object.prototype,"__proto__","set"))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return anObject$5(e),aPossiblePrototype(t),n?o(e,t):e.__proto__=t,e}}():void 0),$$7=_export,call$8=functionCall,FunctionName=functionName,isCallable$7=isCallable$l,createIteratorConstructor=iteratorCreateConstructor,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$1=setToStringTag$3,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$5,wellKnownSymbol$9=wellKnownSymbol$e,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol$9("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,o,n,r,i,a){createIteratorConstructor(o,t,n);function s(e){if(e===r&&p)return p;if(!BUGGY_SAFARI_ITERATORS&&e in $)return $[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new o(this,e)}}return function(){return new o(this)}}var l,c,n=t+" Iterator",u=!1,$=e.prototype,d=$[ITERATOR$4]||$["@@iterator"]||r&&$[r],p=!BUGGY_SAFARI_ITERATORS&&d||s(r),g="Array"==t&&$.entries||d;if(g&&(g=getPrototypeOf(g.call(new e)))!==Object.prototype&&g.next&&(getPrototypeOf(g)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(g,IteratorPrototype):isCallable$7(g[ITERATOR$4])||defineBuiltIn$2(g,ITERATOR$4,returnThis)),setToStringTag$1(g,n,!0)),PROPER_FUNCTION_NAME&&r==VALUES&&d&&d.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1($,"name",VALUES):(u=!0,p=function(){return call$8(d,this)})),r)if(l={values:s(VALUES),keys:i?p:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in $||defineBuiltIn$2($,c,l[c]);else $$7({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return $[ITERATOR$4]!==p&&defineBuiltIn$2($,ITERATOR$4,p,{name:r}),Iterators$3[t]=p,l},createIterResultObject$1=function(e,t){return{value:e,done:t}},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators$2=iterators,InternalStateModule$1=internalState,defineProperty$1=objectDefineProperty.f,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$1,DESCRIPTORS$2=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$1=InternalStateModule$1.set,getInternalState=InternalStateModule$1.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,o=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject(void 0,!0)):createIterResultObject("keys"==o?n:"values"==o?t[n]:[n,t[n]],!1)},"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS$2&&"values"!==values.name)try{defineProperty$1(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$7=global$h,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$8=wellKnownSymbol$e,ITERATOR$3=wellKnownSymbol$8("iterator"),TO_STRING_TAG$2=wellKnownSymbol$8("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR$3]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR$3,ArrayValues)}catch(e){t[ITERATOR$3]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var o in ArrayIteratorMethods)if(t[o]!==ArrayIteratorMethods[o])try{createNonEnumerableProperty(t,o,ArrayIteratorMethods[o])}catch(e){t[o]=ArrayIteratorMethods[o]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$7[COLLECTION_NAME]&&global$7[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var EmptyStringDescriptionStore,SymbolWrapper,NATIVE_SYMBOL,thisSymbolValue,symbolDescriptiveString,regexp,replace,stringSlice,wellKnownSymbol$7=wellKnownSymbol$e,TO_STRING_TAG$1=wellKnownSymbol$e("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$1]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$6=isCallable$l,classofRaw$1=classofRaw$2,wellKnownSymbol$6=wellKnownSymbol$e,TO_STRING_TAG=wellKnownSymbol$e("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw$1(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$4=TO_STRING_TAG_SUPPORT?classofRaw$1:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw$1(e):"Object"==(t=classofRaw$1(e))&&isCallable$6(e.callee)?"Arguments":t},classof$3=classof$4,$String=String,toString$1=function(e){if("Symbol"===classof$3(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},makeBuiltIn=makeBuiltIn$3.exports,defineProperty=objectDefineProperty,defineBuiltInAccessor$2=function(e,t,o){return o.get&&makeBuiltIn(o.get,t,{getter:!0}),o.set&&makeBuiltIn(o.set,t,{setter:!0}),defineProperty.f(e,t,o)},$$6=_export,DESCRIPTORS$1=descriptors,global$6=global$h,uncurryThis$4=functionUncurryThis,hasOwn$1=hasOwnProperty_1,isCallable$5=isCallable$l,isPrototypeOf$2=objectIsPrototypeOf,toString=toString$1,defineBuiltInAccessor$1=defineBuiltInAccessor$2,copyConstructorProperties=copyConstructorProperties$2,NativeSymbol=global$h.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype;!DESCRIPTORS$1||!isCallable$5(NativeSymbol)||"description"in SymbolPrototype&&void 0===NativeSymbol().description||(EmptyStringDescriptionStore={},copyConstructorProperties(SymbolWrapper=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:toString(arguments[0]),t=isPrototypeOf$2(SymbolPrototype,this)?new NativeSymbol(e):void 0===e?NativeSymbol():NativeSymbol(e);return""===e&&(EmptyStringDescriptionStore[t]=!0),t},NativeSymbol),(SymbolWrapper.prototype=SymbolPrototype).constructor=SymbolWrapper,NATIVE_SYMBOL="Symbol(test)"==String(NativeSymbol("test")),thisSymbolValue=uncurryThis$4(SymbolPrototype.valueOf),symbolDescriptiveString=uncurryThis$4(SymbolPrototype.toString),regexp=/^Symbol\((.*)\)[^)]+$/,replace=uncurryThis$4("".replace),stringSlice=uncurryThis$4("".slice),defineBuiltInAccessor$1(SymbolPrototype,"description",{configurable:!0,get:function(){var e=thisSymbolValue(this);return hasOwn$1(EmptyStringDescriptionStore,e)?"":(e=symbolDescriptiveString(e),""===(e=NATIVE_SYMBOL?stringSlice(e,7,-1):replace(e,regexp,"$1"))?void 0:e)}}),$$6({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper}));const{TableInfiniteScroll}=tableInfiniteScroll["jsx"],itemHeight=60,LoginTable=()=>{const o=useDispatch(),n=useSelector(selectIsFullscreenEnabled),[e,r]=react.exports.useState(!1),[t,i]=react.exports.useState(null),[a,s]=react.exports.useState(!1),l=useSelector(selectAdminCenterOrgId);var c=useSelector(selectCustomLoginConfig),c=c?[c]:[],u=useSelector(selectCustomLoginConfigStatus),$="pending"===u,u="failure"===u;return jsxRuntime.exports.jsxs(Box,Object.assign({height:"500px"},{children:[jsxRuntime.exports.jsx(TableInfiniteScroll,{hasMore:!1,fetchMore:()=>{o(actions$2.fetchLoginConfigStart({orgId:l}))},fetchOnMount:0===c.length,offset:0,items:c,itemHeight:itemHeight,isLoading:$,error:u,TableHeaderComponent:jsxRuntime.exports.jsx(CustomLoginTableHeader,{}),TableRowComponent:({item:t,index:e})=>jsxRuntime.exports.jsx(CustomLoginTableRow,{index:e,onEdit:()=>{var e;e=t,o(mountPanel({panelId:CUSTOM_LOGIN_PANEL_ID,microFrontend:{name:CUSTOM_LOGIN_PANEL_ID,config:{customLoginId:e.name,isFullScreen:n,orgId:l}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:n?0:55,marginStart:n?0:80,size:"medium",parentPanelId:"ADMIN_CENTER",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))},onPreview:()=>{return e=t,i(e),void r(!0);var e},onDelete:()=>{return e=t,s(!0),void i(e);var e},buttonColor:t.buttonColor,buttonTextColor:t.buttonTextColor,logoUrl:t.logo,name:t.name,slug:t.slug,enabled:t.enabled,testId:TEST_ID}),TableEmptyStateComponent:jsxRuntime.exports.jsx(LoginEmptyState,{}),testId:TEST_ID}),jsxRuntime.exports.jsx(CustomLoginPreviewModal,Object.assign({},{onClose:()=>r(!1),isOpen:e,buttonTextColor:(null===t||void 0===t?void 0:t.buttonTextColor)||"",buttonColor:(null===t||void 0===t?void 0:t.buttonColor)||"",logoUrl:(null===t||void 0===t?void 0:t.logo)||""})),jsxRuntime.exports.jsx(DeleteModal,{isOpen:a,onClose:()=>s(!1),onConfirmDelete:()=>{o(actions$2.deleteLoginConfigStart())}})]}))},LoginEmptyState=()=>{const e=useDispatch(),t=useSelector(selectIsFullscreenEnabled);return jsxRuntime.exports.jsx(EmptyState,{title:SHARED_TEXT.emptyState.title(),description:SHARED_TEXT.emptyState.description(),buttonLabel:SHARED_TEXT.emptyState.createButton(),onClick:()=>{e(mountPanel({panelId:CUSTOM_LOGIN_PANEL_ID,microFrontend:{name:CUSTOM_LOGIN_PANEL_ID,config:{customLoginId:null,isFullScreen:t}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:t?0:55,marginStart:t?0:80,size:"medium",parentPanelId:"ADMIN_CENTER",dimmed:0,dimmedStatus:"dimParent"}}))}})},DeleteModal=({onConfirmDelete:e,isOpen:t,onClose:o})=>{return jsxRuntime.exports.jsx(ConfirmDialog,{testId:TEST_ID,title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login-delete-modal-title",defaultMessage:"Delete this Custom Login",description:"Admin Center Custom Login Delete Modal Title"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login-delete-modal-body",defaultMessage:"Deleting this Custom Login Configuration will revert the login page to the default logo and colors. This action is permanent and cannot be undone.",description:"Admin Center Custom Login Delete Modal body"}),isOpen:t,onClose:o,onConfirm:()=>{o(),e()},confirmLabel:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login-delete-modal-button-confirm-delete",defaultMessage:"Confirm Delete",description:"Admin Center Custom Login Delete Modal button confirm delete"}),cancelLabel:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-custom-login-delete-modal-button-go-back",defaultMessage:"Go Back",description:"Admin Center Custom Login Delete Modal button go back"})})},{CenterTabHeading,CenterTabContainer,CenterTabContent}=centerComponents,MainLayout=()=>jsxRuntime.exports.jsxs(CenterTabContainer,Object.assign({testId:TEST_ID},{children:[jsxRuntime.exports.jsx(CenterTabHeading,{title:SHARED_TEXT.title(),subtitle:SHARED_TEXT.subTitle(),testId:TEST_ID}),jsxRuntime.exports.jsx(CenterTabContent,Object.assign({testId:TEST_ID},{children:jsxRuntime.exports.jsx(LoginTable,{})}))]})),CustomLoginTab=()=>jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterCustomLoginModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(MainLayout,{})})}))})});var $location,defer,channel,port,toggle,node,promise,then,queue,flush,notify$1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,classof$2=classofRaw$2,engineIsNode="undefined"!=typeof process&&"process"==classofRaw$2(process),getBuiltIn$3=getBuiltIn$7,defineBuiltInAccessor=defineBuiltInAccessor$2,wellKnownSymbol$5=wellKnownSymbol$e,DESCRIPTORS=descriptors,SPECIES$2=wellKnownSymbol$e("species"),setSpecies$1=function(e){e=getBuiltIn$3(e);DESCRIPTORS&&e&&!e[SPECIES$2]&&defineBuiltInAccessor(e,SPECIES$2,{configurable:!0,get:function(){return this}})},isPrototypeOf$1=objectIsPrototypeOf,$TypeError$5=TypeError,anInstance$1=function(e,t){if(isPrototypeOf$1(t,e))return e;throw $TypeError$5("Incorrect invocation")},uncurryThis$3=functionUncurryThis,fails$1=fails$d,isCallable$4=isCallable$l,classof$1=classof$4,getBuiltIn$2=getBuiltIn$7,inspectSource$1=inspectSource$3,noop=function(){},empty=[],construct=getBuiltIn$7("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=uncurryThis$3(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$4(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$4(e))return!1;switch(classof$1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource$1(e))}catch(e){return!0}},isConstructor$1=(isConstructorLegacy.sham=!0,!construct||fails$1(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isConstructor=isConstructor$1,tryToString$2=tryToString$4,$TypeError$4=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw $TypeError$4(tryToString$2(e)+" is not a constructor")},anObject$4=anObject$a,aConstructor=aConstructor$1,isNullOrUndefined$1=isNullOrUndefined$4,wellKnownSymbol$4=wellKnownSymbol$e,SPECIES$1=wellKnownSymbol$e("species"),speciesConstructor$1=function(e,t){var e=anObject$4(e).constructor;return void 0===e||isNullOrUndefined$1(e=anObject$4(e)[SPECIES$1])?t:aConstructor(e)},NATIVE_BIND$1=functionBindNative,FunctionPrototype=Function.prototype,apply$1=FunctionPrototype.apply,call$7=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$1?call$7.bind(apply$1):function(){return call$7.apply(apply$1,arguments)}),classofRaw=classofRaw$2,uncurryThis$2=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw(e))return uncurryThis$2(e)},uncurryThis$1=functionUncurryThisClause,aCallable$5=aCallable$8,NATIVE_BIND=functionBindNative,bind$4=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$5(e),void 0===t?e:NATIVE_BIND?bind$4(e,t):function(){return e.apply(t,arguments)}},uncurryThis=functionUncurryThis,arraySlice$1=functionUncurryThis([].slice),$TypeError$3=TypeError,validateArgumentsLength$1=function(e,t){if(e<t)throw $TypeError$3("Not enough arguments");return e},userAgent$2=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2),global$5=global$h,apply=functionApply,bind$3=functionBindContext,isCallable$3=isCallable$l,hasOwn=hasOwnProperty_1,fails=fails$d,html=html$2,arraySlice=arraySlice$1,createElement=documentCreateElement$2,validateArgumentsLength=validateArgumentsLength$1,IS_IOS$1=engineIsIos,IS_NODE$3=engineIsNode,set=global$5.setImmediate,clear=global$5.clearImmediate,process$3=global$5.process,Dispatch=global$5.Dispatch,Function$1=global$5.Function,MessageChannel=global$5.MessageChannel,String$1=global$5.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange",run=(fails(function(){$location=global$5.location}),function(e){var t;hasOwn(queue$2,e)&&(t=queue$2[e],delete queue$2[e],t())}),runner=function(e){return function(){run(e)}},eventListener=function(e){run(e.data)},globalPostMessageDefer=function(e){global$5.postMessage(String$1(e),$location.protocol+"//"+$location.host)},task$1=(set&&clear||(set=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable$3(e)?e:Function$1(e),o=arraySlice(arguments,1);return queue$2[++counter]=function(){apply(t,void 0,o)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$3?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$3(port.postMessage,port)):global$5.addEventListener&&isCallable$3(global$5.postMessage)&&!global$5.importScripts&&$location&&"file:"!==$location.protocol&&!fails(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$5.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)}),{set:set,clear:clear}),Queue$2=function(){this.head=null,this.tail=null},queue$1=(Queue$2.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},Queue$2),userAgent$1=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$1)&&"undefined"!=typeof Pebble,userAgent=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent),global$4=global$h,bind$2=functionBindContext,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$2=engineIsNode,MutationObserver=global$4.MutationObserver||global$4.WebKitMutationObserver,document$2=global$4.document,process$2=global$4.process,Promise$1=global$4.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor(global$4,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,microtask_1=(microtask$1||(queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$2&&(e=process$2.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&&notify$1(),e}e&&e.enter()},notify$1=IS_IOS||IS_NODE$2||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$2(promise.then,promise),function(){then(flush)}):IS_NODE$2?function(){process$2.nextTick(flush)}:(macrotask=bind$2(macrotask,global$4),function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}),microtask$1),hostReportErrors$1=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$3=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$3=global$h,promiseNativeConstructor=global$h.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$1=engineIsNode,engineIsBrowser=!engineIsDeno&&!engineIsNode&&"object"==typeof window&&"object"==typeof document,global$2=global$h,NativePromiseConstructor$3=promiseNativeConstructor,isCallable$2=isCallable$l,isForced=isForced_1,inspectSource=inspectSource$3,wellKnownSymbol$3=wellKnownSymbol$e,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,SPECIES=(NativePromiseConstructor$3&&NativePromiseConstructor$3.prototype,wellKnownSymbol$3("species")),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$2(global$2.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",function(){var e=inspectSource(NativePromiseConstructor$3),t=e!==String(NativePromiseConstructor$3);if(!t&&66===V8_VERSION)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){function o(e){e(function(){},function(){})}e=new NativePromiseConstructor$3(function(e){e(1)});if((e.constructor={})[SPECIES]=o,!(SUBCLASSING=e.then(function(){})instanceof o))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1}),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$4=aCallable$8,$TypeError$2=TypeError,PromiseCapability=function(e){var o,n;this.promise=new e(function(e,t){if(void 0!==o||void 0!==n)throw $TypeError$2("Bad Promise constructor");o=e,n=t}),this.resolve=aCallable$4(o),this.reject=aCallable$4(n)},$$5=(newPromiseCapability$2.f=function(e){return new PromiseCapability(e)},_export),IS_NODE=engineIsNode,global$1=global$h,call$6=functionCall,defineBuiltIn$1=defineBuiltIn$5,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$3,setSpecies=setSpecies$1,aCallable$3=aCallable$8,isCallable$1=isCallable$l,isObject$1=isObject$8,anInstance=anInstance$1,speciesConstructor=speciesConstructor$1,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$2=perform$3,Queue=queue$1,InternalStateModule=internalState,NativePromiseConstructor$2=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$3=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=PromiseConstructorDetection.SUBCLASSING,getInternalPromiseState=InternalStateModule.getterFor(PROMISE),setInternalState=InternalStateModule.set,NativePromisePrototype$1=NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype,PromiseConstructor=NativePromiseConstructor$2,PromisePrototype=NativePromisePrototype$1,TypeError$1=global$1.TypeError,document$1=global$1.document,process$1=global$1.process,newPromiseCapability$1=newPromiseCapabilityModule$3.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$1(e)||!isCallable$1(t=e.then))&&t},callReaction=function(e,t){var o,n,r,i=t.value,a=t.state==FULFILLED,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?o=i:(u&&u.enter(),o=s(i),u&&(u.exit(),r=!0)),o===e.promise?c(TypeError$1("Promise-chain cycle")):(n=isThenable(o))?call$6(n,o,l,c):l(o)):c(i)}catch(e){u&&!r&&u.exit(),c(e)}},notify=function(o,n){o.notified||(o.notified=!0,microtask(function(){for(var e,t=o.reactions;e=t.get();)callReaction(e,o);o.notified=!1,n&&!o.rejection&&onUnhandled(o)}))},dispatchEvent=function(e,t,o){var n;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=o,n.initEvent(e,!1,!0),global$1.dispatchEvent(n)):n={promise:t,reason:o},!NATIVE_PROMISE_REJECTION_EVENT&&(t=global$1["on"+e])?t(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",o)},onUnhandled=function(n){call$6(task,global$1,function(){var e=n.facade,t=n.value,o=isUnhandled(n);if(o&&(o=perform$2(function(){IS_NODE?process$1.emit("unhandledRejection",t,e):dispatchEvent(UNHANDLED_REJECTION,e,t)}),n.rejection=IS_NODE||isUnhandled(n)?UNHANDLED:HANDLED,o.error))throw o.value})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(t){call$6(task,global$1,function(){var e=t.facade;IS_NODE?process$1.emit("rejectionHandled",e):dispatchEvent(REJECTION_HANDLED,e,t.value)})},bind$1=function(t,o,n){return function(e){t(o,e,n)}},internalReject=function(e,t,o){e.done||(e.done=!0,(e=o?o:e).value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(o,e,t){if(!o.done){o.done=!0,t&&(o=t);try{if(o.facade===e)throw TypeError$1("Promise can't be resolved itself");var n=isThenable(e);n?microtask(function(){var t={done:!1};try{call$6(n,e,bind$1(internalResolve,t,o),bind$1(internalReject,t,o))}catch(e){internalReject(t,e,o)}}):(o.value=e,o.state=FULFILLED,notify(o,!1))}catch(e){internalReject({done:!1},e,o)}}};if(FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance(this,PromisePrototype),aCallable$3(e),call$6(Internal,this);var t=getInternalPromiseState(this);try{e(bind$1(internalResolve,t),bind$1(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$1(PromisePrototype,"then",function(e,t){var o=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return o.parent=!0,n.ok=!isCallable$1(e)||e,n.fail=isCallable$1(t)&&t,n.domain=IS_NODE?process$1.domain:void 0,o.state==PENDING?o.reactions.add(n):microtask(function(){callReaction(n,o)}),n.promise}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$1(internalResolve,t),this.reject=bind$1(internalReject,t)},newPromiseCapabilityModule$3.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable$1(NativePromiseConstructor$2))&&NativePromisePrototype$1!==Object.prototype){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$1(NativePromisePrototype$1,"then",function(e,t){var o=this;return new PromiseConstructor(function(e,t){call$6(nativeThen,o,e,t)}).then(e,t)},{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}setPrototypeOf&&setPrototypeOf(NativePromisePrototype$1,PromisePrototype)}$$5({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE);var wellKnownSymbol$2=wellKnownSymbol$e,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$e("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype[ITERATOR$2]===e)},classof=classof$4,getMethod$1=getMethod$3,isNullOrUndefined=isNullOrUndefined$4,Iterators=iterators,wellKnownSymbol$1=wellKnownSymbol$e,ITERATOR$1=wellKnownSymbol$e("iterator"),getIteratorMethod$2=function(e){if(!isNullOrUndefined(e))return getMethod$1(e,ITERATOR$1)||getMethod$1(e,"@@iterator")||Iterators[classof(e)]},call$5=functionCall,aCallable$2=aCallable$8,anObject$3=anObject$a,tryToString$1=tryToString$4,getIteratorMethod$1=getIteratorMethod$2,$TypeError$1=TypeError,getIterator$1=function(e,t){var o=arguments.length<2?getIteratorMethod$1(e):t;if(aCallable$2(o))return anObject$3(call$5(o,e));throw $TypeError$1(tryToString$1(e)+" is not iterable")},call$4=functionCall,anObject$2=anObject$a,getMethod=getMethod$3,iteratorClose$1=function(e,t,o){var n,r;anObject$2(e);try{if(!(n=getMethod(e,"return"))){if("throw"===t)throw o;return o}n=call$4(n,e)}catch(e){r=!0,n=e}if("throw"===t)throw o;if(r)throw n;return anObject$2(n),o},bind=functionBindContext,call$3=functionCall,anObject$1=anObject$a,tryToString=tryToString$4,isArrayIteratorMethod=isArrayIteratorMethod$1,lengthOfArrayLike=lengthOfArrayLike$2,isPrototypeOf=objectIsPrototypeOf,getIterator=getIterator$1,getIteratorMethod=getIteratorMethod$2,iteratorClose=iteratorClose$1,$TypeError=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$2=function(e,t,o){function n(e){return i&&iteratorClose(i,"normal",e),new Result(!0,e)}function r(e){return d?(anObject$1(e),f?m(e[0],e[1],n):m(e[0],e[1])):f?m(e,n):m(e)}var i,a,s,l,c,u,$=o&&o.that,d=!(!o||!o.AS_ENTRIES),p=!(!o||!o.IS_RECORD),g=!(!o||!o.IS_ITERATOR),f=!(!o||!o.INTERRUPTED),m=bind(t,$);if(p)i=e.iterator;else if(g)i=e;else{if(!(o=getIteratorMethod(e)))throw $TypeError(tryToString(e)+" is not iterable");if(isArrayIteratorMethod(o)){for(a=0,s=lengthOfArrayLike(e);a<s;a++)if((l=r(e[a]))&&isPrototypeOf(ResultPrototype,l))return l;return new Result(!1)}i=getIterator(e,o)}for(c=(p?e:i).next;!(u=call$3(c,i)).done;){try{l=r(u.value)}catch(e){iteratorClose(i,"throw",e)}if("object"==typeof l&&l&&isPrototypeOf(ResultPrototype,l))return l}return new Result(!1)},wellKnownSymbol=wellKnownSymbol$e,ITERATOR=wellKnownSymbol$e("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(e){}var method,STEP_ID,checkCorrectnessOfIteration$1=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var o=!1;try{var n={};n[ITERATOR]=function(){return{next:function(){return{done:o=!0}}}},e(n)}catch(e){}return o},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration(function(e){NativePromiseConstructor$1.all(e).then(void 0,function(){})}),$$4=_export,call$2=functionCall,aCallable$1=aCallable$8,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$1=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration,$$3=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{all:function(e){var s=this,t=newPromiseCapabilityModule$2.f(s),l=t.resolve,c=t.reject,o=perform$1(function(){var n=aCallable$1(s.resolve),r=[],i=0,a=1;iterate$1(e,function(e){var t=i++,o=!1;a++,call$2(n,s,e).then(function(e){o||(o=!0,r[t]=e,--a)||l(r)},c)}),--a||l(r)});return o.error&&c(o.value),t.promise}}),_export),FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$1=getBuiltIn$7,isCallable=isCallable$l,defineBuiltIn=defineBuiltIn$5,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,$$2=($$3({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable(NativePromiseConstructor)&&(method=getBuiltIn$1("Promise").prototype.catch,NativePromisePrototype.catch!==method)&&defineBuiltIn(NativePromisePrototype,"catch",method,{unsafe:!0}),_export),call$1=functionCall,aCallable=aCallable$8,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,$$1=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{race:function(e){var o=this,n=newPromiseCapabilityModule$1.f(o),r=n.reject,t=perform(function(){var t=aCallable(o.resolve);iterate(e,function(e){call$1(t,o,e).then(n.resolve,r)})});return t.error&&r(t.value),n.promise}}),_export),call=functionCall,newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR,anObject=($$1({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule.f(this);return call(t.reject,void 0,e),t.promise}}),anObject$a),isObject=isObject$8,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(e,t){return anObject(e),isObject(t)&&t.constructor===e?t:((0,(e=newPromiseCapability.f(e)).resolve)(t),e.promise)},$=_export,getBuiltIn=getBuiltIn$7,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;getBuiltIn("Promise"),$({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function(e){return promiseResolve(this,e)}}),function(e){e[e.BASIC_INFO=1]="BASIC_INFO",e[e.CONFIGURATION=2]="CONFIGURATION"}(STEP_ID=STEP_ID||{});const{header:PanelHeader,container:PanelContainer,content:PanelContent,stepper:PanelStepper}=panelComponents,stepLabels=[{stepNumber:STEP_ID.BASIC_INFO,stepLabel:"Basic Info"},{stepNumber:STEP_ID.CONFIGURATION,stepLabel:"Configuration"}],BasicInfoStep=react.exports.lazy(()=>import("./js-core.esm99.js")),ConfigurationStep=react.exports.lazy(()=>import("./js-core.esm100.js")),CustomLoginPanelWizard=({customLoginId:e,isFullScreen:t,orgId:o,querySlug:n,instanceLoginConfig:r})=>{const i=useDispatch();var a=useSelector(selectSteps),s=useSelector(selectActiveStep);const l=!!e;var c=useSelector(selectCustomLoginConfigStatus),u="pending"===c,c="failure"===c;const $=useSelector(selectCustomLoginConfig);function d(){n&&r?(i(actions$2.setQuerySlug(n)),i(actions$2.fetchLoginConfigSuccess(r))):i(actions$2.fetchLoginConfigStart({orgId:o||void 0}))}return react.exports.useEffect(()=>{l&&d()},[e,l]),react.exports.useEffect(()=>{var e,t,o,n,r;$&&({buttonTextColor:e,buttonColor:t,logo:o,name:n,slug:r}=$,i(actions$1.setLogoUrl(o)),i(actions$1.setLoginName(n)),i(actions$1.setUrlSlug(r)),i(actions.setButtonColor(t)),i(actions.setButtonTextColor(e)))},[$]),jsxRuntime.exports.jsxs(PanelContainer,Object.assign({testId:TEST_ID_PANEL+"-panel-container",panelId:CUSTOM_LOGIN_PANEL_ID,isFullScreen:t},{children:[jsxRuntime.exports.jsx(PanelHeader,{title:l?SHARED_TEXT.panel.editTitle():SHARED_TEXT.panel.createTitle(),testId:TEST_ID_PANEL+"-panel-header",onPanelClose:function(){i(actions$1.resetBasicInfo()),i(actions.resetButton()),i(actions$2.setActiveStep(1)),i(hidePanel(CUSTOM_LOGIN_PANEL_ID))}}),jsxRuntime.exports.jsx(PanelStepper,{enableTabs:l,steps:a,stepLabels:stepLabels,activeStep:s,TabsProps:{scrollButtons:!1},onClickTab:e=>{},testId:"custom-login-stepper"}),jsxRuntime.exports.jsx(PanelContent,Object.assign({isLoading:u,isErrored:c,onRetry:d,style:{padding:"0 30px",height:"100vh"},testId:TEST_ID_PANEL+"-panel-content"},{children:jsxRuntime.exports.jsxs(react.exports.Suspense,Object.assign({fallback:jsxRuntime.exports.jsx(Loader,{})},{children:[s===STEP_ID.BASIC_INFO&&jsxRuntime.exports.jsx(BasicInfoStep,{}),s===STEP_ID.CONFIGURATION&&jsxRuntime.exports.jsx(ConfigurationStep,{})]}))}))]}))},Loader=()=>jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",width:"30%",height:40,sx:{marginBottom:"10px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",width:"100%",height:40,sx:{marginBottom:"10px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",width:"100%",height:40,sx:{marginBottom:"10px"}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",width:"100%",height:150,sx:{marginBottom:"10px"}})]}),CustomLoginPanel=e=>jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterCustomLoginModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CustomLoginPanelWizard,Object.assign({},e))})}))})});export{CustomLoginTab as C,SHARED_TEXT as S,_export as _,CustomLoginPanel as a,selectUrlSlug as b,selectLogoUrl as c,selectButtonColor as d,selectButtonTextColor as e,formattedMessages as f,selectIsPreviewModalOpen as g,actions$1 as h,fails$d as i,global$h as j,functionCall as k,functionUncurryThis as l,shared$3 as m,arrayIncludes as n,addToUnscopables$1 as o,actions as p,CUSTOM_LOGIN_PANEL_ID as q,actions$2 as r,selectLoginName as s,toString$1 as t,objectCreate as u,internalState as v,anObject$a as w};
Binary file