PageSourceSearch

https://fanflowy.co/assets/ArtistPages-Da8ZY2yV.js

js fanflowy.co collected 2026-10-07 19:00:17 UTC 45,566 bytes, 8 lines download raw bytes

1import{j as e,ah as he,bO as Ne,b2 as je,b as ve,bP as we,C as Ce,bQ as B,bR as Se,bS as ke}from"./dashboard-CqpNaWIC.js";import{r as l}from"./react-vendor-BwQoNBTn.js";/* empty css              */import{C as xe}from"./email-campaigns-BICBzrKd.js";import"./ui-vendor-C9OEygMn.js";const V="#050509",G="#a855f7",Te=[{value:"#050509",label:"Midnight Black"},{value:"#0a0a0a",label:"Dark Gray"},{value:"#0d1117",label:"GitHub Dark"},{value:"#1a1a2e",label:"Deep Navy"},{value:"#16213e",label:"Dark Blue"},{value:"#1e1e1e",label:"VS Code Dark"}],Ae=[{value:"#a855f7",label:"Purple"},{value:"#6d60ff",label:"FanFlowy Purple"},{value:"#3b82f6",label:"Blue"},{value:"#22c55e",label:"Green"},{value:"#f97316",label:"Orange"},{value:"#ef4444",label:"Red"},{value:"#ec4899",label:"Pink"},{value:"#14b8a6",label:"Teal"}];function De({artistId:n,artistSlug:c,artistName:k,onArtistUpdate:v}){var E,U;const[r,w]=l.useState(null),[A,C]=l.useState(!0),[y,F]=l.useState(!1),[N,T]=l.useState(null),[S,o]=l.useState(!1),[i,j]=l.useState(V),[b,d]=l.useState(G),[f,D]=l.useState(null);l.useEffect(()=>{if(!n||!c)return;(async()=>{try{C(!0),T(null);const x=await he(n);D(x),x.settings&&(j(x.settings.siteBackgroundColor||V),d(x.settings.siteAccentColor||G));try{const s=await Ne(c);s&&w(s)}catch{}}catch(x){console.error("Failed to fetch theme data:",x),T(x instanceof Error?x.message:"Failed to load theme settings")}finally{C(!1)}})()},[n,c]);const P=async()=>{if(n)try{F(!0),T(null),o(!1);const x=await je(n,{siteBackgroundColor:i,siteAccentColor:b}),s=f?{...f,settings:{...f.settings,...x.settings}}:null;D(s),s&&v&&v(s),o(!0),setTimeout(()=>o(!1),3e3)}catch(a){console.error("Failed to save theme settings:",a),T(a instanceof Error?a.message:"Failed to save theme settings")}finally{F(!1)}},u=()=>{j(V),d(G)},L=i!==(((E=f==null?void 0:f.settings)==null?void 0:E.siteBackgroundColor)||V)||b!==(((U=f==null?void 0:f.settings)==null?void 0:U.siteAccentColor)||G),R=c?`https://${c.toLowerCase()}.fanflowy.co`:null;return A?null:e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-6 shadow-lg",children:[e.jsxs("div",{className:"flex items-start justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"text-3xl",children:"🎨"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-white",children:"Site Theme"}),e.jsxs("p",{className:"text-sm text-gray-400",children:["Customize the colors for your public mini-site at"," ",c?e.jsx("a",{href:R||"#",target:"_blank",rel:"noopener noreferrer",className:"text-[#6d60ff] hover:underline",children:R}):e.jsx("span",{className:"text-gray-500",children:"your artist site"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[R&&e.jsx("a",{href:R,target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 text-sm font-medium text-white bg-white/10 border border-white/10 rounded-lg hover:bg-white/20 transition-colors",children:"Preview Site"}),e.jsx("button",{onClick:P,disabled:y||!L,className:"px-6 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:y?"Saving...":"Save Changes"})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-3",children:"Backgroun
1d Color"}),e.jsx("div",{className:"flex flex-wrap gap-3 mb-3",children:Te.map(a=>e.jsxs("button",{onClick:()=>j(a.value),className:`flex items-center gap-2 px-3 py-2 rounded-lg border transition-all ${i===a.value?"border-[#6d60ff] bg-[#6d60ff]/10":"border-white/10 hover:border-white/20 bg-white/5"}`,children:[e.jsx("div",{className:"w-5 h-5 rounded-full border border-white/20",style:{backgroundColor:a.value}}),e.jsx("span",{className:"text-sm text-gray-300",children:a.label})]},a.value))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"color",value:i,onChange:a=>j(a.target.value),className:"w-12 h-10 rounded-lg border border-white/10 cursor-pointer",style:{backgroundColor:i}}),e.jsx("input",{type:"text",value:i,onChange:a=>j(a.target.value),placeholder:"#050509",className:"flex-1 max-w-[140px] px-4 py-2 bg-[#0a0a0a] border border-white/10 rounded-lg text-white font-mono text-sm focus:outline-none focus:ring-2 focus:ring-[#6d60ff]"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-3",children:"Accent Color (Buttons & CTAs)"}),e.jsx("div",{className:"flex flex-wrap gap-3 mb-3",children:Ae.map(a=>e.jsxs("button",{onClick:()=>d(a.value),className:`flex items-center gap-2 px-3 py-2 rounded-lg border transition-all ${b===a.value?"border-[#6d60ff] bg-[#6d60ff]/10":"border-white/10 hover:border-white/20 bg-white/5"}`,children:[e.jsx("div",{className:"w-5 h-5 rounded-full border border-white/20",style:{backgroundColor:a.value}}),e.jsx("span",{className:"text-sm text-gray-300",children:a.label})]},a.value))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"color",value:b,onChange:a=>d(a.target.value),className:"w-12 h-10 rounded-lg border border-white/10 cursor-pointer",style:{backgroundColor:b}}),e.jsx("input",{type:"text",value:b,onChange:a=>d(a.target.value),placeholder:"#a855f7",className:"flex-1 max-w-[140px] px-4 py-2 bg-[#0a0a0a] border border-white/10 rounded-lg text-white font-mono text-sm focus:outline-none focus:ring-2 focus:ring-[#6d60ff]"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-3",children:"Preview"}),e.jsx("div",{className:"rounded-xl overflow-hidden border",style:{backgroundColor:i,borderColor:`color-mix(in srgb, ${i} 85%, white)`},children:e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"text-center",children:[r!=null&&r.artist.logoUrl?e.jsx("div",{className:"w-16 h-16 mx-auto rounded-full border-2 mb-2 overflow-hidden flex items-center justify-center",style:{borderColor:b},children:e.jsx("img",{src:r.artist.logoUrl,alt:r.artist.name,className:"w-full h-full object-cover"})}):e.jsx("div",{className:"w-16 h-16 mx-auto rounded-full border-2 mb-2 flex items-center justify-center text-2xl",style:{borderColor:b,backgroundColor:`color-mix(in srgb, ${i} 90%, white)`},children:"🎤"}),e.jsx("h3",{className:"text-lg font-bold text-white mb-1",style:{fontFamily:'"Bebas Neue", sans-serif'},children:(r==null?void 0:r.artist.name)||k||"Artist Name"}),(r==null?void 0:r.socialLinks)&&Object.values(r.socialLinks).some(a=>a)&&e.jsxs("div",{className:"flex justify-center gap-2 mb-3",children:[r.socialLinks.instagram&&e.jsx("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-xs",style:{backgroundColor:`color-mix(in srgb, ${i} 85%, white)`,borderColor:`color-mix(in srgb, ${i} 75%, white)`,borderWidth:"1px",borderStyle:"solid"},children:"📷"}),r.socialLinks.tiktok&&e.jsx("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-xs",style:{backgroundColor:`color-mix(in srgb, ${i} 85%, white)`,borderColor:`color-mix(in srgb, ${i} 75%, white)`,borderWidth:"1px",borderStyle:"solid"},children:"🎵"}),r.socialLinks.spotify&&e.jsx("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-xs",style:{backgroundColor:`color-mix(in srgb, ${i} 85%, white)`,borderColor:`color-mix(in srgb, ${i} 75%, white)`,borderWidth:"1px",borderStyle:"solid"},children:"🟢"}),!r.socialLinks.instagram&&!r.socialLinks.tiktok&&!r.socialLinks.spotify&&e.jsx(e.Fragment,{children:["📘","📷","🎵"].map((a,x)=>e.jsx("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-xs",style:{backgroundColor:`color-mix(in srgb, ${i} 85%, white)`},children:a},x))})]}),e.jsx("button",{className:"px-5 py-2 rounded-full text-white text-sm font-medium",style:{backgroundColor:b,fontFamily:'"Bebas Neue", sans-serif'},children:"Join the FanList"})]}),r!=null&&r.latestRelease?e.jsxs("div",{className:"rounded-xl p-3 flex items-center gap-3",style:{backgroundColor:`color-mix(in srgb, ${i} 92%, white)`,borderColor:`color-mix(in srgb, ${i} 85%, white)`,borderWidth:"1px",borderStyle:"solid"},children:[r.latestRelease.artworkUrl?e.jsx("img",{src:r.latestRelease.artworkUrl,alt:r.latestRelease.title,className:"w-14 h-14 roun
1ded-lg flex-shrink-0 object-cover"}):e.jsx("div",{className:"w-14 h-14 rounded-lg flex items-center justify-center text-2xl flex-shrink-0",style:{backgroundColor:`color-mix(in srgb, ${b} 20%, ${i})`},children:"💿"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-white/50 uppercase tracking-wide",style:{fontFamily:'"Bebas Neue", sans-serif'},children:"Latest Release"}),e.jsx("p",{className:"text-sm font-semibold text-white truncate",style:{fontFamily:'"Bebas Neue", sans-serif'},children:r.latestRelease.title}),e.jsxs("div",{className:"flex gap-1 mt-1",children:[r.latestRelease.spotifyUrl&&e.jsx("span",{className:"px-2 py-0.5 rounded-full text-[10px]",style:{backgroundColor:`color-mix(in srgb, ${i} 80%, white)`},children:"🟢"}),r.latestRelease.appleMusicUrl&&e.jsx("span",{className:"px-2 py-0.5 rounded-full text-[10px]",style:{backgroundColor:`color-mix(in srgb, ${i} 80%, white)`},children:"🍎"}),r.latestRelease.youtubeUrl&&e.jsx("span",{className:"px-2 py-0.5 rounded-full text-[10px]",style:{backgroundColor:`color-mix(in srgb, ${i} 80%, white)`},children:"▶️"})]})]})]}):e.jsxs("div",{className:"rounded-xl p-3 flex items-center gap-3",style:{backgroundColor:`color-mix(in srgb, ${i} 92%, white)`,borderColor:`color-mix(in srgb, ${i} 85%, white)`,borderWidth:"1px",borderStyle:"solid"},children:[e.jsx("div",{className:"w-14 h-14 rounded-lg flex items-center justify-center text-2xl flex-shrink-0",style:{backgroundColor:`color-mix(in srgb, ${b} 20%, ${i})`},children:"💿"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-white/50 uppercase tracking-wide",children:"Latest Release"}),e.jsx("p",{className:"text-sm font-semibold text-white truncate",children:"New Single"}),e.jsx("div",{className:"flex gap-1 mt-1",children:["🟢","🍎","▶️"].map((a,x)=>e.jsx("span",{className:"px-2 py-0.5 rounded-full text-[10px]",style:{backgroundColor:`color-mix(in srgb, ${i} 80%, white)`},children:a},x))})]})]}),(r==null?void 0:r.latestRelease)&&e.jsx("div",{className:"space-y-2",children:[r.latestRelease.spotifyUrl&&"Listen on Spotify",r.latestRelease.appleMusicUrl&&"Apple Music",r.latestRelease.youtubeUrl&&"YouTube"].filter(Boolean).slice(0,3).map((a,x)=>e.jsxs("div",{className:"rounded-xl px-4 py-2.5 flex items-center justify-between text-sm text-white/90",style:{backgroundColor:`color-mix(in srgb, ${i} 92%, white)`,borderColor:`color-mix(in srgb, ${i} 85%, white)`,borderWidth:"1px",borderStyle:"solid",fontFamily:'"Bebas Neue", sans-serif'},children:[e.jsx("span",{children:a}),e.jsx("span",{className:"text-white/40",children:"→"})]},x))}),e.jsx("div",{className:"text-center pt-2 border-t",style:{borderColor:`color-mix(in srgb, ${i} 85%, white)`},children:e.jsxs("p",{className:"text-[10px] text-white/30",children:["Powered by ",e.jsx("span",{style:{color:b},children:"FanFlowy"})]})})]})})]}),N&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-3",children:e.jsx("p",{className:"text-red-300 text-sm",children:N})}),S&&e.jsx("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-3",children:e.jsx("p",{className:"text-green-300 text-sm",children:"Theme settings saved successfully!"})}),e.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-white/5",children:[e.jsx("button",{onClick:u,disabled:y,className:"px-6 py-2 bg-white/10 text-white rounded-lg hover:bg-white/20 transition-colors text-sm font-medium border border-white/10 disabled:opacity-50",children:"Reset to Defaults"}),L&&e.jsx("span",{className:"text-sm text-yellow-400/80 ml-auto",children:"Unsaved changes"})]})]})]})})}function Re({page:n,isOpen:c,onClose:k,onSave:v,isSaving:r,success:w}){const[A,C]=l.useState(""),[y,F]=l.useState(""),[N,T]=l.useState(""),[S,o]=l.useState(""),[i,j]=l.useState(""),[b,d]=l.useState(""),[f,D]=l.useState(""),P=async()=>{await v({trackingCode:A,seoTitle:y,seoDescription:N,seoKeywords:S,ogTitle:i,ogDescription:b,ogImage:f})};return c?e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-[#161616] rounded-2xl border border-white/10 max-w-4xl w-full max-h-[90vh] overflow-y-auto shadow-2xl",children:[e.jsxs("div",{className:"sticky top-0 bg-[#161616] border-b border-white/10 p-6 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-3xl",children:n.icon}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-white",children:"SEO & Tracking"}),e.jsx("p",{className:"text-sm text-gray-400",children:n.label})]})]}),e.jsx("button",{onClick:k,className:"px-4 py-2 text-gray-400 hover:text-white transition-colors",children:"✕"})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"bg-[#0a0a0a] border border-white/10 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Page URL"}),e.jsx("code",{className:"text-sm text-gray-300 font-mono",children:n.url})]}),e.jsxs("div",{className:"bg-[#0a0a0a] rounded-xl border border-white/5 p-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:"Tracking Pixels & Scripts"}),e.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Add tracking code that will be added to the <head> section of this page."}),e.jsx("textarea",{value:A,onChange:u=>C(u.target.value),placeholder:"<!-- Example: Google Analytics, Facebook Pixel, etc. -->",rows:8,className:"w-full px-4 py-3 bg-[#000000] border border-white/10 rounded-lg text-sm text-gray-300 font-mono focus:outline-none focus:ring-2 focus:ring-[#6d60ff] resize-y"}),e.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"💡 Common tracking pixels: Google Analytics (gtag.js), Facebook Pixel, TikTok Pixel"})]}),e.jsxs("div",{className:"bg-[#0a0a0a] rounded-xl border border-white/5 p-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:"SEO Settings"}),e.jsx("p",{className:"text-sm text-gray-400 mb-6",children:"Optimize how search engines and social media platforms display your page."}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:["Page Title ",e.jsx("span",{className:"text-gray-500",children:"(meta title)"})]}),e.jsx("input",{type:"text",value:y,onChange:u=>F(u.target.value),placeholder:"e.g., Artist Name - Official Fan Hub",maxLength:60,className:"w-full px-4 py-2 bg-[#000000] border border-white/10 rounded-lg text-sm text-white focus:outline-none focus:ring-2 focus:ring-[#6d60ff]"}),e.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[y.length,"/60 characters"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Meta Description"}),e.jsx("textarea",{value:N,onChange:u=>T(u.target.value),placeholder:"e.g., Join the official fan community...",maxLength:160,rows:3,className:"w-full px-4 py-2 bg-[#000000] border border-white/10 rounded-lg text-sm text-white focus:outline-none focus:ring-2 focus:ring-[#6d60ff] resize-y"}),e.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[N.length,"/160 characters"]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:["Keywords ",e.jsx("span",{className:"text-gray-500",children:"(comma-separated)"})]}),e.jsx("input",{type:"text",value:S,onChange:u=>o(u.target.value),placeholder:"e.g., music, artist, fan community",className:"w-full px-4 py-2 bg-[#000000] border border-white/10 rounded-lg text-sm text-white focus:outline-none focus:ring-2 focus:ring-[#6d60ff]"})]}),e.jsxs("div",{className:"pt-4 border-t border-white/10 space-y-4",children:[e.jsx("h4",{className:"text-sm font-semibold text-white/90 uppercase tracking-wide",children:"Open Graph (Social Media)"}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"OG Title"}),e.jsx("input",{type:"text",value:i,onChange:u=>j(u.target.value),placeholder:"Leave empty to use meta title",className:"w-full px-4 py-2 bg-[#000000] border border-white/10 rounded-lg text-sm text-white focus:outline-none focus:ring-2 focus:ring-[#6d60ff]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"OG Description"}),e.jsx("textarea",{value:b,onChange:u=>d(u.target.value),placeholder:"Leave empty to use meta description",rows:3,className:"w-full px-4 py-2 bg-[#000000] border border-white/10 rounded-lg text-sm text-white focus:outline-none focus:ring-2 focus:ring-[#6d60ff] resize-y"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"OG Image URL"}),e.jsx("input",{type:"url",value:f,onChange:u=>D(u.target.value),placeholder:"https://example.com/image.jpg",className:"w-full px-4 py-2 bg-[#000000] border border-white/10 rounded-lg text-sm text-white focus:outline-none focus:ring-2 focus:ring-[#6d60ff]"}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Recommended: 1200x630px image"})]})]}),e.jsxs("div",{className:"pt-4 border-t border-white/10",children:[e.jsx("h4",{className:"text-sm font-semibold text-white/90 uppercase tracking-wide mb-3",children:"Search Preview"}),e.jsxs("div",{className:"bg-white rounded-lg p-4 space-y-2",children:[e.jsx("div",{className:"text-blue-600 text-sm",children:n.url}),e.jsx("div",{className:"text-xl text-blue-800 font-medium leading-tight",children:y||n.label}),e.jsx("div",{className:"text-sm text-gray-600 leading-snug",children:N||n.description||"Page description..."})]})]})]})]}),w&&e.jsx("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-3",children:e.jsx("p",{className:"text-green-300 text-sm",children:"Settings saved successfully!"})}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-white/10",children:[e.jsx("button",{onClick:k,className:"px-6 py-2 bg-white/10 text-white rounded-lg hover:bg-white/20 transition-colors text-sm font-medium",children:"Cancel"}),e.jsx("button",{onClick:P,disabled:r,className:"px-6 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:r?"Saving...":"Save Changes"})]})]})]})}):null}function Me(){var Z,I,ee,se,te,re,ae,le,oe,ie,ne,de,ce,me;const{artistId:n,artistSlug:c,summary:k}=ve(),[v,r]=l.useState(null),[w,A]=l.useState(null),[C,y]=l.useState(null),[F,N]=l.useState(!1),[T,S]=l.useState(!1),[o,i]=l.useState(null),[j,b]=l.useState(null),[d,f]=l.useState(""),[D,P]=l.useState(""),[u,L]=l.useState(null),[M,R]=l.useState(!1),[E,U]=l.useState(!1),[a,x]=l.useState(!1),[s,$]=l.useState(null),[ue,_]=l.useState(!1),[ge,Q]=l.useState(!1),[W,Y]=l.useState(null);l.useEffect(()=>{if(!n)return;(async()=>{try{const m=await he(n);A(m)}catch(m){console.error("Failed to fetch artist:",m)}})()},[n]),l.useEffect(()=>{c&&(b(null),we(c).then(t=>{i(t)}
1).catch(t=>{console.error("Failed to fetch link-in-bio data:",t),b("Failed to load campaign links")}))},[c]),l.useEffect(()=>{if(!n)return;(async()=>{try{const m=await Ce(n);if(m.domain){const g=m.domain.customDomain||"";if(f(g),P(g),L(m.domain.status),g)try{const p=await B(n);$(p),x(!0)}catch(p){console.error("Failed to fetch domain instructions on load:",p)}}}catch(m){console.error("Failed to fetch domain info:",m)}})()},[n]);const h=d&&d.trim()?`https://${d.trim()}`:c?`https://${c}.fanflowy.co`:"",be=c&&h?[{id:"website",slug:"website",label:"Website",url:`${h}`,description:"Your main fan hub site.",icon:"🌐"},{id:"vip-list",slug:"vip-list",label:"VIP Fan List",url:`${h}/vip-list`,description:"Where fans join your VIP email & text list.",icon:"⭐"},{id:"link-in-bio",slug:"link-in-bio",label:"Link in Bio",url:`${h}/link-in-bio`,description:"Mobile-optimized hub for all your important links.",icon:"🔗"},{id:"latest-release",slug:"latest-release",label:"Latest Release",url:`${h}/latest-release`,description:"Smart streaming page for your current single or album.",icon:"🎵"}]:[],H=c&&h?[{platform:"Instagram",url:`${h}/ig`},{platform:"TikTok",url:`${h}/tt`},{platform:"YouTube",url:`${h}/yt`},{platform:"X (Twitter)",url:`${h}/x`},{platform:"Facebook",url:`${h}/fb`},{platform:"Audius",url:`${h}/au`}]:[],O=async t=>{try{await navigator.clipboard.writeText(t),r(t),setTimeout(()=>r(null),2e3)}catch(m){console.error("Failed to copy:",m)}},fe=t=>{y(t)},K=()=>{y(null),S(!1)},pe=async t=>{if(!(!C||!n)){N(!0),S(!1);try{await new Promise(m=>setTimeout(m,500)),S(!0),setTimeout(()=>{S(!1),K()},2e3)}catch(m){console.error("Failed to save settings:",m)}finally{N(!1)}}},q=async()=>{if(!n)return;const t=d.trim()||null;if(t&&t!==D){Y(t),_(!0);return}await X(t)},X=async t=>{var m;if(n){R(!0);try{const g=await ke(n,t);if(g.domain){const p=g.domain.customDomain||"";f(p),P(p),L(g.domain.status)}if(t&&((m=g.domain)!=null&&m.customDomain)){x(!0);try{const p=await B(n);$(p)}catch(p){console.error("Failed to fetch domain instructions:",p);const z=g.domain.customDomain&&g.domain.customDomain.split(".").length===2;$({customDomain:g.domain.customDomain,cnameTarget:null,aRecordIp:z?"216.198.79.1":null,recordType:z?"A":"CNAME",instructions:["Log into your domain registrar's website","Navigate to DNS settings or DNS management",z?"Add an A record pointing to our IP address (216.198.79.1)":"Add a CNAME record pointing to our servers",'Click "Show DNS Instructions" to reload the exact DNS record values',"Contact support if you need immediate assistance"]})}}else x(!1),$(null)}catch(g){console.error("Failed to save custom domain:",g);const p=g instanceof Error?g.message:"Failed to save custom domain. Please try again.";alert(p)}finally{R(!1),_(!1),Y(null)}}},J=async()=>{if(!n)return;if(a){x(!1);return}const t=d.trim();if(t&&t!==D){Q(!0);return}try{const g=await B(n);$(g),x(!0)}catch(g){if(console.error("Failed to fetch domain instructions:",g),d){const p=d&&d.split(".").length===2;$({customDomain:d,cnameTarget:null,aRecordIp:p?"216.198.79.1":null,recordType:p?"A":"CNAME",instructions:["Log into your domain registrar's website","Navigate to DNS settings or DNS management",p?"Add an A record pointing to Vercel's IP address (216.198.79.1)":"Add a CNAME record pointing to our servers","The exact DNS record values will be displayed once the domain is properly configured","Contact support if you need immediate assistance"]}),x(!0)}else alert("Please enter and save a custom domain first, then try again.")}},ye=async()=>{if(n){U(!0);try{const t=await Se(n);t.domain&&(L(t.domain.status),t.domain.status==="ACTIVE"?alert("Domain is now active! Your custom domain is connected and working."):alert("Domain is still pending. Please make sure DNS is configured correctly and try again in a few minutes."))}catch(t){console.error("Failed to verify domain:",t),alert("Failed to verify domain status. Please try again.")}finally{U(!1)}}};return e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-white mb-3",children:"FanTools"}),e.jsx("p",{className:"text-gray-400 text-lg",children:"Manage your FanFlowy pages and share your artist links with fans."})]}),!c&&e.jsx("div",{className:"bg-[#161616] border border-yellow-500/30 rounded-2xl p-6 mb-8",children:e.jsx("p",{className:"text-yellow-300",children:"Set your artist slug in Settings to enable FanPages and pretty links."})}),e.jsxs("div",{className:"mb-12",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-2xl font-semibold text-white mb-2",children:"Live Pages"}),e.jsx("p",{className:"text-gray-400",children:"These are the core FanFlowy pages for your artist. Share these links with your fans."})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[be.map(t=>e.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-2xl p-6 shadow-lg hover:border-[#6d60ff]/30 transition-all",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsx("div",{className:"text-3xl",children:t.icon}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-green-500/10 border border-green-500/30 rounded-full",children:[e.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),e.jsx("span",{className:"text-xs font-medium text-green-400",children:"Live"})]})]}),e.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:t.label}),e.jsx("p",{className:"text-sm text-gray-400 mb-4",children:t.description}),e.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-3 mb-4",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"URL"}),e.jsx("p",{className:"text-sm text-gray-300 font-mono truncate",children:t.url})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>O(t.url),className:"flex-1 px-4 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors text-sm font-medium",children:v===t.url?"✓ Copied!":"Copy URL"}),e.jsx("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 bg-[#0a0a0a] border border-white/10 text-gray-300 rounded-lg hover:bg-[#161616] transition-colors text-sm font-medium",children:"Open →"})]}),e.jsxs("button",{onClick:()=>fe(t),className:"w-full px-4 py-2 bg-white/5 border border-white/10 text-gray-300 rounded-lg hover:bg-white/10 transition-colors text-sm font-medium flex items-center justify-center gap-2",children:[e.jsx("span",{children:"⚙️"}),"SEO & Tracking"]})]})]},t.label)),!c&&e.jsx("div",{className:"col-span-1 md:col-span-2 bg-[#161616] border border-white/5 rounded-2xl p-8 text-center",children:e.jsx("p",{className:"text-gray-500",children:"Configure your artist slug in Settings to see your live pages."})})]})]}),e.jsxs("div",{className:"mb-12",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-2xl font-semibold text-white mb-2",children:"Campaign Links"}),e.jsx("p",{className:"text-gray-400",children:"Use these links for pre-save and FanAds."})]}),c?e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-2xl p-6 shadow-lg hover:border-[#6d60ff]/30 transition-all",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsx("div",{className:"text-3xl",children:"💾"}),e.jsxs("div",{className:`inline-flex items-center gap-2 px-3 py-1.5 rounded-full border ${(Z=o==null?void 0:o.links)!=null&&Z.presave?"bg-green-500/10 border-green-500/30":"bg-yellow-500/10 border-yellow-500/30"}`,children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${(I=o==null?void 0:o.links)!=null&&I.presave?"bg-green-500":"bg-yellow-500"}`}),e.jsx("span",{className:`text-xs font-medium ${(ee=o==null?void 0:o.links)!=null&&ee.presave?"text-green-400":"text-yellow-300"}`,children:(se=o==null?void 0:o.links)!=null&&se.presave?"Ready":"Needs setup"})]})]}),e.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"Pre-save link"}),e.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"This is your presave link (pulled from your Link-in-bio settings)."}),e.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-3 mb-4",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"URL"}),e.jsx("p",{className:"text-sm text-gray-300 font-mono truncate",children:((te=o==null?void 0:o.links)==null?void 0:te.presave)||"Not set yet"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>{var t;return((t=o==null?void 0:o.links)==null?void 0:t.presave)&&O(o.links.presave)},disabled:!((re=o==null?void 0:o.links)!=null&&re.presave),className:"flex-1 px-4 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:v===((ae=o==null?void 0:o.links)==null?void 0:ae.presave)?"✓ Copied!":"Copy URL"}),(le=o==null?void 0:o.links)!=null&&le.presave?e.jsx("a",{href:o.links.presave,target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 bg-[#0a0a0a] border border-white/10 text-gray-300 rounded-lg hover:bg-[#161616] transition-colors text-sm font-medium",children:"Open →"}):e.jsx("button",{type:"button",disabled:!0,className:"px-4 py-2 bg-[#0a0a0a] border border-white/10 text-gray-500 rounded-lg text-sm font-medium cursor-not-allowed",children:"Set up →"})]}),j&&e.jsx("p",{className:"text-xs text-red-300 mt-3",children:j})]}),e.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-2xl p-6 shadow-lg hover:border-[#6d60ff]/30 transition-all",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsx("div",{className:"text-3xl",children:"🎧"}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-green-500/10 border border-green-500/30 rounded-full",children:[e.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),e.jsx("span",{className:"text-xs font-medium text-green-400",children:"Live"})]})]}),e.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"Listen Now"}),e.jsxs("p",{className:"text-sm text-gray-400 mb-4",children:["Spotify Conversion campaign page for FanAds. Path:"," ",e.jsx("span",{className:"font-mono",children:"/listen-now"})]}),e.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-3 mb-4",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"URL"}),e.jsx("p",{className:"text-sm text-gray-300 font-mono truncate",children:h?`${h}/listen-now`:"N/A"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>h&&O(`${h}/listen-now`),disabled:!h,className:"flex-1 px-4 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:h&&v===`${h}/listen-now`?"✓ Copied!":"Copy URL"}),h&&e.jsx("a",{href:`${h}/listen-now`,target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 bg-[#0a0a0a] border border-white/10 text-gray-300 rounded-lg hover:bg-[#161616] transition-colors text-sm font-medium",children:"Open →"})]})]})]}):e.jsx("div",{className:"bg-[#161616] border border-white/5 rounded-2xl p-8 text-center",children:e.jsx("p",{className:"text-gray-500",children:"Set your artist slug in Settings to generate campaign links."})})]}),e.jsxs("div",{className:"mb-12",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-2xl font-semibold text-white mb-2",children:"Qu
1ick Bio Links & QR Code"}),e.jsx("p",{className:"text-gray-400",children:"Use these short links in your social media bios. Print the QR code for fans to scan at shows."})]}),c?e.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[e.jsx("div",{className:"bg-[#161616] border border-white/5 rounded-2xl overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-white/5",children:[e.jsx("th",{className:"text-left px-6 py-4 text-sm font-semibold text-gray-400",children:"Platform"}),e.jsx("th",{className:"text-left px-6 py-4 text-sm font-semibold text-gray-400",children:"Pretty Link"}),e.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-gray-400",children:"Action"})]})}),e.jsx("tbody",{children:H.map((t,m)=>e.jsxs("tr",{className:`${m!==H.length-1?"border-b border-white/5":""} hover:bg-white/[0.02] transition-colors`,children:[e.jsx("td",{className:"px-6 py-4",children:e.jsx("span",{className:"text-sm text-white font-medium",children:t.platform})}),e.jsx("td",{className:"px-6 py-4",children:e.jsx("code",{className:"text-sm text-gray-300 font-mono",children:t.url})}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsx("button",{onClick:()=>O(t.url),className:"px-4 py-2 bg-[#0a0a0a] border border-white/10 text-gray-300 rounded-lg hover:bg-[#161616] transition-colors text-sm font-medium",children:v===t.url?"✓ Copied!":"Copy"})})]},t.platform))})]})})}),e.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-2xl p-6 shadow-lg",children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:"Fan Signup QR Code"}),e.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Print this QR code for shows. Fans can scan it to join your FanList instantly."}),(oe=w==null?void 0:w.settings)!=null&&oe.fanlistQrImageUrl?e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("img",{src:w.settings.fanlistQrImageUrl,alt:"Fan signup QR code",className:"max-w-[240px] w-full rounded-lg border-2 border-white/10"})}),e.jsx("a",{href:w.settings.fanlistQrImageUrl,target:"_blank",rel:"noopener noreferrer",download:!0,className:"block w-full px-4 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors text-sm font-medium text-center",children:"Download PNG"})]}):e.jsx("div",{className:"p-4 bg-[#0a0a0a] rounded-lg border border-white/10",children:e.jsx("p",{className:"text-sm text-gray-500 text-center",children:'No QR code found yet. Click "Sync from Portal" in Community → Settings to generate your QR code.'})})]})]}):e.jsx("div",{className:"bg-[#161616] border border-white/5 rounded-2xl p-8 text-center",children:e.jsx("p",{className:"text-gray-500",children:"Set your artist slug in Settings to enable pretty links and QR code."})})]}),n&&c&&e.jsx(De,{artistId:n,artistSlug:c,artistName:k==null?void 0:k.artist.name,onArtistUpdate:A}),e.jsx("div",{className:"mb-12",children:e.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-2xl p-6",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-white mb-2",children:"Custom Domain"}),e.jsx("p",{className:"text-sm text-gray-400 mb-2",children:"Have a custom domain you'd like to use for your pages? Enter it below and we'll show you how to connect it."}),e.jsxs("div",{className:"text-xs text-gray-500 bg-[#0a0a0a] border border-white/5 rounded p-3",children:[e.jsx("p",{className:"font-medium text-gray-400 mb-1",children:"Note:"}),e.jsx("p",{children:"You need to own or purchase your custom domain from a domain provider first. Popular providers include:"}),e.jsxs("ul",{className:"list-disc list-inside mt-1 space-y-0.5",children:[e.jsx("li",{children:"GoDaddy (godaddy.com)"}),e.jsx("li",{children:"Namecheap (namecheap.com)"}),e.jsx("li",{children:"Google Domains (domains.google)"}),e.jsx("li",{children:"Cloudflare Registrar (cloudflare.com)"}),e.jsx("li",{children:"Name.com (name.com)"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"customDomain",className:"block text-sm font-medium text-gray-300 mb-2",children:"Custom Domain"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{id:"customDomain",type:"text",value:d,onChange:t=>f(t.target.value),placeholder:"pages.myband.com",className:"flex-1 px-4 py-2 bg-[#0a0a0a] border border-white/10 text-white rounded-lg focus:outline-none focus:border-[#6d60ff]/50"}),e.jsx("button",{onClick:q,disabled:M,className:"px-6 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:M?"Saving...":"Save"})]}),e.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Leave empty to use your default ",c?`${c}.fanflowy.co`:"fanflowy.co"," domain"]})]}),d&&e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${u==="ACTIVE"?"bg-green-500":u==="PENDING"?"bg-yellow-500":"bg-gray-500"}`}),e.jsxs("span",{className:"text-sm text-gray-400",children:["Status:"," ",e.jsx("span",{className:"text-white font-medium",children:u==="ACTIVE"?"Active":u==="PENDING"?"Pending DNS Setup":"Not Set"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:ye,disabled:E,className:"text-sm px-3 py-1.5 bg-[#0a0a0a] border border-white/10 text-gray-300 rounded-lg hover:bg-[#161616] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:E?"Checking...":"Check Status"}),e.jsxs("button",{onClick:J,className:"text-sm text-[#6d60ff] hover:text-[#5d50ef] transition-colors",children:[a?"Hide":"Show"," DNS Instru
1ctions"]})]})]}),(a||d)&&e.jsx("div",{className:"mt-4 p-4 bg-[#0a0a0a] border border-white/10 rounded-lg",children:s!=null&&s.customDomain||d?e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-sm font-semibold text-white mb-3",children:"DNS Setup Instructions"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-sm text-gray-300",children:[e.jsxs("p",{className:"mb-3",children:["To connect your custom domain ",e.jsx("strong",{className:"text-white",children:(s==null?void 0:s.customDomain)||d}),", you need to add a ",(s==null?void 0:s.recordType)==="A"?"A record":"CNAME record"," in your domain's DNS settings.",(s==null?void 0:s.recordType)==="A"?" Root domains (like yourdomain.com) require an A record pointing to our IP address.":" A CNAME record tells your domain to point to our servers."]}),((s==null?void 0:s.cnameTarget)||(s==null?void 0:s.aRecordIp))&&e.jsxs("div",{className:"mb-4 p-4 bg-[#161616] border-2 border-[#6d60ff]/30 rounded-lg",children:[e.jsx("p",{className:"text-xs font-semibold text-[#6d60ff] mb-3 uppercase tracking-wide",children:"📋 DNS Record to Add"}),e.jsx("p",{className:"text-xs text-gray-400 mb-3",children:(s==null?void 0:s.recordType)==="A"?"Root domains require an A record pointing to our IP address. Add this exact A record to your domain's DNS settings.":"Add this exact CNAME record to your domain's DNS settings."}),e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"text-gray-400 min-w-[100px] font-medium",children:"Record Type:"}),e.jsx("code",{className:"text-[#6d60ff] font-mono text-base font-semibold bg-[#0a0a0a] px-2 py-1 rounded",children:(s==null?void 0:s.recordType)||((ie=s==null?void 0:s.dnsRecord)==null?void 0:ie.type)||"CNAME"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"text-gray-400 min-w-[100px] font-medium",children:"Name/Host:"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("code",{className:"text-white font-mono text-base font-semibold bg-[#0a0a0a] px-2 py-1 rounded",children:((ne=s==null?void 0:s.dnsRecord)==null?void 0:ne.name)||"@"}),e.jsx("span",{className:"text-gray-500 text-xs ml-2",children:((de=s==null?void 0:s.dnsRecord)==null?void 0:de.name)==="@"?"(root domain)":`(subdomain "${(ce=s==null?void 0:s.dnsRecord)==null?void 0:ce.name}")`})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"text-gray-400 min-w-[100px] font-medium",children:(s==null?void 0:s.recordType)==="A"?"Value/IP:":"Target/Value:"}),e.jsx("code",{className:"text-[#6d60ff] font-mono text-base font-semibold bg-[#0a0a0a] px-2 py-1 rounded break-all",children:(s==null?void 0:s.recordType)==="A"?(s==null?void 0:s.aRecordIp)||"Loading...":(s==null?void 0:s.cnameTarget)||"Loading..."})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"text-gray-400 min-w-[100px] font-medium",children:"TTL:"}),e.jsx("code",{className:"text-white font-mono text-base bg-[#0a0a0a] px-2 py-1 rounded",children:((me=s==null?void 0:s.dnsRecord)==null?void 0:me.ttl)||"3600"}),e.jsx("span",{className:"text-gray-500 text-xs ml-2",children:'(or "Auto")'})]})]})]}),!(s!=null&&s.cnameTarget)&&!(s!=null&&s.aRecordIp)&&e.jsx("div",{className:"mb-4 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:e.jsxs("p",{className:"text-sm text-yellow-300",children:[e.jsx("strong",{children:'Click "Save" above'})," to configure your domain and get the exact DNS record values. ",s!=null&&s.customDomain&&s.customDomain.split(".").length===2?"Root domains require an A record (IP address).":"The DNS record will be generated automatically."]})}),((s==null?void 0:s.cnameTarget)||(s==null?void 0:s.aRecordIp))&&e.jsx("div",{className:"mb-4 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:e.jsxs("p",{className:"text-xs text-green-300",children:["✓ ",e.jsx("strong",{children:"DNS record ready."}
1)," Use the ",(s==null?void 0:s.recordType)==="A"?"A record (IP address)":"CNAME target"," shown above in your DNS settings."]})}),(s==null?void 0:s.instructions)&&s.instructions.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-3 font-medium text-white",children:"Step-by-Step Instructions:"}),e.jsx("ol",{className:"space-y-2.5 list-decimal list-inside",children:s.instructions.map((t,m)=>e.jsx("li",{className:"pl-2 text-gray-300",children:t},m))})]}),(!(s!=null&&s.instructions)||s.instructions.length===0)&&e.jsx("div",{className:"mt-4 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:e.jsxs("p",{className:"text-sm text-blue-300",children:[e.jsx("strong",{children:"Next steps:"}),' Click "Save" above to configure your domain, then the detailed DNS setup instructions will appear here automatically.']})})]}),((s==null?void 0:s.cnameTarget)||(s==null?void 0:s.aRecordIp))&&e.jsxs("div",{className:"mt-4 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[e.jsx("p",{className:"text-xs font-medium text-blue-300 mb-1",children:"Common Registrar Steps:"}),e.jsx("ul",{className:"text-xs text-gray-400 space-y-1 list-disc list-inside",children:(s==null?void 0:s.recordType)==="A"?e.jsxs(e.Fragment,{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"GoDaddy:"})," DNS → Manage Zones → Add Record → Type: A, Name: @, Value: ",s.aRecordIp]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Namecheap:"})," Advanced DNS → Add New Record → Type: A Record, Host: @, Value: ",s.aRecordIp]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cloudflare:"})," DNS → Add Record → Type: A, Name: @, IPv4 address: ",s.aRecordIp,", Proxy: Off"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Google Domains:"})," DNS → Custom Records → Add → Type: A, Name: @, Data: ",s.aRecordIp]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"GoDaddy:"})," DNS → Manage Zones → Add Record → Type: CNAME, Name: @, Value: ",s.cnameTarget]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Namecheap:"})," Advanced DNS → Add New Record → Type: CNAME Record, Host: @, Value: ",s.cnameTarget]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cloudflare:"})," DNS → Add Record → Type: CNAME, Name: @, Target: ",s.cnameTarget,", Proxy: Off"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Google Domains:"})," DNS → Custom Records → Add → Type: CNAME, Name: @, Data: ",s.cnameTarget]})]})})]}),e.jsxs("div",{className:"mt-4 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[e.jsx("p",{className:"text-xs font-medium text-yellow-300 mb-1",children:"Important Notes:"}),e.jsxs("ul",{className:"text-xs text-gray-400 space-y-1 list-disc list-inside",children:[e.jsx("li",{children:"DNS changes can take 24-48 hours to propagate worldwide"}),e.jsx("li",{children:'Use "@" for root domain (e.g., myband.com) or a subdomain (e.g., "pages" for pages.myband.com)'}),e.jsx("li",{children:"Make sure to disable Cloudflare proxy (gray cloud) if using Cloudflare"}),e.jsx("li",{children:'After adding the record, click "Check Status" above to verify the connection'})]})]})]})]}):e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-gray-400",children:d?`Domain "${d}" entered. Click "Save" above to configure it and see DNS setup instructions.`:"No custom domain configured. Enter a domain above to see setup instructions."}),d&&e.jsx("button",{onClick:J,className:"text-sm px-4 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors",children:"Load DNS Instructions Now"})]})})]})]})}),C&&e.jsx(Re,{page:C,isOpen:!!C,onClose:K,onSave:pe,isSaving:F,success:T}),e.jsx(xe,{isOpen:ue,title:"Confirm Domain Configuration",message:`You're about to configure the domain "${W}". This will:
2
3• Set up your custom domain
4• Generate DNS records for you to add
5
6Please verify the domain name is spelled correctly before continuing.`,confirmText:"Yes, Configure Domain",cancelText:"Cancel",confirmVariant:"primary",onConfirm:()=>{W!==null&&X(W)},onCancel:()=>{_(!1),Y(null)},isLoading:M}),e.jsx(xe,{isOpen:ge,title:"Save Domain First",message:`Please save your domain "${d}" first to get the exact DNS record values.
7
8Would you like to save it now?`,confirmText:"Yes, Save Domain",cancelText:"Cancel",confirmVariant:"primary",onConfirm:async()=>{Q(!1),await q()},onCancel:()=>{Q(!1)},isLoading:!1})]})}export{Me 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.