function e(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function t(e){return e.status===`banned`}function n(e){return e.review_status===`rejected`}function r(e){return e.review_status!==`pending`||o(e)?!1:!a(e)}function i(e){return t(e)||n(e)||r(e)}function a(e){return!!e.membership_expires_at?.trim()}function o(e){return e.membership_active===!0}function s(t,n=Date.now()){if(o(t))return!0;let r=e(t.membership_expires_at);return r!=null&&r>n}function c(e){return i(e)}function l(e){return i(e)}function u(e){return s(e)}function d(e){return a(e)&&!s(e)?`会员已过期，请前往官网续费后再使用客户端`:`会员未开通或已失效，请前往官网续费`}function f(e){return!(t(e)||n(e))}function p(e){if(!e)return`—`;try{return new Date(e).toLocaleString()}catch{return e}}function m(e){return e.membership_expires_at?.trim()?`会员到期：${p(e.membership_expires_at)}`:null}function h(e,t=!1){return e.review_status===`pending`?`已提交，等待审核中。审核通过后可获赠年卡；期间可修改成员名，不会影响审核进度。`:e.zsxq_member_name?.trim()?`可修改知识星球成员名，修改后无需再次审核。`:`初次提交知识星球成员名后进入审核，通过可获赠年卡；也可官网微信购买月卡/年卡。`}function g(e){return e?.zsxq_member_name?.trim()?`保存修改`:`提交成员名`}function _(e){let t=e.max_devices&&e.max_devices>0?e.max_devices:10,n=e.active_device_count??0,r=`已登录设备 ${n}/${t}`;return n>=Math.max(1,t-2)&&(r+=`，请避免共享账号`),r}function v(e){return t(e)?`账号已封禁，请重新登录或联系管理员`:n(e)?`星球信息审核未通过，如有疑问请联系管理员`:r(e)?`星球信息审核中且未开通会员，请联系管理员`:u(e)?``:d(e)}var y=`https://toolbox.shanzhixuan.com/account`;export{s as a,m as c,g as d,h as f,_ as i,l,f as n,v as o,u as r,d as s,y as t,c as u};