"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[70438],{79666:function(e,n,t){t.d(n,{O:function(){return h}});var l=t(26607),a=t(25881),i=t(34416),s=t(37891),o=t(47465),r=t(89680),c=t(11412),d=t(44209),u=t(55650),m=t(42955),x=t(19314);let h=e=>{var n,t,h,f,p,v,g,j,N,b;let{siteId:w,address:y,open:C,setButtonLoading:k,hideFollowButton:z,simple:O,style:I}=e,F=(0,d.Y)(),L=(0,a.useTranslations)(),{data:M}=(0,x.n1)({siteId:w,address:y,enabled:C||!1});return(0,l.jsx)("span",{className:(0,m.cn)("border-border border rounded-lg text-sm block cursor-default","flat"===I?"":"p-4 bg-white shadow-xl",O?"space-y-1":"space-y-2"),onClick:e=>{e.preventDefault(),e.stopPropagation()},children:M?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("span",{className:"flex items-center justify-between",children:[(0,l.jsx)(r.q,{cid:null==M?void 0:M.characterId,images:(null==M?void 0:null===(t=M.metadata)||void 0===t?void 0:null===(n=t.content)||void 0===n?void 0:n.avatars)||[],name:null==M?void 0:null===(f=M.metadata)||void 0===f?void 0:null===(h=f.content)||void 0===h?void 0:h.name,size:45}),!z&&(0,l.jsx)(i.FollowingButton,{site:M,size:"sm",loadingStatusChange:e=>null==k?void 0:k(e)})]}),(0,l.jsxs)("span",{className:"flex items-center space-x-1",children:[(0,l.jsx)("span",{className:"font-bold text-base text-zinc-800 cursor-pointer hover:underline",onClick:e=>{e.preventDefault(),window.open("".concat((0,u.Oi)({subdomain:w||""})))},children:null==M?void 0:null===(v=M.metadata)||void 0===v?void 0:null===(p=v.content)||void 0===p?void 0:p.name}),(0,l.jsx)(o.K,{characterId:+((null==M?void 0:M.characterId)||"")}),(0,l.jsxs)("span",{className:"text-gray-600",children:["@",null==M?void 0:M.handle]})]}),(null==M?void 0:null===(j=M.metadata)||void 0===j?void 0:null===(g=j.content)||void 0===g?void 0:g.bio)&&(0,l.jsx)("span",{className:"text-gray-600 line-clamp-4",children:null==M?void 0:null===(b=M.metadata)||void 0===b?void 0:null===(N=b.content)||void 0===N?void 0:N.bio}),!O&&(0,l.jsx)("span",{className:"block",children:(0,l.jsx)(s.FollowingCount,{characterId:M.characterId,disableList:!0})}),!O&&(null==M?void 0:M.createdAt)&&(0,l.jsx)("span",{className:"block text-gray-500",children:(0,l.jsx)("time",{dateTime:F.formatToISO(M.createdAt),children:L("joined ago",{time:F.dayjs.duration(F.dayjs(M.createdAt).diff(F.dayjs(),"minute"),"minute").humanize()})})})]}):(0,l.jsxs)(c.O.Container,{className:(0,m.cn)(O?"space-y-1":"space-y-2"),children:[(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(c.O.Circle,{size:40}),(0,l.jsx)(c.O.Rectangle,{className:"h-7 w-24"})]}),(0,l.jsx)(c.O.Rectangle,{className:"w-2/3"}),(0,l.jsx)(c.O.Rectangle,{className:"my-4 w-full h-16"}),(0,l.jsx)(c.O.Rectangle,{className:"w-1/2"})]})})}},89607:function(e,n,t){t.d(n,{CharacterFloatCard:function(){return m}});var l=t(26607),a=t(72846),i=t(75367),s=t(26360),o=t(33526),r=t(20200),c=t(33254),d=t(79666),u=t(54716);let m=e=>{let{siteId:n,children:t}=e,[m,x]=(0,s.useState)(!1),{floatingStyles:h,refs:f,context:p}=(0,o.YF)({placement:"bottom-start",open:m,onOpenChange:x,middleware:[(0,r.cv)(5),(0,r.RR)(),(0,r.uY)({padding:8})],whileElementsMounted:c.Me,strategy:"fixed",transform:!1}),{getReferenceProps:v,getFloatingProps:g}=(0,o.NI)([(0,o.XI)(p,{delay:{close:200,open:200}}),(0,o.qs)(p,{role:"tooltip"}),(0,o.bQ)(p)]),[j,N]=(0,s.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"inline-block",ref:f.setReference,...v(),children:t}),(0,l.jsx)(a.M,{children:m&&(0,l.jsx)(u.h_,{children:(0,l.jsx)(i.m.span,{ref:f.setFloating,className:"z-10 block w-80"+(m||j?"":" hidden"),style:h,...g(),initial:{translateY:"10px",opacity:0},animate:{translateY:"0px",opacity:1},exit:{translateY:"10px",opacity:0},children:(0,l.jsx)(d.O,{siteId:n,open:m,setButtonLoading:N})})})})]})}},80077:function(e,n,t){t.d(n,{p:function(){return N}});var l=t(26607),a=t(25881),i=t(26360),s=t(63574),o=t(10071),r=t(43702),c=t(89607),d=t(22006),u=t(80497),m=t(55650),x=t(86955),h=t(89680),f=t(11654),p=t(34416),v=(0,i.memo)(e=>{var n,t,a,i,s,o,r;let{character:v,sub:g}=e;return(0,l.jsxs)("div",{className:"py-3 flex items-center justify-between space-x-2 text-sm px-5",children:[(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden space-x-2",children:[(0,l.jsxs)(f.b,{href:(0,m.Oi)({subdomain:null==v?void 0:v.handle}),className:"flex items-center space-x-2 text-sm min-w-0",children:[(0,l.jsx)(c.CharacterFloatCard,{siteId:null==v?void 0:v.handle,children:(0,l.jsx)(h.q,{cid:null==v?void 0:v.characterId,className:"align-middle border-2 border-white",images:(null==v?void 0:null===(t=v.metadata)||void 0===t?void 0:null===(n=t.content)||void 0===n?void 0:n.avatars)||x.t,name:(null==v?void 0:null===(i=v.metadata)||void 0===i?void 0:null===(a=i.content)||void 0===a?void 0:a.name)||(null==v?void 0:v.handle),size:40})}),(0,l.jsx)("span",{children:null==v?void 0:null===(o=v.metadata)||void 0===o?void 0:null===(s=o.content)||void 0===s?void 0:s.name}),(0,l.jsxs)("span",{className:"text-zinc-400 truncate",children:["@",null==v?void 0:v.handle]})]}),(0,l.jsx)(f.b,{href:u.e2+"/tx/"+((null===(r=g.metadata)||void 0===r?void 0:r.proof)||g.transactionHash),className:"flex items-center",children:(0,l.jsx)(d.E,{})})]}),(0,l.jsx)(p.FollowingButton,{site:v,size:"sm"})]})}),g=t(78164),j=t(54716);let N=e=>{let{open:n,setOpen:t,hasMore:c,loadMore:d,list:u,title:m}=e,x=(0,a.useTranslations)(),h=null==u?void 0:u.reduce((e,n)=>e.concat((null==n?void 0:n.list)||[]),[]),[f,p]=(0,i.useState)(),N=(0,i.useCallback)(e=>{null!==e&&p(e)},[]);return(0,l.jsxs)(o.u,{open:n,setOpen:t,title:m,zIndex:20,ref:N,children:[(null==u?void 0:u.length)?(0,l.jsx)(j.Xp,{to:f,children:(0,l.jsx)(s.OO,{overscan:10,style:{height:64*h.length},fixedItemHeight:64,className:"max-h-screen",endReached:()=>c&&d(),components:{Footer:c?g.g:void 0},data:h,itemContent:(e,n)=>{let t=(null==n?void 0:n.character)||(null==n?void 0:n.fromCharacter)||(null==n?void 0:n.toCharacter);return(0,l.jsx)(v,{sub:n,character:t},e)}})}):(0,l.jsx)("div",{className:"px-5 overflow-auto flex-1",children:(0,l.jsx)("div",{className:"py-3 text-center text-zinc-300",children:x("No Content Yet")})}),(0,l.jsx)("div",{className:"h-16 border-t flex items-center px-5 py-4",children:(0,l.jsx)(r.Button,{isBlock:!0,onClick:()=>t(!1),children:x("Close")})})]})}},34416:function(e,n,t){t.d(n,{FollowingButton:function(){return m}});var l=t(26607),a=t(25881),i=t(26360),s=t(28492),o=t(43702),r=t(11654),c=t(80497),d=t(42955),u=t(19314);let m=e=>{let{site:n,variant:t,className:m,size:x,loadingStatusChange:h}=e,f=(0,u.Lz)(),p=(0,u.I8)(),v=(0,a.useTranslations)(),g=(0,u.KX)(null==n?void 0:n.characterId);(0,i.useEffect)(()=>{f.isError&&f.reset()},[f]),(0,i.useEffect)(()=>{f.isSuccess&&(f.reset(),s.toast.success((0,l.jsx)("span",{children:v.rich("Successfully followed",{link:e=>(0,l.jsx)(r.b,{className:"underline",href:"".concat(c._O,"/"),children:e})})}),{duration:5e3}))},[f,v]),(0,i.useEffect)(()=>{p.isLoading||f.isLoading?null==h||h(!0):null==h||h(!1)},[p.isLoading,f.isLoading,h]);let j=g.data?p.isLoading||f.isLoading:p.isLoading||f.isLoading||g.isLoading;return(0,l.jsx)(o.Button,{variant:g.data?"text":t,onClick:()=>{(null==n?void 0:n.characterId)&&(g.data?p.mutate({characterId:null==n?void 0:n.characterId,siteId:null==n?void 0:n.handle}):f.mutate({characterId:null==n?void 0:n.characterId,siteId:null==n?void 0:n.handle}))},className:(0,d.cn)(m,"align-middle group border-accent border text-sm sm:text-base",{"text-accent":g.data,"opacity-60":g.data}),isLoading:j,size:x,"aria-label":"follow",isAutoWidth:!0,children:g.data?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("span",{className:"group-hover:hidden inline-flex items-center",children:[(0,l.jsx)("span",{className:"i-mingcute-user-follow-fill inline-block sm:mr-2"})," ",(0,l.jsx)("span",{className:"hidden sm:inline",children:v("Following")})]}),(0,l.jsxs)("span",{className:"hidden group-hover:inline-flex items-center",children:[(0,l.jsx)("span",{className:"i-mingcute-user-remove-fill inline-block sm:mr-2"})," ",(0,l.jsx)("span",{className:"hidden sm:inline",children:v("Unfollow")})]})]}):(0,l.jsxs)("span",{className:"inline-flex items-center",children:[!j&&(0,l.jsx)("span",{className:"i-mingcute-user-add-fill inline-block sm:mr-2"})," ",(0,l.jsx)("span",{className:"hidden sm:inline",children:v("Follow")})]})})}},37891:function(e,n,t){t.d(n,{FollowingCount:function(){return c}});var l=t(26607),a=t(25881),i=t(26360),s=t(80077),o=t(43702),r=t(19314);let c=e=>{var n,t,c,d,u,m,x,h;let{characterId:f,disableList:p}=e,[v,g]=(0,i.useState)(!1),[j,N]=(0,i.useState)(!1),b=(0,a.useTranslations)(),w=(0,r.ZB)({characterId:f}),y=(0,r.BC)({characterId:f});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Button,{variant:"text",className:"xlog-site-followers align-middle text-zinc-500 -ml-3"+(p?"":" cursor-pointer"),onClick:()=>g(!0),children:[(0,l.jsx)("span",{className:"font-medium text-zinc-700 pr-[3px]",children:(null===(c=w.data)||void 0===c?void 0:null===(t=c.pages)||void 0===t?void 0:null===(n=t[0])||void 0===n?void 0:n.count)||0})," ",b("Followers")]}),(0,l.jsxs)(o.Button,{variant:"text",className:"xlog-site-followings align-middle text-zinc-500 sm:ml-3 !hidden sm:!inline-flex"+(p?"":" cursor-pointer"),onClick:()=>N(!0),children:[(0,l.jsx)("span",{className:"font-medium text-zinc-700 pr-[2px]",children:(null===(m=y.data)||void 0===m?void 0:null===(u=m.pages)||void 0===u?void 0:null===(d=u[0])||void 0===d?void 0:d.count)||0})," ",b("Followings")]}),!p&&(0,l.jsx)(s.p,{open:v,setOpen:g,title:b("Followers"),loadMore:w.fetchNextPage,hasMore:!!w.hasNextPage,list:null===(x=w.data)||void 0===x?void 0:x.pages}),!p&&(0,l.jsx)(s.p,{open:j,setOpen:N,title:b("Followings"),loadMore:y.fetchNextPage,hasMore:!!y.hasNextPage,list:null===(h=y.data)||void 0===h?void 0:h.pages})]})}},78164:function(e,n,t){t.d(n,{g:function(){return s}});var l=t(26607),a=t(25881),i=t(42955);let s=e=>{let{className:n}=e,t=(0,a.useTranslations)();return(0,l.jsxs)("div",{className:(0,i.cn)("flex gap-2 justify-center items-center w-full my-6",n),children:[(0,l.jsx)("div",{className:"i-mingcute-loading-3-fill animate-spin text-xl"}),t("Loading"),"..."]})}},54716:function(e,n,t){t.d(n,{Xp:function(){return d},h_:function(){return u}});var l=t(26607),a=t(26360),i=t(40577),s=t(3061),o=t(42955);let r=()=>{let e=(0,a.useContext)(c);return(0,o.s$)()?null:e.to||document.body},c=(0,a.createContext)({to:void 0}),d=e=>(0,l.jsx)(c.Provider,{value:(0,a.useMemo)(()=>({to:e.to}),[e.to]),children:e.children}),u=e=>{let n=(0,s.O)(),t=r();return n?(0,i.createPortal)(e.children,e.to||t||document.body):null}},47465:function(e,n,t){t.d(n,{K:function(){return r}});var l=t(26607),a=t(42955),i=JSON.parse('[{"name":"xLog contributor","link":"https://github.com/Crossbell-Box/xLog/graphs/contributors","list":[10,30,12,45,19,4583,4381,33446,33492,52055,153,50143,51470,31132,45089,50351,52343,5825,51406,53864,43086,47393,54315,50131,54939,55096,55081,45828,4565,50088,55399,52323,55960,51512,56881,51657,40943,54435,59587,56763,57760,61063,61009,52450,63448,70271]},{"name":"Organization","list":[32022,32085,55832,31672,53710,32179,32168]}]'),s=t(99e3);let o={"xLog contributor":{bg:"bg-zinc-700 text-white",icon:"i-mingcute-terminal-line"},Organization:{bg:"bg-sky-700 text-white",icon:"i-mingcute-building-1-line"}},r=e=>{let{characterId:n}=e;if(!n)return null;let t=i.filter(e=>e.list.includes(n));return t.length?(0,l.jsx)("span",{className:"inline-flex",children:t.map(e=>(0,l.jsx)(s.Tooltip,{label:e.name,childrenClassName:(0,a.cn)(o[e.name].bg,"inline-flex p-px rounded-sm"),children:(0,l.jsx)("span",{onClick:n=>{n.preventDefault(),window.open(e.link)},className:"inline-flex",children:(0,l.jsx)("span",{className:"text-white",children:(0,l.jsx)("i",{className:(0,a.cn)(o[e.name].icon,"text-[10px] block")})})})},e.name))}):null}},22006:function(e,n,t){t.d(n,{E:function(){return i}});var l=t(26607);t(26360);var a=t(42955);let i=e=>{let{className:n}=e;return(0,l.jsx)("span",{className:(0,a.cn)(n,"xlog-site-blockchain-icon text-green-600 inline-flex items-center"),children:(0,l.jsx)("i",{className:"i-mingcute-safety-certificate-line text-lg max-w-full max-h-full inline-block"})})}},89680:function(e,n,t){t.d(n,{q:function(){return c}});var l=t(26607),a=t(26360),i=t(64832),s=t(55650),o=t(55012),r=t(42955);let c=e=>{let{cid:n,images:t,size:c,name:d,className:u,rounded:m,imageRef:x,priority:h,...f}=e;c=c||60;let p=(0,a.useMemo)(()=>{for(let e of t)if(e)return(0,o.Qh)(e)},[t]);return p||(p=(0,s.fz)(n||"")),(0,l.jsx)("span",{...f,className:(0,r.cn)("inline-flex text-zinc-500 shrink-0 items-center justify-center font-medium uppercase overflow-hidden text-[0px] max-w-full max-h-full",!1===m?"rounded-lg":"rounded-full",u),style:{width:"".concat(c,"px"),height:"".concat(c,"px")},children:(0,l.jsx)(i.Image,{className:"h-full overflow-hidden object-cover",src:p,width:c,height:c,alt:d||"",imageRef:x,priority:h})})}},10071:function(e,n,t){t.d(n,{u:function(){return x}});var l=t(26607),a=t(11877),i=t(59375),s=t(72846),o=t(75367),r=t(25881),c=t(26360),d=t(67771),u=t(42955),m=t(43702);let x=(0,c.forwardRef)((e,n)=>{let{open:t,setOpen:c,children:x,title:h,titleIcon:f,size:p="md",zIndex:v,panelClassName:g,boxClassName:j,afterLeave:N,withConfirm:b}=e,w=(0,r.useTranslations)(),y=(0,a.c)(0);return(0,i.W)(y,"animationComplete",()=>{console.log("animation Complete on x"),null==N||N()}),(0,l.jsx)(s.M,{children:t&&(0,l.jsxs)(d.V,{open:t,onClose:()=>c(!1),className:"relative",style:{zIndex:v||10},children:[(0,l.jsx)(o.m.div,{className:"fixed inset-0 bg-black/25 z-40","aria-hidden":!0,style:{x:y},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),(0,l.jsx)(o.m.div,{className:(0,u.cn)("fixed inset-0 flex items-center justify-center p-8 z-40",j),ref:n,initial:{opacity:0,scale:1.1},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.1},children:(0,l.jsxs)(d.V.Panel,{className:(0,u.cn)("mx-auto rounded-lg bg-white w-full shadow-modal max-h-full flex flex-col","md"===p?"max-w-md":"lg"===p?"max-w-lg":"max-w-sm",g),children:[h&&(0,l.jsxs)(d.V.Title,{className:"text-lg border-b h-14 flex items-center px-5 space-x-2 py-4 relative",children:[f&&(0,l.jsx)("span",{children:f}),(0,l.jsx)("span",{className:"truncate flex items-center w-full",children:h}),(0,l.jsx)("span",{className:"absolute right-4 size-7 text-xl cursor-pointer bg-white flex items-center justify-center",onClick:()=>c(!1),children:(0,l.jsx)("i",{className:"i-mingcute-close-line inline-block"})})]}),x,b&&(0,l.jsx)(m.Button,{className:"mb-5 mx-auto",onClick:()=>c(!1),children:w("Confirm")})]})})]})})});x.displayName="Modal"},11412:function(e,n,t){t.d(n,{O:function(){return r}});var l=t(26607),a=t(25881),i=t(26360),s=t(42955);function o(e){if(e)return"number"==typeof e?"".concat(e,"px"):e}function r(e){let{className:n,width:t,height:a}=e,r=(0,i.useMemo)(()=>{let e={},n=[];return t?e.width=o(t):n.push("w-full"),a?e.height=o(a):n.push("h-4"),{style:e,className:n.join(" ")}},[t,a]);return(0,l.jsx)("div",{className:(0,s.cn)("bg-gray-200 dark:bg-gray-700",r.className,n),style:r.style})}r.Container=function(e){let{count:n=1,className:t,children:o}=e,r=(0,a.useTranslations)(),c=i.Children.toArray(o);return(0,l.jsxs)("div",{role:"status",className:(0,s.cn)("animate-pulse",t),children:[Array.from(Array(n)).map((e,n)=>(0,l.jsx)(i.Fragment,{children:c.map((e,t)=>i.cloneElement(e,{key:"child-".concat(n,"-").concat(t)}))},n)),(0,l.jsxs)("span",{className:"sr-only",children:[r("Loading"),"..."]})]})},r.Circle=function(e){let{size:n=40,className:t}=e;return(0,l.jsx)(r,{className:(0,s.cn)("rounded-full",t),width:n,height:n})},r.Rectangle=function(e){let{className:n}=e;return(0,l.jsx)(r,{className:(0,s.cn)("rounded",n)})}},99e3:function(e,n,t){t.d(n,{Tooltip:function(){return m}});var l=t(26607),a=t(72846),i=t(75367),s=t(26360),o=t(40577),r=t(33526),c=t(20200),d=t(33254),u=t(42955);let m=e=>{let{children:n,label:t,placement:m="top",className:x,childrenClassName:h,inline:f,debug:p}=e,[v,g]=(0,s.useState)(!1),[j,N]=(0,s.useState)(),{floatingStyles:b,refs:w,context:y}=(0,r.YF)({placement:m,open:v,onOpenChange:g,middleware:[(0,c.cv)(5),(0,c.RR)(),(0,c.uY)({padding:8}),(0,c.dp)({apply(e){let{availableHeight:n}=e;(0,o.flushSync)(()=>N(n?n-20:void 0))}})],whileElementsMounted:d.Me,transform:!1}),{getReferenceProps:C,getFloatingProps:k}=(0,r.NI)([(0,r.XI)(y),(0,r.KK)(y),(0,r.qs)(y,{role:"tooltip"}),(0,r.bQ)(y)]),z=(0,s.useCallback)(()=>{p||g(!1)},[p]),O=(0,s.useCallback)(()=>{g(!0)},[g]),I=(0,s.useMemo)(()=>({onMouseOver:O,onMouseOut:z}),[z,O]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:w.setReference,...C(),className:(0,u.cn)("items-center",f?"inline-flex":"flex",h),children:n}),(0,l.jsx)(a.M,{children:v&&(0,l.jsx)(i.m.div,{ref:w.setFloating,style:{...b,maxHeight:j},className:(0,u.cn)("bg-zinc-600 text-white rounded-lg shadow-lg px-3 py-1 whitespace-nowrap","overflow-auto",x),initial:{translateY:"10px",opacity:0},animate:{translateY:"0px",opacity:1},exit:{translateY:"10px",opacity:0},...I,...k(),children:t})})]})}},11654:function(e,n,t){t.d(n,{b:function(){return i}});var l=t(26607),a=t(50302);let i=e=>{let{href:n,onClick:t,children:i,className:s,target:o,...r}=e;if(t)return(0,l.jsx)("button",{className:s,onClick:t,...r,children:i});if(!n)return(0,l.jsx)("span",{className:s,...r,children:i});let c=n&&(/^https?:\/\//.test(n)||n.startsWith("/feed"))||n.startsWith("mailto:"),d=window.location.pathname.startsWith("/post/");return c||d?(0,l.jsx)("a",{...r,className:s,href:n,target:"_blank",rel:"nofollow noreferrer",children:i}):(0,l.jsx)(a.default,{href:n,className:s,target:o,children:i})}},3061:function(e,n,t){t.d(n,{O:function(){return a}});var l=t(26360);let a=()=>{let[e,n]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{n(!0)},[]),e}},86955:function(e,n,t){t.d(n,{t:function(){return l}});let l=[]}}]);
//# sourceMappingURL=70438-953756f43257f3c8.js.map