1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8833],{34089:(e,t,s)=>{s.d(t,{$i:()=>r,M4:()=>n,dB:()=>o});let a="Yesoma AI gives general guidance based on what you describe â don't share passwords, payment details, or private customer information.",r={landing:{persona:"sales",eyebrow:"Ask Yesoma AI",headline:"Ask Yesoma AI what your business may be losing in messy messages.",subheadline:"Tell Yesoma AI your business type and see how lost inquiries, missed follow-ups, quote gaps, and customer silence may be costing you revenue.",placeholder:"Ask how Yesoma would work for your businessâ¦",prompts:["How would Yesoma help my med spa?","How would Yesoma help my salon?","How would Yesoma help my real estate business?","How do I stop losing leads in Instagram DMs?","What is Lead Leak Radar?","Which Yesoma plan fits my team?"],ctas:[{key:"audit",label:"Get a free Lead Leak Audit",href:"/lead-leak-audit"},{key:"demo",label:"Book a demo",href:"/contact-sales?plan=Demo"},{key:"features",label:"View features",href:"/features"},{key:"pricing",label:"View pricing",href:"/pricing"},{key:"start",label:"Start free",href:"/sign-up"}],defaultCtaKey:"audit",trustNote:a,intent:"Help a prospect understand what their service business may be losing in scattered messages, and how Yesoma recovers it. End every answer pointing to a concrete next step."},about:{persona:"sales",eyebrow:"Ask Yesoma AI",headline:"Ask what Yesoma Intelligence can do.",subheadline:"See how Yesoma understands customer context, grounds its recommendations, explains its reasoning, and turns signals into reviewable next actions.",placeholder:"Ask how Yesoma Intelligence worksâ¦",prompts:["How is Yesoma AI different from a chatbot?","How does Business Brain keep answers grounded?","What customer signals can Yesoma explain?","What does Yesoma learn from reviewed work?","Does Yesoma send customer replies on its own?"],ctas:[{key:"start",label:"Start free",href:"/sign-in"},{key:"features",label:"Explore the platform",href:"/features"},{key:"pricing",label:"View pricing",href:"/pricing"},{key:"audit",label:"Get a free Lead Leak Audit",href:"/lead-leak-audit"}],defaultCtaKey:"features",trustNote:a,intent:"Explain how Yesoma Intelligence reconstructs customer context, uses reviewed Business Brain knowledge, exposes evidence and uncertainty, learns from supervised edits, and prepares accountable next actions. Make clear that this public assistant gives general guidance and cannot inspect a prospect's workspace or private customer data."},features:{persona:"sales",eyebrow:"Ask Yesoma AI",headline:"Ask how Yesoma would run your customer operation.",subheadline:"Explore the workflow behind Yesoma Intelligence, Business Brain, shared Cases, governed replies, follow-ups, and revenue visibility.",placeholder:"Ask how Yesoma worksâ¦",prompts:["How does Yesoma Intelligence choose the next move?","How does Business Brain keep replies grounded?","How do teams share Case ownership?","How does Revenue Leak Radar use evidence?","When does Yesoma require human approval?"],ctas:[{key:"start",label:"Start free",href:"/sign-in"},{key:"pricing",label:"View pricing",href:"/pricing"},{key:"audit",label:"Get a free Lead Leak Audit",href:"/lead-leak-audit"}],defaultCtaKey:"start",trustNote:a,intent:"Explain how a specific Yesoma capability fits into the connected customer-operation loop: capture context, understand the relationship, show the evidence, assign the next move, keep human review, and measure the outcome. Be concrete and distinguish available, configured, and managed channel behavior honestly."},pricing:{persona:"sales",eyebrow:"Ask Yesoma AI",headline:"Ask Yesoma AI which plan fits your team.",subheadline:"Describe your team and how you handle customers â Yesoma AI will point you to the plan that fits, and what you can grow into.",placeholder:"Ask which plan fits your teamâ¦",prompts:["Which plan is best for a 3-person team?","Do I need Yesoma Academy?","What plan should a med spa start with?","Can I start small and upgrade later?","What happens when my team grows?"],ctas:[{key:"start",label:"Start free",href:"/sign-up"},{key:"compare",label:"Compare all plans",href:"/pricing/compare"},{key:"sales",label:"Talk to sales",href:"/contact-sales?plan=enterprise"},{key:"demo",label:"Book a demo",href:"/contact-sales?plan=Demo"}],defaultCtaKey:"start",trustNote:a,intent:"Recommend the right Yesoma plan for the prospect's team size and needs. Be decisive: name a plan and say why, and note what they can upgrade into."},academy:{persona:"sales",eyebrow:"Ask Yesoma AI",headline:"Ask how Yesoma Academy trains your team.",subheadline:"See which courses to assign, how managers track progress, and how Academy lifts your customer service and security.",placeholder:"Ask how Yesoma Academy worksâ¦",prompts:["What courses should I assign to new staff?","Can managers track course completion?","How does Yesoma Academy help customer service teams?","What security courses are included?","Can Academy train staff on phishing and scams?"],ctas:[{key:"academy",label:"Explore Academy",href:"/academy"},{key:"pricing",label:"View pricing",href:"/pricing"},{key:"start",label:"Start free",href:"/sign-up"}],defaultCtaKey:"academy",trustNote:a,intent:"Recommend Yesoma Academy courses and explain how team training + manager tracking work. Suggest a starting set of courses when relevant."},industry:{persona:"sales",eyebrow:"Ask Yesoma AI",headline:"See how Yesoma works for a business like yours.",subheadline:"Yesoma AI knows where service businesses lose inquiries â and how teams like yours recover them.",placeholder:"Ask how Yesoma would work for your businessâ¦",prompts:["How does Yesoma recover missed consults?","How does Yesoma track follow-ups after pricing questions?","How can my front desk use Yesoma?","How does Yesoma help me respond faster?"],ctas:[{key:"audit",label:"Get a free Lead Leak Audit",href:"/lead-leak-audit"},{key:"demo",label:"Book a demo",href:"/contact-sales?plan=Demo"},{key:"features",label:"Explore features",href:"/features"},{key:"start",label:"Start free",href:"/sign-up"}],defaultCtaKey:"audit",trustNote:a,intent:"Give an industry-specific use case: where this kind of business loses inquiries and how Yesoma recovers them. End with a next step."},help:{persona:"support",eyebrow:"Ask Yesoma AI",headline:"Ask Yesoma AI",subheadline:"Get instant, step-by-step help using Yesoma â setting up your workspace, managing cases, follow-ups, team members, templates, and Academy.",placeholder:"Ask how to use Yesomaâ¦",prompts:["How do I create a case?","How do I search by case number?","How do I assign a case to a team member?","How do I create a follow-up?","How do I add a team member?","How do I assign an Academy course?","How do I use templates?","How do I update my review links?","How do I connect email forwarding?"],ctas:[{key:"contact",label:"Contact support",href:"/docs/contact"},{key:"settings",label:"Go to settings",href:"/settings"},{key:"academy",label:"Open Academy",href:"/academy"}],defaultCtaKey:"contact",trustNote:"For account-specific help, contact support. Never share passwords or codes here.",intent:"Give practical, step-by-step product help: where to click, what to do. Link the most relevant Docs guide. No sales language."}};function n(e){return"/"===e?"landing":"/about"===e?"about":"/features"===e||e.startsWith("/features/")?"features":"/pricing"===e||e.startsWith("/pricing/")?"pricing":"/docs"===e?null:e.startsWith("/docs/")?"help":"/trust"===e||"/privacy"===e||"/terms"===e||"/whatsapp-policy"===e||"/whatsapp-acceptable-use"===e||"/whatsapp-setup"===e?"landing":null}function o(e,t){let s=r[e];return s.ctas.find(e=>e.key===t)??s.ctas.find(e=>e.key===s.defaultCtaKey)??s.ctas[0]}},48833:(e,t,s)=>{s.d(t,{_4:()=>T,qF:()=>S});var a=s(95155),r=s(12115),n=s(98500),o=s.n(n),l=s(86272),i=s(92298),d=s(65408),c=s(8962),p=s(19805),u=s(38158),m=s(5736),h=s(90467),x=s(64577),f=s(11012),g=s(50981),y=s(12363),b=s(1275),w=s(99314),k=s(9083),v=s(79122),j=s(34089),N=s(83848),A=s(78538);let I="<<<YESOMA_META>>>";function Y(e){return e.scrollHeight-e.clientHeight-e.scrollTop>24}function S({context:e,businessType:t,variant:s="section",className:n,expanded:h=!1,onExpandedChange:x}){let f=j.$i[e],g="compact"===s,[y,b]=(0,r.useState)([]),[w,k]=(0,r.useState)(""),[A,T]=(0,r.useState)(!1),[D,_]=(0,r.useState)(!1),[E,L]=(0,r.useState)(!1),B=(0,r.useRef)(null),U=(0,r.useRef)(null),q=(0,r.useRef)("none"),O=(0,r.useRef)(null);function $(){q.current="none"}function K(e){b(t=>{let s=[...t],a=s.length-1;return a>=0&&"assistant"===s[a].role&&(s[a]={...s[a],...e}),s})}async function M(s){let a=s.trim();if(!a||A)return;k(""),T(!0),q.current="answer",L(!1);let r=y.filter(e=>e.text.trim()&&!e.error).map(e=>({role:e.role,content:e.text}));r.push({role:"user",content:a}),b(e=>[...e,{role:"user",text:a,done:!0},{role:"assistant",text:"",done:!1}]);try{let s=await fetch("/api/ask",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({context:e,businessType:t,messages:r})});if(!s.ok||!s.body){let e=await s.json().catch(()=>({}));K({text:e.error||"Yesoma AI couldn't answer that â try again.",done:!0,error:!0});return}let a=(0,N.qy)(s.headers.get(N.EI)),n=s.headers.get(N.fd),o=s.body.getReader(),l=new TextDecoder,i="";for(;;){let{value:e,done:t}=await o.read();if(t)break;
1i+=l.decode(e,{stream:!0}),K({text:(function(e,t){let s=e.indexOf(t);if(s>=0)return e.slice(0,s);for(let s=Math.min(e.length,t.length-1);s>0;s--)if(e.endsWith(t.slice(0,s)))return e.slice(0,e.length-s);return e})(i,I).trimStart()})}let d=i.indexOf(I),c=(d>=0?i.slice(0,d):i).trim(),p=null,u=[],m=!1,h=[],x=[],g=[];if(d>=0)try{let t=JSON.parse(i.slice(d+I.length).trim());"guide"===t.cta&&"string"==typeof t.guideSlug&&t.guideSlug?p={label:"Read the guide",href:`/docs/${t.guideSlug}`}:t.cta&&"null"!==t.cta&&(p=(0,j.dB)(e,t.cta)),Array.isArray(t.followUps)&&(u=t.followUps.filter(e=>"string"==typeof e&&e.trim().length>0).slice(0,3)),!0===t.capture&&(m=!0),h=R(t.sourceSlugs,4,120),x=R(t.unsupportedDetails,4,240),g=R(t.conflicts,4,240)}catch{}u.length||(u=f.prompts.slice(0,3)),K({text:c||"Sorry â I didn't catch that. Could you rephrase?",cta:p,followUps:u,capture:m,answerId:n,evidence:a,sourceSlugs:h,unsupportedDetails:x,conflicts:g,done:!0})}catch{K({text:"Network hiccup â please try again.",done:!0,error:!0})}finally{T(!1),O.current?.focus()}}async function F(s,a){let r=y.filter(e=>e.text.trim()&&!e.error).map(e=>`${"user"===e.role?"User":"Yesoma AI"}: ${e.text}`).join("\n\n");try{if((await fetch("/api/ask/lead",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:s,name:a,businessType:t,context:e,transcript:r})})).ok)return _(!0),!0;return!1}catch{return!1}}(0,r.useEffect)(()=>{let e=window.requestAnimationFrame(()=>{var e,t;let s,a=B.current;if(!a)return;let r=U.current,n=a.getBoundingClientRect().top;e=q.current,s=Math.max(0,(t={scrollTop:a.scrollTop,clientHeight:a.clientHeight,scrollHeight:a.scrollHeight,containerTop:n,answerTop:r?.getBoundingClientRect().top}).scrollHeight-t.clientHeight),a.scrollTop="latest"===e?s:"answer"!==e||void 0===t.answerTop?t.scrollTop:Math.min(s,Math.max(0,t.scrollTop+t.answerTop-t.containerTop-8)),L(Y(a))});return()=>window.cancelAnimationFrame(e)},[y,h]);let P=y.length>0,G=(0,a.jsx)("div",{className:(0,v.cn)("yesoma-glow relative rounded-[20px] p-px shadow-[var(--shadow-glow-violet)]",h&&"h-full min-h-0"),style:{backgroundImage:"var(--gradient-brand)"},children:(0,a.jsxs)("div",{className:(0,v.cn)("flex flex-col overflow-hidden rounded-[19px] bg-paper-card",h?"h-full min-h-0":g?"h-[400px]":"h-[480px]"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-line/70 px-4 py-3 sm:px-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"flex h-6 w-6 items-center justify-center rounded-full text-white",style:{backgroundImage:"var(--gradient-brand)"},children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5",fill:"currentColor",strokeWidth:1.5})}),(0,a.jsx)("span",{className:"text-[13.5px] font-semibold text-ink-900",children:"Yesoma AI"}),(0,a.jsx)("span",{className:"yesoma-live-pulse ml-0.5 h-1.5 w-1.5 rounded-full bg-emerald-500"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[P?(0,a.jsxs)("button",{type:"button",onClick:function(){b([]),k(""),T(!1),_(!1),q.current="none",L(!1),O.current?.focus()},className:"inline-flex items-center gap-1 rounded-full px-2 py-1 text-[12px] font-medium text-ink-500 transition-colors hover:bg-violet-50 hover:text-violet-700",children:[(0,a.jsx)(i.A,{className:"h-3.5 w-3.5",strokeWidth:2}),"Restart"]}):null,x?(0,a.jsx)("button",{type:"button",onClick:()=>{q.current=y.length?"answer":"none",x(!h)},"aria-label":h?"Collapse Ask Yesoma AI":"Expand Ask Yesoma AI",title:h?"Collapse":"Expand",className:"inline-flex h-7 w-7 items-center justify-center rounded-full border border-line bg-paper text-ink-500 transition-colors hover:border-violet-300 hover:text-violet-700",children:h?(0,a.jsx)(d.A,{className:"h-3.5 w-3.5"}):(0,a.jsx)(c.A,{className:"h-3.5 w-3.5"})}):null]})]}),(0,a.jsxs)("div",{className:"relative min-h-0 flex-1",children:[(0,a.jsx)("div",{ref:B,onScroll:e=>L(Y(e.currentTarget)),onWheel:$,onTouchStart:$,onPointerDown:$,onKeyDown:e=>{["ArrowUp","ArrowDown","PageUp","PageDown","Home","End"," "].includes(e.key)&&$()},className:"h-full space-y-3 overflow-y-auto px-4 py-4 sm:px-5",children:P?y.map((e,t)=>"user"===e.role?(0,a.jsx)(W,{text:e.text},t):(0,a.jsx)(H,{answerRef:t===y.length-1?U:void 0,turn:e,isLast:t===y.length-1,onFollowUp:M,showLead:e.done&&t===y.length-1&&!!e.capture&&"sales"===f.persona&&!D,showLeadDone:t===y.length-1&&!!e.capture&&"sales"===f.persona&&D,onLead:F,allowUseInReply:"support"===f.persona},t)):(0,a.jsx)(C,{persona:f.persona,prompts:f.prompts,compact:g,onPick:M})}),P&&E?(0,a.jsxs)("button",{type:"button",onClick:function(){let e=B.current;e&&(q.current="latest",e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),L(!1))},className:"absolute bottom-2.5 left-1/2 inline-flex -translate-x-1/2 items-center gap-1 rounded-full border border-violet-200 bg-paper-card px-3 py-1.5 text-[11px] font-semibold text-violet-700 shadow-[0_10px_30px_-14px_rgba(64,46,140,0.55)] hover:bg-violet-50",children:[(0,a.jsx)(p.A,{className:"h-3 w-3"})," Jump to latest"]}):null]}),(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),M(w)},className:"border-t border-line/70 p-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-[14px] border border-line bg-paper px-3 py-1.5 transition-colors focus-within:border-violet-400 focus-within:bg-paper-card",children:[(0,a.jsx)("input",{ref:O,value:w,onChange:e=>k(e.target.value),placeholder:P?"Reply to Yesoma AIâ¦":f.placeholder,maxLength:600,className:"min-w-0 flex-1 bg-transparent py-1.5 text-[14px] text-ink-900 placeholder:text-ink-400 focus:outline-none","aria-label":"Message Yesoma AI"}),(0,a.jsx)("button",{type:"submit",disabled:!w.trim()||A,"aria-label":"Send",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-white shadow-sm transition-all hover:-translate-y-
1px disabled:opacity-40 disabled:hover:translate-y-0",style:{backgroundImage:"var(--gradient-brand)"},children:(0,a.jsx)(u.A,{className:"h-4 w-4",strokeWidth:2.5})})]}),(0,a.jsxs)("p",{className:"mt-1.5 px-1 text-[9.5px] leading-relaxed text-ink-400",children:["Don't share private customer or account data. Sanitized questions and feedback may be reviewed to improve Yesoma Docs. ",(0,a.jsx)(o(),{href:"/privacy",className:"font-medium underline underline-offset-2 hover:text-violet-700",children:"Privacy"})]})]})]})}),J=(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.16em] text-white shadow-sm",style:{backgroundImage:"var(--gradient-brand)"},children:[(0,a.jsx)(l.A,{className:"h-3.5 w-3.5",fill:"currentColor",strokeWidth:1.5}),f.eyebrow]});return g?(0,a.jsxs)("div",{className:(0,v.cn)(h&&"flex h-full min-h-0 flex-col",n),children:[(0,a.jsx)("div",{className:"mb-2.5 shrink-0",children:J}),(0,a.jsx)("p",{className:"mb-3 shrink-0 text-[12.5px] leading-relaxed text-ink-500",children:"support"===f.persona?"Stuck on something? Ask away â I remember the conversation.":"Ask how Yesoma fits your business â I remember the conversation."}),(0,a.jsx)("div",{className:(0,v.cn)(h&&"min-h-0 flex-1"),children:G}),(0,a.jsxs)("p",{className:"mt-3 flex shrink-0 items-start gap-1.5 text-[11px] leading-relaxed text-ink-400",children:[(0,a.jsx)(m.A,{className:"mt-0.5 h-3 w-3 shrink-0",strokeWidth:2}),f.trustNote]})]}):(0,a.jsxs)("section",{className:(0,v.cn)("relative overflow-hidden bg-paper px-4 py-16 lg:px-8 lg:py-24",n),children:[(0,a.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute -top-24 right-[-10%] h-[420px] w-[420px] rounded-full opacity-[0.14] blur-3xl",style:{backgroundImage:"var(--gradient-brand)"}}),(0,a.jsxs)("div",{className:"relative mx-auto grid max-w-6xl items-center gap-10 lg:grid-cols-2 lg:gap-14",children:[(0,a.jsxs)("div",{children:[J,(0,a.jsx)("h2",{className:"mt-4 font-display text-[28px] font-semibold leading-[1.12] tracking-tight text-ink-900 sm:text-[34px]",children:f.headline}),(0,a.jsx)("p",{className:"mt-3.5 max-w-md text-[15px] leading-relaxed text-ink-600",children:f.subheadline}),(0,a.jsxs)("p",{className:"mt-6 flex items-start gap-1.5 text-[12px] leading-relaxed text-ink-500",children:[(0,a.jsx)(m.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-ink-400",strokeWidth:2}),f.trustNote]})]}),G]})]})}function C({persona:e,prompts:t,compact:s,onPick:r}){return(0,a.jsxs)("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[(0,a.jsx)("span",{className:(0,v.cn)("yesoma-float flex items-center justify-center rounded-2xl text-white shadow-[var(--shadow-glow-violet)]",s?"h-10 w-10":"h-12 w-12"),style:{backgroundImage:"var(--gradient-brand)"},children:(0,a.jsx)(l.A,{className:s?"h-5 w-5":"h-6 w-6",fill:"currentColor",strokeWidth:1.25})}),(0,a.jsx)("p",{className:"mt-3.5 max-w-xs text-[13.5px] leading-relaxed text-ink-600",children:"sales"===e?"Ask me anything about Yesoma â I'll show you where businesses like yours lose inquiries and how to recover them.":"Ask me anything about using Yesoma â I'll walk you through it, step by step."}),(0,a.jsx)("div",{className:"mt-4 flex flex-wrap justify-center gap-1.5",children:t.slice(0,s?3:4).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>r(e),className:"rounded-full border border-line bg-paper px-2.5 py-1 text-[11.5px] font-medium text-ink-600 transition-colors hover:border-violet-300 hover:text-violet-700",children:e},e))})]})}function W({text:e}){return(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("div",{className:"max-w-[85%] rounded-[14px] rounded-br-sm bg-violet-600 px-3.5 py-2 text-[13.5px] leading-relaxed text-white",children:e})})}function H({answerRef:e,turn:t,isLast:s,onFollowUp:r,showLead:n,showLeadDone:l,onLead:i,allowUseInReply:d}){let c=!t.done&&!t.text;return(0,a.jsxs)("div",{ref:e,className:"yesoma-rise scroll-mt-2",children:[(0,a.jsxs)("div",{className:(0,v.cn)("max-w-[92%] rounded-[14px] rounded-bl-sm border px-3.5 py-2.5 text-[13.5px] leading-relaxed",t.error?"border-coral-200 bg-coral-50 text-coral-700":"border-line bg-paper text-ink-800"),children:[c?(0,a.jsxs)("span",{className:"flex items-center gap-2 text-ink-500",children:[(0,a.jsx)("span",{className:"yesoma-orbit-pulse h-2 w-2 rounded-full",style:{backgroundImage:"var(--gradient-brand)"}}),"Yesoma AI is thinkingâ¦"]}):(0,a.jsx)(_,{text:t.text}),!t.done&&t.text?(0,a.jsx)("span",{className:"ml-0.5 inline-block h-3.5 w-[2px] animate-pulse bg-violet-500 align-middle"}):null]}),t.done&&s&&t.cta?(0,a.jsxs)(o(),{href:t.cta.href,className:"mt-2.5 inline-flex h-9 items-center gap-1.5 rounded-[11px] px-4 text-[13px] font-semibold text-white shadow-[var(--shadow-glow-violet)] transition-transform hover:-translate-y-
1px",style:{backgroundImage:"var(--gradient-brand)"},children:[t.cta.label,(0,a.jsx)(h.A,{className:"h-3.5 w-3.5",strokeWidth:2.25})]}):null,t.done&&!t.error?(0,a.jsx)(T,{turn:t,allowUseInReply:d}):null,t.done&&s&&t.followUps?.length?(0,a.jsx)("div",{className:"mt-2.5 flex flex-wrap gap-1.5","aria-label":"Suggested follow-up questions",children:t.followUps.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>r(e),className:"inline-flex items-center gap-1 rounded-full border border-line bg-paper-card px-2.5 py-1 text-[12px] font-medium text-ink-600 transition-all hover:-translate-y-px hover:border-violet-300 hover:text-violet-700",children:[e,(0,a.jsx)(h.A,{className:"h-3 w-3",strokeWidth:2})]},e))}):null,n&&i?(0,a.jsx)(D,{onSubmit:i}):l?(0,a.jsxs)("div",{className:"mt-2.5 flex items-center gap-1.5 rounded-[12px] border border-emerald-200 bg-emerald-50 px-3.5 py-2.5 text-[12.5px] font-medium text-emerald-800",children:[(0,a.jsx)(x.A,{className:"h-4 w-4 shrink-0",strokeWidth:2.5}),"Thanks â a real person from Yesoma will follow up shortly."]}):null]})}function T({turn:e,allowUseInReply:t}){let[s,n]=(0,r.useState)(e.evidence?.state!=="fully_supported"),[l,i]=(0,r.useState)(!1),[d,c]=(0,r.useState)(null),[p,u]=(0,r.useState)(!1),[m,x]=(0,r.useState)("idle"),j=e.evidence,A=new Set(e.sourceSlugs??[]),I=j?.sources??[],Y=A.size?I.filter(e=>A.has(e.slug)):[],S=Y.length?Y:I.slice(0,1),C=[...e.unsupportedDetails??[],...(e.conflicts??[]).map(e=>`Conflicting guidance: ${e}`),...j?.freshnessWarnings??[]],W=j?.state!=="fully_supported"||C.length>0;async function H(t){try{await navigator.clipboard.writeText(e.text),x(t),window.setTimeout(()=>x("idle"),2200)}catch{x("idle")}}async function R(e){try{await navigator.clipboard.writeText(new URL(e,window.location.origin).toString())}catch{}}async function D(t){if(!e.answerId)return void u(!0);u(!1);try{if(!(await fetch("/api/ask/feedback",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({answerId:e.answerId,reason:t})})).ok)throw Error("feedback failed");c(t),i(!1)}catch{u(!0)}}return(0,a.jsxs)("div",{className:"mt-2.5 max-w-[96%] space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[10.5px] leading-relaxed text-ink-500",children:[(0,a.jsx)(f.A,{className:"mt-0.5 h-3 w-3 shrink-0",strokeWidth:2}),(0,a.jsx)("span",{children:"AI-generated answer. Verify important details before using or sending."})]}),W?(0,a.jsxs)("div",{className:"rounded-[11px] border border-amber-200 bg-amber-50 px-3 py-2 text-[11px] leading-relaxed text-amber-900",children:[(0,a.jsx)("p",{className:"font-semibold",children:"Some details could not be verified from approved sources."}),(0,a.jsx)("p",{className:"mt-0.5",children:"Review the items below before using this answer."}),C.length?(0,a.jsx)("ul",{className:"mt-1.5 space-y-1 pl-3",children:C.map(e=>(0,a.jsx)("li",{className:"list-disc",children:e},e))}):null]}):null,j?(0,a.jsxs)("div",{className:"overflow-hidden rounded-[11px] border border-line bg-paper-card",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>n(e=>!e),className:"flex w-full items-center justify-between gap-2 px-3 py-2 text-left","aria-expanded":s,children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[11.5px] font-semibold text-ink-700",children:[(0,a.jsx)(g.A,{className:"h-3.5 w-3.5 text-violet-600",strokeWidth:2}
1),"Sources used",(0,a.jsxs)("span",{className:"font-normal text-ink-500",children:["\xb7 ",N.uK[j.state]]}),(0,a.jsxs)("span",{className:"font-normal text-ink-400",children:["\xb7 ",S.length," source",1===S.length?"":"s"]})]}),(0,a.jsx)(y.A,{className:(0,v.cn)("h-3.5 w-3.5 text-ink-400 transition-transform",s&&"rotate-180")})]}),s?(0,a.jsx)("div",{className:"space-y-2 border-t border-line/70 px-3 py-2.5",children:S.length?S.map(e=>{var t;let s;return(0,a.jsxs)("div",{className:"rounded-[9px] bg-paper px-2.5 py-2",children:[(0,a.jsx)("p",{className:"text-[11.5px] font-semibold leading-snug text-ink-800",children:e.title}),e.section?(0,a.jsx)("p",{className:"mt-0.5 text-[10.5px] text-violet-700",children:e.section}):null,(0,a.jsxs)("p",{className:"mt-1 text-[10px] leading-relaxed text-ink-400",children:[e.owner," \xb7 ",e.lastReviewedAt?`Reviewed ${t=e.lastReviewedAt,Number.isFinite((s=new Date(`${t}T00:00:00Z`)).getTime())?new Intl.DateTimeFormat("en",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}).format(s):t}`:"Review date not recorded"]}),(0,a.jsxs)("div",{className:"mt-1.5 flex flex-wrap gap-2",children:[(0,a.jsxs)(o(),{href:e.href,className:"inline-flex items-center gap-1 text-[10.5px] font-semibold text-violet-700 hover:text-violet-900",children:["Open source ",(0,a.jsx)(b.A,{className:"h-3 w-3"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>void R(e.href),className:"inline-flex items-center gap-1 text-[10.5px] font-medium text-ink-500 hover:text-ink-800",children:[(0,a.jsx)(w.A,{className:"h-3 w-3"})," Copy link"]})]})]},e.slug)}):(0,a.jsx)("p",{className:"text-[11px] leading-relaxed text-ink-500",children:"No published Yesoma Doc matched strongly enough. Contact [email protected] before relying on this answer."})}):null]}):null,(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>void H("copied"),className:"inline-flex items-center gap-1 rounded-full border border-line bg-paper-card px-2.5 py-1 text-[10.5px] font-medium text-ink-600 hover:border-violet-300 hover:text-violet-700",children:[(0,a.jsx)(w.A,{className:"h-3 w-3"})," ","copied"===m?"Copied":"Copy"]}),t?(0,a.jsxs)("button",{type:"button",onClick:()=>void H("reply"),className:"inline-flex items-center gap-1 rounded-full border border-violet-200 bg-violet-50 px-2.5 py-1 text-[10.5px] font-semibold text-violet-700 hover:bg-violet-100",children:[(0,a.jsx)(h.A,{className:"h-3 w-3"})," ","reply"===m?"Copied for review":"Use in reply"]}):null,d?(0,a.jsx)("span",{className:"text-[10.5px] font-medium text-emerald-700",children:"Thanks â feedback recorded."}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:()=>void D("helpful"),className:"rounded-full border border-line bg-paper-card px-2.5 py-1 text-[10.5px] font-medium text-ink-600 hover:text-emerald-700",children:"Helpful"}),(0,a.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"inline-flex items-center gap-1 rounded-full border border-line bg-paper-card px-2.5 py-1 text-[10.5px] font-medium text-ink-600 hover:text-coral-700",children:[(0,a.jsx)(k.A,{className:"h-3 w-3"})," Report an issue"]})]})]}),l&&!d?(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 rounded-[10px] border border-line bg-paper-card p-2",children:[["incorrect","Incorrect"],["outdated_source","Outdated source"],["missing_information","Missing information"]].map(([e,t])=>(0,a.jsx)("button",{type:"button",onClick:()=>void D(e),className:"rounded-full bg-ink-100 px-2.5 py-1 text-[10.5px] font-medium text-ink-700 hover:bg-coral-50 hover:text-coral-700",children:t},e))}):null,p?(0,a.jsx)("p",{className:"text-[10.5px] text-coral-600",children:"Couldn't save feedback. Please try again."}):null]})}function R(e,t,s){return Array.isArray(e)?e.filter(e=>"string"==typeof e&&e.trim().length>0).map(e=>e.trim().slice(0,s)).slice(0,t):[]}function D({onSubmit:e}){let[t,s]=(0,r.useState)(""),[n,o]=(0,r.useState)(""),[l,i]=(0,r.useState)(!1),[d,c]=(0,r.useState)(!1),[p,u]=(0,r.useState)("");return d?(0,a.jsxs)("div",{className:"mt-2.5 flex items-center gap-1.5 rounded-[12px] border border-emerald-200 bg-emerald-50 px-3.5 py-2.5 text-[12.5px] font-medium text-emerald-800",children:[(0,a.jsx)(x.A,{className:"h-4 w-4 shrink-0",strokeWidth:2.5}),"Thanks â a real person from Yesoma will follow up shortly."]}):(0,a.jsxs)("form",{onSubmit:async s=>{if(s.preventDefault(),l||!t.trim())return;i(!0),u("");let a=await e(t.trim(),n.trim());i(!1),a?c(!0):u("Couldn't send â try again, or email [email protected].")},className:"mt-2.5 rounded-[14px] border border-violet-200 bg-vi
1olet-50/60 p-3",children:[(0,a.jsx)("p",{className:"text-[12.5px] font-semibold text-ink-800",children:"Want the team to follow up?"}),(0,a.jsx)("p",{className:"mt-0.5 text-[12px] leading-relaxed text-ink-500",children:"Drop your email and a real person reaches out â no spam."}),(0,a.jsxs)("div",{className:"mt-2 flex flex-col gap-1.5 sm:flex-row",children:[(0,a.jsx)("input",{value:n,onChange:e=>o(e.target.value),placeholder:"Name (optional)",className:"h-9 min-w-0 flex-1 rounded-[10px] border border-line bg-paper px-3 text-[13px] text-ink-900 placeholder:text-ink-400 focus:border-violet-400 focus:outline-none"}),(0,a.jsx)("input",{value:t,onChange:e=>s(e.target.value),type:"email",required:!0,placeholder:"[email protected]",className:"h-9 min-w-0 flex-1 rounded-[10px] border border-line bg-paper px-3 text-[13px] text-ink-900 placeholder:text-ink-400 focus:border-violet-400 focus:outline-none"}),(0,a.jsx)("button",{type:"submit",disabled:l||!t.trim(),className:"inline-flex h-9 shrink-0 items-center justify-center rounded-[10px] px-3.5 text-[13px] font-semibold text-white transition-transform hover:-translate-y-px disabled:opacity-50 disabled:hover:translate-y-0",style:{backgroundImage:"var(--gradient-brand)"},children:l?"Sendingâ¦":"Send"})]}),p?(0,a.jsx)("p",{className:"mt-1.5 text-[12px] text-coral-600",children:p}):null]})}function _({text:e}){let t=e.split("\n"),s=[],r=[],n=e=>{r.length&&(s.push((0,a.jsx)("ul",{className:"my-1 space-y-1 pl-1",children:r.map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-1.5",children:[(0,a.jsx)("span",{className:"mt-[7px] h-1 w-1 shrink-0 rounded-full",style:{backgroundImage:"var(--gradient-brand)"}}),(0,a.jsx)("span",{children:E(e)})]},t))},e)),r=[])};return t.forEach((e,t)=>{let o=e.trim();o.startsWith("- ")||o.startsWith("* ")?r.push(o.slice(2)):(n(`l${t}`),o&&s.push((0,a.jsx)("p",{className:"my-1 first:mt-0 last:mb-0",children:E(o)},`p${t}`)))}),n("lend"),(0,a.jsx)(a.Fragment,{children:s})}function E(e){let t,s=[],r=/\[([^\]]+)\]\(([^)\s]+)\)|\*\*([^*]+)\*\*/g,n=0,l=0;for(;t=r.exec(e);){if(t.index>n&&s.push(e.slice(n,t.index)),t[1]&&t[2]){let e=(0,A.D)(t[2]);s.push(e?(0,a.jsx)(o(),{href:e,className:"font-medium text-violet-700 underline underline-offset-2 hover:text-violet-900",children:t[1]},l++):(0,a.jsx)("span",{children:t[1]},l++))}else t[3]&&s.push((0,a.jsx)("strong",{className:"font-semibold text-ink-900",children:t[3]},l++));n=r.lastIndex}return n<e.length&&s.push(e.slice(n)),s}},78538:(e,t,s)=>{s.d(t,{D:()=>a});function a(e){let t=e.trim();if(t.startsWith("/")&&!t.startsWith("//"))return t;try{let e=new URL(t);if("https:"!==e.protocol||"getyesoma.com"!==e.hostname&&"www.getyesoma.com"!==e.hostname)return null;return`${e.pathname}${e.search}${e.hash}`}catch{return null}}},79122:(e,t,s)=>{s.d(t,{cn:()=>a});function a(...e){return e.filter(Boolean).join(" ")}},83848:(e,t,s)=>{s.d(t,{EI:()=>a,fd:()=>r,qy:()=>o,uK:()=>n});let a="x-yesoma-evidence",r="x-yesoma-answer-id",n={fully_supported:"Fully supported",partially_supported:"Parti
1ally supported",no_approved_source:"No approved source found"};function o(e){if(!e)return null;try{var t;let s=JSON.parse(decodeURIComponent(e));if(!s||(t=s.state,"fully_supported"!==t&&"partially_supported"!==t&&"no_approved_source"!==t)||!Array.isArray(s.sources)||!Array.isArray(s.freshnessWarnings))return null;let a=s.sources.filter(l).slice(0,4);return{state:s.state,sources:a,freshnessWarnings:s.freshnessWarnings.filter(e=>"string"==typeof e).slice(0,4)}}catch{return null}}function l(e){return!!e&&"object"==typeof e&&"string"==typeof e.slug&&"string"==typeof e.title&&"string"==typeof e.href&&e.href.startsWith("/docs/")&&(null===e.section||"string"==typeof e.section)&&"string"==typeof e.owner&&(null===e.lastReviewedAt||"string"==typeof e.lastReviewedAt)}}}]);
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.