import{r as o,aJ as t}from"./@ui-core-DKdciH1Z.js";import{b_ as u,k as d,S as p,B as h,r as x}from"./index-D7KLAbvI.js";import{f,L as g}from"./@react-router-DaIuhn3X.js";import{z as r}from"./@zod-DKyD3xVW.js";import{a as w}from"./UpdatePasswordSchemas-C1WO1M58.js";const c=o.createContext(null);function P({children:e,initialStep:s=1}){const[n,a]=o.useState(s);return t.jsx(c.Provider,{value:{surveyStep:n,setSurveyStep:a},children:e})}function y(){const e=o.useContext(c);if(e===null)throw new Error("useSurveyContext must be used within an SurveyProvider");return e}function L({stepAmount:e}){const{surveyStep:s}=y();return s>e?null:t.jsx("ol",{className:"flex flex-wrap justify-center gap-1 pb-5","aria-label":"progress",children:Array.from({length:e},(n,a)=>t.jsx("li",{"aria-current":s===a+1?"step":void 0,className:`h-0.5 w-[90px] rounded-rounded ${s===a+1?"bg-primary-100":s>a?"bg-primary-300":"bg-neutral-200"}`},a))})}const S=e=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289L19.7071 11.2929C20.0976 11.6834 20.0976 12.3166 19.7071 12.7071L12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071C10.9024 19.3166 10.9024 18.6834 11.2929 18.2929L16.5858 13H5C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11H16.5858L11.2929 5.70711C10.9024 5.31658 10.9024 4.68342 11.2929 4.29289Z"}));function R({username:e,subHeader:s,displayBody:n=!0}){const[a]=f(),i=a.get("redirect"),m=i&&`${window.location.origin}${i}`,l=u.safeParse(m);return t.jsxs(d,{className:"flex max-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[t.jsx(p,{className:"h-[120px] w-[120px] fill-theme-text-success"}),t.jsxs("div",{className:"space-y-3 text-center",children:[t.jsxs("p",{className:"text-display-xs font-semibold",children:["Congratulations!",t.jsx("br",{}),s]}),n&&t.jsxs("p",{className:"text-theme-text-secondary",children:["You can log in to the dashboard with your username"," ",t.jsx("span",{className:"font-semibold text-theme-text-primary",children:e})," and your password to start exploring!"]}),t.jsx(h,{className:"inline-flex",size:"md",intent:"primary",asChild:!0,children:t.jsxs(g,{to:l.success?l.data:x.projects.overview,children:[t.jsx("span",{children:"Go to Dashboard"}),t.jsx(S,{className:"h-5 w-5 fill-white"})]})})]})]})}const k=r.object({fullName:r.string().min(1),email:r.union([r.string().email(),r.literal("")]),getUpdates:r.boolean()}).refine(e=>e.getUpdates?e.email!=="":!0),B=r.object({primaryRole:r.string().min(1),otherVal:r.string().optional()}).refine(e=>e.primaryRole==="other"?e.otherVal!=="":!0),E=r.object({aiTypes:r.enum(["traditional_ml","deep_learning","computer_vision","llm_and_foundation_models","ai_agents_and_workflows","hybrid_applications"]).array().min(1),biggestChallenge:r.string().array().optional()}).refine(e=>e.aiTypes.some(n=>n==="llm_and_foundation_models"||n==="ai_agents_and_workflows")?e.biggestChallenge?.length??!1:!0),F=r.object({serverName:r.string().optional()});function v(e=!1){return w.extend({username:r.string()}).refine(s=>s.newPassword===s.confirmPassword,{path:["confirmPassword"],message:"Passwords do not match"}).refine(s=>e?s.username.length>0:!0)}v();export{L as S,R as a,P as b,F as c,k as d,E as e,v as g,B as p,y as u};
