PageSourceSearch

https://aumhum.com/js/AumhumSite-CcIfmCfw.js

js aumhum.com collected 2026-09-24 14:11:12 UTC 96,474 bytes, 2 lines download raw bytes

1import{u as Ke,j as e,_ as D,r as i,K as ie,f as Ce,aP as ze,aM as Qe,n as Ae,aG as js,aE as ys,aH as gs,aI as fs,a6 as Ze,az as bs,nj as Ns,ab as ws,b as be,v as vs,V as Ss,ao as Fe,W as Xe}from"./index-D3vd3SFc.js";import{D as es,C as ss,T as ks,F as As}from"./AumhumSite-CCF5i-8R.js";import{F as Ts,C as Cs}from"./FloatingContactButtons-9uEtyFL7.js";import{u as Ps}from"./useContactNumber-DkoPL4vc.js";import{g as Pe,C,m as V,h as z,S as ue,n as se,k as xe,f as W,P as ce,E as H,e as G,l as fe,R as as,d as B,b as ts,j as ee,H as ns,o as Es,B as Is,I as Ls,a as is,p as Ms,q as Os,T as Rs,r as Fs,G as Hs,s as _s,t as Us,u as Ws,v as Ds,w as $s,x as Bs,y as Ys,z as qs,D as Gs,F as Vs,J as Js,K as rs,N as Ks,O as zs,Q as Qs,V as Zs,X as Xs,Y as ea,Z as sa,_ as aa,$ as ls}from"./sections-C9nc9RsU.js";import{C as ta}from"./CareFlow-Cr0haAfi.js";import{i as je,b as cs,v as os,g as Ee,c as pe,u as He,d as na,e as ia,r as ra,s as la,f as ca,h as oa,o as da}from"./patientProspectService-D6GC1aPR.js";import{F as pa}from"./FlowSelectionModern-DqPelHex.js";import ha from"./PrivacyPage-6M3QN5wJ.js";import"./onboardingStatus-Ct4Ob0A0.js";import"./index-DHCxh4US.js";import"./MoreVert-D-m2UsvA.js";import"./ArrowBackIos-Bb6vrZdx.js";import"./Container-DQLKqvMv.js";const _e={indigo:"cn-accent-indigo",violet:"cn-accent-violet",teal:"cn-accent-teal",amber:"cn-accent-amber",rose:"cn-accent-rose",sky:"cn-accent-sky",slate:"cn-accent-slate"};function ua({slug:s,onContactClick:a}){const t=Ke(),n=Pe(s);if(!n)return e.jsx("main",{id:"main",className:"as-section as-section-alt",children:e.jsx(C,{children:e.jsxs("div",{className:"as-max-w-3",children:[e.jsx("h1",{className:"as-h2",children:"Condition not found"}),e.jsx("p",{className:"as-lede",children:"Explore the full list of conditions we support, or return to the home page."}),e.jsxs("div",{className:"as-mt-6 as-flex as-gap-3 as-wrap",children:[e.jsx(D,{to:"/",className:"as-btn as-btn-primary",children:"Go to home"}),e.jsx(D,{to:"/#conditions",className:"as-btn as-btn-secondary",children:"See all conditions"})]})]})})});const c=_e[n.accent]||_e.indigo,{title:o,tagline:r,Icon:j,overview:m,signs:N,whenToReachOut:f,therapyRole:E,medicationRole:w,assessmentSlugs:d=[],faqs:p=[]}=n,g=()=>a==null?void 0:a({mode:"call"}),y=()=>a==null?void 0:a({mode:"whatsapp"}),l=d[0],x=l?`/assessment/${l}?src=condition&src-id=${n.slug}`:"",v=()=>{if(!x)return;if(je()){t(x);return}const b=new URLSearchParams({intent:"assessment",assessmentSlug:l,condition:n.slug,redirect:x});t(`/signup?${b.toString()}`)};return e.jsxs("main",{id:"main",className:`cn-page ${c}`,children:[e.jsx("section",{className:"cn-hero",children:e.jsx(C,{children:e.jsxs("div",{className:"cn-hero-grid",children:[e.jsxs("div",{className:"cn-hero-copy",children:[e.jsx("div",{className:"cn-eyebrow",children:"Specialist care for"}),e.jsx("h1",{className:"cn-h1",children:o}),r?e.jsx("p",{className:"cn-tagline",children:r}):null,e.jsxs("ul",{className:"cn-hero-points","aria-label":"How AUMHUM helps",children:[e.jsxs("li",{children:[e.jsx(V,{})," Therapy, psychiatry, and follow-up in one care plan"]}),e.jsxs("li",{children:[e.jsx(z,{})," Private, clinician-led support from the first step"]})]}),e.jsxs("div",{className:"cn-cta-row",children:[e.jsxs("button",{type:"button",className:"cn-cta cn-cta-primary cn-cta-large",onClick:g,children:[e.jsx(ue,{})," Book an expert consultation"]}),e.jsxs("button",{type:"button",className:"cn-cta cn-cta-whatsapp cn-cta-large",onClick:y,children:[e.jsx(se,{})," Chat on WhatsApp"]})]}),e.jsx("p",{className:"cn-cta-sub",children:"Choose a callback or WhatsApp. We’ll help set an appointment with a leading psychiatrist in this condition."})]}),e.jsxs("div",{className:"cn-hero-panel",children:[e.jsx("div",{className:"cn-hero-mark","aria-hidden":"true",children:e.jsx(j,{width:46,height:46})}),d.length?e.jsxs("div",{className:"cn-assessment-card",children:[e.jsx("div",{className:"cn-assessment-icon","aria-hidden":"true",children:e.jsx(xe,{})}),e.jsxs("div",{children:[e.jsx("div",{className:"cn-section-eyebrow",children:"Self-assessment"}),e.jsx("h2",{className:"cn-assessment-title",children:"Start with a private screen"}),e.jsx("p",{className:"cn-assessment-copy",children:"A short clinician-validated screener gives you and the care team a clearer starting point before a consultation."})]}),e.jsxs("button",{type:"button",className:"cn-cta cn-cta-assessment",onClick:v,children:["Start the self-assessment ",e.jsx(W,{})]}),e.jsxs("div",{className:"cn-assessment-meta",children:[e.jsx(z,{})," Sign in required · result saved securely"]})]}):null]})]})})}),d.length?e.jsx("section",{className:"cn-section cn-section-assessment",children:e.jsx(C,{children:e.jsxs("div",{className:"cn-self-test",children:[e.jsxs("div",{children:[e.jsx("div",{className:"cn-section-eyebrow",children:"Start the self-assessment"}),e.jsx("h2",{className:"cn-h2",children:"A clear first read, before you speak to us"}),e.jsx("p",{className:"cn-section-sub",children:"Take a short, confidential questionnaire that helps name the pattern you’re noticing. You’ll sign in or create an account first so the result is saved privately and can be used by the care team."}),e.jsxs("ul",{className:"cn-self-test-points",children:[e.jsxs("li",{children:[e.jsx(V,{})," 3-10 minutes"]}),e.jsxs("li",{children:[e.jsx(V,{})," Clinician-validated"]}),e.jsxs("li",{children:[e.jsx(V,{})," Not a diagnosis"]})]})]}),e.jsxs("div",{className:"cn-self-test-actions",children:[e.jsxs("button",{type:"button",className:"cn-cta cn-cta-assessment cn-cta-full",onClick:v,children:["Start the self-assessment ",e.jsx(W,{})]}),e.jsx("div",{className:"cn-self-test-note",children:"Sign in happens before the first question so your answers stay with you."})]})]})})}):null,e.jsx("section",{className:"cn-section",children:e.jsx(C,{children:e.jsxs("div",{className:"cn-section-grid",children:[e.jsxs("div",{children:[e.jsx("div",{className:"cn-section-eyebrow",children:"Overview"}),e.jsxs("h2",{className:"cn-h2",children:["Understanding ",o.toLowerCase()]})]}),e.jsx("div",{className:"cn-prose",children:m.map((b,P)=>e.jsx("p",{children:b},`ov-${P}`))})]})})}),e.jsx("section",{className:"cn-section cn-section-alt",children:e.jsx(C,{children:e.jsxs("div",{className:"cn-section-grid",children:[e.jsxs("div",{children:[e.jsx("div",{className:"cn-section-eyebrow",children:"Common signs"}),e.jsx("h2",{className:"cn-h2",children:"What people typically notice"}),e.jsx("p",{className:"cn-section-sub",children:"Not a diagnostic checklist — a map of patterns that often bring people in."})]}),e.jsx("ul",{className:"cn-sign-list","aria-label":"Common signs",children:N.map((b,P)=>e.jsxs("li",{children:[e.jsx("span",{className:"cn-check","aria-hidden":"true",children:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}),e.jsx("span",{children:b})]},`sign-${P}`))})]})})}),f!=null&&f.length?e.jsx("section",{className:"cn-section",children:e.jsx(C,{children:e.jsxs("div",{className:"cn-section-grid",children:[e.jsxs("div",{children:[e.jsx("div",{className:"cn-section-eyebrow",children:"When to reach out"}),e.jsx("h2",{className:"cn-h2",children:"Earlier is always better"}),e.jsx("p",{className:"cn-section-sub",children:"You don’t need to wait for things to get worse to be entitled to care."})]}),e.jsx("ul",{className:"cn-reach-list",children:f.map((b,P)=>e.jsxs("li",{children:[e.jsx("span",{className:"cn-dot","aria-hidden":"true"}),e.jsx("span",{children:b})]},`r-${P}`))})]})})}):null,e.jsx("section",{className:"cn-section",children:e.jsxs(C,{children:[e.jsxs("div",{className:"cn-philo-head",children:[e.jsx("div",{className:"cn-section-eyebrow",children:"Our clinical approach"}),e.jsx("h2",{className:"cn-h2",children:"Therapy and medication both have a role"}),e.jsx("p",{className:"cn-section-sub",children:"We’re neutral by design: the plan depends on your presentation, not on ideology. Here’s how each contributes."})]}),e.jsxs("div",{className:"cn-philo-grid",children:[e.jsxs("div",{className:"cn-philo-card",children:[e.jsx("div",{className:"cn-philo-label",children:"Therapy"}),e.jsx("p",{children:E})]}),e.jsxs("div",{className:"cn-philo-card",children:[e.jsx("div",{className:"cn-philo-label",children:"Medication"}),e.jsx("p",{children:w})]}),e.jsxs("div",{className:"cn-philo-card cn-philo-emphasis",children:[e.jsx("div",{className:"cn-philo-label",children:"Medication adherence"}),e.jsx("p",{children:"When medication is part of the plan, adherence is often the single largest factor in long-term outcomes. Our care team checks in on dosing, side- effects, and refills — so you’re not alone in managing it."})]})]})]})}),e.jsx("section",{className:"cn-section cn-section-alt",children:e.jsx(C,{children:e.jsx(ta,{title:"What happens when you reach out",sub:"No black box — here’s how care unfolds for this condition."})})}),p.length?e.jsx("section",{className:"cn-section",children:e.jsx(C,{children:e.jsxs("div",{className:"cn-section-grid",children:[e.jsxs("div",{children:[e.jsx("div",{className:"cn-section-eyebrow",children:"Questions"}),e.jsx("h2",{className:"cn-h2",children:"Before you book"})]}),e.jsx("div",{className:"cn-faq",children:p.map((b,P)=>e.jsxs("details",{className:"cn-faq-item",children:[e.jsx("summary",{children:b.q}),e.jsx("p",{children:b.a})]},`faq-${P}`))})]})})}):null,e.jsx("section",{className:"cn-cta-final",children:e.jsx(C,{children:e.jsxs("div",{className:"cn-cta-final-card",children:[e.jsx("h2",{className:"cn-h2",children:"Ready to take the first step?"}),e.jsxs("p",{children:["Book a call with our care team. We’ll match you with a leading psychiatrist in ",o.toLowerCase()," and take it from there."]}),e.jsxs("div",{className:"cn-cta-row",children:[e.jsxs("button",{type:"button",className:"cn-cta cn-cta-primary",onClick:g,children:[e.jsx(ce,{})," Book an expert consultation"]}),e.jsxs("button",{type:"button",className:"cn-cta cn-cta-whatsapp",onClick:y,children:[e.jsx(se,{})," Chat on WhatsApp"]})]})]})})})]})}const ma="Hi, I would like help finding the right care.";function xa(s,a){const t=s.includes("?")?"&":"?";return`${s}${t}text=${encodeURIComponent(a)}`}function ja(){const s=i.useMemo(()=>xa(ie.PATIENT_CARE_WHATSAPP_LINK,ma),[]);return e.jsxs("main",{id:"main",children:[e.jsx("section",{className:"as-care-hero as-care-hero--centered",children:e.jsx(C,{children:e.jsxs("div",{className:"as-care-hero-stack",children:[e.jsx(H,{children:"Find the right specialist"}),e.jsxs("h1",{className:"as-h1 as-care-hero-title",children:["Get matched with a"," ",e.jsx("span",{className:"as-brand-gradient",children:"specialist"}),e.jsx("br",{className:"as-care-hero-br"}),"who fits."]}),e.jsx(G,{className:"as-care-hero-lede",children:"Tell us what kind of care you need. We’ll line up vetted specialists and a clear next step — usually the same day."}),e.jsxs("div",{className:"as-care-hero-cta",children:[e.jsxs(D,{to:"/care/get-started",className:"as-btn as-btn-primary as-btn-xl",children:["Get matched with a specialist ",e.jsx(W,{})]}),e.jsx("a",{href:s,className:"as-care-hero-link",target:"_blank",rel:"noreferrer",children:"Or message us on WhatsApp instead"})]}),e.jsxs("ul",{className:"as-care-hero-trust","aria-label":"What this means",children:[e.jsxs("li",{className:"as-trust-item",children:[e.jsx(z,{})," Confidential"]}),e.jsxs("li",{className:"as-trust-item",children:[e.jsx(fe,{})," Reviewed by our care team"]}),e.jsxs("li",{className:"as-trust-item",children:[e.jsx(as,{})," No commitment to book"]})]}),e.jsx("div",{className:"as-care-note as-care-note--centered",children:"If you or someone you know is in immediate danger, please contact local emergency services right away."})]})})}),e.jsx("section",{className:"as-section as-section-white",children:e.jsxs(C,{children:[e.jsxs("div",{className:"as-care-howit-head",children:[e.jsx(H,{children:"How it works"}),e.jsx(B,{children:"Three steps. No back-and-forth."})]}),e.jsxs("ol",{className:"as-care-howit-grid",children:[e.jsxs("li",{className:"as-care-howit-step",children:[e.jsx("span",{className:"as-care-howit-num",children:"1"}),e.jsx("div",{className:"as-care-howit-icon",children:e.jsx(xe,{})}),e.jsx("h3",{className:"as-h3",children:"Tell us what you need"}),e.jsx("p",{className:"as-p",children:"Pick the kind of care that fits — therapy, psychiatry, hormonal, child care, or you’re not sure."})]}),e.jsxs("li",{className:"as-care-howit-step",children:[e.jsx("span",{className:"as-care-howit-num",children:"2"}),e.jsx("div",{className:"as-care-howit-icon",children:e.jsx(z,{})}),e.jsx("h3",{className:"as-h3",children:"Create a quick account"}),e.jsx("p",{className:"as-p",children:"One mobile number, one OTP. No emails, no long forms upfront."})]}),e.jsxs("li",{className:"as-care-howit-step",children:[e.jsx("span",{className:"as-care-howit-num",children:"3"}),e.jsx("div",{className:"as-care-howit-icon",children:e.jsx(ue,{})}),e.jsx("h3",{className:"as-h3",children:"Meet a specialist"}),e.jsx("p",{className:"as-p",children:"We share matched specialists and a clear next step. You decide when, where, and how."})]})]}),e.jsx("div",{className:"as-care-howit-cta",children:e.jsxs(D,{to:"/care/get-started",className:"as-btn as-btn-primary",children:["Get matched with a specialist ",e.jsx(W,{})]})})]})}),e.jsx("section",{className:"as-section as-section-alt",children:e.jsxs(C,{children:[e.jsxs("div",{className:"as-care-altways-head",children:[e.jsx(H,{children:"Prefer to talk f
1irst?"}),e.jsx(B,{children:"Other ways to reach our care team"})]}),e.jsxs("div",{className:"as-care-altways",children:[e.jsxs("a",{href:s,className:"as-care-altway",target:"_blank",rel:"noreferrer",children:[e.jsx("span",{className:"as-care-altway-icon",children:e.jsx(se,{})}),e.jsxs("span",{className:"as-care-altway-body",children:[e.jsx("span",{className:"as-care-kicker",children:"Talk to us"}),e.jsx("span",{className:"as-h3",children:"Message on WhatsApp"}),e.jsx("span",{className:"as-p",children:"Reply when it suits you — our care team will pick up."}),e.jsxs("span",{className:"as-link as-link-violet as-care-entry-cta",children:["Open WhatsApp ",e.jsx(W,{})]})]})]}),e.jsxs("a",{href:ie.SUPPORT_SCHEDULE_CALL,className:"as-care-altway",target:"_blank",rel:"noreferrer",children:[e.jsx("span",{className:"as-care-altway-icon",children:e.jsx(ce,{})}),e.jsxs("span",{className:"as-care-altway-body",children:[e.jsx("span",{className:"as-care-kicker",children:"Want a call?"}),e.jsx("span",{className:"as-h3",children:"Get a call back"}),e.jsx("span",{className:"as-p",children:"Share your number and a good time — a coordinator will call you."}),e.jsxs("span",{className:"as-link as-link-violet as-care-entry-cta",children:["Pick a time ",e.jsx(W,{})]})]})]})]})]})})]})}const ya="Hi, I would like to book a consultation.";function ga(s,a){const t=s.includes("?")?"&":"?";return`${s}${t}text=${encodeURIComponent(a)}`}function fa({onLogin:s}){const a=i.useMemo(()=>ga(ie.PATIENT_CARE_WHATSAPP_LINK,ya),[]);return e.jsxs("main",{id:"main",children:[e.jsx("section",{className:"as-care-hero as-care-hero--centered",children:e.jsx(C,{children:e.jsxs("div",{className:"as-care-hero-stack",children:[e.jsx(H,{children:"Book a consultation"}),e.jsxs("h1",{className:"as-h1 as-care-hero-title",children:["Talk to the right"," ",e.jsx("span",{className:"as-brand-gradient",children:"specialist"})," ","for your concern."]}),e.jsx(G,{className:"as-care-hero-lede",children:"Tell us a little about what you need and we’ll match you to a vetted clinician — therapist, psychiatrist, endocrinologist, or another specialist — and book a time that works."}),e.jsxs("div",{className:"bc-paths",role:"group","aria-label":"Choose how to begin",children:[e.jsxs("div",{className:"bc-path-card bc-path-card--new",children:[e.jsx("div",{className:"bc-path-icon",children:e.jsx(fe,{})}),e.jsxs("div",{className:"bc-path-body",children:[e.jsx("p",{className:"as-care-kicker",children:"First time here"}),e.jsx("h2",{className:"as-h3",children:"I’m new to AUMHUM"}),e.jsx("p",{className:"as-p",children:"Quick mobile sign-up, then a few questions so we can match you to the right specialist."}),e.jsxs(D,{to:"/care/get-started?intent=consultation",className:"as-btn as-btn-primary bc-path-cta",children:["Get matched ",e.jsx(W,{})]})]})]}),e.jsxs("div",{className:"bc-path-card bc-path-card--returning",children:[e.jsx("div",{className:"bc-path-icon bc-path-icon--alt",children:e.jsx(z,{})}),e.jsxs("div",{className:"bc-path-body",children:[e.jsx("p",{className:"as-care-kicker",children:"Returning"}),e.jsx("h2",{className:"as-h3",children:"I already have an account"}),e.jsx("p",{className:"as-p",children:"Sign in to continue your care, see your specialist, and manage upcoming sessions."}),e.jsxs("button",{type:"button",className:"as-btn as-btn-secondary bc-path-cta",onClick:()=>{typeof s=="function"&&s()},children:["Log in ",e.jsx(W,{})]})]})]})]}),e.jsxs("ul",{className:"as-care-hero-trust","aria-label":"What this means",children:[e.jsxs("li",{className:"as-trust-item",children:[e.jsx(z,{})," Confidential"]}),e.jsxs("li",{className:"as-trust-item",children:[e.jsx(fe,{})," Reviewed by our care team"]}),e.jsxs("li",{className:"as-trust-item",children:[e.jsx(as,{})," No commitment to book"]})]}),e.jsx("div",{className:"as-care-note as-care-note--centered",children:"If you or someone you know is in immediate danger, please contact local emergency services right away."})]})})}),e.jsx("section",{className:"as-section as-section-white",children:e.jsxs(C,{children:[e.jsxs("div",{className:"as-care-howit-head",children:[e.jsx(H,{children:"How a consultation works"}),e.jsx(B,{children:"From hello to booked, in three steps."})]}),e.jsxs("ol",{className:"as-care-howit-grid",children:[e.jsxs("li",{className:"as-care-howit-step",children:[e.jsx("span",{className:"as-care-howit-num",children:"1"}),e.jsx("div",{className:"as-care-howit-icon",children:e.jsx(xe,{})}),e.jsx("h3",{className:"as-h3",children:"Tell us what you need"}),e.jsx("p",{className:"as-p",children:"Pick the area of care — therapy, psychiatry, hormonal, immune, child, or not sure — and share a few details."})]}),e.jsxs("li",{className:"as-care-howit-step",children:[e.jsx("span",{className:"as-care-howit-num",children:"2"}),e.jsx("div",{className:"as-care-howit-icon",children:e.jsx(ts,{})}),e.jsx("h3",{className:"as-h3",children:"We match you to a specialist"}),e.jsx("p",{className:"as-p",children:"Our care team reviews what you shared and lines up a vetted clinician 
1whose practice fits your situation."})]}),e.jsxs("li",{className:"as-care-howit-step",children:[e.jsx("span",{className:"as-care-howit-num",children:"3"}),e.jsx("div",{className:"as-care-howit-icon",children:e.jsx(ue,{})}),e.jsx("h3",{className:"as-h3",children:"Book your consultation"}),e.jsx("p",{className:"as-p",children:"Pick a time, online or in-person where available, and meet your specialist. Follow-ups stay with the same care team."})]})]}),e.jsxs("ul",{className:"bc-howit-trust",children:[e.jsxs("li",{children:[e.jsx(V,{})," Same-day care-team response in most cases"]}),e.jsxs("li",{children:[e.jsx(V,{})," Continuity across therapists, doctors, and follow-ups"]}),e.jsxs("li",{children:[e.jsx(V,{})," Your details stay with the assigned care team only"]})]})]})}),e.jsx("section",{className:"as-section as-section-alt",children:e.jsxs(C,{children:[e.jsxs("div",{className:"as-care-altways-head",children:[e.jsx(H,{children:"Prefer to talk first?"}),e.jsx(B,{children:"Other ways to reach our care team"})]}),e.jsxs("div",{className:"as-care-altways",children:[e.jsxs("a",{href:a,className:"as-care-altway",target:"_blank",rel:"noreferrer",children:[e.jsx("span",{className:"as-care-altway-icon",children:e.jsx(se,{})}),e.jsxs("span",{className:"as-care-altway-body",children:[e.jsx("span",{className:"as-care-kicker",children:"Talk to us"}),e.jsx("span",{className:"as-h3",children:"Message on WhatsApp"}),e.jsx("span",{className:"as-p",children:"Reply when it suits you — our care team will pick up."}),e.jsxs("span",{className:"as-link as-link-violet as-care-entry-cta",children:["Open WhatsApp ",e.jsx(W,{})]})]})]}),e.jsxs("a",{href:ie.SUPPORT_SCHEDULE_CALL,className:"as-care-altway",target:"_blank",rel:"noreferrer",children:[e.jsx("span",{className:"as-care-altway-icon",children:e.jsx(ce,{})}),e.jsxs("span",{className:"as-care-altway-body",children:[e.jsx("span",{className:"as-care-kicker",children:"Want a call?"}),e.jsx("span",{className:"as-h3",children:"Get a call back"}),e.jsx("span",{className:"as-p",children:"Share your number and a good time — a coordinator will call you."}),e.jsxs("span",{className:"as-link as-link-violet as-care-entry-cta",children:["Pick a time ",e.jsx(W,{})]})]})]})]})]})})]})}const ba=[{id:"FEMALE",label:"Female"},{id:"MALE",label:"Male"},{id:"OTHER",label:"Other"},{id:"PREFER_NOT_TO_SAY",label:"Prefer not to say"}],ds="aumhumSignupProfileDraft";function Na(s){try{window.sessionStorage.setItem(ds,JSON.stringify({...s,savedAt:Date.now()}))}catch{}}function Ue(){try{window.sessionStorage.removeItem(ds)}catch{}}function wa(s){const a=Array.isArray(s)?s:[];return a.includes("ROLE_PATIENT")?"/patient-home":a.includes("ROLE_PATIENT_PROSPECT")?"/care/status":(a.includes("ROLE_PROFESSIONAL_USER"),"/")}function ps(s){return!(!s||typeof s!="string"||!s.startsWith("/")||s.startsWith("//")||/^https?:\/\//i.test(s))}function va(s){const a=s.get("redirect")||"",t=s.get("intent")||"",n=s.get("assessmentSlug")||"";return ps(a)&&(t==="assessment"||a.startsWith("/assessment/")||a.startsWith("/assessments/")||a.startsWith("/patient-home/assessments/"))?a:t==="assessment"&&n?`/assessment/${encodeURIComponent(n)}`:""}function Sa(s){const a=s.get("redirect")||"",t=new URLSearchParams({lt:"1"});return ps(a)&&t.set("redirect",a),`/?${t.toString()}`}function ka(s){if(s!=null&&s.accessToken)try{window.localStorage.setItem("token",s.accessToken),typeof s.accessTokenExpiry<"u"&&gs({accessTokenExpiry:s.accessTokenExpiry}),Array.isArray(s.authorities)&&window.localStorage.setItem("authorities",JSON.stringify(s.authorities)),fs(s),typeof window.dispatchEvent=="function"&&window.dispatchEvent(new CustomEvent("aumhum:auth-changed"))}catch(a){console.warn("Failed to persist email auth session:",a)}}function Aa(){const[s]=Ce(),a=s.get("testmode")==="email",t=i.useMemo(()=>va(s),[s]),n=i.useMemo(()=>Sa(s),[s]),[c,o]=i.useState(""),[r,j]=i.useState(""),[m,N]=i.useState(""),[f,E]=i.useState(""),[w,d]=i.useState(""),[p,g]=i.useState(""),[y,l]=i.useState("whatsapp"),[x,v]=i.useState(null),[b,P]=i.useState(!1),[I,A]=i.useState(0),[K,ae]=i.useState(!1),[L,Y]=i.useState(!1),[U,O]=i.useState(""),h=i.useRef(null);i.useEffect(()=>{if(I<=0){h.current&&clearInterval(h.current),h.current=null;return}return h.current=setInterval(()=>A(k=>Math.max(0,k-1)),1e3),()=>{h.current&&clearInterval(h.current)}},[I]);const u=r?`+${r}`:"",_=!!r&&ze(u),Z=!m||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(m.trim()),Q=!f||/^\d{1,3}$/.test(f)&&Number(f)>=0&&Number(f)<=120,J=async()=>
1{if(O(""),!_){O("Please enter a valid mobile number for the country you picked.");return}if(!Z){O("That email doesn’t look right. Leave it blank if you’d rather skip.");return}if(!Q){O("Please enter a valid age (0–120) or leave it blank.");return}try{Y(!0);const k=await Ae("signup_otp_send"),R=await cs(u,"whatsapp",{recaptchaToken:k});v(R.sessionId),l(R.channel||"whatsapp"),P(!0),A(R.resendDelaySeconds||20)}catch(k){O(k.message||"Could not send the code. Please try again.")}finally{Y(!1)}},q=async()=>{var R;O("");const k=(m||"").trim();if(!k||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k)){O("Please enter a valid email address.");return}try{Y(!0);const F=await Ae("signup_otp_send"),te=await js(k,{allowRegistration:!0,recaptchaToken:F}),T=te==null?void 0:te.data;if(!T||!T.success){const $=((R=te==null?void 0:te.response)==null?void 0:R.data)||T||{};throw new Error($.message||"Could not send the code to your email.")}v(T.sessionId),l("email"),P(!0),A(T.resendDelaySeconds||60)}catch(F){O(F.message||"Could not send the code. Please try again.")}finally{Y(!1)}},ye=async()=>{var k;if(O(""),!K){O("Please agree to the privacy + terms before continuing.");return}Y(!0);try{if(y==="email"){const T=await ys(m.trim(),p,x,{allowRegistration:!0}),$=T==null?void 0:T.data;if(!($!=null&&$.accessToken)){const Ne=((k=T==null?void 0:T.response)==null?void 0:k.data)||$||{};throw new Error(Ne.message||"Could not verify the code.")}ka($)}else await os({mobile:u,otp:p,sessionId:x,channel:y});const R=Ee(),F={name:c.trim()||null,mobile:u||null,email:m.trim()||null,age:f?Number(f):null,gender:w||null};if(Na(F),R.some(T=>T!=="ROLE_USER")){window.location.assign(t||wa(R));return}if(t){await pe({name:F.name,mobile:F.mobile,email:F.email,age:F.age,gender:F.gender,pathway:"ASSESSMENT",specialtyTag:"triage",subjectType:"SELF",source:"WEB",bookingIntent:"assessment"}),Ue(),window.location.assign(t);return}try{const T=await pe({name:F.name,mobile:F.mobile,email:F.email,age:F.age,gender:F.gender,pathway:"ASSESSMENT",specialtyTag:"triage",subjectType:"SELF",source:"WEB",bookingIntent:"signup"});if(Ue(),T!=null&&T.existingPatientPath){window.location.assign("/patient-home?newCareRequest=1");return}const $=typeof window<"u"&&new URLSearchParams(window.location.search).get("fromAssessment")==="1";window.location.assign($?"/care/status?fromAssessment=1":"/care/status")}catch(T){const $=(T==null?void 0:T.message)||"prospect_init_failed";window.location.assign(`/portals?fresh=1&prospectFailed=1&reason=${encodeURIComponent($)}`)}}catch(R){O(R.message||"Something went wrong. Please try again."),Y(!1)}},re=i.useMemo(()=>e.jsxs("ul",{className:"as-care-hero-trust","aria-label":"What signing up gets you",children:[e.jsxs("li",{className:"as-trust-item",children:[e.jsx(z,{})," Confidential"]}),e.jsxs("li",{className:"as-trust-item",children:[e.jsx(se,{})," ",a?"One-time code by email":"One-time WhatsApp code"]})]}),[a]),me=a?!m||!Z||L:!_||L;return e.jsx("main",{id:"main",children:e.jsx("section",{className:"as-care-hero as-care-hero--centered",children:e.jsx(C,{children:e.jsxs("div",{className:"as-care-hero-stack",children:[e.jsx(H,{children:"Create your AUMHUM account"}),e.jsxs("h1",{className:"as-h1 as-care-hero-title",children:["Sign up in"," ",e.jsx("span",{className:"as-brand-gradient",children:"under a minute."})]}),e.jsxs(G,{className:"as-care-hero-lede",children:["We’ll verify your"," ",a?"email":"mobile",", set up your free account, and ask what you want to do next — get matched with a specialist, use the wellness a
1pp, or apply to join as a clinician."]}),a?e.jsxs("div",{role:"note",className:"sv-test-mode-banner","aria-label":"Test mode active",children:[e.jsx("span",{"aria-hidden":!0,children:"🧪"})," Test mode — email OTP path. Production signups go through WhatsApp."]}):null,e.jsxs(ee,{className:"pps-card-form sv-card",emphasised:!0,children:[e.jsxs("div",{className:"pps-field",children:[e.jsxs("label",{className:"pps-field-label",htmlFor:"sv-name",children:["Your name ",e.jsx("span",{className:"pps-field-optional",children:"(optional)"})]}),e.jsx("input",{id:"sv-name",className:"pps-input",type:"text",value:c,onChange:k=>o(k.target.value),placeholder:"First name is fine",autoComplete:"given-name",disabled:b&&!U})]}),e.jsxs("div",{className:"pps-field",children:[e.jsxs("label",{className:"pps-field-label",htmlFor:"sv-mobile",children:["Mobile number"," ",a?e.jsx("span",{className:"pps-field-optional",children:"(optional in test mode)"}):null]}),e.jsx("div",{className:"sv-phoneinput-wrap",children:e.jsx(Qe,{inputProps:{id:"sv-mobile",name:"mobile",autoComplete:"tel"},country:"in",preferredCountries:["in","us","gb","ae","sg","au","ca"],value:r,onChange:k=>j(k),enableSearch:!0,disabled:b&&!U,inputStyle:{width:"100%"},containerStyle:{width:"100%"},dropdownStyle:{zIndex:99999}})}),e.jsx("span",{className:"pps-help",children:a?"Optional in test mode — used for your profile but not for verification.":"We’ll send a one-time code on WhatsApp."})]}),e.jsxs("div",{className:"pps-field",children:[e.jsxs("label",{className:"pps-field-label",htmlFor:"sv-email",children:["Email"," ",e.jsx("span",{className:"pps-field-optional",children:a?"(used for verification)":"(optional)"})]}),e.jsx("input",{id:"sv-email",className:"pps-input",type:"email",value:m,onChange:k=>N(k.target.value),placeholder:"[email protected]",autoComplete:"email",disabled:b&&!U})]}),e.jsxs("div",{className:"pps-field-row",children:[e.jsxs("div",{className:"pps-field pps-field--half",children:[e.jsxs("label",{className:"pps-field-label",htmlFor:"sv-age",children:["Your age ",e.jsx("span",{className:"pps-field-optional",children:"(optional)"})]}),e.jsx("input",{id:"sv-age",className:"pps-input",type:"number",min:0,max:120,value:f,onChange:k=>E(k.target.value.replace(/\D/g,"")),placeholder:"e.g. 32",autoComplete:"off",inputMode:"numeric",disabled:b&&!U})]}),e.jsxs("div",{className:"pps-field pps-field--half",children:[e.jsxs("span",{className:"pps-field-label",children:["Your gender ",e.jsx("span",{className:"pps-field-optional",children:"(optional)"})]}),e.jsx("div",{className:"pps-chip-row",role:"radiogroup","aria-label":"Gender",children:ba.map(k=>e.jsx("button",{type:"button",role:"radio","aria-checked":w===k.id,className:`pps-chip pps-chip--small${w===k.id?" is-active":""}`,onClick:()=>d(R=>R===k.id?"":k.id),disabled:b&&!U,children:k.label},k.id))})]})]}),b?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"pps-field",children:[e.jsxs("label",{className:"pps-field-label",htmlFor:"sv-otp",children:["Enter the code we sent on"," ",y==="email"?"email":y==="sms"?"SMS":"WhatsApp"]}),e.jsx("div",{className:"pps-otp-row",children:e.jsx("input",{id:"sv-otp",className:"pps-input",type:"text",inputMode:"numeric",pattern:"\\d*",maxLength:8,value:p,onChange:k=>g(k.target.value.replace(/\D/g,"")),placeholder:"••••••",autoComplete:"one-time-code"})}),e.jsx("div",{className:"pps-channel-toggle",children:I>0?e.jsxs("span",{children:["Resend in ",I,"s"]}):e.jsx("button",{type:"button",onClick:a?q:J,children:"Resend code"})})]}),e.jsxs("div",{className:"pps-checkbox-row",children:[e.jsx("input",{id:"sv-consent",type:"checkbox",checked:K,onChange:k=>ae(k.target.checked)}),e.jsxs("label",{htmlFor:"sv-consent",children:["I agree to AUMHUM’s"," ",e.jsx("a",{href:"/privacy",target:"_blank",rel:"noreferrer",children:"Privacy Policy"})," ","and"," ",e.jsx("a",{href:"/terms",target:"_blank",rel:"noreferrer",children:"Terms"}),"."]})]}),e.jsxs("div",{className:"pps-cta-row",children:[e.jsx("button",{type:"button",className:"pps-btn is-ghost",onClick:()=>{P(!1),g("")},children:"Back"}),e.jsx("button",{type:"button",className:`pps-btn is-primary${p.length>=4&&K&&!L?"":" is-disabled"}`,disabled:p.length<4||!K||L,onClick:ye,children:L?"Creating…":e.jsxs(e.Fragment,{children:["Create account ",e.jsx(W,{})]})})]})]}):e.jsxs("div",{className:"pps-cta-row",children:[e.jsx(D,{to:"/",className:"pps-btn is-ghost",children:"Cancel"}),e.jsx("button",{type:"button",className:`pps-btn is-primary${me?" is-disabled":""}`,disabled:me,onClick:a?q:J,children:L?"Sending…":a?e.jsxs(e.Fragment,{children:["Send code to email ",e.jsx(W,{})]}):e.jsxs(e.Fragment,{children:["Send WhatsApp code ",e.jsx(se,{})]})})]}),U?e.jsx("div",{className:"pps-error",role:"alert",children:U}):null]}),re,e.jsxs("p",{className:"sv-login-link",children:["Already have an account?"," ",e.jsx(D,{to:n,children:"Log in"})]}),e.jsxs("p",{className:"sv-other-role-link",children:["Are you a doctor, therapist, psychologist, or other care provider?"," ",e.jsx("a",{href:"/apply",children:"Apply to join AUMHUM’s care network →"})]}),e.jsxs("p",{className:"sv-recaptcha-notice",children:["This site is protected by reCAPTCHA and the Google"," ",e.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:"Privacy Policy"})," ","and"," ",e.jsx("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:"Terms of Service"})," ","apply."]})]})})})})}const hs="/portals";function Ta(s){return s===hs?"login":"signup"}function Ca({pathname:s,signedIn:a,authorities:t}){return Ta(s)!=="login"?!1:a?!Array.isArray(t)||t.length===0:!0}
1function Pa(s){const a=typeof(s==null?void 0:s.pathname)=="string"&&s.pathname?s.pathname:hs,t=typeof(s==null?void 0:s.search)=="string"?s.search:"",n=typeof(s==null?void 0:s.hash)=="string"?s.hash:"";return`${a}${t}${n}`}const Te="aumhumSignupProfileDraft";function We(s){if(typeof s!="string"||!s.trim())return null;try{return JSON.parse(s)}catch{return null}}function Ea(){try{const s=window.sessionStorage.getItem(Te);if(!s)return null;const a=JSON.parse(s);return!(a!=null&&a.savedAt)||Date.now()-a.savedAt>24*60*60*1e3?(window.sessionStorage.removeItem(Te),null):a}catch{return null}}function De(){try{window.sessionStorage.removeItem(Te)}catch{}}function Ia({onRequireLogin:s}){const a=Ke(),t=Ze(),n=i.useMemo(Ea,[]),c=i.useMemo(je,[]),o=i.useMemo(()=>Pa(t),[t]),[r,j]=i.useState(null),[m,N]=i.useState(""),[f,E]=i.useState(!1),[w,d]=i.useState(!1),[p,g]=i.useState(null);i.useEffect(()=>{const v=c?Ee():[],b=()=>{E(!1),d(!0),ws(),typeof s=="function"&&s({redirectTo:o})};if(Ca({pathname:t.pathname,signedIn:c,authorities:v})){b();return}if(!c){a("/signup",{replace:!0});return}if(d(!1),v.some(I=>I!=="ROLE_USER")){const I=bs(v,{lastChosenFlow:localStorage.getItem("lastChosenFlow"),kioskConfig:We(localStorage.getItem("kiosk-config")),roleCaConfig:We(localStorage.getItem("ROLE_CA_CONFIG"))});if(I!=null&&I.path&&I.portalId!=="portal-chooser"){a(I.path,{replace:!0});return}g(Ns(v)),E(!0);return}g(null),E(!1)},[o,t.pathname,a,s,c]);const y=((n==null?void 0:n.name)||"").split(" ")[0],l=async()=>{if(!r){N(""),j("care");try{await pe({name:(n==null?void 0:n.name)||null,mobile:(n==null?void 0:n.mobile)||null,email:(n==null?void 0:n.email)||null,pathway:"ASSESSMENT",specialtyTag:"triage",subjectType:"SELF",age:(n==null?void 0:n.age)??null,gender:(n==null?void 0:n.gender)||null,source:"WEB",bookingIntent:"welcome"}),De(),window.location.assign("/care/get-started")}catch(v){j(null),N((v==null?void 0:v.message)||"We could not start your care request just now. Please try again.")}}},x=()=>{r||(j("wellness"),De(),window.location.assign("/"))};return f?e.jsx(pa,{preferredPortalId:p,showNormalUserView:()=>{a("/wellness",{replace:!0})}}):w?e.jsx("main",{id:"main",children:e.jsx("section",{className:"as-care-hero as-care-hero--centered",children:e.jsx(C,{children:e.jsxs("div",{className:"as-care-hero-stack",children:[e.jsx(H,{children:"Portals"}),e.jsx("h1",{className:"as-h1 as-care-hero-title",children:"Welcome back"}),e.jsx(G,{className:"as-care-hero-lede",children:"Sign in to continue."})]})})})}):e.jsx("main",{id:"main",children:e.jsx("section",{className:"as-care-hero as-care-hero--centered",children:e.jsx(C,{children:e.jsxs("div",{className:"as-care-hero-stack",children:[e.jsx(H,{children:"Welcome to AUMHUM"}),e.jsxs("h1",{className:"as-h1 as-care-hero-title",children:[y?`Hi, ${y} — `:"","what brings you here?"]}),e.jsx(G,{className:"as-care-hero-lede",children:"Pick the path that fits. You can change your mind later — your account stays the same."}),e.jsxs("div",{className:"bc-paths wv-paths",role:"group","aria-label":"Choose your path",children:[e.jsxs("button",{type:"button",className:"bc-path-card bc-path-card--new wv-path-button",onClick:l,disabled:!!r,"aria-busy":r==="care"||void 0,children:[e.jsx("div",{className:"bc-path-icon",children:e.jsx(ue,{})}),e.jsxs("div",{className:"bc-path-body",children:[e.jsx("p",{className:"as-care-kicker",children:"Get matched with a specialist"}),e.jsx("h2",{className:"as-h3",children:"I want care for a health concern"}),e.jsx("p",{className:"as-p",children:"We’ll match you to a vetted specialist — therapist, psychiatrist, endocrinologist, pediatrician, or a coordinator who’ll help you decide."}),e.jsxs("span",{className:"as-btn as-btn-primary bc-path-cta",children:[r==="care"?"Setting up…":"Continue to care"," ",e.jsx(W,{})]})]})]}),e.jsxs("button",{type:"button",className:"bc-path-card bc-path-card--returning wv-path-button",onClick:x,disabled:!!r,"aria-busy":r==="wellness"||void 0,children:[e.jsx("div",{className:"bc-path-icon bc-path-icon--alt",children:e.jsx(ns,{})}),e.jsxs("div",{className:"bc-path-body",children:[e.jsx("p",{className:"as-care-kicker",children:"For self
1-care + mental wellness"}),e.jsx("h2",{className:"as-h3",children:"I’m here for the AUMHUM app"}),e.jsx("p",{className:"as-p",children:"Daily practices, sleep, focus, journaling, breathing — guided by clinicians, on your schedule. No appointments needed."}),e.jsxs("span",{className:"as-btn as-btn-secondary bc-path-cta",children:[r==="wellness"?"Loading…":"Continue to wellness"," ",e.jsx(W,{})]})]})]})]}),m?e.jsx("div",{className:"pps-error",role:"alert",children:m}):null,e.jsxs("p",{className:"wv-clinician-link",children:["Joining as a clinician?"," ",e.jsx(D,{to:"/join",children:"Apply to AUMHUM’s care network →"})]}),e.jsxs("ul",{className:"bc-howit-trust","aria-label":"What signing up gets you",children:[e.jsxs("li",{children:[e.jsx(V,{})," Your details stay with the assigned care team only"]}),e.jsxs("li",{children:[e.jsx(V,{})," Switching paths later doesn’t lose your account"]}),e.jsxs("li",{children:[e.jsx(z,{})," Confidential, encrypted, and reviewed by our team"]})]})]})})})})}const Ie=[{id:"mental-health",pathway:null,label:"Mental health",blurb:"Feeling anxious, low, overwhelmed, struggling with sleep, focus, or relationships.",iconName:"Brain",accent:"#7B61FF",subOptions:[{id:"mental-psychology",pathway:"THERAPY",specialtyTag:"psychology",label:"Talk to a therapist",blurb:"Conversations with a clinical psychologist or counsellor — work through how you’re feeling, no medication."},{id:"mental-psychiatry",pathway:"PSYCHIATRY",specialtyTag:"psychiatry",label:"Speak with a doctor about medication",blurb:"Meet a psychiatrist (an MD) to evaluate whether medication might help, and to manage prescriptions."},{id:"mental-help-decide",pathway:"ASSESSMENT",specialtyTag:"mental-health-triage",label:"Help me decide",blurb:"Not sure if therapy or medication fits. We’ll have a short chat first and recommend what’s right."}]},{id:"hormonal-health",pathway:"BIOLOGICAL",specialtyTag:"endocrinology",label:"Hormonal health",blurb:"Thyroid, diabetes, PCOS, weight, or menstrual concerns — meet a hormone specialist (endocrinologist).",iconName:"HeartPulse",accent:"#E27D60"},{id:"immune-system",pathway:"BIOLOGICAL",specialtyTag:"rheumatology",label:"Immune system",blurb:"Autoimmune flares, joint or skin trouble, unexplained inflammation — meet an immune specialist (rheumatologist).",iconName:"ShieldCheck",accent:"#41B883"},{id:"child-growth",pathway:"CHILD",specialtyTag:"pediatrics",label:"Child growth & care",blurb:"Growth, development, behaviour, nutrition or sleep concerns for a child — meet a pediatrician.",iconName:"Baby",accent:"#3D9ED7"},{id:"not-sure",pathway:"ASSESSMENT",specialtyTag:"triage",label:"Not sure — help me figure it out",blurb:"Tell us what’s going on. Our care team will help you decide what kind of specialist fits.",iconName:"Puzzle",accent:"#8492A6"}];function La(s,a){const t=Ie.find(n=>n.id===s);if(!t)return null;if(t.subOptions){const n=t.subOptions.find(c=>c.id===a);return n?{pathway:n.pathway,specialtyTag:n.specialtyTag,topLabel:t.label,subLabel:n.label}:null}return{pathway:t.pathway,specialtyTag:t.specialtyTag,topLabel:t.label,subLabel:null}}const he="patientProspectSignupDraft",us=7*24*60*60*1e3;function Le({step:s,of:a}){return e.jsx("div",{className:"pps-stepdots","aria-label":`Step ${s} of ${a}`,children:Array.from({length:a}).map((t,n)=>e.jsx("span",{className:`pps-stepdot${n+1<=s?" is-active":""}`},n))})}const Ma={Brain:ts,HeartPulse:ns,ShieldCheck:z,Baby:Is,Puzzle:Es,Stethoscope:ue};function Oa({initialTopId:s=null,initialSubId:a=null,onPick:t,intent:n=null}){const[c,o]=i.useState(s),[r,j]=i.useState(null),m=async(p,g)=>{if(r)return;const y=La(p,g);if(!(!y||!t)){j(g||p);try{await t({topId:p,subId:g,...y})}finally{j(null)}}},N=p=>{if(!r){if(p.subOptions&&p.subOptions.length>0){o(g=>g===p.id?null:p.id);return}m(p.id,null)}},f=n==="consultation",E=f?"Find your specialist":"Get matched",w=f?"What kind of specialist do you want to see?":"What kind of care are you looking for?",d=f?"Pick the area that fits and we’ll line up a vetted specialist. You can refine details right after you create your account.":"Tap whatever fits best — that’s it. We’ll find a vetted specialist and you can refine details after you create your account.";return e.jsxs(C,{className:"pps-shell",children:[e.jsx(Le,{step:1,of:3}),e.jsx(H,{children:E}),e.jsx(B,{as:"h1",children:w}),e.jsx(G,{children:d}),e.jsx("div",{className:"pps-pathway-grid",children:Ie.map(p=>{const g=Ma[p.iconName]||ue,y=!!(p.subOptions&&p.subOptions.length>0),l=y&&c===p.id,x=r===p.id,v=!!r;return e.jsxs(ee,{className:`pps-pathway-card${l?" is-active":""}${x?" is-committing":""}`,emphasised:l,children:[e.jsxs("button",{type:"button",className:"pps-pathway-button","aria-pressed":l,"aria-expanded":y?l:void 0,"aria-busy":x||void 0,disabled:v,onClick:()=>N(p),children:[e.jsx("span",{className:"pps-pathway-icon",children:e.jsx(Ls,{Icon:g,variant:l?"green":"violet"})}),e.jsxs("span",{className:"pps-pathway-text",children:[e.jsx("span",{className:"pps-pathway-label",children:p.label}),e.jsx("span",{className:"pps-pathway-blurb",children:p.blurb})]}),y?e.jsx("span",{className:`pps-pathway-chev${l?" is-rotated":""}
1`,"aria-hidden":!0,children:e.jsx(is,{})}):e.jsx("span",{className:"pps-pathway-chev pps-pathway-chev--leaf","aria-hidden":!0,children:x?e.jsx("span",{className:"pps-spinner","aria-hidden":!0}):e.jsx(W,{})})]}),l?e.jsx("div",{className:"pps-suboptions",role:"group","aria-label":`${p.label} options`,children:p.subOptions.map(b=>{const P=r===b.id;return e.jsxs("button",{type:"button",className:`pps-subopt${P?" is-committing":""}`,disabled:v,"aria-busy":P||void 0,onClick:()=>m(p.id,b.id),children:[e.jsxs("span",{className:"pps-subopt-text",children:[e.jsx("span",{className:"pps-subopt-label",children:b.label}),e.jsx("span",{className:"pps-subopt-blurb",children:b.blurb})]}),e.jsx("span",{className:"pps-subopt-cta","aria-hidden":!0,children:P?e.jsx("span",{className:"pps-spinner","aria-hidden":!0}):e.jsx(W,{})})]},b.id)})}):null]},p.id)})}),e.jsx("p",{className:"pps-pathway-helper",role:"status",children:r?"Continuing…":"Tap any option above to continue. We’ll set up your care request right after."}),e.jsx("span",{hidden:!0,"aria-hidden":!0,"data-initial-sub-id":a||""})]})}function Ra({pathwayLabel:s,onContinue:a,onBack:t}){return e.jsxs(C,{className:"pps-shell",children:[e.jsx(Le,{step:2,of:3}),e.jsx(H,{children:"Almost there"}),e.jsx(B,{as:"h1",children:"Help us match you with the best specialist"}),e.jsxs(G,{children:["Health is personal. To recommend the right",s?e.jsxs(e.Fragment,{children:[" ",e.jsx("strong",{children:s.toLowerCase()})," "]}):" ","specialist for you, we’ll ask for a few details about what’s going on. Create a free account so everything you share stays private and is used only to find you the best care."]}),e.jsx(ee,{className:"pps-card-form",emphasised:!0,children:e.jsxs("div",{children:[e.jsx("div",{className:"pps-pathway-label",children:"Why we ask you to sign up"}),e.jsxs("ul",{className:"pps-confidentiality-list",children:[e.jsxs("li",{children:[e.jsx(z,{}),e.jsx("span",{children:"Your details are encrypted and shared only with the care team and the specialist you eventually book with."})]}),e.jsxs("li",{children:[e.jsx(fe,{}),e.jsx("span",{children:"A coordinator can follow up with you on WhatsApp, call or chat — your choice, anytime."})]}),e.jsxs("li",{children:[e.jsx(Ms,{}),e.jsx("span",{children:"You stay in control: add or remove information, upload reports, or pause the request whenever you like."})]})]})]})}),e.jsxs("div",{className:"pps-cta-row",children:[t?e.jsx("button",{type:"button",className:"pps-btn is-ghost",onClick:t,children:"Back"}):null,e.jsxs("button",{type:"button",className:"pps-btn is-primary",onClick:a,children:["Create account ",e.jsx(W,{})]})]})]})}const Fa="https://docs.google.com/document/d/e/2PACX-1vRsMJNbICHVgcO2O7nPTeffW-Ym02qi1oIeZJdFlpS-KSxW297qZz1GTOYiq9VKM0htkOscSRbzbSKe/pub?embedded=true";function Ha({open:s,type:a,onClose:t,onAccept:n}){const c=i.useRef(null);if(i.useEffect(()=>{if(!s)return;const r=document.body.style.overflow;document.body.style.overflow="hidden";const j=setTimeout(()=>{c.current&&c.current.focus()},0),m=N=>{N.key==="Escape"&&(N.stopPropagation(),t==null||t())};return window.addEventListener("keydown",m),()=>{clearTimeout(j),window.removeEventListener("keydown",m),document.body.style.overflow=r}},[s,t]),!s)return null;const o=a==="terms"?"Terms of Service":"Privacy Policy";return e.jsx("div",{className:"pps-legal-overlay",role:"dialog","aria-modal":"true","aria-label":o,onClick:r=>{r.target===r.currentTarget&&(t==null||t())},children:e.jsxs("div",{className:"pps-legal-panel",children:[e.jsxs("header",{className:"pps-legal-header",children:[e.jsx("h2",{className:"pps-legal-title",children:o}),e.jsx("button",{ref:c,type:"button",className:"pps-legal-close","aria-label":"Close",onClick:()=>t==null?void 0:t(),children:e.jsx("span",{"aria-hidden":"true",children:"×"})})]}),e.jsx("div",{className:"pps-legal-body",children:a==="terms"?e.jsx("iframe",{title:"Terms of Service",src:Fa,className:"pps-legal-iframe"}):e.jsx("div",{className:"pps-legal-html-reset",children:e.jsx(ha,{})})}),e.jsxs("footer",{className:"pps-legal-footer",children:[e.jsx("button",{type:"button",className:"pps-btn is-ghost",onClick:()=>t==null?void 0:t(),children:"Close"}),n?e.jsx("button",{type:"button",className:"pps-btn is-primary",onClick:()=>{n(),t==null||t()},children:"I’ve read this — agree & continue"}):null]})]})})}const _a=[{id:"SELF",label:"For myself"},{id:"DEPENDENT",label:"For someone else"}],Ua=[{id:"FEMALE",label:"Female"},{id:"MALE",label:"Male"},{id:"OTHER",label:"Other"},{id:"PREFER_NOT_TO_SAY",label:"Prefer not to say"}];function Wa({resolvedPathway:s,onSignedUp:a,onBack:t,onChangePathway:n,intent:c=null}){const o=c==="consultation",[r,j]=i.useState("SELF"),[m,N]=i.useState(""),[f,E]=i.useState(""),[w,d]=i.useState(""),[p,g]=i.useState(""),[y,l]=i.useState(""),[x,v]=i.useState(""),[b,P]=i.useState(""),[I,A]=i.useState("whatsapp"),[K,ae]=i.useState(null),[L,Y]=i.useState(!1),[U,O]=i.useState(0),[h,u]=i.useState(!1),[_,Z]=i.useState(!1),[Q,J]=i.useState(""),[q,ye]=i.useState(0),re=i.useRef(null),[me,k]=i.useState(null),R=i.useRef(null),F=i.useRef(null),te=i.useRef(null);i.useEffect(()=>{if(U<=0){R.current&&clearInterval(R.current),R.current=null;return}return R.current=setInterval(()=>O(S=>Math.max(0,S-1)),1e3),()=>{R.current&&clearInterval(R.current)}},[U]),i.useEffect(()=>{if(!L)return;const S=setTimeout(()=>{try{F.current&&(F.current.focus({preventScroll:!0}),F.current.scrollIntoView({behavior:"smooth",block:"center"}))}catch{}},80);return()=>clearTimeout(S)},[L]),i.useEffect(()=>{if(q<=0){re.current&&clearInterval(re.current),re.current=null;return}return re.current=setInterval(()=>ye(S=>Math.max(0,S-1)),1e3),()=>{re.current&&clearInterval(re.current)}},[q]);const T=w?`+${w}
1`:"",$=!!w&&ze(T),Ne=!p||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p.trim()),ms=!y||/^\d{1,3}$/.test(y)&&Number(y)>=0&&Number(y)<=120,Oe=async S=>{if(J(""),!$){J("Please enter a valid mobile number for the country you picked.");return}if(!Ne){J("That email doesn’t look right. Leave it blank if you’d rather skip.");return}if(!ms){J("Please enter a valid age (0–120) or leave it blank.");return}if(!(q>0))try{Z(!0);const M=await Ae("signup_otp_send"),X=await cs(T,S,{recaptchaToken:M});ae(X.sessionId),A(X.channel),Y(!0),O(X.resendDelaySeconds||20)}catch(M){const X=Number.isFinite(M==null?void 0:M.retryAfter)&&M.retryAfter>0?Math.ceil(M.retryAfter):0;X>0||(M==null?void 0:M.code)==="RATE_LIMIT_EXCEEDED"?(ye(X>0?X:30),J("")):J(M.message||"Could not send the code. Please try again.")}finally{Z(!1)}},xs=async()=>{if(J(""),!h){J("Please agree to the privacy + terms before continuing.");return}Z(!0);let S;try{S=await os({mobile:T,otp:b,sessionId:K,channel:I})}catch(M){J(M.message||"Something went wrong. Please try again."),Z(!1);return}try{const M=await pe({name:m.trim()||null,mobile:T,email:p.trim()||null,otpToken:S.otpToken,pathway:s==null?void 0:s.pathway,specialtyTag:s==null?void 0:s.specialtyTag,subjectType:r,subjectName:r!=="SELF"&&f.trim()?f.trim():null,age:y?Number(y):null,gender:x||null,consents:{tos:!0,privacy:!0},source:"WEB",bookingIntent:c});a==null||a(M)}
1catch(M){if(je()){const X=(M==null?void 0:M.message)||"init_failed",Re=Ee();if(Array.isArray(Re)&&Re.includes("ROLE_PATIENT")){window.location.assign(`/patient-home?careRequestFailed=1&reason=${encodeURIComponent(X)}`);return}window.location.assign(`/care/status?initFailed=1&reason=${encodeURIComponent(X)}`);return}J(M.message||"Something went wrong. Please try again."),Z(!1)}},we=r!=="SELF";return e.jsxs(C,{className:"pps-shell",children:[e.jsx(Le,{step:3,of:3}),e.jsx(H,{children:"Last step"}),e.jsx(B,{as:"h1",children:"Create your free account"}),e.jsx("p",{className:"pps-otp-explainer",children:o?"Verifying your mobile creates your free AUMHUM account. After that you’ll share a few details so our care team can match you to the right specialist and book your consultation.":"Verifying your mobile creates your free AUMHUM account. On the next page you can share more details — your story, any reports, what’s been going on — so our care team can match you with the right specialist."}),s?e.jsxs("div",{className:"pps-recap pps-recap--card",children:[e.jsxs("div",{className:"pps-recap-meta",children:[e.jsx("span",{className:"pps-recap-kicker",children:"You’re booking for"}),e.jsxs("span",{className:"pps-recap-pill",children:[s.topLabel,s.subLabel?e.jsxs(e.Fragment,{children:[" · ",s.subLabel]}):null]})]}),n?e.jsx("button",{type:"button",className:"pps-recap-change",onClick:()=>{L&&!window.confirm("Change the type of care? You’ll need to send a new WhatsApp code after.")||n()},disabled:_,children:"Change"}):null]}):null,e.jsxs(ee,{className:"pps-card-form",emphasised:!0,children:[e.jsxs("div",{className:"pps-field",children:[e.jsx("span",{className:"pps-field-label",children:"Who is this care request for?"}),e.jsx("div",{className:"pps-chip-row",role:"radiogroup","aria-label":"Care request is for",children:_a.map(S=>e.jsx("button",{type:"button",role:"radio","aria-checked":r===S.id,className:`pps-chip${r===S.id?" is-active":""}`,onClick:()=>j(S.id),disabled:L&&!Q,children:S.label},S.id))})]}),e.jsxs("div",{className:"pps-field",children:[e.jsxs("label",{className:"pps-field-label",htmlFor:"pps-name",children:["Your name ",e.jsx("span",{className:"pps-field-optional",children:"(optional)"})]}),e.jsx("input",{id:"pps-name",className:"pps-input",type:"text",value:m,onChange:S=>N(S.target.value),placeholder:"First name is fine",autoComplete:"given-name",disabled:L&&!Q})]}),we?e.jsxs("div",{className:"pps-field",children:[e.jsxs("label",{className:"pps-field-label",htmlFor:"pps-subject-name",children:["Their name ",e.jsx("span",{className:"pps-field-optional",children:"(the person who needs care)"})]}),e.jsx("input",{id:"pps-subject-name",className:"pps-input",type:"text",value:f,onChange:S=>E(S.target.value),placeholder:"First name is fine",autoComplete:"off",disabled:L&&!Q})]}):null,e.jsxs("div",{className:"pps-field",children:[e.jsx("label",{className:"pps-field-label",htmlFor:"pps-mobile",children:"Mobile number"}),e.jsx("div",{className:"sv-phoneinput-wrap",children:e.jsx(Qe,{inputProps:{id:"pps-mobile",name:"mobile",autoComplete:"tel"},country:"in",preferredCountries:["in","us","gb","ae","sg","au","ca"],value:w,onChange:S=>d(S),enableSearch:!0,disabled:L&&!Q,inputStyle:{width:"100%"},containerStyle:{width:"100%"},dropdownStyle:{zIndex:99999}})}),e.jsx("span",{className:"pps-help",children:"We’ll send a one-time code on WhatsApp. Standard rates may apply."})]}),e.jsxs("div",{className:"pps-field",children:[e.jsxs("label",{className:"pps-field-label",htmlFor:"pps-email",children:["Email ",e.jsx("span",{className:"pps-field-optional",children:"(optional)"})]}),e.jsx("input",{id:"pps-email",className:"pps-input",type:"email",value:p,onChange:S=>g(S.target.value),placeholder:"[email protected]",autoComplete:"email",disabled:L&&!Q}),e.jsx("span",{className:"pps-help",children:"For appointment confirmations and care summaries. We don’t spam."})]}),e.jsxs("div",{className:"pps-field-row",children:[e.jsxs("div",{className:"pps-field pps-field--half",children:[e.jsxs("label",{className:"pps-field-label",htmlFor:"pps-age",children:[we?"Their age":"Your age"," ",e.jsx("span",{className:"pps-field-optional",children:"(optional)"})]}),e.jsx("input",{id:"pps-age",className:"pps-input",type:"number",min:0,max:120,value:y,onChange:S=>l(S.target.value.replace(/\D/g,"")),placeholder:"e.g. 32",autoComplete:"off",inputMode:"numeric",disabled:L&&!Q})]}),e.jsxs("div",{className:"pps-field pps-field--half",children:[e.jsxs("span",{className:"pps-field-label",children:[we?"Their gender":"Your gender"," ",e.jsx("span",{className:"pps-field-optional",children:"(optional)"})]}),e.jsx("div",{className:"pps-chip-row",role:"radiogroup","aria-label":"Gender",children:Ua.map(S=>e.jsx("button",{type:"button",role:"radio","aria-checked":x===S.id,className:`pps-chip pps-chip--small${x===S.id?" is-active":""}`,onClick:()=>v(M=>M===S.id?"":S.id),disabled:L&&!Q,children:S.label},S.id))})]})]}),L?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"pps-otp-focus",role:"group","aria-labelledby":"pps-otp-heading",children:[e.jsx("div",{className:"pps-step-badge","aria-hidden":"true",children:"Step 1 of 2"}),e.jsx("h2",{id:"pps-otp-heading",className:"pps-otp-heading",children:"Enter the code we just sent"}),e.jsxs("p",{className:"pps-otp-sub",children:["Check your ",I==="sms"?"SMS":"WhatsApp"," for a 4–6 digit code from AUMHUM."]}),e.jsx("div",{className:"pps-otp-row",children:e.jsx("input",{id:"pps-otp",ref:F,className:"pps-input pps-otp-input",type:"text",inputMode:"numeric",pattern:"\\d*",maxLength:8,value:b,onChange:S=>P(S.target.value.replace(/\D/g,"")),placeholder:"••••••",autoComplete:"one-time-code","aria-describedby":"pps-otp-resend"})}),e.jsx("div",{id:"pps-otp-resend",className:"pps-channel-toggle",children:q>0?e.jsxs("span",{className:"pps-rate-limited",role:"status","aria-live":"polite",children:["Too many OTP requests. You can try again in"," ",e.jsxs("strong",{children:[q,"s"]}),"."]}):U>0?e.jsxs("span",{children:["Resend in ",U,"s"]}):e.jsx("button",{type:"button",onClick:()=>Oe(I),children:"Resend code"})})]}),e.jsxs("div",{ref:te,className:`pps-consent-focus${h?" is-checked":""}`,children:[e.jsx("div",{className:"pps-step-badge","aria-hidden":"true",children:"Step 2 of 2"}),e.jsxs("label",{htmlFor:"pps-consent",className:"pps-consent-row",children:[e.jsx("input",{id:"pps-consent",type:"checkbox",className:"pps-consent-check",checked:h,onChange:S=>u(S.target.checked)}),e.jsxs("span",{className:"pps-consent-text",children:["I agree to AUMHUM’s"," ",e.jsx("button",{type:"button",className:"pps-legal-link",onClick:()=>k("privacy"),children:"Privacy Policy"})," ","and"," ",e.jsx("button",{type:"button",className:"pps-legal-link",onClick:()=>k("terms"),children:"Terms of Service"}),", and to share these details so the care team can find me a specialist."]})]}),h?null:e.jsx("div",{className:"pps-consent-hint",role:"note",children:"Tick the box above to enable “Create account”."})]}),e.jsxs("div",{className:"pps-cta-row",children:[e.jsx("button",{type:"button",className:"pps-btn is-ghost",onClick:t,children:"Back"}),e.jsx("button",{type:"button",className:`pps-btn is-primary${b.length>=4&&h&&!_?"":" is-disabled"}`,disabled:b.length<4||!h||_,onClick:xs,children:_?"Creating…":e.jsxs(e.Fragment,{children:["Create account ",e.jsx(W,{})]})})]})]}):e.jsxs(e.Fragment,{children:[q>0?e.jsxs("div",{className:"pps-rate-limited pps-rate-limited--pre-send",role:"status","aria-live":"polite",children:["Too many OTP requests. You can try again in"," ",e.jsxs("strong",{children:[q,"s"]}),"."]}):null,e.jsxs("div",{className:"pps-cta-row",children:[e.jsx("button",{type:"button",className:"pps-btn is-ghost",onClick:t,children:"Back"}),e.jsx("button",{type:"button",className:`pps-btn is-primary${$&&!_&&q===0?"":" is-disabled"}`,disabled:!$||_||q>0,onClick:()=>Oe("whatsapp"),children:_?"Sending…":q>0?`Try again in ${q}s`:e.jsxs(e.Fragment,{children:["Send WhatsApp code ",e.jsx(se,{})]})})]})]}
1),Q?e.jsx("div",{className:"pps-error",role:"alert",children:Q}):null,e.jsx("div",{className:"pps-secondary-row",children:e.jsxs("a",{className:"pps-btn is-ghost",href:"https://wa.me/918047492952",target:"_blank",rel:"noreferrer",children:[e.jsx(ce,{})," Just want to talk? Chat on WhatsApp"]})})]}),e.jsx(Ha,{open:me!==null,type:me,onClose:()=>k(null),onAccept:()=>u(!0)})]})}function Da(){try{const s=window.localStorage.getItem(he);if(!s)return null;const a=JSON.parse(s);return!(a!=null&&a.savedAt)||Date.now()-a.savedAt>us?(window.localStorage.removeItem(he),null):a}catch{return null}}function ge(s){try{window.localStorage.setItem(he,JSON.stringify({...s,savedAt:Date.now()}))}catch{}}function ve(){try{window.localStorage.removeItem(he)}catch{}}function $a(){const[s]=Ce(),a=i.useMemo(Da,[]),t=i.useMemo(je,[]),c=s.get("intent")==="consultation"?"consultation":null,o=!!a&&!!a.resolved&&typeof a.resolved.pathway=="string"&&a.resolved.pathway.length>0,[r,j]=i.useState(o&&a.step||1),[m,N]=i.useState(o&&a.topId||null),[f,E]=i.useState(o&&a.subId||null),[w,d]=i.useState(o?a.resolved:null);i.useEffect(()=>{let l=!1;if(t&&o&&(a!=null&&a.resolved))return(async()=>{try{if(await pe({name:null,mobile:null,pathway:a.resolved.pathway,specialtyTag:a.resolved.specialtyTag,subjectType:"SELF",source:"WEB",bookingIntent:c}),l)return;ve(),window.location.assign("/care/status")}catch(x){if(l)return;const v=(x==null?void 0:x.message)||"init_failed";window.location.assign(`/care/status?initFailed=1&reason=${encodeURIComponent(v)}`)}})(),()=>{l=!0}},[]),i.useEffect(()=>{const l=s.get("initial");if(!l||r!==1||w)return;const x=Ie.find(v=>l.startsWith(v.id));if(x){if(x.subOptions){const v=x.subOptions.find(b=>l===b.id);if(!v)return;N(x.id),E(v.id),d({pathway:v.pathway,specialtyTag:v.specialtyTag,topLabel:x.label,subLabel:v.label})}else N(x.id),d({pathway:x.pathway,specialtyTag:x.specialtyTag,topLabel:x.label,subLabel:null});j(2)}},[s,r,w]);const p=async l=>{N(l.topId),E(l.subId);const x={pathway:l.pathway,specialtyTag:l.specialtyTag,topLabel:l.topLabel,subLabel:l.subLabel};if(d(x),t){ge({step:99,topId:l.topId,subId:l.subId,resolved:x});try{await pe({name:null,mobile:null,pathway:x.pathway,specialtyTag:x.specialtyTag,subjectType:"SELF",source:"WEB",bookingIntent:c}),ve(),window.location.assign("/care/status")}catch(v){const b=(v==null?void 0:v.message)||"init_failed";window.location.assign(`/care/status?initFailed=1&reason=${encodeURIComponent(b)}`)}return}ge({step:2,topId:l.topId,subId:l.subId,resolved:x}),j(2)},g=l=>{if(ve(),l&&l.existingPatientPath){window.location.assign("/patient-home?newCareRequest=1");return}window.location.assign("/care/status")},y=l=>{j(l),ge({step:l,topId:m,subId:f,resolved:w})};return r===1?e.jsx(Oa,{initialTopId:m,initialSubId:f,onPick:p,intent:c}):r===2?e.jsx(Ra,{pathwayLabel:(w==null?void 0:w.subLabel)||(w==null?void 0:w.topLabel),onBack:()=>y(1),onContinue:()=>{ge({step:3,topId:m,subId:f,resolved:w}),j(3)},intent:c}):e.jsx(Wa,{resolvedPathway:w,onBack:()=>y(2),intent:c,onChangePathway:()=>y(1),onSignedUp:g})}const Se={PSYCHIATRY:[{id:"anxiety",label:"Anxiety"},{id:"low_mood",label:"Low mood / depression"},{id:"sleep",label:"Sleep"},{id:"focus",label:"Focus / attention"},{id:"addiction",label:"Addiction / substance use"},{id:"other",label:"Something else"}],THERAPY:[{id:"anxiety",label:"Anxiety"},{id:"low_mood",label:"Low mood"},{id:"sleep",label:"Sleep"},{id:"relationships",label:"Relationships"},{id:"work_stress",label:"Work / stress"},{id:"grief",label:"Grief / loss"},{id:"other",label:"Something else"}],BIOLOGICAL:[{id:"thyroid",label:"Thyroid"},{id:"diabetes",label:"Diabetes"},{id:"pcos",label:"PCOS / period concerns"},{id:"weight",label:"Weight"},{id:"autoimmune",label:"Autoimmune flare"},{id:"joint_skin",label:"Joint / skin"},{id:"unexplained",label:"Unexplained inflammation"},{id:"other",label:"Something else"}],CHILD:[{id:"growth",label:"Growth"},{id:"behavior",label:"Behaviour"},{id:"learning",label:"Learning"},{id:"sleep",label:"Sleep"},{id:"nutrition",label:"Nutrition"},{id:"other",label:"Something else"}],ASSESSMENT:[{id:"not_sure",label:"I'm not sure yet"},{id:"general",label:"General check-in"},{id:"other",label:"Something else"}]};function Ba(s){return s&&Se[s]||Se.ASSESSMENT}const $e=[{id:"DAYS",label:"A few days"},{id:"WEEKS",label:"A few weeks"},{id:"MONTHS",label:"Months"},{id:"LONG_TERM",label:"Long term — over a year"}],Be=[{id:"NONE",label:"Nothing yet"},{id:"THERAPY",label:"Therapy"},{id:"MEDICATION",label:"Medication"},{id:"BOTH",label:"Both therapy and medication"}],Ye=[{id:"SELF",label:"For me"},{id:"CHILD",label:"For my child"},{id:"DEPENDENT",label:"For someone I care for"}],Ya=900;function qe(s){const a=(s==null?void 0:s.prospect)||{},t=a.intakeAnswers||{},n=t.subject||{};return{presentingConcerns:Array.isArray(t.presentingConcerns)?t.presentingConcerns:[],freeText:t.freeText||"",duration:t.duration||null,priorSupportHistory:t.priorSupportHistory||null,subjectType:a.subjectType||"SELF",subjectName:n.name||"",subjectDob:n.dob||"",subjectGender:n.gender||"",medicalHistorySummary:t.medicalHistorySummary||"",preferredClinicHint:a.preferredClinicHint||t.preferredClinicHint||""}}function Ge(s){const a=s.subjectType||"SELF",t=a!=="SELF"&&(s.subjectName||s.subjectDob||s.subjectGender)?{name:s.subjectName||null,dob:s.subjectDob||null,gender:s.subjectGender||null}:null;return{presentingConcerns:s.presentingConcerns,freeText:s.freeText,duration:s.duration,priorSupportHistory:s.priorSupportHistory,subjectType:a,subject:t,medicalHistorySummary:s.medicalHistorySummary,preferredClinicHint:s.preferredClinicHint}}function le({title:s,summary:a,isFilled:t,defaultOpen:n=!1,children:c}){const[o,r]=i.useState(n);return e.jsxs("div",{className:`csi-section${o?" is-open":""}`,children:[e.jsxs("button",{type:"button",className:"csi-section-header",onClick:()=>r(j=>!j),children:[e.jsxs("span",{children:[e.jsx("span",{className:"csi-section-title",children:s}),a?e.jsx("span",{className:"csi-section-summary",children:a}):null]}),e.jsx("span",{className:`csi-section-status${t?" is-filled":""}
1`,"aria-hidden":!0,children:t?e.jsxs(e.Fragment,{children:[e.jsx(V,{})," Saved"]}):"Not yet"}),e.jsx("span",{className:"csi-section-chev","aria-hidden":!0,children:e.jsx(is,{})})]}),o?e.jsx("div",{className:"csi-section-body",children:c}):null]})}function qa({options:s,value:a,onChange:t,multi:n=!0}){const c=i.useMemo(()=>new Set(Array.isArray(a)?a:[]),[a]);return e.jsx("div",{className:"csi-chips",role:n?"group":"radiogroup",children:s.map(o=>{const r=n?c.has(o.id):a===o.id;return e.jsx("button",{type:"button",className:`csi-chip${r?" is-active":""}`,onClick:()=>{if(n){const j=new Set(c);j.has(o.id)?j.delete(o.id):j.add(o.id),t(Array.from(j))}else t(o.id)},children:o.label},o.id)})})}function ke({options:s,value:a,onChange:t}){return e.jsx("div",{className:"csi-radio-grid",role:"radiogroup",children:s.map(n=>e.jsx("button",{type:"button",role:"radio","aria-checked":a===n.id,className:`csi-radio${a===n.id?" is-active":""}`,onClick:()=>t(n.id),children:n.label},n.id))})}function Ga({bundle:s,onUpdated:a}){var w;const[t,n]=i.useState(!1),[c,o]=i.useState(""),[r,j]=i.useState(!1),m=i.useRef(null),N=((w=s==null?void 0:s.prospect)==null?void 0:w.reports)||[],f=async d=>{if(o(""),!d||d.length===0)return;const p=d[0];if(p.size>25*1024*1024){o("File is too large. Max 25 MB.");return}if(!/^(application\/pdf|image\/(jpe?g|png))$/i.test(p.type)){o("Only PDF, JPG, or PNG files are accepted.");return}try{n(!0);const g=await na(p,null);a(y=>({...y||{},prospect:g||(y==null?void 0:y.prospect)}))}catch(g){o(g.message||"Could not upload that file.")}finally{n(!1),m.current&&(m.current.value="")}},E=async d=>{o("");try{const p=await ia(d);a(g=>({...g||{},prospect:p||(g==null?void 0:g.prospect)}))}catch(p){o(p.message||"Could not remove that file.")}};return e.jsxs(le,{title:"Reports & documents",summary:"Upload past reports, prescriptions, or scans you'd like the specialist to see.",isFilled:N.length>0,children:[e.jsxs("div",{className:`csi-dropzone${r?" is-dragging":""}`,role:"button",tabIndex:0,onClick:()=>{var d;return(d=m.current)==null?void 0:d.click()},onKeyDown:d=>{var p;(d.key==="Enter"||d.key===" ")&&((p=m.current)==null||p.click())},onDragOver:d=>{d.preventDefault(),j(!0)},onDragLeave:()=>j(!1),onDrop:d=>{d.preventDefault(),j(!1),f(d.dataTransfer.files)},children:[e.jsx("input",{ref:m,type:"file",accept:"application/pdf,image/jpeg,image/png",style:{display:"none"},onChange:d=>f(d.target.files)}),t?e.jsx("strong",{children:"Uploading…"}):e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:"Drag a file here, or click to browse"}),e.jsx("span",{className:"csi-dropzone-hint",children:"PDF, JPG, or PNG. Up to 25 MB each, 10 files total."})]})]}),c?e.jsx("div",{className:"csi-help",style:{color:"#b42318"},children:c}):null,N.length>0?e.jsx("ul",{className:"csi-reports-list",children:N.map(d=>e.jsxs("li",{className:"csi-report",children:[e.jsxs("div",{className:"csi-report-meta",children:[e.jsx("span",{className:"csi-report-name",children:d.fileName||"Report"}),e.jsxs("span",{className:"csi-report-sub",children:[d.contentType||"file",d.sizeBytes?` · ${(d.sizeBytes/1024).toFixed(0)} KB`:"",d.uploadedAt?` · ${new Date(d.uploadedAt).toLocaleDateString()}`:""]})]}),e.jsx("button",{type:"button",className:"csi-report-remove",onClick:()=>E(d.id),children:"Remove"})]},d.id))}):null]})}function Va({bundle:s,onBundleChange:a}){var ae,L,Y,U,O;const t=i.useMemo(()=>qe(s),[s]),[n,c]=i.useState(t),[o,r]=i.useState("idle"),[j,m]=i.useState(""),[N,f]=i.useState("idle"),[E,w]=i.useState(""),d=i.useRef(null),p=i.useRef(!1),g=i.useRef(null),y=((ae=s==null?void 0:s.prospect)==null?void 0:ae.intakeSubmittedAt)||null,l=!!y;i.useEffect(()=>{c(qe(s))},[(L=s==null?void 0:s.prospect)==null?void 0:L.id]),i.useEffect(()=>{if(!p.current){p.current=!0;return}return d.current&&clearTimeout(d.current),r("saving"),d.current=setTimeout(async()=>{try{const h=await He(Ge(n));h&&a&&a(h),r("saved"),m("")}catch(h){r("error"),m(h.message||"Could not save your changes.")}},Ya),()=>{d.current&&clearTimeout(d.current)}},[n]);const x=h=>u=>c(_=>({..._,[h]:u})),v=async()=>
1{if(N!=="submitting"){f("submitting"),w("");try{d.current&&(clearTimeout(d.current),d.current=null);const h=await He({...Ge(n),intakeSubmittedAt:"now"});h&&a&&a(h),f("submitted"),r("saved"),setTimeout(()=>{var u;try{(u=g.current)==null||u.scrollIntoView({behavior:"smooth",block:"start"})}catch{}},80)}catch(h){f("error"),w((h==null?void 0:h.message)||"Could not send your details just now.")}}},b=(Y=s==null?void 0:s.prospect)==null?void 0:Y.pathway,P=Ba(b),I=n.presentingConcerns.length?n.presentingConcerns.map(h=>{var u;return((u=P.find(_=>_.id===h))==null?void 0:u.label)||h}).join(", "):"",A=(()=>{if(n.subjectType==="SELF")return"For me";const h=Ye.find(u=>u.id===n.subjectType);return n.subjectName?`${(h==null?void 0:h.label)||n.subjectType} — ${n.subjectName}`:(h==null?void 0:h.label)||n.subjectType})(),K=(()=>{if(!y)return null;try{return new Date(y).toLocaleString()}catch{return y}})();return e.jsxs("div",{ref:g,children:[l?e.jsxs(ee,{className:"csi-thanks-card",emphasised:!0,children:[e.jsx("div",{className:"csi-thanks-icon","aria-hidden":!0,children:e.jsx(V,{})}),e.jsxs("div",{className:"csi-thanks-body",children:[e.jsx(H,{children:"You’re all set"}),e.jsx(B,{as:"h2",children:"Thanks — we’ve got what we need."}),e.jsx(G,{children:"Our care team is reviewing what you shared. We’ll reach out within 24 hours with a matched specialist and a clear next step."}),K?e.jsxs("p",{className:"csi-thanks-meta",children:["Sent ",K]}):null,e.jsx("p",{className:"csi-thanks-note",children:"You can still add or update anything below — re-send when you’re done."})]})]}):null,e.jsxs(ee,{className:"pps-card-form",emphasised:!0,children:[e.jsx(H,{children:l?"Add more if you like":"Help us help you better"}),e.jsx(B,{as:"h2",children:l?"Anything to add?":"Tell us more"}),e.jsx(G,{children:l?'Already sent to our care team — but feel free to keep filling things in. Each section saves on its own; tap "Send updates" when you’re done.':'Each section saves as you type. When you’re done, tap "Send to our care team" at the bottom — that’s the cue we use to pick up your request.'}),e.jsxs("div",{className:`csi-savebar is-${o}`,"aria-live":"polite",children:[o==="saving"?"Saving…":null,o==="saved"?e.jsxs(e.Fragment,{children:[e.jsx(V,{})," Saved"]}):null,o==="error"?`Could not save — ${j}`:null]}),e.jsxs(le,{title:"What's bringing you here",summary:I||n.freeText?I||n.freeText.slice(0,80):"Pick what fits, or tell us in your own words.",isFilled:n.presentingConcerns.length>0||!!n.freeText,defaultOpen:!0,children:[e.jsx(qa,{options:P,value:n.presentingConcerns,onChange:x("presentingConcerns")}),e.jsx("textarea",{className:"csi-textarea",placeholder:"In your own words — what's been going on?",value:n.freeText,onChange:h=>x("freeText")(h.target.value),style:{marginTop:"0.75rem"}})]}),e.jsx(le,{title:"How long has this been going on",summary:((U=$e.find(h=>h.id===n.duration))==null?void 0:U.label)||"",isFilled:!!n.duration,children:e.jsx(ke,{options:$e,value:n.duration,onChange:x("duration")})}),e.jsx(le,{title:"What you've tried so far",summary:((O=Be.find(h=>h.id===n.priorSupportHistory))==null?void 0:O.label)||"",isFilled:!!n.priorSupportHistory,children:e.jsx(ke,{options:Be,value:n.priorSupportHistory,onChange:x("priorSupportHistory")})}),e.jsxs(le,{title:"Who is this for",summary:A,isFilled:n.subjectType!=="SELF",children:[e.jsx(ke,{options:Ye,value:n.subjectType,onChange:h=>x("subjectType")(h)}),n.subjectType!=="SELF"?e.jsxs("div",{className:"csi-field-grid",children:[e.jsx("input",{className:"csi-input",type:"text",placeholder:"Their name",value:n.subjectName,onChange:h=>x("subjectName")(h.target.value)}),e.jsx("input",{className:"csi-input",type:"date",placeholder:"Date of birth",value:n.subjectDob,onChange:h=>x("subjectDob")(h.target.value)}),e.jsx("input",{className:"csi-input",type:"text",placeholder:"Gender (optional)",value:n.subjectGender,onChange:h=>x("subjectGender")(h.target.value)})]}):null]}),e.jsx(le,{title:"Any relevant medical history",summary:n.medicalHistorySummary?n.medicalHistorySummary.slice(0,80)+(n.medicalHistorySummary.length>80?"…":""):"",isFilled:!!n.medicalHistorySummary,children:e.jsx("textarea",{className:"csi-textarea",placeholder:"Anything that might help the specialist understand the full picture — past diagnoses, medications, allergies, etc.",value:n.medicalHistorySummary,onChange:h=>x("medicalHistorySummary")(h.target.value)})}),e.jsx(Ga,{bundle:s,onUpdated:a}),e.jsxs(le,{title:"Any clinic in mind",summary:n.preferredClinicHint?n.preferredClinicHint.slice(0,80):"Optional — type a name, area, or 'open to anywhere'.",isFilled:!!n.preferredClinicHint,children:[e.jsx("input",{className:"csi-input",type:"text",placeholder:"e.g. Bangalore — south, in-person if possible",value:n.preferredClinicHint,onChange:h=>x("preferredClinicHint")(h.target.value)}),e.jsx("div",{className:"csi-help",children:"We won’t lock you in — this is just a hint for our care team."})]}),e.jsxs("div",{className:"csi-submit-row",children:[e.jsx("button",{type:"button",className:`pps-btn is-primary csi-submit-btn${N==="submitting"?" is-busy":""}`,onClick:v,disabled:N==="submitting","aria-busy":N==="submitting"||void 0,children:N==="submitting"?"Sending…":l?"Send updates to our care team"
1:"Send to our care team"}),e.jsx("div",{className:"csi-submit-inline-status",role:"status","aria-live":"polite",children:N==="submitting"?e.jsx("span",{className:"csi-submit-pill csi-submit-pill--busy",children:"Sending your details…"}):N==="submitted"?e.jsxs("span",{className:"csi-submit-pill csi-submit-pill--ok",children:[e.jsx(V,{})," Sent to our care team — they’ll reach out within 24 hours"]}):N==="error"?e.jsx("span",{className:"csi-submit-pill csi-submit-pill--err",children:E||"Could not send your details just now. Please try again."}):null}),e.jsx("p",{className:"csi-submit-help",children:l?"We already have what you sent — this just lets us know there’s an update.":"Everything above is already saved. This just lets our care team know you’re ready for them to pick it up."})]})]})]})}function Ja(){try{const s=window.localStorage.getItem(he);if(!s)return null;const a=JSON.parse(s);return!(a!=null&&a.savedAt)||Date.now()-a.savedAt>us?(window.localStorage.removeItem(he),null):a}catch{return null}}const oe={whatsapp:"https://wa.me/918047492952",phone:"+918047492952"},Ve={PSYCHIATRY:"Mental health",THERAPY:"Mental health",BIOLOGICAL:"Biological",CHILD:"Child growth & care",ASSESSMENT:"Not sure / something else"},Je={endocrinology:"Hormonal health",rheumatology:"Immune system"},Ka={psychiatry:"Psychiatry",psychology:"Therapy / Psychology"};function za(s){var o;if(!s)return null;const a=Array.isArray((o=s.intakeAnswers)==null?void 0:o.presentingConcerns)?s.intakeAnswers.presentingConcerns.map(r=>String(r).toLowerCase()):[],t=String(s.specialtyTag||"").toLowerCase(),n=String(s.pathway||"").toUpperCase(),c=(...r)=>a.some(j=>r.some(m=>j.includes(m)));return c("depress","low mood","sad")?{slug:"phq-9",name:"PHQ-9 (Depression screener)",why:"Quick screen for low-mood signs you mentioned"}:c("anxi","worry","panic")?{slug:"gad-7",name:"GAD-7 (Anxiety screener)",why:"Quick screen for the anxiety signs you mentioned"}:c("sleep","insomn")?{slug:"psqi",name:"PSQI (Sleep quality)",why:"Quick screen for the sleep concerns you mentioned"}:c("stress","burnout")?{slug:"pss-10",name:"PSS-10 (Perceived stress)",why:"Quick screen for the stress you described"}:t==="psychiatry"||t==="psychology"?{slug:"phq-9",name:"PHQ-9 (Depression screener)",why:"A common starting point for talk-therapy / psychiatry pathways"}:t==="endocrinology"?{slug:"pss-10",name:"PSS-10 (Perceived stress)",why:"A common companion to hormonal-health intake"}:n==="PSYCHIATRY"||n==="THERAPY"?{slug:"phq-9",name:"PHQ-9 (Depression screener)",why:"A common starting point for mental-health pathways"}:null}function Qa(s,a){return a&&Je[a]?Je[a]:s&&Ve[s]?Ve[s]:"Healthcare"}function Za(s){return s&&Ka[s]||null}function Xa(s,a){const t=s==null?void 0:s.prospect;return t!=null&&t.pathway||t!=null&&t.specialtyTag?{topLabel:Qa(t.pathway,t.specialtyTag),subLabel:Za(t.specialtyTag)}:a!=null&&a.resolved?a.resolved:null}function et(s){var t;const a=(t=s==null?void 0:s.prospect)==null?void 0:t.name;return a?a.split(" ")[0]:"there"}function st(){var K,ae,L,Y,U,O,h;const[s,a]=i.useState(null),[t,n]=i.useState(null),[c,o]=i.useState(!1),r=i.useMemo(je,[]),[j]=Ce(),m=j.get("initFailed")==="1",N=j.get("reason")||"",f=j.get("fromAssessment")==="1",E=i.useRef(null),[w,d]=i.useState(!1);i.useEffect(()=>{if(n(Ja()),r){const u=ra(),_=u?la(u).finally(()=>ca()):Promise.resolve(null);o(!0),_.then(()=>oa()).then(Z=>a(Z)).catch(()=>a(null)).finally(()=>o(!1))}},[r]),i.useEffect(()=>{if(!f||!(s!=null&&s.prospect)||!E.current)return;const u=setTimeout(()=>{try{E.current.scrollIntoView({behavior:"smooth",block:"start"})}catch{}},120);return()=>clearTimeout(u)},[f,s]);const p=async u=>{if(u!=null&&u.preventDefault&&u.preventDefault(),!w){d(!0);try{await da()}catch{}finally{try{window.sessionStorage.setItem("explicitlyChoseConsumerPortal","true"),window.sessionStorage.removeItem("portalAutoNavigatedToAtFlow"),window.localStorage.removeItem("lastChosenFlow")}catch{}window.location.assign("/wellness")}}},g=Xa(s,t),y=s==null?void 0:s.recommendation,l=et(s),x=(K=s==null?void 0:s.prospect)==null?void 0:K.createdAt,v=!!(s!=null&&s.prospect);if(!v&&!g)return e.jsxs(C,{className:"pps-shell",children:[e.jsx(H,{children:"Care status"}),e.jsx(B,{as:"h1",children:m?"You’re signed in. We just couldn’t finish the matching step.":"No active care request found"}),e.jsx(G,{children:m?"Your account is set up, but the request to match you with a specialist didn’t go through. Try once more — it only takes a minute.":"To get matched with a specialist, start a new request — it only takes a minute."}),m&&N?e.jsxs("div",{className:"pps-recap",role:"status",style:{marginTop:"0.75rem",borderColor:"var(--slate-200)"},children:[e.jsx("strong",{children:"Why it didn’t finish: "}),N]}):null,e.jsx("div",{className:"pps-cta-row",children:e.jsx(D,{to:"/care/get-started",className:"pps-btn is-primary",children:m?"Try matching again":"Start a new request"})}),c?e.jsx("div",{className:"pps-help",style:{marginTop:"1rem"},children:"Loading the latest from your care team…"}):null,e.jsxs("p",{className:"pps-wellness-escape",children:["Just here for the AUMHUM wellness a
1pp?"," ",e.jsx("a",{href:"/",onClick:p,children:w?"Taking you there…":"Continue to the wellness app →"})]})]});const b=new Set(["CLOSED"]),P=new Set(["PROMOTED"]),I=(ae=s==null?void 0:s.prospect)==null?void 0:ae.status;if(b.has(I))return e.jsxs(C,{className:"pps-shell",children:[e.jsx(H,{children:"Your care request"}),e.jsx(B,{as:"h1",children:l==="there"?"Thanks for reaching out.":`${l}, thanks for reaching out.`}),e.jsx(G,{children:"We weren’t able to take this particular request forward, but we’re still here whenever you need us. You can chat with our care team anytime, or start a fresh request whenever you’re ready."}),e.jsx(ee,{className:"pps-success-card",style:{borderColor:"var(--slate-200)"},children:e.jsxs("div",{className:"pps-contact-row",children:[e.jsxs("a",{className:"pps-contact-btn",href:oe.whatsapp,target:"_blank",rel:"noreferrer",children:[e.jsx(se,{})," WhatsApp"]}),e.jsxs("a",{className:"pps-contact-btn",href:`tel:${oe.phone}`,children:[e.jsx(ce,{})," Call us"]})]})}),e.jsx("div",{className:"pps-cta-row",style:{marginTop:"1rem"},children:e.jsx(D,{to:"/care/get-started",className:"pps-btn is-primary",children:"Start a new request"})}),e.jsxs("div",{className:"pps-recap",style:{marginTop:"1.25rem"},children:[e.jsx(z,{style:{verticalAlign:"-3px",marginRight:6}}),"We keep your information confidential. Reaching out again is always welcome."]})]});if(P.has(I))return e.jsxs(C,{className:"pps-shell",children:[e.jsx(H,{children:"Your care request"}),e.jsx(B,{as:"h1",children:l==="there"?"You’re matched with a specialist.":`${l}, you’re matched with a specialist.`}),e.jsx(G,{children:"Your request has moved forward and a clinic is now coordinating your care. Find your bookings, prescriptions, and updates in your patient home."}),e.jsx("div",{className:"pps-cta-row",children:e.jsx(D,{to:"/patient-home",className:"pps-btn is-primary",children:"Open patient home"})}),e.jsx(ee,{className:"pps-success-card",style:{marginTop:"1rem"},children:e.jsxs("div",{className:"pps-contact-row",children:[e.jsxs("a",{className:"pps-contact-btn",href:oe.whatsapp,target:"_blank",rel:"noreferrer",children:[e.jsx(se,{})," WhatsApp"]}),e.jsxs("a",{className:"pps-contact-btn",href:`tel:${oe.phone}`,children:[e.jsx(ce,{})," Call us"]})]})})]});const A=za(s==null?void 0:s.prospect);return e.jsxs(C,{className:"pps-shell",children:[e.jsx(H,{children:"Your care request"}),e.jsx(B,{as:"h1",children:l==="there"?"We’re finding the right specialist for you.":`Hi ${l} — we’re finding the right specialist for you.`}),e.jsxs("div",{className:"pps-status-strip",role:"status",children:[e.jsxs("div",{className:"pps-status-strip-line",children:[e.jsxs("span",{className:"pps-success-status",children:[e.jsx(V,{})," Submitted",x?e.jsxs("span",{className:"pps-status-strip-when",children:[" · ",new Date(x).toLocaleString()]}):null]}),g?e.jsxs("span",{className:"pps-status-strip-pill",children:[g.topLabel,g.subLabel?e.jsxs(e.Fragment,{children:[" · ",g.subLabel]}):null]}):null]}),e.jsxs("div",{className:"pps-status-strip-contacts",children:[e.jsx("span",{className:"pps-status-strip-note",children:"Care coordinator within 24h."}),e.jsxs("a",{className:"pps-contact-btn pps-contact-btn--sm",href:oe.whatsapp,target:"_blank",rel:"noreferrer",children:[e.jsx(se,{})," WhatsApp"]}),e.jsxs("a",{className:"pps-contact-btn pps-contact-btn--sm",href:`tel:${oe.phone}`,children:[e.jsx(ce,{})," Call"]})]})]}),v?e.jsxs("section",{ref:E,className:"pps-next-step-frame","aria-labelledby":"pps-next-step-title",children:[e.jsxs("div",{className:"pps-next-step-header",children:[e.jsxs("div",{className:"pps-step-badge","aria-hidden":"true",children:[e.jsx("span",{className:"pps-step-badge-dot"})," Next step"]}),e.jsx("h2",{id:"pps-next-step-title",className:"pps-next-step-title",children:f?"Share more about what you’re going through":"Tell us more about you"}),e.jsx("p",{className:"pps-next-step-lede",children:f?"Your assessment is saved. To help our care team match you with the right specialist, share a few more details below — what’s been going on, how long, and anything we should know.":"The more you share, the better our care team can match you to the right specialist. Each section auto-saves as you type — you can come back anytime."}),e.jsxs("div",{className:"pps-next-step-meta","aria-hidden":"true",children:[e.jsx("span",{className:"pps-next-step-arrow",children:"↓"}),e.jsx("span",{className:"pps-next-step-meta-label",children:"Fill the form below — takes 2-3 minutes"})]})]}),e.jsx(Va,{bundle:s,onBundleChange:a})]}):null,y?e.jsxs(ee,{className:"pps-card-form",style:{marginTop:"1rem"},children:[e.jsx(H,{children:"Initial recommendation"}),e.jsx(B,{as:"h2",children:y.userFacingSummary}),y.rationale?e.jsx(G,{children:y.rationale}):null]}):null,e.jsxs(ee,{className:"pps-card-form",style:{marginTop:"1rem"},children:[e.jsx(H,{children:"Self-assessment"}),e.jsx(B,{as:"h2",children:((L=s==null?void 0:s.recentAssessments)==null?void 0:L.length)>0?"Your assessments":A?"Recommended for you":"Add a private screener to your request"}),e.jsx(G,{children:A&&!(((Y=s==null?void 0:s.recentAssessments)==null?void 0:Y.length)>0)?A.why:"Short clinician-validated screeners can give your care coordinator a clearer first read before they reach out."}),((U=s==null?void 0:s.recentAssessments)==null?void 0:U.length)>
10?e.jsx("ul",{className:"pps-assessment-list",children:s.recentAssessments.slice(0,5).map(u=>{const _=Number.isFinite(u==null?void 0:u.userScore)&&(u!=null&&u.severityBucket)?`${u.severityBucket} · ${u.userScore}`:(u==null?void 0:u.severityBucket)||(Number.isFinite(u==null?void 0:u.userScore)?`${u.userScore}`:null);return e.jsxs("li",{className:"pps-assessment-item",children:[e.jsx("span",{className:"pps-assessment-name",children:(u==null?void 0:u.assessmentName)||(u==null?void 0:u.assessmentSlug)||"Assessment"}),_?e.jsx("span",{className:"pps-assessment-headline",children:_}):null,u!=null&&u.takenAt?e.jsx("span",{className:"pps-assessment-when",children:new Date(u.takenAt).toLocaleDateString()}):null]},u.id||`${u.assessmentSlug}-${u.takenAt}`)})}):null,e.jsx("div",{className:"pps-cta-row",children:A&&!(((O=s==null?void 0:s.recentAssessments)==null?void 0:O.length)>0)?e.jsxs(e.Fragment,{children:[e.jsxs(D,{to:`/wellness/assessment/${A.slug}?fromCareStatus=1`,className:"pps-btn is-primary",children:["Take ",A.name,e.jsx(xe,{})]}),e.jsx(D,{to:"/wellness/assessment",className:"pps-btn is-ghost",style:{marginLeft:"0.5rem"},children:"Browse all screeners"})]}):e.jsxs(D,{to:"/wellness/assessment",className:"pps-btn is-primary",children:[((h=s==null?void 0:s.recentAssessments)==null?void 0:h.length)>0?"Take another":"Start a self-assessment",e.jsx(xe,{})]})})]}),e.jsxs("div",{className:"pps-recap",style:{marginTop:"1.25rem"},children:[e.jsx(z,{style:{verticalAlign:"-3px",marginRight:6}}),"Your details are encrypted and shared only with the assigned care team."]}),c?e.jsx("div",{className:"pps-help",style:{marginTop:"1rem"},children:"Loading the latest from your care team…"}):null,null]})}const ne="https://aumhum.com",at=()=>e.jsxs("main",{id:"main",children:[e.jsx(Os,{}),e.jsx(Rs,{}),e.jsx(Fs,{}),e.jsx(Hs,{}),e.jsx(_s,{}),e.jsx(Us,{}),e.jsx(Ws,{}),e.jsx(Ds,{}),e.jsx($s,{}),e.jsx(Bs,{}),e.jsx(Ys,{}),e.jsx(qs,{}),e.jsx(Gs,{}),e.jsx(Vs,{}),e.jsx(Js,{}),e.jsx(rs,{})]}),tt=()=>e.jsxs("main",{id:"main",children:[e.jsx(Ks,{}),e.jsx(zs,{}),e.jsx(Qs,{}),e.jsx(Zs,{}),e.jsx(Xs,{}),e.jsx(ea,{}),e.jsx(sa,{}),e.jsx(rs,{})]}),nt=()=>e.jsx("main",{id:"main",children:e.jsx(aa,{})}),it=()=>e.jsx(ja,{}),rt=()=>{const{slug:s}=be(),a=es.find(t=>t.slug===s);return a?e.jsx("main",{id:"main",children:e.jsx(ls,{config:a})}):e.jsx(Me,{})},lt=()=>{const{slug:s}=be(),a=ss.find(t=>t.slug===s);return a?e.jsx("main",{id:"main",children:e.jsx(ls,{config:a})}):e.jsx(Me,{})},ct=({onContactClick:s})=>{const{slug:a}=be();return Pe(a)?e.jsx(ua,{slug:a,onContactClick:s}):e.jsx(Me,{})},Me=()=>e.jsx("main",{id:"main",className:"as-section as-section-alt",children:e.jsxs(C,{children:[e.jsx(Xe,{children:e.jsx("meta",{name:"robots",content:"noindex"})}),e.jsxs("div",{className:"as-max-w-3",children:[e.jsx("h1",{className:"as-h2",children:"This page could not be found."}),e.jsx("p",{className:"as-lede",children:"Try starting from the homepage, or explore how care works at AUMHUM."}),e.jsxs("div",{className:"as-mt-6 as-flex as-gap-3 as-wrap",children:[e.jsx(D,{to:"/",className:"as-btn as-btn-primary",children:"Go to home"}),e.jsx(D,{to:"/how-care-works",className:"as-btn as-btn-secondary",children:"How care works"})]})]})]})}),de={"@context":"https://schema.org","@type":"MedicalBusiness",name:"AUMHUM",url:ne,logo:ie.APP_LOGO_LINK,sameAs:[ie.PLAY_STORE_APP_LINK,ie.APP_STORE_APP_LINK].filter(Boolean),medicalSpecialty:["Psychiatry","Psychology","Endocrinology"],areaServed:["IN","US","AE"],availableLanguage:["en","hi"],contactPoint:[{"@type":"ContactPoint",contactType:"customer support",email:ie.SUPPORT_EMAIL,availableLanguage:["en","hi"]}]};function ot(s,a,t){var o;const n=`${ne}${a}`,c={"@context":"https://schema.org"};return s==="how-care-works"?[de,{...c,"@type":"MedicalWebPage",name:"How care works at AUMHUM",url:n,about:"Continuous clinical care model integrating therapy, psychiatry, and endocrinology.",audience:{"@type":"PeopleAudience",audienceType:"patients"}},{...c,"@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Do I have to see a psychiatrist or an endocrinologist?",acceptedA
1nswer:{"@type":"Answer",text:"These specialists are brought into your plan only when clinically indicated. Many people are supported entirely by therapy."}},{"@type":"Question",name:"Is this remote or in-person?",acceptedAnswer:{"@type":"Answer",text:"Both. Care is delivered across outpatient clinics, rehabilitation settings, and secure teleconsultation."}},{"@type":"Question",name:"How is my clinical data protected?",acceptedAnswer:{"@type":"Answer",text:"Clinical data is protected under documented privacy and governance standards. Access is restricted to your care team."}}]}]:s==="students"?[de,{...c,"@type":"EducationalOccupationalProgram",name:"AUMHUM Experience Program",description:"A 6-month clinical placement program for psychology students — real patient exposure, supervision, and rotation across AUMHUM clinical settings.",timeToComplete:"P6M",provider:{"@type":"Organization",name:"AUMHUM",url:ne},url:n}]:s==="care-start"?[de,{...c,"@type":"MedicalWebPage",name:"Start care at AUMHUM",url:n,about:"Guided care intake across portal, WhatsApp, and callback-based assistance.",audience:{"@type":"PeopleAudience",audienceType:"patients"}}]:s==="doctor"||s==="caregiver"?[de,{...c,"@type":"JobPosting",title:t==null?void 0:t.title,description:t==null?void 0:t.intro,hiringOrganization:{"@type":"Organization",name:"AUMHUM",sameAs:ne},employmentType:"FULL_TIME",jobLocationType:"TELECOMMUTE",url:n}]:s==="condition"&&t?[de,{...c,"@type":"MedicalCondition",name:t.title,alternateName:t.tagline||void 0,description:Array.isArray(t.overview)&&t.overview.length?t.overview[0]:t.cardBlurb,url:n,signOrSymptom:(t.signs||[]).slice(0,8).map(r=>({"@type":"MedicalSignOrSymptom",name:r})),possibleTreatment:[{"@type":"TherapeuticProcedure",name:"Psychotherapy"},{"@type":"TherapeuticProcedure",name:"Psychiatric medication"},{"@type":"TherapeuticProcedure",name:"Combined pharmacotherapy and psychotherapy"}]},(o=t.faqs)!=null&&o.length?{...c,"@type":"FAQPage",mainEntity:t.faqs.map(r=>({"@type":"Question",name:r.q,acceptedAnswer:{"@type":"Answer",text:r.a}}))}:null,{...c,"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:ne},{"@type":"ListItem",position:2,name:"Conditions we help with",item:`${ne}/#conditions`},{"@type":"ListItem",position:3,name:t.title,item:n}]}].filter(Boolean):[de,{...c,"@type":"WebSite",name:"AUMHUM",url:ne,potentialAction:{"@type":"SearchAction",target:`${ne}/therapy-psychiatry?search={search_term_string}`,"query-input":"required name=search_term_string"}}]}const dt=({view:s,pathname:a,config:t})=>{const n=i.useMemo(()=>s==="how-care-works"?{title:"How care works at AUMHUM — continuous clinical mental healthcare",description:"See how AUMHUM delivers continuous care: clinical intake, assessment, therapy, psychiatric and endocrine review, measurement, and ongoing continuity."}:s==="students"?{title:"AUMHUM Experience Program — clinical placement for psychology students",description:"6-month supervised clinical placement for undergraduate, post-graduate, MPhil, and PhD psychology students at AUMHUM."}:s==="care-start"?{title:"Start care at AUMHUM — portal, WhatsApp, or callback",description:"Choose portal, WhatsApp, or phone callback to begin a guided care intake and get routed to the right next step."}:s==="care-get-started"?{title:"Get matched with a specialist | AUMHUM",description:"Tell us what kind of care you need and create a free, confidential account so we can match you with the right specialist."}:s==="care-status"?{title:"Your care request | AUMHUM",description:"Track your care request and reach our team when you need to."}:(s==="doctor"||s==="caregiver")&&t?{title:`${t.title} at AUMHUM — ${t.tagline}`,description:t.intro}:s==="condition"&&t?{title:`${t.title} — symptoms, assessment, and care | AUMHUM`,description:t.tagline?`${t.tagline}. ${t.cardBlurb||""}`.trim():t.cardBlurb||`AUMHUM's clinician-led approach to ${t.title.toLowerCase()}: assessment, therapy, and medicine support — coordinated by one team.`}:{title:"AUMHUM — Clinical mental healthcare, delivered as continuous care",description:"Therapy, psychiatric consultations, and endocrine review — coordinated by a single clinical team. A continuous care system, not a one-off session."},[s,t]),c=`${ne}${a}`,o=ie.APP_LOGO_LINK,r=i.useMemo(()=>ot(s,a,t),[s,a,t]);return e.jsxs(Xe,{children:[e.jsx("html",{lang:"en"}),e.jsx("title",{children:n.title}),e.jsx("meta",{name:"description",content:n.description}),e.jsx("meta",{name:"keywords",content:"mental healthcare, psychiatry, therapy, endocrinology, clinical mental health, AUMHUM, continuous care, psychotherapy, India, mental health clinic"}),e.jsx("meta",{name:"robots",content:"index, follow, max-image-preview:large, max-snippet:-1"}),e.jsx("meta",{name:"referrer",content:"strict-origin-when-cross-origin"}),e.jsx("link",{rel:"canonical",href:c}),e.jsx("link",{rel:"alternate",hrefLang:"en",href:c}),e.jsx("link",{rel:"alternate",hrefLang:"x-default",href:c}
1),e.jsx("link",{rel:"preconnect",href:"https://media.aumhum.com",crossOrigin:""}),e.jsx("link",{rel:"dns-prefetch",href:"https://media.aumhum.com"}),e.jsx("meta",{property:"og:site_name",content:"AUMHUM"}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:title",content:n.title}),e.jsx("meta",{property:"og:description",content:n.description}),e.jsx("meta",{property:"og:url",content:c}),e.jsx("meta",{property:"og:image",content:o}),e.jsx("meta",{property:"og:locale",content:"en_IN"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:n.title}),e.jsx("meta",{name:"twitter:description",content:n.description}),e.jsx("meta",{name:"twitter:image",content:o}),e.jsx("meta",{name:"theme-color",content:"#ffffff",media:"(prefers-color-scheme: light)"}),e.jsx("meta",{name:"theme-color",content:"#0f172a",media:"(prefers-color-scheme: dark)"}),e.jsx("meta",{name:"geo.region",content:"IN"}),e.jsx("meta",{name:"geo.placename",content:"India"}),r.map((j,m)=>e.jsx("script",{type:"application/ld+json",children:JSON.stringify(j)},`jsonld-${m}`))]})};function pt(s){i.useEffect(()=>{if(typeof window>"u")return;const a=s.current;if(!a)return;const t=a.querySelector(".as-scroll-progress");let n=0,c=!1;const o=()=>{c=!1;const m=document.documentElement,N=Math.max(1,m.scrollHeight-m.clientHeight),f=Math.min(1,Math.max(0,window.scrollY/N));t&&(t.style.setProperty("--as-scroll-progress",f.toFixed(4)),t.setAttribute("data-active",window.scrollY>16?"true":"false"))},r=()=>{c||(c=!0,n=window.requestAnimationFrame(o))};o(),window.addEventListener("scroll",r,{passive:!0});let j;return"IntersectionObserver"in window?(j=new window.IntersectionObserver(m=>{m.forEach(N=>{N.isIntersecting&&(N.target.classList.add("is-in-view"),j.unobserve(N.target))})},{threshold:.08,rootMargin:"0px 0px -5% 0px"}),a.querySelectorAll(".as-reveal").forEach(m=>j.observe(m))):a.querySelectorAll(".as-reveal").forEach(m=>m.classList.add("is-in-view")),()=>{window.removeEventListener("scroll",r),n&&window.cancelAnimationFrame(n),j&&j.disconnect()}},[s])}function At({view:s="home"}){const a=Ze(),{slug:t}=be(),n=a.pathname,c=vs.useRef(null),[o,r]=i.useState(!1),[j,m]=i.useState("login"),[N,f]=i.useState(null),[E,w]=i.useState({open:!1,mode:"call"}),d=Ps(),p=i.useMemo(()=>s==="doctor"?es.find(A=>A.slug===t):s==="caregiver"?ss.find(A=>A.slug===t):s==="condition"?Pe(t):null,[s,t]);pt(c);const g=i.useCallback((A=null)=>{m("login"),f(A||null),r(!0)},[]),y=i.useCallback(({redirectTo:A}={})=>{g(A||"/portals")},[g]);i.useEffect(()=>{if(s==="signup")return;const A=new URLSearchParams(a.search);(A.has("redirect")||A.get("lt"))&&(f(null),g())},[a.search,g,s]),i.useEffect(()=>{typeof window>"u"||a.hash||window.scrollTo(0,0)},[a.pathname,a.hash]);let l=e.jsx(at,{});s==="how-care-works"?l=e.jsx(tt,{}):s==="students"?l=e.jsx(nt,{}):s==="care-start"?l=e.jsx(it,{}):s==="book-consultation"?l=e.jsx(fa,{onLogin:()=>{g()}}):s==="signup"?l=e.jsx(Aa,{}):s==="welcome"?l=e.jsx(Ia,{onRequireLogin:y}):s==="care-get-started"?l=e.jsx("main",{id:"main",children:e.jsx($a,{})}):s==="care-status"?l=e.jsx("main",{id:"main",children:e.jsx(st,{})}):s==="doctor"?l=e.jsx(rt,{}):s==="caregiver"?l=e.jsx(lt,{}):s==="condition"&&(l=e.jsx(ct,{onContactClick:({mode:A})=>w({open:!0,mode:A})}));const x=new URLSearchParams(a.search),v=N||x.get("redirect"),b=x.get("loginUserName"),P=x.get("lt"),I=P==="w";return e.jsxs("div",{className:"aumhum-site-root",ref:c,children:[e.jsx(dt,{view:s,pathname:n,config:p}),e.jsx("div",{className:"as-scroll-progress","aria-hidden":"true"}),e.jsx("a",{href:"#main",className:"as-skip-link",children:"Skip to content"}),e.jsx(ks,{onLogin:()=>{g()},contact:d,onContactClick:()=>w({open:!0,mode:"call"})}),l,e.jsx(As,{}),e.jsx(Ts,{onPhoneClick:()=>w({open:!0,mode:"call"}),onWhatsappClick:()=>w({open:!0,mode:"whatsapp"})}),e.jsx(Ss,{open:o,onClose:()=>{r(!1),f(null)},loginVariant:j==="login",loginFieldHeading:v?"Please login to continue":void 0,redirectToURI:v,preferredLoginInputType:Fe(b)?"email":P?I?"whatsapp":"mobile":void 0,preferredLoginInputValue:b?Fe(b)?b:String(b):null}),e.jsx(Cs,{open:E.open,mode:E.mode,onClose:()=>w(A=>({...A,open:!1})),contact:d})]})}export{At as default};
2//# sourceMappingURL=AumhumSite-CcIfmCfw.js.map

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.