aiware-js 1.0.0-master.1421 → 1.0.0-master.1422
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.esm127.js +1 -1
- package/js-core.esm127.js.gz +0 -0
- package/js-core.esm17.js +1 -1
- package/js-core.esm17.js.gz +0 -0
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm127.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as jsxRuntimeExports,r as reactExports,a0 as createSlice,u as useSelector,dp as authStatusSelector,dq as authContextSelector,dr as AuthContext,ai as lodashExports,B as Box,ds as img$b,dt as StyledEngineProvider,C as CircularProgress,du as resetPasswordRequest,at as React,dv as setUser,_ as all,J as takeEvery$1,N as put,aj as showMessage,ak as MessageSeverity,a2 as call,K as select}from"./js-core.esm4.js";import{aS as requireCreateSvgIcon,aT as interopRequireDefaultExports,m as makeStyles,A as AIWareIntlProvider,T as Typography,S as Select,ch as Location,e as MenuItem,D as DynamicModuleLoader,B as Button,b5 as Fade,c as classNames,M as MemoizedFormattedMessage,F as FormControl,ci as OutlinedInput,t as Popover,p as Divider,b6 as Slide,cj as CheckmarkFilled,ck as Bullet}from"./js-core.esm7.js";import{d as default_1$3}from"./js-core.esm58.js";import{d as default_1$2}from"./js-core.esm57.js";import{o as devErrorLogger,S as Stack,aP as useFormContext,aQ as Controller,bk as FormGenerator,U as useForm,W as FormProvider,a5 as LoadingButton,a4 as InputLabel,p as InputAdornment,I as IconButton,c as TextField,e as Skeleton,a as Snackbar,a_ as Close$1}from"./js-core.esm9.js";import{R as Routes,w as Route,x as useNavigate,y as useLocation,z as useSearchParams,v as LinearProgress,g as getAppbarPanelModule,O as Outlet,B as useParams,a as applicationSelector,C as logoutUser$1}from"./js-core.esm8.js";import{d as default_1$4}from"./js-core.esm66.js";import{A as Alert}from"./js-core.esm15.js";import{B as Box$1}from"./js-core.esm43.js";import{C as Container}from"./js-core.esm25.js";import{A as Autocomplete}from"./js-core.esm24.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm16.js";var Visibility={},_interopRequireDefault$1=interopRequireDefaultExports,default_1$1=(Object.defineProperty(Visibility,"__esModule",{value:!0}),Visibility.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=jsxRuntimeExports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility"),default_1$1=Visibility.default=_default$1,ArrowBack={},_interopRequireDefault=interopRequireDefaultExports,default_1=(Object.defineProperty(ArrowBack,"__esModule",{value:!0}),ArrowBack.default=void 0),_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),default_1=ArrowBack.default=_default,Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return 0<this.listeners.size}onSubscribe(){}onUnsubscribe(){}},isServer="undefined"==typeof window||"Deno"in globalThis;function noop$1(){}function isValidTimeout(e){return"number"==typeof e&&0<=e&&e!==1/0}function timeUntilStale(e,t){return Math.max(e+(t||0)-Date.now(),0)}function resolveStaleTime(e,t){return"function"==typeof e?e(t):e}function resolveEnabled(e,t){return"function"==typeof e?e(t):e}function hashKey(e){return JSON.stringify(e,(e,r)=>isPlainObject(r)?Object.keys(r).sort().reduce((e,t)=>(e[t]=r[t],e),{}):r)}function replaceEqualDeep(r,n){if(r===n)return r;var o=isPlainArray(r)&&isPlainArray(n);if(o||isPlainObject(r)&&isPlainObject(n)){var a=o?r:Object.keys(r),e=a.length,i=o?n:Object.keys(n),s=i.length,l=o?[]:{};let t=0;for(let e=0;e<s;e++){var u=o?e:i[e];(!o&&a.includes(u)||o)&&void 0===r[u]&&void 0===n[u]?(l[u]=void 0,t++):(l[u]=replaceEqualDeep(r[u],n[u]),l[u]===r[u]&&void 0!==r[u]&&t++)}return e===s&&t===e?r:l}return n}function shallowEqualObjects(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e)if(e[r]!==t[r])return!1;return!0}function isPlainArray(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function isPlainObject(e){var t;return!!hasObjectPrototype(e)&&(void 0===(t=e.constructor)||!!hasObjectPrototype(t=t.prototype)&&!!t.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function hasObjectPrototype(e){return"[object Object]"===Object.prototype.toString.call(e)}function replaceData(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?replaceEqualDeep(e,t):t}var FocusManager=class extends Subscribable{#focused;#cleanup;#setup;constructor(){super(),this.#setup=t=>{if(!isServer&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#cleanup||this.setEventListener(this.#setup)}onUnsubscribe(){this.hasListeners()||(this.#cleanup?.(),this.#cleanup=void 0)}setEventListener(e){this.#setup=e,this.#cleanup?.(),this.#cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#focused!==e&&(this.#focused=e,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#focused?this.#focused:"hidden"!==globalThis.document?.visibilityState}},focusManager=new FocusManager,OnlineManager=class extends Subscribable{#online=!0;#cleanup;#setup;constructor(){super(),this.#setup=r=>{if(!isServer&&window.addEventListener){let e=()=>r(!0),t=()=>r(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}}}onSubscribe(){this.#cleanup||this.setEventListener(this.#setup)}onUnsubscribe(){this.hasListeners()||(this.#cleanup?.(),this.#cleanup=void 0)}setEventListener(e){this.#setup=e,this.#cleanup?.(),this.#cleanup=e(this.setOnline.bind(this))}setOnline(t){this.#online!==t&&(this.#online=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#online}},onlineManager=new OnlineManager;function pendingThenable(){let r,n,t=new Promise((e,t)=>{r=e,n=t});function o(e){Object.assign(t,e),delete t.resolve,delete t.reject}return t.status="pending",t.catch(()=>{}),t.resolve=e=>{o({status:"fulfilled",value:e}),r(e)},t.reject=e=>{o({status:"rejected",reason:e}),n(e)},t}function canFetch(e){return"online"!==(e??"online")||onlineManager.isOnline()}function createNotifyManager(){let r=[],n=0,o=e=>{e()},a=e=>{e()},i=e=>setTimeout(e,0),s=e=>{n?r.push(e):i(()=>{o(e)})};return{batch:e=>{let t;n++;try{t=e()}finally{--n||(()=>{let e=r;r=[],e.length&&i(()=>{a(()=>{e.forEach(e=>{o(e)})})})})()}return t},batchCalls:t=>(...e)=>{s(()=>{t(...e)})},schedule:s,setNotifyFunction:e=>{o=e},setBatchNotifyFunction:e=>{a=e},setScheduler:e=>{i=e}}}var notifyManager=createNotifyManager();function fetchState(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var QueryObserver=class extends Subscribable{constructor(e,t){super(),this.options=t,this.#client=e,this.#selectError=null,this.#currentThenable=pendingThenable(),this.options.experimental_prefetchInRender||this.#currentThenable.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#client;#currentQuery=void 0;#currentQueryInitialState=void 0;#currentResult=void 0;#currentResultState;#currentResultOptions;#currentThenable;#selectError;#selectFn;#selectResult;#lastQueryWithDefinedData;#staleTimeoutId;#refetchIntervalId;#currentRefetchInterval;#trackedProps=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#currentQuery.addObserver(this),shouldFetchOnMount(this.#currentQuery,this.options)?this.#executeFetch():this.updateResult(),this.#updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(this.#currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(this.#currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#clearStaleTimeout(),this.#clearRefetchInterval(),this.#currentQuery.removeObserver(this)}setOptions(e,t){var r=this.options,n=this.#currentQuery;if(this.options=this.#client.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof resolveEnabled(this.options.enabled,this.#currentQuery))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#updateQuery(),this.#currentQuery.setOptions(this.options),r._defaulted&&!shallowEqualObjects(this.options,r)&&this.#client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#currentQuery,observer:this});e=this.hasListeners(),e&&shouldFetchOptionally(this.#currentQuery,n,this.options,r)&&this.#executeFetch(),this.updateResult(t),!e||this.#currentQuery===n&&resolveEnabled(this.options.enabled,this.#currentQuery)===resolveEnabled(r.enabled,this.#currentQuery)&&resolveStaleTime(this.options.staleTime,this.#currentQuery)===resolveStaleTime(r.staleTime,this.#currentQuery)||this.#updateStaleTimeout(),t=this.#computeRefetchInterval();!e||this.#currentQuery===n&&resolveEnabled(this.options.enabled,this.#currentQuery)===resolveEnabled(r.enabled,this.#currentQuery)&&t===this.#currentRefetchInterval||this.#updateRefetchInterval(t)}getOptimisticResult(e){var t=this.#client.getQueryCache().build(this.#client,e),t=this.createResult(t,e);return shouldAssignObserverCurrentProperties(this,t)&&(this.#currentResult=t,this.#currentResultOptions=this.options,this.#currentResultState=this.#currentQuery.state),t}getCurrentResult(){return this.#currentResult}trackResult(t,r){let n={};return Object.keys(t).forEach(e=>{Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(e),r?.(e),t[e])})}),n}trackProp(e){this.#trackedProps.add(e)}getCurrentQuery(){return this.#currentQuery}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#client.defaultQueryOptions(e),r=this.#client.getQueryCache().build(this.#client,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#executeFetch({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#currentResult))}#executeFetch(e){this.#updateQuery();let t=this.#currentQuery.fetch(this.options,e);return t=e?.throwOnError?t:t.catch(noop$1)}#updateStaleTimeout(){this.#clearStaleTimeout();var e=resolveStaleTime(this.options.staleTime,this.#currentQuery);isServer||this.#currentResult.isStale||!isValidTimeout(e)||(e=timeUntilStale(this.#currentResult.dataUpdatedAt,e),this.#staleTimeoutId=setTimeout(()=>{this.#currentResult.isStale||this.updateResult()},e+1))}#computeRefetchInterval(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#currentQuery):this.options.refetchInterval)??!1}#updateRefetchInterval(e){this.#clearRefetchInterval(),this.#currentRefetchInterval=e,!isServer&&!1!==resolveEnabled(this.options.enabled,this.#currentQuery)&&isValidTimeout(this.#currentRefetchInterval)&&0!==this.#currentRefetchInterval&&(this.#refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&this.#executeFetch()},this.#currentRefetchInterval))}#updateTimers(){this.#updateStaleTimeout(),this.#updateRefetchInterval(this.#computeRefetchInterval())}#clearStaleTimeout(){this.#staleTimeoutId&&(clearTimeout(this.#staleTimeoutId),this.#staleTimeoutId=void 0)}#clearRefetchInterval(){this.#refetchIntervalId&&(clearInterval(this.#refetchIntervalId),this.#refetchIntervalId=void 0)}createResult(e,t){var r=this.#currentQuery,n=this.options,o=this.#currentResult,a=this.#currentResultState,i=this.#currentResultOptions,s=e!==r?e.state:this.#currentQueryInitialState,l=e.state;let u={...l},c=!1,p,{error:d,errorUpdatedAt:h,status:f}=(t._optimisticResults&&(y=!(m=this.hasListeners())&&shouldFetchOnMount(e,t),m=m&&shouldFetchOptionally(e,r,t,n),(y||m)&&(u={...u,...fetchState(l.data,e.options)}),"isRestoring"===t._optimisticResults)&&(u.fetchStatus="idle"),u);if(t.select&&void 0!==u.data)if(o&&u.data===a?.data&&t.select===this.#selectFn)p=this.#selectResult;else try{this.#selectFn=t.select,p=t.select(u.data),p=replaceData(o?.data,p,t),this.#selectResult=p,this.#selectError=null}catch(e){this.#selectError=e}else p=u.data;if(void 0!==t.placeholderData&&void 0===p&&"pending"===f){let e;if(o?.isPlaceholderData&&t.placeholderData===i?.placeholderData)e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#lastQueryWithDefinedData?.state.data,this.#lastQueryWithDefinedData):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#selectError=null}catch(e){this.#selectError=e}void 0!==e&&(f="success",p=replaceData(o?.data,e,t),c=!0)}this.#selectError&&(d=this.#selectError,p=this.#selectResult,h=Date.now(),f="error");var n="fetching"===u.fetchStatus,y="pending"===f,m="error"===f,l=y&&n,a=void 0!==p;let g={status:f,fetchStatus:u.fetchStatus,isPending:y,isSuccess:"success"===f,isError:m,isInitialLoading:l,isLoading:l,data:p,dataUpdatedAt:u.dataUpdatedAt,error:d,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:0<u.dataUpdateCount||0<u.errorUpdateCount,isFetchedAfterMount:u.dataUpdateCount>s.dataUpdateCount||u.errorUpdateCount>s.errorUpdateCount,isFetching:n,isRefetching:n&&!y,isLoadingError:m&&!a,isPaused:"paused"===u.fetchStatus,isPlaceholderData:c,isRefetchError:m&&a,isStale:isStale(e,t),refetch:this.refetch,promise:this.#currentThenable};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===g.status?e.reject(g.error):void 0!==g.data&&e.resolve(g.data)};var x=()=>{var e=this.#currentThenable=g.promise=pendingThenable();t(e)},b=this.#currentThenable;switch(b.status){case"pending":e.queryHash===r.queryHash&&t(b);break;case"fulfilled":"error"!==g.status&&g.data===b.value||x();break;case"rejected":"error"===g.status&&g.error===b.reason||x()}}return g}updateResult(e){let r=this.#currentResult;var t=this.createResult(this.#currentQuery,this.options);this.#currentResultState=this.#currentQuery.state,this.#currentResultOptions=this.options,void 0!==this.#currentResultState.data&&(this.#lastQueryWithDefinedData=this.#currentQuery),shallowEqualObjects(t,r)||(this.#currentResult=t,!(t={})!==e?.listeners&&(()=>{if(!r)return!0;var e=this.options.notifyOnChangeProps,e="function"==typeof e?e():e;if("all"===e||!e&&!this.#trackedProps.size)return!0;let t=new Set(e??this.#trackedProps);return this.options.throwOnError&&t.add("error"),Object.keys(this.#currentResult).some(e=>this.#currentResult[e]!==r[e]&&t.has(e))})()&&(t.listeners=!0),this.#notify({...t,...e}))}#updateQuery(){var e,t=this.#client.getQueryCache().build(this.#client,this.options);t!==this.#currentQuery&&(e=this.#currentQuery,this.#currentQuery=t,this.#currentQueryInitialState=t.state,this.hasListeners())&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#updateTimers()}#notify(e){notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#currentResult)}),this.#client.getQueryCache().notify({query:this.#currentQuery,type:"observerResultsUpdated"})})}};function shouldLoadOnMount(e,t){return!1!==resolveEnabled(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}function shouldFetchOnMount(e,t){return shouldLoadOnMount(e,t)||void 0!==e.state.data&&shouldFetchOn(e,t,t.refetchOnMount)}function shouldFetchOn(e,t,r){return!1!==resolveEnabled(t.enabled,e)&&("always"===(r="function"==typeof r?r(e):r)||!1!==r&&isStale(e,t))}function shouldFetchOptionally(e,t,r,n){return(e!==t||!1===resolveEnabled(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&isStale(e,r)}function isStale(e,t){return!1!==resolveEnabled(t.enabled,e)&&e.isStaleByTime(resolveStaleTime(t.staleTime,e))}function shouldAssignObserverCurrentProperties(e,t){return!shallowEqualObjects(e.getCurrentResult(),t)}var MutationObserver=class extends Subscribable{#client;#currentResult=void 0;#currentMutation;#mutateOptions;constructor(e,t){super(),this.#client=e,this.setOptions(t),this.bindMethods(),this.#updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t=this.options;this.options=this.#client.defaultMutationOptions(e),shallowEqualObjects(this.options,t)||this.#client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#currentMutation,observer:this}),t?.mutationKey&&this.options.mutationKey&&hashKey(t.mutationKey)!==hashKey(this.options.mutationKey)?this.reset():"pending"===this.#currentMutation?.state.status&&this.#currentMutation.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#currentMutation?.removeObserver(this)}onMutationUpdate(e){this.#updateResult(),this.#notify(e)}getCurrentResult(){return this.#currentResult}reset(){this.#currentMutation?.removeObserver(this),this.#currentMutation=void 0,this.#updateResult(),this.#notify()}mutate(e,t){return this.#mutateOptions=t,this.#currentMutation?.removeObserver(this),this.#currentMutation=this.#client.getMutationCache().build(this.#client,this.options),this.#currentMutation.addObserver(this),this.#currentMutation.execute(e)}#updateResult(){var e=this.#currentMutation?.state??getDefaultState();this.#currentResult={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#notify(r){notifyManager.batch(()=>{var e,t;this.#mutateOptions&&this.hasListeners()&&(e=this.#currentResult.variables,t=this.#currentResult.context,"success"===r?.type?(this.#mutateOptions.onSuccess?.(r.data,e,t),this.#mutateOptions.onSettled?.(r.data,null,e,t)):"error"===r?.type&&(this.#mutateOptions.onError?.(r.error,e,t),this.#mutateOptions.onSettled?.(void 0,r.error,e,t))),this.listeners.forEach(e=>{e(this.#currentResult)})})}},QueryClientContext=reactExports.createContext(void 0),useQueryClient=e=>{var t=reactExports.useContext(QueryClientContext);if(t)return t;throw new Error("No QueryClient set, use QueryClientProvider to set one")},IsRestoringContext=reactExports.createContext(!1),useIsRestoring=()=>reactExports.useContext(IsRestoringContext);function createValue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}IsRestoringContext.Provider;var QueryErrorResetBoundaryContext=reactExports.createContext(createValue()),useQueryErrorResetBoundary=()=>reactExports.useContext(QueryErrorResetBoundaryContext);function shouldThrowError(e,t){return"function"==typeof e?e(...t):!!e}function noop(){}var ensurePreventErrorBoundaryRetry=(e,t)=>{!(e.suspense||e.throwOnError||e.experimental_prefetchInRender)||t.isReset()||(e.retryOnMount=!1)},useClearResetErrorBoundary=e=>{reactExports.useEffect(()=>{e.clearReset()},[e])},getHasError=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&shouldThrowError(r,[e.error,n]),ensureSuspenseTimers=e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime)&&(e.gcTime=Math.max(e.gcTime,1e3))},willFetch=(e,t)=>e.isLoading&&e.isFetching&&!t,shouldSuspend=(e,t)=>e?.suspense&&t.isPending,fetchOptimistic=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function useBaseQuery(e,t,r){let n=useQueryClient(),o=useIsRestoring();var a=useQueryErrorResetBoundary();let i=n.defaultQueryOptions(e);n.getDefaultOptions().queries?._experimental_beforeQuery?.(i),i._optimisticResults=o?"isRestoring":"optimistic",ensureSuspenseTimers(i),ensurePreventErrorBoundaryRetry(i,a),useClearResetErrorBoundary(a);e=!n.getQueryCache().get(i.queryHash);let[s]=reactExports.useState(()=>new t(n,i));var l=s.getOptimisticResult(i);if(reactExports.useSyncExternalStore(reactExports.useCallback(e=>{e=o?noop:s.subscribe(notifyManager.batchCalls(e));return s.updateResult(),e},[s,o]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),reactExports.useEffect(()=>{s.setOptions(i,{listeners:!1})},[i,s]),shouldSuspend(i,l))throw fetchOptimistic(i,s,a);if(getHasError({result:l,errorResetBoundary:a,throwOnError:i.throwOnError,query:n.getQueryCache().get(i.queryHash)}))throw l.error;return n.getDefaultOptions().queries?._experimental_afterQuery?.(i,l),i.experimental_prefetchInRender&&!isServer&&willFetch(l,o)&&(e?fetchOptimistic(i,s,a):n.getQueryCache().get(i.queryHash)?.promise)?.catch(noop).finally(()=>{s.updateResult()}),i.notifyOnChangeProps?l:s.trackResult(l)}function useQuery(e,t){return useBaseQuery(e,QueryObserver)}function useMutation(e,t){let r=useQueryClient(),[n]=reactExports.useState(()=>new MutationObserver(r,e));reactExports.useEffect(()=>{n.setOptions(e)},[n,e]);var o=reactExports.useSyncExternalStore(reactExports.useCallback(e=>n.subscribe(notifyManager.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=reactExports.useCallback((e,t)=>{n.mutate(e,t).catch(noop)},[n]);if(o.error&&shouldThrowError(n.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}var SHARED_TEXT={resetPasswordTitle:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.title",defaultMessage:"New password required",description:"Title of the reset password widget"}),inviteResetPasswordTitle:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.inviteTitle",defaultMessage:"Please create a password for your aiWARE account.",description:"Title of the reset password widget when resulting from an invite"}),resetPasswordSubHeader:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.subHeader",defaultMessage:"A strong password contains a mix of numbers, letters and symbols. It is hard to guess, does not resemble a real word and is only used for this account.",description:"Description of the reset password widget"}),passwordRequirements:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.passwordRequirements",defaultMessage:"Password requirements",description:"Heading of password requirements"}),resetPasswordSubmitButton:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.submitButton",defaultMessage:"Change Password",description:"Text of submit button for reset password"}),inviteResetPasswordSubmitButton:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.inviteSubmitButton",defaultMessage:"Set Password",description:"Text of submit button for reset password when resulting from an invite"}),createAccountButton:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.sign-up-password.createAccountButton",defaultMessage:"Create Account",description:"Text of create account button for sign up password"}),lengthCheck:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.lengthCheck",defaultMessage:"8 Character minimum",description:"The error message for the lengthCheck."}),pastPasswordCheck:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.pastPasswordCheck",defaultMessage:"Not identical to last 10 passwords",description:"The error message for the pastPasswordCheck."}),userNameCheck:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.userNameCheck",defaultMessage:"Not the same as account email",description:"The error message for the userNameCheck."}),dictionaryCheck:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.dictionaryCheck",defaultMessage:"No dictionary passwords",description:"The error message for the dictionaryCheck."}),passwordsNotMatching:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.passwordsNotMatching",defaultMessage:"Passwords not matching",description:"The error message for the passwords not matching."}),invalidTokenOrUsername:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.invalidTokenOrUsername",defaultMessage:"Error! Missing token or username.",description:"The error message for the missing token or username."}),passwordComplexityCheckSymbols:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.passwordComplexityCheckSymbols",defaultMessage:"Requires 1 lowercase, 1 uppercase, 1 number, and 1 symbol.",description:"The error message for the check symbols error."}),passwordComplexityCheckDays:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.passwordComplexityCheckDays",defaultMessage:"Cannot be changed twice within 10 days.",description:"The error message for the days error."})},baseUrl="https://api.us-1.veritone.com/v3/graphql",hubUrl="https://hub.aiware.com/hub/v1",stripePublishableKey="pk_live_51NNcicInolL392yPxizaLizsnPFeNfU1QgFBOG7bB44OLhLcQDc7CyH8hlyweN6VDDLr2lB9lLyiUh1KGBaSEjPS00uSQ1sFFP",stripePricingPlanId="prctbl_1Nj36dInolL392yPggkeo88e",sentryDSN="https://fddcba0905af4851ac01fa9f031df814@o57583.ingest.sentry.io/4505172433043456",disableEnvironmentDiscovery=!1,switchAppUrl="https://api.us-1.veritone.com/api/admin/switch-app",signupUrl="",instanceUrls=[{aiwareInstanceName:"aiWARE US",coreAdminApiUrl:"https://api.us-1.veritone.com/api/admin",coreGraphqlApiUrl:"https://api.us-1.veritone.com/v3/graphql"},{aiwareInstanceName:"aiWARE UK",coreAdminApiUrl:"https://api.uk-1.veritone.com/api/admin",coreGraphqlApiUrl:"https://api.uk-1.veritone.com/v3/graphql"},{aiwareInstanceName:"aiWARE CA",coreAdminApiUrl:"https://api.ca-1.veritone.com/api/admin",coreGraphqlApiUrl:"https://api.ca-1.veritone.com/v3/graphql"}],prodConfigs={baseUrl:baseUrl,hubUrl:hubUrl,stripePublishableKey:stripePublishableKey,stripePricingPlanId:stripePricingPlanId,sentryDSN:sentryDSN,disableEnvironmentDiscovery:disableEnvironmentDiscovery,switchAppUrl:switchAppUrl,signupUrl:signupUrl,instanceUrls:instanceUrls};function getConfig(){var e=window.aiwareConfig;return e?JSON.parse(JSON.stringify(e)):prodConfigs}function getRestApiUrlFromConfig(){return getConfig().baseUrl.replace("/v3/graphql","")}function parseToken(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";try{var t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(r)}catch(e){return console.log(e),null}}var envChecker=function(t){return window.location.href.split("://")[1].split(".").find(function(e){return e===t})},envDetector=function(){return envChecker("local")||envChecker("dev")||window.location.href.includes("localhost")?"dev":envChecker("stage")?"stage":"prod"},getCookie=function(e){for(var t=document.cookie.split("; "),r=0;r<t.length;r++){var n=t[r].split("=");if(e===decodeURIComponent(n[0]))return decodeURIComponent(n[1])}return null},setCookie=function(e,t,r){var n=new Date,r=(n.setTime(n.getTime()+24*r*60*60*1e3),"expires=".concat(n.toUTCString()));document.cookie="".concat(e,"=").concat(encodeURIComponent(t),"; ").concat(r,"; path=/")};function _define_property$a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$7(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$a(t,e,r[e])})}return t}var Header=function(e){var t=e.text,r=e.subText,n=e.type,e=e.sx;return jsxRuntimeExports.jsxs(Box,{sx:{marginBottom:"30px",textAlign:"center"},children:[jsxRuntimeExports.jsx(Typography,{sx:_object_spread$7({fontFamily:"Nunito",fontSize:"22px",lineHeight:"28px",letterSpacing:"-1.30385e-09px",color:"#2A323C"},void 0===e?{}:e),"data-testid":"os-auth-header-text-".concat(n),children:t}),r&&jsxRuntimeExports.jsx(Typography,{sx:{fontFamily:"Nunito",fontSize:"16px",lineHeight:"22px",textAlign:"center",letterSpacing:"-1.30385e-09px",color:"#5C6269",overflow:"hidden",textOverflow:"ellipsis"},"data-testid":"os-auth-subheader-text-".concat(n),children:r})]})},useStyles$7=makeStyles()(function(e){return{title:{textTransform:"initial",fontSize:22,marginBottom:e.spacing(4)},subHeader:{color:"#9CA8B4"},h6:{color:"#27292B"},requirements:{listStyle:"disc",padding:0,marginLeft:e.spacing(5),"& li":{marginBottom:e.spacing(1),color:"#27292B",fontSize:14,fontWeight:400,"&.requirementError":{color:"#D50000"}}},submitButton:{height:55,background:"#214167",fontSize:18,width:"100%",maxWidth:380,textTransform:"uppercase"},text:{fontFamily:"Nunito",fontWeight:400,fontSize:"22px",lineHeight:"18px",letterSpacing:"-1.30385e-09px",color:"#2A323C"},subText:{fontFamily:"'Nunito Sans'",fontWeight:400,fontSize:"16px",lineHeight:"22px",textAlign:"center",letterSpacing:"-1.30385e-09px",color:"#5C6269"}}}),useStyles$6=makeStyles()(function(e,t){var r="auto";return t.error?r="red":t.passwordRequirementsMet||(r="rgba(0, 0, 0, 0.26)"),{passwordLabel:{background:"white",padding:"0 3px"},passwordFormMarginTop:{marginTop:"20px"},passwordInput:{width:"368px",maxWidth:"85vw"},confirmPasswordLabel:{color:r,"&.Mui-focused":{color:r}}}}),usePasswordRequirementStyles=makeStyles()(function(){return{container:{width:"368px",maxWidth:"85vw",display:"flex",alignItems:"center",justifyContent:"center"},barContainer:{display:"flex",width:"100%",justifyContent:"space-between",padding:"15px 0px"},bar:{width:"23%",height:"4px",borderRadius:"20px"},metRequirement:{color:"#9CA8B4",textDecorationLine:"line-through"},unmetRequirement:{color:"#5C6269"},requirement:{display:"flex",alignItems:"center"},bullet:{transform:"translateY(8px)",marginLeft:"5px"},checkMark:{fill:"#0E6EEC",marginRight:"8px",marginLeft:"-3px"}}});function _define_property$9(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$6(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$9(t,e,r[e])})}return t}var DEFAULT_BUTTON_COLOR="#212121",DEFAULT_BUTTON_TEXT_COLOR="#FFFFFF",BlackButton=function(e){var t=e.onClick,r=e.text,n=e.type,o=e.loading,a=e.disableButton,i=e.sx,i=void 0===i?{}:i,s=e.ref,l=e.className,u=e.buttonColor,c=e.buttonTextColor,p=e.buttonType,p=void 0===p?"button":p,e=e.testId,e=void 0===e?"":e,d="".concat(u||DEFAULT_BUTTON_COLOR,"!important"),c="".concat(c||DEFAULT_BUTTON_TEXT_COLOR,"!important"),e=e||"os-auth--".concat(n,"-btn");return jsxRuntimeExports.jsx(LoadingButton,{color:"primary",variant:"contained",onClick:t,loading:o,type:p,ref:s,sx:_object_spread$6({textTransform:"none",fontSize:"18px",lineHeight:"24px",fontFamily:"Nunito",fontWeight:600,width:"100%",height:"56px",borderRadius:"50px",background:"".concat(d),backgroundColor:"".concat(d),color:c,"&.MuiButton-root:not(:disabled):not(:hover), .MuiButton-root:not(:disabled):not(:hover)":{background:d,backgroundColor:d,color:c},"&:hover":{background:d,backgroundColor:d,color:c,opacity:.9},":disabled":{backgroundColor:"#c3c3c3!important"},border:"1px solid ".concat(u)},i),className:l||void 0,"data-testid":e,disabled:a,children:r})};function _array_like_to_array$j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$j(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array$j(e)}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$j(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$j(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$j(e,t){return _array_with_holes$j(e)||_iterable_to_array_limit$j(e,t)||_unsupported_iterable_to_array$j(e,t)||_non_iterable_rest$j()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array$j(e)||_non_iterable_spread()}function _unsupported_iterable_to_array$j(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$j(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$j(e,t):void 0}var PasswordRequirements=function(e){var s=e.password,l=e.setPasswordRequirementsMet,e=window.innerWidth<=850,r=usePasswordRequirementStyles().classes,u=[{id:"upperLower",label:"Upper & lower case letters",regex:new RegExp("(?=.*[a-z])(?=.*[A-Z])","g"),met:!1},{id:"length",label:"At least 8 characters",regex:new RegExp(".{8}$"),met:!1},{id:"specialCharacter",label:"A symbol (#$&!)",regex:new RegExp("[^a-zA-Z0-9]"),met:!1}],t=_sliced_to_array$j(reactExports.useState(u),2),n=t[0],c=t[1],o={0:"#FF5722",1:"#FFC107",2:"#00BCD4",3:"#4CAF50"};return reactExports.useEffect(function(){var e=_to_consumable_array(u),t=!0,r=!1,n=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;i.regex.test(s)&&(i.met=!0)}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}e.find(function(e){return!e.met})?l(!1):l(!0),c(e)},[s]),jsxRuntimeExports.jsx(Box$1,{className:r.container,"data-testid":"sign-up.password-requirements.pop-up",children:jsxRuntimeExports.jsxs(Box$1,{sx:{boxSizing:"border-box",padding:"15px 20px",width:"100%",marginTop:"10px",marginBottom:"10px",borderRadius:"5px",marginRight:e?void 0:"15px",boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.20)",backgroundColor:"rgb(255, 255,255)","&::before":e?{}:{backgroundColor:"white",content:'""',display:"block",position:"absolute",width:12,height:12,top:"calc(50% - 6px)",transform:"rotate(45deg)",left:"calc(100% - 20px)"}},children:[jsxRuntimeExports.jsx(Typography,{variant:"body1","data-testid":"sign-up.password-requirements.pop-up.message",children:s?{0:"Weak Password",1:"Average Password",2:"Good Password",3:"Strong Password 💪"}[n.filter(function(e){return e.met}).length]:"Please set a strong password"}),jsxRuntimeExports.jsx(Box$1,{className:r.barContainer,children:Array.from(Array(4).keys()).map(function(e){var t=n.filter(function(e){return e.met}).length;return jsxRuntimeExports.jsx(Box$1,{className:r.bar,sx:{background:e<=t&&s?o[t]:"#9CA8B4"}},e)})}),jsxRuntimeExports.jsx(Stack,{sx:{gap:e?void 0:"13px"},children:n.map(function(e){return jsxRuntimeExports.jsxs(Box$1,{className:classNames(r.requirement,e.met?r.metRequirement:r.unmetRequirement),children:[e.met?jsxRuntimeExports.jsx(CheckmarkFilled,{className:r.checkMark}):jsxRuntimeExports.jsx(Bullet,{className:r.bullet}),jsxRuntimeExports.jsx(Typography,{variant:"body2",children:e.label})]},e.id)})})]})})},SLICE_NAME="signUp",namespace="initStep";function _array_like_to_array$i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$i(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$i(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$i(e,t){return _array_with_holes$i(e)||_iterable_to_array_limit$i(e,t)||_unsupported_iterable_to_array$i(e,t)||_non_iterable_rest$i()}function _unsupported_iterable_to_array$i(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$i(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$i(e,t):void 0}var initialState={env:"",status:"idle",activeStep:1,1:{email:"",firstName:"",lastName:""},2:{orgName:"",teamSize:"",country:"",industry:""},errors:{1:{email:!1,firstName:!1,lastName:!1},2:{orgName:!1,country:!1}},userUUID:"",userEmail:"",organizationUUID:""};function isKeyOfObject(e,t){return e in t}function validateEmail$1(e){return e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)}var signUpSlice=createSlice({name:"".concat(SLICE_NAME,"/").concat(namespace),initialState:initialState,reducers:{setStep:function(e,t){e.activeStep=t.payload},setValue:function(e,t){var t=t.payload,r=t.key,t=t.value;isKeyOfObject(r,e[e.activeStep])&&(e[e.activeStep][r]=t,isKeyOfObject(r,e.errors[e.activeStep]))&&(e.errors[e.activeStep][r]=!1)},validate:function(e){var t=!0,r=!1,n=void 0;try{for(var o,a=Object.entries(e[e.activeStep])[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=_sliced_to_array$i(o.value,2),s=i[0],l=i[1];isKeyOfObject(s,e.errors[e.activeStep])&&!l&&(e.errors[e.activeStep][s]=!0)}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}1!==e.activeStep||validateEmail$1(e[1].email)||(e.errors[1].email=!0)},createUserStart:function(e){e.status="loading"},createUserSuccess:function(e){e.status="success"},createUserFailure:function(e){e.status="failure"},setEnv:function(e,t){t=t.payload,t="https://hub".concat("prod"===t?"":"."+t,".aiware.com");e.env=t},resetState:function(){return initialState},activateUserStart:function(e,t){e.status="loading"},activateUserSuccess:function(e){e.status="success"},activateUserFailure:function(e){e.status="failure"}}}),actions=signUpSlice.actions,signUpSlice$1=signUpSlice.reducer,selectStatus=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.status},selectActiveStep=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.activeStep},selectFormValues=function(e){var t;return null==e||null==(t=e[SLICE_NAME])?void 0:t[null==e||null==(t=e[SLICE_NAME])?void 0:t.activeStep]},selectErrors=function(e){var t;return null==e||null==(t=e[SLICE_NAME])||null==(t=t.errors)?void 0:t[null==e||null==(t=e[SLICE_NAME])?void 0:t.activeStep]},selectCreateUserPayload=function(e){var e=(null==e?void 0:e[SLICE_NAME])||{1:{},2:{}},t=e[1],r=t.email,n=t.firstName,t=t.lastName,e=e[2],o=e.orgName,a=e.teamSize,i=e.country,e=e.industry;return{userFirstName:n.trim(),userLastName:t.trim(),userEmail:r,userPhoneNumber:"",userOccupation:"",userCompany:"",organizationName:o.trim(),salesforceAttributes:JSON.stringify({teamSize:a,country:i,industry:e})}};function asyncGeneratorStep$9(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$9(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$9(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$9(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$8(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$5(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$8(t,e,r[e])})}return t}function ownKeys$3(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$3(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$3(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _object_without_properties(e,t){if(null==e)return{};var r,n=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),a=0;a<o.length;a++)r=o[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function _object_without_properties_loose(e,t){if(null==e)return{};for(var r,n={},o=Object.keys(e),a=0;a<o.length;a++)r=o[a],0<=t.indexOf(r)||(n[r]=e[r]);return n}function _ts_generator$c(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var getOrgOpenIdProviders=(()=>{var r=_async_to_generator$9(function(t,r){var n,o,a,i;return _ts_generator$c(this,function(e){switch(e.label){case 0:n=[],o=(r||getRestApiUrlFromConfig())+"/api/admin/openid/org/"+t,e.label=1;case 1:return e.trys.push([1,6,,7]),[4,fetch(o)];case 2:return 200!==(a=e.sent()).status?[3,4]:[4,a.json()];case 3:return i=e.sent(),n=i.results,[3,5];case 4:window.DEBUG&&console.error("was not able to retrieve global open id providers",a),n=[],e.label=5;case 5:return[3,7];case 6:return i=e.sent(),window.DEBUG&&console.error("was not able to retrieve global open id providers",i),n=[],[3,7];case 7:return[2,n]}})});return function(e,t){return r.apply(this,arguments)}})(),linkUserToOidAndLogin=function(e,t,r){return fetch(getRestApiUrlFromConfig()+"/api/admin/openid/linkUserToOid",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({userName:e,password:t,sessionKey:r})})},getUserInstances=(()=>{var t=_async_to_generator$9(function(t){var r,n;return _ts_generator$c(this,function(e){switch(e.label){case 0:r="/aiware_user_instances?email=".concat(t,"&limit=1000&offset=0"),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(getConfig().hubUrl+r,{method:"GET",headers:{"Content-Type":"application/json; charset=utf-8"}})];case 2:if((n=e.sent()).ok)return[4,n.json()];throw new Error("Something went wrong while loading user instances.");case 3:return[2,e.sent()];case 4:return n=e.sent(),devErrorLogger(n),[2,null];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),userLoginMutation=(()=>{var o=_async_to_generator$9(function(t,r,n,o){var a,i,s;return _ts_generator$c(this,function(e){switch(e.label){case 0:a=o||getConfig().baseUrl,i={query:"\n mutation UserLogin($input: UserLogin!) {\n userLogin(input: $input) {\n token\n }\n }\n ",variables:{input:{userName:t,password:r,allowVanityDomain:n}}},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,fetch(a,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(i)})];case 2:return[2,e.sent()];case 3:return s=e.sent(),devErrorLogger(s),[2,null];case 4:return[2]}})});return function(e,t,r,n){return o.apply(this,arguments)}})(),createPasswordResetRequestMutation=(()=>{var t=_async_to_generator$9(function(t){var r,n,o;return _ts_generator$c(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,n={query:"\n mutation createPasswordResetRequest($input: CreatePasswordResetRequest!) {\n createPasswordResetRequest(input: $input) {\n message\n }\n }\n ",variables:{input:{userName:t}}},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,fetch(r,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(n)})];case 2:return[2,e.sent()];case 3:return o=e.sent(),devErrorLogger(o),[2,null];case 4:return[2]}})});return function(e){return t.apply(this,arguments)}})(),createUserInHub=(()=>{var t=_async_to_generator$9(function(t){var r,n,o,a,i;return _ts_generator$c(this,function(e){switch(e.label){case 0:r="/admin/users",n="/ui/auth/activate?token=%token%&username=%username%",a=window.location.protocol,i=window.location.hostname,o=window.location.port,a="".concat(a,"//").concat(i,":").concat(o),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(getConfig().hubUrl+r,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(_object_spread_props$3(_object_spread$5({},t),{userUrl:a+n}))})];case 2:return[4,e.sent().json()];case 3:return e.sent().success?[2,!0]:[2,!1];case 4:return i=e.sent(),devErrorLogger(i),[2,!1];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),activateUser=(()=>{var n=_async_to_generator$9(function(t,r,n){var o,a,i,s;return _ts_generator$c(this,function(e){switch(e.label){case 0:o="/admin/users/".concat(r,"/activate"),e.label=1;case 1:return e.trys.push([1,4,,5]),a={request:{userInviteToken:n,userPassword:t}},[4,fetch(getConfig().hubUrl+o,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(a)})];case 2:return[4,e.sent().json()];case 3:return a=e.sent(),s=a.success,i=a.result.organizationUUID,s&&i?[2,i]:[2,!1];case 4:return s=e.sent(),devErrorLogger(s),[2,!1];case 5:return[2]}})});return function(e,t,r){return n.apply(this,arguments)}})(),getLoginConfigBySlug=(()=>{var t=_async_to_generator$9(function(t){var r,n,o,a,i,s;return _ts_generator$c(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,n="loginConfigBySlug",o="loginConfiguration",a="\n query ".concat(n,"($slug: String!) {\n ").concat(o," (slug: $slug) {\n name\n enabled\n organizationInfo {\n id\n name\n }\n logo\n buttonColor\n buttonTextColor\n hideVeritoneBranding\n }\n }\n "),i={slug:t},e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:a,operationName:n,variables:i})})];case 2:return[4,e.sent().json()];case 3:return(s=e.sent(),null!=(s=null==s||null==(s=s.data)?void 0:s[o])&&s.name)?[2,s]:[2,null];case 4:return s=e.sent(),devErrorLogger(JSON.stringify(s)),[2,null];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),getSignUpConfig=(()=>{var r=_async_to_generator$9(function(t,r){var n,o,a,i,s,l;return _ts_generator$c(this,function(e){switch(e.label){case 0:n=getConfig().baseUrl,a=o="registrationConfigurationInfo",i="\n query ".concat(o,"($slug: String, $id: ID) {\n ").concat(a," (slug: $slug, id: $id) {\n id\n name\n slug\n files {\n fileId\n name\n url\n type\n status\n }\n uiSettings {\n logo\n veritoneBranding\n customRegistrationFields\n registrationButtonStyle\n }\n }\n }\n "),s={slug:t,id:r},e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:i,operationName:o,variables:s})})];case 2:return[4,e.sent().json()];case 3:return(l=e.sent(),null!=(l=null==l||null==(l=l.data)?void 0:l[a])&&l.name)?[2,l]:[2,null];case 4:return l=e.sent(),devErrorLogger(JSON.stringify(l)),[2,null];case 5:return[2]}})});return function(e,t){return r.apply(this,arguments)}})(),getUserSettings=(()=>{var t=_async_to_generator$9(function(t){var r,n,o,a,i;return _ts_generator$c(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,n="getUserSettings",o="\n query ".concat(n," {\n me {\n id\n userSettings {\n key\n value\n }\n }\n }\n "),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({query:o,operationName:n})})];case 2:return[4,e.sent().json()];case 3:return i=e.sent(),a=(null==i||null==(a=i.data)||null==(a=a.me)?void 0:a.userSettings)||[],i=null==i||null==(i=i.data)||null==(i=i.me)?void 0:i.id,[2,{userSettings:a,userId:i}];case 4:return i=e.sent(),devErrorLogger(JSON.stringify(i)),[2,{userSettings:[],userId:null}];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),updateUserSetting=(()=>{var o=_async_to_generator$9(function(t,r,n,o){var a,i,s,l;return _ts_generator$c(this,function(e){switch(e.label){case 0:a=getConfig().baseUrl,i="updateUserSetting",s="\n mutation ".concat(i,"($input: UpdateUserSetting!) {\n updateUserSetting(input: $input) {\n key\n value\n }\n }\n "),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({query:s,operationName:i,variables:{input:{userId:r,key:n,value:o}}})})];case 2:return[4,e.sent().json()];case 3:return[2,e.sent()];case 4:return l=e.sent(),devErrorLogger(JSON.stringify(l)),[2,null];case 5:return[2]}})});return function(e,t,r,n){return o.apply(this,arguments)}})(),getMeQuery=(()=>{var t=_async_to_generator$9(function(t){var r,n,o,a,i;return _ts_generator$c(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,n="meQuery",o="me",a="\n query ".concat(n," {\n ").concat(o," {\n id\n }\n }\n "),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({query:a,operationName:n})})];case 2:return[4,e.sent().json()];case 3:return(i=e.sent(),null!=(i=null==i||null==(i=i.data)?void 0:i[o])&&i.id)?[2,i.id]:[2,null];case 4:return i=e.sent(),devErrorLogger(JSON.stringify(i)),[2,null];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),doesEmailExists=(()=>{var t=_async_to_generator$9(function(t){return _ts_generator$c(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getRestApiUrlFromConfig(),"/v1/admin/username/").concat(t,"/available")).then(function(e){return e.json()}).catch(function(e){return devErrorLogger(e),null})];case 1:return[2,e.sent()]}})});return function(e){return t.apply(this,arguments)}})(),sendSignUpEmailRegistration=(()=>{var t=_async_to_generator$9(function(t){var r,n,o;return _ts_generator$c(this,function(e){switch(e.label){case 0:return r=t.id,n=t.email,o=t.redirectUrl,[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/org/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,orgRegistrationId:r,redirectUrl:o})}).then(function(e){return e.json()}).catch(function(e){return devErrorLogger(e),null})];case 1:return[2,e.sent()]}})});return function(e){return t.apply(this,arguments)}})(),postSignUpOrgRegistration=(()=>{var t=_async_to_generator$9(function(r){var n,o;return _ts_generator$c(this,function(e){switch(e.label){case 0:return n=r.token,o=_object_without_properties(r,["token"]),[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/org"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)},body:JSON.stringify(o)}).then((t=_async_to_generator$9(function(t){var r;return _ts_generator$c(this,function(e){switch(e.label){case 0:return r=[{status:t.status}],[4,t.json()];case 1:return[2,_object_spread$5.apply(void 0,r.concat([e.sent()]))]}})}),function(e){return t.apply(this,arguments)})).catch(function(e){return devErrorLogger(e),null})];case 1:return[2,e.sent()]}var t})});return function(e){return t.apply(this,arguments)}})();function _ts_generator$b(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function createUserSaga(e){var t,r;return _ts_generator$b(this,function(e){switch(e.label){case 0:return e.trys.push([0,8,,11]),[4,select(selectCreateUserPayload)];case 1:return t=e.sent(),[4,call(createUserInHub,t)];case 2:return e.sent()?[4,put(actions.createUserSuccess())]:[3,4];case 3:return e.sent(),[3,7];case 4:return[4,put(actions.createUserFailure())];case 5:return e.sent(),[4,put(showMessage({content:"Cannot create user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error}))];case 6:e.sent(),e.label=7;case 7:return[3,11];case 8:return r=e.sent(),[4,put(actions.createUserFailure())];case 9:return e.sent(),[4,put(showMessage({content:"Cannot create user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error}))];case 10:return e.sent(),devErrorLogger(r),[3,11];case 11:return[2]}})}function activateUserSaga(t){var r,n,o,a;return _ts_generator$b(this,function(e){switch(e.label){case 0:o=t.payload,r=o.password,n=o.userId,o=o.token,e.label=1;case 1:return e.trys.push([1,8,,11]),[4,call(activateUser,r,n,o)];case 2:return e.sent()?[4,put(actions.activateUserSuccess())]:[3,4];case 3:return e.sent(),[3,7];case 4:return[4,put(actions.activateUserFailure())];case 5:return e.sent(),[4,put(showMessage({content:"Cannot activate user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error}))];case 6:e.sent(),e.label=7;case 7:return[3,11];case 8:return a=e.sent(),[4,put(actions.activateUserFailure())];case 9:return e.sent(),[4,put(showMessage({content:"Cannot activate user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error}))];case 10:return e.sent(),console.log(a),[3,11];case 11:return[2]}})}function _ts_generator$a(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function createUserWatcher(){return _ts_generator$a(this,function(e){switch(e.label){case 0:return[4,takeEvery$1(actions.createUserStart.type,createUserSaga)];case 1:return e.sent(),[2]}})}function activateUserWatcher(){return _ts_generator$a(this,function(e){switch(e.label){case 0:return[4,takeEvery$1(actions.activateUserStart.type,activateUserSaga)];case 1:return e.sent(),[2]}})}function _ts_generator$9(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function rootSaga(){return _ts_generator$9(this,function(e){switch(e.label){case 0:return[4,all([createUserWatcher(),activateUserWatcher()])];case 1:return e.sent(),[2]}})}function _define_property$7(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function getSignUpModule(){return{id:SLICE_NAME,reducerMap:_define_property$7({},SLICE_NAME,signUpSlice$1),sagas:[rootSaga],initialActions:[]}}function _array_like_to_array$h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$h(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$h(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$h(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$h(e,t){return _array_with_holes$h(e)||_iterable_to_array_limit$h(e,t)||_unsupported_iterable_to_array$h(e,t)||_non_iterable_rest$h()}function _unsupported_iterable_to_array$h(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$h(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$h(e,t):void 0}var SignUpPassword=function(e){function t(e){e(function(e){return!e})}function r(e){e.preventDefault()}function n(e){"Enter"===e.key&&x&&a()}function o(e,t){e.target.id===T&&e.target.value&&S(e.currentTarget),j(!1),e=e.target.value,O[t](e)}function a(){l?l(f):i&&R(actions.activateUserStart({password:f,userId:i,token:s}))}var i=e.userId,s=e.token,l=e.setPasswordAction,e=e.buttonLabel,u=_sliced_to_array$h(reactExports.useState(!1),2),c=u[0],p=u[1],u=_sliced_to_array$h(reactExports.useState(!1),2),d=u[0],h=u[1],u=_sliced_to_array$h(reactExports.useState(""),2),f=u[0],u=u[1],y=_sliced_to_array$h(reactExports.useState(""),2),m=y[0],y=y[1],g=_sliced_to_array$h(reactExports.useState(!1),2),x=g[0],b=g[1],g=_sliced_to_array$h(reactExports.useState(!1),2),_=g[0],g=g[1],v=_sliced_to_array$h(reactExports.useState(!1),2),E=v[0],j=v[1],v=_sliced_to_array$h(reactExports.useState(null),2),w=v[0],S=v[1],v=useStyles$6({error:E,passwordRequirementsMet:_}).classes,R=useDispatch(),C=reactExports.useRef(),A=(reactExports.useEffect(function(){b(!!(f&&m&&f===m&&_)),setTimeout(function(){return A()},1e3)},[f,m,_]),function(){j(!(!f||!m||f===m))}),O={password:u,confirmPassword:y},u=window.innerWidth<=850,y=Boolean(w),T="sign-up.password";return jsxRuntimeExports.jsxs(Box$1,{className:v.passwordInput,children:[jsxRuntimeExports.jsxs(Box$1,{sx:{position:"relative"},children:[u&&jsxRuntimeExports.jsx(Fade,{in:y,children:jsxRuntimeExports.jsx(Box$1,{sx:{position:"absolute",bottom:"-20px"},children:jsxRuntimeExports.jsx(PasswordRequirements,{password:f,setPasswordRequirementsMet:g})})}),!l&&jsxRuntimeExports.jsx(Header,{text:"Set a password for your account"})]}),jsxRuntimeExports.jsxs(FormControl,{variant:"outlined",className:v.passwordInput,children:[jsxRuntimeExports.jsx(InputLabel,{htmlFor:T,className:v.passwordLabel,children:"Password"}),jsxRuntimeExports.jsx(OutlinedInput,{id:T,"data-testid":T,ref:C,type:c?"text":"password",onChange:function(e){return o(e,"password")},value:f,autoFocus:!0,inputProps:{autoComplete:"new-password"},endAdornment:jsxRuntimeExports.jsx(InputAdornment,{position:"end",children:jsxRuntimeExports.jsx(IconButton,{"aria-label":"toggle password visibility",onClick:function(){return t(p)},onMouseDown:r,edge:"end",children:c?jsxRuntimeExports.jsx(default_1$2,{}):jsxRuntimeExports.jsx(default_1$3,{})})}),onKeyDown:n,onClick:function(e){S(e.currentTarget)}}),jsxRuntimeExports.jsx(Popover,{id:y?"simple-popover":void 0,open:y&&!u,anchorEl:w,onClose:function(){S(null)},disableAutoFocus:!0,disableEnforceFocus:!0,anchorReference:w,transformOrigin:{vertical:"center",horizontal:"right"},anchorOrigin:{vertical:"center",horizontal:"left"},PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none",borderRadius:0}},children:jsxRuntimeExports.jsx(PasswordRequirements,{password:f,setPasswordRequirementsMet:g})})]}),jsxRuntimeExports.jsxs(FormControl,{className:classNames(v.passwordInput,v.passwordFormMarginTop),variant:"outlined",children:[jsxRuntimeExports.jsx(InputLabel,{htmlFor:"sign-up.confirm-password",className:classNames(v.passwordLabel,v.confirmPasswordLabel),children:E?"Passwords must match":"Confirm Password"}),jsxRuntimeExports.jsx(OutlinedInput,{id:"sign-up.confirm-password","data-testid":"sign-up.confirm-password",type:d?"text":"password",onChange:function(e){return o(e,"confirmPassword")},value:m,inputProps:{autoComplete:"new-password"},endAdornment:jsxRuntimeExports.jsx(InputAdornment,{position:"end",children:jsxRuntimeExports.jsx(IconButton,{"aria-label":"toggle password visibility",onClick:_?function(){return t(h)}:function(){return{}},onMouseDown:r,edge:"end",disabled:!_,children:d?jsxRuntimeExports.jsx(default_1$2,{}):jsxRuntimeExports.jsx(default_1$3,{})})}),error:E,onKeyDown:n,disabled:!_})]}),jsxRuntimeExports.jsx(BlackButton,{className:v.passwordFormMarginTop,onClick:a,text:e||SHARED_TEXT.createAccountButton,type:"sign-up",disableButton:!x})]})},DEFAULT_CONTAINER_WIDTH=740;function ResetPasswordWidget(e){var t=e.resetToken,r=e.username,n=e.onSuccess,o=e.organizationInviteId,a=e.containerWidth,a=void 0===a?DEFAULT_CONTAINER_WIDTH:a,e=e.isNewPage,i=void 0!==e&&e,s=(useStyles$7().classes,useDispatch()),l=useSelector(authStatusSelector),u=useSelector(authContextSelector),e=(reactExports.useEffect(function(){"success"===l&&u===AuthContext.ResetPassword&&null!=n&&n()},[l,u]),lodashExports.isEmpty(t)||lodashExports.isEmpty(r)),c=lodashExports.isEmpty(o)?SHARED_TEXT.resetPasswordTitle:SHARED_TEXT.inviteResetPasswordTitle,p=lodashExports.isEmpty(o)?SHARED_TEXT.resetPasswordSubmitButton:SHARED_TEXT.inviteResetPasswordSubmitButton;return jsxRuntimeExports.jsxs(Box,{p:i?0:4,id:"reset-password-widget",width:a,children:[i?jsxRuntimeExports.jsx(Header,{text:c,subText:SHARED_TEXT.resetPasswordSubHeader,type:"reset-pw"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{variant:"h1",sx:{textTransform:"initial",fontSize:22,marginBottom:"20px"},children:c}),jsxRuntimeExports.jsx(Typography,{variant:"body2",children:SHARED_TEXT.resetPasswordSubHeader})]}),e&&jsxRuntimeExports.jsx(Alert,{sx:{mt:4},variant:"outlined",severity:"error",children:SHARED_TEXT.invalidTokenOrUsername}),jsxRuntimeExports.jsx(SignUpPassword,{token:t,setPasswordAction:function(e){s(resetPasswordRequest(i?{resetToken:t,username:r,password:e,organizationInviteId:o,apiUrl:getRestApiUrlFromConfig(),baseUrl:getConfig().baseUrl}:{resetToken:t,username:r,password:e,organizationInviteId:o}))},buttonLabel:p})]})}function _define_property$6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$4(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$6(t,e,r[e])})}return t}var ResetPassword=function(e){return jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(ResetPasswordWidget,_object_spread$4({},e))})},EmailSharedText={emailLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth-email-input-label",defaultMessage:"Email",description:"Label Email"}),continueLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth-email-continue-button",defaultMessage:"Continue",description:"Continue Button"}),emailErrorState:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth-email-input-field-error-state-label",defaultMessage:"This is an invalid email",description:"Email error state label"}),emptyEmailErrorMsg:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth-empty-email-input-field-error-state-label",defaultMessage:"Email is required",description:"Empty email error state label"})};function _array_like_to_array$g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$g(e){if(Array.isArray(e))return e}function _define_property$5(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$g(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$g(e,t){return _array_with_holes$g(e)||_iterable_to_array_limit$g(e,t)||_unsupported_iterable_to_array$g(e,t)||_non_iterable_rest$g()}function _unsupported_iterable_to_array$g(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$g(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$g(e,t):void 0}var validateEmail=function(e){return e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)},useStyles$5=makeStyles()(function(){var e;return{emailWrapper:(_define_property$5(e={display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Nunito"},"& button",{textTransform:"none",marginTop:"20px",fontSize:"18px",lineHeight:"24px",fontFamily:"Nunito",fontWeight:"600"}),_define_property$5(e,"& input",{fontFamily:"Nunito",lineHeight:"22px",color:"#2A323C"}),_define_property$5(e,"& .MuiOutlinedInput-root",{"&:hover fieldset":{border:"1px solid #DADFE8"},"&.Mui-focused fieldset":{border:"1px solid #DADFE8"},"&.Mui-error.Mui-focused fieldset":{borderColor:"#d32f2f"}}),_define_property$5(e,"& .MuiFormControl-root .MuiInputLabel-root.Mui-focused",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$5(e,"& .MuiInputLabel-outlined",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$5(e,"& .MuiFormLabel-root .MuiInputLabel-root",{color:"#9CA8B4"}),_define_property$5(e,"& .Mui-focused .MuiInputLabel-outlined",{color:"#9CA8B4"}),_define_property$5(e,"& .Mui-error",{color:"#d32f2f !important"}),e),emailField:{width:"368px",height:"52px"},continueBtn:{width:"368px",height:"56px"}}}),EmailInput=function(e){function t(){validateEmail(n)&&r?(h(!1),r()):h(!0)}var r=e.onNextStep,n=e.email,o=e.setEmail,a=e.isLoading,i=e.buttonText,s=e.disableButton,l=e.buttonColor,u=e.buttonTextColor,e=e.error,e=void 0!==e&&e,c=useStyles$5().classes,p=_sliced_to_array$g(reactExports.useState(!1),2),d=p[0],h=p[1],p=EmailSharedText.emailLabel,f=EmailSharedText.emailErrorState,y=EmailSharedText.emptyEmailErrorMsg,f=d?n?f:y:p,y=l?"".concat(l):DEFAULT_BUTTON_COLOR,p=u?"".concat(u):DEFAULT_BUTTON_TEXT_COLOR;return jsxRuntimeExports.jsxs(Box,{className:c.emailWrapper,children:[jsxRuntimeExports.jsx(TextField,{id:"username",error:d||e,"data-testid":"os-auth-email-input-field",label:f,InputProps:{type:"email"},variant:"outlined",value:n,autoComplete:"username",autoFocus:!0,className:c.emailField,onChange:function(e){e=e.target.value;d&&h(!1),o(e)},onKeyDown:function(e){"Enter"===e.key&&t()}}),i&&jsxRuntimeExports.jsx(BlackButton,{onClick:t,className:c.continueBtn,testId:"os-auth-email-continue-btn",loading:a,disableButton:s,type:"continue",text:i,buttonColor:y,buttonTextColor:p})]})};function _array_like_to_array$f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$f(e){if(Array.isArray(e))return e}function _define_property$4(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$f(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$f(e,t){return _array_with_holes$f(e)||_iterable_to_array_limit$f(e,t)||_unsupported_iterable_to_array$f(e,t)||_non_iterable_rest$f()}function _unsupported_iterable_to_array$f(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$f(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$f(e,t):void 0}var _defs,_g,useStyles$4=makeStyles()(function(){var e;return{passwordWrapper:(_define_property$4(e={fontFamily:"Nunito"},"& input",{fontFamily:"Nunito",lineHeight:"22px",color:"#2A323C"}),_define_property$4(e,"& .MuiOutlinedInput-root",{"&:hover fieldset":{border:"1px solid #DADFE8"},"&.Mui-focused fieldset":{border:"1px solid #DADFE8"}}),_define_property$4(e,"& .MuiFormControl-root .MuiInputLabel-root.Mui-focused",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$4(e,"& .MuiInputLabel-outlined",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$4(e,"& .MuiFormLabel-root .MuiInputLabel-rootd",{color:"#9CA8B4"}),e)}}),PasswordInput=function(e){var t=e.password,r=e.onPasswordChange,n=e.errorMessage,o=e.onPressEnter,e=e.autoFocus,e=void 0===e||e,a=useStyles$4().classes,i=_sliced_to_array$f(reactExports.useState(!1),2),s=i[0],l=i[1],i=_sliced_to_array$f(reactExports.useState("Password"),2),u=i[0],c=i[1];reactExports.useEffect(function(){c(n||"Password")},[n]);return jsxRuntimeExports.jsx(Box,{className:a.passwordWrapper,children:jsxRuntimeExports.jsxs(FormControl,{sx:{width:"100%"},variant:"outlined",children:[jsxRuntimeExports.jsx(InputLabel,{htmlFor:"outlined-adornment-password",style:{color:n?"#d32f2f":"#9CA8B4"},children:u}),jsxRuntimeExports.jsx(OutlinedInput,{id:"outlined-adornment-password","data-testid":"os-auth-password-input-field",type:s?"text":"password",onChange:function(e){e=e.target.value;r(e)},value:t,autoFocus:e,autoComplete:"password",endAdornment:jsxRuntimeExports.jsx(InputAdornment,{position:"end",children:jsxRuntimeExports.jsx(IconButton,{"aria-label":"toggle password visibility",onClick:function(){return l(function(e){return!e})},onMouseDown:function(e){e.preventDefault()},edge:"end",children:s?jsxRuntimeExports.jsx(default_1$4,{}):jsxRuntimeExports.jsx(default_1$1,{})})}),error:!!n,label:u,onKeyDown:function(e){"Enter"===e.key&&o()}})]})})},LoginSkeleton=function(){return jsxRuntimeExports.jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh"},children:jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[jsxRuntimeExports.jsx(Skeleton,{animation:"wave",height:80,width:368}),jsxRuntimeExports.jsx(Skeleton,{animation:"wave",height:80,width:368})]})})},_excluded=["title","titleId"];function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)!{}.hasOwnProperty.call(n,r)||(e[r]=n[r])}return e}).apply(null,arguments)}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),a=0;a<o.length;a++)r=o[a],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n={};for(r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var SvgVeritoneLogo=function(e,t){var r=e.title,n=e.titleId,e=_objectWithoutProperties(e,_excluded);return reactExports.createElement("svg",_extends({id:"Layer_2","data-name":"Layer 2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 372.2444933 70.5603847",ref:t,"aria-labelledby":n},e),r?reactExports.createElement("title",{id:n},r):null,_defs=_defs||reactExports.createElement("defs",null,reactExports.createElement("style",null,"\n .cls-1 {\n fill: #212121;\n stroke-width: 0px;\n }\n ")),_g=_g||reactExports.createElement("g",{id:"primary"},reactExports.createElement("g",{id:"veritone_logo_primary_RGB_cosmos"},reactExports.createElement("g",null,reactExports.createElement("path",{className:"cls-1",d:"M159.5026259.8501463c-1.611277,0-2.9787507.550335-4.0643658,1.6363683-1.0860333,1.0860333-1.6367865,2.453507-1.6367865,4.064784,0,1.5502216.5507531,2.8863312,1.6363683,3.9694372,1.0847788,1.0864515,2.4522524,1.6372047,4.064784,1.6372047,1.5418579,0,2.8888403-.5461531,4.0041468-1.6238227,1.1261794-1.0877061,1.6970055-2.4279975,1.6970055-3.9828192,0-1.6158771-.5708261-2.9875326-1.6978419-4.078166-1.1161428-1.0768332-2.4631253-1.6229863-4.0033104-1.6229863Z"}),reactExports.createElement("polygon",{className:"cls-1",points:"154.841132 22.7520748 154.841132 69.6152806 164.0696926 69.6152806 164.0696926 19.9386786 154.841132 22.7520748"})),reactExports.createElement("path",{className:"cls-1",d:"M88.9585505,18.7109702c-7.2555558,0-13.4250783,2.5066168-18.3366923,7.4508494-4.9095231,4.9433963-7.3989942,11.1589194-7.3989942,18.4738578,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0036153,4.9392144,11.2814483,7.4437402,18.6599513,7.4437402,5.3502928,0,10.155269-1.3448915,14.2815266-3.9974558,4.1195666-2.6483824,7.2706106-6.2142685,9.3648943-10.5977115l.4834249-1.0120141-8.0208392-3.3843927-.4416062.9195947c-1.4159834,2.9507321-3.5090126,5.3139105-6.2213777,7.0238798-2.7094378,1.7087148-5.8558817,2.5751996-9.3515123,2.5751996-4.5565727,0-8.4636999-1.448602-11.6134893-4.3060783-2.8737856-2.6040545-4.6556832-5.9307373-5.3076377-9.9018473h41.8242019l.073601-.9911047c.5871355-7.893292-1.6204772-14.6332224-6.5626189-20.0332796-4.9459054-5.4042391-11.3320491-8.1442046-18.9811194-8.1442046ZM99.7327372,31.1215252c2.6626008,2.3477055,4.4148071,5.2892375,5.2194001,8.758104h-32.0482291c.9028671-3.5182127,2.7203107-6.4731267,5.4134392-8.7978319,2.9988237-2.5864906,6.5789282-3.8979271,10.6412031-3.8979271,4.1827129,0,7.8079817,1.3248185,10.7741867,3.937655"}),reactExports.createElement("path",{className:"cls-1",d:"M189.3478424,0l-9.2289833,2.8298759v16.8261985h-10.7729322v8.5669923h10.7729322v23.7835865c0,5.878882,1.4904208,10.3321624,4.4290254,13.2356393,2.934841,2.9018041,7.4642314,4.3729883,13.4631333,4.3729883h5.8901731v-8.5674105h-5.8901731c-3.1543895,0-5.4117664-.657391-6.7089845-1.9541909-1.2967999-1.2972181-1.9541909-3.5863773-1.9541909-6.8034949v-24.0671177h14.5533486v-8.5669923h-14.5533486V0Z"}),reactExports.createElement("path",{className:"cls-1",d:"M231.6546328,18.7109702c-7.3768302,0-13.6550815,2.5041077-18.6599513,7.4433221-5.0086335,4.9442326-7.5482872,11.1622649-7.5482872,18.4813852,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0031971,4.9387962,11.2818665,7.4437402,18.6599513,7.4437402,7.378503,0,13.656336-2.5045259,18.6599513-7.4437402,5.0086335-4.9425599,7.5482872-11.1605921,7.5482872-18.480967,0-7.3191203-2.5396536-13.5371526-7.5482872-18.4813852-5.0048698-4.9392144-11.2831211-7.4433221-18.6599513-7.4433221ZM231.6546328,61.8039534c-4.7857395,0-8.6937031-1.6108588-11.9467849-4.9245778-3.2589364-3.3179008-4.8434494-7.322884-4.8434494-12.2436981,0-4.8526495,1.6296773-8.9717979,4.8434494-12.2436981l.0004182-.0004182c3.2526636-3.3133008,7.1606272-4.9241596,11.9463667-4.9241596,4.8476313,0,8.7710679,1.5953859,11.9936219,4.8769044,3.1828262,3.2417907,4.7966124,7.3772484,4.7966124,12.2913715,0,4.9153777-1.6137862,9.0508354-4.7966124,12.2913715-3.2217177,3.2815185-7.1447361,4.8769044-11.9936219,4.8769044Z"}),reactExports.createElement("path",{className:"cls-1",d:"M289.395475,18.7109702c-4.3780066,0-8.2838792,1.2817452-11.6101438,3.8092713-2.0119008,1.5288941-3.6804695,3.3910837-4.9914878,5.5639867v-8.428154h-9.2285652v49.9592063h9.2285652v-28.3815597c0-4.0217107,1.3164547-7.2643377,4.0254744-9.9135565,2.7136197-2.656328,6.0854667-3.9472733,10.3079075-3.9472733,3.8268352,0,6.9444242,1.2997272,9.5309148,3.9732009,2.5956908,2.6851829,3.8573629,5.9194462,3.8573629,9.8876289v28.3815597h9.2289833v-29.2321534c0-6.1711952-1.9240814-11.3763769-5.7195525-15.4704341-3.8176351-4.1149665-8.7397038-6.2017229-14.6294587-6.2017229Z"}),reactExports.createElement("path",{className:"cls-1",d:"M359.7852391,26.8551748c-4.9459054-5.4042391-11.3320491-8.1442046-18.9811194-8.1442046-7.2555558,0-13.4250783,2.5066168-18.3366923,7.4508494-4.9095231,4.9433963-7.3989942,11.1589194-7.3989942,18.4738578,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0036153,4.9392144,11.2814483,7.4437402,18.6599513,7.4437402,5.3502928,0,10.155269-1.3448915,14.2815266-3.9974558,4.1195666-2.6483824,7.2706106-6.2142685,9.3648943-10.5977115l.4834249-1.0120141-8.0208392-3.3843927-.4416062.9195947c-1.4159834,2.9507321-3.5090126,5.3139105-6.2213777,7.0238798-2.7094378,1.7087148-5.8558817,2.5751996-9.3515123,2.5751996-4.5565727,0-8.4636999-1.448602-11.6134893-4.3060783-2.8737856-2.6040545-4.6556832-5.9307373-5.3076377-9.9018473h41.8242019l.073601-.9911047c.5871355-7.893292-1.6204772-14.6332224-6.5626189-20.0332796ZM330.1629166,31.0817974c2.9988237-2.5864906,6.5789282-3.8979271,10.6412031-3.8979271,4.1827129,0,7.8079817,1.3248185,10.7741867,3.937655,2.6626008,2.3477055,4.4148071,5.2892375,5.2194001,8.758104h-32.0482291c.9028671-3.5182127,2.7203107-6.4731267,5.4134392-8.7978319Z"}),reactExports.createElement("g",null,reactExports.createElement("polygon",{className:"cls-1",points:"55.314171 18.9725847 27.6383499 61.7193071 33.3546939 70.5603847 66.7413769 18.9725847 55.314171 18.9725847"}),reactExports.createElement("polygon",{className:"cls-1",points:"32.5518799 51.5991531 11.4276733 18.9726882 0 18.9726882 21.1152954 51.5991531 32.5518799 51.5991531"})),reactExports.createElement("path",{className:"cls-1",d:"M148.2136224,19.1065266c-4.7230092-.8650191-8.9683997-.1471853-12.6188146,2.1290521-2.4020294,1.4985026-4.3988104,3.7671606-5.9704166,6.7739455v-8.3157235l-9.2285412,2.8133903v47.1080896h9.2285412v-28.3815751c0-4.7233759,1.7275933-8.2898072,5.2813108-10.903446,3.5830568-2.6349098,7.7975189-3.3627679,12.8822567-2.2275831l1.3038855.2916811v-9.126954l-.8782218-.1608769Z"}),reactExports.createElement("path",{className:"cls-1",d:"M366.5136132,66.7238363v-.3888638h2.3283219v.3888638h-.9575771v2.4790067h-.4131678v-2.4790067h-.9575771ZM369.2453813,66.3349725h.4812189l1.0207674,2.1047253,1.0159066-2.1047253h.4812189v2.8678704h-.4131678v-2.0950037l-.9381339,1.8908502h-.2965086l-.9381339-1.8859894v2.0901429h-.4131678v-2.8678704Z"}))))},ForwardRef=reactExports.forwardRef(SvgVeritoneLogo),img$1="data:image/png;base64,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",img="data:image/png;base64,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",Footer=function(e){var t=e.showLogoInFooter,e=e.loginConfigs;return jsxRuntimeExports.jsxs(Box,{sx:{textAlign:"center",marginTop:"20px","& #aiware-logo":{width:"110px",marginTop:"5px"}},"data-testid":"aiware-auth-footer",children:[t&&!(null!=e&&e.hideVeritoneBranding)&&jsxRuntimeExports.jsxs(Stack,{sx:{justifyContent:"center",alignItems:"center"},children:[jsxRuntimeExports.jsx(Typography,{sx:{color:"#5C6269"},variant:"caption",children:"Powered by"}),jsxRuntimeExports.jsx("img",{id:"aiware-logo",draggable:!1,src:img,alt:"aiWARE Logo"})]}),t&&!(null!=e&&e.hideVeritoneBranding)&&jsxRuntimeExports.jsxs(Typography,{sx:{marginBottom:"18px",marginTop:"50px",fontFamily:"Nunito",fontSize:"10px",lineHeight:"16px",color:"#5C6269"},children:["© ",(new Date).getFullYear()," Veritone, Inc., All Rights Reserved."," ",jsxRuntimeExports.jsxs("a",{href:"https://www.veritone.com/terms",target:"_blank",style:{color:"#0C53B0",textDecoration:"none"},rel:"noreferrer",children:["Terms of Service"," "]})]})]})};function _array_like_to_array$e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$e(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$e(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$e(e,t){return _array_with_holes$e(e)||_iterable_to_array_limit$e(e,t)||_unsupported_iterable_to_array$e(e,t)||_non_iterable_rest$e()}function _unsupported_iterable_to_array$e(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$e(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$e(e,t):void 0}var PageContainer=function(e){var t=e.children,r=e.showLogoInFooter,r=void 0===r||r,e=e.loginConfigs,n=_sliced_to_array$e(React.useState(!1),2),o=n[0],a=n[1];return jsxRuntimeExports.jsx(Container,{children:jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"space-between",height:"100vh"},children:[jsxRuntimeExports.jsxs(Box,{sx:{maxWidth:"368px",width:"100%"},children:[null!=e&&e.logo&&!o?jsxRuntimeExports.jsx(CustomLogoContainer,{logoSrc:e.logo,onError:function(e){a(!0)}}):jsxRuntimeExports.jsxs(Box,{sx:{marginTop:"calc(100vh * 0.2)",marginBottom:"calc(100vh * 0.06)",textAlign:"center",position:"relative",maxWidth:"368px",marginLeft:"auto",marginRight:"auto","& #veritone-logo-svg":{width:"220px"},"& #veritone-v-mark-png":{position:"absolute",bottom:"-90%",left:"-5%",width:"400px",pointerEvents:"none"}},children:[!(null!=e&&e.hideVeritoneBranding)&&jsxRuntimeExports.jsx(VMarkLogo,{}),!(null!=e&&e.hideVeritoneBranding)&&jsxRuntimeExports.jsx(ForwardRef,{id:"veritone-logo-svg"})]}),t]}),jsxRuntimeExports.jsx(Footer,{showLogoInFooter:r,loginConfigs:e})]})})};function VMarkLogo(){return jsxRuntimeExports.jsx("img",{draggable:"false",id:"veritone-v-mark-png",src:img$1,alt:"Veritone Logo"})}var CustomLogoContainer=function(e){var t=e.logoSrc,e=e.onError,r=_sliced_to_array$e(React.useState(0),2),n=r[0],o=r[1],r=_sliced_to_array$e(React.useState(0),2),a=r[0],i=r[1];return jsxRuntimeExports.jsx(Box,{sx:{width:"270px",height:"270px",maxWidth:"100vw",display:"flex",alignCenter:"center",justifyContent:"center",margin:"0 auto",marginTop:"min(calc(100vh * 0.1), calc(".concat(n,"px * 0.5))"),marginBottom:"min(calc(100vh * 0.01), calc(".concat(a,"px * 0.1))"),textAlign:"center"},children:jsxRuntimeExports.jsx("img",{style:{pointerEvents:"none",objectFit:"contain",width:"100%",height:"100%"},onLoad:function(e){o(e.target.naturalHeight),i(e.target.naturalWidth)},src:t,alt:"instance-logo",onError:e})})},useStyles$3=makeStyles()(function(){return{btnWrapper:{display:"flex",alignItems:"center",width:"100%",justifyContent:"center",flexDirection:"column"},openIdLogo:{width:"24px",height:"24px",marginRight:"8px"},openIdBtn:{"&.MuiButton-root":{width:"368px",marginTop:"20px",height:"56px",border:"1px solid #DADFE8",borderRadius:"4px",fontFamily:"Nunito",fontStyle:"normal",fontWeight:"600",fontSize:"18px",lineHeight:"24px",letterSpacing:"-1.30385e-09px",textTransform:"none","&:hover, &:focus":{border:"1px solid #DADFE8",color:"#2A323C"}}}}}),OpenID=function(e){var t=e.openIdItems,r=e.redirectUrl,n=useStyles$3().classes;return jsxRuntimeExports.jsx(Box,{className:n.btnWrapper,children:t&&t.map(function(t,e){return jsxRuntimeExports.jsxs(Button,{variant:"outlined","data-testid":"os-auth-openId-button-".concat(e),className:n.openIdBtn,onClick:function(){var e;e=t.loginUrl,window.location.href=e+(r?"?redirectUrl=".concat(encodeURIComponent(r)):"")},sx:{backgroundColor:t.loginButtonStyle&&t.loginButtonStyle.btnColor?t.loginButtonStyle.btnColor:"#FFFFFF","&:hover, &:focus":{backgroundColor:t.loginButtonStyle&&t.loginButtonStyle.btnColor?t.loginButtonStyle.btnColor:"#FFFFFF"}},children:[t.loginButtonStyle&&t.loginButtonStyle.btnLogo&&jsxRuntimeExports.jsx("img",{className:n.openIdLogo,alt:"icon",src:t.loginButtonStyle.btnLogo,"data-testid":"os-auth-openId-image-".concat(e)}),jsxRuntimeExports.jsx("span",{"data-testid":"os-auth-openId-name-".concat(e),style:{marginTop:"3px",color:t.loginButtonStyle&&t.loginButtonStyle.btnTextColor?t.loginButtonStyle.btnTextColor:"#2A323C"},children:(null==t?void 0:t.name)&&"Login with "+(20<(e=t.name).length?e.substring(0,20)+"...":e)})]},t.connectId)})})};function _array_like_to_array$d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$d(e){if(Array.isArray(e))return e}function asyncGeneratorStep$8(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$8(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$8(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$8(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$d(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$d(e,t){return _array_with_holes$d(e)||_iterable_to_array_limit$d(e,t)||_unsupported_iterable_to_array$d(e,t)||_non_iterable_rest$d()}function _unsupported_iterable_to_array$d(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$d(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$d(e,t):void 0}function _ts_generator$8(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function useLoginConfig(){var r=useParams().slug,n=useNavigate(),e=_sliced_to_array$d(reactExports.useState(),2),t=e[0],o=e[1],e=_sliced_to_array$d(reactExports.useState(null),2),a=e[0],i=e[1];return reactExports.useEffect(function(){var e;void 0===t?o(!0):t&&(r?(e=_async_to_generator$8(function(){var t;return _ts_generator$8(this,function(e){switch(e.label){case 0:return[4,getLoginConfigBySlug(r)];case 1:return(t=e.sent())?(i(t),o(!1)):(t=window.location.pathname.replace("/".concat(r),"")+window.location.search,n(t),o(!1)),[2]}})}),function(){e.apply(this,arguments)}()):o(!1))},[r,t]),{slug:r,slugUri:r?"/".concat(r):"",loginConfigs:a,isLoadingLoginConfigs:t}}var EDesktopSnackbarMessageType,BlueLinkText=function(e){var t=e.onClick,r=e.text;return jsxRuntimeExports.jsx(Typography,{sx:{fontFamily:"Nunito",fontSize:"14px",lineHeight:"20px",letterSpacing:"-1.30385e-09px",color:"#0C53B0",cursor:"pointer"},onClick:t,"data-testid":"os-auth-".concat(e.type,"-link-button"),children:r})},OrDivider=function(){return jsxRuntimeExports.jsxs(Box,{sx:{marginTop:"20px",position:"relative"},children:[jsxRuntimeExports.jsx(Divider,{sx:{margin:"0 14px",color:"#D5DFE9"}}),jsxRuntimeExports.jsx(Typography,{sx:{color:"#D5DFE9",fontSize:"14px",margin:0,top:"-12px",padding:"0 10px",position:"absolute",left:"calc(50% - 15px)",background:"#FFFFFF",fontFamily:"Roboto",letterSpacing:"- 1.30385e-09px",fontStyle:"normal",fontWeight:"normal"},children:"or"})]})},useStyles$2=makeStyles()(function(e,t){t="Sign Up"===t.label;return{button:{position:"absolute",right:t?"220px":"40px",top:"30px",background:t?DEFAULT_BUTTON_COLOR:"none",border:t?"none":"1px solid #5C6269",color:t?DEFAULT_BUTTON_TEXT_COLOR:"#5C6269",borderRadius:"4px",paddingLeft:"14px",paddingRight:"14px",fontWeight:400,"&:hover":{background:t?DEFAULT_BUTTON_COLOR:"none",opacity:.9}}}}),SignUpButton=function(e){var t=e.label,t=void 0===t?"Sign Up":t,e=e.navigateTo,r=void 0===e?"sign-up":e,n=useNavigate(),e=useSelector(selectStatus),o=useStyles$2({label:t}).classes;return jsxRuntimeExports.jsx(Button,{className:o.button,onClick:function(){var e=getConfig().signupUrl||"";"sign-up"===r&&e?window.location.href=e:n("/ui/auth/".concat(r))},disabled:"sign-up"!==r&&"loading"===e,children:t})};function _array_like_to_array$c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$c(e){if(Array.isArray(e))return e}function _define_property$3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$c(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$c(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$3(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$3(t,e,r[e])})}return t}function ownKeys$2(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$2(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$2(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _sliced_to_array$c(e,t){return _array_with_holes$c(e)||_iterable_to_array_limit$c(e,t)||_unsupported_iterable_to_array$c(e,t)||_non_iterable_rest$c()}function _unsupported_iterable_to_array$c(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$c(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$c(e,t):void 0}var DesktopSnackbarMessage=_define_property$3({},(EDesktopSnackbarMessageType=EDesktopSnackbarMessageType||{}).EnvError="EnvError",{title:"Environment Error",description:"Due to a temporary issue the environment data could not be fully retrieved. Please select from the available environments or try again later."}),DesktopSnackbar=function(e){var t=e.open,r=e.message,n=e.onClose,o=_sliced_to_array$c(reactExports.useState(""),2),a=o[0],i=o[1],o=_sliced_to_array$c(reactExports.useState(""),2),s=o[0],l=o[1];return reactExports.useEffect(function(){r&&(i(r.title),l(r.description))},[e.message]),jsxRuntimeExports.jsx(Snackbar,{"data-testid":"os-auth-desktop-snackbar",onClose:n,ContentProps:{sx:{backgroundColor:"#465364"}},anchorOrigin:{vertical:"bottom",horizontal:"right"},TransitionComponent:SlideTransition,open:t,message:jsxRuntimeExports.jsx(function(){return jsxRuntimeExports.jsxs(Stack,{sx:{gap:"10px",position:"relative",transform:"translate(5px, -5px)",paddingTop:"10px"},children:[jsxRuntimeExports.jsx(Typography,{variant:"h6",children:a}),jsxRuntimeExports.jsx(Typography,{sx:{width:"350px",fontSize:"14px"},variant:"body1",children:s}),jsxRuntimeExports.jsx(IconButton,{sx:{position:"absolute",top:0,right:0,color:"#FFF"},onClick:n,size:"small",children:jsxRuntimeExports.jsx(Close$1,{fontSize:"small"})})]})},{}),autoHideDuration:6e3})};function SlideTransition(e){return jsxRuntimeExports.jsx(Slide,_object_spread_props$2(_object_spread$3({},e),{direction:"up"}))}function _array_like_to_array$b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$b(e){if(Array.isArray(e))return e}function asyncGeneratorStep$7(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$7(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$7(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$7(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$b(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$b(e,t){return _array_with_holes$b(e)||_iterable_to_array_limit$b(e,t)||_unsupported_iterable_to_array$b(e,t)||_non_iterable_rest$b()}function _unsupported_iterable_to_array$b(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$b(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$b(e,t):void 0}function _ts_generator$7(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var LoginPage=reactExports.memo(function(e){function F(e){return o.apply(this,arguments)}function t(){"org-registration"===j&&f?window.location.href=f:l(1)}var r,n,o,d=e.allowVanityDomain,h=e.onLoginSuccess,e=_sliced_to_array$b(reactExports.useState(1),2),a=e[0],l=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),f=e[0],U=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),i=e[0],B=e[1],e=_sliced_to_array$b(reactExports.useState([]),2),s=e[0],L=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),y=e[0],u=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),m=e[0],N=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),c=e[0],g=e[1],e=_sliced_to_array$b(reactExports.useState(!1),2),D=e[0],x=e[1],e=_sliced_to_array$b(reactExports.useState(!1),2),p=e[0],b=e[1],e=_sliced_to_array$b(reactExports.useState(!1),2),_=e[0],v=e[1],e=_sliced_to_array$b(reactExports.useState([]),2),E=e[0],G=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),j=e[0],H=e[1],e=_sliced_to_array$b(reactExports.useState({aiwareInstanceName:"aiWARE US",coreAdminApiUrl:getRestApiUrlFromConfig(),coreGraphqlApiUrl:getConfig().baseUrl}),2),w=e[0],S=e[1],e=_sliced_to_array$b(reactExports.useState(null),2),R=e[0],C=e[1],e=getConfig(),A=e.disableEnvironmentDiscovery,O=e.hubUrl,T=!A,I=useNavigate(),e=useLoginConfig(),A=e.slug,Q=e.slugUri,P=e.loginConfigs,e=e.isLoadingLoginConfigs,k=(reactExports.useEffect(function(){var e=new URL(window.location.href),t=e.searchParams.get("redirect"),r=e.searchParams.get("openIdRedirect"),n=e.searchParams.get("email"),o=e.searchParams.get("from");e.hash&&(t+=e.hash,r+=e.hash),t&&U(t),r&&B(r),n&&(u(n),b(!0)),o&&H(o)},[]),r=_async_to_generator$7(function(t){var r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return v(!1),[4,getOrgOpenIdProviders(y,t)];case 1:return r=e.sent(),r.find(function(e){return e.required})&&v(!0),L(r),[2]}})}),function(e){return r.apply(this,arguments)}),$=reactExports.useCallback(_async_to_generator$7(function(){var t,r,n,o,a,i,s;return _ts_generator$7(this,function(e){switch(e.label){case 0:return t=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];b(!1),l(2),e&&C(DesktopSnackbarMessage[EDesktopSnackbarMessageType.EnvError])},T&&O?[3,2]:[4,k(w.coreAdminApiUrl)];case 1:return e.sent(),t(),[2];case 2:return e.trys.push([2,7,,9]),[4,getUserInstances(y)];case 3:return!(r=e.sent())||!r.success||r.count<=0?[4,k(getRestApiUrlFromConfig())]:[3,5];case 4:return e.sent(),t(!0),[2];case 5:return n=r.result.map(function(e){return{aiwareInstanceID:e.aiwareInstanceID,aiwareInstanceName:e.AiwareInstanceName,coreGraphqlApiUrl:e.GraphqlEndpoint,coreAdminApiUrl:e.GraphqlEndpoint.replace("/v3/graphql","")}}),o=n[0],a=getCookie("last-login-instance-url"),s=n.find(function(e){return e.coreGraphqlApiUrl===a}),i=n.find(function(e){return e.coreGraphqlApiUrl===getConfig().baseUrl}),s?o=s:i&&(o=i),S(o),G(n),[4,k(o.coreAdminApiUrl)];case 6:return e.sent(),t(),[3,9];case 7:return s=e.sent(),console.error(s),[4,k(getRestApiUrlFromConfig())];case 8:return e.sent(),t(!0),[3,9];case 9:return[2]}})}),[y,O,T,w.coreAdminApiUrl]),z=(reactExports.useEffect(function(){p&&y&&$().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},[p,y,$]),n=_async_to_generator$7(function(){var t,r,n,o,a,i,s,l,u,c,p;return _ts_generator$7(this,function(e){switch(e.label){case 0:return m?(x(!0),[4,userLoginMutation(y,m,null!=d&&d,w.coreGraphqlApiUrl)]):(g("Password is required"),[2]);case 1:return(r=e.sent(),x(!1),r&&r.ok)?[4,r.json()]:[3,9];case 2:if((t=e.sent()).errors&&t.errors.length)return"not_found"===t.errors[0].name?g("Email or Password is incorrect"):g("Something went wrong with login. Please try again"),[2];e.label=3;case 3:return(e.trys.push([3,7,,8]),n=null==t||null==(r=t.data)||null==(n=r.userLogin)?void 0:n.token)?[4,getUserSettings(n)]:[3,6];case 4:return(a=e.sent(),o=a.userSettings,a=a.userId,o&&o.length)?(i=o.find(function(e){return"customRegistrationId"===e.key}))&&i.value?[4,getSignUpConfig("",i.value)]:[3,6]:[3,6];case 5:if((i=e.sent())&&i.files&&i.files.length&&(s=i.files.find(function(e){return"termsOfService"===e.type&&"active"===e.status}),!o.find(function(e){return e.key===(null==s?void 0:s.fileId)})))return I({pathname:"/ui/auth/signup/".concat(i.slug,"/terms-of-service"),search:"?userId=".concat(encodeURIComponent(a),"&token=").concat(encodeURIComponent(n),"&redirect=").concat(encodeURIComponent(f),"&referer=login")}),[2];e.label=6;case 6:return[3,8];case 7:return l=e.sent(),devErrorLogger(l),[3,8];case 8:if(setCookie("last-login-instance-url",w.coreGraphqlApiUrl,365),f){if("org-registration"===j)return u=null==t||null==(l=t.data)||null==(u=l.userLogin)?void 0:u.token,window.location.href=f+"/terms-of-service?email=".concat(encodeURIComponent(y),"&token=").concat(encodeURIComponent(u)),[2];window.location.href=f}else h?(c=null==t||null==(c=t.data)||null==(c=c.userLogin)?void 0:c.token,h(c)):(p=w.coreAdminApiUrl?w.coreAdminApiUrl+"/api/admin/switch-app":getConfig().switchAppUrl,window.location.href=p+"/default");return[3,10];case 9:g("Something went wrong with login. Please try again"),e.label=10;case 10:return[2]}})}),function(){return n.apply(this,arguments)}),M=(o=_async_to_generator$7(function(t){var r,n;return _ts_generator$7(this,function(e){switch(e.label){case 0:return(r=t.target.value,n=E.find(function(e){return e.coreGraphqlApiUrl===r}))?(S(n),[4,k(n.coreAdminApiUrl)]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})}),reactExports.useEffect(function(){},[]),getConfig());return!1!==e?jsxRuntimeExports.jsx(LoginSkeleton,{}):jsxRuntimeExports.jsxs(PageContainer,{loginConfigs:P,children:[jsxRuntimeExports.jsx(DesktopSnackbar,{open:!!R,message:R,onClose:function(){return C(null)}}),M.signupUrl&&!A&&jsxRuntimeExports.jsx(SignUpButton,{}),jsxRuntimeExports.jsxs("div",{style:{display:1===a?"block":"none"},children:[jsxRuntimeExports.jsx(Header,{text:"Welcome back"}),jsxRuntimeExports.jsx(EmailInput,{email:y,setEmail:function(e){u(e),g("")},onNextStep:function(){b(!0)},isLoading:p,buttonText:"Continue",buttonColor:null==P?void 0:P.buttonColor,buttonTextColor:null==P?void 0:P.buttonTextColor}),(null==M?void 0:M.displaySystemUseInLogin)&&jsxRuntimeExports.jsxs(Stack,{gap:4,mt:8,sx:{maxWidth:"558px"},children:[jsxRuntimeExports.jsx(Typography,{variant:"body1","data-test":"fedramp-system-use-notice","data-testid":"fedramp-system-use-notice-1",sx:{fontSize:"12px",lineHeight:"16px",fontWeight:"400",textAlign:"justify"},children:"The use of the system is restricted to authorized users only. The system and equipment are subject to monitoring to ensure proper performance of applicable security features or procedures. Such monitoring may result in the acquisition, recording, and analysis of all data being communicated, transmitted, processed or stored in the application/system, including but not limited to information stored locally on the hard drive by the user. There is no right of privacy in the system. If monitoring reveals possible evidence of criminal activity, such evidence may be provided to law enforcement personnel, and other personnel in conjunction with the report of improper or unauthorized use."}),jsxRuntimeExports.jsx(Typography,{variant:"body1","data-test":"fedramp-system-use-notice","data-testid":"fedramp-system-use-notice-2",sx:{fontSize:"12px",lineHeight:"16px",fontWeight:"400",textAlign:"center"},children:"ANYONE USING THE SYSTEM EXPRESSLY CONSENTS TO US HC MONITORING FOR NETWORK ADMINISTRATION AND SECURITY PURPOSES."})]})]}),jsxRuntimeExports.jsxs("div",{style:{display:2===a?"block":"none"},children:["org-registration"===j&&jsxRuntimeExports.jsx(Stack,{mt:8,sx:{maxWidth:"368px"},children:jsxRuntimeExports.jsx(Typography,{"data-testid":"os-auth-org-registration-email-message",variant:"body1",sx:{fontSize:"18px",textAlign:"justify",marginBottom:"30px"},children:"This email has an existing aiWARE account, to continue the registration process please authenticate below."})}),jsxRuntimeExports.jsx(Header,{text:_?"Choose Authentication Option for":"Enter Password for",subText:y})," ",T&&0<E.length&&jsxRuntimeExports.jsx(Select,{value:w.coreGraphqlApiUrl,onChange:F,disabled:E.length<2,"data-testid":"os-auth-env-dropdown-select",sx:{width:"368px",height:"52px",marginBottom:"15px"},renderValue:function(e){return jsxRuntimeExports.jsxs(Stack,{direction:"row",alignItems:"center",children:[jsxRuntimeExports.jsx(Location,{sx:{width:"27px",height:"26px",color:E.length<2?"#9CA8B4":"#555F7C",marginRight:"8px"}}),jsxRuntimeExports.jsx("span",{children:(t=e,null==(e=E.find(function(e){return e.coreGraphqlApiUrl===t}))?void 0:e.aiwareInstanceName)})]});var t},children:E.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{"data-testid":"os-auth-env-dropdown-item",value:e.coreGraphqlApiUrl,children:e.aiwareInstanceName},e.aiwareInstanceName)})}),_?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[s&&0<s.length&&jsxRuntimeExports.jsx(OpenID,{openIdItems:s,redirectUrl:i||f}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:t,text:"Back to Login",type:"login"})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PasswordInput,{password:m,errorMessage:c,onPasswordChange:function(e){c&&g(""),N(e)},onPressEnter:function(){z().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})}}),jsxRuntimeExports.jsx(Box,{sx:{mt:"14px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){I("/ui/auth/forgot".concat(Q),{state:{emailFromLogin:y}})},text:"Forgot Password?",type:"forgot"})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"25px"},children:jsxRuntimeExports.jsx(BlackButton,{onClick:function(){z().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},text:"Login",type:"login",loading:D,buttonColor:null==P?void 0:P.buttonColor,buttonTextColor:null==P?void 0:P.buttonTextColor})}),s&&0<s.length&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OrDivider,{})," ",jsxRuntimeExports.jsx(OpenID,{openIdItems:s,redirectUrl:i||f})]}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:t,text:"Back to Login",type:"login"})})]})]})]})});function _array_like_to_array$a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$a(e){if(Array.isArray(e))return e}function asyncGeneratorStep$6(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$6(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$6(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$6(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$a(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$a(e,t){return _array_with_holes$a(e)||_iterable_to_array_limit$a(e,t)||_unsupported_iterable_to_array$a(e,t)||_non_iterable_rest$a()}function _unsupported_iterable_to_array$a(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$a(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$a(e,t):void 0}function _ts_generator$6(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var Forgot=function(){var e,t=_sliced_to_array$a(reactExports.useState(""),2),r=t[0],n=t[1],t=_sliced_to_array$a(reactExports.useState(!1),2),o=t[0],a=t[1],t=_sliced_to_array$a(reactExports.useState(1),2),i=t[0],s=t[1],l=useNavigate(),u=useLocation().state,t=useLoginConfig(),c=t.slugUri,p=t.loginConfigs,t=t.isLoadingLoginConfigs,d=(reactExports.useEffect(function(){u&&u.emailFromLogin&&n(u.emailFromLogin)},[u]),e=_async_to_generator$6(function(){var t;return _ts_generator$6(this,function(e){switch(e.label){case 0:a(!0),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,createPasswordResetRequestMutation(r)];case 2:return[4,null==(t=e.sent())?void 0:t.json()];case 3:return(t=e.sent()).errors&&t.errors.length?(alert("Something went wrong. Please try again."),a(!1),[2]):(a(!1),s(2),[3,5]);case 4:return e.sent(),alert("Something went wrong. Please try again."),a(!1),[3,5];case 5:return[2]}})}),function(){return e.apply(this,arguments)});return!1!==t?jsxRuntimeExports.jsx(LoginSkeleton,{}):jsxRuntimeExports.jsxs(PageContainer,{loginConfigs:p,children:[1===i?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Header,{text:"Forgot Password",subText:"Enter your registered email to reset your password."}),jsxRuntimeExports.jsx(EmailInput,{email:r,setEmail:n,onNextStep:function(){d().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},isLoading:o,buttonText:"Send",buttonColor:null==p?void 0:p.buttonColor,buttonTextColor:null==p?void 0:p.buttonTextColor})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Header,{text:"Password reset requested",subText:"Your password reset will be sent to the email provided if it matches our records."}),jsxRuntimeExports.jsx(Box,{sx:{mt:"25px"},children:jsxRuntimeExports.jsx(BlackButton,{onClick:function(){d().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},text:"Request Password Again",type:"reset-pw",loading:o,buttonColor:null==p?void 0:p.buttonColor,buttonTextColor:null==p?void 0:p.buttonTextColor})})]}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){l("/ui/auth/login".concat(c))},text:"Back to Login",type:"login"})})]})},RestrictedProvider=function(){var e=useNavigate();return jsxRuntimeExports.jsxs(PageContainer,{children:[jsxRuntimeExports.jsx(Header,{text:"Authentication Restriction",subText:"Authenticating with this OpenID provider has been restricted by an admin of your account. We are sorry for the inconvenience. Please return to the login screen and choose another authentication provider.",type:"restricted-provider"}),jsxRuntimeExports.jsx(BlackButton,{onClick:function(){return e("/ui/auth/login")},text:"Back to Login",type:"back-to-login",loading:!1})]})};function _array_like_to_array$9(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$9(e){if(Array.isArray(e))return e}function asyncGeneratorStep$5(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$5(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$5(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$5(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$9(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$9(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$9(e,t){return _array_with_holes$9(e)||_iterable_to_array_limit$9(e,t)||_unsupported_iterable_to_array$9(e,t)||_non_iterable_rest$9()}function _unsupported_iterable_to_array$9(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$9(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$9(e,t):void 0}function _ts_generator$5(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var AccountLinking=function(){var e,t=_sliced_to_array$9(reactExports.useState(1),2),r=t[0],n=t[1],t=_sliced_to_array$9(reactExports.useState(""),2),o=t[0],t=t[1],a=_sliced_to_array$9(reactExports.useState(""),2),i=a[0],a=a[1],s=useNavigate(),l=_sliced_to_array$9(reactExports.useState(!1),2),u=l[0],c=l[1],l=_sliced_to_array$9(reactExports.useState(""),2),p=l[0],d=l[1],l=_sliced_to_array$9(reactExports.useState(""),2),h=l[0],f=l[1],y=(reactExports.useEffect(function(){var e=new URLSearchParams(window.location.search).get("session");e&&d(e)},[]),reactExports.useEffect(function(){f("")},[o,i]),e=_async_to_generator$5(function(){var t,r;return _ts_generator$5(this,function(e){switch(e.label){case 0:if(u)return[2];c(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,linkUserToOidAndLogin(o,i,p)];case 2:return 200===(t=e.sent()).status?window.location.href="".concat((null==(r=window.aiwareConfig)?void 0:r.switchAppUrl)||getRestApiUrlFromConfig().replace("api","aiware")+"/switch-app","/default"):404===t.status?f("Email or Password is incorrect."):f("Something went wrong. Please try again."),[3,5];case 3:return e.sent(),f("Something went wrong. Please try again."),[3,5];case 4:return c(!1),[7];case 5:return[2]}})}),function(){return e.apply(this,arguments)});return jsxRuntimeExports.jsx(PageContainer,{children:1===r?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Header,{text:"Account Does Not Exist",subText:"This AiWARE account does not exist. Are you sure you’re using the correct Authentication Provider?",type:"link-oid"}),jsxRuntimeExports.jsx(BlackButton,{onClick:function(){return n(2)},text:"Link to Existing Account",type:"oid-linking",loading:!1}),jsxRuntimeExports.jsx(Box,{sx:{mt:"14px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){return s("/ui/auth/login")},text:"Back to Login",type:"login"})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Header,{text:"Link Account",subText:"Provide the email and password to your aiWARE account."}),jsxRuntimeExports.jsx(EmailInput,{email:o,setEmail:t}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(PasswordInput,{password:i,onPasswordChange:a,onPressEnter:function(){y().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},errorMessage:h,autoFocus:!1})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"14px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){return s("/ui/auth/forgot")},text:"Forgot Password?",type:"forgot"})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"25px"},children:jsxRuntimeExports.jsx(BlackButton,{onClick:function(){y().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},text:"Link Account & Login",type:"link-oid",loading:u})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){return s("/ui/auth/login")},text:"Back to Login",type:"login"})})]})})},ResetPasswordPage=function(){var e=useNavigate(),t=new URLSearchParams(window.location.search),r=t.get("username")||"",n=t.get("resettoken")||"",o=t.get("organizationinviteid")||"",a=t.get("redirect"),t=parseToken(n),t=!!t&&t.enablePasswordRestriction;return jsxRuntimeExports.jsx(PageContainer,{children:jsxRuntimeExports.jsx(Box,{sx:{width:"368px"},children:jsxRuntimeExports.jsx(ResetPasswordWidget,{resetToken:n,username:r,organizationInviteId:o,onSuccess:function(){a?window.location.href=a:e("/ui/auth/reset-password/success")},requiresPasswordRestriction:t,isNewPage:!0,containerWidth:"100%"})})})},ResetPasswordSuccess=function(){var e=useNavigate();return jsxRuntimeExports.jsxs(PageContainer,{children:[jsxRuntimeExports.jsx(Header,{text:"Password Changed Successfully",subText:"Your new password has been set for your aiWARE account successfully.",type:"reset-password-success"}),jsxRuntimeExports.jsx(BlackButton,{onClick:function(){return e("/ui/auth/login")},text:"Continue",type:"back-to-login",loading:!1})]})},useStyles$1=makeStyles()(function(){return{button:{position:"absolute",left:"40px",top:"30px",border:"none",color:"#5C6269",borderRadius:"4px",paddingLeft:"14px",paddingRight:"14px",fontWeight:400},select:{height:"52px",width:"100%",marginTop:"20px",textAlign:"left"},menu:{"& > .MuiPopover-paper":{padding:"0"},"& > .MuiPaper-root > ul":{padding:"5px"}},stepOneFullWidthInput:{height:"52px",width:"100%"},stepOneHalfWidthInputContainer:{display:"flex",justifyContent:"space-between",width:"100%",marginTop:"20px"},stepOneHalfWidthInput:{height:"52px",width:"calc(50% - 10px)"},stepTwoContainer:{width:"542px",textAlign:"center",maxWidth:"85vw"},stepTwoTextField:{height:"52px",width:"100%"},menuItem:{width:"100%"},autoCompleteContainer:{width:"100%",display:"flex",justifyContent:"center"},autoComplete:{width:"100%",marginTop:"20px",height:"52px"},formInputTopMargin:{marginTop:"20px"},formInputTopDoubleMargin:{marginTop:"40px"},previewBox:{width:"164px",height:"164px",borderRadius:"5px",border:"2px dashed #D5DFE9",padding:"10px",boxSizing:"border-box",cursor:"pointer"},logoLanding:{width:"140px",height:"140px",background:"rgba(247, 247, 247, 0.80)",display:"flex",alignItems:"center",justifyContent:"center"},addIcon:{fill:"#555F7C"},logoDescriptionText:{textAlign:"left"},logoUploadBtn:{borderRadius:"4px",border:"1px solid #5C6269",color:"#5C6269",fontWeight:"400",padding:"8px 15px"},orgLogoPreview:{width:"164px",height:"164px"},errorMessage:{color:"red"},confirmationText:{fontSize:"22px",color:"#2A323C",lineHeight:"28px"}}});function _array_like_to_array$8(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$8(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$8(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$8(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$8(e,t){return _array_with_holes$8(e)||_iterable_to_array_limit$8(e,t)||_unsupported_iterable_to_array$8(e,t)||_non_iterable_rest$8()}function _unsupported_iterable_to_array$8(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$8(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$8(e,t):void 0}var SignUpStep1=function(){function e(e){"Enter"===e.key&&(n(actions.validate()),i||t())}function t(){n(actions.setStep(2))}var r=reactExports.useRef(),n=useDispatch(),o=useSelector(selectFormValues),a=useSelector(selectErrors),i=!!Object.entries(a).find(function(e){e=_sliced_to_array$8(e,2);return e[0],e[1]})||!!Object.keys(a).find(function(e){return!o[e]})||!validateEmail("email"in o&&(null==o?void 0:o.email)||""),s=useStyles$1().classes;return jsxRuntimeExports.jsxs("div",{style:{maxWidth:"85vw"},children:[jsxRuntimeExports.jsx(Header,{text:"Sign Up for your aiWARE account",type:"sign-up"}),jsxRuntimeExports.jsx(TextField,{id:"email","data-testid":"os-auth-email-input-field",label:"email"in a&&a.email?"Please provide a valid email":"Email",InputProps:{type:"email"},variant:"outlined",value:"email"in o&&(null==o?void 0:o.email),autoComplete:"email",autoFocus:!0,className:s.stepOneFullWidthInput,error:"email"in a&&a.email,onChange:function(e){return n(actions.setValue({key:"email",value:e.target.value.trim()}))},onKeyDown:e}),jsxRuntimeExports.jsxs(Box,{className:s.stepOneHalfWidthInputContainer,children:[jsxRuntimeExports.jsx(TextField,{id:"firstName","data-testid":"os-auth-firstName-input-field",label:"First Name",variant:"outlined",value:"firstName"in o&&(null==o?void 0:o.firstName),autoComplete:"given-name",className:s.stepOneHalfWidthInput,error:"firstName"in a&&a.firstName,onChange:function(e){return n(actions.setValue({key:"firstName",value:e.target.value}))},onKeyDown:e}),jsxRuntimeExports.jsx(TextField,{id:"lastName","data-testid":"os-auth-lastName-input-field",label:"Last Name",variant:"outlined",value:"lastName"in o&&(null==o?void 0:o.lastName),autoComplete:"family-name",className:s.stepOneHalfWidthInput,error:"lastName"in a&&a.lastName,onChange:function(e){return n(actions.setValue({key:"lastName",value:e.target.value}))},onKeyDown:e})]}),jsxRuntimeExports.jsx(BlackButton,{onClick:t,text:"Continue",type:"Continue",disableButton:i,className:s.formInputTopMargin,ref:null!=r&&r.current?r:void 0})]})},countries=[{label:"Afghanistan",id:"AF"},{label:"Åland Islands",id:"AX"},{label:"Albania",id:"AL"},{label:"Algeria",id:"DZ"},{label:"American Samoa",id:"AS"},{label:"Andorra",id:"AD"},{label:"Angola",id:"AO"},{label:"Anguilla",id:"AI"},{label:"Antarctica",id:"AQ"},{label:"Antigua and Barbuda",id:"AG"},{label:"Argentina",id:"AR"},{label:"Armenia",id:"AM"},{label:"Aruba",id:"AW"},{label:"Australia",id:"AU"},{label:"Austria",id:"AT"},{label:"Azerbaijan",id:"AZ"},{label:"Bahamas",id:"BS"},{label:"Bahrain",id:"BH"},{label:"Bangladesh",id:"BD"},{label:"Barbados",id:"BB"},{label:"Belarus",id:"BY"},{label:"Belgium",id:"BE"},{label:"Belize",id:"BZ"},{label:"Benin",id:"BJ"},{label:"Bermuda",id:"BM"},{label:"Bhutan",id:"BT"},{label:"Bolivia",id:"BO"},{label:"Bosnia and Herzegovina",id:"BA"},{label:"Botswana",id:"BW"},{label:"Bouvet Island",id:"BV"},{label:"Brazil",id:"BR"},{label:"British Indian Ocean Territory",id:"IO"},{label:"Brunei Darussalam",id:"BN"},{label:"Bulgaria",id:"BG"},{label:"Burkina Faso",id:"BF"},{label:"Burundi",id:"BI"},{label:"Cambodia",id:"KH"},{label:"Cameroon",id:"CM"},{label:"Canada",id:"CA"},{label:"Cape Verde",id:"CV"},{label:"Cayman Islands",id:"KY"},{label:"Central African Republic",id:"CF"},{label:"Chad",id:"TD"},{label:"Chile",id:"CL"},{label:"China",id:"CN"},{label:"Christmas Island",id:"CX"},{label:"Cocos (Keeling) Islands",id:"CC"},{label:"Colombia",id:"CO"},{label:"Comoros",id:"KM"},{label:"Congo",id:"CG"},{label:"Congo, The Democratic Republic of the",id:"CD"},{label:"Cook Islands",id:"CK"},{label:"Costa Rica",id:"CR"},{label:"Cote D'Ivoire",id:"CI"},{label:"Croatia",id:"HR"},{label:"Cuba",id:"CU"},{label:"Cyprus",id:"CY"},{label:"Czech Republic",id:"CZ"},{label:"Denmark",id:"DK"},{label:"Djibouti",id:"DJ"},{label:"Dominica",id:"DM"},{label:"Dominican Republic",id:"DO"},{label:"Ecuador",id:"EC"},{label:"Egypt",id:"EG"},{label:"El Salvador",id:"SV"},{label:"Equatorial Guinea",id:"GQ"},{label:"Eritrea",id:"ER"},{label:"Estonia",id:"EE"},{label:"Ethiopia",id:"ET"},{label:"Falkland Islands (Malvinas)",id:"FK"},{label:"Faroe Islands",id:"FO"},{label:"Fiji",id:"FJ"},{label:"Finland",id:"FI"},{label:"France",id:"FR"},{label:"French Guiana",id:"GF"},{label:"French Polynesia",id:"PF"},{label:"French Southern Territories",id:"TF"},{label:"Gabon",id:"GA"},{label:"Gambia",id:"GM"},{label:"Georgia",id:"GE"},{label:"Germany",id:"DE"},{label:"Ghana",id:"GH"},{label:"Gibraltar",id:"GI"},{label:"Greece",id:"GR"},{label:"Greenland",id:"GL"},{label:"Grenada",id:"GD"},{label:"Guadeloupe",id:"GP"},{label:"Guam",id:"GU"},{label:"Guatemala",id:"GT"},{label:"Guernsey",id:"GG"},{label:"Guinea",id:"GN"},{label:"Guinea-Bissau",id:"GW"},{label:"Guyana",id:"GY"},{label:"Haiti",id:"HT"},{label:"Heard Island and Mcdonald Islands",id:"HM"},{label:"Holy See (Vatican City State)",id:"VA"},{label:"Honduras",id:"HN"},{label:"Hong Kong",id:"HK"},{label:"Hungary",id:"HU"},{label:"Iceland",id:"IS"},{label:"India",id:"IN"},{label:"Indonesia",id:"ID"},{label:"Iran, Islamic Republic Of",id:"IR"},{label:"Iraq",id:"IQ"},{label:"Ireland",id:"IE"},{label:"Isle of Man",id:"IM"},{label:"Israel",id:"IL"},{label:"Italy",id:"IT"},{label:"Jamaica",id:"JM"},{label:"Japan",id:"JP"},{label:"Jersey",id:"JE"},{label:"Jordan",id:"JO"},{label:"Kazakhstan",id:"KZ"},{label:"Kenya",id:"KE"},{label:"Kiribati",id:"KI"},{label:"Korea, Democratic People'S Republic of",id:"KP"},{label:"Korea, Republic of",id:"KR"},{label:"Kuwait",id:"KW"},{label:"Kyrgyzstan",id:"KG"},{label:"Lao People'S Democratic Republic",id:"LA"},{label:"Latvia",id:"LV"},{label:"Lebanon",id:"LB"},{label:"Lesotho",id:"LS"},{label:"Liberia",id:"LR"},{label:"Libyan Arab Jamahiriya",id:"LY"},{label:"Liechtenstein",id:"LI"},{label:"Lithuania",id:"LT"},{label:"Luxembourg",id:"LU"},{label:"Macao",id:"MO"},{label:"Macedonia, The Former Yugoslav Republic of",id:"MK"},{label:"Madagascar",id:"MG"},{label:"Malawi",id:"MW"},{label:"Malaysia",id:"MY"},{label:"Maldives",id:"MV"},{label:"Mali",id:"ML"},{label:"Malta",id:"MT"},{label:"Marshall Islands",id:"MH"},{label:"Martinique",id:"MQ"},{label:"Mauritania",id:"MR"},{label:"Mauritius",id:"MU"},{label:"Mayotte",id:"YT"},{label:"Mexico",id:"MX"},{label:"Micronesia, Federated States of",id:"FM"},{label:"Moldova, Republic of",id:"MD"},{label:"Monaco",id:"MC"},{label:"Mongolia",id:"MN"},{label:"Montserrat",id:"MS"},{label:"Morocco",id:"MA"},{label:"Mozambique",id:"MZ"},{label:"Myanmar",id:"MM"},{label:"Namibia",id:"NA"},{label:"Nauru",id:"NR"},{label:"Nepal",id:"NP"},{label:"Netherlands",id:"NL"},{label:"Netherlands Antilles",id:"AN"},{label:"New Caledonia",id:"NC"},{label:"New Zealand",id:"NZ"},{label:"Nicaragua",id:"NI"},{label:"Niger",id:"NE"},{label:"Nigeria",id:"NG"},{label:"Niue",id:"NU"},{label:"Norfolk Island",id:"NF"},{label:"Northern Mariana Islands",id:"MP"},{label:"Norway",id:"NO"},{label:"Oman",id:"OM"},{label:"Pakistan",id:"PK"},{label:"Palau",id:"PW"},{label:"Palestinian Territory, Occupied",id:"PS"},{label:"Panama",id:"PA"},{label:"Papua New Guinea",id:"PG"},{label:"Paraguay",id:"PY"},{label:"Peru",id:"PE"},{label:"Philippines",id:"PH"},{label:"Pitcairn",id:"PN"},{label:"Poland",id:"PL"},{label:"Portugal",id:"PT"},{label:"Puerto Rico",id:"PR"},{label:"Qatar",id:"QA"},{label:"Reunion",id:"RE"},{label:"Romania",id:"RO"},{label:"Russian Federation",id:"RU"},{label:"RWANDA",id:"RW"},{label:"Saint Helena",id:"SH"},{label:"Saint Kitts and Nevis",id:"KN"},{label:"Saint Lucia",id:"LC"},{label:"Saint Pierre and Miquelon",id:"PM"},{label:"Saint Vincent and the Grenadines",id:"VC"},{label:"Samoa",id:"WS"},{label:"San Marino",id:"SM"},{label:"Sao Tome and Principe",id:"ST"},{label:"Saudi Arabia",id:"SA"},{label:"Senegal",id:"SN"},{label:"Serbia and Montenegro",id:"CS"},{label:"Seychelles",id:"SC"},{label:"Sierra Leone",id:"SL"},{label:"Singapore",id:"SG"},{label:"Slovakia",id:"SK"},{label:"Slovenia",id:"SI"},{label:"Solomon Islands",id:"SB"},{label:"Somalia",id:"SO"},{label:"South Africa",id:"ZA"},{label:"South Georgia and the South Sandwich Islands",id:"GS"},{label:"Spain",id:"ES"},{label:"Sri Lanka",id:"LK"},{label:"Sudan",id:"SD"},{label:"Surilabel",id:"SR"},{label:"Svalbard and Jan Mayen",id:"SJ"},{label:"Swaziland",id:"SZ"},{label:"Sweden",id:"SE"},{label:"Switzerland",id:"CH"},{label:"Syrian Arab Republic",id:"SY"},{label:"Taiwan, Province of China",id:"TW"},{label:"Tajikistan",id:"TJ"},{label:"Tanzania, United Republic of",id:"TZ"},{label:"Thailand",id:"TH"},{label:"Timor-Leste",id:"TL"},{label:"Togo",id:"TG"},{label:"Tokelau",id:"TK"},{label:"Tonga",id:"TO"},{label:"Trinidad and Tobago",id:"TT"},{label:"Tunisia",id:"TN"},{label:"Turkey",id:"TR"},{label:"Turkmenistan",id:"TM"},{label:"Turks and Caicos Islands",id:"TC"},{label:"Tuvalu",id:"TV"},{label:"Uganda",id:"UG"},{label:"Ukraine",id:"UA"},{label:"United Arab Emirates",id:"AE"},{label:"United Kingdom",id:"GB"},{label:"United States",id:"US"},{label:"United States Minor Outlying Islands",id:"UM"},{label:"Uruguay",id:"UY"},{label:"Uzbekistan",id:"UZ"},{label:"Vanuatu",id:"VU"},{label:"Venezuela",id:"VE"},{label:"Viet Nam",id:"VN"},{label:"Virgin Islands, British",id:"VG"},{label:"Virgin Islands, U.S.",id:"VI"},{label:"Wallis and Futuna",id:"WF"},{label:"Western Sahara",id:"EH"},{label:"Yemen",id:"YE"},{label:"Zambia",id:"ZM"},{label:"Zimbabwe",id:"ZW"}],industries=["Accounting","Airlines/Aviation","Alternative Dispute Resolution","Alternative Medicine","Animation","Apparel & Fashion","Architecture & Planning","Arts & Crafts","Automotive","Aviation & Aerospace","Banking","Biotechnology","Broadcast Media","Building Materials","Business Supplies & Equipment","Capital Markets","Chemicals","Civic & Social Organization","Civil Engineering","Commercial Real Estate","Computer & Network Security","Computer Games","Computer Hardware","Computer Networking","Computer Software","Construction","Consumer Electronics","Consumer Goods","Consumer Services","Cosmetics","Dairy","Defense & Space","Design","Education Management","E-learning","Electrical & Electronic Manufacturing","Entertainment","Environmental Services","Events Services","Executive Office","Facilities Services","Farming","Financial Services","Fine Art","Fishery","Food & Beverages","Food Production","Fundraising","Furniture","Gambling & Casinos","Glass, Ceramics & Concrete","Government Administration","Government Relations","Graphic Design","Health, Wellness & Fitness","Higher Education","Hospital & Health Care","Hospitality","Human Resources","Import & Export","Individual & Family Services","Industrial Automation","Information Services","Information Technology & Services","Insurance","International Affairs","International Trade & Development","Internet","Investment Banking/Venture","Investment Management","Judiciary","Law Enforcement","Law Practice","Legal Services","Legislative Office","Leisure & Travel","Libraries","Logistics & Supply Chain","Luxury Goods & Jewelry","Machinery","Management Consulting","Maritime","Marketing & Advertising","Market Research","Mechanical or Industrial Engineering","Media Production","Medical Device","Medical Practice","Mental Health Care","Military","Mining & Metals","Motion Pictures & Film","Museums & Institutions","Music","Nanotechnology","Newspapers","Nonprofit Organization Management","Oil & Energy","Online Publishing","Outsourcing/Offshoring","Package/Freight Delivery","Packaging & Containers","Paper & Forest Products","Performing Arts","Pharmaceuticals","Philanthropy","Photography","Plastics","Political Organization","Primary/Secondary","Printing","Professional Training","Program Development","Public Policy","Public Relations","Public Safety","Publishing","Railroad Manufacture","Ranching","Real Estate","Recreational","Facilities & Services","Religious Institutions","Renewables & Environment","Research","Restaurants","Retail","Security & Investigations","Semiconductors","Shipbuilding","Sporting Goods","Sports","Staffing & Recruiting","Supermarkets","Telecommunications","Textiles","Think Tanks","Tobacco","Translation & Localization","Transportation/Trucking/Railroad","Utilities","Venture Capital","Veterinary","Warehousing","Wholesale","Wine & Spirits","Wireless","Writing & Editing"];function _define_property$2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$2(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$2(t,e,r[e])})}return t}function ownKeys$1(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$1(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$1(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}var teamSizeOptions=["1-10","10-50","50-100","100-500","500-1000","> 1000"],industryOptions=industries.map(function(e){return{id:e,label:e}}),SignUpStep2=function(){function t(){n(actions.createUserStart())}function r(e){"Enter"===e.key&&(n(actions.validate()),s||t())}var e=reactExports.useRef(),n=useDispatch(),o=useSelector(selectFormValues),a=useSelector(selectErrors),i=useSelector(selectStatus),s=!!Object.keys(a).find(function(e){return a[e]})||!!Object.keys(a).find(function(e){return!o[e]})||"loading"===i,l=useStyles$1().classes,u=useNavigate();return jsxRuntimeExports.jsxs(Box,{className:l.stepTwoContainer,children:[jsxRuntimeExports.jsx(Header,{text:"success"!==i?"Let's set up your Organization":"",type:"info"}),"success"!==i?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TextField,{id:"orgName","data-testid":"os-auth-orgName-input-field",label:"Organization Name",variant:"outlined",value:"orgName"in o&&(null==o?void 0:o.orgName),autoComplete:"organization",autoFocus:!0,className:l.stepTwoTextField,error:"orgName"in a&&a.orgName,onChange:function(e){return n(actions.setValue({key:"orgName",value:e.target.value}))},onKeyDown:r,disabled:"loading"===i}),jsxRuntimeExports.jsxs(FormControl,{sx:{width:"100%"},children:[jsxRuntimeExports.jsx(InputLabel,{id:"os-auth.sign-up.teamSize",className:l.formInputTopMargin,children:"Team Size"}),jsxRuntimeExports.jsx(Select,{labelId:"os-auth.sign-up.teamSize",id:"os-auth.sign-up.teamSize","data-testid":"os-auth-team-size-input-field",value:"teamSize"in o&&(null==o?void 0:o.teamSize),className:l.select,MenuProps:{className:l.menu},label:"Team Size",onChange:function(e){return n(actions.setValue({key:"teamSize",value:e.target.value||""}))},disabled:"loading"===i,children:teamSizeOptions.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{value:e,className:l.menuItem,children:e})})})]}),jsxRuntimeExports.jsx(Box,{className:l.autoCompleteContainer,children:jsxRuntimeExports.jsx(Autocomplete,{disablePortal:!0,id:"os-auth.sign-up.country-autocomplete","data-testid":"os-auth.sign-up.country-autocomplete",options:countries,value:"country"in o&&countries.find(function(e){return e.id===o.country}),onChange:function(e,t){return n(actions.setValue({key:"country",value:(t||{}).id||""}))},className:l.autoComplete,autoComplete:!0,renderInput:function(e){return jsxRuntimeExports.jsx(TextField,_object_spread_props$1(_object_spread$2({},e),{label:"Country",autoComplete:"country",onKeyDown:r,disabled:"loading"===i}))}})}),jsxRuntimeExports.jsx(Box,{className:l.autoCompleteContainer,children:jsxRuntimeExports.jsx(Autocomplete,{disablePortal:!0,id:"os-auth.sign-up.industry-autocomplete","data-testid":"os-auth.sign-up.industry-autocomplete",options:industryOptions,value:"industry"in o&&industryOptions.find(function(e){return e.id===o.industry}),onChange:function(e,t){return n(actions.setValue({key:"industry",value:(t||{}).id||""}))},className:l.autoComplete,renderInput:function(e){return jsxRuntimeExports.jsx(TextField,_object_spread_props$1(_object_spread$2({},e),{label:"Industry",onKeyDown:r,disabled:"loading"===i}))}})}),jsxRuntimeExports.jsx(BlackButton,{onClick:t,text:"Create Account",type:"create-account",disableButton:s,className:l.formInputTopDoubleMargin,ref:null!=e&&e.current?e:void 0,loading:"loading"===i})]}):jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Typography,{"data-testid":"os-auth.sign-up.success-message",variant:"body1",className:l.confirmationText,children:"Thank you for registering! A confirmation email has been sent with an activation link for your new aiWARE account."}),jsxRuntimeExports.jsx(BlackButton,{onClick:function(){return u("/ui/auth/login")},text:"Return To Homepage",className:l.formInputTopDoubleMargin,type:"return"})]})]})},SignUp=function(){var e=useSelector(selectActiveStep),t=useDispatch(),r=useStyles$1().classes,n=useSelector(selectStatus);return reactExports.useEffect(function(){t(actions.resetState()),envChecker("local")||envChecker("dev")||window.location.href.includes("localhost")?t(actions.setEnv("dev")):envChecker("stage")?t(actions.setEnv("stage")):t(actions.setEnv("prod"))},[]),jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getSignUpModule()],children:jsxRuntimeExports.jsxs(PageContainer,{showLogoInFooter:!1,children:[jsxRuntimeExports.jsx(SignUpButton,{label:"Login",navigateTo:"login"}),2===e&&"success"!==n&&jsxRuntimeExports.jsxs(Button,{className:r.button,onClick:function(){return t(actions.setStep(1))},disabled:"loading"===n,children:[jsxRuntimeExports.jsx(default_1,{fontSize:"small",sx:{marginRight:"5px"}})," Back"]}),jsxRuntimeExports.jsx("div",{children:1===e?jsxRuntimeExports.jsx(SignUpStep1,{}):jsxRuntimeExports.jsx(SignUpStep2,{})})]})})};function _array_like_to_array$7(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$7(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$7(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$7(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$7(e,t){return _array_with_holes$7(e)||_iterable_to_array_limit$7(e,t)||_unsupported_iterable_to_array$7(e,t)||_non_iterable_rest$7()}function _unsupported_iterable_to_array$7(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$7(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$7(e,t):void 0}var SetPassword=function(){var n=_sliced_to_array$7(useSearchParams(),1)[0],e=_sliced_to_array$7(reactExports.useState(""),2),t=e[0],o=e[1],e=_sliced_to_array$7(reactExports.useState(""),2),r=e[0],a=e[1],e=_sliced_to_array$7(reactExports.useState(""),2),i=e[0],s=e[1],l=useNavigate(),u=useSelector(selectStatus),c=useDispatch();return reactExports.useEffect(function(){var e=n.get("useruuid")||"",t=n.get("token")||"",r=n.get("username")||"";e&&t?(o(e),s(t),a(r)):l("/ui/auth/login")},[]),reactExports.useEffect(function(){c(actions.resetState()),envChecker("local")||envChecker("dev")?c(actions.setEnv("dev")):envChecker("stage")?c(actions.setEnv("stage")):c(actions.setEnv("prod"))},[]),reactExports.useEffect(function(){var e;"success"===u&&(e=new URLSearchParams({userId:t,username:r}).toString(),l("/ui/auth/plans?".concat(e)))},[u]),jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getSignUpModule()],children:jsxRuntimeExports.jsx(PageContainer,{showLogoInFooter:!1,children:jsxRuntimeExports.jsx(SignUpPassword,{userId:t,token:i})})})};function _array_like_to_array$6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$6(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$6(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$6(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$6(e,t){return _array_with_holes$6(e)||_iterable_to_array_limit$6(e,t)||_unsupported_iterable_to_array$6(e,t)||_non_iterable_rest$6()}function _unsupported_iterable_to_array$6(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$6(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$6(e,t):void 0}var stripePricingPlanIdByEnv={dev:"prctbl_1No7MMIyHt9R0gSlZV4mqouD",stage:"prctbl_1NkvOrInolL392yPOejCV1RT",prod:"prctbl_1Nj36dInolL392yPggkeo88e"},stripePublishableKeyByEnv={dev:"pk_test_51No7B2IyHt9R0gSl5J4qqbZvRVLokabSDFw36G58tO1oxXO4mJzXmV0FvszOAfJcb25d5HgqZSlFIyMbL9bTFTb700vr9Fvgb9",stage:"pk_test_51NNcicInolL392yPuFClPywpUYp0ppNltcHBEdkPNkpMgmagbymPCeal9Dl3dDYn63IOfIafuobscqZhCJQfp3KN00Th3bxbLx",prod:"pk_live_51NNcicInolL392yPxizaLizsnPFeNfU1QgFBOG7bB44OLhLcQDc7CyH8hlyweN6VDDLr2lB9lLyiUh1KGBaSEjPS00uSQ1sFFP"},Plans=function(){var e=useLocation(),n=new URLSearchParams(e.search),e=_sliced_to_array$6(reactExports.useState(""),2),t=e[0],o=e[1],e=_sliced_to_array$6(reactExports.useState(""),2),r=e[0],a=e[1];reactExports.useEffect(function(){var e=n.get("userId")||"",t=n.get("username")||"",r=(e&&t&&(o(e),a(t),setCookie("userId",e,7),setCookie("username",t,7)),document.createElement("script"));return r.src="https://js.stripe.com/v3/pricing-table.js",r.async=!0,document.body.appendChild(r),function(){document.body.removeChild(r)}},[]);return jsxRuntimeExports.jsxs(PageContainer,{showLogoInFooter:!1,children:[jsxRuntimeExports.jsx(Header,{text:"Choose your aiWARE Account Plan"}),jsxRuntimeExports.jsx(Box,{sx:{width:"100vw"},children:jsxRuntimeExports.jsx("stripe-pricing-table",{"pricing-table-id":(e=envDetector(),getConfig().stripePricingPlanId||stripePricingPlanIdByEnv[e]),"publishable-key":(e=envDetector(),getConfig().stripePublishableKey||stripePublishableKeyByEnv[e]),"customer-email":r,"client-reference-id":t})})]})};function _array_like_to_array$5(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$5(e){if(Array.isArray(e))return e}function asyncGeneratorStep$4(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$4(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$4(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$4(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$5(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$5(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$5(e,t){return _array_with_holes$5(e)||_iterable_to_array_limit$5(e,t)||_unsupported_iterable_to_array$5(e,t)||_non_iterable_rest$5()}function _unsupported_iterable_to_array$5(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$5(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$5(e,t):void 0}function _ts_generator$4(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var useStyles=makeStyles()(function(e){return{paymentResultMessage:{color:"#2A323C",textTransform:"none",marginTop:e.spacing(4),fontSize:"18px",fontWeight:600,lineHeight:"24px",letterSpacing:"-1.3038520263464193e-9px",textAlign:"center"},instanceProvisionedMessage:{color:"#2A323C",textTransform:"none",marginBottom:e.spacing(4),fontSize:"18px",fontWeight:600,lineHeight:"24px",letterSpacing:"-1.3038520263464193e-9px",textAlign:"center"},linearProgress:{height:"7px",backgroundColor:"#D9D9D9",marginTop:e.spacing(2),borderRadius:"20px"},paymentResultLogo:{height:"200px",width:"200px"},paymentResultContainer:{position:"fixed",width:"100%",height:"100vh",top:"0",left:"0",backgroundColor:"#ffffff",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center",fontSize:"14px"},loaderAnimation:{height:"200px",width:"405px",marginBottom:e.spacing(3)}}}),PaymentResult=function(){var i=useNavigate(),e=_sliced_to_array$5(reactExports.useState(""),2),r=e[0],s=e[1],e=_sliced_to_array$5(reactExports.useState(!1),2),t=e[0],l=e[1],e=_sliced_to_array$5(reactExports.useState(!1),2),u=e[0],c=e[1],e=useStyles().classes;return reactExports.useEffect(function(){function e(){return t.apply(this,arguments)}var n,o,t,a=getCookie("userId");t=_async_to_generator$4(function(){var t,r;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getConfig().hubUrl,"/account_requests?userID=").concat(a,"&type=new"))];case 1:return[4,e.sent().json()];case 2:return t=e.sent(),r=((null==t||null==(r=t.result)?void 0:r[0])||{}).accountRequestStatus,t&&("done"===r||"error"===r?(clearInterval(n),clearTimeout(o),s(r),"done"===r&&setTimeout(function(){i("/ui/auth/login")},2e3)):"requested"!==r||u||(setTimeout(function(){clearInterval(n),clearTimeout(o),s("timeout")},12e4),c(!0))),[2]}})});return a&&"timeout"!==r&&(l(!0),n=setInterval(e,1e3),o=setTimeout(function(){clearInterval(n)},12e4)),function(){clearInterval(n),clearTimeout(o)}},[r,u]),jsxRuntimeExports.jsxs(Box,{className:e.paymentResultContainer,children:[jsxRuntimeExports.jsx(Box,{className:e.loaderAnimation,id:"loaderAnimation",children:jsxRuntimeExports.jsx("img",{src:img$b,alt:"aiware-logo",className:e.paymentResultLogo})}),t&&"done"!==r&&"error"!==r&&"timeout"!==r&&jsxRuntimeExports.jsxs(Box,{sx:{height:"200px",width:"405px"},children:[jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:!0,children:jsxRuntimeExports.jsx(LinearProgress,{color:"primary",className:e.linearProgress})}),jsxRuntimeExports.jsx(Typography,{variant:"body1","data-testid":"os-auth-sign-up-payment-result-in-progress",className:e.paymentResultMessage,children:"Creating your custom experience..."})]}),!t&&jsxRuntimeExports.jsx(Typography,{variant:"body1",className:e.paymentResultMessage,children:"Oops! Looks like the URL you are trying to access is invalid"}),"done"===r&&jsxRuntimeExports.jsx(Fade,{in:!0,timeout:1e3,easing:"cubic-bezier(0.4, 0, 1, 1)",children:jsxRuntimeExports.jsx(Box,{sx:{height:"200px",width:"405px"},children:jsxRuntimeExports.jsx(Typography,{variant:"body1","data-testid":"os-auth-sign-up-payment-result-success",className:classNames(e.paymentResultMessage),children:"Your new instance is now ready! Taking you to the login page..."})})}),"error"===r&&jsxRuntimeExports.jsxs(Typography,{variant:"body1","data-testid":"os-auth-sign-up-payment-result-error",className:e.paymentResultMessage,children:["An error occurred when creating your Organization.",jsxRuntimeExports.jsx("br",{})," Please contact support"]}),"timeout"===r&&jsxRuntimeExports.jsxs(Typography,{variant:"body1","data-testid":"os-auth-sign-up-payment-result-timeout",className:e.paymentResultMessage,children:["Creating your custom experience is taking longer than expected.",jsxRuntimeExports.jsx("br",{}),"Please reach out to customer support"," ",jsxRuntimeExports.jsx("a",{href:"mailto:support@veritone.com",style:{color:"#0E6EEC"},children:"support@veritone.com"})]})]})};function _array_like_to_array$4(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$4(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$4(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$4(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$4(e,t){return _array_with_holes$4(e)||_iterable_to_array_limit$4(e,t)||_unsupported_iterable_to_array$4(e,t)||_non_iterable_rest$4()}function _unsupported_iterable_to_array$4(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$4(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$4(e,t):void 0}var LogoutTool=function(){var r=useDispatch(),n=useSelector(applicationSelector),o=useSelector(authStatusSelector);return reactExports.useEffect(function(){var e,t;"failure"===o?(e=window.location.search,window.location.href="/ui/auth/login".concat(e),setUser(null),null!=(e=window.analytics)&&null!=(t=e.reset)&&t.call(e)):"success"===(null==n?void 0:n.status)&&(setUser(null),null!=(t=window.analytics)&&null!=(e=t.reset)&&e.call(t),r(logoutUser$1()))},[r,n,o]),null},Logout=function(e){var t=e.aiwareInit,e=_sliced_to_array$4(reactExports.useState(!1),2),r=e[0],n=e[1];return reactExports.useEffect(function(){null!=t&&t().then(function(){n(!0)})},[t]),r?jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getAppbarPanelModule()],children:jsxRuntimeExports.jsx(LogoutTool,{})}):null};function asyncGeneratorStep$3(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$3(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$3(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$3(n,t,r,o,a,"throw",e)}o(void 0)})}}function _ts_generator$3(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var QUERY_KEYS={registrationConfig:function(e){return["registration-config",e]}},REGISTRATION_URI=function(e){return"/ui/auth/signup/".concat(e)},DEFAULT_LOGIN_REDIRECT_URI="/ui/auth/login",useEmailExists=function(){return useMutation({mutationFn:doesEmailExists})},useSendSignUpEmailRegistration=function(){return useMutation({mutationFn:sendSignUpEmailRegistration})},useSignUpMutation=function(){return useMutation({mutationFn:postSignUpOrgRegistration})},useMeQuery=function(e){return useQuery({enabled:!!e,queryKey:["registration-config","me-query"],queryFn:function(){return getMeQuery(e)},retry:!1})};function useSignUpConfig(){function r(){o(DEFAULT_LOGIN_REDIRECT_URI)}function e(){return t.apply(this,arguments)}var t,n=useParams().slug,o=useNavigate(),a=(t=_async_to_generator$3(function(){var t;return _ts_generator$3(this,function(e){switch(e.label){case 0:if(!n)return r(),[2,null];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,getSignUpConfig(n)];case 2:return(t=e.sent())?[2,t]:(r(),[2,null]);case 3:throw t=e.sent(),r(),t;case 4:return[2]}})}),useQuery({queryKey:QUERY_KEYS.registrationConfig(null!=n?n:""),queryFn:e,retry:!1})),i=a.data,a=a.isLoading,s=n?"/".concat(n):"",l=reactExports.useMemo(function(){var e;return i&&null!=(e=i.files.find(function(e){return"termsOfService"===e.type&&"active"===e.status}))?e:null},[i]),u=reactExports.useMemo(function(){var e;return i&&null!=(e=i.files.find(function(e){return"privacyPolicy"===e.type&&"active"===e.status}))?e:null},[i]);return{slug:n,slugUri:s,registerUri:REGISTRATION_URI(null!=n?n:""),config:null!=i?i:null,tosFile:l,privacyPolicyUrl:u,isLoading:a}}function _array_like_to_array$3(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$3(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$3(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$3(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$3(e,t){return _array_with_holes$3(e)||_iterable_to_array_limit$3(e,t)||_unsupported_iterable_to_array$3(e,t)||_non_iterable_rest$3()}function _unsupported_iterable_to_array$3(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$3(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$3(e,t):void 0}var STACK_STYLES$1={maxWidth:517},BUTTON_CONTAINER_STYLES$1={width:368,mx:"auto"},Success=function(){var r=useNavigate(),n=_sliced_to_array$3(useSearchParams(),1)[0],e=n.get("status")||"submitted",t=useSignUpConfig(),o=t.config,a=t.slugUri;return jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$1,children:[jsxRuntimeExports.jsx(ConfirmationMessage$1,{inviteStatus:e}),jsxRuntimeExports.jsx(ButtonContainer$1,{onClick:function(){var e,t;r((e="/ui/auth/login".concat(a),(t=decodeURIComponent(n.get("email")))?"".concat(e,"?email=").concat(encodeURIComponent(t)):e))},buttonColor:null==o||null==(t=o.uiSettings)||null==(e=t.registrationButtonStyle)?void 0:e.backgroundColor,buttonTextColor:null==o||null==(t=o.uiSettings)||null==(e=t.registrationButtonStyle)?void 0:e.textColor})]})},ConfirmationMessage$1=function(e){e=e.inviteStatus;return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center","data-testid":"os-auth-register-success-message",children:"submitted"===e?"Thank you for registering. Your request must be approved before you can join. If approved you will receive an invitation shortly.":"Thank you for registering. A confirmation email has been sent to with activation link for your new aiWARE account."})},ButtonContainer$1=function(e){var t=e.buttonColor;return jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$1,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Return to Homepage",onClick:e.onClick,buttonColor:t,buttonTextColor:e.buttonTextColor})})};function asyncGeneratorStep$2(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$2(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$2(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$2(n,t,r,o,a,"throw",e)}o(void 0)})}}function _ts_generator$2(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var Email=function(){function r(){return e.apply(this,arguments)}var e,o=useNavigate(),a=useFormContext(),i=useEmailExists(),s=useSendSignUpEmailRegistration(),t=useSignUpConfig(),l=t.config,u=t.registerUri,n=t.isLoading||i.isPending||s.isPending;e=_async_to_generator$2(function(){var t,r,n;return _ts_generator$2(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),t=a.getValues("email"),[4,i.mutateAsync(t)];case 1:return e.sent().available?[4,s.mutateAsync({id:null!=(r=null==l?void 0:l.id)?r:"",email:t,redirectUrl:"".concat(window.location.origin,"/ui/auth/signup")})]:(o({pathname:"/ui/auth/login",search:"?email=".concat(encodeURIComponent(t),"&from=org-registration&redirect=").concat(encodeURIComponent(window.location.href))}),[2]);case 2:return"Verification email sent"===(r=e.sent()).message?o({pathname:"".concat(u,"/confirm"),search:"?email=".concat(t)}):"domain not allowed"===r.message&&a.setError("email",{type:"manual",message:"Your email does not match the requirements to join this Organization, registration is only available to certain domains."}),[3,4];case 3:return n=e.sent(),a.setError("email",{type:"manual",message:"An error occurred, please try again later."}),devErrorLogger(n),[3,4];case 4:return[2]}})});return jsxRuntimeExports.jsx(Controller,{name:"email",rules:{required:"Email is required"},render:function(e){var t=e.field,e=e.fieldState;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(EmailInput,{buttonText:"Continue",error:!!e.error,email:t.value,setEmail:t.onChange,isLoading:n,buttonColor:null==l||null==(t=l.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.backgroundColor,buttonTextColor:null==l||null==(t=l.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.textColor,onNextStep:r}),e.error&&jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"error",mt:3,maxWidth:368,"data-testid":"os-auth-register-email-error-message",children:e.error.message})]})}})};function _array_like_to_array$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$2(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$2(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$2(e,t){return _array_with_holes$2(e)||_iterable_to_array_limit$2(e,t)||_unsupported_iterable_to_array$2(e,t)||_non_iterable_rest$2()}function _unsupported_iterable_to_array$2(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$2(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$2(e,t):void 0}var FileType,STACK_STYLES={maxWidth:517},BUTTON_CONTAINER_STYLES={width:368,mx:"auto"},Confirm=function(){function e(){var e,t;r((e="/ui/auth/login".concat(a),(t=decodeURIComponent(n.get("email")))?"".concat(e,"?email=").concat(encodeURIComponent(t)):e))}var r=useNavigate(),n=_sliced_to_array$2(useSearchParams(),1)[0],t=useSignUpConfig(),o=t.config,a=t.slugUri;return reactExports.useEffect(function(){n.has("email")||e()},[n]),jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES,"data-testid":"os-auth-register-confirmation",children:[jsxRuntimeExports.jsx(ConfirmationMessage,{}),jsxRuntimeExports.jsx(ButtonContainer,{onClick:e,buttonColor:null==o||null==(t=o.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.backgroundColor,buttonTextColor:null==o||null==(t=o.uiSettings)||null==(o=t.registrationButtonStyle)?void 0:o.textColor})]})},ConfirmationMessage=function(){return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",children:"Thank you for your interest in registration. We've sent you an email to confirm your identity, that contains the registration link for the rest of the process."})},ButtonContainer=function(e){var t=e.buttonColor;return jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Return to Homepage",onClick:e.onClick,buttonColor:t,buttonTextColor:e.buttonTextColor,testId:"return-back-home"})})};function _array_like_to_array$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$1(e){if(Array.isArray(e))return e}function asyncGeneratorStep$1(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$1(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$1(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$1(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$1(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$1(t,e,r[e])})}return t}function _sliced_to_array$1(e,t){return _array_with_holes$1(e)||_iterable_to_array_limit$1(e,t)||_unsupported_iterable_to_array$1(e,t)||_non_iterable_rest$1()}function _unsupported_iterable_to_array$1(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$1(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$1(e,t):void 0}function _ts_generator$1(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}(e=>{e.PDF="pdf",e.TEXT="text",e.UNKNOWN="unknown"})(FileType=FileType||{});var styles={buttonContainer:{width:368,mx:"auto"},privacyPolicy:{fontFamily:"Nunito",fontSize:"14px",lineHeight:"20px",letterSpacing:"-1.30385e-09px",color:"#0C53B0",cursor:"pointer",textDecoration:"none"},iframe:{width:"750px",height:"424px"},iframeStyles:{border:"1px solid #E0E0E0",borderRadius:"6px"}},fetchContent=(()=>{var r=_async_to_generator$1(function(t,r){var n,o,a,i;return _ts_generator$1(this,function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return(n=e.sent(),"unknown"===r&&(o=n.headers.get("content-type"),r=null!=o&&o.includes("pdf")?"pdf":null!=o&&o.includes("text")?"text":"unknown"),o={},"pdf"!==r)?[3,3]:(i=URL.createObjectURL,[4,n.blob()]);case 2:return a=i.apply(URL,[e.sent()]),[3,5];case 3:return[4,n.text()];case 4:a=e.sent(),e.label=5;case 5:return[2,(o.content=a,o.fileType=r,o)]}})});return function(e,t){return r.apply(this,arguments)}})(),createIframeHTML=function(e,t){return'\n <!DOCTYPE html>\n <html>\n <head>\n <style>\n body { margin: 0; padding: 0; overflow: hidden; font-family: Arial, sans-serif; }\n #scroll-container { height: 100vh; overflow-y: auto; padding: 10px; }\n .content { white-space: pre-wrap; line-height: 1.6; }\n </style>\n </head>\n <body>\n <div id="scroll-container">\n '.concat("pdf"===t?'<embed src="'.concat(e,'#scrollbar=0&toolbar=0&navpanes=0" width="100%" height="100%" style="max-width: 100%;" />'):'<div class="content">'.concat(e,"</div>"),"\n </div>\n <script>\n const scrollContainer = document.getElementById('scroll-container');\n scrollContainer.addEventListener('scroll', () => {\n const isAtBottom = scrollContainer.scrollHeight - scrollContainer.scrollTop - scrollContainer.clientHeight < 50;\n if (isAtBottom) window.parent.postMessage('scrolledToBottom', '*');\n });\n <\/script>\n </body>\n </html>\n")},TermsOfService=function(){var e,s=useNavigate(),l=_sliced_to_array$1(useSearchParams(),1)[0],t=useSignUpConfig(),r=t.config,u=t.tosFile,n=t.privacyPolicyUrl,c=t.registerUri,t=_sliced_to_array$1(reactExports.useState(!1),2),o=t[0],a=t[1],i=reactExports.useRef(null),t=_sliced_to_array$1(reactExports.useState({content:"",fileType:"unknown"}),2),p=t[0],d=t[1],t=_sliced_to_array$1(reactExports.useState(!1),2),h=t[0],f=t[1],y=(e=_async_to_generator$1(function(){var t,r,n,o,a,i;return _ts_generator$1(this,function(e){switch(e.label){case 0:if(t=decodeURIComponent(l.get("email")),r=decodeURIComponent(l.get("token")),a=decodeURIComponent(l.get("referer")),n=decodeURIComponent(l.get("userId")),o=decodeURIComponent(l.get("redirect")),"login"!==a||null==u||!u.fileId)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,updateUserSetting(r,n,u.fileId,(new Date).toUTCString())];case 2:return e.sent().errors?alert("Something went wrong while saving your terms of service acceptance"):o?window.location.href=o:(a=getRestApiUrlFromConfig()?getRestApiUrlFromConfig()+"/api/admin/switch-app":getConfig().switchAppUrl,window.location.href=a+"/default"),[2];case 3:return i=e.sent(),console.error("Error updating user setting:",i),[3,4];case 4:return s({pathname:"".concat(c,"/join"),search:"?email=".concat(encodeURIComponent(t),"&token=").concat(encodeURIComponent(r))}),[2]}})}),function(){return e.apply(this,arguments)});return reactExports.useEffect(function(){e=_async_to_generator$1(function(){var t;return _ts_generator$1(this,function(e){switch(e.label){case 0:if(null==u||!u.url)return[2];f(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,fetchContent(u.url,p.fileType)];case 2:return t=e.sent(),d(t),[3,5];case 3:return t=e.sent(),console.error("Error loading content:",t),[3,5];case 4:return f(!1),[7];case 5:return[2]}})});var e,t=function(){return e.apply(this,arguments)};"unknown"===p.fileType&&t()},[u,p]),reactExports.useEffect(function(){i.current&&(i.current.srcdoc=createIframeHTML(p.content,p.fileType))},[p]),reactExports.useEffect(function(){function e(e){"scrolledToBottom"===e.data&&a(!0)}return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}},[]),reactExports.useEffect(function(){var e=l.has("email"),t=l.has("token");e||t?e&&t&&!u&&y():s(c)},[l,u]),jsxRuntimeExports.jsxs(Stack,{gap:3,sx:{overflow:"hidden"},children:[h?jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center"},children:jsxRuntimeExports.jsx(CircularProgress,{})}):u&&jsxRuntimeExports.jsx("iframe",_object_spread$1({ref:i,title:u.name,style:styles.iframeStyles},styles.iframe)),n&&jsxRuntimeExports.jsx(Typography,{variant:"body2",textAlign:"center",component:"a",target:"_blank",href:n.url,sx:styles.privacyPolicy,"data-testid":"os-auth-register-privacy-policy",children:"Privacy Policy"}),jsxRuntimeExports.jsx(Box,{sx:styles.buttonContainer,children:jsxRuntimeExports.jsx(BlackButton,{text:"Accept & Continue",type:"button",onClick:y,disableButton:!o,buttonColor:null==r||null==(t=r.uiSettings)||null==(h=t.registrationButtonStyle)?void 0:h.backgroundColor,buttonTextColor:null==r||null==(n=r.uiSettings)||null==(o=n.registrationButtonStyle)?void 0:o.textColor,testId:"os-auth-register-accept-continue-button"})})]})};function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}function _ts_generator(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var Join=function(){var e,t,l=useNavigate(),u=_sliced_to_array(useSearchParams(),1)[0],r=_sliced_to_array(reactExports.useState(null),2),n=r[0],c=r[1],r=useSignUpConfig(),p=r.config,d=r.registerUri,h=useSignUpMutation(),o=useMeQuery(u.get("token")),r=reactExports.useMemo(function(){if(!o.data)return[{fieldKey:"first-name",title:"First Name",type:"text",required:!0},{fieldKey:"last-name",title:"Last Name",type:"text",required:!0}]},[o]),a=(t=_async_to_generator(function(r){var t,n,o,a,i,s;return _ts_generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),a=null==p?void 0:p.id,i=decodeURIComponent(u.get("email")),o=decodeURIComponent(u.get("token")),t=null!=(t=null==r?void 0:r.firstName)?t:"",n=null!=(n=null==r?void 0:r.lastName)?n:"",s=Object.keys(r).reduce(function(e,t){return"firstName"!==t&&"lastName"!==t&&(e[t]=r[t]),e},{}),[4,h.mutateAsync({token:o,orgRegistrationId:a,email:i,customFields:s,firstName:t,lastName:n})];case 1:return 201===(o=e.sent()).status?(i=(null==(a=o.invite)?void 0:a.status)||"submitted",l({pathname:"".concat(d,"/success"),search:"?status=".concat(i)})):c("Failed to join orginization. Please try again."),[3,3];case 2:return s=e.sent(),devErrorLogger(s),c("An error occurred during joining registration. Please try again."),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)});return reactExports.useEffect(function(){var e,t;u.has("email")||u.has("token")?(e=o.data,t=null!=(t=null==p||null==(t=p.uiSettings)?void 0:t.customRegistrationFields)?t:{properties:{}},e&&Object.keys(t.properties).length<=0&&a({})):l(d)},[u,o,p]),jsxRuntimeExports.jsx(FormGenerator,{schema:null==p||null==(e=p.uiSettings)?void 0:e.customRegistrationFields,additionalFields:r,renderSubmitButton:function(e){var e=e.isSubmitting;return jsxRuntimeExports.jsxs(Stack,{gap:2,children:[jsxRuntimeExports.jsx(BlackButton,{type:"join",buttonType:"submit",text:"Join Organization",loading:e||h.isPending,buttonColor:null==p||null==(e=p.uiSettings)||null==(e=e.registrationButtonStyle)?void 0:e.backgroundColor,buttonTextColor:null==p||null==(e=p.uiSettings)||null==(e=e.registrationButtonStyle)?void 0:e.textColor,testId:"os-auth-registration-join-org-button"}),n&&jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"error",textAlign:"center",children:n})]})},onSubmit:a,sx:{width:"368px"}})};function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property(t,e,r[e])})}return t}function ownKeys(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}var RegistrationLayout=function(){var e=useSignUpConfig(),t=e.config,e=e.isLoading,r=useLocation(),n=useForm({defaultValues:{email:"",acceptedTos:!1}});return e?jsxRuntimeExports.jsx(LoginSkeleton,{}):jsxRuntimeExports.jsx(FormProvider,_object_spread_props(_object_spread({},n),{children:jsxRuntimeExports.jsxs(PageContainer,{loginConfigs:{name:null!=(e=null==t?void 0:t.name)?e:"",logo:null==t||null==(n=t.uiSettings)?void 0:n.logo,buttonColor:null==t||null==(e=t.uiSettings)||null==(n=e.registrationButtonStyle)?void 0:n.backgroundColor,buttonTextColor:null==t||null==(e=t.uiSettings)||null==(n=e.registrationButtonStyle)?void 0:n.textColor,hideVeritoneBranding:null==t||null==(e=t.uiSettings)?void 0:e.veritoneBranding},children:[jsxRuntimeExports.jsx(Header,{text:{"":"Join Organization",join:"Join",confirm:"Confirmation",success:"","terms-of-service":"Terms of Service"}[r.pathname.split("/").pop()||""]||"",type:"register"}),jsxRuntimeExports.jsx(Outlet,{})]})}))},AuthRoutes=function(e){var t=e.aiwareInit,r=e.allowVanityDomain,r=void 0!==r&&r,e=e.onLoginSuccess;return jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/login",element:jsxRuntimeExports.jsx(LoginPage,{allowVanityDomain:r,onLoginSuccess:e})}),jsxRuntimeExports.jsx(Route,{path:"/login/:slug",element:jsxRuntimeExports.jsx(LoginPage,{allowVanityDomain:r,onLoginSuccess:e})}),jsxRuntimeExports.jsx(Route,{path:"/forgot",element:jsxRuntimeExports.jsx(Forgot,{})}),jsxRuntimeExports.jsx(Route,{path:"/forgot/:slug",element:jsxRuntimeExports.jsx(Forgot,{})}),jsxRuntimeExports.jsx(Route,{path:"/sign-up",element:jsxRuntimeExports.jsx(SignUp,{})}),jsxRuntimeExports.jsxs(Route,{path:"/signup/:slug?/*",element:jsxRuntimeExports.jsx(RegistrationLayout,{}),children:[jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(Email,{})}),jsxRuntimeExports.jsx(Route,{path:"confirm",element:jsxRuntimeExports.jsx(Confirm,{})}),jsxRuntimeExports.jsx(Route,{path:"success",element:jsxRuntimeExports.jsx(Success,{})}),jsxRuntimeExports.jsx(Route,{path:"terms-of-service",element:jsxRuntimeExports.jsx(TermsOfService,{})}),jsxRuntimeExports.jsx(Route,{path:"join",element:jsxRuntimeExports.jsx(Join,{})})]}),jsxRuntimeExports.jsx(Route,{path:"/plans",element:jsxRuntimeExports.jsx(Plans,{})}),jsxRuntimeExports.jsx(Route,{path:"/payment-result",element:jsxRuntimeExports.jsx(PaymentResult,{})}),jsxRuntimeExports.jsx(Route,{path:"/restricted-provider",element:jsxRuntimeExports.jsx(RestrictedProvider,{})}),jsxRuntimeExports.jsx(Route,{path:"/link-oid",element:jsxRuntimeExports.jsx(AccountLinking,{})}),jsxRuntimeExports.jsx(Route,{path:"/reset-password/success",element:jsxRuntimeExports.jsx(ResetPasswordSuccess,{})}),jsxRuntimeExports.jsx(Route,{path:"/reset-password",element:jsxRuntimeExports.jsx(ResetPasswordPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/activate",element:jsxRuntimeExports.jsx(SetPassword,{})}),jsxRuntimeExports.jsx(Route,{path:"/logout",element:jsxRuntimeExports.jsx(Logout,{aiwareInit:t})})]})};export{AuthRoutes,ResetPassword,getConfig,getRestApiUrlFromConfig};
|
|
1
|
+
import{j as jsxRuntimeExports,r as reactExports,a0 as createSlice,u as useSelector,dp as authStatusSelector,dq as authContextSelector,dr as AuthContext,ai as lodashExports,B as Box,ds as img$b,dt as StyledEngineProvider,C as CircularProgress,du as resetPasswordRequest,at as React,dv as setUser,_ as all,J as takeEvery$1,N as put,aj as showMessage,ak as MessageSeverity,a2 as call,K as select}from"./js-core.esm4.js";import{aS as requireCreateSvgIcon,aT as interopRequireDefaultExports,m as makeStyles,A as AIWareIntlProvider,T as Typography,S as Select,ch as Location,e as MenuItem,D as DynamicModuleLoader,B as Button,b5 as Fade,c as classNames,M as MemoizedFormattedMessage,F as FormControl,ci as OutlinedInput,t as Popover,p as Divider,b6 as Slide,cj as CheckmarkFilled,ck as Bullet}from"./js-core.esm7.js";import{d as default_1$3}from"./js-core.esm58.js";import{d as default_1$2}from"./js-core.esm57.js";import{o as devErrorLogger,S as Stack,aP as useFormContext,aQ as Controller,bk as FormGenerator,U as useForm,W as FormProvider,a5 as LoadingButton,a4 as InputLabel,p as InputAdornment,I as IconButton,c as TextField,e as Skeleton,a as Snackbar,a_ as Close$1}from"./js-core.esm9.js";import{R as Routes,w as Route,x as useNavigate,y as useLocation,z as useSearchParams,v as LinearProgress,g as getAppbarPanelModule,O as Outlet,B as useParams,a as applicationSelector,C as logoutUser$1}from"./js-core.esm8.js";import{d as default_1$4}from"./js-core.esm66.js";import{A as Alert}from"./js-core.esm15.js";import{B as Box$1}from"./js-core.esm43.js";import{C as Container}from"./js-core.esm25.js";import{A as Autocomplete}from"./js-core.esm24.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm16.js";var Visibility={},_interopRequireDefault$1=interopRequireDefaultExports,default_1$1=(Object.defineProperty(Visibility,"__esModule",{value:!0}),Visibility.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=jsxRuntimeExports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility"),default_1$1=Visibility.default=_default$1,ArrowBack={},_interopRequireDefault=interopRequireDefaultExports,default_1=(Object.defineProperty(ArrowBack,"__esModule",{value:!0}),ArrowBack.default=void 0),_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),default_1=ArrowBack.default=_default,Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return 0<this.listeners.size}onSubscribe(){}onUnsubscribe(){}},isServer="undefined"==typeof window||"Deno"in globalThis;function noop$1(){}function isValidTimeout(e){return"number"==typeof e&&0<=e&&e!==1/0}function timeUntilStale(e,t){return Math.max(e+(t||0)-Date.now(),0)}function resolveStaleTime(e,t){return"function"==typeof e?e(t):e}function resolveEnabled(e,t){return"function"==typeof e?e(t):e}function hashKey(e){return JSON.stringify(e,(e,r)=>isPlainObject(r)?Object.keys(r).sort().reduce((e,t)=>(e[t]=r[t],e),{}):r)}function replaceEqualDeep(r,n){if(r===n)return r;var o=isPlainArray(r)&&isPlainArray(n);if(o||isPlainObject(r)&&isPlainObject(n)){var a=o?r:Object.keys(r),e=a.length,i=o?n:Object.keys(n),s=i.length,l=o?[]:{};let t=0;for(let e=0;e<s;e++){var u=o?e:i[e];(!o&&a.includes(u)||o)&&void 0===r[u]&&void 0===n[u]?(l[u]=void 0,t++):(l[u]=replaceEqualDeep(r[u],n[u]),l[u]===r[u]&&void 0!==r[u]&&t++)}return e===s&&t===e?r:l}return n}function shallowEqualObjects(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e)if(e[r]!==t[r])return!1;return!0}function isPlainArray(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function isPlainObject(e){var t;return!!hasObjectPrototype(e)&&(void 0===(t=e.constructor)||!!hasObjectPrototype(t=t.prototype)&&!!t.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function hasObjectPrototype(e){return"[object Object]"===Object.prototype.toString.call(e)}function replaceData(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?replaceEqualDeep(e,t):t}var FocusManager=class extends Subscribable{#focused;#cleanup;#setup;constructor(){super(),this.#setup=t=>{if(!isServer&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#cleanup||this.setEventListener(this.#setup)}onUnsubscribe(){this.hasListeners()||(this.#cleanup?.(),this.#cleanup=void 0)}setEventListener(e){this.#setup=e,this.#cleanup?.(),this.#cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#focused!==e&&(this.#focused=e,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#focused?this.#focused:"hidden"!==globalThis.document?.visibilityState}},focusManager=new FocusManager,OnlineManager=class extends Subscribable{#online=!0;#cleanup;#setup;constructor(){super(),this.#setup=r=>{if(!isServer&&window.addEventListener){let e=()=>r(!0),t=()=>r(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}}}onSubscribe(){this.#cleanup||this.setEventListener(this.#setup)}onUnsubscribe(){this.hasListeners()||(this.#cleanup?.(),this.#cleanup=void 0)}setEventListener(e){this.#setup=e,this.#cleanup?.(),this.#cleanup=e(this.setOnline.bind(this))}setOnline(t){this.#online!==t&&(this.#online=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#online}},onlineManager=new OnlineManager;function pendingThenable(){let r,n,t=new Promise((e,t)=>{r=e,n=t});function o(e){Object.assign(t,e),delete t.resolve,delete t.reject}return t.status="pending",t.catch(()=>{}),t.resolve=e=>{o({status:"fulfilled",value:e}),r(e)},t.reject=e=>{o({status:"rejected",reason:e}),n(e)},t}function canFetch(e){return"online"!==(e??"online")||onlineManager.isOnline()}function createNotifyManager(){let r=[],n=0,o=e=>{e()},a=e=>{e()},i=e=>setTimeout(e,0),s=e=>{n?r.push(e):i(()=>{o(e)})};return{batch:e=>{let t;n++;try{t=e()}finally{--n||(()=>{let e=r;r=[],e.length&&i(()=>{a(()=>{e.forEach(e=>{o(e)})})})})()}return t},batchCalls:t=>(...e)=>{s(()=>{t(...e)})},schedule:s,setNotifyFunction:e=>{o=e},setBatchNotifyFunction:e=>{a=e},setScheduler:e=>{i=e}}}var notifyManager=createNotifyManager();function fetchState(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var QueryObserver=class extends Subscribable{constructor(e,t){super(),this.options=t,this.#client=e,this.#selectError=null,this.#currentThenable=pendingThenable(),this.options.experimental_prefetchInRender||this.#currentThenable.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#client;#currentQuery=void 0;#currentQueryInitialState=void 0;#currentResult=void 0;#currentResultState;#currentResultOptions;#currentThenable;#selectError;#selectFn;#selectResult;#lastQueryWithDefinedData;#staleTimeoutId;#refetchIntervalId;#currentRefetchInterval;#trackedProps=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#currentQuery.addObserver(this),shouldFetchOnMount(this.#currentQuery,this.options)?this.#executeFetch():this.updateResult(),this.#updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(this.#currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(this.#currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#clearStaleTimeout(),this.#clearRefetchInterval(),this.#currentQuery.removeObserver(this)}setOptions(e,t){var r=this.options,n=this.#currentQuery;if(this.options=this.#client.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof resolveEnabled(this.options.enabled,this.#currentQuery))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#updateQuery(),this.#currentQuery.setOptions(this.options),r._defaulted&&!shallowEqualObjects(this.options,r)&&this.#client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#currentQuery,observer:this});e=this.hasListeners(),e&&shouldFetchOptionally(this.#currentQuery,n,this.options,r)&&this.#executeFetch(),this.updateResult(t),!e||this.#currentQuery===n&&resolveEnabled(this.options.enabled,this.#currentQuery)===resolveEnabled(r.enabled,this.#currentQuery)&&resolveStaleTime(this.options.staleTime,this.#currentQuery)===resolveStaleTime(r.staleTime,this.#currentQuery)||this.#updateStaleTimeout(),t=this.#computeRefetchInterval();!e||this.#currentQuery===n&&resolveEnabled(this.options.enabled,this.#currentQuery)===resolveEnabled(r.enabled,this.#currentQuery)&&t===this.#currentRefetchInterval||this.#updateRefetchInterval(t)}getOptimisticResult(e){var t=this.#client.getQueryCache().build(this.#client,e),t=this.createResult(t,e);return shouldAssignObserverCurrentProperties(this,t)&&(this.#currentResult=t,this.#currentResultOptions=this.options,this.#currentResultState=this.#currentQuery.state),t}getCurrentResult(){return this.#currentResult}trackResult(t,r){let n={};return Object.keys(t).forEach(e=>{Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(e),r?.(e),t[e])})}),n}trackProp(e){this.#trackedProps.add(e)}getCurrentQuery(){return this.#currentQuery}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#client.defaultQueryOptions(e),r=this.#client.getQueryCache().build(this.#client,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#executeFetch({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#currentResult))}#executeFetch(e){this.#updateQuery();let t=this.#currentQuery.fetch(this.options,e);return t=e?.throwOnError?t:t.catch(noop$1)}#updateStaleTimeout(){this.#clearStaleTimeout();var e=resolveStaleTime(this.options.staleTime,this.#currentQuery);isServer||this.#currentResult.isStale||!isValidTimeout(e)||(e=timeUntilStale(this.#currentResult.dataUpdatedAt,e),this.#staleTimeoutId=setTimeout(()=>{this.#currentResult.isStale||this.updateResult()},e+1))}#computeRefetchInterval(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#currentQuery):this.options.refetchInterval)??!1}#updateRefetchInterval(e){this.#clearRefetchInterval(),this.#currentRefetchInterval=e,!isServer&&!1!==resolveEnabled(this.options.enabled,this.#currentQuery)&&isValidTimeout(this.#currentRefetchInterval)&&0!==this.#currentRefetchInterval&&(this.#refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&this.#executeFetch()},this.#currentRefetchInterval))}#updateTimers(){this.#updateStaleTimeout(),this.#updateRefetchInterval(this.#computeRefetchInterval())}#clearStaleTimeout(){this.#staleTimeoutId&&(clearTimeout(this.#staleTimeoutId),this.#staleTimeoutId=void 0)}#clearRefetchInterval(){this.#refetchIntervalId&&(clearInterval(this.#refetchIntervalId),this.#refetchIntervalId=void 0)}createResult(e,t){var r=this.#currentQuery,n=this.options,o=this.#currentResult,a=this.#currentResultState,i=this.#currentResultOptions,s=e!==r?e.state:this.#currentQueryInitialState,l=e.state;let u={...l},c=!1,d,{error:p,errorUpdatedAt:h,status:f}=(t._optimisticResults&&(y=!(m=this.hasListeners())&&shouldFetchOnMount(e,t),m=m&&shouldFetchOptionally(e,r,t,n),(y||m)&&(u={...u,...fetchState(l.data,e.options)}),"isRestoring"===t._optimisticResults)&&(u.fetchStatus="idle"),u);if(t.select&&void 0!==u.data)if(o&&u.data===a?.data&&t.select===this.#selectFn)d=this.#selectResult;else try{this.#selectFn=t.select,d=t.select(u.data),d=replaceData(o?.data,d,t),this.#selectResult=d,this.#selectError=null}catch(e){this.#selectError=e}else d=u.data;if(void 0!==t.placeholderData&&void 0===d&&"pending"===f){let e;if(o?.isPlaceholderData&&t.placeholderData===i?.placeholderData)e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#lastQueryWithDefinedData?.state.data,this.#lastQueryWithDefinedData):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#selectError=null}catch(e){this.#selectError=e}void 0!==e&&(f="success",d=replaceData(o?.data,e,t),c=!0)}this.#selectError&&(p=this.#selectError,d=this.#selectResult,h=Date.now(),f="error");var n="fetching"===u.fetchStatus,y="pending"===f,m="error"===f,l=y&&n,a=void 0!==d;let g={status:f,fetchStatus:u.fetchStatus,isPending:y,isSuccess:"success"===f,isError:m,isInitialLoading:l,isLoading:l,data:d,dataUpdatedAt:u.dataUpdatedAt,error:p,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:0<u.dataUpdateCount||0<u.errorUpdateCount,isFetchedAfterMount:u.dataUpdateCount>s.dataUpdateCount||u.errorUpdateCount>s.errorUpdateCount,isFetching:n,isRefetching:n&&!y,isLoadingError:m&&!a,isPaused:"paused"===u.fetchStatus,isPlaceholderData:c,isRefetchError:m&&a,isStale:isStale(e,t),refetch:this.refetch,promise:this.#currentThenable};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===g.status?e.reject(g.error):void 0!==g.data&&e.resolve(g.data)};var x=()=>{var e=this.#currentThenable=g.promise=pendingThenable();t(e)},b=this.#currentThenable;switch(b.status){case"pending":e.queryHash===r.queryHash&&t(b);break;case"fulfilled":"error"!==g.status&&g.data===b.value||x();break;case"rejected":"error"===g.status&&g.error===b.reason||x()}}return g}updateResult(e){let r=this.#currentResult;var t=this.createResult(this.#currentQuery,this.options);this.#currentResultState=this.#currentQuery.state,this.#currentResultOptions=this.options,void 0!==this.#currentResultState.data&&(this.#lastQueryWithDefinedData=this.#currentQuery),shallowEqualObjects(t,r)||(this.#currentResult=t,!(t={})!==e?.listeners&&(()=>{if(!r)return!0;var e=this.options.notifyOnChangeProps,e="function"==typeof e?e():e;if("all"===e||!e&&!this.#trackedProps.size)return!0;let t=new Set(e??this.#trackedProps);return this.options.throwOnError&&t.add("error"),Object.keys(this.#currentResult).some(e=>this.#currentResult[e]!==r[e]&&t.has(e))})()&&(t.listeners=!0),this.#notify({...t,...e}))}#updateQuery(){var e,t=this.#client.getQueryCache().build(this.#client,this.options);t!==this.#currentQuery&&(e=this.#currentQuery,this.#currentQuery=t,this.#currentQueryInitialState=t.state,this.hasListeners())&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#updateTimers()}#notify(e){notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#currentResult)}),this.#client.getQueryCache().notify({query:this.#currentQuery,type:"observerResultsUpdated"})})}};function shouldLoadOnMount(e,t){return!1!==resolveEnabled(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}function shouldFetchOnMount(e,t){return shouldLoadOnMount(e,t)||void 0!==e.state.data&&shouldFetchOn(e,t,t.refetchOnMount)}function shouldFetchOn(e,t,r){return!1!==resolveEnabled(t.enabled,e)&&("always"===(r="function"==typeof r?r(e):r)||!1!==r&&isStale(e,t))}function shouldFetchOptionally(e,t,r,n){return(e!==t||!1===resolveEnabled(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&isStale(e,r)}function isStale(e,t){return!1!==resolveEnabled(t.enabled,e)&&e.isStaleByTime(resolveStaleTime(t.staleTime,e))}function shouldAssignObserverCurrentProperties(e,t){return!shallowEqualObjects(e.getCurrentResult(),t)}var MutationObserver=class extends Subscribable{#client;#currentResult=void 0;#currentMutation;#mutateOptions;constructor(e,t){super(),this.#client=e,this.setOptions(t),this.bindMethods(),this.#updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t=this.options;this.options=this.#client.defaultMutationOptions(e),shallowEqualObjects(this.options,t)||this.#client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#currentMutation,observer:this}),t?.mutationKey&&this.options.mutationKey&&hashKey(t.mutationKey)!==hashKey(this.options.mutationKey)?this.reset():"pending"===this.#currentMutation?.state.status&&this.#currentMutation.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#currentMutation?.removeObserver(this)}onMutationUpdate(e){this.#updateResult(),this.#notify(e)}getCurrentResult(){return this.#currentResult}reset(){this.#currentMutation?.removeObserver(this),this.#currentMutation=void 0,this.#updateResult(),this.#notify()}mutate(e,t){return this.#mutateOptions=t,this.#currentMutation?.removeObserver(this),this.#currentMutation=this.#client.getMutationCache().build(this.#client,this.options),this.#currentMutation.addObserver(this),this.#currentMutation.execute(e)}#updateResult(){var e=this.#currentMutation?.state??getDefaultState();this.#currentResult={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#notify(r){notifyManager.batch(()=>{var e,t;this.#mutateOptions&&this.hasListeners()&&(e=this.#currentResult.variables,t=this.#currentResult.context,"success"===r?.type?(this.#mutateOptions.onSuccess?.(r.data,e,t),this.#mutateOptions.onSettled?.(r.data,null,e,t)):"error"===r?.type&&(this.#mutateOptions.onError?.(r.error,e,t),this.#mutateOptions.onSettled?.(void 0,r.error,e,t))),this.listeners.forEach(e=>{e(this.#currentResult)})})}},QueryClientContext=reactExports.createContext(void 0),useQueryClient=e=>{var t=reactExports.useContext(QueryClientContext);if(t)return t;throw new Error("No QueryClient set, use QueryClientProvider to set one")},IsRestoringContext=reactExports.createContext(!1),useIsRestoring=()=>reactExports.useContext(IsRestoringContext);function createValue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}IsRestoringContext.Provider;var QueryErrorResetBoundaryContext=reactExports.createContext(createValue()),useQueryErrorResetBoundary=()=>reactExports.useContext(QueryErrorResetBoundaryContext);function shouldThrowError(e,t){return"function"==typeof e?e(...t):!!e}function noop(){}var ensurePreventErrorBoundaryRetry=(e,t)=>{!(e.suspense||e.throwOnError||e.experimental_prefetchInRender)||t.isReset()||(e.retryOnMount=!1)},useClearResetErrorBoundary=e=>{reactExports.useEffect(()=>{e.clearReset()},[e])},getHasError=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&shouldThrowError(r,[e.error,n]),ensureSuspenseTimers=e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime)&&(e.gcTime=Math.max(e.gcTime,1e3))},willFetch=(e,t)=>e.isLoading&&e.isFetching&&!t,shouldSuspend=(e,t)=>e?.suspense&&t.isPending,fetchOptimistic=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function useBaseQuery(e,t,r){let n=useQueryClient(),o=useIsRestoring();var a=useQueryErrorResetBoundary();let i=n.defaultQueryOptions(e);n.getDefaultOptions().queries?._experimental_beforeQuery?.(i),i._optimisticResults=o?"isRestoring":"optimistic",ensureSuspenseTimers(i),ensurePreventErrorBoundaryRetry(i,a),useClearResetErrorBoundary(a);e=!n.getQueryCache().get(i.queryHash);let[s]=reactExports.useState(()=>new t(n,i));var l=s.getOptimisticResult(i);if(reactExports.useSyncExternalStore(reactExports.useCallback(e=>{e=o?noop:s.subscribe(notifyManager.batchCalls(e));return s.updateResult(),e},[s,o]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),reactExports.useEffect(()=>{s.setOptions(i,{listeners:!1})},[i,s]),shouldSuspend(i,l))throw fetchOptimistic(i,s,a);if(getHasError({result:l,errorResetBoundary:a,throwOnError:i.throwOnError,query:n.getQueryCache().get(i.queryHash)}))throw l.error;return n.getDefaultOptions().queries?._experimental_afterQuery?.(i,l),i.experimental_prefetchInRender&&!isServer&&willFetch(l,o)&&(e?fetchOptimistic(i,s,a):n.getQueryCache().get(i.queryHash)?.promise)?.catch(noop).finally(()=>{s.updateResult()}),i.notifyOnChangeProps?l:s.trackResult(l)}function useQuery(e,t){return useBaseQuery(e,QueryObserver)}function useMutation(e,t){let r=useQueryClient(),[n]=reactExports.useState(()=>new MutationObserver(r,e));reactExports.useEffect(()=>{n.setOptions(e)},[n,e]);var o=reactExports.useSyncExternalStore(reactExports.useCallback(e=>n.subscribe(notifyManager.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=reactExports.useCallback((e,t)=>{n.mutate(e,t).catch(noop)},[n]);if(o.error&&shouldThrowError(n.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}var SHARED_TEXT={resetPasswordTitle:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.title",defaultMessage:"New password required",description:"Title of the reset password widget"}),inviteResetPasswordTitle:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.inviteTitle",defaultMessage:"Please create a password for your aiWARE account.",description:"Title of the reset password widget when resulting from an invite"}),resetPasswordSubHeader:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.subHeader",defaultMessage:"A strong password contains a mix of numbers, letters and symbols. It is hard to guess, does not resemble a real word and is only used for this account.",description:"Description of the reset password widget"}),passwordRequirements:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.passwordRequirements",defaultMessage:"Password requirements",description:"Heading of password requirements"}),resetPasswordSubmitButton:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.submitButton",defaultMessage:"Change Password",description:"Text of submit button for reset password"}),inviteResetPasswordSubmitButton:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.inviteSubmitButton",defaultMessage:"Set Password",description:"Text of submit button for reset password when resulting from an invite"}),createAccountButton:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.sign-up-password.createAccountButton",defaultMessage:"Create Account",description:"Text of create account button for sign up password"}),lengthCheck:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.lengthCheck",defaultMessage:"8 Character minimum",description:"The error message for the lengthCheck."}),pastPasswordCheck:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.pastPasswordCheck",defaultMessage:"Not identical to last 10 passwords",description:"The error message for the pastPasswordCheck."}),userNameCheck:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.userNameCheck",defaultMessage:"Not the same as account email",description:"The error message for the userNameCheck."}),dictionaryCheck:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.dictionaryCheck",defaultMessage:"No dictionary passwords",description:"The error message for the dictionaryCheck."}),passwordsNotMatching:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.passwordsNotMatching",defaultMessage:"Passwords not matching",description:"The error message for the passwords not matching."}),invalidTokenOrUsername:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.invalidTokenOrUsername",defaultMessage:"Error! Missing token or username.",description:"The error message for the missing token or username."}),passwordComplexityCheckSymbols:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.passwordComplexityCheckSymbols",defaultMessage:"Requires 1 lowercase, 1 uppercase, 1 number, and 1 symbol.",description:"The error message for the check symbols error."}),passwordComplexityCheckDays:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth.reset-password.passwordComplexityCheckDays",defaultMessage:"Cannot be changed twice within 10 days.",description:"The error message for the days error."})},baseUrl="https://api.us-1.veritone.com/v3/graphql",hubUrl="https://hub.aiware.com/hub/v1",stripePublishableKey="pk_live_51NNcicInolL392yPxizaLizsnPFeNfU1QgFBOG7bB44OLhLcQDc7CyH8hlyweN6VDDLr2lB9lLyiUh1KGBaSEjPS00uSQ1sFFP",stripePricingPlanId="prctbl_1Nj36dInolL392yPggkeo88e",sentryDSN="https://fddcba0905af4851ac01fa9f031df814@o57583.ingest.sentry.io/4505172433043456",disableEnvironmentDiscovery=!1,switchAppUrl="https://api.us-1.veritone.com/api/admin/switch-app",signupUrl="",instanceUrls=[{aiwareInstanceName:"aiWARE US",coreAdminApiUrl:"https://api.us-1.veritone.com/api/admin",coreGraphqlApiUrl:"https://api.us-1.veritone.com/v3/graphql"},{aiwareInstanceName:"aiWARE UK",coreAdminApiUrl:"https://api.uk-1.veritone.com/api/admin",coreGraphqlApiUrl:"https://api.uk-1.veritone.com/v3/graphql"},{aiwareInstanceName:"aiWARE CA",coreAdminApiUrl:"https://api.ca-1.veritone.com/api/admin",coreGraphqlApiUrl:"https://api.ca-1.veritone.com/v3/graphql"}],prodConfigs={baseUrl:baseUrl,hubUrl:hubUrl,stripePublishableKey:stripePublishableKey,stripePricingPlanId:stripePricingPlanId,sentryDSN:sentryDSN,disableEnvironmentDiscovery:disableEnvironmentDiscovery,switchAppUrl:switchAppUrl,signupUrl:signupUrl,instanceUrls:instanceUrls};function getConfig(){var e=window.aiwareConfig;return e?JSON.parse(JSON.stringify(e)):prodConfigs}function getRestApiUrlFromConfig(){return getConfig().baseUrl.replace("/v3/graphql","")}function parseToken(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";try{var t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(r)}catch(e){return console.log(e),null}}var envChecker=function(t){return window.location.href.split("://")[1].split(".").find(function(e){return e===t})},envDetector=function(){return envChecker("local")||envChecker("dev")||window.location.href.includes("localhost")?"dev":envChecker("stage")?"stage":"prod"},getCookie=function(e){for(var t=document.cookie.split("; "),r=0;r<t.length;r++){var n=t[r].split("=");if(e===decodeURIComponent(n[0]))return decodeURIComponent(n[1])}return null},setCookie=function(e,t,r){var n=new Date,r=(n.setTime(n.getTime()+24*r*60*60*1e3),"expires=".concat(n.toUTCString()));document.cookie="".concat(e,"=").concat(encodeURIComponent(t),"; ").concat(r,"; path=/")};function _define_property$a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$7(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$a(t,e,r[e])})}return t}var Header=function(e){var t=e.text,r=e.subText,n=e.type,e=e.sx;return jsxRuntimeExports.jsxs(Box,{sx:{marginBottom:"30px",textAlign:"center"},children:[jsxRuntimeExports.jsx(Typography,{sx:_object_spread$7({fontFamily:"Nunito",fontSize:"22px",lineHeight:"28px",letterSpacing:"-1.30385e-09px",color:"#2A323C"},void 0===e?{}:e),"data-testid":"os-auth-header-text-".concat(n),children:t}),r&&jsxRuntimeExports.jsx(Typography,{sx:{fontFamily:"Nunito",fontSize:"16px",lineHeight:"22px",textAlign:"center",letterSpacing:"-1.30385e-09px",color:"#5C6269",overflow:"hidden",textOverflow:"ellipsis"},"data-testid":"os-auth-subheader-text-".concat(n),children:r})]})},useStyles$7=makeStyles()(function(e){return{title:{textTransform:"initial",fontSize:22,marginBottom:e.spacing(4)},subHeader:{color:"#9CA8B4"},h6:{color:"#27292B"},requirements:{listStyle:"disc",padding:0,marginLeft:e.spacing(5),"& li":{marginBottom:e.spacing(1),color:"#27292B",fontSize:14,fontWeight:400,"&.requirementError":{color:"#D50000"}}},submitButton:{height:55,background:"#214167",fontSize:18,width:"100%",maxWidth:380,textTransform:"uppercase"},text:{fontFamily:"Nunito",fontWeight:400,fontSize:"22px",lineHeight:"18px",letterSpacing:"-1.30385e-09px",color:"#2A323C"},subText:{fontFamily:"'Nunito Sans'",fontWeight:400,fontSize:"16px",lineHeight:"22px",textAlign:"center",letterSpacing:"-1.30385e-09px",color:"#5C6269"}}}),useStyles$6=makeStyles()(function(e,t){var r="auto";return t.error?r="red":t.passwordRequirementsMet||(r="rgba(0, 0, 0, 0.26)"),{passwordLabel:{background:"white",padding:"0 3px"},passwordFormMarginTop:{marginTop:"20px"},passwordInput:{width:"368px",maxWidth:"85vw"},confirmPasswordLabel:{color:r,"&.Mui-focused":{color:r},"&.Sdk-Mui-focused":{color:r}}}}),usePasswordRequirementStyles=makeStyles()(function(){return{container:{width:"368px",maxWidth:"85vw",display:"flex",alignItems:"center",justifyContent:"center"},barContainer:{display:"flex",width:"100%",justifyContent:"space-between",padding:"15px 0px"},bar:{width:"23%",height:"4px",borderRadius:"20px"},metRequirement:{color:"#9CA8B4",textDecorationLine:"line-through"},unmetRequirement:{color:"#5C6269"},requirement:{display:"flex",alignItems:"center"},bullet:{transform:"translateY(8px)",marginLeft:"5px"},checkMark:{fill:"#0E6EEC",marginRight:"8px",marginLeft:"-3px"}}});function _define_property$9(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$6(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$9(t,e,r[e])})}return t}var DEFAULT_BUTTON_COLOR="#212121",DEFAULT_BUTTON_TEXT_COLOR="#FFFFFF",BlackButton=function(e){var t=e.onClick,r=e.text,n=e.type,o=e.loading,a=e.disableButton,i=e.sx,i=void 0===i?{}:i,s=e.ref,l=e.className,u=e.buttonColor,c=e.buttonTextColor,d=e.buttonType,d=void 0===d?"button":d,e=e.testId,e=void 0===e?"":e,p="".concat(u||DEFAULT_BUTTON_COLOR,"!important"),c="".concat(c||DEFAULT_BUTTON_TEXT_COLOR,"!important"),e=e||"os-auth--".concat(n,"-btn");return jsxRuntimeExports.jsx(LoadingButton,{color:"primary",variant:"contained",onClick:t,loading:o,type:d,ref:s,sx:_object_spread$6({textTransform:"none",fontSize:"18px",lineHeight:"24px",fontFamily:"Nunito",fontWeight:600,width:"100%",height:"56px",borderRadius:"50px",background:"".concat(p),backgroundColor:"".concat(p),color:c,"&.MuiButton-root:not(:disabled):not(:hover), .MuiButton-root:not(:disabled):not(:hover)":{background:p,backgroundColor:p,color:c},"&.Sdk-MuiButton-root:not(:disabled):not(:hover)":{background:p,backgroundColor:p,color:c},"&:hover":{background:p,backgroundColor:p,color:c,opacity:.9},":disabled":{backgroundColor:"#c3c3c3!important"},border:"1px solid ".concat(u)},i),className:l||void 0,"data-testid":e,disabled:a,children:r})};function _array_like_to_array$j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$j(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array$j(e)}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$j(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$j(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$j(e,t){return _array_with_holes$j(e)||_iterable_to_array_limit$j(e,t)||_unsupported_iterable_to_array$j(e,t)||_non_iterable_rest$j()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array$j(e)||_non_iterable_spread()}function _unsupported_iterable_to_array$j(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$j(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$j(e,t):void 0}var PasswordRequirements=function(e){var s=e.password,l=e.setPasswordRequirementsMet,e=window.innerWidth<=850,r=usePasswordRequirementStyles().classes,u=[{id:"upperLower",label:"Upper & lower case letters",regex:new RegExp("(?=.*[a-z])(?=.*[A-Z])","g"),met:!1},{id:"length",label:"At least 8 characters",regex:new RegExp(".{8}$"),met:!1},{id:"specialCharacter",label:"A symbol (#$&!)",regex:new RegExp("[^a-zA-Z0-9]"),met:!1}],t=_sliced_to_array$j(reactExports.useState(u),2),n=t[0],c=t[1],o={0:"#FF5722",1:"#FFC107",2:"#00BCD4",3:"#4CAF50"};return reactExports.useEffect(function(){var e=_to_consumable_array(u),t=!0,r=!1,n=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;i.regex.test(s)&&(i.met=!0)}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}e.find(function(e){return!e.met})?l(!1):l(!0),c(e)},[s]),jsxRuntimeExports.jsx(Box$1,{className:r.container,"data-testid":"sign-up.password-requirements.pop-up",children:jsxRuntimeExports.jsxs(Box$1,{sx:{boxSizing:"border-box",padding:"15px 20px",width:"100%",marginTop:"10px",marginBottom:"10px",borderRadius:"5px",marginRight:e?void 0:"15px",boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.20)",backgroundColor:"rgb(255, 255,255)","&::before":e?{}:{backgroundColor:"white",content:'""',display:"block",position:"absolute",width:12,height:12,top:"calc(50% - 6px)",transform:"rotate(45deg)",left:"calc(100% - 20px)"}},children:[jsxRuntimeExports.jsx(Typography,{variant:"body1","data-testid":"sign-up.password-requirements.pop-up.message",children:s?{0:"Weak Password",1:"Average Password",2:"Good Password",3:"Strong Password 💪"}[n.filter(function(e){return e.met}).length]:"Please set a strong password"}),jsxRuntimeExports.jsx(Box$1,{className:r.barContainer,children:Array.from(Array(4).keys()).map(function(e){var t=n.filter(function(e){return e.met}).length;return jsxRuntimeExports.jsx(Box$1,{className:r.bar,sx:{background:e<=t&&s?o[t]:"#9CA8B4"}},e)})}),jsxRuntimeExports.jsx(Stack,{sx:{gap:e?void 0:"13px"},children:n.map(function(e){return jsxRuntimeExports.jsxs(Box$1,{className:classNames(r.requirement,e.met?r.metRequirement:r.unmetRequirement),children:[e.met?jsxRuntimeExports.jsx(CheckmarkFilled,{className:r.checkMark}):jsxRuntimeExports.jsx(Bullet,{className:r.bullet}),jsxRuntimeExports.jsx(Typography,{variant:"body2",children:e.label})]},e.id)})})]})})},SLICE_NAME="signUp",namespace="initStep";function _array_like_to_array$i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$i(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$i(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$i(e,t){return _array_with_holes$i(e)||_iterable_to_array_limit$i(e,t)||_unsupported_iterable_to_array$i(e,t)||_non_iterable_rest$i()}function _unsupported_iterable_to_array$i(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$i(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$i(e,t):void 0}var initialState={env:"",status:"idle",activeStep:1,1:{email:"",firstName:"",lastName:""},2:{orgName:"",teamSize:"",country:"",industry:""},errors:{1:{email:!1,firstName:!1,lastName:!1},2:{orgName:!1,country:!1}},userUUID:"",userEmail:"",organizationUUID:""};function isKeyOfObject(e,t){return e in t}function validateEmail$1(e){return e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)}var signUpSlice=createSlice({name:"".concat(SLICE_NAME,"/").concat(namespace),initialState:initialState,reducers:{setStep:function(e,t){e.activeStep=t.payload},setValue:function(e,t){var t=t.payload,r=t.key,t=t.value;isKeyOfObject(r,e[e.activeStep])&&(e[e.activeStep][r]=t,isKeyOfObject(r,e.errors[e.activeStep]))&&(e.errors[e.activeStep][r]=!1)},validate:function(e){var t=!0,r=!1,n=void 0;try{for(var o,a=Object.entries(e[e.activeStep])[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=_sliced_to_array$i(o.value,2),s=i[0],l=i[1];isKeyOfObject(s,e.errors[e.activeStep])&&!l&&(e.errors[e.activeStep][s]=!0)}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}1!==e.activeStep||validateEmail$1(e[1].email)||(e.errors[1].email=!0)},createUserStart:function(e){e.status="loading"},createUserSuccess:function(e){e.status="success"},createUserFailure:function(e){e.status="failure"},setEnv:function(e,t){t=t.payload,t="https://hub".concat("prod"===t?"":"."+t,".aiware.com");e.env=t},resetState:function(){return initialState},activateUserStart:function(e,t){e.status="loading"},activateUserSuccess:function(e){e.status="success"},activateUserFailure:function(e){e.status="failure"}}}),actions=signUpSlice.actions,signUpSlice$1=signUpSlice.reducer,selectStatus=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.status},selectActiveStep=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.activeStep},selectFormValues=function(e){var t;return null==e||null==(t=e[SLICE_NAME])?void 0:t[null==e||null==(t=e[SLICE_NAME])?void 0:t.activeStep]},selectErrors=function(e){var t;return null==e||null==(t=e[SLICE_NAME])||null==(t=t.errors)?void 0:t[null==e||null==(t=e[SLICE_NAME])?void 0:t.activeStep]},selectCreateUserPayload=function(e){var e=(null==e?void 0:e[SLICE_NAME])||{1:{},2:{}},t=e[1],r=t.email,n=t.firstName,t=t.lastName,e=e[2],o=e.orgName,a=e.teamSize,i=e.country,e=e.industry;return{userFirstName:n.trim(),userLastName:t.trim(),userEmail:r,userPhoneNumber:"",userOccupation:"",userCompany:"",organizationName:o.trim(),salesforceAttributes:JSON.stringify({teamSize:a,country:i,industry:e})}};function asyncGeneratorStep$9(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$9(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$9(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$9(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$8(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$5(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$8(t,e,r[e])})}return t}function ownKeys$3(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$3(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$3(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _object_without_properties(e,t){if(null==e)return{};var r,n=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),a=0;a<o.length;a++)r=o[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function _object_without_properties_loose(e,t){if(null==e)return{};for(var r,n={},o=Object.keys(e),a=0;a<o.length;a++)r=o[a],0<=t.indexOf(r)||(n[r]=e[r]);return n}function _ts_generator$c(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var getOrgOpenIdProviders=(()=>{var r=_async_to_generator$9(function(t,r){var n,o,a,i;return _ts_generator$c(this,function(e){switch(e.label){case 0:n=[],o=(r||getRestApiUrlFromConfig())+"/api/admin/openid/org/"+t,e.label=1;case 1:return e.trys.push([1,6,,7]),[4,fetch(o)];case 2:return 200!==(a=e.sent()).status?[3,4]:[4,a.json()];case 3:return i=e.sent(),n=i.results,[3,5];case 4:window.DEBUG&&console.error("was not able to retrieve global open id providers",a),n=[],e.label=5;case 5:return[3,7];case 6:return i=e.sent(),window.DEBUG&&console.error("was not able to retrieve global open id providers",i),n=[],[3,7];case 7:return[2,n]}})});return function(e,t){return r.apply(this,arguments)}})(),linkUserToOidAndLogin=function(e,t,r){return fetch(getRestApiUrlFromConfig()+"/api/admin/openid/linkUserToOid",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({userName:e,password:t,sessionKey:r})})},getUserInstances=(()=>{var t=_async_to_generator$9(function(t){var r,n;return _ts_generator$c(this,function(e){switch(e.label){case 0:r="/aiware_user_instances?email=".concat(t,"&limit=1000&offset=0"),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(getConfig().hubUrl+r,{method:"GET",headers:{"Content-Type":"application/json; charset=utf-8"}})];case 2:if((n=e.sent()).ok)return[4,n.json()];throw new Error("Something went wrong while loading user instances.");case 3:return[2,e.sent()];case 4:return n=e.sent(),devErrorLogger(n),[2,null];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),userLoginMutation=(()=>{var o=_async_to_generator$9(function(t,r,n,o){var a,i,s;return _ts_generator$c(this,function(e){switch(e.label){case 0:a=o||getConfig().baseUrl,i={query:"\n mutation UserLogin($input: UserLogin!) {\n userLogin(input: $input) {\n token\n }\n }\n ",variables:{input:{userName:t,password:r,allowVanityDomain:n}}},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,fetch(a,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(i)})];case 2:return[2,e.sent()];case 3:return s=e.sent(),devErrorLogger(s),[2,null];case 4:return[2]}})});return function(e,t,r,n){return o.apply(this,arguments)}})(),createPasswordResetRequestMutation=(()=>{var t=_async_to_generator$9(function(t){var r,n,o;return _ts_generator$c(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,n={query:"\n mutation createPasswordResetRequest($input: CreatePasswordResetRequest!) {\n createPasswordResetRequest(input: $input) {\n message\n }\n }\n ",variables:{input:{userName:t}}},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,fetch(r,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(n)})];case 2:return[2,e.sent()];case 3:return o=e.sent(),devErrorLogger(o),[2,null];case 4:return[2]}})});return function(e){return t.apply(this,arguments)}})(),createUserInHub=(()=>{var t=_async_to_generator$9(function(t){var r,n,o,a,i;return _ts_generator$c(this,function(e){switch(e.label){case 0:r="/admin/users",n="/ui/auth/activate?token=%token%&username=%username%",a=window.location.protocol,i=window.location.hostname,o=window.location.port,a="".concat(a,"//").concat(i,":").concat(o),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(getConfig().hubUrl+r,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(_object_spread_props$3(_object_spread$5({},t),{userUrl:a+n}))})];case 2:return[4,e.sent().json()];case 3:return e.sent().success?[2,!0]:[2,!1];case 4:return i=e.sent(),devErrorLogger(i),[2,!1];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),activateUser=(()=>{var n=_async_to_generator$9(function(t,r,n){var o,a,i,s;return _ts_generator$c(this,function(e){switch(e.label){case 0:o="/admin/users/".concat(r,"/activate"),e.label=1;case 1:return e.trys.push([1,4,,5]),a={request:{userInviteToken:n,userPassword:t}},[4,fetch(getConfig().hubUrl+o,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(a)})];case 2:return[4,e.sent().json()];case 3:return a=e.sent(),s=a.success,i=a.result.organizationUUID,s&&i?[2,i]:[2,!1];case 4:return s=e.sent(),devErrorLogger(s),[2,!1];case 5:return[2]}})});return function(e,t,r){return n.apply(this,arguments)}})(),getLoginConfigBySlug=(()=>{var t=_async_to_generator$9(function(t){var r,n,o,a,i,s;return _ts_generator$c(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,n="loginConfigBySlug",o="loginConfiguration",a="\n query ".concat(n,"($slug: String!) {\n ").concat(o," (slug: $slug) {\n name\n enabled\n organizationInfo {\n id\n name\n }\n logo\n buttonColor\n buttonTextColor\n hideVeritoneBranding\n }\n }\n "),i={slug:t},e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:a,operationName:n,variables:i})})];case 2:return[4,e.sent().json()];case 3:return(s=e.sent(),null!=(s=null==s||null==(s=s.data)?void 0:s[o])&&s.name)?[2,s]:[2,null];case 4:return s=e.sent(),devErrorLogger(JSON.stringify(s)),[2,null];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),getSignUpConfig=(()=>{var r=_async_to_generator$9(function(t,r){var n,o,a,i,s,l;return _ts_generator$c(this,function(e){switch(e.label){case 0:n=getConfig().baseUrl,a=o="registrationConfigurationInfo",i="\n query ".concat(o,"($slug: String, $id: ID) {\n ").concat(a," (slug: $slug, id: $id) {\n id\n name\n slug\n files {\n fileId\n name\n url\n type\n status\n }\n uiSettings {\n logo\n veritoneBranding\n customRegistrationFields\n registrationButtonStyle\n }\n }\n }\n "),s={slug:t,id:r},e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:i,operationName:o,variables:s})})];case 2:return[4,e.sent().json()];case 3:return(l=e.sent(),null!=(l=null==l||null==(l=l.data)?void 0:l[a])&&l.name)?[2,l]:[2,null];case 4:return l=e.sent(),devErrorLogger(JSON.stringify(l)),[2,null];case 5:return[2]}})});return function(e,t){return r.apply(this,arguments)}})(),getUserSettings=(()=>{var t=_async_to_generator$9(function(t){var r,n,o,a,i;return _ts_generator$c(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,n="getUserSettings",o="\n query ".concat(n," {\n me {\n id\n userSettings {\n key\n value\n }\n }\n }\n "),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({query:o,operationName:n})})];case 2:return[4,e.sent().json()];case 3:return i=e.sent(),a=(null==i||null==(a=i.data)||null==(a=a.me)?void 0:a.userSettings)||[],i=null==i||null==(i=i.data)||null==(i=i.me)?void 0:i.id,[2,{userSettings:a,userId:i}];case 4:return i=e.sent(),devErrorLogger(JSON.stringify(i)),[2,{userSettings:[],userId:null}];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),updateUserSetting=(()=>{var o=_async_to_generator$9(function(t,r,n,o){var a,i,s,l;return _ts_generator$c(this,function(e){switch(e.label){case 0:a=getConfig().baseUrl,i="updateUserSetting",s="\n mutation ".concat(i,"($input: UpdateUserSetting!) {\n updateUserSetting(input: $input) {\n key\n value\n }\n }\n "),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({query:s,operationName:i,variables:{input:{userId:r,key:n,value:o}}})})];case 2:return[4,e.sent().json()];case 3:return[2,e.sent()];case 4:return l=e.sent(),devErrorLogger(JSON.stringify(l)),[2,null];case 5:return[2]}})});return function(e,t,r,n){return o.apply(this,arguments)}})(),getMeQuery=(()=>{var t=_async_to_generator$9(function(t){var r,n,o,a,i;return _ts_generator$c(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,n="meQuery",o="me",a="\n query ".concat(n," {\n ").concat(o," {\n id\n }\n }\n "),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({query:a,operationName:n})})];case 2:return[4,e.sent().json()];case 3:return(i=e.sent(),null!=(i=null==i||null==(i=i.data)?void 0:i[o])&&i.id)?[2,i.id]:[2,null];case 4:return i=e.sent(),devErrorLogger(JSON.stringify(i)),[2,null];case 5:return[2]}})});return function(e){return t.apply(this,arguments)}})(),doesEmailExists=(()=>{var t=_async_to_generator$9(function(t){return _ts_generator$c(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getRestApiUrlFromConfig(),"/v1/admin/username/").concat(t,"/available")).then(function(e){return e.json()}).catch(function(e){return devErrorLogger(e),null})];case 1:return[2,e.sent()]}})});return function(e){return t.apply(this,arguments)}})(),sendSignUpEmailRegistration=(()=>{var t=_async_to_generator$9(function(t){var r,n,o;return _ts_generator$c(this,function(e){switch(e.label){case 0:return r=t.id,n=t.email,o=t.redirectUrl,[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/org/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,orgRegistrationId:r,redirectUrl:o})}).then(function(e){return e.json()}).catch(function(e){return devErrorLogger(e),null})];case 1:return[2,e.sent()]}})});return function(e){return t.apply(this,arguments)}})(),postSignUpOrgRegistration=(()=>{var t=_async_to_generator$9(function(r){var n,o;return _ts_generator$c(this,function(e){switch(e.label){case 0:return n=r.token,o=_object_without_properties(r,["token"]),[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/org"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)},body:JSON.stringify(o)}).then((t=_async_to_generator$9(function(t){var r;return _ts_generator$c(this,function(e){switch(e.label){case 0:return r=[{status:t.status}],[4,t.json()];case 1:return[2,_object_spread$5.apply(void 0,r.concat([e.sent()]))]}})}),function(e){return t.apply(this,arguments)})).catch(function(e){return devErrorLogger(e),null})];case 1:return[2,e.sent()]}var t})});return function(e){return t.apply(this,arguments)}})();function _ts_generator$b(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function createUserSaga(e){var t,r;return _ts_generator$b(this,function(e){switch(e.label){case 0:return e.trys.push([0,8,,11]),[4,select(selectCreateUserPayload)];case 1:return t=e.sent(),[4,call(createUserInHub,t)];case 2:return e.sent()?[4,put(actions.createUserSuccess())]:[3,4];case 3:return e.sent(),[3,7];case 4:return[4,put(actions.createUserFailure())];case 5:return e.sent(),[4,put(showMessage({content:"Cannot create user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error}))];case 6:e.sent(),e.label=7;case 7:return[3,11];case 8:return r=e.sent(),[4,put(actions.createUserFailure())];case 9:return e.sent(),[4,put(showMessage({content:"Cannot create user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error}))];case 10:return e.sent(),devErrorLogger(r),[3,11];case 11:return[2]}})}function activateUserSaga(t){var r,n,o,a;return _ts_generator$b(this,function(e){switch(e.label){case 0:o=t.payload,r=o.password,n=o.userId,o=o.token,e.label=1;case 1:return e.trys.push([1,8,,11]),[4,call(activateUser,r,n,o)];case 2:return e.sent()?[4,put(actions.activateUserSuccess())]:[3,4];case 3:return e.sent(),[3,7];case 4:return[4,put(actions.activateUserFailure())];case 5:return e.sent(),[4,put(showMessage({content:"Cannot activate user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error}))];case 6:e.sent(),e.label=7;case 7:return[3,11];case 8:return a=e.sent(),[4,put(actions.activateUserFailure())];case 9:return e.sent(),[4,put(showMessage({content:"Cannot activate user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error}))];case 10:return e.sent(),console.log(a),[3,11];case 11:return[2]}})}function _ts_generator$a(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function createUserWatcher(){return _ts_generator$a(this,function(e){switch(e.label){case 0:return[4,takeEvery$1(actions.createUserStart.type,createUserSaga)];case 1:return e.sent(),[2]}})}function activateUserWatcher(){return _ts_generator$a(this,function(e){switch(e.label){case 0:return[4,takeEvery$1(actions.activateUserStart.type,activateUserSaga)];case 1:return e.sent(),[2]}})}function _ts_generator$9(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function rootSaga(){return _ts_generator$9(this,function(e){switch(e.label){case 0:return[4,all([createUserWatcher(),activateUserWatcher()])];case 1:return e.sent(),[2]}})}function _define_property$7(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function getSignUpModule(){return{id:SLICE_NAME,reducerMap:_define_property$7({},SLICE_NAME,signUpSlice$1),sagas:[rootSaga],initialActions:[]}}function _array_like_to_array$h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$h(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$h(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$h(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$h(e,t){return _array_with_holes$h(e)||_iterable_to_array_limit$h(e,t)||_unsupported_iterable_to_array$h(e,t)||_non_iterable_rest$h()}function _unsupported_iterable_to_array$h(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$h(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$h(e,t):void 0}var SignUpPassword=function(e){function t(e){e(function(e){return!e})}function r(e){e.preventDefault()}function n(e){"Enter"===e.key&&x&&a()}function o(e,t){e.target.id===T&&e.target.value&&S(e.currentTarget),j(!1),e=e.target.value,O[t](e)}function a(){l?l(f):i&&R(actions.activateUserStart({password:f,userId:i,token:s}))}var i=e.userId,s=e.token,l=e.setPasswordAction,e=e.buttonLabel,u=_sliced_to_array$h(reactExports.useState(!1),2),c=u[0],d=u[1],u=_sliced_to_array$h(reactExports.useState(!1),2),p=u[0],h=u[1],u=_sliced_to_array$h(reactExports.useState(""),2),f=u[0],u=u[1],y=_sliced_to_array$h(reactExports.useState(""),2),m=y[0],y=y[1],g=_sliced_to_array$h(reactExports.useState(!1),2),x=g[0],b=g[1],g=_sliced_to_array$h(reactExports.useState(!1),2),_=g[0],g=g[1],v=_sliced_to_array$h(reactExports.useState(!1),2),E=v[0],j=v[1],v=_sliced_to_array$h(reactExports.useState(null),2),w=v[0],S=v[1],v=useStyles$6({error:E,passwordRequirementsMet:_}).classes,R=useDispatch(),C=reactExports.useRef(),A=(reactExports.useEffect(function(){b(!!(f&&m&&f===m&&_)),setTimeout(function(){return A()},1e3)},[f,m,_]),function(){j(!(!f||!m||f===m))}),O={password:u,confirmPassword:y},u=window.innerWidth<=850,y=Boolean(w),T="sign-up.password";return jsxRuntimeExports.jsxs(Box$1,{className:v.passwordInput,children:[jsxRuntimeExports.jsxs(Box$1,{sx:{position:"relative"},children:[u&&jsxRuntimeExports.jsx(Fade,{in:y,children:jsxRuntimeExports.jsx(Box$1,{sx:{position:"absolute",bottom:"-20px"},children:jsxRuntimeExports.jsx(PasswordRequirements,{password:f,setPasswordRequirementsMet:g})})}),!l&&jsxRuntimeExports.jsx(Header,{text:"Set a password for your account"})]}),jsxRuntimeExports.jsxs(FormControl,{variant:"outlined",className:v.passwordInput,children:[jsxRuntimeExports.jsx(InputLabel,{htmlFor:T,className:v.passwordLabel,children:"Password"}),jsxRuntimeExports.jsx(OutlinedInput,{id:T,"data-testid":T,ref:C,type:c?"text":"password",onChange:function(e){return o(e,"password")},value:f,autoFocus:!0,inputProps:{autoComplete:"new-password"},endAdornment:jsxRuntimeExports.jsx(InputAdornment,{position:"end",children:jsxRuntimeExports.jsx(IconButton,{"aria-label":"toggle password visibility",onClick:function(){return t(d)},onMouseDown:r,edge:"end",children:c?jsxRuntimeExports.jsx(default_1$2,{}):jsxRuntimeExports.jsx(default_1$3,{})})}),onKeyDown:n,onClick:function(e){S(e.currentTarget)}}),jsxRuntimeExports.jsx(Popover,{id:y?"simple-popover":void 0,open:y&&!u,anchorEl:w,onClose:function(){S(null)},disableAutoFocus:!0,disableEnforceFocus:!0,anchorReference:w,transformOrigin:{vertical:"center",horizontal:"right"},anchorOrigin:{vertical:"center",horizontal:"left"},PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none",borderRadius:0}},children:jsxRuntimeExports.jsx(PasswordRequirements,{password:f,setPasswordRequirementsMet:g})})]}),jsxRuntimeExports.jsxs(FormControl,{className:classNames(v.passwordInput,v.passwordFormMarginTop),variant:"outlined",children:[jsxRuntimeExports.jsx(InputLabel,{htmlFor:"sign-up.confirm-password",className:classNames(v.passwordLabel,v.confirmPasswordLabel),children:E?"Passwords must match":"Confirm Password"}),jsxRuntimeExports.jsx(OutlinedInput,{id:"sign-up.confirm-password","data-testid":"sign-up.confirm-password",type:p?"text":"password",onChange:function(e){return o(e,"confirmPassword")},value:m,inputProps:{autoComplete:"new-password"},endAdornment:jsxRuntimeExports.jsx(InputAdornment,{position:"end",children:jsxRuntimeExports.jsx(IconButton,{"aria-label":"toggle password visibility",onClick:_?function(){return t(h)}:function(){return{}},onMouseDown:r,edge:"end",disabled:!_,children:p?jsxRuntimeExports.jsx(default_1$2,{}):jsxRuntimeExports.jsx(default_1$3,{})})}),error:E,onKeyDown:n,disabled:!_})]}),jsxRuntimeExports.jsx(BlackButton,{className:v.passwordFormMarginTop,onClick:a,text:e||SHARED_TEXT.createAccountButton,type:"sign-up",disableButton:!x})]})},DEFAULT_CONTAINER_WIDTH=740;function ResetPasswordWidget(e){var t=e.resetToken,r=e.username,n=e.onSuccess,o=e.organizationInviteId,a=e.containerWidth,a=void 0===a?DEFAULT_CONTAINER_WIDTH:a,e=e.isNewPage,i=void 0!==e&&e,s=(useStyles$7().classes,useDispatch()),l=useSelector(authStatusSelector),u=useSelector(authContextSelector),e=(reactExports.useEffect(function(){"success"===l&&u===AuthContext.ResetPassword&&null!=n&&n()},[l,u]),lodashExports.isEmpty(t)||lodashExports.isEmpty(r)),c=lodashExports.isEmpty(o)?SHARED_TEXT.resetPasswordTitle:SHARED_TEXT.inviteResetPasswordTitle,d=lodashExports.isEmpty(o)?SHARED_TEXT.resetPasswordSubmitButton:SHARED_TEXT.inviteResetPasswordSubmitButton;return jsxRuntimeExports.jsxs(Box,{p:i?0:4,id:"reset-password-widget",width:a,children:[i?jsxRuntimeExports.jsx(Header,{text:c,subText:SHARED_TEXT.resetPasswordSubHeader,type:"reset-pw"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{variant:"h1",sx:{textTransform:"initial",fontSize:22,marginBottom:"20px"},children:c}),jsxRuntimeExports.jsx(Typography,{variant:"body2",children:SHARED_TEXT.resetPasswordSubHeader})]}),e&&jsxRuntimeExports.jsx(Alert,{sx:{mt:4},variant:"outlined",severity:"error",children:SHARED_TEXT.invalidTokenOrUsername}),jsxRuntimeExports.jsx(SignUpPassword,{token:t,setPasswordAction:function(e){s(resetPasswordRequest(i?{resetToken:t,username:r,password:e,organizationInviteId:o,apiUrl:getRestApiUrlFromConfig(),baseUrl:getConfig().baseUrl}:{resetToken:t,username:r,password:e,organizationInviteId:o}))},buttonLabel:d})]})}function _define_property$6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$4(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$6(t,e,r[e])})}return t}var ResetPassword=function(e){return jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(ResetPasswordWidget,_object_spread$4({},e))})},EmailSharedText={emailLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth-email-input-label",defaultMessage:"Email",description:"Label Email"}),continueLabel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth-email-continue-button",defaultMessage:"Continue",description:"Continue Button"}),emailErrorState:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth-email-input-field-error-state-label",defaultMessage:"This is an invalid email",description:"Email error state label"}),emptyEmailErrorMsg:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-auth-empty-email-input-field-error-state-label",defaultMessage:"Email is required",description:"Empty email error state label"})};function _array_like_to_array$g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$g(e){if(Array.isArray(e))return e}function _define_property$5(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$g(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$g(e,t){return _array_with_holes$g(e)||_iterable_to_array_limit$g(e,t)||_unsupported_iterable_to_array$g(e,t)||_non_iterable_rest$g()}function _unsupported_iterable_to_array$g(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$g(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$g(e,t):void 0}var validateEmail=function(e){return e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)},useStyles$5=makeStyles()(function(){var e;return{emailWrapper:(_define_property$5(e={display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Nunito"},"& button",{textTransform:"none",marginTop:"20px",fontSize:"18px",lineHeight:"24px",fontFamily:"Nunito",fontWeight:"600"}),_define_property$5(e,"& input",{fontFamily:"Nunito",lineHeight:"22px",color:"#2A323C"}),_define_property$5(e,"& .MuiOutlinedInput-root, & .Sdk-MuiOutlinedInput-root",{"&:hover fieldset":{border:"1px solid #DADFE8"},"&.Mui-focused fieldset":{border:"1px solid #DADFE8"},"&.Sdk-Mui-focused fieldset":{border:"1px solid #DADFE8"},"&.Mui-error.Mui-focused fieldset":{borderColor:"#d32f2f"},"&.Sdk-Mui-error.Mui-focused fieldset":{borderColor:"#d32f2f"}}),_define_property$5(e,"& .MuiFormControl-root .MuiInputLabel-root.Mui-focused, .Sdk-MuiFormControl-root .Sdk-MuiInputLabel-root.Sdk-Mui-focused",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$5(e,"& .MuiInputLabel-outlined, .Sdk-MuiInputLabel-outlined",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$5(e,"& .MuiFormLabel-root .MuiInputLabel-root, .Sdk-MuiFormLabel-root .Sdk-MuiInputLabel-root",{color:"#9CA8B4"}),_define_property$5(e,"& .Mui-focused .MuiInputLabel-outlined, .Sdk-Mui-focused .Sdk-MuiInputLabel-outlined",{color:"#9CA8B4"}),_define_property$5(e,"& .Mui-error, .Sdk-Mui-error",{color:"#d32f2f !important"}),e),emailField:{width:"368px",height:"52px"},continueBtn:{width:"368px",height:"56px"}}}),EmailInput=function(e){function t(){validateEmail(n)&&r?(h(!1),r()):h(!0)}var r=e.onNextStep,n=e.email,o=e.setEmail,a=e.isLoading,i=e.buttonText,s=e.disableButton,l=e.buttonColor,u=e.buttonTextColor,e=e.error,e=void 0!==e&&e,c=useStyles$5().classes,d=_sliced_to_array$g(reactExports.useState(!1),2),p=d[0],h=d[1],d=EmailSharedText.emailLabel,f=EmailSharedText.emailErrorState,y=EmailSharedText.emptyEmailErrorMsg,f=p?n?f:y:d,y=l?"".concat(l):DEFAULT_BUTTON_COLOR,d=u?"".concat(u):DEFAULT_BUTTON_TEXT_COLOR;return jsxRuntimeExports.jsxs(Box,{className:c.emailWrapper,children:[jsxRuntimeExports.jsx(TextField,{id:"username",error:p||e,"data-testid":"os-auth-email-input-field",label:f,InputProps:{type:"email"},variant:"outlined",value:n,autoComplete:"username",autoFocus:!0,className:c.emailField,onChange:function(e){e=e.target.value;p&&h(!1),o(e)},onKeyDown:function(e){"Enter"===e.key&&t()}}),i&&jsxRuntimeExports.jsx(BlackButton,{onClick:t,className:c.continueBtn,testId:"os-auth-email-continue-btn",loading:a,disableButton:s,type:"continue",text:i,buttonColor:y,buttonTextColor:d})]})};function _array_like_to_array$f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$f(e){if(Array.isArray(e))return e}function _define_property$4(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$f(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$f(e,t){return _array_with_holes$f(e)||_iterable_to_array_limit$f(e,t)||_unsupported_iterable_to_array$f(e,t)||_non_iterable_rest$f()}function _unsupported_iterable_to_array$f(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$f(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$f(e,t):void 0}var _defs,_g,useStyles$4=makeStyles()(function(){var e;return{passwordWrapper:(_define_property$4(e={fontFamily:"Nunito"},"& input",{fontFamily:"Nunito",lineHeight:"22px",color:"#2A323C"}),_define_property$4(e,"& .MuiOutlinedInput-root, .Sdk-MuiOutlinedInput-root",{"&:hover fieldset":{border:"1px solid #DADFE8"},"&.Mui-focused fieldset":{border:"1px solid #DADFE8"},"&.Sdk-Mui-focused fieldset":{border:"1px solid #DADFE8"}}),_define_property$4(e,"& .MuiFormControl-root .MuiInputLabel-root.Mui-focused, .Sdk-MuiFormControl-root .Sdk-MuiInputLabel-root.Sdk-Mui-focused",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$4(e,"& .MuiInputLabel-outlined, .Sdk-MuiInputLabel-outlined",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$4(e,"& .MuiFormLabel-root .MuiInputLabel-root, .Sdk-MuiFormLabel-root .Sdk-MuiInputLabel-root",{color:"#9CA8B4"}),e)}}),PasswordInput=function(e){var t=e.password,r=e.onPasswordChange,n=e.errorMessage,o=e.onPressEnter,e=e.autoFocus,e=void 0===e||e,a=useStyles$4().classes,i=_sliced_to_array$f(reactExports.useState(!1),2),s=i[0],l=i[1],i=_sliced_to_array$f(reactExports.useState("Password"),2),u=i[0],c=i[1];reactExports.useEffect(function(){c(n||"Password")},[n]);return jsxRuntimeExports.jsx(Box,{className:a.passwordWrapper,children:jsxRuntimeExports.jsxs(FormControl,{sx:{width:"100%"},variant:"outlined",children:[jsxRuntimeExports.jsx(InputLabel,{htmlFor:"outlined-adornment-password",style:{color:n?"#d32f2f":"#9CA8B4"},children:u}),jsxRuntimeExports.jsx(OutlinedInput,{id:"outlined-adornment-password","data-testid":"os-auth-password-input-field",type:s?"text":"password",onChange:function(e){e=e.target.value;r(e)},value:t,autoFocus:e,autoComplete:"password",endAdornment:jsxRuntimeExports.jsx(InputAdornment,{position:"end",children:jsxRuntimeExports.jsx(IconButton,{"aria-label":"toggle password visibility",onClick:function(){return l(function(e){return!e})},onMouseDown:function(e){e.preventDefault()},edge:"end",children:s?jsxRuntimeExports.jsx(default_1$4,{}):jsxRuntimeExports.jsx(default_1$1,{})})}),error:!!n,label:u,onKeyDown:function(e){"Enter"===e.key&&o()}})]})})},LoginSkeleton=function(){return jsxRuntimeExports.jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh"},children:jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[jsxRuntimeExports.jsx(Skeleton,{animation:"wave",height:80,width:368}),jsxRuntimeExports.jsx(Skeleton,{animation:"wave",height:80,width:368})]})})},_excluded=["title","titleId"];function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)!{}.hasOwnProperty.call(n,r)||(e[r]=n[r])}return e}).apply(null,arguments)}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),a=0;a<o.length;a++)r=o[a],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n={};for(r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var SvgVeritoneLogo=function(e,t){var r=e.title,n=e.titleId,e=_objectWithoutProperties(e,_excluded);return reactExports.createElement("svg",_extends({id:"Layer_2","data-name":"Layer 2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 372.2444933 70.5603847",ref:t,"aria-labelledby":n},e),r?reactExports.createElement("title",{id:n},r):null,_defs=_defs||reactExports.createElement("defs",null,reactExports.createElement("style",null,"\n .cls-1 {\n fill: #212121;\n stroke-width: 0px;\n }\n ")),_g=_g||reactExports.createElement("g",{id:"primary"},reactExports.createElement("g",{id:"veritone_logo_primary_RGB_cosmos"},reactExports.createElement("g",null,reactExports.createElement("path",{className:"cls-1",d:"M159.5026259.8501463c-1.611277,0-2.9787507.550335-4.0643658,1.6363683-1.0860333,1.0860333-1.6367865,2.453507-1.6367865,4.064784,0,1.5502216.5507531,2.8863312,1.6363683,3.9694372,1.0847788,1.0864515,2.4522524,1.6372047,4.064784,1.6372047,1.5418579,0,2.8888403-.5461531,4.0041468-1.6238227,1.1261794-1.0877061,1.6970055-2.4279975,1.6970055-3.9828192,0-1.6158771-.5708261-2.9875326-1.6978419-4.078166-1.1161428-1.0768332-2.4631253-1.6229863-4.0033104-1.6229863Z"}),reactExports.createElement("polygon",{className:"cls-1",points:"154.841132 22.7520748 154.841132 69.6152806 164.0696926 69.6152806 164.0696926 19.9386786 154.841132 22.7520748"})),reactExports.createElement("path",{className:"cls-1",d:"M88.9585505,18.7109702c-7.2555558,0-13.4250783,2.5066168-18.3366923,7.4508494-4.9095231,4.9433963-7.3989942,11.1589194-7.3989942,18.4738578,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0036153,4.9392144,11.2814483,7.4437402,18.6599513,7.4437402,5.3502928,0,10.155269-1.3448915,14.2815266-3.9974558,4.1195666-2.6483824,7.2706106-6.2142685,9.3648943-10.5977115l.4834249-1.0120141-8.0208392-3.3843927-.4416062.9195947c-1.4159834,2.9507321-3.5090126,5.3139105-6.2213777,7.0238798-2.7094378,1.7087148-5.8558817,2.5751996-9.3515123,2.5751996-4.5565727,0-8.4636999-1.448602-11.6134893-4.3060783-2.8737856-2.6040545-4.6556832-5.9307373-5.3076377-9.9018473h41.8242019l.073601-.9911047c.5871355-7.893292-1.6204772-14.6332224-6.5626189-20.0332796-4.9459054-5.4042391-11.3320491-8.1442046-18.9811194-8.1442046ZM99.7327372,31.1215252c2.6626008,2.3477055,4.4148071,5.2892375,5.2194001,8.758104h-32.0482291c.9028671-3.5182127,2.7203107-6.4731267,5.4134392-8.7978319,2.9988237-2.5864906,6.5789282-3.8979271,10.6412031-3.8979271,4.1827129,0,7.8079817,1.3248185,10.7741867,3.937655"}),reactExports.createElement("path",{className:"cls-1",d:"M189.3478424,0l-9.2289833,2.8298759v16.8261985h-10.7729322v8.5669923h10.7729322v23.7835865c0,5.878882,1.4904208,10.3321624,4.4290254,13.2356393,2.934841,2.9018041,7.4642314,4.3729883,13.4631333,4.3729883h5.8901731v-8.5674105h-5.8901731c-3.1543895,0-5.4117664-.657391-6.7089845-1.9541909-1.2967999-1.2972181-1.9541909-3.5863773-1.9541909-6.8034949v-24.0671177h14.5533486v-8.5669923h-14.5533486V0Z"}),reactExports.createElement("path",{className:"cls-1",d:"M231.6546328,18.7109702c-7.3768302,0-13.6550815,2.5041077-18.6599513,7.4433221-5.0086335,4.9442326-7.5482872,11.1622649-7.5482872,18.4813852,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0031971,4.9387962,11.2818665,7.4437402,18.6599513,7.4437402,7.378503,0,13.656336-2.5045259,18.6599513-7.4437402,5.0086335-4.9425599,7.5482872-11.1605921,7.5482872-18.480967,0-7.3191203-2.5396536-13.5371526-7.5482872-18.4813852-5.0048698-4.9392144-11.2831211-7.4433221-18.6599513-7.4433221ZM231.6546328,61.8039534c-4.7857395,0-8.6937031-1.6108588-11.9467849-4.9245778-3.2589364-3.3179008-4.8434494-7.322884-4.8434494-12.2436981,0-4.8526495,1.6296773-8.9717979,4.8434494-12.2436981l.0004182-.0004182c3.2526636-3.3133008,7.1606272-4.9241596,11.9463667-4.9241596,4.8476313,0,8.7710679,1.5953859,11.9936219,4.8769044,3.1828262,3.2417907,4.7966124,7.3772484,4.7966124,12.2913715,0,4.9153777-1.6137862,9.0508354-4.7966124,12.2913715-3.2217177,3.2815185-7.1447361,4.8769044-11.9936219,4.8769044Z"}),reactExports.createElement("path",{className:"cls-1",d:"M289.395475,18.7109702c-4.3780066,0-8.2838792,1.2817452-11.6101438,3.8092713-2.0119008,1.5288941-3.6804695,3.3910837-4.9914878,5.5639867v-8.428154h-9.2285652v49.9592063h9.2285652v-28.3815597c0-4.0217107,1.3164547-7.2643377,4.0254744-9.9135565,2.7136197-2.656328,6.0854667-3.9472733,10.3079075-3.9472733,3.8268352,0,6.9444242,1.2997272,9.5309148,3.9732009,2.5956908,2.6851829,3.8573629,5.9194462,3.8573629,9.8876289v28.3815597h9.2289833v-29.2321534c0-6.1711952-1.9240814-11.3763769-5.7195525-15.4704341-3.8176351-4.1149665-8.7397038-6.2017229-14.6294587-6.2017229Z"}),reactExports.createElement("path",{className:"cls-1",d:"M359.7852391,26.8551748c-4.9459054-5.4042391-11.3320491-8.1442046-18.9811194-8.1442046-7.2555558,0-13.4250783,2.5066168-18.3366923,7.4508494-4.9095231,4.9433963-7.3989942,11.1589194-7.3989942,18.4738578,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0036153,4.9392144,11.2814483,7.4437402,18.6599513,7.4437402,5.3502928,0,10.155269-1.3448915,14.2815266-3.9974558,4.1195666-2.6483824,7.2706106-6.2142685,9.3648943-10.5977115l.4834249-1.0120141-8.0208392-3.3843927-.4416062.9195947c-1.4159834,2.9507321-3.5090126,5.3139105-6.2213777,7.0238798-2.7094378,1.7087148-5.8558817,2.5751996-9.3515123,2.5751996-4.5565727,0-8.4636999-1.448602-11.6134893-4.3060783-2.8737856-2.6040545-4.6556832-5.9307373-5.3076377-9.9018473h41.8242019l.073601-.9911047c.5871355-7.893292-1.6204772-14.6332224-6.5626189-20.0332796ZM330.1629166,31.0817974c2.9988237-2.5864906,6.5789282-3.8979271,10.6412031-3.8979271,4.1827129,0,7.8079817,1.3248185,10.7741867,3.937655,2.6626008,2.3477055,4.4148071,5.2892375,5.2194001,8.758104h-32.0482291c.9028671-3.5182127,2.7203107-6.4731267,5.4134392-8.7978319Z"}),reactExports.createElement("g",null,reactExports.createElement("polygon",{className:"cls-1",points:"55.314171 18.9725847 27.6383499 61.7193071 33.3546939 70.5603847 66.7413769 18.9725847 55.314171 18.9725847"}),reactExports.createElement("polygon",{className:"cls-1",points:"32.5518799 51.5991531 11.4276733 18.9726882 0 18.9726882 21.1152954 51.5991531 32.5518799 51.5991531"})),reactExports.createElement("path",{className:"cls-1",d:"M148.2136224,19.1065266c-4.7230092-.8650191-8.9683997-.1471853-12.6188146,2.1290521-2.4020294,1.4985026-4.3988104,3.7671606-5.9704166,6.7739455v-8.3157235l-9.2285412,2.8133903v47.1080896h9.2285412v-28.3815751c0-4.7233759,1.7275933-8.2898072,5.2813108-10.903446,3.5830568-2.6349098,7.7975189-3.3627679,12.8822567-2.2275831l1.3038855.2916811v-9.126954l-.8782218-.1608769Z"}),reactExports.createElement("path",{className:"cls-1",d:"M366.5136132,66.7238363v-.3888638h2.3283219v.3888638h-.9575771v2.4790067h-.4131678v-2.4790067h-.9575771ZM369.2453813,66.3349725h.4812189l1.0207674,2.1047253,1.0159066-2.1047253h.4812189v2.8678704h-.4131678v-2.0950037l-.9381339,1.8908502h-.2965086l-.9381339-1.8859894v2.0901429h-.4131678v-2.8678704Z"}))))},ForwardRef=reactExports.forwardRef(SvgVeritoneLogo),img$1="data:image/png;base64,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",img="data:image/png;base64,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",Footer=function(e){var t=e.showLogoInFooter,e=e.loginConfigs;return jsxRuntimeExports.jsxs(Box,{sx:{textAlign:"center",marginTop:"20px","& #aiware-logo":{width:"110px",marginTop:"5px"}},"data-testid":"aiware-auth-footer",children:[t&&!(null!=e&&e.hideVeritoneBranding)&&jsxRuntimeExports.jsxs(Stack,{sx:{justifyContent:"center",alignItems:"center"},children:[jsxRuntimeExports.jsx(Typography,{sx:{color:"#5C6269"},variant:"caption",children:"Powered by"}),jsxRuntimeExports.jsx("img",{id:"aiware-logo",draggable:!1,src:img,alt:"aiWARE Logo"})]}),t&&!(null!=e&&e.hideVeritoneBranding)&&jsxRuntimeExports.jsxs(Typography,{sx:{marginBottom:"18px",marginTop:"50px",fontFamily:"Nunito",fontSize:"10px",lineHeight:"16px",color:"#5C6269"},children:["© ",(new Date).getFullYear()," Veritone, Inc., All Rights Reserved."," ",jsxRuntimeExports.jsxs("a",{href:"https://www.veritone.com/terms",target:"_blank",style:{color:"#0C53B0",textDecoration:"none"},rel:"noreferrer",children:["Terms of Service"," "]})]})]})};function _array_like_to_array$e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$e(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$e(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$e(e,t){return _array_with_holes$e(e)||_iterable_to_array_limit$e(e,t)||_unsupported_iterable_to_array$e(e,t)||_non_iterable_rest$e()}function _unsupported_iterable_to_array$e(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$e(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$e(e,t):void 0}var PageContainer=function(e){var t=e.children,r=e.showLogoInFooter,r=void 0===r||r,e=e.loginConfigs,n=_sliced_to_array$e(React.useState(!1),2),o=n[0],a=n[1];return jsxRuntimeExports.jsx(Container,{children:jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"space-between",height:"100vh"},children:[jsxRuntimeExports.jsxs(Box,{sx:{maxWidth:"368px",width:"100%"},children:[null!=e&&e.logo&&!o?jsxRuntimeExports.jsx(CustomLogoContainer,{logoSrc:e.logo,onError:function(e){a(!0)}}):jsxRuntimeExports.jsxs(Box,{sx:{marginTop:"calc(100vh * 0.2)",marginBottom:"calc(100vh * 0.06)",textAlign:"center",position:"relative",maxWidth:"368px",marginLeft:"auto",marginRight:"auto","& #veritone-logo-svg":{width:"220px"},"& #veritone-v-mark-png":{position:"absolute",bottom:"-90%",left:"-5%",width:"400px",pointerEvents:"none"}},children:[!(null!=e&&e.hideVeritoneBranding)&&jsxRuntimeExports.jsx(VMarkLogo,{}),!(null!=e&&e.hideVeritoneBranding)&&jsxRuntimeExports.jsx(ForwardRef,{id:"veritone-logo-svg"})]}),t]}),jsxRuntimeExports.jsx(Footer,{showLogoInFooter:r,loginConfigs:e})]})})};function VMarkLogo(){return jsxRuntimeExports.jsx("img",{draggable:"false",id:"veritone-v-mark-png",src:img$1,alt:"Veritone Logo"})}var CustomLogoContainer=function(e){var t=e.logoSrc,e=e.onError,r=_sliced_to_array$e(React.useState(0),2),n=r[0],o=r[1],r=_sliced_to_array$e(React.useState(0),2),a=r[0],i=r[1];return jsxRuntimeExports.jsx(Box,{sx:{width:"270px",height:"270px",maxWidth:"100vw",display:"flex",alignCenter:"center",justifyContent:"center",margin:"0 auto",marginTop:"min(calc(100vh * 0.1), calc(".concat(n,"px * 0.5))"),marginBottom:"min(calc(100vh * 0.01), calc(".concat(a,"px * 0.1))"),textAlign:"center"},children:jsxRuntimeExports.jsx("img",{style:{pointerEvents:"none",objectFit:"contain",width:"100%",height:"100%"},onLoad:function(e){o(e.target.naturalHeight),i(e.target.naturalWidth)},src:t,alt:"instance-logo",onError:e})})},useStyles$3=makeStyles()(function(){return{btnWrapper:{display:"flex",alignItems:"center",width:"100%",justifyContent:"center",flexDirection:"column"},openIdLogo:{width:"24px",height:"24px",marginRight:"8px"},openIdBtn:{width:"368px",marginTop:"20px",height:"56px",border:"1px solid #DADFE8",borderRadius:"4px",fontFamily:"Nunito",fontStyle:"normal",fontWeight:"600",fontSize:"18px",lineHeight:"24px",letterSpacing:"-1.30385e-09px",textTransform:"none","&:hover, &:focus":{border:"1px solid #DADFE8",color:"#2A323C"}}}}),OpenID=function(e){var t=e.openIdItems,r=e.redirectUrl,n=useStyles$3().classes;return jsxRuntimeExports.jsx(Box,{className:n.btnWrapper,children:t&&t.map(function(t,e){return jsxRuntimeExports.jsxs(Button,{variant:"outlined","data-testid":"os-auth-openId-button-".concat(e),className:n.openIdBtn,onClick:function(){var e;e=t.loginUrl,window.location.href=e+(r?"?redirectUrl=".concat(encodeURIComponent(r)):"")},sx:{backgroundColor:t.loginButtonStyle&&t.loginButtonStyle.btnColor?t.loginButtonStyle.btnColor:"#FFFFFF","&:hover, &:focus":{backgroundColor:t.loginButtonStyle&&t.loginButtonStyle.btnColor?t.loginButtonStyle.btnColor:"#FFFFFF"}},children:[t.loginButtonStyle&&t.loginButtonStyle.btnLogo&&jsxRuntimeExports.jsx("img",{className:n.openIdLogo,alt:"icon",src:t.loginButtonStyle.btnLogo,"data-testid":"os-auth-openId-image-".concat(e)}),jsxRuntimeExports.jsx("span",{"data-testid":"os-auth-openId-name-".concat(e),style:{marginTop:"3px",color:t.loginButtonStyle&&t.loginButtonStyle.btnTextColor?t.loginButtonStyle.btnTextColor:"#2A323C"},children:(null==t?void 0:t.name)&&"Login with "+(20<(e=t.name).length?e.substring(0,20)+"...":e)})]},t.connectId)})})};function _array_like_to_array$d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$d(e){if(Array.isArray(e))return e}function asyncGeneratorStep$8(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$8(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$8(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$8(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$d(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$d(e,t){return _array_with_holes$d(e)||_iterable_to_array_limit$d(e,t)||_unsupported_iterable_to_array$d(e,t)||_non_iterable_rest$d()}function _unsupported_iterable_to_array$d(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$d(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$d(e,t):void 0}function _ts_generator$8(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function useLoginConfig(){var r=useParams().slug,n=useNavigate(),e=_sliced_to_array$d(reactExports.useState(),2),t=e[0],o=e[1],e=_sliced_to_array$d(reactExports.useState(null),2),a=e[0],i=e[1];return reactExports.useEffect(function(){var e;void 0===t?o(!0):t&&(r?(e=_async_to_generator$8(function(){var t;return _ts_generator$8(this,function(e){switch(e.label){case 0:return[4,getLoginConfigBySlug(r)];case 1:return(t=e.sent())?(i(t),o(!1)):(t=window.location.pathname.replace("/".concat(r),"")+window.location.search,n(t),o(!1)),[2]}})}),function(){e.apply(this,arguments)}()):o(!1))},[r,t]),{slug:r,slugUri:r?"/".concat(r):"",loginConfigs:a,isLoadingLoginConfigs:t}}var EDesktopSnackbarMessageType,BlueLinkText=function(e){var t=e.onClick,r=e.text;return jsxRuntimeExports.jsx(Typography,{sx:{fontFamily:"Nunito",fontSize:"14px",lineHeight:"20px",letterSpacing:"-1.30385e-09px",color:"#0C53B0",cursor:"pointer"},onClick:t,"data-testid":"os-auth-".concat(e.type,"-link-button"),children:r})},OrDivider=function(){return jsxRuntimeExports.jsxs(Box,{sx:{marginTop:"20px",position:"relative"},children:[jsxRuntimeExports.jsx(Divider,{sx:{margin:"0 14px",color:"#D5DFE9"}}),jsxRuntimeExports.jsx(Typography,{sx:{color:"#D5DFE9",fontSize:"14px",margin:0,top:"-12px",padding:"0 10px",position:"absolute",left:"calc(50% - 15px)",background:"#FFFFFF",fontFamily:"Roboto",letterSpacing:"- 1.30385e-09px",fontStyle:"normal",fontWeight:"normal"},children:"or"})]})},useStyles$2=makeStyles()(function(e,t){t="Sign Up"===t.label;return{button:{position:"absolute",right:t?"220px":"40px",top:"30px",background:t?DEFAULT_BUTTON_COLOR:"none",border:t?"none":"1px solid #5C6269",color:t?DEFAULT_BUTTON_TEXT_COLOR:"#5C6269",borderRadius:"4px",paddingLeft:"14px",paddingRight:"14px",fontWeight:400,"&:hover":{background:t?DEFAULT_BUTTON_COLOR:"none",opacity:.9}}}}),SignUpButton=function(e){var t=e.label,t=void 0===t?"Sign Up":t,e=e.navigateTo,r=void 0===e?"sign-up":e,n=useNavigate(),e=useSelector(selectStatus),o=useStyles$2({label:t}).classes;return jsxRuntimeExports.jsx(Button,{className:o.button,onClick:function(){var e=getConfig().signupUrl||"";"sign-up"===r&&e?window.location.href=e:n("/ui/auth/".concat(r))},disabled:"sign-up"!==r&&"loading"===e,children:t})};function _array_like_to_array$c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$c(e){if(Array.isArray(e))return e}function _define_property$3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$c(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$c(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$3(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$3(t,e,r[e])})}return t}function ownKeys$2(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$2(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$2(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _sliced_to_array$c(e,t){return _array_with_holes$c(e)||_iterable_to_array_limit$c(e,t)||_unsupported_iterable_to_array$c(e,t)||_non_iterable_rest$c()}function _unsupported_iterable_to_array$c(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$c(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$c(e,t):void 0}var DesktopSnackbarMessage=_define_property$3({},(EDesktopSnackbarMessageType=EDesktopSnackbarMessageType||{}).EnvError="EnvError",{title:"Environment Error",description:"Due to a temporary issue the environment data could not be fully retrieved. Please select from the available environments or try again later."}),DesktopSnackbar=function(e){var t=e.open,r=e.message,n=e.onClose,o=_sliced_to_array$c(reactExports.useState(""),2),a=o[0],i=o[1],o=_sliced_to_array$c(reactExports.useState(""),2),s=o[0],l=o[1];return reactExports.useEffect(function(){r&&(i(r.title),l(r.description))},[e.message]),jsxRuntimeExports.jsx(Snackbar,{"data-testid":"os-auth-desktop-snackbar",onClose:n,ContentProps:{sx:{backgroundColor:"#465364"}},anchorOrigin:{vertical:"bottom",horizontal:"right"},TransitionComponent:SlideTransition,open:t,message:jsxRuntimeExports.jsx(function(){return jsxRuntimeExports.jsxs(Stack,{sx:{gap:"10px",position:"relative",transform:"translate(5px, -5px)",paddingTop:"10px"},children:[jsxRuntimeExports.jsx(Typography,{variant:"h6",children:a}),jsxRuntimeExports.jsx(Typography,{sx:{width:"350px",fontSize:"14px"},variant:"body1",children:s}),jsxRuntimeExports.jsx(IconButton,{sx:{position:"absolute",top:0,right:0,color:"#FFF"},onClick:n,size:"small",children:jsxRuntimeExports.jsx(Close$1,{fontSize:"small"})})]})},{}),autoHideDuration:6e3})};function SlideTransition(e){return jsxRuntimeExports.jsx(Slide,_object_spread_props$2(_object_spread$3({},e),{direction:"up"}))}function _array_like_to_array$b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$b(e){if(Array.isArray(e))return e}function asyncGeneratorStep$7(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$7(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$7(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$7(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$b(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$b(e,t){return _array_with_holes$b(e)||_iterable_to_array_limit$b(e,t)||_unsupported_iterable_to_array$b(e,t)||_non_iterable_rest$b()}function _unsupported_iterable_to_array$b(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$b(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$b(e,t):void 0}function _ts_generator$7(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var LoginPage=reactExports.memo(function(e){function F(e){return o.apply(this,arguments)}function t(){"org-registration"===j&&f?window.location.href=f:l(1)}var r,n,o,p=e.allowVanityDomain,h=e.onLoginSuccess,e=_sliced_to_array$b(reactExports.useState(1),2),a=e[0],l=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),f=e[0],U=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),i=e[0],B=e[1],e=_sliced_to_array$b(reactExports.useState([]),2),s=e[0],L=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),y=e[0],u=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),m=e[0],N=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),c=e[0],g=e[1],e=_sliced_to_array$b(reactExports.useState(!1),2),D=e[0],x=e[1],e=_sliced_to_array$b(reactExports.useState(!1),2),d=e[0],b=e[1],e=_sliced_to_array$b(reactExports.useState(!1),2),_=e[0],v=e[1],e=_sliced_to_array$b(reactExports.useState([]),2),E=e[0],G=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),j=e[0],H=e[1],e=_sliced_to_array$b(reactExports.useState({aiwareInstanceName:"aiWARE US",coreAdminApiUrl:getRestApiUrlFromConfig(),coreGraphqlApiUrl:getConfig().baseUrl}),2),w=e[0],S=e[1],e=_sliced_to_array$b(reactExports.useState(null),2),R=e[0],C=e[1],e=getConfig(),A=e.disableEnvironmentDiscovery,O=e.hubUrl,T=!A,k=useNavigate(),e=useLoginConfig(),A=e.slug,Q=e.slugUri,I=e.loginConfigs,e=e.isLoadingLoginConfigs,P=(reactExports.useEffect(function(){var e=new URL(window.location.href),t=e.searchParams.get("redirect"),r=e.searchParams.get("openIdRedirect"),n=e.searchParams.get("email"),o=e.searchParams.get("from");e.hash&&(t+=e.hash,r+=e.hash),t&&U(t),r&&B(r),n&&(u(n),b(!0)),o&&H(o)},[]),r=_async_to_generator$7(function(t){var r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return v(!1),[4,getOrgOpenIdProviders(y,t)];case 1:return r=e.sent(),r.find(function(e){return e.required})&&v(!0),L(r),[2]}})}),function(e){return r.apply(this,arguments)}),$=reactExports.useCallback(_async_to_generator$7(function(){var t,r,n,o,a,i,s;return _ts_generator$7(this,function(e){switch(e.label){case 0:return t=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];b(!1),l(2),e&&C(DesktopSnackbarMessage[EDesktopSnackbarMessageType.EnvError])},T&&O?[3,2]:[4,P(w.coreAdminApiUrl)];case 1:return e.sent(),t(),[2];case 2:return e.trys.push([2,7,,9]),[4,getUserInstances(y)];case 3:return!(r=e.sent())||!r.success||r.count<=0?[4,P(getRestApiUrlFromConfig())]:[3,5];case 4:return e.sent(),t(!0),[2];case 5:return n=r.result.map(function(e){return{aiwareInstanceID:e.aiwareInstanceID,aiwareInstanceName:e.AiwareInstanceName,coreGraphqlApiUrl:e.GraphqlEndpoint,coreAdminApiUrl:e.GraphqlEndpoint.replace("/v3/graphql","")}}),o=n[0],a=getCookie("last-login-instance-url"),s=n.find(function(e){return e.coreGraphqlApiUrl===a}),i=n.find(function(e){return e.coreGraphqlApiUrl===getConfig().baseUrl}),s?o=s:i&&(o=i),S(o),G(n),[4,P(o.coreAdminApiUrl)];case 6:return e.sent(),t(),[3,9];case 7:return s=e.sent(),console.error(s),[4,P(getRestApiUrlFromConfig())];case 8:return e.sent(),t(!0),[3,9];case 9:return[2]}})}),[y,O,T,w.coreAdminApiUrl]),z=(reactExports.useEffect(function(){d&&y&&$().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},[d,y,$]),n=_async_to_generator$7(function(){var t,r,n,o,a,i,s,l,u,c,d;return _ts_generator$7(this,function(e){switch(e.label){case 0:return m?(x(!0),[4,userLoginMutation(y,m,null!=p&&p,w.coreGraphqlApiUrl)]):(g("Password is required"),[2]);case 1:return(r=e.sent(),x(!1),r&&r.ok)?[4,r.json()]:[3,9];case 2:if((t=e.sent()).errors&&t.errors.length)return"not_found"===t.errors[0].name?g("Email or Password is incorrect"):g("Something went wrong with login. Please try again"),[2];e.label=3;case 3:return(e.trys.push([3,7,,8]),n=null==t||null==(r=t.data)||null==(n=r.userLogin)?void 0:n.token)?[4,getUserSettings(n)]:[3,6];case 4:return(a=e.sent(),o=a.userSettings,a=a.userId,o&&o.length)?(i=o.find(function(e){return"customRegistrationId"===e.key}))&&i.value?[4,getSignUpConfig("",i.value)]:[3,6]:[3,6];case 5:if((i=e.sent())&&i.files&&i.files.length&&(s=i.files.find(function(e){return"termsOfService"===e.type&&"active"===e.status}),!o.find(function(e){return e.key===(null==s?void 0:s.fileId)})))return k({pathname:"/ui/auth/signup/".concat(i.slug,"/terms-of-service"),search:"?userId=".concat(encodeURIComponent(a),"&token=").concat(encodeURIComponent(n),"&redirect=").concat(encodeURIComponent(f),"&referer=login")}),[2];e.label=6;case 6:return[3,8];case 7:return l=e.sent(),devErrorLogger(l),[3,8];case 8:if(setCookie("last-login-instance-url",w.coreGraphqlApiUrl,365),f){if("org-registration"===j)return u=null==t||null==(l=t.data)||null==(u=l.userLogin)?void 0:u.token,window.location.href=f+"/terms-of-service?email=".concat(encodeURIComponent(y),"&token=").concat(encodeURIComponent(u)),[2];window.location.href=f}else h?(c=null==t||null==(c=t.data)||null==(c=c.userLogin)?void 0:c.token,h(c)):(d=w.coreAdminApiUrl?w.coreAdminApiUrl+"/api/admin/switch-app":getConfig().switchAppUrl,window.location.href=d+"/default");return[3,10];case 9:g("Something went wrong with login. Please try again"),e.label=10;case 10:return[2]}})}),function(){return n.apply(this,arguments)}),M=(o=_async_to_generator$7(function(t){var r,n;return _ts_generator$7(this,function(e){switch(e.label){case 0:return(r=t.target.value,n=E.find(function(e){return e.coreGraphqlApiUrl===r}))?(S(n),[4,P(n.coreAdminApiUrl)]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})}),reactExports.useEffect(function(){},[]),getConfig());return!1!==e?jsxRuntimeExports.jsx(LoginSkeleton,{}):jsxRuntimeExports.jsxs(PageContainer,{loginConfigs:I,children:[jsxRuntimeExports.jsx(DesktopSnackbar,{open:!!R,message:R,onClose:function(){return C(null)}}),M.signupUrl&&!A&&jsxRuntimeExports.jsx(SignUpButton,{}),jsxRuntimeExports.jsxs("div",{style:{display:1===a?"block":"none"},children:[jsxRuntimeExports.jsx(Header,{text:"Welcome back"}),jsxRuntimeExports.jsx(EmailInput,{email:y,setEmail:function(e){u(e),g("")},onNextStep:function(){b(!0)},isLoading:d,buttonText:"Continue",buttonColor:null==I?void 0:I.buttonColor,buttonTextColor:null==I?void 0:I.buttonTextColor}),(null==M?void 0:M.displaySystemUseInLogin)&&jsxRuntimeExports.jsxs(Stack,{gap:4,mt:8,sx:{maxWidth:"558px"},children:[jsxRuntimeExports.jsx(Typography,{variant:"body1","data-test":"fedramp-system-use-notice","data-testid":"fedramp-system-use-notice-1",sx:{fontSize:"12px",lineHeight:"16px",fontWeight:"400",textAlign:"justify"},children:"The use of the system is restricted to authorized users only. The system and equipment are subject to monitoring to ensure proper performance of applicable security features or procedures. Such monitoring may result in the acquisition, recording, and analysis of all data being communicated, transmitted, processed or stored in the application/system, including but not limited to information stored locally on the hard drive by the user. There is no right of privacy in the system. If monitoring reveals possible evidence of criminal activity, such evidence may be provided to law enforcement personnel, and other personnel in conjunction with the report of improper or unauthorized use."}),jsxRuntimeExports.jsx(Typography,{variant:"body1","data-test":"fedramp-system-use-notice","data-testid":"fedramp-system-use-notice-2",sx:{fontSize:"12px",lineHeight:"16px",fontWeight:"400",textAlign:"center"},children:"ANYONE USING THE SYSTEM EXPRESSLY CONSENTS TO US HC MONITORING FOR NETWORK ADMINISTRATION AND SECURITY PURPOSES."})]})]}),jsxRuntimeExports.jsxs("div",{style:{display:2===a?"block":"none"},children:["org-registration"===j&&jsxRuntimeExports.jsx(Stack,{mt:8,sx:{maxWidth:"368px"},children:jsxRuntimeExports.jsx(Typography,{"data-testid":"os-auth-org-registration-email-message",variant:"body1",sx:{fontSize:"18px",textAlign:"justify",marginBottom:"30px"},children:"This email has an existing aiWARE account, to continue the registration process please authenticate below."})}),jsxRuntimeExports.jsx(Header,{text:_?"Choose Authentication Option for":"Enter Password for",subText:y})," ",T&&0<E.length&&jsxRuntimeExports.jsx(Select,{value:w.coreGraphqlApiUrl,onChange:F,disabled:E.length<2,"data-testid":"os-auth-env-dropdown-select",sx:{width:"368px",height:"52px",marginBottom:"15px"},renderValue:function(e){return jsxRuntimeExports.jsxs(Stack,{direction:"row",alignItems:"center",children:[jsxRuntimeExports.jsx(Location,{sx:{width:"27px",height:"26px",color:E.length<2?"#9CA8B4":"#555F7C",marginRight:"8px"}}),jsxRuntimeExports.jsx("span",{children:(t=e,null==(e=E.find(function(e){return e.coreGraphqlApiUrl===t}))?void 0:e.aiwareInstanceName)})]});var t},children:E.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{"data-testid":"os-auth-env-dropdown-item",value:e.coreGraphqlApiUrl,children:e.aiwareInstanceName},e.aiwareInstanceName)})}),_?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[s&&0<s.length&&jsxRuntimeExports.jsx(OpenID,{openIdItems:s,redirectUrl:i||f}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:t,text:"Back to Login",type:"login"})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PasswordInput,{password:m,errorMessage:c,onPasswordChange:function(e){c&&g(""),N(e)},onPressEnter:function(){z().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})}}),jsxRuntimeExports.jsx(Box,{sx:{mt:"14px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){k("/ui/auth/forgot".concat(Q),{state:{emailFromLogin:y}})},text:"Forgot Password?",type:"forgot"})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"25px"},children:jsxRuntimeExports.jsx(BlackButton,{onClick:function(){z().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},text:"Login",type:"login",loading:D,buttonColor:null==I?void 0:I.buttonColor,buttonTextColor:null==I?void 0:I.buttonTextColor})}),s&&0<s.length&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OrDivider,{})," ",jsxRuntimeExports.jsx(OpenID,{openIdItems:s,redirectUrl:i||f})]}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:t,text:"Back to Login",type:"login"})})]})]})]})});function _array_like_to_array$a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$a(e){if(Array.isArray(e))return e}function asyncGeneratorStep$6(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$6(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$6(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$6(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$a(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$a(e,t){return _array_with_holes$a(e)||_iterable_to_array_limit$a(e,t)||_unsupported_iterable_to_array$a(e,t)||_non_iterable_rest$a()}function _unsupported_iterable_to_array$a(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$a(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$a(e,t):void 0}function _ts_generator$6(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var Forgot=function(){var e,t=_sliced_to_array$a(reactExports.useState(""),2),r=t[0],n=t[1],t=_sliced_to_array$a(reactExports.useState(!1),2),o=t[0],a=t[1],t=_sliced_to_array$a(reactExports.useState(1),2),i=t[0],s=t[1],l=useNavigate(),u=useLocation().state,t=useLoginConfig(),c=t.slugUri,d=t.loginConfigs,t=t.isLoadingLoginConfigs,p=(reactExports.useEffect(function(){u&&u.emailFromLogin&&n(u.emailFromLogin)},[u]),e=_async_to_generator$6(function(){var t;return _ts_generator$6(this,function(e){switch(e.label){case 0:a(!0),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,createPasswordResetRequestMutation(r)];case 2:return[4,null==(t=e.sent())?void 0:t.json()];case 3:return(t=e.sent()).errors&&t.errors.length?(alert("Something went wrong. Please try again."),a(!1),[2]):(a(!1),s(2),[3,5]);case 4:return e.sent(),alert("Something went wrong. Please try again."),a(!1),[3,5];case 5:return[2]}})}),function(){return e.apply(this,arguments)});return!1!==t?jsxRuntimeExports.jsx(LoginSkeleton,{}):jsxRuntimeExports.jsxs(PageContainer,{loginConfigs:d,children:[1===i?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Header,{text:"Forgot Password",subText:"Enter your registered email to reset your password."}),jsxRuntimeExports.jsx(EmailInput,{email:r,setEmail:n,onNextStep:function(){p().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},isLoading:o,buttonText:"Send",buttonColor:null==d?void 0:d.buttonColor,buttonTextColor:null==d?void 0:d.buttonTextColor})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Header,{text:"Password reset requested",subText:"Your password reset will be sent to the email provided if it matches our records."}),jsxRuntimeExports.jsx(Box,{sx:{mt:"25px"},children:jsxRuntimeExports.jsx(BlackButton,{onClick:function(){p().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},text:"Request Password Again",type:"reset-pw",loading:o,buttonColor:null==d?void 0:d.buttonColor,buttonTextColor:null==d?void 0:d.buttonTextColor})})]}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){l("/ui/auth/login".concat(c))},text:"Back to Login",type:"login"})})]})},RestrictedProvider=function(){var e=useNavigate();return jsxRuntimeExports.jsxs(PageContainer,{children:[jsxRuntimeExports.jsx(Header,{text:"Authentication Restriction",subText:"Authenticating with this OpenID provider has been restricted by an admin of your account. We are sorry for the inconvenience. Please return to the login screen and choose another authentication provider.",type:"restricted-provider"}),jsxRuntimeExports.jsx(BlackButton,{onClick:function(){return e("/ui/auth/login")},text:"Back to Login",type:"back-to-login",loading:!1})]})};function _array_like_to_array$9(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$9(e){if(Array.isArray(e))return e}function asyncGeneratorStep$5(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$5(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$5(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$5(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$9(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$9(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$9(e,t){return _array_with_holes$9(e)||_iterable_to_array_limit$9(e,t)||_unsupported_iterable_to_array$9(e,t)||_non_iterable_rest$9()}function _unsupported_iterable_to_array$9(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$9(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$9(e,t):void 0}function _ts_generator$5(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var AccountLinking=function(){var e,t=_sliced_to_array$9(reactExports.useState(1),2),r=t[0],n=t[1],t=_sliced_to_array$9(reactExports.useState(""),2),o=t[0],t=t[1],a=_sliced_to_array$9(reactExports.useState(""),2),i=a[0],a=a[1],s=useNavigate(),l=_sliced_to_array$9(reactExports.useState(!1),2),u=l[0],c=l[1],l=_sliced_to_array$9(reactExports.useState(""),2),d=l[0],p=l[1],l=_sliced_to_array$9(reactExports.useState(""),2),h=l[0],f=l[1],y=(reactExports.useEffect(function(){var e=new URLSearchParams(window.location.search).get("session");e&&p(e)},[]),reactExports.useEffect(function(){f("")},[o,i]),e=_async_to_generator$5(function(){var t,r;return _ts_generator$5(this,function(e){switch(e.label){case 0:if(u)return[2];c(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,linkUserToOidAndLogin(o,i,d)];case 2:return 200===(t=e.sent()).status?window.location.href="".concat((null==(r=window.aiwareConfig)?void 0:r.switchAppUrl)||getRestApiUrlFromConfig().replace("api","aiware")+"/switch-app","/default"):404===t.status?f("Email or Password is incorrect."):f("Something went wrong. Please try again."),[3,5];case 3:return e.sent(),f("Something went wrong. Please try again."),[3,5];case 4:return c(!1),[7];case 5:return[2]}})}),function(){return e.apply(this,arguments)});return jsxRuntimeExports.jsx(PageContainer,{children:1===r?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Header,{text:"Account Does Not Exist",subText:"This AiWARE account does not exist. Are you sure you’re using the correct Authentication Provider?",type:"link-oid"}),jsxRuntimeExports.jsx(BlackButton,{onClick:function(){return n(2)},text:"Link to Existing Account",type:"oid-linking",loading:!1}),jsxRuntimeExports.jsx(Box,{sx:{mt:"14px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){return s("/ui/auth/login")},text:"Back to Login",type:"login"})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Header,{text:"Link Account",subText:"Provide the email and password to your aiWARE account."}),jsxRuntimeExports.jsx(EmailInput,{email:o,setEmail:t}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(PasswordInput,{password:i,onPasswordChange:a,onPressEnter:function(){y().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},errorMessage:h,autoFocus:!1})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"14px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){return s("/ui/auth/forgot")},text:"Forgot Password?",type:"forgot"})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"25px"},children:jsxRuntimeExports.jsx(BlackButton,{onClick:function(){y().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},text:"Link Account & Login",type:"link-oid",loading:u})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){return s("/ui/auth/login")},text:"Back to Login",type:"login"})})]})})},ResetPasswordPage=function(){var e=useNavigate(),t=new URLSearchParams(window.location.search),r=t.get("username")||"",n=t.get("resettoken")||"",o=t.get("organizationinviteid")||"",a=t.get("redirect"),t=parseToken(n),t=!!t&&t.enablePasswordRestriction;return jsxRuntimeExports.jsx(PageContainer,{children:jsxRuntimeExports.jsx(Box,{sx:{width:"368px"},children:jsxRuntimeExports.jsx(ResetPasswordWidget,{resetToken:n,username:r,organizationInviteId:o,onSuccess:function(){a?window.location.href=a:e("/ui/auth/reset-password/success")},requiresPasswordRestriction:t,isNewPage:!0,containerWidth:"100%"})})})},ResetPasswordSuccess=function(){var e=useNavigate();return jsxRuntimeExports.jsxs(PageContainer,{children:[jsxRuntimeExports.jsx(Header,{text:"Password Changed Successfully",subText:"Your new password has been set for your aiWARE account successfully.",type:"reset-password-success"}),jsxRuntimeExports.jsx(BlackButton,{onClick:function(){return e("/ui/auth/login")},text:"Continue",type:"back-to-login",loading:!1})]})},useStyles$1=makeStyles()(function(){return{button:{position:"absolute",left:"40px",top:"30px",border:"none",color:"#5C6269",borderRadius:"4px",paddingLeft:"14px",paddingRight:"14px",fontWeight:400},select:{height:"52px",width:"100%",marginTop:"20px",textAlign:"left"},menu:{"& > .MuiPopover-paper, & > .Sdk-MuiPopover-paper":{padding:"0"},"& > .MuiPaper-root > ul, > .Sdk-MuiPaper-root > ul":{padding:"5px"}},stepOneFullWidthInput:{height:"52px",width:"100%"},stepOneHalfWidthInputContainer:{display:"flex",justifyContent:"space-between",width:"100%",marginTop:"20px"},stepOneHalfWidthInput:{height:"52px",width:"calc(50% - 10px)"},stepTwoContainer:{width:"542px",textAlign:"center",maxWidth:"85vw"},stepTwoTextField:{height:"52px",width:"100%"},menuItem:{width:"100%"},autoCompleteContainer:{width:"100%",display:"flex",justifyContent:"center"},autoComplete:{width:"100%",marginTop:"20px",height:"52px"},formInputTopMargin:{marginTop:"20px"},formInputTopDoubleMargin:{marginTop:"40px"},previewBox:{width:"164px",height:"164px",borderRadius:"5px",border:"2px dashed #D5DFE9",padding:"10px",boxSizing:"border-box",cursor:"pointer"},logoLanding:{width:"140px",height:"140px",background:"rgba(247, 247, 247, 0.80)",display:"flex",alignItems:"center",justifyContent:"center"},addIcon:{fill:"#555F7C"},logoDescriptionText:{textAlign:"left"},logoUploadBtn:{borderRadius:"4px",border:"1px solid #5C6269",color:"#5C6269",fontWeight:"400",padding:"8px 15px"},orgLogoPreview:{width:"164px",height:"164px"},errorMessage:{color:"red"},confirmationText:{fontSize:"22px",color:"#2A323C",lineHeight:"28px"}}});function _array_like_to_array$8(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$8(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$8(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$8(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$8(e,t){return _array_with_holes$8(e)||_iterable_to_array_limit$8(e,t)||_unsupported_iterable_to_array$8(e,t)||_non_iterable_rest$8()}function _unsupported_iterable_to_array$8(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$8(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$8(e,t):void 0}var SignUpStep1=function(){function e(e){"Enter"===e.key&&(n(actions.validate()),i||t())}function t(){n(actions.setStep(2))}var r=reactExports.useRef(),n=useDispatch(),o=useSelector(selectFormValues),a=useSelector(selectErrors),i=!!Object.entries(a).find(function(e){e=_sliced_to_array$8(e,2);return e[0],e[1]})||!!Object.keys(a).find(function(e){return!o[e]})||!validateEmail("email"in o&&(null==o?void 0:o.email)||""),s=useStyles$1().classes;return jsxRuntimeExports.jsxs("div",{style:{maxWidth:"85vw"},children:[jsxRuntimeExports.jsx(Header,{text:"Sign Up for your aiWARE account",type:"sign-up"}),jsxRuntimeExports.jsx(TextField,{id:"email","data-testid":"os-auth-email-input-field",label:"email"in a&&a.email?"Please provide a valid email":"Email",InputProps:{type:"email"},variant:"outlined",value:"email"in o&&(null==o?void 0:o.email),autoComplete:"email",autoFocus:!0,className:s.stepOneFullWidthInput,error:"email"in a&&a.email,onChange:function(e){return n(actions.setValue({key:"email",value:e.target.value.trim()}))},onKeyDown:e}),jsxRuntimeExports.jsxs(Box,{className:s.stepOneHalfWidthInputContainer,children:[jsxRuntimeExports.jsx(TextField,{id:"firstName","data-testid":"os-auth-firstName-input-field",label:"First Name",variant:"outlined",value:"firstName"in o&&(null==o?void 0:o.firstName),autoComplete:"given-name",className:s.stepOneHalfWidthInput,error:"firstName"in a&&a.firstName,onChange:function(e){return n(actions.setValue({key:"firstName",value:e.target.value}))},onKeyDown:e}),jsxRuntimeExports.jsx(TextField,{id:"lastName","data-testid":"os-auth-lastName-input-field",label:"Last Name",variant:"outlined",value:"lastName"in o&&(null==o?void 0:o.lastName),autoComplete:"family-name",className:s.stepOneHalfWidthInput,error:"lastName"in a&&a.lastName,onChange:function(e){return n(actions.setValue({key:"lastName",value:e.target.value}))},onKeyDown:e})]}),jsxRuntimeExports.jsx(BlackButton,{onClick:t,text:"Continue",type:"Continue",disableButton:i,className:s.formInputTopMargin,ref:null!=r&&r.current?r:void 0})]})},countries=[{label:"Afghanistan",id:"AF"},{label:"Åland Islands",id:"AX"},{label:"Albania",id:"AL"},{label:"Algeria",id:"DZ"},{label:"American Samoa",id:"AS"},{label:"Andorra",id:"AD"},{label:"Angola",id:"AO"},{label:"Anguilla",id:"AI"},{label:"Antarctica",id:"AQ"},{label:"Antigua and Barbuda",id:"AG"},{label:"Argentina",id:"AR"},{label:"Armenia",id:"AM"},{label:"Aruba",id:"AW"},{label:"Australia",id:"AU"},{label:"Austria",id:"AT"},{label:"Azerbaijan",id:"AZ"},{label:"Bahamas",id:"BS"},{label:"Bahrain",id:"BH"},{label:"Bangladesh",id:"BD"},{label:"Barbados",id:"BB"},{label:"Belarus",id:"BY"},{label:"Belgium",id:"BE"},{label:"Belize",id:"BZ"},{label:"Benin",id:"BJ"},{label:"Bermuda",id:"BM"},{label:"Bhutan",id:"BT"},{label:"Bolivia",id:"BO"},{label:"Bosnia and Herzegovina",id:"BA"},{label:"Botswana",id:"BW"},{label:"Bouvet Island",id:"BV"},{label:"Brazil",id:"BR"},{label:"British Indian Ocean Territory",id:"IO"},{label:"Brunei Darussalam",id:"BN"},{label:"Bulgaria",id:"BG"},{label:"Burkina Faso",id:"BF"},{label:"Burundi",id:"BI"},{label:"Cambodia",id:"KH"},{label:"Cameroon",id:"CM"},{label:"Canada",id:"CA"},{label:"Cape Verde",id:"CV"},{label:"Cayman Islands",id:"KY"},{label:"Central African Republic",id:"CF"},{label:"Chad",id:"TD"},{label:"Chile",id:"CL"},{label:"China",id:"CN"},{label:"Christmas Island",id:"CX"},{label:"Cocos (Keeling) Islands",id:"CC"},{label:"Colombia",id:"CO"},{label:"Comoros",id:"KM"},{label:"Congo",id:"CG"},{label:"Congo, The Democratic Republic of the",id:"CD"},{label:"Cook Islands",id:"CK"},{label:"Costa Rica",id:"CR"},{label:"Cote D'Ivoire",id:"CI"},{label:"Croatia",id:"HR"},{label:"Cuba",id:"CU"},{label:"Cyprus",id:"CY"},{label:"Czech Republic",id:"CZ"},{label:"Denmark",id:"DK"},{label:"Djibouti",id:"DJ"},{label:"Dominica",id:"DM"},{label:"Dominican Republic",id:"DO"},{label:"Ecuador",id:"EC"},{label:"Egypt",id:"EG"},{label:"El Salvador",id:"SV"},{label:"Equatorial Guinea",id:"GQ"},{label:"Eritrea",id:"ER"},{label:"Estonia",id:"EE"},{label:"Ethiopia",id:"ET"},{label:"Falkland Islands (Malvinas)",id:"FK"},{label:"Faroe Islands",id:"FO"},{label:"Fiji",id:"FJ"},{label:"Finland",id:"FI"},{label:"France",id:"FR"},{label:"French Guiana",id:"GF"},{label:"French Polynesia",id:"PF"},{label:"French Southern Territories",id:"TF"},{label:"Gabon",id:"GA"},{label:"Gambia",id:"GM"},{label:"Georgia",id:"GE"},{label:"Germany",id:"DE"},{label:"Ghana",id:"GH"},{label:"Gibraltar",id:"GI"},{label:"Greece",id:"GR"},{label:"Greenland",id:"GL"},{label:"Grenada",id:"GD"},{label:"Guadeloupe",id:"GP"},{label:"Guam",id:"GU"},{label:"Guatemala",id:"GT"},{label:"Guernsey",id:"GG"},{label:"Guinea",id:"GN"},{label:"Guinea-Bissau",id:"GW"},{label:"Guyana",id:"GY"},{label:"Haiti",id:"HT"},{label:"Heard Island and Mcdonald Islands",id:"HM"},{label:"Holy See (Vatican City State)",id:"VA"},{label:"Honduras",id:"HN"},{label:"Hong Kong",id:"HK"},{label:"Hungary",id:"HU"},{label:"Iceland",id:"IS"},{label:"India",id:"IN"},{label:"Indonesia",id:"ID"},{label:"Iran, Islamic Republic Of",id:"IR"},{label:"Iraq",id:"IQ"},{label:"Ireland",id:"IE"},{label:"Isle of Man",id:"IM"},{label:"Israel",id:"IL"},{label:"Italy",id:"IT"},{label:"Jamaica",id:"JM"},{label:"Japan",id:"JP"},{label:"Jersey",id:"JE"},{label:"Jordan",id:"JO"},{label:"Kazakhstan",id:"KZ"},{label:"Kenya",id:"KE"},{label:"Kiribati",id:"KI"},{label:"Korea, Democratic People'S Republic of",id:"KP"},{label:"Korea, Republic of",id:"KR"},{label:"Kuwait",id:"KW"},{label:"Kyrgyzstan",id:"KG"},{label:"Lao People'S Democratic Republic",id:"LA"},{label:"Latvia",id:"LV"},{label:"Lebanon",id:"LB"},{label:"Lesotho",id:"LS"},{label:"Liberia",id:"LR"},{label:"Libyan Arab Jamahiriya",id:"LY"},{label:"Liechtenstein",id:"LI"},{label:"Lithuania",id:"LT"},{label:"Luxembourg",id:"LU"},{label:"Macao",id:"MO"},{label:"Macedonia, The Former Yugoslav Republic of",id:"MK"},{label:"Madagascar",id:"MG"},{label:"Malawi",id:"MW"},{label:"Malaysia",id:"MY"},{label:"Maldives",id:"MV"},{label:"Mali",id:"ML"},{label:"Malta",id:"MT"},{label:"Marshall Islands",id:"MH"},{label:"Martinique",id:"MQ"},{label:"Mauritania",id:"MR"},{label:"Mauritius",id:"MU"},{label:"Mayotte",id:"YT"},{label:"Mexico",id:"MX"},{label:"Micronesia, Federated States of",id:"FM"},{label:"Moldova, Republic of",id:"MD"},{label:"Monaco",id:"MC"},{label:"Mongolia",id:"MN"},{label:"Montserrat",id:"MS"},{label:"Morocco",id:"MA"},{label:"Mozambique",id:"MZ"},{label:"Myanmar",id:"MM"},{label:"Namibia",id:"NA"},{label:"Nauru",id:"NR"},{label:"Nepal",id:"NP"},{label:"Netherlands",id:"NL"},{label:"Netherlands Antilles",id:"AN"},{label:"New Caledonia",id:"NC"},{label:"New Zealand",id:"NZ"},{label:"Nicaragua",id:"NI"},{label:"Niger",id:"NE"},{label:"Nigeria",id:"NG"},{label:"Niue",id:"NU"},{label:"Norfolk Island",id:"NF"},{label:"Northern Mariana Islands",id:"MP"},{label:"Norway",id:"NO"},{label:"Oman",id:"OM"},{label:"Pakistan",id:"PK"},{label:"Palau",id:"PW"},{label:"Palestinian Territory, Occupied",id:"PS"},{label:"Panama",id:"PA"},{label:"Papua New Guinea",id:"PG"},{label:"Paraguay",id:"PY"},{label:"Peru",id:"PE"},{label:"Philippines",id:"PH"},{label:"Pitcairn",id:"PN"},{label:"Poland",id:"PL"},{label:"Portugal",id:"PT"},{label:"Puerto Rico",id:"PR"},{label:"Qatar",id:"QA"},{label:"Reunion",id:"RE"},{label:"Romania",id:"RO"},{label:"Russian Federation",id:"RU"},{label:"RWANDA",id:"RW"},{label:"Saint Helena",id:"SH"},{label:"Saint Kitts and Nevis",id:"KN"},{label:"Saint Lucia",id:"LC"},{label:"Saint Pierre and Miquelon",id:"PM"},{label:"Saint Vincent and the Grenadines",id:"VC"},{label:"Samoa",id:"WS"},{label:"San Marino",id:"SM"},{label:"Sao Tome and Principe",id:"ST"},{label:"Saudi Arabia",id:"SA"},{label:"Senegal",id:"SN"},{label:"Serbia and Montenegro",id:"CS"},{label:"Seychelles",id:"SC"},{label:"Sierra Leone",id:"SL"},{label:"Singapore",id:"SG"},{label:"Slovakia",id:"SK"},{label:"Slovenia",id:"SI"},{label:"Solomon Islands",id:"SB"},{label:"Somalia",id:"SO"},{label:"South Africa",id:"ZA"},{label:"South Georgia and the South Sandwich Islands",id:"GS"},{label:"Spain",id:"ES"},{label:"Sri Lanka",id:"LK"},{label:"Sudan",id:"SD"},{label:"Surilabel",id:"SR"},{label:"Svalbard and Jan Mayen",id:"SJ"},{label:"Swaziland",id:"SZ"},{label:"Sweden",id:"SE"},{label:"Switzerland",id:"CH"},{label:"Syrian Arab Republic",id:"SY"},{label:"Taiwan, Province of China",id:"TW"},{label:"Tajikistan",id:"TJ"},{label:"Tanzania, United Republic of",id:"TZ"},{label:"Thailand",id:"TH"},{label:"Timor-Leste",id:"TL"},{label:"Togo",id:"TG"},{label:"Tokelau",id:"TK"},{label:"Tonga",id:"TO"},{label:"Trinidad and Tobago",id:"TT"},{label:"Tunisia",id:"TN"},{label:"Turkey",id:"TR"},{label:"Turkmenistan",id:"TM"},{label:"Turks and Caicos Islands",id:"TC"},{label:"Tuvalu",id:"TV"},{label:"Uganda",id:"UG"},{label:"Ukraine",id:"UA"},{label:"United Arab Emirates",id:"AE"},{label:"United Kingdom",id:"GB"},{label:"United States",id:"US"},{label:"United States Minor Outlying Islands",id:"UM"},{label:"Uruguay",id:"UY"},{label:"Uzbekistan",id:"UZ"},{label:"Vanuatu",id:"VU"},{label:"Venezuela",id:"VE"},{label:"Viet Nam",id:"VN"},{label:"Virgin Islands, British",id:"VG"},{label:"Virgin Islands, U.S.",id:"VI"},{label:"Wallis and Futuna",id:"WF"},{label:"Western Sahara",id:"EH"},{label:"Yemen",id:"YE"},{label:"Zambia",id:"ZM"},{label:"Zimbabwe",id:"ZW"}],industries=["Accounting","Airlines/Aviation","Alternative Dispute Resolution","Alternative Medicine","Animation","Apparel & Fashion","Architecture & Planning","Arts & Crafts","Automotive","Aviation & Aerospace","Banking","Biotechnology","Broadcast Media","Building Materials","Business Supplies & Equipment","Capital Markets","Chemicals","Civic & Social Organization","Civil Engineering","Commercial Real Estate","Computer & Network Security","Computer Games","Computer Hardware","Computer Networking","Computer Software","Construction","Consumer Electronics","Consumer Goods","Consumer Services","Cosmetics","Dairy","Defense & Space","Design","Education Management","E-learning","Electrical & Electronic Manufacturing","Entertainment","Environmental Services","Events Services","Executive Office","Facilities Services","Farming","Financial Services","Fine Art","Fishery","Food & Beverages","Food Production","Fundraising","Furniture","Gambling & Casinos","Glass, Ceramics & Concrete","Government Administration","Government Relations","Graphic Design","Health, Wellness & Fitness","Higher Education","Hospital & Health Care","Hospitality","Human Resources","Import & Export","Individual & Family Services","Industrial Automation","Information Services","Information Technology & Services","Insurance","International Affairs","International Trade & Development","Internet","Investment Banking/Venture","Investment Management","Judiciary","Law Enforcement","Law Practice","Legal Services","Legislative Office","Leisure & Travel","Libraries","Logistics & Supply Chain","Luxury Goods & Jewelry","Machinery","Management Consulting","Maritime","Marketing & Advertising","Market Research","Mechanical or Industrial Engineering","Media Production","Medical Device","Medical Practice","Mental Health Care","Military","Mining & Metals","Motion Pictures & Film","Museums & Institutions","Music","Nanotechnology","Newspapers","Nonprofit Organization Management","Oil & Energy","Online Publishing","Outsourcing/Offshoring","Package/Freight Delivery","Packaging & Containers","Paper & Forest Products","Performing Arts","Pharmaceuticals","Philanthropy","Photography","Plastics","Political Organization","Primary/Secondary","Printing","Professional Training","Program Development","Public Policy","Public Relations","Public Safety","Publishing","Railroad Manufacture","Ranching","Real Estate","Recreational","Facilities & Services","Religious Institutions","Renewables & Environment","Research","Restaurants","Retail","Security & Investigations","Semiconductors","Shipbuilding","Sporting Goods","Sports","Staffing & Recruiting","Supermarkets","Telecommunications","Textiles","Think Tanks","Tobacco","Translation & Localization","Transportation/Trucking/Railroad","Utilities","Venture Capital","Veterinary","Warehousing","Wholesale","Wine & Spirits","Wireless","Writing & Editing"];function _define_property$2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$2(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$2(t,e,r[e])})}return t}function ownKeys$1(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$1(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$1(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}var teamSizeOptions=["1-10","10-50","50-100","100-500","500-1000","> 1000"],industryOptions=industries.map(function(e){return{id:e,label:e}}),SignUpStep2=function(){function t(){n(actions.createUserStart())}function r(e){"Enter"===e.key&&(n(actions.validate()),s||t())}var e=reactExports.useRef(),n=useDispatch(),o=useSelector(selectFormValues),a=useSelector(selectErrors),i=useSelector(selectStatus),s=!!Object.keys(a).find(function(e){return a[e]})||!!Object.keys(a).find(function(e){return!o[e]})||"loading"===i,l=useStyles$1().classes,u=useNavigate();return jsxRuntimeExports.jsxs(Box,{className:l.stepTwoContainer,children:[jsxRuntimeExports.jsx(Header,{text:"success"!==i?"Let's set up your Organization":"",type:"info"}),"success"!==i?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TextField,{id:"orgName","data-testid":"os-auth-orgName-input-field",label:"Organization Name",variant:"outlined",value:"orgName"in o&&(null==o?void 0:o.orgName),autoComplete:"organization",autoFocus:!0,className:l.stepTwoTextField,error:"orgName"in a&&a.orgName,onChange:function(e){return n(actions.setValue({key:"orgName",value:e.target.value}))},onKeyDown:r,disabled:"loading"===i}),jsxRuntimeExports.jsxs(FormControl,{sx:{width:"100%"},children:[jsxRuntimeExports.jsx(InputLabel,{id:"os-auth.sign-up.teamSize",className:l.formInputTopMargin,children:"Team Size"}),jsxRuntimeExports.jsx(Select,{labelId:"os-auth.sign-up.teamSize",id:"os-auth.sign-up.teamSize","data-testid":"os-auth-team-size-input-field",value:"teamSize"in o&&(null==o?void 0:o.teamSize),className:l.select,MenuProps:{className:l.menu},label:"Team Size",onChange:function(e){return n(actions.setValue({key:"teamSize",value:e.target.value||""}))},disabled:"loading"===i,children:teamSizeOptions.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{value:e,className:l.menuItem,children:e})})})]}),jsxRuntimeExports.jsx(Box,{className:l.autoCompleteContainer,children:jsxRuntimeExports.jsx(Autocomplete,{disablePortal:!0,id:"os-auth.sign-up.country-autocomplete","data-testid":"os-auth.sign-up.country-autocomplete",options:countries,value:"country"in o&&countries.find(function(e){return e.id===o.country}),onChange:function(e,t){return n(actions.setValue({key:"country",value:(t||{}).id||""}))},className:l.autoComplete,autoComplete:!0,renderInput:function(e){return jsxRuntimeExports.jsx(TextField,_object_spread_props$1(_object_spread$2({},e),{label:"Country",autoComplete:"country",onKeyDown:r,disabled:"loading"===i}))}})}),jsxRuntimeExports.jsx(Box,{className:l.autoCompleteContainer,children:jsxRuntimeExports.jsx(Autocomplete,{disablePortal:!0,id:"os-auth.sign-up.industry-autocomplete","data-testid":"os-auth.sign-up.industry-autocomplete",options:industryOptions,value:"industry"in o&&industryOptions.find(function(e){return e.id===o.industry}),onChange:function(e,t){return n(actions.setValue({key:"industry",value:(t||{}).id||""}))},className:l.autoComplete,renderInput:function(e){return jsxRuntimeExports.jsx(TextField,_object_spread_props$1(_object_spread$2({},e),{label:"Industry",onKeyDown:r,disabled:"loading"===i}))}})}),jsxRuntimeExports.jsx(BlackButton,{onClick:t,text:"Create Account",type:"create-account",disableButton:s,className:l.formInputTopDoubleMargin,ref:null!=e&&e.current?e:void 0,loading:"loading"===i})]}):jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Typography,{"data-testid":"os-auth.sign-up.success-message",variant:"body1",className:l.confirmationText,children:"Thank you for registering! A confirmation email has been sent with an activation link for your new aiWARE account."}),jsxRuntimeExports.jsx(BlackButton,{onClick:function(){return u("/ui/auth/login")},text:"Return To Homepage",className:l.formInputTopDoubleMargin,type:"return"})]})]})},SignUp=function(){var e=useSelector(selectActiveStep),t=useDispatch(),r=useStyles$1().classes,n=useSelector(selectStatus);return reactExports.useEffect(function(){t(actions.resetState()),envChecker("local")||envChecker("dev")||window.location.href.includes("localhost")?t(actions.setEnv("dev")):envChecker("stage")?t(actions.setEnv("stage")):t(actions.setEnv("prod"))},[]),jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getSignUpModule()],children:jsxRuntimeExports.jsxs(PageContainer,{showLogoInFooter:!1,children:[jsxRuntimeExports.jsx(SignUpButton,{label:"Login",navigateTo:"login"}),2===e&&"success"!==n&&jsxRuntimeExports.jsxs(Button,{className:r.button,onClick:function(){return t(actions.setStep(1))},disabled:"loading"===n,children:[jsxRuntimeExports.jsx(default_1,{fontSize:"small",sx:{marginRight:"5px"}})," Back"]}),jsxRuntimeExports.jsx("div",{children:1===e?jsxRuntimeExports.jsx(SignUpStep1,{}):jsxRuntimeExports.jsx(SignUpStep2,{})})]})})};function _array_like_to_array$7(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$7(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$7(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$7(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$7(e,t){return _array_with_holes$7(e)||_iterable_to_array_limit$7(e,t)||_unsupported_iterable_to_array$7(e,t)||_non_iterable_rest$7()}function _unsupported_iterable_to_array$7(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$7(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$7(e,t):void 0}var SetPassword=function(){var n=_sliced_to_array$7(useSearchParams(),1)[0],e=_sliced_to_array$7(reactExports.useState(""),2),t=e[0],o=e[1],e=_sliced_to_array$7(reactExports.useState(""),2),r=e[0],a=e[1],e=_sliced_to_array$7(reactExports.useState(""),2),i=e[0],s=e[1],l=useNavigate(),u=useSelector(selectStatus),c=useDispatch();return reactExports.useEffect(function(){var e=n.get("useruuid")||"",t=n.get("token")||"",r=n.get("username")||"";e&&t?(o(e),s(t),a(r)):l("/ui/auth/login")},[]),reactExports.useEffect(function(){c(actions.resetState()),envChecker("local")||envChecker("dev")?c(actions.setEnv("dev")):envChecker("stage")?c(actions.setEnv("stage")):c(actions.setEnv("prod"))},[]),reactExports.useEffect(function(){var e;"success"===u&&(e=new URLSearchParams({userId:t,username:r}).toString(),l("/ui/auth/plans?".concat(e)))},[u]),jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getSignUpModule()],children:jsxRuntimeExports.jsx(PageContainer,{showLogoInFooter:!1,children:jsxRuntimeExports.jsx(SignUpPassword,{userId:t,token:i})})})};function _array_like_to_array$6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$6(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$6(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$6(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$6(e,t){return _array_with_holes$6(e)||_iterable_to_array_limit$6(e,t)||_unsupported_iterable_to_array$6(e,t)||_non_iterable_rest$6()}function _unsupported_iterable_to_array$6(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$6(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$6(e,t):void 0}var stripePricingPlanIdByEnv={dev:"prctbl_1No7MMIyHt9R0gSlZV4mqouD",stage:"prctbl_1NkvOrInolL392yPOejCV1RT",prod:"prctbl_1Nj36dInolL392yPggkeo88e"},stripePublishableKeyByEnv={dev:"pk_test_51No7B2IyHt9R0gSl5J4qqbZvRVLokabSDFw36G58tO1oxXO4mJzXmV0FvszOAfJcb25d5HgqZSlFIyMbL9bTFTb700vr9Fvgb9",stage:"pk_test_51NNcicInolL392yPuFClPywpUYp0ppNltcHBEdkPNkpMgmagbymPCeal9Dl3dDYn63IOfIafuobscqZhCJQfp3KN00Th3bxbLx",prod:"pk_live_51NNcicInolL392yPxizaLizsnPFeNfU1QgFBOG7bB44OLhLcQDc7CyH8hlyweN6VDDLr2lB9lLyiUh1KGBaSEjPS00uSQ1sFFP"},Plans=function(){var e=useLocation(),n=new URLSearchParams(e.search),e=_sliced_to_array$6(reactExports.useState(""),2),t=e[0],o=e[1],e=_sliced_to_array$6(reactExports.useState(""),2),r=e[0],a=e[1];reactExports.useEffect(function(){var e=n.get("userId")||"",t=n.get("username")||"",r=(e&&t&&(o(e),a(t),setCookie("userId",e,7),setCookie("username",t,7)),document.createElement("script"));return r.src="https://js.stripe.com/v3/pricing-table.js",r.async=!0,document.body.appendChild(r),function(){document.body.removeChild(r)}},[]);return jsxRuntimeExports.jsxs(PageContainer,{showLogoInFooter:!1,children:[jsxRuntimeExports.jsx(Header,{text:"Choose your aiWARE Account Plan"}),jsxRuntimeExports.jsx(Box,{sx:{width:"100vw"},children:jsxRuntimeExports.jsx("stripe-pricing-table",{"pricing-table-id":(e=envDetector(),getConfig().stripePricingPlanId||stripePricingPlanIdByEnv[e]),"publishable-key":(e=envDetector(),getConfig().stripePublishableKey||stripePublishableKeyByEnv[e]),"customer-email":r,"client-reference-id":t})})]})};function _array_like_to_array$5(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$5(e){if(Array.isArray(e))return e}function asyncGeneratorStep$4(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$4(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$4(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$4(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$5(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$5(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$5(e,t){return _array_with_holes$5(e)||_iterable_to_array_limit$5(e,t)||_unsupported_iterable_to_array$5(e,t)||_non_iterable_rest$5()}function _unsupported_iterable_to_array$5(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$5(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$5(e,t):void 0}function _ts_generator$4(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var useStyles=makeStyles()(function(e){return{paymentResultMessage:{color:"#2A323C",textTransform:"none",marginTop:e.spacing(4),fontSize:"18px",fontWeight:600,lineHeight:"24px",letterSpacing:"-1.3038520263464193e-9px",textAlign:"center"},instanceProvisionedMessage:{color:"#2A323C",textTransform:"none",marginBottom:e.spacing(4),fontSize:"18px",fontWeight:600,lineHeight:"24px",letterSpacing:"-1.3038520263464193e-9px",textAlign:"center"},linearProgress:{height:"7px",backgroundColor:"#D9D9D9",marginTop:e.spacing(2),borderRadius:"20px"},paymentResultLogo:{height:"200px",width:"200px"},paymentResultContainer:{position:"fixed",width:"100%",height:"100vh",top:"0",left:"0",backgroundColor:"#ffffff",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center",fontSize:"14px"},loaderAnimation:{height:"200px",width:"405px",marginBottom:e.spacing(3)}}}),PaymentResult=function(){var i=useNavigate(),e=_sliced_to_array$5(reactExports.useState(""),2),r=e[0],s=e[1],e=_sliced_to_array$5(reactExports.useState(!1),2),t=e[0],l=e[1],e=_sliced_to_array$5(reactExports.useState(!1),2),u=e[0],c=e[1],e=useStyles().classes;return reactExports.useEffect(function(){function e(){return t.apply(this,arguments)}var n,o,t,a=getCookie("userId");t=_async_to_generator$4(function(){var t,r;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getConfig().hubUrl,"/account_requests?userID=").concat(a,"&type=new"))];case 1:return[4,e.sent().json()];case 2:return t=e.sent(),r=((null==t||null==(r=t.result)?void 0:r[0])||{}).accountRequestStatus,t&&("done"===r||"error"===r?(clearInterval(n),clearTimeout(o),s(r),"done"===r&&setTimeout(function(){i("/ui/auth/login")},2e3)):"requested"!==r||u||(setTimeout(function(){clearInterval(n),clearTimeout(o),s("timeout")},12e4),c(!0))),[2]}})});return a&&"timeout"!==r&&(l(!0),n=setInterval(e,1e3),o=setTimeout(function(){clearInterval(n)},12e4)),function(){clearInterval(n),clearTimeout(o)}},[r,u]),jsxRuntimeExports.jsxs(Box,{className:e.paymentResultContainer,children:[jsxRuntimeExports.jsx(Box,{className:e.loaderAnimation,id:"loaderAnimation",children:jsxRuntimeExports.jsx("img",{src:img$b,alt:"aiware-logo",className:e.paymentResultLogo})}),t&&"done"!==r&&"error"!==r&&"timeout"!==r&&jsxRuntimeExports.jsxs(Box,{sx:{height:"200px",width:"405px"},children:[jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:!0,children:jsxRuntimeExports.jsx(LinearProgress,{color:"primary",className:e.linearProgress})}),jsxRuntimeExports.jsx(Typography,{variant:"body1","data-testid":"os-auth-sign-up-payment-result-in-progress",className:e.paymentResultMessage,children:"Creating your custom experience..."})]}),!t&&jsxRuntimeExports.jsx(Typography,{variant:"body1",className:e.paymentResultMessage,children:"Oops! Looks like the URL you are trying to access is invalid"}),"done"===r&&jsxRuntimeExports.jsx(Fade,{in:!0,timeout:1e3,easing:"cubic-bezier(0.4, 0, 1, 1)",children:jsxRuntimeExports.jsx(Box,{sx:{height:"200px",width:"405px"},children:jsxRuntimeExports.jsx(Typography,{variant:"body1","data-testid":"os-auth-sign-up-payment-result-success",className:classNames(e.paymentResultMessage),children:"Your new instance is now ready! Taking you to the login page..."})})}),"error"===r&&jsxRuntimeExports.jsxs(Typography,{variant:"body1","data-testid":"os-auth-sign-up-payment-result-error",className:e.paymentResultMessage,children:["An error occurred when creating your Organization.",jsxRuntimeExports.jsx("br",{})," Please contact support"]}),"timeout"===r&&jsxRuntimeExports.jsxs(Typography,{variant:"body1","data-testid":"os-auth-sign-up-payment-result-timeout",className:e.paymentResultMessage,children:["Creating your custom experience is taking longer than expected.",jsxRuntimeExports.jsx("br",{}),"Please reach out to customer support"," ",jsxRuntimeExports.jsx("a",{href:"mailto:support@veritone.com",style:{color:"#0E6EEC"},children:"support@veritone.com"})]})]})};function _array_like_to_array$4(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$4(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$4(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$4(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$4(e,t){return _array_with_holes$4(e)||_iterable_to_array_limit$4(e,t)||_unsupported_iterable_to_array$4(e,t)||_non_iterable_rest$4()}function _unsupported_iterable_to_array$4(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$4(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$4(e,t):void 0}var LogoutTool=function(){var r=useDispatch(),n=useSelector(applicationSelector),o=useSelector(authStatusSelector);return reactExports.useEffect(function(){var e,t;"failure"===o?(e=window.location.search,window.location.href="/ui/auth/login".concat(e),setUser(null),null!=(e=window.analytics)&&null!=(t=e.reset)&&t.call(e)):"success"===(null==n?void 0:n.status)&&(setUser(null),null!=(t=window.analytics)&&null!=(e=t.reset)&&e.call(t),r(logoutUser$1()))},[r,n,o]),null},Logout=function(e){var t=e.aiwareInit,e=_sliced_to_array$4(reactExports.useState(!1),2),r=e[0],n=e[1];return reactExports.useEffect(function(){null!=t&&t().then(function(){n(!0)})},[t]),r?jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getAppbarPanelModule()],children:jsxRuntimeExports.jsx(LogoutTool,{})}):null};function asyncGeneratorStep$3(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$3(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$3(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$3(n,t,r,o,a,"throw",e)}o(void 0)})}}function _ts_generator$3(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var QUERY_KEYS={registrationConfig:function(e){return["registration-config",e]}},REGISTRATION_URI=function(e){return"/ui/auth/signup/".concat(e)},DEFAULT_LOGIN_REDIRECT_URI="/ui/auth/login",useEmailExists=function(){return useMutation({mutationFn:doesEmailExists})},useSendSignUpEmailRegistration=function(){return useMutation({mutationFn:sendSignUpEmailRegistration})},useSignUpMutation=function(){return useMutation({mutationFn:postSignUpOrgRegistration})},useMeQuery=function(e){return useQuery({enabled:!!e,queryKey:["registration-config","me-query"],queryFn:function(){return getMeQuery(e)},retry:!1})};function useSignUpConfig(){function r(){o(DEFAULT_LOGIN_REDIRECT_URI)}function e(){return t.apply(this,arguments)}var t,n=useParams().slug,o=useNavigate(),a=(t=_async_to_generator$3(function(){var t;return _ts_generator$3(this,function(e){switch(e.label){case 0:if(!n)return r(),[2,null];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,getSignUpConfig(n)];case 2:return(t=e.sent())?[2,t]:(r(),[2,null]);case 3:throw t=e.sent(),r(),t;case 4:return[2]}})}),useQuery({queryKey:QUERY_KEYS.registrationConfig(null!=n?n:""),queryFn:e,retry:!1})),i=a.data,a=a.isLoading,s=n?"/".concat(n):"",l=reactExports.useMemo(function(){var e;return i&&null!=(e=i.files.find(function(e){return"termsOfService"===e.type&&"active"===e.status}))?e:null},[i]),u=reactExports.useMemo(function(){var e;return i&&null!=(e=i.files.find(function(e){return"privacyPolicy"===e.type&&"active"===e.status}))?e:null},[i]);return{slug:n,slugUri:s,registerUri:REGISTRATION_URI(null!=n?n:""),config:null!=i?i:null,tosFile:l,privacyPolicyUrl:u,isLoading:a}}function _array_like_to_array$3(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$3(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$3(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$3(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$3(e,t){return _array_with_holes$3(e)||_iterable_to_array_limit$3(e,t)||_unsupported_iterable_to_array$3(e,t)||_non_iterable_rest$3()}function _unsupported_iterable_to_array$3(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$3(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$3(e,t):void 0}var STACK_STYLES$1={maxWidth:517},BUTTON_CONTAINER_STYLES$1={width:368,mx:"auto"},Success=function(){var r=useNavigate(),n=_sliced_to_array$3(useSearchParams(),1)[0],e=n.get("status")||"submitted",t=useSignUpConfig(),o=t.config,a=t.slugUri;return jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$1,children:[jsxRuntimeExports.jsx(ConfirmationMessage$1,{inviteStatus:e}),jsxRuntimeExports.jsx(ButtonContainer$1,{onClick:function(){var e,t;r((e="/ui/auth/login".concat(a),(t=decodeURIComponent(n.get("email")))?"".concat(e,"?email=").concat(encodeURIComponent(t)):e))},buttonColor:null==o||null==(t=o.uiSettings)||null==(e=t.registrationButtonStyle)?void 0:e.backgroundColor,buttonTextColor:null==o||null==(t=o.uiSettings)||null==(e=t.registrationButtonStyle)?void 0:e.textColor})]})},ConfirmationMessage$1=function(e){e=e.inviteStatus;return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center","data-testid":"os-auth-register-success-message",children:"submitted"===e?"Thank you for registering. Your request must be approved before you can join. If approved you will receive an invitation shortly.":"Thank you for registering. A confirmation email has been sent to with activation link for your new aiWARE account."})},ButtonContainer$1=function(e){var t=e.buttonColor;return jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$1,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Return to Homepage",onClick:e.onClick,buttonColor:t,buttonTextColor:e.buttonTextColor})})};function asyncGeneratorStep$2(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$2(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$2(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$2(n,t,r,o,a,"throw",e)}o(void 0)})}}function _ts_generator$2(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var Email=function(){function r(){return e.apply(this,arguments)}var e,o=useNavigate(),a=useFormContext(),i=useEmailExists(),s=useSendSignUpEmailRegistration(),t=useSignUpConfig(),l=t.config,u=t.registerUri,n=t.isLoading||i.isPending||s.isPending;e=_async_to_generator$2(function(){var t,r,n;return _ts_generator$2(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),t=a.getValues("email"),[4,i.mutateAsync(t)];case 1:return e.sent().available?[4,s.mutateAsync({id:null!=(r=null==l?void 0:l.id)?r:"",email:t,redirectUrl:"".concat(window.location.origin,"/ui/auth/signup")})]:(o({pathname:"/ui/auth/login",search:"?email=".concat(encodeURIComponent(t),"&from=org-registration&redirect=").concat(encodeURIComponent(window.location.href))}),[2]);case 2:return"Verification email sent"===(r=e.sent()).message?o({pathname:"".concat(u,"/confirm"),search:"?email=".concat(t)}):"domain not allowed"===r.message&&a.setError("email",{type:"manual",message:"Your email does not match the requirements to join this Organization, registration is only available to certain domains."}),[3,4];case 3:return n=e.sent(),a.setError("email",{type:"manual",message:"An error occurred, please try again later."}),devErrorLogger(n),[3,4];case 4:return[2]}})});return jsxRuntimeExports.jsx(Controller,{name:"email",rules:{required:"Email is required"},render:function(e){var t=e.field,e=e.fieldState;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(EmailInput,{buttonText:"Continue",error:!!e.error,email:t.value,setEmail:t.onChange,isLoading:n,buttonColor:null==l||null==(t=l.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.backgroundColor,buttonTextColor:null==l||null==(t=l.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.textColor,onNextStep:r}),e.error&&jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"error",mt:3,maxWidth:368,"data-testid":"os-auth-register-email-error-message",children:e.error.message})]})}})};function _array_like_to_array$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$2(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$2(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$2(e,t){return _array_with_holes$2(e)||_iterable_to_array_limit$2(e,t)||_unsupported_iterable_to_array$2(e,t)||_non_iterable_rest$2()}function _unsupported_iterable_to_array$2(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$2(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$2(e,t):void 0}var FileType,STACK_STYLES={maxWidth:517},BUTTON_CONTAINER_STYLES={width:368,mx:"auto"},Confirm=function(){function e(){var e,t;r((e="/ui/auth/login".concat(a),(t=decodeURIComponent(n.get("email")))?"".concat(e,"?email=").concat(encodeURIComponent(t)):e))}var r=useNavigate(),n=_sliced_to_array$2(useSearchParams(),1)[0],t=useSignUpConfig(),o=t.config,a=t.slugUri;return reactExports.useEffect(function(){n.has("email")||e()},[n]),jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES,"data-testid":"os-auth-register-confirmation",children:[jsxRuntimeExports.jsx(ConfirmationMessage,{}),jsxRuntimeExports.jsx(ButtonContainer,{onClick:e,buttonColor:null==o||null==(t=o.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.backgroundColor,buttonTextColor:null==o||null==(t=o.uiSettings)||null==(o=t.registrationButtonStyle)?void 0:o.textColor})]})},ConfirmationMessage=function(){return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",children:"Thank you for your interest in registration. We've sent you an email to confirm your identity, that contains the registration link for the rest of the process."})},ButtonContainer=function(e){var t=e.buttonColor;return jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Return to Homepage",onClick:e.onClick,buttonColor:t,buttonTextColor:e.buttonTextColor,testId:"return-back-home"})})};function _array_like_to_array$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$1(e){if(Array.isArray(e))return e}function asyncGeneratorStep$1(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$1(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$1(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$1(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$1(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$1(t,e,r[e])})}return t}function _sliced_to_array$1(e,t){return _array_with_holes$1(e)||_iterable_to_array_limit$1(e,t)||_unsupported_iterable_to_array$1(e,t)||_non_iterable_rest$1()}function _unsupported_iterable_to_array$1(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$1(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$1(e,t):void 0}function _ts_generator$1(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}(e=>{e.PDF="pdf",e.TEXT="text",e.UNKNOWN="unknown"})(FileType=FileType||{});var styles={buttonContainer:{width:368,mx:"auto"},privacyPolicy:{fontFamily:"Nunito",fontSize:"14px",lineHeight:"20px",letterSpacing:"-1.30385e-09px",color:"#0C53B0",cursor:"pointer",textDecoration:"none"},iframe:{width:"750px",height:"424px"},iframeStyles:{border:"1px solid #E0E0E0",borderRadius:"6px"}},fetchContent=(()=>{var r=_async_to_generator$1(function(t,r){var n,o,a,i;return _ts_generator$1(this,function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return(n=e.sent(),"unknown"===r&&(o=n.headers.get("content-type"),r=null!=o&&o.includes("pdf")?"pdf":null!=o&&o.includes("text")?"text":"unknown"),o={},"pdf"!==r)?[3,3]:(i=URL.createObjectURL,[4,n.blob()]);case 2:return a=i.apply(URL,[e.sent()]),[3,5];case 3:return[4,n.text()];case 4:a=e.sent(),e.label=5;case 5:return[2,(o.content=a,o.fileType=r,o)]}})});return function(e,t){return r.apply(this,arguments)}})(),createIframeHTML=function(e,t){return'\n <!DOCTYPE html>\n <html>\n <head>\n <style>\n body { margin: 0; padding: 0; overflow: hidden; font-family: Arial, sans-serif; }\n #scroll-container { height: 100vh; overflow-y: auto; padding: 10px; }\n .content { white-space: pre-wrap; line-height: 1.6; }\n </style>\n </head>\n <body>\n <div id="scroll-container">\n '.concat("pdf"===t?'<embed src="'.concat(e,'#scrollbar=0&toolbar=0&navpanes=0" width="100%" height="100%" style="max-width: 100%;" />'):'<div class="content">'.concat(e,"</div>"),"\n </div>\n <script>\n const scrollContainer = document.getElementById('scroll-container');\n scrollContainer.addEventListener('scroll', () => {\n const isAtBottom = scrollContainer.scrollHeight - scrollContainer.scrollTop - scrollContainer.clientHeight < 50;\n if (isAtBottom) window.parent.postMessage('scrolledToBottom', '*');\n });\n <\/script>\n </body>\n </html>\n")},TermsOfService=function(){var e,s=useNavigate(),l=_sliced_to_array$1(useSearchParams(),1)[0],t=useSignUpConfig(),r=t.config,u=t.tosFile,n=t.privacyPolicyUrl,c=t.registerUri,t=_sliced_to_array$1(reactExports.useState(!1),2),o=t[0],a=t[1],i=reactExports.useRef(null),t=_sliced_to_array$1(reactExports.useState({content:"",fileType:"unknown"}),2),d=t[0],p=t[1],t=_sliced_to_array$1(reactExports.useState(!1),2),h=t[0],f=t[1],y=(e=_async_to_generator$1(function(){var t,r,n,o,a,i;return _ts_generator$1(this,function(e){switch(e.label){case 0:if(t=decodeURIComponent(l.get("email")),r=decodeURIComponent(l.get("token")),a=decodeURIComponent(l.get("referer")),n=decodeURIComponent(l.get("userId")),o=decodeURIComponent(l.get("redirect")),"login"!==a||null==u||!u.fileId)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,updateUserSetting(r,n,u.fileId,(new Date).toUTCString())];case 2:return e.sent().errors?alert("Something went wrong while saving your terms of service acceptance"):o?window.location.href=o:(a=getRestApiUrlFromConfig()?getRestApiUrlFromConfig()+"/api/admin/switch-app":getConfig().switchAppUrl,window.location.href=a+"/default"),[2];case 3:return i=e.sent(),console.error("Error updating user setting:",i),[3,4];case 4:return s({pathname:"".concat(c,"/join"),search:"?email=".concat(encodeURIComponent(t),"&token=").concat(encodeURIComponent(r))}),[2]}})}),function(){return e.apply(this,arguments)});return reactExports.useEffect(function(){e=_async_to_generator$1(function(){var t;return _ts_generator$1(this,function(e){switch(e.label){case 0:if(null==u||!u.url)return[2];f(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,fetchContent(u.url,d.fileType)];case 2:return t=e.sent(),p(t),[3,5];case 3:return t=e.sent(),console.error("Error loading content:",t),[3,5];case 4:return f(!1),[7];case 5:return[2]}})});var e,t=function(){return e.apply(this,arguments)};"unknown"===d.fileType&&t()},[u,d]),reactExports.useEffect(function(){i.current&&(i.current.srcdoc=createIframeHTML(d.content,d.fileType))},[d]),reactExports.useEffect(function(){function e(e){"scrolledToBottom"===e.data&&a(!0)}return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}},[]),reactExports.useEffect(function(){var e=l.has("email"),t=l.has("token");e||t?e&&t&&!u&&y():s(c)},[l,u]),jsxRuntimeExports.jsxs(Stack,{gap:3,sx:{overflow:"hidden"},children:[h?jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center"},children:jsxRuntimeExports.jsx(CircularProgress,{})}):u&&jsxRuntimeExports.jsx("iframe",_object_spread$1({ref:i,title:u.name,style:styles.iframeStyles},styles.iframe)),n&&jsxRuntimeExports.jsx(Typography,{variant:"body2",textAlign:"center",component:"a",target:"_blank",href:n.url,sx:styles.privacyPolicy,"data-testid":"os-auth-register-privacy-policy",children:"Privacy Policy"}),jsxRuntimeExports.jsx(Box,{sx:styles.buttonContainer,children:jsxRuntimeExports.jsx(BlackButton,{text:"Accept & Continue",type:"button",onClick:y,disableButton:!o,buttonColor:null==r||null==(t=r.uiSettings)||null==(h=t.registrationButtonStyle)?void 0:h.backgroundColor,buttonTextColor:null==r||null==(n=r.uiSettings)||null==(o=n.registrationButtonStyle)?void 0:o.textColor,testId:"os-auth-register-accept-continue-button"})})]})};function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}function _ts_generator(n,o){var a,i,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var Join=function(){var e,t,l=useNavigate(),u=_sliced_to_array(useSearchParams(),1)[0],r=_sliced_to_array(reactExports.useState(null),2),n=r[0],c=r[1],r=useSignUpConfig(),d=r.config,p=r.registerUri,h=useSignUpMutation(),o=useMeQuery(u.get("token")),r=reactExports.useMemo(function(){if(!o.data)return[{fieldKey:"first-name",title:"First Name",type:"text",required:!0},{fieldKey:"last-name",title:"Last Name",type:"text",required:!0}]},[o]),a=(t=_async_to_generator(function(r){var t,n,o,a,i,s;return _ts_generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),a=null==d?void 0:d.id,i=decodeURIComponent(u.get("email")),o=decodeURIComponent(u.get("token")),t=null!=(t=null==r?void 0:r.firstName)?t:"",n=null!=(n=null==r?void 0:r.lastName)?n:"",s=Object.keys(r).reduce(function(e,t){return"firstName"!==t&&"lastName"!==t&&(e[t]=r[t]),e},{}),[4,h.mutateAsync({token:o,orgRegistrationId:a,email:i,customFields:s,firstName:t,lastName:n})];case 1:return 201===(o=e.sent()).status?(i=(null==(a=o.invite)?void 0:a.status)||"submitted",l({pathname:"".concat(p,"/success"),search:"?status=".concat(i)})):c("Failed to join orginization. Please try again."),[3,3];case 2:return s=e.sent(),devErrorLogger(s),c("An error occurred during joining registration. Please try again."),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)});return reactExports.useEffect(function(){var e,t;u.has("email")||u.has("token")?(e=o.data,t=null!=(t=null==d||null==(t=d.uiSettings)?void 0:t.customRegistrationFields)?t:{properties:{}},e&&Object.keys(t.properties).length<=0&&a({})):l(p)},[u,o,d]),jsxRuntimeExports.jsx(FormGenerator,{schema:null==d||null==(e=d.uiSettings)?void 0:e.customRegistrationFields,additionalFields:r,renderSubmitButton:function(e){var e=e.isSubmitting;return jsxRuntimeExports.jsxs(Stack,{gap:2,children:[jsxRuntimeExports.jsx(BlackButton,{type:"join",buttonType:"submit",text:"Join Organization",loading:e||h.isPending,buttonColor:null==d||null==(e=d.uiSettings)||null==(e=e.registrationButtonStyle)?void 0:e.backgroundColor,buttonTextColor:null==d||null==(e=d.uiSettings)||null==(e=e.registrationButtonStyle)?void 0:e.textColor,testId:"os-auth-registration-join-org-button"}),n&&jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"error",textAlign:"center",children:n})]})},onSubmit:a,sx:{width:"368px"}})};function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property(t,e,r[e])})}return t}function ownKeys(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}var RegistrationLayout=function(){var e=useSignUpConfig(),t=e.config,e=e.isLoading,r=useLocation(),n=useForm({defaultValues:{email:"",acceptedTos:!1}});return e?jsxRuntimeExports.jsx(LoginSkeleton,{}):jsxRuntimeExports.jsx(FormProvider,_object_spread_props(_object_spread({},n),{children:jsxRuntimeExports.jsxs(PageContainer,{loginConfigs:{name:null!=(e=null==t?void 0:t.name)?e:"",logo:null==t||null==(n=t.uiSettings)?void 0:n.logo,buttonColor:null==t||null==(e=t.uiSettings)||null==(n=e.registrationButtonStyle)?void 0:n.backgroundColor,buttonTextColor:null==t||null==(e=t.uiSettings)||null==(n=e.registrationButtonStyle)?void 0:n.textColor,hideVeritoneBranding:null==t||null==(e=t.uiSettings)?void 0:e.veritoneBranding},children:[jsxRuntimeExports.jsx(Header,{text:{"":"Join Organization",join:"Join",confirm:"Confirmation",success:"","terms-of-service":"Terms of Service"}[r.pathname.split("/").pop()||""]||"",type:"register"}),jsxRuntimeExports.jsx(Outlet,{})]})}))},AuthRoutes=function(e){var t=e.aiwareInit,r=e.allowVanityDomain,r=void 0!==r&&r,e=e.onLoginSuccess;return jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/login",element:jsxRuntimeExports.jsx(LoginPage,{allowVanityDomain:r,onLoginSuccess:e})}),jsxRuntimeExports.jsx(Route,{path:"/login/:slug",element:jsxRuntimeExports.jsx(LoginPage,{allowVanityDomain:r,onLoginSuccess:e})}),jsxRuntimeExports.jsx(Route,{path:"/forgot",element:jsxRuntimeExports.jsx(Forgot,{})}),jsxRuntimeExports.jsx(Route,{path:"/forgot/:slug",element:jsxRuntimeExports.jsx(Forgot,{})}),jsxRuntimeExports.jsx(Route,{path:"/sign-up",element:jsxRuntimeExports.jsx(SignUp,{})}),jsxRuntimeExports.jsxs(Route,{path:"/signup/:slug?/*",element:jsxRuntimeExports.jsx(RegistrationLayout,{}),children:[jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(Email,{})}),jsxRuntimeExports.jsx(Route,{path:"confirm",element:jsxRuntimeExports.jsx(Confirm,{})}),jsxRuntimeExports.jsx(Route,{path:"success",element:jsxRuntimeExports.jsx(Success,{})}),jsxRuntimeExports.jsx(Route,{path:"terms-of-service",element:jsxRuntimeExports.jsx(TermsOfService,{})}),jsxRuntimeExports.jsx(Route,{path:"join",element:jsxRuntimeExports.jsx(Join,{})})]}),jsxRuntimeExports.jsx(Route,{path:"/plans",element:jsxRuntimeExports.jsx(Plans,{})}),jsxRuntimeExports.jsx(Route,{path:"/payment-result",element:jsxRuntimeExports.jsx(PaymentResult,{})}),jsxRuntimeExports.jsx(Route,{path:"/restricted-provider",element:jsxRuntimeExports.jsx(RestrictedProvider,{})}),jsxRuntimeExports.jsx(Route,{path:"/link-oid",element:jsxRuntimeExports.jsx(AccountLinking,{})}),jsxRuntimeExports.jsx(Route,{path:"/reset-password/success",element:jsxRuntimeExports.jsx(ResetPasswordSuccess,{})}),jsxRuntimeExports.jsx(Route,{path:"/reset-password",element:jsxRuntimeExports.jsx(ResetPasswordPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/activate",element:jsxRuntimeExports.jsx(SetPassword,{})}),jsxRuntimeExports.jsx(Route,{path:"/logout",element:jsxRuntimeExports.jsx(Logout,{aiwareInit:t})})]})};export{AuthRoutes,ResetPassword,getConfig,getRestApiUrlFromConfig};
|