1import{j as e,$,P as R,s as Q,v as F,z as T,a5 as V,H as Z,m as M,g as ee,e as se,C as v,a as N,b as C,c as te,d as w,B as A,L as O}from"./index-Cxjsfz7u.js";import{a as r,C as ae,br as re,M as ne,L as ce,w as oe,q as ie,bp as de,ab as le,bq as me,aD as ue,au as he,aN as B,F as z,aI as xe}from"./icons-C7ldRERG.js";import{u as pe}from"./index-BpHSrX7O.js";var S="Checkbox",[fe]=Z(S),[be,D]=fe(S);function ye(a){const{__scopeCheckbox:n,checked:c,children:l,defaultChecked:i,disabled:t,form:f,name:p,onCheckedChange:m,required:b,value:y="on",internal_do_not_use_render:u}=a,[h,j]=Q({prop:c,defaultProp:i??!1,onChange:m,caller:S}),[g,s]=r.useState(null),[d,o]=r.useState(null),x=r.useRef(!1),E=g?!!f||!!g.closest("form"):!0,P={checked:h,disabled:t,setChecked:j,control:g,setControl:s,name:p,form:f,value:y,hasConsumerStoppedPropagationRef:x,required:b,defaultChecked:k(i)?!1:i,isFormControl:E,bubbleInput:d,setBubbleInput:o};return e.jsx(be,{scope:n,...P,children:ge(u)?u(P):l})}var H="CheckboxTrigger",q=r.forwardRef(({__scopeCheckbox:a,onKeyDown:n,onClick:c,...l},i)=>{const{control:t,value:f,disabled:p,checked:m,required:b,setControl:y,setChecked:u,hasConsumerStoppedPropagationRef:h,isFormControl:j,bubbleInput:g}=D(H,a),s=F(i,y),d=r.useRef(m);return r.useEffect(()=>{const o=t?.form;if(o){const x=()=>u(d.current);return o.addEventListener("reset",x),()=>o.removeEventListener("reset",x)}},[t,u]),e.jsx(R.button,{type:"button",role:"checkbox","aria-checked":k(m)?"mixed":m,"aria-required":b,"data-state":J(m),"data-disabled":p?"":void 0,disabled:p,value:f,...l,ref:s,onKeyDown:T(n,o=>{o.key==="Enter"&&o.preventDefault()}),onClick:T(c,o=>{u(x=>k(x)?!0:!x),g&&j&&(h.current=o.isPropagationStopped(),h.current||o.stopPropagation())})})});q.displayName=H;var _=r.forwardRef((a,n)=>{const{__scopeCheckbox:c,name:l,checked:i,defaultChecked:t,required:f,disabled:p,value:m,onCheckedChange:b,form:y,...u}=a;return e.jsx(ye,{__scopeCheckbox:c,checked:i,defaultChecked:t,disabled:p,required:f,onCheckedChange:b,name:l,form:y,value:m,internal_do_not_use_render:({isFormControl:h})=>e.jsxs(e.Fragment,{children:[e.jsx(q,{...u,ref:n,__scopeCheckbox:c}),h&&e.jsx(U,{__scopeCheckbox:c})]})})});_.displayName=S;var W="CheckboxIndicator",G=r.forwardRef((a,n)=>{const{__scopeCheckbox:c,forceMount:l,...i}=a,t=D(W,c);return e.jsx($,{present:l||k(t.checked)||t.checked===!0,children:e.jsx(R.span,{"data-state":J(t.checked),"data-disabled":t.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...a.style}})})});G.displayName=W;var K="CheckboxBubbleInput",U=r.forwardRef(({__scopeCheckbox:a,...n},c)=>{const{control:l,hasConsumerStoppedPropagationRef:i,checked:t,defaultChecked:f,required:p,disabled:m,name:b,value:y,form:u,bubbleInput:h,setBubbleInput:j}=D(K,a),g=F(c,j),s=pe(t),d=V(l);r.useEffect(()=>{const x=h;if(!x)return;const E=window.HTMLInputElement.prototype,L=Object.getOwnPropertyDescriptor(E,"checked").set,X=!i.current;if(s!==t&&L){const Y=new Event("click",{bubbles:X});x.indeterminate=k(t),L.call(x,k(t)?!1:t),x.dispatchEvent(Y)}},[h,s,t,i]);const o=r.useRef(k(t)?!1:t);return e.jsx(R.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??o.current,required:p,disabled:m,name:b,value:y,form:u,...n,tabIndex:-1,ref:g,style:{...n.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});U.displayName=K;function ge(a){return typeof a=="function"}function k(a){return a==="indeterminate"}function J(a){return k(a)?"indeterminate":a?"checked":"unchecked"}const I=r.forwardRef(({className:a,...n},c)=>e.jsx(_,{ref:c,className:M("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...n,children:e.jsx(G,{className:M("flex items-center justify-center text-current"),children:e.jsx(ae,{className:"h-4 w-4"})})}));I.displayName=_.displayName;const ke=[{href:"/",title:"Find Domains",desc:"Cross-marketplace semantic + EMD + brand search across 365M+ tracked domains.",Icon:ie},{href:"/expired",title:"Expired Auctions",desc:"Every domain at auction across 9 marketplaces, refreshed daily. Save your filters as searches.",Icon:de,badge:"Save searches"},{href:"/last-call",title:"Last Call",desc:"Top 60 domains ending today. Bids refreshed every hour through the day.",Icon:le},{href:"/lists",title:"Curated Lists",desc:"Hand-picked Domain Gems, Trends, Highlights, App Store matches and more.",Icon:me},{href:"/keywords",title:"Keyword Intelligence",desc:"Trending keywords, EMD coverage, brand-launch detection.",Icon:ue},{href:"/brand-match",title:"Brand Match",desc:"Check a name against 57M global company records + active trademarks.",Icon:he}];function Ce(){const[,a]=ee(),[n,c]=r.useState(""),[l,i]=r.useState(!0),[t,f]=r.useState(!0),[p,m]=r.useState(!1),[b,y]=r.useState(!1),[u,h]=r.useState(null);r.useEffect(()=>{fetch("/api/auth/me",{credentials:"include"}).then(async s=>s.ok?s.json():null).then(s=>{if(s&&s.user){const d=s.user,o=d.displayName&&d.displayName!==d.username?d.displayName:(d.email||d.username||"").split("@")[0];c(o||"")}}).catch(()=>{})},[]);async function j(){m(!0),h(null);try{const s=await fetch("/api/newsletter/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({dailyDigest:l,generalNewsletter:t})});if(!s.ok){const d=await s.json().catch(()=>({}));throw new Error(d.message||"Could not save preferences")}y(!0)}catch(s){h(s.message||"Could not save preferences")}finally{m(!1)}}const g=l||t;return e.jsx(se,{children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-10 md:py-14",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"inline-flex w-16 h-16 rounded-full bg-primary/10
1items-center justify-center mb-4",children:e.jsx(re,{size:32,className:"text-primary"})}),e.jsxs("h1",{className:"text-3xl md:text-4xl font-bold mb-2",style:{fontFamily:"var(--font-display)"},children:["Welcome to DotWeekly",n?", "+n:"","!"]}),e.jsx("p",{className:"text-lg text-muted-foreground max-w-xl mx-auto",children:"Your free account is ready. Pick what you want in your inbox, then jump into the tools."})]}),e.jsxs(v,{className:"mb-8",children:[e.jsxs(N,{children:[e.jsxs(C,{className:"flex items-center gap-2 text-lg",children:[e.jsx(ne,{size:20,className:"text-primary"}),"Newsletters (optional)"]}),e.jsx(te,{children:"Pick one, both, or skip. One-click unsubscribe in every email. We never share your address."})]}),e.jsxs(w,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx(I,{checked:l,onCheckedChange:s=>i(s===!0),className:"mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium",children:"Daily Highlights"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Top auction picks of the day, delivered every morning around 8:30 AM CT."})]})]}),e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx(I,{checked:t,onCheckedChange:s=>f(s===!0),className:"mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium",children:"Weekly Newsletter"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Weekly roundup: curated lists, market trends, and standout domains we spotted that week."})]})]})]}),u&&e.jsx("div",{className:"mt-4 text-sm text-red-600",children:u}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:[e.jsxs(A,{onClick:j,disabled:p||b,className:"min-w-[140px]",children:[p&&e.jsx(ce,{className:"w-4 h-4 mr-2 animate-spin"}),b?e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),"Saved"]}):g?"Save preferences":"Save (no emails)"]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"You can change this any time from your account settings."})]})]})]}),e.jsxs("div",{className:"mb-3 flex items-baseline justify-between",children:[e.jsx("h2",{className:"text-xl font-semibold",children:"Popular tools"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"All free, all included with your account."})]}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 md:grid-cols-3 mb-10",children:ke.map(s=>e.jsx(O,{href:s.href,children:e.jsxs(v,{className:"h-full cursor-pointer hover:border-primary/60 hover:shadow-md transition relative",children:[s.badge&&e.jsxs("span",{className:"absolute top-3 right-3 inline-flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wider bg-amber-100 text-amber-800 px-2 py-0.5 rounded",children:[e.jsx(B,{size:10}),s.badge]}),e.jsxs(N,{className:"pb-2",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center mb-2",children:e.jsx(s.Icon,{size:20,className:"text-primary"})}),e.jsxs(C,{className:"text-base flex items-center justify-between",children:[e.jsx("span",{children:s.title}),e.jsx(z,{size:14,className:"text-muted-foreground"})]})]}),e.jsx(w,{children:e.jsx("p",{className:"text-sm text-muted-foreground",children:s.desc})})]})},s.href))}),e.jsxs(v,{className:"mb-10 border-amber-300 bg-amber-50",children:[e.jsx(N,{className:"pb-2",children:e.jsxs(C,{className:"flex items-center gap-2 text-base text-amber-900",children:[e.jsx(B,{size:18}),"Pro tip: save your Expired Auctions searches"]})}),e.jsx(w,{children:e.jsxs("p",{className:"text-sm text-amber-900",children:["On ",e.jsx(O,{href:"/expired",className:"underline font-medium",children:"Expired Auctions"}),", set your filters (TLDs, ending window, keyword, length, source) and save them as a named search. Reopen with one click every day to see fresh results matching your criteria. Saved-search links are bookmarkable and survive browser refreshes."]})})]}),e.jsxs(v,{className:"mb-10 border-primary/30 bg-primary/5",children:[e.jsx(N,{className:"pb-2",children:e.jsxs(C,{className:"flex items-center gap-2 text-base text-primary",children:[e.jsx(xe,{size:18}),"Coming soon"]})}
1),e.jsxs(w,{className:"text-sm space-y-2 text-foreground/80",children:[e.jsxs("p",{children:[e.jsx("span",{className:"font-medium",children:"Domain Watch"})," â the first all-in-one expired-auction watch tool. Track domains across GoDaddy, Dynadot, Sedo, SnapNames, NameJet, and DropCatch in one dashboard. Daily digest emails, end-of-auction alerts, and bid-change notifications. Free forever."]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-medium",children:"More saveable views and alerts"})," are on the roadmap across Find, Lists, and Keywords. If you have a feature in mind, email"," ",e.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]})]})]}),e.jsx("div",{className:"text-center",children:e.jsxs(A,{onClick:()=>a("/expired"),size:"lg",children:["Start with Expired Auctions",e.jsx(z,{className:"w-4 h-4 ml-2"})]})})]})})}export{Ce 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.