PageSourceSearch

https://mychar.gg/_nuxt/BffJcVBF.js

js mychar.gg collected 2026-10-08 16:05:55 UTC 16,643 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./KF3k6u8j.js","./CZO_kbxe.js","./entry.DzLCVlfi.css","./B7mq1myY.js","./DMHyAxDi.js","./C0Y8bhHj.js","./BLSlZQSW.js","./jFYhBC76.js","./C5vBVshv.js","./DHC8vXKX.js","./DOpTqvrU.js","./xjUG_ukY.js","./wxz5ECD-.js","./DL1TxsSW.js","./BGGUAEei.js","./aluA_p2L.js","./C1R5UMyj.js","./CnuyoUM-.js","./zk7Xu1IT.js","./BkAO2GJc.js","./zhuQ2a0f.js","./IQFnGRXb.js","./BrMP8K-A.js","./BsYNGjCW.js"])))=>i.map(i=>d[i]);
2import{a9 as xe,br as Be,$ as U,aT as h,W as r,aV as o,V as p,aK as u,bj as ke,bn as G,X as e,bk as Oe,aD as _,aU as Me,bm as we,y as Ve,cZ as Re,R as Ne,o as he,an as fe,aJ as ve,bs as Fe,Q as l,S as ge,h as Ge,H as He,I as Ye,bf as qe,bg as We,c_ as Ke,U as g,bl as be,bI as Xe,by as Je,aA as H,_ as Y}from"./CZO_kbxe.js";import{u as $e,h as Qe,i as Ze,j as et,g as tt}from"./aluA_p2L.js";import{c as at,s as _e,_ as st,G as nt,S as it,C as rt,D as ye}from"./Du8kECcR.js";import{u as ot}from"./DxB0dLML.js";import{u as lt}from"./BTNIAS7f.js";import{u as ct}from"./C1R5UMyj.js";import{u as ut}from"./ypKRG4bd.js";import{d as dt}from"./Cht9lt0w.js";const mt={class:"min-h-screen flex items-center justify-center p-6"}
2,pt={class:"w-full max-w-md space-y-6"},ht={class:"text-center space-y-3"},ft={class:"mx-auto flex items-center justify-center size-16 rounded-full bg-red-500/10"},vt={key:0,class:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 space-y-3"},gt={class:"flex items-center gap-2"},bt={class:"text-sm text-white/80"},_t={class:"text-xs text-white/40"},yt={key:1,class:"space-y-3"},xt={class:"flex justify-center"},kt={key:2,class:"rounded-xl border border-amber-500/20 bg-amber-500/5 p-4 space-y-2"},wt={class:"flex items-center gap-2"},$t={class:"text-xs text-white/50"},St={class:"text-center"},Ct=xe({__name:"CharacterBlockedOwnerView",props:{character:{}},emits:["appeal-submitted"],setup(d,{emit:z}){const E=z,L=$e(),S=Be(),C=U(!1);function x(a){return new Date(a).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}async function M(){C.value=!0;const a=await L.submitAppeal();C.value=!1,a?(S.add({title:"Appeal submitted",description:"Your appeal has been submitted for review.",icon:"i-lucide-check",color:"success",duration:3e3}),E("appeal-submitted")):S.add({title:"Error",description:L.error||"Failed to submit appeal",icon:"i-lucide-x",color:"error"})}return(a,s)=>{const k=ke,w=Oe,j=we;return r(),h("div",mt,[o("div",pt,[o("div",ht,[o("div",ft,[u(k,{name:"i-lucide-shield-alert",class:"size-8 text-red-400"})]),s[0]||(s[0]=o("h1",{class:"text-2xl font-bold text-white"}," Page Blocked ",-1)),s[1]||(s[1]=o("p",{class:"text-sm text-white/50"}," Your character page has been blocked by an administrator. ",-1))]),d.character.block?(r(),h("div",vt,[o("div",gt,[u(k,{name:"i-lucide-message-circle",class:"size-4 text-red-400 shrink-0"}),s[2]||(s[2]=o("span",{class:"text-xs font-medium text-red-300 uppercase tracking-wider"},"Reason",-1))]),o("p",bt,G(d.character.block.reason),1),o("p",_t," Blocked on "+G(x(d.character.block.blocked_at)),1)])):p("",!0),d.character.block&&!d.character.block.appeal_submitted_at?(r(),h("div",yt,[s[3]||(s[3]=o("p",{class:"text-sm text-white/50 text-center"}," If you believe this was a mistake or have made changes, you can submit an appeal. ",-1)),o("div",xt,[u(w,{label:"Submit Appeal",icon:"i-lucide-send",color:"primary",loading:e(C),onClick:M},null,8,["loading"])])])):d.character.block?.appeal_submitted_at?(r(),h("div",kt,[o("div",wt,[u(k,{name:"i-lucide-clock",class:"size-4 text-amber-400 shrink-0"}),s[4]||(s[4]=o("span",{class:"text-sm font-medium text-amber-300"},"Appeal Pending",-1))]),o("p",$t," Your appeal was submitted on "+G(x(d.character.block.appeal_submitted_at))+". An administrator will review it soon. ",1)])):p("",!0),o("div",St,[u(j,{to:"/customize",class:"text-sm text-primary-400 hover:text-primary-300 transition-colors"},{default:_(()=>[...s[5]||(s[5]=[Me(" Go to customization settings ",-1)])]),_:1})])])])}}}),Tt=Object.assign(Ct,{__name:"CharacterBlockedOwnerView"});function It(d){return d?d.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/\s+/g," ").trim():""}function zt(d){return d.hasAvatar?It(d.bio).length>=40||d.linkCount>=2:!1}const At={key:0,class:"flex items-center justify-center min-h-dvh"},Dt={key:1,class:"flex items-center justify-center min-h-dvh"},Ut={class:"text-center space-y-4"},Et={class:"mx-auto flex items-center justify-center size-16 rounded-full bg-white/5"},Lt=["disabled"],jt={key:0,class:"hidden sm:flex fixed right-3 top-1/2 -translate-y-1/2 z-50 flex-col gap-2"},Pt=["disabled"],Bt=xe({__name:"CharacterPageView",props:{username:{}},async setup(d){let z,E;const L={default:ye,compact:rt,split:it,grid:nt},S=d,C=Ve(),{isCustomDomain:x,customDomain:M}=Re(),{character:a,settings:s,audioPlaylist:k,links:w,achievements:j,clips:q,setupItems:W,friends:Se,isLoading:Ce,error:Te,refresh:K,asyncData:Ie,viewer:X}=lt(S.username);if([z,E]=Ne(()=>Ie),await z,E(),Te.value)throw he({statusCode:404,statusMessage:"Character not found",data:{username:S.username}});if(a.value?.block&&!X.value.is_owner&&!X.value.is_staff)throw he({statusCode:410,statusMessage:"This page is no longer available"});const J=ot(),Q=ct();let $=null;fe(async()=>
2{a.value&&m.character?.id===a.value.id&&await K(),a.value&&(await J.fetchGames(a.value.id),$fetch(`/api/character/${a.value.id}/view`,{method:"POST",body:{referrer:C.query.ref||C.query.utm_source||document.referrer||(x.value?window.location.hostname:null),sessionId:at()}}).catch(()=>{}),$=Q.channel(`visitors:${a.value.id}`),$.subscribe(async t=>{t==="SUBSCRIBED"&&$&&await $.track({online_at:new Date().toISOString()})}),ze())}),ve(()=>{$&&(Q.removeChannel($),$=null)});const m=$e(),V=Fe(),c=l(()=>!m.userId||!a.value?!1:m.userId===a.value.id),A=l(()=>m.isStaff),P=l(()=>!!a.value?.block),Z=l(()=>zt({hasAvatar:!!s.value?.avatar_url,bio:s.value?.bio,linkCount:w.value.length}));ut(l(()=>P.value?"noindex, nofollow":Z.value?"index, follow":"noindex, follow"));async function ee(){if(!a.value)return;const t=H(()=>Y(()=>import("./KF3k6u8j.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url));await V.create(t).open({userId:a.value.id}).result}async function te(){if(!a.value)return;const t=H(()=>Y(()=>import("./BkAO2GJc.js"),__vite__mapDeps([19,1,2,12,13,14,9]),import.meta.url));V.create(t,{props:{username:a.value.username}}).open()}async function ae(){if(!a.value)return;const t=H(()=>Y(()=>import("./zhuQ2a0f.js"),__vite__mapDeps([20,1,2,5,6,7,21,22,23,9,12,13,14]),import.meta.url));await V.create(t).open({characterId:a.value.id,username:a.value.username}).result}const b=U("none"),R=U(null),T=U(!1);async function ze(){if(!(!m.userId||!a.value||c.value))try{const t=await $fetch(`/api/character/${m.userId}/friend/status`,{params:{target:a.value.id}});b.value=t.status,R.value=t.friendship_id}catch{}}async function se(){if(!(!m.userId||!a.value)){T.value=!0;try{if(b.value==="none"){const t=await $fetch(`/api/character/${m.userId}/friend`,{method:"POST",body:{username:a.value.username}});b.value="pending_sent",R.value=t.friendship_id}else b.value==="pending_received"&&(await $fetch(`/api/character/${m.userId}/friend/${R.value}`,{method:"PUT"}),b.value="accepted")}catch{}finally{T.value=!1}}}const Ae=l(()=>{switch(b.value){case"none":return"Add Friend";case"pending_sent":return"Pending";case"pending_received":return"Accept";case"accepted":return"Friends";default:return"Add Friend"}}),ne=l(()=>{switch(b.value){case"none":return"i-lucide-user-plus";case"pending_sent":return"i-lucide-clock";case"pending_received":return"i-lucide-check";case"accepted":return"i-lucide-users";default:return"i-lucide-user-plus"}}),ie=l(()=>s.value?.text??{...et}),re=l(()=>s.value?.background??{...Ze}),oe=l(()=>s.value?.audio??{...Qe}),B=l(()=>s.value?.theme??{...tt}),De=l(()=>{const t=s.value?.layout??"default";return L[t]||ye}),N=U(a.value?`@${a.value.username}`:"");let y=null;function le(){if(!a.value)return;const t=`@${a.value.username}`;let i=0,n=1;function f(){i+=n,N.value=t.slice(0,i),i>=t.length?(n=-1,y=setTimeout(f,2e3)):i<=0?(n=1,y=setTimeout(f,500)):y=setTimeout(f,250)}N.value="",y=setTimeout(f,400)}function Ue(){y&&(clearTimeout(y),y=null)}const Ee=x.value?" - mychar.gg":"";ge(N,t=>{{const i=t||(a.value?`@${a.value.username}`:"Character");document.title=i+Ee}}),fe(()=>{le()}),ge(a,t=>{t&&!y&&le()}),ve(()=>{Ue()});const ce=l(()=>{const t=[w.value.length?"links":"",q.value.length?"clips":"",k.value.length?"music":"",W.value.length?"setup":""].filter(Boolean).slice(0,3);return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")}${t.length>2?",":""} and ${t.at(-1)}`}),ue=t=>[...t].length,de=(t,i)=>{const n=[...t];return n.length<=i?t:`${n.slice(0,i-1).join("").replace(/\s+\S*$/,"").trimEnd()}…`},F=l(()=>{const t=a.value?.username,n=`See ${t?`@${t}`:"this"}'s ${ce.value||"links"} on mychar.gg, the highly customizable link in bio.`,f=" Make your own page in a live drag-and-drop editor, free to start.",v=_e(s.value?.bio||"").replace(/[─-▟⠀-⣿]/g," ").replace(/\s+/g," ").trim(),D=(v.match(new RegExp("\\p{L}","gu"))?.length??0)>=3;return D&&ue(v)>=120?de(v,160):(D?[`${v} · ${n}${f}`,`${v} · ${n} Make your own page, free to start.`,`${v} · ${n}`,`${v} · More on mychar.gg, the highly customizable link in bio.`,`${v} · See more on mychar.gg.`]:[`${n}${f}`,n]).find(pe=>ue(pe)<=160)??de(D?v:n,160)}),Le=Ge().public.siteUrl,O=l(()=>{const t=a.value?.customDomain||(x.value?M.value:null);return t?`https://${t}/`:`${Le}/${S.username}`});He({link:[{key:"canonical",rel:"canonical",href:()=>O.value}]});const je=l(()=>{const t=a.value?.username;if(!t)return"Character";const i=s.value?.display_name;return i?`${i} (@${t})`:`@${t}`}),Pe=l(()=>{const t=je.value;if(x.value)return`${t} - mychar.gg`;const i=ce.value,n=!i||i==="links"?"Link in bio":i.charAt(0).toUpperCase()+i.slice(1),f=`${t} | ${n} on mychar.gg`;return f.length<=62?f:`${t} | mychar.gg`});Ye({title:()=>Pe.value,titleTemplate:t=>t||"mychar.gg",ogTitle:()=>s.value?.display_name||`@${a.value?.username}`,description:()=>F.value,ogDescription:()=>F.value,ogUrl:()=>O.value,twitterCard:"summary_large_image"});const me=l(()=>w.value.filter(t=>t.is_url&&t.value).map(t=>t.value.startsWith("http")?t.value:`${t.link?.prefix||"https://"}${t.value}`));if(a.value&&!P.value&&Z.value){const t=`${O.value}#person`;qe([We({"@type":"ProfilePage",mainEntity:{"@id":t}}),Ke({"@id":t,name:s.value?.display_name||a.value.username,alternateName:`@${a.value.username}`,url:O.value,image:s.value?.avatar_url||void 0,description:F.value,sameAs:me.value.length?me.value:void 0})])}return dt("Character",{name:s.value?.display_name||`@${a.value?.username}`,username:a.value?.username||"",description:_e(s.value?.bio||""),avatarUrl:s.value?.avatar_url||"",backgroundUrl:s.value?.background_url||"",primaryColor:B.value.primaryColor,avatarShape:B.value.avatarShape,location:s.value?.location||"",pronouns:s.value?.pronouns||"",linkIcons:w.value.slice(0,6).map(t=>({icon:t.link.icon,color:t.link.icon_color})),achievementIcons:j.value.filter(t=>t.is_displayed).slice(0,5).map(t=>
2({icon:t.achievement.icon,color:t.achievement.icon_color}))}),(t,i)=>{const n=ke,f=Tt,v=we,D=st,I=Xe;return r(),h("div",null,[e(Ce)?(r(),h("div",At,[u(n,{name:"i-lucide-loader-2",class:"size-8 animate-spin text-primary-400"})])):e(a)&&e(P)&&!e(c)&&!e(A)?(r(),h("div",Dt,[o("div",Ut,[o("div",Et,[u(n,{name:"i-lucide-clock",class:"size-8 text-white/30"})]),i[1]||(i[1]=o("h1",{class:"text-xl font-semibold text-white/60"}," This character page is currently unavailable ",-1)),i[2]||(i[2]=o("p",{class:"text-sm text-white/30"}," This page has been temporarily restricted. ",-1))])])):e(a)&&e(P)&&e(c)?(r(),g(f,{key:2,character:e(a),onAppealSubmitted:i[0]||(i[0]=pe=>e(K)())},null,8,["character"])):e(a)&&e(s)?(r(),h(be,{key:3},[u(D,{character:e(a),settings:e(s),"background-settings":e(re),"audio-settings":e(oe),"theme-settings":e(B),"text-settings":e(ie),"audio-playlist":e(k),"total-views":e(a).totalViews,"is-owner":e(c)},{"mobile-fabs":_(()=>[e(c)||e(A)||!e(c)&&e(m).userId?(r(),h(be,{key:0},[i[3]||(i[3]=o("div",{class:"w-px h-4 bg-white/10 shrink-0"},null,-1)),e(A)?(r(),h("button",{key:0,class:"size-7 shrink-0 flex items-center justify-center rounded-full bg-red-500/30 text-red-300 active:bg-red-500/50 transition-colors cursor-pointer",onClick:ee},[u(n,{name:"i-lucide-shield-alert",class:"size-3.5"})])):p("",!0),!e(c)&&e(m).userId&&e(b)!=="accepted"?(r(),h("button",{key:1,class:"size-7 shrink-0 flex items-center justify-center rounded-full bg-white/10 text-white/40 active:text-white/70 transition-colors cursor-pointer",disabled:e(T)||e(b)==="pending_sent",onClick:se},[e(T)?(r(),g(n,{key:0,name:"i-lucide-loader-2",class:"size-3.5 animate-spin"})):(r(),g(n,{key:1,name:e(ne),class:"size-3.5"},null,8,["name"]))],8,Lt)):p("",!0),!e(c)&&e(m).userId?(r(),h("button",{key:2,class:"size-7 shrink-0 flex items-center justify-center rounded-full bg-white/10 text-white/40 active:text-white/70 transition-colors cursor-pointer",onClick:ae},[u(n,{name:"i-lucide-flag",class:"size-3.5"})])):p("",!0),e(c)?(r(),g(v,{key:3,to:"/customize",class:"size-7 shrink-0 flex items-center justify-center rounded-full bg-primary-400/30 text-primary-300 active:bg-primary-400/50 transition-colors"},{default:_(()=>[u(n,{name:"i-lucide-paintbrush",class:"size-3.5"})]),_:1})):p("",!0),e(c)?(r(),h("button",{key:4,class:"size-7 shrink-0 flex items-center justify-center rounded-full bg-white/10 text-white/50 active:text-white/70 transition-colors cursor-pointer",onClick:te},[u(n,{name:"i-lucide-share-2",class:"size-3.5"})])):p("",!0)],64)):p("",!0)]),default:_(()=>[(r(),g(Je(e(De)),{character:e(a),settings:e(s),"text-settings":e(ie),"background-settings":e(re),"audio-settings":e(oe),"theme-settings":e(B),"audio-playlist":e(k),links:e(w),achievements:e(j),games:e(J).games,clips:e(q),"setup-items":e(W),friends:e(Se),"is-owner":e(c)},null,8,["character","settings","text-settings","background-settings","audio-settings","theme-settings","audio-playlist","links","achievements","games","clips","setup-items","friends","is-owner"]))]),_:1},8,["character","settings","background-settings","audio-settings","theme-settings","text-settings","audio-playlist","total-views","is-owner"]),e(c)||e(A)||!e(c)&&e(m).userId?(r(),h("div",jt,[e(A)?(r(),g(I,{key:0,text:"Manage user",content:{side:"left"}},{default:_(()=>[o("button",{class:"flex items-center justify-center size-9 rounded-xl bg-red-500/30 border border-red-400/40 text-red-200 hover:bg-red-500/40 hover:text-red-100 transition-all duration-200 backdrop-blur-md cursor-pointer",onClick:ee},[u(n,{name:"i-lucide-shield-alert",class:"size-4"})])]),_:1})):p("",!0),!e(c)&&e(m).userId&&e(b)!=="accepted"?(r(),g(I,{key:1,text:e(Ae),content:{side:"left"}},{default:_(()=>[o("button",{class:"flex items-center justify-center size-9 rounded-xl bg-black/30 border border-white/12 text-white/80 hover:text-white hover:bg-black/40 transition-all duration-200 backdrop-blur-md cursor-pointer",disabled:e(T)||e(b)==="pending_sent",onClick:se},[e(T)?(r(),g(n,{key:0,name:"i-lucide-loader-2",class:"size-4 animate-spin"})):(r(),g(n,{key:1,name:e(ne),class:"size-4"},null,8,["name"]))],8,Pt)]),_:1},8,["text"])):p("",!0),!e(c)&&e(m).userId?(r(),g(I,{key:2,text:"Report",content:{side:"left"}},{default:_(()=>[o("button",{class:"flex items-center justify-center size-9 rounded-xl bg-black/30 border border-white/12 text-white/80 hover:text-white hover:bg-black/40 transition-all duration-200 backdrop-blur-md cursor-pointer",onClick:ae},[u(n,{name:"i-lucide-flag",class:"size-4"})])]),_:1})):p("",!0),e(c)?(r(),g(I,{key:3,text:"Customize",content:{side:"left"}},{default:_(()=>[u(v,{to:"/customize",class:"flex items-center justify-center size-9 rounded-xl bg-black/30 border border-white/12 text-white/80 hover:text-white hover:bg-black/40 transition-all duration-200 backdrop-blur-md"},{default:_(()=>[u(n,{name:"i-lucide-paintbrush",class:"size-4"})]),_:1})]),_:1})):p("",!0),e(c)?(r(),g(I,{key:4,text:"Share",content:{side:"left"}},{default:_(()=>[o("button",{class:"flex items-center justify-center size-9 rounded-xl bg-black/30 border border-white/12 text-white/80 hover:text-white hover:bg-black/40 transition-all duration-200 backdrop-blur-md cursor-pointer",onClick:te},[u(n,{name:"i-lucide-share-2",class:"size-4"})])]),_:1})):p("",!0)])):p("",!0)],64)):p("",!0)])}}}),Yt=Object.assign(Bt,{__name:"CharacterPageView"});export{Yt as _};
3//# sourceMappingURL=BffJcVBF.js.map

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.