aiware-js 1.0.0-master.1748 → 1.0.0-master.1749

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.esm136.js CHANGED
@@ -1 +1 @@
1
- import{j as jsxRuntimeExports,r as reactExports,a2 as createSlice,u as useSelector,dM as authStatusSelector,dN as authContextSelector,dO as authErrorMessage,dP as AuthContext,aj as lodashExports,B as Box,dQ as img$e,dI as StyledEngineProvider,C as CircularProgress,dR as resetPasswordRequest,aQ as React,dS as setUser,Y as all,G as takeEvery$1,b8 as appIdSelector,b1 as store,L as put,aA as showMessage,aC as MessageSeverity,a4 as call,I as select}from"./js-core.esm4.js";import{b3 as requireCreateSvgIcon,b4 as interopRequireDefaultExports,m as makeStyles,A as AIWareIntlProvider,T as Typography,X as Select,cr as Location,e as MenuItem,D as DynamicModuleLoader,B as Button,bg as Fade,c as classNames,M as MemoizedFormattedMessage,j as FormControl,O as OutlinedInput,a9 as Popover,g as Divider,bh as Slide,u as useTheme,cs as CheckmarkFilled,ct as Bullet}from"./js-core.esm7.js";import{d as default_1$4}from"./js-core.esm62.js";import{d as default_1$3}from"./js-core.esm61.js";import{x as devErrorLogger,S as Stack,aV as useFormContext,aW as Controller,a6 as useForm,a7 as FormProvider,ad as LoadingButton,H as InputLabel,e as InputAdornment,I as IconButton,T as TextField,k as Skeleton,a as Snackbar,bx as FormGenerator,b3 as Close$1}from"./js-core.esm9.js";import{w as Routes,x as Route,N as Navigate,y as useNavigate,z as useLocation,C as useSearchParams,v as LinearProgress,g as getAppbarPanelModule,O as Outlet,D as useParams,B as Box$1,a as applicationSelector,G as logoutUser$1}from"./js-core.esm8.js";import{d as default_1$5}from"./js-core.esm69.js";import{d as default_1$6}from"./js-core.esm120.js";import{A as Alert}from"./js-core.esm13.js";import{C as Container}from"./js-core.esm28.js";import{A as Autocomplete}from"./js-core.esm27.js";import{u as useMediaQuery}from"./js-core.esm23.js";import{u as useDispatch}from"./js-core.esm12.js";import"./js-core.esm14.js";var Visibility={},_interopRequireDefault$2=interopRequireDefaultExports,default_1$2=(Object.defineProperty(Visibility,"__esModule",{value:!0}),Visibility.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(requireCreateSvgIcon()),_jsxRuntime$2=jsxRuntimeExports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.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$2=Visibility.default=_default$2,ArrowBack={},_interopRequireDefault$1=interopRequireDefaultExports,default_1$1=(Object.defineProperty(ArrowBack,"__esModule",{value:!0}),ArrowBack.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=jsxRuntimeExports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),default_1$1=ArrowBack.default=_default$1,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 PrintOutlined={},_interopRequireDefault=interopRequireDefaultExports,default_1=(Object.defineProperty(PrintOutlined,"__esModule",{value:!0}),PrintOutlined.default=void 0),_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)([(0,_jsxRuntime.jsx)("path",{d:"M19 8h-1V3H6v5H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zM8 5h8v3H8V5zm8 12v2H8v-4h8v2zm2-2v-2H6v2H4v-4c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v4h-2z"},"0"),(0,_jsxRuntime.jsx)("circle",{cx:"18",cy:"11.5",r:"1"},"1")],"PrintOutlined"),default_1=PrintOutlined.default=_default,t="GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider",n$2=reactExports.createContext({instance:void 0,siteKey:"",language:"",isLoading:!0,executeV3:()=>{throw Error(t)},executeV2Invisible:()=>{throw Error(t)},reset:()=>{throw Error(t)},getResponse:()=>{throw Error(t)},render:()=>{throw Error(t)}}),n$1=()=>reactExports.useContext(n$2);let c=()=>!!document.querySelector('script[src*="/recaptcha/"]:not([src*="gstatic"])'),e$1=()=>".grecaptcha-badge{display: none !important;}",n=({host:e="google.com",isEnterprise:t=!1,render:r,hl:n,badge:o})=>`https://www.${e}/recaptcha/${t?"enterprise.js":"api.js"}?`+new URLSearchParams({...n&&{hl:n},...o&&{badge:o},render:r}),d$1=()=>{var e=document.createElement("style");e.innerHTML=e$1(),document.body.appendChild(e)},m=({onload:e,appendTo:t="head",isEnterprise:r=!1,host:o,render:a,badge:i,hl:s,...l})=>{let u=n({host:o,isEnterprise:r,render:a,hl:s,badge:i}),c=document.createElement("script");Object.entries(l).forEach(([e,t])=>{c.setAttribute(e,t?.toString()??"")}),c.src=u,c.onload=e,document[t].appendChild(c)},o$3=()=>{var e=document.querySelector(".grecaptcha-badge");e&&e.parentNode&&document.body.removeChild(e.parentNode)},o$2=e=>{var t=document.getElementById(e);if(t)for(;t.lastChild;)t.lastChild.remove()},e="https://www.gstatic.com/recaptcha/releases",o$1=()=>{window.___grecaptcha_cfg=void 0;var t=document.querySelector('script[src*="/recaptcha/"]:not([src*="gstatic"])'),t=(t&&t.remove(),document.querySelector(`script[src^="${e}"]`));t&&t.remove()};var a="google-recaptcha-checkbox-container",o=({id:r=a,onChange:n,action:o,onError:i,onExpired:s,size:l,theme:e,language:t,...u})=>{let c=n$1(),d=reactExports.useRef(null),p=e??c.theme,h=t??c.language;return reactExports.useEffect(()=>{var e,t;if(c.render)return e=document.createElement("div"),t={sitekey:u.siteKey??c.siteKey,callback:n,...h&&{hl:h},...o&&{action:o},"expired-callback":s,"error-callback":i,size:l,theme:p},c.render(e,t),d.current&&d.current.appendChild(e),()=>{o$2(r)}},[c.siteKey,c.render,h,n,r,l,o,p]),jsxRuntimeExports.jsx("div",{ref:d,id:r,...u})},d="onGoogleReCaptchaLoad",f="google-recaptcha-container",p=({type:n,siteKey:o,language:a,scriptProps:i,isEnterprise:s=!1,host:l,theme:u="light",children:e,explicit:p,onLoad:h,onError:y})=>{let[t,g]=reactExports.useState(!0),[r,x]=reactExports.useState(),b=(reactExports.useEffect(()=>{let e=i?.id??`google-recaptcha-${n}-script`,r=c();try{var t=()=>{g(!0);let t=s?window.grecaptcha?.enterprise:window.grecaptcha;if(t){if(p||t.ready(async()=>{x(t),await h?.(t),g(!1)}),p){let e={size:"v3"===n||"v2-invisible"===n?"invisible":"normal",...("v3"===n||"v2-invisible"===n)&&{badge:"bottomright"},sitekey:o,theme:u,..."object"==typeof p&&{...p,"expired-callback":p.expiredCallback,"error-callback":p.errorCallback}};r||("object"!=typeof p||"v3"!==n&&"v2-invisible"!==n||"hidden"!==p?.badge||d$1()),t.ready(async()=>{"object"==typeof p&&p.container&&t.render(p.container,e,!!p.inherit),x(t),h&&await h(t),g(!1)})}}else y?.(),g(!1)};return window[d]=t,r?t():m({isEnterprise:s,host:l,...("v3"===n||"v2-invisible"===n)&&"object"==typeof p&&p?.badge&&{badge:"hidden"===p?.badge?"bottomright":p?.badge},...a&&{hl:a},render:p||"v2-checkbox"===n?"explicit":o,...i,onload:t,id:e}),()=>{c()&&o$1(),"object"!=typeof p||"v3"!==n&&"v2-invisible"!==n||p?.container||!p?.badge?o$3():o$2(f)}}catch{g(!1)}},[s,a,l,o,n]),reactExports.useMemo(()=>({instance:r,siteKey:o,isLoading:t,theme:u,executeV2Invisible:e=>{if(r?.execute)return r.execute(e);throw Error("Google ReCaptcha has not been loaded")},executeV3:e=>{if(r?.execute)return r.execute(o,{action:e});throw Error("Google ReCaptcha has not been loaded")},reset:r?.reset,getResponse:r?.getResponse,render:r?.render,...a&&{language:a}}),[r,o,t,a]));return jsxRuntimeExports.jsx(n$2.Provider,{value:b,children:e})},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"}],recaptcha={publicKey:""},prodConfigs={baseUrl:baseUrl,hubUrl:hubUrl,stripePublishableKey:stripePublishableKey,stripePricingPlanId:stripePricingPlanId,sentryDSN:sentryDSN,disableEnvironmentDiscovery:disableEnvironmentDiscovery,switchAppUrl:switchAppUrl,signupUrl:signupUrl,instanceUrls:instanceUrls,recaptcha:recaptcha};function getConfig(){var e=window.aiwareConfig;return e?JSON.parse(JSON.stringify(e)):prodConfigs}function getRestApiUrlFromConfig(){return getConfig().baseUrl.replace("/v3/graphql","")}function getRecaptchaSiteKey(){var e;return null!=(e=null==(e=getConfig().recaptcha)?void 0:e.publicKey)?e:""}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=/")},ALLOWED_REDIRECT_HOST_PATTERNS=[/\.veritone\.com$/,/\.aiware\.run$/];function isAllowedRedirectUrl(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{var t=new URL(e,window.location.origin);return t.origin===window.location.origin?!0:ALLOWED_REDIRECT_HOST_PATTERNS.some(function(e){return e.test(t.hostname)})}catch(e){return!1}}function _define_property$c(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$9(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$c(t,e,r[e])})}return t}var Header=function(e){var t=e.text,r=e.subText,n=e.type,o=e.sx,e=e.subTextSx,e=void 0===e?{}:e;return jsxRuntimeExports.jsxs(Box,{sx:{marginBottom:"30px",textAlign:"center"},children:[jsxRuntimeExports.jsx(Typography,{sx:_object_spread$9({fontFamily:"Nunito",fontSize:"22px",lineHeight:"28px",letterSpacing:"-1.30385e-09px",color:"#2A323C"},void 0===o?{}:o),"data-testid":"os-auth-header-text-".concat(n),children:t}),r&&jsxRuntimeExports.jsx(Typography,{sx:_object_spread$9({fontFamily:"Nunito",fontSize:"16px",lineHeight:"22px",textAlign:"center",letterSpacing:"-1.30385e-09px",color:"#5C6269",overflow:"hidden",textOverflow:"ellipsis"},e),"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$b(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$8(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$b(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,p=e.testId,p=void 0===p?"":p,e=e.htmlForm,h="".concat(u||DEFAULT_BUTTON_COLOR,"!important"),c="".concat(c||DEFAULT_BUTTON_TEXT_COLOR,"!important"),p=p||"os-auth--".concat(n,"-btn");return jsxRuntimeExports.jsx(LoadingButton,{color:"primary",variant:"contained",onClick:t,loading:o,type:d,form:e,ref:s,sx:_object_spread$8({textTransform:"none",fontSize:"18px",lineHeight:"24px",fontFamily:"Nunito",fontWeight:600,width:"100%",height:"56px",borderRadius:"50px",background:"".concat(h),backgroundColor:"".concat(h),color:c,"&.MuiButton-root:not(:disabled):not(:hover), .MuiButton-root:not(:disabled):not(:hover)":{background:h,backgroundColor:h,color:c},"&.Sdk-MuiButton-root:not(:disabled):not(:hover)":{background:h,backgroundColor:h,color:c},"&:hover":{background:h,backgroundColor:h,color:c,opacity:.9},":disabled":{backgroundColor:"#c3c3c3!important"},border:"1px solid ".concat(u)},i),className:l||void 0,"data-testid":p,disabled:a,children:r})},DEFAULT_REGISTRATION_BUTTON_COLOR="#054FA3",CompleteRegistrationButton=function(e){var t=e.loading,r=e.isSubmitting,n=e.disabled,n=void 0!==n&&n,o=e.buttonColor,a=e.buttonTextColor,i=e.hasTos,i=void 0===i||i,e=e.htmlForm,s="".concat(o||DEFAULT_REGISTRATION_BUTTON_COLOR,"!important"),a="".concat(a||DEFAULT_BUTTON_TEXT_COLOR,"!important");return jsxRuntimeExports.jsx(LoadingButton,{type:"submit",form:e,variant:"contained",loading:t||r,disabled:n,sx:{textTransform:"none",fontSize:"14px",fontFamily:"Nunito",fontWeight:600,width:"100%",height:"36px",marginBlockStart:"10px",marginBlockEnd:"20px",backgroundColor:s,background:s,color:a,"&.MuiButton-root:not(:disabled):not(:hover), .MuiButton-root:not(:disabled):not(:hover)":{background:s,backgroundColor:s,color:a},"&:hover":{background:s,backgroundColor:s,color:a,opacity:.9},":disabled":{backgroundColor:"#c3c3c3 !important",border:"1px solid #c3c3c3 !important"},border:"1px solid ".concat(o||DEFAULT_REGISTRATION_BUTTON_COLOR)},"data-testid":"os-auth-register-complete-registration-button",children:i?"Accept Terms & Conditions and Request to Join Organization":"Request to Join Organization"})};function _array_like_to_array$o(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$o(e){if(Array.isArray(e))return e}function _array_without_holes$1(e){if(Array.isArray(e))return _array_like_to_array$o(e)}function _iterable_to_array$1(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$o(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$o(){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$1(){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$o(e,t){return _array_with_holes$o(e)||_iterable_to_array_limit$o(e,t)||_unsupported_iterable_to_array$o(e,t)||_non_iterable_rest$o()}function _to_consumable_array$1(e){return _array_without_holes$1(e)||_iterable_to_array$1(e)||_unsupported_iterable_to_array$o(e)||_non_iterable_spread$1()}function _unsupported_iterable_to_array$o(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$o(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$o(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$o(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$1(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$n(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$n(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$n(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$n(){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$n(e,t){return _array_with_holes$n(e)||_iterable_to_array_limit$n(e,t)||_unsupported_iterable_to_array$n(e,t)||_non_iterable_rest$n()}function _unsupported_iterable_to_array$n(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$n(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$n(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$n(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$b(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$b(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$b(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$b(n,t,r,o,a,"throw",e)}o(void 0)})}}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}function _ts_generator$e(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 getAppId=function(){return appIdSelector(store.getState())},getHeadersWithAppId=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=getAppId();return _object_spread$7({},e,t?{"X-Veritone-Application":t}:{})},getJsonHeaders=function(){return getHeadersWithAppId(_object_spread$7({"Content-Type":"application/json"},0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}))},getJsonHeadersWithAuth=function(e){return getJsonHeaders({Authorization:"Bearer ".concat(e)})},getJsonCharsetHeaders=function(){return getHeadersWithAppId(_object_spread$7({"Content-Type":"application/json; charset=utf-8"},0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}))},handleGetOpenIdProviders=(()=>{var t=_async_to_generator$b(function(t){var r,n,o;return _ts_generator$e(this,function(e){switch(e.label){case 0:r=[],e.label=1;case 1:return e.trys.push([1,6,,7]),[4,fetch(t,{headers:getHeadersWithAppId()})];case 2:return 200!==(n=e.sent()).status?[3,4]:[4,n.json()];case 3:return o=e.sent(),r=o.results,[3,5];case 4:globalThis.DEBUG&&console.error("was not able to retrieve global open id providers",n),r=[],e.label=5;case 5:return[3,7];case 6:return o=e.sent(),globalThis.DEBUG&&console.error("was not able to retrieve global open id providers",o),r=[],[3,7];case 7:return[2,r]}})});return function(e){return t.apply(this,arguments)}})();function _array_like_to_array$m(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$m(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array$m(e)}function asyncGeneratorStep$a(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$a(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$a(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$a(n,t,r,o,a,"throw",e)}o(void 0)})}}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 _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$m(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$m(){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 _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}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 _sliced_to_array$m(e,t){return _array_with_holes$m(e)||_iterable_to_array_limit$m(e,t)||_unsupported_iterable_to_array$m(e,t)||_non_iterable_rest$m()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array$m(e)||_non_iterable_spread()}function _unsupported_iterable_to_array$m(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$m(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$m(e,t):void 0}function _ts_generator$d(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 n=_async_to_generator$a(function(t,r,n){var o;return _ts_generator$d(this,function(e){switch(e.label){case 0:return o=(r||getRestApiUrlFromConfig())+"/api/admin/openid/org/"+t,n&&(o+="?orgGuid="+encodeURIComponent(n)),[4,handleGetOpenIdProviders(o)];case 1:return[2,e.sent()]}})});return function(e,t,r){return n.apply(this,arguments)}})(),linkUserToOidAndLogin=function(e,t,r){return fetch(getRestApiUrlFromConfig()+"/api/admin/openid/linkUserToOid",{method:"POST",credentials:"include",headers:getJsonCharsetHeaders(),body:JSON.stringify({userName:e,password:t,sessionKey:r})})},getUserInstances=(()=>{var t=_async_to_generator$a(function(t){var r,n;return _ts_generator$d(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:getJsonCharsetHeaders()})];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$a(function(t,r,n,o){var a,i,s;return _ts_generator$d(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:getJsonCharsetHeaders(),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$a(function(t){var r,n,o;return _ts_generator$d(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:getJsonCharsetHeaders(),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$a(function(t){var r,n,o,a,i;return _ts_generator$d(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:getJsonCharsetHeaders(),body:JSON.stringify(_object_spread_props$3(_object_spread$6({},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$a(function(t,r,n){var o,a,i,s;return _ts_generator$d(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:getJsonCharsetHeaders(),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$a(function(t){var r,n,o,a,i,s;return _ts_generator$d(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 guid\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:getJsonHeaders(),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)}})();function buildSchema(e){var r={},n=[];return _to_consumable_array(e).sort(function(e,t){return e.sequence-t.sequence}).forEach(function(e){var t={type:e.type,title:e.label,sequence:e.sequence},t=e.enum?_object_spread_props$3(_object_spread$6({},t),{enum:e.enum}):t;r[e.id]=t,e.required&&n.push(e.id)}),{type:"object",properties:r,required:n}}var getSignUpConfigById=(()=>{var t=_async_to_generator$a(function(t){var r,n,o,a,i,s;return _ts_generator$d(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,o=n="registrationConfigurationInfo",a="\n query ".concat(n,"($id: ID) {\n ").concat(o," (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 "),i={id:t},e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"POST",headers:getJsonHeaders(),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 t=_async_to_generator$a(function(t){var r,n,o,a,i,s;return _ts_generator$d(this,function(e){switch(e.label){case 0:r=getRestApiUrlFromConfig(),r="".concat(r,"/api/admin/signup/org/config/").concat(encodeURIComponent(t)),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"GET",headers:getJsonHeaders()})];case 2:return(n=e.sent()).ok?[4,n.json()]:[2,null];case 3:return null!=(n=e.sent())&&n.name?(i=Array.isArray(n.customRegistrationFields)?buildSchema(n.customRegistrationFields):{type:"object",properties:{},required:[]},o=null!=(o=n.termsOfService)?o:null,a=null!=(a=n.privacyPolicy)?a:null,s=[],o&&s.push({fileId:o.fileId,name:o.name,url:o.url,type:"termsOfService",status:"active"}),a&&s.push({fileId:a.fileId,name:a.name,url:a.url,type:"privacyPolicy",status:"active"}),[2,{id:n.registrationConfigurationId,name:n.name,slug:n.slug,files:s,uiSettings:{logo:null!=(s=null==(s=n.ui)?void 0:s.logo)?s:"",veritoneBranding:null==(s=null==(s=n.ui)?void 0:s.veritoneBranding)||s,customRegistrationFields:i,registrationButtonStyle:{textColor:null!=(s=null==(s=n.ui)||null==(i=s.registrationButtonStyle)?void 0:i.textColor)?s:"",backgroundColor:null!=(i=null==(i=n.ui)||null==(s=i.registrationButtonStyle)?void 0:s.backgroundColor)?i:""},passwordPolicy:null!=(s=n.passwordPolicy)?s:void 0},organizationGuid:n.organizationGuid,openRegistrationStatus:n.openRegistrationStatus,adminApprovalRequired:null!=(i=n.adminApprovalRequired)&&i,allowedDomains:null!=(s=n.allowedDomains)?s:[],requireAcceptTerms:null!=(i=n.requireAcceptTerms)&&i,termsOfService:o,privacyPolicy:a}]):[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)}})(),getUserSettings=(()=>{var t=_async_to_generator$a(function(t){var r,n,o,a,i;return _ts_generator$d(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:getJsonHeadersWithAuth(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$a(function(t,r,n,o){var a,i,s,l;return _ts_generator$d(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:getJsonHeadersWithAuth(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)}})(),doesEmailExists=(()=>{var t=_async_to_generator$a(function(t){return _ts_generator$d(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$a(function(t){var r,n,o;return _ts_generator$d(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:getJsonHeaders(),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$a(function(r){var n,o,a;return _ts_generator$d(this,function(e){switch(e.label){case 0:return n=r.customFields,o=_object_without_properties(r,["customFields"]),n=n?Object.entries(n).map(function(e){e=_sliced_to_array$m(e,2);return{id:e[0],value:e[1]}}):[],o=_object_spread_props$3(_object_spread$6({},o),{customFields:n}),a=0,[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/org/").concat(encodeURIComponent(r.slug)),{method:"POST",headers:getJsonHeaders(),body:JSON.stringify(o)}).then((t=_async_to_generator$a(function(t){var r;return _ts_generator$d(this,function(e){switch(e.label){case 0:return a=t.status,r=[{status:t.status,message:""}],[4,t.json()];case 1:return[2,_object_spread$6.apply(void 0,r.concat([e.sent()]))]}})}),function(e){return t.apply(this,arguments)})).catch(function(e){return devErrorLogger(e),{status:a,message:"Internal server error. Please try again later.",invite:void 0}})];case 1:return[2,e.sent()]}var t})});return function(e){return t.apply(this,arguments)}})(),postSelfServiceRegistrationReview=(()=>{var r=_async_to_generator$a(function(t,r){var n;return _ts_generator$d(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/review"),{method:"POST",headers:getJsonHeaders(),body:JSON.stringify({token:t,action:r})}).catch(function(e){return devErrorLogger(e),null})];case 1:return(n=e.sent())?[2,{ok:204===n.status,status:n.status}]:[2,{ok:!1,status:0}]}})});return function(e,t){return r.apply(this,arguments)}})(),postSelfServiceEmailVerification=(()=>{var t=_async_to_generator$a(function(t){var r;return _ts_generator$d(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/validate-email"),{method:"POST",headers:getJsonHeaders(),body:JSON.stringify({token:t})}).catch(function(e){return devErrorLogger(e),null})];case 1:return(r=e.sent())?[2,{ok:204===r.status,status:r.status}]:[2,{ok:!1,status:0}]}})});return function(e){return t.apply(this,arguments)}})(),postTrialVerify=(()=>{var t=_async_to_generator$a(function(t){var r;return _ts_generator$d(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/trial/verify"),{method:"POST",headers:getJsonHeaders(),body:JSON.stringify({token:t})}).catch(function(e){return devErrorLogger(e),null})];case 1:return(r=e.sent())?[2,{ok:204===r.status,status:r.status}]:[2,{ok:!1,status:0}]}})});return function(e){return t.apply(this,arguments)}})();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}}}}function createUserSaga(e){var t,r;return _ts_generator$c(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$c(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$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 createUserWatcher(){return _ts_generator$b(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$b(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$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 rootSaga(){return _ts_generator$a(this,function(e){switch(e.label){case 0:return[4,all([createUserWatcher(),activateUserWatcher()])];case 1:return e.sent(),[2]}})}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 getSignUpModule(){return{id:SLICE_NAME,reducerMap:_define_property$8({},SLICE_NAME,signUpSlice$1),sagas:[rootSaga],initialActions:[]}}function _array_like_to_array$l(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$l(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$l(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$l(){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$l(e,t){return _array_with_holes$l(e)||_iterable_to_array_limit$l(e,t)||_unsupported_iterable_to_array$l(e,t)||_non_iterable_rest$l()}function _unsupported_iterable_to_array$l(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$l(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$l(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===$&&e.target.value&&S(e.currentTarget),j(!1),e=e.target.value,T[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$l(reactExports.useState(!1),2),c=u[0],d=u[1],u=_sliced_to_array$l(reactExports.useState(!1),2),p=u[0],h=u[1],u=_sliced_to_array$l(reactExports.useState(""),2),f=u[0],u=u[1],y=_sliced_to_array$l(reactExports.useState(""),2),m=y[0],y=y[1],g=_sliced_to_array$l(reactExports.useState(!1),2),x=g[0],b=g[1],g=_sliced_to_array$l(reactExports.useState(!1),2),_=g[0],g=g[1],v=_sliced_to_array$l(reactExports.useState(!1),2),E=v[0],j=v[1],v=_sliced_to_array$l(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))}),T={password:u,confirmPassword:y},u=window.innerWidth<=850,y=Boolean(w),$="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:$,className:v.passwordLabel,children:"Password"}),jsxRuntimeExports.jsx(OutlinedInput,{id:$,"data-testid":$,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$3,{}):jsxRuntimeExports.jsx(default_1$4,{})})}),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$3,{}):jsxRuntimeExports.jsx(default_1$4,{})})}),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=useSelector(authErrorMessage),c=(reactExports.useEffect(function(){"success"===l&&u===AuthContext.ResetPassword&&null!=n&&n()},[l,u]),lodashExports.isEmpty(t)||lodashExports.isEmpty(r)),d=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:d,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:d}),jsxRuntimeExports.jsx(Typography,{variant:"body2",children:SHARED_TEXT.resetPasswordSubHeader})]}),c&&jsxRuntimeExports.jsx(Alert,{sx:{mt:4},variant:"outlined",severity:"error",children:SHARED_TEXT.invalidTokenOrUsername}),e&&jsxRuntimeExports.jsx(Alert,{sx:{mt:4,mb:4},variant:"outlined",severity:"error",children:e}),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$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 _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$7(t,e,r[e])})}return t}var ResetPassword=function(e){return jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(ResetPasswordWidget,_object_spread$5({},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$k(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$k(e){if(Array.isArray(e))return e}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 _iterable_to_array_limit$k(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$k(){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$k(e,t){return _array_with_holes$k(e)||_iterable_to_array_limit$k(e,t)||_unsupported_iterable_to_array$k(e,t)||_non_iterable_rest$k()}function _unsupported_iterable_to_array$k(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$k(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$k(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$6(e={display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Nunito"},"& button",{textTransform:"none",marginTop:"20px",fontSize:"18px",lineHeight:"24px",fontFamily:"Nunito",fontWeight:"600"}),_define_property$6(e,"& input",{fontFamily:"Nunito",lineHeight:"22px",color:"#2A323C"}),_define_property$6(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$6(e,"& .MuiFormControl-root .MuiInputLabel-root.Mui-focused, .Sdk-MuiFormControl-root .Sdk-MuiInputLabel-root.Sdk-Mui-focused",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$6(e,"& .MuiInputLabel-outlined, .Sdk-MuiInputLabel-outlined",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$6(e,"& .MuiFormLabel-root .MuiInputLabel-root, .Sdk-MuiFormLabel-root .Sdk-MuiInputLabel-root",{color:"#9CA8B4"}),_define_property$6(e,"& .Mui-focused .MuiInputLabel-outlined, .Sdk-Mui-focused .Sdk-MuiInputLabel-outlined",{color:"#9CA8B4"}),_define_property$6(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$k(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$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 _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$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 _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 _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 _defs,_g,useStyles$4=makeStyles()(function(){var e;return{passwordWrapper:(_define_property$5(e={fontFamily:"Nunito"},"& 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"}}),_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"}),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$j(reactExports.useState(!1),2),s=i[0],l=i[1],i=_sliced_to_array$j(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$5,{}):jsxRuntimeExports.jsx(default_1$2,{})})}),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,iVBORw0KGgoAAAANSUhEUgAAAb8AAAFQBAMAAADdL20WAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAACpQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChPOiAAAAA50Uk5TAAINBwoLBgMMAQUECAnUoFH2AAAKUUlEQVR4nM2dzYpdRRSFT9tJa3eMhAY1YIz4AkGcOBOJIycivoDBiUImQQRx4s9UUJwIjqRxkpmIT9D4BME/8A8d9kh8A03n/px97q1d55xba6291yDpUd37XdY9t6rW3lV7XdcdX+ma9c+/7WMMtPds+xj//XV/nPv/7z/TPtb10/YxBrpwvX2Mx+4tALvX7zWPtfdn8xBDvXnaPMT+790S8J1vmwdDe3Tv45PmMS7+2i0BE3oU5dAF4OH7J82jXfiteQirrz9qHuLg7TvdErD77g5oOJQQH/nhz+f/LgAffaJ5uO6b59rHWOvy4+1jfPXS+b8LQMQH9sgvzUP0wllqDz0gRDiHrgARlgB6FPiVWQICPzKEgIZaAuIeywghHwkrQMQP6+KxBRBy4rEChE2NEAJMHQ/OllPHFSBkcnsb5FHA5H89sVoDwiZ/7YJOjdeAqAUmQNAF+Bqwe759vfPQH81DnOvm381D9MvTHjCNRw+utY/RL956wDQexW4R9YBpPAp1qAX84tPmgbsXT5qHOLra/jZeuLv+0wA+/FT7yG982DzEl5+0v41XP1//aQC77281jwzw6A+vNQ9x9FP/twVEfHYf3Goc4NKT7W/irff6vy0geuydhPiUPzMmsIAId1z6sXEA9HsYAKI/vR0Ed9EAEPGEbvQo/DkwAEQ/wXYQ4Ek+/JYMAcM9ivgtHnpoCIiY5zZ59OLT7W9gOJsaAoLngfOFnw9vACJm8maeNFeEFc0GIGK34MbuW0aENekGYLBHCSu2TcDQggTGmnsTMDTsZeyabAJC9yTnClV4YLUFGFiQgIgktnbXtwARydWOHsXFukZbgIFhLyXh2gKMC3s5GeU2YFjYy3nhbcCwsJdjnW3AqLCX9OUvAAZ5lFSrUwAM8igi1i0YpwAY49HDV9qnUKWfpxJgSEECaxJcAkRM6mcXJLCWMSVAyqR3TICFaHGSXwQMCHtpy7QiYEDYS1toFwEDwl7aVkkZELE9OcujiA3Z8mZXGRCxwTzLo1eP2l+wvF1ZBpR7lLeZ5wAiQooZBQnEWMsBFIe9xNDHAcTHWFURYzsPUFqQwPSLByj1KDOW9AClBQnM74MLKAx7qW5xAYUFCdTvuwuI+O2dWJBAnVX4gLzZ04a4RYA+IGL+a8oafeELD6x8QFnYy533VgBFYS95dV0BFIW95P2RCqCo+5y8w1UDlIS97D3KGqDEo+wdvBqgpPucnRPUACGJ3Vndo/SkpwooKEigFB5YVQEFBQn0ioAqIP/l+VlkHZAe9vLT5Dog/QPm16zUAdkPccGXfASQHPYKHtMjgIju84pHkf3kjkYAEVPhikcFtZtjgNSpomKyOwZInewrltRjgIgNBXe5ptgUGQUkehTbT+5oFJC4ZSLZ9BkFJG56SbbtxgFp3eeajddxQFpBArif3NE4IK37XNONOQGQFP6I4qsJgKT4ThRATgAkhb2iCHkKIOWzVhUBTAGkfFtUZRxTACluUhXiTAIkeBTfT+5oEiCh+1x2Os8kQEJBgqyccRogvPtcVzQ9DRDefa4re58GCF/Z6ApuJwKC16bCsv6JgOD9L2FjxkRAcEGCsLVmKuC77YCHL682gJWntU4FhErZ3hYCqGxQjACUtphGAEqbhCMApUcRBABqD5MIANTe/RAAqD0sQw8oPu5EDyg+VEkPKD5ySA8oPjRKDqg+9ksOqD64TQ6oPnpPDcjrJ3ekBpR1RK2kBtT1tC0lBtQfkywG1B8iLAbUHwOtBQw4bF4LGHDMtRZQe77CA0kBI65DkAJGXGghBWQVhdWkBAy5VEYJyO0nd6QEDLnYSQgYcFpbJwWMuVxNCBhxYqISMOTMSyVg0PV/OsCgs5FlgFGnW8sA6f3kjmSAUVc1qwDDzl9XAYadoK8CDLsDQQQYd4uFCDDuHhIRoKCf3JEGEHGQ/Y53AWkAA29z0gAG3selAQy8UU0CGHnfmAQw8sY4CWDknX8KQNlBniUpAOWFB1YKQHnhgZUAMPZ+ZgFg7O3FAsDYO9L5gMG33PMBI2JdIz5gQOGBFR1Q1k/uiA4o6yd3RAcMiXWN2IDyC442xQaUX1G1KTZgtEPZgDGFB4N30P4GagqKdY3IgDGFB1ZcQGU/ufcWmt9ATSHXpQ7FBYyKdY2ogGGxrhEVMCzWNaIChsW6RkzAuFjXiAmo7Sd3xATM4FAmYAqHMgEjQ7NeREBxP7kjIqC4n9wRDzCHQ4mAkbGuEQ8wMta1Y7QPUZa8n9wRDRB+oOWOogGGxrpGLMDYWNeIBRgb6xqxAPX95I5IgGkcygJM41AWYGzhgRUHMLjwwIoDGFx4YMUBjOgnd0QBDI91jSiAIf3kjiiA4bGuEQMwPtY1YgDGx7pGDEDmhXezRQAM6id3RABM5VAGIPfa0LnCA2aIdY3wgFH95I7wgAkKD6zggMkcigfMUHhgBQdMEesaoQFzxLpGaMC4fnJHaMC4fnJHYMDAfnJHYMAksa4RGDBJrGsEBgRs+CJiXTscdDTEMwbr0ITfQaxD8z1FwQ7N9zu4cz+5o3QzGUThgVW2uSgm1jXKtpoAhWa9sq0HMbGuUbIVPSjWNUq2JwN3KAGwad8XFOsa4QFbGrLwDk22s413aLJsAhXrGqVKl2CxrlGqfBAW6xqlSnhxoVmvTBk9w6GpqiwYDuUA7nhAB8OhmSqd9m8DI4m1EtWq4QoPrBJVGwJjXaM89aLQ0KxXnopfZKxrlKdmGxnrGqWpuic5NE/fBDTWNUrT+UJyKA1wbncdy6Fpus9YDk3TPwgOzXrRAGcGaeDQrFeSHl5s4YFVki5smkOz9NHTHEoEnBP2omNdOzRt5DlhL6Kf3BERcEbYi451jVKcJwOPdY1SnAhEiCTWYgJODnvhsa5RhlO5mA7lnqs2MexlOjTFyXhMh2Y425AQ6xpxT6ecFPZSHZrhfFF84YEV+YTYCUEaJTQzb4E6+pQgjRKa9Yo/pZlQeGAVfs422aHxJ6WTHUoHHA17KbGuUfRtBbh+ckf0+yZGwl5OrGtEBxwJKdgO5QPWw15aJLEWHbAepJFiXSM+YNWjnMIDKz5gLezlO1QAWPMo36EKwIpHWbGukQDQD3sFDlUA+kEaLdY1UgC6QRovNOulAPQ8iu0nd6QA9DzKi3WNJICORxUO1QA6YS8v1jWSAJaPvSfGuvZVFC9SDnslDhUBFsNeiUNFgKWQQuNQEWAp7EX3kzsSARaCNGLhgZUIcNuj1FjXSAS4HfZyQ7NeKsAtj1JjXSMV4KZHubGukQpw06Mqh+oAN4I0bqxrJAMcBmkyh+oAhwUJMocKAQceJce6RjpA61F2rGtfVvZKNuxlx7pGQkBzAj49NOslBOzDXqFDlYB92Ct0qBRwHVIIHSoFXIW9nH5yR0rAVZBGLzywkgIuPcqPdY2kgAuPKkKzXlLAhUcFsa6RFvCBRwWxrpEW8LwgQetQMeB5kKaIdY3EgMdXxA5VAx5cEztUDdjdPNM6VA54fONU+4JqwP3LktCs1//g1etv6s1e6QAAAABJRU5ErkJggg==",img="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQ4AAAAwCAYAAADgtpTMAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADMRJREFUeJztXQusFsUVtlJbIkYwEU0VWiQFfES9MBoUH+CrQrViq2ipKEQrfRgVbAXsw0urLa0SxBjrWwNWBIlCW4rPchFRI1ZFSwUjkkjog6pco7SoLdhz+Oev2737nZ3Xvu7dSU5y7//PfN/ZnZ3v3509c2aXXSpSWlo3LiT7WLCBplhq+MgjyD4GdnZIvwlvscDVNzDXZsAzNyDHVOF4JofiEfhPEPhDWjvZq2RLyaaTjQjg++E5+Z5mAwJ0RTVKSOHgoi+MpJN6a0i/CW+r0IEXBuQ5SOAZF5BnrcDzUigegT8v4Uiy58mO8fC9Fo68SwbCMR+c1PWhfCaso1I6cF5ArssEnt6BOKQ7taYNCsEl+HBiwYNuO9kUR99r4ci7ZCAcFwontk8InwnnRykd2B6CR3P9FnCsDshxk8FFOTMUH/ChaOFo2lUOvtfCkXfJQDh6Cyf24hA+E85yg048LABPN4Ufia4LdCyfVvjxLmr/INs1BCfwoyzCwWb12FILRwEltHBwUY3Jr6QTu8DXX8L4DNm/DTrxigBcxwj4J/via44zLS7MUSE4gR9lEo4llr7XwpF3yUg4ZoMT6/0IQRgjDTtxaQCuVoD9AQuYL77meMjiwpwfghP4IQnHy2RtgWwF2fsGx2r8WEt1DxVw+EdseU62f1b9U7pCwnA22QLBetli0gn8stCRQ3z8pfYzDQcZD+5unlwrAfYjPrgR/J5kH1kIxzayHiG4E3yRhOPUwFx81/gTsv8InOda4El3HOeF9L0uGRYlP044zZxHsFdbDLTjPXh2F47B+zFIc1xicSxNCzJPlOBLbsIR4ZQmuY0ng7uEcNAv+ACy9sD2StHHFS/UYctARz7mgdnTcpD91IPrdAH3EFfcGMcqgP+StqTvngrBneBLEcLRnexfgPM3FjhdQjhUypyCq40p+tiihTpsGuhI5/kBajfWUjie9fD/RoC52RUzhj9I8Ptybej7fiF8iPmTu3BoXiSQT1tgdAnhGJyRcLzl6E8vsrnAWl2PkzpsiNCZJzli3mUpHDvIdnfk+jPAvMcFLwF/BsDnOY/e2tD8x/QQPsT8kSJHvxSaL8K7BHCus8DoEsKR1R0H26UO/hwo4L3jc6wKxyfMcMR7E+D9TrhwznDgkWJRxrr4nsCxCeAvitRZBOpsCOFDzB/pjiNL4UCRxm9aYHQJ4WjJUDi2OfiTpXDMA535RwesLwoXB8dCvA6+u8mB6wKBq6ctXgL+yQL+6Ei90UK943z9iPlUC0eZS8Z3HGzXWvqTpXBMAJ25w3YAUv3vACx+88FvQG4G36918PtegPWCLZYlPkeH7hapt5v+LKnunSF8iXDVwlHmkoNwbLH0J0vhkG75rZbZU/0HAc5K/b3062y1GE3hZfROj1gx7B6qEY+RhH9DQv0bQF0Oovqsrz8Rnlo4ylxoMH6ObHkA2yYM+KMs/MlMOLhQx60BHXqbJQ6aL7lafy/FXYy34DlEuAhPsD3+BHx0F8Z2eEL9oUL9IPMtmqeotyoP1MKRY6FBvUEY8MavZnMQjlmgQ9+wwDhSuDCGRuo9Berca8E1CWDwYjevSFSN3wbwE3Nu0OefItsA2jzs60+Ep6g7DvRW5TULjFo4TEuFhENaW2K0HoHqXQXat8fq/RjUM469EC5kq4VXAHs/1ZjfScK/XGjXCtpwyPbevn5pjqKEYx3gfM4CoxYO01Ih4eDw8w9Ap040xPgDaL8wVk+6rU+N9lTyMvrLXM9BBB+FWO+M3RDaHSAIzvd9/dIcucdxEG5/gXNROsL/cGrhMC1VEQ4u1HlPgE59wKCttO7lmwn10VzIJAOu44QL8EDX44/go0eO1EGi8COO9VsjgF9EyDma32D7mQXOYQIOT6pPz8iCJKbKtVRMOKaATk1dZs+/dsJF0aHj6LOFoG7qo4ZqrNhMarvR9dgj2EcLxzHaoP14of3gAP7lIhyEtSvZMLInBT62r1lgFpWP4+hQ5yW3UjHhaBFOvkppex1olxiSTJ9fDOqnTm7S98+Att4xE4RxC8D+v9gNof0eCuex6PAa18G/MiXy4b4yftXcJYSDBuP5ZJMC2NvCgDdW6zyEg4vCsRFTU9q9CNrdCOr3ETr6WIGHX+eieYRzPI9dSg9oPOip7j2C+HilFVTFZjmP2/WWvndO4aABOIxsvTBAQ5txcFWOwvFrcPIfF9pIy+hPE9q9BtpMF9qgADLrKNcE7DHCcXSI3RBwhgs4p3v6WBbh+CvZHpa+dz7hoMF3f46CUeY7DrT+Ay6zp8/PAW12hpkLXChr+EqHNqsCHDtahGe1X4qSYzoWpiOI2GV4VOHXy0PTve3ge+cSDhp4iwsQjdLNcXBRcvh5YuJf+vx2UH9ZCtdXbAVH4XiCazyPe2+FU+TB2A0BrxVg8Std5zsjVfwdx3tkZzn63nmEgwbdkQWJRimFgwud6FdAB/wC1EfL6Kel8Ejh5x1u6ZUsal6rUBWOROVHIOsNnZQc0/FtDz+LEg5et8N3e86vNpWcrPgashEZ2Z6uPsNCg+6FAoWjdI8qXBRONNxhmb2Sg4NSXz8q/LpvdkLdCaCud5i5whmu2jww2wDmMx6YknBwlvPlDoaSIbH9TTWSWjslWor53nkCwGjQfVigcJRucpSLwjEZHSYg6f+JoK7RFgtU74eg/ZqEuveBusZ5L4EPUnpA44V3CbjjBdx+jpjB4zhU407uQ6HPrbfeADydSjiKEo0yP6pI4edjYnVRINd9hlzSwrjesbroVfElnsd7veCDj81VeGm+U4LmLIRD494t4N7uihvj6BLC8X4g/DeqJhxcqCMfAx18W6weinu4wIILYZwfqSOFK3vtzKVwEh5f4zU594PvNjn6mpVwDBRw+W7Eet+eBI5aOCzwqyoc3wMdvDFSRwkXgvGEItVdADDmROpckeaP43GOykg01ml8adXxCAd/Mws5V/jHgs05IXYEvxYOC/yqCoc0A95f15kKvn/ZkusigLM5UudhUMcq0VACN8ps5WtTND7HdKA7GutM7BkLhyRyW5RByH0Kfi0cFviVFA4uCs8pTNTfPw6+tw1FlsLPD1KNZfRozsUppkDzSukBfWy7iuTfoL9/CepZpxXMUjg0PoqTYeuwytkSuxYOC/wqC8cc0Mk8ISpNoJ7iwLUWYF2qcAi3V5i5wgvtfO33MR7prc04S5+zFg5098dmvIcKwK6FwwK/ysLxDdDJPJl5EroIHLlmA7zFZNeC75zjITTnCoD7d+W3G/rIBK7nANejlj5nLRycsX2LwDHKA7sWDgv8KgvHPkJHPwI+X+rIhSYpOcQZ7d16tcex9ROOLfiG0YT5XcDFd037WeBkno9D4XB5tic8cGvhsMCvrHBwUTiiEpnTDvFKziCGbJjHcaFkQDzn0cMVV+DjFcRoq0gxZUEMJw/h6KVwQBjboY64tXBY4FddONDEHjLnHeKp7TILnq2ex4W2dpzvg5vCibaKNE4rmIdwaJ47BJ456QiJmF1COD4imxXA3hU4SrlWJVqUMJeRYF47xFP7aRZcD3nwHC/gOj/DG/B+VeA9whAjL+GQAsL4ztBl4V+nEo4dwoD0Ncb+i/B9KdeqRIuS357E7W5PriEWwuGzwvROgOmdoSuFV8owZrR3bl7CoblQ7Azbzx3wilpWH7cBMb84O390cpv3GOI4pnmxejwWlu4UTRp0WzMUjhUtckax0t9x6BMmXUBR+3oALjSw4ua0vJvadSd7F2BaxZ848qNERG8bts9TOE4RuPjNS3dLvFIKh/aNUzy8GPm/mUn/1MhnzQWdfXlALslQOAa2yHMcpb/j0CdsskFneKfu01zzDLjWe+CPFXAH+fpvwC8t6jvToH2u2yMoOSDManFhxYTjWNVIi9Cm/+es77xNKr9W78MDcl+y7RmIxmom7CR3HNI+rU17PhDXBAOumz3w0Wtkq/SAPkXhtIKp8zYFCIfUHxsssaomHDxBzOuoeE0W/+DMUI31PH13VmppZCMPLRzDNXblhYOLwuHnTTPemCeFR8ry1bTU/U0AtpQeMHUjqFCFuH4AfEhNK1iAcHRL6fvUu6QIVtWEg+fCDlaNXLSr9PXDPzyfPCbzY0OLvLO8jW2K4Fb+UYWLwin/mzY8INcagUdMgJyCeyXADLa3q6Ef0t604u1/3sKhOdGWmGwrLHCqJhx36L95l7mZ+u9P7jiihQbhXS2NvVDaPWx8BO9RoZ7xYKO6XyD7J7A/meK4FtVYOYlCrJ2jCQHXZIHrVg/cXwHMWSH9N/TlFhdf6PvBwrkxeqXr4OteqvG8j3hNNyXvL2Dkafsn+Mah9t+K/P95sjP03/xqeh/99ziyPf8LYwCh/4hfBB4AAAAASUVORK5CYII=",Footer=function(e){var t=e.showLogoInFooter,e=e.loginConfigs;return jsxRuntimeExports.jsxs(Box,{sx:{textAlign:"center","& #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$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 FORM_WIDTH="500px",PageContainer=function(e){var t=e.children,r=e.showLogoInFooter,r=void 0===r||r,e=e.loginConfigs,n=_sliced_to_array$i(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:FORM_WIDTH,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:FORM_WIDTH,marginLeft:"auto",marginRight:"auto","& #veritone-logo-svg":{width:"220px"},"& #veritone-v-mark-png":{position:"absolute",bottom:"-115%",left:"5%",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$i(React.useState(0),2),n=r[0],o=r[1],r=_sliced_to_array$i(React.useState(0),2),a=(r[0],r[1]);return jsxRuntimeExports.jsx(Box,{sx:{width:"207px",height:"118px",maxWidth:"100vw",display:"flex",alignCenter:"center",justifyContent:"center",margin:"0 auto",marginBlockStart:"min(calc(100vh * 0.1), calc(".concat(n,"px * 0.5))"),marginBlockEnd:"30px",textAlign:"center"},children:jsxRuntimeExports.jsx("img",{style:{pointerEvents:"none",objectFit:"contain",width:"100%",height:"100%"},onLoad:function(e){o(e.target.naturalHeight),a(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,n=e.redirectUrl,o=useStyles$3().classes;return jsxRuntimeExports.jsx(Box,{className:o.btnWrapper,children:t&&t.map(function(r,e){return jsxRuntimeExports.jsxs(Button,{variant:"outlined","data-testid":"os-auth-openId-button-".concat(e),className:o.openIdBtn,onClick:function(){var e,t;e=r.loginUrl,t=n?btoa(n):"",window.location.href=e+(t?"?redirectUrlEncoded=".concat(encodeURIComponent(t),"&redirectUrl=").concat(encodeURIComponent(n)):"")},sx:{backgroundColor:r.loginButtonStyle&&r.loginButtonStyle.btnColor?r.loginButtonStyle.btnColor:"#FFFFFF","&:hover, &:focus":{backgroundColor:r.loginButtonStyle&&r.loginButtonStyle.btnColor?r.loginButtonStyle.btnColor:"#FFFFFF"}},children:[r.loginButtonStyle&&r.loginButtonStyle.btnLogo&&jsxRuntimeExports.jsx("img",{className:o.openIdLogo,alt:"icon",src:r.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:r.loginButtonStyle&&r.loginButtonStyle.btnTextColor?r.loginButtonStyle.btnTextColor:"#2A323C"},children:(null==r?void 0:r.name)&&"Login with "+(20<(e=r.name).length?e.substring(0,20)+"...":e)})]},r.connectId)})})};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 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 _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}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 useLoginConfig(){var r=useParams().slug,n=useNavigate(),e=_sliced_to_array$h(reactExports.useState(),2),t=e[0],o=e[1],e=_sliced_to_array$h(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$9(function(){var t;return _ts_generator$9(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,_obj,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$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$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$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 _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$4(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$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}(e=>{e.EnvError="EnvError",e.RegistrationError="RegistrationError",e.Unauthorized="401",e.CaptchaError="CaptchaError",e.Forbidden="403",e.InviteExists="409"})(EDesktopSnackbarMessageType=EDesktopSnackbarMessageType||{});_define_property$4(_obj={},"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."}),_define_property$4(_obj,"CaptchaError",{title:"Captcha Error",description:"reCAPTCHA verification failed. Please try again."}),_define_property$4(_obj,"RegistrationError",{description:"An error occurred during registration. Please try again."}),_define_property$4(_obj,"401",{title:"Authentication Required",description:"Your session has expired or you are not authorized. Please log in again or contact your administrator."}),_define_property$4(_obj,"403",{title:"Access Denied",description:"You do not have permission to access the requested resource."}),_define_property$4(_obj,"409",{title:"Invite Already Exists",description:"An invite for this email already exists. Please check your inbox or contact your administrator."});var DesktopSnackbarMessage=_obj,DesktopSnackbar=function(e){var t=e.open,r=e.message,n=e.onClose,e=_sliced_to_array$g(reactExports.useState(""),2),o=e[0],a=e[1],e=_sliced_to_array$g(reactExports.useState(""),2),i=e[0],s=e[1];return reactExports.useEffect(function(){var e;r&&(a(null!=(e=r.title)?e:""),s(r.description))},[r]),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)",paddingBlockStart:"10px",paddingInlineEnd:"10px"},children:[o&&jsxRuntimeExports.jsx(Typography,{variant:"h6",children:o}),jsxRuntimeExports.jsx(Typography,{sx:{width:"350px",fontSize:"14px"},variant:"body1",children:i}),jsxRuntimeExports.jsx(IconButton,{sx:{position:"absolute",top:o?0:"5px",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$4({},e),{direction:"up"}))}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 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$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}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}}}}var LoginPage=reactExports.memo(function(e){function F(e){return o.apply(this,arguments)}function t(){"org-registration"===E&&f?window.location.href=f:l(1)}var r,n,o,p=e.allowVanityDomain,h=e.onLoginSuccess,e=_sliced_to_array$f(reactExports.useState(1),2),a=e[0],l=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),f=e[0],U=e[1],e=_sliced_to_array$f(reactExports.useState([]),2),i=e[0],B=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),y=e[0],s=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),m=e[0],L=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),u=e[0],g=e[1],e=_sliced_to_array$f(reactExports.useState(!1),2),N=e[0],x=e[1],e=_sliced_to_array$f(reactExports.useState(!1),2),c=e[0],d=e[1],e=_sliced_to_array$f(reactExports.useState(!1),2),b=e[0],_=e[1],e=_sliced_to_array$f(reactExports.useState([]),2),v=e[0],D=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),E=e[0],H=e[1],e=_sliced_to_array$f(reactExports.useState({aiwareInstanceName:"aiWARE US",coreAdminApiUrl:getRestApiUrlFromConfig(),coreGraphqlApiUrl:getConfig().baseUrl}),2),j=e[0],w=e[1],e=_sliced_to_array$f(reactExports.useState(null),2),S=e[0],R=e[1],e=getConfig(),C=e.disableEnvironmentDiscovery,A=e.hubUrl,T=!C,$=useNavigate(),e=useLoginConfig(),C=e.slug,G=e.slugUri,k=e.loginConfigs,e=e.isLoadingLoginConfigs,O=(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"),a=e.searchParams.get("error");(t=r?r:t)&&isAllowedRedirectUrl(t)&&U(t+e.hash),n&&(s(n),d(!0)),o&&H(o),a&&DesktopSnackbarMessage[a]&&R(DesktopSnackbarMessage[a])},[]),reactExports.useCallback((r=_async_to_generator$8(function(t){var r,n;return _ts_generator$8(this,function(e){switch(e.label){case 0:return _(!1),r=null==k||null==(r=k.organizationInfo)?void 0:r.guid,[4,getOrgOpenIdProviders(y,t,r)];case 1:return n=e.sent(),n.find(function(e){return e.required})&&_(!0),B(n),[2]}})}),function(e){return r.apply(this,arguments)}),[y,k])),I=reactExports.useCallback(_async_to_generator$8(function(){var t,r,n,o,a,i,s;return _ts_generator$8(this,function(e){switch(e.label){case 0:return t=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];d(!1),l(2),e&&R(DesktopSnackbarMessage[EDesktopSnackbarMessageType.EnvError])},T&&A?[3,2]:[4,O(j.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,O(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),w(o),D(n),[4,O(o.coreAdminApiUrl)];case 6:return e.sent(),t(),[3,9];case 7:return s=e.sent(),console.error(s),[4,O(getRestApiUrlFromConfig())];case 8:return e.sent(),t(!0),[3,9];case 9:return[2]}})}),[y,A,T,j.coreAdminApiUrl,O]),P=(reactExports.useEffect(function(){c&&y&&I().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},[c,y,I]),n=_async_to_generator$8(function(){var t,r,n,o,a,i,s,l,u,c,d;return _ts_generator$8(this,function(e){switch(e.label){case 0:return m?(x(!0),[4,userLoginMutation(y,m,null!=p&&p,j.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,getSignUpConfigById(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 $({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",j.coreGraphqlApiUrl,365),f){if("org-registration"===E)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=j.coreAdminApiUrl?j.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$8(function(t){var r,n;return _ts_generator$8(this,function(e){switch(e.label){case 0:return(r=t.target.value,n=v.find(function(e){return e.coreGraphqlApiUrl===r}))?(w(n),[4,O(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:k,children:[jsxRuntimeExports.jsx(DesktopSnackbar,{open:!!S,message:S,onClose:function(){return R(null)}}),M.signupUrl&&!C&&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){s(e),g("")},onNextStep:function(){d(!0)},isLoading:c,buttonText:"Continue",buttonColor:null==k?void 0:k.buttonColor,buttonTextColor:null==k?void 0:k.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.jsx("div",{style:{display:2===a?"block":"none"},children:jsxRuntimeExports.jsxs(Box,{sx:{maxWidth:"368px",width:"100%",marginInlineStart:"auto",marginInlineEnd:"auto"},children:["org-registration"===E&&jsxRuntimeExports.jsx(Stack,{mt:8,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:b?"Choose Authentication Option for":"Enter Password for",subText:y})," ",T&&0<v.length&&jsxRuntimeExports.jsx(Select,{value:j.coreGraphqlApiUrl,onChange:F,disabled:v.length<2,"data-testid":"os-auth-env-dropdown-select",sx:{width:"100%",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:v.length<2?"#9CA8B4":"#555F7C",marginRight:"8px"}}),jsxRuntimeExports.jsx("span",{children:(t=e,null==(e=v.find(function(e){return e.coreGraphqlApiUrl===t}))?void 0:e.aiwareInstanceName)})]});var t},children:v.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{"data-testid":"os-auth-env-dropdown-item",value:e.coreGraphqlApiUrl,children:e.aiwareInstanceName},e.aiwareInstanceName)})}),b?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[i&&0<i.length&&jsxRuntimeExports.jsx(OpenID,{openIdItems:i,redirectUrl: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:u,onPasswordChange:function(e){u&&g(""),L(e)},onPressEnter:function(){P().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})}}),jsxRuntimeExports.jsx(Box,{sx:{mt:"14px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){$("/ui/auth/forgot".concat(G),{state:{emailFromLogin:y}})},text:"Forgot Password?",type:"forgot"})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"25px"},children:jsxRuntimeExports.jsx(BlackButton,{onClick:function(){P().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},text:"Login",type:"login",loading:N,buttonColor:null==k?void 0:k.buttonColor,buttonTextColor:null==k?void 0:k.buttonTextColor})}),i&&0<i.length&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OrDivider,{})," ",jsxRuntimeExports.jsx(OpenID,{openIdItems:i,redirectUrl:f})]}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:t,text:"Back to Login",type:"login"})})]})]})})]})});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 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$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}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 Forgot=function(){var e,t=_sliced_to_array$e(reactExports.useState(""),2),r=t[0],n=t[1],t=_sliced_to_array$e(reactExports.useState(!1),2),o=t[0],a=t[1],t=_sliced_to_array$e(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$7(function(){var t;return _ts_generator$7(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$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$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$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$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 AccountLinking=function(){var e,t=_sliced_to_array$d(reactExports.useState(1),2),r=t[0],n=t[1],t=_sliced_to_array$d(reactExports.useState(""),2),o=t[0],t=t[1],a=_sliced_to_array$d(reactExports.useState(""),2),i=a[0],a=a[1],s=useNavigate(),l=_sliced_to_array$d(reactExports.useState(!1),2),u=l[0],c=l[1],l=_sliced_to_array$d(reactExports.useState(""),2),d=l[0],p=l[1],l=_sliced_to_array$d(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$6(function(){var t,r;return _ts_generator$6(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$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 _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 _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 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$c(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$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 _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$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$3({},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$3({},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$1,{fontSize:"small",sx:{marginRight:"5px"}})," Back"]}),jsxRuntimeExports.jsx("div",{children:1===e?jsxRuntimeExports.jsx(SignUpStep1,{}):jsxRuntimeExports.jsx(SignUpStep2,{})})]})})};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 _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}var SetPassword=function(){var n=_sliced_to_array$b(useSearchParams(),1)[0],e=_sliced_to_array$b(reactExports.useState(""),2),t=e[0],o=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),r=e[0],a=e[1],e=_sliced_to_array$b(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$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 _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}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$a(reactExports.useState(""),2),t=e[0],o=e[1],e=_sliced_to_array$a(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$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 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$9(reactExports.useState(""),2),r=e[0],s=e[1],e=_sliced_to_array$9(reactExports.useState(!1),2),t=e[0],l=e[1],e=_sliced_to_array$9(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$5(function(){var t,r;return _ts_generator$5(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$e,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$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 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$8(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$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 _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 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})};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$4(function(){var t;return _ts_generator$4(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$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 STACK_STYLES$4={maxWidth:517},BUTTON_CONTAINER_STYLES$4={width:368,mx:"auto"},messages={submitted:"Thank you for registering. Your request must be approved before you can join. If approved you will receive an invitation shortly.",approved:"Click the link below to login and start exploring all of the amazing content we have to offer!",invited:"Thank you for registering. A confirmation email has been sent with an activation link for your new account."},Success=function(){var r=useNavigate(),n=_sliced_to_array$7(useSearchParams(),1)[0],e=n.get("status"),e=["submitted","approved","invited"].includes(null!=e?e:"")?e:"submitted",t=useSignUpConfig(),o=t.config,a=t.slugUri;return jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$4,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:messages[e]})},ButtonContainer$1=function(e){var t=e.buttonColor;return jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$4,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Return to Homepage",onClick:e.onClick,buttonColor:t,buttonTextColor:e.buttonTextColor})})};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 STACK_STYLES$3={maxWidth:517},BUTTON_CONTAINER_STYLES$3={width:368,mx:"auto"},EmailVerification=function(){var e=_sliced_to_array$6(useSearchParams(),1)[0],t=useNavigate(),r=null!=(e=e.get("token"))?e:"",e=_sliced_to_array$6(reactExports.useState("loading"),2),n=e[0],o=e[1],e=_sliced_to_array$6(reactExports.useState(0),2),a=e[0],i=e[1];reactExports.useEffect(function(){r?postSelfServiceEmailVerification(r).then(function(e){e.ok?o("success"):(i(e.status),o("error"))}):o("error")},[r]);return jsxRuntimeExports.jsx(PageContainer,{loginConfigs:{hideVeritoneBranding:!0},children:jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$3,"data-testid":"os-auth-self-service-email-verification",children:["loading"===n&&jsxRuntimeExports.jsx(LoadingView$2,{}),"success"===n&&jsxRuntimeExports.jsx(SuccessView$2,{}),"error"===n&&jsxRuntimeExports.jsx(ErrorView$2,{status:a,hasToken:Boolean(r)}),"loading"!==n&&jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$3,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"success"===n?"Continue to Login":"Return to Homepage",onClick:function(){return t("/ui/auth/login")}})})]})})},LoadingView$2=function(){return jsxRuntimeExports.jsxs(Stack,{alignItems:"center",gap:2,children:[jsxRuntimeExports.jsx(CircularProgress,{size:40}),jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",children:"Verifying your email address…"})]})},SuccessView$2=function(){return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center","data-testid":"os-auth-email-verification-success",children:"Your email has been verified. Your account is ready — please log in to continue."})},ErrorView$2=function(e){var t=e.status;return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",color:"error","data-testid":"os-auth-email-verification-error",children:e.hasToken&&401!==t?"Something went wrong while verifying your email. Please try again or contact your administrator.":"This verification link is invalid or has expired. Please contact your administrator for a new invitation."})};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 _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}var STACK_STYLES$2={maxWidth:517},BUTTON_CONTAINER_STYLES$2={width:368,mx:"auto"},SUCCESS_MESSAGES={approve:"The registration request has been approved. The applicant will receive an email to complete their account setup.",deny:"The registration request has been denied."},AdminReview=function(){var e=_sliced_to_array$5(useSearchParams(),1)[0],t=useNavigate(),r=null!=(o=e.get("token"))?o:"",e=null!=(o=e.get("action"))?o:"",n="approve"===e||"deny"===e?e:null,o=_sliced_to_array$5(reactExports.useState("loading"),2),e=o[0],a=o[1],o=_sliced_to_array$5(reactExports.useState(0),2),i=o[0],s=o[1];reactExports.useEffect(function(){r&&n?postSelfServiceRegistrationReview(r,n).then(function(e){e.ok?a("success"):(s(e.status),a("error"))}):a("error")},[r,n]);return jsxRuntimeExports.jsx(PageContainer,{loginConfigs:{hideVeritoneBranding:!0},children:jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$2,"data-testid":"os-auth-self-service-admin-review",children:["loading"===e&&jsxRuntimeExports.jsx(LoadingView$1,{action:n}),"success"===e&&n&&jsxRuntimeExports.jsx(SuccessView$1,{action:n}),"error"===e&&jsxRuntimeExports.jsx(ErrorView$1,{status:i,hasValidParams:Boolean(r&&n)}),"loading"!==e&&jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$2,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Return to Homepage",onClick:function(){return t("/ui/auth/login")}})})]})})},LoadingView$1=function(e){e=e.action;return jsxRuntimeExports.jsxs(Stack,{alignItems:"center",gap:2,children:[jsxRuntimeExports.jsx(CircularProgress,{size:40}),jsxRuntimeExports.jsxs(Typography,{variant:"body1",textAlign:"center",children:["approve"===e?"Approving":"deny"===e?"Denying":"Processing"," the registration request…"]})]})},SuccessView$1=function(e){e=e.action;return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center","data-testid":"os-auth-admin-review-success",children:SUCCESS_MESSAGES[e]})},ErrorView$1=function(e){var t=e.status,e=e.hasValidParams?401===t?"This link has expired or is invalid. Please use a current link from your invitation email.":400===t?"This request has already been reviewed or is no longer pending. No further action is needed.":"Something went wrong while processing this request. Please try again or contact support.":"This link is missing required parameters and cannot be processed.";return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",color:"error","data-testid":"os-auth-admin-review-error",children:e})};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 STACK_STYLES$1={maxWidth:517},BUTTON_CONTAINER_STYLES$1={width:368,mx:"auto"},TrialVerify=function(){var e=_sliced_to_array$4(useSearchParams(),1)[0],t=useNavigate(),r=null!=(e=e.get("token"))?e:"",e=_sliced_to_array$4(reactExports.useState("loading"),2),n=e[0],o=e[1];return reactExports.useEffect(function(){r?postTrialVerify(r).then(function(e){o(e.ok?"success":"error")}):o("missing-token")},[r]),jsxRuntimeExports.jsx(PageContainer,{loginConfigs:{hideVeritoneBranding:!0},children:jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$1,"data-testid":"os-auth-trial-verify",children:["loading"===n&&jsxRuntimeExports.jsx(LoadingView,{}),"success"===n&&jsxRuntimeExports.jsx(SuccessView,{}),("error"===n||"missing-token"===n)&&jsxRuntimeExports.jsx(ErrorView,{missingToken:"missing-token"===n}),"loading"!==n&&jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$1,children:"error"===n?jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Try Again",onClick:function(){return window.location.reload()}}):jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Go to Login",onClick:function(){return t("/ui/auth/login")}})})]})})},LoadingView=function(){return jsxRuntimeExports.jsxs(Stack,{alignItems:"center",gap:2,children:[jsxRuntimeExports.jsx(CircularProgress,{size:40}),jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",children:"Verifying your account…"})]})},SuccessView=function(){return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center","data-testid":"os-auth-trial-verify-success",children:"Your account has been verified. You can now log in to continue."})},ErrorView=function(e){e=e.missingToken;return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",color:"error","data-testid":"os-auth-trial-verify-error",children:e?"This verification link is invalid or has expired. Please request a new one.":"Something went wrong while verifying your account. Please try again."})};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 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$3(function(){var t,r,n;return _ts_generator$3(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$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 FileType$1,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$3(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$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 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 _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 _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 _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 _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}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}}}}(e=>{e.PDF="pdf",e.TEXT="text",e.UNKNOWN="unknown"})(FileType$1=FileType$1||{});var FileType,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:"100%",height:"424px"},iframeStyles:{border:"1px solid #E0E0E0",borderRadius:"6px"}},fetchContent=(()=>{var r=_async_to_generator$2(function(t,r){var n,o,a,i;return _ts_generator$2(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 ".concat("pdf"!==t?"\n #scroll-container { height: 100vh; overflow-y: auto; padding: 10px; }\n .content { white-space: pre-wrap; line-height: 1.6; }\n ":"\n .pdf-container { height: 100vh; padding: 0; }\n ","\n </style>\n </head>\n <body>\n ").concat("pdf"===t?'<div class="pdf-container">\n <embed src="'.concat(e,'#navpanes=0" width="100%" height="100%" style="max-width: 100%;" />\n </div>\n'):'<div id="scroll-container">\n <div class="content">'.concat(e,"</div>\n </div>\n"),"\n </body>\n </html>\n")},TermsOfService=function(){var e,s=useNavigate(),l=_sliced_to_array$2(useSearchParams(),1)[0],t=useSignUpConfig(),r=t.config,u=t.tosFile,n=t.privacyPolicyUrl,c=t.registerUri,o=reactExports.useRef(null),t=_sliced_to_array$2(reactExports.useState({content:"",fileType:"unknown"}),2),a=t[0],i=t[1],t=_sliced_to_array$2(reactExports.useState(!1),2),d=t[0],p=t[1],h=(e=_async_to_generator$2(function(){var t,r,n,o,a,i;return _ts_generator$2(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$2(function(){var t;return _ts_generator$2(this,function(e){switch(e.label){case 0:if(null==u||!u.url)return[2];p(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,fetchContent(u.url,a.fileType)];case 2:return t=e.sent(),i(t),[3,5];case 3:return t=e.sent(),console.error("Error loading content:",t),[3,5];case 4:return p(!1),[7];case 5:return[2]}})});var e,t=function(){return e.apply(this,arguments)};"unknown"===a.fileType&&t()},[u,a]),reactExports.useEffect(function(){o.current&&(o.current.srcdoc=createIframeHTML(a.content,a.fileType))},[a]),reactExports.useEffect(function(){var e=l.has("email"),t=l.has("token");e||t?e&&t&&!u&&h():s(c)},[l,u]),jsxRuntimeExports.jsxs(Stack,{gap:3,sx:{width:"750px",position:"relative",left:"50%",transform:"translateX(-50%)"},children:[d?jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center"},children:jsxRuntimeExports.jsx(CircularProgress,{})}):u&&jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsx("iframe",_object_spread$2({ref:o,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:h,buttonColor:null==r||null==(t=r.uiSettings)||null==(d=t.registrationButtonStyle)?void 0:d.backgroundColor,buttonTextColor:null==r||null==(n=r.uiSettings)||null==(t=n.registrationButtonStyle)?void 0:t.textColor,testId:"os-auth-register-accept-continue-button"})})]})};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 _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 _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 detectFileType=(()=>{var t=_async_to_generator$1(function(t){var r,n;return _ts_generator$1(this,function(e){switch(e.label){case 0:if((r=t.toLowerCase()).endsWith(".pdf")||r.includes(".pdf?"))return[2,"pdf"];if(r.endsWith(".txt")||r.endsWith(".text")||r.endsWith(".html"))return[2,"text"];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,fetch(t,{method:"HEAD"})];case 2:return r=e.sent(),(n=r.headers.get("content-type")||"").includes("pdf")?[2,"pdf"]:n.includes("text")||n.includes("html")?[2,"text"]:[3,4];case 3:return n=e.sent(),console.error("Error detecting file type:",n),[2,"pdf"];case 4:return[2,"pdf"]}})});return function(e){return t.apply(this,arguments)}})(),fetchTextContent=(()=>{var t=_async_to_generator$1(function(t){var r;return _ts_generator$1(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),[4,fetch(t)];case 1:if((r=e.sent()).ok)return[4,r.text()];throw new Error("HTTP error! status: ".concat(r.status));case 2:return[2,e.sent()];case 3:throw r=e.sent(),console.error("Error fetching text content:",r),r;case 4:return[2]}})});return function(e){return t.apply(this,arguments)}})(),TermsAndConditionsInline=function(){var r=useSignUpConfig().tosFile,e=_sliced_to_array$1(reactExports.useState({content:"",fileType:"unknown"}),2),a=e[0],n=e[1],e=_sliced_to_array$1(reactExports.useState(!1),2),t=e[0],o=e[1],e=_sliced_to_array$1(reactExports.useState(null),2),i=e[0],s=e[1];return reactExports.useEffect(function(){var e;e=_async_to_generator$1(function(){var t;return _ts_generator$1(this,function(e){switch(e.label){case 0:if(null==r||!r.url||i===r.url)return[2];o(!0),e.label=1;case 1:return e.trys.push([1,6,7,8]),[4,detectFileType(r.url)];case 2:return"pdf"!==e.sent()?[3,3]:(n({content:r.url,fileType:"pdf"}),[3,5]);case 3:return[4,fetchTextContent(r.url)];case 4:t=e.sent(),n({content:t,fileType:"text"}),e.label=5;case 5:return s(r.url),[3,8];case 6:return t=e.sent(),console.error("Error loading terms content:",t),n({content:r.url,fileType:"pdf"}),s(r.url),[3,8];case 7:return o(!1),[7];case 8:return[2]}})}),function(){e.apply(this,arguments)}()},[null==r?void 0:r.url,i]),r?jsxRuntimeExports.jsxs(Box,{sx:{width:"100%",mb:3},children:[jsxRuntimeExports.jsxs(Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{mb:1},children:[jsxRuntimeExports.jsx(Typography,{sx:{color:"#212121",fontSize:"12px",fontFamily:"Nunito"},children:"Terms & Conditions"}),jsxRuntimeExports.jsxs(Stack,{direction:"row",spacing:1,children:[jsxRuntimeExports.jsx(IconButton,{size:"small",onClick:function(){null!=r&&r.url&&window.open(r.url,"_blank")},disabled:t,"aria-label":"Download Terms & Conditions",sx:{color:"#555F7C"},"data-testid":"os-auth-register-terms-and-conditions-download-button",children:jsxRuntimeExports.jsx(default_1$6,{})}),jsxRuntimeExports.jsx(IconButton,{size:"small",onClick:function(){var e,t,r,n,o;"pdf"===a.fileType&&a.content?(e=window.open(a.content,"_blank"))&&(e.onload=function(){e.print()}):a.content&&(t=window.open("","_blank"))&&((r=t.document).title="Terms & Conditions",(n=r.createElement("style")).textContent="body { font-family: Arial, sans-serif; padding: 20px; line-height: 1.6; } pre { white-space: pre-wrap; }",r.head&&r.head.appendChild(n),(n=r.createElement("h1")).textContent="Terms & Conditions",(o=r.createElement("pre")).textContent=a.content,r.body&&(r.body.appendChild(n),r.body.appendChild(o)),t.focus(),t.print())},disabled:t||!a.content,"aria-label":"Print Terms & Conditions",sx:{color:"#555F7C"},"data-testid":"os-auth-register-terms-and-conditions-print-button",children:jsxRuntimeExports.jsx(default_1,{})})]})]}),jsxRuntimeExports.jsx(Box,{sx:{width:"100%",height:"200px",border:"1px solid #E0E0E0",borderRadius:"6px",overflowY:"pdf"===a.fileType?"hidden":"auto",overflowX:"hidden",padding:"pdf"===a.fileType?0:2,backgroundColor:"#FAFAFA"},children:t?jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:jsxRuntimeExports.jsx(CircularProgress,{size:24})}):"pdf"===a.fileType?jsxRuntimeExports.jsx(Box,{component:"iframe",src:a.content,sx:{width:"100%",height:"100%",border:"none",borderRadius:"6px"},title:"Terms & Conditions PDF"}):a.content?jsxRuntimeExports.jsx(Typography,{variant:"body2",component:"pre",sx:{whiteSpace:"pre-wrap",wordWrap:"break-word",fontFamily:"inherit",margin:0,lineHeight:1.6},children:a.content}):jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"#212121",children:"Unable to load terms content."})})]}):null};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 _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(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 _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(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 REGISTRATION_JOIN_FORM_ID="registration-join-form";function JoinWithRecaptchaProvider(){var e=n$1().reset;return jsxRuntimeExports.jsx(JoinForm,{onRecaptchaReset:function(){return null==e?void 0:e()}})}var Join=function(){var e=getRecaptchaSiteKey();return e?jsxRuntimeExports.jsx(p,{type:"v2-checkbox",siteKey:e,children:jsxRuntimeExports.jsx(JoinWithRecaptchaProvider,{})}):(devErrorLogger(new Error("Registration recaptcha site key is not configured")),jsxRuntimeExports.jsx(Box,{sx:{width:FORM_WIDTH},children:jsxRuntimeExports.jsx(Alert,{severity:"error",children:"Registration is unavailable due to a configuration issue. Please contact support."})}))},JoinRecaptcha=reactExports.memo(function(e){var t=e.onChange;return jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center"},children:jsxRuntimeExports.jsx(o,{onChange:t,onExpired:e.onExpired,onError:e.onError,"data-testid":"registration-join-recaptcha-checkbox"})})});function JoinForm(e){var t=e.onRecaptchaReset,e=useSignUpConfig(),r=e.config,e=e.tosFile,n=Boolean(null==e?void 0:e.url),o=useSignUpMutation(),e=_sliced_to_array(reactExports.useState(null),2),a=e[0],i=e[1],s=reactExports.useCallback(function(e){i(null!=e&&e.trim()?e:null)},[]),l=reactExports.useCallback(function(){return i(null)},[]),u=reactExports.useCallback(function(){return i(null)},[]),e=reactExports.useCallback(function(){i(null),null!=t&&t()},[t]),e=useOnSubmit({recaptchaToken:a,onRegistrationFailure:e}),c=e.onSubmit,d=e.errorMessage,p=e.setErrorMessage,e=useTheme(),e=useMediaQuery(e.breakpoints.down("md")),h=useMediaQuery("(max-height: 800px)");return jsxRuntimeExports.jsxs(Box,{sx:_object_spread$1({width:FORM_WIDTH},(e||h)&&{height:"588px",overflowY:"auto",overflowX:"hidden",paddingTop:1}),children:[jsxRuntimeExports.jsx(FormGenerator,{htmlFormId:REGISTRATION_JOIN_FORM_ID,schema:null==r||null==(e=r.uiSettings)?void 0:e.customRegistrationFields,additionalFields:[{fieldKey:"firstName",title:"First Name",type:"text",required:!0},{fieldKey:"lastName",title:"Last Name",type:"text",required:!0},{fieldKey:"company",title:"Company",type:"text",required:!0},{fieldKey:"email",title:"Email",type:"text",required:!0},{fieldKey:"password",title:"Password",type:"password",required:!0},{fieldKey:"confirmPassword",title:"Confirm Password",type:"password",required:!0}],passwordPolicy:null==r||null==(h=r.uiSettings)?void 0:h.passwordPolicy,renderFormActions:function(e){var t=e.isSubmitting;return jsxRuntimeExports.jsxs(Stack,{gap:2,children:[jsxRuntimeExports.jsx(TermsAndConditionsInline,{}),jsxRuntimeExports.jsx(JoinRecaptcha,{onChange:s,onExpired:l,onError:u}),jsxRuntimeExports.jsx(CompleteRegistrationButton,{hasTos:n,loading:o.isPending,isSubmitting:t,disabled:!e.isValid||!a,buttonColor:null==r||null==(t=r.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.backgroundColor,buttonTextColor:null==r||null==(t=r.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.textColor,htmlForm:e.htmlFormId})]})},onSubmit:c,sx:{width:"100%"}}),d&&jsxRuntimeExports.jsx(DesktopSnackbar,{open:!!d,message:d,onClose:function(){return p(null)}})]})}var useOnSubmit=function(e){var t,y=e.recaptchaToken,m=e.onRegistrationFailure,g=useNavigate(),x=_sliced_to_array(useSearchParams(),1)[0],e=useSignUpConfig(),b=e.config,_=e.registerUri,v=useSignUpMutation(),e=_sliced_to_array(reactExports.useState(null),2),r=e[0],E=e[1];return{onSubmit:reactExports.useCallback((t=_async_to_generator(function(o){var t,r,n,a,i,s,l,u,c,d,p,h,f;return _ts_generator(this,function(e){switch(e.label){case 0:return(e.trys.push([0,2,,3]),h=b.id,p=b.slug,t=null!=(t=null==b?void 0:b.adminApprovalRequired)&&t,f=x.get("email"),f=(null==o?void 0:o.email)||(f?decodeURIComponent(f):""),0<(a=null!=(a=null==b?void 0:b.allowedDomains)?a:[]).length&&f&&(r=null==(n=f.split("@")[1])?void 0:n.toLowerCase(),!a.some(function(e){return e.toLowerCase()===r})))?(E({title:"Email Domain Not Allowed",description:"Please use an email address from one of the allowed domains: ".concat(a.join(", "))}),[2]):(a=null!=(n=null==o?void 0:o.firstName)?n:"",i=null!=(i=null==o?void 0:o.lastName)?i:"",s=null!=(s=null==o?void 0:o.password)?s:"",l=new Set(["firstName","lastName","email","password","confirmPassword"]),c=null!=(u=null==b||null==(u=b.uiSettings)||null==(u=u.customRegistrationFields)?void 0:u.properties)?u:{},d=Object.keys(o).reduce(function(e,t){var r,n;return l.has(t)||(n=o[t],"number"===(null==(r=c[t])?void 0:r.type)&&isFinite(Number(n))?e[t]=Number(n):e[t]=n),e},{}),y?[4,v.mutateAsync({slug:p,orgRegistrationId:h,email:f,customFields:d,firstName:a,lastName:i,password:s,captchaResponse:y})]:(console.error("captcha response required at this point"),[2]));case 1:if(201===(null==(p=e.sent())?void 0:p.status))h=t?"submitted":"approved",g({pathname:"".concat(_,"/success"),search:"?status=".concat(h)});else{switch(p.status){case 401:E(DesktopSnackbarMessage[EDesktopSnackbarMessageType.CaptchaError]);break;case 400:E(DesktopSnackbarMessage[EDesktopSnackbarMessageType.RegistrationError]);break;case 409:E(DesktopSnackbarMessage[EDesktopSnackbarMessageType.InviteExists]);break;default:E(DesktopSnackbarMessage[EDesktopSnackbarMessageType.EnvError])}null!=m&&m()}return[3,3];case 2:return f=e.sent(),devErrorLogger(f),E(DesktopSnackbarMessage[EDesktopSnackbarMessageType.EnvError]),null!=m&&m(),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)}),[b,g,m,y,_,x,v]),errorMessage:r,setErrorMessage:E}};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,t=useSignUpConfig(),r=t.config,t=t.isLoading,n=useForm({defaultValues:{email:"",acceptedTos:!1}});return t?jsxRuntimeExports.jsx(LoginSkeleton,{}):jsxRuntimeExports.jsx(FormProvider,_object_spread_props(_object_spread({},n),{children:jsxRuntimeExports.jsxs(PageContainer,{loginConfigs:{name:null!=(t=null==r?void 0:r.name)?t:"",logo:null==r||null==(n=r.uiSettings)?void 0:n.logo,buttonColor:null==r||null==(t=r.uiSettings)||null==(n=t.registrationButtonStyle)?void 0:n.backgroundColor,buttonTextColor:null==r||null==(t=r.uiSettings)||null==(n=t.registrationButtonStyle)?void 0:n.textColor,hideVeritoneBranding:null==r||null==(t=r.uiSettings)?void 0:t.veritoneBranding},children:[jsxRuntimeExports.jsx(Header,{text:(e=null==r||null==(e=r.name)?void 0:e.trim())?"Welcome to ".concat(e," Registration"):"Welcome to Registration",type:"register",subText:"Please enter the information you would like associated with your account and accept our Terms & Conditions. This is the first step on your way to exploring all of the amazing content we have to offer!",sx:{textAlign:"left",fontWeight:"700",fontSize:"16px"},subTextSx:{textAlign:"left",fontSize:"12px"}}),jsxRuntimeExports.jsx(Outlet,{})]})}))},RegisterRedirect=function(){var e=useParams().slug,t=useLocation(),r=t.pathname.split("/"),n=r.findIndex(function(e){return"register"===e}),r=r.slice(n+(e?2:1)).join("/"),n="../signup",e=(e&&(n+="/".concat(e)),r&&(n+="/".concat(r)),t.search);return jsxRuntimeExports.jsx(Navigate,{to:n+e,replace:!0})},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(Navigate,{to:"../signup",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/register",element:jsxRuntimeExports.jsx(Navigate,{to:"../signup",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/register/:slug/*",element:jsxRuntimeExports.jsx(RegisterRedirect,{})}),jsxRuntimeExports.jsx(Route,{path:"/signup",element:jsxRuntimeExports.jsx(SignUp,{})}),jsxRuntimeExports.jsx(Route,{path:"/signup/verify",element:jsxRuntimeExports.jsx(EmailVerification,{})}),jsxRuntimeExports.jsx(Route,{path:"/signup/review",element:jsxRuntimeExports.jsx(AdminReview,{})}),jsxRuntimeExports.jsx(Route,{path:"/signup/trial/verify",element:jsxRuntimeExports.jsx(TrialVerify,{})}),jsxRuntimeExports.jsxs(Route,{path:"/signup/:slug/*",element:jsxRuntimeExports.jsx(RegistrationLayout,{}),children:[jsxRuntimeExports.jsx(Route,{path:"join",element:jsxRuntimeExports.jsx(Join,{})}),jsxRuntimeExports.jsx(Route,{path:"success",element:jsxRuntimeExports.jsx(Success,{})}),jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(Email,{})}),jsxRuntimeExports.jsx(Route,{path:"confirm",element:jsxRuntimeExports.jsx(Confirm,{})}),jsxRuntimeExports.jsx(Route,{path:"terms-of-service",element:jsxRuntimeExports.jsx(TermsOfService,{})})]}),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,a2 as createSlice,u as useSelector,dM as authStatusSelector,dN as authContextSelector,dO as authErrorMessage,dP as AuthContext,aj as lodashExports,B as Box,dQ as img$e,dI as StyledEngineProvider,C as CircularProgress,dR as resetPasswordRequest,aQ as React,dS as setUser,Y as all,G as takeEvery$1,b8 as appIdSelector,b1 as store,L as put,aA as showMessage,aC as MessageSeverity,a4 as call,I as select}from"./js-core.esm4.js";import{b3 as requireCreateSvgIcon,b4 as interopRequireDefaultExports,m as makeStyles,A as AIWareIntlProvider,T as Typography,X as Select,cr as Location,e as MenuItem,D as DynamicModuleLoader,B as Button,bg as Fade,c as classNames,u as useTheme,M as MemoizedFormattedMessage,j as FormControl,O as OutlinedInput,a9 as Popover,g as Divider,bh as Slide,cs as CheckmarkFilled,ct as Bullet}from"./js-core.esm7.js";import{d as default_1$4}from"./js-core.esm62.js";import{d as default_1$3}from"./js-core.esm61.js";import{x as devErrorLogger,S as Stack,aV as useFormContext,aW as Controller,bx as FormGenerator,a6 as useForm,a7 as FormProvider,ad as LoadingButton,H as InputLabel,e as InputAdornment,I as IconButton,T as TextField,k as Skeleton,a as Snackbar,b3 as Close$1}from"./js-core.esm9.js";import{w as Routes,x as Route,N as Navigate,y as useNavigate,z as useLocation,C as useSearchParams,v as LinearProgress,g as getAppbarPanelModule,O as Outlet,D as useParams,B as Box$1,a as applicationSelector,G as logoutUser$1}from"./js-core.esm8.js";import{d as default_1$5}from"./js-core.esm69.js";import{d as default_1$6}from"./js-core.esm120.js";import{A as Alert}from"./js-core.esm13.js";import{u as useMediaQuery}from"./js-core.esm23.js";import{C as Container}from"./js-core.esm28.js";import{A as Autocomplete}from"./js-core.esm27.js";import{u as useDispatch}from"./js-core.esm12.js";import"./js-core.esm14.js";var Visibility={},_interopRequireDefault$2=interopRequireDefaultExports,default_1$2=(Object.defineProperty(Visibility,"__esModule",{value:!0}),Visibility.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(requireCreateSvgIcon()),_jsxRuntime$2=jsxRuntimeExports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.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$2=Visibility.default=_default$2,ArrowBack={},_interopRequireDefault$1=interopRequireDefaultExports,default_1$1=(Object.defineProperty(ArrowBack,"__esModule",{value:!0}),ArrowBack.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=jsxRuntimeExports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),default_1$1=ArrowBack.default=_default$1,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 PrintOutlined={},_interopRequireDefault=interopRequireDefaultExports,default_1=(Object.defineProperty(PrintOutlined,"__esModule",{value:!0}),PrintOutlined.default=void 0),_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)([(0,_jsxRuntime.jsx)("path",{d:"M19 8h-1V3H6v5H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zM8 5h8v3H8V5zm8 12v2H8v-4h8v2zm2-2v-2H6v2H4v-4c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v4h-2z"},"0"),(0,_jsxRuntime.jsx)("circle",{cx:"18",cy:"11.5",r:"1"},"1")],"PrintOutlined"),default_1=PrintOutlined.default=_default,t="GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider",n$2=reactExports.createContext({instance:void 0,siteKey:"",language:"",isLoading:!0,executeV3:()=>{throw Error(t)},executeV2Invisible:()=>{throw Error(t)},reset:()=>{throw Error(t)},getResponse:()=>{throw Error(t)},render:()=>{throw Error(t)}}),n$1=()=>reactExports.useContext(n$2);let c=()=>!!document.querySelector('script[src*="/recaptcha/"]:not([src*="gstatic"])'),e$1=()=>".grecaptcha-badge{display: none !important;}",n=({host:e="google.com",isEnterprise:t=!1,render:r,hl:n,badge:o})=>`https://www.${e}/recaptcha/${t?"enterprise.js":"api.js"}?`+new URLSearchParams({...n&&{hl:n},...o&&{badge:o},render:r}),d$1=()=>{var e=document.createElement("style");e.innerHTML=e$1(),document.body.appendChild(e)},m=({onload:e,appendTo:t="head",isEnterprise:r=!1,host:o,render:a,badge:i,hl:s,...l})=>{let u=n({host:o,isEnterprise:r,render:a,hl:s,badge:i}),c=document.createElement("script");Object.entries(l).forEach(([e,t])=>{c.setAttribute(e,t?.toString()??"")}),c.src=u,c.onload=e,document[t].appendChild(c)},o$3=()=>{var e=document.querySelector(".grecaptcha-badge");e&&e.parentNode&&document.body.removeChild(e.parentNode)},o$2=e=>{var t=document.getElementById(e);if(t)for(;t.lastChild;)t.lastChild.remove()},e="https://www.gstatic.com/recaptcha/releases",o$1=()=>{window.___grecaptcha_cfg=void 0;var t=document.querySelector('script[src*="/recaptcha/"]:not([src*="gstatic"])'),t=(t&&t.remove(),document.querySelector(`script[src^="${e}"]`));t&&t.remove()};var a="google-recaptcha-badge-container",o=({id:r=a,theme:e,language:t,badge:n="bottomright",onChange:o,onError:i,onExpired:s})=>{let l=reactExports.useRef(null),u=n$1(),c=e??u.theme,d=t??u.language;return reactExports.useEffect(()=>{var e,t;if(u.render)return e=document.createElement("div"),t={sitekey:u.siteKey,badge:n,size:"invisible",callback:o,"expired-callback":s,"error-callback":i,theme:c,...d&&{hl:d}},u.render(e,t),l.current&&l.current.appendChild(e),()=>{o$2(r)}},[u.render,u.siteKey,n,o,i,s,c,d]),u.render&&u.siteKey?jsxRuntimeExports.jsx("div",{ref:l,id:r}):null},d="onGoogleReCaptchaLoad",f="google-recaptcha-container",p=({type:n,siteKey:o,language:a,scriptProps:i,isEnterprise:s=!1,host:l,theme:u="light",children:e,explicit:p,onLoad:h,onError:y})=>{let[t,g]=reactExports.useState(!0),[r,x]=reactExports.useState(),b=(reactExports.useEffect(()=>{let e=i?.id??`google-recaptcha-${n}-script`,r=c();try{var t=()=>{g(!0);let t=s?window.grecaptcha?.enterprise:window.grecaptcha;if(t){if(p||t.ready(async()=>{x(t),await h?.(t),g(!1)}),p){let e={size:"v3"===n||"v2-invisible"===n?"invisible":"normal",...("v3"===n||"v2-invisible"===n)&&{badge:"bottomright"},sitekey:o,theme:u,..."object"==typeof p&&{...p,"expired-callback":p.expiredCallback,"error-callback":p.errorCallback}};r||("object"!=typeof p||"v3"!==n&&"v2-invisible"!==n||"hidden"!==p?.badge||d$1()),t.ready(async()=>{"object"==typeof p&&p.container&&t.render(p.container,e,!!p.inherit),x(t),h&&await h(t),g(!1)})}}else y?.(),g(!1)};return window[d]=t,r?t():m({isEnterprise:s,host:l,...("v3"===n||"v2-invisible"===n)&&"object"==typeof p&&p?.badge&&{badge:"hidden"===p?.badge?"bottomright":p?.badge},...a&&{hl:a},render:p||"v2-checkbox"===n?"explicit":o,...i,onload:t,id:e}),()=>{c()&&o$1(),"object"!=typeof p||"v3"!==n&&"v2-invisible"!==n||p?.container||!p?.badge?o$3():o$2(f)}}catch{g(!1)}},[s,a,l,o,n]),reactExports.useMemo(()=>({instance:r,siteKey:o,isLoading:t,theme:u,executeV2Invisible:e=>{if(r?.execute)return r.execute(e);throw Error("Google ReCaptcha has not been loaded")},executeV3:e=>{if(r?.execute)return r.execute(o,{action:e});throw Error("Google ReCaptcha has not been loaded")},reset:r?.reset,getResponse:r?.getResponse,render:r?.render,...a&&{language:a}}),[r,o,t,a]));return jsxRuntimeExports.jsx(n$2.Provider,{value:b,children:e})},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"}],recaptcha={publicKey:""},prodConfigs={baseUrl:baseUrl,hubUrl:hubUrl,stripePublishableKey:stripePublishableKey,stripePricingPlanId:stripePricingPlanId,sentryDSN:sentryDSN,disableEnvironmentDiscovery:disableEnvironmentDiscovery,switchAppUrl:switchAppUrl,signupUrl:signupUrl,instanceUrls:instanceUrls,recaptcha:recaptcha};function getConfig(){var e=window.aiwareConfig;return e?JSON.parse(JSON.stringify(e)):prodConfigs}function getRestApiUrlFromConfig(){return getConfig().baseUrl.replace("/v3/graphql","")}function getRecaptchaSiteKey(){var e;return null!=(e=null==(e=getConfig().recaptcha)?void 0:e.publicKey)?e:""}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=/")},ALLOWED_REDIRECT_HOST_PATTERNS=[/\.veritone\.com$/,/\.aiware\.run$/];function isAllowedRedirectUrl(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{var t=new URL(e,window.location.origin);return t.origin===window.location.origin?!0:ALLOWED_REDIRECT_HOST_PATTERNS.some(function(e){return e.test(t.hostname)})}catch(e){return!1}}function _define_property$c(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$9(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$c(t,e,r[e])})}return t}var Header=function(e){var t=e.text,r=e.subText,n=e.type,o=e.sx,e=e.subTextSx,e=void 0===e?{}:e;return jsxRuntimeExports.jsxs(Box,{sx:{marginBottom:"30px",textAlign:"center"},children:[jsxRuntimeExports.jsx(Typography,{sx:_object_spread$9({fontFamily:"Nunito",fontSize:"22px",lineHeight:"28px",letterSpacing:"-1.30385e-09px",color:"#2A323C"},void 0===o?{}:o),"data-testid":"os-auth-header-text-".concat(n),children:t}),r&&jsxRuntimeExports.jsx(Typography,{sx:_object_spread$9({fontFamily:"Nunito",fontSize:"16px",lineHeight:"22px",textAlign:"center",letterSpacing:"-1.30385e-09px",color:"#5C6269",overflow:"hidden",textOverflow:"ellipsis"},e),"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$b(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$8(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$b(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,p=e.testId,p=void 0===p?"":p,e=e.htmlForm,h="".concat(u||DEFAULT_BUTTON_COLOR,"!important"),c="".concat(c||DEFAULT_BUTTON_TEXT_COLOR,"!important"),p=p||"os-auth--".concat(n,"-btn");return jsxRuntimeExports.jsx(LoadingButton,{color:"primary",variant:"contained",onClick:t,loading:o,type:d,form:e,ref:s,sx:_object_spread$8({textTransform:"none",fontSize:"18px",lineHeight:"24px",fontFamily:"Nunito",fontWeight:600,width:"100%",height:"56px",borderRadius:"50px",background:"".concat(h),backgroundColor:"".concat(h),color:c,"&.MuiButton-root:not(:disabled):not(:hover), .MuiButton-root:not(:disabled):not(:hover)":{background:h,backgroundColor:h,color:c},"&.Sdk-MuiButton-root:not(:disabled):not(:hover)":{background:h,backgroundColor:h,color:c},"&:hover":{background:h,backgroundColor:h,color:c,opacity:.9},":disabled":{backgroundColor:"#c3c3c3!important"},border:"1px solid ".concat(u)},i),className:l||void 0,"data-testid":p,disabled:a,children:r})},DEFAULT_REGISTRATION_BUTTON_COLOR="#054FA3",CompleteRegistrationButton=function(e){var t=e.loading,r=e.isSubmitting,n=e.disabled,n=void 0!==n&&n,o=e.buttonColor,a=e.buttonTextColor,i=e.hasTos,i=void 0===i||i,e=e.htmlForm,s="".concat(o||DEFAULT_REGISTRATION_BUTTON_COLOR,"!important"),a="".concat(a||DEFAULT_BUTTON_TEXT_COLOR,"!important");return jsxRuntimeExports.jsx(LoadingButton,{type:"submit",form:e,variant:"contained",loading:t||r,disabled:n,sx:{textTransform:"none",fontSize:"14px",fontFamily:"Nunito",fontWeight:600,width:"100%",height:"36px",marginBlockStart:"10px",marginBlockEnd:"20px",backgroundColor:s,background:s,color:a,"&.MuiButton-root:not(:disabled):not(:hover), .MuiButton-root:not(:disabled):not(:hover)":{background:s,backgroundColor:s,color:a},"&:hover":{background:s,backgroundColor:s,color:a,opacity:.9},":disabled":{backgroundColor:"#c3c3c3 !important",border:"1px solid #c3c3c3 !important"},border:"1px solid ".concat(o||DEFAULT_REGISTRATION_BUTTON_COLOR)},"data-testid":"os-auth-register-complete-registration-button",children:i?"Accept Terms & Conditions and Request to Join Organization":"Request to Join Organization"})};function _array_like_to_array$o(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$o(e){if(Array.isArray(e))return e}function _array_without_holes$1(e){if(Array.isArray(e))return _array_like_to_array$o(e)}function _iterable_to_array$1(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$o(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$o(){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$1(){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$o(e,t){return _array_with_holes$o(e)||_iterable_to_array_limit$o(e,t)||_unsupported_iterable_to_array$o(e,t)||_non_iterable_rest$o()}function _to_consumable_array$1(e){return _array_without_holes$1(e)||_iterable_to_array$1(e)||_unsupported_iterable_to_array$o(e)||_non_iterable_spread$1()}function _unsupported_iterable_to_array$o(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$o(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$o(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$o(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$1(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$n(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$n(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$n(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$n(){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$n(e,t){return _array_with_holes$n(e)||_iterable_to_array_limit$n(e,t)||_unsupported_iterable_to_array$n(e,t)||_non_iterable_rest$n()}function _unsupported_iterable_to_array$n(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$n(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$n(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$n(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$b(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$b(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$b(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$b(n,t,r,o,a,"throw",e)}o(void 0)})}}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}function _ts_generator$e(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 getAppId=function(){return appIdSelector(store.getState())},getHeadersWithAppId=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=getAppId();return _object_spread$7({},e,t?{"X-Veritone-Application":t}:{})},getJsonHeaders=function(){return getHeadersWithAppId(_object_spread$7({"Content-Type":"application/json"},0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}))},getJsonHeadersWithAuth=function(e){return getJsonHeaders({Authorization:"Bearer ".concat(e)})},getJsonCharsetHeaders=function(){return getHeadersWithAppId(_object_spread$7({"Content-Type":"application/json; charset=utf-8"},0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}))},handleGetOpenIdProviders=(()=>{var t=_async_to_generator$b(function(t){var r,n,o;return _ts_generator$e(this,function(e){switch(e.label){case 0:r=[],e.label=1;case 1:return e.trys.push([1,6,,7]),[4,fetch(t,{headers:getHeadersWithAppId()})];case 2:return 200!==(n=e.sent()).status?[3,4]:[4,n.json()];case 3:return o=e.sent(),r=o.results,[3,5];case 4:globalThis.DEBUG&&console.error("was not able to retrieve global open id providers",n),r=[],e.label=5;case 5:return[3,7];case 6:return o=e.sent(),globalThis.DEBUG&&console.error("was not able to retrieve global open id providers",o),r=[],[3,7];case 7:return[2,r]}})});return function(e){return t.apply(this,arguments)}})();function _array_like_to_array$m(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$m(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array$m(e)}function asyncGeneratorStep$a(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$a(s){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=s.apply(e,i);function o(e){asyncGeneratorStep$a(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$a(n,t,r,o,a,"throw",e)}o(void 0)})}}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 _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$m(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$m(){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 _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}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 _sliced_to_array$m(e,t){return _array_with_holes$m(e)||_iterable_to_array_limit$m(e,t)||_unsupported_iterable_to_array$m(e,t)||_non_iterable_rest$m()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array$m(e)||_non_iterable_spread()}function _unsupported_iterable_to_array$m(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$m(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$m(e,t):void 0}function _ts_generator$d(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 n=_async_to_generator$a(function(t,r,n){var o;return _ts_generator$d(this,function(e){switch(e.label){case 0:return o=(r||getRestApiUrlFromConfig())+"/api/admin/openid/org/"+t,n&&(o+="?orgGuid="+encodeURIComponent(n)),[4,handleGetOpenIdProviders(o)];case 1:return[2,e.sent()]}})});return function(e,t,r){return n.apply(this,arguments)}})(),linkUserToOidAndLogin=function(e,t,r){return fetch(getRestApiUrlFromConfig()+"/api/admin/openid/linkUserToOid",{method:"POST",credentials:"include",headers:getJsonCharsetHeaders(),body:JSON.stringify({userName:e,password:t,sessionKey:r})})},getUserInstances=(()=>{var t=_async_to_generator$a(function(t){var r,n;return _ts_generator$d(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:getJsonCharsetHeaders()})];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$a(function(t,r,n,o){var a,i,s;return _ts_generator$d(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:getJsonCharsetHeaders(),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$a(function(t){var r,n,o;return _ts_generator$d(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:getJsonCharsetHeaders(),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$a(function(t){var r,n,o,a,i;return _ts_generator$d(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:getJsonCharsetHeaders(),body:JSON.stringify(_object_spread_props$3(_object_spread$6({},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$a(function(t,r,n){var o,a,i,s;return _ts_generator$d(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:getJsonCharsetHeaders(),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$a(function(t){var r,n,o,a,i,s;return _ts_generator$d(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 guid\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:getJsonHeaders(),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)}})();function buildSchema(e){var r={},n=[];return _to_consumable_array(e).sort(function(e,t){return e.sequence-t.sequence}).forEach(function(e){var t={type:e.type,title:e.label,sequence:e.sequence},t=e.enum?_object_spread_props$3(_object_spread$6({},t),{enum:e.enum}):t;r[e.id]=t,e.required&&n.push(e.id)}),{type:"object",properties:r,required:n}}var getSignUpConfigById=(()=>{var t=_async_to_generator$a(function(t){var r,n,o,a,i,s;return _ts_generator$d(this,function(e){switch(e.label){case 0:r=getConfig().baseUrl,o=n="registrationConfigurationInfo",a="\n query ".concat(n,"($id: ID) {\n ").concat(o," (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 "),i={id:t},e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"POST",headers:getJsonHeaders(),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 t=_async_to_generator$a(function(t){var r,n,o,a,i,s;return _ts_generator$d(this,function(e){switch(e.label){case 0:r=getRestApiUrlFromConfig(),r="".concat(r,"/api/admin/signup/org/config/").concat(encodeURIComponent(t)),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"GET",headers:getJsonHeaders()})];case 2:return(n=e.sent()).ok?[4,n.json()]:[2,null];case 3:return null!=(n=e.sent())&&n.name?(i=Array.isArray(n.customRegistrationFields)?buildSchema(n.customRegistrationFields):{type:"object",properties:{},required:[]},o=null!=(o=n.termsOfService)?o:null,a=null!=(a=n.privacyPolicy)?a:null,s=[],o&&s.push({fileId:o.fileId,name:o.name,url:o.url,type:"termsOfService",status:"active"}),a&&s.push({fileId:a.fileId,name:a.name,url:a.url,type:"privacyPolicy",status:"active"}),[2,{id:n.registrationConfigurationId,name:n.name,slug:n.slug,files:s,uiSettings:{logo:null!=(s=null==(s=n.ui)?void 0:s.logo)?s:"",veritoneBranding:null==(s=null==(s=n.ui)?void 0:s.veritoneBranding)||s,customRegistrationFields:i,registrationButtonStyle:{textColor:null!=(s=null==(s=n.ui)||null==(i=s.registrationButtonStyle)?void 0:i.textColor)?s:"",backgroundColor:null!=(i=null==(i=n.ui)||null==(s=i.registrationButtonStyle)?void 0:s.backgroundColor)?i:""},passwordPolicy:null!=(s=n.passwordPolicy)?s:void 0},organizationGuid:n.organizationGuid,openRegistrationStatus:n.openRegistrationStatus,adminApprovalRequired:null!=(i=n.adminApprovalRequired)&&i,allowedDomains:null!=(s=n.allowedDomains)?s:[],requireAcceptTerms:null!=(i=n.requireAcceptTerms)&&i,termsOfService:o,privacyPolicy:a}]):[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)}})(),getUserSettings=(()=>{var t=_async_to_generator$a(function(t){var r,n,o,a,i;return _ts_generator$d(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:getJsonHeadersWithAuth(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$a(function(t,r,n,o){var a,i,s,l;return _ts_generator$d(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:getJsonHeadersWithAuth(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)}})(),doesEmailExists=(()=>{var t=_async_to_generator$a(function(t){return _ts_generator$d(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$a(function(t){var r,n,o;return _ts_generator$d(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:getJsonHeaders(),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$a(function(r){var n,o,a;return _ts_generator$d(this,function(e){switch(e.label){case 0:return n=r.customFields,o=_object_without_properties(r,["customFields"]),n=n?Object.entries(n).map(function(e){e=_sliced_to_array$m(e,2);return{id:e[0],value:e[1]}}):[],o=_object_spread_props$3(_object_spread$6({},o),{customFields:n}),a=0,[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/org/").concat(encodeURIComponent(r.slug)),{method:"POST",headers:getJsonHeaders(),body:JSON.stringify(o)}).then((t=_async_to_generator$a(function(t){var r;return _ts_generator$d(this,function(e){switch(e.label){case 0:return a=t.status,r=[{status:t.status,message:""}],[4,t.json()];case 1:return[2,_object_spread$6.apply(void 0,r.concat([e.sent()]))]}})}),function(e){return t.apply(this,arguments)})).catch(function(e){return devErrorLogger(e),{status:a,message:"Internal server error. Please try again later.",invite:void 0}})];case 1:return[2,e.sent()]}var t})});return function(e){return t.apply(this,arguments)}})(),postSelfServiceRegistrationReview=(()=>{var r=_async_to_generator$a(function(t,r){var n;return _ts_generator$d(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/review"),{method:"POST",headers:getJsonHeaders(),body:JSON.stringify({token:t,action:r})}).catch(function(e){return devErrorLogger(e),null})];case 1:return(n=e.sent())?[2,{ok:204===n.status,status:n.status}]:[2,{ok:!1,status:0}]}})});return function(e,t){return r.apply(this,arguments)}})(),postSelfServiceEmailVerification=(()=>{var t=_async_to_generator$a(function(t){var r;return _ts_generator$d(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/validate-email"),{method:"POST",headers:getJsonHeaders(),body:JSON.stringify({token:t})}).catch(function(e){return devErrorLogger(e),null})];case 1:return(r=e.sent())?[2,{ok:204===r.status,status:r.status}]:[2,{ok:!1,status:0}]}})});return function(e){return t.apply(this,arguments)}})(),postTrialVerification=(()=>{var t=_async_to_generator$a(function(t){var r;return _ts_generator$d(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(getRestApiUrlFromConfig(),"/api/admin/signup/trial/verify"),{method:"POST",headers:getJsonHeaders(),body:JSON.stringify({token:t})})];case 1:if((r=e.sent()).ok)return[2];throw new Error("Verification failed: ".concat(r.status))}})});return function(e){return t.apply(this,arguments)}})();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}}}}function createUserSaga(e){var t,r;return _ts_generator$c(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$c(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$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 createUserWatcher(){return _ts_generator$b(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$b(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$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 rootSaga(){return _ts_generator$a(this,function(e){switch(e.label){case 0:return[4,all([createUserWatcher(),activateUserWatcher()])];case 1:return e.sent(),[2]}})}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 getSignUpModule(){return{id:SLICE_NAME,reducerMap:_define_property$8({},SLICE_NAME,signUpSlice$1),sagas:[rootSaga],initialActions:[]}}function _array_like_to_array$l(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$l(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$l(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$l(){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$l(e,t){return _array_with_holes$l(e)||_iterable_to_array_limit$l(e,t)||_unsupported_iterable_to_array$l(e,t)||_non_iterable_rest$l()}function _unsupported_iterable_to_array$l(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$l(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$l(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===$&&e.target.value&&S(e.currentTarget),j(!1),e=e.target.value,T[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$l(reactExports.useState(!1),2),c=u[0],d=u[1],u=_sliced_to_array$l(reactExports.useState(!1),2),p=u[0],h=u[1],u=_sliced_to_array$l(reactExports.useState(""),2),f=u[0],u=u[1],y=_sliced_to_array$l(reactExports.useState(""),2),m=y[0],y=y[1],g=_sliced_to_array$l(reactExports.useState(!1),2),x=g[0],b=g[1],g=_sliced_to_array$l(reactExports.useState(!1),2),_=g[0],g=g[1],v=_sliced_to_array$l(reactExports.useState(!1),2),E=v[0],j=v[1],v=_sliced_to_array$l(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))}),T={password:u,confirmPassword:y},u=window.innerWidth<=850,y=Boolean(w),$="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:$,className:v.passwordLabel,children:"Password"}),jsxRuntimeExports.jsx(OutlinedInput,{id:$,"data-testid":$,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$3,{}):jsxRuntimeExports.jsx(default_1$4,{})})}),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$3,{}):jsxRuntimeExports.jsx(default_1$4,{})})}),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=useSelector(authErrorMessage),c=(reactExports.useEffect(function(){"success"===l&&u===AuthContext.ResetPassword&&null!=n&&n()},[l,u]),lodashExports.isEmpty(t)||lodashExports.isEmpty(r)),d=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:d,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:d}),jsxRuntimeExports.jsx(Typography,{variant:"body2",children:SHARED_TEXT.resetPasswordSubHeader})]}),c&&jsxRuntimeExports.jsx(Alert,{sx:{mt:4},variant:"outlined",severity:"error",children:SHARED_TEXT.invalidTokenOrUsername}),e&&jsxRuntimeExports.jsx(Alert,{sx:{mt:4,mb:4},variant:"outlined",severity:"error",children:e}),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$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 _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$7(t,e,r[e])})}return t}var ResetPassword=function(e){return jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(ResetPasswordWidget,_object_spread$5({},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$k(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$k(e){if(Array.isArray(e))return e}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 _iterable_to_array_limit$k(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$k(){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$k(e,t){return _array_with_holes$k(e)||_iterable_to_array_limit$k(e,t)||_unsupported_iterable_to_array$k(e,t)||_non_iterable_rest$k()}function _unsupported_iterable_to_array$k(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$k(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$k(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$6(e={display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Nunito"},"& button",{textTransform:"none",marginTop:"20px",fontSize:"18px",lineHeight:"24px",fontFamily:"Nunito",fontWeight:"600"}),_define_property$6(e,"& input",{fontFamily:"Nunito",lineHeight:"22px",color:"#2A323C"}),_define_property$6(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$6(e,"& .MuiFormControl-root .MuiInputLabel-root.Mui-focused, .Sdk-MuiFormControl-root .Sdk-MuiInputLabel-root.Sdk-Mui-focused",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$6(e,"& .MuiInputLabel-outlined, .Sdk-MuiInputLabel-outlined",{color:"#9CA8B4",fontFamily:"Nunito"}),_define_property$6(e,"& .MuiFormLabel-root .MuiInputLabel-root, .Sdk-MuiFormLabel-root .Sdk-MuiInputLabel-root",{color:"#9CA8B4"}),_define_property$6(e,"& .Mui-focused .MuiInputLabel-outlined, .Sdk-Mui-focused .Sdk-MuiInputLabel-outlined",{color:"#9CA8B4"}),_define_property$6(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$k(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$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 _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$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 _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 _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 _defs,_g,useStyles$4=makeStyles()(function(){var e;return{passwordWrapper:(_define_property$5(e={fontFamily:"Nunito"},"& 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"}}),_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"}),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$j(reactExports.useState(!1),2),s=i[0],l=i[1],i=_sliced_to_array$j(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$5,{}):jsxRuntimeExports.jsx(default_1$2,{})})}),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,iVBORw0KGgoAAAANSUhEUgAAAb8AAAFQBAMAAADdL20WAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAACpQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChPOiAAAAA50Uk5TAAINBwoLBgMMAQUECAnUoFH2AAAKUUlEQVR4nM2dzYpdRRSFT9tJa3eMhAY1YIz4AkGcOBOJIycivoDBiUImQQRx4s9UUJwIjqRxkpmIT9D4BME/8A8d9kh8A03n/px97q1d55xba6291yDpUd37XdY9t6rW3lV7XdcdX+ma9c+/7WMMtPds+xj//XV/nPv/7z/TPtb10/YxBrpwvX2Mx+4tALvX7zWPtfdn8xBDvXnaPMT+790S8J1vmwdDe3Tv45PmMS7+2i0BE3oU5dAF4OH7J82jXfiteQirrz9qHuLg7TvdErD77g5oOJQQH/nhz+f/LgAffaJ5uO6b59rHWOvy4+1jfPXS+b8LQMQH9sgvzUP0wllqDz0gRDiHrgARlgB6FPiVWQICPzKEgIZaAuIeywghHwkrQMQP6+KxBRBy4rEChE2NEAJMHQ/OllPHFSBkcnsb5FHA5H89sVoDwiZ/7YJOjdeAqAUmQNAF+Bqwe759vfPQH81DnOvm381D9MvTHjCNRw+utY/RL956wDQexW4R9YBpPAp1qAX84tPmgbsXT5qHOLra/jZeuLv+0wA+/FT7yG982DzEl5+0v41XP1//aQC77281jwzw6A+vNQ9x9FP/twVEfHYf3Goc4NKT7W/irff6vy0geuydhPiUPzMmsIAId1z6sXEA9HsYAKI/vR0Ed9EAEPGEbvQo/DkwAEQ/wXYQ4Ek+/JYMAcM9ivgtHnpoCIiY5zZ59OLT7W9gOJsaAoLngfOFnw9vACJm8maeNFeEFc0GIGK34MbuW0aENekGYLBHCSu2TcDQggTGmnsTMDTsZeyabAJC9yTnClV4YLUFGFiQgIgktnbXtwARydWOHsXFukZbgIFhLyXh2gKMC3s5GeU2YFjYy3nhbcCwsJdjnW3AqLCX9OUvAAZ5lFSrUwAM8igi1i0YpwAY49HDV9qnUKWfpxJgSEECaxJcAkRM6mcXJLCWMSVAyqR3TICFaHGSXwQMCHtpy7QiYEDYS1toFwEDwl7aVkkZELE9OcujiA3Z8mZXGRCxwTzLo1eP2l+wvF1ZBpR7lLeZ5wAiQooZBQnEWMsBFIe9xNDHAcTHWFURYzsPUFqQwPSLByj1KDOW9AClBQnM74MLKAx7qW5xAYUFCdTvuwuI+O2dWJBAnVX4gLzZ04a4RYA+IGL+a8oafeELD6x8QFnYy533VgBFYS95dV0BFIW95P2RCqCo+5y8w1UDlIS97D3KGqDEo+wdvBqgpPucnRPUACGJ3Vndo/SkpwooKEigFB5YVQEFBQn0ioAqIP/l+VlkHZAe9vLT5Dog/QPm16zUAdkPccGXfASQHPYKHtMjgIju84pHkf3kjkYAEVPhikcFtZtjgNSpomKyOwZInewrltRjgIgNBXe5ptgUGQUkehTbT+5oFJC4ZSLZ9BkFJG56SbbtxgFp3eeajddxQFpBArif3NE4IK37XNONOQGQFP6I4qsJgKT4ThRATgAkhb2iCHkKIOWzVhUBTAGkfFtUZRxTACluUhXiTAIkeBTfT+5oEiCh+1x2Os8kQEJBgqyccRogvPtcVzQ9DRDefa4re58GCF/Z6ApuJwKC16bCsv6JgOD9L2FjxkRAcEGCsLVmKuC77YCHL682gJWntU4FhErZ3hYCqGxQjACUtphGAEqbhCMApUcRBABqD5MIANTe/RAAqD0sQw8oPu5EDyg+VEkPKD5ySA8oPjRKDqg+9ksOqD64TQ6oPnpPDcjrJ3ekBpR1RK2kBtT1tC0lBtQfkywG1B8iLAbUHwOtBQw4bF4LGHDMtRZQe77CA0kBI65DkAJGXGghBWQVhdWkBAy5VEYJyO0nd6QEDLnYSQgYcFpbJwWMuVxNCBhxYqISMOTMSyVg0PV/OsCgs5FlgFGnW8sA6f3kjmSAUVc1qwDDzl9XAYadoK8CDLsDQQQYd4uFCDDuHhIRoKCf3JEGEHGQ/Y53AWkAA29z0gAG3selAQy8UU0CGHnfmAQw8sY4CWDknX8KQNlBniUpAOWFB1YKQHnhgZUAMPZ+ZgFg7O3FAsDYO9L5gMG33PMBI2JdIz5gQOGBFR1Q1k/uiA4o6yd3RAcMiXWN2IDyC442xQaUX1G1KTZgtEPZgDGFB4N30P4GagqKdY3IgDGFB1ZcQGU/ufcWmt9ATSHXpQ7FBYyKdY2ogGGxrhEVMCzWNaIChsW6RkzAuFjXiAmo7Sd3xATM4FAmYAqHMgEjQ7NeREBxP7kjIqC4n9wRDzCHQ4mAkbGuEQ8wMta1Y7QPUZa8n9wRDRB+oOWOogGGxrpGLMDYWNeIBRgb6xqxAPX95I5IgGkcygJM41AWYGzhgRUHMLjwwIoDGFx4YMUBjOgnd0QBDI91jSiAIf3kjiiA4bGuEQMwPtY1YgDGx7pGDEDmhXezRQAM6id3RABM5VAGIPfa0LnCA2aIdY3wgFH95I7wgAkKD6zggMkcigfMUHhgBQdMEesaoQFzxLpGaMC4fnJHaMC4fnJHYMDAfnJHYMAksa4RGDBJrGsEBgRs+CJiXTscdDTEMwbr0ITfQaxD8z1FwQ7N9zu4cz+5o3QzGUThgVW2uSgm1jXKtpoAhWa9sq0HMbGuUbIVPSjWNUq2JwN3KAGwad8XFOsa4QFbGrLwDk22s413aLJsAhXrGqVKl2CxrlGqfBAW6xqlSnhxoVmvTBk9w6GpqiwYDuUA7nhAB8OhmSqd9m8DI4m1EtWq4QoPrBJVGwJjXaM89aLQ0KxXnopfZKxrlKdmGxnrGqWpuic5NE/fBDTWNUrT+UJyKA1wbncdy6Fpus9YDk3TPwgOzXrRAGcGaeDQrFeSHl5s4YFVki5smkOz9NHTHEoEnBP2omNdOzRt5DlhL6Kf3BERcEbYi451jVKcJwOPdY1SnAhEiCTWYgJODnvhsa5RhlO5mA7lnqs2MexlOjTFyXhMh2Y425AQ6xpxT6ecFPZSHZrhfFF84YEV+YTYCUEaJTQzb4E6+pQgjRKa9Yo/pZlQeGAVfs422aHxJ6WTHUoHHA17KbGuUfRtBbh+ckf0+yZGwl5OrGtEBxwJKdgO5QPWw15aJLEWHbAepJFiXSM+YNWjnMIDKz5gLezlO1QAWPMo36EKwIpHWbGukQDQD3sFDlUA+kEaLdY1UgC6QRovNOulAPQ8iu0nd6QA9DzKi3WNJICORxUO1QA6YS8v1jWSAJaPvSfGuvZVFC9SDnslDhUBFsNeiUNFgKWQQuNQEWAp7EX3kzsSARaCNGLhgZUIcNuj1FjXSAS4HfZyQ7NeKsAtj1JjXSMV4KZHubGukQpw06Mqh+oAN4I0bqxrJAMcBmkyh+oAhwUJMocKAQceJce6RjpA61F2rGtfVvZKNuxlx7pGQkBzAj49NOslBOzDXqFDlYB92Ct0qBRwHVIIHSoFXIW9nH5yR0rAVZBGLzywkgIuPcqPdY2kgAuPKkKzXlLAhUcFsa6RFvCBRwWxrpEW8LwgQetQMeB5kKaIdY3EgMdXxA5VAx5cEztUDdjdPNM6VA54fONU+4JqwP3LktCs1//g1etv6s1e6QAAAABJRU5ErkJggg==",img="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQ4AAAAwCAYAAADgtpTMAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADMRJREFUeJztXQusFsUVtlJbIkYwEU0VWiQFfES9MBoUH+CrQrViq2ipKEQrfRgVbAXsw0urLa0SxBjrWwNWBIlCW4rPchFRI1ZFSwUjkkjog6pco7SoLdhz+Oev2737nZ3Xvu7dSU5y7//PfN/ZnZ3v3509c2aXXSpSWlo3LiT7WLCBplhq+MgjyD4GdnZIvwlvscDVNzDXZsAzNyDHVOF4JofiEfhPEPhDWjvZq2RLyaaTjQjg++E5+Z5mAwJ0RTVKSOHgoi+MpJN6a0i/CW+r0IEXBuQ5SOAZF5BnrcDzUigegT8v4Uiy58mO8fC9Fo68SwbCMR+c1PWhfCaso1I6cF5ArssEnt6BOKQ7taYNCsEl+HBiwYNuO9kUR99r4ci7ZCAcFwontk8InwnnRykd2B6CR3P9FnCsDshxk8FFOTMUH/ChaOFo2lUOvtfCkXfJQDh6Cyf24hA+E85yg048LABPN4Ufia4LdCyfVvjxLmr/INs1BCfwoyzCwWb12FILRwEltHBwUY3Jr6QTu8DXX8L4DNm/DTrxigBcxwj4J/via44zLS7MUSE4gR9lEo4llr7XwpF3yUg4ZoMT6/0IQRgjDTtxaQCuVoD9AQuYL77meMjiwpwfghP4IQnHy2RtgWwF2fsGx2r8WEt1DxVw+EdseU62f1b9U7pCwnA22QLBetli0gn8stCRQ3z8pfYzDQcZD+5unlwrAfYjPrgR/J5kH1kIxzayHiG4E3yRhOPUwFx81/gTsv8InOda4El3HOeF9L0uGRYlP044zZxHsFdbDLTjPXh2F47B+zFIc1xicSxNCzJPlOBLbsIR4ZQmuY0ng7uEcNAv+ACy9sD2StHHFS/UYctARz7mgdnTcpD91IPrdAH3EFfcGMcqgP+StqTvngrBneBLEcLRnexfgPM3FjhdQjhUypyCq40p+tiihTpsGuhI5/kBajfWUjie9fD/RoC52RUzhj9I8Ptybej7fiF8iPmTu3BoXiSQT1tgdAnhGJyRcLzl6E8vsrnAWl2PkzpsiNCZJzli3mUpHDvIdnfk+jPAvMcFLwF/BsDnOY/e2tD8x/QQPsT8kSJHvxSaL8K7BHCus8DoEsKR1R0H26UO/hwo4L3jc6wKxyfMcMR7E+D9TrhwznDgkWJRxrr4nsCxCeAvitRZBOpsCOFDzB/pjiNL4UCRxm9aYHQJ4WjJUDi2OfiTpXDMA535RwesLwoXB8dCvA6+u8mB6wKBq6ctXgL+yQL+6Ei90UK943z9iPlUC0eZS8Z3HGzXWvqTpXBMAJ25w3YAUv3vACx+88FvQG4G36918PtegPWCLZYlPkeH7hapt5v+LKnunSF8iXDVwlHmkoNwbLH0J0vhkG75rZbZU/0HAc5K/b3062y1GE3hZfROj1gx7B6qEY+RhH9DQv0bQF0Oovqsrz8Rnlo4ylxoMH6ObHkA2yYM+KMs/MlMOLhQx60BHXqbJQ6aL7lafy/FXYy34DlEuAhPsD3+BHx0F8Z2eEL9oUL9IPMtmqeotyoP1MKRY6FBvUEY8MavZnMQjlmgQ9+wwDhSuDCGRuo9Berca8E1CWDwYjevSFSN3wbwE3Nu0OefItsA2jzs60+Ep6g7DvRW5TULjFo4TEuFhENaW2K0HoHqXQXat8fq/RjUM469EC5kq4VXAHs/1ZjfScK/XGjXCtpwyPbevn5pjqKEYx3gfM4CoxYO01Ih4eDw8w9Ap040xPgDaL8wVk+6rU+N9lTyMvrLXM9BBB+FWO+M3RDaHSAIzvd9/dIcucdxEG5/gXNROsL/cGrhMC1VEQ4u1HlPgE59wKCttO7lmwn10VzIJAOu44QL8EDX44/go0eO1EGi8COO9VsjgF9EyDma32D7mQXOYQIOT6pPz8iCJKbKtVRMOKaATk1dZs+/dsJF0aHj6LOFoG7qo4ZqrNhMarvR9dgj2EcLxzHaoP14of3gAP7lIhyEtSvZMLInBT62r1lgFpWP4+hQ5yW3UjHhaBFOvkppex1olxiSTJ9fDOqnTm7S98+Att4xE4RxC8D+v9gNof0eCuex6PAa18G/MiXy4b4yftXcJYSDBuP5ZJMC2NvCgDdW6zyEg4vCsRFTU9q9CNrdCOr3ETr6WIGHX+eieYRzPI9dSg9oPOip7j2C+HilFVTFZjmP2/WWvndO4aABOIxsvTBAQ5txcFWOwvFrcPIfF9pIy+hPE9q9BtpMF9qgADLrKNcE7DHCcXSI3RBwhgs4p3v6WBbh+CvZHpa+dz7hoMF3f46CUeY7DrT+Ay6zp8/PAW12hpkLXChr+EqHNqsCHDtahGe1X4qSYzoWpiOI2GV4VOHXy0PTve3ge+cSDhp4iwsQjdLNcXBRcvh5YuJf+vx2UH9ZCtdXbAVH4XiCazyPe2+FU+TB2A0BrxVg8Std5zsjVfwdx3tkZzn63nmEgwbdkQWJRimFgwud6FdAB/wC1EfL6Kel8Ejh5x1u6ZUsal6rUBWOROVHIOsNnZQc0/FtDz+LEg5et8N3e86vNpWcrPgashEZ2Z6uPsNCg+6FAoWjdI8qXBRONNxhmb2Sg4NSXz8q/LpvdkLdCaCud5i5whmu2jww2wDmMx6YknBwlvPlDoaSIbH9TTWSWjslWor53nkCwGjQfVigcJRucpSLwjEZHSYg6f+JoK7RFgtU74eg/ZqEuveBusZ5L4EPUnpA44V3CbjjBdx+jpjB4zhU407uQ6HPrbfeADydSjiKEo0yP6pI4edjYnVRINd9hlzSwrjesbroVfElnsd7veCDj81VeGm+U4LmLIRD494t4N7uihvj6BLC8X4g/DeqJhxcqCMfAx18W6weinu4wIILYZwfqSOFK3vtzKVwEh5f4zU594PvNjn6mpVwDBRw+W7Eet+eBI5aOCzwqyoc3wMdvDFSRwkXgvGEItVdADDmROpckeaP43GOykg01ml8adXxCAd/Mws5V/jHgs05IXYEvxYOC/yqCoc0A95f15kKvn/ZkusigLM5UudhUMcq0VACN8ps5WtTND7HdKA7GutM7BkLhyRyW5RByH0Kfi0cFviVFA4uCs8pTNTfPw6+tw1FlsLPD1KNZfRozsUppkDzSukBfWy7iuTfoL9/CepZpxXMUjg0PoqTYeuwytkSuxYOC/wqC8cc0Mk8ISpNoJ7iwLUWYF2qcAi3V5i5wgvtfO33MR7prc04S5+zFg5098dmvIcKwK6FwwK/ysLxDdDJPJl5EroIHLlmA7zFZNeC75zjITTnCoD7d+W3G/rIBK7nANejlj5nLRycsX2LwDHKA7sWDgv8KgvHPkJHPwI+X+rIhSYpOcQZ7d16tcex9ROOLfiG0YT5XcDFd037WeBkno9D4XB5tic8cGvhsMCvrHBwUTiiEpnTDvFKziCGbJjHcaFkQDzn0cMVV+DjFcRoq0gxZUEMJw/h6KVwQBjboY64tXBY4FddONDEHjLnHeKp7TILnq2ex4W2dpzvg5vCibaKNE4rmIdwaJ47BJ456QiJmF1COD4imxXA3hU4SrlWJVqUMJeRYF47xFP7aRZcD3nwHC/gOj/DG/B+VeA9whAjL+GQAsL4ztBl4V+nEo4dwoD0Ncb+i/B9KdeqRIuS357E7W5PriEWwuGzwvROgOmdoSuFV8owZrR3bl7CoblQ7Azbzx3wilpWH7cBMb84O390cpv3GOI4pnmxejwWlu4UTRp0WzMUjhUtckax0t9x6BMmXUBR+3oALjSw4ua0vJvadSd7F2BaxZ848qNERG8bts9TOE4RuPjNS3dLvFIKh/aNUzy8GPm/mUn/1MhnzQWdfXlALslQOAa2yHMcpb/j0CdsskFneKfu01zzDLjWe+CPFXAH+fpvwC8t6jvToH2u2yMoOSDManFhxYTjWNVIi9Cm/+es77xNKr9W78MDcl+y7RmIxmom7CR3HNI+rU17PhDXBAOumz3w0Wtkq/SAPkXhtIKp8zYFCIfUHxsssaomHDxBzOuoeE0W/+DMUI31PH13VmppZCMPLRzDNXblhYOLwuHnTTPemCeFR8ry1bTU/U0AtpQeMHUjqFCFuH4AfEhNK1iAcHRL6fvUu6QIVtWEg+fCDlaNXLSr9PXDPzyfPCbzY0OLvLO8jW2K4Fb+UYWLwin/mzY8INcagUdMgJyCeyXADLa3q6Ef0t604u1/3sKhOdGWmGwrLHCqJhx36L95l7mZ+u9P7jiihQbhXS2NvVDaPWx8BO9RoZ7xYKO6XyD7J7A/meK4FtVYOYlCrJ2jCQHXZIHrVg/cXwHMWSH9N/TlFhdf6PvBwrkxeqXr4OteqvG8j3hNNyXvL2Dkafsn+Mah9t+K/P95sjP03/xqeh/99ziyPf8LYwCh/4hfBB4AAAAASUVORK5CYII=",Footer=function(e){var t=e.showLogoInFooter,e=e.loginConfigs;return jsxRuntimeExports.jsxs(Box,{sx:{textAlign:"center","& #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$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 FORM_WIDTH="500px",PageContainer=function(e){var t=e.children,r=e.showLogoInFooter,r=void 0===r||r,e=e.loginConfigs,n=_sliced_to_array$i(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:FORM_WIDTH,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:FORM_WIDTH,marginLeft:"auto",marginRight:"auto","& #veritone-logo-svg":{width:"220px"},"& #veritone-v-mark-png":{position:"absolute",bottom:"-115%",left:"5%",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$i(React.useState(0),2),n=r[0],o=r[1],r=_sliced_to_array$i(React.useState(0),2),a=(r[0],r[1]);return jsxRuntimeExports.jsx(Box,{sx:{width:"207px",height:"118px",maxWidth:"100vw",display:"flex",alignCenter:"center",justifyContent:"center",margin:"0 auto",marginBlockStart:"min(calc(100vh * 0.1), calc(".concat(n,"px * 0.5))"),marginBlockEnd:"30px",textAlign:"center"},children:jsxRuntimeExports.jsx("img",{style:{pointerEvents:"none",objectFit:"contain",width:"100%",height:"100%"},onLoad:function(e){o(e.target.naturalHeight),a(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,n=e.redirectUrl,o=useStyles$3().classes;return jsxRuntimeExports.jsx(Box,{className:o.btnWrapper,children:t&&t.map(function(r,e){return jsxRuntimeExports.jsxs(Button,{variant:"outlined","data-testid":"os-auth-openId-button-".concat(e),className:o.openIdBtn,onClick:function(){var e,t;e=r.loginUrl,t=n?btoa(n):"",window.location.href=e+(t?"?redirectUrlEncoded=".concat(encodeURIComponent(t),"&redirectUrl=").concat(encodeURIComponent(n)):"")},sx:{backgroundColor:r.loginButtonStyle&&r.loginButtonStyle.btnColor?r.loginButtonStyle.btnColor:"#FFFFFF","&:hover, &:focus":{backgroundColor:r.loginButtonStyle&&r.loginButtonStyle.btnColor?r.loginButtonStyle.btnColor:"#FFFFFF"}},children:[r.loginButtonStyle&&r.loginButtonStyle.btnLogo&&jsxRuntimeExports.jsx("img",{className:o.openIdLogo,alt:"icon",src:r.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:r.loginButtonStyle&&r.loginButtonStyle.btnTextColor?r.loginButtonStyle.btnTextColor:"#2A323C"},children:(null==r?void 0:r.name)&&"Login with "+(20<(e=r.name).length?e.substring(0,20)+"...":e)})]},r.connectId)})})};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 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 _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}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 useLoginConfig(){var r=useParams().slug,n=useNavigate(),e=_sliced_to_array$h(reactExports.useState(),2),t=e[0],o=e[1],e=_sliced_to_array$h(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$9(function(){var t;return _ts_generator$9(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,_obj,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$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$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$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 _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$4(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$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}(e=>{e.EnvError="EnvError",e.RegistrationError="RegistrationError",e.Unauthorized="401",e.CaptchaError="CaptchaError",e.Forbidden="403",e.InviteExists="409"})(EDesktopSnackbarMessageType=EDesktopSnackbarMessageType||{});_define_property$4(_obj={},"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."}),_define_property$4(_obj,"CaptchaError",{title:"Captcha Error",description:"reCAPTCHA verification failed. Please try again."}),_define_property$4(_obj,"RegistrationError",{description:"An error occurred during registration. Please try again."}),_define_property$4(_obj,"401",{title:"Authentication Required",description:"Your session has expired or you are not authorized. Please log in again or contact your administrator."}),_define_property$4(_obj,"403",{title:"Access Denied",description:"You do not have permission to access the requested resource."}),_define_property$4(_obj,"409",{title:"Invite Already Exists",description:"An invite for this email already exists. Please check your inbox or contact your administrator."});var DesktopSnackbarMessage=_obj,DesktopSnackbar=function(e){var t=e.open,r=e.message,n=e.onClose,e=_sliced_to_array$g(reactExports.useState(""),2),o=e[0],a=e[1],e=_sliced_to_array$g(reactExports.useState(""),2),i=e[0],s=e[1];return reactExports.useEffect(function(){var e;r&&(a(null!=(e=r.title)?e:""),s(r.description))},[r]),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)",paddingBlockStart:"10px",paddingInlineEnd:"10px"},children:[o&&jsxRuntimeExports.jsx(Typography,{variant:"h6",children:o}),jsxRuntimeExports.jsx(Typography,{sx:{width:"350px",fontSize:"14px"},variant:"body1",children:i}),jsxRuntimeExports.jsx(IconButton,{sx:{position:"absolute",top:o?0:"5px",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$4({},e),{direction:"up"}))}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 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$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}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}}}}var LoginPage=reactExports.memo(function(e){function F(e){return o.apply(this,arguments)}function t(){"org-registration"===E&&f?window.location.href=f:l(1)}var r,n,o,p=e.allowVanityDomain,h=e.onLoginSuccess,e=_sliced_to_array$f(reactExports.useState(1),2),a=e[0],l=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),f=e[0],U=e[1],e=_sliced_to_array$f(reactExports.useState([]),2),i=e[0],B=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),y=e[0],s=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),m=e[0],L=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),u=e[0],g=e[1],e=_sliced_to_array$f(reactExports.useState(!1),2),N=e[0],x=e[1],e=_sliced_to_array$f(reactExports.useState(!1),2),c=e[0],d=e[1],e=_sliced_to_array$f(reactExports.useState(!1),2),b=e[0],_=e[1],e=_sliced_to_array$f(reactExports.useState([]),2),v=e[0],D=e[1],e=_sliced_to_array$f(reactExports.useState(""),2),E=e[0],H=e[1],e=_sliced_to_array$f(reactExports.useState({aiwareInstanceName:"aiWARE US",coreAdminApiUrl:getRestApiUrlFromConfig(),coreGraphqlApiUrl:getConfig().baseUrl}),2),j=e[0],w=e[1],e=_sliced_to_array$f(reactExports.useState(null),2),S=e[0],R=e[1],e=getConfig(),C=e.disableEnvironmentDiscovery,A=e.hubUrl,T=!C,$=useNavigate(),e=useLoginConfig(),C=e.slug,G=e.slugUri,k=e.loginConfigs,e=e.isLoadingLoginConfigs,O=(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"),a=e.searchParams.get("error");(t=r?r:t)&&isAllowedRedirectUrl(t)&&U(t+e.hash),n&&(s(n),d(!0)),o&&H(o),a&&DesktopSnackbarMessage[a]&&R(DesktopSnackbarMessage[a])},[]),reactExports.useCallback((r=_async_to_generator$8(function(t){var r,n;return _ts_generator$8(this,function(e){switch(e.label){case 0:return _(!1),r=null==k||null==(r=k.organizationInfo)?void 0:r.guid,[4,getOrgOpenIdProviders(y,t,r)];case 1:return n=e.sent(),n.find(function(e){return e.required})&&_(!0),B(n),[2]}})}),function(e){return r.apply(this,arguments)}),[y,k])),I=reactExports.useCallback(_async_to_generator$8(function(){var t,r,n,o,a,i,s;return _ts_generator$8(this,function(e){switch(e.label){case 0:return t=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];d(!1),l(2),e&&R(DesktopSnackbarMessage[EDesktopSnackbarMessageType.EnvError])},T&&A?[3,2]:[4,O(j.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,O(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),w(o),D(n),[4,O(o.coreAdminApiUrl)];case 6:return e.sent(),t(),[3,9];case 7:return s=e.sent(),console.error(s),[4,O(getRestApiUrlFromConfig())];case 8:return e.sent(),t(!0),[3,9];case 9:return[2]}})}),[y,A,T,j.coreAdminApiUrl,O]),P=(reactExports.useEffect(function(){c&&y&&I().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},[c,y,I]),n=_async_to_generator$8(function(){var t,r,n,o,a,i,s,l,u,c,d;return _ts_generator$8(this,function(e){switch(e.label){case 0:return m?(x(!0),[4,userLoginMutation(y,m,null!=p&&p,j.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,getSignUpConfigById(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 $({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",j.coreGraphqlApiUrl,365),f){if("org-registration"===E)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=j.coreAdminApiUrl?j.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$8(function(t){var r,n;return _ts_generator$8(this,function(e){switch(e.label){case 0:return(r=t.target.value,n=v.find(function(e){return e.coreGraphqlApiUrl===r}))?(w(n),[4,O(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:k,children:[jsxRuntimeExports.jsx(DesktopSnackbar,{open:!!S,message:S,onClose:function(){return R(null)}}),M.signupUrl&&!C&&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){s(e),g("")},onNextStep:function(){d(!0)},isLoading:c,buttonText:"Continue",buttonColor:null==k?void 0:k.buttonColor,buttonTextColor:null==k?void 0:k.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.jsx("div",{style:{display:2===a?"block":"none"},children:jsxRuntimeExports.jsxs(Box,{sx:{maxWidth:"368px",width:"100%",marginInlineStart:"auto",marginInlineEnd:"auto"},children:["org-registration"===E&&jsxRuntimeExports.jsx(Stack,{mt:8,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:b?"Choose Authentication Option for":"Enter Password for",subText:y})," ",T&&0<v.length&&jsxRuntimeExports.jsx(Select,{value:j.coreGraphqlApiUrl,onChange:F,disabled:v.length<2,"data-testid":"os-auth-env-dropdown-select",sx:{width:"100%",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:v.length<2?"#9CA8B4":"#555F7C",marginRight:"8px"}}),jsxRuntimeExports.jsx("span",{children:(t=e,null==(e=v.find(function(e){return e.coreGraphqlApiUrl===t}))?void 0:e.aiwareInstanceName)})]});var t},children:v.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{"data-testid":"os-auth-env-dropdown-item",value:e.coreGraphqlApiUrl,children:e.aiwareInstanceName},e.aiwareInstanceName)})}),b?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[i&&0<i.length&&jsxRuntimeExports.jsx(OpenID,{openIdItems:i,redirectUrl: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:u,onPasswordChange:function(e){u&&g(""),L(e)},onPressEnter:function(){P().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})}}),jsxRuntimeExports.jsx(Box,{sx:{mt:"14px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:function(){$("/ui/auth/forgot".concat(G),{state:{emailFromLogin:y}})},text:"Forgot Password?",type:"forgot"})}),jsxRuntimeExports.jsx(Box,{sx:{mt:"25px"},children:jsxRuntimeExports.jsx(BlackButton,{onClick:function(){P().catch(function(e){devErrorLogger("Error: ".concat(JSON.stringify(e)))})},text:"Login",type:"login",loading:N,buttonColor:null==k?void 0:k.buttonColor,buttonTextColor:null==k?void 0:k.buttonTextColor})}),i&&0<i.length&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OrDivider,{})," ",jsxRuntimeExports.jsx(OpenID,{openIdItems:i,redirectUrl:f})]}),jsxRuntimeExports.jsx(Box,{sx:{mt:"20px"},children:jsxRuntimeExports.jsx(BlueLinkText,{onClick:t,text:"Back to Login",type:"login"})})]})]})})]})});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 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$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}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 Forgot=function(){var e,t=_sliced_to_array$e(reactExports.useState(""),2),r=t[0],n=t[1],t=_sliced_to_array$e(reactExports.useState(!1),2),o=t[0],a=t[1],t=_sliced_to_array$e(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$7(function(){var t;return _ts_generator$7(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$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$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$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$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 AccountLinking=function(){var e,t=_sliced_to_array$d(reactExports.useState(1),2),r=t[0],n=t[1],t=_sliced_to_array$d(reactExports.useState(""),2),o=t[0],t=t[1],a=_sliced_to_array$d(reactExports.useState(""),2),i=a[0],a=a[1],s=useNavigate(),l=_sliced_to_array$d(reactExports.useState(!1),2),u=l[0],c=l[1],l=_sliced_to_array$d(reactExports.useState(""),2),d=l[0],p=l[1],l=_sliced_to_array$d(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$6(function(){var t,r;return _ts_generator$6(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$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 _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 _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 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$c(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$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 _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$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$3({},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$3({},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$1,{fontSize:"small",sx:{marginRight:"5px"}})," Back"]}),jsxRuntimeExports.jsx("div",{children:1===e?jsxRuntimeExports.jsx(SignUpStep1,{}):jsxRuntimeExports.jsx(SignUpStep2,{})})]})})};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 _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}var SetPassword=function(){var n=_sliced_to_array$b(useSearchParams(),1)[0],e=_sliced_to_array$b(reactExports.useState(""),2),t=e[0],o=e[1],e=_sliced_to_array$b(reactExports.useState(""),2),r=e[0],a=e[1],e=_sliced_to_array$b(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$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 _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}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$a(reactExports.useState(""),2),t=e[0],o=e[1],e=_sliced_to_array$a(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$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 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$9(reactExports.useState(""),2),r=e[0],s=e[1],e=_sliced_to_array$9(reactExports.useState(!1),2),t=e[0],l=e[1],e=_sliced_to_array$9(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$5(function(){var t,r;return _ts_generator$5(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$e,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$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 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$8(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$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 _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 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})};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$4(function(){var t;return _ts_generator$4(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$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 STACK_STYLES$4={maxWidth:517},BUTTON_CONTAINER_STYLES$4={width:368,mx:"auto"},messages={submitted:"Thank you for registering. Your request must be approved before you can join. If approved you will receive an invitation shortly.",approved:"Click the link below to login and start exploring all of the amazing content we have to offer!",invited:"Thank you for registering. A confirmation email has been sent with an activation link for your new account."},Success=function(){var r=useNavigate(),n=_sliced_to_array$7(useSearchParams(),1)[0],e=n.get("status"),e=["submitted","approved","invited"].includes(null!=e?e:"")?e:"submitted",t=useSignUpConfig(),o=t.config,a=t.slugUri;return jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$4,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:messages[e]})},ButtonContainer$1=function(e){var t=e.buttonColor;return jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$4,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Return to Homepage",onClick:e.onClick,buttonColor:t,buttonTextColor:e.buttonTextColor})})};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 STACK_STYLES$3={maxWidth:517},BUTTON_CONTAINER_STYLES$3={width:368,mx:"auto"},EmailVerification=function(){var e=_sliced_to_array$6(useSearchParams(),1)[0],t=useNavigate(),r=null!=(e=e.get("token"))?e:"",e=_sliced_to_array$6(reactExports.useState("loading"),2),n=e[0],o=e[1],e=_sliced_to_array$6(reactExports.useState(0),2),a=e[0],i=e[1];reactExports.useEffect(function(){r?postSelfServiceEmailVerification(r).then(function(e){e.ok?o("success"):(i(e.status),o("error"))}):o("error")},[r]);return jsxRuntimeExports.jsx(PageContainer,{loginConfigs:{hideVeritoneBranding:!0},children:jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$3,"data-testid":"os-auth-self-service-email-verification",children:["loading"===n&&jsxRuntimeExports.jsx(LoadingView$2,{}),"success"===n&&jsxRuntimeExports.jsx(SuccessView$2,{}),"error"===n&&jsxRuntimeExports.jsx(ErrorView$2,{status:a,hasToken:Boolean(r)}),"loading"!==n&&jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$3,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"success"===n?"Continue to Login":"Return to Homepage",onClick:function(){return t("/ui/auth/login")}})})]})})},LoadingView$2=function(){return jsxRuntimeExports.jsxs(Stack,{alignItems:"center",gap:2,children:[jsxRuntimeExports.jsx(CircularProgress,{size:40}),jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",children:"Verifying your email address…"})]})},SuccessView$2=function(){return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center","data-testid":"os-auth-email-verification-success",children:"Your email has been verified. Your account is ready — please log in to continue."})},ErrorView$2=function(e){var t=e.status;return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",color:"error","data-testid":"os-auth-email-verification-error",children:e.hasToken&&401!==t?"Something went wrong while verifying your email. Please try again or contact your administrator.":"This verification link is invalid or has expired. Please contact your administrator for a new invitation."})};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 _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}var STACK_STYLES$2={maxWidth:517},BUTTON_CONTAINER_STYLES$2={width:368,mx:"auto"},SUCCESS_MESSAGES={approve:"The registration request has been approved. The applicant will receive an email to complete their account setup.",deny:"The registration request has been denied."},AdminReview=function(){var e=_sliced_to_array$5(useSearchParams(),1)[0],t=useNavigate(),r=null!=(o=e.get("token"))?o:"",e=null!=(o=e.get("action"))?o:"",n="approve"===e||"deny"===e?e:null,o=_sliced_to_array$5(reactExports.useState("loading"),2),e=o[0],a=o[1],o=_sliced_to_array$5(reactExports.useState(0),2),i=o[0],s=o[1];reactExports.useEffect(function(){r&&n?postSelfServiceRegistrationReview(r,n).then(function(e){e.ok?a("success"):(s(e.status),a("error"))}):a("error")},[r,n]);return jsxRuntimeExports.jsx(PageContainer,{loginConfigs:{hideVeritoneBranding:!0},children:jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$2,"data-testid":"os-auth-self-service-admin-review",children:["loading"===e&&jsxRuntimeExports.jsx(LoadingView$1,{action:n}),"success"===e&&n&&jsxRuntimeExports.jsx(SuccessView$1,{action:n}),"error"===e&&jsxRuntimeExports.jsx(ErrorView$1,{status:i,hasValidParams:Boolean(r&&n)}),"loading"!==e&&jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$2,children:jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Return to Homepage",onClick:function(){return t("/ui/auth/login")}})})]})})},LoadingView$1=function(e){e=e.action;return jsxRuntimeExports.jsxs(Stack,{alignItems:"center",gap:2,children:[jsxRuntimeExports.jsx(CircularProgress,{size:40}),jsxRuntimeExports.jsxs(Typography,{variant:"body1",textAlign:"center",children:["approve"===e?"Approving":"deny"===e?"Denying":"Processing"," the registration request…"]})]})},SuccessView$1=function(e){e=e.action;return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center","data-testid":"os-auth-admin-review-success",children:SUCCESS_MESSAGES[e]})},ErrorView$1=function(e){var t=e.status,e=e.hasValidParams?401===t?"This link has expired or is invalid. Please use a current link from your invitation email.":400===t?"This request has already been reviewed or is no longer pending. No further action is needed.":"Something went wrong while processing this request. Please try again or contact support.":"This link is missing required parameters and cannot be processed.";return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",color:"error","data-testid":"os-auth-admin-review-error",children:e})};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 STACK_STYLES$1={maxWidth:517},BUTTON_CONTAINER_STYLES$1={width:368,mx:"auto"},TrialVerify=function(){var e=_sliced_to_array$4(useSearchParams(),1)[0],t=useNavigate(),r=null!=(e=e.get("token"))?e:"",e=_sliced_to_array$4(reactExports.useState("loading"),2),n=e[0],o=e[1],a=reactExports.useRef(null);return reactExports.useEffect(function(){r?a.current!==r&&(a.current=r,postTrialVerification(r).then(function(){o("success")}).catch(function(){o("error")})):o("missing-token")},[r]),jsxRuntimeExports.jsx(PageContainer,{loginConfigs:{hideVeritoneBranding:!0},children:jsxRuntimeExports.jsxs(Stack,{gap:3,sx:STACK_STYLES$1,"data-testid":"os-auth-trial-verify",children:["loading"===n&&jsxRuntimeExports.jsx(LoadingView,{}),"success"===n&&jsxRuntimeExports.jsx(SuccessView,{}),("error"===n||"missing-token"===n)&&jsxRuntimeExports.jsx(ErrorView,{missingToken:"missing-token"===n}),"loading"!==n&&jsxRuntimeExports.jsx(Box,{sx:BUTTON_CONTAINER_STYLES$1,children:"error"===n?jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Try Again",onClick:function(){return window.location.reload()}}):jsxRuntimeExports.jsx(BlackButton,{type:"button",text:"Go to Login",onClick:function(){return t("/ui/auth/login")}})})]})})},LoadingView=function(){return jsxRuntimeExports.jsxs(Stack,{alignItems:"center",gap:2,children:[jsxRuntimeExports.jsx(CircularProgress,{size:40}),jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",children:"Verifying your account…"})]})},SuccessView=function(){return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center","data-testid":"os-auth-trial-verify-success",children:"Your account has been verified. You can now log in to continue."})},ErrorView=function(e){e=e.missingToken;return jsxRuntimeExports.jsx(Typography,{variant:"body1",textAlign:"center",color:"error","data-testid":"os-auth-trial-verify-error",children:e?"This verification link is invalid or has expired. Please request a new one.":"Something went wrong while verifying your account. Please try again."})};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 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$3(function(){var t,r,n;return _ts_generator$3(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$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 FileType$1,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$3(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$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 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 _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 _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 _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 _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}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}}}}(e=>{e.PDF="pdf",e.TEXT="text",e.UNKNOWN="unknown"})(FileType$1=FileType$1||{});var FileType,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:"100%",height:"424px"},iframeStyles:{border:"1px solid #E0E0E0",borderRadius:"6px"}},fetchContent=(()=>{var r=_async_to_generator$2(function(t,r){var n,o,a,i;return _ts_generator$2(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 ".concat("pdf"!==t?"\n #scroll-container { height: 100vh; overflow-y: auto; padding: 10px; }\n .content { white-space: pre-wrap; line-height: 1.6; }\n ":"\n .pdf-container { height: 100vh; padding: 0; }\n ","\n </style>\n </head>\n <body>\n ").concat("pdf"===t?'<div class="pdf-container">\n <embed src="'.concat(e,'#navpanes=0" width="100%" height="100%" style="max-width: 100%;" />\n </div>\n'):'<div id="scroll-container">\n <div class="content">'.concat(e,"</div>\n </div>\n"),"\n </body>\n </html>\n")},TermsOfService=function(){var e,s=useNavigate(),l=_sliced_to_array$2(useSearchParams(),1)[0],t=useSignUpConfig(),r=t.config,u=t.tosFile,n=t.privacyPolicyUrl,c=t.registerUri,o=reactExports.useRef(null),t=_sliced_to_array$2(reactExports.useState({content:"",fileType:"unknown"}),2),a=t[0],i=t[1],t=_sliced_to_array$2(reactExports.useState(!1),2),d=t[0],p=t[1],h=(e=_async_to_generator$2(function(){var t,r,n,o,a,i;return _ts_generator$2(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$2(function(){var t;return _ts_generator$2(this,function(e){switch(e.label){case 0:if(null==u||!u.url)return[2];p(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,fetchContent(u.url,a.fileType)];case 2:return t=e.sent(),i(t),[3,5];case 3:return t=e.sent(),console.error("Error loading content:",t),[3,5];case 4:return p(!1),[7];case 5:return[2]}})});var e,t=function(){return e.apply(this,arguments)};"unknown"===a.fileType&&t()},[u,a]),reactExports.useEffect(function(){o.current&&(o.current.srcdoc=createIframeHTML(a.content,a.fileType))},[a]),reactExports.useEffect(function(){var e=l.has("email"),t=l.has("token");e||t?e&&t&&!u&&h():s(c)},[l,u]),jsxRuntimeExports.jsxs(Stack,{gap:3,sx:{width:"750px",position:"relative",left:"50%",transform:"translateX(-50%)"},children:[d?jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center"},children:jsxRuntimeExports.jsx(CircularProgress,{})}):u&&jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsx("iframe",_object_spread$2({ref:o,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:h,buttonColor:null==r||null==(t=r.uiSettings)||null==(d=t.registrationButtonStyle)?void 0:d.backgroundColor,buttonTextColor:null==r||null==(n=r.uiSettings)||null==(t=n.registrationButtonStyle)?void 0:t.textColor,testId:"os-auth-register-accept-continue-button"})})]})};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 _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 _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 detectFileType=(()=>{var t=_async_to_generator$1(function(t){var r,n;return _ts_generator$1(this,function(e){switch(e.label){case 0:if((r=t.toLowerCase()).endsWith(".pdf")||r.includes(".pdf?"))return[2,"pdf"];if(r.endsWith(".txt")||r.endsWith(".text")||r.endsWith(".html"))return[2,"text"];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,fetch(t,{method:"HEAD"})];case 2:return r=e.sent(),(n=r.headers.get("content-type")||"").includes("pdf")?[2,"pdf"]:n.includes("text")||n.includes("html")?[2,"text"]:[3,4];case 3:return n=e.sent(),console.error("Error detecting file type:",n),[2,"pdf"];case 4:return[2,"pdf"]}})});return function(e){return t.apply(this,arguments)}})(),fetchTextContent=(()=>{var t=_async_to_generator$1(function(t){var r;return _ts_generator$1(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),[4,fetch(t)];case 1:if((r=e.sent()).ok)return[4,r.text()];throw new Error("HTTP error! status: ".concat(r.status));case 2:return[2,e.sent()];case 3:throw r=e.sent(),console.error("Error fetching text content:",r),r;case 4:return[2]}})});return function(e){return t.apply(this,arguments)}})(),TermsAndConditionsInline=function(){var r=useSignUpConfig().tosFile,e=_sliced_to_array$1(reactExports.useState({content:"",fileType:"unknown"}),2),a=e[0],n=e[1],e=_sliced_to_array$1(reactExports.useState(!1),2),t=e[0],o=e[1],e=_sliced_to_array$1(reactExports.useState(null),2),i=e[0],s=e[1];return reactExports.useEffect(function(){var e;e=_async_to_generator$1(function(){var t;return _ts_generator$1(this,function(e){switch(e.label){case 0:if(null==r||!r.url||i===r.url)return[2];o(!0),e.label=1;case 1:return e.trys.push([1,6,7,8]),[4,detectFileType(r.url)];case 2:return"pdf"!==e.sent()?[3,3]:(n({content:r.url,fileType:"pdf"}),[3,5]);case 3:return[4,fetchTextContent(r.url)];case 4:t=e.sent(),n({content:t,fileType:"text"}),e.label=5;case 5:return s(r.url),[3,8];case 6:return t=e.sent(),console.error("Error loading terms content:",t),n({content:r.url,fileType:"pdf"}),s(r.url),[3,8];case 7:return o(!1),[7];case 8:return[2]}})}),function(){e.apply(this,arguments)}()},[null==r?void 0:r.url,i]),r?jsxRuntimeExports.jsxs(Box,{sx:{width:"100%",mb:3},children:[jsxRuntimeExports.jsxs(Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{mb:1},children:[jsxRuntimeExports.jsx(Typography,{sx:{color:"#212121",fontSize:"12px",fontFamily:"Nunito"},children:"Terms & Conditions"}),jsxRuntimeExports.jsxs(Stack,{direction:"row",spacing:1,children:[jsxRuntimeExports.jsx(IconButton,{size:"small",onClick:function(){null!=r&&r.url&&window.open(r.url,"_blank")},disabled:t,"aria-label":"Download Terms & Conditions",sx:{color:"#555F7C"},"data-testid":"os-auth-register-terms-and-conditions-download-button",children:jsxRuntimeExports.jsx(default_1$6,{})}),jsxRuntimeExports.jsx(IconButton,{size:"small",onClick:function(){var e,t,r,n,o;"pdf"===a.fileType&&a.content?(e=window.open(a.content,"_blank"))&&(e.onload=function(){e.print()}):a.content&&(t=window.open("","_blank"))&&((r=t.document).title="Terms & Conditions",(n=r.createElement("style")).textContent="body { font-family: Arial, sans-serif; padding: 20px; line-height: 1.6; } pre { white-space: pre-wrap; }",r.head&&r.head.appendChild(n),(n=r.createElement("h1")).textContent="Terms & Conditions",(o=r.createElement("pre")).textContent=a.content,r.body&&(r.body.appendChild(n),r.body.appendChild(o)),t.focus(),t.print())},disabled:t||!a.content,"aria-label":"Print Terms & Conditions",sx:{color:"#555F7C"},"data-testid":"os-auth-register-terms-and-conditions-print-button",children:jsxRuntimeExports.jsx(default_1,{})})]})]}),jsxRuntimeExports.jsx(Box,{sx:{width:"100%",height:"200px",border:"1px solid #E0E0E0",borderRadius:"6px",overflowY:"pdf"===a.fileType?"hidden":"auto",overflowX:"hidden",padding:"pdf"===a.fileType?0:2,backgroundColor:"#FAFAFA"},children:t?jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:jsxRuntimeExports.jsx(CircularProgress,{size:24})}):"pdf"===a.fileType?jsxRuntimeExports.jsx(Box,{component:"iframe",src:a.content,sx:{width:"100%",height:"100%",border:"none",borderRadius:"6px"},title:"Terms & Conditions PDF"}):a.content?jsxRuntimeExports.jsx(Typography,{variant:"body2",component:"pre",sx:{whiteSpace:"pre-wrap",wordWrap:"break-word",fontFamily:"inherit",margin:0,lineHeight:1.6},children:a.content}):jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"#212121",children:"Unable to load terms content."})})]}):null};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 _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(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 _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(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 REGISTRATION_JOIN_FORM_ID="registration-join-form",Join=function(){var e=getRecaptchaSiteKey();return e?jsxRuntimeExports.jsx(p,{type:"v2-invisible",siteKey:e,children:jsxRuntimeExports.jsx(JoinForm,{})}):(devErrorLogger(new Error("Registration recaptcha site key is not configured")),jsxRuntimeExports.jsx(Box,{sx:{width:FORM_WIDTH},children:jsxRuntimeExports.jsx(Alert,{severity:"error",children:"Registration is unavailable due to a configuration issue. Please contact support."})}))};function JoinForm(){var e=useSignUpConfig(),r=e.config,e=e.tosFile,n=Boolean(null==e?void 0:e.url),a=useSignUpMutation(),e=n$1(),i=e.executeV2Invisible,t=e.reset,s=reactExports.useRef(null),e=reactExports.useCallback(function(e){var t;null!=(t=s.current)&&t.call(s,e),s.current=null},[]),l=reactExports.useCallback(function(){return new Promise(function(t,r){i?(s.current=function(e){e?t(e):r(new Error("reCAPTCHA returned an empty token"))},i()):r(new Error("reCAPTCHA is not ready"))})},[i]),u=reactExports.useCallback(function(){return null==t?void 0:t()},[t]),l=useOnSubmit({getRecaptchaToken:l,onRegistrationFailure:u}),u=l.onSubmit,c=l.errorMessage,d=l.setErrorMessage,l=useTheme(),l=useMediaQuery(l.breakpoints.down("md")),p=useMediaQuery("(max-height: 800px)");return jsxRuntimeExports.jsxs(Box,{sx:_object_spread$1({width:FORM_WIDTH},(l||p)&&{height:"588px",overflowY:"auto",overflowX:"hidden",paddingTop:1}),children:[jsxRuntimeExports.jsx(FormGenerator,{htmlFormId:REGISTRATION_JOIN_FORM_ID,schema:null==r||null==(l=r.uiSettings)?void 0:l.customRegistrationFields,additionalFields:[{fieldKey:"firstName",title:"First Name",type:"text",required:!0},{fieldKey:"lastName",title:"Last Name",type:"text",required:!0},{fieldKey:"company",title:"Company",type:"text",required:!0},{fieldKey:"email",title:"Email",type:"text",required:!0},{fieldKey:"password",title:"Password",type:"password",required:!0},{fieldKey:"confirmPassword",title:"Confirm Password",type:"password",required:!0}],passwordPolicy:null==r||null==(p=r.uiSettings)?void 0:p.passwordPolicy,renderFormActions:function(e){var t=e.isSubmitting;return jsxRuntimeExports.jsxs(Stack,{gap:2,children:[jsxRuntimeExports.jsx(TermsAndConditionsInline,{}),jsxRuntimeExports.jsx(CompleteRegistrationButton,{hasTos:n,loading:a.isPending,isSubmitting:t,disabled:!e.isValid,buttonColor:null==r||null==(t=r.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.backgroundColor,buttonTextColor:null==r||null==(t=r.uiSettings)||null==(t=t.registrationButtonStyle)?void 0:t.textColor,htmlForm:e.htmlFormId})]})},onSubmit:u,sx:{width:"100%"}}),jsxRuntimeExports.jsx(o,{badge:"inline",onChange:e,style:{display:"none"}}),c&&jsxRuntimeExports.jsx(DesktopSnackbar,{open:!!c,message:c,onClose:function(){return d(null)}})]})}var useOnSubmit=function(e){var t,g=e.getRecaptchaToken,x=e.onRegistrationFailure,b=useNavigate(),_=_sliced_to_array(useSearchParams(),1)[0],e=useSignUpConfig(),v=e.config,E=e.registerUri,j=useSignUpMutation(),e=_sliced_to_array(reactExports.useState(null),2),r=e[0],w=e[1];return{onSubmit:reactExports.useCallback((t=_async_to_generator(function(o){var t,r,n,a,i,s,l,u,c,d,p,h,f,y,m;return _ts_generator(this,function(e){switch(e.label){case 0:return(e.trys.push([0,3,,4]),t=v.id,r=v.slug,n=null!=(n=null==v?void 0:v.adminApprovalRequired)&&n,a=_.get("email"),a=(null==o?void 0:o.email)||(a?decodeURIComponent(a):""),0<(f=null!=(f=null==v?void 0:v.allowedDomains)?f:[]).length&&a&&(i=null==(s=a.split("@")[1])?void 0:s.toLowerCase(),!f.some(function(e){return e.toLowerCase()===i})))?(w({title:"Email Domain Not Allowed",description:"Please use an email address from one of the allowed domains: ".concat(f.join(", "))}),[2]):(l=null!=(s=null==o?void 0:o.firstName)?s:"",u=null!=(f=null==o?void 0:o.lastName)?f:"",c=null!=(f=null==o?void 0:o.password)?f:"",d=new Set(["firstName","lastName","email","password","confirmPassword"]),p=null!=(f=null==v||null==(f=v.uiSettings)||null==(f=f.customRegistrationFields)?void 0:f.properties)?f:{},h=Object.keys(o).reduce(function(e,t){var r,n;return d.has(t)||(n=o[t],"number"===(null==(r=p[t])?void 0:r.type)&&isFinite(Number(n))?e[t]=Number(n):e[t]=n),e},{}),[4,g()]);case 1:return f=e.sent(),[4,j.mutateAsync({slug:r,orgRegistrationId:t,email:a,customFields:h,firstName:l,lastName:u,password:c,captchaResponse:f})];case 2:if(201===(null==(y=e.sent())?void 0:y.status))m=n?"submitted":"approved",b({pathname:"".concat(E,"/success"),search:"?status=".concat(m)});else{switch(y.status){case 401:w(DesktopSnackbarMessage[EDesktopSnackbarMessageType.CaptchaError]);break;case 400:w(DesktopSnackbarMessage[EDesktopSnackbarMessageType.RegistrationError]);break;case 409:w(DesktopSnackbarMessage[EDesktopSnackbarMessageType.InviteExists]);break;default:w(DesktopSnackbarMessage[EDesktopSnackbarMessageType.EnvError])}null!=x&&x()}return[3,4];case 3:return m=e.sent(),devErrorLogger(m),w(DesktopSnackbarMessage[EDesktopSnackbarMessageType.EnvError]),null!=x&&x(),[3,4];case 4:return[2]}})}),function(e){return t.apply(this,arguments)}),[v,g,b,x,E,_,j]),errorMessage:r,setErrorMessage:w}};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,t=useSignUpConfig(),r=t.config,t=t.isLoading,n=useForm({defaultValues:{email:"",acceptedTos:!1}});return t?jsxRuntimeExports.jsx(LoginSkeleton,{}):jsxRuntimeExports.jsx(FormProvider,_object_spread_props(_object_spread({},n),{children:jsxRuntimeExports.jsxs(PageContainer,{loginConfigs:{name:null!=(t=null==r?void 0:r.name)?t:"",logo:null==r||null==(n=r.uiSettings)?void 0:n.logo,buttonColor:null==r||null==(t=r.uiSettings)||null==(n=t.registrationButtonStyle)?void 0:n.backgroundColor,buttonTextColor:null==r||null==(t=r.uiSettings)||null==(n=t.registrationButtonStyle)?void 0:n.textColor,hideVeritoneBranding:null==r||null==(t=r.uiSettings)?void 0:t.veritoneBranding},children:[jsxRuntimeExports.jsx(Header,{text:(e=null==r||null==(e=r.name)?void 0:e.trim())?"Welcome to ".concat(e," Registration"):"Welcome to Registration",type:"register",subText:"Please enter the information you would like associated with your account and accept our Terms & Conditions. This is the first step on your way to exploring all of the amazing content we have to offer!",sx:{textAlign:"left",fontWeight:"700",fontSize:"16px"},subTextSx:{textAlign:"left",fontSize:"12px"}}),jsxRuntimeExports.jsx(Outlet,{})]})}))},RegisterRedirect=function(){var e=useParams().slug,t=useLocation(),r=t.pathname.split("/"),n=r.findIndex(function(e){return"register"===e}),r=r.slice(n+(e?2:1)).join("/"),n="../signup",e=(e&&(n+="/".concat(e)),r&&(n+="/".concat(r)),t.search);return jsxRuntimeExports.jsx(Navigate,{to:n+e,replace:!0})},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(Navigate,{to:"../signup",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/register",element:jsxRuntimeExports.jsx(Navigate,{to:"../signup",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/register/:slug/*",element:jsxRuntimeExports.jsx(RegisterRedirect,{})}),jsxRuntimeExports.jsx(Route,{path:"/signup",element:jsxRuntimeExports.jsx(SignUp,{})}),jsxRuntimeExports.jsx(Route,{path:"/signup/verify",element:jsxRuntimeExports.jsx(EmailVerification,{})}),jsxRuntimeExports.jsx(Route,{path:"/signup/review",element:jsxRuntimeExports.jsx(AdminReview,{})}),jsxRuntimeExports.jsx(Route,{path:"/signup/trial/verify",element:jsxRuntimeExports.jsx(TrialVerify,{})}),jsxRuntimeExports.jsxs(Route,{path:"/signup/:slug/*",element:jsxRuntimeExports.jsx(RegistrationLayout,{}),children:[jsxRuntimeExports.jsx(Route,{path:"join",element:jsxRuntimeExports.jsx(Join,{})}),jsxRuntimeExports.jsx(Route,{path:"success",element:jsxRuntimeExports.jsx(Success,{})}),jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(Email,{})}),jsxRuntimeExports.jsx(Route,{path:"confirm",element:jsxRuntimeExports.jsx(Confirm,{})}),jsxRuntimeExports.jsx(Route,{path:"terms-of-service",element:jsxRuntimeExports.jsx(TermsOfService,{})})]}),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};