@shikeai/usercenter 0.2.3 → 0.4.2

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/lib/client.js CHANGED
@@ -8,15 +8,16 @@ window.__ModuleLoader__.load({
8
8
  let react_dom_client = require("react-dom/client");
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let react_dom = require("react-dom");
11
+ //#endregion
11
12
  //#region src/components/common/Avatar.jsx
12
13
  /**
13
- * 头像组件(默认系统头像内联,不依赖外部资源加载)
14
+ * 头像组件(默认头像内联自 src/assets/default-avatar.svg,不依赖外部资源加载)
14
15
  */
15
- const DEFAULT_AVATAR = "data:image/svg+xml;utf8," + encodeURIComponent("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\"><rect width=\"64\" height=\"64\" rx=\"32\" fill=\"#E8EAED\"/><circle cx=\"32\" cy=\"26\" r=\"11\" fill=\"#B7BCC4\"/><path d=\"M12 56c2.7-10.7 10.4-16 20-16s17.3 5.3 20 16Z\" fill=\"#B7BCC4\"/></svg>");
16
+ const DEFAULT_AVATAR = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHJlY3Qgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiByeD0iMzIiIGZpbGw9IiNFOEVBRUQiLz48Y2lyY2xlIGN4PSIzMiIgY3k9IjI2IiByPSIxMSIgZmlsbD0iI0I3QkNDNCIvPjxwYXRoIGQ9Ik0xMiA1NmMyLjctMTAuNyAxMC40LTE2IDIwLTE2czE3LjMgNS4zIDIwIDE2WiIgZmlsbD0iI0I3QkNDNCIvPjwvc3ZnPgo=";
16
17
  function Avatar({ src, size = 28, className = "", alt = "头像" }) {
17
18
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
18
- className: `uc-avatar ${className}`.trim(),
19
- src: src || "data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2232%22%20fill%3D%22%23E8EAED%22%2F%3E%3Ccircle%20cx%3D%2232%22%20cy%3D%2226%22%20r%3D%2211%22%20fill%3D%22%23B7BCC4%22%2F%3E%3Cpath%20d%3D%22M12%2056c2.7-10.7%2010.4-16%2020-16s17.3%205.3%2020%2016Z%22%20fill%3D%22%23B7BCC4%22%2F%3E%3C%2Fsvg%3E",
19
+ className: `skai-uc-avatar ${className}`.trim(),
20
+ src: src || DEFAULT_AVATAR,
20
21
  width: size,
21
22
  height: size,
22
23
  style: {
@@ -26,7 +27,7 @@ window.__ModuleLoader__.load({
26
27
  alt,
27
28
  draggable: false,
28
29
  onError: (event) => {
29
- if (event.currentTarget.src !== "data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2232%22%20fill%3D%22%23E8EAED%22%2F%3E%3Ccircle%20cx%3D%2232%22%20cy%3D%2226%22%20r%3D%2211%22%20fill%3D%22%23B7BCC4%22%2F%3E%3Cpath%20d%3D%22M12%2056c2.7-10.7%2010.4-16%2020-16s17.3%205.3%2020%2016Z%22%20fill%3D%22%23B7BCC4%22%2F%3E%3C%2Fsvg%3E") event.currentTarget.src = DEFAULT_AVATAR;
30
+ if (event.currentTarget.src !== DEFAULT_AVATAR) event.currentTarget.src = DEFAULT_AVATAR;
30
31
  }
31
32
  });
32
33
  }
@@ -156,30 +157,30 @@ window.__ModuleLoader__.load({
156
157
  return () => document.removeEventListener("keydown", onKeyDown);
157
158
  }, [closable, onClose]);
158
159
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
159
- className: "uc-overlay",
160
+ className: "skai-uc-overlay",
160
161
  onMouseDown: (event) => {
161
162
  if (closable && event.target === event.currentTarget) onClose();
162
163
  },
163
164
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
164
- className: "uc-modal",
165
+ className: "skai-uc-modal",
165
166
  style: width ? { width } : void 0,
166
167
  role: "dialog",
167
168
  "aria-modal": "true",
168
169
  "aria-label": title,
169
170
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
170
- className: "uc-modal-head",
171
+ className: "skai-uc-modal-head",
171
172
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
172
- className: "uc-modal-title",
173
+ className: "skai-uc-modal-title",
173
174
  children: title
174
175
  }), closable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
175
176
  type: "button",
176
- className: "uc-icon-btn",
177
+ className: "skai-uc-icon-btn",
177
178
  onClick: onClose,
178
179
  "aria-label": "关闭",
179
180
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconClose, {})
180
181
  }) : null]
181
182
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
182
- className: "uc-modal-body",
183
+ className: "skai-uc-modal-body",
183
184
  children
184
185
  })]
185
186
  })
@@ -197,22 +198,22 @@ window.__ModuleLoader__.load({
197
198
  onClose: onCancel,
198
199
  width: 360,
199
200
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
200
- className: "uc-confirm-message",
201
+ className: "skai-uc-confirm-message",
201
202
  children: message
202
203
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
203
- className: "uc-dialog-footer",
204
+ className: "skai-uc-dialog-footer",
204
205
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
205
206
  type: "button",
206
- className: "uc-btn",
207
+ className: "skai-uc-btn",
207
208
  onClick: onCancel,
208
209
  disabled: loading,
209
210
  children: cancelText
210
211
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
211
212
  type: "button",
212
- className: `uc-btn ${danger ? "uc-btn-danger" : "uc-btn-primary"}`,
213
+ className: `skai-uc-btn ${danger ? "skai-uc-btn-danger" : "skai-uc-btn-primary"}`,
213
214
  onClick: onConfirm,
214
215
  disabled: loading,
215
- children: [loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "uc-spinner" }) : null, confirmText]
216
+ children: [loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "skai-uc-spinner" }) : null, confirmText]
216
217
  })]
217
218
  })]
218
219
  });
@@ -288,73 +289,70 @@ window.__ModuleLoader__.load({
288
289
  };
289
290
  /** 本地存储键名 */
290
291
  const STORAGE_KEYS = {
291
- token: env.VITE_REQUEST_STORAGE_TOKEN_KEY || "DSH_USER_TOKEN",
292
- userInfo: "DSH_USER_INFO"
292
+ token: env.VITE_REQUEST_STORAGE_TOKEN_KEY || "SHIKEAI_AUTH_TOKEN",
293
+ userInfo: "SHIKEAI_USER_INFO"
293
294
  };
294
295
  /** 静态资源域名(头像等相对地址补全) */
295
296
  const ASSET_CONFIG = { imgDomain: trimSlash(env.VITE_IMG_DOMAIN || "https://yun.shikeai.com") };
296
297
  //#endregion
297
298
  //#region src/core/global-token.js
298
299
  /**
299
- * 全局 Token 管理(本插件为 window.DSH_USER_TOKEN 唯一权威挂载方)
300
+ * 全局 Token 管理(插件内部私有,不对插件生态暴露)
300
301
  *
301
- * - 登录成功:window.DSH_USER_TOKEN 挂载 + localStorage 持久化
302
- * - 退出 / 失效:删除全局变量与本地缓存
303
- * - 其他插件只读,判断 `window.DSH_USER_TOKEN` 是否存在即可区分游客 / 登录用户
302
+ * 安全约定(对齐功能文档 5.2):
303
+ * - 登录 Token 仅由用户中心内部持有,仅用于调用云接口,不挂载至任何
304
+ * 插件可读取的全局变量,也不以任何形式对插件暴露
305
+ * - localStorage 仅作会话持久化(跨标签页 storage 事件同步依赖),
306
+ * 读取 / 写入 / 清除全部收敛在本模块,业务插件不感知 Token 存在
307
+ * - 插件判断登录态一律使用 isLoggedIn()(module 导出)或
308
+ * window.SHIKEAI_USER_INFO(公开用户信息),禁止接触 Token
304
309
  */
305
- /** 从 localStorage 恢复 Token 并挂载到 window(插件 install / 激活时调用) */
310
+ /** 模块内私有 Token(空串为游客态,不暴露给任何外部作用域) */
311
+ let tokenCache = "";
312
+ /** 从 localStorage 恢复 Token 至模块内部缓存(插件 install / 激活时调用) */
306
313
  function hydrateToken() {
307
314
  if (typeof window === "undefined") return "";
308
- let token = "";
309
315
  try {
310
- token = window.localStorage.getItem(STORAGE_KEYS.token) || "";
311
- } catch (error) {}
312
- if (token) window.DSH_USER_TOKEN = token;
313
- return token;
316
+ tokenCache = window.localStorage.getItem(STORAGE_KEYS.token) || "";
317
+ } catch (error) {
318
+ tokenCache = "";
319
+ }
320
+ return tokenCache;
314
321
  }
315
- /** 读取当前 Token(未登录返回空字符串) */
322
+ /** 读取当前 Token(未登录返回空字符串;仅用户中心内部使用) */
316
323
  function getToken() {
317
- if (typeof window === "undefined") return "";
318
- return window.DSH_USER_TOKEN || "";
324
+ return tokenCache;
319
325
  }
320
- /** 写入 Token(window + localStorage 双写) */
326
+ /** 写入 Token(模块缓存 + localStorage 持久化) */
321
327
  function setToken(token) {
322
- if (typeof window === "undefined") return;
323
- window.DSH_USER_TOKEN = token;
328
+ tokenCache = String(token || "");
324
329
  try {
325
- window.localStorage.setItem(STORAGE_KEYS.token, token);
330
+ window.localStorage.setItem(STORAGE_KEYS.token, tokenCache);
326
331
  } catch (error) {}
327
332
  }
328
- /** 清空 Token(window + localStorage 双清) */
333
+ /** 清空 Token(模块缓存 + localStorage 双清) */
329
334
  function clearToken() {
330
- if (typeof window === "undefined") return;
331
- try {
332
- delete window.DSH_USER_TOKEN;
333
- } catch (error) {
334
- window.DSH_USER_TOKEN = void 0;
335
- }
335
+ tokenCache = "";
336
336
  try {
337
337
  window.localStorage.removeItem(STORAGE_KEYS.token);
338
338
  } catch (error) {}
339
339
  }
