1import{c as i,j as e,L as _,r as l,i as M,m as I,H as T,F as A,A as re,b as U,d as Y,s as ne}from"./main-7aRvDHms.js";import{S as ie}from"./SiteShell-NCaYZqvc.js";import{P as D}from"./pill-DX0ZrH6G.js";import{B as R}from"./book-open-DZGIcz_r.js";import{M as W}from"./message-circle-BOcdiesw.js";import{A as N}from"./arrow-right-Cemuaenu.js";import{ASSESSMENT_QUESTIONS as P,STAGE_INFO as le,getRecommendations as ce,getProviderMatches as de,getArticleSlugMatches as me,getSymptomEmoji as xe,getSymptomLabel as ue,evaluate as he,saveAssessmentLocal as pe,getOrCreateAssessmentSessionId as ge}from"./menopause-assessment-C3OxAfbZ.js";import{A as ye}from"./arrow-left-O_WMhcnW.js";import{S as fe}from"./search-Ilr_wm4z.js";import{C as L}from"./circle-question-mark-CVeOSHOC.js";import{B as F}from"./bone-C3-jO6jw.js";import{S as H}from"./scale-DyEYS_HA.js";import{M as C}from"./moon-CRci33fM.js";import{S as be}from"./syringe-B6r6T8AF.js";import{L as B}from"./leaf-uUmzE6aw.js";import{B as O}from"./brain-DGhuRYCr.js";import{T as ke}from"./trending-up-C54hos6I.js";import{C as z}from"./check-C8fvhbzn.js";import{A as ve}from"./activity-DlZ7BQx7.js";import{M as je}from"./minus-DjIB8WS7.js";import{C as we}from"./circle-alert-CZmheeqX.js";import{D as _e}from"./droplets-AdpzRcG8.js";import{S as Ne}from"./shield-alert-BSraHPvV.js";import{S as Me,E as Se,a as Z}from"./sun-CdsNVeCw.js";import{T as Ce}from"./triangle-alert-COXhnhBO.js";import{Z as Ae}from"./zap-msSekhIl.js";import{C as ze}from"./clock-CRTiDd0Z.js";import{C as Te}from"./circle-check-7AtS1GCF.js";import{S as $e}from"./star-DJqTGZ5Y.js";import{T as K}from"./trending-down-Cc2DPbUK.js";import{S as Ee}from"./share-2-1VSWKtxU.js";import{D as Le}from"./dumbbell-iHL4VPPw.js";import{r as qe}from"./auth-middleware-Dz39gAdU.js";import"./Footer-uNeBWUW8.js";import"./chevron-down-CzDbF948.js";import"./x-BqLod2Ja.js";import"./menopause-providers-ykwGz1oH.js";const Ie=[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]],De=i("alarm-clock",Ie);const Re=[["path",{d:"M22 14v-4",key:"14q9d5"}],["path",{d:"M6 14v-4",key:"14a6bd"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2",key:"13zb55"}]],Be=i("battery-low",Re);const Pe=[["path",{d:"M10 14v-4",key:"suye4c"}],["path",{d:"M22 14v-4",key:"14q9d5"}],["path",{d:"M6 14v-4",key:"14a6bd"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2",key:"13zb55"}]],Fe=i("battery-medium",Pe);const He=[["path",{d:"M10 17h.01",key:"nbq80n"}],["path",{d:"M10 7v6",key:"nne03l"}],["path",{d:"M14 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2",key:"1m83kb"}],["path",{d:"M22 14v-4",key:"14q9d5"}],["path",{d:"M6 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2",key:"h8lgfh"}]],Oe=i("battery-warning",He);const Ve=[["path",{d:"M 22 14 L 22 10",key:"nqc4tb"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2",key:"13zb55"}]],V=i("battery",Ve);const Ge=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],Ue=i("circle-arrow-up",Ge);const Ye=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],We=i("circle-dashed",Ye);const Ze=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.35 2.69A10 10 0 0 1 21.3 15.65",key:"1pfsoa"}],["path",{d:"M19.08 19.08A10 10 0 1 1 4.92 4.92",key:"1ablyi"}]],Ke=i("circle-off",Ze);const Qe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Q=i("circle",Qe);const Xe=[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M16 17H7",key:"pygtm1"}],["path",{d:"M17 21H9",key:"1u2q02"}]],Je=i("cloud-fog",Xe);const et=[["path",{d:"M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973",key:"1cez44"}],["path",{d:"m13 12-3 5h4l-3 5",key:"1t22er"}]],tt=i("cloud-lightning",et);const st=[["path",{d:"M13 16a3 3 0 0 1 0 6H7a5 5 0 1 1 4.9-6z",key:"ie2ih4"}],["path",{d:"M18.376 14.512a6 6 0 0 0 3.461-4.127c.148-.625-.659-.97-1.248-.714a4 4 0 0 1-5.259-5.26c.255-.589-.09-1.395-.716-1.248a6 6 0 0 0-4.594 5.36",key:"zwnc1e"}]],at=i("cloud-moon",st);const ot=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],G=i("cloud",ot);const rt=[["path",{d:"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",key:"c7niix"}]],q=i("droplet",rt);const nt=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],it=i("ellipsis",nt);const lt=[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}
1],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]],X=i("flower-2",lt);const ct=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 16s-1.5-2-4-2-4 2-4 2",key:"epbg0q"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],dt=i("frown",ct);const mt=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]],xt=i("heart-pulse",mt);const ut=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"8",x2:"16",y1:"15",y2:"15",key:"1xb1d9"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],ht=i("meh",ut);const pt=[["path",{d:"M18 5h4",key:"1lhgn2"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],gt=i("moon-star",pt);const yt=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],ft=i("rotate-ccw",yt);const bt=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],kt=i("shuffle",bt);const vt=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],jt=i("snowflake",vt);const wt=[["path",{d:"M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3",key:"139s4v"}],["path",{d:"M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4",key:"1dlkgp"}],["path",{d:"M5 21h14",key:"11awu3"}]],_t=i("sprout",wt);const Nt=[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],J=i("sunrise",Nt);const Mt=[["path",{d:"M12 10V2",key:"16sf7g"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m16 6-4 4-4-4",key:"6wukr"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],ee=i("sunset",Mt);const St=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],Ct=i("test-tube",St),At=[{icon:X,text:"Personalized stage result"},{icon:D,text:"Treatment recommendations"},{icon:R,text:"Matched guides & articles"},{icon:W,text:"Talk to Lea with context"}];function zt({onStart:a}){return e.jsxs("section",{className:"relative overflow-hidden",style:{background:"linear-gradient(135deg, var(--cream) 0%, color-mix(in oklab, var(--sage) 25%, var(--cream)) 60%, var(--cream) 100%)"},children:[e.jsx("div",{className:"absolute -top-32 -right-24 w-[520px] h-[520px] rounded-full opacity-40",style:{background:"radial-gradient(circle, var(--sage) 0%, transparent 70%)"}}),e.jsx("div",{className:"absolute bottom-[-10%] left-[-10%] w-[420px] h-[420px] rounded-full opacity-30",style:{background:"radial-gradient(circle, var(--blush) 0%, transparent 70%)"}}),e.jsxs("div",{className:"container-x relative z-10 py-16 md:py-24 max-w-2xl mx-auto text-center px-4",children:[e.jsx("div",{className:"mx-auto w-16 h-16 rounded-full flex items-center justify-center mb-6 animate-pulse",style:{background:"color-mix(in oklab, var(--sage) 25%, white)"},children:e.jsx(X,{size:28,style:{color:"var(--sage)"}})}),e.jsx("h1",{className:"text-4xl md:text-6xl font-semibold tracking-tight leading-[1.05] mb-4",children:"What stage of menopause are you in?"}
1),e.jsx("p",{className:"text-base md:text-lg text-foreground/70 mb-10",children:"12 questions · 3 minutes · 100% free"}),e.jsx("ul",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-10 text-left md:text-center",children:At.map(({icon:t,text:c})=>e.jsxs("li",{className:"flex md:flex-col items-center md:items-center gap-3 md:gap-2 p-3 md:p-4 rounded-2xl bg-white/70 backdrop-blur-sm",children:[e.jsx("span",{className:"flex-none w-10 h-10 rounded-full flex items-center justify-center",style:{background:"color-mix(in oklab, var(--sage) 18%, white)"},children:e.jsx(t,{size:18,style:{color:"var(--sage)"}})}),e.jsx("span",{className:"text-sm font-medium text-foreground/85 leading-snug",children:c})]},c))}),e.jsxs("button",{type:"button",onClick:a,className:"inline-flex items-center gap-2 px-8 py-4 rounded-full text-base font-semibold text-white shadow-lg hover:shadow-xl transition-all hover:scale-[1.02]",style:{background:"var(--sage)"},children:["Start Assessment ",e.jsx(N,{size:18})]}),e.jsxs("div",{className:"mt-6 text-sm text-foreground/55",children:["Already taken it?"," ",e.jsx(_,{to:"/guest-chat",className:"underline hover:text-foreground",children:"Talk to Lea about your results â"})]})]})]})}const Tt={age_range:{u35:I,"35_39":Z,"40_44":J,"45_49":ee,"50_54":C,"55_59":gt,"60_plus":$e},cycle_status:{regular:Te,slightly_irregular:We,very_irregular:kt,no_period_6_11:ze,no_period_12_plus:Ke,surgical:xt},hot_flashes:{0:jt,1:A,2:A,3:A,4:Ae},sleep:{0:C,1:at,2:De,3:Se,4:Ce},mood:{0:Me,1:ht,2:dt,3:tt,4:Ne},brain_fog:{0:O,1:Je,2:G,3:L},vaginal:{0:z,1:q,2:_e,3:T,4:we},joint_pain:{0:z,1:je,2:ve,3:F},weight:{0:z,1:ke,2:Ue,3:H},energy:{0:V,1:Fe,2:Be,3:Oe},current_treatments:{hrt:D,ssri:O,supplements:B,glp1:be,nothing:Q,other:it},top_concerns:{hot_flashes:A,sleep:C,weight:H,mood:T,brain_fog:G,vaginal:q,joint_pain:F,energy:V,uncertainty:L,treatment_navigation:fe}},$t=["#E8EDE5","#F0EBE3","#F5EDD8","#F5E0C8","#F5D5D0"],Et=["#5A6B4F","#8A7A5C","#9E8744","#B57333","#B5524A"],Lt=new Set(["hot_flashes","sleep","mood","brain_fog","vaginal","joint_pain","weight","energy"]);function qt(a,t){if(Lt.has(a)){const c=Math.min(parseInt(t,10)||0,4);return{bg:$t[c],fg:Et[c]}}return{bg:"color-mix(in oklab, var(--sage) 14%, white)",fg:"var(--sage)"}}function It({onComplete:a}){const[t,c]=l.useState(0),[x,m]=l.useState("forward"),[h,p]=l.useState(!1),[g,b]=l.useState({}),j=l.useRef(!1),y=l.useRef(null),n=P.length,r=P[t],u=g[r.id],s=r.type==="single"?typeof u=="string"&&u.length>0:Array.isArray(u)&&u.length>0,k=l.useCallback(o=>{const d=["hot_flashes","sleep","mood","brain_fog","vaginal","joint_pain","weight","energy"],v={age_range:o.age_range,cycle_status:o.cycle_status,hot_flashes:0,sleep:0,mood:0,brain_fog:0,vaginal:0,joint_pain:0,weight:0,energy:0,current_treatments:o.current_treatments??[],top_concerns:o.top_concerns??[]};for(const f of d)v[f]=parseInt(o[f]??"0",10)||0;a(v)},[a]),w=l.useCallback(()=>{if(!(t>=n-1)){if(t===9){p(!0),setTimeout(()=>{p(!1),m("forward"),c(o=>o+1)},1500);return}m("forward"),c(o=>o+1)}},[t,n]),$=l.useCallback(o=>{if(j.current)return;j.current=!0;const d={...g,[r.id]:o};if(b(d),M("assessment_question",{question:r.id,answer:o}),typeof navigator<"u"&&"vibrate"in navigator)try{navigator.vibrate(10)}catch{}setTimeout(()=>{j.current=!1,t>=n-1?k(d):w()},400)},[g,r.id,t,n,w,k]),te=l.useCallback(o=>{if(b(d=>{const v=d[r.id]??[];let f;return v.includes(o)?f=v.filter(oe=>oe!==o):r.max&&v.length>=r.max?f=[...v.slice(1),o]:f=[...v,o],M("assessment_question",{question:r.id,answer:f.join(",")}),{...d,[r.id]:f}}),typeof navigator<"u"&&"vibrate"in navigator)try{navigator.vibrate(10)}catch{}},[r.id,r.max]),E=l.useCallback(()=>{s&&(t>=n-1?k(g):w())},[g,s,t,n,w,k]),S=l.useCallback(o=>{m("back"),typeof o=="number"?c(Math.max(0,Math.min(o,t))):t>
10&&c(d=>d-1)},[t]);l.useEffect(()=>{const o=d=>{d.key==="ArrowLeft"&&t>0&&S(),d.key==="Enter"&&r.type==="multi"&&s&&E()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[S,E,s,r.type,t]);const se=o=>{y.current=o.touches[0].clientX},ae=o=>{if(y.current==null)return;const d=o.changedTouches[0].clientX-y.current;y.current=null,d>70&&t>0&&S()};return h?e.jsx("section",{className:"min-h-[80vh] flex items-center justify-center",style:{background:"var(--cream)"},children:e.jsxs("div",{className:"text-center px-6 animate-in fade-in zoom-in-95 duration-500 max-w-md",children:[e.jsx("div",{className:"mx-auto w-16 h-16 rounded-full flex items-center justify-center mb-6",style:{background:"color-mix(in oklab, var(--sage) 20%, white)"},children:e.jsx(I,{size:28,style:{color:"var(--sage)"}})}),e.jsx("h3",{className:"text-2xl md:text-3xl font-semibold mb-3 text-foreground",children:"Almost there"}),e.jsx("p",{className:"text-foreground/70 leading-relaxed",children:"Just a couple more questions about your treatment and goals."})]})}):e.jsxs("section",{className:"py-6 md:py-12 min-h-[80vh]",style:{background:"var(--cream)"},onTouchStart:se,onTouchEnd:ae,children:[e.jsx("div",{className:"sticky top-0 z-10 backdrop-blur-md py-3 px-4 mb-4 border-b border-foreground
1/5",style:{background:"color-mix(in oklab, var(--cream) 85%, transparent)"},children:e.jsxs("div",{className:"container-x max-w-2xl mx-auto flex items-center gap-3",children:[e.jsx("button",{type:"button",onClick:()=>S(),disabled:t===0,"aria-label":"Previous question",className:"flex-none w-10 h-10 rounded-full flex items-center justify-center text-foreground/70 hover:text-foreground hover:bg-foreground/5 disabled:opacity-25 disabled:cursor-not-allowed transition-colors",children:e.jsx(ye,{size:20})}),e.jsx(Dt,{total:n,step:t,onJump:o=>o<t&&S(o)})]})}),e.jsx("div",{className:"container-x max-w-2xl mx-auto px-4",children:e.jsxs("div",{className:x==="forward"?"animate-in fade-in slide-in-from-right-8 duration-300":"animate-in fade-in slide-in-from-left-8 duration-300",children:[e.jsx("h2",{className:"text-[22px] md:text-3xl font-semibold leading-tight mb-2 text-foreground",children:r.question}),r.helper&&e.jsx("p",{className:"text-sm md:text-base text-foreground/60 mb-6",children:r.helper}),e.jsx("div",{className:"space-y-3 mt-6 pb-32",children:r.options.map(o=>{const d=r.type==="single"?u===o.value:Array.isArray(u)&&u.includes(o.value),v=Tt[r.id]?.[o.value]??Q,f=qt(r.id,o.value);return e.jsxs("button",{type:"button",onClick:()=>r.type==="single"?$(o.value):te(o.value),"aria-pressed":d,className:`group w-full text-left rounded-2xl border-2 px-4 md:px-5 py-3 md:py-4 transition-all min-h-[56px] flex items-center gap-3 md:gap-4 hover:shadow-md hover:-translate-y-0.5 focus:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--sage)] ${d?"scale-[1.01]":""}`,style:{borderColor:d?"var(--sage)":"color-mix(in oklab, var(--foreground) 10%, transparent)",background:d?"color-mix(in oklab, var(--sage) 6%, white)":"white"},children:[e.jsx("span",{className:"flex-none w-9 h-9 md:w-10 md:h-10 rounded-full flex items-center justify-center transition-colors",style:{background:f.bg},children:e.jsx(v,{size:18,style:{color:f.fg},strokeWidth:2})}),e.jsxs("span",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"block font-semibold text-foreground leading-snug text-[15px] md:text-base",children:o.label}),o.sublabel&&e.jsx("span",{className:"block text-[13px] text-foreground/55 mt-0.5 leading-snug",children:o.sublabel})]}),e.jsx("span",{className:`flex-none w-6 h-6 rounded-full flex items-center justify-center transition-all ${d?"opacity-100 scale-100":"opacity-0 scale-50"}`,style:{background:"var(--sage)"},children:e.jsx(z,{size:14,className:"text-white",strokeWidth:3})})]},o.value)})})]},`${r.id}-${x}`)}),r.type==="multi"&&s&&e.jsx("div",{className:"fixed bottom-0 inset-x-0 z-20 px-4 pb-5 pt-4 animate-in fade-in slide-in-from-bottom-4 duration-300",style:{background:"linear-gradient(to top, var(--cream) 60%, transparent)"},children:e.jsx("div",{className:"container-x max-w-2xl mx-auto",children:e.jsxs("button",{type:"button",onClick:E,className:"w-full inline-flex items-center justify-center gap-2 px-6 py-4 rounded-full font-semibold text-white shadow-lg hover:shadow-xl transition-all",style:{background:"var(--sage)"},children:[t===n-1?"See my results":"Continue"," ",e.jsx(N,{size:18})]})})})]})}function Dt({total:a,step:t,onJump:c}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden sm:flex flex-1 items-center justify-center gap-1.5",children:Array.from({length:a}).map((x,m)=>{const h=m<t,p=m===t;return e.jsx("button",{type:"button","aria-label":`Go to question ${m+1}`,onClick:()=>c(m),disabled:m>=t,className:"rounded-full transition-all",style:{width:p?22:8,height:8,background:h||p?"var(--sage)":"color-mix(in oklab, var(--foreground) 15%, transparent)",opacity:p?1:h?.85:.6,cursor:m<t?"pointer":"default"}},m)})}),e.jsxs("div",{className:"flex sm:hidden flex-1 items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-1.5 rounded-full overflow-hidden",style:{background:"color-mix(in oklab, var(--foreground) 10%, transparent)"},children:e.jsx("div",{className:"h-full transition-all duration-500 ease-out",style:{width:`${(t+1)/a*100}%`,background:"var(--sage)"}})}
1),e.jsxs("span",{className:"text-xs font-medium text-foreground/60 tabular-nums",children:[t+1,"/",a]})]})]})}const Rt=["Analyzing your answersâ¦","Matching treatments to your symptomsâ¦","Building your personalized reportâ¦"];function Bt({onDone:a}){const[t,c]=l.useState(0),[x,m]=l.useState(0);return l.useEffect(()=>{const h=setTimeout(()=>c(1),1e3),p=setTimeout(()=>c(2),2e3),g=setTimeout(a,2700),b=Date.now(),j=setInterval(()=>{const y=Math.min(100,(Date.now()-b)/2700*100);m(y),y>=100&&clearInterval(j)},30);return()=>{clearTimeout(h),clearTimeout(p),clearTimeout(g),clearInterval(j)}},[a]),e.jsx("section",{className:"min-h-[80vh] flex items-center justify-center px-6",style:{background:"linear-gradient(135deg, var(--cream) 0%, color-mix(in oklab, var(--sage) 18%, var(--cream)) 100%)"},children:e.jsxs("div",{className:"text-center max-w-md w-full",children:[e.jsx("div",{className:"mx-auto w-20 h-20 rounded-full flex items-center justify-center mb-8 animate-pulse",style:{background:"color-mix(in oklab, var(--sage) 30%, white)"},children:e.jsx(I,{size:32,style:{color:"var(--sage)"},className:"animate-spin"})}),e.jsx("p",{className:"text-lg md:text-xl text-foreground/80 animate-in fade-in duration-500 mb-8 min-h-[2em]",children:Rt[t]},t),e.jsx("div",{className:"h-2 rounded-full overflow-hidden mx-auto",style:{background:"color-mix(in oklab, var(--sage) 15%, white)"},children:e.jsx("div",{className:"h-full transition-all ease-out",style:{width:`${x}%`,background:"var(--sage)"}})})]})})}const Pt={Leaf:B,Sun:Z,Sunrise:J,Sunset:ee,Moon:C,Heart:T,HelpCircle:L},Ft={Pill:D,Leaf:B,TestTube:Ct,Moon:C,Heart:T,TrendingDown:K,Dumbbell:Le,Droplet:q,Sprout:_t};function Ht({answers:a,result:t,onRetake:c}){const x=le[t.stage],m=Pt[x.iconName],h=t.topSymptoms.map(s=>s.key),p={hot_flashes:a.hot_flashes,sleep:a.sleep,mood:a.mood,brain_fog:a.brain_fog,vaginal:a.vaginal,joint_pain:a.joint_pain,weight:a.weight,energy:a.energy},g=ce(t.stage,h,a.current_treatments,p),b=de(t.stage,h,a.top_concerns),y=me(t.stage,h).map(s=>re.find(k=>k.slug===s)).filter(Boolean),n=(s,k)=>M("assessment_cta_click",{cta_type:s,stage:t.stage,destination:k}),r=async()=>{const s=typeof window<"u"?window.location.href:"";try{navigator.share?await navigator.share({title:`My menopause stage: ${x.title}`,url:s}):(await navigator.clipboard.writeText(s),alert("Link copied to clipboard"))}catch{}n("share",s)},u=`/guest-chat?context=assessment&stage=${t.stage}&symptoms=${h.slice(0,3).join(",")}`;return e.jsx("div",{className:"py-12 md:py-16",style:{background:"var(--cream)"},children:e.jsxs("div",{className:"container-x max-w-4xl mx-auto space-y-12",children:[e.jsxs("section",{children:[e.jsx("div",{className:"text-xs uppercase tracking-[0.2em] text-foreground/60 mb-4 text-center",children:"Your result"}),e.jsxs("div",{className:"rounded-3xl p-8 md:p-12 shadow-sm border",style:{background:"white",borderColor:"color-mix(in oklab, var(--foreground) 8%, transparent)"},children:[e.jsxs("div",{className:"flex flex-col items-center text-center mb-8",children:[e.jsx("div",{className:"w-20 h-20 rounded-full flex items-center justify-center mb-5",style:{background:`color-mix(in oklab, ${x.color} 20%, white)`},children:e.jsx(m,{size:36,style:{color:x.color}})}),e.jsx("h2",{className:"text-3xl md:text-4xl font-semibold tracking-tight mb-2",children:x.title}),e.jsx("p",{className:"text-lg italic",style:{color:x.color},children:x.subtitle})]}),e.jsx("p",{className:"text-foreground/80 leading-relaxed max-w-2xl mx-auto text-center",children:x.description}),e.jsxs("div",{className:"mt-8 max-w-md mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs uppercase tracking-[0.16em] text-foreground/60 mb-2",children:[e.jsxs("span",{children:["Symptom severity: ",t.severity]}),e.jsxs("span",{children:[t.totalSymptomScore,"/28"]})]}),e.jsx("div",{className:"h-2 rounded-full overflow-hidden bg-foreground
1/10",children:e.jsx("div",{className:"h-full transition-all duration-700",style:{width:`${Math.min(100,t.totalSymptomScore/28*100)}%`,background:t.severity==="severe"?"#D4956A":t.severity==="significant"?"#C4A97D":"var(--sage)"}})})]})]})]}),t.topSymptoms.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xl md:text-2xl font-semibold mb-6",children:"Your symptoms â ranked by severity"}),e.jsx("div",{className:"space-y-3",children:t.topSymptoms.map((s,k)=>{const w=s.score/s.max*100,$=w>=75?"#D4956A":w>=40?"#C4A97D":"var(--sage)";return e.jsxs("div",{className:"rounded-2xl bg-white border p-4 flex items-center gap-4",style:{borderColor:"color-mix(in oklab, var(--foreground) 8%, transparent)"},children:[e.jsxs("span",{className:"text-foreground/40 font-mono text-sm w-6",children:[k+1,"."]}),e.jsx("span",{className:"text-2xl","aria-hidden":!0,children:xe(s.key)}),e.jsx("span",{className:"flex-1 font-medium text-foreground",children:ue(s.key)}),e.jsx("div",{className:"w-32 h-2 rounded-full bg-foreground/10 overflow-hidden",children:e.jsx("div",{className:"h-full",style:{width:`${w}%`,background:$}})})]},s.key)})})]}),g.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xl md:text-2xl font-semibold mb-2",children:"Recommended for you"}),e.jsx("p",{className:"text-foreground/70 mb-6",children:"Based on your stage and symptoms, here's what Lea recommends exploring:"}),e.jsx("div",{className:"space-y-4",children:g.map(s=>e.jsx(Ot,{rec:s,onCtaClick:n},s.title))})]}),b.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xl md:text-2xl font-semibold mb-2",children:"Providers matched to your needs"}),e.jsx("p",{className:"text-foreground/70 mb-6",children:"Based on your stage and what concerns you most:"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:b.slice(0,4).map(s=>e.jsxs("div",{className:"rounded-2xl bg-white border p-5",style:{borderColor:"color-mix(in oklab, var(--foreground) 8%, transparent)"},children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-2",children:[e.jsx("span",{className:"font-semibold text-lg",children:s.name}),e.jsx("span",{className:"text-xs text-foreground/60",children:s.startingPrice})]}),e.jsx("p",{className:"text-sm text-foreground/70 line-clamp-3 mb-3",children:s.description}),e.jsxs(_,{to:"/find-care",search:{tab:"menopause"},onClick:()=>{M("assessment_provider_click",{partner_id:s.partnerId,partner_name:s.name,stage:t.stage,severity:t.severity,position:b.indexOf(s)+1}),n("provider_card",s.partnerId)},className:"inline-flex items-center gap-1 text-sm font-medium",style:{color:"var(--sage)"},children:["Learn more ",e.jsx(N,{size:14})]})]},s.partnerId))}),e.jsx("div",{className:"mt-4",children:e.jsxs(_,{to:"/find-care",search:{tab:"menopause"},onClick:()=>n("find_care","/find-care?tab=menopause"),className:"inline-flex items-center gap-2 text-sm font-medium hover:underline",style:{color:"var(--sage)"},children:["View all menopause providers ",e.jsx(N,{size:14})]})})]}),y.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xl md:text-2xl font-semibold mb-6",children:"Guides picked for you"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:y.map(s=>e.jsxs(_,{to:"/blog/$slug",params:{slug:s.slug},onClick:()=>n("blog_article",s.slug),className:"block rounded-2xl bg-white border p-5 transition-all hover:shadow-md hover:-translate-y-0.5",style:{borderColor:"color-mix(in oklab, var(--foreground) 8%, transparent)"},children:[e.jsxs("div",{className:"text-xs uppercase tracking-[0.16em] text-foreground/60 mb-2 inline-flex items-center gap-1.5",children:[e.jsx(R,{size:12})," ",s.category," ⢠",s.readTime]}),e.jsx("h4",{className:"font-semibold leading-snug mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-foreground/70 line-clamp-3",children:s.excerpt})]},s.slug))}),e.jsx("div",{className:"mt-4",children:e.jsxs(_,{to:"/blog",className:"inline-flex items-center gap-2 text-sm font-medium hover:underline",style:{color:"var(--sage)"},children:["Browse all menopause guides ",e.jsx(N,{size:14})]})})]}),e.jsx("section",{children:e.jsx("div",{className:"rounded-3xl p-7 md:p-9 border",style:{background:"color-mix(in oklab, var(--sage) 18%, white)",borderColor:"color-mix(in oklab, var(--sage) 30%, transparent)"},children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-2xl flex items-center justify-center shrink-0",style:{background:"white"},children:e.jsx(K,{size:22,style:{color:"var(--sage)"}})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-xl md:text-2xl font-semibold mb-2",children:"Keep tracking your symptoms"}
1),e.jsx("p",{className:"text-foreground/75 text-[15px] leading-relaxed mb-4",children:"You've taken the first step. Now track how your symptoms change week by week â Lea spots patterns and helps you know if things are getting better."}),e.jsxs(_,{to:"/symptom-tracker",onClick:()=>n("symptom_tracker","/symptom-tracker"),className:"inline-flex items-center gap-2 px-6 py-3 rounded-full font-semibold text-white transition-all",style:{background:"var(--sage)"},children:["Start your weekly symptom tracker ",e.jsx(N,{size:14})]}),e.jsx("p",{className:"text-xs text-foreground/55 mt-3",children:"Your assessment answers will be used as your first check-in so you start with data from day one."})]})]})})}),e.jsx("section",{children:e.jsxs("div",{className:"rounded-3xl p-8 md:p-10 text-center",style:{background:"linear-gradient(135deg, color-mix(in oklab, var(--sage) 30%, white) 0%, color-mix(in oklab, var(--blush) 25%, white) 100%)"},children:[e.jsx(W,{className:"mx-auto mb-4",size:32,style:{color:"var(--sage)"}}),e.jsx("h3",{className:"text-2xl md:text-3xl font-semibold mb-3",children:"Want to dig deeper into your results?"}),e.jsx("p",{className:"text-foreground/75 max-w-xl mx-auto mb-6",children:"Lea can help you understand your stage, explore treatment options, and build a plan that works for your body."}),e.jsxs(_,{to:"/guest-chat",search:{context:"assessment",stage:t.stage,symptoms:h.slice(0,3).join(",")},onClick:()=>n("talk_to_lea",u),className:"inline-flex items-center gap-2 px-7 py-3.5 rounded-full font-semibold text-white shadow-md hover:shadow-lg transition-all",style:{background:"var(--sage)"},children:["Talk to Lea about my results ",e.jsx(N,{size:16})]}),e.jsx("div",{className:"mt-3 text-sm text-foreground/60",children:"Free â no sign-up needed."})]})}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 pt-4",children:[e.jsxs("button",{onClick:c,type:"button",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-full text-sm border bg-white hover:bg-foreground
1/5 transition",style:{borderColor:"color-mix(in oklab, var(--foreground) 15%, transparent)"},children:[e.jsx(ft,{size:14})," Retake assessment"]}),e.jsxs("button",{onClick:r,type:"button",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-full text-sm border bg-white hover:bg-foreground/5 transition",style:{borderColor:"color-mix(in oklab, var(--foreground) 15%, transparent)"},children:[e.jsx(Ee,{size:14})," Share my results"]})]}),e.jsx("p",{className:"text-xs text-foreground/50 text-center max-w-2xl mx-auto pt-4",children:"This assessment is for informational purposes only and does not replace medical advice. Always consult your healthcare provider for diagnosis and treatment decisions."})]})})}function Ot({rec:a,onCtaClick:t}){const c=Ft[a.iconName];return e.jsxs("div",{className:"rounded-2xl bg-white border p-5 md:p-6 flex gap-4",style:{borderColor:"color-mix(in oklab, var(--foreground) 8%, transparent)"},children:[e.jsx("div",{className:"flex-none w-11 h-11 rounded-full flex items-center justify-center",style:{background:"color-mix(in oklab, var(--sage) 18%, white)"},children:e.jsx(c,{size:20,style:{color:"var(--sage)"}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"font-semibold text-lg mb-1",children:a.title}),e.jsx("p",{className:"text-sm text-foreground/75 leading-relaxed mb-3",children:a.description}),e.jsxs("div",{className:"flex flex-wrap gap-x-5 gap-y-2",children:[a.cta&&e.jsxs("a",{href:a.cta.href,onClick:()=>t("rec_cta",a.cta.href),className:"inline-flex items-center gap-1 text-sm font-medium",style:{color:"var(--sage)"},children:[a.cta.text," ",e.jsx(N,{size:14})]}),a.article&&e.jsxs(_,{to:"/blog/$slug",params:{slug:a.article.slug},onClick:()=>t("rec_article",a.article.slug),className:"inline-flex items-center gap-1 text-sm font-medium text-foreground/70 hover:text-foreground",children:[e.jsx(R,{size:14})," ",a.article.text]})]})]})]})}const Vt=U({method:"POST"}).handler(Y("80de39eed26242fafdd42562484b6d9c2bc764d90c8240215dfccba5be4df299"));U({method:"GET"}).middleware([qe]).handler(Y("96d844c0307b0757f3f3d7a1652731f257e24a85de0f2f97494e6916e5ba9ff5"));function Cs(){const[a,t]=l.useState("hero"),[c,x]=l.useState(null),[m,h]=l.useState(null),[p,g]=l.useState(0),b=l.useCallback(()=>{t("quiz"),g(Date.now());const n=typeof window<"u"?new URLSearchParams(window.location.search):null;M("assessment_started",{source:n?.get("utm_source")??"direct"})},[]),j=l.useCallback(async n=>{const r=he(n);x(n),h(r),t("loading"),pe(n,r);try{const{data:{user:u}}=await ne.auth.getUser(),s=typeof window<"u"?new URLSearchParams(window.location.search):null;await Vt({data:{user_id:u?.id??null,session_id:u?null:ge(),age_range:n.age_range,cycle_status:n.cycle_status,hot_flash_score:n.hot_flashes,sleep_score:n.sleep,mood_score:n.mood,brain_fog_score:n.brain_fog,vaginal_score:n.vaginal,joint_pain_score:n.joint_pain,weight_score:n.weight,energy_score:n.energy,current_treatments:n.current_treatments,top_concerns:n.top_concerns,stage:r.stage,total_symptom_score:r.totalSymptomScore,severity_level:r.severity,utm_source:s?.get("utm_source")??null,utm_medium:s?.get("utm_medium")??null,utm_campaign:s?.get("utm_campaign")??null}})}catch(u){console.error("[assessment] save failed",u)}M("assessment_completed",{stage:r.stage,severity:r.severity,total_score:r.totalSymptomScore,top_symptoms:r.topSymptoms.map(u=>u.key).join(","),duration_seconds:Math.round((Date.now()-p)/1e3)})},[p]),y=l.useCallback(()=>{x(null),h(null),t("hero"),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})},[]);return l.useEffect(()=>{typeof window<"u"&&window.scrollTo({top:0})},[a]),e.jsxs(ie,{children:[a==="hero"&&e.jsx(zt,{onStart:b}),a==="quiz"&&e.jsx(It,{onComplete:j}),a==="loading"&&e.jsx(Bt,{onDone:()=>t("results")}),a==="results"&&c&&m&&e.jsx(Ht,{answers:c,result:m,onRetake:y})]})}export{Cs as component};
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.