@24city/web-console 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/LICENSE +21 -0
- package/README.md +168 -2
- package/dist/account/account-api.d.ts +24 -0
- package/dist/account/account-center-links.d.ts +35 -0
- package/dist/account/account-center-page.d.ts +7 -0
- package/dist/account/account-center-ui.d.ts +19 -0
- package/dist/account/account-menu.d.ts +23 -0
- package/dist/account/auth-provider.d.ts +6 -0
- package/dist/account/auth-store.d.ts +25 -0
- package/dist/account/benefit-copy.d.ts +15 -0
- package/dist/account/customization.d.ts +62 -0
- package/dist/account/index.d.ts +34 -0
- package/dist/account/index.js +87 -0
- package/dist/account/login-page.d.ts +6 -0
- package/dist/account/logout-signal.d.ts +13 -0
- package/dist/account/personal-nav.d.ts +29 -0
- package/dist/account/plan-benefits.d.ts +16 -0
- package/dist/account/plan-cards.d.ts +10 -0
- package/dist/account/plan-display.d.ts +44 -0
- package/dist/account/plan-panel.d.ts +16 -0
- package/dist/account/points-section.d.ts +8 -0
- package/dist/account/profile-section.d.ts +9 -0
- package/dist/account/quota-pill.d.ts +10 -0
- package/dist/account/quota.d.ts +12 -0
- package/dist/account/route-guard.d.ts +5 -0
- package/dist/account/session-sync.d.ts +1 -0
- package/dist/account/space-label.d.ts +10 -0
- package/dist/account/subscription-section.d.ts +11 -0
- package/dist/account/team-promo.d.ts +9 -0
- package/dist/account/types.d.ts +120 -0
- package/dist/account/upgrade-entry.d.ts +6 -0
- package/dist/account/upgrade-modal.d.ts +14 -0
- package/dist/account/use-account-center.d.ts +27 -0
- package/dist/account/use-logout.d.ts +13 -0
- package/dist/account/use-membership.d.ts +48 -0
- package/dist/account/use-plan-catalog.d.ts +2 -0
- package/dist/account/use-space-switch.d.ts +8 -0
- package/dist/account/wallet-badge.d.ts +2 -0
- package/dist/assets/coin-BhUDKCPy.webp +0 -0
- package/dist/assets/crown-D5kKk5rW.webp +0 -0
- package/dist/assets/diamond-BuDSsnw-.webp +0 -0
- package/dist/assets/engine-hero-BaSSoV-3.webp +0 -0
- package/dist/assets/member-gem-DTY0gTzl.webp +0 -0
- package/dist/assets/team-BeZ_oZcL.webp +0 -0
- package/dist/assets/upgrade-crown-Ci1IFoXi.webp +0 -0
- package/dist/chunks/auth-provider-CqiyTeOt.js +62 -0
- package/dist/chunks/console-layout-BibioK5M.js +198 -0
- package/dist/chunks/context-CaVim6ZO.js +13 -0
- package/dist/chunks/error-boundary-D3qiD7ov.js +35 -0
- package/dist/chunks/http-B3mTs9KZ.js +8 -0
- package/dist/chunks/link-button-giJEcTmG.js +42 -0
- package/dist/chunks/logout-signal-CiD_zY5M.js +365 -0
- package/dist/chunks/page-BaitnD--.js +89 -0
- package/dist/chunks/stale-build-DUKkQHuu.js +57 -0
- package/dist/chunks/text-link-FTsBp_QU.js +54 -0
- package/dist/chunks/upgrade-modal-DzdKuEkJ.js +667 -0
- package/dist/chunks/use-media-query-DvyinWNg.js +12 -0
- package/dist/chunks/wallet-badge-CnyMLpUO.js +565 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +159 -0
- package/dist/layout/console-layout.d.ts +35 -0
- package/dist/layout/console-nav.d.ts +30 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.js +8 -0
- package/dist/page/error-boundary.d.ts +20 -0
- package/dist/page/index.d.ts +7 -0
- package/dist/page/index.js +21 -0
- package/dist/page/link-button.d.ts +29 -0
- package/dist/page/not-found-page.d.ts +1 -0
- package/dist/page/page.d.ts +34 -0
- package/dist/page/startup-error.d.ts +2 -0
- package/dist/page/status-result.d.ts +17 -0
- package/dist/page/text-link.d.ts +22 -0
- package/dist/runtime/context.d.ts +19 -0
- package/dist/runtime/error-summary.d.ts +5 -0
- package/dist/runtime/format.d.ts +10 -0
- package/dist/runtime/http.d.ts +11 -0
- package/dist/runtime/index.d.ts +11 -0
- package/dist/runtime/index.js +41 -0
- package/dist/runtime/internal-path.d.ts +4 -0
- package/dist/runtime/providers.d.ts +16 -0
- package/dist/runtime/query-keys.d.ts +6 -0
- package/dist/runtime/response.d.ts +6 -0
- package/dist/runtime/runtime-config.d.ts +19 -0
- package/dist/runtime/stale-build.d.ts +11 -0
- package/dist/runtime/use-media-query.d.ts +2 -0
- package/dist/semi.d.ts +10 -0
- package/dist/semi.js +12 -0
- package/dist/styles.css +3224 -0
- package/dist/testing/fixtures.d.ts +15 -0
- package/dist/testing/fixtures.js +142 -0
- package/dist/testing/guard.d.ts +32 -0
- package/dist/testing/guard.js +61 -0
- package/dist/testing/jsdom.d.ts +2 -0
- package/dist/testing/jsdom.js +116 -0
- package/dist/theme/index.d.ts +24 -0
- package/dist/theme/index.js +51 -0
- package/dist/theme/palette.d.ts +6 -0
- package/package.json +98 -3
|
@@ -0,0 +1,667 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { Card as x, Button as w, Typography as W, Tag as ge, Skeleton as H, Banner as Ee, RadioGroup as Fe, Avatar as Ue, Space as le, Modal as Re } from "@douyinfe/semi-ui";
|
|
3
|
+
import { IconExternalOpen as ye, IconGift as Me, IconRefresh as fe, IconLock as Oe, IconDesktop as De, IconUserGroup as Ne, IconShield as Be, IconTick as ae, IconMinus as Ve, IconCrown as ze, IconUser as de, IconChevronRight as He, IconExit as Ge } from "@douyinfe/semi-icons";
|
|
4
|
+
import { useParams as qe, useNavigate as ne, useLocation as se, Navigate as ie } from "react-router";
|
|
5
|
+
import { S as je, F as Z, c as z, b as Qe } from "./page-BaitnD--.js";
|
|
6
|
+
import { u as j, a as O, b as D } from "./context-CaVim6ZO.js";
|
|
7
|
+
import { q as E, m as Ye, u as be, C as ve, i as Je, d as he, r as _e } from "./logout-signal-CiD_zY5M.js";
|
|
8
|
+
import { H as Q, I as Se, q as Y, l as Ke, J as we, m as ee, O as Ce, i as ke, r as re, g as G, n as Pe, z as Le, y as Xe, k as We, B as Ze, w as et, L as tt, M as at, p as nt, h as st, F as it, D as rt, G as ct, N as ot, x as lt } from "./wallet-badge-CnyMLpUO.js";
|
|
9
|
+
import { L as ce } from "./link-button-giJEcTmG.js";
|
|
10
|
+
import { useState as dt, useRef as me, useEffect as $e } from "react";
|
|
11
|
+
const ht = {
|
|
12
|
+
/** 统一资料(显示名称)、修改登录密码、登录设备与导出个人数据 */
|
|
13
|
+
settings: "/app/settings",
|
|
14
|
+
/** 当前空间在 24.city 各产品里的积分消耗 */
|
|
15
|
+
points: "/app/points",
|
|
16
|
+
/** 套餐和商品订单 */
|
|
17
|
+
orders: "/app/orders",
|
|
18
|
+
/** 加入的空间、团队成员与邀请 */
|
|
19
|
+
spaces: "/app/spaces"
|
|
20
|
+
}, Ie = (t) => {
|
|
21
|
+
const n = (t == null ? void 0 : t.trim()) ?? "";
|
|
22
|
+
if (!n) return null;
|
|
23
|
+
try {
|
|
24
|
+
const r = new URL(n);
|
|
25
|
+
return r.protocol !== "https:" && r.protocol !== "http:" ? null : `${r.origin}${r.pathname.replace(/\/+$/, "")}`;
|
|
26
|
+
} catch {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}, q = (t, n) => {
|
|
30
|
+
const r = Ie(t);
|
|
31
|
+
return r ? `${r}${ht[n]}` : null;
|
|
32
|
+
}, te = (t, n) => {
|
|
33
|
+
const r = Ie(t);
|
|
34
|
+
if (!r) return null;
|
|
35
|
+
const i = new URLSearchParams();
|
|
36
|
+
return n.productCode && i.set("product_code", n.productCode), i.set("return_url", n.returnUrl), n.spaceId && i.set("space_id", n.spaceId), n.spaceType && i.set("space_type", n.spaceType), n.priceCode && i.set("price_code", n.priceCode), `${r}/plans?${i.toString()}`;
|
|
37
|
+
}, _t = "_center_47ha7_7", mt = "_aside_47ha7_21", ut = "_identityCard_47ha7_27", pt = "_identity_47ha7_27", gt = "_identityAvatar_47ha7_42", yt = "_identityText_47ha7_55", ft = "_identityName_47ha7_64", Nt = "_identitySpace_47ha7_76", bt = "_identitySpaceName_47ha7_91", vt = "_identityRole_47ha7_98", St = "_identityStats_47ha7_108", wt = "_identityStat_47ha7_108", Ct = "_identityStatLabel_47ha7_129", kt = "_identityStatValue_47ha7_135", Pt = "_nav_47ha7_147", Lt = "_navItem_47ha7_156", $t = "_navIcon_47ha7_191", It = "_navLabel_47ha7_202", Tt = "_navArrow_47ha7_207", xt = "_asideFoot_47ha7_223", At = "_logout_47ha7_228", Et = "_main_47ha7_249", Ft = "_head_47ha7_262", Ut = "_title_47ha7_267", Rt = "_description_47ha7_275", Mt = "_card_47ha7_284", Ot = "_usage_47ha7_283", Dt = "_fields_47ha7_316", Bt = "_field_47ha7_316", Vt = "_fieldLabel_47ha7_329", zt = "_fieldValue_47ha7_335", Ht = "_fieldText_47ha7_343", Gt = "_fieldMuted_47ha7_356", qt = "_fieldHint_47ha7_362", jt = "_mono_47ha7_368", Qt = "_inlineTag_47ha7_377", Yt = "_settingList_47ha7_382", Jt = "_settingRow_47ha7_387", Kt = "_settingIcon_47ha7_403", Xt = "_settingText_47ha7_416", Wt = "_settingTitle_47ha7_424", Zt = "_settingDescription_47ha7_431", ea = "_settingAction_47ha7_437", ta = "_note_47ha7_441", aa = "_centerLink_47ha7_461", na = "_centerLinkIcon_47ha7_467", sa = "_heroCard_47ha7_475", ia = "_hero_47ha7_475", ra = "_heroMain_47ha7_499", ca = "_heroEyebrow_47ha7_508", oa = "_heroEyebrowText_47ha7_523", la = "_heroValue_47ha7_534", da = "_heroMeta_47ha7_544", ha = "_heroActions_47ha7_558", _a = "_heroFoot_47ha7_567", ma = "_ownerOnly_47ha7_585", ua = "_heroSkeleton_47ha7_707", a = {
|
|
38
|
+
center: _t,
|
|
39
|
+
aside: mt,
|
|
40
|
+
identityCard: ut,
|
|
41
|
+
identity: pt,
|
|
42
|
+
identityAvatar: gt,
|
|
43
|
+
identityText: yt,
|
|
44
|
+
identityName: ft,
|
|
45
|
+
identitySpace: Nt,
|
|
46
|
+
identitySpaceName: bt,
|
|
47
|
+
identityRole: vt,
|
|
48
|
+
identityStats: St,
|
|
49
|
+
identityStat: wt,
|
|
50
|
+
identityStatLabel: Ct,
|
|
51
|
+
identityStatValue: kt,
|
|
52
|
+
nav: Pt,
|
|
53
|
+
navItem: Lt,
|
|
54
|
+
navIcon: $t,
|
|
55
|
+
navLabel: It,
|
|
56
|
+
navArrow: Tt,
|
|
57
|
+
asideFoot: xt,
|
|
58
|
+
logout: At,
|
|
59
|
+
main: Et,
|
|
60
|
+
head: Ft,
|
|
61
|
+
title: Ut,
|
|
62
|
+
description: Rt,
|
|
63
|
+
card: Mt,
|
|
64
|
+
usage: Ot,
|
|
65
|
+
fields: Dt,
|
|
66
|
+
field: Bt,
|
|
67
|
+
fieldLabel: Vt,
|
|
68
|
+
fieldValue: zt,
|
|
69
|
+
fieldText: Ht,
|
|
70
|
+
fieldMuted: Gt,
|
|
71
|
+
fieldHint: qt,
|
|
72
|
+
mono: jt,
|
|
73
|
+
inlineTag: Qt,
|
|
74
|
+
settingList: Yt,
|
|
75
|
+
settingRow: Jt,
|
|
76
|
+
settingIcon: Kt,
|
|
77
|
+
settingText: Xt,
|
|
78
|
+
settingTitle: Wt,
|
|
79
|
+
settingDescription: Zt,
|
|
80
|
+
settingAction: ea,
|
|
81
|
+
note: ta,
|
|
82
|
+
centerLink: aa,
|
|
83
|
+
centerLinkIcon: na,
|
|
84
|
+
heroCard: sa,
|
|
85
|
+
hero: ia,
|
|
86
|
+
heroMain: ra,
|
|
87
|
+
heroEyebrow: ca,
|
|
88
|
+
heroEyebrowText: oa,
|
|
89
|
+
heroValue: la,
|
|
90
|
+
heroMeta: da,
|
|
91
|
+
heroActions: ha,
|
|
92
|
+
heroFoot: _a,
|
|
93
|
+
ownerOnly: ma,
|
|
94
|
+
heroSkeleton: ua
|
|
95
|
+
}, F = ({
|
|
96
|
+
href: t,
|
|
97
|
+
children: n,
|
|
98
|
+
type: r = "secondary",
|
|
99
|
+
size: i = "default",
|
|
100
|
+
label: c
|
|
101
|
+
}) => t ? /* @__PURE__ */ s(
|
|
102
|
+
ce,
|
|
103
|
+
{
|
|
104
|
+
theme: r === "primary" ? "solid" : r === "text" ? "borderless" : "light",
|
|
105
|
+
type: r === "primary" ? "primary" : "tertiary",
|
|
106
|
+
size: i,
|
|
107
|
+
href: t,
|
|
108
|
+
target: "_blank",
|
|
109
|
+
"aria-label": c,
|
|
110
|
+
className: a.centerLink,
|
|
111
|
+
children: [
|
|
112
|
+
n,
|
|
113
|
+
/* @__PURE__ */ e(ye, { className: a.centerLinkIcon, "aria-hidden": "true" })
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
) : null, K = ({
|
|
117
|
+
icon: t,
|
|
118
|
+
title: n,
|
|
119
|
+
description: r,
|
|
120
|
+
action: i
|
|
121
|
+
}) => /* @__PURE__ */ s("div", { className: a.settingRow, children: [
|
|
122
|
+
/* @__PURE__ */ e("span", { className: a.settingIcon, "aria-hidden": "true", children: t }),
|
|
123
|
+
/* @__PURE__ */ s("div", { className: a.settingText, children: [
|
|
124
|
+
/* @__PURE__ */ e("span", { className: a.settingTitle, children: n }),
|
|
125
|
+
/* @__PURE__ */ e("span", { className: a.settingDescription, children: r })
|
|
126
|
+
] }),
|
|
127
|
+
i ? /* @__PURE__ */ e("div", { className: a.settingAction, children: i }) : null
|
|
128
|
+
] }), pa = ({ data: t }) => {
|
|
129
|
+
var g;
|
|
130
|
+
const n = j(), { PointsDetail: r } = O(), { session: i, activeSpace: c, activeSpaceId: l, globalUserId: o, wallet: d } = t, p = q(i == null ? void 0 : i.accountCenterUrl, "points"), m = c ? Q(c) : "当前空间", u = (g = d.data) == null ? void 0 : g.availablePoints;
|
|
131
|
+
return /* @__PURE__ */ s($, { children: [
|
|
132
|
+
/* @__PURE__ */ s(x, { className: a.heroCard, bordered: !1, bodyStyle: { padding: 0 }, children: [
|
|
133
|
+
/* @__PURE__ */ s("div", { className: a.hero, "data-tone": "primary", children: [
|
|
134
|
+
/* @__PURE__ */ s("div", { className: a.heroMain, children: [
|
|
135
|
+
/* @__PURE__ */ s("span", { className: a.heroEyebrow, title: m, children: [
|
|
136
|
+
/* @__PURE__ */ e(Me, { "aria-hidden": "true" }),
|
|
137
|
+
/* @__PURE__ */ s("span", { className: a.heroEyebrowText, children: [
|
|
138
|
+
"可用积分 · ",
|
|
139
|
+
m
|
|
140
|
+
] })
|
|
141
|
+
] }),
|
|
142
|
+
/* @__PURE__ */ e("span", { className: a.heroValue, "aria-live": "polite", children: d.isPending ? "读取中" : d.isError || u === void 0 ? "暂不可用" : E(u) }),
|
|
143
|
+
/* @__PURE__ */ e("span", { className: a.heroMeta, children: "积分属于当前空间,24.city 各产品共用。" })
|
|
144
|
+
] }),
|
|
145
|
+
/* @__PURE__ */ s("div", { className: a.heroActions, children: [
|
|
146
|
+
/* @__PURE__ */ e(w, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ e(fe, { "aria-hidden": "true" }), disabled: d.isFetching, onClick: () => void d.refetch(), children: "刷新" }),
|
|
147
|
+
/* @__PURE__ */ e(F, { type: "primary", href: p, label: "全部积分消耗(在统一账号中心打开)", children: "全部积分消耗" })
|
|
148
|
+
] })
|
|
149
|
+
] }),
|
|
150
|
+
/* @__PURE__ */ e("div", { className: a.heroFoot, children: /* @__PURE__ */ e("span", { children: r ? `下面是你本人在 ${n.shortName} 里的扣费明细;当前空间在 24.city 各产品里的全部积分消耗,请到统一账号中心查看。` : "当前空间在 24.city 各产品里的全部积分消耗,请到统一账号中心查看。" }) })
|
|
151
|
+
] }),
|
|
152
|
+
r ? /* @__PURE__ */ e("div", { className: a.usage, children: /* @__PURE__ */ e(r, { activeSpaceId: l, globalUserId: o }) }) : null
|
|
153
|
+
] });
|
|
154
|
+
}, V = ({ label: t, children: n, hint: r }) => /* @__PURE__ */ s("div", { className: a.field, children: [
|
|
155
|
+
/* @__PURE__ */ e("span", { className: a.fieldLabel, children: t }),
|
|
156
|
+
/* @__PURE__ */ s("div", { className: a.fieldValue, children: [
|
|
157
|
+
n,
|
|
158
|
+
r ? /* @__PURE__ */ e("span", { className: a.fieldHint, children: r }) : null
|
|
159
|
+
] })
|
|
160
|
+
] }), ga = ({ data: t }) => {
|
|
161
|
+
var g;
|
|
162
|
+
const n = j(), { session: r, activeSpace: i, profile: c, globalUserId: l } = t, o = r == null ? void 0 : r.accountCenterUrl, d = ((g = c.data) == null ? void 0 : g.nickName) ?? "", p = Se(i == null ? void 0 : i.role), m = q(o, "settings"), u = q(o, "spaces");
|
|
163
|
+
return /* @__PURE__ */ s($, { children: [
|
|
164
|
+
/* @__PURE__ */ e(x, { title: "账号信息", className: a.card, bordered: !1, headerLine: !1, children: /* @__PURE__ */ s("div", { className: a.fields, children: [
|
|
165
|
+
/* @__PURE__ */ e(V, { label: "昵称", hint: `首次登录 ${n.shortName} 时从统一账号带来`, children: /* @__PURE__ */ e("span", { className: a.fieldText, children: d || (c.isPending ? "读取中" : "未设置") }) }),
|
|
166
|
+
/* @__PURE__ */ e(V, { label: "统一账号 ID", hint: "联系客服时可以提供", children: /* @__PURE__ */ e(W.Text, { copyable: { copyTip: "复制", successTip: "已复制" }, className: a.mono, children: l }) }),
|
|
167
|
+
/* @__PURE__ */ e(V, { label: "当前空间", children: /* @__PURE__ */ s("span", { className: a.fieldText, children: [
|
|
168
|
+
i ? Q(i) : "暂不可用",
|
|
169
|
+
i && Y(i) ? /* @__PURE__ */ e(ge, { size: "small", color: "blue", className: a.inlineTag, children: "团队" }) : null,
|
|
170
|
+
p ? /* @__PURE__ */ s("span", { className: a.fieldMuted, children: [
|
|
171
|
+
"· 我是",
|
|
172
|
+
p
|
|
173
|
+
] }) : null
|
|
174
|
+
] }) }),
|
|
175
|
+
/* @__PURE__ */ e(V, { label: "本次登录有效至", hint: "到期后重新登录即可", children: /* @__PURE__ */ e("span", { className: a.fieldText, children: r ? Ye(r.absoluteExpiresAt) : "暂无" }) })
|
|
176
|
+
] }) }),
|
|
177
|
+
/* @__PURE__ */ s(x, { title: "登录与安全", className: a.card, bordered: !1, headerLine: !1, children: [
|
|
178
|
+
/* @__PURE__ */ s("div", { className: a.settingList, children: [
|
|
179
|
+
/* @__PURE__ */ e(
|
|
180
|
+
K,
|
|
181
|
+
{
|
|
182
|
+
icon: /* @__PURE__ */ e(Oe, {}),
|
|
183
|
+
title: "登录密码",
|
|
184
|
+
description: "验证已绑定的手机号后修改。改完后,24.city 所有产品都用新密码登录。",
|
|
185
|
+
action: /* @__PURE__ */ e(F, { href: m, label: "修改密码(在统一账号中心打开)", children: "修改密码" })
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ e(
|
|
189
|
+
K,
|
|
190
|
+
{
|
|
191
|
+
icon: /* @__PURE__ */ e(De, {}),
|
|
192
|
+
title: "登录设备与个人数据",
|
|
193
|
+
description: "查看登录过的设备,导出你的个人数据。",
|
|
194
|
+
action: /* @__PURE__ */ e(F, { href: m, label: "查看登录设备(在统一账号中心打开)", children: "前往查看" })
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
/* @__PURE__ */ e(
|
|
198
|
+
K,
|
|
199
|
+
{
|
|
200
|
+
icon: /* @__PURE__ */ e(Ne, {}),
|
|
201
|
+
title: "空间与成员",
|
|
202
|
+
description: "查看你加入的空间;团队所有者和管理员在这里邀请、管理成员。",
|
|
203
|
+
action: /* @__PURE__ */ e(F, { href: u, label: "管理空间与成员(在统一账号中心打开)", children: "前往管理" })
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ s("div", { className: a.note, children: [
|
|
208
|
+
/* @__PURE__ */ e(Be, { "aria-hidden": "true" }),
|
|
209
|
+
/* @__PURE__ */ e("span", { children: m ? `${n.shortName} 使用 24.city 统一账号登录,不保存你的密码和验证码。以上设置在统一账号中心修改,所有产品同步生效。` : "统一账号中心的地址暂时不可用,请稍后刷新页面再试。" })
|
|
210
|
+
] })
|
|
211
|
+
] })
|
|
212
|
+
] });
|
|
213
|
+
}, X = {
|
|
214
|
+
free: { tone: "basic", tagline: "先免费体验", benefits: [] },
|
|
215
|
+
standard: { tone: "standard", badge: "推荐", tagline: "个人用户的常用之选", benefits: ["按积分扣费,用多少扣多少"] },
|
|
216
|
+
pro: { tone: "pro", tagline: "高频使用,积分更充足", benefits: ["每月积分更多,适合批量使用"] }
|
|
217
|
+
}, ya = {
|
|
218
|
+
tone: "team",
|
|
219
|
+
tagline: "团队一起用,套餐和积分共用",
|
|
220
|
+
benefits: ["成员共用套餐和积分"]
|
|
221
|
+
}, fa = (t, n) => t.spaceType === "team" ? n.teamPlanCopy ?? ya : t.isDefault || t.tier <= 0 ? X.free : t.tier === 1 ? X.standard : X.pro, Te = (t, n = {}) => {
|
|
222
|
+
var r;
|
|
223
|
+
return ((r = n.planCopy) == null ? void 0 : r[t.code]) ?? fa(t, n);
|
|
224
|
+
}, xe = (t, n = [], r = {}) => {
|
|
225
|
+
const i = [], c = (l, o = !0) => {
|
|
226
|
+
i.some((d) => d.text === l) || i.push({ text: l, included: o });
|
|
227
|
+
};
|
|
228
|
+
t.monthlyPoints > 0 && c(t.isDefault ? `每月赠送 ${E(t.monthlyPoints)} 积分` : `每月 ${E(t.monthlyPoints)} 积分`), t.spaceType === "team" && t.includedSeats > 0 && c(`含 ${E(t.includedSeats)} 个成员席位`);
|
|
229
|
+
for (const l of Ke(t, n, r)) c(l.text, l.included);
|
|
230
|
+
for (const l of Te(t, r).benefits) c(l);
|
|
231
|
+
return i;
|
|
232
|
+
}, Na = (t, n) => t.prices.filter((c) => c.billingPeriod === n && c.amountCents > 0).reduce((c, l) => !c || l.amountCents < c.amountCents ? l : c, null) ?? we(t), ba = (t, n) => {
|
|
233
|
+
if (n.billingPeriod !== "year") return "";
|
|
234
|
+
const r = ee({ amountCents: Math.round(n.amountCents / 12), currency: n.currency }), i = t.prices.find((l) => l.billingPeriod === "month" && l.currency === n.currency && l.amountCents > 0), c = i ? i.amountCents * 12 - n.amountCents : 0;
|
|
235
|
+
return c > 0 ? `约 ${r}/月 · 比月付省 ${ee({ amountCents: c, currency: n.currency })}` : `约 ${r}/月`;
|
|
236
|
+
}, va = "_subtitle_1rvtt_7", Sa = "_grid_1rvtt_16", wa = "_skeleton_1rvtt_22", Ca = "_card_1rvtt_30", ka = "_section_1rvtt_62", Pa = "_badge_1rvtt_90", La = "_top_1rvtt_108", $a = "_art_1rvtt_138", Ia = "_name_1rvtt_159", Ta = "_tagline_1rvtt_177", xa = "_price_1rvtt_194", Aa = "_amount_1rvtt_201", Ea = "_period_1rvtt_217", Fa = "_priceNote_1rvtt_226", Ua = "_body_1rvtt_243", Ra = "_benefits_1rvtt_251", Ma = "_benefit_1rvtt_251", Oa = "_check_1rvtt_267", Da = "_action_1rvtt_303", Ba = "_cta_1rvtt_303", Va = "_ctaCurrent_1rvtt_344", za = "_ctaNote_1rvtt_353", _ = {
|
|
237
|
+
subtitle: va,
|
|
238
|
+
grid: Sa,
|
|
239
|
+
skeleton: wa,
|
|
240
|
+
card: Ca,
|
|
241
|
+
section: ka,
|
|
242
|
+
badge: Pa,
|
|
243
|
+
top: La,
|
|
244
|
+
art: $a,
|
|
245
|
+
name: Ia,
|
|
246
|
+
tagline: Ta,
|
|
247
|
+
price: xa,
|
|
248
|
+
amount: Aa,
|
|
249
|
+
period: Ea,
|
|
250
|
+
priceNote: Fa,
|
|
251
|
+
body: Ua,
|
|
252
|
+
benefits: Ra,
|
|
253
|
+
benefit: Ma,
|
|
254
|
+
check: Oa,
|
|
255
|
+
action: Da,
|
|
256
|
+
cta: Ba,
|
|
257
|
+
ctaCurrent: Va,
|
|
258
|
+
ctaNote: za
|
|
259
|
+
}, Ha = { month: "/月", year: "/年", one_time: "" }, Ga = [
|
|
260
|
+
{ label: "按月付", value: "month" },
|
|
261
|
+
{ label: "按年付", value: "year" }
|
|
262
|
+
], ue = (t, n) => t.some((r) => r.prices.some((i) => i.billingPeriod === n && i.amountCents > 0)), qa = ({
|
|
263
|
+
plan: t,
|
|
264
|
+
price: n,
|
|
265
|
+
catalog: r,
|
|
266
|
+
current: i,
|
|
267
|
+
focus: c,
|
|
268
|
+
action: l,
|
|
269
|
+
custom: o
|
|
270
|
+
}) => {
|
|
271
|
+
const d = Te(t, o), p = n ? ba(t, n) : "长期有效", m = d.badge ?? (c ? "推荐升级" : void 0);
|
|
272
|
+
return /* @__PURE__ */ s(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
className: _.card,
|
|
276
|
+
"data-tone": d.tone,
|
|
277
|
+
"data-current": i ? "true" : "false",
|
|
278
|
+
"data-focus": c && !i ? "true" : "false",
|
|
279
|
+
role: "group",
|
|
280
|
+
"aria-label": t.name,
|
|
281
|
+
children: [
|
|
282
|
+
i ? /* @__PURE__ */ e("span", { className: _.badge, "data-kind": "current", children: "当前套餐" }) : m ? /* @__PURE__ */ e("span", { className: _.badge, children: m }) : null,
|
|
283
|
+
/* @__PURE__ */ s("div", { className: _.top, children: [
|
|
284
|
+
/* @__PURE__ */ e("span", { className: _.art, "aria-hidden": "true" }),
|
|
285
|
+
/* @__PURE__ */ e("span", { className: _.name, children: t.name }),
|
|
286
|
+
/* @__PURE__ */ e("span", { className: _.tagline, children: d.tagline }),
|
|
287
|
+
/* @__PURE__ */ e("span", { className: _.price, children: n ? /* @__PURE__ */ s($, { children: [
|
|
288
|
+
/* @__PURE__ */ e("span", { className: _.amount, children: ee(n) }),
|
|
289
|
+
/* @__PURE__ */ e("span", { className: _.period, children: Ha[n.billingPeriod] })
|
|
290
|
+
] }) : /* @__PURE__ */ e("span", { className: _.amount, children: "免费" }) }),
|
|
291
|
+
/* @__PURE__ */ e("span", { className: _.priceNote, children: p || " " })
|
|
292
|
+
] }),
|
|
293
|
+
/* @__PURE__ */ s("div", { className: _.body, children: [
|
|
294
|
+
/* @__PURE__ */ e("div", { className: _.benefits, role: "list", "aria-label": `${t.name}权益`, children: xe(t, r, o).map((u) => /* @__PURE__ */ s("div", { className: _.benefit, "data-included": u.included ? "true" : "false", role: "listitem", children: [
|
|
295
|
+
/* @__PURE__ */ e("span", { className: _.check, "aria-hidden": "true", children: u.included ? /* @__PURE__ */ e(ae, {}) : /* @__PURE__ */ e(Ve, {}) }),
|
|
296
|
+
/* @__PURE__ */ e("span", { children: u.text })
|
|
297
|
+
] }, u.text)) }),
|
|
298
|
+
/* @__PURE__ */ e("div", { className: _.action, children: l })
|
|
299
|
+
] })
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
}, ja = ({ data: t, focusPlan: n }) => {
|
|
304
|
+
const { config: r } = D(), i = O(), { session: c, activeSpace: l, activeSpaceId: o, subscription: d, wallet: p, allowed: m } = t, u = Ce(m), [g, N] = dt("month"), A = l ? Y(l) : !1, U = ke(l), I = d.isError && re(d.error), C = d.data ?? null, b = (u.data ?? []).filter((h) => h.spaceType === (A ? "team" : "personal")), R = `${window.location.origin}${G(r.routes.app, "subscription")}`, k = (h) => {
|
|
305
|
+
var P;
|
|
306
|
+
return te(c == null ? void 0 : c.accountCenterUrl, { productCode: (P = p.data) == null ? void 0 : P.productCode, returnUrl: R, spaceId: A ? o : void 0, priceCode: h });
|
|
307
|
+
}, v = ue(b, "month") && ue(b, "year"), L = me(null), T = me(!1), f = !!(n && b.some((h) => h.code === n));
|
|
308
|
+
$e(() => {
|
|
309
|
+
var h, P;
|
|
310
|
+
!f || T.current || (T.current = !0, (P = (h = L.current) == null ? void 0 : h.scrollIntoView) == null || P.call(h, { behavior: "smooth", block: "start" }));
|
|
311
|
+
}, [f]);
|
|
312
|
+
const J = (h, P, M) => {
|
|
313
|
+
if (h.isDefault || !P)
|
|
314
|
+
return M ? /* @__PURE__ */ e(w, { theme: "light", type: "tertiary", block: !0, disabled: !0, className: _.ctaCurrent, children: "正在使用" }) : /* @__PURE__ */ e("span", { className: _.ctaNote, children: "会员到期后回到免费版" });
|
|
315
|
+
if (!U) return /* @__PURE__ */ e("span", { className: _.ctaNote, children: I ? "请团队所有者续费" : "请团队所有者购买" });
|
|
316
|
+
const B = M ? "续费" : I ? `续费${h.name}` : !C || C.isDefault ? "立即开通" : h.tier > C.tier ? `升级到${h.name}` : `选择${h.name}`, oe = k(P.code);
|
|
317
|
+
if (!oe) return null;
|
|
318
|
+
const Ae = B.includes(h.name) ? B : `${B}${h.name}`;
|
|
319
|
+
return /* @__PURE__ */ e(ce, { block: !0, className: _.cta, href: oe, target: "_blank", "aria-label": `${Ae}(在统一账号中心打开)`, children: B });
|
|
320
|
+
};
|
|
321
|
+
return u.isPending ? /* @__PURE__ */ e(x, { title: "会员套餐", className: a.card, bordered: !1, headerLine: !1, children: /* @__PURE__ */ e("div", { className: _.grid, children: [0, 1, 2].map((h) => /* @__PURE__ */ e("div", { className: _.skeleton, children: /* @__PURE__ */ e(H, { loading: !0, active: !0, placeholder: /* @__PURE__ */ e(H.Paragraph, { rows: 4 }) }) }, h)) }) }) : u.isError ? /* @__PURE__ */ e(x, { title: "会员套餐", className: a.card, bordered: !1, headerLine: !1, children: /* @__PURE__ */ e(Ee, { type: "info", fullMode: !1, closeIcon: null, description: "暂时读不到套餐价格,可以在统一账号中心查看全部套餐。", children: /* @__PURE__ */ e(F, { size: "small", href: k(), label: "查看全部套餐(在统一账号中心打开)", children: "查看全部套餐" }) }) }) : b.length ? /* @__PURE__ */ e("div", { ref: L, children: /* @__PURE__ */ s(
|
|
322
|
+
x,
|
|
323
|
+
{
|
|
324
|
+
title: "会员套餐",
|
|
325
|
+
className: `${a.card} ${_.section}`,
|
|
326
|
+
bordered: !1,
|
|
327
|
+
headerLine: !1,
|
|
328
|
+
headerExtraContent: v ? /* @__PURE__ */ e(
|
|
329
|
+
Fe,
|
|
330
|
+
{
|
|
331
|
+
type: "button",
|
|
332
|
+
buttonSize: "small",
|
|
333
|
+
options: Ga,
|
|
334
|
+
value: g,
|
|
335
|
+
onChange: (h) => N(h.target.value),
|
|
336
|
+
"aria-label": "付费周期"
|
|
337
|
+
}
|
|
338
|
+
) : null,
|
|
339
|
+
children: [
|
|
340
|
+
/* @__PURE__ */ e("span", { className: _.subtitle, children: "价格取自 24.city 统一账号中心,点按钮去统一账号中心付款,付款后回到这里。" }),
|
|
341
|
+
/* @__PURE__ */ e("div", { className: _.grid, children: b.map((h) => {
|
|
342
|
+
const P = Na(h, g), M = !!(C && C.planCode === h.code);
|
|
343
|
+
return /* @__PURE__ */ e(
|
|
344
|
+
qa,
|
|
345
|
+
{
|
|
346
|
+
plan: h,
|
|
347
|
+
price: P,
|
|
348
|
+
catalog: u.data ?? [],
|
|
349
|
+
current: M,
|
|
350
|
+
focus: h.code === n,
|
|
351
|
+
action: J(h, P, M),
|
|
352
|
+
custom: i
|
|
353
|
+
},
|
|
354
|
+
h.code
|
|
355
|
+
);
|
|
356
|
+
}) })
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
) }) : null;
|
|
360
|
+
}, Qa = "_team_17o3k_7", Ya = "_art_17o3k_22", Ja = "_text_17o3k_30", Ka = "_eyebrow_17o3k_39", Xa = "_title_17o3k_49", Wa = "_description_17o3k_57", Za = "_highlights_17o3k_63", en = "_highlight_17o3k_63", tn = "_highlightIcon_17o3k_83", an = "_action_17o3k_88", nn = "_cta_17o3k_96", sn = "_ctaIcon_17o3k_116", rn = "_price_17o3k_121", S = {
|
|
361
|
+
team: Qa,
|
|
362
|
+
art: Ya,
|
|
363
|
+
text: Ja,
|
|
364
|
+
eyebrow: Ka,
|
|
365
|
+
title: Xa,
|
|
366
|
+
description: Wa,
|
|
367
|
+
highlights: Za,
|
|
368
|
+
highlight: en,
|
|
369
|
+
highlightIcon: tn,
|
|
370
|
+
action: an,
|
|
371
|
+
cta: nn,
|
|
372
|
+
ctaIcon: sn,
|
|
373
|
+
price: rn
|
|
374
|
+
}, cn = ({ href: t, plan: n }) => {
|
|
375
|
+
const r = j(), { teamPromoHighlights: i = [] } = O(), c = n ? we(n) : null, l = [
|
|
376
|
+
n && n.includedSeats > 0 ? `含 ${E(n.includedSeats)} 个成员席位` : "",
|
|
377
|
+
n && n.monthlyPoints > 0 ? `每月 ${E(n.monthlyPoints)} 积分` : "",
|
|
378
|
+
"套餐和积分团队共用",
|
|
379
|
+
...i
|
|
380
|
+
].filter(Boolean);
|
|
381
|
+
return /* @__PURE__ */ s("section", { className: S.team, "aria-label": "开通团队版", children: [
|
|
382
|
+
/* @__PURE__ */ e("span", { className: S.art, "aria-hidden": "true" }),
|
|
383
|
+
/* @__PURE__ */ s("div", { className: S.text, children: [
|
|
384
|
+
/* @__PURE__ */ e("span", { className: S.eyebrow, children: "团队版" }),
|
|
385
|
+
/* @__PURE__ */ s("span", { className: S.title, children: [
|
|
386
|
+
"和同事一起用 ",
|
|
387
|
+
r.shortName
|
|
388
|
+
] }),
|
|
389
|
+
/* @__PURE__ */ e("span", { className: S.description, children: "开通团队版会创建一个团队空间,你是所有者;套餐、席位和积分归团队共用。" }),
|
|
390
|
+
/* @__PURE__ */ e("div", { className: S.highlights, role: "list", "aria-label": "团队版要点", children: l.map((o) => /* @__PURE__ */ s("span", { className: S.highlight, role: "listitem", children: [
|
|
391
|
+
/* @__PURE__ */ e(ae, { className: S.highlightIcon, "aria-hidden": "true" }),
|
|
392
|
+
o
|
|
393
|
+
] }, o)) })
|
|
394
|
+
] }),
|
|
395
|
+
t ? /* @__PURE__ */ s("div", { className: S.action, children: [
|
|
396
|
+
/* @__PURE__ */ s(ce, { className: S.cta, href: t, target: "_blank", "aria-label": "开通团队版(在统一账号中心打开)", children: [
|
|
397
|
+
"开通团队版",
|
|
398
|
+
/* @__PURE__ */ e(ye, { className: S.ctaIcon, "aria-hidden": "true" })
|
|
399
|
+
] }),
|
|
400
|
+
c ? /* @__PURE__ */ s("span", { className: S.price, children: [
|
|
401
|
+
Pe(c),
|
|
402
|
+
"起"
|
|
403
|
+
] }) : null
|
|
404
|
+
] }) : null
|
|
405
|
+
] });
|
|
406
|
+
}, on = ({ data: t, focusPlan: n }) => {
|
|
407
|
+
var T;
|
|
408
|
+
const { config: r } = D(), { session: i, activeSpace: c, activeSpaceId: l, wallet: o, subscription: d, allowed: p } = t, m = Ce(p), u = i == null ? void 0 : i.accountCenterUrl, g = c ? Y(c) : !1, N = ke(c), A = c ? Q(c) : "当前空间", U = `${window.location.origin}${G(r.routes.app, "subscription")}`, I = (T = o.data) == null ? void 0 : T.productCode, C = te(u, { productCode: I, returnUrl: U, spaceId: g ? l : void 0 }), b = te(u, { productCode: I, returnUrl: U, spaceType: "team" }), R = q(u, "orders"), k = d.isError && re(d.error), v = d.data, L = (f) => N ? /* @__PURE__ */ e(F, { type: "primary", href: C, label: `${f}(在统一账号中心打开)`, children: f }) : /* @__PURE__ */ e("span", { className: a.ownerOnly, children: k ? "请团队所有者续费" : "请团队所有者购买" });
|
|
409
|
+
return /* @__PURE__ */ s($, { children: [
|
|
410
|
+
/* @__PURE__ */ s(x, { className: a.heroCard, bordered: !1, bodyStyle: { padding: 0 }, children: [
|
|
411
|
+
/* @__PURE__ */ s("div", { className: a.hero, "data-tone": k ? "warning" : "primary", children: [
|
|
412
|
+
/* @__PURE__ */ s("div", { className: a.heroMain, children: [
|
|
413
|
+
/* @__PURE__ */ s("span", { className: a.heroEyebrow, title: A, children: [
|
|
414
|
+
/* @__PURE__ */ e(ze, { "aria-hidden": "true" }),
|
|
415
|
+
/* @__PURE__ */ s("span", { className: a.heroEyebrowText, children: [
|
|
416
|
+
"当前套餐 · ",
|
|
417
|
+
A
|
|
418
|
+
] })
|
|
419
|
+
] }),
|
|
420
|
+
d.isPending ? /* @__PURE__ */ e(H, { loading: !0, active: !0, placeholder: /* @__PURE__ */ e(H.Paragraph, { rows: 2, className: a.heroSkeleton }) }) : k ? /* @__PURE__ */ s($, { children: [
|
|
421
|
+
/* @__PURE__ */ e("span", { className: a.heroValue, children: "团队版已到期" }),
|
|
422
|
+
/* @__PURE__ */ e("span", { className: a.heroMeta, children: "该团队的团队版已到期,请在统一账号中心续费后再使用,续费后成员继续共用套餐和积分。" })
|
|
423
|
+
] }) : d.isError ? /* @__PURE__ */ s($, { children: [
|
|
424
|
+
/* @__PURE__ */ e("span", { className: a.heroValue, children: "暂不可用" }),
|
|
425
|
+
/* @__PURE__ */ e("span", { className: a.heroMeta, children: "暂时读不到当前套餐,请稍后重试。" })
|
|
426
|
+
] }) : v ? /* @__PURE__ */ s($, { children: [
|
|
427
|
+
/* @__PURE__ */ e("span", { className: a.heroValue, children: Le(v) }),
|
|
428
|
+
/* @__PURE__ */ s("span", { className: a.heroMeta, children: [
|
|
429
|
+
/* @__PURE__ */ e(ge, { size: "small", color: "green", children: "生效中" }),
|
|
430
|
+
Xe(v)
|
|
431
|
+
] })
|
|
432
|
+
] }) : /* @__PURE__ */ s($, { children: [
|
|
433
|
+
/* @__PURE__ */ e("span", { className: a.heroValue, children: "未开通" }),
|
|
434
|
+
/* @__PURE__ */ e("span", { className: a.heroMeta, children: "当前空间还没有生效的套餐。" })
|
|
435
|
+
] })
|
|
436
|
+
] }),
|
|
437
|
+
/* @__PURE__ */ s("div", { className: a.heroActions, children: [
|
|
438
|
+
d.isError && !k ? /* @__PURE__ */ e(w, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ e(fe, { "aria-hidden": "true" }), onClick: () => void d.refetch(), children: "重试" }) : null,
|
|
439
|
+
d.isPending ? null : k ? L("续费团队版") : v && !v.isDefault ? L("续费或升级") : L(v ? "升级套餐" : "选择套餐")
|
|
440
|
+
] })
|
|
441
|
+
] }),
|
|
442
|
+
/* @__PURE__ */ s("div", { className: a.heroFoot, children: [
|
|
443
|
+
/* @__PURE__ */ e("span", { children: "套餐属于当前空间,对 24.city 所有产品同时生效;购买、续费和发票在统一账号中心办理。" }),
|
|
444
|
+
/* @__PURE__ */ e(F, { type: "text", size: "small", href: R, label: "订单记录(在统一账号中心打开)", children: "订单记录" })
|
|
445
|
+
] })
|
|
446
|
+
] }),
|
|
447
|
+
/* @__PURE__ */ e(ja, { data: t, focusPlan: n }),
|
|
448
|
+
c && !g ? /* @__PURE__ */ e(cn, { href: b, plan: We(m.data) }) : null
|
|
449
|
+
] });
|
|
450
|
+
}, ln = ({ subscription: t }) => t.isPending ? "读取中" : t.isError ? re(t.error) ? "团队版已到期" : "暂不可用" : t.data ? Le(t.data) : "未开通", dn = ({ wallet: t }) => t.isPending ? "读取中" : t.data ? E(t.data.availablePoints) : "暂不可用", Dn = () => {
|
|
451
|
+
var T;
|
|
452
|
+
const { section: t = "" } = qe(), { config: n } = D(), r = j(), i = O(), { PointsDetail: c } = i, l = Ze(i), o = l.find((f) => f.key === t), d = ne(), p = et(se().state), m = tt(), { confirmLogout: u, pending: g } = at(), N = n.routes.app;
|
|
453
|
+
if (!nt(t) && !o) return /* @__PURE__ */ e(ie, { replace: !0, to: G(N, "profile") });
|
|
454
|
+
const A = {
|
|
455
|
+
profile: "你的统一账号与当前空间。密码、登录设备和团队成员在 24.city 统一账号中心管理,所有产品同步生效。",
|
|
456
|
+
subscription: "当前空间的套餐与权益,以统一账号中心为准;购买、续费和升级都在统一账号中心完成。",
|
|
457
|
+
points: c ? `当前空间的可用积分,以及你在 ${r.shortName} 里的扣费明细。` : "当前空间的可用积分,由统一账号中心记账。"
|
|
458
|
+
}, U = o ? o.description : A[t], I = st(N, l).items, C = I.find((f) => f.to === G(N, t)), { activeSpace: b, profile: R, allowed: k } = m, v = ((T = R.data) == null ? void 0 : T.nickName) ?? "", L = Se(b == null ? void 0 : b.role);
|
|
459
|
+
return /* @__PURE__ */ s("div", { className: a.center, children: [
|
|
460
|
+
/* @__PURE__ */ e("aside", { className: a.aside, "aria-label": "个人中心", children: /* @__PURE__ */ s(x, { className: a.identityCard, bordered: !1, bodyStyle: { padding: 0 }, children: [
|
|
461
|
+
/* @__PURE__ */ s("div", { className: a.identity, children: [
|
|
462
|
+
/* @__PURE__ */ e(Ue, { size: "medium", shape: "circle", className: a.identityAvatar, children: v ? Array.from(v)[0] : /* @__PURE__ */ e(de, { "aria-hidden": "true" }) }),
|
|
463
|
+
/* @__PURE__ */ s("div", { className: a.identityText, children: [
|
|
464
|
+
/* @__PURE__ */ e("span", { className: a.identityName, title: v || void 0, children: v || (R.isPending ? "" : it) }),
|
|
465
|
+
b ? /* @__PURE__ */ s("span", { className: a.identitySpace, children: [
|
|
466
|
+
Y(b) ? /* @__PURE__ */ e(Ne, { "aria-hidden": "true" }) : /* @__PURE__ */ e(de, { "aria-hidden": "true" }),
|
|
467
|
+
/* @__PURE__ */ e("span", { className: a.identitySpaceName, children: Q(b) }),
|
|
468
|
+
L ? /* @__PURE__ */ e("span", { className: a.identityRole, children: L }) : null
|
|
469
|
+
] }) : null
|
|
470
|
+
] })
|
|
471
|
+
] }),
|
|
472
|
+
k ? /* @__PURE__ */ s("div", { className: a.identityStats, children: [
|
|
473
|
+
/* @__PURE__ */ s("div", { className: a.identityStat, children: [
|
|
474
|
+
/* @__PURE__ */ e("span", { className: a.identityStatLabel, children: "当前套餐" }),
|
|
475
|
+
/* @__PURE__ */ e("span", { className: a.identityStatValue, children: ln(m) })
|
|
476
|
+
] }),
|
|
477
|
+
/* @__PURE__ */ s("div", { className: a.identityStat, children: [
|
|
478
|
+
/* @__PURE__ */ e("span", { className: a.identityStatLabel, children: "可用积分" }),
|
|
479
|
+
/* @__PURE__ */ e("span", { className: a.identityStatValue, children: dn(m) })
|
|
480
|
+
] })
|
|
481
|
+
] }) : null,
|
|
482
|
+
/* @__PURE__ */ e("nav", { className: a.nav, "aria-label": "个人中心分区", children: I.map((f) => {
|
|
483
|
+
const J = f === C;
|
|
484
|
+
return /* @__PURE__ */ s(
|
|
485
|
+
w,
|
|
486
|
+
{
|
|
487
|
+
theme: "borderless",
|
|
488
|
+
type: "tertiary",
|
|
489
|
+
className: a.navItem,
|
|
490
|
+
"aria-current": J ? "page" : void 0,
|
|
491
|
+
onClick: () => d(f.to),
|
|
492
|
+
children: [
|
|
493
|
+
f.icon ? /* @__PURE__ */ e("span", { className: a.navIcon, "aria-hidden": "true", children: /* @__PURE__ */ e(f.icon, {}) }) : null,
|
|
494
|
+
/* @__PURE__ */ e("span", { className: a.navLabel, children: f.label }),
|
|
495
|
+
/* @__PURE__ */ e(He, { className: a.navArrow, "aria-hidden": "true" })
|
|
496
|
+
]
|
|
497
|
+
},
|
|
498
|
+
f.key
|
|
499
|
+
);
|
|
500
|
+
}) }),
|
|
501
|
+
/* @__PURE__ */ e("div", { className: a.asideFoot, children: /* @__PURE__ */ e(w, { theme: "borderless", type: "tertiary", className: a.logout, icon: /* @__PURE__ */ e(Ge, { "aria-hidden": "true" }), disabled: g, onClick: u, children: "退出登录" }) })
|
|
502
|
+
] }) }),
|
|
503
|
+
/* @__PURE__ */ s("div", { className: a.main, children: [
|
|
504
|
+
/* @__PURE__ */ s("header", { className: a.head, children: [
|
|
505
|
+
/* @__PURE__ */ e(W.Title, { heading: 1, className: a.title, children: C == null ? void 0 : C.label }),
|
|
506
|
+
/* @__PURE__ */ e(W.Paragraph, { className: a.description, children: U })
|
|
507
|
+
] }),
|
|
508
|
+
k ? o ? /* @__PURE__ */ e(o.Component, { data: m }) : t === "profile" ? /* @__PURE__ */ e(ga, { data: m }) : t === "subscription" ? /* @__PURE__ */ e(on, { data: m, focusPlan: p }) : /* @__PURE__ */ e(pa, { data: m }) : /* @__PURE__ */ e(je, {})
|
|
509
|
+
] })
|
|
510
|
+
] });
|
|
511
|
+
}, Bn = () => {
|
|
512
|
+
const t = se(), n = ne(), { accountApi: r, config: i } = D(), { bootstrapped: c, serviceUnavailable: l, session: o } = be(), d = ve(new URLSearchParams(t.search).get("returnPath"), i.routes.app), p = r.startLogin(d, i.routes.app);
|
|
513
|
+
return $e(() => {
|
|
514
|
+
c && !o && !l && !Je() && !he() && window.location.replace(p);
|
|
515
|
+
}, [c, p, l, o]), c && o ? /* @__PURE__ */ e(ie, { to: d, replace: !0 }) : c && !o && he() ? /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(
|
|
516
|
+
z,
|
|
517
|
+
{
|
|
518
|
+
status: "info",
|
|
519
|
+
title: "已退出登录",
|
|
520
|
+
description: "您已在其他窗口退出 24.city 统一账号。需要继续使用时请重新登录。",
|
|
521
|
+
extra: /* @__PURE__ */ s(le, { spacing: 12, children: [
|
|
522
|
+
/* @__PURE__ */ e(
|
|
523
|
+
w,
|
|
524
|
+
{
|
|
525
|
+
theme: "solid",
|
|
526
|
+
type: "primary",
|
|
527
|
+
onClick: () => {
|
|
528
|
+
_e(), window.location.replace(p);
|
|
529
|
+
},
|
|
530
|
+
children: "重新登录"
|
|
531
|
+
}
|
|
532
|
+
),
|
|
533
|
+
/* @__PURE__ */ e(
|
|
534
|
+
w,
|
|
535
|
+
{
|
|
536
|
+
theme: "light",
|
|
537
|
+
type: "tertiary",
|
|
538
|
+
onClick: () => {
|
|
539
|
+
_e(), n(i.routes.publicHome);
|
|
540
|
+
},
|
|
541
|
+
children: "返回首页"
|
|
542
|
+
}
|
|
543
|
+
)
|
|
544
|
+
] })
|
|
545
|
+
}
|
|
546
|
+
) }) : /* @__PURE__ */ e(Z, { children: l ? /* @__PURE__ */ e("div", { role: "alert", children: /* @__PURE__ */ e(
|
|
547
|
+
z,
|
|
548
|
+
{
|
|
549
|
+
status: "error",
|
|
550
|
+
title: "统一账号服务暂不可用",
|
|
551
|
+
description: "请稍后重试。",
|
|
552
|
+
extra: /* @__PURE__ */ s(le, { spacing: 12, children: [
|
|
553
|
+
/* @__PURE__ */ e(w, { theme: "solid", type: "primary", onClick: () => window.location.replace(p), children: "重试" }),
|
|
554
|
+
/* @__PURE__ */ e(w, { theme: "light", type: "tertiary", onClick: () => n(i.routes.publicHome), children: "返回首页" })
|
|
555
|
+
] })
|
|
556
|
+
}
|
|
557
|
+
) }) : /* @__PURE__ */ e(z, { status: "loading", title: "正在前往统一登录…" }) });
|
|
558
|
+
}, hn = "_pill_7o99a_2", _n = "_upgrade_7o99a_24", pe = {
|
|
559
|
+
pill: hn,
|
|
560
|
+
upgrade: _n
|
|
561
|
+
}, Vn = ({ quota: t, unit: n, onUpgrade: r }) => {
|
|
562
|
+
if (!t) return null;
|
|
563
|
+
const i = rt(t);
|
|
564
|
+
return /* @__PURE__ */ s("span", { className: pe.pill, "data-full": i ? "true" : "false", role: "status", children: [
|
|
565
|
+
/* @__PURE__ */ e("span", { children: ct(t, n) }),
|
|
566
|
+
i ? /* @__PURE__ */ e(w, { theme: "borderless", type: "tertiary", size: "small", className: pe.upgrade, onClick: r, children: "升级" }) : null
|
|
567
|
+
] });
|
|
568
|
+
}, zn = ({ children: t }) => {
|
|
569
|
+
const n = se(), { config: r } = D(), { bootstrapped: i, serviceUnavailable: c, session: l } = be();
|
|
570
|
+
if (!i) return /* @__PURE__ */ e(Qe, {});
|
|
571
|
+
if (c)
|
|
572
|
+
return /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e("div", { role: "alert", children: /* @__PURE__ */ e(
|
|
573
|
+
z,
|
|
574
|
+
{
|
|
575
|
+
status: "error",
|
|
576
|
+
title: "账号服务暂不可用",
|
|
577
|
+
description: "无法确认当前会话与空间,应用已停止加载受保护数据。",
|
|
578
|
+
extra: /* @__PURE__ */ e(w, { theme: "solid", type: "primary", onClick: () => window.location.reload(), children: "重新加载" })
|
|
579
|
+
}
|
|
580
|
+
) }) });
|
|
581
|
+
if (!l || l.purpose !== "user") {
|
|
582
|
+
const o = ve(n.pathname + n.search, r.routes.app);
|
|
583
|
+
return /* @__PURE__ */ e(ie, { to: `${r.routes.login}?returnPath=${encodeURIComponent(o)}`, replace: !0 });
|
|
584
|
+
}
|
|
585
|
+
return /* @__PURE__ */ e($, { children: t });
|
|
586
|
+
}, mn = "_modal_e9iw1_6", un = "_hero_e9iw1_27", pn = "_badge_e9iw1_39", gn = "_art_e9iw1_52", yn = "_title_e9iw1_65", fn = "_description_e9iw1_73", Nn = "_body_e9iw1_80", bn = "_offer_e9iw1_87", vn = "_offerName_e9iw1_93", Sn = "_lines_e9iw1_99", wn = "_line_e9iw1_99", Cn = "_check_e9iw1_114", kn = "_cta_e9iw1_127", Pn = "_ctaPrice_e9iw1_144", Ln = "_ownerOnly_e9iw1_153", $n = "_later_e9iw1_161", y = {
|
|
587
|
+
modal: mn,
|
|
588
|
+
hero: un,
|
|
589
|
+
badge: pn,
|
|
590
|
+
art: gn,
|
|
591
|
+
title: yn,
|
|
592
|
+
description: fn,
|
|
593
|
+
body: Nn,
|
|
594
|
+
offer: bn,
|
|
595
|
+
offerName: vn,
|
|
596
|
+
lines: Sn,
|
|
597
|
+
line: wn,
|
|
598
|
+
check: Cn,
|
|
599
|
+
cta: kn,
|
|
600
|
+
ctaPrice: Pn,
|
|
601
|
+
ownerOnly: Ln,
|
|
602
|
+
later: $n
|
|
603
|
+
}, Hn = ({
|
|
604
|
+
title: t,
|
|
605
|
+
description: n,
|
|
606
|
+
art: r = "engine",
|
|
607
|
+
onClose: i
|
|
608
|
+
}) => {
|
|
609
|
+
const c = ne(), l = O(), { offer: o, plans: d, canBuy: p, subscriptionPath: m } = ot(), u = o ? xe(o.plan, d.data ?? [], l).filter((N) => N.included).slice(0, 5).map((N) => N.text) : [], g = o != null && o.price ? `${Pe(o.price)}起` : "";
|
|
610
|
+
return /* @__PURE__ */ s(Re, { visible: !0, header: null, footer: null, onCancel: i, className: y.modal, centered: !0, children: [
|
|
611
|
+
/* @__PURE__ */ s("div", { className: y.hero, "data-art": r, children: [
|
|
612
|
+
/* @__PURE__ */ e("span", { className: y.badge, children: "会员专享" }),
|
|
613
|
+
/* @__PURE__ */ e("span", { className: y.art, "aria-hidden": "true" }),
|
|
614
|
+
/* @__PURE__ */ e("span", { className: y.title, children: t }),
|
|
615
|
+
/* @__PURE__ */ e("span", { className: y.description, children: n })
|
|
616
|
+
] }),
|
|
617
|
+
/* @__PURE__ */ s("div", { className: y.body, children: [
|
|
618
|
+
o ? /* @__PURE__ */ s("span", { className: y.offer, children: [
|
|
619
|
+
"升级到",
|
|
620
|
+
/* @__PURE__ */ e("span", { className: y.offerName, children: o.plan.name }),
|
|
621
|
+
"即可使用,同时获得:"
|
|
622
|
+
] }) : /* @__PURE__ */ e("span", { className: y.offer, children: "升级套餐即可使用。" }),
|
|
623
|
+
u.length ? /* @__PURE__ */ e("div", { className: y.lines, role: "list", "aria-label": "升级后的权益", children: u.map((N) => /* @__PURE__ */ s("div", { className: y.line, role: "listitem", children: [
|
|
624
|
+
/* @__PURE__ */ e("span", { className: y.check, "aria-hidden": "true", children: /* @__PURE__ */ e(ae, {}) }),
|
|
625
|
+
N
|
|
626
|
+
] }, N)) }) : null,
|
|
627
|
+
p ? /* @__PURE__ */ s(
|
|
628
|
+
w,
|
|
629
|
+
{
|
|
630
|
+
theme: "light",
|
|
631
|
+
type: "tertiary",
|
|
632
|
+
block: !0,
|
|
633
|
+
className: y.cta,
|
|
634
|
+
"aria-label": `立即升级${g ? `,${g}` : ""}(打开订阅与套餐)`,
|
|
635
|
+
onClick: () => {
|
|
636
|
+
i(), c(m, { state: lt(o == null ? void 0 : o.plan.code) });
|
|
637
|
+
},
|
|
638
|
+
children: [
|
|
639
|
+
"立即升级",
|
|
640
|
+
g ? /* @__PURE__ */ e("span", { className: y.ctaPrice, children: g }) : null
|
|
641
|
+
]
|
|
642
|
+
}
|
|
643
|
+
) : /* @__PURE__ */ e("span", { className: y.ownerOnly, children: "团队套餐由所有者在统一账号中心升级,请联系团队所有者。" }),
|
|
644
|
+
/* @__PURE__ */ e(w, { theme: "borderless", type: "tertiary", block: !0, className: y.later, onClick: i, children: "暂不升级" })
|
|
645
|
+
] })
|
|
646
|
+
] });
|
|
647
|
+
};
|
|
648
|
+
export {
|
|
649
|
+
Dn as A,
|
|
650
|
+
F as C,
|
|
651
|
+
Bn as L,
|
|
652
|
+
ja as P,
|
|
653
|
+
Vn as Q,
|
|
654
|
+
zn as R,
|
|
655
|
+
K as S,
|
|
656
|
+
cn as T,
|
|
657
|
+
Hn as U,
|
|
658
|
+
pa as a,
|
|
659
|
+
ga as b,
|
|
660
|
+
on as c,
|
|
661
|
+
q as d,
|
|
662
|
+
Te as e,
|
|
663
|
+
te as f,
|
|
664
|
+
Na as g,
|
|
665
|
+
xe as p,
|
|
666
|
+
ba as y
|
|
667
|
+
};
|