340
- //#endregion
341
- //#region src/utils/mask.js
342
- /**
343
- * 隐私脱敏工具(全链路统一收敛)
344
- */
345
- /** 手机号脱敏:138****1234;非 11 位手机号原样返回 */
346
- function maskMobile(mobile) {
347
- const value = String(mobile || "");
348
- if (!/^1\d{10}$/.test(value)) return value;
349
- return value.replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2");
340
+ /** 是否已登录(插件生态判断登录态的唯一官方途径) */
341
+ function isLoggedIn() {
342
+ return !!tokenCache;
350
343
  }
351
344
  //#endregion
352
345
  //#region src/core/global-user.js
353
346
  /**
354
- * 全局用户信息管理(window.DSH_USER_INFO 唯一权威挂载方)
347
+ * 全局用户信息管理(window.SHIKEAI_USER_INFO 唯一权威挂载方)
355
348
  *
356
- * - 仅暴露脱敏手机号、昵称、头像等公开信息,原始手机号不进入全局变量
349
+ * 安全约定(对齐功能文档 5.2):
350
+ * - 对外仅暴露公开信息:脱敏手机号(138****1234)、昵称、头像、uid
351
+ * - 明文手机号禁止进入该对象与 localStorage(全链路脱敏)
357
352
  * - 挂载对象 Object.freeze,其他插件只读、禁止私自修改
353
+ * - 需要可信身份(uid + 手机号md5)的插件必须走验签接口
354
+ * (getSignCredential / window.SHIKEAI_GET_SIGN_CREDENTIAL),
355
+ * 由插件后端公钥验签,而非信任本对象
358
356
  */
359
357
  /** 相对地址补全为可访问的图片地址 */
360
358
  function normalizeImageUrl(url) {
@@ -363,12 +361,19 @@ window.__ModuleLoader__.load({
363
361
  if (/^(https?:)?\/\//i.test(value) || value.startsWith("data:")) return value;
364
362
  return `${ASSET_CONFIG.imgDomain}/${value.replace(/^\//, "")}`;
365
363
  }
366
- /** niucloud 会员信息 → 插件统一用户结构(手机号全链路脱敏) */
364
+ /** 手机号脱敏(138****1234);非法长度时整体掩码,杜绝明文外泄 */
365
+ function maskMobile(mobile) {
366
+ const value = String(mobile || "").trim();
367
+ if (!value) return "";
368
+ if (/^1\d{10}$/.test(value)) return `${value.slice(0, 3)}****${value.slice(7)}`;
369
+ return "****";
370
+ }
371
+ /** niucloud 会员信息 → 插件统一用户结构(uid + 脱敏手机号) */
367
372
  function normalizeMemberInfo(raw) {
368
373
  const info = raw || {};
369
374
  return {
370
- memberId: info.member_id ?? info.memberId ?? "",
371
- mobile: maskMobile(info.mobile || ""),
375
+ uid: info.uid ?? info.member_id ?? info.memberId ?? "",
376
+ mobile: maskMobile(info.mobile),
372
377
  nickname: String(info.nickname || "").trim(),
373
378
  avatar: normalizeImageUrl(info.headimg || info.avatar || "")
374
379
  };
@@ -376,24 +381,24 @@ window.__ModuleLoader__.load({
376
381
  /** 挂载用户信息(window + localStorage 双写,冻结防篡改) */
377
382
  function setUserInfo(user) {
378
383
  if (typeof window === "undefined") return user;
379
- window.DSH_USER_INFO = Object.freeze({ ...user || {} });
384
+ window.SHIKEAI_USER_INFO = Object.freeze({ ...user || {} });
380
385
  try {
381
386
  window.localStorage.setItem(STORAGE_KEYS.userInfo, JSON.stringify(user || {}));
382
387
  } catch (error) {}
383
388
  return user;
384
389
  }
385
- /** 读取全局用户信息 */
390
+ /** 读取全局用户信息(公开只读快照) */
386
391
  function getUserInfo() {
387
392
  if (typeof window === "undefined") return null;
388
- return window.DSH_USER_INFO || null;
393
+ return window.SHIKEAI_USER_INFO || null;
389
394
  }
390
395
  /** 清空用户信息 */
391
396
  function clearUserInfo() {
392
397
  if (typeof window === "undefined") return;
393
398
  try {
394
- delete window.DSH_USER_INFO;
399
+ delete window.SHIKEAI_USER_INFO;
395
400
  } catch (error) {
396
- window.DSH_USER_INFO = void 0;
401
+ window.SHIKEAI_USER_INFO = void 0;
397
402
  }
398
403
  try {
399
404
  window.localStorage.removeItem(STORAGE_KEYS.userInfo);
@@ -409,7 +414,13 @@ window.__ModuleLoader__.load({
409
414
  } catch (error) {
410
415
  user = null;
411
416
  }
412
- if (user) window.DSH_USER_INFO = Object.freeze({ ...user });
417
+ if (user) {
418
+ user = {
419
+ ...user,
420
+ mobile: maskMobile(user.mobile)
421
+ };
422
+ window.SHIKEAI_USER_INFO = Object.freeze({ ...user });
423
+ }
413
424
  return user;
414
425
  }
415
426
  //#endregion
@@ -418,14 +429,14 @@ window.__ModuleLoader__.load({
418
429
  * 全局登录态事件广播(插件生态实时同步)
419
430
  *
420
431
  * 事件一览:
421
- * - dsh-usercenter:login 登录成功(Token 已就绪,detail.user 可能为 null,资料经 user-update 补齐)
422
- * - dsh-usercenter:logout 主动退出登录
423
- * - dsh-usercenter:expired 登录失效 / 异地下线强退(detail.reason)
424
- * - dsh-usercenter:user-update 用户信息更新(登录后拉取、资料修改,detail.user)
432
+ * - shikeai-usercenter:login 登录成功(Token 已就绪,detail.user 可能为 null,资料经 user-update 补齐)
433
+ * - shikeai-usercenter:logout 主动退出登录
434
+ * - shikeai-usercenter:expired 登录失效 / 异地下线强退(detail.reason)
435
+ * - shikeai-usercenter:user-update 用户信息更新(登录后拉取、资料修改,detail.user)
425
436
  *
426
437
  * 其他业务插件通过 onAuthEvent 订阅,或直接监听 window 上的同名 CustomEvent。
427
438
  */
428
- const EVENT_PREFIX = "dsh-usercenter";
439
+ const EVENT_PREFIX = "shikeai-usercenter";
429
440
  const AUTH_EVENTS = {
430
441
  LOGIN: `${EVENT_PREFIX}:login`,
431
442
  LOGOUT: `${EVENT_PREFIX}:logout`,
@@ -445,7 +456,7 @@ window.__ModuleLoader__.load({
445
456
  window.dispatchEvent(new CustomEvent(type, { detail }));
446
457
  }
447
458
  /**
448
- * UI 弹窗状态管理:登录窗、个人中心、帮助、关于、下拉菜单、全局提示
459
+ * UI 弹窗状态管理:登录窗、用户中心、帮助、关于、下拉菜单、全局提示
449
460
  */
450
461
  const uiStore = createStore({
451
462
  loginOpen: false,
@@ -692,7 +703,7 @@ window.__ModuleLoader__.load({
692
703
  /**
693
704
  * 会员信息接口(对齐 uni-app app/api/member.ts)
694
705
  */
695
- /** 获取会员信息(个人中心展示) */
706
+ /** 获取会员信息(用户中心展示) */
696
707
  function getMemberInfo() {
697
708
  return request_default.get("member/member");
698
709
  }
@@ -700,6 +711,45 @@ window.__ModuleLoader__.load({
700
711
  function modifyMember(data) {
701
712
  return request_default.put(`member/modify/${data.field}`, data);
702
713
  }
714
+ /**
715
+ * 获取会员凭证签名(Ed25519 验签数据,仅用户中心前端携带 Token 调用)
716
+ * 返回 data: { sign(base64), message(被签名明文), content: { uid, mobile_md5, timestamp } }
717
+ */
718
+ function getSignCredential$1() {
719
+ return request_default.get("member/sign_credential");
720
+ }
721
+ /**
722
+ * 读取会员配置项(会员维度键值云存储;平台自定义扩展,uni-app 端暂无)
723
+ * @param {string} [keys] 逗号分隔的配置 key,缺省读取全部
724
+ * 返回 data: { config_key: config_value }(值均为字符串)
725
+ */
726
+ function getMemberConfig$1(keys) {
727
+ return request_default.get("member/config", keys ? { keys } : {});
728
+ }
729
+ /**
730
+ * 保存会员配置项(平台自定义扩展,uni-app 端暂无)
731
+ * @param {Record<string, string|number|boolean>} config key => value 键值对(value 须为标量,云端以字符串存储)
732
+ * 已存在同 key 则覆盖更新,不存在则新增
733
+ */
734
+ function setMemberConfig$1(config) {
735
+ return request_default.post("member/config", { config });
736
+ }
737
+ /**
738
+ * 批量获取会员公开信息(平台自定义扩展,uni-app 端暂无;仅用户中心前端调用,供插件生态成员资料展示)
739
+ * @param {Array<number|string>} memberIds 会员 id 列表(去重后单次上限 50,云端同限)
740
+ * 返回 data: { [member_id]: { member_id, nickname, headimg, mobile(服务端已脱敏) } }
741
+ */
742
+ function getMemberBatchInfo(memberIds) {
743
+ return request_default.get("member/batch_info", { member_ids: (memberIds || []).join(",") });
744
+ }
745
+ /**
746
+ * 通过手机号查询会员 UID(平台自定义扩展,uni-app 端暂无;仅用户中心前端调用,供插件生态按手机号定位成员)
747
+ * @param {string} mobile 手机号(1 开头 11 位数字)
748
+ * 返回 data: { member_id, nickname, headimg, mobile(服务端已脱敏) };未匹配返回 {}
749
+ */
750
+ function getMemberUidByMobile(mobile) {
751
+ return request_default.get("member/uid_by_mobile", { mobile });
752
+ }
703
753
  //#endregion
704
754
  //#region src/store/auth-store.js
705
755
  /**
@@ -709,7 +759,7 @@ window.__ModuleLoader__.load({
709
759
  const authStore = createStore({
710
760
  /** 登录 Token(空串为游客态) */
711
761
  token: "",
712
- /** 已脱敏的用户信息 */
762
+ /** 用户信息 */
713
763
  user: null,
714
764
  /** 登录手机号兜底展示(会员信息未就绪时用于侧边栏昵称位) */
715
765
  fallbackMobile: ""
@@ -817,7 +867,7 @@ window.__ModuleLoader__.load({
817
867
  {
818
868
  key: "profile",
819
869
  icon: IconUser,
820
- label: "个人中心",
870
+ label: "我的",
821
871
  action: openProfile
822
872
  },
823
873
  {
@@ -834,7 +884,7 @@ window.__ModuleLoader__.load({
834
884
  }
835
885
  ];
836
886
  /**
837
- * 头像下拉菜单:个人中心 / 帮助 / 关于 / 退出登录(点击空白处自动收起)
887
+ * 头像下拉菜单:用户中心 / 帮助 / 关于 / 退出登录(点击空白处自动收起)
838
888
  *
839
889
  * 菜单经 Portal 挂 body、fixed 定位锚定侧边栏入口按钮(anchorRef):
840
890
  * 宿主 sidebar 列存在 overflow 裁剪与 stacking context,原地 absolute 弹出会被遮盖;
@@ -879,7 +929,7 @@ window.__ModuleLoader__.load({
879
929
  };
880
930
  if (!pos) return null;
881
931
  return (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
882
- className: "uc-root uc-dropdown",
932
+ className: "skai-uc-root skai-uc-dropdown",
883
933
  style: {
884
934
  left: pos.left,
885
935
  width: pos.width,
@@ -889,32 +939,32 @@ window.__ModuleLoader__.load({
889
939
  role: "menu",
890
940
  children: [
891
941
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
892
- className: "uc-dropdown-head",
942
+ className: "skai-uc-dropdown-head",
893
943
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Avatar, {
894
944
  src: user && user.avatar,
895
945
  size: 34
896
946
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
897
947
  style: { minWidth: 0 },
898
948
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
899
- className: "uc-dd-name",
949
+ className: "skai-uc-dd-name",
900
950
  children: user && user.nickname && user.nickname.trim() || "用户"
901
951
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
902
- className: "uc-dd-mobile",
952
+ className: "skai-uc-dd-mobile",
903
953
  children: user && user.mobile || fallbackMobile || ""
904
954
  })]
905
955
  })]
906
956
  }),
907
957
  MENU_ITEMS.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
908
958
  type: "button",
909
- className: "uc-menu-item",
959
+ className: "skai-uc-menu-item",
910
960
  role: "menuitem",
911
961
  onClick: () => item.action(),
912
962
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(item.icon, { size: 15 }), item.label]
913
963
  }, item.key)),
914
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "uc-menu-divider" }),
964
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "skai-uc-menu-divider" }),
915
965
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
916
966
  type: "button",
917
- className: "uc-menu-item danger",
967
+ className: "skai-uc-menu-item danger",
918
968
  role: "menuitem",
919
969
  onClick: () => setConfirming(true),
920
970
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconLogout, { size: 15 }), "退出登录"]
@@ -937,7 +987,7 @@ window.__ModuleLoader__.load({
937
987
  * 侧边栏底部固定入口(复刻豆包桌面端布局)
938
988
  * - DSH 官方 slot 挂载时接收 owner prop wide(false = 56px 折叠栏),standalone 路径默认 wide
939
989
  * - 展开态:未登录【登录】按钮 / 已登录头像 + 昵称 + 向上悬浮下拉菜单
940
- * - 折叠态:图标按钮,点击直达(未登录 → 登录弹窗,已登录 → 个人中心)
990
+ * - 折叠态:图标按钮,点击直达(未登录 → 登录弹窗,已登录 → 用户中心)
941
991
  */
942
992
  function SidebarEntry({ wide = true } = {}) {
943
993
  const anchorRef = (0, react.useRef)(null);
@@ -947,10 +997,10 @@ window.__ModuleLoader__.load({
947
997
  const dropdownOpen = useStore(uiStore, (s) => s.dropdownOpen);
948
998
  const displayName = user && user.nickname && user.nickname.trim() || user && user.mobile || fallbackMobile || "已登录";
949
999
  if (!wide) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
950
- className: "uc-root uc-entry",
1000
+ className: "skai-uc-root skai-uc-entry",
951
1001
  children: token ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
952
1002
  type: "button",
953
- className: "uc-rail-btn",
1003
+ className: "skai-uc-rail-btn",
954
1004
  onClick: () => openProfile(),
955
1005
  title: displayName,
956
1006
  "aria-label": displayName,
@@ -960,7 +1010,7 @@ window.__ModuleLoader__.load({
960
1010
  })
961
1011
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
962
1012
  type: "button",
963
- className: "uc-rail-btn",
1013
+ className: "skai-uc-rail-btn",
964
1014
  onClick: () => openLogin(),
965
1015
  title: "登录",
966
1016
  "aria-label": "登录",
@@ -968,22 +1018,22 @@ window.__ModuleLoader__.load({
968
1018
  })
969
1019
  });
970
1020
  if (!token) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
971
- className: "uc-root uc-entry",
1021
+ className: "skai-uc-root skai-uc-entry",
972
1022
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
973
1023
  type: "button",
974
- className: "uc-login-btn",
1024
+ className: "skai-uc-login-btn",
975
1025
  onClick: () => openLogin(),
976
1026
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconUser, { size: 18 }), "登录"]
977
1027
  })
978
1028
  });
979
1029
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
980
- className: "uc-root uc-entry",
1030
+ className: "skai-uc-root skai-uc-entry",
981
1031
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
982
- className: "uc-user-wrap",
1032
+ className: "skai-uc-user-wrap",
983
1033
  ref: anchorRef,
984
1034
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
985
1035
  type: "button",
986
- className: "uc-user-btn",
1036
+ className: "skai-uc-user-btn",
987
1037
  onClick: () => toggleDropdown(),
988
1038
  "aria-haspopup": "menu",
989
1039
  "aria-expanded": dropdownOpen,
@@ -993,11 +1043,11 @@ window.__ModuleLoader__.load({
993
1043
  size: 28
994
1044
  }),
995
1045
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
996
- className: "uc-user-name",
1046
+ className: "skai-uc-user-name",
997
1047
  children: displayName
998
1048
  }),
999
1049
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1000
- className: `uc-chevron ${dropdownOpen ? "is-open" : ""}`,
1050
+ className: `skai-uc-chevron ${dropdownOpen ? "is-open" : ""}`,
1001
1051
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronUp, { size: 14 })
1002
1052
  })
1003
1053
  ]
@@ -1033,11 +1083,11 @@ window.__ModuleLoader__.load({
1033
1083
  */
1034
1084
  function PhoneInput({ value, onChange, onBlur, error, disabled, autoFocus }) {
1035
1085
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1036
- className: `uc-field ${error ? "is-error" : ""}`,
1086
+ className: `skai-uc-field ${error ? "is-error" : ""}`,
1037
1087
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1038
- className: "uc-input",
1088
+ className: "skai-uc-input",
1039
1089
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1040
- className: "uc-phone-prefix",
1090
+ className: "skai-uc-phone-prefix",
1041
1091
  children: "+86"
1042
1092
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1043
1093
  type: "tel",
@@ -1053,7 +1103,7 @@ window.__ModuleLoader__.load({
1053
1103
  onBlur
1054
1104
  })]
1055
1105
  }), error ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1056
- className: "uc-field-error",
1106
+ className: "skai-uc-field-error",
1057
1107
  children: error
1058
1108
  }) : null]
1059
1109
  });
@@ -1061,30 +1111,30 @@ window.__ModuleLoader__.load({
1061
1111
  //#endregion
1062
1112
  //#region src/components/login/CodeInput.jsx
1063
1113
  /**
1064
- * 验证码输入:仅支持 6 位纯数字(children 用于挂载「获取验证码」按钮)
1114
+ * 验证码输入:仅支持 4 位纯数字(children 用于挂载「获取验证码」按钮)
1065
1115
  */
1066
1116
  function CodeInput({ value, onChange, error, disabled, autoFocus, onEnter, children }) {
1067
1117
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1068
- className: `uc-field ${error ? "is-error" : ""}`,
1118
+ className: `skai-uc-field ${error ? "is-error" : ""}`,
1069
1119
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1070
- className: "uc-input uc-code-input",
1120
+ className: "skai-uc-input skai-uc-code-input",
1071
1121
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1072
1122
  type: "text",
1073
1123
  inputMode: "numeric",
1074
1124
  autoComplete: "one-time-code",
1075
- maxLength: 6,
1125
+ maxLength: 4,
1076
1126
  placeholder: "请输入验证码",
1077
1127
  value,
1078
1128
  disabled,
1079
1129
  autoFocus,
1080
1130
  "aria-invalid": !!error,
1081
- onChange: (event) => onChange(sanitizeDigits(event.target.value, 6)),
1131
+ onChange: (event) => onChange(sanitizeDigits(event.target.value, 4)),
1082
1132
  onKeyDown: (event) => {
1083
1133
  if (event.key === "Enter" && onEnter) onEnter();
1084
1134
  }
1085
1135
  }), children]
1086
1136
  }), error ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1087
- className: "uc-field-error",
1137
+ className: "skai-uc-field-error",
1088
1138
  children: error
1089
1139
  }) : null]
1090
1140
  });
@@ -1097,7 +1147,7 @@ window.__ModuleLoader__.load({
1097
1147
  function SendCodeButton({ disabled, counting, seconds, onSend }) {
1098
1148
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1099
1149
  type: "button",
1100
- className: "uc-send-btn",
1150
+ className: "skai-uc-send-btn",
1101
1151
  disabled: disabled || counting,
1102
1152
  onClick: onSend,
1103
1153
  children: counting ? `${seconds}s 后重发` : "获取验证码"
@@ -1315,11 +1365,11 @@ window.__ModuleLoader__.load({
1315
1365
  onClose: closeLogin,
1316
1366
  children: [
1317
1367
  reason ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1318
- className: "uc-banner uc-banner-info",
1368
+ className: "skai-uc-banner skai-uc-banner-info",
1319
1369
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconInfo, { size: 15 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: reason })]
1320
1370
  }) : null,
1321
1371
  formError ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1322
- className: "uc-banner uc-banner-error",
1372
+ className: "skai-uc-banner skai-uc-banner-error",
1323
1373
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconAlert, { size: 15 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: formError })]
1324
1374
  }) : null,
1325
1375
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PhoneInput, {
@@ -1350,48 +1400,48 @@ window.__ModuleLoader__.load({
1350
1400
  }),
1351
1401
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1352
1402
  type: "button",
1353
- className: "uc-btn uc-btn-primary uc-btn-block",
1403
+ className: "skai-uc-btn skai-uc-btn-primary skai-uc-btn-block",
1354
1404
  disabled: !canSubmit,
1355
1405
  onClick: handleLogin,
1356
- children: [submitting ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "uc-spinner" }) : null, submitting ? "登录中…" : "登录"]
1406
+ children: [submitting ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "skai-uc-spinner" }) : null, submitting ? "登录中…" : "登录"]
1357
1407
  }),
1358
1408
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1359
- className: "uc-login-hint",
1409
+ className: "skai-uc-login-hint",
1360
1410
  children: "未注册的手机号验证通过后将自动注册并登录"
1361
1411
  }),
1362
1412
  captcha.open ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1363
- className: "uc-overlay uc-captcha-overlay",
1413
+ className: "skai-uc-overlay skai-uc-captcha-overlay",
1364
1414
  onMouseDown: (event) => {
1365
1415
  if (event.target === event.currentTarget) closeCaptcha();
1366
1416
  },
1367
1417
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1368
- className: "uc-modal uc-captcha-modal",
1418
+ className: "skai-uc-modal skai-uc-captcha-modal",
1369
1419
  role: "dialog",
1370
1420
  "aria-modal": "true",
1371
1421
  "aria-label": "安全验证",
1372
1422
  children: [
1373
1423
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1374
- className: "uc-modal-head",
1424
+ className: "skai-uc-modal-head",
1375
1425
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
1376
- className: "uc-modal-title",
1426
+ className: "skai-uc-modal-title",
1377
1427
  children: "安全验证"
1378
1428
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1379
1429
  type: "button",
1380
- className: "uc-icon-btn",
1430
+ className: "skai-uc-icon-btn",
1381
1431
  onClick: closeCaptcha,
1382
1432
  "aria-label": "关闭",
1383
1433
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconClose, {})
1384
1434
  })]
1385
1435
  }),
