PageSourceSearch

https://thepawprintacademy.com/assets/VetPrepPackShare-BvSLeQKX.js

js thepawprintacademy.com collected 2026-10-09 22:04:44 UTC 4,939 bytes, 1 lines download raw bytes

1import{b$ as f,r as d,j as e,L as k,T as j,b6 as y,ag as N}from"./index-Dw8-5qNC.js";import{F as w}from"./file-text-DKGA1KVe.js";const m=[{key:"questionsToAsk",title:"Questions to ask the vet"},{key:"timeline",title:"Recent timeline"},{key:"currentMedications",title:"Current medications"},{key:"overdueOrUpcoming",title:"Overdue or upcoming care"},{key:"clinicNotes",title:"Clinic info"}];function S(){const[,x]=f("/vet-prep-pack/:token"),c=x?.token??"",[r,i]=d.useState({kind:"loading"}),[p,h]=d.useState(0);if(d.useEffect(()=>{if(!c){i({kind:"error",status:404,message:"Share link not found."});return}document.title="Vet Visit Prep Pack. Pawprint Academy";let t=!1;return(async()=>{try{const s=await fetch(`/api/public/vet-prep-pack/${encodeURIComponent(c)}`,{credentials:"omit"});if(t)return;if(!s.ok){let l="This share link is no longer available.";try{const o=await s.json();o?.error?.message&&(l=o.error.message)}catch{}i({kind:"error",status:s.status,message:l});return}const n=await s.json();i({kind:"ok",data:n})}catch{t||i({kind:"error",status:0,message:"Couldn't load this prep pack. Please try again."})}})(),()=>{t=!0}},[c,p]),r.kind==="loading")return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50","data-testid":"indicator-share-loading",children:e.jsx(k,{className:"w-6 h-6 animate-spin text-violet-600"})});if(r.kind==="error"){const t=r.status===0||r.status>=500;return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50 p-6",children:e.jsxs("div",{className:"max-w-md w-full bg-white rounded-lg border border-slate-200 p-6 text-center space-y-3","data-testid":"section-share-error",children:[e.jsx(j,{className:"w-8 h-8 text-amber-500 mx-auto"}),e.jsx("h1",{className:"text-lg font-semibold text-slate-900",children:"Prep pack unavailable"}),e.jsx("p",{className:"text-sm text-slate-600",children:r.message}),t&&e.jsxs("button",{type:"button",onClick:()=>{i({kind:"loading"}),h(s=>s+1)},className:"inline-flex items-center gap-1.5 rounded-md border border-violet-300 bg-violet-50 px-4 py-2 text-sm font-medium text-violet-700 hover:bg-violet-100","data-testid":"button-retry-share-load",children:[e.jsx(y,{className:"w-4 h-4"})," Try again"]}),e.jsx("p",{className:"text-xs text-slate-400",children:"Pawprint Academy"})]})})}const{data:a}=r,u=m.reduce((t,s)=>t+(a.pack[s.key]?.length??0),0),g=new Date(a.createdAt),b=new Date(a.expiresAt);return e.jsx("div",{className:"min-h-screen bg-slate-50 py-8 px-4",children:e.jsxs("div",{className:"max-w-3xl mx-auto bg-white rounded-lg border border-slate-200 shadow-sm overflow-hidden",children:[e.jsxs("header",{className:"px-6 py-5 border-b border-slate-200 bg-gradient-to-r from-violet-50 to-white",children:[e.jsxs("div",{className:"flex items-center gap-2 text-violet-700 text-xs font-semibold tracking-wide uppercase",children:[e.jsx(N,{className:"w-4 h-4"}),"Vet Visit Prep Pack"]}),e.jsx("h1",{className:"mt-1 text-xl font-bold text-slate-900","data-testid":"text-share-dog-label",children:a.dogLabel}),e.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:["Shared by ",e.jsx("span",{className:"font-medium text-slate-800","data-testid":"text-share-owner",children:a.ownerName})," - ",g.toLocaleDateString()]})]}),a.message&&e.jsxs("div",{className:"mx-6 mt-4 rounded-md border-l-4 border-violet-500 bg-violet-50 p-3","data-testid":"section-share-message",children:[e.jsxs("p",{className:"text-xs font-semibold text-violet-900 uppercase tracking-wide",children:["Note from ",a.ownerName]}),e.jsx("p",{className:"mt-1 text-sm text-slate-800 whitespace-pre-wrap",children:a.message})]}),e.jsx("main",{className:"px-6 py-5 space-y-5",children:u===0?e.jsxs("div",{className:"py-10 text-center space-y-2","data-testid":"section-share-empty",children:[e.jsx(w,{className:"w-7 h-7 text-slate-400 mx-auto"}),e.jsx("p",{className:"text-sm font-medium text-slate-700",children:"No content in this prep pack"})]}):m.map(t=>{const s=a.pack[t.key];return!s||s.length===0?null:e.jsxs("section",{"data-testid":`section-share-${t.key}`,children:[e.jsx("h2",{className:"text-sm font-semibold text-slate-900 border-b border-slate-200 pb-1.5",children:t.title}),e.jsx("ul",{className:"mt-2 space-y-2",children:s.map((n,l)=>e.jsxs("li",{className:"text-sm text-slate-800 leading-snug","data-testid":`item-share-${t.key}-${l}`,children:[e.jsx("p",{children:n.text}),n.citations.length>0&&e.jsx("p",{className:"mt-0.5 text-xs text-slate-500",children:n.citations.map(o=>
1o.label).filter(Boolean).join("; ")})]},`${t.key}-${l}`))})]},t.key)})}),e.jsxs("footer",{className:"px-6 py-4 border-t border-slate-200 bg-slate-50 text-xs text-slate-500 space-y-1",children:[e.jsx("p",{children:"This briefing is generated from the owner's records. Always confirm details with your veterinarian."}),e.jsxs("p",{children:["Read-only link, expires ",b.toLocaleDateString(),". Pawprint Academy."]})]})]})})}export{S 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.