259 lines
217 KiB
JavaScript
259 lines
217 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/useNostr-zyhtrXba.js","assets/index-BzKy-nNf.js","assets/index-CHQ7uqBj.css","assets/ThreadNode-Jt8WlAUM.js"])))=>i.map(i=>d[i]);
|
||
import{a as q,Z as Ht,$ as ut,p as Ne,b as s,c as n,e,h as G,u as t,n as o,t as d,f as ie,w as W,v as Q,F as I,g as B,i as m,j as J,r as M,k as L,a0 as Wt,a1 as xt,N as ne,a2 as ht,a3 as pt,a4 as gt,a5 as vt,U as De,a6 as Kt,a7 as Yt,a8 as Qt,P as Jt,z as he,Q as E,K as le,a9 as ae,aa as ye,_ as bt,A as ce,B as Pe,d as Zt,ab as Xt,L as se,ac as es,ad as ts,ae as ss,af as ns,S as ls,q as os,ag as as,o as is,M as ue,ah as Be,ai as rs}from"./index-BzKy-nNf.js";import{u as cs}from"./chat-CR1al33K.js";import{u as $e,a as pe,e as Ye,d as ft,M as ds,b as us,s as xs,c as hs,f as be,_ as lt}from"./ChatWindow.vue_vue_type_script_setup_true_lang-CiskBM0U.js";import{_ as ps}from"./FilmGrid.vue_vue_type_script_setup_true_lang-BDhsWNsb.js";import{u as Ae}from"./useContentImages-h7FPc94o.js";import{_ as gs}from"./SongGrid.vue_vue_type_script_setup_true_lang-BGfZFkPO.js";import{useNostr as Le}from"./useNostr-zyhtrXba.js";import{u as mt,_ as vs}from"./FilmDetail.vue_vue_type_script_setup_true_lang-TCAQqc_e.js";import{_ as bs}from"./SongDetail.vue_vue_type_script_setup_true_lang-B41kpCIv.js";const fs={class:"h-full flex flex-col"},ms={class:"flex items-center justify-between gap-2"},ws={class:"flex items-center gap-2 shrink-0"},ys={key:0,class:"flex flex-wrap gap-1.5"},ks=["onClick"],$s={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-4 pb-16"},_s={class:"grid grid-cols-2 sm:grid-cols-3 gap-4"},Cs=["aria-label","onClick"],Ss={class:"cover-card flex-1 min-h-0 relative"},js={key:0,class:"absolute inset-0 animate-shimmer"},Ms=["src","alt","onError"],Ts=["src","alt"],Ds={key:3,class:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent pointer-events-none"},Ls={class:"absolute bottom-0 left-0 right-0 p-2"},Is={class:"text-xs font-semibold text-white/90 leading-tight truncate"},Bs={class:"text-xs text-white/40 truncate mt-0.5"},Ps={key:4,class:"absolute top-1.5 left-1.5"},Ns={class:"text-xs px-1.5 py-0.5 rounded bg-black/60 text-amber-400 backdrop-blur-sm font-medium"},As={key:5,class:"absolute top-1.5 right-1.5"},zs={class:"text-xs px-1 py-0.5 rounded bg-black/60 text-white/70 backdrop-blur-sm"},Fs={key:0,class:"flex items-center justify-center py-12"},Es=q({__name:"BookGrid",props:{books:{},title:{default:"Recommended Books"}},emits:["selectBook"],setup(a){const c=a,{isDark:l}=J(),w=M(""),g=M(null),{coverSrc:b,fallbackSrc:p,onError:v,isLoading:_}=Ae({items:Ne(c,"books"),id:u=>u.id,existingUrl:u=>u.coverUrl,fetch:u=>ut(u.title,u.author),fallback:u=>Ht(u.title,u.author)}),C=L(()=>{const u=new Map;for(const i of c.books)for(const r of i.genres??[])u.set(r,(u.get(r)??0)+1);return[...u.entries()].sort((i,r)=>r[1]-i[1]).slice(0,8).map(([i])=>i)}),f=L(()=>{let u=c.books;if(w.value){const i=w.value.toLowerCase();u=u.filter(r=>r.title.toLowerCase().includes(i)||r.author.toLowerCase().includes(i)||(r.genres??[]).some(x=>x.toLowerCase().includes(i)))}return g.value&&(u=u.filter(i=>(i.genres??[]).includes(g.value))),u});return(u,i)=>(s(),n("div",fs,[e("div",{class:"p-4 space-y-3",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",ms,[e("h3",{class:o(["text-sm font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.title),3),e("div",ws,[e("span",{class:o(["text-xs font-mono",t(l)?"text-white/30":"text-gray-400"])},d(f.value.length)+" books ",3),ie(u.$slots,"header-actions")])]),W(e("input",{"onUpdate:modelValue":i[0]||(i[0]=r=>w.value=r),type:"text",placeholder:"Search books...",class:o(["w-full px-3 py-2 rounded-lg text-base outline-none transition-colors",t(l)?"bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10":"bg-black/3 text-gray-800 placeholder:text-gray-400 focus:bg-black/5"])},null,2),[[Q,w.value]]),C.value.length>0?(s(),n("div",ys,[(s(!0),n(I,null,B(C.value,r=>(s(),n("button",{key:r,class:o(["text-xs px-2 py-1 rounded-md transition-all duration-150",g.value===r?"nav-tab-active":t(l)?"text-white/40 hover:text-white/70 hover:bg-white/5":"text-gray-500 hover:text-gray-800 hover:bg-black/5"]),onClick:x=>g.value=g.value===r?null:r},d(r),11,ks))),128))])):m("",!0)],4),e("div",$s,[e("div",_s,[(s(!0),n(I,null,B(f.value,r=>(s(),n("button",{key:r.id,class:"group flex flex-col items-stretch text-left w-full path-glass-bubble rounded-2xl overflow-hidden transition-all duration-200 hover:brightness-105","aria-label":`${r.title} by ${r.author}`,onClick:x=>u.$emit("selectBook",r)},[e("div",Ss,[e("div",{class:o(["aspect-[2/3] relative w-full overflow-hidden rounded-[10px]",t(b)(r)?"":t(l)?"bg-white/[0.06]":"bg-black/[0.04]"])},[t(_)(r)?(s(),n("div",js)):m("",!0),t(b)(r)?(s(),n("img",{key:1,src:t(b)(r),alt:`${r.title} by ${r.author}`,class:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-110",loading:"lazy",onError:x=>t(v)(r)},null,40,Ms)):t(_)(r)?m("",!0):(s(),n("img",{key:2,src:t(p)(r),alt:r.title,class:"w-full h-full object-cover"},null,8,Ts)),t(b)(r)?(s(),n("div",Ds)):m("",!0),e("div",Ls,[e("p",Is,d(r.title),1),e("p",Bs,d(r.author),1)]),r.rating?(s(),n("div",Ps,[e("span",Ns," ★ "+d(r.rating.toFixed(1)),1)])):m("",!0),r.year?(s(),n("div",As,[e("span",zs,d(r.year),1)])):m("",!0)],2)])],8,Cs))),128))]),f.value.length===0?(s(),n("div",Fs,[e("p",{class:o(["text-sm",t(l)?"text-white/30":"text-gray-400"])}," No books match your search ",2)])):m("",!0)])]))}}),Rs={class:"h-full flex flex-col"},Vs={class:"flex items-center justify-between gap-2"},Us={class:"flex items-center gap-2 shrink-0"},qs={key:0,class:"flex flex-wrap gap-1.5"},Gs=["onClick"],Os={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-4 pb-16"},Hs={class:"grid grid-cols-2 sm:grid-cols-3 gap-4"},Ws=["aria-label","onClick"],Ks={class:"cover-card flex-1 min-h-0 relative"},Ys={key:0,class:"absolute inset-0 animate-shimmer"},Qs=["src","alt","onError"],Js=["src","alt"],Zs={key:3,class:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent pointer-events-none"},Xs={class:"absolute bottom-0 left-0 right-0 p-2"},en={class:"text-xs font-semibold text-white/90 leading-tight truncate"},tn={class:"text-xs text-white/40 truncate mt-0.5"},sn={key:4,class:"absolute top-1.5 left-1.5"},nn={class:"text-xs px-1.5 py-0.5 rounded bg-black/60 text-amber-400 backdrop-blur-sm font-medium"},ln={key:5,class:"absolute top-1.5 right-1.5"},on={class:"absolute top-1.5 right-1.5 flex gap-0.5 flex-wrap justify-end max-w-[60%]"},an={key:0,class:"flex items-center justify-center py-12"},rn=q({__name:"TVSeriesGrid",props:{series:{},title:{default:"Recommended TV Series"}},emits:["selectSeries"],setup(a){const c=a,{isDark:l}=J(),w=M(""),g=M(null),{coverSrc:b,fallbackSrc:p,onError:v,isLoading:_}=Ae({items:Ne(c,"series"),id:i=>i.id,existingUrl:i=>i.posterUrl||i.backdropUrl,fetch:i=>xt(i.title,i.year).then(r=>r.posterUrl),fallback:i=>Wt(i.title,i.year)});function C(i){return i.year?i.endYear&&i.endYear!==i.year?`${i.year}–${i.endYear}`:i.status==="ongoing"?`${i.year}–`:String(i.year):""}const f=L(()=>{const i=new Map;for(const r of c.series)for(const x of r.genres??[])i.set(x,(i.get(x)??0)+1);return[...i.entries()].sort((r,x)=>x[1]-r[1]).slice(0,8).map(([r])=>r)}),u=L(()=>{let i=c.series;if(w.value){const r=w.value.toLowerCase();i=i.filter(x=>x.title.toLowerCase().includes(r)||(x.creator??"").toLowerCase().includes(r)||(x.network??"").toLowerCase().includes(r)||(x.genres??[]).some(S=>S.toLowerCase().includes(r)))}return g.value&&(i=i.filter(r=>(r.genres??[]).includes(g.value))),i});return(i,r)=>(s(),n("div",Rs,[e("div",{class:"p-4 space-y-3",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",Vs,[e("h3",{class:o(["text-sm font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.title),3),e("div",Us,[e("span",{class:o(["text-xs font-mono",t(l)?"text-white/30":"text-gray-400"])},d(u.value.length)+" series ",3),ie(i.$slots,"header-actions")])]),W(e("input",{"onUpdate:modelValue":r[0]||(r[0]=x=>w.value=x),type:"text",placeholder:"Search TV series...",class:o(["w-full px-3 py-2 rounded-lg text-base outline-none transition-colors",t(l)?"bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10":"bg-black/3 text-gray-800 placeholder:text-gray-400 focus:bg-black/5"])},null,2),[[Q,w.value]]),f.value.length>0?(s(),n("div",qs,[(s(!0),n(I,null,B(f.value,x=>(s(),n("button",{key:x,class:o(["text-xs px-2 py-1 rounded-md transition-all duration-150",g.value===x?"nav-tab-active":t(l)?"text-white/40 hover:text-white/70 hover:bg-white/5":"text-gray-500 hover:text-gray-800 hover:bg-black/5"]),onClick:S=>g.value=g.value===x?null:x},d(x),11,Gs))),128))])):m("",!0)],4),e("div",Os,[e("div",Hs,[(s(!0),n(I,null,B(u.value,x=>(s(),n("button",{key:x.id,class:"group flex flex-col items-stretch text-left w-full path-glass-bubble rounded-2xl overflow-hidden transition-all duration-200 hover:brightness-105","aria-label":x.title,onClick:S=>i.$emit("selectSeries",x)},[e("div",Ks,[e("div",{class:o(["aspect-[2/3] relative w-full overflow-hidden rounded-[10px]",t(b)(x)?"":t(l)?"bg-white/[0.06]":"bg-black/[0.04]"])},[t(_)(x)?(s(),n("div",Ys)):m("",!0),t(b)(x)?(s(),n("img",{key:1,src:t(b)(x),alt:`${x.title} — TV Series`,class:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-110",loading:"lazy",onError:S=>t(v)(x)},null,40,Qs)):t(_)(x)?m("",!0):(s(),n("img",{key:2,src:t(p)(x),alt:x.title,class:"w-full h-full object-cover"},null,8,Js)),t(b)(x)?(s(),n("div",Zs)):m("",!0),e("div",Xs,[e("p",en,d(x.title),1),e("p",tn,[ne(d(C(x)),1),x.seasons?(s(),n(I,{key:0},[ne(" · "+d(x.seasons)+"S",1)],64)):m("",!0)])]),x.rating?(s(),n("div",sn,[e("span",nn," ★ "+d(x.rating.toFixed(1)),1)])):m("",!0),x.status==="ongoing"?(s(),n("div",ln,[...r[1]||(r[1]=[e("span",{class:"text-xs px-1 py-0.5 rounded bg-emerald-500/80 text-white backdrop-blur-sm"}," ongoing ",-1)])])):m("",!0),e("div",on,[(s(!0),n(I,null,B((x.sources??[]).slice(0,2),S=>(s(),n("span",{key:S.type,class:"text-xs px-1 py-0.5 rounded bg-black/60 text-white/70 backdrop-blur-sm"},d(S.type),1))),128))])],2)])],8,Ws))),128))]),u.value.length===0?(s(),n("div",an,[e("p",{class:o(["text-sm",t(l)?"text-white/30":"text-gray-400"])}," No TV series match your search ",2)])):m("",!0)])]))}}),cn={class:"h-full flex flex-col"},dn={class:"flex items-center justify-between gap-2"},un={class:"flex items-center gap-2 shrink-0"},xn={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-4 pb-16"},hn={class:"columns-2 sm:columns-3 gap-3 space-y-3"},pn=["aria-label","onClick"],gn=["src","alt","onError"],vn={key:2,class:"absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/70 via-black/30 to-transparent"},bn={key:0,class:"text-xs font-medium text-white/90 truncate"},fn={key:1,class:"text-xs text-white/50 truncate"},mn={key:0,class:"flex items-center justify-center py-12"},wn=q({__name:"ImageGrid",props:{images:{},title:{default:"Images"}},emits:["selectImage"],setup(a){const{isDark:c}=J(),l=M(new Set);function w(g){l.value.add(g.id),l.value=new Set(l.value)}return(g,b)=>(s(),n("div",cn,[e("div",{class:"p-4 space-y-3",style:G(t(c)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",dn,[e("h3",{class:o(["text-sm font-bold",t(c)?"text-white/90":"text-gray-900"])},d(a.title),3),e("div",un,[e("span",{class:o(["text-xs font-mono",t(c)?"text-white/30":"text-gray-400"])},d(a.images.length)+" images ",3),ie(g.$slots,"header-actions")])])],4),e("div",xn,[e("div",hn,[(s(!0),n(I,null,B(a.images,p=>(s(),n("button",{key:p.id,class:o(["group w-full break-inside-avoid text-left rounded-xl overflow-hidden transition-all duration-200 hover:brightness-110 relative",t(c)?"bg-white/5":"bg-black/3"]),"aria-label":p.alt||p.title||"Image",onClick:v=>g.$emit("selectImage",p)},[l.value.has(p.id)?(s(),n("div",{key:1,class:o(["w-full aspect-[4/3] flex items-center justify-center",t(c)?"bg-white/5":"bg-black/5"])},[(s(),n("svg",{class:o(["w-8 h-8",t(c)?"text-white/15":"text-gray-300"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...b[0]||(b[0]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"},null,-1)])],2))],2)):(s(),n("img",{key:0,src:p.url,alt:p.alt||p.title||"Image",class:"w-full block transition-transform duration-300 group-hover:scale-[1.03]",loading:"lazy",onError:v=>w(p)},null,40,gn)),p.title||p.source?(s(),n("div",vn,[p.title?(s(),n("p",bn,d(p.title),1)):m("",!0),p.source?(s(),n("p",fn,d(p.source),1)):m("",!0)])):m("",!0)],10,pn))),128))]),a.images.length===0?(s(),n("div",mn,[e("p",{class:o(["text-sm",t(c)?"text-white/30":"text-gray-400"])}," No images found ",2)])):m("",!0)])]))}}),yn={class:"h-full flex flex-col"},kn={class:"p-4 space-y-3"},$n={class:"flex items-center justify-between"},_n={class:"shrink-0 flex items-center gap-2"},Cn={key:0,class:"flex flex-wrap gap-1.5"},Sn=["onClick"],jn={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pb-16"},Mn={class:"grid grid-cols-2 sm:grid-cols-3 gap-3"},Tn=["aria-label","onClick"],Dn={class:"aspect-[4/3] relative w-full overflow-hidden rounded-t-[10px]"},Ln={key:0,class:"absolute inset-0 animate-shimmer"},In=["src","alt","onError"],Bn=["src","alt"],Pn={key:3,class:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent pointer-events-none"},Nn={class:"absolute bottom-0 left-0 right-0 p-2"},An={class:"text-xs font-semibold text-white/90 truncate"},zn={class:"text-xs text-white/40 truncate mt-0.5"},Fn={key:4,class:"absolute top-1.5 right-1.5"},En={class:"text-xs px-1.5 py-0.5 rounded bg-black/60 text-amber-400 backdrop-blur-sm font-semibold"},Rn={key:5,class:"absolute top-1.5 left-1.5"},Vn={class:"text-xs px-1 py-0.5 rounded bg-black/60 text-white/70 backdrop-blur-sm"},Un={key:0,class:"flex items-center justify-center py-12"},qn=q({__name:"PlaceGrid",props:{places:{},title:{default:"Places"}},emits:["selectPlace"],setup(a){const c=a,{isDark:l}=J(),w=M(""),g=M(null),{coverSrc:b,fallbackSrc:p,onError:v,isLoading:_}=Ae({items:Ne(c,"places"),id:u=>u.id,existingUrl:u=>u.photoUrl,fetch:u=>pt(u.name,u.city),fallback:u=>ht(u.name,u.cuisine||u.category)}),C=L(()=>{const u=new Map;for(const i of c.places){const r=i.cuisine||i.category;r&&u.set(r,(u.get(r)??0)+1)}return[...u.entries()].sort((i,r)=>r[1]-i[1]).slice(0,8).map(([i])=>i)}),f=L(()=>{let u=c.places;if(w.value){const i=w.value.toLowerCase();u=u.filter(r=>r.name.toLowerCase().includes(i)||r.cuisine?.toLowerCase().includes(i)||r.category?.toLowerCase().includes(i)||r.city?.toLowerCase().includes(i)||r.address?.toLowerCase().includes(i))}return g.value&&(u=u.filter(i=>i.cuisine===g.value||i.category===g.value)),u});return(u,i)=>(s(),n("div",yn,[e("div",kn,[e("div",$n,[e("h3",{class:o(["text-base font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.title||"Places"),3),e("div",_n,[e("span",{class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])},d(f.value.length)+" places ",3),ie(u.$slots,"header-actions")])]),W(e("input",{"onUpdate:modelValue":i[0]||(i[0]=r=>w.value=r),type:"text",placeholder:"Search places...",class:o(["w-full text-base px-3 py-2 rounded-lg outline-none transition-colors",t(l)?"bg-white/5 text-white/80 placeholder-white/25 focus:bg-white/8":"bg-black/5 text-gray-800 placeholder-gray-400 focus:bg-black/8"])},null,2),[[Q,w.value]]),C.value.length>1?(s(),n("div",Cn,[(s(!0),n(I,null,B(C.value,r=>(s(),n("button",{key:r,class:o(["text-xs px-2 py-1 rounded-md font-medium transition-all duration-150",g.value===r?"nav-tab-active":t(l)?"bg-white/5 text-white/40 hover:text-white/70":"bg-black/5 text-gray-500 hover:text-gray-800"]),onClick:x=>g.value=g.value===r?null:r},d(r),11,Sn))),128))])):m("",!0)]),e("div",jn,[e("div",Mn,[(s(!0),n(I,null,B(f.value,r=>(s(),n("button",{key:r.id,class:"group flex flex-col items-stretch text-left w-full path-glass-bubble rounded-2xl overflow-hidden transition-all duration-200 hover:brightness-105","aria-label":r.name,onClick:x=>u.$emit("selectPlace",r)},[e("div",Dn,[t(_)(r)?(s(),n("div",Ln)):m("",!0),t(b)(r)?(s(),n("img",{key:1,src:t(b)(r),alt:r.name,class:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-110",loading:"lazy",onError:x=>t(v)(r)},null,40,In)):t(_)(r)?m("",!0):(s(),n("img",{key:2,src:t(p)(r),alt:r.name,class:"w-full h-full object-cover"},null,8,Bn)),t(b)(r)?(s(),n("div",Pn)):m("",!0),e("div",Nn,[e("p",An,d(r.name),1),e("p",zn,d(r.cuisine||r.category),1)]),r.rating?(s(),n("div",Fn,[e("span",En," ★ "+d(r.rating.toFixed(1)),1)])):m("",!0),r.priceLevel?(s(),n("div",Rn,[e("span",Vn,d("$".repeat(r.priceLevel)),1)])):m("",!0)])],8,Tn))),128))]),f.value.length===0?(s(),n("div",Un,[e("p",{class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])}," No places match your search ",2)])):m("",!0)])]))}}),Gn={class:"h-full flex flex-col"},On={class:"flex items-center justify-between gap-2"},Hn={class:"flex items-center gap-2 shrink-0"},Wn={key:0,class:"flex flex-wrap gap-1.5"},Kn=["onClick"],Yn={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-4 pb-16"},Qn={class:"grid grid-cols-2 sm:grid-cols-3 gap-4"},Jn=["aria-label","onClick"],Zn={class:"cover-card flex-1 min-h-0 relative"},Xn={key:0,class:"absolute inset-0 animate-shimmer"},el=["src","alt","onError"],tl=["src","alt"],sl={key:3,class:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent pointer-events-none"},nl={class:"absolute bottom-0 left-0 right-0 p-2"},ll={class:"text-xs font-semibold text-white/90 leading-tight truncate"},ol={class:"text-xs text-white/40 truncate mt-0.5"},al={class:"absolute top-1.5 right-1.5 flex gap-0.5 flex-wrap justify-end max-w-[60%]"},il={key:0,class:"flex items-center justify-center py-12"},rl=q({__name:"PodcastGrid",props:{podcasts:{},title:{default:"Recommended Podcasts"}},emits:["selectPodcast"],setup(a){const c=a,{isDark:l}=J(),w=M(""),g=M(null),{coverSrc:b,fallbackSrc:p,onError:v,isLoading:_}=Ae({items:Ne(c,"podcasts"),id:u=>u.id,existingUrl:u=>u.coverUrl,fetch:u=>vt(u.title,u.host),fallback:u=>gt(u.title,u.host)}),C=L(()=>{const u=new Map;for(const i of c.podcasts)for(const r of i.genres??[])u.set(r,(u.get(r)??0)+1);return[...u.entries()].sort((i,r)=>r[1]-i[1]).slice(0,8).map(([i])=>i)}),f=L(()=>{let u=c.podcasts;if(w.value){const i=w.value.toLowerCase();u=u.filter(r=>r.title.toLowerCase().includes(i)||(r.host??"").toLowerCase().includes(i)||(r.genres??[]).some(x=>x.toLowerCase().includes(i)))}return g.value&&(u=u.filter(i=>(i.genres??[]).includes(g.value))),u});return(u,i)=>(s(),n("div",Gn,[e("div",{class:"p-4 space-y-3",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",On,[e("h3",{class:o(["text-sm font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.title),3),e("div",Hn,[e("span",{class:o(["text-xs font-mono",t(l)?"text-white/30":"text-gray-400"])},d(f.value.length)+" podcasts ",3),ie(u.$slots,"header-actions")])]),W(e("input",{"onUpdate:modelValue":i[0]||(i[0]=r=>w.value=r),type:"text",placeholder:"Search podcasts...",class:o(["w-full px-3 py-2 rounded-lg text-base outline-none transition-colors",t(l)?"bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10":"bg-black/3 text-gray-800 placeholder:text-gray-400 focus:bg-black/5"])},null,2),[[Q,w.value]]),C.value.length>0?(s(),n("div",Wn,[(s(!0),n(I,null,B(C.value,r=>(s(),n("button",{key:r,class:o(["text-xs px-2 py-1 rounded-md transition-all duration-150",g.value===r?"nav-tab-active":t(l)?"text-white/40 hover:text-white/70 hover:bg-white/5":"text-gray-500 hover:text-gray-800 hover:bg-black/5"]),onClick:x=>g.value=g.value===r?null:r},d(r),11,Kn))),128))])):m("",!0)],4),e("div",Yn,[e("div",Qn,[(s(!0),n(I,null,B(f.value,r=>(s(),n("button",{key:r.id,class:"group flex flex-col items-stretch text-left w-full path-glass-bubble rounded-2xl overflow-hidden transition-all duration-200 hover:brightness-105","aria-label":r.title,onClick:x=>u.$emit("selectPodcast",r)},[e("div",Zn,[e("div",{class:o(["aspect-square relative w-full overflow-hidden rounded-[10px]",t(b)(r)?"":t(l)?"bg-white/[0.06]":"bg-black/[0.04]"])},[t(_)(r)?(s(),n("div",Xn)):m("",!0),t(b)(r)?(s(),n("img",{key:1,src:t(b)(r),alt:r.title,class:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-110",loading:"lazy",onError:x=>t(v)(r)},null,40,el)):t(_)(r)?m("",!0):(s(),n("img",{key:2,src:t(p)(r),alt:r.title,class:"w-full h-full object-cover"},null,8,tl)),t(b)(r)?(s(),n("div",sl)):m("",!0),e("div",nl,[e("p",ll,d(r.title),1),e("p",ol,d(r.host||"Podcast"),1)]),e("div",al,[(s(!0),n(I,null,B(r.sources.slice(0,2),x=>(s(),n("span",{key:x.type,class:"text-xs px-1 py-0.5 rounded bg-black/60 text-white/70 backdrop-blur-sm"},d(x.type),1))),128))])],2)])],8,Jn))),128))]),f.value.length===0?(s(),n("div",il,[e("p",{class:o(["text-sm",t(l)?"text-white/30":"text-gray-400"])}," No podcasts match your search ",2)])):m("",!0)])]))}}),cl={class:"shrink-0"},dl={class:"flex-1 overflow-y-auto custom-scrollbar"},ul={key:0,class:"relative overflow-hidden",style:{minHeight:"180px"}},xl={class:"absolute inset-0"},hl=["src"],pl={class:"relative z-10 flex flex-col justify-end h-full px-5 pb-5 pt-12",style:{"min-height":"180px"}},gl={class:"px-3 pt-2 pb-8"},vl={key:0,"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 2a10 10 0 100 20 10 10 0 000-20zm0 0v2m0 16v2m10-10h-2M4 12H2m15.07-5.07l-1.41 1.41M8.34 15.66l-1.41 1.41m0-11.14l1.41 1.41m7.32 7.32l1.41 1.41"},bl={key:1,"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"},fl={key:2,"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"},ml={key:3,"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 6h16M4 12h16M4 18h7"},wl=["onClick"],yl=["onClick"],kl={key:1,class:"flex items-center justify-center py-16 px-4"},$l=q({__name:"MagazineGrid",props:{sections:{},heroImageUrl:{default:null},title:{default:"Brief"},query:{default:""}},setup(a){const c=a,{isDark:l}=J(),{openMagazineSectionDetail:w}=$e(),g=["compass","bookmark","lightning","lines"];function b(f){return f.replace(/\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/https?:\/\/\S+/g,"").replace(/\uFE0F/g,"").replace(new RegExp("(?:^|(?<=\\s))[\\p{Emoji_Presentation}\\p{Extended_Pictographic}]+\\s*","gu"),"").replace(/---+/g,"").replace(/^#+\s*/gm,"").replace(/\*\*/g,"").replace(/\*([^*\n]+)\*/g,"$1").replace(/\|/g,", ").replace(/,\s*,+/g,",").replace(/^\s*[-•]\s+/gm,"").replace(/\n+/g," ").replace(/(^|\s),\s*/g,"$1").trim()}function p(f,u){const i=b(f);return i.length<=u?i:i.slice(0,u).replace(/\s+\S*$/,"")+" ..."}const v=L(()=>{const f=[],u=c.sections;if(!u.length)return f;let i=0;for(const j of c.query||"brief")i=(i<<5)-i+j.charCodeAt(0)|0;let r="",x=0,S=!1;return u.forEach((j,P)=>{if(P===0&&!j.group){f.push({type:"wide",title:j.title,text:p(j.content,200),label:"The Lead",author:j.author,section:j});return}const D=j.group||"";if(D&&D!==r&&(S&&(f.push({type:"dark",title:"",text:""}),S=!1),f.push({type:"banner",title:"",text:"",icon:g[x%g.length],label:D}),x++,r=D),D){const y=S?"dark":"half",k=b(j.content),h=b(j.title),$=k.toLowerCase().startsWith(h.toLowerCase().slice(0,30));f.push({type:y,title:$?"":j.title,text:p(j.content,$?160:100),section:j}),S=!S}else S&&(f.push({type:"dark",title:"",text:""}),S=!1),f.push({type:"wide",title:j.title,text:p(j.content,180),author:j.author,section:j})}),S&&f.push({type:"dark",title:"",text:""}),f});function _(f){const u=c.sections.indexOf(f);w(f,u>=0?u:0)}const C=L(()=>{const f=(c.query??"").trim();return f?f.length>100?f.slice(0,97)+"...":f:c.title});return(f,u)=>(s(),n("div",{class:o(["magazine h-full flex flex-col",t(l)?"magazine-dark":"magazine-light"])},[e("header",{class:o(["shrink-0 px-5 py-4 flex items-center justify-between border-b",t(l)?"border-white/10":"border-black/10"])},[e("h1",{class:o(["font-serif text-xl font-bold tracking-tight",t(l)?"text-white":"text-black"])}," AI Brief ",2),e("div",cl,[ie(f.$slots,"header-actions",{},void 0,!0)])],2),e("div",dl,[C.value?(s(),n("div",ul,[e("div",xl,[a.heroImageUrl?(s(),n("img",{key:0,src:a.heroImageUrl,alt:"",class:"w-full h-full object-cover",style:{filter:"saturate(0.3) contrast(1.1)"}},null,8,hl)):(s(),n("div",{key:1,class:o(["w-full h-full",t(l)?"bg-gradient-to-br from-white/[0.04] via-white/[0.02] to-transparent":"bg-gradient-to-br from-black/[0.06] via-black/[0.03] to-transparent"])},null,2))]),e("div",{class:o(["absolute inset-0",t(l)?"bg-gradient-to-t from-[#0a0a0a] via-[#0a0a0a]/80 to-[#0a0a0a]/60":"bg-gradient-to-t from-[#faf9f6] via-[#faf9f6]/85 to-[#faf9f6]/65"])},null,2),e("div",pl,[e("p",{class:o(["text-xs uppercase tracking-[0.3em] font-medium mb-2",t(l)?"text-white/40":"text-black/40"])}," In response to ",2),e("p",{class:o(["font-serif text-2xl italic leading-tight",t(l)?"text-white/70":"text-black/60"])},d(C.value),3)])])):m("",!0),e("div",gl,[e("div",{class:o(["grid grid-cols-2 gap-px",t(l)?"bg-white/12":"bg-black/10"])},[(s(!0),n(I,null,B(v.value,(i,r)=>(s(),n(I,{key:r},[i.type==="banner"?(s(),n("div",{key:0,class:o(["col-span-2 flex flex-col items-center justify-center py-8 px-5",t(l)?"bg-[#0a0a0a]":"bg-[#faf9f6]"])},[(s(),n("svg",{class:o(["w-5 h-5 mb-2.5",t(l)?"text-white/20":"text-black/15"]),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[i.icon==="compass"?(s(),n("path",vl)):i.icon==="bookmark"?(s(),n("path",bl)):i.icon==="lightning"?(s(),n("path",fl)):(s(),n("path",ml))],2)),e("p",{class:o(["text-xs uppercase tracking-[0.3em] font-semibold text-center",t(l)?"text-white/30":"text-black/30"])},d(i.label),3)],2)):i.type==="wide"?(s(),n("button",{key:1,class:o(["col-span-2 text-left px-5 py-5 transition-colors cursor-pointer",t(l)?"bg-[#0a0a0a] hover:bg-white/[0.03]":"bg-[#faf9f6] hover:bg-black/[0.02]"]),onClick:x=>i.section&&_(i.section)},[i.label?(s(),n("p",{key:0,class:o(["text-xs uppercase tracking-[0.3em] font-semibold mb-2",t(l)?"text-white/30":"text-black/35"])},d(i.label),3)):m("",!0),e("h2",{class:o(["font-serif text-lg font-bold leading-snug mb-2",t(l)?"text-white/95":"text-black/90"])},d(i.title),3),i.author?(s(),n("p",{key:1,class:o(["text-xs mb-2",t(l)?"text-white/40":"text-black/40"])}," By "+d(i.author),3)):m("",!0),e("p",{class:o(["font-serif text-sm leading-relaxed",t(l)?"text-white/70":"text-black/60"])},d(i.text),3)],10,wl)):(s(),n("button",{key:2,class:o(["text-left px-4 py-4 transition-colors flex flex-col cursor-pointer",[t(l)?"bg-[#0a0a0a] hover:bg-white/[0.03]":"bg-[#faf9f6] hover:bg-black/[0.02]",i.type==="dark"?t(l)?"bg-white/[0.04]":"bg-black/[0.04]":""]]),onClick:x=>i.section&&_(i.section)},[i.label?(s(),n("p",{key:0,class:o(["text-xs uppercase tracking-[0.25em] font-semibold mb-1.5",t(l)?"text-white/25":"text-black/30"])},d(i.label),3)):m("",!0),i.title?(s(),n("h3",{key:1,class:o(["font-serif text-sm font-bold leading-snug mb-1",t(l)?"text-white/90":"text-black/85"])},d(i.title),3)):m("",!0),e("p",{class:o(["font-serif text-xs leading-relaxed flex-1",[t(l)?"text-white/55":"text-black/50",i.title?"":"italic"]])},d(i.text),3)],10,yl))],64))),128))],2)]),a.sections.length===0?(s(),n("div",kl,[e("p",{class:o(["text-sm",t(l)?"text-white/40":"text-gray-400"])}," No sections to display ",2)])):m("",!0)])],2))}}),ot=De($l,[["__scopeId","data-v-02741b8c"]]),_l={class:"h-full flex flex-col"},Cl={class:"flex items-center justify-between gap-2"},Sl={class:"flex items-center gap-2 shrink-0"},jl=["placeholder"],Ml={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-4 pb-16"},Tl={class:"grid grid-cols-2 sm:grid-cols-3 gap-4"},Dl=["aria-label","onClick"],Ll={class:"cover-card flex-1 min-h-0 relative"},Il={class:"aspect-[4/3] flex flex-col w-full overflow-hidden rounded-[10px]"},Bl={class:"flex-1 min-h-0 relative"},Pl=["src","alt","onError"],Nl={key:2,class:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent pointer-events-none"},Al={key:0,class:"flex items-center justify-center py-12"},at=q({__name:"NewsGrid",props:{articles:{},title:{default:"News & Articles"},query:{default:""},variant:{default:"news"}},setup(a){const c=a,{isDark:l}=J(),{openArticleDetail:w,openWebsiteDetail:g}=$e(),b=M(""),p=M(new Set);function v(x){return!x||typeof x!="string"?!1:/^https?:\/\//i.test(x.trim())}function _(x){p.value=new Set([...p.value,x])}function C(x){try{return new URL(x).hostname.replace(/^www\./,"")}catch{return x}}function f(x){return c.variant==="websites"?Kt(x.title,C(x.url)):Yt(x.title,C(x.url))}function u(x){c.variant==="websites"?g(x):w(x)}function i(x,S){if(!S.trim())return 0;const P=S.toLowerCase().split(/\s+/).filter($=>$.length>1);if(P.length===0)return 0;const D=x.title.toLowerCase(),y=(x.content??"").toLowerCase(),k=x.url.toLowerCase();let h=0;for(const $ of P)D.includes($)&&(h+=3),y.includes($)&&(h+=2),k.includes($)&&(h+=1);return h}const r=L(()=>{let x=c.articles;if(b.value.trim()){const S=b.value.toLowerCase();x=x.filter(j=>j.title.toLowerCase().includes(S)||(j.content??"").toLowerCase().includes(S)||j.url.toLowerCase().includes(S))}return c.query.trim()?[...x].sort((S,j)=>i(j,c.query)-i(S,c.query)):x});return(x,S)=>(s(),n("div",_l,[e("div",{class:"p-4 space-y-3",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",Cl,[e("h3",{class:o(["text-sm font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.title),3),e("div",Sl,[e("span",{class:o(["text-xs font-mono",t(l)?"text-white/30":"text-gray-400"])},d(r.value.length)+" "+d(a.variant==="websites"?"websites":"articles"),3),ie(x.$slots,"header-actions")])]),W(e("input",{"onUpdate:modelValue":S[0]||(S[0]=j=>b.value=j),type:"text",placeholder:a.variant==="websites"?"Search websites...":"Search articles...",class:o(["w-full px-3 py-2 rounded-lg text-base outline-none transition-colors",t(l)?"bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10":"bg-black/3 text-gray-800 placeholder:text-gray-400 focus:bg-black/5"])},null,10,jl),[[Q,b.value]])],4),e("div",Ml,[e("div",Tl,[(s(!0),n(I,null,B(r.value,(j,P)=>(s(),n("button",{key:P,class:"group flex flex-col items-stretch text-left w-full path-glass-bubble rounded-2xl overflow-hidden transition-all duration-200 hover:brightness-105","aria-label":j.title,onClick:D=>u(j)},[e("div",Ll,[e("div",Il,[e("div",Bl,[v(j.imgSrc)&&!p.value.has(j.url)?(s(),n("img",{key:0,src:j.imgSrc,alt:j.title,class:"absolute inset-0 w-full h-full object-cover transition-transform duration-300 group-hover:scale-110",loading:"lazy",onError:D=>_(j.url)},null,40,Pl)):(s(),n("div",{key:1,class:"absolute inset-0 bg-cover bg-center",style:G({backgroundImage:`url(${f(j)})`})},null,4)),v(j.imgSrc)&&!p.value.has(j.url)?(s(),n("div",Nl)):m("",!0)]),e("div",{class:o(["shrink-0 p-2 backdrop-blur-md rounded-b-[10px]",[t(l)?"bg-black shadow-[inset_0_1px_0_rgba(255,255,255,0.12)]":"bg-white shadow-[inset_0_1px_0_rgba(0,0,0,0.06)]"]])},[e("p",{class:o(["text-xs font-semibold leading-tight line-clamp-2",t(l)?"text-white/95":"text-gray-900"])},d(j.title),3),j.content?(s(),n("p",{key:0,class:o(["text-xs line-clamp-1 mt-0.5",t(l)?"text-white/70":"text-gray-600"])},d(j.content),3)):m("",!0),e("p",{class:o(["text-xs truncate mt-0.5",t(l)?"text-white/50":"text-gray-500"])},d(C(j.url)),3)],2)])])],8,Dl))),128))]),r.value.length===0?(s(),n("div",Al,[e("p",{class:o(["text-sm",t(l)?"text-white/30":"text-gray-400"])},d(a.variant==="websites"?"No websites match your search":"No articles match your search"),3)])):m("",!0)])]))}}),zl={class:"h-full flex flex-col"},Fl={class:"flex items-center justify-between gap-2"},El={class:"flex items-center gap-2 shrink-0"},Rl={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-4 pb-16"},Vl={class:"grid grid-cols-1 sm:grid-cols-2 gap-3"},Ul=["aria-label","onClick"],ql={class:"aspect-[3/1] relative w-full overflow-hidden"},Gl=["src","alt"],Ol={class:"p-3"},Hl={class:"flex items-center gap-3 mt-2 flex-wrap"},Wl={key:0,class:"flex items-center justify-center py-12"},Kl=q({__name:"RecipeGrid",props:{recipes:{},title:{default:"Recipes"}},emits:["selectRecipe"],setup(a){const c=a,{isDark:l}=J(),w=M(""),g=L(()=>{if(!w.value.trim())return c.recipes;const b=w.value.toLowerCase();return c.recipes.filter(p=>p.title.toLowerCase().includes(b)||p.ingredients.some(v=>v.toLowerCase().includes(b)))});return(b,p)=>(s(),n("div",zl,[e("div",{class:"p-4 space-y-3",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",Fl,[e("h3",{class:o(["text-sm font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.title),3),e("div",El,[e("span",{class:o(["text-xs font-mono",t(l)?"text-white/30":"text-gray-400"])},d(g.value.length)+" recipes ",3),ie(b.$slots,"header-actions")])]),a.recipes.length>3?W((s(),n("input",{key:0,"onUpdate:modelValue":p[0]||(p[0]=v=>w.value=v),type:"text",placeholder:"Search recipes...",class:o(["w-full px-3 py-2 rounded-lg text-base outline-none transition-colors",t(l)?"bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10":"bg-black/3 text-gray-800 placeholder:text-gray-400 focus:bg-black/5"])},null,2)),[[Q,w.value]]):m("",!0)],4),e("div",Rl,[e("div",Vl,[(s(!0),n(I,null,B(g.value,(v,_)=>(s(),n("button",{key:_,class:o(["group flex flex-col items-stretch text-left w-full rounded-2xl overflow-hidden transition-all duration-200 hover:brightness-105",t(l)?"bg-white/[0.04] border border-white/8 hover:bg-white/[0.07]":"bg-black/[0.02] border border-black/5 hover:bg-black/[0.05]"]),"aria-label":v.title,onClick:C=>b.$emit("selectRecipe",v)},[e("div",ql,[e("img",{src:t(Qt)(v.title,v.time),alt:v.title,class:"w-full h-full object-cover"},null,8,Gl)]),e("div",Ol,[e("p",{class:o(["text-sm font-semibold leading-tight line-clamp-2",t(l)?"text-white/90":"text-gray-900"])},d(v.title),3),e("div",Hl,[v.time?(s(),n("span",{key:0,class:o(["flex items-center gap-1 text-xs",t(l)?"text-white/40":"text-gray-500"])},[p[1]||(p[1]=e("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),ne(" "+d(v.time),1)],2)):m("",!0),v.servings?(s(),n("span",{key:1,class:o(["flex items-center gap-1 text-xs",t(l)?"text-white/40":"text-gray-500"])},[p[2]||(p[2]=e("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),ne(" "+d(v.servings),1)],2)):m("",!0),v.calories?(s(),n("span",{key:2,class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},d(v.calories)+" cal ",3)):m("",!0)]),v.ingredients.length>0?(s(),n("p",{key:0,class:o(["text-xs mt-2 line-clamp-1",t(l)?"text-white/25":"text-gray-400"])},d(v.ingredients.slice(0,4).join(" · ")),3)):m("",!0)])],10,Ul))),128))]),g.value.length===0?(s(),n("div",Wl,[e("p",{class:o(["text-sm",t(l)?"text-white/30":"text-gray-400"])}," No recipes match your search ",2)])):m("",!0)])]))}}),Yl={class:"h-full flex flex-col"},Ql={class:"flex items-center justify-between gap-2"},Jl={class:"flex flex-wrap gap-1.5"},Zl=["onClick"],Xl={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-4 pb-16"},eo={class:"space-y-2"},to=["aria-label","onClick"],so={class:"text-white/90"},no={class:"flex-1 min-w-0"},lo={class:"flex items-center gap-2"},oo={class:"flex gap-1 mt-1.5"},ao={key:0,class:"flex items-center justify-center py-12"},io=q({__name:"AppsGrid",props:{apps:{},title:{default:"Recommended Apps"}},emits:["selectApp"],setup(a){const c=a,{isDark:l}=J(),w=M(""),g=M(null),b=[{value:"nostr-client",label:"Nostr"},{value:"lightning-wallet",label:"Lightning"},{value:"bitcoin-wallet",label:"Bitcoin"},{value:"privacy",label:"Privacy"},{value:"node",label:"Nodes"},{value:"dev-tool",label:"Dev"}];function p(f){return b.find(u=>u.value===f)?.label??f}function v(f){return{ios:"iOS",android:"Android",web:"Web",desktop:"Desktop",cli:"CLI",nodeos:"Node"}[f]??f}function _(f){let u=0;for(let r=0;r<f.length;r++)u=f.charCodeAt(r)+((u<<5)-u);const i=Math.abs(u%360);return`linear-gradient(135deg, hsl(${i}, 60%, 35%), hsl(${(i+40)%360}, 50%, 25%))`}const C=L(()=>{let f=c.apps;if(w.value){const u=w.value.toLowerCase();f=f.filter(i=>i.name.toLowerCase().includes(u)||i.description.toLowerCase().includes(u)||i.keywords.some(r=>r.toLowerCase().includes(u)))}return g.value&&(f=f.filter(u=>u.category===g.value)),f});return(f,u)=>(s(),n("div",Yl,[e("div",{class:"p-4 space-y-3",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",Ql,[e("h3",{class:o(["text-sm font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.title),3),e("span",{class:o(["text-xs font-mono",t(l)?"text-white/30":"text-gray-400"])},d(C.value.length)+" apps ",3)]),W(e("input",{"onUpdate:modelValue":u[0]||(u[0]=i=>w.value=i),type:"text",placeholder:"Search apps...",class:o(["w-full px-3 py-2 rounded-lg text-base outline-none transition-colors",t(l)?"bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10":"bg-black/3 text-gray-800 placeholder:text-gray-400 focus:bg-black/5"])},null,2),[[Q,w.value]]),e("div",Jl,[(s(),n(I,null,B(b,i=>e("button",{key:i.value,class:o(["text-xs px-2 py-1 rounded-md transition-all duration-150",g.value===i.value?"nav-tab-active":t(l)?"text-white/40 hover:text-white/70 hover:bg-white/5":"text-gray-500 hover:text-gray-800 hover:bg-black/5"]),onClick:r=>g.value=g.value===i.value?null:i.value},d(i.label),11,Zl)),64))])],4),e("div",Xl,[e("div",eo,[(s(!0),n(I,null,B(C.value,i=>(s(),n("button",{key:i.id,class:o(["w-full text-left p-3 rounded-xl transition-all duration-200 flex items-start gap-3",t(l)?"bg-white/5 hover:bg-white/10":"bg-black/3 hover:bg-black/5"]),"aria-label":i.name,onClick:r=>f.$emit("selectApp",i)},[e("div",{class:"w-10 h-10 rounded-xl flex items-center justify-center text-lg font-bold shrink-0",style:G({background:_(i.id)})},[e("span",so,d(i.name.charAt(0)),1)],4),e("div",no,[e("div",lo,[e("p",{class:o(["text-xs font-semibold truncate",t(l)?"text-white/90":"text-gray-900"])},d(i.name),3),e("span",{class:o(["text-xs px-1.5 py-0.5 rounded font-medium shrink-0",t(l)?"bg-white/10 text-white/50":"bg-black/5 text-gray-500"])},d(p(i.category)),3)]),e("p",{class:o(["text-xs mt-0.5 line-clamp-2",t(l)?"text-white/50":"text-gray-500"])},d(i.description),3),e("div",oo,[(s(!0),n(I,null,B(i.platforms,r=>(s(),n("span",{key:r,class:o(["text-xs px-1 py-0.5 rounded",t(l)?"bg-white/5 text-white/30":"bg-black/3 text-gray-400"])},d(v(r)),3))),128))])])],10,to))),128))]),C.value.length===0?(s(),n("div",ao,[e("p",{class:o(["text-sm",t(l)?"text-white/30":"text-gray-400"])}," No apps match your search ",2)])):m("",!0)])]))}}),ro={class:"group/node"},co={key:0,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},uo={key:1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},xo={class:"truncate flex-1"},ho={key:0,class:"w-2.5 h-2.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},po={key:0,class:"w-2.5 h-2.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},go={key:0},vo=q({__name:"FileTreeNode",props:{entry:{},activeFile:{},depth:{}},emits:["select","toggle-context"],setup(a,{emit:c}){const l=a,{isFileSelected:w}=pe(),g=c,{isDark:b}=J(),p=M(l.depth<1),v=L(()=>!l.entry.isDirectory&&l.activeFile===l.entry.path),_=L(()=>!l.entry.isDirectory&&w(l.entry.path)),C=L(()=>l.entry.isDirectory&&w(l.entry.path));function f(){l.entry.isDirectory?p.value=!p.value:g("select",l.entry.path)}function u(){g("toggle-context",l.entry.path)}function i(){g("toggle-context",l.entry.path)}return(r,x)=>{const S=Jt("FileTreeNode",!0);return s(),n("div",ro,[e("div",{class:o(["w-full flex items-center gap-1.5 py-1 px-2 rounded-lg text-xs transition-colors cursor-pointer",[v.value?t(b)?"bg-white/10 text-white/90":"bg-black/8 text-gray-900":t(b)?"text-white/60 hover:bg-white/[0.04] hover:text-white/80":"text-gray-600 hover:bg-black/[0.03] hover:text-gray-800"]]),style:G({paddingLeft:`${a.depth*12+8}px`}),onClick:f},[a.entry.isDirectory?(s(),n("svg",{key:0,class:o(["w-3 h-3 shrink-0 transition-transform duration-150",p.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...x[2]||(x[2]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)):m("",!0),(s(),n("svg",{class:o(["w-3.5 h-3.5 shrink-0",a.entry.isDirectory?"text-accent/70":t(b)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a.entry.isDirectory?(s(),n("path",co)):(s(),n("path",uo))],2)),e("span",xo,d(a.entry.name),1),a.entry.isDirectory?m("",!0):(s(),n("button",{key:1,class:o(["shrink-0 w-4 h-4 rounded-full border flex items-center justify-center transition-all ml-auto",[_.value?"bg-accent border-accent text-white":t(b)?"border-white/20 opacity-0 group-hover/node:opacity-100 hover:border-white/40":"border-black/15 opacity-0 group-hover/node:opacity-100 hover:border-black/30"]]),"aria-label":"Toggle file for chat context",onClick:he(u,["stop"])},[_.value?(s(),n("svg",ho,[...x[3]||(x[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):m("",!0)],2)),a.entry.isDirectory?(s(),n("button",{key:2,class:o(["shrink-0 w-4 h-4 rounded-full border flex items-center justify-center transition-all ml-auto",[C.value?"bg-accent border-accent text-white":t(b)?"border-white/20 opacity-0 group-hover/node:opacity-100 hover:border-white/40":"border-black/15 opacity-0 group-hover/node:opacity-100 hover:border-black/30"]]),"aria-label":"Add folder to chat context",onClick:he(i,["stop"])},[C.value?(s(),n("svg",po,[...x[4]||(x[4]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):m("",!0)],2)):m("",!0)],6),a.entry.isDirectory&&p.value&&a.entry.children?(s(),n("div",go,[(s(!0),n(I,null,B(a.entry.children,j=>(s(),E(S,{key:j.path,entry:j,"active-file":a.activeFile,depth:a.depth+1,onSelect:x[0]||(x[0]=P=>r.$emit("select",P)),onToggleContext:x[1]||(x[1]=P=>r.$emit("toggle-context",P))},null,8,["entry","active-file","depth"]))),128))])):m("",!0)])}}}),bo={class:"flex flex-col h-full"},fo={class:"flex items-center gap-1 min-w-0 flex-1"},mo={class:"flex items-center gap-2 shrink-0"},wo={key:0,class:"flex-1 overflow-y-auto custom-scrollbar p-3"},yo={class:"mb-3 flex gap-2"},ko={class:"flex justify-end gap-2"},$o=["disabled"],_o={class:"grid grid-cols-2 gap-2"},Co=["onClick"],So={key:1,class:"flex-1 overflow-y-auto custom-scrollbar p-2"},jo={key:0,class:"flex items-center justify-center py-12"},Mo=q({__name:"ProjectGrid",props:{isWideDesktop:{type:Boolean},isMobile:{type:Boolean}},setup(a){const{isDark:c}=J(),{projectList:l,activeProject:w,fileTree:g,activeFile:b,codeMode:p,selectedFiles:v,selectProject:_,openFile:C,createProject:f,clearActiveFile:u,toggleFileSelection:i,isFileSelected:r,loadProjects:x}=pe();le(()=>{l.value.length===0&&x()});const S=M(""),j=M(!1),P=M(""),D=M(null),y=L(()=>w.value?"filetree":"projects"),k=L(()=>y.value==="projects"?"Projects":w.value?.name??"Projects"),h=L(()=>{const V=S.value.toLowerCase();return V?l.value.filter(H=>H.name.toLowerCase().includes(V)||(H.language??"").toLowerCase().includes(V)):l.value});function $(V){_(V)}function N(){const{activeProject:V,fileTree:H}=pe();V.value=null,H.value=[],u()}function U(V){C(V)}function F(V){i(V)}function K(){j.value=!0,P.value="",ye(()=>D.value?.focus())}function O(){j.value=!1,P.value=""}function Z(){const V=P.value.trim();V&&(f(V),j.value=!1,P.value="")}return(V,H)=>(s(),n("div",bo,[e("div",{class:"shrink-0 px-4 py-3 flex items-center justify-between gap-2",style:G(t(c)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",fo,[y.value!=="projects"?(s(),n("button",{key:0,class:o(["text-xs shrink-0 transition-colors",t(c)?"text-white/40 hover:text-white/70 hover:underline":"text-gray-400 hover:text-gray-700 hover:underline"]),onClick:N}," Projects ",2)):m("",!0),y.value!=="projects"?(s(),n("span",{key:1,class:o(["text-xs shrink-0",t(c)?"text-white/20":"text-gray-300"])},"/",2)):m("",!0),e("span",{class:o(["text-sm font-semibold truncate",t(c)?"text-white/90":"text-gray-900"])},d(k.value),3)]),e("div",mo,[y.value==="projects"?(s(),n("p",{key:0,class:o(["text-xs",t(c)?"text-white/30":"text-gray-400"])},d(t(l).length)+" repos ",3)):y.value==="filetree"?(s(),n("p",{key:1,class:o(["text-xs",t(c)?"text-white/30":"text-gray-400"])},d(t(w)?.language),3)):m("",!0),ie(V.$slots,"header-actions")])],4),y.value==="projects"?(s(),n("div",wo,[e("div",yo,[W(e("input",{"onUpdate:modelValue":H[0]||(H[0]=X=>S.value=X),type:"text",placeholder:"Search projects...",class:o(["flex-1 min-w-0 px-3 py-2 rounded-lg text-base bg-transparent outline-none",t(c)?"text-white/80 placeholder:text-white/20 border border-white/10 focus:border-white/25":"text-gray-800 placeholder:text-gray-400 border border-black/10 focus:border-black/20"])},null,2),[[Q,S.value]]),e("button",{class:o(["shrink-0 px-3 py-2 rounded-lg text-xs font-medium transition-colors flex items-center gap-1.5",t(c)?"bg-accent/20 text-accent hover:bg-accent/30":"bg-accent/10 text-accent hover:bg-accent/20"]),onClick:K},[...H[2]||(H[2]=[e("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),ne(" New ",-1)])],2)]),j.value?(s(),n("div",{key:0,class:o(["mb-3 p-3 rounded-xl",t(c)?"bg-white/[0.05] border border-white/10":"bg-black/[0.03] border border-black/8"])},[e("p",{class:o(["text-xs font-medium mb-2",t(c)?"text-white/70":"text-gray-700"])}," New Project ",2),W(e("input",{ref_key:"newProjectInputRef",ref:D,"onUpdate:modelValue":H[1]||(H[1]=X=>P.value=X),type:"text",placeholder:"Project name...",class:o(["w-full px-3 py-2 rounded-lg text-base bg-transparent outline-none mb-2",t(c)?"text-white/80 placeholder:text-white/20 border border-white/10 focus:border-white/25":"text-gray-800 placeholder:text-gray-400 border border-black/10 focus:border-black/20"]),onKeydown:[ae(Z,["enter"]),ae(O,["escape"])]},null,34),[[Q,P.value]]),e("div",ko,[e("button",{class:o(["text-xs px-2.5 py-1 rounded-lg transition-colors",t(c)?"text-white/40 hover:text-white/70":"text-gray-500 hover:text-gray-800"]),onClick:O}," Cancel ",2),e("button",{class:o(["text-xs px-2.5 py-1 rounded-lg font-medium transition-colors",t(c)?"bg-accent/20 text-accent hover:bg-accent/30":"bg-accent/10 text-accent hover:bg-accent/20"]),disabled:!P.value.trim(),onClick:Z}," Create ",10,$o)])],2)):m("",!0),e("div",_o,[(s(!0),n(I,null,B(h.value,X=>(s(),n("button",{key:X.path,class:o(["text-left p-3 rounded-xl transition-all duration-150",t(c)?"bg-white/[0.03] hover:bg-white/[0.07] border border-white/5":"bg-black/[0.02] hover:bg-black/[0.05] border border-black/5"]),onClick:ge=>$(X)},[e("div",{class:o(["w-8 h-8 rounded-lg flex items-center justify-center mb-2",t(c)?"bg-white/5":"bg-black/5"])},[(s(),n("svg",{class:o(["w-4 h-4",X.isGit?"text-accent":t(c)?"text-white/40":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...H[3]||(H[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])],2))],2),e("p",{class:o(["text-xs font-medium truncate",t(c)?"text-white/80":"text-gray-800"])},d(X.name),3),e("p",{class:o(["text-xs mt-0.5 truncate",t(c)?"text-white/25":"text-gray-400"])},d(X.language),3)],10,Co))),128))])])):y.value==="filetree"?(s(),n("div",So,[(s(!0),n(I,null,B(t(g),X=>(s(),E(vo,{key:X.path,entry:X,"active-file":t(b),depth:0,onSelect:U,onToggleContext:F},null,8,["entry","active-file"]))),128)),t(g).length===0?(s(),n("div",jo,[e("p",{class:o(["text-xs",t(c)?"text-white/30":"text-gray-400"])}," Loading file tree... ",2)])):m("",!0)])):m("",!0)]))}}),To={class:"flex flex-col h-full"},Do={class:"shrink-0 px-4 py-2 flex gap-1.5 overflow-x-auto scrollbar-hide"},Lo=["onClick"],Io={class:"flex-1 overflow-y-auto px-4 py-3"},Bo={class:"grid grid-cols-2 gap-2"},Po=["onClick"],No=["onClick"],Ao={key:0,class:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},zo={key:2,class:"h-8 flex items-end gap-0.5 mb-2"},Fo={key:3,class:"h-8 flex items-center mb-2"},Eo={key:0,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"},Ro={key:1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"},Vo={key:2,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"},Uo={key:3,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01"},qo=q({__name:"DesignSystemGrid",setup(a){const{isDark:c}=J(),{openDesignSystemItem:l}=$e(),{codeMode:w,toggleDesignToken:g,isDesignTokenSelected:b}=pe(),p=M("all"),v=[{id:"all",label:"All"},{id:"colors",label:"Colors"},{id:"typography",label:"Typography"},{id:"spacing",label:"Spacing"},{id:"atoms",label:"Atoms"},{id:"molecules",label:"Molecules"},{id:"organisms",label:"Organisms"}],_=[{id:"color-bg",name:"Background",category:"colors",preview:"inline",description:"Primary app background",code:`background-color: #0a0a0a;
|
||
/* Tailwind: bg-[#0a0a0a] */`,usedIn:"ChatPage, all panels, base layout"},{id:"color-accent",name:"Accent / Bitcoin",category:"colors",preview:"inline",description:"Primary action color, Bitcoin orange",code:`color: #F7931A;
|
||
/* Tailwind: text-accent */`,usedIn:"Gradient buttons, active tabs, zap counts, CTA elements"},{id:"color-primary",name:"Primary",category:"colors",preview:"inline",description:"Primary neutral tone",code:`color: #606060;
|
||
/* Tailwind: text-primary */`,usedIn:"Secondary text, borders, muted elements"},{id:"color-surface",name:"Glass Surface",category:"colors",preview:"inline",description:"Glass morphism panel background",code:`background: rgba(0, 0, 0, 0.35);
|
||
backdrop-filter: blur(18px);
|
||
border: 1px solid rgba(255, 255, 255, 0.18);
|
||
/* Tailwind: .glass */`,usedIn:"ChatInput, ContentPanel, all overlay panels"},{id:"color-text-scale",name:"Text Opacity Scale",category:"colors",preview:"inline",description:"/25 placeholder, /40 muted, /60 secondary, /80 body, /90 emphasis",code:`/* Text opacity scale */
|
||
.placeholder { color: rgba(255,255,255, 0.25); }
|
||
.muted { color: rgba(255,255,255, 0.40); }
|
||
.secondary { color: rgba(255,255,255, 0.60); }
|
||
.body { color: rgba(255,255,255, 0.80); }
|
||
.emphasis { color: rgba(255,255,255, 0.90); }
|
||
.heading { color: rgba(255,255,255, 0.96); }`,usedIn:"Every component — consistent hierarchy across the system"},{id:"type-body",name:"Body Font",category:"typography",description:"Inter / system-ui for all body text",code:`font-family: Inter, system-ui, -apple-system, sans-serif;
|
||
/* Applied globally */`,usedIn:"Global default — ChatMessage, grids, detail views"},{id:"type-mono",name:"Monospace Font",category:"typography",description:"Menlo / Monaco for code and IDs",code:`font-family: Menlo, Monaco, "Courier New", monospace;
|
||
/* Tailwind: font-mono */`,usedIn:"CodeDetail, conversation IDs, relay URLs, metadata"},{id:"type-serif",name:"Serif Font",category:"typography",description:"Georgia for magazine/editorial layouts",code:`font-family: Georgia, "Times New Roman", Times, serif;
|
||
/* Used in MagazineGrid, AI Brief */`,usedIn:"MagazineGrid, MagazineSectionDetail, AI Brief"},{id:"type-sizes",name:"Text Sizes",category:"typography",description:"Compact scale: 10px labels to 2xl headings",code:`/* Key sizes used */
|
||
text-xs /* labels, metadata */
|
||
text-xs /* 12px - secondary text */
|
||
text-sm /* 14px - body text */
|
||
text-base /* 16px - primary text */
|
||
text-lg /* 18px - section headings */
|
||
text-xl /* 20px - page headings */
|
||
text-2xl /* 24px - hero text */`,usedIn:"Globally — see specific usage in each size bracket"},{id:"space-grid",name:"4px Grid",category:"spacing",preview:"inline",description:"All spacing follows a 4px base grid",code:`/* 4px grid system */
|
||
1 = 4px /* micro gap */
|
||
2 = 8px /* tight gap */
|
||
3 = 12px /* small padding */
|
||
4 = 16px /* standard padding */
|
||
5 = 20px /* section padding */
|
||
6 = 24px /* large gap */
|
||
8 = 32px /* section spacing */
|
||
12 = 48px /* large sections */`,usedIn:"Every layout — padding, margins, gaps between elements"},{id:"space-radius",name:"Border Radius",category:"spacing",preview:"inline",description:"Rounded corners from subtle to full",code:`/* Border radius scale */
|
||
rounded-md /* 6px - badges, tags */
|
||
rounded-lg /* 8px - buttons, inputs */
|
||
rounded-xl /* 12px - cards, panels */
|
||
rounded-2xl /* 16px - large panels */
|
||
rounded-full /* pill buttons */`,usedIn:"Badges (md), buttons (lg), cards (xl), panels (2xl)"},{id:"atom-glass-btn",name:"Glass Button",category:"atoms",description:"48px height, glass morphism background",code:`<button class="glass-button">
|
||
Action
|
||
</button>
|
||
|
||
/* glass-button:
|
||
height: 48px
|
||
background: rgba(0,0,0,0.6)
|
||
backdrop-filter: blur(18px)
|
||
border-radius: 12px
|
||
border: 1px solid rgba(255,255,255,0.12)
|
||
*/`,usedIn:"ChatInput send, modal actions, primary controls"},{id:"atom-glass-btn-sm",name:"Glass Button Small",category:"atoms",description:"Compact glass button variant",code:`<button class="glass-button-sm">
|
||
Small
|
||
</button>
|
||
|
||
/* Compact variant of glass-button */`,usedIn:"ChatInput send/stop buttons, inline actions"},{id:"atom-icon-btn",name:"Icon Button",category:"atoms",description:"Path glass icon, 32-36px square",code:`<button class="w-9 h-9 rounded-xl path-glass-icon
|
||
flex items-center justify-center">
|
||
<svg class="w-4 h-4" ...>
|
||
</button>
|
||
|
||
/* path-glass-icon:
|
||
background: transparent
|
||
transition: colors
|
||
hover: bg-white/10
|
||
*/`,usedIn:"ChatHeader toolbar, detail back buttons, close buttons"},{id:"atom-badge",name:"Genre Badge",category:"atoms",description:"Tiny pill badge for tags/genres",code:`<span class="text-xs px-2 py-1 rounded-md
|
||
font-medium bg-white/10 text-white/60">
|
||
Science Fiction
|
||
</span>`,usedIn:"FilmGrid, SongGrid, BookGrid, TVSeriesGrid genre filters"},{id:"atom-nav-tab",name:"Nav Tab",category:"atoms",description:"Content panel tab with active state",code:`<button class="nav-tab-active">
|
||
Films
|
||
</button>
|
||
|
||
/* Active: accent underline
|
||
Inactive: text-white/50 hover:text-white
|
||
Transition: 200ms */`,usedIn:"ContentPanel tab bar, mobile content tab filters"},{id:"atom-input",name:"Text Input",category:"atoms",description:"Search/filter input field",code:`<input
|
||
class="w-full px-3 py-2 rounded-lg text-xs
|
||
outline-none transition-colors
|
||
bg-white/5 text-white/80
|
||
placeholder:text-white/25
|
||
focus:bg-white/10"
|
||
placeholder="Search..."
|
||
/>`,usedIn:"All grid search bars, ProjectGrid new project"},{id:"atom-scrollbar",name:"Custom Scrollbar",category:"atoms",description:"Thin translucent scrollbar for scroll areas",code:`.custom-scrollbar::-webkit-scrollbar {
|
||
width: 4px;
|
||
}
|
||
.custom-scrollbar::-webkit-scrollbar-thumb {
|
||
background: rgba(255,255,255, 0.1);
|
||
border-radius: 2px;
|
||
}
|
||
/* Also: .scrollbar-hide hides completely */`,usedIn:"Content grids, chat message list, file trees"},{id:"mol-glass-card",name:"Glass Card",category:"molecules",description:"Frosted glass card with border",code:`<div class="glass-card">
|
||
<h3>Title</h3>
|
||
<p>Content</p>
|
||
</div>
|
||
|
||
/* glass-card:
|
||
background: rgba(0,0,0,0.65)
|
||
backdrop-filter: blur(18px)
|
||
border: 1px solid rgba(255,255,255,0.12)
|
||
border-radius: 16px
|
||
padding: 16px
|
||
*/`,usedIn:"ChatWindow container, content panel wrapper"},{id:"mol-gradient-card",name:"Gradient Card",category:"molecules",description:"Card with gradient background",code:`<div class="gradient-card">
|
||
<h3>Featured</h3>
|
||
<p>Content</p>
|
||
</div>
|
||
|
||
/* gradient-card:
|
||
background: linear-gradient(135deg, ...)
|
||
border-radius: 16px
|
||
*/`,usedIn:"Featured content highlights, promotional sections"},{id:"mol-source-link",name:"Source Link Row",category:"molecules",description:"Icon + label + external link arrow",code:`<a class="flex items-center justify-between
|
||
p-3 rounded-xl bg-white/5
|
||
hover:bg-white/10 transition-colors">
|
||
<div class="flex items-center gap-2.5">
|
||
<span class="text-sm">icon</span>
|
||
<div>
|
||
<p class="text-xs font-medium
|
||
text-white/80">Name</p>
|
||
<p class="text-xs
|
||
text-white/30">Description</p>
|
||
</div>
|
||
</div>
|
||
<svg><!-- external link icon --></svg>
|
||
</a>`,usedIn:"FilmDetail, SongDetail, PodcastDetail sources"},{id:"mol-banner-hero",name:"Banner Hero",category:"molecules",description:"Aspect 16/7 image with gradient overlay",code:`<div class="relative w-full aspect-[16/7]
|
||
overflow-hidden">
|
||
<img :src="url" class="absolute inset-0
|
||
w-full h-full object-cover" />
|
||
<div class="absolute inset-0
|
||
bg-gradient-to-t from-black/80
|
||
via-black/30 to-transparent" />
|
||
<div class="absolute bottom-0 p-4">
|
||
<h2 class="text-lg font-bold
|
||
text-white">Title</h2>
|
||
</div>
|
||
</div>`,usedIn:"FilmDetail, TVSeriesDetail, BookDetail banners"},{id:"mol-cover-card",name:"Cover Card",category:"molecules",description:"Poster/cover image card with overlay text",code:`<button class="group rounded-2xl overflow-hidden">
|
||
<div class="aspect-[2/3] relative">
|
||
<img class="w-full h-full object-cover
|
||
group-hover:scale-110
|
||
transition-transform duration-300" />
|
||
<div class="absolute inset-0
|
||
bg-gradient-to-t from-black/60
|
||
to-transparent" />
|
||
<div class="absolute bottom-0 p-2">
|
||
<p class="text-xs text-white/90">
|
||
Title</p>
|
||
</div>
|
||
</div>
|
||
</button>`,usedIn:"FilmGrid, TVSeriesGrid, SongGrid, BookGrid cards"},{id:"org-chat-bubble",name:"Chat Bubble",category:"organisms",description:"AI/User message bubble with streaming",code:`<!-- User bubble -->
|
||
<div class="flex justify-end">
|
||
<div class="glass-card max-w-[85%]
|
||
px-4 py-3 text-sm text-white/90">
|
||
Message text
|
||
</div>
|
||
</div>
|
||
|
||
<!-- AI bubble -->
|
||
<div class="flex justify-start">
|
||
<div class="max-w-[85%] px-4 py-3
|
||
text-sm text-white/80">
|
||
Response with markdown
|
||
</div>
|
||
</div>`,usedIn:"ChatMessage.vue — the primary chat interface"},{id:"org-content-panel",name:"Content Panel",category:"organisms",description:"Tabs + grid + detail navigation",code:`<!-- Structure -->
|
||
<div class="flex flex-col h-full">
|
||
<!-- Tab bar -->
|
||
<div class="flex gap-1 px-3 py-2">
|
||
<button class="nav-tab">Tab</button>
|
||
</div>
|
||
<!-- Grid view -->
|
||
<ContentGridView />
|
||
<!-- or Detail view -->
|
||
<DetailView />
|
||
</div>`,usedIn:"ChatPage middle column, mobile Content tab"},{id:"org-detail-view",name:"Detail View",category:"organisms",description:"Full detail with banner, back button, metadata",code:`<!-- Pattern: Banner → Meta → Content -->
|
||
<div class="h-full overflow-y-auto">
|
||
<!-- Banner with back button -->
|
||
<div class="relative aspect-[16/7]">
|
||
<img class="object-cover" />
|
||
<div class="gradient-overlay" />
|
||
<button class="absolute top-3 left-3
|
||
path-glass-icon">Back</button>
|
||
<div class="absolute bottom-0 p-4">
|
||
<h2>Title</h2>
|
||
<div>Metadata</div>
|
||
</div>
|
||
</div>
|
||
<!-- Body -->
|
||
<div class="p-4 space-y-4">
|
||
<p>Description</p>
|
||
<div>Genre badges</div>
|
||
<div>Source links</div>
|
||
</div>
|
||
</div>`,usedIn:"FilmDetail, BookDetail, TVSeriesDetail, SongDetail, PodcastDetail"},{id:"org-magazine",name:"Magazine Grid",category:"organisms",description:"Editorial tile layout with hero, wide, and half tiles",code:`<!-- Magazine structure -->
|
||
<div class="grid grid-cols-2 gap-px
|
||
bg-white/12">
|
||
<!-- Wide tile (col-span-2) -->
|
||
<button class="col-span-2 px-5 py-5
|
||
bg-[#0a0a0a]">
|
||
<p class="text-xs uppercase
|
||
tracking-[0.3em]">Label</p>
|
||
<h2 class="font-serif text-lg
|
||
font-bold">Title</h2>
|
||
<p class="font-serif text-sm">Text</p>
|
||
</button>
|
||
<!-- Half tiles -->
|
||
<button class="px-4 py-4 bg-[#0a0a0a]">
|
||
<h3 class="font-serif text-sm
|
||
font-bold">Title</h3>
|
||
<p class="font-serif text-xs">Text</p>
|
||
</button>
|
||
</div>`,usedIn:"MagazineGrid.vue — AI Brief editorial view"},{id:"org-nostr-note",name:"Nostr Note",category:"organisms",description:"Note card with avatar, author, content, zaps",code:`<div class="p-3 rounded-xl bg-white/[0.03]
|
||
border border-white/5">
|
||
<div class="flex items-start gap-2.5">
|
||
<div class="w-8 h-8 rounded-full
|
||
bg-purple-500/20 text-purple-400">
|
||
F
|
||
</div>
|
||
<div class="flex-1">
|
||
<span class="text-xs font-semibold">
|
||
author</span>
|
||
<p class="text-xs text-white/60">
|
||
Note content...</p>
|
||
<span class="text-xs
|
||
text-amber-500/70">21000 sats</span>
|
||
</div>
|
||
</div>
|
||
</div>`,usedIn:"NostrGrid.vue — Nostr feed tab"},{id:"anim-fade-up",name:"Fade Up",category:"atoms",description:"Entry animation: translate + opacity",code:`.animate-fade-up {
|
||
animation: fadeUp 900ms ease-out;
|
||
}
|
||
@keyframes fadeUp {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(16px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
/* Also: animate-fade-up-fast (400ms) */`,usedIn:"Empty states, initial load elements, ChatWindow"},{id:"anim-scale-in",name:"Scale In",category:"atoms",description:"Micro entrance with scale and opacity",code:`.animate-scale-in {
|
||
animation: scaleIn 250ms ease-out;
|
||
}
|
||
@keyframes scaleIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: scale(0.95);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: scale(1);
|
||
}
|
||
}`,usedIn:"Modal entries, tooltip appearances, popovers"}],C=L(()=>p.value==="all"?_:_.filter(i=>i.category===p.value));function f(i){l(i)}function u(i){const r=/(?:background-color|color|background):\s*([^;]+)/i.exec(i);if(!r)return"#333";const x=r[1].trim();return x.startsWith("#")||x.startsWith("rgb")||x.startsWith("hsl")?x:"#333"}return(i,r)=>(s(),n("div",To,[e("div",{class:"shrink-0 px-4 py-3 flex items-center justify-between gap-2",style:G(t(c)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("span",{class:o(["text-sm font-semibold",t(c)?"text-white/90":"text-gray-900"])}," Design System ",2),e("p",{class:o(["text-xs",t(c)?"text-white/30":"text-gray-400"])},d(C.value.length)+" items ",3)],4),e("div",Do,[(s(),n(I,null,B(v,x=>e("button",{key:x.id,class:o(["text-xs px-2.5 py-1 rounded-md font-medium whitespace-nowrap transition-colors",p.value===x.id?"bg-accent/20 text-accent":t(c)?"bg-white/5 text-white/50 hover:bg-white/10":"bg-black/5 text-gray-500 hover:bg-black/10"]),onClick:S=>p.value=x.id},d(x.label),11,Lo)),64))]),e("div",Io,[e("div",Bo,[(s(!0),n(I,null,B(C.value,x=>(s(),n("button",{key:x.id,class:o(["text-left p-3 rounded-xl transition-all duration-150 group relative",[t(w)&&t(b)(x.id)?"ring-2 ring-accent/50 bg-accent/10 cursor-pointer":t(c)?"bg-white/[0.03] hover:bg-white/[0.07] cursor-pointer":"bg-black/[0.02] hover:bg-black/[0.05] cursor-pointer"]]),onClick:S=>f(x)},[t(w)?(s(),n("div",{key:0,class:o(["absolute top-2 right-2 min-w-[44px] min-h-[44px] rounded-full flex items-center justify-center z-10 cursor-pointer transition-colors",t(b)(x.id)?"bg-accent":t(c)?"bg-white/10 hover:bg-white/20":"bg-black/10 hover:bg-black/20"]),onClick:he(S=>t(g)(x.id),["stop"])},[t(b)(x.id)?(s(),n("svg",Ao,[...r[0]||(r[0]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):m("",!0)],10,No)):m("",!0),x.category==="colors"&&x.preview==="inline"?(s(),n("div",{key:1,class:o(["h-8 rounded-md mb-2 border",t(c)?"border-white/10":"border-black/10"]),style:G({background:u(x.code)})},null,6)):x.category==="spacing"&&x.preview==="inline"?(s(),n("div",zo,[...r[1]||(r[1]=[e("div",{class:"bg-accent/40 rounded-sm",style:{width:"4px",height:"30%"}},null,-1),e("div",{class:"bg-accent/40 rounded-sm",style:{width:"4px",height:"50%"}},null,-1),e("div",{class:"bg-accent/40 rounded-sm",style:{width:"4px",height:"70%"}},null,-1),e("div",{class:"bg-accent/40 rounded-sm",style:{width:"4px",height:"100%"}},null,-1)])])):(s(),n("div",Fo,[(s(),n("svg",{class:o(["w-5 h-5 transition-colors",t(c)?"text-white/20 group-hover:text-white/40":"text-black/15 group-hover:text-black/30"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[x.category==="atoms"?(s(),n("path",Eo)):x.category==="molecules"?(s(),n("path",Ro)):x.category==="organisms"?(s(),n("path",Vo)):(s(),n("path",Uo))],2))])),e("h3",{class:o(["text-xs font-semibold leading-tight mb-0.5",t(c)?"text-white/80":"text-gray-800"])},d(x.name),3),e("p",{class:o(["text-xs leading-snug line-clamp-2",t(c)?"text-white/40":"text-gray-400"])},d(x.description),3)],10,Po))),128))])])]))}}),we=M(null),it=M(!1),qe=M(!1),xe=M(null);function fe(){const a=L(()=>{if(!we.value)return null;try{return Ye(we.value)}catch{return null}}),c=L(()=>!!we.value),l=L(()=>a.value?a.value.slice(0,12)+"..."+a.value.slice(-8):null);function w(){it.value=typeof window<"u"&&!!window.nostr}async function g(){if(xe.value=null,!window.nostr){xe.value="No Nostr extension detected. Install nos2x, Alby, or another NIP-07 extension.";return}qe.value=!0;try{const v=await window.nostr.getPublicKey();we.value=v}catch(v){xe.value=v instanceof Error?v.message:"Failed to get public key"}finally{qe.value=!1}}async function b(v){if(xe.value=null,!window.nostr)return xe.value="No Nostr extension detected",null;try{return await window.nostr.signEvent(v)}catch(_){return xe.value=_ instanceof Error?_.message:"Failed to sign event",null}}function p(){we.value=null,xe.value=null}return le(()=>{w(),setTimeout(w,500)}),{pubkey:we,npub:a,isAvailable:it,isLoggedIn:c,isLoading:qe,error:xe,truncatedNpub:l,login:g,logout:p,signEvent:b,checkAvailability:w}}const Go="aiui-nostr-dms",Oo=1,ke="messages",Se=M([]),je=M(null),Ge=M(!1);let Me=null;function wt(){return Me||(Me=new Promise((a,c)=>{const l=indexedDB.open(Go,Oo);l.onupgradeneeded=()=>{const w=l.result;if(!w.objectStoreNames.contains(ke)){const g=w.createObjectStore(ke,{keyPath:"id"});g.createIndex("contact","contactPubkey",{unique:!1}),g.createIndex("created_at","created_at",{unique:!1})}},l.onsuccess=()=>a(l.result),l.onerror=()=>{Me=null,c(l.error)}}),Me)}function Ho(a){return a.length<=12?a:a.slice(0,8)+"..."+a.slice(-4)}async function rt(a,c){const l=await wt(),w=a.fromPubkey===c?a.toPubkey:a.fromPubkey,g={...a,contactPubkey:w};return new Promise((b,p)=>{const v=l.transaction(ke,"readwrite");v.objectStore(ke).put(g),v.oncomplete=()=>b(),v.onerror=()=>p(v.error)})}async function Oe(){const a=await wt();return new Promise((c,l)=>{const g=a.transaction(ke,"readonly").objectStore(ke).getAll();g.onsuccess=()=>c(g.result),g.onerror=()=>l(g.error)})}function He(a){const c=new Map;for(const w of a){const g=c.get(w.contactPubkey)??[];g.push(w),c.set(w.contactPubkey,g)}const l=[];for(const[w,g]of c)g.sort((b,p)=>b.created_at-p.created_at),l.push({contactPubkey:w,contactName:Ho(w),messages:g,lastMessage:g[g.length-1]??null,unread:0});return l.sort((w,g)=>(g.lastMessage?.created_at??0)-(w.lastMessage?.created_at??0)),l}function Wo(){const{pubkey:a,isLoggedIn:c}=fe(),l=L(()=>je.value?Se.value.find(_=>_.contactPubkey===je.value)??null:null);async function w(){if(c.value){Ge.value=!0;try{const _=await Oe();Se.value=He(_)}catch{}finally{Ge.value=!1}}}async function g(_,C){if(!window.nostr?.nip04||!a.value)return!1;try{const f=await window.nostr.nip04.encrypt(_,C),u={kind:4,created_at:Math.floor(Date.now()/1e3),tags:[["p",_]],content:f},i=await window.nostr.signEvent(u);if(!i)return!1;const r={id:i.id,fromPubkey:a.value,toPubkey:_,content:C,created_at:i.created_at,decrypted:!0};await rt(r,a.value);const{publishEvent:x}=await bt(()=>import("./useNostr-zyhtrXba.js"),__vite__mapDeps([0,1,2])).then(j=>j.useNostr());await x(i);const S=await Oe();return Se.value=He(S),!0}catch{return!1}}async function b(_,C,f,u){if(!(!window.nostr?.nip04||!a.value))try{const i=await window.nostr.nip04.decrypt(C,f),r={id:_,fromPubkey:C,toPubkey:a.value,content:i,created_at:u,decrypted:!0};await rt(r,a.value);const x=await Oe();Se.value=He(x)}catch{}}function p(_){je.value=_}function v(){je.value=null}return{threads:Se,activeThread:l,activeContact:je,isLoading:Ge,loadDMs:w,sendDM:g,receiveDM:b,selectContact:p,clearActiveContact:v}}const Ko={class:"h-full flex flex-col"},Yo={class:"flex items-center gap-2 px-4 py-3 border-b border-white/[0.08]"},Qo={class:"flex-1 min-w-0"},Jo={class:"text-xs font-semibold text-white/80 truncate"},Zo={class:"text-xs text-white/30 font-mono truncate"},Xo={class:"text-xs leading-relaxed break-words"},ea={class:"text-xs mt-1 text-white/25 tabular-nums"},ta={class:"px-4 py-3 border-t border-white/[0.08]"},sa={class:"flex gap-2"},na=["disabled"],la={class:"p-4 border-b border-white/[0.08]"},oa={class:"flex items-center justify-between gap-2 mb-3"},aa={key:0,class:"space-y-2 mb-3"},ia=["disabled"],ra={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-3 pb-16 space-y-1"},ca={key:0,class:"flex items-center justify-center py-12"},da={key:1,class:"flex items-center justify-center py-12"},ua={key:2,class:"flex items-center justify-center py-12"},xa=["onClick"],ha={class:"flex items-start gap-2.5"},pa={class:"w-8 h-8 rounded-full shrink-0 flex items-center justify-center text-xs font-bold bg-accent/20 text-accent"},ga={class:"flex-1 min-w-0"},va={class:"flex items-center gap-1.5"},ba={class:"text-xs font-semibold truncate text-white/80"},fa={key:0,class:"text-xs ml-auto shrink-0 text-white/20"},ma={key:0,class:"text-xs mt-1 text-white/40 truncate"},wa=q({__name:"NostrDMs",setup(a){const{threads:c,activeThread:l,activeContact:w,isLoading:g,loadDMs:b,sendDM:p,selectContact:v,clearActiveContact:_}=Wo(),{pubkey:C,isLoggedIn:f}=fe(),u=M(""),i=M(!1),r=M(null),x=M(!1),S=M("");function j(k){const h=new Date(k*1e3),N=Math.floor((new Date().getTime()-h.getTime())/864e5);return N===0?h.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}):N<7?h.toLocaleDateString("en",{weekday:"short"}):h.toLocaleDateString("en",{month:"short",day:"numeric"})}async function P(){if(!u.value.trim()||i.value||!w.value)return;i.value=!0,await p(w.value,u.value.trim())&&(u.value="",await ye(),D()),i.value=!1}function D(){r.value&&(r.value.scrollTop=r.value.scrollHeight)}function y(){let k=S.value.trim();if(k.startsWith("npub"))try{k=ft(k)}catch{return}k.length===64&&(v(k),x.value=!1,S.value="")}return ce(w,async()=>{await ye(),D()}),le(()=>{b()}),(k,h)=>(s(),n("div",Ko,[t(l)?(s(),n(I,{key:0},[e("div",Yo,[e("button",{class:"min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg text-white/60 hover:text-white/80 hover:bg-white/10 transition-colors",onClick:h[0]||(h[0]=(...$)=>t(_)&&t(_)(...$))},[...h[4]||(h[4]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),e("div",Qo,[e("p",Jo,d(t(l).contactName),1),e("p",Zo,d(t(l).contactPubkey),1)])]),e("div",{ref_key:"messagesRef",ref:r,class:"flex-1 overflow-y-auto custom-scrollbar px-4 py-3 space-y-2"},[(s(!0),n(I,null,B(t(l).messages,$=>(s(),n("div",{key:$.id,class:o(["flex",$.fromPubkey===t(C)?"justify-end":"justify-start"])},[e("div",{class:o(["max-w-[80%] rounded-xl px-3 py-2",$.fromPubkey===t(C)?"bg-accent/15 text-white/80":"bg-white/5 text-white/70"])},[e("p",Xo,d($.content),1),e("p",ea,d(j($.created_at)),1)],2)],2))),128))],512),e("div",ta,[e("div",sa,[W(e("input",{"onUpdate:modelValue":h[1]||(h[1]=$=>u.value=$),type:"text",placeholder:"Type a message...",class:"flex-1 px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors",onKeydown:ae(P,["enter"])},null,544),[[Q,u.value]]),e("button",{class:"px-3 py-2 rounded-lg text-xs bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors disabled:opacity-30",disabled:!u.value.trim()||i.value,onClick:P}," Send ",8,na)])])],64)):(s(),n(I,{key:1},[e("div",la,[e("div",oa,[h[5]||(h[5]=e("h3",{class:"text-sm font-bold text-white/90"},"Messages",-1)),e("button",{class:"text-xs px-2.5 py-1 rounded bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors",onClick:h[2]||(h[2]=$=>x.value=!x.value)},d(x.value?"Cancel":"New"),1)]),x.value?(s(),n("div",aa,[W(e("input",{"onUpdate:modelValue":h[3]||(h[3]=$=>S.value=$),type:"text",placeholder:"Recipient hex pubkey or npub...",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors font-mono"},null,512),[[Q,S.value]]),e("button",{class:"text-xs px-2.5 py-1 rounded bg-white/5 text-white/60 hover:bg-white/10 transition-colors disabled:opacity-30",disabled:!S.value.trim(),onClick:y}," Start conversation ",8,ia)])):m("",!0)]),e("div",ra,[t(f)?t(g)?(s(),n("div",da,[...h[7]||(h[7]=[e("p",{class:"text-xs text-white/30"},"Loading messages...",-1)])])):t(c).length===0?(s(),n("div",ua,[...h[8]||(h[8]=[e("p",{class:"text-xs text-white/30"},"No messages yet",-1)])])):m("",!0):(s(),n("div",ca,[...h[6]||(h[6]=[e("p",{class:"text-xs text-white/30"},"Sign in with Nostr to use DMs",-1)])])),(s(!0),n(I,null,B(t(c),$=>(s(),n("button",{key:$.contactPubkey,class:"w-full text-left p-3 rounded-xl transition-all duration-150 bg-white/[0.03] hover:bg-white/[0.07] border border-white/5",onClick:N=>t(v)($.contactPubkey)},[e("div",ha,[e("div",pa,d($.contactName.charAt(0).toUpperCase()),1),e("div",ga,[e("div",va,[e("span",ba,d($.contactName),1),$.lastMessage?(s(),n("span",fa,d(j($.lastMessage.created_at)),1)):m("",!0)]),$.lastMessage?(s(),n("p",ma,d($.lastMessage.content),1)):m("",!0)])])],8,xa))),128))])],64))]))}}),ya={class:"h-full flex flex-col"},ka={class:"p-4 border-b border-white/[0.08]"},$a={class:"flex gap-2"},_a=["disabled"],Ca={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-3 pb-16 space-y-2"},Sa={class:"flex items-center gap-2"},ja={class:"text-xs font-mono text-white/70 truncate flex-1"},Ma={class:"flex items-center gap-2 flex-wrap"},Ta=["onClick"],Da=["onClick"],La=["disabled","onClick"],Ia=["onClick"],Ba={key:0,class:"mt-4 pt-4 border-t border-white/5"},Pa=["disabled"],Na={key:0,class:"text-xs mt-1 text-white/30"},Aa=q({__name:"NostrRelayManager",setup(a){const{relayStates:c,addRelay:l,removeRelay:w,toggleRelayRead:g,toggleRelayWrite:b,testRelay:p,importNIP65Relays:v,fetchNote:_}=Le(),{isLoggedIn:C,pubkey:f}=fe(),u=M(""),i=M(null),r=Pe({}),x=M(!1),S=M("");function j(){let y=u.value.trim();y&&(!y.startsWith("wss://")&&!y.startsWith("ws://")&&(y="wss://"+y),l(y),u.value="")}async function P(y){i.value=y;const k=await p(y);r[y]=k,i.value=null}async function D(){if(!f.value)return;x.value=!0,S.value="Fetching relay list...";const y=await _(f.value,5e3);y?(v({id:y.id,pubkey:y.pubkey,kind:10002,content:y.content,created_at:y.created_at,tags:y.tags,sig:""}),S.value="Imported relays from NIP-65"):S.value="No NIP-65 relay list found",x.value=!1}return(y,k)=>(s(),n("div",ya,[e("div",ka,[k[1]||(k[1]=e("h3",{class:"text-sm font-bold text-white/90 mb-3"},"Relay Management",-1)),e("div",$a,[W(e("input",{"onUpdate:modelValue":k[0]||(k[0]=h=>u.value=h),type:"text",placeholder:"wss://relay.example.com",class:"flex-1 px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors font-mono",onKeydown:ae(j,["enter"])},null,544),[[Q,u.value]]),e("button",{class:"px-4 min-h-[44px] rounded-lg text-sm bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors disabled:opacity-30",disabled:!u.value.trim(),onClick:j}," Add ",8,_a)])]),e("div",Ca,[(s(!0),n(I,null,B(t(c),h=>(s(),n("div",{key:h.url,class:"rounded-xl bg-white/[0.03] border border-white/5 p-3 space-y-2"},[e("div",Sa,[e("span",{class:o(["w-2 h-2 rounded-full shrink-0",h.connected?"bg-emerald-500":"bg-red-400/60"])},null,2),e("span",ja,d(h.url),1),h.latencyMs!==null?(s(),n("span",{key:0,class:o(["text-xs tabular-nums shrink-0",h.latencyMs<200?"text-emerald-400/60":h.latencyMs<500?"text-yellow-400/60":"text-red-400/60"])},d(h.latencyMs)+"ms ",3)):m("",!0),e("span",{class:o(["text-xs shrink-0",h.connected?"text-emerald-400/60":"text-red-400/60"])},d(h.connected?"Connected":"Disconnected"),3)]),e("div",Ma,[e("button",{class:o(["text-sm px-3 min-h-[44px] rounded-lg transition-colors",h.read?"bg-accent/15 text-accent/80":"bg-white/5 text-white/30 hover:text-white/50"]),onClick:$=>t(g)(h.url)}," Read ",10,Ta),e("button",{class:o(["text-sm px-3 min-h-[44px] rounded-lg transition-colors",h.write?"bg-accent/15 text-accent/80":"bg-white/5 text-white/30 hover:text-white/50"]),onClick:$=>t(b)(h.url)}," Write ",10,Da),k[2]||(k[2]=e("div",{class:"flex-1"},null,-1)),e("button",{class:"text-sm px-3 min-h-[44px] rounded-lg bg-white/5 text-white/30 hover:text-white/50 transition-colors",disabled:i.value===h.url,onClick:$=>P(h.url)},d(i.value===h.url?"Testing...":"Test"),9,La),e("button",{class:"text-sm px-3 min-h-[44px] rounded-lg bg-white/5 text-red-400/50 hover:text-red-400/80 hover:bg-red-400/10 transition-colors",onClick:$=>t(w)(h.url)}," Remove ",8,Ia)]),r[h.url]!==void 0?(s(),n("p",{key:0,class:o(["text-xs",r[h.url]!==null?"text-emerald-400/60":"text-red-400/60"])},d(r[h.url]!==null?`Reachable (${r[h.url]}ms)`:"Unreachable"),3)):m("",!0)]))),128)),t(C)?(s(),n("div",Ba,[e("button",{class:"w-full text-left px-3 min-h-[44px] rounded-lg text-sm bg-white/5 text-white/40 hover:text-white/60 hover:bg-white/10 transition-colors",disabled:x.value,onClick:D},d(x.value?"Importing...":"Import relays from NIP-65 (kind:10002)"),9,Pa),S.value?(s(),n("p",Na,d(S.value),1)):m("",!0)])):m("",!0)])]))}}),za={class:"h-full flex flex-col"},Fa={key:0,class:"flex-1 flex items-center justify-center"},Ea={key:1,class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-3 pb-16 space-y-4"},Ra={class:"rounded-xl overflow-hidden border border-white/5"},Va={class:"px-4 pb-4 -mt-8"},Ua={key:0,class:"text-lg font-bold text-accent"},qa={class:"text-sm font-bold text-white/90 mt-2"},Ga={key:0,class:"text-xs text-purple-400/60"},Oa={key:1,class:"text-xs text-white/50 mt-1 line-clamp-2"},Ha={class:"space-y-3"},Wa=["disabled"],Ka=q({__name:"NostrProfileEditor",setup(a){const{isLoggedIn:c,signEvent:l,pubkey:w}=fe(),{publishEvent:g,fetchNote:b}=Le(),p=Pe({name:"",display_name:"",about:"",picture:"",banner:"",website:"",nip05:"",lud16:""}),v=M(!1),_=M(""),C=M(!1);async function f(){if(!w.value)return;const i=await b(w.value,5e3);if(i&&i.kind===0)try{const r=JSON.parse(i.content);Object.assign(p,r)}catch{}}async function u(){if(!c.value)return;v.value=!0,_.value="";const i={};for(const[P,D]of Object.entries(p))D&&(i[P]=D);const r={kind:0,created_at:Math.floor(Date.now()/1e3),tags:[],content:JSON.stringify(i)},x=await l(r);if(!x){v.value=!1,_.value="Signing failed",C.value=!1;return}const S=await g(x),j=S.filter(P=>P.success).length;v.value=!1,j>0?(_.value=`Published to ${j}/${S.length} relays`,C.value=!0):(_.value="Failed to publish to any relay",C.value=!1)}return le(()=>{f()}),(i,r)=>(s(),n("div",za,[r[17]||(r[17]=e("div",{class:"p-4 border-b border-white/[0.08]"},[e("h3",{class:"text-sm font-bold text-white/90"},"Nostr Profile")],-1)),t(c)?(s(),n("div",Ea,[e("div",Ra,[e("div",{class:o(["h-24 bg-cover bg-center",p.banner?"":"bg-gradient-to-r from-accent/20 to-purple-500/20"]),style:G(p.banner?{backgroundImage:`url(${p.banner})`}:{})},null,6),e("div",Va,[e("div",{class:o(["w-16 h-16 rounded-full border-2 border-black bg-cover bg-center flex items-center justify-center",p.picture?"":"bg-accent/20"]),style:G(p.picture?{backgroundImage:`url(${p.picture})`}:{})},[p.picture?m("",!0):(s(),n("span",Ua,d((p.display_name||p.name||"?").charAt(0).toUpperCase()),1))],6),e("p",qa,d(p.display_name||p.name||"Anonymous"),1),p.nip05?(s(),n("p",Ga,d(p.nip05),1)):m("",!0),p.about?(s(),n("p",Oa,d(p.about),1)):m("",!0)])]),e("div",Ha,[e("div",null,[r[9]||(r[9]=e("label",{class:"text-xs text-white/30 block mb-1"},"Display Name",-1)),W(e("input",{"onUpdate:modelValue":r[0]||(r[0]=x=>p.display_name=x),type:"text",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors",placeholder:"Your display name"},null,512),[[Q,p.display_name]])]),e("div",null,[r[10]||(r[10]=e("label",{class:"text-xs text-white/30 block mb-1"},"Username",-1)),W(e("input",{"onUpdate:modelValue":r[1]||(r[1]=x=>p.name=x),type:"text",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors",placeholder:"username"},null,512),[[Q,p.name]])]),e("div",null,[r[11]||(r[11]=e("label",{class:"text-xs text-white/30 block mb-1"},"Bio",-1)),W(e("textarea",{"onUpdate:modelValue":r[2]||(r[2]=x=>p.about=x),class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors resize-none min-h-[60px]",placeholder:"Tell the world about yourself"},null,512),[[Q,p.about]])]),e("div",null,[r[12]||(r[12]=e("label",{class:"text-xs text-white/30 block mb-1"},"Avatar URL",-1)),W(e("input",{"onUpdate:modelValue":r[3]||(r[3]=x=>p.picture=x),type:"url",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors font-mono",placeholder:"https://example.com/avatar.jpg"},null,512),[[Q,p.picture]])]),e("div",null,[r[13]||(r[13]=e("label",{class:"text-xs text-white/30 block mb-1"},"Banner URL",-1)),W(e("input",{"onUpdate:modelValue":r[4]||(r[4]=x=>p.banner=x),type:"url",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors font-mono",placeholder:"https://example.com/banner.jpg"},null,512),[[Q,p.banner]])]),e("div",null,[r[14]||(r[14]=e("label",{class:"text-xs text-white/30 block mb-1"},"Website",-1)),W(e("input",{"onUpdate:modelValue":r[5]||(r[5]=x=>p.website=x),type:"url",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors font-mono",placeholder:"https://example.com"},null,512),[[Q,p.website]])]),e("div",null,[r[15]||(r[15]=e("label",{class:"text-xs text-white/30 block mb-1"},"NIP-05 Address",-1)),W(e("input",{"onUpdate:modelValue":r[6]||(r[6]=x=>p.nip05=x),type:"text",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors font-mono",placeholder:"you@example.com"},null,512),[[Q,p.nip05]])]),e("div",null,[r[16]||(r[16]=e("label",{class:"text-xs text-white/30 block mb-1"},"Lightning Address",-1)),W(e("input",{"onUpdate:modelValue":r[7]||(r[7]=x=>p.lud16=x),type:"text",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors font-mono",placeholder:"you@getalby.com"},null,512),[[Q,p.lud16]])]),e("button",{class:"w-full min-h-[44px] rounded-lg text-sm font-medium bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors disabled:opacity-30",disabled:v.value,onClick:u},d(v.value?"Publishing...":"Publish Profile (kind:0)"),9,Wa),_.value?(s(),n("div",{key:0,class:o(["text-xs text-center",C.value?"text-emerald-400/60":"text-red-400/60"])},d(_.value),3)):m("",!0)])])):(s(),n("div",Fa,[...r[8]||(r[8]=[e("p",{class:"text-xs text-white/30"},"Sign in with Nostr to edit your profile",-1)])]))]))}}),Ya={class:"relative glass-card w-[320px] max-w-[90vw] p-5 space-y-4 animate-scale-in"},Qa={class:"flex items-center justify-between"},Ja={class:"text-xs text-white/40 truncate font-mono"},Za={class:"flex gap-1.5 flex-wrap"},Xa=["onClick"],ei=["disabled"],ti={key:0,class:"space-y-2"},si={class:"flex justify-center"},ni={class:"flex gap-1"},li=["value"],oi=["href"],ai={key:1,class:"text-xs text-red-400/60 text-center"},ii=q({__name:"ZapDialog",props:{isOpen:{type:Boolean},targetName:{},lightningAddress:{}},emits:["close"],setup(a,{emit:c}){const l=a,w=c,g=M(null),b=M(null),p=[21,100,500,1e3,5e3,1e4],v=M(21),_=M(""),C=M(""),f=M(!1),u=M(""),i=M(!1),r=M(null);function x(k){return k>=1e3?`${(k/1e3).toFixed(k%1e3===0?0:1)}k`:String(k)}function S(){w("close"),C.value="",u.value="",_.value=""}async function j(){if(!(!l.lightningAddress||!v.value)){f.value=!0,u.value="",C.value="";try{const[k,h]=l.lightningAddress.split("@");if(!k||!h)throw new Error("Invalid Lightning address");const $=await fetch(`https://${h}/.well-known/lnurlp/${k}`);if(!$.ok)throw new Error("Failed to fetch LNURL");const N=await $.json();if(N.status==="ERROR")throw new Error(N.reason||"LNURL error");const U=v.value*1e3;if(U<(N.minSendable??0))throw new Error(`Minimum: ${Math.ceil((N.minSendable??0)/1e3)} sats`);if(U>(N.maxSendable??1/0))throw new Error(`Maximum: ${Math.floor((N.maxSendable??0)/1e3)} sats`);let F=N.callback;const K=F.includes("?")?"&":"?";F+=`${K}amount=${U}`,_.value&&(F+=`&comment=${encodeURIComponent(_.value)}`);const O=await fetch(F);if(!O.ok)throw new Error("Failed to get invoice");const Z=await O.json();if(Z.status==="ERROR")throw new Error(Z.reason||"Invoice error");C.value=Z.pr,await ye(),P(Z.pr)}catch(k){u.value=k instanceof Error?k.message:"Zap failed"}finally{f.value=!1}}}function P(k){const h=r.value;if(!h)return;const $=h.getContext("2d");if(!$)return;$.fillStyle="#1a1a1a",$.fillRect(0,0,200,200),$.fillStyle="#F7931A",$.font="10px monospace",$.textAlign="center";const N=[];for(let F=0;F<k.length;F+=30)N.push(k.slice(F,F+30));const U=Math.max(10,100-N.length*6);N.forEach((F,K)=>{$.fillText(F,100,U+K*12)})}function D(){navigator.clipboard.writeText(C.value),i.value=!0,setTimeout(()=>{i.value=!1},2e3)}function y(k){const h=g.value;if(!h)return;const $=h.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if($.length===0)return;const N=$[0],U=$[$.length-1];k.shiftKey&&document.activeElement===N?(k.preventDefault(),U.focus()):!k.shiftKey&&document.activeElement===U&&(k.preventDefault(),N.focus())}return ce(()=>l.isOpen,async k=>{k?(await ye(),b.value?.focus()):(C.value="",u.value="")}),(k,h)=>a.isOpen?(s(),n("div",{key:0,ref_key:"dialogRef",ref:g,role:"dialog","aria-modal":"true","aria-label":"Send zap",class:"fixed inset-0 z-50 flex items-center justify-center",onClick:he(S,["self"]),onKeydown:[ae(S,["escape"]),ae(y,["tab"])]},[e("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:S}),e("div",Ya,[e("div",Qa,[h[3]||(h[3]=e("h3",{class:"text-sm font-bold text-white/90"},"Zap",-1)),e("button",{ref_key:"closeButtonRef",ref:b,class:"min-w-[44px] min-h-[44px] flex items-center justify-center rounded text-white/40 hover:text-white/70 transition-colors","aria-label":"Close",onClick:S},[...h[2]||(h[2]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],512)]),e("p",Ja,d(a.targetName),1),e("div",Za,[(s(),n(I,null,B(p,$=>e("button",{key:$,class:o(["text-xs px-2.5 py-1.5 rounded-lg transition-colors",v.value===$?"bg-accent/20 text-accent border border-accent/30":"bg-white/5 text-white/50 hover:bg-white/10"]),onClick:N=>v.value=$},d(x($)),11,Xa)),64))]),e("div",null,[h[4]||(h[4]=e("label",{class:"text-xs text-white/30 block mb-1"},"Amount (sats)",-1)),W(e("input",{"onUpdate:modelValue":h[0]||(h[0]=$=>v.value=$),type:"number",min:"1",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors tabular-nums",placeholder:"21"},null,512),[[Q,v.value,void 0,{number:!0}]])]),e("div",null,[h[5]||(h[5]=e("label",{class:"text-xs text-white/30 block mb-1"},"Message (optional)",-1)),W(e("input",{"onUpdate:modelValue":h[1]||(h[1]=$=>_.value=$),type:"text",class:"w-full px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors",placeholder:"Great post!"},null,512),[[Q,_.value]])]),e("button",{class:"w-full py-2.5 rounded-lg text-xs font-medium bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors disabled:opacity-30",disabled:!v.value||v.value<1||f.value,onClick:j},d(f.value?"Generating invoice...":`Zap ${x(v.value)} sats`),9,ei),C.value?(s(),n("div",ti,[h[6]||(h[6]=e("p",{class:"text-xs text-white/30 text-center"},"Scan or tap to pay",-1)),e("div",si,[e("canvas",{ref_key:"qrCanvas",ref:r,class:"rounded-lg",width:"200",height:"200"},null,512)]),e("div",ni,[e("input",{value:C.value,readonly:"",class:"flex-1 px-2 py-1.5 rounded text-base bg-white/5 text-white/40 font-mono truncate outline-none"},null,8,li),e("button",{class:"px-2 py-1.5 rounded text-xs bg-white/5 text-white/40 hover:text-white/60 transition-colors",onClick:D},d(i.value?"Copied":"Copy"),1)]),e("a",{href:"lightning:"+C.value,class:"block w-full py-2 rounded-lg text-xs text-center bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors"}," Open in wallet ",8,oi)])):m("",!0),u.value?(s(),n("p",ai,d(u.value),1)):m("",!0)])],544)):m("",!0)}}),ri={class:"h-full flex flex-col"},ci={class:"flex items-center gap-2 px-4 py-3 border-b border-white/[0.08]"},di={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-3 pb-16 space-y-2"},ui={key:0,class:"flex items-center justify-center py-12"},xi={key:1,class:"rounded-xl bg-white/[0.05] border border-white/10 p-3"},hi={class:"flex items-center gap-1.5 mb-1"},pi={class:"w-6 h-6 rounded-full shrink-0 flex items-center justify-center text-xs font-bold bg-purple-500/20 text-purple-400"},gi={class:"text-xs font-semibold text-white/80"},vi={class:"text-xs ml-auto text-white/20"},bi={class:"text-xs text-white/70 leading-relaxed whitespace-pre-wrap"},fi={key:2,class:"space-y-1"},mi={class:"text-xs text-white/30 font-medium mt-3 mb-1"},wi={key:3,class:"flex items-center justify-center py-12"},yi={key:0,class:"px-4 py-3 border-t border-white/[0.08]"},ki={key:0,class:"text-xs text-white/30 mb-1"},$i={class:"flex gap-2"},_i=["disabled"],Ci=q({__name:"NostrThread",props:{noteId:{}},emits:["back"],setup(a){const c=Zt(()=>bt(()=>import("./ThreadNode-Jt8WlAUM.js"),__vite__mapDeps([3,1,2]))),l=a,{fetchNote:w,publishEvent:g}=Le(),{isLoggedIn:b,signEvent:p,pubkey:v}=fe(),_=M(null),C=M([]),f=M(!0),u=M(null),i=M("");function r(k){const h=new Date(k*1e3);return h.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"})+" "+h.toLocaleDateString("en",{month:"short",day:"numeric"})}function x(k){return k.length<=12?k:k.slice(0,8)+"..."+k.slice(-4)}async function S(){f.value=!0;const k=await w(l.noteId);if(!k){f.value=!1;return}_.value=k;const h=await j(l.noteId);C.value=P(h,l.noteId),f.value=!1}async function j(k){return new Promise(h=>{const $=[],N="thread-"+Math.random().toString(36).slice(2,8);let U=!1;const F=setTimeout(()=>{U||(U=!0,h($))},8e3),K="wss://relay.nostr.band";try{const O=new WebSocket(K);O.onopen=()=>{O.send(JSON.stringify(["REQ",N,{kinds:[1],"#e":[k],limit:100}]))},O.onmessage=Z=>{try{const V=JSON.parse(Z.data);if(Array.isArray(V)&&V[0]==="EVENT"&&V[1]===N&&V[2]){const H=V[2];$.find(X=>X.id===H.id)||$.push({id:H.id,pubkey:H.pubkey,authorName:x(H.pubkey),kind:H.kind,content:H.content,created_at:H.created_at,tags:H.tags??[]})}Array.isArray(V)&&V[0]==="EOSE"&&V[1]===N&&(clearTimeout(F),O.close(),U||(U=!0,h($)))}catch{}},O.onerror=()=>{clearTimeout(F),U||(U=!0,h($))},O.onclose=()=>{U||(U=!0,h($))}}catch{clearTimeout(F),h($)}})}function P(k,h,$=5){const N=new Map;for(const F of k){let K=h;const O=F.tags.filter(V=>V[0]==="e");if(O.length>0){const V=O.find(H=>H[3]==="reply");K=V?V[1]:O[O.length-1][1]}const Z=N.get(K)??[];Z.push(F),N.set(K,Z)}function U(F,K){const O=N.get(F)??[];return O.sort((Z,V)=>Z.created_at-V.created_at),O.map(Z=>({note:Z,children:K<$?U(Z.id,K+1):[]}))}return U(h,0)}function D(k){u.value=k}async function y(){if(!i.value.trim()||!v.value)return;const k=u.value??_.value;if(!k)return;const h=[["e",l.noteId,"","root"]];k.id!==l.noteId&&h.push(["e",k.id,"","reply"]),h.push(["p",k.pubkey]);const $={kind:1,created_at:Math.floor(Date.now()/1e3),tags:h,content:i.value.trim()},N=await p($);N&&(await g(N),i.value="",u.value=null,await S())}return le(()=>{S()}),(k,h)=>(s(),n("div",ri,[e("div",ci,[e("button",{class:"min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg text-white/60 hover:text-white/80 hover:bg-white/10 transition-colors",onClick:h[0]||(h[0]=$=>k.$emit("back"))},[...h[3]||(h[3]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),h[4]||(h[4]=e("h3",{class:"text-sm font-bold text-white/90"},"Thread",-1))]),e("div",di,[f.value?(s(),n("div",ui,[...h[5]||(h[5]=[e("p",{class:"text-xs text-white/30"},"Loading thread...",-1)])])):m("",!0),_.value?(s(),n("div",xi,[e("div",hi,[e("div",pi,d(_.value.authorName?.charAt(0)?.toUpperCase()??"?"),1),e("span",gi,d(_.value.authorName??"anon"),1),e("span",vi,d(r(_.value.created_at)),1)]),e("p",bi,d(_.value.content),1)])):m("",!0),C.value.length>0?(s(),n("div",fi,[e("p",mi,d(C.value.length)+" replies",1),(s(!0),n(I,null,B(C.value,$=>(s(),E(t(c),{key:$.note.id,node:$,depth:0,onReply:D},null,8,["node"]))),128))])):m("",!0),!f.value&&!_.value?(s(),n("div",wi,[...h[6]||(h[6]=[e("p",{class:"text-xs text-white/30"},"Thread not found",-1)])])):m("",!0)]),_.value&&t(b)?(s(),n("div",yi,[u.value?(s(),n("p",ki,[ne(" Replying to "+d(u.value.authorName??"anon")+" ",1),e("button",{class:"text-accent/60 ml-1",onClick:h[1]||(h[1]=$=>u.value=null)},"cancel")])):m("",!0),e("div",$i,[W(e("input",{"onUpdate:modelValue":h[2]||(h[2]=$=>i.value=$),type:"text",placeholder:"Reply...",class:"flex-1 px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors",onKeydown:ae(y,["enter"])},null,544),[[Q,i.value]]),e("button",{class:"px-3 py-2 rounded-lg text-xs bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors disabled:opacity-30",disabled:!i.value.trim(),onClick:y}," Reply ",8,_i)])])):m("",!0)]))}}),Si={class:"h-full flex flex-col"},ji={class:"p-4 border-b border-white/[0.08]"},Mi={class:"flex gap-1.5 flex-wrap"},Ti=["onClick"],Di={key:0,class:"flex-1 flex items-center justify-center"},Li={key:1,class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-3 pb-16 space-y-2"},Ii={key:0,class:"flex items-center justify-center py-12"},Bi={class:"flex gap-2 mb-3"},Pi=["placeholder"],Ni=["disabled"],Ai={class:"w-6 h-6 rounded-full shrink-0 flex items-center justify-center text-xs font-bold bg-purple-500/20 text-purple-400"},zi={class:"flex-1 min-w-0"},Fi={class:"text-xs text-white/60 font-mono truncate"},Ei={key:0,class:"text-xs text-white/30"},Ri=["onClick"],Vi={key:1,class:"flex items-center justify-center py-12"},Ui=["disabled"],qi=q({__name:"NostrLists",setup(a){const{isLoggedIn:c,signEvent:l,pubkey:w}=fe(),{publishEvent:g}=Le(),b=[{kind:3,label:"Follows"},{kind:1e4,label:"Mute"},{kind:10001,label:"Pin"},{kind:10003,label:"Bookmarks"}],p=M(3),v=M([]),_=M(!1),C=M(!1),f=M(""),u=M(!1),i=M(""),r=M(!1);function x(k){return k.length<=16?k:k.slice(0,8)+"..."+k.slice(-8)}function S(k){return k.filter(h=>h[0]==="p"||h[0]==="e"||h[0]==="t").map(h=>{let $=x(h[1]);if(h[0]==="p")try{$=Ye(h[1])}catch{}return{tag:h[0],value:h[1],displayValue:$,relay:h[2]||void 0,petname:h[3]||void 0}})}async function j(k){if(w.value){_.value=!0,C.value=!1,v.value=[];try{const h=new WebSocket("wss://relay.nostr.band"),$="list-"+Math.random().toString(36).slice(2,8),N=setTimeout(()=>{h.close(),_.value=!1},8e3);h.onopen=()=>{h.send(JSON.stringify(["REQ",$,{kinds:[k],authors:[w.value],limit:1}]))},h.onmessage=U=>{try{const F=JSON.parse(U.data);if(Array.isArray(F)&&F[0]==="EVENT"&&F[1]===$&&F[2]){const K=F[2];v.value=S(K.tags)}Array.isArray(F)&&F[0]==="EOSE"&&(clearTimeout(N),h.close(),_.value=!1)}catch{}},h.onerror=()=>{clearTimeout(N),_.value=!1}}catch{_.value=!1}}}function P(){let k=f.value.trim();if(!k)return;let h=k;const $=p.value===3||p.value===1e4?"p":"e";if(k.startsWith("npub"))try{h=ft(k)}catch{return}if(v.value.find(U=>U.value===h))return;let N=x(h);if($==="p")try{N=Ye(h)}catch{}v.value.push({tag:$,value:h,displayValue:N}),C.value=!0,f.value=""}function D(k){v.value=v.value.filter(h=>h.value!==k.value),C.value=!0}async function y(){if(!w.value)return;u.value=!0,i.value="";const k=v.value.map(F=>{const K=[F.tag,F.value];return F.relay&&K.push(F.relay),F.petname&&K.push(F.petname),K}),h={kind:p.value,created_at:Math.floor(Date.now()/1e3),tags:k,content:""},$=await l(h);if(!$){u.value=!1,i.value="Signing failed",r.value=!1;return}const N=await g($),U=N.filter(F=>F.success).length;u.value=!1,C.value=!1,U>0?(i.value=`Published to ${U}/${N.length} relays`,r.value=!0):(i.value="Failed to publish",r.value=!1)}return le(()=>{j(p.value)}),(k,h)=>(s(),n("div",Si,[e("div",ji,[h[1]||(h[1]=e("h3",{class:"text-sm font-bold text-white/90 mb-3"},"Nostr Lists",-1)),e("div",Mi,[(s(),n(I,null,B(b,$=>e("button",{key:$.kind,class:o(["text-xs px-2 py-1 rounded-md transition-all duration-150",p.value===$.kind?"nav-tab-active":"text-white/40 hover:text-white/70 hover:bg-white/5"]),onClick:N=>{p.value=$.kind,j($.kind)}},d($.label),11,Ti)),64))])]),t(c)?(s(),n("div",Li,[_.value?(s(),n("div",Ii,[...h[3]||(h[3]=[e("p",{class:"text-xs text-white/30"},"Loading list...",-1)])])):m("",!0),e("div",Bi,[W(e("input",{"onUpdate:modelValue":h[0]||(h[0]=$=>f.value=$),type:"text",placeholder:p.value===3?"Add npub or hex pubkey...":"Add item (hex id or npub)...",class:"flex-1 px-3 py-2 rounded-lg text-base bg-white/5 text-white/80 placeholder:text-white/25 outline-none focus:bg-white/10 transition-colors font-mono",onKeydown:ae(P,["enter"])},null,40,Pi),[[Q,f.value]]),e("button",{class:"px-2.5 py-2 rounded-lg text-xs bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors disabled:opacity-30",disabled:!f.value.trim(),onClick:P}," Add ",8,Ni)]),(s(!0),n(I,null,B(v.value,$=>(s(),n("div",{key:$.value,class:"flex items-center gap-2 p-2.5 rounded-xl bg-white/[0.03] border border-white/5"},[e("div",Ai,d($.tag==="p"?"P":$.tag==="e"?"E":$.tag==="t"?"#":"?"),1),e("div",zi,[e("p",Fi,d($.displayValue),1),$.petname?(s(),n("p",Ei,d($.petname),1)):m("",!0)]),e("button",{class:"text-xs px-2 py-1 rounded bg-white/5 text-red-400/50 hover:text-red-400/80 hover:bg-red-400/10 transition-colors shrink-0",onClick:N=>D($)}," Remove ",8,Ri)]))),128)),!_.value&&v.value.length===0?(s(),n("div",Vi,[...h[4]||(h[4]=[e("p",{class:"text-xs text-white/30"},"List is empty",-1)])])):m("",!0),C.value?(s(),n("button",{key:2,class:"w-full py-2.5 rounded-lg text-xs font-medium bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors disabled:opacity-30 mt-4",disabled:u.value,onClick:y},d(u.value?"Publishing...":"Publish updated list"),9,Ui)):m("",!0),i.value?(s(),n("p",{key:3,class:o(["text-xs text-center",r.value?"text-emerald-400/60":"text-red-400/60"])},d(i.value),3)):m("",!0)])):(s(),n("div",Di,[...h[2]||(h[2]=[e("p",{class:"text-xs text-white/30"},"Sign in with Nostr to manage lists",-1)])]))]))}}),Gi={class:"article-reader h-full flex"},Oi={key:0,class:"hidden lg:flex flex-col w-56 shrink-0 border-r border-white/5 overflow-y-auto scrollbar-hide py-4 px-3"},Hi=["onClick"],Wi={class:"sticky top-0 z-10 flex items-center gap-2 px-4 py-2 bg-black/60 backdrop-blur-md border-b border-white/5"},Ki={class:"flex-1 text-xs text-white/40 truncate"},Yi=["disabled"],Qi=["disabled"],Ji={key:0,class:"lg:hidden bg-black/40 backdrop-blur-md border-b border-white/5 px-4 py-2 space-y-0.5 animate-fade-up-fast"},Zi=["onClick"],Xi={key:0,class:"text-xl font-bold text-white/96 mb-4"},er=["innerHTML"],tr=q({__name:"ArticleReader",props:{content:{},title:{}},emits:["back"],setup(a){const c=a,l=[13,15,17,19,21],w=localStorage.getItem("aiui-article-font-size"),g=M(w?parseInt(w,10):1);ce(g,D=>{localStorage.setItem("aiui-article-font-size",String(D))});const b=M(!1),p=new ds({html:!1,linkify:!0,breaks:!0});p.renderer.rules.heading_open=(D,y,k,h,$)=>{const N=D[y],U=parseInt(N.tag.slice(1),10);if(U===2||U===3){const O=(D[y+1]?.children?.reduce((Z,V)=>Z+(V.content||""),"")||"").toLowerCase().replace(/[^\w]+/g,"-").replace(/(^-|-$)/g,"");N.attrSet("id",O)}return $.renderToken(D,y,k)};const v=p.renderer.rules.link_open||function(D,y,k,h,$){return $.renderToken(D,y,k)};p.renderer.rules.link_open=function(D,y,k,h,$){return D[y].attrSet("target","_blank"),D[y].attrSet("rel","noopener noreferrer"),v(D,y,k,h,$)};const _=L(()=>p.render(c.content)),C=L(()=>{const D=[],y=/^(#{2,3})\s+(.+)$/gm;let k;for(;(k=y.exec(c.content))!==null;){const h=k[2].trim(),$=h.toLowerCase().replace(/[^\w]+/g,"-").replace(/(^-|-$)/g,"");D.push({text:h,id:$,level:k[1].length})}return D}),f=L(()=>{const D=c.content.split(/\s+/).length;return Math.max(1,Math.ceil(D/200))}),u=M(null),i=M(null),r=M(0);let x=null;function S(){if(!u.value)return;x?.disconnect(),x=new IntersectionObserver(y=>{for(const k of y)if(k.isIntersecting){const h=k.target.id,$=C.value.findIndex(N=>N.id===h);$>=0&&(r.value=$)}},{root:u.value,rootMargin:"-20% 0px -60% 0px",threshold:0}),i.value?.querySelectorAll("h2[id], h3[id]")?.forEach(y=>x.observe(y))}le(()=>{setTimeout(S,100)}),ce(()=>c.content,()=>{setTimeout(S,100)}),Xt(()=>{x?.disconnect()});function j(D){i.value?.querySelector(`#${CSS.escape(D)}`)?.scrollIntoView({behavior:"smooth",block:"start"})}function P(){const D=window.open("","_blank");D&&(D.document.write(`<!DOCTYPE html>
|
||
<html><head><title>${c.title||"Article"}</title>
|
||
<style>
|
||
body { font-family: Georgia, serif; max-width: 700px; margin: 2em auto; padding: 0 1em; line-height: 1.7; color: #222; }
|
||
h1 { font-size: 1.8em; margin-bottom: 0.5em; }
|
||
h2 { font-size: 1.4em; margin-top: 1.5em; }
|
||
h3 { font-size: 1.2em; margin-top: 1.2em; }
|
||
code { background: #f0f0f0; padding: 2px 5px; border-radius: 3px; }
|
||
pre { background: #f5f5f5; padding: 1em; overflow-x: auto; border-radius: 5px; }
|
||
blockquote { border-left: 3px solid #ccc; padding-left: 1em; color: #555; }
|
||
img { max-width: 100%; }
|
||
a { color: #0066cc; }
|
||
</style></head><body>
|
||
${c.title?`<h1>${c.title}</h1>`:""}
|
||
${_.value}
|
||
</body></html>`),D.document.close(),D.print())}return(D,y)=>(s(),n("div",Gi,[C.value.length>1?(s(),n("aside",Oi,[y[4]||(y[4]=e("p",{class:"text-xs uppercase tracking-wider text-white/30 mb-2 px-2"},"Contents",-1)),(s(!0),n(I,null,B(C.value,(k,h)=>(s(),n("button",{key:h,class:o(["text-left text-xs leading-relaxed py-1 px-2 rounded transition-colors truncate",[r.value===h?"text-accent bg-accent/10":"text-white/50 hover:text-white/70 hover:bg-white/5",k.level===3?"pl-5":""]]),onClick:$=>j(k.id)},d(k.text),11,Hi))),128))])):m("",!0),e("div",{ref_key:"contentRef",ref:u,class:"flex-1 overflow-y-auto scrollbar-hide"},[e("div",Wi,[e("button",{class:"min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg text-white/60 hover:text-white/80 hover:bg-white/10 transition-colors",title:"Back",onClick:y[0]||(y[0]=k=>D.$emit("back"))},[...y[5]||(y[5]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),e("span",Ki,d(f.value)+" min read",1),C.value.length>1?(s(),n("button",{key:0,class:"lg:hidden min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg text-white/60 hover:text-white/80 hover:bg-white/10 transition-colors",title:"Table of contents",onClick:y[1]||(y[1]=k=>b.value=!b.value)},[...y[6]||(y[6]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h7"})],-1)])])):m("",!0),e("button",{class:"min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg text-white/60 hover:text-white/80 hover:bg-white/10 transition-colors",title:"Decrease font size",disabled:g.value<=0,onClick:y[2]||(y[2]=k=>g.value=Math.max(0,g.value-1))},[...y[7]||(y[7]=[e("span",{class:"text-xs font-bold"},"A-",-1)])],8,Yi),e("button",{class:"min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg text-white/60 hover:text-white/80 hover:bg-white/10 transition-colors",title:"Increase font size",disabled:g.value>=l.length-1,onClick:y[3]||(y[3]=k=>g.value=Math.min(l.length-1,g.value+1))},[...y[8]||(y[8]=[e("span",{class:"text-xs font-bold"},"A+",-1)])],8,Qi),e("button",{class:"min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg text-white/60 hover:text-white/80 hover:bg-white/10 transition-colors",title:"Print",onClick:P},[...y[9]||(y[9]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"})],-1)])])]),b.value&&C.value.length>1?(s(),n("div",Ji,[(s(!0),n(I,null,B(C.value,(k,h)=>(s(),n("button",{key:h,class:o(["block w-full text-left text-xs py-1 px-2 rounded transition-colors truncate",[r.value===h?"text-accent bg-accent/10":"text-white/50 hover:text-white/70",k.level===3?"pl-5":""]]),onClick:$=>{j(k.id),b.value=!1}},d(k.text),11,Zi))),128))])):m("",!0),e("article",{ref_key:"articleRef",ref:i,class:"article-body px-4 md:px-8 py-6 max-w-prose mx-auto leading-relaxed text-white/90",style:G({fontSize:l[g.value]+"px"})},[a.title?(s(),n("h1",Xi,d(a.title),1)):m("",!0),e("div",{class:"article-content [&_h2]:text-lg [&_h2]:font-semibold [&_h2]:text-white/96 [&_h2]:mt-8 [&_h2]:mb-3 [&_h3]:text-base [&_h3]:font-medium [&_h3]:text-white/90 [&_h3]:mt-6 [&_h3]:mb-2 [&_p]:mb-4 [&_ul]:list-disc [&_ul]:ml-5 [&_ul]:mb-4 [&_ol]:list-decimal [&_ol]:ml-5 [&_ol]:mb-4 [&_li]:mb-1 [&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2 [&_blockquote]:border-l-2 [&_blockquote]:border-accent/30 [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:text-white/70 [&_blockquote]:my-4 [&_code]:bg-white/10 [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-[0.9em] [&_pre]:bg-white/5 [&_pre]:rounded-lg [&_pre]:p-4 [&_pre]:overflow-x-auto [&_pre]:my-4 [&_img]:rounded-lg [&_img]:max-w-full [&_img]:my-4 [&_hr]:border-white/10 [&_hr]:my-6",innerHTML:_.value},null,8,er)],4)],512)]))}}),sr={class:"h-full flex flex-col"},nr={class:"flex items-center gap-2 px-4 py-3 border-b border-white/[0.08]"},lr={class:"text-xs text-white/40 truncate"},or={class:"flex-1 overflow-y-auto custom-scrollbar"},ar={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-3 pb-16 space-y-2"},ir={key:0,class:"flex items-center justify-center py-12"},rr=["onClick"],cr={class:"space-y-1"},dr={class:"text-xs font-semibold text-white/80 line-clamp-2"},ur={class:"text-xs text-white/40 line-clamp-2"},xr={class:"flex items-center gap-2"},hr={class:"text-xs text-white/25 font-mono"},pr={class:"text-xs text-white/20"},gr={key:0,class:"text-xs text-accent/40 ml-auto"},vr={key:1,class:"flex items-center justify-center py-12"},br=q({__name:"NostrArticles",setup(a){const c=M([]),l=M(!0),w=M(null),g=L(()=>w.value?v(w.value):"");function b(u){return u.length<=16?u:u.slice(0,8)+"..."+u.slice(-4)}function p(u){return new Date(u*1e3).toLocaleDateString("en",{month:"short",day:"numeric",year:"numeric"})}function v(u){const i=u.tags.find(x=>x[0]==="title");return i?.[1]?i[1]:u.content.split(`
|
||
`)[0].replace(/^#+ /,"").slice(0,60)||"Untitled"}function _(u){const i=u.tags.find(r=>r[0]==="summary");return i?.[1]?i[1]:u.content.slice(0,120).replace(/[#*_]/g,"")}function C(u){return u.tags.find(r=>r[0]==="image")?.[1]??null}async function f(){l.value=!0,c.value=[];const u="wss://relay.nostr.band",i="articles-"+Math.random().toString(36).slice(2,8);try{const r=new WebSocket(u),x=[],S=setTimeout(()=>{r.close(),c.value=x,l.value=!1},1e4);r.onopen=()=>{r.send(JSON.stringify(["REQ",i,{kinds:[30023],limit:30}]))},r.onmessage=j=>{try{const P=JSON.parse(j.data);if(Array.isArray(P)&&P[0]==="EVENT"&&P[1]===i&&P[2]){const D=P[2];x.find(y=>y.id===D.id)||x.push({id:D.id,pubkey:D.pubkey,authorName:b(D.pubkey),kind:D.kind,content:D.content,created_at:D.created_at,tags:D.tags??[]})}Array.isArray(P)&&P[0]==="EOSE"&&(clearTimeout(S),r.close(),x.sort((D,y)=>y.created_at-D.created_at),c.value=x,l.value=!1)}catch{}},r.onerror=()=>{clearTimeout(S),l.value=!1}}catch{l.value=!1}}return le(()=>{f()}),(u,i)=>(s(),n("div",sr,[w.value?(s(),n(I,{key:0},[e("div",nr,[e("button",{class:"min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg text-white/60 hover:text-white/80 hover:bg-white/10 transition-colors",onClick:i[0]||(i[0]=r=>w.value=null)},[...i[1]||(i[1]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),e("span",lr,d(g.value),1)]),e("div",or,[se(tr,{content:w.value.content,title:g.value},null,8,["content","title"])])],64)):(s(),n(I,{key:1},[i[4]||(i[4]=e("div",{class:"p-4 border-b border-white/[0.08]"},[e("h3",{class:"text-sm font-bold text-white/90 mb-2"},"Long-Form Articles"),e("p",{class:"text-xs text-white/30"},"NIP-23 kind:30023 articles from your network")],-1)),e("div",ar,[l.value?(s(),n("div",ir,[...i[2]||(i[2]=[e("p",{class:"text-xs text-white/30"},"Loading articles...",-1)])])):m("",!0),(s(!0),n(I,null,B(c.value,r=>(s(),n("button",{key:r.id,class:"w-full text-left p-3 rounded-xl transition-all duration-150 bg-white/[0.03] hover:bg-white/[0.07] border border-white/5",onClick:x=>w.value=r},[e("div",cr,[e("h4",dr,d(v(r)),1),e("p",ur,d(_(r)),1),e("div",xr,[e("span",hr,d(b(r.pubkey)),1),e("span",pr,d(p(r.created_at)),1),C(r)?(s(),n("span",gr,"has image")):m("",!0)])])],8,rr))),128)),!l.value&&c.value.length===0?(s(),n("div",vr,[...i[3]||(i[3]=[e("p",{class:"text-xs text-white/30"},"No articles found",-1)])])):m("",!0)])],64))]))}}),Qe=1440*60*1e3,yt="aiui-nip05-cache",Te=M(new Map);function fr(){try{const a=localStorage.getItem(yt);if(a){const c=JSON.parse(a),l=Date.now(),w=c.filter(([,g])=>l-g.timestamp<Qe);Te.value=new Map(w)}}catch{}}function mr(){try{const a=Array.from(Te.value.entries());localStorage.setItem(yt,JSON.stringify(a))}catch{}}fr();function wr(){async function a(w,g){const b=`${w}:${g}`,p=Te.value.get(b);if(p&&Date.now()-p.timestamp<Qe)return p.verified;try{const[v,_]=w.split("@");if(!v||!_)return!1;const C=await fetch(`https://${_}/.well-known/nostr.json?name=${encodeURIComponent(v)}`);if(!C.ok)return c(b,!1,g);const i=(await C.json())?.names?.[v]===g;return c(b,i,g)}catch{return c(b,!1,g)}}function c(w,g,b){return Te.value.set(w,{verified:g,pubkey:b,timestamp:Date.now()}),mr(),g}function l(w,g){const b=Te.value.get(`${w}:${g}`);return!b||Date.now()-b.timestamp>=Qe?null:b.verified}return{verifyNip05:a,isVerified:l}}const yr={class:"h-full flex flex-col"},kr={class:"flex gap-2 px-4 pt-3 pb-1"},$r=["onClick"],_r={class:"p-4 space-y-3 border-b border-white/[0.08]"},Cr={class:"flex items-center justify-between gap-2"},Sr={class:"flex items-center gap-2 shrink-0"},jr={class:"text-xs font-mono text-white/30"},Mr={key:1,class:"rounded-lg bg-white/5 border border-white/10 p-3 space-y-2"},Tr=["onKeydown"],Dr={class:"flex items-center justify-between gap-2"},Lr=["disabled"],Ir={key:0,class:"space-y-1"},Br={class:"truncate font-mono text-white/40"},Pr={class:"flex gap-2"},Nr=["disabled"],Ar={class:"flex gap-2"},zr=["onClick"],Fr={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-3 pb-16 space-y-2"},Er={key:0,class:"flex flex-col items-center justify-center py-12 gap-3"},Rr=["onClick"],Vr={class:"flex items-start gap-2.5"},Ur={class:"w-8 h-8 rounded-full shrink-0 overflow-hidden"},qr=["src","alt","onError"],Gr={key:1,class:"w-full h-full flex items-center justify-center text-xs font-bold bg-purple-500/20 text-purple-400"},Or={class:"flex-1 min-w-0"},Hr={class:"flex items-center gap-1.5"},Wr={class:"text-xs font-semibold truncate text-white/80"},Kr={key:0,class:"text-xs truncate text-purple-400/60 flex items-center gap-0.5"},Yr=["title"],Qr={class:"text-xs ml-auto shrink-0 text-white/20"},Jr={class:"text-xs mt-1 leading-relaxed line-clamp-3 text-white/60"},Zr={class:"flex items-center gap-3 mt-2"},Xr=["onClick"],ec={key:0,class:"text-xs px-1.5 py-0.5 rounded bg-white/5 text-white/30"},tc={class:"mt-4 pt-4 border-t border-white/5"},sc={class:"space-y-1"},nc={class:"truncate font-mono text-white/40"},lc={key:1,class:"flex items-center justify-center py-12"},oc=q({__name:"NostrGrid",setup(a){const{events:c,isConnected:l,relayStates:w,connect:g,publishEvent:b,searchResults:p,isSearching:v,searchNostr:_}=Le(),{isLoggedIn:C,signEvent:f}=fe(),{verifyNip05:u}=wr(),i=M("feed"),r=[{id:"feed",label:"Feed"},{id:"articles",label:"Articles"},{id:"dms",label:"Messages"},{id:"lists",label:"Lists"},{id:"relays",label:"Relays"},{id:"profile",label:"Profile"}],x=M(null),S=Pe(new Set),j=M(""),P=M(null),D=M(!1),y=M(""),k=M(null),h=M(!1),$=M([]),N=M(!1),U=M(""),F=M(void 0);function K(ee){U.value=ee.authorName??ee.pubkey.slice(0,12),F.value=void 0,N.value=!0}const O=Pe({}),Z=[{id:1,label:"Notes"},{id:30023,label:"Articles"},{id:9735,label:"Zaps"},{id:6,label:"Reposts"}];function V(ee){const z=Math.floor(Date.now()/1e3-ee);return z<60?"now":z<3600?`${Math.floor(z/60)}m`:z<86400?`${Math.floor(z/3600)}h`:`${Math.floor(z/86400)}d`}const H=M(!1),X=L(()=>{if(H.value&&p.value.length>0){let z=p.value;return P.value!==null&&(z=z.filter(A=>A.kind===P.value)),z}let ee=c.value;if(P.value!==null&&(ee=ee.filter(z=>z.kind===P.value)),j.value){const z=j.value.toLowerCase();ee=ee.filter(A=>A.content.toLowerCase().includes(z)||(A.authorName??"").toLowerCase().includes(z)||(A.nip05??"").toLowerCase().includes(z))}return ee});function ge(){j.value.trim()&&(H.value=!0,_(j.value.trim(),P.value?[P.value]:void 0))}ce(j,ee=>{ee.trim()||(H.value=!1)}),ce(X,ee=>{for(const z of ee)z.nip05&&O[z.id]===void 0&&(O[z.id]=null,u(z.nip05,z.pubkey).then(A=>{O[z.id]=A}))},{immediate:!0});async function me(){if(!y.value.trim()||h.value)return;h.value=!0,$.value=[];const ee={kind:1,created_at:Math.floor(Date.now()/1e3),tags:[],content:y.value.trim()},z=await f(ee);if(!z){h.value=!1;return}const A=await b(z);$.value=A,h.value=!1,A.some(re=>re.success)&&(y.value="",setTimeout(()=>{$.value=[],D.value=!1},3e3))}return le(async()=>{g(),D.value&&(await ye(),k.value?.focus())}),(ee,z)=>(s(),n("div",yr,[e("div",kr,[(s(),n(I,null,B(r,A=>e("button",{key:A.id,class:o(["text-xs px-2.5 min-h-[44px] rounded-md transition-all duration-150 flex items-center justify-center",i.value===A.id?"nav-tab-active":"text-white/40 hover:text-white/70 hover:bg-white/5"]),onClick:re=>i.value=A.id},d(A.label),11,$r)),64))]),i.value==="dms"?(s(),E(wa,{key:0})):i.value==="relays"?(s(),E(Aa,{key:1})):i.value==="profile"?(s(),E(Ka,{key:2})):i.value==="lists"?(s(),E(qi,{key:3})):i.value==="articles"?(s(),E(br,{key:4})):i.value==="feed"&&x.value?(s(),E(Ci,{key:5,"note-id":x.value,onBack:z[0]||(z[0]=A=>x.value=null)},null,8,["note-id"])):(s(),n(I,{key:6},[e("div",_r,[e("div",Cr,[z[5]||(z[5]=e("h3",{class:"text-sm font-bold text-white/90"}," Nostr Feed ",-1)),e("div",Sr,[e("span",jr,d(X.value.length)+" notes ",1),ie(ee.$slots,"header-actions")])]),t(C)?(s(),n("button",{key:0,class:"w-full text-left px-3 py-2 rounded-lg text-xs text-white/40 bg-white/5 hover:bg-white/10 transition-colors",onClick:z[1]||(z[1]=A=>D.value=!D.value)},d(D.value?"Cancel":"Write a note..."),1)):m("",!0),D.value&&t(C)?(s(),n("div",Mr,[W(e("textarea",{ref_key:"composeRef",ref:k,"onUpdate:modelValue":z[2]||(z[2]=A=>y.value=A),class:"w-full bg-transparent text-base text-white/80 placeholder:text-white/25 outline-none resize-none min-h-[80px]",placeholder:"What's on your mind?",onKeydown:[ae(he(me,["meta"]),["enter"]),ae(he(me,["ctrl"]),["enter"])]},null,40,Tr),[[Q,y.value]]),e("div",Dr,[e("span",{class:o(["text-xs tabular-nums",y.value.length>280?"text-accent/80":"text-white/25"])},d(y.value.length),3),e("button",{class:"text-xs px-3 py-1.5 rounded-lg bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors disabled:opacity-30",disabled:!y.value.trim()||h.value,onClick:me},d(h.value?"Publishing...":"Publish"),9,Lr)]),$.value.length>0?(s(),n("div",Ir,[(s(!0),n(I,null,B($.value,A=>(s(),n("div",{key:A.url,class:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-white/[0.02]"},[e("span",{class:o(["w-1.5 h-1.5 rounded-full shrink-0",A.success?"bg-emerald-500":"bg-red-400/60"])},null,2),e("span",Br,d(A.url),1),e("span",{class:o(["ml-auto shrink-0",A.success?"text-emerald-400/60":"text-red-400/60"])},d(A.message),3)]))),128))])):m("",!0)])):m("",!0),e("div",Pr,[W(e("input",{"onUpdate:modelValue":z[3]||(z[3]=A=>j.value=A),type:"text",placeholder:"Search notes, npubs...",class:"flex-1 px-3 py-2 rounded-lg text-base outline-none transition-colors bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10",onKeydown:ae(ge,["enter"])},null,544),[[Q,j.value]]),j.value.trim()?(s(),n("button",{key:0,class:"px-2.5 py-2 rounded-lg text-xs bg-accent/15 text-accent/80 hover:bg-accent/25 transition-colors disabled:opacity-30 shrink-0",disabled:t(v),onClick:ge},d(t(v)?"...":"NIP-50"),9,Nr)):m("",!0)]),e("div",Ar,[(s(),n(I,null,B(Z,A=>e("button",{key:A.id,class:o(["text-xs px-2.5 min-h-[44px] rounded-md transition-all duration-150 flex items-center justify-center",P.value===A.id?"nav-tab-active":"text-white/40 hover:text-white/70 hover:bg-white/5"]),onClick:re=>P.value=P.value===A.id?null:A.id},d(A.label),11,zr)),64))])]),e("div",Fr,[!t(l)&&t(c).length===0?(s(),n("div",Er,[...z[6]||(z[6]=[e("svg",{class:"w-5 h-5 animate-spin text-white/30",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1),e("p",{class:"text-xs text-white/30"},"Connecting to relays...",-1)])])):m("",!0),(s(!0),n(I,null,B(X.value,A=>(s(),n("button",{key:A.id,class:"w-full text-left p-3 rounded-xl transition-all duration-150 bg-white/[0.03] hover:bg-white/[0.07] border border-white/5",onClick:re=>x.value=A.id},[e("div",Vr,[e("div",Ur,[A.authorPicture&&!S.has(A.pubkey)?(s(),n("img",{key:0,src:A.authorPicture,alt:A.authorName??"profile",class:"w-full h-full object-cover",loading:"lazy",onError:re=>S.add(A.pubkey)},null,40,qr)):(s(),n("div",Gr,d(A.authorName?.charAt(0)?.toUpperCase()??"?"),1))]),e("div",Or,[e("div",Hr,[e("span",Wr,d(A.authorName??"anon"),1),A.nip05?(s(),n("span",Kr,[O[A.id]===!0?(s(),n("svg",{key:0,class:"w-2.5 h-2.5 text-emerald-400 shrink-0",fill:"currentColor",viewBox:"0 0 20 20",title:A.nip05},[...z[7]||(z[7]=[e("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)])],8,Yr)):m("",!0),ne(" "+d(A.nip05),1)])):m("",!0),e("span",Qr,d(V(A.created_at)),1)]),e("p",Jr,d(A.content),1),e("div",Zr,[e("button",{class:"text-xs px-3 py-2 min-h-[44px] min-w-[44px] rounded bg-white/5 text-accent/60 hover:text-accent hover:bg-accent/10 transition-colors flex items-center justify-center",onClick:he(re=>K(A),["stop"])}," Zap ",8,Xr),A.kind!==1?(s(),n("span",ec," kind:"+d(A.kind),1)):m("",!0)])])])],8,Rr))),128)),e("div",tc,[z[8]||(z[8]=e("p",{class:"text-xs font-medium mb-2 text-white/30"},"Relays",-1)),e("div",sc,[(s(!0),n(I,null,B(t(w),A=>(s(),n("div",{key:A.url,class:"flex items-center gap-2 text-xs px-2 py-1 rounded-lg bg-white/[0.02]"},[e("span",{class:o(["w-1.5 h-1.5 rounded-full shrink-0",A.connected?"bg-emerald-500":"bg-red-400/60"])},null,2),e("span",nc,d(A.url),1)]))),128))])]),t(l)&&X.value.length===0?(s(),n("div",lc,[...z[9]||(z[9]=[e("p",{class:"text-sm text-white/30"},"No notes match your search",-1)])])):m("",!0)])],64)),se(ii,{"is-open":N.value,"target-name":U.value,"lightning-address":F.value,onClose:z[4]||(z[4]=A=>N.value=!1)},null,8,["is-open","target-name","lightning-address"])]))}}),ac={class:"h-full flex flex-col"},ic={class:"flex items-center justify-between"},rc={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-3 pb-16 space-y-3"},cc={class:"glass-card rounded-xl p-3"},dc={class:"flex items-center gap-2 mb-2"},uc={class:"grid grid-cols-3 gap-2"},xc={class:"text-center"},hc={class:"text-center"},pc={class:"text-lg font-bold text-green-400"},gc={class:"text-center"},vc={class:"text-lg font-bold text-yellow-400"},bc={class:"mt-3 space-y-1"},fc={class:"flex items-center gap-2 min-w-0"},mc={key:0,class:"glass-card rounded-xl p-3"},wc={class:"flex items-center gap-2 mb-2"},yc={class:"grid grid-cols-2 gap-3"},kc={key:1,class:"glass-card rounded-xl p-3"},$c={class:"flex items-center gap-2 mb-2"},_c={class:"grid grid-cols-2 gap-3"},Cc={class:"text-sm font-mono font-semibold",style:{color:"#F7931A"}},Sc={class:"text-sm font-mono font-semibold",style:{color:"#F7931A"}},jc={key:0,class:"mt-3"},Mc={class:"text-base font-mono font-bold",style:{color:"#F7931A"}},Tc=q({__name:"NodeStatusGrid",props:{status:{}},setup(a){const c=a,{isDark:l}=J(),w=L(()=>{const v=c.status.bitcoin.sync_progress;return v==null?"Unknown":(v*100).toFixed(v>=1?0:2)+"%"}),g=L(()=>{const v=c.status.bitcoin.sync_progress??0;return v>=1?"text-green-400":v>=.99?l.value?"text-yellow-400":"text-yellow-600":l.value?"text-red-400":"text-red-600"}),b=L(()=>(c.status.wallet.balance_sats??0)+(c.status.wallet.channel_balance_sats??0));function p(v){return v==null?"0 sats":v.toLocaleString()+" sats"}return(v,_)=>(s(),n("div",ac,[e("div",{class:"p-4 space-y-2",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",ic,[e("h3",{class:o(["text-sm font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.status.system.name??"Node")+" "+d(a.status.system.version?"v"+a.status.system.version:""),3),e("span",{class:o(["flex items-center gap-1.5 text-xs",a.status.network.connected?"text-green-400/80":"text-red-400/80"])},[e("span",{class:o(["w-1.5 h-1.5 rounded-full",a.status.network.connected?"bg-green-400":"bg-red-400"])},null,2),ne(" "+d(a.status.network.connected?"Online":"Offline"),1)],2)])],4),e("div",rc,[e("div",cc,[e("div",dc,[_[0]||(_[0]=e("span",{class:"text-base"},"📦",-1)),e("span",{class:o(["text-xs font-semibold",t(l)?"text-white/90":"text-gray-900"])},"Services",2)]),e("div",uc,[e("div",xc,[e("div",{class:o(["text-lg font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.status.appsSummary.total),3),e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"Total",2)]),e("div",hc,[e("div",pc,d(a.status.appsSummary.running),1),e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"Running",2)]),e("div",gc,[e("div",vc,d(a.status.appsSummary.stopped),1),e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"Stopped",2)])]),e("div",bc,[(s(!0),n(I,null,B(a.status.apps,C=>(s(),n("div",{key:C.id,class:o(["flex items-center justify-between py-1 px-2 rounded-lg",t(l)?"hover:bg-white/5":"hover:bg-black/3"])},[e("div",fc,[e("span",{class:o(["w-1.5 h-1.5 rounded-full shrink-0",C.state==="running"?"bg-green-400":"bg-yellow-400"])},null,2),e("span",{class:o(["text-xs truncate",t(l)?"text-white/80":"text-gray-800"])},d(C.name),3)]),e("span",{class:o(["text-xs shrink-0 ml-2",t(l)?"text-white/30":"text-gray-400"])},d(C.status),3)],2))),128))])]),a.status.bitcoin.available?(s(),n("div",mc,[e("div",wc,[_[1]||(_[1]=e("span",{class:"text-base"},"₿",-1)),e("span",{class:o(["text-xs font-semibold",t(l)?"text-white/90":"text-gray-900"])},"Bitcoin Node",2)]),e("div",yc,[e("div",null,[e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"Block Height",2),e("div",{class:o(["text-sm font-mono font-semibold",t(l)?"text-white/90":"text-gray-900"])},d((a.status.bitcoin.block_height??0).toLocaleString()),3)]),e("div",null,[e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"Sync",2),e("div",{class:o(["text-sm font-semibold",g.value])},d(w.value),3)]),e("div",null,[e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"Chain",2),e("div",{class:o(["text-sm font-semibold",t(l)?"text-white/80":"text-gray-800"])},d(a.status.bitcoin.chain??"unknown"),3)]),e("div",null,[e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"Mempool",2),e("div",{class:o(["text-sm font-semibold",t(l)?"text-white/80":"text-gray-800"])},d((a.status.bitcoin.mempool_tx_count??0).toLocaleString())+" txs ",3)])])])):m("",!0),a.status.wallet.available?(s(),n("div",kc,[e("div",$c,[_[2]||(_[2]=e("span",{class:"text-base"},"⚡",-1)),e("span",{class:o(["text-xs font-semibold",t(l)?"text-white/90":"text-gray-900"])}," Lightning"+d(a.status.wallet.alias?" — "+a.status.wallet.alias:""),3),a.status.wallet.synced_to_chain!==void 0?(s(),n("span",{key:0,class:o(["ml-auto text-xs px-1.5 py-0.5 rounded",a.status.wallet.synced_to_chain?t(l)?"bg-green-400/10 text-green-400":"bg-green-100 text-green-700":t(l)?"bg-yellow-400/10 text-yellow-400":"bg-yellow-100 text-yellow-700"])},d(a.status.wallet.synced_to_chain?"Synced":"Syncing"),3)):m("",!0)]),e("div",_c,[e("div",null,[e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"On-chain",2),e("div",Cc,d(p(a.status.wallet.balance_sats)),1)]),e("div",null,[e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"In Channels",2),e("div",Sc,d(p(a.status.wallet.channel_balance_sats)),1)]),e("div",null,[e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"Channels",2),e("div",{class:o(["text-sm font-semibold",t(l)?"text-white/80":"text-gray-800"])},d(a.status.wallet.num_active_channels??0),3)]),e("div",null,[e("div",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-500"])},"Peers",2),e("div",{class:o(["text-sm font-semibold",t(l)?"text-white/80":"text-gray-800"])},d(a.status.wallet.num_peers??0),3)])]),b.value>0?(s(),n("div",jc,[e("div",{class:o(["text-xs mb-1",t(l)?"text-white/40":"text-gray-500"])},"Total Balance",2),e("div",Mc,d(p(b.value)),1)])):m("",!0)])):m("",!0)])]))}}),Dc={class:"h-full flex flex-col"},Lc={class:"flex items-center justify-between gap-2"},Ic={class:"flex flex-wrap gap-1.5"},Bc=["onClick"],Pc={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-3 pb-16"},Nc={key:0,class:"grid grid-cols-2 sm:grid-cols-3 gap-2"},Ac={class:"w-full h-full flex flex-col items-center justify-center p-3 text-center"},zc={class:"text-3xl mb-2"},Fc={key:1,class:"space-y-1"},Ec={class:"min-w-0 flex-1"},Rc={class:"text-lg shrink-0"},Vc={class:"min-w-0 flex-1"},Uc={key:0},qc={key:1},Gc={key:0,class:"py-8 text-center"},Oc=q({__name:"NodeFilesGrid",props:{files:{},title:{},initialFilter:{}},setup(a){const c=a,{isDark:l}=J(),w=M(""),g=M(c.initialFilter??"all"),b=y=>/\.(jpg|jpeg|png|gif|webp|svg|heic|heif)$/i.test(y),p=y=>/\.(mp4|mkv|avi|mov|webm)$/i.test(y),v=y=>/\.(mp3|flac|wav|ogg|m4a|aac|opus)$/i.test(y),_=y=>/\.(pdf|doc|docx|txt|md|ods|xlsx|csv)$/i.test(y),C=L(()=>c.files.filter(y=>y.type==="file"&&b(y.name)).length),f=L(()=>c.files.filter(y=>y.type==="file"&&v(y.name)).length),u=L(()=>c.files.filter(y=>y.type==="file"&&_(y.name)).length),i=L(()=>c.files.filter(y=>y.type==="file"&&p(y.name)).length),r=L(()=>[{label:"All",value:"all",count:c.files.length},{label:"Photos",value:"photos",count:C.value},{label:"Music",value:"music",count:f.value},{label:"Docs",value:"documents",count:u.value},{label:"Videos",value:"videos",count:i.value}].filter(y=>y.value==="all"||y.count>0)),x=L(()=>{let y=c.files;if(g.value==="photos"?y=y.filter(k=>k.type==="file"&&b(k.name)):g.value==="music"?y=y.filter(k=>k.type==="file"&&v(k.name)):g.value==="documents"?y=y.filter(k=>k.type==="file"&&_(k.name)):g.value==="videos"&&(y=y.filter(k=>k.type==="file"&&p(k.name))),w.value.trim()){const k=w.value.toLowerCase();y=y.filter(h=>h.name.toLowerCase().includes(k))}return y});function S(y){return b(y)?"🖼":p(y)?"🎬":v(y)?"🎵":/\.pdf$/i.test(y)?"📄":/\.(doc|docx)$/i.test(y)?"📝":/\.(md|txt)$/i.test(y)?"📋":/\.(ods|xlsx|csv)$/i.test(y)?"📊":"📄"}function j(y){const k=y.lastIndexOf(".");return k>=0?y.slice(k+1).toUpperCase():""}function P(y){return y?y<1024?y+" B":y<1024*1024?(y/1024).toFixed(0)+" KB":y<1024*1024*1024?(y/(1024*1024)).toFixed(1)+" MB":(y/(1024*1024*1024)).toFixed(2)+" GB":""}function D(y){if(!y)return"";const k=new Date(y),$=new Date().getTime()-k.getTime(),N=Math.floor($/(1e3*60*60*24));return N===0?"Today":N===1?"Yesterday":N<7?N+" days ago":N<30?Math.floor(N/7)+"w ago":N<365?Math.floor(N/30)+"mo ago":k.toLocaleDateString()}return(y,k)=>(s(),n("div",Dc,[e("div",{class:"p-4 space-y-3",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",Lc,[e("h3",{class:o(["text-sm font-bold",t(l)?"text-white/90":"text-gray-900"])},d(a.title||"Node Files"),3),e("span",{class:o(["text-xs font-mono",t(l)?"text-white/30":"text-gray-400"])},d(x.value.length)+" items ",3)]),W(e("input",{"onUpdate:modelValue":k[0]||(k[0]=h=>w.value=h),type:"text",placeholder:"Search files...",class:o(["w-full px-3 py-2 rounded-lg text-base outline-none transition-colors",t(l)?"bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10":"bg-black/5 text-gray-800 placeholder:text-gray-400 focus:bg-black/8"])},null,2),[[Q,w.value]]),e("div",Ic,[(s(!0),n(I,null,B(r.value,h=>(s(),n("button",{key:h.value,class:o(["text-xs px-2 py-1 rounded-md transition-all duration-150",g.value===h.value?"nav-tab-active":t(l)?"text-white/40 hover:text-white/70 hover:bg-white/5":"text-gray-500 hover:text-gray-800 hover:bg-black/5"]),onClick:$=>g.value=h.value},d(h.label)+" ("+d(h.count)+") ",11,Bc))),128))])],4),e("div",Pc,[g.value==="photos"?(s(),n("div",Nc,[(s(!0),n(I,null,B(x.value,h=>(s(),n("div",{key:h.path,class:"aspect-square rounded-xl overflow-hidden glass-card cursor-pointer transition-transform duration-200 hover:scale-[1.02]"},[e("div",Ac,[e("span",zc,d(S(h.name)),1),e("span",{class:o(["text-xs truncate w-full",t(l)?"text-white/80":"text-gray-800"])},d(h.name),3),e("span",{class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])},d(P(h.size)),3)])]))),128))])):(s(),n("div",Fc,[(s(!0),n(I,null,B(x.value.filter(h=>h.type==="folder"),h=>(s(),n("div",{key:h.path,class:o(["flex items-center gap-3 py-2 px-3 rounded-xl transition-colors",t(l)?"hover:bg-white/5":"hover:bg-black/3"])},[k[1]||(k[1]=e("span",{class:"text-lg shrink-0"},"📁",-1)),e("div",Ec,[e("div",{class:o(["text-sm font-medium truncate",t(l)?"text-white/90":"text-gray-900"])},d(h.name),3),e("div",{class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])},d(h.path),3)])],2))),128)),(s(!0),n(I,null,B(x.value.filter(h=>h.type==="file"),h=>(s(),n("div",{key:h.path,class:o(["flex items-center gap-3 py-2 px-3 rounded-xl transition-colors",t(l)?"hover:bg-white/5":"hover:bg-black/3"])},[e("span",Rc,d(S(h.name)),1),e("div",Vc,[e("div",{class:o(["text-sm font-medium truncate",t(l)?"text-white/90":"text-gray-900"])},d(h.name),3),e("div",{class:o(["flex items-center gap-2 text-xs",t(l)?"text-white/30":"text-gray-400"])},[h.size?(s(),n("span",Uc,d(P(h.size)),1)):m("",!0),h.modified?(s(),n("span",qc,d(D(h.modified)),1)):m("",!0)],2)]),e("span",{class:o(["text-xs px-1.5 py-0.5 rounded shrink-0",t(l)?"bg-white/5 text-white/40":"bg-black/5 text-gray-500"])},d(j(h.name)),3)],2))),128)),x.value.length===0?(s(),n("div",Gc,[e("p",{class:o(["text-sm",t(l)?"text-white/40":"text-gray-500"])},"No files found",2)])):m("",!0)]))])]))}}),Hc=[{id:"bitcoin-core",name:"Bitcoin Core",description:"Full Bitcoin node — blockchain validation, UTXO set, fee estimates",icon:"₿",category:"bitcoin",defaultPort:8332,deepLink:"/app/bitcoin-core"},{id:"lnd",name:"LND",description:"Lightning Network Daemon — channels, payments, invoices",icon:"⚡",category:"lightning",defaultPort:8080,deepLink:"/app/lnd"},{id:"core-lightning",name:"Core Lightning",description:"C-Lightning implementation with plugin ecosystem",icon:"⚡",category:"lightning",defaultPort:9735,deepLink:"/app/core-lightning"},{id:"btcpay-server",name:"BTCPay Server",description:"Self-hosted payment processor for Bitcoin and Lightning",icon:"🛒",category:"bitcoin",defaultPort:23001,deepLink:"/app/btcpay-server"},{id:"mempool",name:"Mempool",description:"Blockchain explorer — visualize transactions, fees, blocks",icon:"🔍",category:"bitcoin",defaultPort:3006,deepLink:"/app/mempool"},{id:"fedimint",name:"Fedimint",description:"Federated Chaumian e-cash — community custody",icon:"🏦",category:"bitcoin",deepLink:"/app/fedimint"},{id:"nextcloud",name:"Nextcloud",description:"Files, notes, contacts, calendar — self-hosted cloud",icon:"☁️",category:"storage",defaultPort:8443,deepLink:"/app/nextcloud"},{id:"immich",name:"Immich",description:"Photo & video management with ML tagging",icon:"📸",category:"storage",defaultPort:2283,deepLink:"/app/immich"},{id:"nostr-rs-relay",name:"nostr-rs-relay",description:"High-performance Nostr relay in Rust",icon:"🟣",category:"social",defaultPort:7e3,deepLink:"/app/nostr-rs-relay"},{id:"strfry",name:"strfry",description:"C++ Nostr relay — fast event processing",icon:"🟣",category:"social",deepLink:"/app/strfry"},{id:"home-assistant",name:"Home Assistant",description:"Smart home automation and control",icon:"🏠",category:"tools",defaultPort:8123,deepLink:"/app/home-assistant"},{id:"searxng",name:"SearXNG",description:"Privacy-respecting metasearch engine",icon:"🔎",category:"tools",defaultPort:8888,deepLink:"/app/searxng"},{id:"penpot",name:"Penpot",description:"Open-source design tool — prototyping and collaboration",icon:"🎨",category:"tools",deepLink:"/app/penpot"},{id:"onlyoffice",name:"OnlyOffice",description:"Document editing — docs, spreadsheets, presentations",icon:"📝",category:"tools",deepLink:"/app/onlyoffice"},{id:"meshtastic",name:"Meshtastic",description:"Off-grid mesh networking over LoRa radios",icon:"📡",category:"tools",deepLink:"/app/meshtastic"},{id:"grafana",name:"Grafana",description:"Monitoring dashboards — system metrics and alerts",icon:"📊",category:"monitoring",defaultPort:3e3,deepLink:"/app/grafana"},{id:"ollama",name:"Ollama",description:"Run LLMs locally — Llama, Mistral, Gemma",icon:"🧠",category:"ai",defaultPort:11434,deepLink:"/app/ollama"},{id:"did-wallet",name:"DID Wallet",description:"Decentralized identity — Web5 verifiable credentials",icon:"🪪",category:"identity",deepLink:"/app/did-wallet"}],Wc={class:"h-full flex flex-col"},Kc={class:"p-4 space-y-3",style:{"border-bottom":"1px solid rgba(255, 255, 255, 0.08)"}},Yc={class:"flex items-center justify-between gap-2"},Qc={class:"text-xs font-mono text-white/30"},Jc={class:"flex flex-wrap gap-1.5"},Zc=["onClick"],Xc={class:"flex-1 overflow-y-auto custom-scrollbar px-4 pt-4 pb-16"},ed={class:"grid grid-cols-2 gap-2"},td=["onClick"],sd={class:"flex items-center gap-2 mb-1.5"},nd={class:"text-lg leading-none"},ld={class:"text-xs font-semibold text-white/90 truncate"},od={class:"text-xs text-white/50 line-clamp-2 leading-relaxed"},ad={class:"mt-2 flex items-center gap-1.5"},id=q({__name:"ArchyAppsGrid",setup(a){const{isEmbedded:c,installedApps:l,requestAction:w}=es(),g=M(""),b=M(null),p=[{label:"Bitcoin",value:"bitcoin"},{label:"Lightning",value:"lightning"},{label:"Storage",value:"storage"},{label:"Social",value:"social"},{label:"Tools",value:"tools"},{label:"AI",value:"ai"}],v=L(()=>Hc.map(r=>{const x=l.value.find(j=>j.id===r.id);let S="not-installed";return x&&(S=x.state==="running"?"running":"stopped"),{...r,liveStatus:S}})),_=L(()=>{let r=v.value;if(b.value&&(r=r.filter(x=>x.category===b.value)),g.value.trim()){const x=g.value.toLowerCase();r=r.filter(S=>S.name.toLowerCase().includes(x)||S.description.toLowerCase().includes(x))}return r});function C(r){return r==="running"?"bg-green-400":r==="stopped"?"bg-yellow-400":"bg-white/20"}function f(r){return r==="running"?"text-green-400/80":r==="stopped"?"text-yellow-400/70":"text-white/30"}function u(r){return r==="running"?"Running":r==="stopped"?"Stopped":c.value?"Not installed":"Available"}function i(r){r.liveStatus==="running"&&c.value&&w("open-app",{appId:r.id})}return(r,x)=>(s(),n("div",Wc,[e("div",Kc,[e("div",Yc,[x[1]||(x[1]=e("h3",{class:"text-sm font-bold text-white/90"}," Node Apps ",-1)),e("span",Qc,d(_.value.length)+" apps ",1)]),W(e("input",{"onUpdate:modelValue":x[0]||(x[0]=S=>g.value=S),type:"text",placeholder:"Search node apps...",class:"w-full px-3 py-2 rounded-lg text-base outline-none transition-colors bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10"},null,512),[[Q,g.value]]),e("div",Jc,[(s(),n(I,null,B(p,S=>e("button",{key:S.value,class:o(["text-xs px-2 py-1 rounded-md transition-all duration-150",b.value===S.value?"nav-tab-active":"text-white/40 hover:text-white/70 hover:bg-white/5"]),onClick:j=>b.value=b.value===S.value?null:S.value},d(S.label),11,Zc)),64))])]),e("div",Xc,[e("div",ed,[(s(!0),n(I,null,B(_.value,S=>(s(),n("button",{key:S.id,class:o(["text-left p-3 rounded-xl transition-all duration-200 glass-card",S.liveStatus==="running"?"hover:bg-white/10 cursor-pointer":"opacity-70"]),onClick:j=>i(S)},[e("div",sd,[e("span",nd,d(S.icon),1),e("span",ld,d(S.name),1)]),e("p",od,d(S.description),1),e("div",ad,[e("span",{class:o(["w-1.5 h-1.5 rounded-full",C(S.liveStatus)])},null,2),e("span",{class:o(["text-xs",f(S.liveStatus)])},d(u(S.liveStatus)),3)])],10,td))),128))])])]))}}),rd={class:"flex-1 min-h-0 flex flex-col"},ct=q({__name:"ContentGridView",props:{activeTab:{},isWideDesktop:{type:Boolean},isMobile:{type:Boolean},panelFilms:{},panelBooks:{},panelTVSeries:{},panelImages:{},panelPlaces:{},panelSongs:{},panelPodcasts:{},panelWebResults:{},panelWebsites:{},panelMagazineSections:{},panelMagazineHeroImage:{},panelRecipes:{},panelApps:{},panelNodeStatus:{},panelNodeFiles:{},nodeFilesFilter:{},panelTitle:{},panelQuery:{},panelResponseText:{}},setup(a){const c=a,l=L(()=>{const i=c.panelResponseText??"";if(!i)return[{title:c.panelQuery||"Prompt",content:""}];const r=us(i);return r.length>0?r:[{title:c.panelQuery||"Response",content:xs(i)}]}),{openFilmDetail:w,openBookDetail:g,openTVSeriesDetail:b,openImageDetail:p,openPlaceDetail:v,openSongDetail:_,openPodcastDetail:C,openRecipeDetail:f,openAppDetail:u}=$e();return(i,r)=>(s(),n("div",rd,[a.activeTab==="film"?(s(),E(ps,{key:0,films:a.panelFilms,title:a.panelTitle,onSelectFilm:t(w)},null,8,["films","title","onSelectFilm"])):a.activeTab==="book"?(s(),E(Es,{key:1,books:a.panelBooks,title:a.panelTitle,onSelectBook:t(g)},null,8,["books","title","onSelectBook"])):a.activeTab==="tvshow"?(s(),E(rn,{key:2,series:a.panelTVSeries,title:a.panelTitle,onSelectSeries:t(b)},null,8,["series","title","onSelectSeries"])):a.activeTab==="image"?(s(),E(wn,{key:3,images:a.panelImages,title:a.panelTitle,onSelectImage:t(p)},null,8,["images","title","onSelectImage"])):a.activeTab==="place"?(s(),E(qn,{key:4,places:a.panelPlaces,title:a.panelTitle,onSelectPlace:t(v)},null,8,["places","title","onSelectPlace"])):a.activeTab==="song"?(s(),E(gs,{key:5,songs:a.panelSongs,title:a.panelTitle,onSelectSong:t(_)},null,8,["songs","title","onSelectSong"])):a.activeTab==="magazine"?(s(),E(ot,{key:6,sections:a.panelMagazineSections,"hero-image-url":a.panelMagazineHeroImage,title:a.panelTitle,query:a.panelQuery},null,8,["sections","hero-image-url","title","query"])):a.activeTab==="news"?(s(),E(at,{key:7,articles:a.panelWebResults,title:a.panelTitle,query:a.panelQuery},null,8,["articles","title","query"])):a.activeTab==="websites"?(s(),E(at,{key:8,articles:a.panelWebsites,title:a.panelTitle,variant:"websites"},null,8,["articles","title"])):a.activeTab==="podcast"?(s(),E(rl,{key:9,podcasts:a.panelPodcasts,title:a.panelTitle,onSelectPodcast:t(C)},null,8,["podcasts","title","onSelectPodcast"])):a.activeTab==="recipe"?(s(),E(Kl,{key:10,recipes:a.panelRecipes,title:a.panelTitle,onSelectRecipe:t(f)},null,8,["recipes","title","onSelectRecipe"])):a.activeTab==="app"?(s(),E(io,{key:11,apps:a.panelApps,title:a.panelTitle,onSelectApp:t(u)},null,8,["apps","title","onSelectApp"])):a.activeTab==="code"?(s(),E(Mo,{key:12,"is-wide-desktop":a.isWideDesktop,"is-mobile":a.isMobile},null,8,["is-wide-desktop","is-mobile"])):a.activeTab==="design-system"?(s(),E(qo,{key:13})):a.activeTab==="nostr"?(s(),E(oc,{key:14})):a.activeTab==="node-status"&&a.panelNodeStatus?(s(),E(Tc,{key:15,status:a.panelNodeStatus},null,8,["status"])):a.activeTab==="node-files"?(s(),E(Oc,{key:16,files:a.panelNodeFiles,title:a.panelTitle,"initial-filter":a.nodeFilesFilter},null,8,["files","title","initial-filter"])):a.activeTab==="node-apps"?(s(),E(id,{key:17})):a.activeTab==="prompt"?(s(),E(ot,{key:18,sections:l.value,"hero-image-url":null,title:"Prompt",query:a.panelQuery},null,8,["sections","query"])):m("",!0)]))}}),cd={class:"book-detail h-full overflow-y-auto overflow-x-hidden scrollbar-hide"},dd={class:"relative w-full overflow-hidden"},ud={class:"w-full aspect-[16/7] flex items-center justify-center overflow-hidden bg-black/20"},xd=["src","alt"],hd={class:"absolute bottom-0 left-0 right-0 p-4"},pd={class:"text-lg font-bold text-white"},gd={class:"flex flex-wrap items-center gap-x-2 gap-y-0.5 mt-1 text-xs text-white/60"},vd={key:0},bd={key:1},fd={key:2,class:"text-amber-400"},md={class:"p-4 space-y-4"},wd={key:1,class:"flex flex-wrap gap-1.5"},yd={class:"space-y-2"},kd=["href"],$d={class:"flex items-center gap-2.5"},_d={class:"text-sm"},Cd=["href"],Sd={class:"flex items-center gap-2.5"},jd={class:"text-sm"},Md=q({__name:"BookDetail",props:{book:{}},emits:["back"],setup(a){const c=a,{isDark:l}=J(),{bannerSrc:w,fallbackGradient:g,onBannerError:b}=mt({primaryUrls:()=>[c.book.coverUrl],apiFetch:async()=>({posterUrl:await ut(c.book.title,c.book.author),backdropUrl:null}),title:()=>c.book.title,gradientSeed:()=>c.book.title+(c.book.author??"")}),p=L(()=>`${c.book.title} ${c.book.author}`.trim().replace(/\s+/g,"+")),v=L(()=>[{name:"Open Library",url:`https://openlibrary.org/search?q=${p.value}`,icon:"📖",desc:"Free, open catalog"},{name:"Internet Archive",url:`https://archive.org/search?query=${p.value}`,icon:"🏛️",desc:"Borrow & read free"},{name:"Project Gutenberg",url:`https://www.gutenberg.org/ebooks/search/?query=${p.value}`,icon:"📜",desc:"Public domain"},{name:"Standard Ebooks",url:`https://standardebooks.org/ebooks?query=${p.value}`,icon:"📕",desc:"Beautifully formatted"}]);function _(C){return{openlibrary:"📖",gutenberg:"📜",archive:"🏛️",goodreads:"📚",libgen:"🔓",local:"💾"}[C]??"📚"}return(C,f)=>(s(),n("div",cd,[e("div",dd,[e("div",ud,[t(w)?(s(),n("img",{key:0,src:t(w),alt:a.book.title,class:"w-full h-full object-cover object-center block",onError:f[0]||(f[0]=(...u)=>t(b)&&t(b)(...u))},null,40,xd)):(s(),n("div",{key:1,class:"w-full h-full",style:G({background:t(g)})},null,4))]),f[3]||(f[3]=e("div",{class:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent pointer-events-none"},null,-1)),e("button",{class:"absolute top-3 left-3 min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg path-glass-icon z-10 transition-colors hover:bg-white/10",onClick:f[1]||(f[1]=u=>C.$emit("back"))},[...f[2]||(f[2]=[e("svg",{class:"w-4 h-4 text-white/90",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),e("div",hd,[e("h2",pd,d(a.book.title),1),e("div",gd,[e("span",null,d(a.book.author),1),a.book.year?(s(),n("span",vd,d(a.book.year),1)):m("",!0),a.book.pages?(s(),n("span",bd,d(a.book.pages)+" pages",1)):m("",!0),a.book.rating?(s(),n("span",fd,"★ "+d(a.book.rating.toFixed(1)),1)):m("",!0)])])]),e("div",md,[a.book.description?(s(),n("p",{key:0,class:o(["text-sm leading-relaxed",t(l)?"text-white/70":"text-gray-600"])},d(a.book.description),3)):m("",!0),a.book.genres?.length?(s(),n("div",wd,[(s(!0),n(I,null,B(a.book.genres,u=>(s(),n("span",{key:u,class:o(["text-xs px-2 py-1 rounded-md font-medium",t(l)?"bg-white/10 text-white/60":"bg-black/5 text-gray-600"])},d(u),3))),128))])):m("",!0),e("div",null,[e("h4",{class:o(["text-xs font-semibold mb-2",t(l)?"text-white/50":"text-gray-500"])},"Read on",2),e("div",yd,[(s(!0),n(I,null,B(a.book.sources??[],u=>(s(),n("a",{key:u.url,href:u.url,target:"_blank",rel:"noopener",class:o(["flex items-center justify-between p-3 rounded-xl transition-colors",t(l)?"bg-white/5 hover:bg-white/10":"bg-black/3 hover:bg-black/5"])},[e("div",$d,[e("span",_d,d(_(u.type)),1),e("p",{class:o(["text-xs font-medium",t(l)?"text-white/80":"text-gray-800"])},d(u.name),3)]),(s(),n("svg",{class:o(["w-4 h-4",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...f[4]||(f[4]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},null,-1)])],2))],10,kd))),128)),(s(!0),n(I,null,B(v.value,u=>(s(),n("a",{key:u.url,href:u.url,target:"_blank",rel:"noopener",class:o(["flex items-center justify-between p-3 rounded-xl transition-colors",t(l)?"bg-white/5 hover:bg-white/10":"bg-black/3 hover:bg-black/5"])},[e("div",Sd,[e("span",jd,d(u.icon),1),e("div",null,[e("p",{class:o(["text-xs font-medium",t(l)?"text-white/80":"text-gray-800"])},d(u.name),3),u.desc?(s(),n("p",{key:0,class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])},d(u.desc),3)):m("",!0)])]),(s(),n("svg",{class:o(["w-4 h-4",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...f[5]||(f[5]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},null,-1)])],2))],10,Cd))),128))])])])]))}}),Td={class:"tv-detail h-full overflow-y-auto overflow-x-hidden scrollbar-hide"},Dd={class:"relative w-full overflow-hidden"},Ld={class:"w-full aspect-[16/7] flex items-center justify-center overflow-hidden bg-black/20"},Id=["src","alt"],Bd={class:"absolute bottom-0 left-0 right-0 p-4"},Pd={class:"text-lg font-bold text-white"},Nd={class:"flex flex-wrap items-center gap-x-2 gap-y-0.5 mt-1 text-xs text-white/60"},Ad={key:0},zd={key:1},Fd={key:2},Ed={key:3},Rd={key:4,class:"text-amber-400"},Vd={key:5,class:"text-emerald-400"},Ud={key:6,class:"text-white/40"},qd={class:"p-4 space-y-4"},Gd={key:3,class:"flex flex-wrap gap-1.5"},Od={class:"space-y-2"},Hd=["href"],Wd={class:"flex items-center gap-2.5"},Kd={class:"text-sm"},Yd=["href"],Qd={class:"flex items-center gap-2.5"},Jd={class:"text-sm"},Zd=q({__name:"TVSeriesDetail",props:{series:{}},emits:["back"],setup(a){const c=a,{isDark:l}=J(),{bannerSrc:w,fallbackGradient:g,onBannerError:b}=mt({primaryUrls:()=>[c.series.posterUrl,c.series.backdropUrl],apiFetch:()=>xt(c.series.title,c.series.year),title:()=>c.series.title}),p=L(()=>c.series.year?c.series.endYear&&c.series.endYear!==c.series.year?`${c.series.year}–${c.series.endYear}`:c.series.status==="ongoing"?`${c.series.year}–`:String(c.series.year):""),v=L(()=>c.series.title.trim().replace(/\s+/g,"+")),_=L(()=>(c.series.sources??[]).length>0?[]:[{name:"Internet Archive",url:`https://archive.org/search?query=${v.value}`,icon:"🏛️",desc:"Free, open archive"},{name:"YouTube",url:`https://youtube.com/results?search_query=${v.value}+full+series`,icon:"▶️",desc:"Free episodes"},{name:"Odysee",url:`https://odysee.com/$/search?q=${v.value}`,icon:"🔗",desc:"Decentralized"},{name:"Tubi",url:`https://tubitv.com/search/${v.value}`,icon:"📺",desc:"Free streaming"}]);function C(f){return{plex:"🟠",nextcloud:"☁️",youtube:"▶️",netflix:"🔴","free-web":"🌐",local:"💾"}[f]??"📺"}return(f,u)=>(s(),n("div",Td,[e("div",Dd,[e("div",Ld,[t(w)?(s(),n("img",{key:0,src:t(w),alt:a.series.title,class:"w-full h-full object-cover object-center block",onError:u[0]||(u[0]=(...i)=>t(b)&&t(b)(...i))},null,40,Id)):(s(),n("div",{key:1,class:"w-full h-full",style:G({background:t(g)})},null,4))]),u[3]||(u[3]=e("div",{class:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent pointer-events-none"},null,-1)),e("button",{class:"absolute top-3 left-3 min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg path-glass-icon z-10 transition-colors hover:bg-white/10",onClick:u[1]||(u[1]=i=>f.$emit("back"))},[...u[2]||(u[2]=[e("svg",{class:"w-4 h-4 text-white/90",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),e("div",Bd,[e("h2",Pd,d(a.series.title),1),e("div",Nd,[p.value?(s(),n("span",Ad,d(p.value),1)):m("",!0),a.series.seasons?(s(),n("span",zd,d(a.series.seasons)+" seasons",1)):m("",!0),a.series.episodes?(s(),n("span",Fd,d(a.series.episodes)+" episodes",1)):m("",!0),a.series.network?(s(),n("span",Ed,d(a.series.network),1)):m("",!0),a.series.rating?(s(),n("span",Rd,"★ "+d(a.series.rating.toFixed(1)),1)):m("",!0),a.series.status==="ongoing"?(s(),n("span",Vd,"ongoing")):a.series.status==="ended"?(s(),n("span",Ud,"ended")):m("",!0)])])]),e("div",qd,[a.series.synopsis?(s(),n("p",{key:0,class:o(["text-sm leading-relaxed",t(l)?"text-white/70":"text-gray-600"])},d(a.series.synopsis),3)):m("",!0),a.series.creator?(s(),n("div",{key:1,class:o(["text-xs",t(l)?"text-white/50":"text-gray-500"])},[u[4]||(u[4]=ne(" Created by ",-1)),e("span",{class:o(["font-medium",t(l)?"text-white/70":"text-gray-700"])},d(a.series.creator),3)],2)):m("",!0),a.series.cast?.length?(s(),n("div",{key:2,class:o(["text-xs",t(l)?"text-white/50":"text-gray-500"])}," Starring: "+d(a.series.cast.slice(0,5).join(", ")),3)):m("",!0),a.series.genres?.length?(s(),n("div",Gd,[(s(!0),n(I,null,B(a.series.genres,i=>(s(),n("span",{key:i,class:o(["text-xs px-2 py-1 rounded-md font-medium",t(l)?"bg-white/10 text-white/60":"bg-black/5 text-gray-600"])},d(i),3))),128))])):m("",!0),e("div",null,[e("h4",{class:o(["text-xs font-semibold mb-2",t(l)?"text-white/50":"text-gray-500"])},"Watch on",2),e("div",Od,[(s(!0),n(I,null,B(a.series.sources??[],i=>(s(),n("a",{key:i.url,href:i.url,target:"_blank",rel:"noopener",class:o(["flex items-center justify-between p-3 rounded-xl transition-colors",t(l)?"bg-white/5 hover:bg-white/10":"bg-black/3 hover:bg-black/5"])},[e("div",Wd,[e("span",Kd,d(C(i.type)),1),e("p",{class:o(["text-xs font-medium",t(l)?"text-white/80":"text-gray-800"])},d(i.name),3)]),(s(),n("svg",{class:o(["w-4 h-4",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...u[5]||(u[5]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},null,-1)])],2))],10,Hd))),128)),(s(!0),n(I,null,B(_.value,i=>(s(),n("a",{key:i.url,href:i.url,target:"_blank",rel:"noopener",class:o(["flex items-center justify-between p-3 rounded-xl transition-colors",t(l)?"bg-white/5 hover:bg-white/10":"bg-black/3 hover:bg-black/5"])},[e("div",Qd,[e("span",Jd,d(i.icon),1),e("div",null,[e("p",{class:o(["text-xs font-medium",t(l)?"text-white/80":"text-gray-800"])},d(i.name),3),i.desc?(s(),n("p",{key:0,class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])},d(i.desc),3)):m("",!0)])]),(s(),n("svg",{class:o(["w-4 h-4",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...u[6]||(u[6]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},null,-1)])],2))],10,Yd))),128))])])])]))}}),Xd={class:"podcast-detail h-full overflow-y-auto overflow-x-hidden scrollbar-hide"},eu={class:"relative w-full overflow-hidden"},tu={class:"w-full aspect-[16/7] flex items-center justify-center overflow-hidden bg-black/20"},su=["src","alt"],nu={class:"absolute bottom-0 left-0 right-0 p-4"},lu={class:"text-lg font-bold text-white"},ou={class:"flex flex-wrap items-center gap-x-2 gap-y-0.5 mt-1 text-xs text-white/60"},au={key:0},iu={key:1},ru={key:2},cu={class:"p-4 space-y-4"},du={key:1,class:"flex flex-wrap gap-1.5"},uu={class:"space-y-2"},xu=["href"],hu={class:"flex items-center gap-2.5"},pu={class:"text-sm"},gu=["href"],vu={class:"flex items-center gap-2.5"},bu={class:"text-sm"},fu=q({__name:"PodcastDetail",props:{podcast:{}},emits:["back"],setup(a){const c=a,{isDark:l}=J(),w=M(!1),g=M(null),b=L(()=>w.value?null:c.podcast.coverUrl||g.value||null);le(()=>{c.podcast.coverUrl||vt(c.podcast.title,c.podcast.host).then(f=>{f&&(g.value=f)})});const p=L(()=>gt(c.podcast.title,c.podcast.host)),v=L(()=>`${c.podcast.title} ${c.podcast.host??""}`.trim().replace(/\s+/g,"+")),_=L(()=>c.podcast.sources.length>0?[]:[{name:"Fountain",url:`https://fountain.fm/search?q=${v.value}`,icon:"⚡",desc:"Podcasting 2.0, Lightning"},{name:"Podcast Index",url:`https://podcastindex.org/search?q=${v.value}`,icon:"📻",desc:"Open podcast directory"},{name:"YouTube",url:`https://youtube.com/results?search_query=${v.value}`,icon:"▶️",desc:"Video podcasts"},{name:"Rumble",url:`https://rumble.com/search/video?q=${v.value}`,icon:"📺",desc:"Video & podcasts"},{name:"Odysee",url:`https://odysee.com/$/search?q=${v.value}`,icon:"🔗",desc:"Decentralized"}]);function C(f){return{fountain:"⚡",rumble:"📺",youtube:"▶️",podcastindex:"📻",castopod:"🦣",odysee:"🔗",podverse:"🎧",ipfs:"🌐",rss:"📡"}[f]??"🎙️"}return(f,u)=>(s(),n("div",Xd,[e("div",eu,[e("div",tu,[b.value?(s(),n("img",{key:0,src:b.value,alt:a.podcast.title,class:"w-full h-full object-cover object-center block",onError:u[0]||(u[0]=i=>w.value=!0)},null,40,su)):(s(),n("div",{key:1,class:"w-full h-full bg-cover bg-center",style:G({backgroundImage:`url(${p.value})`})},null,4))]),u[3]||(u[3]=e("div",{class:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent pointer-events-none"},null,-1)),e("button",{class:"absolute top-3 left-3 min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg path-glass-icon z-10 transition-colors hover:bg-white/10",onClick:u[1]||(u[1]=i=>f.$emit("back"))},[...u[2]||(u[2]=[e("svg",{class:"w-4 h-4 text-white/90",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),e("div",nu,[e("h2",lu,d(a.podcast.title),1),e("div",ou,[a.podcast.host?(s(),n("span",au,d(a.podcast.host),1)):m("",!0),a.podcast.year?(s(),n("span",iu,d(a.podcast.year),1)):m("",!0),a.podcast.episodeCount?(s(),n("span",ru,d(a.podcast.episodeCount)+" episodes",1)):m("",!0)])])]),e("div",cu,[a.podcast.description?(s(),n("p",{key:0,class:o(["text-sm leading-relaxed",t(l)?"text-white/70":"text-gray-600"])},d(a.podcast.description),3)):m("",!0),a.podcast.genres?.length?(s(),n("div",du,[(s(!0),n(I,null,B(a.podcast.genres,i=>(s(),n("span",{key:i,class:o(["text-xs px-2 py-1 rounded-md font-medium",t(l)?"bg-white/10 text-white/60":"bg-black/5 text-gray-600"])},d(i),3))),128))])):m("",!0),e("div",null,[e("h4",{class:o(["text-xs font-semibold mb-2",t(l)?"text-white/50":"text-gray-500"])},"Listen on",2),e("div",uu,[(s(!0),n(I,null,B(a.podcast.sources,i=>(s(),n("a",{key:i.url,href:i.url,target:"_blank",rel:"noopener",class:o(["flex items-center justify-between p-3 rounded-xl transition-colors",t(l)?"bg-white/5 hover:bg-white/10":"bg-black/3 hover:bg-black/5"])},[e("div",hu,[e("span",pu,d(C(i.type)),1),e("p",{class:o(["text-xs font-medium",t(l)?"text-white/80":"text-gray-800"])},d(i.name),3)]),(s(),n("svg",{class:o(["w-4 h-4",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...u[4]||(u[4]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},null,-1)])],2))],10,xu))),128)),_.value.length?(s(!0),n(I,{key:0},B(_.value,i=>(s(),n("a",{key:i.url,href:i.url,target:"_blank",rel:"noopener",class:o(["flex items-center justify-between p-3 rounded-xl transition-colors",t(l)?"bg-white/5 hover:bg-white/10":"bg-black/3 hover:bg-black/5"])},[e("div",vu,[e("span",bu,d(i.icon),1),e("div",null,[e("p",{class:o(["text-xs font-medium",t(l)?"text-white/80":"text-gray-800"])},d(i.name),3),i.desc?(s(),n("p",{key:0,class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])},d(i.desc),3)):m("",!0)])]),(s(),n("svg",{class:o(["w-4 h-4",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...u[5]||(u[5]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},null,-1)])],2))],10,gu))),128)):m("",!0)])])])]))}}),mu={class:"image-detail h-full overflow-y-auto overflow-x-hidden scrollbar-hide"},wu={class:"relative w-full overflow-hidden bg-black/20"},yu=["src","alt"],ku={class:"p-4 space-y-3"},$u={class:"pt-2"},_u=["href"],Cu=q({__name:"ImageDetail",props:{image:{}},emits:["back"],setup(a){const{isDark:c}=J(),l=M(!1);return(w,g)=>(s(),n("div",mu,[e("div",wu,[l.value?(s(),n("div",{key:1,class:o(["w-full aspect-video flex items-center justify-center",t(c)?"bg-white/5":"bg-black/5"])},[(s(),n("svg",{class:o(["w-12 h-12",t(c)?"text-white/15":"text-gray-300"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...g[2]||(g[2]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"},null,-1)])],2))],2)):(s(),n("img",{key:0,src:a.image.url,alt:a.image.alt||a.image.title||"Image",class:"w-full block max-h-[60vh] object-contain bg-black/40",onError:g[0]||(g[0]=b=>l.value=!0)},null,40,yu)),e("button",{class:"absolute top-3 left-3 min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg path-glass-icon z-10 transition-colors hover:bg-white/10",onClick:g[1]||(g[1]=b=>w.$emit("back"))},[...g[3]||(g[3]=[e("svg",{class:"w-4 h-4 text-white/90",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])])]),e("div",ku,[a.image.title?(s(),n("h2",{key:0,class:o(["text-base font-bold",t(c)?"text-white/90":"text-gray-900"])},d(a.image.title),3)):m("",!0),a.image.description?(s(),n("p",{key:1,class:o(["text-sm leading-relaxed",t(c)?"text-white/70":"text-gray-600"])},d(a.image.description),3)):m("",!0),a.image.attribution?(s(),n("div",{key:2,class:o(["text-xs",t(c)?"text-white/50":"text-gray-500"])},d(a.image.attribution),3)):m("",!0),a.image.source?(s(),n("div",{key:3,class:o(["text-xs",t(c)?"text-white/40":"text-gray-400"])}," Source: "+d(a.image.source),3)):m("",!0),a.image.width&&a.image.height?(s(),n("div",{key:4,class:o(["text-xs",t(c)?"text-white/30":"text-gray-400"])},d(a.image.width)+" × "+d(a.image.height),3)):m("",!0),e("div",$u,[e("a",{href:a.image.url,target:"_blank",rel:"noopener",class:o(["inline-flex items-center gap-2 px-4 min-h-[44px] rounded-xl text-xs font-medium transition-colors",t(c)?"bg-white/5 hover:bg-white/10 text-white/80":"bg-black/3 hover:bg-black/5 text-gray-800"])},[...g[4]||(g[4]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1),ne(" Open original ",-1)])],10,_u)])])]))}}),Su={class:"place-detail h-full overflow-y-auto overflow-x-hidden scrollbar-hide"},ju={class:"relative w-full overflow-hidden"},Mu={class:"w-full aspect-[16/9] flex items-center justify-center overflow-hidden bg-black/20"},Tu=["src","alt"],Du=["src","alt"],Lu={class:"absolute bottom-0 left-0 right-0 p-4"},Iu={class:"text-lg font-bold text-white"},Bu={class:"flex flex-wrap items-center gap-x-2 gap-y-0.5 mt-1 text-xs text-white/60"},Pu={key:0},Nu={key:1},Au={key:2,class:"text-amber-400"},zu={key:3,class:"text-white/50"},Fu={class:"p-4 space-y-4"},Eu={key:1,class:"flex items-start gap-2.5"},Ru={key:2,class:"flex items-center gap-2.5"},Vu={key:3,class:"flex items-start gap-2.5"},Uu={key:4,class:"flex items-center gap-2.5"},qu=["href"],Gu={class:"space-y-2"},Ou=["href"],Hu={class:"flex items-center gap-2.5"},Wu={class:"text-sm"},Ku=["href"],Yu={class:"flex items-center gap-2.5"},Qu={class:"text-sm"},Ju=q({__name:"PlaceDetail",props:{place:{}},emits:["back"],setup(a){const c=a,{isDark:l}=J(),w=M(null),g=L(()=>ht(c.place.name,c.place.cuisine||c.place.category));le(()=>{c.place.photoUrl||pt(c.place.name,c.place.city).then(C=>{C&&(w.value=C)})});const b=L(()=>{if(!c.place.website)return"";try{return new URL(c.place.website).hostname.replace(/^www\./,"")}catch{return c.place.website}}),p=L(()=>`${c.place.name} ${c.place.city??""}`.trim().replace(/\s+/g,"+")),v=L(()=>{if((c.place.sources??[]).length>0)return[];const C=[{name:"OpenStreetMap",url:`https://www.openstreetmap.org/search?query=${p.value}`,icon:"🗺️",desc:"Open source maps"},{name:"Google Maps",url:`https://www.google.com/maps/search/${p.value}`,icon:"📍",desc:"Directions & reviews"}];return c.place.lat&&c.place.lng&&(C.unshift({name:"OpenStreetMap",url:`https://www.openstreetmap.org/?mlat=${c.place.lat}&mlon=${c.place.lng}#map=17/${c.place.lat}/${c.place.lng}`,icon:"🗺️",desc:"Open source maps"}),C.splice(2)),C});function _(C){return{gmaps:"📍",osm:"🗺️",yelp:"⭐",tripadvisor:"🦉",foursquare:"📌",local:"💾"}[C]??"📍"}return(C,f)=>(s(),n("div",Su,[e("div",ju,[e("div",Mu,[a.place.photoUrl||w.value?(s(),n("img",{key:0,src:a.place.photoUrl||w.value,alt:a.place.name,class:"w-full h-full object-cover object-center block"},null,8,Tu)):(s(),n("img",{key:1,src:g.value,alt:a.place.name,class:"w-full h-full object-cover"},null,8,Du))]),f[2]||(f[2]=e("div",{class:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent pointer-events-none"},null,-1)),e("button",{class:"absolute top-3 left-3 min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg path-glass-icon z-10 transition-colors hover:bg-white/10",onClick:f[0]||(f[0]=u=>C.$emit("back"))},[...f[1]||(f[1]=[e("svg",{class:"w-4 h-4 text-white/90",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),e("div",Lu,[e("h2",Iu,d(a.place.name),1),e("div",Bu,[a.place.cuisine||a.place.category?(s(),n("span",Pu,d(a.place.cuisine||a.place.category),1)):m("",!0),a.place.city?(s(),n("span",Nu,d(a.place.city),1)):m("",!0),a.place.rating?(s(),n("span",Au,"★ "+d(a.place.rating.toFixed(1)),1)):m("",!0),a.place.priceLevel?(s(),n("span",zu,d("$".repeat(a.place.priceLevel)),1)):m("",!0)])])]),e("div",Fu,[a.place.description?(s(),n("p",{key:0,class:o(["text-sm leading-relaxed",t(l)?"text-white/70":"text-gray-600"])},d(a.place.description),3)):m("",!0),a.place.address?(s(),n("div",Eu,[(s(),n("svg",{class:o(["w-4 h-4 shrink-0 mt-0.5",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...f[3]||(f[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"},null,-1),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"},null,-1)])],2)),e("span",{class:o(["text-xs",t(l)?"text-white/60":"text-gray-600"])},d(a.place.address),3)])):m("",!0),a.place.phone?(s(),n("div",Ru,[(s(),n("svg",{class:o(["w-4 h-4 shrink-0",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...f[4]||(f[4]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"},null,-1)])],2)),e("span",{class:o(["text-xs",t(l)?"text-white/60":"text-gray-600"])},d(a.place.phone),3)])):m("",!0),a.place.hours?(s(),n("div",Vu,[(s(),n("svg",{class:o(["w-4 h-4 shrink-0 mt-0.5",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...f[5]||(f[5]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])],2)),e("span",{class:o(["text-xs",t(l)?"text-white/60":"text-gray-600"])},d(a.place.hours),3)])):m("",!0),a.place.website?(s(),n("div",Uu,[(s(),n("svg",{class:o(["w-4 h-4 shrink-0",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...f[6]||(f[6]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},null,-1)])],2)),e("a",{href:a.place.website,target:"_blank",rel:"noopener",class:o(["text-xs underline underline-offset-2",t(l)?"text-white/60 hover:text-white/80":"text-gray-600 hover:text-gray-800"])},d(b.value),11,qu)])):m("",!0),e("div",null,[e("h4",{class:o(["text-xs font-semibold mb-2",t(l)?"text-white/50":"text-gray-500"])},"Find on",2),e("div",Gu,[(s(!0),n(I,null,B(a.place.sources??[],u=>(s(),n("a",{key:u.url,href:u.url,target:"_blank",rel:"noopener",class:o(["flex items-center justify-between p-3 rounded-xl transition-colors",t(l)?"bg-white/5 hover:bg-white/10":"bg-black/3 hover:bg-black/5"])},[e("div",Hu,[e("span",Wu,d(_(u.type)),1),e("p",{class:o(["text-xs font-medium",t(l)?"text-white/80":"text-gray-800"])},d(u.name),3)]),(s(),n("svg",{class:o(["w-4 h-4",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...f[7]||(f[7]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},null,-1)])],2))],10,Ou))),128)),(s(!0),n(I,null,B(v.value,u=>(s(),n("a",{key:u.url,href:u.url,target:"_blank",rel:"noopener",class:o(["flex items-center justify-between p-3 rounded-xl transition-colors",t(l)?"bg-white/5 hover:bg-white/10":"bg-black/3 hover:bg-black/5"])},[e("div",Yu,[e("span",Qu,d(u.icon),1),e("div",null,[e("p",{class:o(["text-xs font-medium",t(l)?"text-white/80":"text-gray-800"])},d(u.name),3),u.desc?(s(),n("p",{key:0,class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])},d(u.desc),3)):m("",!0)])]),(s(),n("svg",{class:o(["w-4 h-4",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...f[8]||(f[8]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},null,-1)])],2))],10,Ku))),128))])])])]))}}),Zu={class:"article-detail h-full overflow-y-auto overflow-x-hidden scrollbar-hide"},Xu={class:"relative w-full overflow-hidden aspect-[16/7] shrink-0"},e0=["src","alt"],t0={class:"absolute bottom-0 left-0 right-0 p-4"},s0={class:"text-lg font-bold text-white"},n0={key:0,class:"text-xs text-white/60 mt-1"},l0={class:"p-4 space-y-4"},o0={key:0,class:"text-white/90 [&_p]:mb-3 [&_ul]:list-disc [&_ol]:list-decimal [&_li]:ml-4 [&_a]:underline [&_a]:underline-offset-2 [&_h1]:text-lg [&_h2]:text-base [&_h3]:text-sm [&_blockquote]:border-l-2 [&_blockquote]:pl-3 [&_blockquote]:italic"},a0=["innerHTML"],i0={key:1,class:"py-4"},r0=["href"],c0=q({__name:"ArticleDetail",props:{article:{}},emits:["back"],setup(a){const c=a,l=L(()=>{const b=c.article?.url;if(!b||typeof b!="string")return"";try{const p=new URL(b);return/^https?:$/i.test(p.protocol)?p.hostname.replace(/^www\./,""):""}catch{return""}}),w=L(()=>{const b=[...c.article.title].reduce((p,v)=>p+v.charCodeAt(0),0)%360;return`linear-gradient(135deg, hsl(${b}, 25%, 12%) 0%, hsl(${(b+40)%360}, 20%, 8%) 100%)`}),g=L(()=>{const b=c.article.content;return b?/<[a-z][\s\S]*>/i.test(b)?ss(b):`<p class="whitespace-pre-wrap">${ns(b)}</p>`:""});return(b,p)=>(s(),n("div",Zu,[e("div",Xu,[a.article.imgSrc&&t(ts)(a.article.imgSrc)?(s(),n("img",{key:0,src:a.article.imgSrc,alt:a.article.title,class:"absolute inset-0 w-full h-full object-cover object-center block"},null,8,e0)):(s(),n("div",{key:1,class:"absolute inset-0",style:G({background:w.value})},null,4)),p[2]||(p[2]=e("div",{class:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent pointer-events-none"},null,-1)),e("button",{class:"absolute top-3 left-3 p-2 rounded-lg path-glass-icon z-10 transition-colors hover:bg-white/10 text-white/80",onClick:p[0]||(p[0]=v=>b.$emit("back"))},[...p[1]||(p[1]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),e("div",t0,[e("h2",s0,d(a.article.title),1),l.value?(s(),n("p",n0,d(l.value),1)):m("",!0)])]),e("div",l0,[a.article.content?(s(),n("article",o0,[e("div",{innerHTML:g.value},null,8,a0)])):(s(),n("div",i0,[...p[3]||(p[3]=[e("p",{class:"text-sm text-white/50"}," Full article content is not available. Open the link below to read on the source site. ",-1)])])),a.article.url?(s(),n("a",{key:2,href:a.article.url,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-2 p-3 rounded-xl transition-colors bg-white/10 hover:bg-white/15 text-white/90"},[...p[4]||(p[4]=[e("svg",{class:"w-4 h-4 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1),ne(" Read full article ",-1)])],8,r0)):m("",!0)])]))}}),d0={class:"website-detail h-full flex flex-col overflow-hidden"},u0={class:"flex-1 min-w-0 pl-8"},x0=["href"],h0={class:"flex-1 min-h-0 relative bg-black/20"},p0=["src"],g0=q({__name:"WebsiteDetail",props:{website:{}},emits:["back"],setup(a){const c=a,{isDark:l}=J(),w=L(()=>{if(!c.website.url)return"";try{return new URL(c.website.url).hostname.replace(/^www\./,"")}catch{return""}});return(g,b)=>(s(),n("div",d0,[e("div",{class:"shrink-0 flex items-center gap-2 px-3 py-2.5",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("button",{class:"absolute top-3 left-3 p-2 rounded-lg path-glass-icon z-10 transition-colors hover:bg-white/10",onClick:b[0]||(b[0]=p=>g.$emit("back"))},[...b[2]||(b[2]=[e("svg",{class:"w-4 h-4 text-white/90",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),e("div",u0,[e("p",{class:o(["text-sm font-medium truncate",t(l)?"text-white/90":"text-gray-900"])},d(a.website.title||"Website"),3),w.value?(s(),n("p",{key:0,class:o(["text-xs truncate",t(l)?"text-white/30":"text-gray-400"])},d(w.value),3)):m("",!0)]),e("a",{href:a.website.url,target:"_blank",rel:"noopener noreferrer",class:o(["flex items-center justify-center w-8 h-8 rounded-lg transition-colors shrink-0",t(l)?"hover:bg-white/10 text-white/50":"hover:bg-black/5 text-gray-400"]),"aria-label":"Open in new tab",title:"Open in new tab",onClick:b[1]||(b[1]=he(()=>{},["stop"]))},[...b[3]||(b[3]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)])],10,x0)],4),e("div",h0,[(s(),n("iframe",{key:a.website.url,src:a.website.url,class:"absolute inset-0 w-full h-full border-0",style:{"-ms-overflow-style":"none","scrollbar-width":"none"},title:"Website content"},null,8,p0))])]))}}),v0=De(g0,[["__scopeId","data-v-0f5111f5"]]),b0={class:"flex-1 text-center pl-8"},f0={class:"flex-1 min-h-0 overflow-y-auto custom-scrollbar flex flex-col"},m0={class:"px-6 py-8 md:px-8 md:py-10 max-w-lg mx-auto my-auto"},w0={class:"space-y-4"},y0=["href"],k0={class:"flex items-center gap-1"},$0=q({__name:"MagazineSectionDetail",props:{section:{},currentIndex:{},totalSections:{}},emits:["back","navigate"],setup(a){const c=a,{isDark:l}=J(),w=L(()=>c.section.content.replace(/\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/https?:\/\/\S+/g,"").replace(/\uFE0F/g,"").replace(/\*\*/g,"").replace(/\*([^*\n]+)\*/g,"$1").replace(new RegExp("(?:^|(?<=\\s))[\\p{Emoji_Presentation}\\p{Extended_Pictographic}]+\\s*","gu"),"").replace(/---+/g,"").replace(/^#+\s*/gm,"").replace(/\|/g,", ").replace(/,\s*,+/g,",").split(/\n{2,}|\n\s*[-•]\s+/).map(b=>b.replace(/^\s*[-•]\s+/,"").replace(/(^|\n)\s*,\s*/g,"$1").trim()).filter(b=>b.length>0));return(g,b)=>(s(),n("div",{class:o(["magazine-section-detail h-full flex flex-col overflow-hidden",t(l)?"bg-[#0a0a0a]":"bg-[#faf9f6]"]),style:{"font-family":"Georgia, 'Times New Roman', Times, serif"}},[e("div",{class:"shrink-0 flex items-center justify-between px-4 py-3",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("button",{class:"absolute top-3 left-3 min-w-[44px] min-h-[44px] flex items-center justify-center rounded-lg path-glass-icon z-10 transition-colors hover:bg-white/10",onClick:b[0]||(b[0]=p=>g.$emit("back"))},[(s(),n("svg",{class:o(["w-4 h-4",t(l)?"text-white/70":"text-gray-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...b[3]||(b[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"},null,-1)])],2))]),e("div",b0,[e("span",{class:o(["text-xs uppercase tracking-[0.3em] font-semibold",t(l)?"text-white/30":"text-black/30"])}," AI Brief ",2)]),e("span",{class:o(["text-xs font-mono tabular-nums shrink-0",t(l)?"text-white/25":"text-black/25"])},d(a.currentIndex+1)+"/"+d(a.totalSections),3)],4),e("div",f0,[e("div",m0,[a.section.group?(s(),n("p",{key:0,class:o(["text-xs uppercase tracking-[0.3em] font-semibold mb-4",t(l)?"text-white/25":"text-black/30"])},d(a.section.group),3)):m("",!0),e("h2",{class:o(["text-2xl md:text-3xl font-bold leading-tight mb-4",t(l)?"text-white/95":"text-black/90"])},d(a.section.title),3),a.section.author?(s(),n("p",{key:1,class:o(["text-xs mb-6",t(l)?"text-white/40":"text-black/40"])}," By "+d(a.section.author),3)):m("",!0),e("div",{class:o(["w-12 h-px mb-6",t(l)?"bg-white/15":"bg-black/15"])},null,2),e("div",w0,[(s(!0),n(I,null,B(w.value,(p,v)=>(s(),n("p",{key:v,class:o(["text-base md:text-lg leading-relaxed",t(l)?"text-white/75":"text-black/65"])},d(p),3))),128))]),a.section.url?(s(),n("a",{key:2,href:a.section.url,target:"_blank",rel:"noopener noreferrer",class:o(["inline-flex items-center gap-2 mt-6 min-h-[44px] text-xs transition-colors",t(l)?"text-white/40 hover:text-white/70":"text-black/40 hover:text-black/70"])},[...b[4]||(b[4]=[e("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1),ne(" Source ",-1)])],10,y0)):m("",!0)])]),e("div",{class:"shrink-0 flex items-center justify-between px-4 py-3",style:G(t(l)?"border-top: 1px solid rgba(255, 255, 255, 0.08)":"border-top: 1px solid rgba(0, 0, 0, 0.06)")},[e("button",{class:o(["flex items-center gap-1.5 px-3 min-h-[44px] rounded-lg text-xs transition-colors",t(l)?"text-white/50 hover:text-white/80 hover:bg-white/5":"text-black/40 hover:text-black/70 hover:bg-black/5"]),onClick:b[1]||(b[1]=p=>g.$emit("navigate","prev"))},[...b[5]||(b[5]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1),ne(" Prev ",-1)])],2),e("div",k0,[(s(!0),n(I,null,B(a.totalSections,p=>(s(),n("div",{key:p,class:o(["w-1.5 h-1.5 rounded-full transition-all duration-200",p-1===a.currentIndex?t(l)?"bg-white/70 scale-125":"bg-black/60 scale-125":t(l)?"bg-white/15":"bg-black/15"])},null,2))),128))]),e("button",{class:o(["flex items-center gap-1.5 px-3 min-h-[44px] rounded-lg text-xs transition-colors",t(l)?"text-white/50 hover:text-white/80 hover:bg-white/5":"text-black/40 hover:text-black/70 hover:bg-black/5"]),onClick:b[2]||(b[2]=p=>g.$emit("navigate","next"))},[...b[6]||(b[6]=[ne(" Next ",-1),e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])],2)],4)],2))}}),_0={class:"flex-1 min-w-0 pl-8"},C0={class:"flex items-center gap-2"},S0={class:"flex-1 min-h-0 overflow-auto custom-scrollbar"},j0={key:0,class:"font-mono text-xs leading-relaxed"},M0={class:"w-full border-collapse"},T0={key:1,class:"flex items-center justify-center h-full"},D0={class:"text-center space-y-3 px-6"},L0=q({__name:"CodeDetail",emits:["back"],setup(a){const{isDark:c}=J(),{activeFile:l,activeFileContent:w,activeFileLanguage:g,activeProject:b}=pe(),p=L(()=>w.value),v=L(()=>g.value),_=L(()=>l.value??""),C=L(()=>_.value.split("/").pop()??""),f=L(()=>b.value?.name??""),u=L(()=>p.value?p.value.split(`
|
||
`):[]);return(i,r)=>(s(),n("div",{class:o(["code-detail h-full flex flex-col overflow-hidden",t(c)?"bg-[#1a1a2e]":"bg-[#fafafa]"])},[e("div",{class:"shrink-0 flex items-center gap-2 px-3 py-2",style:G(t(c)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("button",{class:"absolute top-3 left-3 p-2 rounded-lg path-glass-icon z-10 transition-colors hover:bg-white/10",onClick:r[0]||(r[0]=x=>i.$emit("back"))},[(s(),n("svg",{class:o(["w-4 h-4",t(c)?"text-white/70":"text-gray-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...r[1]||(r[1]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"},null,-1)])],2))]),e("div",_0,[e("div",C0,[e("span",{class:o(["shrink-0 text-xs px-1.5 py-0.5 rounded font-mono",t(c)?"bg-white/10 text-white/50":"bg-black/5 text-gray-500"])},d(v.value),3),e("p",{class:o(["text-xs font-mono truncate",t(c)?"text-white/70":"text-gray-700"])},d(C.value),3)]),f.value?(s(),n("p",{key:0,class:o(["text-xs font-mono mt-0.5 truncate",t(c)?"text-white/25":"text-gray-400"])},d(f.value)+" / "+d(_.value),3)):m("",!0)])],4),e("div",S0,[p.value?(s(),n("div",j0,[e("table",M0,[e("tbody",null,[(s(!0),n(I,null,B(u.value,(x,S)=>(s(),n("tr",{key:S,class:"hover:bg-white/[0.03]"},[e("td",{class:o(["select-none text-right pr-4 pl-4 py-0 align-top w-1",t(c)?"text-white/15":"text-gray-300"]),style:{"min-width":"3rem"}},d(S+1),3),e("td",{class:o(["pr-4 py-0 whitespace-pre",t(c)?"text-white/75":"text-gray-700"])},d(x),3)]))),128))])])])):(s(),n("div",T0,[e("div",D0,[e("div",{class:o(["w-16 h-16 rounded-2xl flex items-center justify-center mx-auto",t(c)?"bg-white/5":"bg-black/5"])},[(s(),n("svg",{class:o(["w-7 h-7",t(c)?"text-white/20":"text-gray-300"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...r[2]||(r[2]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"},null,-1)])],2))],2),e("p",{class:o(["text-xs",t(c)?"text-white/30":"text-gray-400"])}," Select a file to view its contents. ",2)])]))])],2))}}),I0=De(L0,[["__scopeId","data-v-7f40c0bc"]]),B0={class:"h-full overflow-y-auto overflow-x-hidden scrollbar-hide"},P0={class:"min-w-0 flex-1"},N0={class:"p-4 space-y-4"},A0={key:0,class:"space-y-2"},z0={key:1,class:"space-y-2"},F0={key:2,class:"flex items-end gap-2"},E0={key:0,class:"text-[7px] text-accent font-mono"},R0={key:3,class:"space-y-2"},V0={key:0,class:"flex gap-3"},U0={key:1,class:"flex gap-3"},q0={key:2,class:"flex gap-3"},G0={key:3,class:"flex flex-wrap gap-1.5"},O0={key:4},H0={class:"glass-card p-4"},W0={key:5,class:"flex gap-1.5"},K0={key:6},Y0={key:7,class:"space-y-2"},Q0={key:8},J0={key:9,class:"space-y-1.5"},Z0={class:"flex items-center gap-2.5"},X0={key:10},ex={key:11,class:"flex gap-2"},tx={class:"absolute bottom-0 left-0 right-0 p-1.5"},sx={class:"text-xs text-white/80 font-medium truncate"},nx={key:12,class:"space-y-2"},lx={class:"flex justify-end"},ox={class:"flex justify-start"},ax={key:13,class:"space-y-2"},ix={class:"grid grid-cols-3 gap-1"},rx={key:14,class:"space-y-2"},cx={class:"space-y-1 px-1"},dx={key:15},ux={key:16},xx={class:"flex items-start gap-2.5"},hx={class:"min-w-0 flex-1"},px={class:"flex items-center gap-1.5"},gx={class:"flex gap-3 mt-1.5"},vx={key:17,class:"flex flex-col items-center gap-2"},bx={key:18,class:"flex flex-col items-center gap-2"},fx={key:19,class:"text-center py-4"},mx={key:0},wx=q({__name:"DesignSystemDetail",props:{item:{}},emits:["back"],setup(a){const c=a,{isDark:l}=J(),w=M(!1),g=M(0),b=M(0),p={colors:"Colors",typography:"Typography",spacing:"Spacing",atoms:"Atoms",molecules:"Molecules",organisms:"Organisms"},v=L(()=>p[c.item.category]??c.item.category),_=L(()=>c.item.id==="type-mono"?{fontFamily:'Menlo, Monaco, "Courier New", monospace'}:c.item.id==="type-serif"?{fontFamily:'Georgia, "Times New Roman", Times, serif'}:{fontFamily:"Inter, system-ui, -apple-system, sans-serif"});function C(u){const i=/(?:background-color|color|background):\s*([^;]+)/i.exec(u);return i?i[1].trim():"#333"}async function f(){try{await navigator.clipboard.writeText(c.item.code),w.value=!0,setTimeout(()=>{w.value=!1},2e3)}catch{}}return(u,i)=>(s(),n("div",B0,[e("div",{class:"shrink-0 px-4 py-3 flex items-center gap-3",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("button",{class:o(["min-w-[44px] min-h-[44px] rounded-lg path-glass-icon flex items-center justify-center transition-colors shrink-0",t(l)?"hover:bg-white/10":"hover:bg-black/5"]),onClick:i[0]||(i[0]=r=>u.$emit("back"))},[(s(),n("svg",{class:o(["w-3.5 h-3.5",t(l)?"text-white/70":"text-gray-500"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[3]||(i[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"},null,-1)])],2))],2),e("div",P0,[e("h2",{class:o(["text-sm font-semibold truncate",t(l)?"text-white/90":"text-gray-900"])},d(a.item.name),3),e("p",{class:o(["text-xs",t(l)?"text-white/40":"text-gray-400"])},d(v.value),3)]),e("button",{class:o(["text-xs px-2 py-1 rounded-md transition-colors",w.value?"bg-emerald-500/20 text-emerald-400":t(l)?"bg-white/5 text-white/50 hover:bg-white/10":"bg-black/5 text-gray-500 hover:bg-black/10"]),onClick:f},d(w.value?"Copied":"Copy"),3)],4),e("div",N0,[e("p",{class:o(["text-sm leading-relaxed",t(l)?"text-white/60":"text-gray-600"])},d(a.item.description),3),e("div",null,[e("h4",{class:o(["text-xs uppercase tracking-[0.2em] font-semibold mb-2",t(l)?"text-white/30":"text-gray-400"])}," Preview ",2),e("div",{class:o(["rounded-xl p-4 overflow-hidden",t(l)?"bg-white/[0.03] border border-white/10":"bg-black/[0.02] border border-black/10"])},[a.item.category==="colors"?(s(),n("div",A0,[e("div",{class:o(["h-12 rounded-lg border",t(l)?"border-white/10":"border-black/10"]),style:G({background:C(a.item.code)})},null,6),e("p",{class:o(["text-xs font-mono text-center",t(l)?"text-white/40":"text-gray-400"])},d(C(a.item.code)),3)])):a.item.category==="typography"?(s(),n("div",z0,[e("p",{class:o(["text-2xl font-bold",t(l)?"text-white/90":"text-gray-900"]),style:G(_.value)}," Aa Bb Cc 123 ",6),e("p",{class:o(["text-sm",t(l)?"text-white/60":"text-gray-600"]),style:G(_.value)}," The quick brown fox jumps over the lazy dog. ",6)])):a.item.category==="spacing"?(s(),n("div",F0,[(s(),n(I,null,B([4,8,12,16,20,24,32],(r,x)=>e("div",{key:x,class:"bg-accent/30 rounded-sm flex items-center justify-center",style:G({width:`${r}px`,height:`${r}px`})},[r>=16?(s(),n("span",E0,d(r),1)):m("",!0)],4)),64))])):(s(),n("div",R0,[a.item.id==="atom-glass-btn"?(s(),n("div",V0,[...i[4]||(i[4]=[e("button",{class:"glass-button text-sm"},"Action",-1),e("button",{class:"glass-button text-sm opacity-50 cursor-not-allowed"},"Disabled",-1)])])):a.item.id==="atom-glass-btn-sm"?(s(),n("div",U0,[...i[5]||(i[5]=[e("button",{class:"glass-button glass-button-sm text-xs"},"Small",-1),e("button",{class:"glass-button glass-button-sm text-xs opacity-50 cursor-not-allowed"},"Disabled",-1)])])):a.item.id==="atom-icon-btn"?(s(),n("div",q0,[e("button",{class:o(["w-9 h-9 rounded-xl path-glass-icon flex items-center justify-center",t(l)?"text-white/70":"text-gray-500"])},[...i[6]||(i[6]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1)])],2),e("button",{class:o(["w-9 h-9 rounded-xl path-glass-icon flex items-center justify-center",t(l)?"text-white/70":"text-gray-500"])},[...i[7]||(i[7]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])],2),e("button",{class:o(["w-9 h-9 rounded-xl path-glass-icon flex items-center justify-center",t(l)?"text-white/70":"text-gray-500"])},[...i[8]||(i[8]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],2)])):a.item.id==="atom-badge"?(s(),n("div",G0,[e("span",{class:o(["text-xs px-2 py-1 rounded-md font-medium",t(l)?"bg-white/10 text-white/60":"bg-black/5 text-gray-600"])},"Science Fiction",2),e("span",{class:o(["text-xs px-2 py-1 rounded-md font-medium",t(l)?"bg-white/10 text-white/60":"bg-black/5 text-gray-600"])},"Drama",2),e("span",{class:o(["text-xs px-2 py-1 rounded-md font-medium",t(l)?"bg-white/10 text-white/60":"bg-black/5 text-gray-600"])},"Thriller",2)])):a.item.id==="mol-glass-card"?(s(),n("div",O0,[e("div",H0,[e("h3",{class:o(["text-sm font-semibold mb-1",t(l)?"text-white/90":"text-gray-900"])},"Glass Card",2),e("p",{class:o(["text-xs",t(l)?"text-white/60":"text-gray-500"])},"Content with frosted glass background and subtle border.",2)])])):a.item.id==="atom-nav-tab"?(s(),n("div",W0,[i[9]||(i[9]=e("button",{class:"text-xs px-2.5 py-1 rounded-md font-medium bg-accent/20 text-accent"},"Films",-1)),e("button",{class:o(["text-xs px-2.5 py-1 rounded-md font-medium",t(l)?"bg-white/5 text-white/50":"bg-black/5 text-gray-500"])},"Songs",2),e("button",{class:o(["text-xs px-2.5 py-1 rounded-md font-medium",t(l)?"bg-white/5 text-white/50":"bg-black/5 text-gray-500"])},"Podcasts",2)])):a.item.id==="atom-input"?(s(),n("div",K0,[e("input",{class:o(["w-full px-3 py-2 rounded-lg text-base outline-none transition-colors",t(l)?"bg-white/5 text-white/80 placeholder:text-white/25 focus:bg-white/10":"bg-black/5 text-gray-800 placeholder:text-gray-400 focus:bg-black/10"]),placeholder:"Search...",readonly:""},null,2)])):a.item.id==="atom-scrollbar"?(s(),n("div",Y0,[e("div",{class:o(["h-16 overflow-y-auto rounded-lg px-3 py-2",t(l)?"bg-white/5":"bg-black/5"]),style:{"scrollbar-width":"thin"}},[(s(),n(I,null,B(8,r=>e("p",{key:r,class:o(["text-xs py-0.5",t(l)?"text-white/40":"text-gray-400"])}," Scrollable content line "+d(r),3)),64))],2),e("p",{class:o(["text-xs text-center",t(l)?"text-white/30":"text-gray-400"])}," 4px wide, translucent thumb ",2)])):a.item.id==="mol-gradient-card"?(s(),n("div",Q0,[...i[10]||(i[10]=[e("div",{class:"gradient-card p-4 rounded-2xl"},[e("h3",{class:"text-sm font-semibold mb-1 text-white"},"Featured"),e("p",{class:"text-xs text-white/70"},"Gradient background card for highlights.")],-1)])])):a.item.id==="mol-source-link"?(s(),n("div",J0,[e("div",{class:o(["flex items-center justify-between p-3 rounded-xl transition-colors",t(l)?"bg-white/5":"bg-black/5"])},[e("div",Z0,[i[11]||(i[11]=e("span",{class:"text-sm"},"🎬",-1)),e("div",null,[e("p",{class:o(["text-xs font-medium",t(l)?"text-white/80":"text-gray-800"])},"Netflix",2),e("p",{class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])},"Stream now",2)])]),(s(),n("svg",{class:o(["w-3.5 h-3.5",t(l)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[12]||(i[12]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},null,-1)])],2))],2)])):a.item.id==="mol-banner-hero"?(s(),n("div",X0,[...i[13]||(i[13]=[ls('<div class="relative w-full aspect-[16/7] rounded-lg overflow-hidden"><div class="absolute inset-0" style="background:linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);"></div><div class="absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent"></div><div class="absolute bottom-0 left-0 p-3"><h3 class="text-sm font-bold text-white/90">Banner Title</h3><p class="text-xs text-white/50">Subtitle text</p></div></div>',1)])])):a.item.id==="mol-cover-card"?(s(),n("div",ex,[(s(),n(I,null,B(3,r=>e("div",{key:r,class:"flex-1 rounded-xl overflow-hidden"},[e("div",{class:"aspect-[2/3] relative",style:G({background:`linear-gradient(${120*r}deg, ${["#2d1b69","#1b3a4b","#3b1b2b"][r-1]}, ${["#1a0a3e","#0a2030","#200a1a"][r-1]})`})},[i[14]||(i[14]=e("div",{class:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"},null,-1)),e("div",tx,[e("p",sx,d(["Film","Album","Series"][r-1]),1)])],4)])),64))])):a.item.id==="org-chat-bubble"?(s(),n("div",nx,[e("div",lx,[e("div",{class:o(["max-w-[80%] px-3 py-2 rounded-2xl text-xs",t(l)?"bg-white/10 text-white/90":"bg-black/10 text-gray-800"])}," What films should I watch? ",2)]),e("div",ox,[e("div",{class:o(["max-w-[80%] px-3 py-2 text-xs",t(l)?"text-white/70":"text-gray-600"])}," Here are some great picks from your library... ",2)])])):a.item.id==="org-content-panel"?(s(),n("div",ax,[e("div",{class:"flex gap-1 pb-1.5",style:G(t(l)?"border-bottom: 1px solid rgba(255,255,255,0.08)":"border-bottom: 1px solid rgba(0,0,0,0.06)")},[i[15]||(i[15]=e("span",{class:"text-xs px-2 py-0.5 rounded font-medium bg-accent/20 text-accent"},"Films",-1)),e("span",{class:o(["text-xs px-2 py-0.5 rounded font-medium",t(l)?"text-white/40":"text-gray-400"])},"Songs",2),e("span",{class:o(["text-xs px-2 py-0.5 rounded font-medium",t(l)?"text-white/40":"text-gray-400"])},"Books",2)],4),e("div",ix,[(s(),n(I,null,B(6,r=>e("div",{key:r,class:o(["aspect-[2/3] rounded-md",t(l)?"bg-white/5":"bg-black/5"])},null,2)),64))])])):a.item.id==="org-detail-view"?(s(),n("div",rx,[e("div",{class:o(["relative aspect-[16/7] rounded-lg overflow-hidden",t(l)?"bg-white/5":"bg-black/5"])},[i[17]||(i[17]=e("div",{class:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"},null,-1)),e("div",{class:o(["absolute top-1.5 left-1.5 w-4 h-4 rounded-md flex items-center justify-center",t(l)?"bg-white/10":"bg-black/10"])},[(s(),n("svg",{class:o(["w-2.5 h-2.5",t(l)?"text-white/60":"text-gray-500"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[16]||(i[16]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"},null,-1)])],2))],2),i[18]||(i[18]=e("div",{class:"absolute bottom-1 left-2"},[e("p",{class:"text-xs font-bold text-white/90"},"Title"),e("p",{class:"text-xs text-white/50"},"Meta")],-1))],2),e("div",cx,[e("div",{class:o(["h-1.5 rounded-full w-full",t(l)?"bg-white/5":"bg-black/5"])},null,2),e("div",{class:o(["h-1.5 rounded-full w-3/4",t(l)?"bg-white/5":"bg-black/5"])},null,2)])])):a.item.id==="org-magazine"?(s(),n("div",dx,[e("div",{class:o(["grid grid-cols-2 gap-px rounded-lg overflow-hidden",t(l)?"bg-white/[0.12]":"bg-black/[0.08]"])},[e("div",{class:o(["col-span-2 px-3 py-3",t(l)?"bg-[#0a0a0a]":"bg-white"])},[e("p",{class:o(["text-[7px] uppercase tracking-[0.3em] mb-0.5",t(l)?"text-white/30":"text-gray-400"])},"Editorial",2),e("p",{class:o(["text-xs font-serif font-bold",t(l)?"text-white/90":"text-gray-900"])},"Hero Headline",2)],2),e("div",{class:o(["px-2 py-2",t(l)?"bg-[#0a0a0a]":"bg-white"])},[e("p",{class:o(["text-xs font-serif font-bold",t(l)?"text-white/80":"text-gray-800"])},"Half Tile",2)],2),e("div",{class:o(["px-2 py-2",t(l)?"bg-[#0a0a0a]":"bg-white"])},[e("p",{class:o(["text-xs font-serif font-bold",t(l)?"text-white/80":"text-gray-800"])},"Half Tile",2)],2)],2)])):a.item.id==="org-nostr-note"?(s(),n("div",ux,[e("div",{class:o(["p-3 rounded-xl",t(l)?"bg-white/[0.03] border border-white/5":"bg-black/[0.02] border border-black/5"])},[e("div",xx,[i[20]||(i[20]=e("div",{class:"w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold shrink-0",style:{background:"rgba(168, 85, 247, 0.2)",color:"rgba(168, 85, 247, 0.8)"}}," F ",-1)),e("div",hx,[e("div",px,[e("span",{class:o(["text-xs font-semibold",t(l)?"text-white/80":"text-gray-800"])},"fiatjaf",2),e("span",{class:o(["text-xs",t(l)?"text-white/25":"text-gray-300"])},"2h",2)]),e("p",{class:o(["text-xs mt-0.5 leading-relaxed",t(l)?"text-white/50":"text-gray-500"])}," Nostr is the simplest open protocol... ",2),e("div",gx,[e("span",{class:o(["text-xs",t(l)?"text-white/25":"text-gray-300"])},"3 replies",2),i[19]||(i[19]=e("span",{class:"text-xs text-amber-500/70"},"21000 sats",-1))])])])],2)])):a.item.id==="anim-fade-up"?(s(),n("div",vx,[(s(),n("div",{key:g.value,class:o(["animate-fade-up px-4 py-2 rounded-lg text-xs font-medium",t(l)?"bg-white/10 text-white/70":"bg-black/10 text-gray-600"])}," Fade Up (900ms) ",2)),e("button",{class:o(["text-xs px-2 py-0.5 rounded transition-colors",t(l)?"text-white/40 hover:text-white/60":"text-gray-400 hover:text-gray-600"]),onClick:i[1]||(i[1]=r=>g.value++)}," Replay ",2)])):a.item.id==="anim-scale-in"?(s(),n("div",bx,[(s(),n("div",{key:b.value,class:o(["animate-scale-in px-4 py-2 rounded-lg text-xs font-medium",t(l)?"bg-white/10 text-white/70":"bg-black/10 text-gray-600"])}," Scale In (250ms) ",2)),e("button",{class:o(["text-xs px-2 py-0.5 rounded transition-colors",t(l)?"text-white/40 hover:text-white/60":"text-gray-400 hover:text-gray-600"]),onClick:i[2]||(i[2]=r=>b.value++)}," Replay ",2)])):(s(),n("div",fx,[e("p",{class:o(["text-xs",t(l)?"text-white/30":"text-gray-400"])}," See code below for usage pattern ",2)]))]))],2)]),a.item.usedIn?(s(),n("div",mx,[e("h4",{class:o(["text-xs uppercase tracking-[0.2em] font-semibold mb-2",t(l)?"text-white/30":"text-gray-400"])}," Used In ",2),e("div",{class:o(["rounded-xl px-3 py-2.5",t(l)?"bg-white/[0.03] border border-white/10":"bg-black/[0.02] border border-black/10"])},[e("p",{class:o(["text-xs leading-relaxed",t(l)?"text-white/50":"text-gray-500"])},d(a.item.usedIn),3)],2)])):m("",!0),e("div",null,[e("h4",{class:o(["text-xs uppercase tracking-[0.2em] font-semibold mb-2",t(l)?"text-white/30":"text-gray-400"])}," Code ",2),e("pre",{class:o(["rounded-xl p-4 text-xs leading-relaxed font-mono overflow-x-auto",t(l)?"bg-black/40 text-white/70 border border-white/10":"bg-gray-50 text-gray-700 border border-gray-200"])},d(a.item.code),3)])])]))}}),We=q({__name:"DetailView",setup(a){const{isCodeMode:c,activeFile:l}=pe();function w(){const{activeFile:V,activeFileContent:H}=pe();V.value=null,H.value=""}const{selectedFilm:g,selectedBook:b,selectedTVSeries:p,selectedImage:v,selectedPlace:_,selectedSong:C,selectedPodcast:f,selectedArticle:u,closeFilmDetail:i,closeBookDetail:r,closeTVSeriesDetail:x,closeImageDetail:S,closePlaceDetail:j,closeSongDetail:P,closePodcastDetail:D,closeArticleDetail:y,selectedWebsite:k,closeWebsiteDetail:h,selectedMagazineSection:$,magazineSectionIndex:N,panelMagazineSections:U,closeMagazineSectionDetail:F,navigateMagazineSection:K,selectedDesignSystemItem:O,closeDesignSystemItem:Z}=$e();return(V,H)=>t(g)?(s(),E(vs,{key:0,film:t(g),onBack:t(i)},null,8,["film","onBack"])):t(C)?(s(),E(bs,{key:1,song:t(C),onBack:t(P)},null,8,["song","onBack"])):t(f)?(s(),E(fu,{key:2,podcast:t(f),onBack:t(D)},null,8,["podcast","onBack"])):t(b)?(s(),E(Md,{key:3,book:t(b),onBack:t(r)},null,8,["book","onBack"])):t(p)?(s(),E(Zd,{key:4,series:t(p),onBack:t(x)},null,8,["series","onBack"])):t(v)?(s(),E(Cu,{key:5,image:t(v),onBack:t(S)},null,8,["image","onBack"])):t(_)?(s(),E(Ju,{key:6,place:t(_),onBack:t(j)},null,8,["place","onBack"])):t(u)?(s(),E(c0,{key:7,article:t(u),onBack:t(y)},null,8,["article","onBack"])):t(k)?(s(),E(v0,{key:8,website:t(k),onBack:t(h)},null,8,["website","onBack"])):t($)?(s(),E($0,{key:9,section:t($),"current-index":t(N),"total-sections":t(U).length,onBack:t(F),onNavigate:t(K)},null,8,["section","current-index","total-sections","onBack","onNavigate"])):t(c)&&t(l)?(s(),E(I0,{key:10,onBack:w})):t(O)?(s(),E(wx,{key:11,item:t(O),onBack:t(Z)},null,8,["item","onBack"])):m("",!0)}}),Ke=q({__name:"CloseButton",emits:["click"],setup(a){const{isDark:c}=J();return(l,w)=>(s(),n("button",{class:o(["absolute top-3 right-3 z-10 p-2 rounded-lg path-glass-icon transition-colors",t(c)?"text-white/70 hover:bg-white/10":"text-gray-500 hover:bg-black/5 hover:text-gray-800"]),title:"Close","aria-label":"Close",onClick:w[0]||(w[0]=g=>l.$emit("click"))},[...w[1]||(w[1]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],2))}}),yx={class:"flex-1 overflow-y-auto p-4"},kx={key:0,class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4"},$x={key:1,class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3"},_x={key:2,class:"space-y-3"},Cx={class:"flex-1 space-y-2 py-1"},Sx={key:3,class:"space-y-0"},jx=q({__name:"LoadingContentGrid",props:{variant:{default:"poster"},count:{default:8}},setup(a){const{isDark:c}=J();return(l,w)=>(s(),n("div",yx,[a.variant==="poster"?(s(),n("div",kx,[(s(!0),n(I,null,B(a.count,g=>(s(),n("div",{key:g,class:o(["aspect-[2/3] rounded-xl animate-pulse",t(c)?"bg-white/10":"bg-black/6"])},null,2))),128))])):a.variant==="square"?(s(),n("div",$x,[(s(!0),n(I,null,B(a.count,g=>(s(),n("div",{key:g,class:"space-y-2"},[e("div",{class:o(["aspect-square rounded-xl animate-pulse",t(c)?"bg-white/10":"bg-black/6"])},null,2),e("div",{class:o(["h-3 rounded animate-pulse w-3/4",t(c)?"bg-white/8":"bg-black/5"])},null,2),e("div",{class:o(["h-2.5 rounded animate-pulse w-1/2",t(c)?"bg-white/5":"bg-black/3"])},null,2)]))),128))])):a.variant==="list"?(s(),n("div",_x,[(s(!0),n(I,null,B(a.count,g=>(s(),n("div",{key:g,class:o(["flex gap-3 p-3 rounded-xl animate-pulse",t(c)?"bg-white/[0.04]":"bg-black/[0.03]"])},[e("div",{class:o(["w-20 h-14 rounded-lg shrink-0",t(c)?"bg-white/10":"bg-black/6"])},null,2),e("div",Cx,[e("div",{class:o(["h-3 rounded w-4/5",t(c)?"bg-white/10":"bg-black/6"])},null,2),e("div",{class:o(["h-2.5 rounded w-3/5",t(c)?"bg-white/6":"bg-black/4"])},null,2)])],2))),128))])):a.variant==="magazine"?(s(),n("div",Sx,[e("div",{class:o(["h-44 animate-pulse mb-px",t(c)?"bg-white/[0.04]":"bg-black/[0.03]"])},null,2),e("div",{class:o(["grid grid-cols-2 gap-px",t(c)?"bg-white/12":"bg-black/10"])},[(s(!0),n(I,null,B(a.count,g=>(s(),n("div",{key:g,class:o(["p-4 animate-pulse",[t(c)?"bg-[#0a0a0a]":"bg-[#faf9f6]",g<=1?"col-span-2":""]])},[e("div",{class:o(["h-2.5 rounded w-1/3 mb-2",t(c)?"bg-white/8":"bg-black/5"])},null,2),e("div",{class:o(["h-4 rounded w-4/5 mb-2",t(c)?"bg-white/10":"bg-black/6"])},null,2),e("div",{class:o(["h-2.5 rounded w-full",t(c)?"bg-white/6":"bg-black/4"])},null,2)],2))),128))],2)])):m("",!0)]))}}),Mx={class:"relative flex-1 flex flex-col min-h-0 overflow-hidden"},Tx={key:0,class:"flex-1 flex flex-col min-h-0"},Dx={class:"flex items-center gap-2 shrink-0"},Lx={key:1,class:"relative flex-1 flex items-center justify-center min-h-0"},Ix={class:"relative flex flex-col items-center gap-8"},Bx={class:"flex items-center gap-2"},Px={class:"absolute inset-0 pointer-events-none overflow-hidden"},Nx=q({__name:"ContextLoader",props:{contextType:{default:"film"}},setup(a){const c=a,{isDark:l}=J(),w=L(()=>c.contextType==="film"?"Film recommendations":c.contextType==="song"?"Song recommendations":c.contextType==="podcast"?"Podcast recommendations":c.contextType==="book"?"Book recommendations":c.contextType==="tvshow"?"TV Series recommendations":c.contextType==="image"?"Images":c.contextType==="news"?"Articles":c.contextType==="websites"?"Websites":c.contextType==="magazine"?"Brief":"Content"),g=L(()=>["song","podcast","image"].includes(c.contextType)?"square":["news","websites"].includes(c.contextType)?"list":c.contextType==="magazine"?"magazine":"poster"),b=L(()=>c.contextType==="magazine"||["news","websites"].includes(c.contextType)?6:12);return(p,v)=>(s(),n("div",Mx,[["film","song","podcast","book","tvshow","image","news","websites","magazine"].includes(a.contextType)?(s(),n("div",Tx,[e("div",{class:"p-4 shrink-0 flex items-center justify-between gap-2",style:G(t(l)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("p",{class:o(["text-sm font-medium",t(l)?"text-white/70":"text-gray-600"])},d(w.value),3),e("div",Dx,[e("p",{class:o(["text-xs font-mono uppercase tracking-[0.2em]",t(l)?"text-white/25":"text-gray-400"])}," Surfacing… ",2),ie(p.$slots,"header-actions",{},void 0,!0)])],4),se(jx,{variant:g.value,count:b.value},null,8,["variant","count"])])):(s(),n("div",Lx,[e("div",{class:o(["absolute inset-0 opacity-[0.04] pointer-events-none",t(l)?"bg-white":"bg-black"]),style:{"background-image":`url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")`}},null,2),e("div",Ix,[e("div",Bx,[(s(),n(I,null,B(5,(_,C)=>e("div",{key:C,class:o(["w-12 h-16 rounded-lg overflow-hidden relative animate-cell-pulse",t(l)?"bg-white/8 border border-white/15 shadow-xl shadow-accent/5":"bg-black/6 border border-black/8 shadow-xl shadow-accent/10"]),style:G({animationDelay:`${C*100}ms`})},[e("div",Px,[e("div",{class:o(["absolute inset-0 w-1/2 animate-shimmer-sweep",t(l)?"bg-gradient-to-r from-transparent via-accent/25 to-transparent":"bg-gradient-to-r from-transparent via-accent/35 to-transparent"])},null,2)])],6)),64))]),e("p",{class:o(["text-sm font-medium",t(l)?"text-white/70":"text-gray-600"])},d(w.value),3),e("div",{class:o(["w-40 h-px rounded-full overflow-hidden",t(l)?"bg-white/8":"bg-black/8"])},[...v[0]||(v[0]=[e("div",{class:"h-full bg-accent/90 rounded-full animate-progress-sweep"},null,-1)])],2)])]))]))}}),dt=De(Nx,[["__scopeId","data-v-f8eb31f3"]]),Ax={key:0,class:"absolute inset-0 pointer-events-none bg-black/20"},zx={key:0,class:"flex-1 min-w-0 flex flex-col relative"},Fx={class:"flex flex-wrap gap-1.5 flex-1 min-w-0 justify-center"},Ex=["onClick"],Rx={key:1,class:"flex-1 min-w-0 flex flex-col"},Vx={key:3,class:"flex-1 flex items-center justify-center"},Ux={class:"text-center space-y-4 animate-fade-up max-w-sm px-6"},qx={class:"empty-state-icon w-20 h-20 rounded-2xl path-glass-icon flex items-center justify-center mx-auto overflow-hidden"},Gx={key:0,class:"flex-1 min-w-0 path-glass-card overflow-hidden flex flex-col order-3 detail-persistent panel-slide-in",style:{"animation-delay":"0.2s"}},Ox={key:1,class:"flex-1 flex items-center justify-center"},Hx={class:"text-center space-y-4 max-w-[200px] px-4"},Wx={class:"empty-state-icon w-16 h-16 rounded-2xl path-glass-icon flex items-center justify-center mx-auto overflow-hidden"},Kx={key:1,class:"flex-1 flex flex-col min-h-0"},Yx={class:"flex-1 min-h-0 flex flex-col p-2 pb-0"},Qx={class:"flex-1 min-h-0 path-glass-card flex flex-col rounded-2xl overflow-hidden"},Jx={class:"flex-1 min-h-0 flex flex-col p-2 pb-0"},Zx={class:"flex-1 min-h-0 path-glass-card flex flex-col rounded-2xl overflow-hidden"},Xx={class:"shrink-0 flex items-center gap-2 px-3 pt-2 pb-1 overflow-x-auto scrollbar-hide"},eh=["onClick"],th={key:2,class:"flex-1 flex items-center justify-center"},sh={class:"text-center space-y-3 px-6"},nh={class:"empty-state-icon w-16 h-16 rounded-2xl path-glass-icon flex items-center justify-center mx-auto overflow-hidden"},lh={class:"flex-1 min-h-0 flex flex-col p-2 pb-0"},oh={class:"flex-1 min-h-0 path-glass-card flex flex-col rounded-2xl overflow-hidden"},ah={class:"flex-1 min-h-0 flex flex-col"},ih={key:1,class:"flex-1 flex items-center justify-center"},rh={class:"text-center space-y-3 px-6"},ch={class:"empty-state-icon w-16 h-16 rounded-2xl path-glass-icon flex items-center justify-center mx-auto overflow-hidden"},dh={class:"shrink-0 pt-3 pb-3",style:{paddingBottom:"calc(12px + env(safe-area-inset-bottom, 0px))"}},uh={class:"flex items-center h-[49px] px-2 gap-1"},xh={key:0,class:"absolute top-1.5 right-[28%] w-1.5 h-1.5 rounded-full bg-accent"},hh={key:0,class:"absolute top-1.5 right-[28%] w-1.5 h-1.5 rounded-full bg-accent"},ph=q({__name:"ChatPage",setup(a){const{hasTrack:c}=os(),l=cs(),{activeFile:w,isCodeMode:g,exitCodeMode:b,clearActiveFile:p}=pe(),{isDark:v}=J(),_=!!window.__AIUI_EMBEDDED__,C="/assets/img/bg-intro-3.jpg";hs();const{panelOpen:f,panelFilms:u,panelBooks:i,panelTVSeries:r,panelImages:x,panelPlaces:S,panelSongs:j,panelPodcasts:P,panelWebResults:D,panelWebsites:y,panelMagazineSections:k,panelMagazineHeroImage:h,panelRecipes:$,panelApps:N,panelNodeStatus:U,panelNodeFiles:F,nodeFilesFilter:K,panelTitle:O,panelQuery:Z,panelResponseText:V,contentType:H,activeTab:X,availableTabs:ge,setActiveTab:me,selectedFilm:ee,selectedBook:z,selectedTVSeries:A,selectedImage:re,selectedPlace:ze,selectedSong:Fe,selectedPodcast:Ee,selectedArticle:kt,selectedWebsite:$t,selectedMagazineSection:Ie,selectedDesignSystemItem:_t,closeFilmDetail:Ct,closeBookDetail:St,closeTVSeriesDetail:jt,closeImageDetail:Mt,closePlaceDetail:Tt,closeSongDetail:Dt,closePodcastDetail:Lt,closeArticleDetail:It,closeWebsiteDetail:Bt,closeMagazineSectionDetail:Pt,closePanel:_e,openFilmDetail:Nt,openBookDetail:At,openTVSeriesDetail:zt,openImageDetail:Ft,openPlaceDetail:Et,openSongDetail:Rt,openPodcastDetail:Vt,openMagazineSectionDetail:Ut}=$e(),Ce=L(()=>l.panelSide),Re=M(window.innerWidth),oe=L(()=>Re.value<1024),de=L(()=>Re.value>=1440),te=M("chat"),{isKeyboardOpen:qt}=as();function Je(){Re.value=window.innerWidth}function Ze(R){R.key==="Escape"&&g.value&&!oe.value&&b()}le(()=>{window.addEventListener("resize",Je),window.addEventListener("keydown",Ze)}),is(()=>{window.removeEventListener("resize",Je),window.removeEventListener("keydown",Ze)}),ce(f,R=>{R&&oe.value&&(te.value="content")}),ce(O,()=>{f.value&&oe.value&&te.value==="chat"&&(te.value="content")}),ce(X,()=>{f.value&&oe.value&&te.value==="chat"&&(te.value="content")});const ve=L(()=>!!(ee.value||z.value||A.value||re.value||ze.value||Fe.value||Ee.value||kt.value||$t.value||Ie.value||_t.value||g.value&&w.value));ce(ve,R=>{R&&oe.value&&(te.value="context"),!R&&oe.value&&te.value==="context"&&(te.value="content")});const Ve=L(()=>f.value&&ge.value.length>0);function Xe(){Ct(),St(),jt(),Mt(),Tt(),Dt(),Lt(),It(),Bt(),Pt(),p()}const Ue=L(()=>{const R=[];return u.value.forEach(T=>R.push({open:()=>Nt(T)})),i.value.forEach(T=>R.push({open:()=>At(T)})),r.value.forEach(T=>R.push({open:()=>zt(T)})),j.value.forEach(T=>R.push({open:()=>Rt(T)})),P.value.forEach(T=>R.push({open:()=>Vt(T)})),x.value.forEach(T=>R.push({open:()=>Ft(T)})),S.value.forEach(T=>R.push({open:()=>Et(T)})),k.value.forEach((T,Y)=>R.push({open:()=>Ut(T,Y)})),R}),et=L(()=>{if(ee.value){const R=u.value.indexOf(ee.value);return R>=0?R:0}if(z.value){const R=i.value.indexOf(z.value);return R>=0?u.value.length+R:0}if(A.value){const R=r.value.indexOf(A.value);return R>=0?u.value.length+i.value.length+R:0}if(Fe.value){const R=u.value.length+i.value.length+r.value.length,T=j.value.indexOf(Fe.value);return T>=0?R+T:0}if(Ee.value){const R=u.value.length+i.value.length+r.value.length+j.value.length,T=P.value.indexOf(Ee.value);return T>=0?R+T:0}if(re.value){const R=u.value.length+i.value.length+r.value.length+j.value.length+P.value.length,T=x.value.indexOf(re.value);return T>=0?R+T:0}if(ze.value){const R=u.value.length+i.value.length+r.value.length+j.value.length+P.value.length+x.value.length,T=S.value.indexOf(ze.value);return T>=0?R+T:0}if(Ie.value){const R=u.value.length+i.value.length+r.value.length+j.value.length+P.value.length+x.value.length+S.value.length,T=k.value.indexOf(Ie.value);return T>=0?R+T:0}return 0});function tt(R){const T=Ue.value;if(!T.length)return;let Y=et.value;Y+=R==="next"?1:-1,Y<0&&(Y=T.length-1),Y>=T.length&&(Y=0),Xe(),T[Y].open()}const Gt={film:"Films",book:"Books",tvshow:"TV",image:"Images",place:"Places",recipe:"Recipes",song:"Songs",podcast:"Podcasts",news:"News",websites:"Websites",magazine:"Brief",code:"Code","design-system":"Design",app:"Apps",nostr:"Nostr",favorites:"Favorites",discover:"Discover",prompt:"Prompt","node-status":"Node","node-files":"Files","node-apps":"Services"};function st(R){return Gt[R]??R}const nt=L(()=>{if(f.value)return H.value;const T=([...l.messages].reverse().find(Y=>Y.role==="user")?.content??"").toLowerCase();return/\b(song|music|track|album|band|artist|listen)\b/.test(T)?"song":/\b(book|novel|read|author|fiction|nonfiction|memoir)\b/.test(T)?"book":/\b(tv show|tv series|series|television|binge|season)\b/.test(T)?"tvshow":/\b(image|images|photo|photos|picture|pictures|screenshot|gallery|artwork|illustration)\b/.test(T)?"image":/\b(restaurant|restaurants|place|places|food|eat|dining|cafe|bar|pub|brunch|lunch|dinner)\b/.test(T)?"film":/\b(podcast|episode|show|listen to)\b/.test(T)?"podcast":/\b(news|latest|recent|current|what'?s happening|what are people saying)\b/.test(T)?"news":/\b(bip|protocol|debate|sentiment|bearish|bull case|macro)\b/.test(T)?"magazine":/\b(website|websites|where to check|best places|check online|resources?|sources?)\b/.test(T)?"websites":H.value});return(R,T)=>(s(),n("div",{class:o(["h-full flex flex-col relative overflow-hidden transition-colors duration-300",[]]),style:G(_?{background:"transparent"}:t(v)?{background:"#000 url("+C+") center center / cover no-repeat fixed"}:{backgroundColor:"#f5f4f1"})},[t(v)&&!_?(s(),n("div",Ax)):m("",!0),e("div",{class:o(["flex-1 flex h-full p-3 md:p-4 gap-3 md:gap-4 transition-[padding] duration-200",[oe.value?"hidden":""]]),style:G(t(c)&&!oe.value?{paddingBottom:"76px"}:{})},[e("main",{class:o(["flex-1 min-w-0 path-glass-card overflow-hidden flex relative panel-slide-in",[de.value?Ce.value==="left"?"order-2":"order-1":Ce.value==="left"?"order-last":"order-first",!de.value&&ve.value&&!Ve.value&&"detail-active"]]),style:{"animation-delay":"0.1s"}},[t(f)&&Ve.value&&(de.value||!ve.value)?(s(),n("div",zx,[se(Ke,{onClick:t(_e)},null,8,["onClick"]),e("div",{class:"shrink-0 flex items-center gap-2 px-4 pr-12 py-3",style:G(t(v)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[e("div",Fx,[(s(!0),n(I,null,B(t(ge),Y=>(s(),n("button",{key:Y,class:o(["text-xs px-2 py-1 rounded-md transition-all duration-150",t(X)===Y?"nav-tab-active":t(v)?"text-white/40 hover:text-white/70 hover:bg-white/5":"text-gray-500 hover:text-gray-800 hover:bg-black/5"]),onClick:Ot=>t(me)(Y)},d(st(Y)),11,Ex))),128))])],4),se(be,{title:"Content failed to load"},{default:ue(()=>[se(ct,{"active-tab":t(X),"is-wide-desktop":de.value,"is-mobile":oe.value,"panel-films":t(u),"panel-books":t(i),panelTVSeries:t(r),"panel-images":t(x),"panel-places":t(S),"panel-songs":t(j),"panel-podcasts":t(P),"panel-web-results":t(D),"panel-websites":t(y),"panel-magazine-sections":t(k),"panel-magazine-hero-image":t(h),"panel-recipes":t($),"panel-apps":t(N),"panel-node-status":t(U),"panel-node-files":t(F),"node-files-filter":t(K),"panel-title":t(O),"panel-query":t(Z),"panel-response-text":t(V),onClose:t(_e)},null,8,["active-tab","is-wide-desktop","is-mobile","panel-films","panel-books","panelTVSeries","panel-images","panel-places","panel-songs","panel-podcasts","panel-web-results","panel-websites","panel-magazine-sections","panel-magazine-hero-image","panel-recipes","panel-apps","panel-node-status","panel-node-files","node-files-filter","panel-title","panel-query","panel-response-text","onClose"])]),_:1})])):!de.value&&t(f)&&ve.value?(s(),n("div",Rx,[se(Ke,{onClick:T[0]||(T[0]=Y=>Ve.value?Xe():t(_e)())}),se(be,{title:"Detail view error"},{default:ue(()=>[se(We)]),_:1})])):t(l).isStreaming?(s(),E(dt,{key:2,"context-type":nt.value},{"header-actions":ue(()=>[se(Ke,{onClick:t(_e)},null,8,["onClick"])]),_:1},8,["context-type"])):(s(),n("div",Vx,[e("div",Ux,[e("div",qx,[e("span",{class:o(["text-3xl",t(v)?"text-[#fafafa]":"text-gray-800"])},"✦",2)]),e("div",null,[e("h2",{class:o(["text-lg font-bold mb-1",t(v)?"text-white/80":"text-gray-800"])}," Content Surface ",2),e("p",{class:o(["text-sm leading-relaxed",t(v)?"text-white/30":"text-gray-400"])}," Ask about films, songs, or podcasts in the chat to see rich content here. ",2)])])]))],2),de.value?(s(),n("div",Gx,[ve.value?(s(),E(be,{key:0,title:"Detail view error"},{default:ue(()=>[se(We)]),_:1})):(s(),n("div",Ox,[e("div",Hx,[e("div",Wx,[e("span",{class:o(["text-2xl",t(v)?"text-[#fafafa]":"text-gray-800"])},"✦",2)]),e("div",null,[e("h2",{class:o(["text-sm font-semibold mb-1",t(v)?"text-white/60":"text-gray-600"])}," Awaiting Context ",2),e("p",{class:o(["text-xs leading-relaxed",t(v)?"text-white/25":"text-gray-400"])}," Select an item to see details here. ",2)])])]))])):m("",!0),e("aside",{class:o(["relative z-[100] w-80 xl:w-96 shrink-0 flex flex-col path-glass-card overflow-visible panel-slide-in",de.value?Ce.value==="left"?"order-1":"order-2":Ce.value==="left"?"order-first":"order-last"]),style:{"animation-delay":"0s"}},[se(be,{title:"Chat error"},{default:ue(()=>[se(lt,{side:Ce.value,onSwitchSide:T[1]||(T[1]=Y=>t(l).switchSide())},null,8,["side"])]),_:1})],2)],6),oe.value?(s(),n("div",Kx,[W(e("div",Yx,[e("div",Qx,[se(be,{title:"Chat error"},{default:ue(()=>[se(lt,{variant:"standalone","show-close":!1})]),_:1})])],512),[[Be,te.value==="chat"]]),W(e("div",Jx,[e("div",Zx,[t(f)?(s(),n(I,{key:0},[e("div",Xx,[e("button",{class:o(["p-1.5 rounded-lg transition-colors shrink-0",t(v)?"text-white/50 hover:text-white/80 hover:bg-white/5":"text-gray-400 hover:text-gray-700 hover:bg-black/5"]),onClick:T[2]||(T[2]=Y=>te.value="chat")},[...T[8]||(T[8]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])],2),(s(!0),n(I,null,B(t(ge),Y=>(s(),n("button",{key:Y,class:o(["text-xs px-2.5 py-1.5 rounded-lg font-medium whitespace-nowrap transition-all duration-150",t(X)===Y?"nav-tab-active":t(v)?"text-white/40 hover:text-white/70 hover:bg-white/5":"text-gray-500 hover:text-gray-800 hover:bg-black/5"]),onClick:Ot=>t(me)(Y)},d(st(Y)),11,eh))),128))]),se(be,{title:"Content failed to load"},{default:ue(()=>[se(ct,{"active-tab":t(X),"is-wide-desktop":de.value,"is-mobile":oe.value,"panel-films":t(u),"panel-books":t(i),panelTVSeries:t(r),"panel-images":t(x),"panel-places":t(S),"panel-songs":t(j),"panel-podcasts":t(P),"panel-web-results":t(D),"panel-websites":t(y),"panel-magazine-sections":t(k),"panel-magazine-hero-image":t(h),"panel-recipes":t($),"panel-apps":t(N),"panel-node-status":t(U),"panel-node-files":t(F),"node-files-filter":t(K),"panel-title":t(O),"panel-query":t(Z),onClose:t(_e)},null,8,["active-tab","is-wide-desktop","is-mobile","panel-films","panel-books","panelTVSeries","panel-images","panel-places","panel-songs","panel-podcasts","panel-web-results","panel-websites","panel-magazine-sections","panel-magazine-hero-image","panel-recipes","panel-apps","panel-node-status","panel-node-files","node-files-filter","panel-title","panel-query","onClose"])]),_:1})],64)):t(l).isStreaming?(s(),E(dt,{key:1,"context-type":nt.value},null,8,["context-type"])):(s(),n("div",th,[e("div",sh,[e("div",nh,[e("span",{class:o(["text-2xl",t(v)?"text-[#fafafa]":"text-gray-800"])},"✦",2)]),e("p",{class:o(["text-xs",t(v)?"text-white/30":"text-gray-400"])}," Ask about something in the chat to see content here. ",2)])]))])],512),[[Be,te.value==="content"]]),W(e("div",lh,[e("div",oh,[ve.value?(s(),n(I,{key:0},[e("div",ah,[se(be,{title:"Detail view error"},{default:ue(()=>[se(We)]),_:1})]),!t(Ie)&&Ue.value.length>1?(s(),n("div",{key:0,class:"shrink-0 flex items-center justify-between px-4 py-2",style:G(t(v)?"border-top: 1px solid rgba(255, 255, 255, 0.08)":"border-top: 1px solid rgba(0, 0, 0, 0.06)")},[e("button",{class:o(["flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs transition-colors",t(v)?"text-white/50 hover:text-white/80 hover:bg-white/5":"text-black/40 hover:text-black/70 hover:bg-black/5"]),onClick:T[3]||(T[3]=Y=>tt("prev"))},[...T[9]||(T[9]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1),ne(" Prev ",-1)])],2),e("span",{class:o(["text-xs font-mono tabular-nums",t(v)?"text-white/25":"text-black/25"])},d(et.value+1)+"/"+d(Ue.value.length),3),e("button",{class:o(["flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs transition-colors",t(v)?"text-white/50 hover:text-white/80 hover:bg-white/5":"text-black/40 hover:text-black/70 hover:bg-black/5"]),onClick:T[4]||(T[4]=Y=>tt("next"))},[...T[10]||(T[10]=[ne(" Next ",-1),e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])],2)],4)):m("",!0)],64)):(s(),n("div",ih,[e("div",rh,[e("div",ch,[(s(),n("svg",{class:o(["w-7 h-7",t(v)?"text-white/30":"text-gray-400"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...T[11]||(T[11]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},null,-1)])],2))]),e("p",{class:o(["text-xs",t(v)?"text-white/30":"text-gray-400"])}," Tap an item in Content to view details here. ",2)])]))])],512),[[Be,te.value==="context"]]),se(rs,{variant:"inline",compact:""}),W(e("div",dh,[e("div",uh,[e("button",{class:o(["flex-1 flex flex-col items-center justify-center h-[49px] min-h-[44px] rounded-xl text-[10px] font-medium tracking-wide transition-all duration-150 gap-0.5",te.value==="chat"?t(v)?"bg-white/10 text-white/90":"bg-black/8 text-gray-900":t(v)?"text-white/40 hover:text-white/60":"text-gray-400 hover:text-gray-600"]),onClick:T[5]||(T[5]=Y=>te.value="chat")},[...T[12]||(T[12]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})],-1),e("span",null,"Chat",-1)])],2),e("button",{class:o(["flex-1 flex flex-col items-center justify-center h-[49px] min-h-[44px] rounded-xl text-[10px] font-medium tracking-wide transition-all duration-150 relative gap-0.5",te.value==="content"?t(v)?"bg-white/10 text-white/90":"bg-black/8 text-gray-900":t(v)?"text-white/40 hover:text-white/60":"text-gray-400 hover:text-gray-600"]),onClick:T[6]||(T[6]=Y=>te.value="content")},[T[13]||(T[13]=e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})],-1)),T[14]||(T[14]=e("span",null,"Content",-1)),t(f)&&te.value==="chat"?(s(),n("span",xh)):m("",!0)],2),e("button",{class:o(["flex-1 flex flex-col items-center justify-center h-[49px] min-h-[44px] rounded-xl text-[10px] font-medium tracking-wide transition-all duration-150 relative gap-0.5",te.value==="context"?t(v)?"bg-white/10 text-white/90":"bg-black/8 text-gray-900":t(v)?"text-white/40 hover:text-white/60":"text-gray-400 hover:text-gray-600"]),onClick:T[7]||(T[7]=Y=>te.value="context")},[T[15]||(T[15]=e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)),T[16]||(T[16]=e("span",null,"Context",-1)),ve.value&&te.value!=="context"?(s(),n("span",hh)):m("",!0)],2)])],512),[[Be,!t(qt)]])])):m("",!0)],4))}}),_h=De(ph,[["__scopeId","data-v-e9c77de5"]]);export{_h as default};
|