1386
1436
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1387
- className: "uc-modal-body",
1437
+ className: "skai-uc-modal-body",
1388
1438
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1389
- className: "uc-captcha-tip",
1439
+ className: "skai-uc-captcha-tip",
1390
1440
  children: "为保障账号安全,请先完成图形验证"
1391
1441
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1392
- className: `uc-field ${captcha.error ? "is-error" : ""}`,
1442
+ className: `skai-uc-field ${captcha.error ? "is-error" : ""}`,
1393
1443
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1394
- className: "uc-input",
1444
+ className: "skai-uc-input",
1395
1445
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1396
1446
  autoFocus: true,
1397
1447
  type: "text",
@@ -1408,36 +1458,36 @@ window.__ModuleLoader__.load({
1408
1458
  if (event.key === "Enter") confirmCaptcha();
1409
1459
  }
1410
1460
  }), captcha.image ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
1411
- className: "uc-captcha-img",
1461
+ className: "skai-uc-captcha-img",
1412
1462
  src: captcha.image,
1413
1463
  alt: "图形验证码",
1414
1464
  title: "点击刷新",
1415
1465
  onClick: refreshCaptcha
1416
1466
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1417
1467
  type: "button",
1418
- className: "uc-captcha-refresh",
1468
+ className: "skai-uc-captcha-refresh",
1419
1469
  onClick: refreshCaptcha,
1420
1470
  children: captcha.loadingImage ? "加载中…" : "获取图片"
1421
1471
  })]
1422
1472
  }), captcha.error ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1423
- className: "uc-field-error",
1473
+ className: "skai-uc-field-error",
1424
1474
  children: captcha.error
1425
1475
  }) : null]
1426
1476
  })]
1427
1477
  }),
1428
1478
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1429
- className: "uc-modal-foot",
1479
+ className: "skai-uc-modal-foot",
1430
1480
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1431
1481
  type: "button",
1432
- className: "uc-btn",
1482
+ className: "skai-uc-btn",
1433
1483
  onClick: closeCaptcha,
1434
1484
  children: "取消"
1435
1485
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1436
1486
  type: "button",
1437
- className: "uc-btn uc-btn-primary",
1487
+ className: "skai-uc-btn skai-uc-btn-primary",
1438
1488
  onClick: confirmCaptcha,
1439
1489
  disabled: captcha.loading,
1440
- children: [captcha.loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "uc-spinner" }) : null, "发送短信验证码"]
1490
+ children: [captcha.loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "skai-uc-spinner" }) : null, "发送短信验证码"]
1441
1491
  })]
1442
1492
  })
1443
1493
  ]
@@ -1456,11 +1506,11 @@ window.__ModuleLoader__.load({
1456
1506
  function AvatarEditor({ user, onPick }) {
1457
1507
  const inputRef = (0, react.useRef)(null);
1458
1508
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1459
- className: "uc-profile-avatar-wrap",
1509
+ className: "skai-uc-profile-avatar-wrap",
1460
1510
  children: [
1461
1511
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1462
1512
  type: "button",
1463
- className: "uc-avatar-edit",
1513
+ className: "skai-uc-avatar-edit",
1464
1514
  onClick: () => inputRef.current && inputRef.current.click(),
1465
1515
  title: "更换头像",
1466
1516
  "aria-label": "更换头像",
@@ -1468,12 +1518,12 @@ window.__ModuleLoader__.load({
1468
1518
  src: user && user.avatar,
1469
1519
  size: 76
1470
1520
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1471
- className: "uc-avatar-edit-mask",
1521
+ className: "skai-uc-avatar-edit-mask",
1472
1522
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCamera, { size: 16 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "更换" })]
1473
1523
  })]
1474
1524
  }),
1475
1525
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1476
- className: "uc-profile-avatar-tip",
1526
+ className: "skai-uc-profile-avatar-tip",
1477
1527
  children: "支持 jpg / png / webp,裁剪后上传"
1478
1528
  }),
1479
1529
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
@@ -1575,10 +1625,10 @@ window.__ModuleLoader__.load({
1575
1625
  canvas.toBlob((blob) => blob && onConfirm(blob), "image/png");
1576
1626
  };
1577
1627
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1578
- className: "uc-cropper",
1628
+ className: "skai-uc-cropper",
1579
1629
  children: [
1580
1630
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1581
- className: "uc-crop-stage",
1631
+ className: "skai-uc-crop-stage",
1582
1632
  ref: stageRef,
1583
1633
  onPointerDown,
1584
1634
  onPointerMove,
@@ -1586,7 +1636,7 @@ window.__ModuleLoader__.load({
1586
1636
  onPointerCancel: onPointerUp,
1587
1637
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
1588
1638
  ref: imgRef,
1589
- className: "uc-crop-img",
1639
+ className: "skai-uc-crop-img",
1590
1640
  src: image,
1591
1641
  alt: "待裁剪头像",
1592
1642
  draggable: false,
@@ -1607,12 +1657,12 @@ window.__ModuleLoader__.load({
1607
1657
  });
1608
1658
  }
1609
1659
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1610
- className: "uc-crop-mask",
1611
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "uc-crop-circle" })
1660
+ className: "skai-uc-crop-mask",
1661
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "skai-uc-crop-circle" })
1612
1662
  })]
1613
1663
  }),
1614
1664
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1615
- className: "uc-crop-tools",
1665
+ className: "skai-uc-crop-tools",
1616
1666
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "缩放" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1617
1667
  type: "range",
1618
1668
  min: "1",
@@ -1624,23 +1674,23 @@ window.__ModuleLoader__.load({
1624
1674
  })]
1625
1675
  }),
1626
1676
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1627
- className: "uc-crop-hint",
1677
+ className: "skai-uc-crop-hint",
1628
1678
  children: "拖动调整位置 · 滚轮或滑杆缩放"
1629
1679
  }),
1630
1680
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1631
- className: "uc-crop-actions",
1681
+ className: "skai-uc-crop-actions",
1632
1682
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1633
1683
  type: "button",
1634
- className: "uc-btn",
1684
+ className: "skai-uc-btn",
1635
1685
  onClick: onCancel,
1636
1686
  disabled: uploading,
1637
1687
  children: "取消"
1638
1688
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1639
1689
  type: "button",
1640
- className: "uc-btn uc-btn-primary",
1690
+ className: "skai-uc-btn skai-uc-btn-primary",
1641
1691
  onClick: handleConfirm,
1642
1692
  disabled: uploading,
1643
- children: [uploading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "uc-spinner" }) : null, uploading ? "上传中…" : "确认上传"]
1693
+ children: [uploading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "skai-uc-spinner" }) : null, uploading ? "上传中…" : "确认上传"]
1644
1694
  })]
1645
1695
  })
1646
1696
  ]
@@ -1679,15 +1729,15 @@ window.__ModuleLoader__.load({
1679
1729
  }
1680
1730
  };
1681
1731
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1682
- className: "uc-section",
1732
+ className: "skai-uc-section",
1683
1733
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1684
- className: "uc-section-head",
1734
+ className: "skai-uc-section-head",
1685
1735
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
1686
- className: "uc-section-label",
1687
- htmlFor: "uc-nickname-input",
1736
+ className: "skai-uc-section-label",
1737
+ htmlFor: "skai-uc-nickname-input",
1688
1738
  children: "昵称"
1689
1739
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1690
- className: "uc-section-extra",
1740
+ className: "skai-uc-section-extra",
1691
1741
  children: [
1692
1742
  value.length,
1693
1743
  "/",
@@ -1695,11 +1745,11 @@ window.__ModuleLoader__.load({
1695
1745
  ]
1696
1746
  })]
1697
1747
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1698
- className: "uc-nick-row",
1748
+ className: "skai-uc-nick-row",
1699
1749
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1700
- className: "uc-input",
1750
+ className: "skai-uc-input",
1701
1751
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1702
- id: "uc-nickname-input",
1752
+ id: "skai-uc-nickname-input",
1703
1753
  type: "text",
1704
1754
  maxLength: NICKNAME_MAX,
1705
1755
  placeholder: "请输入昵称",
@@ -1711,10 +1761,10 @@ window.__ModuleLoader__.load({
1711
1761
  })
1712
1762
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1713
1763
  type: "button",
1714
- className: "uc-btn uc-btn-primary",
1764
+ className: "skai-uc-btn skai-uc-btn-primary",
1715
1765
  disabled: !dirty || !value.trim() || saving,
1716
1766
  onClick: handleSave,
1717
- children: [saving ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "uc-spinner" }) : null, "保存"]
1767
+ children: [saving ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "skai-uc-spinner" }) : null, "保存"]
1718
1768
  })]
1719
1769
  })]
1720
1770
  });
@@ -1723,7 +1773,7 @@ window.__ModuleLoader__.load({
1723
1773
  //#region src/pages/profile/ProfilePage.jsx
1724
1774
  const MAX_IMAGE_SIZE = 10485760;
1725
1775
  /**
1726
- * 个人中心弹窗:头像编辑、昵称编辑、脱敏手机号静态展示(仅基础资料,功能极简)
1776
+ * 用户中心弹窗:头像编辑、昵称编辑、手机号静态展示(仅基础资料,功能极简)
1727
1777
  */
1728
1778
  function ProfilePage() {
1729
1779
  const user = useStore(authStore, (s) => s.user);
@@ -1789,7 +1839,7 @@ window.__ModuleLoader__.load({
1789
1839
  })
1790
1840
  });
1791
1841
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Modal, {
1792
- title: "个人中心",
1842
+ title: "我的",
1793
1843
  onClose: closeProfile,
1794
1844
  children: [
1795
1845
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarEditor, {
@@ -1798,23 +1848,36 @@ window.__ModuleLoader__.load({
1798
1848
  }),
1799
1849
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NicknameEditor, {}),
1800
1850
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1801
- className: "uc-section",
1802
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1803
- className: "uc-section-head",
1804
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1805
- className: "uc-section-label",
1806
- children: "账号"
1851
+ className: "skai-uc-section",
1852
+ children: [
1853
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1854
+ className: "skai-uc-section-head",
1855
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1856
+ className: "skai-uc-section-label",
1857
+ children: "账号"
1858
+ })
1859
+ }),
1860
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1861
+ className: "skai-uc-account-row",
1862
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1863
+ className: "skai-uc-account-value",
1864
+ children: user && user.mobile || fallbackMobile || "—"
1865
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1866
+ className: "skai-uc-account-tag",
1867
+ children: "手机号 · 唯一凭证,不可修改"
1868
+ })]
1869
+ }),
1870
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1871
+ className: "skai-uc-account-row",
1872
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1873
+ className: "skai-uc-account-value",
1874
+ children: user && user.uid || "—"
1875
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1876
+ className: "skai-uc-account-tag",
1877
+ children: "用户ID · 平台唯一标识"
1878
+ })]
1807
1879
  })
1808
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1809
- className: "uc-account-row",
1810
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1811
- className: "uc-account-value",
1812
- children: user && user.mobile || fallbackMobile || "—"
1813
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1814
- className: "uc-account-tag",
1815
- children: "手机号 · 唯一凭证,不可修改"
1816
- })]
1817
- })]
1880
+ ]
1818
1881
  })
1819
1882
  ]
1820
1883
  });
@@ -1836,7 +1899,7 @@ window.__ModuleLoader__.load({
1836
1899
  },
1837
1900
  {
1838
1901
  q: "如何修改头像和昵称?",
1839
- a: "点击侧边栏底部头像,在下拉菜单中选择「个人中心」,即可上传裁剪头像、修改昵称(支持实时预览);账号手机号为唯一登录凭证,不支持修改。"
1902
+ a: "点击侧边栏底部头像,在下拉菜单中选择「用户中心」,即可上传裁剪头像、修改昵称(支持实时预览);账号手机号为唯一登录凭证,不支持修改。"
1840
1903
  },
1841
1904
  {
1842
1905
  q: "为什么突然退出了登录?",
@@ -1852,20 +1915,20 @@ window.__ModuleLoader__.load({
1852
1915
  onClose: closeHelp,
1853
1916
  width: 440,
1854
1917
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1855
- className: "uc-faq",
1918
+ className: "skai-uc-faq",
1856
1919
  children: FAQS.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("summary", { children: [
1857
1920
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconHelp, { size: 14 }),
1858
1921
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: item.q }),
1859
1922
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronDown, {
1860
1923
  size: 14,
1861
- className: "uc-faq-chev"
1924
+ className: "skai-uc-faq-chev"
1862
1925
  })
1863
1926
  ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1864
- className: "uc-faq-body",
1927
+ className: "skai-uc-faq-body",
1865
1928
  children: item.a
1866
1929
  })] }, item.q))
1867
1930
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1868
- className: "uc-help-foot",
1931
+ className: "skai-uc-help-foot",
1869
1932
  children: "仍有问题?请前往官网获取更多支持"
1870
1933
  })]
1871
1934
  });
@@ -1882,10 +1945,10 @@ window.__ModuleLoader__.load({
1882
1945
  name: "用户中心",
1883
1946
  /** npm 作用域包名 */
1884
1947
  packageName: "@shikeai/usercenter",
1885
- /** 版本(与 package.json、基座离线包版本严格一致,Git 标签统一管理) */
1886
- version: "0.2.1",
1948
+ /** 版本:单一来源 frontend/package.json,构建时(tsdown/vite)自动内联,禁止在此手写第二份 */
1949
+ version: "0.4.2",
1887
1950
  /** 功能描述 */
1888
- description: "时刻AI平台桌面端用户中心插件:手机号验证码登录、全局 Token 登录态体系、侧边栏登录入口、弹窗式个人中心",
1951
+ description: "时刻AI平台桌面端用户中心插件:手机号验证码登录、全局登录态验签开放体系(Token 不对插件暴露)、侧边栏登录入口、弹窗式用户中心",
1889
1952
  /** 作者 */
1890
1953
  author: "shikeai",
1891
1954
  /** 平台内置预装插件,不可卸载 */
@@ -1921,27 +1984,27 @@ theme: "auto" }
1921
1984
  title: "关于",
1922
1985
  onClose: closeAbout,
1923
1986
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1924
- className: "uc-about",
1987
+ className: "skai-uc-about",
1925
1988
  children: [
1926
1989
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
1927
- className: "uc-about-logo",
1990
+ className: "skai-uc-about-logo",
1928
1991
  src: logo_default,
1929
1992
  alt: "时刻AI",
1930
1993
  draggable: false
1931
1994
  }),
1932
1995
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1933
- className: "uc-about-name",
1996
+ className: "skai-uc-about-name",
1934
1997
  children: "时刻AI平台 · 桌面端"
1935
1998
  }),
1936
1999
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1937
- className: "uc-about-slogan",
2000
+ className: "skai-uc-about-slogan",
1938
2001
  children: "AI 智能助手桌面客户端"
1939
2002
  }),
1940
2003
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1941
- className: "uc-about-rows",
2004
+ className: "skai-uc-about-rows",
1942
2005
  children: [
1943
2006
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1944
- className: "uc-about-row",
2007
+ className: "skai-uc-about-row",
1945
2008
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1946
2009
  className: "k",
1947
2010
  children: "应用"
@@ -1951,7 +2014,7 @@ theme: "auto" }
1951
2014
  })]
1952
2015
  }),
1953
2016
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1954
- className: "uc-about-row",
2017
+ className: "skai-uc-about-row",
1955
2018
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1956
2019
  className: "k",
1957
2020
  children: "插件"
@@ -1961,7 +2024,7 @@ theme: "auto" }
1961
2024
  })]
1962
2025
  }),
1963
2026
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1964
- className: "uc-about-row",
2027
+ className: "skai-uc-about-row",
1965
2028
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1966
2029
  className: "k",
1967
2030
  children: "账号服务"
@@ -1973,7 +2036,7 @@ theme: "auto" }
1973
2036
  ]
1974
2037
  }),
1975
2038
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
1976
- className: "uc-about-copyright",
2039
+ className: "skai-uc-about-copyright",
1977
2040
  children: [
1978
2041
  "© 2026 时刻AI · 本插件为平台内置组件,不可卸载。",
1979
2042
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("br", {}),
@@ -1997,11 +2060,11 @@ theme: "auto" }
1997
2060
  function GlobalNotice({ notices = [], onDismiss }) {
1998
2061
  if (!notices.length) return null;
1999
2062
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2000
- className: "uc-notices",
2063
+ className: "skai-uc-notices",
2001
2064
  children: notices.map((item) => {
2002
2065
  const Icon = ICONS[item.type] || IconInfo;
2003
2066
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2004
- className: `uc-notice uc-notice-${item.type}`,
2067
+ className: `skai-uc-notice skai-uc-notice-${item.type}`,
2005
2068
  role: "status",
2006
2069
  onClick: () => onDismiss && onDismiss(item.id),
2007
2070
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { size: 15 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: item.message })]
@@ -2039,7 +2102,226 @@ theme: "auto" }
2039
2102
  }
