1import{j as e,R as q,r}from"./vendor-react-Dw2zQmPu.js";import{O as ce}from"./OnboardingScreenShell-QQdBq0Ts.js";import{O as ue}from"./OnboardingScreenHeader-BYUwEOiv.js";import{O as de}from"./OnboardingAgentAvatar-oVOLBIA0.js";import{O as me}from"./OnboardingPrimaryButton-BxuoqTip.js";import{O as he}from"./OnboardingCtaSlot-B_VkJae-.js";import{O as be}from"./OnboardingScrollDownOverlay-D90EAqNx.js";import{c as d}from"./app-cn-C2LL9ulS.js";import{A as L,ae as xe,C as ge,ch as pe,I as fe,h as F,U as W,_ as ve,dr as U,ds as ye,H as we,dt as je,s as ke,ck as Se,du as Ce,dv as Ne,cc as Oe,dw as Ee,dx as K,cI as Ae,dy as Pe,dz as Ie,dA as Re,dB as Te,dC as We,bV as Me,dD as _e,aM as De,dE as Le,y as Ge,ak as Be,al as He}from"./vendor-ui-mAy9LocR.js";import{a as qe}from"./vendor-tanstack-Dk5vt_tN.js";import{f8 as Fe,O as Ue}from"./app-shared-QFLrTdTF.js";import{N as Ke,l as G}from"./app-core-DTTgVEgu.js";import"./commonjs-helpers-C05_-Ghz.js";import"./motion-9itTRuGW.js";import"./agentConstants-C28VuIYR.js";import"./ButtonLoadingDots-CPjBe4by.js";import"./OnboardingBackButton-5RsA4hRY.js";import"./button-CFi0D1K4.js";import"./vendor-radix-guzGw5-0.js";import"./vendor-router-CtopkIuN.js";import"./vendor-lodash-DVjWl2dU.js";import"./vendor-utils-CQ_dDVxl.js";import"./vite-preload-helper-BXl3LOEh.js";import"./vendor-redux-CqVJnD2r.js";const V={2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5"};function M({option:a,selected:s,onClick:o,mode:t="radio",className:l}){return e.jsxs("button",{type:"button",onClick:o,"aria-pressed":s,className:d("flex cursor-pointer flex-col gap-3 rounded-2xl border p-4 text-left shadow-xs transition-[color,background-color,border-color,transform] ease-emphasized duration-(--motion-fast) focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-violet-300 active:scale-[0.98]",s?"border-violet-600 bg-violet-200":"border-neutral-200 bg-white hover:border-violet-400",l),children:[e.jsxs("span",{className:"flex h-4 items-center justify-between gap-2",children:[a.icon?e.jsx(a.icon,{className:"h-4 w-4 text-violet-600"}):e.jsx("span",{"aria-hidden":!0,className:"h-4 w-4"}),t==="checkbox"?e.jsx("span",{className:d("flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border shadow-xs transition-colors",s?"border-violet-600 bg-violet-600":"border-neutral-200 bg-white"),children:s&&e.jsx(ge,{className:"h-3 w-3 text-white"})}):e.jsx("span",{className:d("flex h-4 w-4 shrink-0 items-center justify-center rounded-full border shadow-xs transition-colors",s?"border-violet-600 bg-white":"border-neutral-200 bg-white"),children:s&&e.jsx("span",{className:"h-2 w-2 rounded-full bg-violet-600"})})]}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-bold leading-[1.6] tracking-[-0.02em] text-gray-900",children:a.label}),e.jsx("span",{className:"text-xs leading-[1.6] tracking-[-0.02em] text-gray-600",children:a.hint})]})]})}function N({value:a,options:s,onChange:o,cols:t}){return e.jsx("div",{className:d("grid grid-cols-2 gap-3",V[t]),children:s.map(l=>e.jsx(M,{option:l,selected:a===l.value,onClick:()=>o(l.value)},l.value))})}function B({selected:a,options:s,onToggle:o,cols:t}){return e.jsx("div",{className:d("grid grid-cols-2 gap-3",V[t]),children:s.map(l=>e.jsx(M,{option:l,selected:a.includes(l.value),onClick:()=>o(l.value),mode:"checkbox"},l.value))})}function Ve({options:a,selected:s,onToggle:o}){return e.jsx("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-stretch",children:a.map((t,l)=>{const h=s.includes(t.value),b=h?{animation:"arrow-flow 1.1s ease-in-out infinite"}:void 0;return e.jsxs(q.Fragment,{children:[e.jsx(M,{option:t,selected:h,onClick:()=>o(t.value),mode:"checkbox",className:"flex-1"}),l<a.length-1&&e.jsxs("div",{className:"flex items-center justify-center text-violet-600","aria-hidden":!0,children:[e.jsx(L,{className:"hidden sm:block h-5 w-5 shrink-0",style:b}),e.jsx("span",{className:"sm:hidden rotate-90",children:e.jsx(L,{className:"h-5 w-5 shrink-0",style:b})})]})]},t.value)})})}function m({label:a,hint:s,required:o,error:t,children:l}){return e.jsxs("div",{className:"flex w-full flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("label",{className:"text-base font-bold leading-[1.3] tracking-[-0.32px] text-gray-900",children:[a,o&&e.jsx("span",{className:"text-violet-600",children:" *"})]}),s&&e.jsx("p",{className:"text-xs leading-[1.6] tracking-[-0.02em] text-gray-600",children:s})]}),l,t&&e.jsx("p",{className:"text-xs leading-[1.4] text-red-600",children:t})]})}const R="inline-flex h-9 cursor-pointer items-center gap-2 rounded-md border px-3 text-xs font-medium tracking-[-0.02em] transition-[color,background-color,border-color,transform] ease-emphasized duration-(--motion-fast) focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-violet-300 active:scale-[0.98]",T="border-violet-600 bg-violet-600 text-white",z="border-neutral-200 bg-white text-gray-900 hover:border-violet-400";function ze({options:a,selected:s,onToggle:o}){return e.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(t=>e.jsxs("button",{type:"button",onClick:()=>o(t.value),"aria-pressed":s.includes(t.value),className:d(R,s.includes(t.value)?T:z),children:[t.icon&&e.jsx(t.icon,{className:"h-4 w-4 shrink-0"}),t.label]},t.value))})}function Je({options:a,selected:s,onToggle:o,placeholder:t}){const[l,h]=r.useState(""),b=s.filter(n=>!a.some(O=>O.value===n)),p=r.useCallback(()=>{const n=l.trim();n&&!s.includes(n)&&o(n),h("")},[l,s,o]),w=r.useCallback(n=>{n.key==="Enter"&&(n.preventDefault(),p())},[p]);return e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex flex-wrap gap-3",children:[a.map(n=>e.jsxs("button",{type:"button",onClick:()=>
1o(n.value),"aria-pressed":s.includes(n.value),className:d(R,s.includes(n.value)?T:z),children:[n.icon&&e.jsx(n.icon,{className:"h-4 w-4 shrink-0"}),n.label]},n.value)),b.map(n=>e.jsxs("button",{type:"button",onClick:()=>o(n),className:d(R,T),children:[n," ",e.jsx("span",{"aria-hidden":!0,children:"Ã"})]},n))]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("input",{type:"text",value:l,onChange:n=>h(n.target.value),onKeyDown:w,placeholder:t,className:"h-9 w-full min-w-0 max-w-[324px] flex-1 rounded-md border border-neutral-200 bg-white px-3 text-sm tracking-[-0.02em] text-gray-900 shadow-xs transition-colors duration-(--motion-fast) placeholder:text-gray-400 focus:border-violet-600 focus:outline-none focus:ring-1 focus:ring-violet-300"}),e.jsxs("button",{type:"button",onClick:p,disabled:!l.trim(),className:d("flex h-9 shrink-0 items-center gap-2 rounded-md px-4 text-sm font-semibold tracking-[-0.02em] transition-colors duration-(--motion-fast)",l.trim()?"cursor-pointer bg-violet-200 text-gray-900 shadow-xs hover:bg-violet-300":"cursor-not-allowed bg-violet-100 text-gray-400"),children:[e.jsx(xe,{className:"h-4 w-4"}),"Add new"]})]})]})}function Qe(){const a=Ke()||"",s=qe({mutationKey:[Ue.SET_WEBSITE_PREFERENCES],mutationFn:Fe});return{submitPreferences:r.useCallback(async t=>{if(!a)return G.error("putWebsitePreferences skipped â no locationEntityId"),!1;try{return await s.mutateAsync({entityId:a,preferences:t}),!0}catch(l){return G.error("putWebsitePreferences failed",l),!1}},[s,a]),isSubmitting:s.isPending}}const I=[{value:"african",label:"African American",hint:"Mostly African American"},{value:"european",label:"Caucasian",hint:"Mostly Caucasian"},{value:"hispanic",label:"Hispanic / Latino",hint:"Mostly Hispanic"},{value:"east-asian",label:"East Asian",hint:"Mostly East Asian"},{value:"south-asian",label:"South Asian",hint:"Mostly South Asian"},{value:"middle-eastern",label:"Middle Eastern",hint:"Mostly Middle Eastern"},{value:"diverse",label:"A mix",hint:"All backgrounds"}],Ye=[{value:"single-owner",label:"Just me",hint:"solo owner",icon:W},{value:"team",label:"A Team",hint:"me + team",icon:ve}],Ze=[{value:"own",label:"My Photos",hint:"use mine first",icon:pe},{value:"stock",label:"Zoca Library",hint:"ready-made",icon:fe},{value:"ai",label:"AI Made",hint:"made to match",icon:F}],Xe=[{value:"women",label:"Women",hint:"Images will mostly show women",icon:U},{value:"men",label:"Men",hint:"Images will mostly show men",icon:W},{value:"everyone",label:"A mix",hint:"Images will show a mix of everyone",icon:ye}],$e=[{value:"people",label:"People",icon:W},{value:"results",label:"Service results",icon:F},{value:"space",label:"Our space",icon:we},{value:"interior",label:"Interior",icon:je},{value:"exterior",label:"Exterior",icon:ke},{value:"services",label:"Services",icon:Se},{value:"products",label:"Products",icon:Ce}],es=[{value:"friendly",label:"Friendly",hint:"warm",icon:Ne},{value:"casual",label:"Chill",hint:"relaxed",icon:Oe},{value:"professional",label:"Pro",hint:"polished",icon:Ee},{value:"luxurious",label:"Formal",hint:"refined",icon:K},{value:"playful",label:"Playful",hint:"fun",icon:Ae}],ss={friendly:"Welcome! We're so glad you found us. Let's get you booked for your next visit.",professional:"Our experienced team delivers exceptional results. Schedule your appointment today.",casual:"Hey there! Ready to look and feel amazing? Come on in â we'd love to see you.",luxurious:"Indulge in a bespoke experience crafted exclusively for you. Reserve your session.",playful:"Life's too short for boring hair! Let's shake things up â book your glow-up now!"},as=[{value:"pet-friendly",label:"Pet-friendly",icon:Pe},{value:"kid-friendly",label:"Kid-friendly",icon:Ie},{value:"wheelchair-accessible",label:"Accessible",icon:Re},{value:"lgbtq-friendly",label:"LGBTQ+ friendly",icon:Te},{value:"women-only",label:"Women-only",icon:U},{value:"eco-friendly",label:"Eco-friendly",icon:We},{value:"luxury-premium",label:"Luxury",icon:K},{value:"budget-friendly",label:"Budget-friendly",icon:Me},{value:"walk-ins-welcome",label:"Walk-ins",icon:_e},{value:"appointment-only",label:"Appointment-only",icon:De},{value:"free-parking",label:"Free parking",icon:Le},{value:"card-payments",label:"Card payments",icon:Ge},{value:"digital-wallets",label:"Digital wallets",icon:Be},{value:"buy-now-pay-later",label:"Buy now, pay later",icon:He}],H="single-owner",y=(a,s)=>a.includes(s)?a.filter(o=>o!==s):[...a,s];function ts({imageSource:a,providerRepresentation:s,clientRepresentation:o,clientGender:t,operatingModel:l,contentTone:h,imageSubjects:b,attributes:p,onUp
1dateData:w,onNext:n,onBack:O}){const[x,J]=r.useState(()=>{const i=a||[];return i.includes("own")?i:["own",...i]}),[f,E]=r.useState(s||[]),[j,Q]=r.useState(o||[]),[k,Y]=r.useState(t),[v,Z]=r.useState(l),[g,X]=r.useState(h),[S,$]=r.useState(b||[]),[C,ee]=r.useState(p||[]),{submitPreferences:_,isSubmitting:A}=Qe(),u=x.includes("ai")||x.includes("stock"),se={imageSource:x.length===0,operatingModel:!v,providerRepresentation:u&&f.length===0,clientRepresentation:u&&j.length===0,clientGender:u&&!k,imageSubjects:u&&S.length===0,contentTone:!g},P=!Object.values(se).some(Boolean),ae=r.useCallback(i=>{i!=="own"&&J(c=>y(c,i))},[]),te=r.useCallback(i=>E(c=>y(c,i)),[]),le=r.useCallback(i=>Q(c=>y(c,i)),[]),ne=r.useCallback(i=>$(c=>y(c,i)),[]),ie=r.useCallback(i=>ee(c=>y(c,i)),[]),D=v===H,oe=r.useCallback(i=>{Z(i),i===H&&E(c=>c.length>1?[c[0]]:c)},[]),re=r.useCallback(async()=>{if(A||!P)return;const i={imageSource:x,providerRepresentation:u?f:[],clientRepresentation:u?j:[],clientGender:u?k:"",operatingModel:v,contentTone:g,imageSubjects:u?S:[],attributes:C};w({...i,websiteAttributes:C,websitePreferencesCollected:!0}),await _(i),n()},[A,P,x,u,f,j,k,v,g,S,C,w,_,n]);return e.jsxs("div",{className:"flex-1 flex flex-col relative min-h-0 h-full overflow-auto",children:[e.jsxs(ce,{className:"gap-8 pb-[104px] sm:gap-12 sm:pb-12",children:[e.jsxs("div",{className:"flex w-full max-w-onboarding flex-col items-start gap-8 text-left",children:[e.jsx(de,{agent:"discovery",message:"Answer a few quick questions and I'll create website pages, blog posts, and Google updates that match your brand."}),e.jsx(ue,{title:"Make it yours!",subtitle:"Pick your vibe, we'll handle the pics and words for your site and blog"})]}),e.jsxs("div",{className:"flex w-full max-w-onboarding flex-col gap-8",children:[e.jsx(m,{label:"Where do your pics come from? (pick any)",hint:"We try them in order - yours first, our library next, then AI fills the gaps",required:!0,children:e.jsx(Ve,{options:Ze,selected:x,onToggle:ae})}),e.jsx(m,{label:"Solo, or a Squad?",required:!0,children:e.jsx(N,{value:v,options:Ye,onChange:oe,cols:2})}),u&&e.jsxs(e.Fragment,{children:[e.jsx(m,{label:D?"How do you want to appear in images?":"How should your team appear in images?",hint:"We'll match stock and AI-generated images to your selection.",required:!0,children:D?e.jsx(N,{value:f[0]||"",options:I,onChange:i=>E([i]),cols:4}):e.jsx(B,{selected:f,options:I,onToggle:te,cols:4})}),e.jsx(m,{label:"What do your typical customers look like?",hint:"We'll pick the right people for your marketing images.",required:!0,children:e.jsx(B,{selected:j,options:I,onToggle:le,cols:4})}),e.jsx(m,{label:"Who are your customers?",hint:"Helps us choose the right look for your images.",required:!0,children:e.jsx(N,{value:k,options:Xe,onChange:Y,cols:3})}),e.jsx(m,{label:"What should your images show?",hint:"Pick the subjects that best represent your business.",required:!0,children:e.jsx(ze,{options:$e,selected:S,onToggle:ne})})]}),e.jsx(m,{label:"What's your vibe? (how we sound)",required:!0,children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(N,{value:g,options:es,onChange:X,cols:4}),g&&e.jsxs("p",{className:"rounded-xl border border-neutral-200 bg-gray-100 px-4 py-3 text-sm italic leading-[1.6] tracking-[-0.02em] text-gray-600",children:[e.jsx("span",{className:"not-italic font-medium text-gray-900",children:"Example: "}),ss[g]]})]})}),e.jsx(m,{label:e.jsxs(e.Fragment,{children:["Anything else? ",e.jsx("span",{className:"font-normal text-gray-600",children:"(optional)"})]}),children:e.jsx(Je,{options:as,selected:C,onToggle:ie,placeholder:"Add your ownâ¦"})})]}),e.jsx(he,{onBack:O,children:e.jsx(me,{onClick:re,loading:A,disabled:!P,children:"Continue"})})]}),e.jsx(be,{})]})}const Es=q.memo(ts);export{Es 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.