1import{r as l,j as e}from"./vendor-react-CoJda1Bd.js";import{m as f,L as y,p as x,C as p}from"./Layout-DJPFJEnW.js";import{P as j}from"./PortalBottomNav-C8v4d43x.js";import{f as d,c}from"./index-DRQAaCbt.js";import{B as i}from"./branding-CSuvK0zE.js";import{a as b}from"./vendor-router-BG1ccVOB.js";import{h as N,g as v,U as w,c as k,ag as h,D as C,an as A,z as T,F as I,av as P,a6 as S,f as M,ao as L,Z as G,a2 as u,aq as g}from"./vendor-icons-BbhXjgy5.js";import"./LogoMark-C8Gzk_Eb.js";import"./vendor-radix-I618Mglk.js";import"./vendor-supabase-BI1TbgRl.js";import"./button-ozMsoqIh.js";import"./vendor-date-Ctl2uRge.js";import"./haptics-IUZ9jpTP.js";import"./VoiceEntryRecorder-Dv8acccw.js";import"./sinceLastVisitAnchor-Il07-Rd-.js";import"./label-BPNmfi2k.js";import"./calendar-31DnDnJr.js";import"./select-DPNV9hN7.js";import"./input-B2adqXLP.js";import"./textarea-B9C9WMMJ.js";import"./radio-group-D83kb3uo.js";import"./checkbox-DMpx7LYF.js";import"./badge-CHLB95D3.js";import"./alert-BldCaXLd.js";import"./card-CGxU6Ujh.js";import"./use-caregiver-context-B5bWaKto.js";import"./vendor-query-_n4XbDCE.js";import"./schemas-5iI55soa.js";import"./vendor-forms-BFc0VN4G.js";import"./treatmentDerivation-BmzSioBR.js";import"./intake-DaqTMNW9.js";import"./treatmentMatchers-CruuOT3h.js";import"./mgRelevance-C5hIcfPS.js";import"./vendor-charts-Df9hQbmF.js";const R=[{category:"Health Summary",icon:S,iconTone:"bg-[hsl(var(--rose)/0.18)] text-[hsl(var(--rose))]",prompts:["How have I been doing lately?","Give me a summary of my MG symptoms over the past month.","What does my recent health data tell you about my condition?"]},{category:"Visit Preparation",icon:M,iconTone:"bg-primary/15 text-primary",prompts:["Help me prepare for my upcoming neurology appointment.","What should I discuss with my doctor based on my recent timeline entries?","Summarize my health changes since my last visit."]},{category:"Trends & Patterns",icon:L,iconTone:"bg-[hsl(var(--ochre)/0.18)] text-[hsl(var(--ochre))]",prompts:["Are there any patterns in my check-in scores over time?","What symptoms have been improving or worsening?","Compare my current status to when I started tracking."]},{category:"Treatment Tracking",icon:h,iconTone:"bg-emerald-500/15 text-emerald-600",prompts:["How am I responding to my current treatment plan?","What treatments have I tried and when?","Review my timeline for any side effects or reactions."]}];function U(){const[r,a]=l.useState(!1),{toast:n}=d(),o="https://ygohwaqhuuqpddytftqj.supabase.co/functions/v1/mcp",s=async()=>{await x(o)==="ok"?(a(!0),setTimeout(()=>a(!1),2e3)):n({title:p,variant:"destructive"})};return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 block text-sm font-mono text-foreground/90 bg-muted rounded-lg px-3 py-2.5 break-all",children:o}),e.jsx("button",{onClick:s,className:c("shrink-0 p-2.5 rounded-lg transition-colors","text-muted-foreground hover:text-primary hover:bg-primary/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Copy MCP server URL",title:"Copy MCP server URL",children:r?e.jsx(u,{className:"w-4 h-4 text-green-600"}):e.jsx(g,{className:"w-4 h-4"})})]})}function Y({prompt:r,index:a}){const[n,o]=l.useState(!1),{toast:s}=d(),t=async()=>{await x(r)==="ok"?(o(!0),setTimeout(()=>o(!1),2e3)):s({title:p,variant:"destructive"})};return e.jsxs("div",{className:c("group flex items-start gap-3 p-3.5 rounded-xl","bg-card border border-border/60","hover:border-primary/30 transition-colors"),children:[e.jsx("span",{className:"mt-0.5 text-xs font-semibold text-muted-foreground tabular-nums shrink-0 w-5",children:String(a+1).padStart(2,"0")}),e.jsx("p",{className:"flex-1 text-[15px] leading-snug text-foreground",children:r}),e.jsx("button",{onClick:t,className:c("shrink-0 p-2 rounded-lg transition-colors","text-muted-foreground hover:text-primary hover:bg-primary/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Copy prompt",title:"Copy prompt",children:n?e.jsx(u,{className:"w-4 h-4 text-green-600"}):e.jsx(g,{className:"w-4 h-4"})})]})}function fe(){const r=b(),a=f();d();const[n,o]=l.useState(null);return e.jsxs(y,{children:[e.jsx("div",{className:"pb-28 xl:pb-12",children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[a&&e.jsx("div",{className:"px-2 pt-2 pb-1",children:e.jsxs("button",{onClick:()=>r(-1),className:"flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors px-2 py-2 min-h-[44px]",children:[e.jsx(N,{className:"w-5 h-5"}),e.jsx("span",{className:"text-sm font-medium",children:"Back"})]})}),e.jsxs("div",{className:"px-4 pt-2 pb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("span",{className:"flex items-center justify-center w-12 h-12 rounded-2xl bg-[hsl(var(--ochre)/0.
118)] text-[hsl(var(--ochre))]",children:e.jsx(v,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground tracking-tight",children:"AI Assistant"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Connect your favorite AI to your ",i," data"]})]})]}),e.jsxs("p",{className:"text-[15px] leading-relaxed text-foreground/90",children:["You can connect ChatGPT, Claude, or other AI assistants to your"," ",i," account. Your AI will be able to read your health timeline, check-ins, and profile â securely and only with your permission â so you can ask natural questions about your MG journey."]})]}),e.jsxs("section",{className:"px-4 mb-8",children:[e.jsx("h2",{className:"text-[13px] font-medium uppercase tracking-[0.06em] text-muted-foreground mb-3",children:"What your AI can read"}),e.jsxs("div",{className:"mx-2 rounded-[12px] bg-card border border-border/60 overflow-hidden shadow-[0_1px_3px_hsl(var(--ink)/0.06)]",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3.5",children:[e.jsx("span",{className:"flex items-center justify-center w-10 h-10 rounded-[10px] bg-primary/12 text-primary shrink-0",children:e.jsx(w,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"block text-[17px] leading-tight font-normal text-foreground",children:"Profile"}),e.jsx("span",{className:"block text-[14px] leading-snug text-muted-foreground mt-0.5",children:"Primary condition, status, and appointment preferences"})]})]}),e.jsxs("div",{className:"border-t border-border/60 flex items-center gap-3 px-4 py-3.5",children:[e.jsx("span",{className:"flex items-center justify-center w-10 h-10 rounded-[10px] bg-[hsl(var(--rose)/0.18)] text-[hsl(var(--rose))] shrink-0",children:e.jsx(k,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"block text-[17px] leading-tight font-normal text-foreground",children:"Health Timeline"}),e.jsx("span",{className:"block text-[14px] leading-snug text-muted-foreground mt-0.5",children:"Labs, treatments, flares, hospitalizations, and notes"})]})]}),e.jsxs("div",{className:"border-t border-border/60 flex items-center gap-3 px-4 py-3.5",children:[e.jsx("span",{className:"flex items-center justify-center w-10 h-10 rounded-[10px] bg-[hsl(var(--ochre)/0.18)] text-[hsl(var(--ochre))] shrink-0",children:e.jsx(h,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"block text-[17px] leading-tight font-normal text-foreground",children:"Recent Check-ins"}),e.jsx("span",{className:"block text-[14px] leading-snug text-muted-foreground mt-0.5",children:"Status updates, treatment responses, and quick context"})]})]})]}),e.jsxs("p",{className:"px-4 mt-2 text-[13px] leading-snug text-muted-foreground",children:["All access is read-only. Your AI cannot change or delete anything in your ",i," account."]})]}),e.jsx("section",{className:"px-4 mb-8",children:e.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(C,{className:"w-5 h-5 text-primary"}),e.jsx("h2",{className:"text-[17px] font-semibold text-foreground",children:"You control the connection"})]}),e.jsxs("ul",{className:"space-y-2.5",children:[e.jsxs("li",{className:"flex items-start gap-2.5 text-[15px] leading-snug text-foreground/90",children:[e.jsx(A,{className:"w-4 h-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsx("span",{children:"Your AI signs in through the same secure OAuth system you already use. No shared passwords."})]}),e.jsxs("li",{className:"flex items-start gap-2.5 text-[15px] leading-snug text-foreground/90",children:[e.jsx(T,{className:"w-4 h-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsx("span",{children:"You approve each connection explicitly on the consent screen. You can revoke access at any time."})]}),e.jsxs("li",{className:"flex items-start gap-2.5 text-[15px] leading-snug text-foreground/90",children:[e.jsx(I,{className:"w-4 h-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("span",{children:["Your AI only sees what you are allowed to see. The same privacy rules that protect your data in ",i," apply here."]})]})]})]})}),e.jsxs("section",{className:"px-4 mb-8",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-4",children:[e.jsx(P,{className:"w-5 h-5 text-primary"}),e.jsx("h2",{className:"text-[17px] font-semibold text-foreground",children:"Try these prompts"})]}),e.jsxs("p",{className:"text-[15px] leading-relaxed text-foreground
1/90 mb-5",children:["Once connected, copy and paste any of these into your AI assistant to get personalized answers based on your actual ",i," ","data."]}),e.jsx("div",{className:"space-y-6",children:R.map(s=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2.5 px-1",children:[e.jsx("span",{className:c("flex items-center justify-center w-7 h-7 rounded-lg shrink-0",s.iconTone),children:e.jsx(s.icon,{className:"w-4 h-4"})}),e.jsx("h3",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:s.category})]}),e.jsx("div",{className:"space-y-2",children:s.prompts.map((t,m)=>e.jsx(Y,{prompt:t,index:m},t))})]},s.category))})]}),e.jsxs("section",{className:"px-4 mb-10",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[e.jsx(G,{className:"w-5 h-5 text-[hsl(var(--ochre))]"}),e.jsx("h2",{className:"text-[17px] font-semibold text-foreground",children:"How to connect"})]}),e.jsxs("p",{className:"text-[15px] leading-relaxed text-foreground/90 mb-4",children:["Your AI assistant connects to ",i," as a custom MCP server. Copy the URL below and paste it into ChatGPT or Claude."]}),e.jsxs("div",{className:"rounded-xl border border-border/60 bg-card p-4 mb-6",children:[e.jsx("label",{className:"block text-xs font-medium uppercase tracking-[0.06em] text-muted-foreground mb-2",children:"MCP Server URL"}),e.jsx(U,{})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground mb-2.5",children:"ChatGPT"}),e.jsx("ol",{className:"space-y-2.5",children:["Go to Settings â Connectors â Advanced and enable Developer mode",'In any chat, tap the "+" in the composer and turn on Developer mode','Tap "Add sources", then "Connect more"','Name it "MG Connect" and paste the URL above',"Sign in with your MG Connect account when prompted","Approve the connection on the consent screen"].map((s,t)=>e.jsxs("li",{className:"flex items-start gap-3 text-[15px] leading-relaxed text-foreground/90",children:[e.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-primary/10 text-primary text-xs font-bold shrink-0 mt-0.5",children:t+1}),e.jsx("span",{children:s})]},t))})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground mb-2.5",children:"Claude"}),e.jsx("ol",{className:"space-y-2.5",children:["Open claude.ai/customize/connectors?modal=add-custom-connector",'Name it "MG Connect" and paste the URL above',"Enable it from the chat composer","Sign in with your MG Connect account when prompted","Approve the connection on the consent screen"].map((s,t)=>e.jsxs("li",{className:"flex items-start gap-3 text-[15px] leading-relaxed text-foreground/90",children:[e.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-primary/10 text-primary text-xs font-bold shrink-0 mt-0.5",children:t+1}),e.jsx("span",{children:s})]},t))})]})]})]})]})}),n&&e.jsx(j,{patientId:n}
1)]})}export{fe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.