2040
2103
  //#endregion
2041
2104
  //#region src/styles/usercenter.css?raw
2042
- var usercenter_default = "/**\n * 用户中心插件样式体系(对标豆包桌面端:轻量极简、模态弹窗、无跳转刷新)\n * - 设计令牌收敛在 .uc-root,明暗双主题(跟随系统 / html[data-uc-theme] 手动覆盖)\n * - 全部类名 uc- 前缀,不污染宿主;box-sizing 仅作用于插件自身元素\n */\n\n/* ========== 设计令牌(浅色) ========== */\n.uc-root {\n --uc-font: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"PingFang SC\",\n \"Hiragino Sans GB\", \"Microsoft YaHei\", \"Noto Sans SC\", \"Helvetica Neue\", Arial, sans-serif;\n --uc-bg: #ffffff;\n --uc-bg-soft: #f2f3f5;\n --uc-bg-hover: #e9ebed;\n --uc-fg: #1f2329;\n --uc-fg-2: #4e5969;\n --uc-fg-3: #86909c;\n --uc-border: #e4e7ec;\n --uc-accent: #315cff;\n --uc-accent-hover: #1f47e8;\n --uc-accent-soft: rgba(49, 92, 255, 0.08);\n --uc-danger: #f53f3f;\n --uc-danger-hover: #d92c2c;\n --uc-danger-soft: rgba(245, 63, 63, 0.08);\n --uc-overlay: rgba(31, 35, 41, 0.4);\n --uc-modal-border: transparent;\n --uc-shadow-2: 0 12px 40px rgba(31, 35, 41, 0.16), 0 2px 10px rgba(31, 35, 41, 0.08);\n --uc-radius-s: 8px;\n --uc-radius-m: 12px;\n --uc-radius-l: 16px;\n color-scheme: light;\n font-family: var(--uc-font);\n font-size: 14px;\n line-height: 1.5;\n color: var(--uc-fg);\n -webkit-font-smoothing: antialiased;\n}\n\n.uc-root,\n.uc-root *,\n.uc-root *::before,\n.uc-root *::after {\n box-sizing: border-box;\n}\n\n/* ========== 深色主题(手动覆盖) ========== */\nhtml[data-uc-theme=\"dark\"] .uc-root {\n --uc-bg: #1f2022;\n --uc-bg-soft: #2a2b2e;\n --uc-bg-hover: #343538;\n --uc-fg: #e8eaed;\n --uc-fg-2: #b3b6bb;\n --uc-fg-3: #85888d;\n --uc-border: #3a3b3e;\n --uc-accent: #4d79ff;\n --uc-accent-hover: #3f6aff;\n --uc-accent-soft: rgba(77, 121, 255, 0.16);\n --uc-danger: #fb5e5e;\n --uc-danger-hover: #f04747;\n --uc-danger-soft: rgba(251, 94, 94, 0.14);\n --uc-overlay: rgba(0, 0, 0, 0.55);\n --uc-modal-border: #3a3b3e;\n color-scheme: dark;\n}\n\n/* ========== 深色主题(跟随系统) ========== */\n@media (prefers-color-scheme: dark) {\n html:not([data-uc-theme]) .uc-root {\n --uc-bg: #1f2022;\n --uc-bg-soft: #2a2b2e;\n --uc-bg-hover: #343538;\n --uc-fg: #e8eaed;\n --uc-fg-2: #b3b6bb;\n --uc-fg-3: #85888d;\n --uc-border: #3a3b3e;\n --uc-accent: #4d79ff;\n --uc-accent-hover: #3f6aff;\n --uc-accent-soft: rgba(77, 121, 255, 0.16);\n --uc-danger: #fb5e5e;\n --uc-danger-hover: #f04747;\n --uc-danger-soft: rgba(251, 94, 94, 0.14);\n --uc-overlay: rgba(0, 0, 0, 0.55);\n --uc-modal-border: #3a3b3e;\n color-scheme: dark;\n }\n}\n\n/* ========== 全局浮层容器 ========== */\n.uc-layer {\n position: relative;\n z-index: 2147483000;\n}\n\n/* ========== 侧边栏入口 ========== */\n.uc-entry {\n width: 100%;\n}\n\n/* dock 内层插槽容器:显式占满,保证按钮宽度 100% 链路完整 */\n.uc-entry-slot {\n width: 100%;\n}\n\n.uc-login-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n width: 100%;\n height: 40px;\n border: 1px solid transparent;\n border-radius: 10px;\n background: var(--uc-bg-soft);\n color: var(--uc-fg-2);\n font-family: inherit;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n}\n\n.uc-login-btn:hover {\n background: var(--uc-bg-hover);\n color: var(--uc-fg);\n}\n\n/* 折叠栏(wide=false,56px rail)图标按钮:居中圆形,宽度不跟随 rail 拉伸 */\n.uc-rail-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 40px;\n margin: 0 auto;\n padding: 0;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: var(--uc-fg-2);\n cursor: pointer;\n transition: background 0.15s ease, color 0.15s ease;\n}\n\n.uc-rail-btn:hover {\n background: var(--uc-bg-soft);\n color: var(--uc-fg);\n}\n\n/* 已登录入口按钮容器(uc-user-wrap 不再承载定位:\n 下拉菜单 Portal 挂 body,由 JS 按本容器 rect 做 fixed 锚定) */\n.uc-user-btn {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 6px 8px;\n border: none;\n border-radius: 10px;\n background: transparent;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n transition: background 0.15s ease;\n}\n\n.uc-user-btn:hover {\n background: var(--uc-bg-soft);\n}\n\n.uc-user-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 13px;\n font-weight: 500;\n color: var(--uc-fg-2);\n transition: color 0.15s ease;\n}\n\n.uc-user-btn:hover .uc-user-name {\n color: var(--uc-fg);\n}\n\n.uc-chevron {\n display: flex;\n color: var(--uc-fg-3);\n transition: transform 0.18s ease;\n}\n\n.uc-chevron.is-open {\n transform: rotate(180deg);\n}\n\n.uc-avatar {\n display: block;\n flex-shrink: 0;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n object-fit: cover;\n background: var(--uc-bg-soft);\n user-select: none;\n}\n\n/* 宿主未提供插槽时的左下角自停靠兜底\n 注意:不设 z-index(依赖 body 末尾 DOM 顺序置顶),避免形成高层级\n stacking context 压住宿主自身的浮层(设置菜单、弹窗等);\n 宽度默认 240px,宿主可通过 CSS 变量 --uc-dock-width 覆盖以对齐自身侧边栏 */\n.uc-dock {\n position: fixed;\n left: 0;\n bottom: 0;\n width: var(--uc-dock-width, 240px);\n padding: 10px 12px 14px;\n pointer-events: none;\n}\n\n.uc-dock .uc-entry {\n pointer-events: auto;\n}\n\n/* ========== 头像下拉菜单(Portal 挂 body,fixed 锚定侧边栏入口按钮) ========== */\n/* 全部规则提升到 .uc-root 前缀(0,2,0),并给容器显式声明纵向 flex 布局:\n 防止宿主全局样式(如 div/button 的 display、width 重置)把菜单项排成横排 */\n.uc-root.uc-dropdown {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n white-space: nowrap;\n position: fixed;\n /* left / width / bottom 由 JS 按入口按钮 rect 内联设置,脱离宿主 sidebar 的\n overflow 裁剪与 stacking context,避免弹出菜单被遮盖 */\n padding: 6px;\n background: var(--uc-bg);\n border: 1px solid var(--uc-border);\n border-radius: var(--uc-radius-m);\n box-shadow: var(--uc-shadow-2);\n /* 适度层级:盖住侧边栏普通内容即可,让位于宿主自身的浮层\n (设置菜单 / 弹窗等,常见 z-index ≥ 40),避免遮挡宿主 UI */\n z-index: 35;\n animation: uc-drop-in 0.16s ease;\n}\n\n@keyframes uc-drop-in {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n}\n\n.uc-root .uc-dropdown-head {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px 10px;\n margin-bottom: 6px;\n border-bottom: 1px solid var(--uc-border);\n}\n\n.uc-root .uc-dd-name {\n font-size: 13px;\n font-weight: 600;\n color: var(--uc-fg);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.uc-root .uc-dd-mobile {\n margin-top: 2px;\n font-size: 11px;\n color: var(--uc-fg-3);\n font-variant-numeric: tabular-nums;\n}\n\n.uc-root .uc-menu-item {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 0 0 auto;\n width: 100%;\n padding: 8px 10px;\n border: none;\n border-radius: var(--uc-radius-s);\n background: transparent;\n font-family: inherit;\n font-size: 13px;\n color: var(--uc-fg-2);\n text-align: left;\n cursor: pointer;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.uc-root .uc-menu-item svg {\n flex-shrink: 0;\n color: var(--uc-fg-3);\n}\n\n.uc-root .uc-menu-item:hover {\n background: var(--uc-bg-soft);\n color: var(--uc-fg);\n}\n\n.uc-root .uc-menu-item.danger {\n color: var(--uc-danger);\n}\n\n.uc-root .uc-menu-item.danger svg {\n color: var(--uc-danger);\n}\n\n.uc-root .uc-menu-item.danger:hover {\n background: var(--uc-danger-soft);\n}\n\n.uc-root .uc-menu-divider {\n height: 1px;\n margin: 6px 4px;\n background: var(--uc-border);\n}\n\n/* ========== 模态弹窗 ========== */\n.uc-overlay {\n position: fixed;\n inset: 0;\n background: var(--uc-overlay);\n overscroll-behavior: contain;\n animation: uc-fade-in 0.18s ease;\n z-index: 1000;\n}\n\n@keyframes uc-fade-in {\n from {\n opacity: 0;\n }\n}\n\n.uc-modal {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 400px;\n max-width: calc(100vw - 48px);\n max-height: calc(100vh - 96px);\n display: flex;\n flex-direction: column;\n background: var(--uc-bg);\n border: 1px solid var(--uc-modal-border);\n border-radius: var(--uc-radius-l);\n box-shadow: var(--uc-shadow-2);\n animation: uc-modal-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes uc-modal-in {\n from {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.94);\n }\n}\n\n.uc-modal-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 20px 24px 0;\n}\n\n.uc-modal-title {\n margin: 0;\n font-size: 17px;\n font-weight: 600;\n letter-spacing: 0.2px;\n color: var(--uc-fg);\n}\n\n.uc-icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: var(--uc-radius-s);\n background: transparent;\n color: var(--uc-fg-3);\n cursor: pointer;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.uc-icon-btn:hover {\n background: var(--uc-bg-soft);\n color: var(--uc-fg);\n}\n\n.uc-root .uc-modal-body {\n padding: 20px 24px 24px;\n overflow-y: auto;\n /* 弹窗内容按弹窗宽度换行:禁止横向溢出滚动条(宿主全局样式可能覆盖\n 低优先级规则的 white-space / width,这里提升优先级并兜底裁掉横向溢出) */\n overflow-x: hidden;\n min-width: 0;\n}\n\n.uc-modal-body::-webkit-scrollbar {\n width: 8px;\n}\n\n.uc-modal-body::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: var(--uc-bg-hover);\n}\n\n.uc-modal-foot {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n padding: 0 24px 20px;\n}\n\n/* ========== 按钮 ========== */\n.uc-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 38px;\n padding: 0 18px;\n border: 1px solid var(--uc-border);\n border-radius: 10px;\n background: var(--uc-bg);\n color: var(--uc-fg-2);\n font-family: inherit;\n font-size: 14px;\n cursor: pointer;\n white-space: nowrap;\n transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n}\n\n.uc-btn:hover:not(:disabled) {\n background: var(--uc-bg-soft);\n color: var(--uc-fg);\n}\n\n.uc-btn:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.uc-btn-primary {\n border-color: transparent;\n background: var(--uc-accent);\n color: #ffffff;\n font-weight: 500;\n}\n\n.uc-btn-primary:hover:not(:disabled) {\n background: var(--uc-accent-hover);\n color: #ffffff;\n}\n\n.uc-btn-danger {\n border-color: transparent;\n background: var(--uc-danger);\n color: #ffffff;\n font-weight: 500;\n}\n\n.uc-btn-danger:hover:not(:disabled) {\n background: var(--uc-danger-hover);\n color: #ffffff;\n}\n\n.uc-btn-block {\n width: 100%;\n height: 42px;\n border-radius: var(--uc-radius-m);\n font-size: 15px;\n}\n\n/* ========== 表单 ========== */\n.uc-field {\n margin-bottom: 16px;\n}\n\n.uc-input {\n display: flex;\n align-items: center;\n gap: 8px;\n height: 44px;\n padding: 0 12px;\n background: var(--uc-bg-soft);\n border: 1px solid transparent;\n border-radius: 10px;\n transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;\n}\n\n.uc-input:focus-within {\n background: var(--uc-bg);\n border-color: var(--uc-accent);\n box-shadow: 0 0 0 3px var(--uc-accent-soft);\n}\n\n.uc-field.is-error .uc-input {\n border-color: var(--uc-danger);\n}\n\n.uc-input input {\n flex: 1;\n min-width: 0;\n height: 100%;\n border: none;\n outline: none;\n background: transparent;\n color: var(--uc-fg);\n font-family: inherit;\n font-size: 14px;\n}\n\n.uc-input input::placeholder {\n color: var(--uc-fg-3);\n}\n\n.uc-field-error {\n display: flex;\n align-items: center;\n gap: 4px;\n margin: 6px 2px 0;\n font-size: 12px;\n color: var(--uc-danger);\n}\n\n.uc-phone-prefix {\n display: flex;\n align-items: center;\n align-self: stretch;\n padding-right: 10px;\n border-right: 1px solid var(--uc-border);\n color: var(--uc-fg-2);\n font-size: 14px;\n font-weight: 500;\n}\n\n.uc-code-input input {\n font-size: 15px;\n letter-spacing: 7px;\n}\n\n.uc-send-btn {\n flex-shrink: 0;\n height: 30px;\n padding: 0 12px;\n border: none;\n border-radius: var(--uc-radius-s);\n background: var(--uc-accent-soft);\n color: var(--uc-accent);\n font-family: inherit;\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n cursor: pointer;\n transition: background 0.15s ease, color 0.15s ease;\n font-variant-numeric: tabular-nums;\n}\n\n.uc-send-btn:hover:not(:disabled) {\n background: var(--uc-accent);\n color: #ffffff;\n}\n\n.uc-send-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* ========== 登录弹窗 ========== */\n.uc-banner {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n padding: 10px 12px;\n border-radius: 10px;\n font-size: 13px;\n line-height: 1.45;\n}\n\n.uc-banner > svg {\n flex-shrink: 0;\n margin-top: 1px;\n}\n\n.uc-banner-error {\n background: var(--uc-danger-soft);\n color: var(--uc-danger);\n}\n\n.uc-banner-info {\n background: var(--uc-accent-soft);\n color: var(--uc-accent);\n}\n\n.uc-login-hint {\n margin: 14px 2px 0;\n font-size: 12px;\n color: var(--uc-fg-3);\n text-align: center;\n}\n\n/* 图形验证码弹窗(嵌套于登录弹窗内) */\n.uc-captcha-overlay {\n z-index: 1100;\n}\n\n.uc-captcha-modal {\n width: 360px;\n}\n\n.uc-captcha-tip {\n margin: 0 0 14px;\n font-size: 13px;\n color: var(--uc-fg-3);\n}\n\n.uc-captcha-img {\n height: 32px;\n border-radius: 6px;\n border: 1px solid var(--uc-border);\n flex-shrink: 0;\n cursor: pointer;\n}\n\n.uc-captcha-refresh {\n flex-shrink: 0;\n height: 32px;\n padding: 0 10px;\n border: 1px dashed var(--uc-border);\n border-radius: 6px;\n background: transparent;\n color: var(--uc-fg-3);\n font-family: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n.uc-captcha-refresh:hover {\n color: var(--uc-accent);\n border-color: var(--uc-accent);\n}\n\n/* ========== 个人中心 ========== */\n.uc-profile-avatar-wrap {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n padding: 8px 0 20px;\n margin-bottom: 20px;\n border-bottom: 1px solid var(--uc-border);\n}\n\n.uc-avatar-edit {\n position: relative;\n width: 76px;\n height: 76px;\n padding: 0;\n border: none;\n border-radius: 50%;\n background: transparent;\n cursor: pointer;\n}\n\n.uc-avatar-edit .uc-avatar {\n width: 76px;\n height: 76px;\n}\n\n.uc-avatar-edit-mask {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 2px;\n border-radius: 50%;\n background: rgba(15, 18, 22, 0.45);\n color: #ffffff;\n font-size: 11px;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.uc-avatar-edit:hover .uc-avatar-edit-mask,\n.uc-avatar-edit:focus-visible .uc-avatar-edit-mask {\n opacity: 1;\n}\n\n.uc-profile-avatar-tip {\n margin: 0;\n font-size: 12px;\n color: var(--uc-fg-3);\n}\n\n.uc-section {\n padding-bottom: 18px;\n margin-bottom: 18px;\n border-bottom: 1px solid var(--uc-border);\n}\n\n.uc-section:last-of-type {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 4px;\n}\n\n.uc-section-head {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n margin-bottom: 10px;\n}\n\n.uc-section-label {\n font-size: 13px;\n font-weight: 500;\n color: var(--uc-fg-2);\n}\n\n.uc-section-extra {\n font-size: 12px;\n color: var(--uc-fg-3);\n font-variant-numeric: tabular-nums;\n}\n\n.uc-nick-row {\n display: flex;\n gap: 10px;\n}\n\n.uc-nick-row .uc-input {\n flex: 1;\n}\n\n.uc-nick-row .uc-btn {\n height: 44px;\n border-radius: 10px;\n}\n\n.uc-preview {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-top: 12px;\n padding: 8px 12px;\n border-radius: 10px;\n background: var(--uc-bg-soft);\n font-size: 13px;\n color: var(--uc-fg-3);\n}\n\n.uc-preview-name {\n font-weight: 500;\n color: var(--uc-fg);\n}\n\n.uc-account-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 14px;\n border-radius: 10px;\n background: var(--uc-bg-soft);\n}\n\n.uc-account-value {\n font-size: 15px;\n font-weight: 600;\n letter-spacing: 1px;\n color: var(--uc-fg);\n font-variant-numeric: tabular-nums;\n}\n\n.uc-account-tag {\n font-size: 11px;\n color: var(--uc-fg-3);\n}\n\n/* ========== 头像裁剪 ========== */\n.uc-crop-stage {\n position: relative;\n width: 264px;\n height: 264px;\n margin: 4px auto 14px;\n overflow: hidden;\n border-radius: var(--uc-radius-m);\n background: var(--uc-bg-soft);\n touch-action: none;\n cursor: grab;\n}\n\n.uc-crop-stage:active {\n cursor: grabbing;\n}\n\n.uc-crop-img {\n position: absolute;\n left: 50%;\n top: 50%;\n user-select: none;\n -webkit-user-drag: none;\n pointer-events: none;\n}\n\n.uc-crop-mask {\n position: absolute;\n inset: 0;\n overflow: hidden;\n pointer-events: none;\n}\n\n.uc-crop-circle {\n position: absolute;\n left: 50%;\n top: 50%;\n width: 200px;\n height: 200px;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n border: 1.5px solid rgba(255, 255, 255, 0.75);\n box-shadow: 0 0 0 999px rgba(15, 18, 22, 0.55);\n}\n\n.uc-crop-tools {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 18px;\n color: var(--uc-fg-3);\n}\n\n.uc-crop-tools input[type=\"range\"] {\n flex: 1;\n accent-color: var(--uc-accent);\n}\n\n.uc-crop-hint {\n margin: 0 0 16px;\n font-size: 12px;\n color: var(--uc-fg-3);\n text-align: center;\n}\n\n.uc-crop-actions {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n}\n\n/* ========== 帮助 ========== */\n.uc-faq {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.uc-faq details {\n border: 1px solid var(--uc-border);\n border-radius: 10px;\n background: var(--uc-bg);\n transition: border-color 0.15s ease;\n}\n\n.uc-faq details[open] {\n border-color: var(--uc-accent);\n}\n\n.uc-faq summary {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px;\n font-size: 13.5px;\n font-weight: 500;\n color: var(--uc-fg);\n cursor: pointer;\n user-select: none;\n list-style: none;\n}\n\n.uc-faq summary::-webkit-details-marker {\n display: none;\n}\n\n.uc-faq-chev {\n margin-left: auto;\n color: var(--uc-fg-3);\n transition: transform 0.18s ease;\n}\n\n.uc-faq details[open] .uc-faq-chev {\n transform: rotate(180deg);\n}\n\n.uc-faq-body {\n padding: 0 14px 13px 38px;\n font-size: 13px;\n color: var(--uc-fg-2);\n line-height: 1.7;\n}\n\n.uc-help-foot {\n margin: 16px 2px 0;\n font-size: 12px;\n color: var(--uc-fg-3);\n text-align: center;\n}\n\n/* ========== 关于 ========== */\n.uc-about {\n padding: 6px 0 4px;\n text-align: center;\n}\n\n.uc-about-logo {\n display: block;\n width: 56px;\n height: 56px;\n margin: 0 auto 12px;\n border-radius: 14px;\n}\n\n.uc-about-name {\n font-size: 17px;\n font-weight: 600;\n color: var(--uc-fg);\n}\n\n.uc-about-slogan {\n margin: 4px 0 18px;\n font-size: 12px;\n color: var(--uc-fg-3);\n}\n\n.uc-about-rows {\n padding: 4px 14px;\n margin-bottom: 16px;\n border-radius: 10px;\n background: var(--uc-bg-soft);\n text-align: left;\n}\n\n.uc-about-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 9px 0;\n border-bottom: 1px solid var(--uc-border);\n font-size: 13px;\n}\n\n.uc-about-row:last-child {\n border-bottom: none;\n}\n\n.uc-about-row .k {\n color: var(--uc-fg-3);\n}\n\n.uc-about-row .v {\n color: var(--uc-fg);\n font-weight: 500;\n}\n\n.uc-about-copyright {\n margin: 0;\n font-size: 11.5px;\n line-height: 1.7;\n color: var(--uc-fg-3);\n}\n\n/* ========== 设置 ========== */\n.uc-settings-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 14px;\n padding: 12px 14px;\n border-radius: 10px;\n background: var(--uc-bg-soft);\n}\n\n.uc-settings-label {\n font-size: 13px;\n font-weight: 500;\n color: var(--uc-fg);\n}\n\n.uc-settings-desc {\n margin-top: 3px;\n font-size: 12px;\n line-height: 1.5;\n color: var(--uc-fg-3);\n}\n\n.uc-seg {\n display: flex;\n flex: none;\n gap: 2px;\n padding: 3px;\n border: 1px solid var(--uc-border);\n border-radius: 9px;\n background: var(--uc-bg);\n}\n\n.uc-seg-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 5px 10px;\n border: none;\n border-radius: 7px;\n background: transparent;\n font-family: inherit;\n font-size: 12px;\n color: var(--uc-fg-3);\n white-space: nowrap;\n cursor: pointer;\n transition: color 0.15s ease, background-color 0.15s ease;\n}\n\n.uc-seg-item:hover {\n color: var(--uc-fg-2);\n}\n\n.uc-seg-item.active {\n background: var(--uc-accent-soft);\n color: var(--uc-accent);\n font-weight: 500;\n}\n\n.uc-settings-foot {\n margin: 14px 2px 2px;\n font-size: 12px;\n color: var(--uc-fg-3);\n}\n\n/* ========== 二次确认弹窗 ========== */\n/* 提示文案按弹窗宽度自动换行:white-space 强制 normal +\n word-break/overflow-wrap 兜底长串字符,防止宿主全局 nowrap 样式\n 导致文案单行撑宽、弹窗出现横向滚动条 */\n.uc-root .uc-confirm-message {\n margin: 0 0 4px;\n font-size: 14px;\n line-height: 1.6;\n color: var(--uc-fg-2);\n white-space: normal;\n word-break: break-word;\n overflow-wrap: anywhere;\n}\n\n.uc-dialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n margin-top: 20px;\n}\n\n/* ========== 全局提示(Toast) ========== */\n.uc-notices {\n position: fixed;\n top: 24px;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n z-index: 1200;\n pointer-events: none;\n}\n\n.uc-notice {\n display: flex;\n align-items: center;\n gap: 8px;\n max-width: 420px;\n padding: 10px 18px;\n border-radius: 999px;\n background: rgba(29, 32, 36, 0.92);\n color: #ffffff;\n font-size: 13.5px;\n box-shadow: 0 8px 24px rgba(15, 18, 22, 0.24);\n backdrop-filter: blur(6px);\n cursor: pointer;\n pointer-events: auto;\n animation: uc-notice-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\nhtml[data-uc-theme=\"dark\"] .uc-notice {\n background: rgba(233, 235, 238, 0.95);\n color: #1f2329;\n}\n\n@media (prefers-color-scheme: dark) {\n html:not([data-uc-theme]) .uc-notice {\n background: rgba(233, 235, 238, 0.95);\n color: #1f2329;\n }\n}\n\n@keyframes uc-notice-in {\n from {\n opacity: 0;\n transform: translateY(-10px) scale(0.96);\n }\n}\n\n.uc-notice svg {\n flex-shrink: 0;\n}\n\n.uc-notice-success svg {\n color: #4ade80;\n}\n\n.uc-notice-error svg {\n color: #ff7d7d;\n}\n\n.uc-notice-info svg {\n color: #9db4ff;\n}\n\n/* ========== 加载指示 ========== */\n.uc-spinner {\n display: inline-block;\n width: 14px;\n height: 14px;\n border: 2px solid currentColor;\n border-top-color: transparent;\n border-radius: 50%;\n opacity: 0.9;\n animation: uc-spin 0.7s linear infinite;\n}\n\n@keyframes uc-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n/* ========== 焦点可访问性 ========== */\n.uc-root :focus-visible {\n outline: 2px solid var(--uc-accent);\n outline-offset: 2px;\n}\n\n.uc-input input:focus-visible {\n outline: none;\n}\n\n/* ========== 动效降级 ========== */\n@media (prefers-reduced-motion: reduce) {\n .uc-root *,\n .uc-root *::before,\n .uc-root *::after {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n/* ========== 官方 sidebar footer 排序与竖排(DSH slot 挂载) ==========\n 官方 ui-sidebar 的 footArea 为 flex column,DOM 固定顺序为\n footerActions(sidebar.footer.action,本插件入口)→ settingsArea(设置行);\n 官方设计把 footer.action 放在设置行上方,这里用 order 交换使入口显示在设置行下方。\n 同时官方 footerActions 默认横排(多个 action 同一行),这里强制改为纵向堆叠:\n 每个入口(官方 action 如手机连接 / 本插件入口)各占一行、占满整行宽度。\n 选择器用后缀匹配 [class$=\"_xxx\"]:官方 CSS Modules 的哈希是前缀\n (v2.0.13 实测为 EXfQ3q_,旧版为 xUkysG_),后缀匹配跨版本稳定,\n 宿主升级哈希变化不影响命中;插件停用卸载本样式表后自动恢复官方默认顺序。 */\ndiv[class$=\"_footArea\"] > div[class$=\"_settingsArea\"] {\n order: 0;\n}\n\ndiv[class$=\"_footArea\"] > div[class$=\"_footerActions\"] {\n order: 1;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n row-gap: 4px;\n}\n\n/* 哈希无关兑底:逐级上溯设置 order,使入口位于官方设置行下方。\n 第一级:入口直接父级(slot runner 的 wrapper,在 footerActions 内部,\n 保证入口在 footerActions 内也排在其他官方入口如手机连接之后);\n 第二级:包含 wrapper 的官方 footerActions 区整体,排到 settingsArea(设置行)之后。\n 只上溯两级、不作用于 footArea 以上层级,避免影响侧边栏其他区域的排序。\n (v2.0.13 实测:哈希 class 已变,上方精确规则失效,靠本兑底生效) */\ndiv:has(> .uc-root.uc-entry),\ndiv:has(> div:has(> .uc-root.uc-entry)) {\n order: 1;\n}\n\n/* 兑底竖排:第二级(官方 footerActions)同样强制纵向堆叠并拉满行宽,\n 使本插件入口与官方 action(如手机连接)各占一行;\n standalone 兑底路径命中 .uc-dock(单子元素),flex column 与原 block 布局等效,无副作用 */\ndiv:has(> div:has(> .uc-root.uc-entry)) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n row-gap: 4px;\n}\n";
2105
+ var usercenter_default = "/**\n * 用户中心插件样式体系(对标豆包桌面端:轻量极简、模态弹窗、无跳转刷新)\n * - 设计令牌收敛在 .skai-uc-root,统一映射 DSH 官方主题令牌(--dsw-alias-*),\n * 宿主内随宿主浅色/深色主题自动切换;var() 兜底值供 standalone 预览使用,\n * 深色兜底跟随系统 prefers-color-scheme(与 CRM/知识库插件策略一致)\n * - html[data-skai-uc-theme=\"light\"|\"dark\"] 手动覆盖时强制固定色板(不随宿主/系统)\n * - 全部类名 skai-uc- 前缀,不污染宿主;box-sizing 仅作用于插件自身元素\n */\n\n/* ========== 设计令牌(映射宿主令牌,浅色兜底) ========== */\n.skai-uc-root {\n --skai-uc-font: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"PingFang SC\",\n \"Hiragino Sans GB\", \"Microsoft YaHei\", \"Noto Sans SC\", \"Helvetica Neue\", Arial, sans-serif;\n --skai-uc-bg: var(--dsw-alias-bg-layer-1, #ffffff);\n --skai-uc-bg-soft: var(--dsw-alias-bg-layer-2, #f2f3f5);\n --skai-uc-bg-hover: var(--dsw-alias-interactive-bg-hover, #e9ebed);\n --skai-uc-fg: var(--dsw-alias-label-primary, #1f2329);\n --skai-uc-fg-2: var(--dsw-alias-label-secondary, #4e5969);\n --skai-uc-fg-3: var(--dsw-alias-label-caption, #86909c);\n --skai-uc-border: var(--dsw-alias-border-l1, #e4e7ec);\n /* 品牌蓝固定值:DSH --dsw-alias-brand-primary 为「反色强调」语义不可用(与 CRM 约定一致) */\n --skai-uc-accent: #315cff;\n --skai-uc-accent-hover: #1f47e8;\n --skai-uc-accent-soft: rgba(49, 92, 255, 0.08);\n --skai-uc-danger: var(--dsw-alias-state-error-primary, #f53f3f);\n --skai-uc-danger-hover: #d92c2c;\n --skai-uc-danger-soft: rgba(245, 63, 63, 0.08);\n --skai-uc-overlay: var(--dsw-alias-bg-mask-1, rgba(31, 35, 41, 0.4));\n --skai-uc-modal-border: var(--dsw-alias-border-l1, transparent);\n --skai-uc-shadow-2: 0 12px 40px rgba(31, 35, 41, 0.16), 0 2px 10px rgba(31, 35, 41, 0.08);\n /* 全局提示(Toast)反色药丸:宿主前景色做底、宿主底色做字,随主题自动反转 */\n --skai-uc-notice-bg: color-mix(in srgb, var(--dsw-alias-label-primary, #1d2024) 92%, transparent);\n --skai-uc-notice-fg: var(--dsw-alias-bg-base, #ffffff);\n --skai-uc-radius-s: 8px;\n --skai-uc-radius-m: 12px;\n --skai-uc-radius-l: 16px;\n /* color-scheme 不显式声明:宿主内继承宿主(随宿主主题),standalone 继承 UA 默认(随系统) */\n font-family: var(--skai-uc-font);\n font-size: 14px;\n line-height: 1.5;\n color: var(--skai-uc-fg);\n -webkit-font-smoothing: antialiased;\n}\n\n.skai-uc-root,\n.skai-uc-root *,\n.skai-uc-root *::before,\n.skai-uc-root *::after {\n box-sizing: border-box;\n}\n\n/* ========== 深色主题(手动覆盖:强制固定色板,不随宿主/系统) ========== */\nhtml[data-skai-uc-theme=\"dark\"] .skai-uc-root {\n --skai-uc-bg: #1f2022;\n --skai-uc-bg-soft: #2a2b2e;\n --skai-uc-bg-hover: #343538;\n --skai-uc-fg: #e8eaed;\n --skai-uc-fg-2: #b3b6bb;\n --skai-uc-fg-3: #85888d;\n --skai-uc-border: #3a3b3e;\n --skai-uc-accent: #4d79ff;\n --skai-uc-accent-hover: #3f6aff;\n --skai-uc-accent-soft: rgba(77, 121, 255, 0.16);\n --skai-uc-danger: #fb5e5e;\n --skai-uc-danger-hover: #f04747;\n --skai-uc-danger-soft: rgba(251, 94, 94, 0.14);\n --skai-uc-overlay: rgba(0, 0, 0, 0.55);\n --skai-uc-modal-border: #3a3b3e;\n --skai-uc-shadow-2: 0 12px 40px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.3);\n --skai-uc-notice-bg: rgba(233, 235, 238, 0.95);\n --skai-uc-notice-fg: #1f2329;\n color-scheme: dark;\n}\n\n/* ========== 浅色主题(手动覆盖:强制固定色板,不随宿主/系统) ========== */\nhtml[data-skai-uc-theme=\"light\"] .skai-uc-root {\n --skai-uc-bg: #ffffff;\n --skai-uc-bg-soft: #f2f3f5;\n --skai-uc-bg-hover: #e9ebed;\n --skai-uc-fg: #1f2329;\n --skai-uc-fg-2: #4e5969;\n --skai-uc-fg-3: #86909c;\n --skai-uc-border: #e4e7ec;\n --skai-uc-accent: #315cff;\n --skai-uc-accent-hover: #1f47e8;\n --skai-uc-accent-soft: rgba(49, 92, 255, 0.08);\n --skai-uc-danger: #f53f3f;\n --skai-uc-danger-hover: #d92c2c;\n --skai-uc-danger-soft: rgba(245, 63, 63, 0.08);\n --skai-uc-overlay: rgba(31, 35, 41, 0.4);\n --skai-uc-modal-border: transparent;\n --skai-uc-shadow-2: 0 12px 40px rgba(31, 35, 41, 0.16), 0 2px 10px rgba(31, 35, 41, 0.08);\n --skai-uc-notice-bg: rgba(29, 32, 36, 0.92);\n --skai-uc-notice-fg: #ffffff;\n color-scheme: light;\n}\n\n/* ========== 深色主题(standalone 跟随系统;宿主令牌存在时仍优先取宿主值) ========== */\n@media (prefers-color-scheme: dark) {\n html:not([data-skai-uc-theme]) .skai-uc-root {\n --skai-uc-bg: var(--dsw-alias-bg-layer-1, #1f2022);\n --skai-uc-bg-soft: var(--dsw-alias-bg-layer-2, #2a2b2e);\n --skai-uc-bg-hover: var(--dsw-alias-interactive-bg-hover, #343538);\n --skai-uc-fg: var(--dsw-alias-label-primary, #e8eaed);\n --skai-uc-fg-2: var(--dsw-alias-label-secondary, #b3b6bb);\n --skai-uc-fg-3: var(--dsw-alias-label-caption, #85888d);\n --skai-uc-border: var(--dsw-alias-border-l1, #3a3b3e);\n --skai-uc-accent: #4d79ff;\n --skai-uc-accent-hover: #3f6aff;\n --skai-uc-accent-soft: rgba(77, 121, 255, 0.16);\n --skai-uc-danger: var(--dsw-alias-state-error-primary, #fb5e5e);\n --skai-uc-danger-hover: #f04747;\n --skai-uc-danger-soft: rgba(251, 94, 94, 0.14);\n --skai-uc-overlay: var(--dsw-alias-bg-mask-1, rgba(0, 0, 0, 0.55));\n --skai-uc-modal-border: var(--dsw-alias-border-l1, #3a3b3e);\n --skai-uc-shadow-2: 0 12px 40px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.3);\n --skai-uc-notice-bg: color-mix(in srgb, var(--dsw-alias-label-primary, #e9ebee) 95%, transparent);\n --skai-uc-notice-fg: var(--dsw-alias-bg-base, #1f2329);\n }\n}\n\n/* ========== 全局浮层容器 ========== */\n.skai-uc-layer {\n position: relative;\n z-index: 2147483000;\n}\n\n/* ========== 侧边栏入口 ========== */\n.skai-uc-entry {\n width: 100%;\n}\n\n/* dock 内层插槽容器:显式占满,保证按钮宽度 100% 链路完整 */\n.skai-uc-entry-slot {\n width: 100%;\n}\n\n.skai-uc-login-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n width: 100%;\n height: 40px;\n border: 1px solid transparent;\n border-radius: 10px;\n background: var(--skai-uc-bg-soft);\n color: var(--skai-uc-fg-2);\n font-family: inherit;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n}\n\n.skai-uc-login-btn:hover {\n background: var(--skai-uc-bg-hover);\n color: var(--skai-uc-fg);\n}\n\n/* 折叠栏(wide=false,56px rail)图标按钮:居中圆形,宽度不跟随 rail 拉伸 */\n.skai-uc-rail-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 40px;\n margin: 0 auto;\n padding: 0;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: var(--skai-uc-fg-2);\n cursor: pointer;\n transition: background 0.15s ease, color 0.15s ease;\n}\n\n.skai-uc-rail-btn:hover {\n background: var(--skai-uc-bg-soft);\n color: var(--skai-uc-fg);\n}\n\n/* 已登录入口按钮容器(skai-uc-user-wrap 不再承载定位:\n 下拉菜单 Portal 挂 body,由 JS 按本容器 rect 做 fixed 锚定) */\n.skai-uc-user-btn {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 6px 8px;\n border: none;\n border-radius: 10px;\n background: transparent;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n transition: background 0.15s ease;\n}\n\n.skai-uc-user-btn:hover {\n background: var(--skai-uc-bg-soft);\n}\n\n.skai-uc-user-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 13px;\n font-weight: 500;\n color: var(--skai-uc-fg-2);\n transition: color 0.15s ease;\n}\n\n.skai-uc-user-btn:hover .skai-uc-user-name {\n color: var(--skai-uc-fg);\n}\n\n.skai-uc-chevron {\n display: flex;\n color: var(--skai-uc-fg-3);\n transition: transform 0.18s ease;\n}\n\n.skai-uc-chevron.is-open {\n transform: rotate(180deg);\n}\n\n.skai-uc-avatar {\n display: block;\n flex-shrink: 0;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n object-fit: cover;\n background: var(--skai-uc-bg-soft);\n user-select: none;\n}\n\n/* 宿主未提供插槽时的左下角自停靠兜底\n 注意:不设 z-index(依赖 body 末尾 DOM 顺序置顶),避免形成高层级\n stacking context 压住宿主自身的浮层(设置菜单、弹窗等);\n 宽度默认 240px,宿主可通过 CSS 变量 --skai-uc-dock-width 覆盖以对齐自身侧边栏 */\n.skai-uc-dock {\n position: fixed;\n left: 0;\n bottom: 0;\n width: var(--skai-uc-dock-width, 240px);\n padding: 10px 12px 14px;\n pointer-events: none;\n}\n\n.skai-uc-dock .skai-uc-entry {\n pointer-events: auto;\n}\n\n/* ========== 头像下拉菜单(Portal 挂 body,fixed 锚定侧边栏入口按钮) ========== */\n/* 全部规则提升到 .skai-uc-root 前缀(0,2,0),并给容器显式声明纵向 flex 布局:\n 防止宿主全局样式(如 div/button 的 display、width 重置)把菜单项排成横排 */\n.skai-uc-root.skai-uc-dropdown {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n white-space: nowrap;\n position: fixed;\n /* left / width / bottom 由 JS 按入口按钮 rect 内联设置,脱离宿主 sidebar 的\n overflow 裁剪与 stacking context,避免弹出菜单被遮盖 */\n padding: 6px;\n background: var(--skai-uc-bg);\n border: 1px solid var(--skai-uc-border);\n border-radius: var(--skai-uc-radius-m);\n box-shadow: var(--skai-uc-shadow-2);\n /* 适度层级:盖住侧边栏普通内容即可,让位于宿主自身的浮层\n (设置菜单 / 弹窗等,常见 z-index ≥ 40),避免遮挡宿主 UI */\n z-index: 35;\n animation: skai-uc-drop-in 0.16s ease;\n}\n\n@keyframes skai-uc-drop-in {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n}\n\n.skai-uc-root .skai-uc-dropdown-head {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px 10px;\n margin-bottom: 6px;\n border-bottom: 1px solid var(--skai-uc-border);\n}\n\n.skai-uc-root .skai-uc-dd-name {\n font-size: 13px;\n font-weight: 600;\n color: var(--skai-uc-fg);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.skai-uc-root .skai-uc-dd-mobile {\n margin-top: 2px;\n font-size: 11px;\n color: var(--skai-uc-fg-3);\n font-variant-numeric: tabular-nums;\n}\n\n.skai-uc-root .skai-uc-menu-item {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 0 0 auto;\n width: 100%;\n padding: 8px 10px;\n border: none;\n border-radius: var(--skai-uc-radius-s);\n background: transparent;\n font-family: inherit;\n font-size: 13px;\n color: var(--skai-uc-fg-2);\n text-align: left;\n cursor: pointer;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.skai-uc-root .skai-uc-menu-item svg {\n flex-shrink: 0;\n color: var(--skai-uc-fg-3);\n}\n\n.skai-uc-root .skai-uc-menu-item:hover {\n background: var(--skai-uc-bg-soft);\n color: var(--skai-uc-fg);\n}\n\n.skai-uc-root .skai-uc-menu-item.danger {\n color: var(--skai-uc-danger);\n}\n\n.skai-uc-root .skai-uc-menu-item.danger svg {\n color: var(--skai-uc-danger);\n}\n\n.skai-uc-root .skai-uc-menu-item.danger:hover {\n background: var(--skai-uc-danger-soft);\n}\n\n.skai-uc-root .skai-uc-menu-divider {\n height: 1px;\n margin: 6px 4px;\n background: var(--skai-uc-border);\n}\n\n/* ========== 模态弹窗 ========== */\n.skai-uc-overlay {\n position: fixed;\n inset: 0;\n background: var(--skai-uc-overlay);\n overscroll-behavior: contain;\n animation: skai-uc-fade-in 0.18s ease;\n z-index: 1000;\n}\n\n@keyframes skai-uc-fade-in {\n from {\n opacity: 0;\n }\n}\n\n.skai-uc-modal {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 400px;\n max-width: calc(100vw - 48px);\n max-height: calc(100vh - 96px);\n display: flex;\n flex-direction: column;\n background: var(--skai-uc-bg);\n border: 1px solid var(--skai-uc-modal-border);\n border-radius: var(--skai-uc-radius-l);\n box-shadow: var(--skai-uc-shadow-2);\n animation: skai-uc-modal-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes skai-uc-modal-in {\n from {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.94);\n }\n}\n\n.skai-uc-modal-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 20px 24px 0;\n}\n\n.skai-uc-modal-title {\n margin: 0;\n font-size: 17px;\n font-weight: 600;\n letter-spacing: 0.2px;\n color: var(--skai-uc-fg);\n}\n\n.skai-uc-icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: var(--skai-uc-radius-s);\n background: transparent;\n color: var(--skai-uc-fg-3);\n cursor: pointer;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.skai-uc-icon-btn:hover {\n background: var(--skai-uc-bg-soft);\n color: var(--skai-uc-fg);\n}\n\n.skai-uc-root .skai-uc-modal-body {\n padding: 20px 24px 24px;\n overflow-y: auto;\n /* 弹窗内容按弹窗宽度换行:禁止横向溢出滚动条(宿主全局样式可能覆盖\n 低优先级规则的 white-space / width,这里提升优先级并兜底裁掉横向溢出) */\n overflow-x: hidden;\n min-width: 0;\n}\n\n.skai-uc-modal-body::-webkit-scrollbar {\n width: 8px;\n}\n\n.skai-uc-modal-body::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: var(--skai-uc-bg-hover);\n}\n\n.skai-uc-modal-foot {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n padding: 0 24px 20px;\n}\n\n/* ========== 按钮 ========== */\n.skai-uc-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 38px;\n padding: 0 18px;\n border: 1px solid var(--skai-uc-border);\n border-radius: 10px;\n background: var(--skai-uc-bg);\n color: var(--skai-uc-fg-2);\n font-family: inherit;\n font-size: 14px;\n cursor: pointer;\n white-space: nowrap;\n transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n}\n\n.skai-uc-btn:hover:not(:disabled) {\n background: var(--skai-uc-bg-soft);\n color: var(--skai-uc-fg);\n}\n\n.skai-uc-btn:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.skai-uc-btn-primary {\n border-color: transparent;\n background: var(--skai-uc-accent);\n color: #ffffff;\n font-weight: 500;\n}\n\n.skai-uc-btn-primary:hover:not(:disabled) {\n background: var(--skai-uc-accent-hover);\n color: #ffffff;\n}\n\n.skai-uc-btn-danger {\n border-color: transparent;\n background: var(--skai-uc-danger);\n color: #ffffff;\n font-weight: 500;\n}\n\n.skai-uc-btn-danger:hover:not(:disabled) {\n background: var(--skai-uc-danger-hover);\n color: #ffffff;\n}\n\n.skai-uc-btn-block {\n width: 100%;\n height: 42px;\n border-radius: var(--skai-uc-radius-m);\n font-size: 15px;\n}\n\n/* ========== 表单 ========== */\n.skai-uc-field {\n margin-bottom: 16px;\n}\n\n.skai-uc-input {\n display: flex;\n align-items: center;\n gap: 8px;\n height: 44px;\n padding: 0 12px;\n background: var(--skai-uc-bg-soft);\n border: 1px solid transparent;\n border-radius: 10px;\n transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;\n}\n\n.skai-uc-input:focus-within {\n background: var(--skai-uc-bg);\n border-color: var(--skai-uc-accent);\n box-shadow: 0 0 0 3px var(--skai-uc-accent-soft);\n}\n\n.skai-uc-field.is-error .skai-uc-input {\n border-color: var(--skai-uc-danger);\n}\n\n.skai-uc-input input {\n flex: 1;\n min-width: 0;\n height: 100%;\n border: none;\n outline: none;\n background: transparent;\n color: var(--skai-uc-fg);\n font-family: inherit;\n font-size: 14px;\n}\n\n.skai-uc-input input::placeholder {\n color: var(--skai-uc-fg-3);\n}\n\n.skai-uc-field-error {\n display: flex;\n align-items: center;\n gap: 4px;\n margin: 6px 2px 0;\n font-size: 12px;\n color: var(--skai-uc-danger);\n}\n\n.skai-uc-phone-prefix {\n display: flex;\n align-items: center;\n align-self: stretch;\n padding-right: 10px;\n border-right: 1px solid var(--skai-uc-border);\n color: var(--skai-uc-fg-2);\n font-size: 14px;\n font-weight: 500;\n}\n\n.skai-uc-code-input input {\n font-size: 15px;\n letter-spacing: 7px;\n}\n\n.skai-uc-send-btn {\n flex-shrink: 0;\n height: 30px;\n padding: 0 12px;\n border: none;\n border-radius: var(--skai-uc-radius-s);\n background: var(--skai-uc-accent-soft);\n color: var(--skai-uc-accent);\n font-family: inherit;\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n cursor: pointer;\n transition: background 0.15s ease, color 0.15s ease;\n font-variant-numeric: tabular-nums;\n}\n\n.skai-uc-send-btn:hover:not(:disabled) {\n background: var(--skai-uc-accent);\n color: #ffffff;\n}\n\n.skai-uc-send-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* ========== 登录弹窗 ========== */\n.skai-uc-banner {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n padding: 10px 12px;\n border-radius: 10px;\n font-size: 13px;\n line-height: 1.45;\n}\n\n.skai-uc-banner > svg {\n flex-shrink: 0;\n margin-top: 1px;\n}\n\n.skai-uc-banner-error {\n background: var(--skai-uc-danger-soft);\n color: var(--skai-uc-danger);\n}\n\n.skai-uc-banner-info {\n background: var(--skai-uc-accent-soft);\n color: var(--skai-uc-accent);\n}\n\n.skai-uc-login-hint {\n margin: 14px 2px 0;\n font-size: 12px;\n color: var(--skai-uc-fg-3);\n text-align: center;\n}\n\n/* 图形验证码弹窗(嵌套于登录弹窗内) */\n.skai-uc-captcha-overlay {\n z-index: 1100;\n}\n\n.skai-uc-captcha-modal {\n width: 360px;\n}\n\n.skai-uc-captcha-tip {\n margin: 0 0 14px;\n font-size: 13px;\n color: var(--skai-uc-fg-3);\n}\n\n.skai-uc-captcha-img {\n height: 32px;\n border-radius: 6px;\n border: 1px solid var(--skai-uc-border);\n flex-shrink: 0;\n cursor: pointer;\n}\n\n.skai-uc-captcha-refresh {\n flex-shrink: 0;\n height: 32px;\n padding: 0 10px;\n border: 1px dashed var(--skai-uc-border);\n border-radius: 6px;\n background: transparent;\n color: var(--skai-uc-fg-3);\n font-family: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n.skai-uc-captcha-refresh:hover {\n color: var(--skai-uc-accent);\n border-color: var(--skai-uc-accent);\n}\n\n/* ========== 用户中心 ========== */\n.skai-uc-profile-avatar-wrap {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n padding: 8px 0 20px;\n margin-bottom: 20px;\n border-bottom: 1px solid var(--skai-uc-border);\n}\n\n.skai-uc-avatar-edit {\n position: relative;\n width: 76px;\n height: 76px;\n padding: 0;\n border: none;\n border-radius: 50%;\n background: transparent;\n cursor: pointer;\n}\n\n.skai-uc-avatar-edit .skai-uc-avatar {\n width: 76px;\n height: 76px;\n}\n\n.skai-uc-avatar-edit-mask {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 2px;\n border-radius: 50%;\n background: rgba(15, 18, 22, 0.45);\n color: #ffffff;\n font-size: 11px;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.skai-uc-avatar-edit:hover .skai-uc-avatar-edit-mask,\n.skai-uc-avatar-edit:focus-visible .skai-uc-avatar-edit-mask {\n opacity: 1;\n}\n\n.skai-uc-profile-avatar-tip {\n margin: 0;\n font-size: 12px;\n color: var(--skai-uc-fg-3);\n}\n\n.skai-uc-section {\n padding-bottom: 18px;\n margin-bottom: 18px;\n border-bottom: 1px solid var(--skai-uc-border);\n}\n\n.skai-uc-section:last-of-type {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 4px;\n}\n\n.skai-uc-section-head {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n margin-bottom: 10px;\n}\n\n.skai-uc-section-label {\n font-size: 13px;\n font-weight: 500;\n color: var(--skai-uc-fg-2);\n}\n\n.skai-uc-section-extra {\n font-size: 12px;\n color: var(--skai-uc-fg-3);\n font-variant-numeric: tabular-nums;\n}\n\n.skai-uc-nick-row {\n display: flex;\n gap: 10px;\n}\n\n.skai-uc-nick-row .skai-uc-input {\n flex: 1;\n}\n\n.skai-uc-nick-row .skai-uc-btn {\n height: 44px;\n border-radius: 10px;\n}\n\n.skai-uc-preview {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-top: 12px;\n padding: 8px 12px;\n border-radius: 10px;\n background: var(--skai-uc-bg-soft);\n font-size: 13px;\n color: var(--skai-uc-fg-3);\n}\n\n.skai-uc-preview-name {\n font-weight: 500;\n color: var(--skai-uc-fg);\n}\n\n.skai-uc-account-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 14px;\n border-radius: 10px;\n background: var(--skai-uc-bg-soft);\n}\n\n/* 区块内多行堆叠时的行间距 */\n.skai-uc-account-row + .skai-uc-account-row {\n margin-top: 8px;\n}\n\n.skai-uc-account-value {\n font-size: 15px;\n font-weight: 600;\n letter-spacing: 1px;\n color: var(--skai-uc-fg);\n font-variant-numeric: tabular-nums;\n}\n\n.skai-uc-account-tag {\n font-size: 11px;\n color: var(--skai-uc-fg-3);\n}\n\n/* ========== 头像裁剪 ========== */\n.skai-uc-crop-stage {\n position: relative;\n width: 264px;\n height: 264px;\n margin: 4px auto 14px;\n overflow: hidden;\n border-radius: var(--skai-uc-radius-m);\n background: var(--skai-uc-bg-soft);\n touch-action: none;\n cursor: grab;\n}\n\n.skai-uc-crop-stage:active {\n cursor: grabbing;\n}\n\n.skai-uc-crop-img {\n position: absolute;\n left: 50%;\n top: 50%;\n user-select: none;\n -webkit-user-drag: none;\n pointer-events: none;\n}\n\n.skai-uc-crop-mask {\n position: absolute;\n inset: 0;\n overflow: hidden;\n pointer-events: none;\n}\n\n.skai-uc-crop-circle {\n position: absolute;\n left: 50%;\n top: 50%;\n width: 200px;\n height: 200px;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n border: 1.5px solid rgba(255, 255, 255, 0.75);\n box-shadow: 0 0 0 999px rgba(15, 18, 22, 0.55);\n}\n\n.skai-uc-crop-tools {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 18px;\n color: var(--skai-uc-fg-3);\n}\n\n.skai-uc-crop-tools input[type=\"range\"] {\n flex: 1;\n accent-color: var(--skai-uc-accent);\n}\n\n.skai-uc-crop-hint {\n margin: 0 0 16px;\n font-size: 12px;\n color: var(--skai-uc-fg-3);\n text-align: center;\n}\n\n.skai-uc-crop-actions {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n}\n\n/* ========== 帮助 ========== */\n.skai-uc-faq {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.skai-uc-faq details {\n border: 1px solid var(--skai-uc-border);\n border-radius: 10px;\n background: var(--skai-uc-bg);\n transition: border-color 0.15s ease;\n}\n\n.skai-uc-faq details[open] {\n border-color: var(--skai-uc-accent);\n}\n\n.skai-uc-faq summary {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px;\n font-size: 13.5px;\n font-weight: 500;\n color: var(--skai-uc-fg);\n cursor: pointer;\n user-select: none;\n list-style: none;\n}\n\n.skai-uc-faq summary::-webkit-details-marker {\n display: none;\n}\n\n.skai-uc-faq-chev {\n margin-left: auto;\n color: var(--skai-uc-fg-3);\n transition: transform 0.18s ease;\n}\n\n.skai-uc-faq details[open] .skai-uc-faq-chev {\n transform: rotate(180deg);\n}\n\n.skai-uc-faq-body {\n padding: 0 14px 13px 38px;\n font-size: 13px;\n color: var(--skai-uc-fg-2);\n line-height: 1.7;\n}\n\n.skai-uc-help-foot {\n margin: 16px 2px 0;\n font-size: 12px;\n color: var(--skai-uc-fg-3);\n text-align: center;\n}\n\n/* ========== 关于 ========== */\n.skai-uc-about {\n padding: 6px 0 4px;\n text-align: center;\n}\n\n.skai-uc-about-logo {\n display: block;\n width: 56px;\n height: 56px;\n margin: 0 auto 12px;\n border-radius: 14px;\n}\n\n.skai-uc-about-name {\n font-size: 17px;\n font-weight: 600;\n color: var(--skai-uc-fg);\n}\n\n.skai-uc-about-slogan {\n margin: 4px 0 18px;\n font-size: 12px;\n color: var(--skai-uc-fg-3);\n}\n\n.skai-uc-about-rows {\n padding: 4px 14px;\n margin-bottom: 16px;\n border-radius: 10px;\n background: var(--skai-uc-bg-soft);\n text-align: left;\n}\n\n.skai-uc-about-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 9px 0;\n border-bottom: 1px solid var(--skai-uc-border);\n font-size: 13px;\n}\n\n.skai-uc-about-row:last-child {\n border-bottom: none;\n}\n\n.skai-uc-about-row .k {\n color: var(--skai-uc-fg-3);\n}\n\n.skai-uc-about-row .v {\n color: var(--skai-uc-fg);\n font-weight: 500;\n}\n\n.skai-uc-about-copyright {\n margin: 0;\n font-size: 11.5px;\n line-height: 1.7;\n color: var(--skai-uc-fg-3);\n}\n\n/* ========== 设置 ========== */\n.skai-uc-settings-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 14px;\n padding: 12px 14px;\n border-radius: 10px;\n background: var(--skai-uc-bg-soft);\n}\n\n.skai-uc-settings-label {\n font-size: 13px;\n font-weight: 500;\n color: var(--skai-uc-fg);\n}\n\n.skai-uc-settings-desc {\n margin-top: 3px;\n font-size: 12px;\n line-height: 1.5;\n color: var(--skai-uc-fg-3);\n}\n\n.skai-uc-seg {\n display: flex;\n flex: none;\n gap: 2px;\n padding: 3px;\n border: 1px solid var(--skai-uc-border);\n border-radius: 9px;\n background: var(--skai-uc-bg);\n}\n\n.skai-uc-seg-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 5px 10px;\n border: none;\n border-radius: 7px;\n background: transparent;\n font-family: inherit;\n font-size: 12px;\n color: var(--skai-uc-fg-3);\n white-space: nowrap;\n cursor: pointer;\n transition: color 0.15s ease, background-color 0.15s ease;\n}\n\n.skai-uc-seg-item:hover {\n color: var(--skai-uc-fg-2);\n}\n\n.skai-uc-seg-item.active {\n background: var(--skai-uc-accent-soft);\n color: var(--skai-uc-accent);\n font-weight: 500;\n}\n\n.skai-uc-settings-foot {\n margin: 14px 2px 2px;\n font-size: 12px;\n color: var(--skai-uc-fg-3);\n}\n\n/* ========== 二次确认弹窗 ========== */\n/* 提示文案按弹窗宽度自动换行:white-space 强制 normal +\n word-break/overflow-wrap 兜底长串字符,防止宿主全局 nowrap 样式\n 导致文案单行撑宽、弹窗出现横向滚动条 */\n.skai-uc-root .skai-uc-confirm-message {\n margin: 0 0 4px;\n font-size: 14px;\n line-height: 1.6;\n color: var(--skai-uc-fg-2);\n white-space: normal;\n word-break: break-word;\n overflow-wrap: anywhere;\n}\n\n.skai-uc-dialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n margin-top: 20px;\n}\n\n/* ========== 全局提示(Toast) ========== */\n.skai-uc-notices {\n position: fixed;\n top: 24px;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n z-index: 1200;\n pointer-events: none;\n}\n\n.skai-uc-notice {\n display: flex;\n align-items: center;\n gap: 8px;\n max-width: 420px;\n padding: 10px 18px;\n border-radius: 999px;\n /* 反色药丸:底/字色由 --skai-uc-notice-* 令牌驱动(映射宿主令牌随主题反转) */\n background: var(--skai-uc-notice-bg);\n color: var(--skai-uc-notice-fg);\n font-size: 13.5px;\n box-shadow: 0 8px 24px rgba(15, 18, 22, 0.24);\n backdrop-filter: blur(6px);\n cursor: pointer;\n pointer-events: auto;\n animation: skai-uc-notice-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes skai-uc-notice-in {\n from {\n opacity: 0;\n transform: translateY(-10px) scale(0.96);\n }\n}\n\n.skai-uc-notice svg {\n flex-shrink: 0;\n}\n\n.skai-uc-notice-success svg {\n color: #4ade80;\n}\n\n.skai-uc-notice-error svg {\n color: #ff7d7d;\n}\n\n.skai-uc-notice-info svg {\n color: #9db4ff;\n}\n\n/* ========== 加载指示 ========== */\n.skai-uc-spinner {\n display: inline-block;\n width: 14px;\n height: 14px;\n border: 2px solid currentColor;\n border-top-color: transparent;\n border-radius: 50%;\n opacity: 0.9;\n animation: skai-uc-spin 0.7s linear infinite;\n}\n\n@keyframes skai-uc-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n/* ========== 焦点可访问性 ========== */\n.skai-uc-root :focus-visible {\n outline: 2px solid var(--skai-uc-accent);\n outline-offset: 2px;\n}\n\n.skai-uc-input input:focus-visible {\n outline: none;\n}\n\n/* ========== 动效降级 ========== */\n@media (prefers-reduced-motion: reduce) {\n .skai-uc-root *,\n .skai-uc-root *::before,\n .skai-uc-root *::after {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n/* ========== 官方 sidebar footer 排序与竖排(DSH slot 挂载) ==========\n 官方 ui-sidebar 的 footArea 为 flex column,DOM 固定顺序为\n footerActions(sidebar.footer.action,本插件入口)→ settingsArea(设置行);\n 官方设计把 footer.action 放在设置行上方,这里用 order 交换使入口显示在设置行下方。\n 同时官方 footerActions 默认横排(多个 action 同一行),这里强制改为纵向堆叠:\n 每个入口(官方 action 如手机连接 / 本插件入口)各占一行、占满整行宽度。\n 选择器用后缀匹配 [class$=\"_xxx\"]:官方 CSS Modules 的哈希是前缀\n (v2.0.13 实测为 EXfQ3q_,旧版为 xUkysG_),后缀匹配跨版本稳定,\n 宿主升级哈希变化不影响命中;插件停用卸载本样式表后自动恢复官方默认顺序。 */\ndiv[class$=\"_footArea\"] > div[class$=\"_settingsArea\"] {\n order: 0;\n}\n\ndiv[class$=\"_footArea\"] > div[class$=\"_footerActions\"] {\n order: 1;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n row-gap: 4px;\n}\n\n/* 哈希无关兑底:逐级上溯设置 order,使入口位于官方设置行下方。\n 第一级:入口直接父级(slot runner 的 wrapper,在 footerActions 内部,\n 保证入口在 footerActions 内也排在其他官方入口如手机连接之后);\n 第二级:包含 wrapper 的官方 footerActions 区整体,排到 settingsArea(设置行)之后。\n 只上溯两级、不作用于 footArea 以上层级,避免影响侧边栏其他区域的排序。\n (v2.0.13 实测:哈希 class 已变,上方精确规则失效,靠本兑底生效) */\ndiv:has(> .skai-uc-root.skai-uc-entry),\ndiv:has(> div:has(> .skai-uc-root.skai-uc-entry)) {\n order: 1;\n}\n\n/* 兑底竖排:第二级(官方 footerActions)同样强制纵向堆叠并拉满行宽,\n 使本插件入口与官方 action(如手机连接)各占一行;\n standalone 兑底路径命中 .skai-uc-dock(单子元素),flex column 与原 block 布局等效,无副作用 */\ndiv:has(> div:has(> .skai-uc-root.skai-uc-entry)) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n row-gap: 4px;\n}\n";
2106
+ //#endregion
2107
+ //#region src/core/sign-credential.js
2108
+ /**
2109
+ * 验签凭证开放接口(插件生态接入登录态的核心复用能力,对齐功能文档 5.4)
2110
+ *
2111
+ * 三步接入:JS 接口获取验签数据 → 插件后端 Ed25519 公钥验签 → 签发插件自身 Token
2112
+ *
2113
+ * 安全约定:
2114
+ * - 云签名接口(member/sign_credential)仅由用户中心前端携带内部 Token 调用,
2115
+ * Token 全程不对插件暴露
2116
+ * - 游客态 / 未登录 / 请求失败时返回 null(文档约定「返回空」),
2117
+ * 插件据此引导用户唤起登录弹窗
2118
+ * - 返回结构:{ sign, message, content: { uid, mobile_md5, timestamp, nonce } }
2119
+ * uid 为用户唯一标识(云 memberId 转译),message 为被签名明文(含 uid、
2120
+ * 手机号md5值、秒级时间戳、nonce),插件后端需校验时间戳有效期防重放;
2121
+ * nonce 由云服务保证同秒内多次签发的凭证字节唯一(防重放去重不误伤)
2122
+ */
2123
+ /** 规范化验签数据(兼容云接口字段命名,content 字段缺失时回退解析 message) */
2124
+ function normalizeCredential(raw) {
2125
+ const data = raw || {};
2126
+ const content = data.content || {};
2127
+ let uid = content.uid ?? content.member_id ?? content.memberId;
2128
+ let mobileMd5 = content.mobile_md5 ?? content.mobileMd5;
2129
+ const timestamp = content.timestamp;
2130
+ if ((uid === void 0 || mobileMd5 === void 0) && typeof data.message === "string") try {
2131
+ const parsed = JSON.parse(data.message);
2132
+ uid = uid ?? parsed.uid ?? parsed.member_id;
2133
+ mobileMd5 = mobileMd5 ?? parsed.mobile_md5;
2134
+ } catch (error) {}
2135
+ if (uid === void 0 || mobileMd5 === void 0 || !timestamp) return null;
2136
+ if (!data.sign || !data.message) return null;
2137
+ return {
2138
+ sign: data.sign,
2139
+ message: data.message,
2140
+ content: {
2141
+ uid,
2142
+ mobile_md5: mobileMd5,
2143
+ timestamp
2144
+ }
2145
+ };
2146
+ }
2147
+ /**
2148
+ * 获取验签数据(插件生态唯一官方入口;游客态返回 null)
2149
+ * @returns {Promise<{sign:string, message:string, content:{uid:number|string, mobile_md5:string, timestamp:number}}|null>}
2150
+ */
2151
+ async function getSignCredential() {
2152
+ if (!isLoggedIn()) return null;
2153
+ try {
2154
+ const res = await getSignCredential$1();
2155
+ return normalizeCredential(res && res.data);
2156
+ } catch (error) {
2157
+ return null;
2158
+ }
2159
+ }
2160
+ /** 挂载全局验签接口 window.SHIKEAI_GET_SIGN_CREDENTIAL(幂等;用户中心为唯一权威挂载方) */
2161
+ function mountGlobalSignApi() {
2162
+ if (typeof window === "undefined") return;
2163
+ window.SHIKEAI_GET_SIGN_CREDENTIAL = getSignCredential;
2164
+ }
2165
+ //#endregion
2166
+ //#region src/core/member-config.js
2167
+ /**
2168
+ * 会员配置项云持久化开放接口(插件生态配置云存储复用能力,对齐功能文档 5.5)
2169
+ *
2170
+ * 云端存储:niucloud member/config 接口(会员维度键值表,member_id + config_key 唯一),
2171
+ * 由用户中心前端携带内部 Token 调用,Token 全程不对插件暴露
2172
+ *
2173
+ * 安全与容错约定(对齐验签接口 getSignCredential):
2174
+ * - 游客态 / 未登录 / 请求失败时不抛错:读取返回 null,保存返回 false;
2175
+ * 401 等鉴权失效由 auth-guard 统一兜底
2176
+ * - 入参非法(key 为空或超长、value 非标量)同步抛 TypeError,便于开发期定位
2177
+ * - 云端统一以字符串存储:仅接受标量值(string/number/boolean),
2178
+ * 复杂结构由插件自行 JSON 序列化后保存
2179
+ * - key 全局共用会员维度命名空间,插件须使用「插件名.配置项名」前缀防多插件键冲突
2180
+ */
2181
+ /** 规范化读取结果:统一为 key => string 字符串映射 */
2182
+ function normalizeConfigMap(raw) {
2183
+ const data = raw && typeof raw === "object" ? raw : {};
2184
+ const result = {};
2185
+ Object.keys(data).forEach((key) => {
2186
+ if (!key) return;
2187
+ result[key] = String(data[key] ?? "");
2188
+ });
2189
+ return result;
2190
+ }
2191
+ /** 校验保存入参:key 非空且 ≤128 字符(云端 varchar(128)),value 为标量(云端 text) */
2192
+ function assertConfigPayload(config) {
2193
+ if (!config || typeof config !== "object" || Array.isArray(config)) throw new TypeError("[usercenter] setMemberConfig 入参须为 key => value 对象");
2194
+ Object.keys(config).forEach((key) => {
2195
+ if (!key || key.length > 128) throw new TypeError(`[usercenter] 配置项 key 非法(须非空且不超过 128 字符): ${key}`);
2196
+ const value = config[key];
2197
+ if (value !== null && value !== void 0 && typeof value === "object") throw new TypeError(`[usercenter] 配置项值须为标量(复杂结构请 JSON.stringify 后保存): ${key}`);
2198
+ });
2199
+ }
2200
+ /**
2201
+ * 读取会员配置项(插件生态官方入口;游客态 / 请求失败返回 null)
2202
+ * @param {string|string[]} [keys] 指定读取的配置 key(数组或逗号分隔字符串),缺省读取全部
2203
+ * @returns {Promise<Record<string, string>|null>}
2204
+ */
2205
+ async function getMemberConfig(keys) {
2206
+ if (!isLoggedIn()) return null;
2207
+ let keyParam = "";
2208
+ if (Array.isArray(keys)) keyParam = keys.filter((key) => typeof key === "string" && key !== "").join(",");
2209
+ else if (typeof keys === "string") keyParam = keys;
2210
+ try {
2211
+ const res = await getMemberConfig$1(keyParam || void 0);
2212
+ return normalizeConfigMap(res && res.data);
2213
+ } catch (error) {
2214
+ return null;
2215
+ }
2216
+ }
2217
+ /**
2218
+ * 保存会员配置项(插件生态官方入口;游客态 / 请求失败返回 false,不抛错)
2219
+ * @param {Record<string, string|number|boolean>} config key => value 键值对(value 为标量)
2220
+ * @returns {Promise<boolean>} true 成功 / false 失败(游客态或云端异常;入参非法同步抛 TypeError)
2221
+ */
2222
+ async function setMemberConfig(config) {
2223
+ if (!isLoggedIn()) return false;
2224
+ assertConfigPayload(config);
2225
+ try {
2226
+ await setMemberConfig$1(config);
2227
+ return true;
2228
+ } catch (error) {
2229
+ return false;
2230
+ }
2231
+ }
2232
+ /** 挂载全局配置接口 window.SHIKEAI_GET_MEMBER_CONFIG / window.SHIKEAI_SET_MEMBER_CONFIG(幂等;用户中心为唯一权威挂载方) */
2233
+ function mountGlobalConfigApi() {
2234
+ if (typeof window === "undefined") return;
2235
+ window.SHIKEAI_GET_MEMBER_CONFIG = getMemberConfig;
2236
+ window.SHIKEAI_SET_MEMBER_CONFIG = setMemberConfig;
2237
+ }
2238
+ //#endregion
2239
+ //#region src/core/member-directory.js
2240
+ /**
2241
+ * 会员公开信息查询开放接口(插件生态成员资料展示复用能力)
2242
+ *
2243
+ * 按批量 uid 查询会员公开资料(昵称/头像/脱敏手机号):云端 member/batch_info
2244
+ * 仅返回公开字段且手机号服务端脱敏(138****1234),明文不出服务端;由用户中心
2245
+ * 前端携带内部 Token 调用,Token 全程不对插件暴露
2246
+ *
2247
+ * 安全与容错约定(对齐 getSignCredential / getMemberConfig):
2248
+ * - 游客态 / 未登录 / 请求失败时返回 null,不抛错;401 等鉴权失效由 auth-guard 统一兜底
2249
+ * - 返回 { [uid]: { uid, nickname, avatar, mobile } }(uid 为数字,mobile 为脱敏值)
2250
+ * - 入参 uid 列表去重后单次上限 50,超出截断(云端同限)
2251
+ * - 公开资料仅供展示,不可作为可信身份:可信 uid 须走验签接口 getSignCredential
2252
+ */
2253
+ /** 单次查询上限(云端 member/batch_info 同限) */
2254
+ const MAX_BATCH_SIZE = 50;
2255
+ /** 防御性手机号出口:云端脱敏值(138****1234 / ****)直接透传,疑似明文(11 位纯数字)兜底再脱敏,其余置空 */
2256
+ function safeMobile(mobile) {
2257
+ const value = String(mobile || "").trim();
2258
+ if (!value) return "";
2259
+ if (/^1\d{10}$/.test(value)) return `${value.slice(0, 3)}****${value.slice(7)}`;
2260
+ if (value.includes("*")) return value;
2261
+ return "";
2262
+ }
2263
+ /** 云端会员公开信息 → 插件统一结构(uid + 脱敏手机号,复用头像地址补全) */
2264
+ function normalizeMember(raw) {
2265
+ const info = raw || {};
2266
+ return {
2267
+ uid: info.uid ?? info.member_id ?? info.memberId ?? "",
2268
+ nickname: String(info.nickname || "").trim(),
2269
+ avatar: normalizeImageUrl(info.headimg || info.avatar || ""),
2270
+ mobile: safeMobile(info.mobile)
2271
+ };
2272
+ }
2273
+ /**
2274
+ * 按批量 uid 查询会员公开信息(插件生态官方入口;游客态 / 请求失败返回 null)
2275
+ * @param {number|string|Array<number|string>} uids 单个 uid 或 uid 列表
2276
+ * @returns {Promise<Record<string, {uid:number|string, nickname:string, avatar:string, mobile:string}>|null>}
2277
+ * 以 String(uid) 为键的映射;无有效入参返回 {}
2278
+ */
2279
+ async function getMemberPublicInfo(uids) {
2280
+ if (!isLoggedIn()) return null;
2281
+ const list = (Array.isArray(uids) ? uids : [uids]).map((uid) => Number(uid)).filter((uid) => Number.isInteger(uid) && uid > 0);
2282
+ const unique = [...new Set(list)].slice(0, MAX_BATCH_SIZE);
2283
+ if (!unique.length) return {};
2284
+ try {
2285
+ const res = await getMemberBatchInfo(unique);
2286
+ const data = res && res.data;
2287
+ const map = {};
2288
+ if (data && typeof data === "object") Object.keys(data).forEach((key) => {
2289
+ const item = normalizeMember(data[key]);
2290
+ if (item.uid === "" || item.uid === void 0) return;
2291
+ map[String(item.uid)] = item;
2292
+ });
2293
+ return map;
2294
+ } catch (error) {
2295
+ return null;
2296
+ }
2297
+ }
2298
+ /**
2299
+ * 通过手机号查询会员 UID(插件生态官方入口;游客态 / 请求失败 / 未匹配 / 入参非法均返回 null)
2300
+ * @param {string} mobile 手机号(1 开头 11 位数字;服务端按站点精确匹配)
2301
+ * @returns {Promise<{uid:number|string, nickname:string, avatar:string, mobile:string}|null>}
2302
+ * 命中返回成员公开资料(uid + 脱敏手机号,可据此向用户确认是否为目标成员)
2303
+ */
2304
+ async function findMemberUidByMobile(mobile) {
2305
+ if (!isLoggedIn()) return null;
2306
+ const value = String(mobile || "").trim();
2307
+ if (!/^1\d{10}$/.test(value)) return null;
2308
+ try {
2309
+ const res = await getMemberUidByMobile(value);
2310
+ const data = res && res.data;
2311
+ if (!data || typeof data !== "object") return null;
2312
+ const member = normalizeMember(data);
2313
+ if (member.uid === "" || member.uid === void 0) return null;
2314
+ return member;
2315
+ } catch (error) {
2316
+ return null;
2317
+ }
2318
+ }
2319
+ /** 挂载全局会员公开信息接口 window.SHIKEAI_GET_MEMBER_INFO(幂等;用户中心为唯一权威挂载方) */
2320
+ function mountGlobalMemberInfoApi() {
2321
+ if (typeof window === "undefined") return;
2322
+ window.SHIKEAI_GET_MEMBER_INFO = getMemberPublicInfo;
2323
+ window.SHIKEAI_GET_MEMBER_UID_BY_MOBILE = findMemberUidByMobile;
2324
+ }
2043
2325
  //#endregion
