import{d as Z,r as I,aD as De,bh as Te,e as L,ax as Le,bi as Ye,aK as qe,w as Ke,Z as Je,bj as Qe,ah as ze,aj as Me,aa as D,bk as Ze,T as je,bl as et,bm as Ne,bn as tt,aV as fe,bo as nt,bp as ot,bq as st,ao as R,br as he,ap as V,aq as Q,aQ as se,bs as rt,bt as at,ay as Fe,aU as Be,aT as Re,bu as it,aB as lt,bv as ct,bw as dt,bx as ut,ar as Ie,by as ft,aZ as ee,aE as pt,bz as ht,C as me,u as ce,b as ve,Q as mt,bA as Ue,bB as vt,h as be,o as O,c as X,k as d,l,m as e,bC as le,bD as q,a as t,t as S,J as j,U as Ae,A as te,I as U,p as W,s as K,bE as ne,F as He,j as bt,bF as gt,bG as yt,f as We,ac as Ge,bH as pe,bI as Pe,b0 as _t,b1 as Se,bJ as Ce,q as Oe,bK as xt,bL as wt,a7 as kt,bM as $t,E as Ee,bN as St,bO as Ct,K as ie,bP as ue,O as zt,n as Et,am as Tt,bQ as At,bR as Pt,a8 as Mt}from"./index-ff703318.js";import{N as Ve}from"./DataTable-08f4c3a2.js";import{_ as Bt}from"./titleBar.vue_vue_type_script_setup_true_lang-ccd58d5d.js";import{N as Rt}from"./LayoutSider-2aa29697.js";import"./Select-1e969c7b.js";const It=Z({name:"NDrawerContent",inheritAttrs:!1,props:{blockScroll:Boolean,show:{type:Boolean,default:void 0},displayDirective:{type:String,required:!0},placement:{type:String,required:!0},contentStyle:[Object,String],nativeScrollbar:{type:Boolean,required:!0},scrollbarProps:Object,trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},showMask:{type:[Boolean,String],required:!0},resizable:Boolean,onClickoutside:Function,onAfterLeave:Function,onAfterEnter:Function,onEsc:Function},setup(r){const o=I(!!r.show),s=I(null),C=De(Te);let _=0,u="",c=null;const n=I(!1),a=I(!1),f=L(()=>r.placement==="top"||r.placement==="bottom"),{mergedClsPrefixRef:v,mergedRtlRef:k}=Le(r),z=Ye("Drawer",k,v),T=g=>{a.value=!0,_=f.value?g.clientY:g.clientX,u=document.body.style.cursor,document.body.style.cursor=f.value?"ns-resize":"ew-resize",document.body.addEventListener("mousemove",N),document.body.addEventListener("mouseleave",M),document.body.addEventListener("mouseup",H)},b=()=>{c!==null&&(window.clearTimeout(c),c=null),a.value?n.value=!0:c=window.setTimeout(()=>{n.value=!0},300)},i=()=>{c!==null&&(window.clearTimeout(c),c=null),n.value=!1},{doUpdateHeight:p,doUpdateWidth:B}=C,N=g=>{var E,F;if(a.value)if(f.value){let Y=((E=s.value)===null||E===void 0?void 0:E.offsetHeight)||0;const J=_-g.clientY;Y+=r.placement==="bottom"?J:-J,p(Y),_=g.clientY}else{let Y=((F=s.value)===null||F===void 0?void 0:F.offsetWidth)||0;const J=_-g.clientX;Y+=r.placement==="right"?J:-J,B(Y),_=g.clientX}},H=()=>{a.value&&(_=0,a.value=!1,document.body.style.cursor=u,document.body.removeEventListener("mousemove",N),document.body.removeEventListener("mouseup",H),document.body.removeEventListener("mouseleave",M))},M=H;qe(()=>{r.show&&(o.value=!0)}),Ke(()=>r.show,g=>{g||H()}),Je(()=>{H()});const $=L(()=>{const{show:g}=r,E=[[Me,g]];return r.showMask||E.push([tt,r.onClickoutside,void 0,{capture:!0}]),E});function A(){var g;o.value=!1,(g=r.onAfterLeave)===null||g===void 0||g.call(r)}return Qe(L(()=>r.blockScroll&&o.value)),fe(nt,s),fe(ot,null),fe(st,null),{bodyRef:s,rtlEnabled:z,mergedClsPrefix:C.mergedClsPrefixRef,isMounted:C.isMountedRef,mergedTheme:C.mergedThemeRef,displayed:o,transitionName:L(()=>({right:"slide-in-from-right-transition",left:"slide-in-from-left-transition",top:"slide-in-from-top-transition",bottom:"slide-in-from-bottom-transition"})[r.placement]),handleAfterLeave:A,bodyDirectives:$,handleMousedownResizeTrigger:T,handleMouseenterResizeTrigger:b,handleMouseleaveResizeTrigger:i,isDragging:a,isHoverOnResizeTrigger:n}},render(){const{$slots:r,mergedClsPrefix:o}=this;return this.displayDirective==="show"||this.displayed||this.show?ze(D("div",{role:"none"},D(Ze,{disabled:!this.showMask||!this.trapFocus,active:this.show,autoFocus:this.autoFocus,onEsc:this.onEsc},{default:()=>D(je,{name:this.transitionName,appear:this.isMounted,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave},{default:()=>ze(D("div",et(this.$attrs,{role:"dialog",ref:"bodyRef","aria-modal":"true",class:[`${o}-drawer`,this.rtlEnabled&&`${o}-drawer--rtl`,`${o}-drawer--${this.placement}-placement`,this.isDragging&&`${o}-drawer--unselectable`,this.nativeScrollbar&&`${o}-drawer--native-scrollbar`]}),[this.resizable?D("div",{class:[`${o}-drawer__resize-trigger`,(this.isDragging||this.isHoverOnResizeTrigger)&&`${o}-drawer__resize-trigger--hover`],onMouseenter:this.handleMouseenterResizeTrigger,onMouseleave:this.handleMouseleaveResizeTrigger,onMousedown:this.handleMousedownResizeTrigger}):null,this.nativeScrollbar?D("div",{class:`${o}-drawer-content-wrapper`,style:this.contentStyle,role:"none"},r):D(Ne,Object.assign({},this.scrollbarProps,{contentStyle:this.contentStyle,contentClass:`${o}-drawer-content-wrapper`,theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar}),r)]),this.bodyDirectives)})})),[[Me,this.displayDirective==="if"||this.displayed||this.show]]):null}}),{cubicBezierEaseIn:Ot,cubicBezierEaseOut:Dt}=he;function Lt({duration:r="0.3s",leaveDuration:o="0.2s",name:s="slide-in-from-right"}={}){return[R(`&.${s}-transition-leave-active`,{transition:`transform ${o} ${Ot}`}),R(`&.${s}-transition-enter-active`,{transition:`transform ${r} ${Dt}`}),R(`&.${s}-transition-enter-to`,{transform:"translateX(0)"}),R(`&.${s}-transition-enter-from`,{transform:"translateX(100%)"}),R(`&.${s}-transition-leave-from`,{transform:"translateX(0)"}),R(`&.${s}-transition-leave-to`,{transform:"translateX(100%)"})]}const{cubicBezierEaseIn:jt,cubicBezierEaseOut:Nt}=he;function Ft({duration:r="0.3s",leaveDuration:o="0.2s",name:s="slide-in-from-left"}={}){return[R(`&.${s}-transition-leave-active`,{transition:`transform ${o} ${jt}`}),R(`&.${s}-transition-enter-active`,{transition:`transform ${r} ${Nt}`}),R(`&.${s}-transition-enter-to`,{transform:"translateX(0)"}),R(`&.${s}-transition-enter-from`,{transform:"translateX(-100%)"}),R(`&.${s}-transition-leave-from`,{transform:"translateX(0)"}),R(`&.${s}-transition-leave-to`,{transform:"translateX(-100%)"})]}const{cubicBezierEaseIn:Ut,cubicBezierEaseOut:Ht}=he;function Wt({duration:r="0.3s",leaveDuration:o="0.2s",name:s="slide-in-from-top"}={}){return[R(`&.${s}-transition-leave-active`,{transition:`transform ${o} ${Ut}`}),R(`&.${s}-transition-enter-active`,{transition:`transform ${r} ${Ht}`}),R(`&.${s}-transition-enter-to`,{transform:"translateY(0)"}),R(`&.${s}-transition-enter-from`,{transform:"translateY(-100%)"}),R(`&.${s}-transition-leave-from`,{transform:"translateY(0)"}),R(`&.${s}-transition-leave-to`,{transform:"translateY(-100%)"})]}const{cubicBezierEaseIn:Gt,cubicBezierEaseOut:Vt}=he;function Xt({duration:r="0.3s",leaveDuration:o="0.2s",name:s="slide-in-from-bottom"}={}){return[R(`&.${s}-transition-leave-active`,{transition:`transform ${o} ${Gt}`}),R(`&.${s}-transition-enter-active`,{transition:`transform ${r} ${Vt}`}),R(`&.${s}-transition-enter-to`,{transform:"translateY(0)"}),R(`&.${s}-transition-enter-from`,{transform:"translateY(100%)"}),R(`&.${s}-transition-leave-from`,{transform:"translateY(0)"}),R(`&.${s}-transition-leave-to`,{transform:"translateY(100%)"})]}const Yt=R([V("drawer",` word-break: break-word; line-height: var(--n-line-height); position: absolute; pointer-events: all; box-shadow: var(--n-box-shadow); transition: background-color .3s var(--n-bezier), color .3s var(--n-bezier); background-color: var(--n-color); color: var(--n-text-color); box-sizing: border-box; `,[Lt(),Ft(),Wt(),Xt(),Q("unselectable",` user-select: none; -webkit-user-select: none; `),Q("native-scrollbar",[V("drawer-content-wrapper",` overflow: auto; height: 100%; `)]),se("resize-trigger",` position: absolute; background-color: #0000; transition: background-color .3s var(--n-bezier); `,[Q("hover",` background-color: var(--n-resize-trigger-color-hover); `)]),V("drawer-content-wrapper",` box-sizing: border-box; `),V("drawer-content",` height: 100%; display: flex; flex-direction: column; `,[Q("native-scrollbar",[V("drawer-body-content-wrapper",` height: 100%; overflow: auto; `)]),V("drawer-body",` flex: 1 0 0; overflow: hidden; `),V("drawer-body-content-wrapper",` box-sizing: border-box; padding: var(--n-body-padding); `),V("drawer-header",` font-weight: var(--n-title-font-weight); line-height: 1; font-size: var(--n-title-font-size); color: var(--n-title-text-color); padding: var(--n-header-padding); transition: border .3s var(--n-bezier); border-bottom: 1px solid var(--n-divider-color); border-bottom: var(--n-header-border-bottom); display: flex; justify-content: space-between; align-items: center; `,[se("close",` margin-left: 6px; transition: background-color .3s var(--n-bezier), color .3s var(--n-bezier); `)]),V("drawer-footer",` display: flex; justify-content: flex-end; border-top: var(--n-footer-border-top); transition: border .3s var(--n-bezier); padding: var(--n-footer-padding); `)]),Q("right-placement",` top: 0; bottom: 0; right: 0; `,[se("resize-trigger",` width: 3px; height: 100%; top: 0; left: 0; transform: translateX(-1.5px); cursor: ew-resize; `)]),Q("left-placement",` top: 0; bottom: 0; left: 0; `,[se("resize-trigger",` width: 3px; height: 100%; top: 0; right: 0; transform: translateX(1.5px); cursor: ew-resize; `)]),Q("top-placement",` top: 0; left: 0; right: 0; `,[se("resize-trigger",` width: 100%; height: 3px; bottom: 0; left: 0; transform: translateY(1.5px); cursor: ns-resize; `)]),Q("bottom-placement",` left: 0; bottom: 0; right: 0; `,[se("resize-trigger",` width: 100%; height: 3px; top: 0; left: 0; transform: translateY(-1.5px); cursor: ns-resize; `)])]),R("body",[R(">",[V("drawer-container",{position:"fixed"})])]),V("drawer-container",` position: relative; position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; `,[R("> *",{pointerEvents:"all"})]),V("drawer-mask",` background-color: rgba(0, 0, 0, .3); position: absolute; left: 0; right: 0; top: 0; bottom: 0; `,[Q("invisible",` background-color: rgba(0, 0, 0, 0) `),rt({enterDuration:"0.2s",leaveDuration:"0.2s",enterCubicBezier:"var(--n-bezier-in)",leaveCubicBezier:"var(--n-bezier-out)"})])]),qt=Object.assign(Object.assign({},Fe.props),{show:Boolean,width:[Number,String],height:[Number,String],placement:{type:String,default:"right"},maskClosable:{type:Boolean,default:!0},showMask:{type:[Boolean,String],default:!0},to:[String,Object],displayDirective:{type:String,default:"if"},nativeScrollbar:{type:Boolean,default:!0},zIndex:Number,onMaskClick:Function,scrollbarProps:Object,contentStyle:[Object,String],trapFocus:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0},resizable:Boolean,defaultWidth:{type:[Number,String],default:251},defaultHeight:{type:[Number,String],default:251},onUpdateWidth:[Function,Array],onUpdateHeight:[Function,Array],"onUpdate:width":[Function,Array],"onUpdate:height":[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onAfterLeave:Function,drawerStyle:[String,Object],drawerClass:String,target:null,onShow:Function,onHide:Function}),Kt=Z({name:"Drawer",inheritAttrs:!1,props:qt,setup(r){const{mergedClsPrefixRef:o,namespaceRef:s,inlineThemeDisabled:C}=Le(r),_=at(),u=Fe("Drawer","-drawer",Yt,ut,r,o),c=I(r.defaultWidth),n=I(r.defaultHeight),a=Be(Re(r,"width"),c),f=Be(Re(r,"height"),n),v=L(()=>{const{placement:$}=r;return $==="top"||$==="bottom"?"":Ie(a.value)}),k=L(()=>{const{placement:$}=r;return $==="left"||$==="right"?"":Ie(f.value)}),z=$=>{const{onUpdateWidth:A,"onUpdate:width":g}=r;A&&ee(A,$),g&&ee(g,$),c.value=$},T=$=>{const{onUpdateHeight:A,"onUpdate:width":g}=r;A&&ee(A,$),g&&ee(g,$),n.value=$},b=L(()=>[{width:v.value,height:k.value},r.drawerStyle||""]);function i($){const{onMaskClick:A,maskClosable:g}=r;g&&N(!1),A&&A($)}const p=it();function B($){var A;(A=r.onEsc)===null||A===void 0||A.call(r),r.show&&r.closeOnEsc&&ft($)&&!p.value&&N(!1)}function N($){const{onHide:A,onUpdateShow:g,"onUpdate:show":E}=r;g&&ee(g,$),E&&ee(E,$),A&&!$&&ee(A,$)}fe(Te,{isMountedRef:_,mergedThemeRef:u,mergedClsPrefixRef:o,doUpdateShow:N,doUpdateHeight:T,doUpdateWidth:z});const H=L(()=>{const{common:{cubicBezierEaseInOut:$,cubicBezierEaseIn:A,cubicBezierEaseOut:g},self:{color:E,textColor:F,boxShadow:Y,lineHeight:J,headerPadding:ge,footerPadding:re,bodyPadding:ye,titleFontSize:_e,titleTextColor:xe,titleFontWeight:we,headerBorderBottom:oe,footerBorderTop:ae,closeIconColor:ke,closeIconColorHover:$e,closeIconColorPressed:w,closeColorHover:m,closeColorPressed:h,closeIconSize:y,closeSize:x,closeBorderRadius:P,resizableTriggerColorHover:G}}=u.value;return{"--n-line-height":J,"--n-color":E,"--n-text-color":F,"--n-box-shadow":Y,"--n-bezier":$,"--n-bezier-out":g,"--n-bezier-in":A,"--n-header-padding":ge,"--n-body-padding":ye,"--n-footer-padding":re,"--n-title-text-color":xe,"--n-title-font-size":_e,"--n-title-font-weight":we,"--n-header-border-bottom":oe,"--n-footer-border-top":ae,"--n-close-icon-color":ke,"--n-close-icon-color-hover":$e,"--n-close-icon-color-pressed":w,"--n-close-size":x,"--n-close-color-hover":m,"--n-close-color-pressed":h,"--n-close-icon-size":y,"--n-close-border-radius":P,"--n-resize-trigger-color-hover":G}}),M=C?lt("drawer",void 0,H,r):void 0;return{mergedClsPrefix:o,namespace:s,mergedBodyStyle:b,handleMaskClick:i,handleEsc:B,mergedTheme:u,cssVars:C?void 0:H,themeClass:M==null?void 0:M.themeClass,onRender:M==null?void 0:M.onRender,isMounted:_}},render(){const{mergedClsPrefix:r}=this;return D(dt,{to:this.to,show:this.show},{default:()=>{var o;return(o=this.onRender)===null||o===void 0||o.call(this),ze(D("div",{class:[`${r}-drawer-container`,this.namespace,this.themeClass],style:this.cssVars,role:"none"},this.showMask?D(je,{name:"fade-in-transition",appear:this.isMounted},{default:()=>this.show?D("div",{"aria-hidden":!0,class:[`${r}-drawer-mask`,this.showMask==="transparent"&&`${r}-drawer-mask--invisible`],onClick:this.handleMaskClick}):null}):null,D(It,Object.assign({},this.$attrs,{class:[this.drawerClass,this.$attrs.class],style:[this.mergedBodyStyle,this.$attrs.style],blockScroll:this.blockScroll,contentStyle:this.contentStyle,placement:this.placement,scrollbarProps:this.scrollbarProps,show:this.show,displayDirective:this.displayDirective,nativeScrollbar:this.nativeScrollbar,onAfterEnter:this.onAfterEnter,onAfterLeave:this.onAfterLeave,trapFocus:this.trapFocus,autoFocus:this.autoFocus,resizable:this.resizable,showMask:this.showMask,onEsc:this.handleEsc,onClickoutside:this.handleMaskClick}),this.$slots)),[[ct,{zIndex:this.zIndex,enabled:this.show}]])}})}}),Jt={title:{type:String},headerStyle:[Object,String],footerStyle:[Object,String],bodyStyle:[Object,String],bodyContentStyle:[Object,String],nativeScrollbar:{type:Boolean,default:!0},scrollbarProps:Object,closable:Boolean},Qt=Z({name:"DrawerContent",props:Jt,setup(){const r=De(Te,null);r||pt("drawer-content","`n-drawer-content` must be placed inside `n-drawer`.");const{doUpdateShow:o}=r;function s(){o(!1)}return{handleCloseClick:s,mergedTheme:r.mergedThemeRef,mergedClsPrefix:r.mergedClsPrefixRef}},render(){const{title:r,mergedClsPrefix:o,nativeScrollbar:s,mergedTheme:C,bodyStyle:_,bodyContentStyle:u,headerStyle:c,footerStyle:n,scrollbarProps:a,closable:f,$slots:v}=this;return D("div",{role:"none",class:[`${o}-drawer-content`,s&&`${o}-drawer-content--native-scrollbar`]},v.header||r||f?D("div",{class:`${o}-drawer-header`,style:c,role:"none"},D("div",{class:`${o}-drawer-header__main`,role:"heading","aria-level":"1"},v.header!==void 0?v.header():r),f&&D(ht,{onClick:this.handleCloseClick,clsPrefix:o,class:`${o}-drawer-header__close`,absolute:!0})):null,s?D("div",{class:`${o}-drawer-body`,style:_,role:"none"},D("div",{class:`${o}-drawer-body-content-wrapper`,style:u,role:"none"},v)):D(Ne,Object.assign({themeOverrides:C.peerOverrides.Scrollbar,theme:C.peers.Scrollbar},a,{class:`${o}-drawer-body`,contentClass:`${o}-drawer-body-content-wrapper`,contentStyle:u}),v),v.footer?D("div",{class:`${o}-drawer-footer`,style:n,role:"none"},v.footer()):null)}}),Zt={1:"注册赠送",2:"受邀请赠送",3:"邀请他人赠送",4:"购买卡密充值",5:"管理员赠送",6:"扫码购买充值",7:"MJ绘画失败退款",8:"签到奖励"},en={class:"flex h-full flex-col"},tn=t("div",null,"用户钱包余额",-1),nn=t("div",{class:"text-[#95aac9] mb-2 text-base"}," 基础模型余额 ",-1),on={class:"text-3xl text-[#555]"},sn=t("span",{class:"ml-4 text-[#989898]"},"每次对话根据模型消费不同积分!",-1),rn=t("div",{class:"text-[#95aac9] mb-2 text-base"}," 高级模型余额 ",-1),an={class:"text-3xl text-[#555]"},ln=t("span",{class:"ml-4 text-[#989898]"},"每次对话根据模型消费不同积分!",-1),cn=t("div",{class:"text-[#95aac9] mb-2 text-base"}," MJ绘画余额 ",-1),dn={class:"text-3xl text-[#555]"},un=t("span",{class:"ml-4 text-[#989898]"},"根据画图动作消耗不同的积分!",-1),fn=t("div",{class:"text-[#95aac9] mb-2 text-base"}," 卡密充值 ",-1),pn=t("div",null,"充值记录",-1),hn={class:"relative"},mn=["src"],vn={class:"flex justify-between items-end min-h-28"},bn=t("span",{class:"text-sm font-bold mr-1"},"基础模型额度",-1),gn={class:"font-bold"},yn={class:"flex justify-between items-end min-h-28"},_n=t("span",{class:"text-sm font-bold mr-1"},"高级模型额度",-1),xn={class:"font-bold"},wn={class:"flex justify-between items-end min-h-28"},kn=t("span",{class:"text-sm font-bold mr-1"},"MJ绘画额度",-1),$n={class:"font-bold"},Sn={class:"flex justify-between items-end mt-5"},Cn={class:"text-xl text-[red] font-bold"},zn=Z({__name:"wallet",setup(r){const{isSmallMd:o,isMobile:s}=me(),C=ce(),_=ve();mt();const u=L(()=>C.userBalance),c=I(!1),n=I(""),a=I(!1),f=I([]),v=I(!1),k=Ue({page:1,pageSize:10,showSizePicker:!0,pageSizes:[10,20,50],onChange:M=>{k.page=M,b()},onUpdatePageSize:M=>{k.pageSize=M,k.page=1,b()}}),z=L(()=>[{title:"订单编号",key:"uid"},{title:"充值类型",key:"rechargeType",render(M){return Zt[M.rechargeType]}},{title:"基础模型额度",key:"model3Count"},{title:"高级模型额度",key:"model4Count"},{title:"MJ绘画额度",key:"drawMjCount"},{title:"有效期",key:"expireDateCn"},{title:"充值时间",key:"createdAt",render(M){return M.createdAt}}]),T=I([]);async function b(){const M=await vt({page:k.page,size:k.pageSize}),{rows:$}=M.data;T.value=$}async function i(){if(!n.value)return _.warning("请先填写卡密!");try{c.value=!0,await gt({code:n.value}),_.success("卡密兑换成功、祝您使用愉快!"),b(),C.getUserInfo(),c.value=!1}catch{c.value=!1}}function p(){a.value=!0}async function B(){const M=await yt({status:1,size:30});f.value=M.data.rows}const N=L(()=>{var M;return(M=C.globalConfig)==null?void 0:M.buyCramiAddress});function H(){window.open(N.value)}return be(()=>{b()}),(M,$)=>(O(),X("div",en,[d(e(ne),null,{header:l(()=>[tn]),default:l(()=>[d(e(le),{"x-gap":24,"y-gap":24,cols:e(o)?1:2,class:"mt-3"},{default:l(()=>[d(e(q),{class:"border dark:border-[#ffffff17] rounded-sm p-3"},{default:l(()=>[nn,t("b",on,S(e(u).sumModel3Count??0),1),j(),sn]),_:1}),d(e(q),{class:"border dark:border-[#ffffff17] rounded-sm p-3"},{default:l(()=>[rn,t("b",an,S(e(u).sumModel4Count??0),1),j(),ln]),_:1}),d(e(q),{class:"border dark:border-[#ffffff17] rounded-sm p-3"},{default:l(()=>[cn,t("b",dn,S(e(u).sumDrawMjCount??0),1),j(),un]),_:1}),d(e(q),{class:"border dark:border-[#ffffff17] rounded-sm p-3"},{default:l(()=>[fn,d(e(Ae),{wrap:!1},{default:l(()=>[d(e(te),{value:n.value,"onUpdate:value":$[0]||($[0]=A=>n.value=A),placeholder:"请粘贴或填写您的卡密信息!",class:"mr-3",maxlength:"128","show-count":"",clearable:""},null,8,["value"]),d(e(U),{type:"primary",loading:c.value,onClick:i},{default:l(()=>[j(" 兑换 ")]),_:1},8,["loading"]),e(N)?(O(),W(e(U),{key:0,type:"success",onClick:p},{default:l(()=>[j(" 购买卡密 ")]),_:1})):K("",!0)]),_:1})]),_:1})]),_:1},8,["cols"])]),_:1}),d(e(ne),{class:"mt-5 flex-1"},{header:l(()=>[pn]),default:l(()=>[d(e(Ve),{columns:e(z),loading:v.value,"scroll-x":800,data:T.value,"max-height":"280",pagination:k},null,8,["columns","loading","data","pagination"])]),_:1}),d(e(Kt),{show:a.value,"onUpdate:show":$[1]||($[1]=A=>a.value=A),width:e(o)?"100%":502,"on-after-enter":B},{default:l(()=>[d(e(Qt),{title:"套餐购买",closable:""},{default:l(()=>[d(e(le),{"x-gap":15,"y-gap":15,cols:e(o)?1:2,class:"mt-3"},{default:l(()=>[(O(!0),X(He,null,bt(f.value,(A,g)=>(O(),W(e(q),{key:g},{default:l(()=>[d(e(ne),{size:"small",embedded:""},{header:l(()=>[t("div",hn,[t("b",null,S(A.name),1)])]),cover:l(()=>[t("img",{src:A.coverImg},null,8,mn)]),default:l(()=>[t("div",null,[t("p",null,S(A.des),1),t("div",vn,[bn,t("span",gn,S(A.model3Count),1)]),t("div",yn,[_n,t("span",xn,S(A.model4Count),1)]),t("div",wn,[kn,t("span",$n,S(A.drawMjCount),1)]),t("div",Sn,[t("i",Cn,S(`¥${A.price}`),1),d(e(U),{type:"primary",dashed:"",size:"small",onClick:H},{default:l(()=>[j(" 购买套餐 ")]),_:1})])])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["cols"])]),_:1})]),_:1},8,["show","width"])]))}}),En={class:"flex flex-col justify-center items-center"},Tn={class:"text-2xl text-primary self-start mb-3 flex justify-between w-full"},An=t("span",null,"Profile",-1),Pn={class:"mt-3 text-lg text-[#555]"},Mn={class:"text-[#95aac9] mt-2"},Bn={class:"text-[#555] mt-3 px-4"},Rn={class:"self-start"},In=t("div",{class:"flex pl-3 pt-3 text-base font-bold text-primary"},[t("span",null,"我的账户余额")],-1),On={key:0,class:"flex pl-3 pt-3 text-base font-bold text-primary"},Dn=t("span",null,"会员过期时间:",-1),Ln={class:"flex items-center space-x-4 pl-3 mt-3"},jn=t("span",{class:"flex-shrink-0 w-24 text-primary"},"基础模型余额:",-1),Nn={class:"w-[200px]"},Fn={class:"flex items-center space-x-4 pl-3 mt-3"},Un=t("span",{class:"flex-shrink-0 w-24 text-primary"},"高级模型余额:",-1),Hn={class:"w-[200px]"},Wn={class:"flex items-center space-x-4 pl-3 mt-3"},Gn=t("span",{class:"flex-shrink-0 w-24 text-primary"},"绘画余额:",-1),Vn={class:"w-[200px]"},Xn={class:"flex items-center space-x-4 pl-3 mt-3"},Yn=t("span",{class:"flex-shrink-0 w-24 text-primary"},"绑定微信:",-1),qn={class:"w-[200px]"},Kn={key:1},Jn=Z({__name:"detail",setup(r){const o=ce(),s=We(),{userBalance:C}=o,_=Ge(),u=L(()=>o.userInfo.email||""),c=L(()=>o.userInfo.isBindWx),n=I(o.userInfo.avatar??pe),a=I(o.userInfo.username??"未登录"),f=I(o.userInfo.sign??"我是一台基于深度学习和自然语言处理技术的 AI 机器人,旨在为用户提供高效、精准、个性化的智能服务。");function v(){o.logOut(),s.push("/")}const k=L(()=>o.isLogin);return be(()=>{k.value||o.setLoginDialog(!0)}),(z,T)=>(O(),X("div",En,[t("div",Tn,[An,e(k)?(O(),W(e(U),{key:0,tertiary:"",type:"error",onClick:v},{default:l(()=>[j(" 退出登录 ")]),_:1})):K("",!0),e(k)?K("",!0):(O(),W(e(U),{key:1,tertiary:"",type:"success",onClick:T[0]||(T[0]=b=>e(o).setLoginDialog(!0))},{default:l(()=>[j(" 点击登入 ")]),_:1}))]),d(e(Pe),{size:148,src:n.value,"fallback-src":e(pe)},null,8,["src","fallback-src"]),t("b",Pn,S(a.value),1),t("span",Mn,S(e(u)),1),t("div",Bn,S(f.value),1),t("div",Rn,[In,e(C).expirationTime?(O(),X("div",On,[Dn,t("span",null,S(e(C).expirationTime),1)])):K("",!0),t("div",Ln,[jn,t("div",Nn,S(e(C).sumModel3Count||"0")+" 积分 ",1)]),t("div",Fn,[Un,t("div",Hn,S(e(C).sumModel4Count||"0")+" 积分 ",1)]),t("div",Wn,[Gn,t("div",Vn,S(e(C).sumDrawMjCount||"0")+" 积分 ",1)]),t("div",Xn,[Yn,t("div",qn,[e(c)?(O(),X("span",Kn,"已绑定微信")):(O(),W(e(U),{key:0,text:"",onClick:T[1]||(T[1]=b=>e(_).updateBindwxDialog(!0))},{default:l(()=>[j(" 点击绑定微信 ")]),_:1}))])])])]))}}),Qn=t("div",null,"变更您的密码",-1),Zn={class:"flex justify-between"},eo=t("span",{class:"text-[#95AAC9]"},"更新密码完成后将重新登录!",-1),to=t("b",{class:"text-base"},"密码要求",-1),no=t("p",{class:"text-[#95AAC9] mt-3"}," 要创建一个新的密码,你必须满足以下所有要求。 ",-1),oo=t("div",{class:"ml-3 text-[#95AAC9] mt-2"}," 最少6个字符 ",-1),so=t("div",{class:"ml-3 text-[#95AAC9] mt-2"}," 最多30个字符 ",-1),ro=t("div",{class:"ml-3 text-[#95AAC9] mt-2"}," 至少带有一个数字 ",-1),ao=Z({__name:"password",setup(r){const o=I({oldPassword:"",password:"",reenteredPassword:""}),s=o,C=I(null),_=I(null),u={oldPassword:[{required:!0,min:6,message:"密码最短长度为6位数",trigger:["blur"]},{required:!0,max:30,message:"密码最长长度为30位数",trigger:["blur"]}],password:[{required:!0,message:"请输入密码"}],reenteredPassword:[{required:!0,message:"请再次输入密码",trigger:["input","blur"]},{validator:c,message:"两次密码输入不一致",trigger:"input"},{validator:n,message:"两次密码输入不一致",trigger:["blur","password-input"]}]};function c(i,p){return!!o.value.password&&o.value.password.startsWith(p)&&o.value.password.length>=p.length}function n(i,p){return p===o.value.password}function a(){var i;o.value.reenteredPassword&&((i=_.value)==null||i.validate({trigger:"password-input"}))}const{isSmallXl:f}=me(),v=ce(),k=ve();async function z(i){(await xt(i)).success&&k.success("密码更新成功、请重新登录系统!"),T(),v.updatePasswordSuccess()}function T(){o.value={oldPassword:"",password:"",reenteredPassword:""}}function b(i){var p;i.preventDefault(),(p=C.value)==null||p.validate(async B=>{if(!B){const{oldPassword:N,password:H}=o.value;z({oldPassword:N,password:H})}})}return(i,p)=>(O(),W(e(ne),null,{header:l(()=>[Qn]),default:l(()=>[d(e(le),{"x-gap":24,"y-gap":24,cols:e(f)?1:3,class:"mt-3"},{default:l(()=>[d(e(q),{class:"border rounded-sm p-3 dark:border-[#ffffff17]",span:"2"},{default:l(()=>[d(e(_t),{ref_key:"formRef",ref:C,model:e(s),rules:u},{default:l(()=>[d(e(Se),{path:"oldPassword",label:"旧密码"},{default:l(()=>[d(e(te),{value:e(s).oldPassword,"onUpdate:value":p[0]||(p[0]=B=>e(s).oldPassword=B),onKeydown:p[1]||(p[1]=Ce(Oe(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),d(e(Se),{path:"password",label:"新密码"},{default:l(()=>[d(e(te),{value:e(s).password,"onUpdate:value":p[2]||(p[2]=B=>e(s).password=B),type:"password",onInput:a,onKeydown:p[3]||(p[3]=Ce(Oe(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),d(e(Se),{ref_key:"rPasswordFormItemRef",ref:_,first:"",path:"reenteredPassword",label:"确认密码"},{default:l(()=>[d(e(te),{value:e(s).reenteredPassword,"onUpdate:value":p[4]||(p[4]=B=>e(s).reenteredPassword=B),disabled:!e(s).password,type:"password",tabindex:"0",onKeyup:Ce(b,["enter"])},null,8,["value","disabled","onKeyup"])]),_:1},512),t("div",Zn,[eo,d(e(U),{disabled:e(s).oldPassword===null,type:"primary",onClick:b},{default:l(()=>[j(" 更新您的密码 ")]),_:1},8,["disabled"])])]),_:1},8,["model"])]),_:1}),d(e(q),{class:"border rounded-sm p-3 bg-[#f8f9fa] h-48 dark:bg-[#18181c] dark:border-[#ffffff17]"},{default:l(()=>[to,no,oo,so,ro]),_:1})]),_:1},8,["cols"])]),_:1}))}});var Xe={exports:{}};/*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */(function(r,o){(function(C,_){r.exports=_()})(wt,function(){return function(){var s={686:function(u,c,n){n.d(c,{default:function(){return $e}});var a=n(279),f=n.n(a),v=n(370),k=n.n(v),z=n(817),T=n.n(z);function b(w){try{return document.execCommand(w)}catch{return!1}}var i=function(m){var h=T()(m);return b("cut"),h},p=i;function B(w){var m=document.documentElement.getAttribute("dir")==="rtl",h=document.createElement("textarea");h.style.fontSize="12pt",h.style.border="0",h.style.padding="0",h.style.margin="0",h.style.position="absolute",h.style[m?"right":"left"]="-9999px";var y=window.pageYOffset||document.documentElement.scrollTop;return h.style.top="".concat(y,"px"),h.setAttribute("readonly",""),h.value=w,h}var N=function(m,h){var y=B(m);h.container.appendChild(y);var x=T()(y);return b("copy"),y.remove(),x},H=function(m){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},y="";return typeof m=="string"?y=N(m,h):m instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(m==null?void 0:m.type)?y=N(m.value,h):(y=T()(m),b("copy")),y},M=H;function $(w){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$=function(h){return typeof h}:$=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},$(w)}var A=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=m.action,y=h===void 0?"copy":h,x=m.container,P=m.target,G=m.text;if(y!=="copy"&&y!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(P!==void 0)if(P&&$(P)==="object"&&P.nodeType===1){if(y==="copy"&&P.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(y==="cut"&&(P.hasAttribute("readonly")||P.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(G)return M(G,{container:x});if(P)return y==="cut"?p(P):M(P,{container:x})},g=A;function E(w){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(h){return typeof h}:E=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},E(w)}function F(w,m){if(!(w instanceof m))throw new TypeError("Cannot call a class as a function")}function Y(w,m){for(var h=0;h"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function oe(w){return oe=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)},oe(w)}function ae(w,m){var h="data-clipboard-".concat(w);if(m.hasAttribute(h))return m.getAttribute(h)}var ke=function(w){ge(h,w);var m=ye(h);function h(y,x){var P;return F(this,h),P=m.call(this),P.resolveOptions(x),P.listenClick(y),P}return J(h,[{key:"resolveOptions",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof x.action=="function"?x.action:this.defaultAction,this.target=typeof x.target=="function"?x.target:this.defaultTarget,this.text=typeof x.text=="function"?x.text:this.defaultText,this.container=E(x.container)==="object"?x.container:document.body}},{key:"listenClick",value:function(x){var P=this;this.listener=k()(x,"click",function(G){return P.onClick(G)})}},{key:"onClick",value:function(x){var P=x.delegateTarget||x.currentTarget,G=this.action(P)||"copy",de=g({action:G,container:this.container,target:this.target(P),text:this.text(P)});this.emit(de?"success":"error",{action:G,text:de,trigger:P,clearSelection:function(){P&&P.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(x){return ae("action",x)}},{key:"defaultTarget",value:function(x){var P=ae("target",x);if(P)return document.querySelector(P)}},{key:"defaultText",value:function(x){return ae("text",x)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(x){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return M(x,P)}},{key:"cut",value:function(x){return p(x)}},{key:"isSupported",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],P=typeof x=="string"?[x]:x,G=!!document.queryCommandSupported;return P.forEach(function(de){G=G&&!!document.queryCommandSupported(de)}),G}}]),h}(f()),$e=ke},828:function(u){var c=9;if(typeof Element<"u"&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}function a(f,v){for(;f&&f.nodeType!==c;){if(typeof f.matches=="function"&&f.matches(v))return f;f=f.parentNode}}u.exports=a},438:function(u,c,n){var a=n(828);function f(z,T,b,i,p){var B=k.apply(this,arguments);return z.addEventListener(b,B,p),{destroy:function(){z.removeEventListener(b,B,p)}}}function v(z,T,b,i,p){return typeof z.addEventListener=="function"?f.apply(null,arguments):typeof b=="function"?f.bind(null,document).apply(null,arguments):(typeof z=="string"&&(z=document.querySelectorAll(z)),Array.prototype.map.call(z,function(B){return f(B,T,b,i,p)}))}function k(z,T,b,i){return function(p){p.delegateTarget=a(p.target,T),p.delegateTarget&&i.call(z,p)}}u.exports=v},879:function(u,c){c.node=function(n){return n!==void 0&&n instanceof HTMLElement&&n.nodeType===1},c.nodeList=function(n){var a=Object.prototype.toString.call(n);return n!==void 0&&(a==="[object NodeList]"||a==="[object HTMLCollection]")&&"length"in n&&(n.length===0||c.node(n[0]))},c.string=function(n){return typeof n=="string"||n instanceof String},c.fn=function(n){var a=Object.prototype.toString.call(n);return a==="[object Function]"}},370:function(u,c,n){var a=n(879),f=n(438);function v(b,i,p){if(!b&&!i&&!p)throw new Error("Missing required arguments");if(!a.string(i))throw new TypeError("Second argument must be a String");if(!a.fn(p))throw new TypeError("Third argument must be a Function");if(a.node(b))return k(b,i,p);if(a.nodeList(b))return z(b,i,p);if(a.string(b))return T(b,i,p);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function k(b,i,p){return b.addEventListener(i,p),{destroy:function(){b.removeEventListener(i,p)}}}function z(b,i,p){return Array.prototype.forEach.call(b,function(B){B.addEventListener(i,p)}),{destroy:function(){Array.prototype.forEach.call(b,function(B){B.removeEventListener(i,p)})}}}function T(b,i,p){return f(document.body,b,i,p)}u.exports=v},817:function(u){function c(n){var a;if(n.nodeName==="SELECT")n.focus(),a=n.value;else if(n.nodeName==="INPUT"||n.nodeName==="TEXTAREA"){var f=n.hasAttribute("readonly");f||n.setAttribute("readonly",""),n.select(),n.setSelectionRange(0,n.value.length),f||n.removeAttribute("readonly"),a=n.value}else{n.hasAttribute("contenteditable")&&n.focus();var v=window.getSelection(),k=document.createRange();k.selectNodeContents(n),v.removeAllRanges(),v.addRange(k),a=v.toString()}return a}u.exports=c},279:function(u){function c(){}c.prototype={on:function(n,a,f){var v=this.e||(this.e={});return(v[n]||(v[n]=[])).push({fn:a,ctx:f}),this},once:function(n,a,f){var v=this;function k(){v.off(n,k),a.apply(f,arguments)}return k._=a,this.on(n,k,f)},emit:function(n){var a=[].slice.call(arguments,1),f=((this.e||(this.e={}))[n]||[]).slice(),v=0,k=f.length;for(v;v{const o=(r==null?void 0:r.appendToBody)===void 0?!0:r.appendToBody;return{toClipboard(s,C){return new Promise((_,u)=>{const c=document.createElement("button"),n=new lo(c,{text:()=>s,action:()=>"copy",container:C!==void 0?C:document.body});n.on("success",a=>{n.destroy(),_(a)}),n.on("error",a=>{n.destroy(),u(a)}),o&&document.body.appendChild(c),c.click(),o&&document.body.removeChild(c)})}}},uo=t("div",null,"邀用户、得福利!",-1),fo=t("div",{class:"text-[#95aac9] mb-2 text-base"}," 我的邀请码 ",-1),po={class:"text-2xl text-[#555] dark:text-[#fff] whitespace-nowrap"},ho=t("b",{class:"text-[000]"},"Tips",-1),mo={class:"flex flex-col text-[#707384]"},vo=t("div",null,"邀请记录",-1),bo=Z({__name:"invite",setup(r){const{toClipboard:o}=co(),s=ce(),C=L(()=>s.userInfo.inviteCode),_=L(()=>s.globalConfig),{isSmallXl:u,isMobile:c}=me(),n=ve(),a=I(!1),f=Ue({page:1,pageSize:10,showSizePicker:!0,pageSizes:[10,20,50],onChange:i=>{f.page=i,T()},onUpdatePageSize:i=>{f.pageSize=i,f.page=1,T()}}),v=L(()=>[{title:"头像",key:"avatar",render(i){return D(Pe,{src:i.avatar,size:"small",round:!0})}},{title:"用户名称",key:"username"},{title:"用户邮箱",key:"email"},{title:"受邀人状态",key:"status",render(i){return D(U,{type:i.status===1?"primary":"error",size:"small",round:!0,quaternary:!0},{default:()=>i.status===1?"已认证":"未激活"})}},{title:"邀请时间",key:"createdAt",render(i){return D("div",{style:{fontSize:"12px",color:"#999"}},()=>i.createdAt)}},{title:"获得奖励状态",key:"status",render(i){return D(U,{type:i.status===1?"success":"warning",size:"small",round:!0,quaternary:!0},{default:()=>i.status===1?"已领取邀请奖励":"等待受邀人确认"})}}]),k=I([]);async function z(){const i=await St();if(!i.data)return n.error(i.message);n.success("生成邀请链接成功"),s.getUserInfo()}async function T(){try{a.value=!0;const i=await $t({page:f.page,size:f.pageSize});k.value=i.data.rows,a.value=!1}catch{a.value=!1}}async function b(){if(!C.value)return n.error("请先生成您的专属邀请链接!");const i=`${window.location.href}?inVitecode=${C.value}`;try{await o(i),n.success("复制专属邀请链接成功!")}catch{n.error("当前设置不支持自动复制、手动复制吧!")}}return be(()=>{T()}),(i,p)=>(O(),X(He,null,[d(e(ne),null,{header:l(()=>[uo]),default:l(()=>[d(e(le),{"x-gap":24,"y-gap":24,cols:e(u)?1:3,class:"mt-3"},{default:l(()=>{var B;return[d(e(q),{class:"border rounded-sm p-3 dark:border-[#ffffff17]",span:2},{default:l(()=>[fo,t("div",{class:Ee(["flex justify-between",[e(u)?"flex-col mt-3":""]])},[t("b",po,S(e(C)||"********"),1),d(e(Ae),{class:Ee([e(u)?" mt-3":""])},{default:l(()=>[d(e(U),{type:"success",onClick:z},{default:l(()=>[j(" 生成专属邀请码 ")]),_:1}),d(e(U),{type:"primary",onClick:b},{default:l(()=>[j(" 复制专属邀请链接 ")]),_:1})]),_:1},8,["class"])],2)]),_:1}),Number((B=e(_))==null?void 0:B.inviteSendStatus)===1?(O(),W(e(q),{key:0,class:"border rounded-sm p-3 dark:border-[#ffffff17]",span:1},{default:l(()=>[ho,t("div",mo,[t("span",null,"邀请一位用户赠送"+S(e(_).inviteGiveSendModel3Count)+"积分基础模型额度+"+S(e(_).inviteGiveSendModel4Count)+"积分高级模型额度+"+S(e(_).inviteGiveSendDrawMjCount)+"MJ绘画积分额度",1),t("span",null,"收到邀请用户获得"+S(e(_).invitedGuestSendModel3Count)+"积分基础模型额度+"+S(e(_).invitedGuestSendModel4Count)+"积分高级模型额度+"+S(e(_).invitedGuestSendDrawMjCount)+"MJ绘画积分额度",1)])]),_:1})):K("",!0)]}),_:1},8,["cols"])]),_:1}),d(e(ne),{class:"mt-5"},{header:l(()=>[vo]),default:l(()=>[d(e(Ve),{loading:a.value,remote:!0,"pagination-behavior-on-filter":"first",class:"min-h-[350px]",columns:e(v),data:k.value,pagination:f,"scroll-x":500},null,8,["loading","columns","data","pagination"])]),_:1})],64))}}),go={class:"flex flex-col justify-center items-center"},yo={class:"text-2xl text-primary self-start mb-14 flex justify-between w-full"},_o=t("span",null,"Profile",-1),xo={class:"mt-3 text-lg text-[#555]"},wo={class:"text-[#95aac9] mt-2"},ko={class:"text-[#555] mt-3 px-4"},$o={class:"self-start mt-16"},So=t("div",{class:"text-xl text-primary"}," 我在本站的使用记录 ",-1),Co={class:"flex items-center space-x-4 pl-3 mt-3"},zo=t("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"基础模型积分:",-1),Eo={class:"w-[230px]"},To={class:"flex items-center space-x-4 pl-3 mt-3"},Ao=t("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"高级模型积分:",-1),Po={class:"w-[230px]"},Mo={class:"flex items-center space-x-4 pl-3 mt-3"},Bo=t("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"基础模型使用:",-1),Ro={class:"w-[230px]"},Io={class:"flex items-center space-x-4 pl-3 mt-3"},Oo=t("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"高级模型使用:",-1),Do={class:"w-[230px]"},Lo={class:"flex items-center space-x-4 pl-3 mt-3"},jo=t("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"绘画使用积分:",-1),No={class:"w-[230px]"},Fo={key:0,class:"flex items-center space-x-4 pl-3 mt-3"},Uo=t("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"绑定微信:",-1),Ho={class:"w-[230px]"},Wo={key:1},Go={key:1,class:"flex items-center space-x-4 pl-3 mt-3"},Vo=t("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"绑定微信:",-1),Xo={class:"w-[230px]"},Yo={key:0,class:"flex text-[red] pt-8 text-base font-bold"},qo=t("span",null,"会员过期时间:",-1),Ko={key:1},Jo={class:"flex items-center space-x-4"},Qo={class:"flex-shrink-0 w-[60px]"},Zo={class:"flex-1"},es={class:"flex items-center space-x-4 mt-5"},ts={class:"flex-shrink-0 w-[60px]"},ns={class:"flex-1"},os={class:"flex space-x-4 mt-5"},ss={class:"flex-shrink-0 w-[60px]"},rs={class:"flex-1"},fs=Z({__name:"index",setup(r){const o=Ge(),s=ce(),C=We(),_=I(0),u=L(()=>s.userBalance),c=L(()=>{var g;return(g=s.globalConfig)==null?void 0:g.isUseWxLogin}),n=I(!0),a=L(()=>s.isLogin),f=ve(),v=L(()=>s.userInfo.email||""),k=L(()=>s.userInfo.isBindWx),z=I(s.userInfo.avatar??pe),T=I(s.userInfo.username??"未登录"),b=I(s.userInfo.sign??"我是一台基于深度学习和自然语言处理技术的 AI 机器人,旨在为用户提供高效、精准、个性化的智能服务。"),i=I(!1),{isSmallLg:p,isMobile:B}=me();async function N(){const g=await Ct();_.value=g.data||0}async function H(){(await At()).success&&f.success("已同步数据完成"),N()}async function M(g){try{i.value=!0;const E=await Pt(g);if(i.value=!1,!E.success)return f.error(E.message);f.success(Mt("common.updateUserSuccess")),s.getUserInfo()}catch{i.value=!1}}function $(){a.value||s.setLoginDialog(!0)}be(()=>{$(),N()});function A(){s.logOut(),C.push("/")}return setTimeout(()=>{n.value=!1},500),(g,E)=>(O(),W(e(Tt),{"has-sider":"",class:"flex h-full"},{default:l(()=>[e(p)?K("",!0):(O(),W(e(Rt),{key:0,"content-style":"padding: 24px;",bordered:"",width:"380"},{default:l(()=>[t("div",go,[t("div",yo,[_o,d(e(U),{tertiary:"",type:"error",onClick:A},{default:l(()=>[j(" 退出登录 ")]),_:1})]),d(e(Pe),{size:148,src:z.value,"fallback-src":e(pe)},null,8,["src","fallback-src"]),t("b",xo,S(T.value),1),t("span",wo,S(e(v)),1),t("div",ko,S(b.value),1),t("div",$o,[So,t("div",Co,[zo,t("div",Eo,S(e(u).useModel3Count||"0")+" 积分 ",1)]),t("div",To,[Ao,t("div",Po,S(e(u).useModel4Count||"0")+" 积分 ",1)]),t("div",Mo,[Bo,t("div",Ro,S(e(u).useModel3Token||"0")+" Token ",1)]),t("div",Io,[Oo,t("div",Do,S(e(u).useModel4Token||"0")+" Token ",1)]),t("div",Lo,[jo,t("div",No,S(e(u).useDrawMjToken||"0")+" 积分 ",1)]),e(c)?(O(),X("div",Fo,[Uo,t("div",Ho,[e(k)?(O(),X("span",Wo,"已绑定微信")):(O(),W(e(U),{key:0,text:"",onClick:E[0]||(E[0]=F=>e(o).updateBindwxDialog(!0))},{default:l(()=>[j(" 点击绑定微信 ")]),_:1}))])])):K("",!0),_.value>0?(O(),X("div",Go,[Vo,t("div",Xo,[d(e(U),{text:"",onClick:H},{default:l(()=>[j(" 点击同步访客数据 ")]),_:1})])])):K("",!0)])]),e(u).expirationTime?(O(),X("div",Yo,[qo,t("span",null,S(e(u).expirationTime),1)])):K("",!0)]),_:1})),t("div",{class:Ee(["flex flex-col",[e(B)?"w-full":"flex-1"]]),style:Et({padding:e(B)?"10px":"0 28px 0 28px"})},[d(e(Bt),{title:"个人中心",des:"编辑个人信息、查看更多详情",padding:(e(B),1)},null,8,["padding"]),d(e(zt),{type:"line",animated:"",class:"mt-5 flex-1"},{default:l(()=>[e(p)?(O(),W(e(ie),{key:0,name:"detail",tab:"我的详情"},{default:l(()=>[d(Jn)]),_:1})):K("",!0),d(e(ie),{name:"account",tab:"我的钱包"},{default:l(()=>[d(zn)]),_:1}),d(e(ie),{name:"baseInfo",tab:"基础信息"},{default:l(()=>[d(e(ne),null,{header:l(()=>[n.value||!e(a)?(O(),W(e(ue),{key:0,size:"medium",width:"20%"})):(O(),X("div",Ko,"用户基础设置"))]),default:l(()=>[n.value||!e(a)?(O(),W(e(Ae),{key:0,vertical:""},{default:l(()=>[d(e(ue),{height:"40px",size:"medium"}),d(e(ue),{height:"40px",size:"medium"}),d(e(ue),{height:"80px",size:"medium"})]),_:1})):(O(),W(e(le),{key:1,"x-gap":"12",cols:1},{default:l(()=>[d(e(q),null,{default:l(()=>[t("div",Jo,[t("span",Qo,S(g.$t("setting.avatarLink")),1),t("div",Zo,[d(e(te),{value:z.value,"onUpdate:value":E[1]||(E[1]=F=>z.value=F),placeholder:"请填写头像地址"},null,8,["value"])]),d(e(U),{size:"tiny",text:"",type:"primary",onClick:E[2]||(E[2]=F=>M({avatar:z.value}))},{default:l(()=>[j(S(g.$t("common.update")),1)]),_:1})]),t("div",es,[t("span",ts,S(g.$t("setting.name")),1),t("div",ns,[d(e(te),{value:T.value,"onUpdate:value":E[3]||(E[3]=F=>T.value=F),placeholder:"请编辑您的用户名",maxlength:"12","show-count":"",clearable:""},null,8,["value"])]),d(e(U),{size:"tiny",text:"",type:"primary",onClick:E[4]||(E[4]=F=>M({username:T.value}))},{default:l(()=>[j(S(g.$t("common.update")),1)]),_:1})]),t("div",os,[t("span",ss,S(g.$t("setting.sign")),1),t("div",rs,[d(e(te),{value:b.value,"onUpdate:value":E[5]||(E[5]=F=>b.value=F),placeholder:"请编辑您的签名",maxlength:"128","show-count":"",clearable:"",type:"textarea"},null,8,["value"])]),d(e(U),{size:"tiny",text:"",type:"primary",onClick:E[6]||(E[6]=F=>M({sign:b.value}))},{default:l(()=>[j(S(g.$t("common.update")),1)]),_:1})])]),_:1})]),_:1}))]),_:1})]),_:1}),d(e(ie),{name:"password",tab:"密码管理"},{default:l(()=>[d(ao)]),_:1}),d(e(ie),{name:"invite",tab:"邀请得福利"},{default:l(()=>[d(bo)]),_:1})]),_:1})],6)]),_:1}))}});export{fs as default};