import{i as e,a,_ as l}from"./mediaType.7Pdo58gR.js";import{bw as t,br as o,bR as i,a6 as r,a_ as n,q as s,f as c,aZ as u,aK as d,r as v,bE as p,au as m,B as h,an as f,T as b,s as x,b0 as y,c as g}from"./index.DHkYopKB.js";import{_ as w}from"./index.BmEwwL6m.js";import{_ as k}from"./index.Bw9MsoQa.js";import{_}from"./index.CG0OerND.js";import{u as I,az as C,a8 as E,a0 as U,R as D,a2 as j,a4 as A,l as S,F as R,i as N,k as T,ah as V,g as L,Z as M,r as P,aE as z,j as $,S as O,q as F,an as q,aa as B,ap as H,V as G,ad as Q,aq as W}from"./vue-vendor.CbU-cCHr.js";import{a as Y,g as Z,_ as X,D as J,b as K,u as ee}from"./useBotInteract.CSR5fJQ6.js";import{_ as ae}from"./index.77dAwNkE.js";import"./utils-vendor.CIoRGLTT.js";import{u as le}from"./i18n.D8sRpFFz.js";import{u as te}from"./useCharacterNavigation.Cq0XhwKb.js";import"./other-vendor.CDg5OpHS.js";import"./icons.BL-8H3wb.js";import"./app_arrow-left-line@2x.beiviEFj.js";import"./throttle.Cxodap7r.js";let oe=null;function ie(e){oe===e&&(oe=null)}const re=["src"],ne={key:0,class:"absolute inset-0 w-full h-full overflow-hidden rounded-xl"},se={key:2,class:"play-btn-overlay absolute inset-0 flex items-center justify-center bg-black/20 rounded-xl"},ce=["src"],ue={key:0,class:"absolute inset-0 w-full h-full overflow-hidden rounded-xl"},de={class:"absolute inset-0 flex flex-col items-center justify-center bg-black/30 rounded-xl"},ve={class:"flex items-center bg-black/50 px-2 py-1 rounded-full"},pe=["src"],me={class:"text-white text-xs ml-1 font-medium"},he=v(I({name:"GalleryVideoItem",__name:"index",props:{videoId:{},videoUrl:{},title:{},money:{},unlocked:{type:Boolean},botId:{}},emits:["unlock-success"],setup(a,{expose:l,emit:v}){const p=t(),m=o(),h=i(),{t:f}=le(),b=a,x=v,y=L(()=>m.appConfig.coinIconSrc),g=E(null),w=E(null),k=E(null),_=E(null),I=E(null),M=new WeakSet;let P=null,z=null,$=null,O=null;const F=()=>{r($),$=null},q=()=>{r(O),O=null},B=()=>{const e=w.value,a=b.videoUrl;e&&a&&(te.value||(F(),e.removeAttribute("src"),e.load(),$=u(e,a,{onError:()=>Ie()}),!$&&d(a)&&Ie()))},H=()=>{const e=k.value,a=b.videoUrl;e&&a&&(te.value||(q(),e.removeAttribute("src"),e.load(),O=u(e,a,{onError:()=>Ie()}),!O&&d(a)&&Ie()))},G=L(()=>(()=>{const e=navigator.userAgent;return/XiaoMi|MiuiBrowser|UCBrowser|Huawei|Honor|vivo|OPPO|Heytap|Quark|Weibo|baiduboxapp|MicroMessenger|QQBrowser|mqqbrowser/i.test(e)})()),Q=(e,a)=>{if(!a||!e)return;const l=a.getContext("2d");if(!l)return;if(e.readyState<2||!e.videoWidth||!e.videoHeight)return;const t=window.devicePixelRatio||1,o=a.getBoundingClientRect(),i=Math.max(1,Math.round(o.width*t)),r=Math.max(1,Math.round(o.height*t));a.width===i&&a.height===r||(a.width=i,a.height=r);const n=e.videoWidth/e.videoHeight;let s,c,u,d;i/r>n?(s=i,c=i/n,u=0,d=(r-c)/2):(c=r,s=r*n,u=(i-s)/2,d=0),l.clearRect(0,0,i,r),l.drawImage(e,u,d,s,c)},W=()=>{null!==P&&(cancelAnimationFrame(P),P=null)},X=()=>{null!==z&&(cancelAnimationFrame(z),z=null)};C(w,e=>{e&&!M.has(e)&&(M.add(e),e.addEventListener("loadeddata",()=>{G.value&&Q(e,_.value)}),e.addEventListener("play",()=>{G.value&&(()=>{if(null!==P)return;const e=()=>{P=null;const a=w.value;!a||a.paused||a.ended||(Q(a,_.value),P=requestAnimationFrame(e))};P=requestAnimationFrame(e)})()}),e.addEventListener("pause",()=>{G.value&&W()})),e&&D(()=>B())}),C(k,e=>{e&&!M.has(e)&&(M.add(e),e.addEventListener("loadeddata",()=>{G.value&&Q(e,I.value)}),e.addEventListener("play",()=>{G.value&&(()=>{if(null!==z)return;const e=()=>{z=null;const a=k.value;!a||a.paused||a.ended||(Q(a,I.value),z=requestAnimationFrame(e))};z=requestAnimationFrame(e)})()}),e.addEventListener("pause",()=>{G.value&&X()})),e&&D(()=>H())}),C(()=>b.videoUrl,()=>{D(()=>{B(),H()})});const J=E(!1),K=E(!1),ee=E(b.unlocked),ae=L(()=>0!==b.money&&!ee.value),te=L(()=>b.videoUrl&&e(b.videoUrl));C(()=>b.unlocked,e=>{ee.value=e});let he=null;U(()=>{D(()=>{ae.value&&(he&&(he.disconnect(),he=null),g.value&&(he=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?be():xe()})},{threshold:.5}),he.observe(g.value)))})}),j(()=>{he&&(he.disconnect(),he=null),W(),X(),F(),q()}),C(ae,e=>{D(()=>{e||(xe(),he&&(he.disconnect(),he=null))})});const fe=()=>{var e;b.videoUrl&&!te.value&&(w.value&&(e=w.value,oe&&oe!==e&&oe.pause(),oe=e,w.value.muted=!1,w.value.play().then(()=>{J.value=!0}).catch(e=>{J.value=!1})))},be=()=>{b.videoUrl&&!te.value&&k.value&&(k.value.muted=!0,k.value.play().catch(e=>{}))},xe=()=>{te.value||k.value&&(k.value.pause(),k.value.currentTime=0)};function ye(){}function ge(){J.value=!1,ie(w.value)}function we(){J.value=!1,ie(w.value)}function ke(){}function _e(){if(ae.value&&g.value){const e=g.value.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight;e.top<a&&e.bottom>0&&be()}}function Ie(){n("album_vid_fail",{videoId:b.videoId})}async function Ce(e){if("VIDEO"!==e.target.tagName||!J.value)if(ae.value){try{await h.getUserInfo()}catch(a){}(Number(h.userInfo.diamondCount)||0)>=(Number(b.money)||0)?await async function(){if(K.value||!b.videoId)return;n("album_vid_pay",{videoId:b.videoId,money:b.money}),K.value=!0;try{await s.unlockVideo(b.videoId,b.botId),await h.getUserInfo(),n("album_vid_pay_success",{videoId:b.videoId,money:b.money}),ee.value=!0,x("unlock-success",b.videoId),c.success(f("dialogVideoUnlock.unlockSuccess"))}catch(a){n("album_vid_pay_fail",{videoId:b.videoId,money:b.money}),c.error(Z(a,f,"dialogVideoUnlock.unlockFailed"))}finally{K.value=!1}}():p.setVideoUnlockData({videoId:b.videoId,coverUrl:"",money:b.money,botId:b.botId,source:"album"})}else J.value?te.value||w.value&&(w.value.pause(),J.value=!1,ie(w.value)):fe()}return l({markAsUnlocked:()=>{ee.value=!0},videoId:b.videoId}),(e,l)=>(A(),S("div",{class:"gallery-video-item relative aspect-[9/16] rounded-xl overflow-hidden bg-[rgb(38,38,41)] cursor-pointer",ref_key:"containerRef",ref:g,onClick:Ce},[ae.value?(A(),S(R,{key:1},[l[3]||(l[3]=N("div",{class:"video-badge absolute top-2 right-2 bg-black/60 px-2 py-0.5 rounded text-white text-xs font-medium z-10"}," VIDEO ",-1)),te.value?(A(),S("img",{key:0,src:a.videoUrl,class:"w-full h-full object-cover rounded-xl blur-xl",onLoad:ke,onError:Ie},null,40,ce)):(A(),S(R,{key:1},[G.value?(A(),S("div",ue,[N("video",{ref_key:"lockedVideoRef",ref:k,class:"card-image-offscreen",loop:"",muted:"",playsinline:"",autoplay:"",preload:"auto",disablepictureinpicture:"",disableremoteplayback:"",controlslist:"nodownload noremoteplayback nofullscreen","x-webkit-airplay":"deny",crossorigin:"anonymous",onLoadeddata:ke,onCanplay:_e,onError:Ie},null,544),N("canvas",{ref_key:"lockedVideoCanvasRef",ref:I,class:"absolute inset-0 w-full h-full rounded-xl blur-xl",style:{"z-index":"1"}},null,512)])):(A(),S("video",{key:1,ref_key:"lockedVideoRef",ref:k,class:"w-full h-full object-cover rounded-xl blur-xl",loop:"",muted:"",playsinline:"",autoplay:"",preload:"auto",onLoadeddata:ke,onCanplay:_e,onError:Ie},null,544))],64)),N("div",de,[l[2]||(l[2]=N("div",{class:"w-[32px] h-[32px] mb-2"},[N("img",{src:Y,class:"w-full h-full object-contain",alt:"locked"})],-1)),N("div",ve,[N("img",{src:y.value,alt:"diamond",class:"w-[14px] h-[14px] object-cover"},null,8,pe),N("span",me,V(a.money),1)])])],64)):(A(),S(R,{key:0},[l[1]||(l[1]=N("div",{class:"video-badge absolute top-2 right-2 bg-black/60 px-2 py-0.5 rounded text-white text-xs font-medium z-10"}," VIDEO ",-1)),te.value?(A(),S("img",{key:0,src:a.videoUrl,class:"w-full h-full object-cover rounded-xl",onLoad:ye,onError:Ie},null,40,re)):(A(),S(R,{key:1},[G.value?(A(),S("div",ne,[N("video",{ref_key:"videoRef",ref:w,class:"card-image-offscreen",loop:"",playsinline:"",preload:"auto",disablepictureinpicture:"",disableremoteplayback:"",controlslist:"nodownload noremoteplayback nofullscreen","x-webkit-airplay":"deny",crossorigin:"anonymous",onLoadeddata:ye,onEnded:ge,onPause:we,onError:Ie},null,544),N("canvas",{ref_key:"videoCanvasRef",ref:_,class:"absolute inset-0 w-full h-full rounded-xl",style:{"z-index":"1"}},null,512)])):(A(),S("video",{key:1,ref_key:"videoRef",ref:w,class:"w-full h-full object-cover rounded-xl",loop:"",playsinline:"",preload:"auto",disablepictureinpicture:"",disableremoteplayback:"",controlslist:"nodownload noremoteplayback nofullscreen","x-webkit-airplay":"deny",onLoadeddata:ye,onEnded:ge,onPause:we,onError:Ie},null,544))],64)),J.value||te.value?T("",!0):(A(),S("div",se,[...l[0]||(l[0]=[N("div",{class:"w-[40px] h-[40px] bg-black/50 rounded-full flex items-center justify-center"},[N("svg",{class:"w-5 h-5 text-white ml-0.5",fill:"currentColor",viewBox:"0 0 24 24"},[N("path",{d:"M8 5v14l11-7z"})])],-1)])]))],64))],512))}}),[["__scopeId","data-v-4d0c668c"]]),fe=e=>{window.__PRERENDER_ERROR__=e},be=()=>{const{t:e}=le();let a=!1,l=setTimeout(()=>{l=null,window.__PRERENDER_READY__||fe("character SEO failed: timed out waiting for bot detail")},15e3);const t=()=>{null!==l&&(clearTimeout(l),l=null)};M(t);return{updateCharacterSeo:async l=>{if(t(),a)return!1;if(!l.personName||!l.personName.trim())return fe("character SEO failed: bot name is empty"),!1;const o=(()=>{var e,a,l;const t=null==(a=null==(e=window.__APP_CONFIG__)?void 0:e.seo)?void 0:a.title;return(null==(l=null==t?void 0:t.split(" - ")[0])?void 0:l.trim())||"OnlyGF"})(),i=window.location.href,r=((e,a,l)=>{const t=[];e.personName&&t.push(e.personName),e.age&&t.push(`${a("seo.characterDetail.age")}:${e.age}`),e.vocation&&t.push(`${a("seo.characterDetail.career")}:${e.vocation}`),e.height&&t.push(`${a("seo.characterDetail.height")}:${e.height}`),e.constellation&&t.push(`${a("seo.characterDetail.constellation")}:${e.constellation}`);const o=a("seo.characterDetail.titlePrefix"),i=`${a("seo.characterDetail.aiGirlfriend")}|${l}`;return`${o}:${t.length>0?t.join(","):""}—${i}`})(l,e,o),n=((e,a,l)=>{const t=a("seo.characterDetail.descriptionTemplate",{name:e.personName||"",appName:l});return e.introduction&&e.introduction.trim()?`${e.introduction}\n${t}`:t})(l,e,o),s=((e,a)=>{const l=[];if(e.personName&&l.push(e.personName),l.push("AI girlfriend","AI chat"),e.vocation&&l.push(e.vocation),e.userTags&&e.userTags.length>0){const a=e.userTags.slice(0,5);l.push(...a)}return l.push(a),l.join(", ")})(l,o),c=((e,a)=>{const l={"@context":"https://schema.org","@type":"Person",gender:"Female",url:a};return e.personName&&(l.name=e.personName),e.introduction&&(l.description=e.introduction),e.headerUrl&&(l.image=e.headerUrl),e.vocation&&(l.jobTitle=e.vocation),e.height&&(l.height=String(e.height)),e.age&&(l.age=e.age),e.constellation&&(l.constellation=e.constellation),e.bloodType&&(l.bloodType=e.bloodType),l})(l,i);try{p({title:r,meta:[{name:"description",content:n},{name:"keywords",content:s},{property:"og:title",content:r},{property:"og:description",content:n},{name:"twitter:title",content:r},{name:"twitter:description",content:n}],script:[{type:"application/ld+json",children:JSON.stringify([c])}]}),await D(),await new Promise(e=>setTimeout(e,20))}catch(u){return fe(`character SEO failed: head update error - ${String(u)}`),!1}return a=!0,window.__PRERENDER_READY__=!0,!0},markCharacterSeoError:e=>{t(),fe(`character SEO failed: ${e}`)}}},xe={class:"character-container min-h-screen bg-[#121216] text-white overflow-x-hidden"},ye={class:"max-w-[1280px] mx-auto pt-[0px] pb-[84px] xl:py-[24px]"},ge={class:"character-container-headder fixed top-0 left-0 right-0 z-10 h-[75px] md:hidden"},we={class:"absolute top-[16px] left-[16px]"},ke={key:0,class:"detail-load-failed"},_e={key:1,class:"flex flex-col xl:flex-row mb-0 xl:mb-[43px]"},Ie={class:"mb-6 xl:mb-0 relative flex-shrink-0 character-image-container pl-[0px] xl:pl-[24px]"},Ce={class:"relative"},Ee={class:"xl:rounded-[24px] rounded-[0px] overflow-hidden bg-gray-800 character-image-wrapper aspect-[3/4] overflow-hidden"},Ue={class:"live-entry-inner"},De={key:2,class:"absolute bottom-4 left-4 px-3 py-1 rounded-full text-xs font-medium flex items-center online-status-bg"},je={class:"xl:w-2/3 flex-grow xl:ml-[20px] px-[16px] xl:px-[24px] flex flex-col justify-between"},Ae={class:"flex items-center mb-1 character-name-row"},Se={class:"text-[24px] md:text-[40px] font-bold text-white mr-2"},Re={class:"flex items-center mb-4 character-stats-row"},Ne={class:"text-[14px] text-[#9CA3AF] font-medium"},Te={class:"text-[rgba(255,255,255,0.6)] text-[14px] mb-[16px]"},Ve={class:"flex flex-wrap mb-[16px] attributes-container"},Le={class:"w-8 h-8 flex items-center justify-center mr-2 flex-shrink-0"},Me=["src","alt"],Pe={class:"min-w-0 flex-1"},ze={class:"text-xs text-gray-400"},$e={class:"text-white font-medium text-sm"},Oe={class:"flex flex-wrap mb-[12px]"},Fe={class:"flex h-[76px] xl:h-[56px] xl:relative xl:bottom-auto xl:left-auto xl:right-auto xl:w-auto xl:px-0 xl:py-0 xl:bg-transparent xl:backdrop-filter-none absolute bottom-0 left-0 right-0 p-[16px] bg-[rgba(26,26,29,0.8)] backdrop-blur-[9px] z-50"},qe={key:2,class:"w-full px-[16px] xl:px-[24px]"},Be={class:"text-[25px] font-bold text-white mb-[24px] py-[10px] gradient-divider"},He={key:0,class:"flex flex-wrap gallery-container"},Ge=["onClick"],Qe={key:0,class:"absolute inset-0 flex flex-col items-center justify-center bg-black/30 rounded-xl cursor-pointer"},We={class:"flex items-center bg-black/50 px-2 py-1 rounded-full"},Ye=["src"],Ze={class:"text-white text-xs ml-1 font-medium"},Xe={key:1,class:"gallery-no-data mt-[48px]"},Je=v(I({name:"CharacterPage",__name:"index",setup(e){const r=W(),u=H(),{toCharacterChat:d}=te(),{toggleLike:v,toggleCollect:p}=ee(),{updateCharacterSeo:I,markCharacterSeoError:D}=be(),j=t(),M=o(),Z=i(),le=L(()=>M.device===g.MOBILE?64:56),oe=L(()=>M.device===g.MOBILE),ie=L(()=>M.appConfig.profileIcons),re=L(()=>M.appConfig.coinIconSrc),ne=m.global.t,se=E(""),ce=E(!1),ue=E(!1),de=E(!1),ve=E(!1),pe=()=>!!f(b)||(j.showLoginDialog=!0,!1),me=E([]),fe=E([]),Je=E(!1),Ke=E([]),ea=E(0),aa=e=>{da()},la=()=>{},ta=E({name:"",mainImage:"",headerUrl:"",chatStatus:0,isLive:!1,likes:"0",views:"0",stats:[{icon:"ri-heart-fill",color:"#A0A0A1",value:"0",key:"likes"},{icon:"ri-chat-3-fill",color:"#A0A0A1",value:"0",key:"views"}],description:"",attributes:[],tags:[]}),oa=L(()=>ta.value.headerUrl||""),ia=L(()=>1===ta.value.isLive),ra=async()=>{se.value&&ia.value&&(n("character_live_entry_click",{userId:se.value}),await y({router:r,userId:se.value,avatarUrl:oa.value||"",characterName:ta.value.personName||ta.value.name,showLiveAvatar:ia.value,avatarSize:le.value}))},na=()=>{d(se.value)},sa=async e=>{if(se.value&&pe())try{if("like"===e)return void(ce.value=await v(se.value,!!ce.value,se.value));ue.value=await p(se.value,!!ue.value)}catch(a){}},ca=()=>{j.showShareDialog=!0},ua=()=>{j.reportUserId=se.value,j.showReportDialog=!0},da=async()=>{if(se.value){if(!f(b))return me.value=[],void(fe.value=[]);try{const e=await h.botAlbums({userId:se.value,page:1,size:100});e&&Array.isArray(e)&&e.length>0?(me.value=e.filter(e=>e.url||e.videoUrl).map(e=>({id:e.photoId,url:e.url,title:e.title,money:e.money||0,enableView:e.enableView??!0,mediaType:e.mediaType||"image",videoId:e.videoId,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,videoMoney:e.videoMoney||0,videoEnableView:e.videoEnableView??!1})),fe.value=me.value.filter(e=>"image"===e.mediaType&&e.enableView).map(e=>e.url)):(me.value=[],fe.value=[])}catch(e){me.value=[],fe.value=[]}}},va=()=>{},pa=()=>{da()};return C(()=>j.showPhotoUnlockDialog,(e,a)=>{!0===a&&!1===e&&da()}),C(()=>j.showVideoUnlockDialog,(e,a)=>{!0===a&&!1===e&&da()}),U(async()=>{se.value=u.params.id||u.query.id,se.value&&((async()=>{if(se.value)try{de.value=!0,ve.value=!1;const e=await h.botDetail({userId:se.value});if(e){const a=e;ta.value={name:a.personName||"Unknown Character",bodyMedias:a.bodyMedias||[],headerUrl:a.headerUrl||"",chatStatus:a.chatStatus??0,isLive:a.isLive??!1,likes:a.likeCount?a.likeCount.toString():"0",views:a.chatsCount?a.chatsCount.toString():"0",stats:[{icon:"ri-heart-fill",color:"#A0A0A1",value:a.likeCount?a.likeCount.toString():"0",key:"likes"},{icon:"ri-chat-3-fill",color:"#A0A0A1",value:a.chatsCount?a.chatsCount.toString():"0",key:"views"}],description:a.introduction||"",attributes:[{label:ne("characterDetail.age"),value:a.age?a.age.toString():ne("characterDetail.unknown"),icon:ie.value.age},{label:ne("characterDetail.career"),value:a.vocation||ne("characterDetail.unknown"),icon:ie.value.career},{label:ne("characterDetail.height"),value:a.height?`${a.height}cm`:ne("characterDetail.unknown"),icon:ie.value.height},{label:ne("characterDetail.constellation"),value:a.constellation||ne("characterDetail.unknown"),icon:ie.value.constellation},{label:ne("characterDetail.bloodType"),value:a.bloodType||ne("characterDetail.unknown"),icon:ie.value.bloodType}],tags:a.userTags||[]},ce.value=a.isLiked,ue.value=a.isFavorite,I(a)}}catch(e){return ve.value=!0,void D("bot detail request failed")}finally{de.value=!1}})(),da())}),(e,t)=>{const o=_,i=a,r=k,u=w,d=x,v=l;return A(),S("div",xe,[N("div",ye,[N("div",ge,[N("div",we,[P(o,{color:"var(--white-color)"})])]),ve.value?(A(),S("div",ke,[P(ae)])):T("",!0),ve.value?T("",!0):(A(),S("div",_e,[N("div",Ie,[N("div",Ce,[N("div",Ee,[P(i,{bodyMedias:ta.value.bodyMedias,alt:ta.value.name,class:"w-full h-full object-cover object-top"},null,8,["bodyMedias","alt"])]),ia.value?(A(),S("button",{key:0,class:"live-entry-btn absolute z-[3]",onClick:z(ra,["stop"])},[N("div",Ue,[P(r,{avatar:oa.value,size:le.value,type:"girl","show-live":ia.value,class:"live-entry-avatar"},null,8,["avatar","size","show-live"])])])):T("",!0),ia.value?(A(),$(u,{key:1,"dot-position":oe.value?"left":"right",class:O(["absolute z-[3]",oe.value?"bottom-4 left-4":"top-4 right-4"])},null,8,["dot-position","class"])):(A(),S("div",De,[t[3]||(t[3]=N("div",{class:"w-2 h-2 bg-green-500 rounded-full mr-2"},null,-1)),F(" "+V(q(ne)("characterDetail.online")),1)])),N("button",{class:"absolute bottom-4 right-4 w-10 h-10 rounded-full flex items-center justify-center bg-black/50 backdrop-blur hover:opacity-80",onClick:t[0]||(t[0]=e=>sa("like"))},[ce.value?(A(),$(d,{key:1,name:"heart-fill",size:"20",color:"var(--heart-fill-color)"})):(A(),S(R,{key:0},[P(d,{name:"heart-line",size:"20",class:"group-hover:hidden"}),P(d,{name:"heart-fill",size:"20",class:"hidden group-hover:block",color:"var(--heart-fill-color)"})],64))])])]),N("div",je,[N("div",null,[N("div",Ae,[N("div",Se,V(ta.value.name),1),N("div",{class:"w-[28px] h-[28px] rounded-full flex items-center justify-center hover:bg-[rgba(255,255,255,0.05)] transition-colors p-1",onClick:ua},[P(d,{name:"information-line",color:"var(--font-color-60)",size:"20"})])]),N("div",Re,[(A(!0),S(R,null,B(ta.value.stats,(e,a)=>(A(),S("div",{key:e.key,class:O(["flex items-center",{"mr-6":a<ta.value.stats.length-1}])},[(A(),$(Q(e.icon),{style:G({color:e.color}),class:"mr-[6px]",size:"18"},null,8,["style"])),N("span",Ne,V(e.value),1)],2))),128))]),N("div",Te,V(ta.value.description),1),N("div",Ve,[(A(!0),S(R,null,B(ta.value.attributes,e=>(A(),S("div",{key:e.label,class:"flex items-center attribute-item"},[N("div",Le,[N("img",{src:e.icon,alt:e.label,class:"w-6 h-6 object-contain"},null,8,Me)]),N("div",Pe,[N("div",ze,V(e.label),1),N("div",$e,V(e.value),1)])]))),128))]),N("div",Oe,[(A(!0),S(R,null,B(ta.value.tags,e=>(A(),S("span",{key:e,class:"px-3 py-1 bg-[#26262C] rounded-full text-sm text-white mr-2 mb-2"},V(e),1))),128))])]),N("div",Fe,[N("button",{class:"flex-1 py-3 rounded-[10px] font-semibold hover:opacity-90 mr-4 text-[16px] text-white custom-gradient text-center",onClick:na},V(q(ne)("characterDetail.chatToMe")),1),N("button",{class:O(["px-6 py-3 rounded-xl font-semibold border transition-colors mr-4 text-[16px] text-center",ue.value?"bg-[#757577] text-white border-[#757577]":"bg-white text-gray-900 border-gray-300 hover:bg-gray-100"]),onClick:t[1]||(t[1]=e=>sa("collect"))},V(ue.value?q(ne)("characterDetail.collected"):q(ne)("characterDetail.collect")),3),N("button",{class:"px-6 py-3 bg-[transparent] text-white rounded-xl font-semibold border border-[rgba(255,255,255,0.3)] hover:opacity-80 transition-colors text-[16px] text-center",onClick:ca},V(q(ne)("characterDetail.share")),1)])])])),ve.value?T("",!0):(A(),S("div",qe,[N("div",Be,V(q(ne)("characterDetail.gallery")),1),me.value&&me.value.length>0?(A(),S("div",He,[(A(!0),S(R,null,B(me.value,(e,a)=>(A(),S("div",{key:e.id,class:"gallery-item"},["video"===e.mediaType?(A(),$(he,{key:0,"video-id":e.videoId,"video-url":e.videoUrl,title:e.title,money:e.videoMoney||0,unlocked:e.videoEnableView||!1,"bot-id":Number(se.value),onUnlockSuccess:aa},null,8,["video-id","video-url","title","money","unlocked","bot-id"])):(A(),S("div",{key:1,onClick:l=>(async(e,a)=>{if("video"!==e.mediaType)if(e.enableView){const e=me.value.slice(0,a+1).filter(e=>"image"===e.mediaType&&e.enableView).length-1;Ke.value=fe.value,ea.value=e,Je.value=!0}else{if(!pe())return;try{await Z.getUserInfo();if((Number(Z.userInfo.diamondCount)||0)>=(Number(e.money)||0))try{return await s.unlockPhoto(e.id,Number(se.value)),await Z.getUserInfo(),n("album_photo_pay_success",{photoId:e.id,money:e.money}),c.success(ne("dialogPhotoUnlock.unlockSuccess")),void(await da())}catch(l){return n("album_photo_pay_fail",{photoId:e.id,money:e.money}),void c.error(ne("dialogPhotoUnlock.unlockFailed"))}}catch(l){}j.setPhotoUnlockData({photoId:e.id,photoUrl:e.url,money:e.money,source:"album",botId:Number(se.value)})}})(e,a),class:"rounded-xl overflow-hidden bg-[rgb(38,38,41)] transition-opacity relative aspect-[9/16] cursor-pointer"},[P(v,{id:e.id,src:e.url,alt:e.title||"Gallery image",watermark:!1,class:O(["w-full h-full object-cover",{"blur-xl":!e.enableView}])},null,8,["id","src","alt","class"]),e.enableView?T("",!0):(A(),S("div",Qe,[t[4]||(t[4]=N("div",{class:"w-[32px] h-[32px] mb-2"},[N("img",{src:Y,class:"w-full h-full object-contain",alt:"locked"})],-1)),N("div",We,[N("img",{src:re.value,alt:"diamond",class:"w-[14px] h-[14px] object-cover"},null,8,Ye),N("span",Ze,V(e.money),1)])]))],8,Ge))]))),128))])):(A(),S("div",Xe,[P(ae)]))]))]),P(X,{visible:q(j).showPhotoUnlockDialog,onClosed:va,onUnlockSuccess:pa},null,8,["visible"]),P(J,{visible:q(j).showVideoUnlockDialog,onClosed:la},null,8,["visible"]),P(K,{show:Je.value,"url-list":Ke.value,"initial-index":ea.value,"hide-on-click-modal":!0,onClose:t[2]||(t[2]=e=>Je.value=!1)},null,8,["show","url-list","initial-index"])])}}}),[["__scopeId","data-v-3f765e20"]]);export{Je as default};