2044
2326
  //#region src/index.js
2045
2327
  /**
@@ -2048,9 +2330,17 @@ theme: "auto" }
2048
2330
  * 生命周期:install(样式注入 + 全局登录态恢复)→ activate(UI 挂载 + 会话恢复)
2049
2331
  * → deactivate(卸载 UI)→ uninstall(彻底清理)
2050
2332
  *
2051
- * 对外能力(其他业务插件复用登录鉴权):
2052
- * - window.DSH_USER_TOKEN / window.DSH_USER_INFO 全局只读登录态(本插件为唯一权威挂载方)
2053
- * - AUTH_EVENTS 全局事件广播;request 统一请求适配器(自动携带鉴权头、401 兜底)
2333
+ * 对外能力(其他业务插件复用登录鉴权,Token 不对插件暴露):
2334
+ * - window.SHIKEAI_USER_INFO 全局只读公开用户信息(脱敏手机号/昵称/头像/uid,唯一公开数据变量)
2335
+ * - window.SHIKEAI_GET_SIGN_CREDENTIAL 验签开放接口:插件获取 uid + 手机号md5 + 时间戳的
2336
+ * Ed25519 验签数据,交由插件后端公钥验签后换取插件自身登录态
2337
+ * - window.SHIKEAI_GET_MEMBER_CONFIG / window.SHIKEAI_SET_MEMBER_CONFIG 配置开放接口:
2338
+ * 插件配置项会员维度云持久化(读取/保存),插件无需自建后端存储
2339
+ * - window.SHIKEAI_GET_MEMBER_INFO 会员公开信息开放接口:其他插件按批量 uid 查询
2340
+ * 昵称/头像/脱敏手机号(云端 member/batch_info,手机号服务端脱敏,明文不出服务端)
2341
+ * - window.SHIKEAI_GET_MEMBER_UID_BY_MOBILE 手机号定位开放接口:其他插件按手机号查询
2342
+ * 成员 uid(云端 member/uid_by_mobile,返回昵称/头像/脱敏手机号辅助确认目标成员)
2343
+ * - AUTH_EVENTS 全局事件广播(登录/退出/失效/资料变更实时同步)
2054
2344
  */
