1import{_ as dt,c as ut,a as ct,s as pt}from"./BScbqHQf.js";import{_ as mt,c as kt}from"./DiEIJrDK.js";import{_ as vt}from"./DxCPsy20.js";import{_ as _t}from"./DKIwVt4L.js";import{d as ft,x as E,r as v,y as xt,z as ht,A as yt,B as wt,C as Nt,c as a,h as I,i as P,e as s,u as t,t as u,j as n,a as m,g as $,b as gt,o as r,n as D,F as M,m as F}from"./D5s8oYsb.js";import{b as bt,c as It,a as Ct,d as At}from"./B6YzVFlr.js";import"./Dn3xYGzP.js";import"./Bjo9pXe4.js";import"./m26ZN6YN.js";const Bt=ut(vt),St={class:"p-2"},Tt={key:0,class:"h-20 overflow-hidden"},Et=["src"],Pt={key:1,class:"h-20 overflow-hidden"},$t={class:"mt-2"},Dt={key:0},Mt={class:"overflow-auto overflow-wrap break-words"},Ft={key:1},Vt={class:"overflow-auto overflow-wrap break-words"},Lt={key:2},Rt={class:"overflow-auto overflow-wrap break-words"},Wt={key:0},zt={class:"overflow-auto overflow-wrap break-words"},Gt={key:1,class:"block mt-1 mb-2 cursor-pointer"},Ht=["href"],Qt={key:0},Ut={class:"text-xl font-bold"},jt={key:1},qt={class:""},Ot={key:2},Jt={class:""},Kt={key:3},Xt={class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"},Yt={key:4},Zt={key:0,class:""},to={key:0},oo={class:"mt-4 mb-12"},eo={class:"text-lg"},so={key:0},ro={key:0},ao={key:1},no={key:0},lo={class:""},ho=ft({__name:"[id]",setup(io){var H,Q,U,j,q;const C=(H=E())==null?void 0:H.public,J=(C==null?void 0:C.enableAutoGeneratedNames)!=="false",_=v("spasm"),V=c=>{c&&(_.value=c)},{areValidSpasmEventsV2:L,autoGeneratedName:K,hasValue:X,isArrayWithValues:R,randomNumber:W}=gt(),{toBeHex:z,toBeNpub:Y,isHex:Z,isNostrValue:tt}=Ct(),A=bt(),{getMetadataByAddressNostr:i,getMessagesByAddressNostr:B,getPreferredRelaysFromAddress:f}=xt(A),{id:x}=ht().params,G=()=>{const c=document.querySelector("#top-anchor");c&&c.scrollIntoView({behavior:"smooth",block:"end"})},w=v(!1),ot=()=>{w.value=!w.value};setTimeout(G,300);let e="",d=null,k=null;x&&(typeof x=="string"?e=x.toLowerCase():typeof x=="number"&&(e=x.toString())),e&&typeof e=="string"&&(e.length===64&&Z(e)?(d=Y(e),k=z(e)):tt(e)&&(d=e,k=z(e)));const{getMockEventsByAddress:et}=At(),st=((U=(Q=E())==null?void 0:Q.public)==null?void 0:U.useMockedDataIfBackendIsDown)==="true",rt=(q=(j=E())==null?void 0:j.public)==null?void 0:q.apiURL,N=v(!1),S=v("show");let g=v([]),at=v(!1);yt(async()=>{await wt();const c=`${rt}/api/events?signer=${e}&action=post&action=reply`,{data:o,error:b}=await It(c,"$LcfWuLdxSC");if(b.value&&(at.value=!0,console.error(b.value)),o!=null&&o.value){const p=Nt(o.value);p&&L(p)&&(g.value=p)}else st&&(g.value=et(e))});const nt=()=>{N.value=!N.value,S.value=S.value==="show"?"hide":"show"};return e&&typeof e=="string"&&(A.addAddress(e,["username","relays","messages"]),A.updateAllProfiles(["relays","username","messages"])),(c,o)=>{const b=ct,p=dt,T=mt,lt=kt,it=Bt,O=_t;return r(),a("div",St,[I(p,null,{default:P(()=>[o[5]||(o[5]=s("span",{id:"top-anchor"},null,-1)),t(i)(t(e),"picture")&&t(i)(t(e),"picture")!=="none"?(r(),a("div",Tt,[s("img",{src:t(i)(t(e),"picture"),alt:"Nostr profile picture",class:"h-20 object-cover"},null,8,Et)])):(r(),a("div",Pt,[t(e)?(r(),m(b,{key:0,seed:t(e),scale:10},null,8,["seed"])):n("",!0)]))]),_:1}),s("div",$t,[t(J)?(r(),a("div",Dt,[o[6]||(o[6]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"}," Auto-generated name: ",-1)),s("span",Mt,[s("span",null,u(t(K)(t(e))),1)])])):n("",!0),t(d)?(r(),a("div",Ft,[o[7]||(o[7]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"},[s("span",null,"Address (hex):")],-1)),s("span",Vt,u(t(k)),1),t(k)?(r(),m(T,{key:t(k),value:t(k),showFollow:!0,showCopyToClipboard:!0,showQrCode:!0,showExternalWebsite:!0},null,8,["value"])):n("",!0)])):(r(),a("div",Lt,[o[8]||(o[8]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"},[s("span",null,"Address:")],-1)),s("span",Rt,u(t(e)),1),t(e)?(r(),m(T,{key:t(e),value:t(e),showFollow:!0,showCopyToClipboard:!0,showQrCode:!0,showExternalWebsite:!0},null,8,["value"])):n("",!0)]))]),t(d)?(r(),a("div",Wt,[o[10]||(o[10]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"}," Address (npub): ",-1)),s("span",zt,u(t(d)),1),t(d)?(r(),m(T,{key:t(d),value:t(d),showFollow:!0,showCopyToClipboard:!0,showQrCode:!0,showExternalWebsite:!0},null,8,["value"])):n("",!0),t(d)?(r(),a("span",Gt,[s("a",{href:`nostr:${t(d)}`,target:"_blank",class:"text-colorNotImportant-light dark:text-colorNotImportant-dark hover:text-colorPrimary-light dark:hover:text-colorPrimary-dark"},[o[9]||(o[9]=$(" Open in your Nostr app ")),I(lt,{class:"custom-icons-large lg:custom-icons pb-1"})],8,Ht)])):n("",!0)])):n("",!0),I(p,null,{default:P(()=>
1[t(i)(t(e),"username")&&t(i)(t(e),"username")!=="none"?(r(),a("div",Qt,[o[11]||(o[11]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"}," Name: ",-1)),s("span",Ut,u(t(i)(t(e),"username")),1),o[12]||(o[12]=s("span",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"}," (non-unique Nostr name) ",-1))])):n("",!0),t(i)(t(e),"about")&&t(i)(t(e),"about")!=="none"?(r(),a("div",jt,[o[13]||(o[13]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"}," About: ",-1)),s("span",qt,u(t(i)(t(e),"about")),1)])):n("",!0),t(i)(t(e),"website")&&t(i)(t(e),"website")!=="none"?(r(),a("div",Ot,[o[14]||(o[14]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"}," Website: ",-1)),s("span",Jt,u(t(i)(t(e),"website")),1)])):n("",!0),t(R)(t(f)(t(e)))?(r(),a("div",Kt,[s("button",{onClick:o[0]||(o[0]=l=>ot()),class:"py-2"},[s("div",Xt,[o[16]||(o[16]=$(" More nerdy details ")),(r(),a("svg",{class:D([{"rotate-180":t(w)},"w-5 h-5 inline"]),viewBox:"0 0 20 20",fill:"currentColor"},o[15]||(o[15]=[s("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)]),2))])])])):n("",!0),t(w)?(r(),a("div",Yt,[t(f)(t(e))&&t(f)(t(e))!=="none"&&t(R)(t(f)(t(e)))?(r(),a("div",Zt,[o[17]||(o[17]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"}," Preferred relays: ",-1)),(r(!0),a(M,null,F(t(f)(t(e)),l=>(r(),a("div",null,[l?(r(),a("div",to,u(l),1)):n("",!0)]))),256))])):n("",!0)])):n("",!0)]),_:1}),(r(),m(it,{class:"my-2",key:t(e)||t(W)(),signer:t(d)||t(e),activity:"all",showActivityFilter:!0,showSignerFilter:!0,showCategoryFilter:!0,enablePosts:!0,enableComments:!0},null,8,["signer"])),I(p,null,{default:P(()=>[s("div",oo,[s("div",eo,[o[18]||(o[18]=$(" Networks: ")),s("span",{class:D(["cursor-pointer text-colorNotImportant-light dark:text-colorNotImportant-dark",{"text-colorPrimary-light dark:text-colorPrimary-dark":t(_)==="spasm"}]),onClick:o[1]||(o[1]=l=>V("spasm"))}," Spasm ",2),t(d)?(r(),a("span",{key:0,class:D(["cursor-pointer text-colorNotImportant-light dark:text-colorNotImportant-dark",{"text-colorPrimary-light dark:text-colorPrimary-dark":t(_)==="nostr"}]),onClick:o[2]||(o[2]=l=>V("nostr"))}," Nostr ",2)):n("",!0)]),s("div",{class:"cursor-pointer text-colorNotImportant-light dark:text-colorNotImportant-dark mb-4 hover:text-colorPrimary-light dark:hover:text-colorPrimary-dark",onClick:o[3]||(o[3]=l=>nt())},u(t(S))+" details ",1),t(_)==="spasm"?(r(),a("div",so,[o[19]||(o[19]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"}," Spasm network: ",-1)),t(L)(t(g))?(r(),a("div",ro,[(r(!0),a(M,null,F(t(g),l=>{var h,y;return r(),m(O,{key:(y=(h=l.ids)==null?void 0:h[0])==null?void 0:y.value,comment:l,"show-comments-count":!1,"show-action-details":t(N)},null,8,["comment","show-action-details"])}),128))])):n("",!0)])):n("",!0),t(_)==="nostr"?(r(),a("div",ao,[t(B)(t(e))&&t(X)(t(B)(t(e)))?(r(),a("div",no,[o[20]||(o[20]=s("div",{class:"text-colorNotImportant-light dark:text-colorNotImportant-dark"}," Nostr network: ",-1)),s("span",lo,[(r(!0),a(M,null,F(t(pt).convertManyToSpasm(t(B)(t(e))),l=>{var h,y;return r(),m(O,{key:((y=(h=l==null?void 0:l.ids)==null?void 0:h[0])==null?void 0:y.value)||t(W)(),comment:l,"show-action-details":t(N),"show-comments-count":!1},null,8,["comment","show-action-details"])}),128))])])):n("",!0)])):n("",!0)]),s("div",{class:"w-32 mt-1 mb-16 cursor-pointer text-colorNotImportant-light dark:text-colorNotImportant-dark",onClick:o[4]||(o[4]=l=>G())}," Scroll to top ")]),_:1})])}}});export{ho as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.