1import{w as fe,c as Ge,r,a as Me,s as U,j as e,G as Te,B as I,y as oe,ap as ie,E as ce,ab as Re,X as Pe,D as _e,i as Ie,k as Oe,S as $e,l as De,m as Le,aA as Ue,h as Be,Q as N}from"./index-DocTL6Xp.js";import{T as Xe,a as ze,b as de,c as G,d as qe,e as M}from"./table-DkAu5atY.js";import{A as J}from"./arrow-up-down-BTf0brX3.js";import{L as me}from"./lock-CumxCSTJ.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Q=fe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const Z=fe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),Ye=1,He="2518b226-89a5-4679-9675-b33ba905b371",Ve="25210763-c931-4df9-aca0-d42b22c5597f",We="/__l5e/assets-v1/2518b226-89a5-4679-9675-b33ba905b371/goex-favicon.png",Ke="a/v1/25210763-c931-4df9-aca0-d42b22c5597f/2518b226-89a5-4679-9675-b33ba905b371/goex-favicon.png",Je="goex-favicon.png",Qe=46570,Ze="image/png",et="2026-06-28T10:55:46Z",tt={version:Ye,asset_id:He,project_id:Ve,url:We,r2_key:Ke,original_filename:Je,size:Qe,content_type:Ze,created_at:et},E=500,ue=v=>{const c=new Date,O=`${c.getUTCFullYear()}-${String(c.getUTCMonth()+1).padStart(2,"0")}-${String(c.getUTCDate()).padStart(2,"0")}`;return`brandable-gen-count:${v}:${O}`},n={bg:"#FAF9F5",surface:"#FFFFFF",ink:"#1A1A1A",inkMuted:"#6B6B68",accent:"#2563EB",border:"#E8E5DD"},at=10,st=500,he=v=>{if(typeof crypto<"u"&&crypto.getRandomValues){const c=new Uint32Array(1);return crypto.getRandomValues(c),c[0]%v}return Math.floor(Math.random()*v)},it=()=>{const v=Ge(),[c,O]=r.useState(null),[,xe]=r.useState(!1),{isPro:u,loading:ge}=Me(c),[B,pe]=r.useState([]),[X,be]=r.useState([]),[z,ee]=r.useState(!0),[q,te]=r.useState(!1),[Y,ye]=r.useState(500),[b,we]=r.useState([]),[y,je]=r.useState(null),[C,ae]=r.useState("asc"),[T,ke]=r.useState(!1),[Ne,ve]=r.useState(()=>new Set),[$,D]=r.useState(0),[Ce,S]=r.useState(!1),[A,L]=r.useState("guest"),[F,H]=r.useState({}),[se,V]=r.useState(0),[R,Se]=r.useState(0),[ne,re]=r.useState(!1);r.useEffect(()=>{let t=!0;U.auth.getSession().then(({data:{session:a}})=>{t&&(O((a==null?void 0:a.user)??null),xe(!0))});const{data:{subscription:i}}=U.auth.onAuthStateChange((a,s)=>{O((s==null?void 0:s.user)??null)});return()=>{t=!1,i.unsubscribe()}},[]),r.useEffect(()=>{if(!c){D(0);return}try{const t=localStorage.getItem(ue(c.id));D(t&&parseInt(t,10)||0)}catch{D(0)}},[c==null?void 0:c.id]),r.useEffect(()=>{document.title="Brandable Generator - GoExpired.com"},[]),r.useEffect(()=>{let t=!1;return(async()=>{ee(!0);try{const a=async w=>{const d=[];for(let m=0;;m+=1e3){const{data:f,error:h}=await U.from("words").select("word").eq("kind",w).lte("length",6).neq("category","Two Letters").range(m,m+1e3-1);if(h)throw h;const x=f??[];for(const o of x)o.word&&d.push(o.word);if(x.length<1e3)break}return d},[s,g]=await Promise.all([a("prefix"),a("suffix")]);if(t)return;pe(s),be(g)}catch(a){console.error(a),N.error("Could not load fragments",{description:a.message})}finally{t||ee(!1)}})(),()=>{t=!0}},[]);const Ae=()=>{if(!c){L("guest"),S(!0);return}if(!u&&$>=E){L("limit"),S(!0);return}if(!B.length||!X.length){N.error("Fragment library not ready",{description:"Brandable fragments are still loading or unavailable."});return}te(!0);let t=Math.max(at,Math.min(st,Y||500)),i=1/0;u||(i=Math.max(0,E-$),t=Math.min(t,i));const a=new Set,s=new Set;let g=0;const w=t*40;for(;a.size<t&&g<w;){const l=B[he(B.length)],d=X[he(X.length)];if(g++,!l||!d||l.toLowerCase()===d.toLowerCase())continue;const m=`${l}${d}.com`.toLowerCase();m.length>24||m.length<7||Ne.has(m)||a.has(m)||(a.add(m),s.add(m))}setTimeout(()=>{if(we(Array.from(a)),ve(l=>{const d=new Set(l);return s.forEach(m=>d.add(m)),d}),!u&&c){const l=$+a.size;D(l);try{localStorage.setItem(ue(c.id),String(l))}catch{}l>=E&&N("Daily limit reached",{description:`You've used all ${E} brandables for today. Upgrade to GX PRO for unlimited.`})}te(!1),a.size<t&&N("Pool nearly exhausted",{description:`Only ${a.size} new unique names left after filtering session history. Reset history to start over.`})},50)},Fe=()=>{if(!c){L("guest"),S(!0),N("GX PRO feature",{description:"Live availability checking is included with GX PRO."});return}L("availability"),S(!0),N("GX PRO feature",{description:"Live availability checking is included with GX PRO."})};r.useEffect(()=>{if(!u||!b.length)return;let t=!1;return(async()=>{var w;const a=[...b],s={};a.forEach(l=>{s[l]={status:"checking"}}),H(s),Se(a.length),V(0),re(!0);const g=100;for(let l=0;l<a.length;l+=g){if(t)return;const d=a.slice(l,l+g);let m=0;for(;;){if(t)return;try{const{data:f,error:h}=await U.functions.invoke("check-brandable-dynadot",{body:{domains:d}});if(h){const o=h.context,p=(o==null?void 0:o.status)??((w=o==null?void 0:o.response)==null?void 0:w.status);let _=0;
11try{const j=o!=null&&o.body?typeof o.body=="string"?JSON.parse(o.body):o.body:null;_=(j==null?void 0:j.retryAfterMs)??0}catch{}if(p===429&&m<4){m++,await new Promise(j=>setTimeout(j,Math.max(1e3,_||5e3)));continue}throw h}const x=(f==null?void 0:f.results)??[];if(t)return;H(o=>{var j;const p={...o},_=new Set;for(const k of x)_.add(k.domain),p[k.domain]={status:k.available?"available":"taken",price:k.price};for(const k of d)!_.has(k)&&((j=p[k])==null?void 0:j.status)==="checking"&&(p[k]={status:"error"});return p}),V(o=>o+d.length);break}catch(f){if(console.error("availability check failed",f),t)return;H(h=>{var o;const x={...h};for(const p of d)((o=x[p])==null?void 0:o.status)==="checking"&&(x[p]={status:"error"});return x}),V(h=>h+d.length);break}}await new Promise(f=>setTimeout(f,300))}t||re(!1)})(),()=>{t=!0}},[b,u]);const W=u&&R>0&&se>=R&&!ne,P=r.useMemo(()=>{let t=[...b];if(T&&W&&(t=t.filter(i=>{var a;return((a=F[i])==null?void 0:a.status)==="available"})),y==="domain")t.sort((i,a)=>{const s=i.localeCompare(a);return C==="asc"?s:-s});else if(y==="length")t.sort((i,a)=>{const s=i.length-a.length;return C==="asc"?s:-s});else if(y==="availability"){const i=a=>a==="available"?0:a==="checking"?1:a==="taken"?2:3;t.sort((a,s)=>{var d,m,f,h;const g=i((d=F[a])==null?void 0:d.status),w=i((m=F[s])==null?void 0:m.status);let l=g-w;if(l===0){const x=((f=F[a])==null?void 0:f.price)??Number.POSITIVE_INFINITY,o=((h=F[s])==null?void 0:h.price)??Number.POSITIVE_INFINITY;l=x-o}return l===0&&(l=a.localeCompare(s)),C==="asc"?l:-l})}return t},[b,y,C,F,T,W]),le=async(t,i="Copied")=>{try{await navigator.clipboard.writeText(t),N(i,{description:t.length>60?`${t.slice(0,60)}â¦`:t})}catch{N.error("Copy failed")}},Ee=()=>{P.length&&le(P.join(` 12`),`Copied ${P.length} domains`)},K=t=>{y===t?ae(i=>i==="asc"?"desc":"asc"):(je(t),ae("asc"))};return e.jsxs("div",{style:{backgroundColor:n.bg,color:n.ink,fontFamily:"'Inter', system-ui, sans-serif"},className:"min-h-screen",children:[e.jsx(Te,{}),e.jsxs("main",{children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 md:px-8 pt-16 md:pt-24 pb-20",children:[e.jsxs("div",{className:"max-w-3xl mb-10",children:[e.jsx("h1",{className:"text-5xl md:text-6xl leading-[1.05] tracking-tight mb-5",style:{fontFamily:"'Cormorant', serif",fontWeight:600},children:"Brandable Generator."}),e.jsx("p",{className:"text-lg md:text-xl leading-relaxed",style:{color:n.inkMuted,fontFamily:"'Cormorant', serif",fontWeight:500},children:"Instantly generate short, pronounceable brandable .com names - built from a curated library of premium fragments. Designed to surface names that fit marketplaces like Atom.com, BrandBucket, and similar curated brand directories."})]}),e.jsxs("div",{className:"p-6 md:p-8",style:{backgroundColor:n.surface,border:`1px solid ${n.border}`,borderRadius:"20px"},children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4 mb-6",children:[e.jsx(I,{onClick:Ae,disabled:q||z,className:"h-12 px-6 text-base font-medium text-white",style:{backgroundColor:n.accent},children:q?"Generating...":z?"Loading library...":"Generate brandables"}),e.jsx("div",{className:"flex items-center gap-2",children:[100,250,500].map(t=>e.jsx("button",{onClick:()=>ye(t),disabled:q,className:`h-10 px-4 rounded-md text-sm font-medium border transition-colors ${Y===t?"text-white border-transparent":"bg-white hover:bg-gray-50"}`,style:Y===t?{backgroundColor:n.accent,borderColor:n.accent}:{borderColor:n.border,color:n.ink},children:t},t))}),e.jsx("div",{className:"flex items-center gap-3 sm:ml-auto",children:c&&!u&&!ge&&e.jsxs("span",{className:"text-xs",style:{color:n.inkMuted},children:[Math.max(0,E-$).toLocaleString()," / ",E," left today"]})})]}),b.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-end gap-2 mb-4",children:[e.jsxs("span",{className:"text-sm",style:{color:n.inkMuted},children:["Showing ",P.length," of ",b.length]}),u&&R>0&&ne&&e.jsxs("span",{className:"text-sm inline-flex items-center gap-1.5",style:{color:n.inkMuted},children:[e.jsx(oe,{className:"w-3.5 h-3.5 animate-spin"}),"Checking availability⦠",se," / ",R]}),u&&R>0&&e.jsx(I,{variant:T?"default":"outline",size:"sm",onClick:()=>ke(t=>!t),disabled:!W,style:T?{backgroundColor:n.accent,color:"white"}:void 0,children:T?"Show all":"Show available only"}),e.jsxs(I,{variant:"outline",size:"sm",onClick:Ee,children:[e.jsx(ie,{className:"w-3.5 h-3.5 mr-1.5"}),"Copy all"]})]}),e.jsx("div",{className:"rounded-lg overflow-hidden",style:{border:`1px solid ${n.border}`},children:e.jsxs(Xe,{children:[e.jsx(ze,{children:e.jsxs(de,{children:[e.jsx(G,{className:"w-[50px]",children:"#"}),e.jsx(G,{className:"cursor-pointer select-none",onClick:()=>K("domain"),children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["Domain",y==="domain"?C==="asc"?e.jsx(Z,{className:"w-3 h-3"}):e.jsx(Q,{className:"w-3 h-3"}):e.jsx(J,{className:"w-3 h-3 opacity-40"})]})}),e.jsx(G,{className:"w-[90px] text-center cursor-pointer select-none",onClick:()=>K("length"),children:e.jsxs("span",{className:"inline-flex items-center gap-1 justify-center w-full",children:["Length",y==="length"?C==="asc"?e.jsx(Z,{className:"w-3 h-3"}):e.jsx(Q,{className:"w-3 h-3"}):e.jsx(J,{className:"w-3 h-3 opacity-40"})]})}),e.jsx(G,{className:"w-[120px] text-center",children:"Appraise"}),e.jsx(G,{className:`w-[200px] text-center select-none ${u?"curs
12or-pointer":""}`,onClick:u?()=>K("availability"):void 0,children:e.jsxs("span",{className:"inline-flex items-center gap-1.5 justify-center w-full",children:["Availability",u?y==="availability"?C==="asc"?e.jsx(Z,{className:"w-3 h-3"}):e.jsx(Q,{className:"w-3 h-3"}):e.jsx(J,{className:"w-3 h-3 opacity-40"}):e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold tracking-wide",style:{backgroundColor:"#EEF2FF",color:n.accent},children:[e.jsx(me,{className:"w-2.5 h-2.5"}),"PRO"]})]})}),e.jsx(G,{className:"w-[170px] text-right",children:"Buy"})]})}),e.jsx(qe,{children:P.map((t,i)=>{const a=t.replace(/\.com$/i,""),s=F[t];return e.jsxs(de,{children:[e.jsx(M,{className:"text-muted-foreground",children:i+1}),e.jsx(M,{className:"font-medium",children:e.jsxs("span",{className:"inline-flex items-center gap-2",children:[t,e.jsx("button",{onClick:()=>le(t),className:"inline-flex items-center justify-center w-6 h-6 rounded-md hover:bg-muted transition-colors","aria-label":`Copy ${t}`,children:e.jsx(ie,{className:"w-3.5 h-3.5 text-muted-foreground"})})]})}),e.jsx(M,{className:"text-center tabular-nums",children:a.length}),e.jsx(M,{className:"text-center",children:e.jsxs("a",{href:`/appraise-your-domain?domain=${encodeURIComponent(t)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm hover:underline",style:{color:n.accent},children:["Appraise ",e.jsx(ce,{className:"w-3 h-3 ml-1"})]})}),e.jsx(M,{className:"text-center",children:u?(s==null?void 0:s.status)==="available"?e.jsxs("a",{href:`https://www.dynadot.com/domain/search?domain=${t}&rscreg=domaindingo`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm font-medium hover:underline",style:{color:"#15803d"},children:[e.jsx(Re,{className:"w-3.5 h-3.5"}),"Available",typeof s.price=="number"&&e.jsxs("span",{style:{color:n.inkMuted},children:["· $",s.price.toFixed(2)]})]}):(s==null?void 0:s.status)==="taken"?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm",style:{color:n.inkMuted},children:[e.jsx(Pe,{className:"w-3.5 h-3.5"}),"Taken"]}):(s==null?void 0:s.status)==="error"?e.jsx("span",{className:"text-sm",style:{color:n.inkMuted},children:"â"}):e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm",style:{color:n.inkMuted},children:[e.jsx(oe,{className:"w-3.5 h-3.5 animate-spin"}),"Checkingâ¦"]}):e.jsxs("button",{type:"button",onClick:Fe,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium transition-colors hover:opacity-80",style:{backgroundColor:"#EEF2FF",color:n.accent},children:[e.jsx(me,{className:"w-3 h-3"}),"GX PRO"]})}),e.jsx(M,{className:"text-right",children:u?(s==null?void 0:s.status)==="available"?e.jsx("a",{href:`https://www.dynadot.com/domain/search?domain=${t}&rscreg=domaindingo`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-3 py-1.5 rounded-md text-xs font-semibold text-white hover:opacity-90 transition-opacity",style:{backgroundColor:n.accent},children:"Buy now"}):e.jsx("span",{className:"text-sm",style:{color:n.inkMuted},children:"â"}):e.jsxs("a",{href:`https://www.dynadot.com/domain/search?domain=${t}&rscreg=domaindingo`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm hover:underline",style:{color:n.accent},children:["Search ",e.jsx(ce,{className:"w-3 h-3 ml-1"})]})})]},t)})})]})})]}),!b.length&&!z&&e.jsxs("div",{className:"text-center py-12 rounded-lg",style:{border:`1px dashed ${n.border}`,color:n.inkMuted},children:[e.jsx("img",{src:tt.url,alt:"",className:"w-6 h-6 mx-auto mb-2"}),e.jsx("p",{className:"text-sm",children:'Click "Generate brandables" to create a fresh batch of names.'})]})]})]}),e.jsx(_e,{open:Ce,onOpenChange:S,children:e.jsxs(Ie,{className:"max-w-md",children:[e.jsxs(Oe,{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium mb-3 self-start",style:{backgroundColor:"#EEF2FF",color:n.accent},children:[e.jsx($e,{className:"w-3.5 h-3.5"}),A==="guest"?"Sign up required":A==="availability"?"GX PRO feature":"Daily limit reached"]}),e.jsx(De,{className:"text-3xl leading-tight tracking-tight",style:{fontFamily:"Cormorant, serif",fontWeight:600},children:A==="guest"?"Create a free account to generate brandables.":A==="availability"?"Live availability checks are a GX PRO feature.":"You've hit today's free limit."}),e.jsx(Le,{className:"text-base pt-2",style:{color:n.inkMuted},children:A==="guest"?"Sign up for a free GoExpired account to generate up to 500 brandable .com names per day - or go GX PRO for unlimited generation.":A==="availability"?"Upgrade to GX PRO to automatically check the availability of every generated brandable for live registration and price - up to 500 names at a time.":`Free accounts can generate ${E} brandable names every 24 hours. Upgrade to GX PRO for unlimited brandable generation and the full suite of pro tools.`})]}),e.jsxs(Ue,{className:"flex-col sm:flex-row gap-2 sm:gap-2",children:[A==="guest"&&e.jsx(I,{variant:"outline",onClick:()=>{S(!1),v("/auth")},className:"w-full sm:w-auto",children:"Sign up free"}),e.jsx(I,{onClick:()=>{S(!1),v("/gxpro")},className:"w-full sm:w-auto text-white",style:{backgroundColor:n.accent},children:"Upgrade to GX PRO"})]})]})})]}),e.jsx(Be,{})]})};export{it 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.