1import{r as a,j as e}from"./react-vendor-BS-Esnrx.js";import{h as Te,L as S,H as Re,F as u}from"./dj-feature-BhX2-AdB.js";import{D as Ae,d as Ce,i as Ie,j as We,a as Le,bN as Be,k as P,p as $e,aJ as le,A as de,O as Pe,aF as Ne,_ as De,U as ce,l as T,Z as Me,E as Oe}from"./lucide-ke3X4oaS.js";import"./dj-data-Dd6c-HdA.js";import"./motion-BN_7uyJg.js";const N={crowd_100:{icon:"ð¯",label:"Century Club",color:"#f59e0b"},crowd_500:{icon:"ð¥",label:"Sold Out",color:"#ef4444"},top_rated:{icon:"â",label:"Top Rated",color:"#f59e0b"},vinyl_purist:{icon:"ðµ",label:"Vinyl Purist",color:"#a855f7"},crowd_pleaser:{icon:"ð¤",label:"Crowd Pleaser",color:"#00ccff"},turntablist:{icon:"ð§",label:"Turntablist",color:"#00ff88"},chat_storm:{icon:"ð¬",label:"Chat Storm",color:"#4f46e5"}};function j(l){const n=Math.floor(l/1e3),f=Math.floor(n/3600),m=Math.floor(n%3600/60),d=n%60;return f>0?`${f}:${String(m).padStart(2,"0")}:${String(d).padStart(2,"0")}`:`${m}:${String(d).padStart(2,"0")}`}function pe(l){return l?new Date(l).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}):""}function Ee({value:l,onChange:n}){const[f,m]=a.useState(0);return e.jsx("div",{style:{display:"flex",gap:4},children:[1,2,3,4,5].map(d=>e.jsx("button",{onClick:()=>n(d),onMouseEnter:()=>m(d),onMouseLeave:()=>m(0),style:{background:"none",border:"none",cursor:"pointer",padding:2},children:e.jsx(T,{size:20,color:"#f59e0b",fill:(f||l)>=d?"#f59e0b":"none"})},d))})}function Ue(){var Q,X,ee,te,re,ie,ne,oe,ae,se;const{slug:l}=Te(),[n,f]=a.useState(null),[m,d]=a.useState(!0),[fe,me]=a.useState(null),[c,ge]=a.useState("chat"),[R,xe]=a.useState(!1),[b,he]=a.useState(0),[k,ue]=a.useState(0),[D,be]=a.useState(""),[M,O]=a.useState(!1),[ye,je]=a.useState(!1),[g,E]=a.useState(""),[H,ve]=a.useState(!1),[K,F]=a.useState(!1),[A,V]=a.useState([]),[v,C]=a.useState([]),[J,I]=a.useState(!1),[x,U]=a.useState({trackTitle:"",artist:"",year:"",bpm:"",genre:"",videoOffsetMs:""}),[Y,q]=a.useState(!1),[W,G]=a.useState(!1),[_,Se]=a.useState("all"),w=a.useRef(null),y=a.useRef(null),L=a.useRef(null);a.useEffect(()=>{l&&fetch(`/api/performances/archive/${l}`).then(t=>t.json()).then(t=>{if(!t.ok)throw new Error(t.error||"Not found");f(t),V(t.comments||[]),C(t.tracklist||[])}).catch(()=>me("Unable to load this performance. Please try again.")).finally(()=>d(!1))},[l]),a.useEffect(()=>{var o,s;if(!((o=n==null?void 0:n.performance)!=null&&o.youtube_id))return;const t=n.performance.youtube_id,i=()=>{var p;(p=window.YT)!=null&&p.Player&&(y.current=new window.YT.Player("yt-player",{videoId:t,playerVars:{autoplay:0,rel:0,modestbranding:1,color:"white"},events:{onReady:()=>{xe(!0),L.current=setInterval(()=>{var z;(z=y.current)!=null&&z.getCurrentTime&&he(Math.floor(y.current.getCurrentTime()*1e3))},500)}}}))};if((s=window.YT)!=null&&s.Player)i();else{const p=document.createElement("script");p.src="https://www.youtube.com/iframe_api",document.head.appendChild(p),window.onYouTubeIframeAPIReady=i}return()=>{L.current&&clearInterval(L.current)}},[(Q=n==null?void 0:n.performance)==null?void 0:Q.youtube_id]);const B=t=>{var i,o,s;(i=y.current)!=null&&i.seekTo&&(y.current.seekTo(t/1e3,!0),(s=(o=y.current).playVideo)==null||s.call(o))},ke=async()=>{if(!(!k||!n)){O(!0);try{const i=await(await fetch("/api/performances/rate",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({performanceId:n.performance.id,stars:k,review:D})})).json();i.ok&&(je(!0),f(o=>o&&{...o,performance:{...o.performance,avg_rating:i.avgRating,rating_count:i.ratingCount}}))}finally{O(!1)}}},_e=async()=>{if(!(!g.trim()||!n)){F(!0);try{const i=await(await fetch("/api/performances/comment",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({performanceId:n.performance.id,body:g,videoOffsetMs:H?b:null})})).json();i.ok&&(V(o=>[i.comment,...o]),E(""))}finally{F(!1)}}},we=async()=>{if(!(!x.trackTitle.trim()||!n)){q(!0);try{if((await(await fetch("/api/performances/tracklist",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"add",performanceId:n.performance.id,...x})})).json()).ok){const s=await(await fetch(`/api/performances/archive/${l}`)).json();s.ok&&C(s.tracklist||[]),U({trackTitle:"",artist:"",year:"",bpm:"",genre:"",videoOffsetMs:""}),I(!1)}}finally{q(!1)}}},ze=async()=>{var t;if(n){G(!0);try{const o=await(await fetch("/api/performances/tracklist",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ai_detect",performanceId:n.performance.id,title:n.performance.title,de
1scription:n.performance.description})})).json();if(o.ok&&((t=o.tracks)==null?void 0:t.length)>0){for(const z of o.tracks)await fetch("/api/performances/tracklist",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"add",performanceId:n.performance.id,...z,is_ai_detected:!0})}).catch(()=>{});const p=await(await fetch(`/api/performances/archive/${l}`)).json();p.ok&&C(p.tracklist||[])}}finally{G(!1)}}},$=((n==null?void 0:n.chatReplay)||[]).filter(t=>_==="highlights"?t.is_highlight:!0);if(a.useEffect(()=>{if(!w.current||!R)return;const t=$.findIndex(i=>i.video_offset_ms>b);t>0&&w.current.children[t-1]&&w.current.children[t-1].scrollIntoView({behavior:"smooth",block:"center"})},[b,R]),m)return e.jsx("div",{style:{minHeight:"100vh",background:"#020b14",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx(Ae,{size:40,color:"#7c3aed",style:{animation:"spin 2s linear infinite",marginBottom:16}}),e.jsx("div",{style:{color:"#64748b"},children:"Loading performance..."})]})});if(fe||!n)return e.jsx("div",{style:{minHeight:"100vh",background:"#020b14",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsxs("div",{style:{textAlign:"center",color:"#e2e8f0"},children:[e.jsx("div",{style:{fontSize:18,fontWeight:700,marginBottom:8},children:"Performance not found"}),e.jsx(S,{to:"/performances",style:{color:"#7c3aed"},children:"â Back to Archive"})]})});const{performance:r,awards:h,related:Z}=n;return e.jsxs(e.Fragment,{children:[e.jsxs(Re,{children:[e.jsxs("title",{children:[r.title,". TLA Performance Archive · The-Lost-Art.comâ¢"]}),e.jsx("meta",{name:"description",content:r.ai_summary?r.ai_summary.slice(0,155):`Watch ${r.dj_name}'s archived performance on The-Lost-Art. Synchronized chat replay, tracklist, community ratings, and awards.`}),e.jsx("link",{rel:"canonical",href:`https://the-lost-art.com/performances/${r.slug}`}),e.jsx("meta",{property:"og:title",content:`${r.title}. TLA Performance Archive`}),e.jsx("meta",{property:"og:description",content:r.ai_summary?r.ai_summary.slice(0,155):`${r.dj_name} live on The-Lost-Art. verified performance with synchronized chat replay and community ratings.`}),e.jsx("meta",{property:"og:type",content:"video.other"}),e.jsx("meta",{property:"og:url",content:`https://the-lost-art.com/performances/${r.slug}`}),e.jsx("meta",{property:"og:site_name",content:"The-Lost-Art"}),e.jsx("meta",{property:"og:locale",content:"en_US"}),r.thumbnail_url&&e.jsx("meta",{property:"og:image",content:r.thumbnail_url}),r.thumbnail_url&&e.jsx("meta",{property:"og:image:secure_url",content:r.thumbnail_url}),e.jsx("meta",{property:"og:image:width",content:"1280"}),e.jsx("meta",{property:"og:image:height",content:"720"}),e.jsx("meta",{property:"og:image:type",content:"image/jpeg"}),e.jsx("meta",{property:"og:image:alt",content:`${r.title}. ${r.dj_name}. The-Lost-Art Performance Archive`}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:site",content:"@thelostartdj"}),e.jsx("meta",{name:"twitter:creator",content:"@thelostartdj"}),e.jsx("meta",{name:"twitter:title",content:`${r.title}. TLA Performance Archive`}),e.jsx("meta",{name:"twitter:description",content:r.ai_summary?r.ai_summary.slice(0,155):`${r.dj_name} live on The-Lost-Art`}),r.thumbnail_url&&e.jsx("meta",{name:"twitter:image",content:r.thumbnail_url}),e.jsx("meta",{name:"twitter:image:alt",content:`${r.title}. ${r.dj_name}. The-Lost-Art Performance Archive`}),e.jsx("meta",{name:"twitter:url",content:`https://the-lost-art.com/performances/${r.slug}`}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"VideoObject","@id":`https://the-lost-art.com/performances/${r.slug}#video`,name:r.title,description:r.ai_summary||r.description||`${r.dj_name} live performance archived on The-Lost-Art.com`,thumbnailUrl:r.thumbnail_url,uploadDate:r.performed_at,embedUrl:r.youtube_id?`https://www.youtube.com/embed/${r.youtube_id}`:void 0,url:`https://the-lost-art.com/performances/${r.slug}`,author:{"@type":"Person",name:r.dj_name},publisher:{"@id":"https://the-lost-art.com/#organization"},isPartOf:{"@id":"https://the-lost-art.com/#website"},breadcrumb:{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://the-lost-art.com/"},{"@type":"ListItem",position:2,name:"Performance Archive",item:"https://the-lost-art.com/performances"}
1,{"@type":"ListItem",position:3,name:r.title,item:`https://the-lost-art.com/performances/${r.slug}`}]}})})]}),e.jsxs("div",{style:{minHeight:"100vh",background:"#020b14",color:"#e2e8f0"},children:[e.jsx("div",{className:"perf-breadcrumb",style:{background:"#07101d",borderBottom:"1px solid #1e293b",padding:"10px 24px"},children:e.jsxs("div",{style:{maxWidth:1400,margin:"0 auto",display:"flex",alignItems:"center",gap:8,fontSize:12,color:"#64748b"},children:[e.jsxs(S,{to:"/performances",style:{color:"#64748b",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:[e.jsx(Ce,{size:12})," Archive"]}),e.jsx("span",{children:"/"}),e.jsx("span",{style:{color:"#94a3b8",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.jsx(u,{devId:"a9a5ab",guard:{file:"src/pages/performances/[slug].tsx",tagName:"span",sourceKind:"bound-expression",contentKey:null,contentKeyTemplate:null,expressionHash:"sha256:32ba7bb3663009d8fee7ecd9bba452a68f68655aa6db4da0d125caa7f60e84d9"},children:r.title})})]})}),e.jsx("div",{className:"perf-main-pad",style:{maxWidth:1400,margin:"0 auto",padding:"24px 16px 60px"},children:e.jsxs("div",{className:"perf-grid",style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) min(380px, 35vw)",gap:24,alignItems:"start"},children:[e.jsx("style",{children:` 2 @media (max-width: 768px) { 3 .perf-grid { grid-template-columns: 1fr !important; } 4 .perf-track-form { grid-template-columns: 1fr !important; } 5 } 6 `}),e.jsxs("div",{children:[e.jsx("div",{style:{position:"relative",paddingTop:"56.25%",background:"#000",borderRadius:14,overflow:"hidden",marginBottom:20},children:e.jsx("div",{id:"yt-player",style:{position:"absolute",inset:0,width:"100%",height:"100%"}})}),e.jsxs("div",{style:{marginBottom:20},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12,marginBottom:12},children:[e.jsxs("div",{style:{flex:1},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6,flexWrap:"wrap"},children:[r.is_verified&&e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4,background:"#00ccff22",border:"1px solid #00ccff44",borderRadius:4,padding:"2px 8px",fontSize:10,color:"#00ccff",fontWeight:700},children:[e.jsx(Ie,{size:10})," VERIFIED PERFORMANCE"]}),r.genre&&e.jsx("span",{style:{background:"#7c3aed22",border:"1px solid #7c3aed44",borderRadius:4,padding:"2px 8px",fontSize:10,color:"#a78bfa"},children:e.jsx(u,{devId:"c1b511",guard:{file:"src/pages/performances/[slug].tsx",tagName:"span",sourceKind:"bound-expression",contentKey:null,contentKeyTemplate:null,expressionHash:"sha256:325c2a2b8318af4c45690a2220d898690b03e9f1685c75196c6d254193425cd4"},children:r.genre})}),r.status==="live"&&e.jsxs("span",{style:{background:"#ef444422",border:"1px solid #ef444444",borderRadius:4,padding:"2px 8px",fontSize:10,color:"#ef4444",fontWeight:700,display:"flex",alignItems:"center",gap:4},children:[e.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"#ef4444",display:"inline-block",animation:"blink 1s ease-in-out infinite"}}),"LIVE NOW"]})]}),e.jsx("h1",{style:{margin:"0 0 6px",fontSize:22,fontWeight:900,color:"#fff",lineHeight:1.2},children:e.jsx(u,{devId:"4d9da3",guard:{file:"src/pages/performances/[slug].tsx",tagName:"h1",sourceKind:"bound-expression",contentKey:null,contentKeyTemplate:null,expressionHash:"sha256:32ba7bb3663009d8fee7ecd9bba452a68f68655aa6db4da0d125caa7f60e84d9"},children:r.title})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[r.dj_slug?e.jsx(S,{to:`/dj-roster/${r.dj_slug}`,style:{color:"#7c3aed",fontWeight:700,fontSize:15,textDecoration:"none"},children:r.dj_name}):e.jsx("span",{style:{color:"#7c3aed",fontWeight:700,fontSize:15},children:e.jsx(u,{devId:"0389f1",guard:{file:"src/pages/performances/[slug].tsx",tagName:"span",sourceKind:"bound-expression",contentKey:null,contentKeyTemplate:null,expressionHash:"sha256:409535286fbba207100aefd4fff5c0235567c7883786bc0272069ae696d51fd5"},children:r.dj_name})}),r.performed_at&&e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"#64748b"},children:[e.jsx(We,{size:11})," ",pe(r.performed_at)]}),r.event_name&&r.event_name!==r.title&&e.jsxs("span",{style:{fontSize:12,color:"#64748b"},children:["@ ",r.event_name]})]})]}),e.jsxs("button",{onClick:()=>navigator.clipboard.writeText(window.location.href),style:{background:"#0f172a",border:"1px solid #1e293b",borderRadius:8,padding:"8px 12px",color:"#94a3b8",curs
6or:"pointer",display:"flex",alignItems:"center",gap:5,fontSize:12},children:[e.jsx(Le,{size:13})," Share"]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,padding:"12px 16px",background:"#07101d",border:"1px solid #1e293b",borderRadius:10,flexWrap:"wrap"},children:[r.peak_viewers>0&&e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx("div",{style:{fontSize:18,fontWeight:900,color:"#fff"},children:r.peak_viewers.toLocaleString()}),e.jsx("div",{style:{fontSize:10,color:"#64748b"},children:"Peak Viewers"})]}),r.chat_count>0&&e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx("div",{style:{fontSize:18,fontWeight:900,color:"#fff"},children:r.chat_count.toLocaleString()}),e.jsx("div",{style:{fontSize:10,color:"#64748b"},children:"Chat Messages"})]}),r.rating_count>0&&e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx("div",{style:{fontSize:18,fontWeight:900,color:"#f59e0b"},children:Number(r.avg_rating).toFixed(1)}),e.jsxs("div",{style:{fontSize:10,color:"#64748b"},children:[r.rating_count," Ratings"]})]}),r.ai_vibe_score>0&&e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx("div",{style:{fontSize:18,fontWeight:900,color:"#00ff88"},children:r.ai_vibe_score}),e.jsx("div",{style:{fontSize:10,color:"#64748b"},children:"Vibe Score"})]}),r.view_count>0&&e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx("div",{style:{fontSize:18,fontWeight:900,color:"#fff"},children:r.view_count.toLocaleString()}),e.jsx("div",{style:{fontSize:10,color:"#64748b"},children:"Archive Views"})]})]})]}),h.length>0&&e.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:20},children:h.map(t=>{const i=N[t.award_key]||{icon:"ð",label:t.award_label,color:"#f59e0b"};return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,background:`${i.color}18`,border:`1px solid ${i.color}44`,borderRadius:8,padding:"6px 12px"},children:[e.jsx("span",{style:{fontSize:16},children:i.icon}),e.jsx("span",{style:{fontSize:12,fontWeight:700,color:i.color},children:i.label})]},t.id)})}),r.ai_summary&&e.jsxs("div",{style:{background:"linear-gradient(135deg, #1a0a3a, #0f1a3a)",border:"1px solid #2d1a5a",borderRadius:12,padding:"16px 18px",marginBottom:20},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10},children:[e.jsx(Be,{size:14,color:"#7c3aed"}),e.jsx("span",{style:{fontSize:12,fontWeight:700,color:"#a78bfa",textTransform:"uppercase",letterSpacing:"0.08em"},children:"AI Performance Summary"})]}),e.jsx("p",{style:{margin:"0 0 10px",fontSize:14,color:"#c4b5fd",lineHeight:1.7},children:e.jsx(u,{devId:"bc9834",guard:{file:"src/pages/performances/[slug].tsx",tagName:"p",sourceKind:"bound-expression",contentKey:null,contentKeyTemplate:null,expressionHash:"sha256:05f675518b37d5c08dc3659a6da93c59261b0bbc548c7b6d420ee9c89023faa7"},children:r.ai_summary})}),((X=r.aiHighlights)==null?void 0:X.length)>0&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,color:"#7c3aed",marginBottom:6,fontWeight:600},children:"Key Moments:"}),e.jsx("ul",{style:{margin:0,padding:"0 0 0 16px"},children:r.aiHighlights.map((t,i)=>e.jsx("li",{style:{fontSize:13,color:"#94a3b8",marginBottom:3},children:t},i))})]}),((ee=r.aiTags)==null?void 0:ee.length)>0&&e.jsx("div",{style:{display:"flex",gap:5,flexWrap:"wrap",marginTop:10},children:r.aiTags.map(t=>e.jsx("span",{style:{background:"#7c3aed22",borderRadius:4,padding:"1px 7px",fontSize:10,color:"#a78bfa"},children:t},t))})]}),r.equipment&&e.jsxs("div",{style:{background:"#07101d",border:"1px solid #1e293b",borderRadius:10,padding:"12px 16px",marginBottom:20},children:[e.jsx("div",{style:{fontSize:11,color:"#64748b",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:6},children:"Equipment Used"}),e.jsx("div",{style:{fontSize:13,color:"#94a3b8"},children:r.equipment})]}),e.jsx("div",{style:{borderBottom:"1px solid #1e293b",marginBottom:20},children:e.jsx("div",{style:{display:"flex",gap:0},children:[{id:"chat",label:"Chat Replay",icon:P,count:(te=n.chatReplay)==null?void 0:te.length},{id:"tracklist",label:"Tracklist",icon:$e,count:v.length},{id:"comments",label:"Comments",icon:P,count:A.length},{id:"analytics",label:"Analytics",icon:le,count:null},{id:"awards",label:"Awards",icon:de,count:h.length}].map(t=>e.jsxs("button",{onClick:()=>ge(t.id),style:{background:"transparent",border:"none",borderBottom:`2px solid ${c===t.id?"#7c3aed":"transparent"}`,padding:"10px 16px",cursor:"pointer",color:c===t.id?"#fff":"#64748b",fontWeight:c===t.id?700:400,fontSize:13,display:"flex",alignItems:"center",gap:5,transition:"all 0.15s"},children:[e.jsx(t.icon,{size:13}),t.label,t.count!=null&&t.count>0&&e.jsx("span",{style:{background:"#1e293b",borderRadius:10,padding:"1px 6px",fontSize:10},children:t.count})]},t.id))})}),c==="chat"&&e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[e.jsx("span",{style:{fontSize:12,color:"#64748b"},children:"Filter:"}),["all","highlights"].map(t=>{var i;return e.jsx("button",{onClick:()=>Se(t),style:{background:_===t?"#7c3aed":"#0f172a",border:`1px solid ${_===t?"#7c3aed":"#1e293b"}`,borderRadius:20,padding:"3px 10px",fontSize:11,color:_===t?"#fff":"#94a3b8",curs
6or:"pointer"},children:t==="all"?`All (${((i=n.chatReplay)==null?void 0:i.length)||0})`:"Highlights"},t)}),R&&e.jsxs("span",{style:{marginLeft:"auto",fontSize:11,color:"#64748b"},children:["â¶ ",j(b)]})]}),$.length===0?e.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"#475569",fontSize:13},children:((re=n.chatReplay)==null?void 0:re.length)===0?"No chat replay data for this performance.":"No highlighted messages found."}):e.jsx("div",{ref:w,style:{maxHeight:500,overflowY:"auto",display:"flex",flexDirection:"column",gap:2},children:$.map(t=>{const i=Math.abs(t.video_offset_ms-b)<5e3;return e.jsxs("div",{style:{display:"flex",gap:8,padding:"5px 8px",borderRadius:6,background:i?"#7c3aed18":t.is_highlight?"#00ff8808":"transparent",border:`1px solid ${i?"#7c3aed44":t.is_highlight?"#00ff8822":"transparent"}`,transition:"all 0.3s"},children:[e.jsx("button",{onClick:()=>B(t.video_offset_ms),style:{background:"none",border:"none",cursor:"pointer",padding:0,flexShrink:0},title:`Jump to ${j(t.video_offset_ms)}`,children:e.jsx("span",{style:{fontSize:10,color:"#475569",fontFamily:"monospace",whiteSpace:"nowrap"},children:j(t.video_offset_ms)})}),e.jsxs("span",{style:{fontSize:12,fontWeight:700,color:"#7c3aed",flexShrink:0},children:[t.display_name||t.username,":"]}),e.jsx("span",{style:{fontSize:12,color:"#94a3b8",flex:1},children:t.message}),t.is_highlight&&e.jsx("span",{title:"Highlight",style:{fontSize:12},children:"â"})]},t.id)})})]}),c==="tracklist"&&e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:14},children:[e.jsxs("span",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:[v.length," ",v.length===1?"Track":"Tracks"]}),e.jsxs("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:[e.jsxs("button",{onClick:ze,disabled:W,style:{display:"flex",alignItems:"center",gap:5,background:"#7c3aed22",border:"1px solid #7c3aed44",borderRadius:8,padding:"6px 12px",color:"#a78bfa",fontSize:11,cursor:W?"not-allowed":"pointer",fontWeight:600},children:[e.jsx(Pe,{size:11})," ",W?"Detecting...":"AI Detect"]}),e.jsxs("button",{onClick:()=>I(!J),style:{display:"flex",alignItems:"center",gap:5,background:"#0f172a",border:"1px solid #1e293b",borderRadius:8,padding:"6px 12px",color:"#94a3b8",fontSize:11,cursor:"pointer"},children:[e.jsx(Ne,{size:11})," Add Track"]})]})]}),J&&e.jsxs("div",{style:{background:"#0f172a",border:"1px solid #1e293b",borderRadius:10,padding:14,marginBottom:14},children:[e.jsx("div",{className:"perf-track-form",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:8},children:[{key:"trackTitle",placeholder:"Track title *"},{key:"artist",placeholder:"Artist"},{key:"year",placeholder:"Year"},{key:"bpm",placeholder:"BPM"},{key:"genre",placeholder:"Genre"},{key:"videoOffsetMs",placeholder:"Timestamp (ms)"}].map(({key:t,placeholder:i})=>e.jsx("input",{value:x[t],onChange:o=>U(s=>({...s,[t]:o.target.value})),placeholder:i,style:{background:"#07101d",border:"1px solid #1e293b",borderRadius:6,padding:"7px 10px",color:"#e2e8f0",fontSize:12,outline:"none"}},t))}),e.jsxs("div",{style:{display:"flex",gap:6},children:[e.jsx("button",{onClick:we,disabled:Y||!x.trackTitle.trim(),style:{background:x.trackTitle.trim()?"#7c3aed":"#1e293b",border:"none",borderRadius:6,padding:"7px 14px",color:x.trackTitle.trim()?"#fff":"#475569",fontSize:12,fontWeight:700,cursor:x.trackTitle.trim()?"pointer":"not-allowed"},children:e.jsx(u,{devId:"8f67ce",guard:{file:"src/pages/performances/[slug].tsx",tagName:"button",sourceKind:"bound-expression",contentKey:null,contentKeyTemplate:null,expressionHash:"sha256:31d930769bef7ef37c1fe7e0803e5b4bcd59353671d001d9b17fad3b1d2c18a7"},children:Y?"Adding...":"Add Track"})}),e.jsx("button",{onClick:()=>I(!1),style:{background:"transparent",border:"1px solid #1e293b",borderRadius:6,padding:"7px 12px",color:"#64748b",fontSize:12,cursor:"pointer"},children:"Cancel"})]})]}),v.length===0?e.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"#475569",fontSize:13},children:"No tracklist yet. Add tracks manually or use AI detection."}):e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:2},children:v.map((t,i)=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",background:"#07101d",border:"1px solid #1e293b",borderRadius:8,transition:"border-color 0.15s"},onMouseEnter:o=>o.currentTarget.style.borderColor="#334155",onMouseLeave:o=>o.currentTarget.style.borderColor="#1e293b",children:[e.jsx("span",{style:{fontSize:12,color:"#475569",fontWeight:700,minWidth:24},children:t.position}),t.video_offset_ms>0&&e.jsx("button",{onClick:()=>B(t.video_offset_ms),style:{background:"none",border:"none",cursor:"pointer",padding:0}
6,children:e.jsx("span",{style:{fontSize:10,color:"#7c3aed",fontFamily:"monospace",background:"#7c3aed18",borderRadius:4,padding:"1px 5px"},children:j(t.video_offset_ms)})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{fontSize:13,fontWeight:600,color:"#fff",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[t.track_title,t.is_ai_detected&&e.jsx("span",{style:{fontSize:9,color:"#7c3aed",marginLeft:5},children:"AI"})]}),t.artist&&e.jsxs("div",{style:{fontSize:11,color:"#64748b"},children:[t.artist,t.year?` · ${t.year}`:"",t.bpm?` · ${t.bpm} BPM`:""]})]}),t.genre&&e.jsx("span",{style:{background:"#1e293b",borderRadius:4,padding:"1px 6px",fontSize:9,color:"#94a3b8",flexShrink:0},children:t.genre})]},t.id))})]}),c==="comments"&&e.jsxs("div",{children:[e.jsxs("div",{style:{background:"#07101d",border:"1px solid #1e293b",borderRadius:10,padding:14,marginBottom:16},children:[e.jsx("textarea",{value:g,onChange:t=>E(t.target.value),placeholder:"Leave a comment about this performance...",rows:3,style:{width:"100%",background:"#0f172a",border:"1px solid #1e293b",borderRadius:8,padding:"10px 12px",color:"#e2e8f0",fontSize:13,outline:"none",resize:"vertical",boxSizing:"border-box"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8},children:[e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:5,fontSize:11,color:"#64748b",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",checked:H,onChange:t=>ve(t.target.checked)}),"Link to ",j(b)]}),e.jsxs("button",{onClick:_e,disabled:K||!g.trim(),style:{marginLeft:"auto",background:g.trim()?"#7c3aed":"#1e293b",border:"none",borderRadius:8,padding:"7px 16px",color:g.trim()?"#fff":"#475569",fontSize:12,fontWeight:700,cursor:g.trim()?"pointer":"not-allowed",display:"flex",alignItems:"center",gap:5},children:[e.jsx(De,{size:11})," ",K?"Posting...":"Post"]})]})]}),A.length===0?e.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"#475569",fontSize:13},children:"Be the first to comment on this performance."}):e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:A.map(t=>e.jsxs("div",{style:{background:"#07101d",border:"1px solid #1e293b",borderRadius:10,padding:"12px 14px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[e.jsx("div",{style:{width:28,height:28,borderRadius:"50%",background:"#1e293b",display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"#7c3aed",flexShrink:0},children:(t.display_name||t.username||"?")[0].toUpperCase()}),e.jsx("span",{style:{fontSize:12,fontWeight:700,color:"#e2e8f0"},children:t.display_name||t.username}),t.video_offset_ms!=null&&e.jsxs("button",{onClick:()=>B(t.video_offset_ms),style:{background:"#7c3aed18",border:"none",borderRadius:4,padding:"1px 6px",fontSize:10,color:"#a78bfa",cursor:"pointer",fontFamily:"monospace"},children:["ⶠ",j(t.video_offset_ms)]}),e.jsx("span",{style:{marginLeft:"auto",fontSize:10,color:"#475569"},children:new Date(t.created_at).toLocaleDateString()})]}),e.jsx("p",{style:{margin:0,fontSize:13,color:"#94a3b8",lineHeight:1.6},children:t.body})]},t.id))})]}),c==="analytics"&&e.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[{label:"Peak Viewers",value:((ie=r.peak_viewers)==null?void 0:ie.toLocaleString())||"Not available",icon:ce,color:"#00ccff"},{label:"Total Viewers",value:((ne=r.total_viewers)==null?void 0:ne.toLocaleString())||"Not available",icon:ce,color:"#4f46e5"},{label:"Chat Messages",value:((oe=r.chat_count)==null?void 0:oe.toLocaleString())||"Not available",icon:P,color:"#7c3aed"},{label:"Archive Views",value:((ae=r.view_count)==null?void 0:ae.toLocaleString())||"Not available",icon:le,color:"#059669"},{label:"Community Ratings",value:((se=r.rating_count)==null?void 0:se.toLocaleString())||"Not available",icon:T,color:"#f59e0b"},{label:"Average Rating",value:r.rating_count>0?`${Number(r.avg_rating).toFixed(1)}/5`:"Not available",icon:T,color:"#f59e0b"},{label:"AI Vibe Score",value:r.ai_vibe_score>0?`${r.ai_vibe_score}/100`:"Not available",icon:Me,color:"#00ff88"},{label:"Awards Earned",value:String(h.length),icon:de,color:"#a85
65f7"}].map(({label:t,value:i,icon:o,color:s})=>e.jsxs("div",{style:{background:"#07101d",border:"1px solid #1e293b",borderRadius:10,padding:"14px 16px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6},children:[e.jsx(o,{size:13,color:s}),e.jsx("span",{style:{fontSize:11,color:"#64748b"},children:t})]}),e.jsx("div",{style:{fontSize:22,fontWeight:900,color:s},children:i})]},t))}),c==="awards"&&e.jsxs("div",{children:[h.length===0?e.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"#475569",fontSize:13},children:"No awards yet. Awards are earned automatically based on performance metrics."}):e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:12},children:h.map(t=>{const i=N[t.award_key]||{icon:"ð",label:t.award_label,color:"#f59e0b"};return e.jsxs("div",{style:{background:`${i.color}0a`,border:`1px solid ${i.color}33`,borderRadius:12,padding:"20px 16px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:36,marginBottom:8},children:i.icon}),e.jsx("div",{style:{fontSize:14,fontWeight:800,color:i.color,marginBottom:4},children:i.label}),e.jsx("div",{style:{fontSize:10,color:"#475569"},children:new Date(t.awarded_at).toLocaleDateString()})]},t.id)})}),e.jsxs("div",{style:{marginTop:20,padding:"14px 16px",background:"#07101d",border:"1px solid #1e293b",borderRadius:10},children:[e.jsx("div",{style:{fontSize:11,color:"#64748b",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:10},children:"All Possible Awards"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:Object.entries(N).map(([t,i])=>{const o=h.some(s=>s.award_key===t);return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5,background:o?`${i.color}18`:"#0f172a",border:`1px solid ${o?i.color+"44":"#1e293b"}`,borderRadius:6,padding:"4px 10px",opacity:o?1:.5},children:[e.jsx("span",{style:{fontSize:13},children:i.icon}),e.jsx("span",{style:{fontSize:11,color:o?i.color:"#475569"},children:i.label})]},t)})})]})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[e.jsxs("div",{style:{background:"#07101d",border:"1px solid #1e293b",borderRadius:12,padding:"16px 18px"},children:[e.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#fff",marginBottom:12},children:"Rate This Performance"}),ye?e.jsx("div",{style:{textAlign:"center",padding:"10px 0",color:"#00ff88",fontSize:13},children:"â Rating submitted! Thank you."}):e.jsxs(e.Fragment,{children:[e.jsx(Ee,{value:k,onChange:ue}),k>0&&e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:D,onChange:t=>be(t.target.value),placeholder:"Optional review...",rows:2,style:{width:"100%",marginTop:10,background:"#0f172a",border:"1px solid #1e293b",borderRadius:6,padding:"8px 10px",color:"#e2e8f0",fontSize:12,outline:"none",resize:"none",boxSizing:"border-box"}}),e.jsx("button",{onClick:ke,disabled:M,style:{width:"100%",marginTop:8,background:"#7c3aed",border:"none",borderRadius:8,padding:"9px 0",color:"#fff",fontWeight:700,fontSize:13,cursor:"pointer"},children:e.jsx(u,{devId:"5bb89e",guard:{file:"src/pages/performances/[slug].tsx",tagName:"button",sourceKind:"bound-expression",contentKey:null,contentKeyTemplate:null,expressionHash:"sha256:87a2e50969bdd75e40be4709ba4936e755df56ebf89675c9bcc7fbf5856087cb"},children:M?"Submitting...":"Submit Rating"})})]}),r.rating_count>0&&e.jsxs("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:6},children:[e.jsx("div",{style:{display:"flex",gap:2},children:[1,2,3,4,5].map(t=>e.jsx(T,{size:12,color:"#f59e0b",fill:t<=Math.round(r.avg_rating)?"#f59e0b":"none"},t))}),e.jsxs("span",{style:{fontSize:12,color:"#94a3b8"},children:[Number(r.avg_rating).toFixed(1)," · ",r.rating_count," ",r.rating_count===1?"rating":"ratings"]})]})]})]}),r.dj_name&&e.jsxs("div",{style:{background:"#07101d",border:"1px solid #1e293b",borderRadius:12,padding:"16px 18px"},children:[e.jsx("div",{style:{fontSize:11,color:"#64748b",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:10},children:"Performing DJ"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:12},children:[e.jsx("div",{style:{width:44,height:44,borderRadius:10,background:"linear-gradient(135deg, #7c3aed, #4f46e5)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:900,color:"#fff",flexShrink:0},children:r.dj_name[0]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:15,fontWeight:800,color:"#fff"},children:r.dj_name}),r.genre&&e.jsx("div",{style:{fontSize:11,color:"#7c3aed"},children:r.genre})]})]}),r.dj_slug&&e.jsxs(S,{to:`/dj-roster/${r.dj_slug}`,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:5,background:"#7c3aed22",border:"1px solid #7c3aed44",borderRadius:8,padding:"8px 0",color:"#a78bfa",textDecoration:"none",fontSize:12,fontWeight:600},children:[e.jsx(Oe,{size:11})," View DJ Profile"]})]}),e.jsxs("div",{style:{background:"#07101d",border:"1px solid #1e293b",borderRadius:12,padding:"16px 18px"},children:[e.jsx("div",{style:{fontSize:11,color:"#64748b",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:10},children:"Performance Details"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[{label:"Date",value:r.performed_at?pe(r.performed_at):null},{label:"Event",value:r.event_name!==r.title?r.event_name:null},{label:"Venue",value:r.venue},{label:"Genre",value:r.genre}
6].filter(t=>t.value).map(({label:t,value:i})=>e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx("span",{style:{fontSize:11,color:"#475569",minWidth:50},children:t}),e.jsx("span",{style:{fontSize:12,color:"#94a3b8",flex:1},children:i})]},t))})]}),Z.length>0&&e.jsxs("div",{style:{background:"#07101d",border:"1px solid #1e293b",borderRadius:12,padding:"16px 18px"},children:[e.jsx("div",{style:{fontSize:11,color:"#64748b",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:10},children:"Related Performances"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Z.map(t=>e.jsx(S,{to:`/performances/${t.slug}`,style:{textDecoration:"none"},children:e.jsxs("div",{style:{display:"flex",gap:8,padding:"6px 0",borderBottom:"1px solid #0f172a",transition:"opacity 0.15s"},onMouseEnter:i=>i.currentTarget.style.opacity="0.8",onMouseLeave:i=>i.currentTarget.style.opacity="1",children:[e.jsx("div",{style:{width:56,height:32,borderRadius:4,background:"#0f172a",overflow:"hidden",flexShrink:0},children:e.jsx("img",{src:t.thumbnail_url,alt:t.title,style:{width:"100%",height:"100%",objectFit:"cover"},onError:i=>{i.target.style.display="none"}})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:11,fontWeight:600,color:"#e2e8f0",lineHeight:1.3,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t.title}),e.jsx("div",{style:{fontSize:10,color:"#64748b"},children:t.dj_name})]})]})},t.id))})]})]})]})})]}),e.jsx("style",{children:` 7 @keyframes spin { to { transform: rotate(360deg); } } 8 @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } } 9 /* Stack to single column on mobile and tablet */ 10 @media (max-width: 900px) { 11 .perf-grid { grid-template-columns: 1fr !important; } 12 } 13 /* Tracklist add-form: stack inputs on mobile */ 14 @media (max-width: 480px) { 15 .perf-track-form { grid-template-columns: 1fr !important; } 16 } 17 /* Breadcrumb padding on mobile */ 18 @media (max-width: 640px) { 19 .perf-breadcrumb { padding: 10px 14px !important; } 20 .perf-main-pad { padding: 16px 12px 60px !important; } 21 } 22 `}),e.jsx("div",{className:"tla-page-bottom","aria-hidden":"true"})]})}export{Ue 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.