2055
2345
  const STYLE_ID = "shikeai-usercenter-style";
2056
2346
  const state = {
@@ -2076,7 +2366,11 @@ theme: "auto" }
2076
2366
  state.styleEl = el;
2077
2367
  }
2078
2368
  /**
2079
- * 安装:注入样式、恢复全局登录态(window.DSH_USER_TOKEN / DSH_USER_INFO)
2369
+ * 安装:注入样式、恢复全局登录态(window.SHIKEAI_USER_INFO)、
2370
+ * 挂载验签开放接口(window.SHIKEAI_GET_SIGN_CREDENTIAL)、
2371
+ * 挂载配置开放接口(window.SHIKEAI_GET_MEMBER_CONFIG / window.SHIKEAI_SET_MEMBER_CONFIG)、
2372
+ * 挂载会员公开信息开放接口(window.SHIKEAI_GET_MEMBER_INFO)、
2373
+ * 挂载手机号定位开放接口(window.SHIKEAI_GET_MEMBER_UID_BY_MOBILE)
2080
2374
  */
2081
2375
  function install() {
2082
2376
  if (state.installed) return;
@@ -2084,6 +2378,9 @@ theme: "auto" }
2084
2378
  ensureStyle();
2085
2379
  hydrateToken();
2086
2380
  hydrateUserInfo();
