PageSourceSearch

https://shieldcart.app/assets/c-DUnc1gw7.js

js shieldcart.app collected 2026-10-02 01:15:13 UTC 38,174 bytes, 1 lines download raw bytes

1import{u as J,a as H,r as l,j as e,b as v,s as $,e as E,i as U,d as R,f as V}from"./index-BX-fLFOm.js";import{L as A}from"./c-CiIhwhEI.js";import{u as K}from"./c-BGGDM18Y.js";import{p as G}from"./c-CUkrcvwm.js";import{I as q,r as Q,D as O,n as X,a as Z}from"./c-CbNttdUN.js";import{u as S}from"./c-CPJiHn3X.js";import{S as ee}from"./c-DnzXyX7b.js";import{M as te}from"./c-cceB5B29.js";import{R as se,d as F}from"./c-DMiXl72v.js";import"./c-CrZmcM36.js";import"./c-B-ZV8cX9.js";import"./c-D-cQARJf.js";import"./c-DBBqDRhD.js";import"./c-DJbA0Ym2.js";import"./c-C87c2qaN.js";import"./c-CmXuZ93Q.js";import"./c-Bz6zcLI8.js";import"./c-BPHL7sqc.js";const ne="your family member",re="the day you picked";function p(s,n){const r=(n.name??"").trim(),a=(n.date??"").trim();return s.replace(/\[Name\]/g,r||ne).replace(/\[Date\]/g,a||re)}function w(s){return(s??"").trim().split(/\s+/)[0]??""}const t={common:{continue:"Continue",back:"Back",saving:"Saving…",loading:"Loading…"},screen1:{header:"Who are we protecting?",body:"This information appears on the mock confirmation pages [Name] will see. The more you add, the more real every page looks — watch it build as you type.",fields:{fullNameLabel:"Full name",shippingAddressLabel:"Shipping address",cardLabel:"Card ending in",cardHint:"last 4 digits — optional"},cardMicrocopy:"We never ask for full card numbers. ShieldCart processes no payments and stores no card data.",previewLabel:"Their screen",previewSublabel:"a live preview of [Name]'s confirmation page",cta:"Continue"},screen2:{header:"See what [Name] sees",body:"This is a typical checkout, the way they shop. Go ahead — place the order.",cart:{item1Name:"Cotton cardigan",item1Price:"$34.99",item2Name:"Reading glasses, 2-pack",item2Price:"$12.99",item3Name:"Bird feeder",item3Price:"$21.50",item3RepeatNote:"You last purchased this on July 14."},afterHeader:"That's a Mock Order.",afterBody:"[Name] sees a normal confirmation — order number, delivery estimate, their details. Nothing is charged. The order goes straight to your dashboard, where you decide: place it for real, or let it go.",cta:"Continue"},screen3:{header:"Now try a food order.",body:"Same-day orders are different. A confirmation for food that never arrives causes real worry. For these, ShieldCart shows a realistic error instead.",cart:{item1Name:"Chicken soup",item1Price:"$8.95",item2Name:"Turkey sandwich combo",item2Price:"$12.50",feeName:"Delivery fee",feePrice:"$3.99"},afterHeader:"That's a Mock Error.",afterBody:'[Name] sees an ordinary "service unavailable" message — the kind the internet shows everyone. The order still reaches your dashboard, so if they genuinely need a meal, you can place it in minutes.',foodTap:{header:"Does [Name] order food or same-day delivery?",note:"We'll set these sites to Mock Error. You can change this anytime in Settings.",skipLink:"Skip — they don't order delivery",services:{doordash:"DoorDash",ubereats:"Uber Eats",instacart:"Instacart",grubhub:"Grubhub"}},cta:"Continue"},screen4:{header:"How should we start?",blockAll:{label:"Block all",recommendedTag:"recommended",body:"Instead of processing, orders go straight to your dashboard to checkout or ignore. [Name] sees a mock order confirmation page or error.",detail:"This setting intercepts all orders, with customizable options at site-wide level."},monitor:{label:"Monitor",body:"Understand and learn [Name]'s shopping needs and patterns, so you're ready to step in as things decline.",detail:"This setting is just for observation — all orders process as usual."},footer:"You can switch modes anytime, and set finer rules for any site — monitor-only, pause, custom messaging — in Settings.",cta:"Continue"},screen5:{header:"Before we go live on [Name]'s computer",consentCheckbox:"I confirm that I have my family member's explicit consent — or that I am their legally appointed Power of Attorney — to monitor and intervene in their online shopping. I will use ShieldCart only to protect them from unintended or fraudulent purchases, not to restrict purchases they are capable of ordering and intend to order.",tosCheckbox:"I've read and agree to the ShieldCart Terms of Service, including that ShieldCart is a safety net and does not guarantee 100% coverage.",tosLinkText:"Terms of Service",cta:"Continue"},screen6:{header:"Connect [Name]'s computer",body:"ShieldCart starts protecting the moment its extension is on their Chrome browser. Where are you right now?",branchHerComputer:"At their computer",branchOwnComputer:"At my own computer",branchShared:"We share this computer",changeBranch:"Choose a different option",deferLink:"I can't 
1connect yet — remind me later",pairing:{header:"Connect the device",body:"First, install the ShieldCart extension in Chrome on the computer where the shopping happens — then come back here to enter the pairing code.",installCta:"Install guide & extension download →",step1:"Install the extension on that computer (see guide above).",step2:"Click the ShieldCart icon in Chrome's toolbar — a 6-digit code appears.",step3:"Enter that code below.",codeLabel:"Pairing code",submit:"Connect",connecting:"Connecting…"},ownComputer:{framing:"You can connect to their computer from right here — one-time setup, about 10 minutes. After today, every connection is a single click, even when they're not at the computer.",notifyAsk:"While that downloads — turn on alerts on this computer so you never miss an intercepted order.",notifyCta:"Enable desktop alerts",guideAddendumHeader:"Stay connected",guideAddendumBody:"The next screen walks you through three final steps on their computer through this window: hiding the extension from their toolbar, setting a PIN, and locking the extension so it can't be removed. Five minutes, and you only do them once."},shared:{header:"When you shop on this computer",body:"ShieldCart intercepts every checkout in this browser — including yours. Before you shop: open ShieldCart, enter your PIN, and pause protection. Set it to resume automatically so protection is never left off by accident."},deferred:{prompt:"Pick a day, and we'll send you everything you need to your inbox.",cta:"Send it to me",exitHeader:"You're set up. Protection starts the moment you connect.",exitBody:"Everything's waiting in your inbox for [Date]. Nothing changes on [Name]'s end until then."}},screen6b:{header:"ShieldCart is live on [Name]'s computer.",body:"Three quick things before you disconnect — each keeps ShieldCart out of sight:",unpin:{label:"Unpin the extension",body:"Click the puzzle-piece icon in their Chrome toolbar and unpin ShieldCart, so no icon shows.",aside:"This unpins it from view only — protection is unaffected."},privacy:{label:"The dashboard stays private",body:'On the computer where you just installed ShieldCart, the website and dashboard hide themselves automatically. Anyone using that computer sees only a neutral "ShieldCart is active" screen — never your orders or settings. Nothing to set up.',aside:'Need the dashboard on that same computer? On the "ShieldCart is active" screen, click the shield five times quickly. It re-hides itself after 5 minutes of no use.',sharedVariant:"On a shared computer, your account login is the only real boundary — the hidden screen isn't. Sign out of ShieldCart when you step away."},lock:{label:"Lock the extension",duration:"2 minutes",body:"Prevents ShieldCart from being removed, even accidentally.",step1:"Download the file for their system:",windowsCta:"Windows",macCta:"Mac",step2:"Run it and allow admin permission if prompted.",step2Aside:"Windows: double-click → Yes. Mac: open file → System Settings → Profiles → Install.",step3:"Restart Chrome. ShieldCart now shows as protected, with no remove option.",step4:"Allow ShieldCart in Incognito — otherwise Incognito windows won't browse at all. Chrome menu → Extensions → ShieldCart → Details → Allow in Incognito."},skipLink:"Skip for now — we'll email you these steps",cta:"Continue",assetPending:"Screen recording to come",markedDone:"Done"},screen7:{header:"From here, ShieldCart lives on your phone.",body:"Orders are intercepted on [Name]'s computer — but you'll review them from wherever you are. Scan to set up your phone. It takes about a minute, and there's no app store involved.",sharedVariant:"On a shared computer, your phone is the only private place for ShieldCart.",qrPending:"QR code coming — scan-ready once a QR package is added",addToHomeScreen:{header:"Add ShieldCart to your home screen",iosStep1:"Tap the Share button below (the square with the arrow)",iosStep2:'Scroll and tap "Add to Home Screen"',iosStep3:'Tap "Add" — then open ShieldCart from your home screen',androidStep1:"Tap the three-dot menu in the top right",androidStep2:'Tap "Add to Home screen"',androidStep3:'Tap "Install" — then open ShieldCart from your home screen',genericFallback:`TODO-COPY: Open your browser's menu and choose "Add to Home Screen" — then open ShieldCart from your home screen.`},push:{header:"Get notified to review orders",body:"Enable push notifications to review orders as soon as they come in. Especially useful if your loved one frequently orders food deliveries.",cta:"Enable notifications",granted:"Go to dashboard"},desktopPref:{prompt:"Prefer to use ShieldCart on this computer?",body:"TODO-COPY: Nikki's copy for the desktop-alerts option goes here.",caveat:"Desktop alerts only arrive while Chrome is open on this computer. Your phone is with you everywhere — you can add ShieldCart to it anytime from Settings.",cta:"Enable desktop alerts",done:"Go to dashboard"},silentMode:{header:"Without notifications, ShieldCart works silently.",body:"Intercepted orders wait in your dashboard — but nothing will tap you on the shoulder. Make checking a rout
1ine, especially around mealtimes if [Name] orders food. You can turn on notifications anytime in Settings.",cta:"Go to dashboard"}},rehearsal:{placeOrder:"Place order",orderTotal:"Order total",trademarkDisclaimer:"All company, product, and service names, logos, and brands are property of their respective owners. Use of these names, trademarks, and brands does not imply endorsement, sponsorship, or affiliation with ShieldCart."}};function ae({index:s,count:n}){const r=Math.round((s+1)/n*100);return e.jsx("div",{className:"mb-8 h-0.5 w-full rounded-full bg-ink-100",role:"progressbar","aria-valuemin":1,"aria-valuemax":n,"aria-valuenow":s+1,"aria-label":"Setup progress",children:e.jsx("div",{className:"h-0.5 rounded-full bg-ink-300 transition-[width] duration-500 ease-out",style:{width:`${r}%`}})})}function ie({screens:s,allowCompleted:n=!1}){const{session:r,loading:a}=J(),o=H(),i=K();if(l.useEffect(()=>{!a&&!r&&o({to:"/login"})},[a,r,o]),l.useEffect(()=>{i.loading||!i.completed||n||o({to:"/dashboard",replace:!0})},[i.loading,i.completed,n,o]),a||i.loading)return e.jsx(A,{hideBell:!0,children:e.jsx("p",{className:"py-12 text-center text-ink-500",children:t.common.loading})});const c=s[i.step],h=i.stepIndex>0;return e.jsxs(A,{hideBell:!0,children:[e.jsx(ae,{index:i.stepIndex,count:i.stepCount}),i.error&&e.jsx("p",{className:"mb-4 rounded-lg bg-amber-50 px-3 py-2 text-sm text-amber-900",children:i.error}),c?e.jsx(c,{flow:i}):e.jsx(oe,{flow:i}),h&&e.jsx("button",{type:"button",onClick:i.back,className:"mt-8 text-sm text-ink-500 underline underline-offset-4 hover:text-ink-700",children:t.common.back})]})}function oe({flow:s}){return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-xs font-mono uppercase tracking-wide text-ink-400",children:["Not built yet — step ",s.stepIndex+1," of ",s.stepCount]}),e.jsx("h2",{className:"text-xl font-semibold",children:s.step}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:s.next,children:t.common.continue})]})}function D(s,n){const[r,a]=l.useState(s);return l.useEffect(()=>{const o=setTimeout(()=>a(s),n);return()=>clearTimeout(o)},[s,n]),r}function ce({flow:s}){const{profile:n}=S(),[r,a]=l.useState(""),[o,i]=l.useState(""),[c,h]=l.useState(""),[b,u]=l.useState(!1),[x,f]=l.useState(null),g=l.useRef(null);l.useEffect(()=>{!n||g.current||(g.current=n.id,a(N=>N||n.full_name||""),i(N=>N||n.shipping_address||""),h(N=>N||n.card_last4||""))},[n]);const k=D(r,150),j=D(o,150),C=D(c,150),m=l.useMemo(()=>w(r),[r]),d=r.trim().length>0&&!b;async function y(N){if(N.preventDefault(),!!d){u(!0),f(null);try{const T={full_name:r.trim(),shipping_address:o.trim()||null,card_last4:c.trim()||null};if(g.current)await v("/api/private/onboarding/elderly",{method:"PATCH",body:JSON.stringify({...T,elderly_id:g.current})});else{const z=await v("/api/private/onboarding/elderly",{method:"POST",body:JSON.stringify(T)});g.current=z.elderly.id}s.next()}catch(T){f(T instanceof Error?T.message:String(T))}finally{u(!1)}}}return e.jsxs("div",{className:"grid gap-8 md:grid-cols-2 md:gap-10",children:[e.jsxs("form",{className:"space-y-5",onSubmit:y,children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen1.header}),e.jsx("p",{className:"mt-2 text-sm text-ink-600",children:p(t.screen1.body,{name:m})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"label",htmlFor:"ob-name",children:t.screen1.fields.fullNameLabel}),e.jsx("input",{id:"ob-name",className:"input",required:!0,autoComplete:"off",value:r,onChange:N=>a(N.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"label",htmlFor:"ob-address",children:t.screen1.fields.shippingAddressLabel}),e.jsx("input",{id:"ob-address",className:"input",autoComplete:"off",value:o,onChange:N=>i(N.target.value)})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"label",htmlFor:"ob-card",children:[t.screen1.fields.cardLabel," ",e.jsxs("span",{className:"font-normal text-ink-400",children:["(",t.screen1.fields.cardHint,")"]})]}),e.jsx("input",{id:"ob-card",className:"input",maxLength:4,inputMode:"numeric",autoComplete:"off",value:c,onChange:N=>h(N.target.value.replace(/\D/g,""))}),e.jsx("p",{className:"mt-2 text-xs text-ink-500",children:t.screen1.cardMicrocopy})]}),x&&e.jsx("p",{className:"text-sm text-rose-700",children:x}),e.jsx("button",{className:"btn-primary w-full",type:"submit",disabled:!d,children:b?t.common.saving:t.screen1.cta})]}),e.jsxs("aside",{className:"md:sticky md:top-20 md:self-start",children:[e.jsxs("p",{className:"mb-2 text-center text-sm",children:[e.jsx("span",{className:"font-semibold text-ink-900",children:t.screen1.previewLabel}),e.jsxs("span",{className:"text-ink-500",children:[" — ",p(t.screen1.previewSublabel,{name:m})]})]}),e.jsx("div",{className:"mx-auto max-w-sm",children:e.jsx(q,{name:k,address:j,payments:G(C),genericSite:!0})})]})]})}const P={retail:{domain:"amazon.com",name:"Amazon",buttonBg:"#FFD814",buttonText:"#0F1111"},food:{domain:"doordash.com",name:"DoorDash",buttonBg:"#EB1700",buttonText:"#FFFFFF"}};function W({retailer:s,lines:n,onPlaceOrder:r,placing:a=!1}){const o=n.reduce((i,c)=>{const h=Number(c.price.replace(/[^0-9.]/g,""));return i+(Number.isFinite(h)?h:0)},0);return e.jsxs("div",{className:"overflow-hidden rounded-2xl border border-ink-200 bg-white shadow-sm",children:[e.jsx("div",{className:"border-b border-ink-100 px-5 py-4",children:e.jsx(ee,{size:"md",siteName:s.name,sourceDomain:s.domain,className:"text-ink-900"})}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[e.jsx("ul",{className:"space-y-3",children:n.map(i=>e.jsxs("li",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:i.isFee?"text-sm text-ink-600":"text-sm font-medium text-ink-900",children:i.name}),i.note&&e.jsx("p",{className:"mt-0.5 text-xs text-ink-500",children:i.note})]}),e.jsx("p",{className:"shrink-0 text-sm tabular-nums text-ink-900",children:i.price})]},i.name))}),e.jsxs("div",{className:"flex items-center justify-between border-t border-ink-100 pt-3",children:[e.jsx("p",{className:"text-sm font-semibold text-ink-900",children:t.rehearsal.orderTotal}),e.jsxs("p",{className:"text-sm font-semibold tabular-nums text-ink-900",children:["$",o.toFixed(2)]})]}),e.jsx("button",{type:"button",onClick:r,disabled:a,className:"w-full rounded-full px-4 py-2.5 text-sm font-semibold shadow-sm transition-opacity disabled:opacity-60",style:{backgroundColor:s.buttonBg,color:s.buttonText},children:a?t.common.saving:t.rehearsal.placeOrder})]})]})}function Y(){return e.jsx("p",{className:"mt-8 text-center text-[11px] leading-relaxed text-ink-400",children:t.rehearsal.trademarkDisclaimer})}function le({flow:s}){const{profile:n}=S(),[r,a]=l.useState(!1),o=w(n==null?void 0:n.full_name),i=[{name:t.screen2.cart.item1Name,price:t.screen2.cart.item1Price},{name:t.screen2.cart.item2Name,price:t.screen2.cart.item2Price},{name:t.screen2.cart.item3Name,price:t.screen2.cart.item3Price,note:t.screen2.cart.item3RepeatNote}];return e.jsxs("div",{className:"space-y-6",children:[r?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mx-auto max-w-sm",children:e.jsx(q,{name:(n==null?void 0:n.full_name)??"",address:(n==null?void 0:n.shipping_address)??"",payments:G(n==null?void 0:n.card_last4),domain:P.retail.domain,genericSite:!1,showReview:!1,showConfirmation:!0})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen2.afterHeader}),e.jsx("p",{className:"mt-2 text-sm text-ink-600",children:p(t.screen2.afterBody,{name:o})})]}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:s.next,children:t.screen2.cta})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:p(t.screen2.header,{name:o})}),e.jsx("p",{className:"mt-2 text-sm text-ink-600",children:p(t.screen2.body,{name:o})})]}),e.jsx(W,{retailer:P.retail,lines:i,onPlaceOrder:()=>a(!0)})]}),e.jsx(Y,{})]})}const B=[{domain:"doordash.com",label:t.screen3.foodTap.services.doordash},{domain:"ubereats.com",label:t.screen3.foodTap.services.ubereats},{domain:"instacart.com",label:t.screen3.foodTap.services.instacart},{domain:"grubhub.com",label:t.screen3.foodTap.services.grubhub}];function de({flow:s}){const{profile:n}=S(),[r,a]=l.useState(!1),[o,i]=l.useState(B.map(m=>m.domain)),[c,h]=l.useState(!1),[b,u]=l.useState(null),x=w(n==null?void 0:n.full_name),f=Q(O,null),g=[{name:t.screen3.cart.item1Name,price:t.screen3.cart.item1Price},{name:t.screen3.cart.item2Name,price:t.screen3.cart.item2Price},{name:t.screen3.cart.feeName,price:t.screen3.cart.feePrice,isFee:!0}];function k(m){i(d=>d.includes(m)?d.filter(y=>y!==m):[...d,m])}async function j(){if(n){h(!0),u(null);try{if(o.length>0){const m=o.map(y=>({elderly_id:n.id,domain:X(y),rule:"soft_decline",mode_scope:"custom",decline_message_template:O,decline_message:f,over_cap_action:"block"})),{error:d}=await $.from("site_rules").upsert(m,{onConflict:"elderly_id,domain,mode_scope"});if(d)throw new Error(d.message)}s.next()}catch(m){u(m instanceof Error?m.message:String(m))}finally{h(!1)}}}function C(){s.next()}return e.jsxs("div",{className:"space-y-6",children:[r?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mx-auto max-w-sm",children:e.jsx(te,{primary:"",siteName:P.food.name,sourceDomain:P.food.domain,message:f})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen3.afterHeader}),e.jsx("p",{className:"mt-2 text-sm text-ink-600",children:p(t.screen3.afterBody,{name:x})})]}),e.jsxs("fieldset",{className:"rounded-2xl border border-ink-200 p-4",children:[e.jsx("legend",{className:"px-1 text-sm font-semibold text-ink-900",children:p(t.screen3.foodTap.header,{name:x})}),e.jsx("div",{className:"mt-2 space-y-2",children:B.map(m=>e.jsxs("label",{className:"flex items-center gap-3 text-sm text-ink-800",children:[e.jsx("input",{type:"checkbox",checked:o.includes(m.domain),onChange:()=>k(m.domain)}),m.label]},m.domain))}),e.jsx("p",{className:"mt-3 text-xs text-ink-500",children:t.screen3.foodTap.note})]}),b&&e.jsx("p",{className:"text-sm text-rose-700",children:b}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:j,disabled:c||!n,children:c?t.common.saving:t.screen3.cta}),e.jsx("button",{type:"button",onClick:C,className:"block w-full text-center text-sm text-ink-500 underline underline-offset-4 hover:text-ink-700",children:t.screen3.foodTap.skipLink})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen3.header}),e.jsx("p",{className:"mt-2 text-sm text-ink-600",children:t.screen3.body})]}),e.jsx(W,{retailer:P.food,lines:g,onPlaceOrder:()=>a(!0)})]}),e.jsx(Y,{})]})}function me(s){const r=Z({mode:"custom",siteListKind:"none"},s),a=r.mode==="custom";return{mode:r.mode,site_list_kind:a?r.siteListKind:"none",restrict_to_approved_sites:a&&r.siteListKind==="allowlist"}}function L({selected:s,onSelect:n,title:r,tag:a,body:o,detail:i,primary:c}){return e.jsxs("button",{type:"button",onClick:n,"aria-pressed":s,className:["w-full rounded-2xl border p-4 text-left transition-colors",s?"border-ink-900 bg-ink-50":"border-ink-200 bg-white hover:border-ink-300"].join(" "),children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:c?"text-base font-semibold text-ink-900":"text-base font-medium text-ink-900",children:r}),a&&e.jsxs("span",{className:"text-xs text-ink-500",children:["(",a,")"]})]}),e.jsx("p",{className:"mt-1.5 text-sm text-ink-700",children:o}),e.jsx("p",{className:"mt-1 text-xs text-ink-500",children:i})]})}function he({flow:s}){const{profile:n}=S(),[r,a]=l.useState("block"),[o,i]=l.useState(!1),[c,h]=l.useState(null),b=w(n==null?void 0:n.full_name);async function u(){if(n){i(!0),h(null);try{await v("/api/private/protection-settings",{method:"POST",body:JSON.stringify({elderly_id:n.id,...me(r)})}),s.next()}catch(x){h(x instanceof Error?x.message:String(x))}finally{i(!1)}}}return e.jsxs("div",{className:"space-y-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen4.header}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(L,{primary:!0,selected:r==="block",onSelect:()=>a("block"),title:t.screen4.blockAll.label,tag:t.screen4.blockAll.recommendedTag,body:p(t.screen4.blockAll.body,{name:b}),detail:t.screen4.blockAll.detail}),e.jsx(L,{selected:r==="monitor",onSelect:()=>a("monitor"),title:t.screen4.monitor.label,body:p(t.screen4.monitor.body,{name:b}),detail:t.screen4.monitor.detail})]}),e.jsx("p",{className:"text-xs text-ink-500",children:t.screen4.footer}),c&&e.jsx("p",{className:"text-sm text-rose-700",children:c}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:u,disabled:o||!n,children:o?t.common.saving:t.screen4.cta})]})}function ue({flow:s}){const{profile:n}=S(),[r,a]=l.useState(!1),[o,i]=l.useState(!1),[c,h]=l.useState(!1),[b,u]=l.useState(null),x=w(n==null?void 0:n.full_name),f=r&&o&&!c;async function g(){if(f){h(!0),u(null);try{await v("/api/private/onboarding/consent",{method:"POST",body:JSON.stringify({acknowledged:!0})}),s.next()}catch(k){u(k instanceof Error?k.message:String(k))}finally{h(!1)}}}return e.jsxs("div",{className:"space-y-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:p(t.screen5.header,{name:x})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("label",{className:"flex gap-3 text-sm leading-relaxed text-ink-800",children:[e.jsx("input",{type:"checkbox",className:"mt-1 flex-none",checked:r,onChange:k=>a(k.target.checked)}),e.jsx("span",{children:t.screen5.consentCheckbox})]}),e.jsxs("label",{className:"flex gap-3 text-sm leading-relaxed text-ink-800",children:[e.jsx("input",{type:"checkbox",className:"mt-1 flex-none",checked:o,onChange:k=>i(k.target.checked)}),e.jsxs("span",{children:[t.screen5.tosCheckbox," ",e.jsx("a",{href:"/terms",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:t.screen5.tosLinkText})]})]})]}),b&&e.jsx("p",{className:"text-sm text-rose-700",children:b}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:g,disabled:!f,children:c?t.common.saving:t.screen5.cta})]})}function pe({elderlyId:s,onPaired:n}){const[r,a]=l.useState(""),[o,i]=l.useState(!1),[c,h]=l.useState(null);async function b(u){if(u.preventDefault(),r.length===6){i(!0),h(null);try{await v("/api/private/pairing/claim",{method:"POST",body:JSON.stringify({code:r,elderly_id:s})}),n()}catch(x){h(x instanceof Error?x.message:String(x))}finally{i(!1)}}}return e.jsxs("form",{className:"space-y-4",onSubmit:b,children:[e.jsx("p",{className:"text-sm text-ink-600",children:t.screen6.pairing.body}),e.jsx("a",{href:"/install",target:"_blank",rel:"noopener noreferrer",className:"btn-secondary flex w-full items-center justify-center no-underline",children:t.screen6.pairing.installCta}),e.jsxs("ol",{className:"ml-5 list-decimal space-y-1 text-sm text-ink-700",children:[e.jsx("li",{children:t.screen6.pairing.step1}),e.jsx("li",{children:t.screen6.pairing.step2}),e.jsx("li",{children:t.screen6.pairing.step3})]}),e.jsxs("div",{children:[e.jsx("label",{className:"label",htmlFor:"ob-pair-code",children:t.screen6.pairing.codeLabel}),e.jsx("input",{id:"ob-pair-code",className:"input text-center text-2xl tracking-[0.4em]",inputMode:"numeric",maxLength:6,autoComplete:"off",value:r,onChange:u=>a(u.target.value.replace(/\D/g,""))})]}),c&&e.jsx("p",{className:"text-sm text-rose-700",children:c}),e.jsx("button",{className:"btn-primary w-full",type:"submit",disabled:o||r.length!==6,children:o?t.screen6.pairing.connecting:t.screen6.pairing.submit})]})}function xe(){const s=new Date;return s.setDate(s.getDate()+1),s.toISOString().slice(0,10)}function be({flow:s}){const{profile:n}=S(),r=w(n==null?void 0:n.full_name),a=s.state.connectBranch??null,[o,i]=l.useState(!1),[c,h]=l.useState(""),[b,u]=l.useState(!1),[x,f]=l.useState(!1),[g,k]=l.useState(null);function j(y){s.patch({connectBranch:y})}async function C(){if(s.mayRequestDesktopNotifications){f(!0),k(null);try{await E();const y=typeof Notification<"u"&&Notification.permission==="granted";s.patch({desktopNotifsGranted:y})}catch(y){k(y instanceof Error?y.message:String(y))}fi
1nally{f(!1)}}}function m(){s.patch({deviceConnected:!0}),a==="shared"?i(!0):s.next()}async function d(){if(c){f(!0),k(null);try{s.patch({connectBranch:"deferred",deferredDate:c}),await v("/api/private/onboarding/events",{method:"POST",body:JSON.stringify({event:"deferred",date:c})}),u(!0)}catch(y){k(y instanceof Error?y.message:String(y))}finally{f(!1)}}}return b?e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen6.deferred.exitHeader}),e.jsx("p",{className:"text-sm text-ink-600",children:p(t.screen6.deferred.exitBody,{name:r,date:c})})]}):o?e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen6.shared.header}),e.jsx("p",{className:"text-sm text-ink-600",children:t.screen6.shared.body}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:s.next,children:t.common.continue})]}):a?a==="deferred"?e.jsxs("div",{className:"space-y-5",children:[e.jsx("p",{className:"text-sm text-ink-700",children:t.screen6.deferred.prompt}),e.jsx("input",{type:"date",className:"input",min:xe(),value:c,onChange:y=>h(y.target.value)}),g&&e.jsx("p",{className:"text-sm text-rose-700",children:g}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:d,disabled:x||!c,children:x?t.common.saving:t.screen6.deferred.cta}),e.jsx(I,{onClick:()=>s.patch({connectBranch:null})})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen6.pairing.header}),a==="own_computer"&&e.jsxs("div",{className:"space-y-5",children:[e.jsx("p",{className:"text-sm text-ink-700",children:p(t.screen6.ownComputer.framing,{name:r})}),s.mayRequestDesktopNotifications&&!s.state.desktopNotifsGranted&&e.jsxs("div",{className:"rounded-2xl border border-ink-200 p-4",children:[e.jsx("p",{className:"text-sm text-ink-700",children:t.screen6.ownComputer.notifyAsk}),e.jsx("button",{type:"button",className:"btn-secondary mt-3 w-full",onClick:C,disabled:x,children:t.screen6.ownComputer.notifyCta})]}),e.jsx(se,{elderlyName:(n==null?void 0:n.full_name)??""}),e.jsxs("div",{className:"rounded-2xl bg-ink-50 p-4",children:[e.jsx("p",{className:"text-sm font-semibold text-ink-900",children:t.screen6.ownComputer.guideAddendumHeader}),e.jsx("p",{className:"mt-1 text-sm text-ink-700",children:p(t.screen6.ownComputer.guideAddendumBody,{name:r})})]})]}),n&&e.jsx(pe,{elderlyId:n.id,onPaired:m}),g&&e.jsx("p",{className:"text-sm text-rose-700",children:g}),e.jsx(I,{onClick:()=>s.patch({connectBranch:null})})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:p(t.screen6.header,{name:r})}),e.jsx("p",{className:"mt-2 text-sm text-ink-600",children:p(t.screen6.body,{name:r})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:()=>j("her_computer"),children:t.screen6.branchHerComputer}),e.jsx("button",{type:"button",className:"btn-secondary w-full",onClick:()=>j("own_computer"),children:t.screen6.branchOwnComputer}),e.jsx("button",{type:"button",className:"btn-secondary w-full",onClick:()=>j("shared"),children:t.screen6.branchShared})]}),e.jsx("button",{type:"button",onClick:()=>j("deferred"),className:"block w-full text-center text-sm text-ink-500 underline underline-offset-4 hover:text-ink-700",children:t.screen6.deferLink})]})}function I({onClick:s}){return e.jsx("button",{type:"button",onClick:s,className:"block w-full text-center text-sm text-ink-500 underline underline-offset-4 hover:text-ink-700",children:t.screen6.changeBranch})}function M({filename:s}){return e.jsx("div",{className:"mt-3 grid h-32 place-items-center rounded-xl border border-dashed border-ink-200 bg-ink-50 text-center",children:e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-ink-500",children:t.screen6b.assetPending}),e.jsx("p",{className:"mt-0.5 font-mono text-[11px] text-ink-400",children:s})]})})}function _({n:s,label:n,meta:r,children:a}){return e.jsxs("section",{className:"rounded-2xl border border-ink-200 p-4",children:[e.jsxs("h3",{className:"text-sm font-semibold text-ink-900",children:[s,". ",n,r&&e.jsxs("span",{className:"ml-2 font-normal text-ink-500",children:["(",r,")"]})]}),e.jsx("div",{className:"mt-2 text-sm text-ink-700",children:a})]})}function fe({flow:s}){const{profile:n}=S(),r=w(n==null?void 0:n.full_name),a=s.state.checklist??{},o=s.state.connectBranch==="shared";async function i(){s.patch({checklist:{...a,skipped:!0}});try{await v("/api/private/onboarding/events",{method:"POST",body:JSON.stringify({event:"checklist_skipped"})})}catch{}s.next()}return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:p(t.screen6b.header,{name:r})}),e.jsx("p",{className:"mt-2 text-sm text-ink-600",children:t.screen6b.body})]}),e.jsxs(_,{n:1,label:t.screen6b.unpin.label,children:[e.jsx("p",{children:p(t.screen6b.unpin.body,{name:r})}),e.jsx("p",{className:"mt-1 text-xs text-ink-500",children:t.screen6b.unpin.aside}),e.jsx(M,{filename:"unpin-demo.gif"}),e.jsxs("label",{className:"mt-3 flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:a.unpinned===!0,onChange:c=>s.patch({checklist:{...a,unpinned:c.target.checked}})}),t.screen6b.markedDone]})]}),e.jsxs(_,{n:2,label:t.screen6b.privacy.label,children:[e.jsx("p",{children:p(t.screen6b.privacy.body,{name:r})}),e.jsx("p",{className:"mt-2 rounded-xl bg-ink-50 p-3 text-xs text-ink-600",children:p(t.screen6b.privacy.aside,{name:r})}),o&&e.jsx("p",{className:"mt-2 text-xs text-ink-600",children:p(t.screen6b.privacy.sharedVariant,{name:r})}),e.jsxs("label",{className:"mt-3 flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:a.privacyAcknowledged===!0,onChange:c=>s.patch({checklist:{...a,privacyAcknowledged:c.target.checked}})}),t.screen6b.markedDone]})]}),e.jsxs(_,{n:3,label:t.screen6b.lock.label,meta:t.screen6b.lock.duration,children:[e.jsx("p",{children:t.screen6b.lock.body}
1),e.jsxs("ol",{className:"mt-2 ml-5 list-decimal space-y-2",children:[e.jsxs("li",{children:[p(t.screen6b.lock.step1,{name:r}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[e.jsx("button",{type:"button",className:"btn-secondary",onClick:()=>F("windows"),children:t.screen6b.lock.windowsCta}),e.jsx("button",{type:"button",className:"btn-secondary",onClick:()=>F("mac"),children:t.screen6b.lock.macCta})]})]}),e.jsxs("li",{children:[t.screen6b.lock.step2,e.jsx("span",{className:"block text-xs text-ink-500",children:t.screen6b.lock.step2Aside})]}),e.jsx("li",{children:t.screen6b.lock.step3}),e.jsx("li",{children:t.screen6b.lock.step4})]}),e.jsx(M,{filename:"lock-install-win.gif · lock-install-mac.gif"}),e.jsxs("label",{className:"mt-3 flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:a.extensionLocked===!0,onChange:c=>s.patch({checklist:{...a,extensionLocked:c.target.checked}})}),t.screen6b.markedDone]})]}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:s.next,children:t.screen6b.cta}),e.jsx("button",{type:"button",onClick:i,className:"block w-full text-center text-sm text-ink-500 underline underline-offset-4 hover:text-ink-700",children:t.screen6b.skipLink})]})}function ye(){if(typeof window>"u")return"desktop";if(R())return"pwa";const s=window.matchMedia("(max-width: 768px)").matches,n="ontouchstart"in window||navigator.maxTouchPoints>0;return s||n?"mobile":"desktop"}function ke({flow:s}){const n=H(),{profile:r}=S(),a=w(r==null?void 0:r.full_name),[o,i]=l.useState("desktop"),[c,h]=l.useState(!1),[b,u]=l.useState(!1),[x,f]=l.useState(null);l.useEffect(()=>i(ye()),[]);const g=s.state.connectBranch==="shared",k=typeof window<"u"?`${window.location.origin}/dashboard`:"/dashboard";async function j(){u(!0),f(null);try{await E();const d=typeof Notification<"u"&&Notification.permission==="granted";s.patch({pwaPushGranted:d,pwaInstalled:R()})}catch(d){f(d instanceof Error?d.message:String(d))}finally{u(!1)}}async function C(){if(s.mayRequestDesktopNotifications){u(!0),f(null);try{await E();const d=typeof Notification<"u"&&Notification.permission==="granted";s.patch({desktopNotifsGranted:d})}catch(d){f(d instanceof Error?d.message:String(d))}finally{u(!1)}}}async function m(){if(!s.hasChannel&&!c){h(!0);try{await v("/api/private/onboarding/events",{method:"POST",body:JSON.stringify({event:"no_channel"})})}catch{}return}u(!0);try{await s.complete(),n({to:"/dashboard",replace:!0})}catch(d){f(d instanceof Error?d.message:String(d)),u(!1)}}return c?e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen7.silentMode.header}),e.jsx("p",{className:"text-sm text-ink-600",children:p(t.screen7.silentMode.body,{name:a})}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:m,disabled:b,children:t.screen7.silentMode.cta})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-ink-900",children:t.screen7.header}),e.jsx("p",{className:"mt-2 text-sm text-ink-600",children:g?t.screen7.sharedVariant:p(t.screen7.body,{name:a})})]}),o==="desktop"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"mx-auto grid h-44 w-44 place-items-center rounded-xl border border-dashed border-ink-200 bg-ink-50 text-center",children:e.jsx("p",{className:"px-3 text-xs text-ink-500",children:t.screen7.qrPending})}),e.jsx("p",{className:"break-all text-center text-xs text-ink-500",children:k})]}),o==="mobile"&&e.jsxs("div",{className:"rounded-2xl border border-ink-200 p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-ink-900",children:t.screen7.addToHomeScreen.header}),e.jsx("ol",{className:"mt-2 ml-5 list-decimal space-y-1 text-sm text-ink-700",children:U()?e.jsxs(e.Fragment,{children:[e.jsx("li",{children:t.screen7.addToHomeScreen.iosStep1}),e.jsx("li",{children:t.screen7.addToHomeScreen.iosStep2}),e.jsx("li",{children:t.screen7.addToHomeScreen.iosStep3})]}):e.jsxs(e.Fragment,{children:[e.jsx("li",{children:t.screen7.addToHomeScreen.androidStep1}),e.jsx("li",{children:t.screen7.addToHomeScreen.androidStep2}),e.jsx("li",{children:t.screen7.addToHomeScreen.androidStep3})]})}),e.jsx("p",{className:"mt-3 text-xs text-ink-500",children:t.screen7.addToHomeScreen.genericFallback})]}),o==="pwa"&&e.jsxs("div",{className:"rounded-2xl border border-ink-200 p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-ink-900",children:t.screen7.push.header}),e.jsx("p",{className:"mt-1 text-sm text-ink-700",children:t.screen7.push.body}),s.state.pwaPushGranted?e.jsx("button",{type:"button",className:"btn-primary mt-3 w-full",onClick:m,disabled:b,children:t.screen7.push.granted}):e.jsx("button",{type:"button",className:"btn-secondary mt-3 w-full",onClick:j,disabled:b,children:t.screen7.push.cta})]}),s.mayRequestDesktopNotifications&&!s.state.desktopNotifsGranted&&e.jsxs("div",{className:"rounded-2xl bg-ink-50 p-4",children:[e.jsx("p",{className:"text-sm font-medium text-ink-900",children:t.screen7.desktopPref.prompt}),e.jsx("p",{className:"mt-1 text-sm text-ink-700",children:t.screen7.desktopPref.body}),e.jsx("p",{className:"mt-2 text-xs text-ink-500",children:t.screen7.desktopPref.caveat}),e.jsx("button",{type:"button",className:"btn-secondary mt-3 w-full",onClick:C,disabled:b,children:t.screen7.desktopPref.cta})]}),x&&e.jsx("p",{className:"text-sm text-rose-700",children:x}),e.jsx("button",{type:"button",className:"btn-primary w-full",onClick:m,disabled:b,children:t.screen7.desktopPref.done})]})}function Me(){const{qa:s}=V.useSearch();return e.jsx(ie,{allowCompleted:!!s,screens:{profile:ce,rehearsal_order:le,rehearsal_error:de,mode:he,authorization:ue,connect:be,checklist:fe,handoff:ke}})}export{Me 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.