1import{e as m,u as F,j as e,H as M,s as L}from"./app-BW7s7uyW.js";import{G as _}from"./GuestLayout-BfHr9wAV.js";import{I as x}from"./input-Bs76onQo.js";import{L as d}from"./label-BM6JmdBj.js";import{B as r}from"./button-DVipS2rI.js";import{I as f}from"./InputError-D7jaO5dP.js";import{B as A}from"./ButtonSpinner2-XQCydBb_.js";import{A as y,m as b}from"./react-Bl6GbvnO.js";import{S as P}from"./Spinner-DyJ2_3hU.js";import{v as V,s as S,t as v}from"./api-DM8lSMDU.js";import{C as o}from"./circle-check-big-CRMA3fUd.js";import"./dropdown-menu-D1bQgLzl.js";import"./react-icons.esm-B9_X9wM2.js";import"./index-DtmF0WWA.js";import"./index-DLsbnuD0.js";import"./index-BvFaBkyL.js";import"./index-ClwgV9Ou.js";import"./index-BtZK7GpQ.js";import"./sun-C0vIwSd-.js";import"./createLucideIcon-CFRjRP62.js";const H="/build/assets/signup_ecommerce-mSG5SIxF.png",D="/build/assets/signup_hotel_ticket_reserv-CEkB2XHo.png",q="/build/assets/signup_ticketing-BlSecOHh.png",G="/build/assets/signup_other-DNuQdX35.png",de=()=>{const[a,N]=m.useState(1),[p,T]=m.useState(!0),[k,g]=m.useState(!1),[C,I]=m.useState(null),{data:s,setData:i,post:B,processing:O,errors:c,reset:W}=F({fullName:"",workEmail:"",businessType:"",businessSize:"",companyName:"",password:"",passwordConfirmation:"",transactionVolume:""});m.useEffect(()=>{setTimeout(()=>{T(!1)},100)},[]),m.useEffect(()=>{a===4&&(console.log("Submitted Data:",s),B(route("guest.signup.post"),{onSuccess:()=>{W(),N(1)},onError:t=>{console.error("Post Errors:",t)}}))},[a]);const $=async t=>{t.preventDefault();const u=L(s.fullName);let n=!1;if(a===1)try{if(g(!0),n=await V(s.workEmail),n){I("That email address is already in use. Please try again with a different email address.");return}await S([u.firstName,u.lastName,s.workEmail]),await Promise.all([v("new_trial_signup","new trial",s.workEmail).then(h=>console.log("Event tracked",h)),v("signup_step_1","new trial",s.workEmail).then(h=>console.log("Event tracked",h))])}catch(h){console.error("Error in signup process:",h)}finally{g(!1),n||w()}else w()},w=()=>{N(a+1)},j=t=>{i("businessType",t)},l=async t=>{i("businessSize",t);const u=L(s.fullName);try{g(!0),await Promise.all([v("signup_step_2","new trial",s.workEmail).then(n=>console.log("Event Tracked",n)),S([u.firstName,u.lastName,s.workEmail],[{field:"36",value:s.businessType},{field:"37",value:t}]).then(n=>console.log("Contact synced",n))])}catch(n){console.error("Error syncing contact:",n)}finally{g(!1),w()}},E=()=>e.jsxs("div",{className:"flex items-center justify-center mb-8",children:[e.jsx("div",{className:`flex items-center justify-center w-8 h-8 rounded-full ${a>=1?"bg-emerald-500 text-white":"bg-gray-200"}`,children:e.jsx(o,{className:"w-5 h-5"})}),e.jsx("div",{className:`w-16 h-1 ${a>=2?"bg-emerald-500":"bg-gray-200"}`}),e.jsx("div",{className:`flex items-center justify-center w-8 h-8 rounded-full ${a>=2?"bg-emerald-500 text-white":"bg-gray-200"}`,children:a>=2?e.jsx(o,{className:"w-5 h-5"}):e.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-gray-300"})}),e.jsx("div",{className:`w-16 h-1 ${a>=3?"bg-emerald-500":"bg-gray-200"}`}),e.jsx("div",{className:`flex items-center justify-center w-8 h-8 rounded-full ${a>=3?"bg-emerald-500 text-white":"bg-gray-200"}`,children:a>=3?e.jsx(o,{className:"w-5 h-5"}):e.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-gray-300"})})]});return e.jsxs(_,{showThemeToggle:!1,children:[e.jsx(M,{title:"Signup"}),a===1&&e.jsx(y,{mode:"wait",children:e.jsx(b.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:p?.2:0},children:e.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8",children:e.jsx("div",{className:"bg-white rounded-lg overflow-hidden",children:e.jsxs("div",{className:"grid md:grid-cols-2",children:[e.jsx("div",{className:"flex flex-col justify-center p-8 md:p-12",children:e.jsxs("div",{className:"max-w-md",children:[e.jsx("h1",{className:"text-3xl font-semibold mb-4",children:"Try CartStack for Free"}),e.jsxs("p",{className:"mb-6",children:["Recover unlimited orders ",e.jsx("span",{className:"underline",children:"free for 14"}
1)," days",e.jsx("br",{}),"We'll even help with the setup."]}),e.jsxs("ul",{className:"space-y-3",children:[e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(o,{className:"w-5 h-5 text-emerald-500"}),e.jsx("span",{children:"Quick & easy installation"})]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(o,{className:"w-5 h-5 text-emerald-500"}),e.jsx("span",{children:"$1,000 in guaranteed recovered revenue"})]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(o,{className:"w-5 h-5 text-emerald-500"}),e.jsx("span",{children:"No credit card required"})]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(o,{className:"w-5 h-5 text-emerald-500"}),e.jsx("span",{children:"Free setup assistance & support"})]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(o,{className:"w-5 h-5 text-emerald-500"}),e.jsx("span",{children:"Access to all basic + pro features"})]})]})]})}),e.jsx("div",{className:"flex flex-col justify-center p-8 md:p-12 bg-gray-50",children:e.jsxs("form",{className:"max-w-md mx-auto w-full",onSubmit:$,children:[C&&!0&&e.jsx("div",{className:"mb-4 max-w-[325px] mx-auto",children:e.jsx("p",{className:"text-red-500 text-sm",children:C})}),e.jsxs("div",{className:"mb-4",children:[e.jsx(d,{htmlFor:"fullName",className:"text-sm font-medium",children:"Full Name"}),e.jsx(x,{id:"fullName",type:"text",name:"fullName",onChange:t=>i("fullName",t.target.value),value:s.fullName,placeholder:"i.e. Michael Scott",className:"mt-1 bg-white"}),e.jsx(f,{message:c.fullName,className:"mt-2"})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx(d,{htmlFor:"workEmail",className:"text-sm font-medium",children:"Work Email"}),e.jsx(x,{id:"workEmail",type:"email",name:"workEmail",onChange:t=>i("workEmail",t.target.value),value:s.workEmail,placeholder:"i.e. [email protected]",className:"mt-1 bg-white"}),e.jsx(f,{message:c.workEmail,className:"mt-2"})]}),e.jsx(r,{type:"submit",className:"w-full py-2 bg-emerald-600 hover:bg-emerald-700 text-white",disabled:k,children:k?e.jsx(A,{}):"Get Started"})]})})]})})})},"content")}),a===2&&e.jsx(y,{mode:"wait",children:e.jsx(b.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:p?.2:0},children:e.jsx("div",{className:"max-w-3xl mx-auto px-4 py-8",children:e.jsxs("div",{className:"bg-white rounded-lg p-8",children:[e.jsx("h2",{className:"text-3xl font-medium text-center text-gray-700 mb-6",children:"Tell us a bit about yourself..."}),E(),e.jsx("h3",{className:"text-xl font-medium text-center mb-6",children:"What is your business type?"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:`border rounded-lg overflow-hidden ${s.businessType==="ecommerce"?"border-emerald-500":"border-gray-200"}`,children:[e.jsxs("div",{className:`p-4 cursor-pointer flex items-center ${s.businessType==="ecommerce"?"bg-gray-50":""}`,onClick:()=>j("ecommerce"),children:[e.jsx("div",{className:"flex-shrink-0 mr-4",children:e.jsx("div",{className:"w-20 h-20 bg-gray-100 rounded flex items-center justify-center",children:e.jsx("img",{src:H,alt:"Ecommerce",className:"w-16 h-16"})})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-lg font-medium",children:"Ecommerce"}),e.jsx("p",{className:"text-gray-500",children:"For online retailers to recover abandoned cart revenue."})]})]}),s.businessType==="ecommerce"&&e.jsxs("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:[e.jsx("h5",{className:"font-medium mb-3",children:"What best describes your business?"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("single"),children:["I manage one website.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]}),e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("multiple"),children:["I manage multiple websites.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]}),e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("agency"),children:["I am with an agency, managing multiple websites.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})]})]})]}),e.jsxs("div",{className:`border rounded-lg overflow-hidden ${s.businessType==="hotel"?"border-emerald-500":"border-gray-200"}`,children:[e.jsxs("div",{className:`p-4 cursor-pointer flex items-center ${s.businessType==="hotel"?"bg-gray-50":""}`,onClick:()=>j("hotel"),children:[e.jsx("div",{className:"flex-shrink-0 mr-4",children:e.jsx("div",{className:"w-20 h-20 bg-gray-100 rounded flex items-center justify-center",children:e.jsx("img",{src:D,alt:"Hospital
1ity",className:"w-16 h-16"})})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-lg font-medium",children:"Hospitality"}),e.jsx("p",{className:"text-gray-500",children:"For hotels, b&bs and vacation rentals to recover abandoned booking revenue."})]})]}),s.businessType==="hotel"&&e.jsxs("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:[e.jsx("h5",{className:"font-medium mb-3",children:"What best describes your business?"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("single"),children:["I represent one property.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]}),e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("multiple"),children:["I represent multiple properties.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]}),e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("agency"),children:["I am with an agency, representing multiple properties.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})]})]})]}),e.jsxs("div",{className:`border rounded-lg overflow-hidden ${s.businessType==="ticketing"?"border-emerald-500":"border-gray-200"}`,children:[e.jsxs("div",{className:`p-4 cursor-pointer flex items-center ${s.businessType==="ticketing"?"bg-gray-50":""}`,onClick:()=>j("ticketing"),children:[e.jsx("div",{className:"flex-shrink-0 mr-4",children:e.jsx("div",{className:"w-20 h-20 bg-gray-100 rounded flex items-center justify-center",children:e.jsx("img",{src:q,alt:"Ticketing",className:"w-16 h-16"})})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-lg font-medium",children:"Ticketing"}),e.jsx("p",{className:"text-gray-500",children:"For museums, attractions, theatres, theme parks, venues, festivals and all things ticketed!"})]})]}),s.businessType==="ticketing"&&e.jsxs("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:[e.jsx("h5",{className:"font-medium mb-3",children:"What best describes your business?"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("single"),children:["I manage one website.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]}),e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("multiple"),children:["I manage multiple websites.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]}),e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("agency"),children:["I am with an agency, managing multiple websites.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})]})]})]}),e.jsxs("div",{className:`border rounded-lg overflow-hidden ${s.businessType==="other"?"border-emerald-500":"border-gray-200"}`,children:[e.jsxs("div",{className:`p-4 cursor-pointer flex items-center ${s.businessType==="other"?"bg-gray-50":""}`,onClick:()=>j("other"),children:[e.jsx("div",{className:"flex-shrink-0 mr-4",children:e.jsx("div",{className:"w-20 h-20 bg-gray-100 rounded flex items-center justify-center",children:e.jsx("img",{src:G,alt:"Other",className:"w-16 h-16"})})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-lg font-medium",children:"Other"}
1),e.jsx("p",{className:"text-gray-500",children:"I want to recover abandoned form submissions."})]})]}),s.businessType==="other"&&e.jsxs("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:[e.jsx("h5",{className:"font-medium mb-3",children:"What best describes your business?"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("single"),children:["I manage one website.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]}),e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("multiple"),children:["I manage multiple websites.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]}),e.jsxs(r,{variant:"outline",className:"w-full justify-between text-left h-auto py-3 font-normal",onClick:()=>l("agency"),children:["I am with an agency, managing multiple websites.",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})]})]})]})]})]})})},"content")}),a===3&&e.jsx(y,{mode:"wait",children:e.jsx(b.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:p?.2:0},children:e.jsx("div",{className:"max-w-3xl mx-auto px-4 py-8",children:e.jsxs("div",{className:"bg-white rounded-lg p-8",children:[e.jsx("h2",{className:"text-3xl font-medium text-center text-gray-700 mb-6",children:"You're almost there!"}),E(),e.jsx("form",{onSubmit:t=>{if(t.preventDefault(),s.password!==s.passwordConfirmation){i("passwordConfirmation","");return}w()},children:e.jsxs("div",{className:"max-w-lg mx-auto space-y-8",children:[e.jsxs("div",{children:[e.jsx(d,{htmlFor:"companyName",className:"font-medium block mb-4",children:"Enter Company Name"}),e.jsx(x,{id:"companyName",type:"text",name:"companyName",value:s.companyName,onChange:t=>i("companyName",t.target.value),placeholder:"Your Organization Name",className:"mb-1",required:!0}),e.jsx(f,{message:c.companyName,className:"mt-1"})]}),e.jsxs("div",{children:[e.jsx(d,{htmlFor:"password",className:"font-medium block mb-4",children:"Set Your Account Password"}),e.jsx(x,{id:"password",type:"password",name:"password",value:s.password,onChange:t=>i("password",t.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"mb-1",required:!0,minLength:6}),e.jsx(f,{message:c.password,className:"mt-1"})]}),e.jsxs("div",{children:[e.jsx(d,{htmlFor:"passwordConfirmation",className:"font-medium block mb-4",children:"Verify Account Password"}),e.jsx(x,{id:"passwordConfirmation",type:"password",name:"passwordConfirmation",value:s.passwordConfirmation,onChange:t=>i("passwordConfirmation",t.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"mb-1",required:!0}),s.password!==s.passwordConfirmation&&s.passwordConfirmation!==""&&e.jsx("p",{className:"text-red-500 text-sm mt-1",children:"Passwords do not match"})]}),e.jsxs("div",{children:[e.jsx(d,{className:"font-medium block text-center mb-4",children:"About how many transactions does your site process each month?"}),e.jsx("div",{className:"flex flex-wrap justify-center gap-2 mt-4",children:[{value:"0-100",label:"0 - 100"},{value:"100-300",label:"100 - 300"},{value:"300-1000",label:"300 - 1000"},{value:"1000-5000",label:"1000 - 5000"},{value:"5000+",label:"5000+"},{value:"not-sure",label:"Not Sure"}].map(t=>e.jsx(r,{type:"button",variant:s.transactionVolume===t.value?"default":"outline",className:`border rounded-md px-4 py-2 min-w-24 ${s.transactionVolume===t.value?"bg-emerald-600 hover:bg-emerald-700 text-white":"hover:bg-gray-100"}`,onClick:()=>i("transactionVolume",t.value),children:t.label},t.value))}),c.transactionVolume&&e.jsx("p",{className:"text-red-500 text-sm mt-2 text-center",children:c.transactionVolume})]}),e.jsx("div",{className:"flex justify-center mt-10",children:e.jsxs(r,{type:"submit",className:"px-8 py-3 bg-emerald-600 hover:bg-emerald-700 text-white font-medium flex items-center gap-2",disabled:!s.companyName||!s.password||!s.passwordConfirmation||s.password!==s.passwordConfirmation||!s.transactionVolume,children:["Complete Setup",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-1",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})]})})]})})]})})},"content")}),a===4&&e.jsx(y,{mode:"wait",children:e.jsx(b.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5,delay:p?.2:0},children:e.jsx("div",{className:"max-w-3xl mx-auto px-4 py-8",children:e.jsxs("div",{className:"bg-white rounded-lg p-8",children:[e.jsx("h2",{className:"text-3xl font-medium text-center text-gray-700 mb-2",children:"Welcome to Cartstack"}),e.jsxs("div",{className:"py-10",children:[e.jsx(P,{}),e.jsx("p",{className:"text-center",children:"We are setting things up. Hold on!"})]})]})})},"content")})]})};export{de as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.