2381
+ mountGlobalSignApi();
2382
+ mountGlobalConfigApi();
2383
+ mountGlobalMemberInfoApi();
2087
2384
  initAuthStore();
2088
2385
  state.installed = true;
2089
2386
  }
@@ -2100,7 +2397,7 @@ theme: "auto" }
2100
2397
  * 入口显示在设置行下方由本插件样式表 CSS order 交换实现
2101
2398
  * - ctx.slots.inject 内部等待 slot 声明出现并管理注册 disposer(声明随 ui-sidebar 卸载
2102
2399
  * 自动塌缩),无需 ctx.effect 包裹注册本身
2103
- * - 弹窗层(登录/个人中心/帮助/关于 + 全局提示)挂 body 独立浮层:
2400
+ * - 弹窗层(登录/用户中心/帮助/关于 + 全局提示)挂 body 独立浮层:
2104
2401
  * sidebar 列内 overflow 裁剪,模态不能挂进 slot
2105
2402
  * - 非 DSH 宿主(standalone / legacy DOM 插槽)不走本入口,走 index.js 的 activate()
2106
2403
  */
@@ -2115,7 +2412,7 @@ theme: "auto" }
2115
2412
  order: 100
2116
2413
  }, SidebarEntry));
2117
2414
  const layer = document.createElement("div");
2118
- layer.className = "uc-layer uc-root";
2415
+ layer.className = "skai-uc-layer skai-uc-root";
2119
2416
  document.body.appendChild(layer);
2120
2417
  const root = (0, react_dom_client.createRoot)(layer);
2121
2418
  root.render((0, react.createElement)(PluginLayers));