1import{r as l,j as e}from"./vendor-react-Dqm4a0k5.js";import{c as f,C as b,a as x}from"./index-DsUIL5GE.js";import{p as g,w as h,cm as v}from"./vendor-icons-Dv6Y7wXg.js";const d=l.forwardRef(({className:a,type:t,style:s,...i},o)=>e.jsx("input",{type:t,className:f("flex h-12 w-full clay-input px-4 py-3 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm transition-all touch-manipulation",a),style:{fontSize:"16px",...s},ref:o,...i}));d.displayName="Input";const u={deals:20,avgPrice:59},y=[{label:"Tier 1",price:59},{label:"Tier 2",price:118},{label:"Tier 3",price:177}],n=a=>a.toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0});function c(a){const t=parseFloat(a.replace(/[^0-9.]/g,""));return Number.isFinite(t)?t:0}const N=[{icon:g,title:"Refund windows",body:"Catch every marketplace refund deadline before it closes â never lose money on a tool you would have returned."},{icon:h,title:"Duplicate detection",body:"Stop paying twice for a tool you already own. DealKeep flags duplicates across your whole stack before you buy."},{icon:v,title:"Founder Track",body:"Get alerted when a dealâs founder goes quiet or a tool starts dying, so you can refund or replace before access disappears."}];function j(){const[a,t]=l.useState(String(u.deals)),[s,i]=l.useState(String(u.avgPrice)),{count:o,price:w,totalInvested:p}=l.useMemo(()=>{const r=c(a),m=c(s);return{count:r,price:m,totalInvested:r*m}},[a,s]);return e.jsx(b,{className:"border-primary/30 bg-card/60",children:e.jsxs(x,{className:"p-6 sm:p-8",children:[e.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"text-sm font-semibold",children:"Lifetime deals you own"}),e.jsx(d,{inputMode:"numeric",value:a,onChange:r=>t(r.target.value),className:"mt-1.5","aria-label":"Number of lifetime deals you own"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"text-sm font-semibold",children:"Average price per deal ($)"}),e.jsx(d,{inputMode:"decimal",value:s,onChange:r=>i(r.target.value),className:"mt-1.5","aria-label":"Average price paid per lifetime deal in dollars"}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:y.map(r=>e.jsxs("button",{type:"button",onClick:()=>i(String(r.price)),className:`rounded-md border px-2.5 py-1 text-xs font-medium transition-colors ${c(s)===r.price?"border-primary bg-primary/15 text-primary":"border-border bg-background/60 text-muted-foreground hover:border-primary/40"}`,"aria-label":`Set average price to ${r.label} (${n(r.price)})`,children:[r.label," · ",n(r.price)]},r.label))})]})]}),e.jsxs("div",{className:"mt-7 rounded-xl border border-primary/30 bg-background/60 p-6 text-center",children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-muted-foreground mb-1",children:"Invested in your lifetime-deal stack"}),e.jsx("div",{className:"text-4xl font-bold text-primary",children:n(p)}),e.jsxs("div",{className:"mt-1 text-sm text-muted-foreground",children:[o>0?e.jsxs(e.Fragment,{children:["across ",o.toLocaleString("en-US")," tools · "]}):null,"one-time â no monthly or subscription fees, ever."]})]}),e.jsxs("div",{className:"mt-7",children:[e.jsx("p",{className:"text-sm font-semibold mb-3",children:"What DealKeep does with a stack this size"}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-3",children:N.map(r=>e.jsxs("div",{className:"rounded-lg border border-border bg-background/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx(r.icon,{className:"h-4 w-4 text-primary shrink-0"}),e.jsx("span",{className:"text-sm font-semibold",children:r.title})]}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r.body})]},r.title))})]})]})})}const R=Object.freeze(Object.defineProperty({__proto__:null,RoiCalculatorWidget:j},Symbol.toStringTag,{value:"Module"})),k=2048;function I(a){const t=a.trim();if(!t)return{valid:!1,error:"Paste your link first."};if(t.length>k)return{valid:!1,error:"That link is too long."};if(/\s/.test(t))return{valid:!1,error:"Links cannot contain spaces."};let s;try{s=new URL(t)}catch{return{valid:!1,error:"That does not look like a full link â include https://."}}return s.protocol!=="https:"?{valid:!1,error:"Only https:// links are supported."}:!s.hostname||!s.hostname.includes(".")?{valid:!1,error:"That link is missing a valid domain."}:{valid:!0,normalized:t}}export{d as I,j as R,R as a,I as v};
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.