@huyooo/ui 2.0.7 → 2.0.9

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.
Files changed (51) hide show
  1. package/dist/{AuthkitAppSetting-CX4WTwNd.js → AuthkitAppSetting-DoC2RJh7.js} +787 -752
  2. package/dist/{Contact-CBGSJC2q.js → Contact-Ck3LVLx-.js} +3 -3
  3. package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-BNBzOqrv.js → FeedbackModal.vue_vue_type_script_setup_true_lang-hveEkBb4.js} +2 -2
  4. package/dist/{LandingPageLinkGroup-BZJ48Yss.js → LandingPageLinkGroup-DTFhrYK1.js} +1 -1
  5. package/dist/{LandingPageSectionTabs-jRjkWlM-.js → LandingPageSectionTabs-Bm_zZrfT.js} +1 -1
  6. package/dist/LegalDocViewer-DBr0x1ZE.js +2497 -0
  7. package/dist/{Logo-D7fyXyB-.js → Logo-B9DFBxDU.js} +1 -1
  8. package/dist/{PaySubscriptions-BSkcUqHk.js → PaySubscriptions-Bv6LQ_Pf.js} +1 -1
  9. package/dist/{PricingPlans-CyFvgf18.js → PricingPlans-CQaXgOIR.js} +3 -3
  10. package/dist/{ReferrerReferees-Mvv6oiqe.js → ReferrerReferees-CGrH-gYJ.js} +1 -1
  11. package/dist/{Upload.vue_vue_type_script_setup_true_lang-oa6LJgCY.js → Upload.vue_vue_type_script_setup_true_lang-CgZQOZYt.js} +1 -1
  12. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-V5EzZMCL.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-QE1ARaXY.js} +195 -211
  13. package/dist/WidthContainer-Clc_WxY_.js +706 -0
  14. package/dist/authkit.d.ts +1 -0
  15. package/dist/authkit.js +51 -50
  16. package/dist/common/globalConfig.d.ts +0 -5
  17. package/dist/common.js +2 -2
  18. package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +1 -3
  19. package/dist/components/Gradientbackground.vue.d.ts +1 -1
  20. package/dist/components/UserMenu/UserMenu.vue.d.ts +2 -2
  21. package/dist/composables/Authkit/oauthCallback.d.ts +14 -0
  22. package/dist/composables/Authkit/useAppBrand.d.ts +7 -0
  23. package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +2 -0
  24. package/dist/composables/Authkit/useOAuthCallbackHandler.d.ts +11 -0
  25. package/dist/composables/Authkit/useOauth.d.ts +3 -3
  26. package/dist/composables.d.ts +1 -0
  27. package/dist/composables.js +39 -38
  28. package/dist/feedback.js +1 -1
  29. package/dist/{fetchAuthPageAboutUs-CP5a7jIo.js → fetchAuthPageAboutUs-DV7ArpNZ.js} +1 -1
  30. package/dist/landingPage.js +3 -3
  31. package/dist/main.js +239 -237
  32. package/dist/pay.js +3 -3
  33. package/dist/privateCom.js +1 -1
  34. package/dist/referrer.js +1 -1
  35. package/dist/{runtime-qs4IasEB.js → runtime-Dp7MgwhI.js} +115 -116
  36. package/dist/style.css +1 -1
  37. package/dist/upload.js +2 -2
  38. package/dist/{useAuthkitAuth-BPTZUSkM.js → useAuthkitAuth-cHrJMM8E.js} +48 -47
  39. package/dist/useAuthkitUsersProfile-8FzLTfUJ.js +55 -0
  40. package/dist/{useEnsureAuthenticated-CncOvj2H.js → useEnsureAuthenticated-C8qS8DLL.js} +1 -1
  41. package/dist/{useLegalDocs-BZlntAI7.js → useLegalDocs-C4qk5CTb.js} +1 -1
  42. package/dist/{usePageSEO-DwhbUUjW.js → usePageSEO-Dl6_kBWP.js} +1 -1
  43. package/dist/useRoutePermission-DYPZgvYv.js +247 -0
  44. package/dist/{useSubscriptionCheckout-BDDCRxSs.js → useSubscriptionCheckout-CYU2Ke0y.js} +1 -1
  45. package/dist/user.js +1 -1
  46. package/package.json +1 -1
  47. package/dist/LegalDocViewer-DPUiWxcR.js +0 -2492
  48. package/dist/WidthContainer-Dts5qV1W.js +0 -717
  49. package/dist/components/UserMenu/parts/UserMenuAuthPlaceholder.vue.d.ts +0 -7
  50. package/dist/useAuthkitUsersProfile-BclJWOvR.js +0 -45
  51. package/dist/useRoutePermission-CePjXomb.js +0 -218
@@ -1,49 +1,49 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
- import { U as Ne } from "./userMenuModal-D-nDaYqM.js";
4
- import { defineComponent as Y, ref as z, computed as $, openBlock as h, createElementBlock as M, createElementVNode as A, createVNode as p, unref as t, withCtx as o, createTextVNode as k, createCommentVNode as C, toDisplayString as U, createBlock as I, onUnmounted as ke, withDirectives as De, vShow as Be, onMounted as ue, Fragment as ie, createSlots as qe, normalizeClass as ze, renderList as Le, watch as Ae } from "vue";
5
- import { Avatar as Pe, Input as Q, Textarea as Me, Button as T, Message as G, Form as le, FormItem as L, Alert as J, Space as pe, Popconfirm as Ke, Link as Ie, InputPassword as Fe, Result as He, Modal as We } from "@arco-design/web-vue";
3
+ import { U as Be } from "./userMenuModal-D-nDaYqM.js";
4
+ import { defineComponent as J, ref as A, computed as $, openBlock as h, createElementBlock as M, createElementVNode as z, createVNode as p, unref as n, withCtx as o, createTextVNode as k, createCommentVNode as E, toDisplayString as U, createBlock as I, onUnmounted as Ae, withDirectives as qe, vShow as Le, onMounted as de, Fragment as ie, createSlots as Me, normalizeClass as Pe, renderList as Ke, watch as Ie } from "vue";
5
+ import { Avatar as Ee, Input as Q, Textarea as Fe, Button as T, Message as G, Form as le, FormItem as L, Alert as Y, Space as me, Popconfirm as He, Link as Ce, InputPassword as We, Result as Ge, Modal as Ye } from "@arco-design/web-vue";
6
6
  /* empty css */
7
- import { f as Ge, g as x, b as Je, h as Ce } from "./apiClients-Ctcq8NZs.js";
8
- import { C as Ye } from "./index-Cn6LcfZO.js";
7
+ import { f as Je, g as O, b as je, h as Re } from "./apiClients-Ctcq8NZs.js";
8
+ import { C as Qe } from "./index-Cn6LcfZO.js";
9
9
  /* empty css */
10
- import { u as ae } from "./useAuthkitUsersProfile-BclJWOvR.js";
11
- import { u as Ee, g as Re } from "./runtime-qs4IasEB.js";
10
+ import { u as ne } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
11
+ import { u as Se, g as Xe } from "./runtime-Dp7MgwhI.js";
12
12
  import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  /* empty css */
14
14
  /* empty css */
15
- import { C as je } from "./CustomTable-HDwqEcmB.js";
16
- import { u as Se } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
17
- import { Icon as Qe } from "@iconify/vue";
18
- import { i as Xe, M as Ze } from "./Menu-uCexrsKP.js";
19
- import { u as et } from "./useAuthkitAuth-BPTZUSkM.js";
20
- import { u as tt } from "./useAuthkitCreateAndUpdate-Bbv7vZZn.js";
21
- const it = {
15
+ import { C as Ze } from "./CustomTable-HDwqEcmB.js";
16
+ import { u as Ve } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
17
+ import { Icon as et } from "@iconify/vue";
18
+ import { i as tt, M as it } from "./Menu-uCexrsKP.js";
19
+ import { u as nt } from "./useAuthkitAuth-cHrJMM8E.js";
20
+ import { u as at } from "./useAuthkitCreateAndUpdate-Bbv7vZZn.js";
21
+ const ot = {
22
22
  class: "personal-information"
23
- }, at = {
23
+ }, st = {
24
24
  class: "profile-card"
25
- }, nt = {
25
+ }, lt = {
26
26
  class: "profile-field profile-field--nickname"
27
- }, ot = {
27
+ }, rt = {
28
28
  class: "nickname-field"
29
- }, st = ["disabled"], lt = {
29
+ }, ut = ["disabled"], dt = {
30
30
  class: "profile-field"
31
- }, rt = {
31
+ }, ct = {
32
32
  key: 0,
33
33
  class: "profile-actions"
34
- }, ut = {
34
+ }, ft = {
35
35
  class: "profile-card profile-card--meta"
36
- }, dt = {
36
+ }, pt = {
37
37
  class: "account-meta"
38
- }, ct = {
38
+ }, mt = {
39
39
  class: "account-meta__row"
40
- }, ft = {
40
+ }, vt = {
41
41
  class: "account-meta__row"
42
- }, pt = {
42
+ }, ht = {
43
43
  class: "account-meta__row"
44
- }, mt = {
44
+ }, yt = {
45
45
  class: "account-meta__row"
46
- }, vt = 1e3, ht = /* @__PURE__ */ Y({
46
+ }, gt = 1e3, wt = /* @__PURE__ */ J({
47
47
  __name: "AuthkitPersonalInformation",
48
48
  props: {
49
49
  size: {
@@ -52,15 +52,15 @@ const it = {
52
52
  }
53
53
  },
54
54
  emits: ["submit"],
55
- setup(a, {
55
+ setup(e, {
56
56
  emit: i
57
57
  }) {
58
- const n = i, {
58
+ const a = i, {
59
59
  fetchUserProfile: l
60
- } = ae(), {
60
+ } = ne(), {
61
61
  config: s,
62
62
  upload: d
63
- } = Ee(), u = a, e = z({
63
+ } = Se(), u = e, t = A({
64
64
  id: void 0,
65
65
  nickname: "",
66
66
  description: "",
@@ -68,27 +68,27 @@ const it = {
68
68
  avatarUrl: "",
69
69
  email: "",
70
70
  phone: ""
71
- }), y = z({
71
+ }), y = A({
72
72
  nickname: "",
73
73
  description: ""
74
- }), g = z({
74
+ }), g = A({
75
75
  id: "",
76
76
  createAt: "",
77
77
  status: "",
78
78
  loginIdentity: "-"
79
- }), f = z(!1), v = z(!1), r = $(() => e.value.nickname !== y.value.nickname || e.value.description !== y.value.description);
79
+ }), f = A(!1), v = A(!1), r = $(() => t.value.nickname !== y.value.nickname || t.value.description !== y.value.description);
80
80
  function m() {
81
81
  y.value = {
82
- nickname: e.value.nickname,
83
- description: e.value.description
82
+ nickname: t.value.nickname,
83
+ description: t.value.description
84
84
  };
85
85
  }
86
86
  function S(V) {
87
- e.value.id = V.id, e.value.nickname = V.nickname, e.value.description = V.description, e.value.avatar = V.avatar, e.value.avatarUrl = V.avatarUrl, e.value.email = V.email, e.value.phone = V.phone, g.value = {
87
+ t.value.id = V.id, t.value.nickname = V.nickname, t.value.description = V.description, t.value.avatar = V.avatar, t.value.avatarUrl = V.avatarUrl, t.value.email = V.email, t.value.phone = V.phone, g.value = {
88
88
  id: V.id,
89
89
  createAt: V.createAt || "-",
90
90
  status: V.status || "",
91
- loginIdentity: Je(V)
91
+ loginIdentity: je(V)
92
92
  }, m();
93
93
  }
94
94
  async function R() {
@@ -96,35 +96,35 @@ const it = {
96
96
  const {
97
97
  data: V,
98
98
  error: w
99
- } = await x().auth.users.profile.post({});
99
+ } = await O().auth.users.profile.post({});
100
100
  if (v.value = !1, w || !V)
101
101
  return;
102
102
  S(V);
103
103
  }
104
104
  function B() {
105
- e.value.nickname = y.value.nickname, e.value.description = y.value.description;
105
+ t.value.nickname = y.value.nickname, t.value.description = y.value.description;
106
106
  }
107
107
  async function K() {
108
- if (!e.value.id)
108
+ if (!t.value.id)
109
109
  return;
110
110
  v.value = !0;
111
111
  const V = {
112
- id: e.value.id,
113
- nickname: e.value.nickname,
114
- description: e.value.description,
115
- avatar: e.value.avatar
112
+ id: t.value.id,
113
+ nickname: t.value.nickname,
114
+ description: t.value.description,
115
+ avatar: t.value.avatar
116
116
  }, {
117
117
  data: w,
118
118
  error: q
119
- } = await x().auth.users.update.baseInfo.post(V);
120
- v.value = !1, !q && w && (G.success("更新成功"), e.value.avatarUrl = w.avatarUrl || e.value.avatarUrl, m(), await l(), n("submit"));
119
+ } = await O().auth.users.update.baseInfo.post(V);
120
+ v.value = !1, !q && w && (G.success("更新成功"), t.value.avatarUrl = w.avatarUrl || t.value.avatarUrl, m(), await l(), a("submit"));
121
121
  }
122
122
  function j() {
123
123
  const V = document.createElement("input");
124
124
  V.type = "file", V.accept = "image/*", V.style.display = "none", document.body.append(V), V.addEventListener("change", async (w) => {
125
125
  var D;
126
126
  const _ = (D = w.target.files) == null ? void 0 : D[0];
127
- if (!_ || !e.value.id) {
127
+ if (!_ || !t.value.id) {
128
128
  V.remove();
129
129
  return;
130
130
  }
@@ -140,55 +140,55 @@ const it = {
140
140
  f.value = !1, G.error((N == null ? void 0 : N.message) || "头像上传失败"), V.remove();
141
141
  return;
142
142
  }
143
- const F = await x().auth.users.update.baseInfo.post({
144
- id: e.value.id,
145
- nickname: e.value.nickname,
146
- description: e.value.description,
143
+ const F = await O().auth.users.update.baseInfo.post({
144
+ id: t.value.id,
145
+ nickname: t.value.nickname,
146
+ description: t.value.description,
147
147
  avatar: P.key
148
148
  });
149
- f.value = !1, F.error || (G.success("头像已更新"), await R(), await l(), n("submit")), V.remove();
149
+ f.value = !1, F.error || (G.success("头像已更新"), await R(), await l(), a("submit")), V.remove();
150
150
  }), V.click();
151
151
  }
152
- return R(), (V, w) => (h(), M("div", it, [A("section", at, [w[6] || (w[6] = A("h3", {
152
+ return R(), (V, w) => (h(), M("div", ot, [z("section", st, [w[6] || (w[6] = z("h3", {
153
153
  class: "profile-card__title"
154
- }, "个人资料", -1)), A("div", nt, [w[2] || (w[2] = A("label", {
154
+ }, "个人资料", -1)), z("div", lt, [w[2] || (w[2] = z("label", {
155
155
  class: "profile-field__label"
156
- }, "昵称", -1)), A("div", ot, [A("button", {
156
+ }, "昵称", -1)), z("div", rt, [z("button", {
157
157
  type: "button",
158
158
  class: "nickname-field__avatar",
159
159
  disabled: f.value,
160
160
  title: "更换头像",
161
161
  onClick: j
162
- }, [p(t(Pe), {
163
- "image-url": e.value.avatarUrl,
162
+ }, [p(n(Ee), {
163
+ "image-url": t.value.avatarUrl,
164
164
  size: 28,
165
165
  "object-fit": "cover"
166
- }, null, 8, ["image-url"])], 8, st), p(t(Q), {
167
- modelValue: e.value.nickname,
168
- "onUpdate:modelValue": w[0] || (w[0] = (q) => e.value.nickname = q),
166
+ }, null, 8, ["image-url"])], 8, ut), p(n(Q), {
167
+ modelValue: t.value.nickname,
168
+ "onUpdate:modelValue": w[0] || (w[0] = (q) => t.value.nickname = q),
169
169
  class: "nickname-field__input",
170
170
  size: u.size,
171
171
  placeholder: "例如:小明"
172
- }, null, 8, ["modelValue", "size"])])]), A("div", lt, [w[3] || (w[3] = A("label", {
172
+ }, null, 8, ["modelValue", "size"])])]), z("div", dt, [w[3] || (w[3] = z("label", {
173
173
  class: "profile-field__label"
174
- }, "个人简介", -1)), p(t(Me), {
175
- modelValue: e.value.description,
176
- "onUpdate:modelValue": w[1] || (w[1] = (q) => e.value.description = q),
174
+ }, "个人简介", -1)), p(n(Fe), {
175
+ modelValue: t.value.description,
176
+ "onUpdate:modelValue": w[1] || (w[1] = (q) => t.value.description = q),
177
177
  size: u.size,
178
178
  placeholder: "介绍一下你自己",
179
- "max-length": vt,
179
+ "max-length": gt,
180
180
  "show-word-limit": "",
181
181
  "auto-size": {
182
182
  minRows: 4,
183
183
  maxRows: 8
184
184
  }
185
- }, null, 8, ["modelValue", "size"])]), r.value ? (h(), M("div", rt, [p(t(T), {
185
+ }, null, 8, ["modelValue", "size"])]), r.value ? (h(), M("div", ct, [p(n(T), {
186
186
  size: u.size,
187
187
  onClick: B
188
188
  }, {
189
189
  default: o(() => [...w[4] || (w[4] = [k("取消", -1)])]),
190
190
  _: 1
191
- }, 8, ["size"]), p(t(T), {
191
+ }, 8, ["size"]), p(n(T), {
192
192
  type: "primary",
193
193
  size: u.size,
194
194
  loading: v.value,
@@ -196,15 +196,15 @@ const it = {
196
196
  }, {
197
197
  default: o(() => [...w[5] || (w[5] = [k(" 保存修改 ", -1)])]),
198
198
  _: 1
199
- }, 8, ["size", "loading"])])) : C("", !0)]), A("section", ut, [w[11] || (w[11] = A("h3", {
199
+ }, 8, ["size", "loading"])])) : E("", !0)]), z("section", ft, [w[11] || (w[11] = z("h3", {
200
200
  class: "profile-card__title"
201
- }, "账号信息", -1)), A("dl", dt, [A("div", ct, [w[7] || (w[7] = A("dt", null, "用户 ID", -1)), A("dd", null, [A("span", null, U(g.value.id || "-"), 1), g.value.id ? (h(), I(Ye, {
201
+ }, "账号信息", -1)), z("dl", pt, [z("div", mt, [w[7] || (w[7] = z("dt", null, "用户 ID", -1)), z("dd", null, [z("span", null, U(g.value.id || "-"), 1), g.value.id ? (h(), I(Qe, {
202
202
  key: 0,
203
203
  value: g.value.id,
204
204
  message: "用户 ID 已复制"
205
- }, null, 8, ["value"])) : C("", !0)])]), A("div", ft, [w[8] || (w[8] = A("dt", null, "注册时间", -1)), A("dd", null, U(g.value.createAt || "-"), 1)]), A("div", pt, [w[9] || (w[9] = A("dt", null, "账号状态", -1)), A("dd", null, U(t(Ge)(g.value.status)), 1)]), A("div", mt, [w[10] || (w[10] = A("dt", null, "登录标识", -1)), A("dd", null, U(g.value.loginIdentity), 1)])])])]));
205
+ }, null, 8, ["value"])) : E("", !0)])]), z("div", vt, [w[8] || (w[8] = z("dt", null, "注册时间", -1)), z("dd", null, U(g.value.createAt || "-"), 1)]), z("div", ht, [w[9] || (w[9] = z("dt", null, "账号状态", -1)), z("dd", null, U(n(Je)(g.value.status)), 1)]), z("div", yt, [w[10] || (w[10] = z("dt", null, "登录标识", -1)), z("dd", null, U(g.value.loginIdentity), 1)])])])]));
206
206
  }
207
- }), yt = /* @__PURE__ */ X(ht, [["__scopeId", "data-v-e03e688b"]]), gt = /* @__PURE__ */ Y({
207
+ }), bt = /* @__PURE__ */ X(wt, [["__scopeId", "data-v-e03e688b"]]), _t = /* @__PURE__ */ J({
208
208
  __name: "AuthkitSendVerifyCode",
209
209
  props: {
210
210
  size: {
@@ -218,36 +218,36 @@ const it = {
218
218
  }
219
219
  },
220
220
  emits: ["send"],
221
- setup(a, {
221
+ setup(e, {
222
222
  expose: i,
223
- emit: n
223
+ emit: a
224
224
  }) {
225
- const l = n, s = a, d = z(!1);
225
+ const l = a, s = e, d = A(!1);
226
226
  let u;
227
- const e = z(0), y = $(() => e.value.toString().padStart(2, "0")), g = $(() => e.value > 0);
227
+ const t = A(0), y = $(() => t.value.toString().padStart(2, "0")), g = $(() => t.value > 0);
228
228
  function f() {
229
229
  u && (clearInterval(u), u = void 0);
230
230
  }
231
231
  function v() {
232
232
  if (d.value) {
233
- if (e.value <= 0) {
233
+ if (t.value <= 0) {
234
234
  f(), d.value = !1;
235
235
  return;
236
236
  }
237
- e.value--, e.value <= 0 && (f(), d.value = !1);
237
+ t.value--, t.value <= 0 && (f(), d.value = !1);
238
238
  }
239
239
  }
240
240
  function r() {
241
241
  l("send");
242
242
  }
243
243
  function m(S) {
244
- !Number.isFinite(S) || S <= 0 || (e.value = Math.ceil(S), d.value = !0, f(), u = setInterval(v, 1e3));
244
+ !Number.isFinite(S) || S <= 0 || (t.value = Math.ceil(S), d.value = !0, f(), u = setInterval(v, 1e3));
245
245
  }
246
246
  return i({
247
247
  startCountFn: m
248
- }), ke(() => {
248
+ }), Ae(() => {
249
249
  f();
250
- }), (S, R) => (h(), I(t(T), {
250
+ }), (S, R) => (h(), I(n(T), {
251
251
  class: "OAuthItem",
252
252
  type: "primary",
253
253
  size: s.size,
@@ -255,36 +255,36 @@ const it = {
255
255
  loading: s.loading,
256
256
  onClick: r
257
257
  }, {
258
- default: o(() => [R[0] || (R[0] = A("span", null, " 发送验证码", -1)), De(A("span", {
258
+ default: o(() => [R[0] || (R[0] = z("span", null, " 发送验证码", -1)), qe(z("span", {
259
259
  class: "verify-code-timer"
260
- }, U(`(${y.value})`), 513), [[Be, g.value]])]),
260
+ }, U(`(${y.value})`), 513), [[Le, g.value]])]),
261
261
  _: 1
262
262
  }, 8, ["size", "disabled", "loading"]));
263
263
  }
264
- }), ve = /* @__PURE__ */ X(gt, [["__scopeId", "data-v-63c6fb3a"]]);
265
- function wt(a) {
266
- if (!a)
264
+ }), he = /* @__PURE__ */ X(_t, [["__scopeId", "data-v-63c6fb3a"]]);
265
+ function kt(e) {
266
+ if (!e)
267
267
  return null;
268
- const i = a.match(/请\s*(\d+)\s*秒后再试/);
268
+ const i = e.match(/请\s*(\d+)\s*秒后再试/);
269
269
  if (!i)
270
270
  return null;
271
- const n = Number(i[1]);
272
- return Number.isFinite(n) && n > 0 ? n : null;
271
+ const a = Number(i[1]);
272
+ return Number.isFinite(a) && a > 0 ? a : null;
273
273
  }
274
- function _e(a) {
275
- var n, l;
276
- const i = (n = a.data) == null ? void 0 : n.cooldownSeconds;
277
- return typeof i == "number" && i > 0 ? i : wt((l = a.error) == null ? void 0 : l.message);
274
+ function ke(e) {
275
+ var a, l;
276
+ const i = (a = e.data) == null ? void 0 : a.cooldownSeconds;
277
+ return typeof i == "number" && i > 0 ? i : kt((l = e.error) == null ? void 0 : l.message);
278
278
  }
279
- function he(a, i) {
280
- const n = _e(i);
281
- n && a && a.startCountFn(n);
279
+ function ye(e, i) {
280
+ const a = ke(i);
281
+ a && e && e.startCountFn(a);
282
282
  }
283
- const bt = {
283
+ const At = {
284
284
  class: "sendVerifyCodeItem"
285
- }, _t = {
285
+ }, zt = {
286
286
  class: "handle"
287
- }, kt = /* @__PURE__ */ Y({
287
+ }, Pt = /* @__PURE__ */ J({
288
288
  __name: "AuthkitEmailVerify",
289
289
  props: {
290
290
  email: {
@@ -298,43 +298,43 @@ const bt = {
298
298
  }
299
299
  },
300
300
  emits: ["next"],
301
- setup(a, {
301
+ setup(e, {
302
302
  emit: i
303
303
  }) {
304
- const n = i, l = a, s = $(() => Ce(l.email)), d = z(), u = z(!1), e = z(!1), y = z(), g = z({
304
+ const a = i, l = e, s = $(() => Re(l.email)), d = A(), u = A(!1), t = A(!1), y = A(), g = A({
305
305
  userToken: void 0,
306
306
  emailVerifyId: void 0
307
307
  });
308
308
  async function f() {
309
309
  u.value = !0;
310
- const r = await x().auth.verify.email.retry.post({
310
+ const r = await O().auth.verify.email.retry.post({
311
311
  email: l.email,
312
312
  purpose: "bindEmail"
313
313
  });
314
- u.value = !1, r.data && (g.value.emailVerifyId = r.data.emailVerifyId), he(d.value, r);
314
+ u.value = !1, r.data && (g.value.emailVerifyId = r.data.emailVerifyId), ye(d.value, r);
315
315
  }
316
316
  async function v() {
317
317
  if (!await y.value.validate(["userToken"])) {
318
- e.value = !0;
318
+ t.value = !0;
319
319
  const {
320
320
  error: m
321
- } = await x().auth.verify.email.post({
321
+ } = await O().auth.verify.email.post({
322
322
  email: l.email,
323
323
  userToken: g.value.userToken,
324
324
  emailVerifyId: g.value.emailVerifyId,
325
325
  purpose: "bindEmail"
326
326
  });
327
- e.value = !1, m || n("next");
327
+ t.value = !1, m || a("next");
328
328
  }
329
329
  }
330
- return (r, m) => (h(), I(t(le), {
330
+ return (r, m) => (h(), I(n(le), {
331
331
  ref_key: "formRef",
332
332
  ref: y,
333
333
  model: g.value,
334
334
  "auto-label-width": "",
335
335
  size: l.size
336
336
  }, {
337
- default: o(() => [p(t(L), {
337
+ default: o(() => [p(n(L), {
338
338
  field: "email",
339
339
  label: "邮箱",
340
340
  rules: [{
@@ -347,7 +347,7 @@ const bt = {
347
347
  }, {
348
348
  default: o(() => [k(U(s.value), 1)]),
349
349
  _: 1
350
- }), p(t(L), {
350
+ }), p(n(L), {
351
351
  field: "userToken",
352
352
  label: "验证码",
353
353
  "hide-label": "",
@@ -356,11 +356,11 @@ const bt = {
356
356
  message: "请输入验证码"
357
357
  }]
358
358
  }, {
359
- default: o(() => [A("div", bt, [p(t(Q), {
359
+ default: o(() => [z("div", At, [p(n(Q), {
360
360
  modelValue: g.value.userToken,
361
361
  "onUpdate:modelValue": m[0] || (m[0] = (S) => g.value.userToken = S),
362
362
  placeholder: "请输入验证码"
363
- }, null, 8, ["modelValue"]), p(ve, {
363
+ }, null, 8, ["modelValue"]), p(he, {
364
364
  ref_key: "SendVerifyCodeRef",
365
365
  ref: d,
366
366
  size: l.size,
@@ -371,13 +371,13 @@ const bt = {
371
371
  onSend: f
372
372
  }, null, 8, ["size", "loading"])])]),
373
373
  _: 1
374
- }), p(t(L), {
374
+ }), p(n(L), {
375
375
  field: "",
376
376
  label: "",
377
377
  rules: []
378
378
  }, {
379
- default: o(() => [A("div", _t, [p(t(T), {
380
- loading: e.value,
379
+ default: o(() => [z("div", zt, [p(n(T), {
380
+ loading: t.value,
381
381
  type: "primary",
382
382
  onClick: v
383
383
  }, {
@@ -389,11 +389,11 @@ const bt = {
389
389
  _: 1
390
390
  }, 8, ["model", "size"]));
391
391
  }
392
- }), ye = /* @__PURE__ */ X(kt, [["__scopeId", "data-v-0939d925"]]), zt = {
392
+ }), ge = /* @__PURE__ */ X(Pt, [["__scopeId", "data-v-0939d925"]]), It = {
393
393
  class: "sendVerifyCodeItem"
394
- }, At = {
394
+ }, Et = {
395
395
  class: "handle"
396
- }, Pt = /* @__PURE__ */ Y({
396
+ }, Ct = /* @__PURE__ */ J({
397
397
  __name: "AuthkitPhoneVerify",
398
398
  props: {
399
399
  phone: {
@@ -410,10 +410,10 @@ const bt = {
410
410
  }
411
411
  },
412
412
  emits: ["next"],
413
- setup(a, {
413
+ setup(e, {
414
414
  emit: i
415
415
  }) {
416
- const n = i, l = a, s = z(), d = z(!1), u = z(!1), e = z(), y = z({
416
+ const a = i, l = e, s = A(), d = A(!1), u = A(!1), t = A(), y = A({
417
417
  code: void 0
418
418
  }), g = $(() => {
419
419
  const r = l.phone.trim();
@@ -421,39 +421,39 @@ const bt = {
421
421
  });
422
422
  async function f() {
423
423
  d.value = !0;
424
- const r = await x().auth.verify.sms.send.post({
424
+ const r = await O().auth.verify.sms.send.post({
425
425
  phone: l.phone,
426
426
  purpose: l.purpose
427
427
  });
428
- d.value = !1, he(s.value, r);
428
+ d.value = !1, ye(s.value, r);
429
429
  }
430
430
  async function v() {
431
- if (!await e.value.validate(["code"])) {
431
+ if (!await t.value.validate(["code"])) {
432
432
  u.value = !0;
433
433
  const {
434
434
  error: m
435
- } = await x().auth.verify.sms.verify.post({
435
+ } = await O().auth.verify.sms.verify.post({
436
436
  phone: l.phone,
437
437
  code: y.value.code,
438
438
  purpose: l.purpose
439
439
  });
440
- u.value = !1, m || n("next");
440
+ u.value = !1, m || a("next");
441
441
  }
442
442
  }
443
- return (r, m) => (h(), I(t(le), {
443
+ return (r, m) => (h(), I(n(le), {
444
444
  ref_key: "formRef",
445
- ref: e,
445
+ ref: t,
446
446
  model: y.value,
447
447
  "auto-label-width": "",
448
448
  size: l.size
449
449
  }, {
450
- default: o(() => [p(t(L), {
450
+ default: o(() => [p(n(L), {
451
451
  field: "phone",
452
452
  label: "手机号"
453
453
  }, {
454
454
  default: o(() => [k(U(g.value), 1)]),
455
455
  _: 1
456
- }), p(t(L), {
456
+ }), p(n(L), {
457
457
  field: "code",
458
458
  label: "验证码",
459
459
  "hide-label": "",
@@ -462,11 +462,11 @@ const bt = {
462
462
  message: "请输入验证码"
463
463
  }]
464
464
  }, {
465
- default: o(() => [A("div", zt, [p(t(Q), {
465
+ default: o(() => [z("div", It, [p(n(Q), {
466
466
  modelValue: y.value.code,
467
467
  "onUpdate:modelValue": m[0] || (m[0] = (S) => y.value.code = S),
468
468
  placeholder: "请输入验证码"
469
- }, null, 8, ["modelValue"]), p(ve, {
469
+ }, null, 8, ["modelValue"]), p(he, {
470
470
  ref_key: "sendVerifyCodeRef",
471
471
  ref: s,
472
472
  size: l.size,
@@ -477,12 +477,12 @@ const bt = {
477
477
  onSend: f
478
478
  }, null, 8, ["size", "loading"])])]),
479
479
  _: 1
480
- }), p(t(L), {
480
+ }), p(n(L), {
481
481
  field: "",
482
482
  label: "",
483
483
  rules: []
484
484
  }, {
485
- default: o(() => [A("div", At, [p(t(T), {
485
+ default: o(() => [z("div", Et, [p(n(T), {
486
486
  loading: u.value,
487
487
  type: "primary",
488
488
  onClick: v
@@ -495,9 +495,9 @@ const bt = {
495
495
  _: 1
496
496
  }, 8, ["model", "size"]));
497
497
  }
498
- }), ge = /* @__PURE__ */ X(Pt, [["__scopeId", "data-v-d26a59d3"]]), It = {
498
+ }), we = /* @__PURE__ */ X(Ct, [["__scopeId", "data-v-d26a59d3"]]), Rt = {
499
499
  class: "handle"
500
- }, Ct = /* @__PURE__ */ Y({
500
+ }, St = /* @__PURE__ */ J({
501
501
  __name: "AuthkitPasswordUpdate",
502
502
  props: {
503
503
  size: {
@@ -510,14 +510,14 @@ const bt = {
510
510
  }
511
511
  },
512
512
  emits: ["submit"],
513
- setup(a, {
513
+ setup(e, {
514
514
  emit: i
515
515
  }) {
516
- const n = i, l = z(!1), s = z(), d = a, u = z({
516
+ const a = i, l = A(!1), s = A(), d = e, u = A({
517
517
  oldPassword: "",
518
518
  password: "",
519
519
  confirmPassword: ""
520
- }), e = [{
520
+ }), t = [{
521
521
  required: !0,
522
522
  message: "请输入确认密码"
523
523
  }, {
@@ -538,18 +538,18 @@ const bt = {
538
538
  password: u.value.password
539
539
  }, {
540
540
  error: v
541
- } = await x().auth.users.update.password.post(f);
542
- l.value = !1, v || n("submit", f);
541
+ } = await O().auth.users.update.password.post(f);
542
+ l.value = !1, v || a("submit", f);
543
543
  }
544
544
  }
545
- return (g, f) => (h(), I(t(le), {
545
+ return (g, f) => (h(), I(n(le), {
546
546
  ref_key: "formRef",
547
547
  ref: s,
548
548
  model: u.value,
549
549
  "auto-label-width": "",
550
550
  size: d.size
551
551
  }, {
552
- default: o(() => [d.requireOldPassword ? (h(), I(t(L), {
552
+ default: o(() => [d.requireOldPassword ? (h(), I(n(L), {
553
553
  key: 0,
554
554
  field: "oldPassword",
555
555
  label: "当前密码",
@@ -559,14 +559,14 @@ const bt = {
559
559
  message: "请输入当前密码"
560
560
  }]
561
561
  }, {
562
- default: o(() => [p(t(Q), {
562
+ default: o(() => [p(n(Q), {
563
563
  modelValue: u.value.oldPassword,
564
564
  "onUpdate:modelValue": f[0] || (f[0] = (v) => u.value.oldPassword = v),
565
565
  placeholder: "请输入当前密码",
566
566
  type: "password"
567
567
  }, null, 8, ["modelValue"])]),
568
568
  _: 1
569
- })) : C("", !0), p(t(L), {
569
+ })) : E("", !0), p(n(L), {
570
570
  field: "password",
571
571
  label: d.requireOldPassword ? "新密码" : "登录密码",
572
572
  "hide-label": "",
@@ -578,32 +578,32 @@ const bt = {
578
578
  message: "密码不能少于10字符"
579
579
  }]
580
580
  }, {
581
- default: o(() => [p(t(Q), {
581
+ default: o(() => [p(n(Q), {
582
582
  modelValue: u.value.password,
583
583
  "onUpdate:modelValue": f[1] || (f[1] = (v) => u.value.password = v),
584
584
  placeholder: d.requireOldPassword ? "请输入新密码" : "请输入登录密码",
585
585
  type: "password"
586
586
  }, null, 8, ["modelValue", "placeholder"])]),
587
587
  _: 1
588
- }, 8, ["label", "rules"]), p(t(L), {
588
+ }, 8, ["label", "rules"]), p(n(L), {
589
589
  field: "confirmPassword",
590
590
  label: "确认密码",
591
591
  "hide-label": "",
592
- rules: e
592
+ rules: t
593
593
  }, {
594
- default: o(() => [p(t(Q), {
594
+ default: o(() => [p(n(Q), {
595
595
  modelValue: u.value.confirmPassword,
596
596
  "onUpdate:modelValue": f[2] || (f[2] = (v) => u.value.confirmPassword = v),
597
597
  placeholder: "请输入确认密码",
598
598
  type: "password"
599
599
  }, null, 8, ["modelValue"])]),
600
600
  _: 1
601
- }), p(t(L), {
601
+ }), p(n(L), {
602
602
  field: "",
603
603
  label: "",
604
604
  rules: []
605
605
  }, {
606
- default: o(() => [A("div", It, [p(t(T), {
606
+ default: o(() => [z("div", Rt, [p(n(T), {
607
607
  type: "primary",
608
608
  loading: l.value,
609
609
  onClick: y
@@ -616,7 +616,7 @@ const bt = {
616
616
  _: 1
617
617
  }, 8, ["model", "size"]));
618
618
  }
619
- }), Et = /* @__PURE__ */ X(Ct, [["__scopeId", "data-v-627d759a"]]), Rt = /* @__PURE__ */ Y({
619
+ }), Vt = /* @__PURE__ */ X(St, [["__scopeId", "data-v-627d759a"]]), $t = /* @__PURE__ */ J({
620
620
  __name: "AuthkitSetPassword",
621
621
  props: {
622
622
  size: {
@@ -624,212 +624,212 @@ const bt = {
624
624
  required: !0
625
625
  }
626
626
  },
627
- setup(a) {
627
+ setup(e) {
628
628
  const {
629
629
  userProfile: i,
630
- fetchUserProfile: n,
630
+ fetchUserProfile: a,
631
631
  isLoggedIn: l
632
- } = ae(), s = z("hidden"), d = a;
632
+ } = ne(), s = A("hidden"), d = e;
633
633
  function u(g) {
634
634
  s.value = g;
635
635
  }
636
- function e(g) {
636
+ function t(g) {
637
637
  var f;
638
- G.success((f = i.value) != null && f.hasPassword ? "密码修改成功" : "密码设置成功"), s.value = "hidden", n();
638
+ G.success((f = i.value) != null && f.hasPassword ? "密码修改成功" : "密码设置成功"), s.value = "hidden", a();
639
639
  }
640
640
  function y() {
641
641
  s.value = "update";
642
642
  }
643
- return ue(() => {
644
- l.value && !i.value && n();
643
+ return de(() => {
644
+ l.value && !i.value && a();
645
645
  }), (g, f) => {
646
646
  var v, r, m, S, R, B, K, j, V;
647
- return h(), M(ie, null, [!((v = t(i)) != null && v.email) && !((r = t(i)) != null && r.phone) ? (h(), I(t(J), {
647
+ return h(), M(ie, null, [!((v = n(i)) != null && v.email) && !((r = n(i)) != null && r.phone) ? (h(), I(n(Y), {
648
648
  key: 0,
649
649
  type: "info",
650
650
  title: "先绑定账号"
651
651
  }, {
652
652
  default: o(() => [...f[1] || (f[1] = [k(" 请先绑定邮箱或手机号,再设置登录密码。 ", -1)])]),
653
653
  _: 1
654
- })) : C("", !0), ((m = t(i)) != null && m.email || (S = t(i)) != null && S.phone) && s.value === "hidden" ? (h(), I(t(J), {
654
+ })) : E("", !0), ((m = n(i)) != null && m.email || (S = n(i)) != null && S.phone) && s.value === "hidden" ? (h(), I(n(Y), {
655
655
  key: 1,
656
- title: (R = t(i)) != null && R.hasPassword ? "更改密码" : "设置登录密码"
656
+ title: (R = n(i)) != null && R.hasPassword ? "更改密码" : "设置登录密码"
657
657
  }, {
658
- action: o(() => [p(t(T), {
658
+ action: o(() => [p(n(T), {
659
659
  size: d.size,
660
660
  type: "primary",
661
661
  onClick: f[0] || (f[0] = (w) => u("verify"))
662
662
  }, {
663
663
  default: o(() => {
664
664
  var w;
665
- return [k(U((w = t(i)) != null && w.hasPassword ? "更改密码" : "设置密码"), 1)];
665
+ return [k(U((w = n(i)) != null && w.hasPassword ? "更改密码" : "设置密码"), 1)];
666
666
  }),
667
667
  _: 1
668
668
  }, 8, ["size"])]),
669
669
  default: o(() => {
670
670
  var w;
671
- return [k(U((w = t(i)) != null && w.hasPassword ? "为了账户安全,修改密码前会先验证身份。" : "设置登录密码前会先验证身份。") + " ", 1)];
671
+ return [k(U((w = n(i)) != null && w.hasPassword ? "为了账户安全,修改密码前会先验证身份。" : "设置登录密码前会先验证身份。") + " ", 1)];
672
672
  }),
673
673
  _: 1
674
- }, 8, ["title"])) : C("", !0), s.value === "update" ? (h(), I(Et, {
674
+ }, 8, ["title"])) : E("", !0), s.value === "update" ? (h(), I(Vt, {
675
675
  key: 2,
676
676
  size: d.size,
677
- "require-old-password": !!((B = t(i)) != null && B.hasPassword),
678
- onSubmit: e
679
- }, null, 8, ["size", "require-old-password"])) : C("", !0), s.value === "verify" && ((K = t(i)) != null && K.email) ? (h(), I(ye, {
677
+ "require-old-password": !!((B = n(i)) != null && B.hasPassword),
678
+ onSubmit: t
679
+ }, null, 8, ["size", "require-old-password"])) : E("", !0), s.value === "verify" && ((K = n(i)) != null && K.email) ? (h(), I(ge, {
680
680
  key: 3,
681
681
  size: d.size,
682
- email: t(i).email,
682
+ email: n(i).email,
683
683
  onNext: y
684
- }, null, 8, ["size", "email"])) : C("", !0), s.value === "verify" && !((j = t(i)) != null && j.email) && ((V = t(i)) != null && V.phone) ? (h(), I(ge, {
684
+ }, null, 8, ["size", "email"])) : E("", !0), s.value === "verify" && !((j = n(i)) != null && j.email) && ((V = n(i)) != null && V.phone) ? (h(), I(we, {
685
685
  key: 4,
686
686
  size: d.size,
687
- phone: t(i).phone,
687
+ phone: n(i).phone,
688
688
  onNext: y
689
- }, null, 8, ["size", "phone"])) : C("", !0)], 64);
689
+ }, null, 8, ["size", "phone"])) : E("", !0)], 64);
690
690
  };
691
691
  }
692
- }), ce = {
692
+ }), fe = {
693
693
  datetime: 180,
694
694
  name: 240,
695
695
  /** 单按钮操作列(移除等) */
696
696
  actionsSingle: 100
697
697
  };
698
- function ee(a) {
699
- const i = new Uint8Array(a);
700
- let n = "";
698
+ function ee(e) {
699
+ const i = new Uint8Array(e);
700
+ let a = "";
701
701
  for (const s of i)
702
- n += String.fromCharCode(s);
703
- return btoa(n).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
702
+ a += String.fromCharCode(s);
703
+ return btoa(a).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
704
704
  }
705
- function me(a) {
706
- const i = a.replace(/-/g, "+").replace(/_/g, "/"), n = (4 - i.length % 4) % 4, l = i.padEnd(i.length + n, "="), s = atob(l), d = new ArrayBuffer(s.length), u = new Uint8Array(d);
707
- for (let e = 0; e < s.length; e++)
708
- u[e] = s.charCodeAt(e);
705
+ function ve(e) {
706
+ const i = e.replace(/-/g, "+").replace(/_/g, "/"), a = (4 - i.length % 4) % 4, l = i.padEnd(i.length + a, "="), s = atob(l), d = new ArrayBuffer(s.length), u = new Uint8Array(d);
707
+ for (let t = 0; t < s.length; t++)
708
+ u[t] = s.charCodeAt(t);
709
709
  return d;
710
710
  }
711
- function we() {
711
+ function be() {
712
712
  return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
713
713
  }
714
- function Ve(a) {
714
+ function $e(e) {
715
715
  const {
716
716
  id: i
717
- } = a;
717
+ } = e;
718
718
  return {
719
- ...a,
720
- id: me(i),
721
- transports: a.transports
719
+ ...e,
720
+ id: ve(i),
721
+ transports: e.transports
722
722
  };
723
723
  }
724
- function $e(a) {
725
- return a === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(a);
724
+ function Te(e) {
725
+ return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
726
726
  }
727
727
  class W extends Error {
728
728
  constructor({
729
729
  message: i,
730
- code: n,
730
+ code: a,
731
731
  cause: l,
732
732
  name: s
733
733
  }) {
734
734
  super(i, {
735
735
  cause: l
736
- }), this.name = s ?? l.name, this.code = n;
736
+ }), this.name = s ?? l.name, this.code = a;
737
737
  }
738
738
  }
739
- function St({
740
- error: a,
739
+ function Tt({
740
+ error: e,
741
741
  options: i
742
742
  }) {
743
743
  var l, s, d;
744
744
  const {
745
- publicKey: n
745
+ publicKey: a
746
746
  } = i;
747
- if (!n)
747
+ if (!a)
748
748
  throw Error("options was missing required publicKey property");
749
- if (a.name === "AbortError") {
749
+ if (e.name === "AbortError") {
750
750
  if (i.signal instanceof AbortSignal)
751
751
  return new W({
752
752
  message: "Registration ceremony was sent an abort signal",
753
753
  code: "ERROR_CEREMONY_ABORTED",
754
- cause: a
754
+ cause: e
755
755
  });
756
- } else if (a.name === "ConstraintError") {
757
- if (((l = n.authenticatorSelection) == null ? void 0 : l.requireResidentKey) === !0)
756
+ } else if (e.name === "ConstraintError") {
757
+ if (((l = a.authenticatorSelection) == null ? void 0 : l.requireResidentKey) === !0)
758
758
  return new W({
759
759
  message: "Discoverable credentials were required but no available authenticator supported it",
760
760
  code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
761
- cause: a
761
+ cause: e
762
762
  });
763
- if (i.mediation === "conditional" && ((s = n.authenticatorSelection) == null ? void 0 : s.userVerification) === "required")
763
+ if (i.mediation === "conditional" && ((s = a.authenticatorSelection) == null ? void 0 : s.userVerification) === "required")
764
764
  return new W({
765
765
  message: "User verification was required during automatic registration but it could not be performed",
766
766
  code: "ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",
767
- cause: a
767
+ cause: e
768
768
  });
769
- if (((d = n.authenticatorSelection) == null ? void 0 : d.userVerification) === "required")
769
+ if (((d = a.authenticatorSelection) == null ? void 0 : d.userVerification) === "required")
770
770
  return new W({
771
771
  message: "User verification was required but no available authenticator supported it",
772
772
  code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
773
- cause: a
773
+ cause: e
774
774
  });
775
775
  } else {
776
- if (a.name === "InvalidStateError")
776
+ if (e.name === "InvalidStateError")
777
777
  return new W({
778
778
  message: "The authenticator was previously registered",
779
779
  code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
780
- cause: a
780
+ cause: e
781
781
  });
782
- if (a.name === "NotAllowedError")
782
+ if (e.name === "NotAllowedError")
783
783
  return new W({
784
- message: a.message,
784
+ message: e.message,
785
785
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
786
- cause: a
786
+ cause: e
787
787
  });
788
- if (a.name === "NotSupportedError")
789
- return n.pubKeyCredParams.filter((e) => e.type === "public-key").length === 0 ? new W({
788
+ if (e.name === "NotSupportedError")
789
+ return a.pubKeyCredParams.filter((t) => t.type === "public-key").length === 0 ? new W({
790
790
  message: 'No entry in pubKeyCredParams was of type "public-key"',
791
791
  code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
792
- cause: a
792
+ cause: e
793
793
  }) : new W({
794
794
  message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
795
795
  code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
796
- cause: a
796
+ cause: e
797
797
  });
798
- if (a.name === "SecurityError") {
798
+ if (e.name === "SecurityError") {
799
799
  const u = window.location.hostname;
800
- if ($e(u)) {
801
- if (n.rp.id !== u)
800
+ if (Te(u)) {
801
+ if (a.rp.id !== u)
802
802
  return new W({
803
- message: `The RP ID "${n.rp.id}" is invalid for this domain`,
803
+ message: `The RP ID "${a.rp.id}" is invalid for this domain`,
804
804
  code: "ERROR_INVALID_RP_ID",
805
- cause: a
805
+ cause: e
806
806
  });
807
807
  } else return new W({
808
808
  message: `${window.location.hostname} is an invalid domain`,
809
809
  code: "ERROR_INVALID_DOMAIN",
810
- cause: a
810
+ cause: e
811
811
  });
812
- } else if (a.name === "TypeError") {
813
- if (n.user.id.byteLength < 1 || n.user.id.byteLength > 64)
812
+ } else if (e.name === "TypeError") {
813
+ if (a.user.id.byteLength < 1 || a.user.id.byteLength > 64)
814
814
  return new W({
815
815
  message: "User ID was not between 1 and 64 characters",
816
816
  code: "ERROR_INVALID_USER_ID_LENGTH",
817
- cause: a
817
+ cause: e
818
818
  });
819
- } else if (a.name === "UnknownError")
819
+ } else if (e.name === "UnknownError")
820
820
  return new W({
821
821
  message: "The authenticator was unable to process the specified options, or could not create a new credential",
822
822
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
823
- cause: a
823
+ cause: e
824
824
  });
825
825
  }
826
- return a;
826
+ return e;
827
827
  }
828
- class Vt {
828
+ class Ut {
829
829
  createNewAbortSignal() {
830
830
  if (this.controller) {
831
- const n = new Error("Cancelling existing WebAuthn API call for new one");
832
- n.name = "AbortError", this.controller.abort(n);
831
+ const a = new Error("Cancelling existing WebAuthn API call for new one");
832
+ a.name = "AbortError", this.controller.abort(a);
833
833
  }
834
834
  const i = new AbortController();
835
835
  return this.controller = i, i.signal;
@@ -841,34 +841,34 @@ class Vt {
841
841
  }
842
842
  }
843
843
  }
844
- const Te = new Vt(), $t = ["cross-platform", "platform"];
845
- function Ue(a) {
846
- if (a && !($t.indexOf(a) < 0))
847
- return a;
844
+ const Ue = new Ut(), Ot = ["cross-platform", "platform"];
845
+ function Oe(e) {
846
+ if (e && !(Ot.indexOf(e) < 0))
847
+ return e;
848
848
  }
849
- async function Tt(a) {
849
+ async function xt(e) {
850
850
  var S;
851
851
  const {
852
852
  optionsJSON: i,
853
- useAutoRegister: n = !1
854
- } = a;
855
- if (!we())
853
+ useAutoRegister: a = !1
854
+ } = e;
855
+ if (!be())
856
856
  throw new Error("WebAuthn is not supported in this browser");
857
857
  const l = {
858
858
  ...i,
859
- challenge: me(i.challenge),
859
+ challenge: ve(i.challenge),
860
860
  user: {
861
861
  ...i.user,
862
- id: me(i.user.id)
862
+ id: ve(i.user.id)
863
863
  },
864
- excludeCredentials: (S = i.excludeCredentials) == null ? void 0 : S.map(Ve)
864
+ excludeCredentials: (S = i.excludeCredentials) == null ? void 0 : S.map($e)
865
865
  }, s = {};
866
- n && (s.mediation = "conditional"), s.publicKey = l, s.signal = Te.createNewAbortSignal();
866
+ a && (s.mediation = "conditional"), s.publicKey = l, s.signal = Ue.createNewAbortSignal();
867
867
  let d;
868
868
  try {
869
869
  d = await navigator.credentials.create(s);
870
870
  } catch (R) {
871
- throw St({
871
+ throw Tt({
872
872
  error: R,
873
873
  options: s
874
874
  });
@@ -877,7 +877,7 @@ async function Tt(a) {
877
877
  throw new Error("Registration was not completed");
878
878
  const {
879
879
  id: u,
880
- rawId: e,
880
+ rawId: t,
881
881
  response: y,
882
882
  type: g
883
883
  } = d;
@@ -888,7 +888,7 @@ async function Tt(a) {
888
888
  try {
889
889
  v = y.getPublicKeyAlgorithm();
890
890
  } catch (R) {
891
- be("getPublicKeyAlgorithm()", R);
891
+ _e("getPublicKeyAlgorithm()", R);
892
892
  }
893
893
  let r;
894
894
  if (typeof y.getPublicKey == "function")
@@ -896,18 +896,18 @@ async function Tt(a) {
896
896
  const R = y.getPublicKey();
897
897
  R !== null && (r = ee(R));
898
898
  } catch (R) {
899
- be("getPublicKey()", R);
899
+ _e("getPublicKey()", R);
900
900
  }
901
901
  let m;
902
902
  if (typeof y.getAuthenticatorData == "function")
903
903
  try {
904
904
  m = ee(y.getAuthenticatorData());
905
905
  } catch (R) {
906
- be("getAuthenticatorData()", R);
906
+ _e("getAuthenticatorData()", R);
907
907
  }
908
908
  return {
909
909
  id: u,
910
- rawId: ee(e),
910
+ rawId: ee(t),
911
911
  response: {
912
912
  attestationObject: ee(y.attestationObject),
913
913
  clientDataJSON: ee(y.clientDataJSON),
@@ -918,106 +918,106 @@ async function Tt(a) {
918
918
  },
919
919
  type: g,
920
920
  clientExtensionResults: d.getClientExtensionResults(),
921
- authenticatorAttachment: Ue(d.authenticatorAttachment)
921
+ authenticatorAttachment: Oe(d.authenticatorAttachment)
922
922
  };
923
923
  }
924
- function be(a, i) {
925
- console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${a}. You should report this error to them.
924
+ function _e(e, i) {
925
+ console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
926
926
  `, i);
927
927
  }
928
- function Ut() {
929
- if (!we())
928
+ function Nt() {
929
+ if (!be())
930
930
  return new Promise((i) => i(!1));
931
- const a = window.PublicKeyCredential;
932
- return a.isConditionalMediationAvailable === void 0 ? new Promise((i) => i(!1)) : a.isConditionalMediationAvailable();
931
+ const e = window.PublicKeyCredential;
932
+ return e.isConditionalMediationAvailable === void 0 ? new Promise((i) => i(!1)) : e.isConditionalMediationAvailable();
933
933
  }
934
- function xt({
935
- error: a,
934
+ function Dt({
935
+ error: e,
936
936
  options: i
937
937
  }) {
938
938
  const {
939
- publicKey: n
939
+ publicKey: a
940
940
  } = i;
941
- if (!n)
941
+ if (!a)
942
942
  throw Error("options was missing required publicKey property");
943
- if (a.name === "AbortError") {
943
+ if (e.name === "AbortError") {
944
944
  if (i.signal instanceof AbortSignal)
945
945
  return new W({
946
946
  message: "Authentication ceremony was sent an abort signal",
947
947
  code: "ERROR_CEREMONY_ABORTED",
948
- cause: a
948
+ cause: e
949
949
  });
950
950
  } else {
951
- if (a.name === "NotAllowedError")
951
+ if (e.name === "NotAllowedError")
952
952
  return new W({
953
- message: a.message,
953
+ message: e.message,
954
954
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
955
- cause: a
955
+ cause: e
956
956
  });
957
- if (a.name === "SecurityError") {
957
+ if (e.name === "SecurityError") {
958
958
  const l = window.location.hostname;
959
- if ($e(l)) {
960
- if (n.rpId !== l)
959
+ if (Te(l)) {
960
+ if (a.rpId !== l)
961
961
  return new W({
962
- message: `The RP ID "${n.rpId}" is invalid for this domain`,
962
+ message: `The RP ID "${a.rpId}" is invalid for this domain`,
963
963
  code: "ERROR_INVALID_RP_ID",
964
- cause: a
964
+ cause: e
965
965
  });
966
966
  } else return new W({
967
967
  message: `${window.location.hostname} is an invalid domain`,
968
968
  code: "ERROR_INVALID_DOMAIN",
969
- cause: a
969
+ cause: e
970
970
  });
971
- } else if (a.name === "UnknownError")
971
+ } else if (e.name === "UnknownError")
972
972
  return new W({
973
973
  message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
974
974
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
975
- cause: a
975
+ cause: e
976
976
  });
977
977
  }
978
- return a;
978
+ return e;
979
979
  }
980
- async function Ot(a) {
980
+ async function Bt(e) {
981
981
  var m, S;
982
982
  const {
983
983
  optionsJSON: i,
984
- useBrowserAutofill: n = !1,
984
+ useBrowserAutofill: a = !1,
985
985
  verifyBrowserAutofillInput: l = !0
986
- } = a;
987
- if (!we())
986
+ } = e;
987
+ if (!be())
988
988
  throw new Error("WebAuthn is not supported in this browser");
989
989
  let s;
990
- ((m = i.allowCredentials) == null ? void 0 : m.length) !== 0 && (s = (S = i.allowCredentials) == null ? void 0 : S.map(Ve));
990
+ ((m = i.allowCredentials) == null ? void 0 : m.length) !== 0 && (s = (S = i.allowCredentials) == null ? void 0 : S.map($e));
991
991
  const d = {
992
992
  ...i,
993
- challenge: me(i.challenge),
993
+ challenge: ve(i.challenge),
994
994
  allowCredentials: s
995
995
  }, u = {};
996
- if (n) {
997
- if (!await Ut())
996
+ if (a) {
997
+ if (!await Nt())
998
998
  throw Error("Browser does not support WebAuthn autofill");
999
999
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && l)
1000
1000
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
1001
1001
  u.mediation = "conditional", d.allowCredentials = [];
1002
1002
  }
1003
- u.publicKey = d, u.signal = Te.createNewAbortSignal();
1004
- let e;
1003
+ u.publicKey = d, u.signal = Ue.createNewAbortSignal();
1004
+ let t;
1005
1005
  try {
1006
- e = await navigator.credentials.get(u);
1006
+ t = await navigator.credentials.get(u);
1007
1007
  } catch (R) {
1008
- throw xt({
1008
+ throw Dt({
1009
1009
  error: R,
1010
1010
  options: u
1011
1011
  });
1012
1012
  }
1013
- if (!e)
1013
+ if (!t)
1014
1014
  throw new Error("Authentication was not completed");
1015
1015
  const {
1016
1016
  id: y,
1017
1017
  rawId: g,
1018
1018
  response: f,
1019
1019
  type: v
1020
- } = e;
1020
+ } = t;
1021
1021
  let r;
1022
1022
  return f.userHandle && (r = ee(f.userHandle)), {
1023
1023
  id: y,
@@ -1029,101 +1029,101 @@ async function Ot(a) {
1029
1029
  userHandle: r
1030
1030
  },
1031
1031
  type: v,
1032
- clientExtensionResults: e.getClientExtensionResults(),
1033
- authenticatorAttachment: Ue(e.authenticatorAttachment)
1032
+ clientExtensionResults: t.getClientExtensionResults(),
1033
+ authenticatorAttachment: Oe(t.authenticatorAttachment)
1034
1034
  };
1035
1035
  }
1036
- function Nt() {
1036
+ function qt() {
1037
1037
  return se() === null;
1038
1038
  }
1039
1039
  function se() {
1040
- return typeof window > "u" ? "非浏览器环境,无法使用 Passkey" : window.isSecureContext ? we() ? null : "当前浏览器不支持 Passkey,请使用 Chrome / Safari / Edge" : "Passkey 需要在安全环境下使用(HTTPS,或 localhost)";
1040
+ return typeof window > "u" ? "非浏览器环境,无法使用 Passkey" : window.isSecureContext ? be() ? null : "当前浏览器不支持 Passkey,请使用 Chrome / Safari / Edge" : "Passkey 需要在安全环境下使用(HTTPS,或 localhost)";
1041
1041
  }
1042
- function Dt(a) {
1043
- return a instanceof Error ? a.name === "NotAllowedError" ? "已取消操作" : a.message.includes("WebAuthn is not supported") ? se() || "当前环境不支持 Passkey" : a.name === "NotSupportedError" ? "当前设备无可用认证器" : a.message || "Passkey 操作失败" : "Passkey 操作失败";
1042
+ function Lt(e) {
1043
+ return e instanceof Error ? e.name === "NotAllowedError" ? "已取消操作" : e.message.includes("WebAuthn is not supported") ? se() || "当前环境不支持 Passkey" : e.name === "NotSupportedError" ? "当前设备无可用认证器" : e.message || "Passkey 操作失败" : "Passkey 操作失败";
1044
1044
  }
1045
- function Bt() {
1046
- const a = navigator.userAgent;
1047
- return a.includes("Chrome") ? "Chrome" : a.includes("Safari") ? "Safari" : a.includes("Firefox") ? "Firefox" : a.includes("Edge") ? "Edge" : "Browser";
1045
+ function Mt() {
1046
+ const e = navigator.userAgent;
1047
+ return e.includes("Chrome") ? "Chrome" : e.includes("Safari") ? "Safari" : e.includes("Firefox") ? "Firefox" : e.includes("Edge") ? "Edge" : "Browser";
1048
1048
  }
1049
- function qt() {
1050
- return `${Bt()} - ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`;
1049
+ function Kt() {
1050
+ return `${Mt()} - ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`;
1051
1051
  }
1052
- function Lt() {
1053
- const a = z(!1), i = Nt();
1054
- async function n(d) {
1052
+ function Ft() {
1053
+ const e = A(!1), i = qt();
1054
+ async function a(d) {
1055
1055
  const u = se();
1056
1056
  if (u)
1057
1057
  throw new Error(u);
1058
- a.value = !0;
1058
+ e.value = !0;
1059
1059
  try {
1060
1060
  const {
1061
- data: e,
1061
+ data: t,
1062
1062
  error: y
1063
- } = await x().auth.passkey.auth.options.post({
1063
+ } = await O().auth.passkey.auth.options.post({
1064
1064
  email: (d == null ? void 0 : d.trim()) || void 0
1065
1065
  });
1066
- if (y || !e)
1066
+ if (y || !t)
1067
1067
  return null;
1068
- const g = await Ot({
1069
- optionsJSON: e
1068
+ const g = await Bt({
1069
+ optionsJSON: t
1070
1070
  }), {
1071
1071
  data: f,
1072
1072
  error: v
1073
- } = await x().auth.passkey.auth.verify.post({
1073
+ } = await O().auth.passkey.auth.verify.post({
1074
1074
  response: g
1075
1075
  });
1076
1076
  return v || !f ? null : f;
1077
1077
  } finally {
1078
- a.value = !1;
1078
+ e.value = !1;
1079
1079
  }
1080
1080
  }
1081
1081
  async function l(d) {
1082
1082
  const u = se();
1083
1083
  if (u)
1084
1084
  throw new Error(u);
1085
- a.value = !0;
1085
+ e.value = !0;
1086
1086
  try {
1087
1087
  const {
1088
- data: e,
1088
+ data: t,
1089
1089
  error: y
1090
- } = await x().auth.passkey.register.options.post();
1091
- if (y || !e)
1090
+ } = await O().auth.passkey.register.options.post();
1091
+ if (y || !t)
1092
1092
  return !1;
1093
- const g = await Tt({
1094
- optionsJSON: e
1093
+ const g = await xt({
1094
+ optionsJSON: t
1095
1095
  }), {
1096
1096
  error: f
1097
- } = await x().auth.passkey.register.verify.post({
1097
+ } = await O().auth.passkey.register.verify.post({
1098
1098
  response: g,
1099
- name: (d == null ? void 0 : d.trim()) || qt()
1099
+ name: (d == null ? void 0 : d.trim()) || Kt()
1100
1100
  });
1101
1101
  return !f;
1102
1102
  } finally {
1103
- a.value = !1;
1103
+ e.value = !1;
1104
1104
  }
1105
1105
  }
1106
1106
  function s(d) {
1107
- return Dt(d);
1107
+ return Lt(d);
1108
1108
  }
1109
1109
  return {
1110
- loading: a,
1110
+ loading: e,
1111
1111
  supported: i,
1112
- loginWithPasskey: n,
1112
+ loginWithPasskey: a,
1113
1113
  registerPasskey: l,
1114
1114
  formatError: s,
1115
1115
  getPasskeyEnvironmentIssue: se
1116
1116
  };
1117
1117
  }
1118
- const Mt = {
1118
+ const Ht = {
1119
1119
  class: "passkey-binding"
1120
- }, Kt = {
1120
+ }, Wt = {
1121
1121
  key: 0,
1122
1122
  class: "passkey-binding__issue"
1123
- }, Ft = {
1123
+ }, Gt = {
1124
1124
  key: 4,
1125
1125
  class: "passkey-binding__toolbar"
1126
- }, Ht = /* @__PURE__ */ Y({
1126
+ }, Yt = /* @__PURE__ */ J({
1127
1127
  __name: "AuthkitPasskeyBinding",
1128
1128
  props: {
1129
1129
  size: {
@@ -1131,39 +1131,39 @@ const Mt = {
1131
1131
  required: !0
1132
1132
  }
1133
1133
  },
1134
- setup(a) {
1135
- const i = a, {
1136
- userProfile: n
1137
- } = ae(), l = z(!1), s = z(!1), d = z([]), u = se(), {
1138
- registerPasskey: e,
1134
+ setup(e) {
1135
+ const i = e, {
1136
+ userProfile: a
1137
+ } = ne(), l = A(!1), s = A(!1), d = A([]), u = se(), {
1138
+ registerPasskey: t,
1139
1139
  formatError: y
1140
- } = Lt(), g = z(""), f = z(!1), v = z(), r = $(() => {
1140
+ } = Ft(), g = A(""), f = A(!1), v = A(), r = $(() => {
1141
1141
  var _, P;
1142
- return !!((_ = n.value) != null && _.email || (P = n.value) != null && P.phone);
1142
+ return !!((_ = a.value) != null && _.email || (P = a.value) != null && P.phone);
1143
1143
  }), m = $(() => r.value && !v.value), S = [{
1144
1144
  title: "通行密钥",
1145
1145
  dataIndex: "name",
1146
- minWidth: ce.name,
1146
+ minWidth: fe.name,
1147
1147
  ellipsis: !0,
1148
1148
  tooltip: !0
1149
1149
  }, {
1150
1150
  title: "上次使用",
1151
1151
  dataIndex: "lastUsedAt",
1152
1152
  slotName: "lastUsedAt",
1153
- minWidth: ce.datetime,
1153
+ minWidth: fe.datetime,
1154
1154
  ellipsis: !0,
1155
1155
  tooltip: !0
1156
1156
  }, {
1157
1157
  title: "添加时间",
1158
1158
  dataIndex: "createdAt",
1159
1159
  slotName: "createdAt",
1160
- minWidth: ce.datetime,
1160
+ minWidth: fe.datetime,
1161
1161
  ellipsis: !0,
1162
1162
  tooltip: !0
1163
1163
  }, {
1164
1164
  title: "操作",
1165
1165
  slotName: "actions",
1166
- width: ce.actionsSingle,
1166
+ width: fe.actionsSingle,
1167
1167
  fixed: "right",
1168
1168
  cellClassName: "passkey-actions-cell"
1169
1169
  }];
@@ -1172,7 +1172,7 @@ const Mt = {
1172
1172
  const {
1173
1173
  data: _,
1174
1174
  error: P
1175
- } = await x().auth.passkey.list.post();
1175
+ } = await O().auth.passkey.list.post();
1176
1176
  if (l.value = !1, P || !_) {
1177
1177
  d.value = [];
1178
1178
  return;
@@ -1182,7 +1182,7 @@ const Mt = {
1182
1182
  async function B() {
1183
1183
  s.value = !0;
1184
1184
  try {
1185
- if (!await e())
1185
+ if (!await t())
1186
1186
  return;
1187
1187
  G.success("Passkey 添加成功"), await R();
1188
1188
  } catch (_) {
@@ -1197,11 +1197,11 @@ const Mt = {
1197
1197
  q();
1198
1198
  return;
1199
1199
  }
1200
- if ((P = n.value) != null && P.email && ((N = n.value) != null && N.phone)) {
1200
+ if ((P = a.value) != null && P.email && ((N = a.value) != null && N.phone)) {
1201
1201
  v.value = void 0;
1202
1202
  return;
1203
1203
  }
1204
- v.value = (F = n.value) != null && F.email ? "email" : "phone";
1204
+ v.value = (F = a.value) != null && F.email ? "email" : "phone";
1205
1205
  }
1206
1206
  function j(_) {
1207
1207
  v.value = _;
@@ -1217,16 +1217,16 @@ const Mt = {
1217
1217
  return;
1218
1218
  const {
1219
1219
  error: _
1220
- } = await x().auth.passkey.delete.post({
1220
+ } = await O().auth.passkey.delete.post({
1221
1221
  credentialId: g.value
1222
1222
  });
1223
1223
  _ || (G.success("已移除"), await R()), w();
1224
1224
  }
1225
- return ue(() => {
1225
+ return de(() => {
1226
1226
  R();
1227
1227
  }), (_, P) => {
1228
1228
  var N, F;
1229
- return h(), M("div", Mt, [p(t(J), {
1229
+ return h(), M("div", Ht, [p(n(Y), {
1230
1230
  type: "info",
1231
1231
  style: {
1232
1232
  "margin-bottom": "16px"
@@ -1234,35 +1234,35 @@ const Mt = {
1234
1234
  }, {
1235
1235
  default: o(() => [...P[2] || (P[2] = [k(" Passkey 使用设备生物识别(指纹 / 面容)登录,绑定后可在登录页一键验证身份。 ", -1)])]),
1236
1236
  _: 1
1237
- }), t(u) ? (h(), M("div", Kt, U(t(u)), 1)) : C("", !0), g.value && !f.value ? (h(), I(t(J), {
1237
+ }), n(u) ? (h(), M("div", Wt, U(n(u)), 1)) : E("", !0), g.value && !f.value ? (h(), I(n(Y), {
1238
1238
  key: 1,
1239
1239
  type: "warning",
1240
1240
  title: "移除前验证身份"
1241
- }, qe({
1241
+ }, Me({
1242
1242
  default: o(() => [P[6] || (P[6] = k(" 移除 Passkey 前请先完成身份验证。 ", -1))]),
1243
1243
  _: 2
1244
1244
  }, [m.value ? {
1245
1245
  name: "action",
1246
- fn: o(() => [p(t(pe), null, {
1246
+ fn: o(() => [p(n(me), null, {
1247
1247
  default: o(() => {
1248
1248
  var D, Z;
1249
- return [(D = t(n)) != null && D.email ? (h(), I(t(T), {
1249
+ return [(D = n(a)) != null && D.email ? (h(), I(n(T), {
1250
1250
  key: 0,
1251
1251
  size: i.size,
1252
1252
  type: "primary",
1253
- onClick: P[0] || (P[0] = (ne) => j("email"))
1253
+ onClick: P[0] || (P[0] = (ae) => j("email"))
1254
1254
  }, {
1255
1255
  default: o(() => [...P[3] || (P[3] = [k(" 邮箱验证 ", -1)])]),
1256
1256
  _: 1
1257
- }, 8, ["size"])) : C("", !0), (Z = t(n)) != null && Z.phone ? (h(), I(t(T), {
1257
+ }, 8, ["size"])) : E("", !0), (Z = n(a)) != null && Z.phone ? (h(), I(n(T), {
1258
1258
  key: 1,
1259
1259
  size: i.size,
1260
1260
  type: "primary",
1261
- onClick: P[1] || (P[1] = (ne) => j("phone"))
1261
+ onClick: P[1] || (P[1] = (ae) => j("phone"))
1262
1262
  }, {
1263
1263
  default: o(() => [...P[4] || (P[4] = [k(" 手机验证 ", -1)])]),
1264
1264
  _: 1
1265
- }, 8, ["size"])) : C("", !0), p(t(T), {
1265
+ }, 8, ["size"])) : E("", !0), p(n(T), {
1266
1266
  size: i.size,
1267
1267
  onClick: w
1268
1268
  }, {
@@ -1273,26 +1273,26 @@ const Mt = {
1273
1273
  _: 1
1274
1274
  })]),
1275
1275
  key: "0"
1276
- } : void 0]), 1024)) : C("", !0), g.value && v.value === "email" && ((N = t(n)) != null && N.email) ? (h(), I(ye, {
1276
+ } : void 0]), 1024)) : E("", !0), g.value && v.value === "email" && ((N = n(a)) != null && N.email) ? (h(), I(ge, {
1277
1277
  key: 2,
1278
1278
  size: i.size,
1279
- email: t(n).email,
1279
+ email: n(a).email,
1280
1280
  onNext: V
1281
- }, null, 8, ["size", "email"])) : C("", !0), g.value && v.value === "phone" && ((F = t(n)) != null && F.phone) ? (h(), I(ge, {
1281
+ }, null, 8, ["size", "email"])) : E("", !0), g.value && v.value === "phone" && ((F = n(a)) != null && F.phone) ? (h(), I(we, {
1282
1282
  key: 3,
1283
1283
  size: i.size,
1284
- phone: t(n).phone,
1284
+ phone: n(a).phone,
1285
1285
  onNext: V
1286
- }, null, 8, ["size", "phone"])) : C("", !0), g.value ? C("", !0) : (h(), M("div", Ft, [p(t(T), {
1286
+ }, null, 8, ["size", "phone"])) : E("", !0), g.value ? E("", !0) : (h(), M("div", Gt, [p(n(T), {
1287
1287
  type: "primary",
1288
1288
  size: i.size,
1289
1289
  loading: s.value,
1290
- disabled: !!t(u),
1290
+ disabled: !!n(u),
1291
1291
  onClick: B
1292
1292
  }, {
1293
1293
  default: o(() => [...P[7] || (P[7] = [k(" 添加 Passkey ", -1)])]),
1294
1294
  _: 1
1295
- }, 8, ["size", "loading", "disabled"])])), g.value ? C("", !0) : (h(), I(je, {
1295
+ }, 8, ["size", "loading", "disabled"])])), g.value ? E("", !0) : (h(), I(Ze, {
1296
1296
  key: 5,
1297
1297
  columns: S,
1298
1298
  data: d.value,
@@ -1309,11 +1309,11 @@ const Mt = {
1309
1309
  }) => [k(U(D.createdAt || "-"), 1)]),
1310
1310
  actions: o(({
1311
1311
  record: D
1312
- }) => [p(t(Ke), {
1312
+ }) => [p(n(He), {
1313
1313
  content: "确定移除此 Passkey?移除后将无法使用该设备登录",
1314
1314
  onOk: (Z) => K(D.credentialId)
1315
1315
  }, {
1316
- default: o(() => [p(t(T), {
1316
+ default: o(() => [p(n(T), {
1317
1317
  type: "text",
1318
1318
  status: "danger",
1319
1319
  size: i.size
@@ -1327,18 +1327,18 @@ const Mt = {
1327
1327
  }, 8, ["data", "loading"]))]);
1328
1328
  };
1329
1329
  }
1330
- }), Wt = /* @__PURE__ */ X(Ht, [["__scopeId", "data-v-08d3a331"]]), Gt = {
1330
+ }), Jt = /* @__PURE__ */ X(Yt, [["__scopeId", "data-v-08d3a331"]]), jt = {
1331
1331
  class: "BindEmail"
1332
- }, Jt = {
1332
+ }, Qt = {
1333
1333
  class: "content"
1334
- }, Yt = {
1334
+ }, Xt = {
1335
1335
  class: "sendVerifyCodeItem"
1336
- }, jt = {
1336
+ }, Zt = {
1337
1337
  class: "handle"
1338
- }, Qt = {
1338
+ }, ei = {
1339
1339
  key: 0,
1340
1340
  class: "skip"
1341
- }, Xt = /* @__PURE__ */ Y({
1341
+ }, ti = /* @__PURE__ */ J({
1342
1342
  __name: "AuthkitBindEmail",
1343
1343
  props: {
1344
1344
  size: {
@@ -1369,10 +1369,10 @@ const Mt = {
1369
1369
  }
1370
1370
  },
1371
1371
  emits: ["submit", "skip"],
1372
- setup(a, {
1372
+ setup(e, {
1373
1373
  emit: i
1374
1374
  }) {
1375
- const n = i, l = a, s = z(), d = z(!1), u = z(), e = z({
1375
+ const a = i, l = e, s = A(), d = A(!1), u = A(), t = A({
1376
1376
  email: void 0,
1377
1377
  userToken: void 0,
1378
1378
  emailVerifyId: void 0
@@ -1380,39 +1380,39 @@ const Mt = {
1380
1380
  async function y() {
1381
1381
  if (!await u.value.validateField(["email"])) {
1382
1382
  d.value = !0;
1383
- const r = await x().auth.verify.email.retry.post({
1384
- email: e.value.email,
1383
+ const r = await O().auth.verify.email.retry.post({
1384
+ email: t.value.email,
1385
1385
  purpose: "bindEmail"
1386
1386
  });
1387
- d.value = !1, r.data && (e.value.emailVerifyId = r.data.emailVerifyId), he(s.value, r);
1387
+ d.value = !1, r.data && (t.value.emailVerifyId = r.data.emailVerifyId), ye(s.value, r);
1388
1388
  }
1389
1389
  }
1390
1390
  async function g() {
1391
1391
  u.value.validate().then((v) => {
1392
- v || n("submit", {
1393
- email: e.value.email,
1394
- userToken: e.value.userToken,
1395
- emailVerifyId: e.value.emailVerifyId
1392
+ v || a("submit", {
1393
+ email: t.value.email,
1394
+ userToken: t.value.userToken,
1395
+ emailVerifyId: t.value.emailVerifyId
1396
1396
  });
1397
1397
  });
1398
1398
  }
1399
1399
  function f() {
1400
- n("skip");
1400
+ a("skip");
1401
1401
  }
1402
- return (v, r) => (h(), M("div", Gt, [p(t(J), {
1402
+ return (v, r) => (h(), M("div", jt, [p(n(Y), {
1403
1403
  type: "info",
1404
1404
  title: l.title
1405
1405
  }, {
1406
1406
  default: o(() => [k(U(l.subtitle), 1)]),
1407
1407
  _: 1
1408
- }, 8, ["title"]), A("div", Jt, [p(t(le), {
1408
+ }, 8, ["title"]), z("div", Qt, [p(n(le), {
1409
1409
  ref_key: "formRef",
1410
1410
  ref: u,
1411
- model: e.value,
1411
+ model: t.value,
1412
1412
  size: l.size,
1413
1413
  "auto-label-width": ""
1414
1414
  }, {
1415
- default: o(() => [p(t(L), {
1415
+ default: o(() => [p(n(L), {
1416
1416
  field: "email",
1417
1417
  label: "邮箱",
1418
1418
  "hide-label": "",
@@ -1424,15 +1424,15 @@ const Mt = {
1424
1424
  message: "请输入有效的邮箱"
1425
1425
  }]
1426
1426
  }, {
1427
- default: o(() => [p(t(Q), {
1428
- modelValue: e.value.email,
1429
- "onUpdate:modelValue": r[0] || (r[0] = (m) => e.value.email = m),
1427
+ default: o(() => [p(n(Q), {
1428
+ modelValue: t.value.email,
1429
+ "onUpdate:modelValue": r[0] || (r[0] = (m) => t.value.email = m),
1430
1430
  placeholder: "请输入邮箱",
1431
1431
  autocomplete: "email",
1432
1432
  type: "email"
1433
1433
  }, null, 8, ["modelValue"])]),
1434
1434
  _: 1
1435
- }), p(t(L), {
1435
+ }), p(n(L), {
1436
1436
  field: "userToken",
1437
1437
  label: "验证码",
1438
1438
  "hide-label": "",
@@ -1441,12 +1441,12 @@ const Mt = {
1441
1441
  message: "请输入验证码"
1442
1442
  }]
1443
1443
  }, {
1444
- default: o(() => [A("div", Yt, [p(t(Q), {
1445
- modelValue: e.value.userToken,
1446
- "onUpdate:modelValue": r[1] || (r[1] = (m) => e.value.userToken = m),
1444
+ default: o(() => [z("div", Xt, [p(n(Q), {
1445
+ modelValue: t.value.userToken,
1446
+ "onUpdate:modelValue": r[1] || (r[1] = (m) => t.value.userToken = m),
1447
1447
  placeholder: "请输入验证码",
1448
1448
  autocomplete: "one-time-code"
1449
- }, null, 8, ["modelValue"]), p(ve, {
1449
+ }, null, 8, ["modelValue"]), p(he, {
1450
1450
  ref_key: "SendVerifyCodeRef",
1451
1451
  ref: s,
1452
1452
  size: l.size,
@@ -1457,7 +1457,7 @@ const Mt = {
1457
1457
  onSend: y
1458
1458
  }, null, 8, ["size", "loading"])])]),
1459
1459
  _: 1
1460
- }), A("div", jt, [p(t(T), {
1460
+ }), z("div", Zt, [p(n(T), {
1461
1461
  type: "primary",
1462
1462
  loading: l.loading,
1463
1463
  long: "",
@@ -1468,14 +1468,14 @@ const Mt = {
1468
1468
  _: 1
1469
1469
  }, 8, ["loading", "size"])])]),
1470
1470
  _: 1
1471
- }, 8, ["model", "size"])]), l.showSkip ? (h(), M("div", Qt, [p(t(Ie), {
1471
+ }, 8, ["model", "size"])]), l.showSkip ? (h(), M("div", ei, [p(n(Ce), {
1472
1472
  onClick: f
1473
1473
  }, {
1474
1474
  default: o(() => [...r[2] || (r[2] = [k("稍后绑定", -1)])]),
1475
1475
  _: 1
1476
- })])) : C("", !0)]));
1476
+ })])) : E("", !0)]));
1477
1477
  }
1478
- }), Zt = /* @__PURE__ */ X(Xt, [["__scopeId", "data-v-00ac3b6a"]]), ei = /* @__PURE__ */ Y({
1478
+ }), ii = /* @__PURE__ */ X(ti, [["__scopeId", "data-v-00ac3b6a"]]), ni = /* @__PURE__ */ J({
1479
1479
  __name: "AuthkitEmailBinding",
1480
1480
  props: {
1481
1481
  size: {
@@ -1483,12 +1483,12 @@ const Mt = {
1483
1483
  required: !0
1484
1484
  }
1485
1485
  },
1486
- setup(a) {
1486
+ setup(e) {
1487
1487
  const {
1488
1488
  userProfile: i,
1489
- loading: n,
1489
+ loading: a,
1490
1490
  fetchUserProfile: l
1491
- } = ae(), s = z("hidden"), d = z(!1), u = a, e = $(() => {
1491
+ } = ne(), s = A("hidden"), d = A(!1), u = e, t = $(() => {
1492
1492
  var v;
1493
1493
  return !!((v = i.value) != null && v.email) && d.value;
1494
1494
  });
@@ -1496,32 +1496,32 @@ const Mt = {
1496
1496
  s.value = v;
1497
1497
  }
1498
1498
  async function g(v) {
1499
- n.value = !0;
1500
- const r = e.value ? x().auth.users.update.myEmail.post({
1499
+ a.value = !0;
1500
+ const r = t.value ? O().auth.users.update.myEmail.post({
1501
1501
  email: v.email,
1502
1502
  userToken: v.userToken,
1503
1503
  emailVerifyId: v.emailVerifyId
1504
- }) : x().auth.auth.bind.email.post({
1504
+ }) : O().auth.auth.bind.email.post({
1505
1505
  email: v.email,
1506
1506
  userToken: v.userToken,
1507
1507
  emailVerifyId: v.emailVerifyId
1508
1508
  }), {
1509
1509
  error: m
1510
1510
  } = await r;
1511
- n.value = !1, m || (G.success(e.value ? "更改成功" : "绑定成功"), s.value = "hidden", d.value = !1, l());
1511
+ a.value = !1, m || (G.success(t.value ? "更改成功" : "绑定成功"), s.value = "hidden", d.value = !1, l());
1512
1512
  }
1513
1513
  function f() {
1514
1514
  d.value = !0, s.value = "update";
1515
1515
  }
1516
- return ue(() => {
1516
+ return de(() => {
1517
1517
  i.value || l();
1518
1518
  }), (v, r) => {
1519
1519
  var m, S, R;
1520
- return h(), M(ie, null, [(m = t(i)) != null && m.email && s.value === "hidden" ? (h(), I(t(J), {
1520
+ return h(), M(ie, null, [(m = n(i)) != null && m.email && s.value === "hidden" ? (h(), I(n(Y), {
1521
1521
  key: 0,
1522
1522
  title: "更改邮箱"
1523
1523
  }, {
1524
- action: o(() => [p(t(T), {
1524
+ action: o(() => [p(n(T), {
1525
1525
  size: u.size,
1526
1526
  type: "primary",
1527
1527
  onClick: r[0] || (r[0] = (B) => y("verify"))
@@ -1529,42 +1529,42 @@ const Mt = {
1529
1529
  default: o(() => [...r[1] || (r[1] = [k("更改邮箱", -1)])]),
1530
1530
  _: 1
1531
1531
  }, 8, ["size"])]),
1532
- default: o(() => [k(U(`您绑定的邮箱为 ${t(Ce)(t(i).email)}`) + " ", 1)]),
1532
+ default: o(() => [k(U(`您绑定的邮箱为 ${n(Re)(n(i).email)}`) + " ", 1)]),
1533
1533
  _: 1
1534
- })) : C("", !0), !((S = t(i)) != null && S.email) || s.value === "update" ? (h(), I(Zt, {
1534
+ })) : E("", !0), !((S = n(i)) != null && S.email) || s.value === "update" ? (h(), I(ii, {
1535
1535
  key: 1,
1536
- loading: t(n),
1536
+ loading: n(a),
1537
1537
  size: u.size,
1538
- title: e.value ? "更改邮箱" : "绑定邮箱",
1539
- subtitle: e.value ? "请输入新的邮箱并完成验证" : "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录",
1540
- "submit-text": e.value ? "更改邮箱" : "绑定邮箱",
1538
+ title: t.value ? "更改邮箱" : "绑定邮箱",
1539
+ subtitle: t.value ? "请输入新的邮箱并完成验证" : "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录",
1540
+ "submit-text": t.value ? "更改邮箱" : "绑定邮箱",
1541
1541
  onSubmit: g
1542
- }, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : C("", !0), s.value === "verify" ? (h(), I(ye, {
1542
+ }, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : E("", !0), s.value === "verify" ? (h(), I(ge, {
1543
1543
  key: 2,
1544
1544
  size: u.size,
1545
- email: (R = t(i)) == null ? void 0 : R.email,
1545
+ email: (R = n(i)) == null ? void 0 : R.email,
1546
1546
  onNext: f
1547
- }, null, 8, ["size", "email"])) : C("", !0)], 64);
1547
+ }, null, 8, ["size", "email"])) : E("", !0)], 64);
1548
1548
  };
1549
1549
  }
1550
- }), ti = {
1550
+ }), ai = {
1551
1551
  class: "BindPhone"
1552
- }, ii = {
1552
+ }, oi = {
1553
1553
  class: "header"
1554
- }, ai = {
1554
+ }, si = {
1555
1555
  class: "title"
1556
- }, ni = {
1556
+ }, li = {
1557
1557
  class: "subtitle"
1558
- }, oi = {
1558
+ }, ri = {
1559
1559
  class: "content"
1560
- }, si = {
1560
+ }, ui = {
1561
1561
  class: "sendVerifyCodeItem"
1562
- }, li = {
1562
+ }, di = {
1563
1563
  class: "handle"
1564
- }, ri = {
1564
+ }, ci = {
1565
1565
  key: 0,
1566
1566
  class: "skip"
1567
- }, ui = /* @__PURE__ */ Y({
1567
+ }, fi = /* @__PURE__ */ J({
1568
1568
  __name: "AuthkitBindPhone",
1569
1569
  props: {
1570
1570
  size: {
@@ -1594,42 +1594,42 @@ const Mt = {
1594
1594
  }
1595
1595
  },
1596
1596
  emits: ["submit", "skip"],
1597
- setup(a, {
1597
+ setup(e, {
1598
1598
  emit: i
1599
1599
  }) {
1600
- const n = i, l = a, s = z(), d = z(!1), u = z(), e = z({
1600
+ const a = i, l = e, s = A(), d = A(!1), u = A(), t = A({
1601
1601
  phone: void 0,
1602
1602
  code: void 0
1603
1603
  });
1604
1604
  async function y() {
1605
1605
  if (!await u.value.validateField(["phone"])) {
1606
1606
  d.value = !0;
1607
- const r = await x().auth.verify.sms.send.post({
1608
- phone: e.value.phone,
1607
+ const r = await O().auth.verify.sms.send.post({
1608
+ phone: t.value.phone,
1609
1609
  purpose: "bindPhone"
1610
1610
  });
1611
- d.value = !1, he(s.value, r);
1611
+ d.value = !1, ye(s.value, r);
1612
1612
  }
1613
1613
  }
1614
1614
  async function g() {
1615
1615
  u.value.validate().then((v) => {
1616
- v || n("submit", {
1617
- phone: e.value.phone,
1618
- code: e.value.code
1616
+ v || a("submit", {
1617
+ phone: t.value.phone,
1618
+ code: t.value.code
1619
1619
  });
1620
1620
  });
1621
1621
  }
1622
1622
  function f() {
1623
- n("skip");
1623
+ a("skip");
1624
1624
  }
1625
- return (v, r) => (h(), M("div", ti, [A("div", ii, [A("h3", ai, U(l.title), 1), A("p", ni, U(l.subtitle), 1)]), A("div", oi, [p(t(le), {
1625
+ return (v, r) => (h(), M("div", ai, [z("div", oi, [z("h3", si, U(l.title), 1), z("p", li, U(l.subtitle), 1)]), z("div", ri, [p(n(le), {
1626
1626
  ref_key: "formRef",
1627
1627
  ref: u,
1628
- model: e.value,
1628
+ model: t.value,
1629
1629
  size: l.size,
1630
1630
  "auto-label-width": ""
1631
1631
  }, {
1632
- default: o(() => [p(t(L), {
1632
+ default: o(() => [p(n(L), {
1633
1633
  field: "phone",
1634
1634
  label: "手机号",
1635
1635
  "hide-label": "",
@@ -1641,15 +1641,15 @@ const Mt = {
1641
1641
  message: "请输入有效的手机号"
1642
1642
  }]
1643
1643
  }, {
1644
- default: o(() => [p(t(Q), {
1645
- modelValue: e.value.phone,
1646
- "onUpdate:modelValue": r[0] || (r[0] = (m) => e.value.phone = m),
1644
+ default: o(() => [p(n(Q), {
1645
+ modelValue: t.value.phone,
1646
+ "onUpdate:modelValue": r[0] || (r[0] = (m) => t.value.phone = m),
1647
1647
  placeholder: "请输入手机号",
1648
1648
  autocomplete: "tel",
1649
1649
  type: "tel"
1650
1650
  }, null, 8, ["modelValue"])]),
1651
1651
  _: 1
1652
- }), p(t(L), {
1652
+ }), p(n(L), {
1653
1653
  field: "code",
1654
1654
  label: "验证码",
1655
1655
  "hide-label": "",
@@ -1658,12 +1658,12 @@ const Mt = {
1658
1658
  message: "请输入验证码"
1659
1659
  }]
1660
1660
  }, {
1661
- default: o(() => [A("div", si, [p(t(Q), {
1662
- modelValue: e.value.code,
1663
- "onUpdate:modelValue": r[1] || (r[1] = (m) => e.value.code = m),
1661
+ default: o(() => [z("div", ui, [p(n(Q), {
1662
+ modelValue: t.value.code,
1663
+ "onUpdate:modelValue": r[1] || (r[1] = (m) => t.value.code = m),
1664
1664
  placeholder: "请输入验证码",
1665
1665
  autocomplete: "one-time-code"
1666
- }, null, 8, ["modelValue"]), p(ve, {
1666
+ }, null, 8, ["modelValue"]), p(he, {
1667
1667
  ref_key: "SendVerifyCodeRef",
1668
1668
  ref: s,
1669
1669
  size: l.size,
@@ -1674,7 +1674,7 @@ const Mt = {
1674
1674
  onSend: y
1675
1675
  }, null, 8, ["size", "loading"])])]),
1676
1676
  _: 1
1677
- }), A("div", li, [p(t(T), {
1677
+ }), z("div", di, [p(n(T), {
1678
1678
  type: "primary",
1679
1679
  loading: l.loading,
1680
1680
  long: "",
@@ -1685,14 +1685,14 @@ const Mt = {
1685
1685
  _: 1
1686
1686
  }, 8, ["loading", "size"])])]),
1687
1687
  _: 1
1688
- }, 8, ["model", "size"])]), l.showSkip ? (h(), M("div", ri, [p(t(Ie), {
1688
+ }, 8, ["model", "size"])]), l.showSkip ? (h(), M("div", ci, [p(n(Ce), {
1689
1689
  onClick: f
1690
1690
  }, {
1691
1691
  default: o(() => [...r[2] || (r[2] = [k("稍后绑定", -1)])]),
1692
1692
  _: 1
1693
- })])) : C("", !0)]));
1693
+ })])) : E("", !0)]));
1694
1694
  }
1695
- }), di = /* @__PURE__ */ X(ui, [["__scopeId", "data-v-1db8897d"]]), ci = /* @__PURE__ */ Y({
1695
+ }), pi = /* @__PURE__ */ X(fi, [["__scopeId", "data-v-1db8897d"]]), mi = /* @__PURE__ */ J({
1696
1696
  __name: "AuthkitPhoneBinding",
1697
1697
  props: {
1698
1698
  size: {
@@ -1700,12 +1700,12 @@ const Mt = {
1700
1700
  required: !0
1701
1701
  }
1702
1702
  },
1703
- setup(a) {
1703
+ setup(e) {
1704
1704
  const {
1705
1705
  userProfile: i,
1706
- loading: n,
1706
+ loading: a,
1707
1707
  fetchUserProfile: l
1708
- } = ae(), s = z("hidden"), d = z(!1), u = a, e = $(() => {
1708
+ } = ne(), s = A("hidden"), d = A(!1), u = e, t = $(() => {
1709
1709
  var m;
1710
1710
  const r = ((m = i.value) == null ? void 0 : m.phone) || "";
1711
1711
  return r.length < 7 ? r : `${r.slice(0, 3)}****${r.slice(-4)}`;
@@ -1718,30 +1718,30 @@ const Mt = {
1718
1718
  s.value = r, r === "update" && !((m = i.value) != null && m.phone) && (d.value = !1);
1719
1719
  }
1720
1720
  async function f(r) {
1721
- n.value = !0;
1722
- const m = y.value ? x().auth.users.update.myPhone.post({
1721
+ a.value = !0;
1722
+ const m = y.value ? O().auth.users.update.myPhone.post({
1723
1723
  phone: r.phone,
1724
1724
  code: r.code
1725
- }) : x().auth.auth.bind.phone.post({
1725
+ }) : O().auth.auth.bind.phone.post({
1726
1726
  phone: r.phone,
1727
1727
  code: r.code
1728
1728
  }), {
1729
1729
  error: S
1730
1730
  } = await m;
1731
- n.value = !1, S || (G.success(y.value ? "更改成功" : "绑定成功"), s.value = "hidden", d.value = !1, l());
1731
+ a.value = !1, S || (G.success(y.value ? "更改成功" : "绑定成功"), s.value = "hidden", d.value = !1, l());
1732
1732
  }
1733
1733
  function v() {
1734
1734
  d.value = !0, s.value = "update";
1735
1735
  }
1736
- return ue(() => {
1736
+ return de(() => {
1737
1737
  i.value || l();
1738
1738
  }), (r, m) => {
1739
1739
  var S, R, B;
1740
- return h(), M(ie, null, [!((S = t(i)) != null && S.phone) && s.value === "hidden" ? (h(), I(t(J), {
1740
+ return h(), M(ie, null, [!((S = n(i)) != null && S.phone) && s.value === "hidden" ? (h(), I(n(Y), {
1741
1741
  key: 0,
1742
1742
  title: "绑定手机号"
1743
1743
  }, {
1744
- action: o(() => [p(t(T), {
1744
+ action: o(() => [p(n(T), {
1745
1745
  size: u.size,
1746
1746
  type: "primary",
1747
1747
  onClick: m[0] || (m[0] = (K) => g("update"))
@@ -1751,11 +1751,11 @@ const Mt = {
1751
1751
  }, 8, ["size"])]),
1752
1752
  default: o(() => [m[3] || (m[3] = k(" 您还未绑定手机号,请点击绑定手机号。 ", -1))]),
1753
1753
  _: 1
1754
- })) : C("", !0), (R = t(i)) != null && R.phone && s.value === "hidden" ? (h(), I(t(J), {
1754
+ })) : E("", !0), (R = n(i)) != null && R.phone && s.value === "hidden" ? (h(), I(n(Y), {
1755
1755
  key: 1,
1756
1756
  title: "已绑定手机号"
1757
1757
  }, {
1758
- action: o(() => [p(t(T), {
1758
+ action: o(() => [p(n(T), {
1759
1759
  size: u.size,
1760
1760
  type: "primary",
1761
1761
  onClick: m[1] || (m[1] = (K) => g("verify"))
@@ -1763,92 +1763,123 @@ const Mt = {
1763
1763
  default: o(() => [...m[4] || (m[4] = [k("更改手机号", -1)])]),
1764
1764
  _: 1
1765
1765
  }, 8, ["size"])]),
1766
- default: o(() => [k(U(`您绑定的手机号为 ${e.value}`) + " ", 1)]),
1766
+ default: o(() => [k(U(`您绑定的手机号为 ${t.value}`) + " ", 1)]),
1767
1767
  _: 1
1768
- })) : C("", !0), s.value === "update" ? (h(), I(di, {
1768
+ })) : E("", !0), s.value === "update" ? (h(), I(pi, {
1769
1769
  key: 2,
1770
- loading: t(n),
1770
+ loading: n(a),
1771
1771
  size: u.size,
1772
1772
  title: y.value ? "更改手机号" : "绑定手机号",
1773
1773
  subtitle: y.value ? "请输入新的手机号并完成短信验证" : "请绑定手机号以完成账号设置",
1774
1774
  "submit-text": y.value ? "更改手机号" : "绑定手机号",
1775
1775
  onSubmit: f
1776
- }, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : C("", !0), s.value === "verify" ? (h(), I(ge, {
1776
+ }, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : E("", !0), s.value === "verify" ? (h(), I(we, {
1777
1777
  key: 3,
1778
1778
  size: u.size,
1779
- phone: ((B = t(i)) == null ? void 0 : B.phone) || "",
1779
+ phone: ((B = n(i)) == null ? void 0 : B.phone) || "",
1780
1780
  onNext: v
1781
- }, null, 8, ["size", "phone"])) : C("", !0)], 64);
1781
+ }, null, 8, ["size", "phone"])) : E("", !0)], 64);
1782
1782
  };
1783
1783
  }
1784
1784
  });
1785
- function fi() {
1785
+ function vi() {
1786
1786
  var i;
1787
1787
  return typeof window > "u" ? "" : ((i = new URLSearchParams(window.location.search).get("inviteCode")) == null ? void 0 : i.trim()) || "";
1788
1788
  }
1789
+ const ze = ["token", "refreshToken", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider", "expiresIn"], ue = "auth_redirect";
1790
+ function hi(e) {
1791
+ return ze.some((i) => e.searchParams.has(i));
1792
+ }
1793
+ function gn(e) {
1794
+ return ze.forEach((i) => e.searchParams.delete(i)), `${e.pathname}${e.search}${e.hash}`;
1795
+ }
1789
1796
  function xe() {
1790
- const {
1791
- oauthCallbackUrl: a
1792
- } = Re().config;
1793
- return a || `${window.location.origin}/`;
1797
+ return new URL(window.location.href);
1798
+ }
1799
+ function Ne() {
1800
+ const e = xe();
1801
+ return ze.forEach((i) => e.searchParams.delete(i)), `${e.origin}${e.pathname}${e.search}${e.hash}`;
1802
+ }
1803
+ function yi() {
1804
+ return `${window.location.origin}/`;
1805
+ }
1806
+ function gi() {
1807
+ if (typeof window > "u")
1808
+ return;
1809
+ const e = xe();
1810
+ if (hi(e))
1811
+ return;
1812
+ const i = `${e.pathname}${e.search}${e.hash}`;
1813
+ sessionStorage.setItem(ue, i);
1814
+ }
1815
+ function wn(e) {
1816
+ if (!e || typeof window > "u")
1817
+ return null;
1818
+ const i = sessionStorage.getItem(ue);
1819
+ if (sessionStorage.removeItem(ue), !i)
1820
+ return null;
1821
+ const a = window.location.pathname + window.location.search + window.location.hash;
1822
+ return i === a ? null : i;
1794
1823
  }
1795
- function pi() {
1796
- const a = window.location.pathname + window.location.search + window.location.hash, i = new URLSearchParams(window.location.search);
1797
- !i.has("token") && !i.has("error") && !i.has("bindSuccess") && sessionStorage.setItem("auth_redirect", a);
1824
+ function bn(e = "/") {
1825
+ if (typeof window > "u")
1826
+ return e;
1827
+ const i = sessionStorage.getItem(ue);
1828
+ return sessionStorage.removeItem(ue), i || e;
1798
1829
  }
1799
- async function de(a, i) {
1800
- const n = Re().config.appId;
1801
- if (!n) {
1802
- console.error(`${a} OAuth 失败: appId 未配置`);
1830
+ async function ce(e, i) {
1831
+ const a = Xe().config.appId;
1832
+ if (!a) {
1833
+ console.error(`${e} OAuth 失败: appId 未配置`);
1803
1834
  return;
1804
1835
  }
1805
- const l = xe(), s = (i == null ? void 0 : i.inviteCode) || fi() || void 0, d = {
1806
- appId: n,
1836
+ gi();
1837
+ const l = Ne(), s = (i == null ? void 0 : i.inviteCode) || vi() || void 0, d = {
1838
+ appId: a,
1807
1839
  inviteCode: s,
1808
1840
  redirectUri: l,
1809
1841
  acceptedTerms: (i == null ? void 0 : i.acceptedTerms) === !0 ? !0 : void 0
1810
- };
1811
- pi();
1812
- const u = {
1813
- github: () => x().auth.oauth.github.login.get(d),
1814
- google: () => x().auth.oauth.google.login.get(d),
1815
- microsoft: () => x().auth.oauth.microsoft.login.get(d),
1816
- wechat: () => x().auth.oauth.wechat.login.get(d)
1842
+ }, u = {
1843
+ github: () => O().auth.oauth.github.login.get(d),
1844
+ google: () => O().auth.oauth.google.login.get(d),
1845
+ microsoft: () => O().auth.oauth.microsoft.login.get(d),
1846
+ wechat: () => O().auth.oauth.wechat.login.get(d)
1817
1847
  }, {
1818
- data: e,
1848
+ data: t,
1819
1849
  error: y
1820
- } = await u[a]();
1850
+ } = await u[e]();
1821
1851
  if (!y) {
1822
- if (e != null && e.redirectUri) {
1823
- window.location.href = e.redirectUri;
1852
+ if (t != null && t.redirectUri) {
1853
+ window.location.href = t.redirectUri;
1824
1854
  return;
1825
1855
  }
1826
- console.error(`${a} OAuth 重定向URL为空`);
1856
+ console.error(`${e} OAuth 重定向URL为空`);
1827
1857
  }
1828
1858
  }
1829
- function mi(a) {
1830
- de("github", a);
1859
+ function wi(e) {
1860
+ ce("github", e);
1831
1861
  }
1832
- function vi(a) {
1833
- de("google", a);
1862
+ function bi(e) {
1863
+ ce("google", e);
1834
1864
  }
1835
- function hi(a) {
1836
- de("microsoft", a);
1865
+ function _i(e) {
1866
+ ce("microsoft", e);
1837
1867
  }
1838
- function yi(a) {
1839
- de("wechat", a);
1868
+ function ki(e) {
1869
+ ce("wechat", e);
1840
1870
  }
1841
- function gi() {
1871
+ function Ai() {
1842
1872
  return {
1843
- githubAuth: mi,
1844
- googleAuth: vi,
1845
- microsoftAuth: hi,
1846
- wechatAuth: yi,
1847
- startOauth: de,
1848
- getOauthCallbackUrl: xe
1873
+ githubAuth: wi,
1874
+ googleAuth: bi,
1875
+ microsoftAuth: _i,
1876
+ wechatAuth: ki,
1877
+ startOauth: ce,
1878
+ buildLoginOauthRedirectUri: Ne,
1879
+ buildBindOauthRedirectUri: yi
1849
1880
  };
1850
1881
  }
1851
- const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
1882
+ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
1852
1883
  __name: "AuthProviderIcon",
1853
1884
  props: {
1854
1885
  icon: {},
@@ -1862,47 +1893,47 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
1862
1893
  default: ""
1863
1894
  }
1864
1895
  },
1865
- setup(a) {
1866
- const i = a;
1867
- return (n, l) => t(Xe)(i.icon) ? (h(), I(t(Qe), {
1896
+ setup(e) {
1897
+ const i = e;
1898
+ return (a, l) => n(tt)(i.icon) ? (h(), I(n(et), {
1868
1899
  key: 0,
1869
1900
  icon: i.icon,
1870
1901
  width: i.size,
1871
1902
  height: i.size,
1872
- class: ze(i.class)
1903
+ class: Pe(i.class)
1873
1904
  }, null, 8, ["icon", "width", "height", "class"])) : i.icon ? (h(), M("img", {
1874
1905
  key: 1,
1875
1906
  src: i.icon,
1876
1907
  alt: i.alt,
1877
1908
  width: i.size,
1878
1909
  height: i.size,
1879
- class: ze(["auth-provider-icon__image", i.class])
1880
- }, null, 10, wi)) : C("", !0);
1910
+ class: Pe(["auth-provider-icon__image", i.class])
1911
+ }, null, 10, zi)) : E("", !0);
1881
1912
  }
1882
- }), _i = /* @__PURE__ */ X(bi, [["__scopeId", "data-v-1d09c1ef"]]), re = {
1913
+ }), Ii = /* @__PURE__ */ X(Pi, [["__scopeId", "data-v-1d09c1ef"]]), re = {
1883
1914
  github: "selfhst:github",
1884
1915
  google: "selfhst:google",
1885
1916
  microsoft: "selfhst:microsoft",
1886
1917
  wechat: "selfhst:wechat"
1887
- }, ki = "selfhst:ksuite-kpaste", zi = 32, Ai = 2, fa = zi + Ai * 2, pa = 12, Pi = 24, fe = {
1918
+ }, Ei = "selfhst:ksuite-kpaste", Ci = 32, Ri = 2, _n = Ci + Ri * 2, kn = 12, Si = 24, pe = {
1888
1919
  github: "GitHub",
1889
1920
  google: "Google",
1890
1921
  microsoft: "Microsoft",
1891
1922
  wechat: "微信"
1892
- }, Ii = {
1923
+ }, Vi = {
1893
1924
  class: "oauth-binding-account"
1894
- }, Ci = {
1925
+ }, $i = {
1895
1926
  key: 1,
1896
1927
  class: "oauth-binding-account__icon"
1897
- }, Ei = {
1928
+ }, Ti = {
1898
1929
  class: "oauth-binding-account__info"
1899
- }, Ri = {
1930
+ }, Ui = {
1900
1931
  class: "oauth-binding-account__provider"
1901
- }, Si = {
1932
+ }, Oi = {
1902
1933
  class: "oauth-binding-account__name"
1903
- }, Vi = {
1934
+ }, xi = {
1904
1935
  class: "oauth-binding-verify-actions"
1905
- }, $i = /* @__PURE__ */ Y({
1936
+ }, Ni = /* @__PURE__ */ J({
1906
1937
  __name: "AuthkitOAuthBinding",
1907
1938
  props: {
1908
1939
  provider: {
@@ -1918,28 +1949,28 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
1918
1949
  required: !0
1919
1950
  }
1920
1951
  },
1921
- setup(a) {
1952
+ setup(e) {
1922
1953
  const {
1923
1954
  config: i
1924
- } = Ee(), n = a, {
1955
+ } = Se(), a = e, {
1925
1956
  userProfile: l,
1926
1957
  fetchUserProfile: s
1927
- } = ae(), {
1958
+ } = ne(), {
1928
1959
  appsData: d
1929
- } = Se(), {
1930
- getOauthCallbackUrl: u
1931
- } = gi(), e = z("hidden"), y = z(), g = z(!1);
1960
+ } = Ve(), {
1961
+ buildBindOauthRedirectUri: u
1962
+ } = Ai(), t = A("hidden"), y = A(), g = A(!1);
1932
1963
  let f;
1933
1964
  const v = $(() => {
1934
1965
  var c;
1935
- return ((c = l.value) == null ? void 0 : c[n.provider]) || null;
1966
+ return ((c = l.value) == null ? void 0 : c[a.provider]) || null;
1936
1967
  }), r = $(() => {
1937
1968
  const c = v.value;
1938
- return c ? c.login || c.name || c.nickname || c.displayName || c.userPrincipalName || c.email || c.mail || c.openid || n.label : "";
1969
+ return c ? c.login || c.name || c.nickname || c.displayName || c.userPrincipalName || c.email || c.mail || c.openid || a.label : "";
1939
1970
  }), m = $(() => {
1940
1971
  const c = v.value;
1941
1972
  return (c == null ? void 0 : c.avatar_url) || (c == null ? void 0 : c.picture) || (c == null ? void 0 : c.headimgurl) || "";
1942
- }), S = $(() => re[n.provider]), R = $(() => {
1973
+ }), S = $(() => re[a.provider]), R = $(() => {
1943
1974
  const c = d.value.authMethods;
1944
1975
  return c.signUp.email || c.login.emailPassword || c.login.emailCode;
1945
1976
  }), B = $(() => {
@@ -1954,28 +1985,28 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
1954
1985
  }), V = $(() => {
1955
1986
  const c = [];
1956
1987
  return K.value && c.push("email"), j.value && c.push("phone"), c;
1957
- }), w = $(() => R.value || B.value), q = $(() => e.value !== "hidden" && V.value.length > 1 && !y.value), _ = $(() => {
1988
+ }), w = $(() => R.value || B.value), q = $(() => t.value !== "hidden" && V.value.length > 1 && !y.value), _ = $(() => {
1958
1989
  var c;
1959
- return e.value !== "hidden" && y.value === "email" && !!((c = l.value) != null && c.email);
1990
+ return t.value !== "hidden" && y.value === "email" && !!((c = l.value) != null && c.email);
1960
1991
  }), P = $(() => {
1961
1992
  var c;
1962
- return e.value !== "hidden" && y.value === "phone" && !!((c = l.value) != null && c.phone);
1963
- }), N = $(() => e.value === "unbind" ? "解绑" : "绑定");
1993
+ return t.value !== "hidden" && y.value === "phone" && !!((c = l.value) != null && c.phone);
1994
+ }), N = $(() => t.value === "unbind" ? "解绑" : "绑定");
1964
1995
  function F(c) {
1965
1996
  if (c === "hidden") {
1966
- e.value = c, y.value = void 0;
1997
+ t.value = c, y.value = void 0;
1967
1998
  return;
1968
1999
  }
1969
2000
  if (!w.value) {
1970
- c === "bind" && Z(), c === "unbind" && ne();
2001
+ c === "bind" && Z(), c === "unbind" && ae();
1971
2002
  return;
1972
2003
  }
1973
- const E = V.value;
1974
- if (E.length === 0) {
2004
+ const C = V.value;
2005
+ if (C.length === 0) {
1975
2006
  G.error("请先绑定应用已开启的邮箱或手机号后再操作第三方账号");
1976
2007
  return;
1977
2008
  }
1978
- e.value = c, y.value = E.length === 1 ? E[0] : void 0;
2009
+ t.value = c, y.value = C.length === 1 ? C[0] : void 0;
1979
2010
  }
1980
2011
  function D(c) {
1981
2012
  y.value = c;
@@ -1983,142 +2014,142 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
1983
2014
  async function Z() {
1984
2015
  const c = i.appId;
1985
2016
  if (!c) {
1986
- console.error(`${n.label} OAuth 失败: appId 未配置`);
2017
+ console.error(`${a.label} OAuth 失败: appId 未配置`);
1987
2018
  return;
1988
2019
  }
1989
- const E = u(), H = x().auth, oe = {
2020
+ const C = u(), H = O().auth, oe = {
1990
2021
  github: () => H.oauth.github.login.get({
1991
2022
  appId: c,
1992
2023
  mode: "bind",
1993
- redirectUri: E
2024
+ redirectUri: C
1994
2025
  }),
1995
2026
  google: () => H.oauth.google.login.get({
1996
2027
  appId: c,
1997
2028
  mode: "bind",
1998
- redirectUri: E
2029
+ redirectUri: C
1999
2030
  }),
2000
2031
  microsoft: () => H.oauth.microsoft.login.get({
2001
2032
  appId: c,
2002
2033
  mode: "bind",
2003
- redirectUri: E
2034
+ redirectUri: C
2004
2035
  }),
2005
2036
  wechat: () => H.oauth.wechat.login.get({
2006
2037
  appId: c,
2007
2038
  mode: "bind",
2008
- redirectUri: E
2039
+ redirectUri: C
2009
2040
  })
2010
2041
  }, {
2011
2042
  data: te,
2012
- error: Oe
2013
- } = await oe[n.provider]();
2014
- Oe || !(te != null && te.redirectUri) || (g.value = !0, window.open(te.redirectUri, "_blank"));
2043
+ error: De
2044
+ } = await oe[a.provider]();
2045
+ De || !(te != null && te.redirectUri) || (g.value = !0, window.open(te.redirectUri, "_blank"));
2015
2046
  }
2016
- async function ne() {
2047
+ async function ae() {
2017
2048
  const {
2018
2049
  error: c
2019
- } = await x().auth.users.unbind.oauth.post({
2020
- provider: n.provider
2050
+ } = await O().auth.users.unbind.oauth.post({
2051
+ provider: a.provider
2021
2052
  });
2022
- c || (G.success("解绑成功"), e.value = "hidden", s());
2053
+ c || (G.success("解绑成功"), t.value = "hidden", s());
2023
2054
  }
2024
- function O() {
2025
- e.value === "bind" && (e.value = "hidden", Z()), e.value === "unbind" && ne();
2055
+ function x() {
2056
+ t.value === "bind" && (t.value = "hidden", Z()), t.value === "unbind" && ae();
2026
2057
  }
2027
2058
  function b() {
2028
2059
  g.value && s();
2029
2060
  }
2030
- return ue(() => {
2061
+ return de(() => {
2031
2062
  l.value || s(), f = setInterval(b, 1e3);
2032
- }), ke(() => {
2063
+ }), Ae(() => {
2033
2064
  f && clearInterval(f);
2034
- }), (c, E) => {
2065
+ }), (c, C) => {
2035
2066
  var H, oe;
2036
- return h(), M(ie, null, [!v.value && e.value === "hidden" ? (h(), I(t(J), {
2067
+ return h(), M(ie, null, [!v.value && t.value === "hidden" ? (h(), I(n(Y), {
2037
2068
  key: 0,
2038
- title: `绑定${n.label}`
2069
+ title: `绑定${a.label}`
2039
2070
  }, {
2040
- action: o(() => [p(t(T), {
2041
- size: n.size,
2071
+ action: o(() => [p(n(T), {
2072
+ size: a.size,
2042
2073
  type: "primary",
2043
- onClick: E[0] || (E[0] = (te) => F("bind"))
2074
+ onClick: C[0] || (C[0] = (te) => F("bind"))
2044
2075
  }, {
2045
- default: o(() => [k(" 绑定" + U(n.label), 1)]),
2076
+ default: o(() => [k(" 绑定" + U(a.label), 1)]),
2046
2077
  _: 1
2047
2078
  }, 8, ["size"])]),
2048
- default: o(() => [k(" 您还未绑定" + U(n.label) + "账号,请点击绑定。 ", 1)]),
2079
+ default: o(() => [k(" 您还未绑定" + U(a.label) + "账号,请点击绑定。 ", 1)]),
2049
2080
  _: 1
2050
- }, 8, ["title"])) : C("", !0), v.value && e.value === "hidden" ? (h(), I(t(J), {
2081
+ }, 8, ["title"])) : E("", !0), v.value && t.value === "hidden" ? (h(), I(n(Y), {
2051
2082
  key: 1,
2052
- title: `解绑${n.label}`
2083
+ title: `解绑${a.label}`
2053
2084
  }, {
2054
- action: o(() => [p(t(T), {
2055
- size: n.size,
2085
+ action: o(() => [p(n(T), {
2086
+ size: a.size,
2056
2087
  type: "primary",
2057
- onClick: E[1] || (E[1] = (te) => F("unbind"))
2088
+ onClick: C[1] || (C[1] = (te) => F("unbind"))
2058
2089
  }, {
2059
- default: o(() => [k(" 解绑" + U(n.label), 1)]),
2090
+ default: o(() => [k(" 解绑" + U(a.label), 1)]),
2060
2091
  _: 1
2061
2092
  }, 8, ["size"])]),
2062
- default: o(() => [A("div", Ii, [m.value ? (h(), I(t(Pe), {
2093
+ default: o(() => [z("div", Vi, [m.value ? (h(), I(n(Ee), {
2063
2094
  key: 0,
2064
2095
  class: "oauth-binding-account__avatar",
2065
2096
  "image-url": m.value,
2066
2097
  size: 42
2067
- }, null, 8, ["image-url"])) : (h(), M("div", Ci, [p(_i, {
2098
+ }, null, 8, ["image-url"])) : (h(), M("div", $i, [p(Ii, {
2068
2099
  icon: S.value,
2069
- size: t(Pi),
2070
- alt: n.label
2071
- }, null, 8, ["icon", "size", "alt"])])), A("div", Ei, [A("div", Ri, U(n.label), 1), A("div", Si, U(r.value), 1)])])]),
2100
+ size: n(Si),
2101
+ alt: a.label
2102
+ }, null, 8, ["icon", "size", "alt"])])), z("div", Ti, [z("div", Ui, U(a.label), 1), z("div", Oi, U(r.value), 1)])])]),
2072
2103
  _: 1
2073
- }, 8, ["title"])) : C("", !0), q.value ? (h(), I(t(J), {
2104
+ }, 8, ["title"])) : E("", !0), q.value ? (h(), I(n(Y), {
2074
2105
  key: 2,
2075
2106
  title: `${N.value}前验证身份`
2076
2107
  }, {
2077
- action: o(() => [A("div", Vi, [K.value ? (h(), I(t(T), {
2108
+ action: o(() => [z("div", xi, [K.value ? (h(), I(n(T), {
2078
2109
  key: 0,
2079
- size: n.size,
2110
+ size: a.size,
2080
2111
  type: "primary",
2081
- onClick: E[2] || (E[2] = (te) => D("email"))
2112
+ onClick: C[2] || (C[2] = (te) => D("email"))
2082
2113
  }, {
2083
- default: o(() => [...E[4] || (E[4] = [k(" 邮箱验证 ", -1)])]),
2114
+ default: o(() => [...C[4] || (C[4] = [k(" 邮箱验证 ", -1)])]),
2084
2115
  _: 1
2085
- }, 8, ["size"])) : C("", !0), j.value ? (h(), I(t(T), {
2116
+ }, 8, ["size"])) : E("", !0), j.value ? (h(), I(n(T), {
2086
2117
  key: 1,
2087
- size: n.size,
2118
+ size: a.size,
2088
2119
  type: "primary",
2089
- onClick: E[3] || (E[3] = (te) => D("phone"))
2120
+ onClick: C[3] || (C[3] = (te) => D("phone"))
2090
2121
  }, {
2091
- default: o(() => [...E[5] || (E[5] = [k(" 手机验证 ", -1)])]),
2122
+ default: o(() => [...C[5] || (C[5] = [k(" 手机验证 ", -1)])]),
2092
2123
  _: 1
2093
- }, 8, ["size"])) : C("", !0)])]),
2094
- default: o(() => [E[6] || (E[6] = k(" 请选择一种已绑定的验证方式。 ", -1))]),
2124
+ }, 8, ["size"])) : E("", !0)])]),
2125
+ default: o(() => [C[6] || (C[6] = k(" 请选择一种已绑定的验证方式。 ", -1))]),
2095
2126
  _: 1
2096
- }, 8, ["title"])) : C("", !0), _.value ? (h(), I(ye, {
2127
+ }, 8, ["title"])) : E("", !0), _.value ? (h(), I(ge, {
2097
2128
  key: 3,
2098
- size: n.size,
2099
- email: (H = t(l)) == null ? void 0 : H.email,
2100
- onNext: O
2101
- }, null, 8, ["size", "email"])) : C("", !0), P.value ? (h(), I(ge, {
2129
+ size: a.size,
2130
+ email: (H = n(l)) == null ? void 0 : H.email,
2131
+ onNext: x
2132
+ }, null, 8, ["size", "email"])) : E("", !0), P.value ? (h(), I(we, {
2102
2133
  key: 4,
2103
- size: n.size,
2104
- phone: ((oe = t(l)) == null ? void 0 : oe.phone) || "",
2105
- onNext: O
2106
- }, null, 8, ["size", "phone"])) : C("", !0)], 64);
2134
+ size: a.size,
2135
+ phone: ((oe = n(l)) == null ? void 0 : oe.phone) || "",
2136
+ onNext: x
2137
+ }, null, 8, ["size", "phone"])) : E("", !0)], 64);
2107
2138
  };
2108
2139
  }
2109
- }), Ti = /* @__PURE__ */ X($i, [["__scopeId", "data-v-8af8b028"]]), Ui = {
2140
+ }), Di = /* @__PURE__ */ X(Ni, [["__scopeId", "data-v-6b13b949"]]), Bi = {
2110
2141
  class: "dependency-list"
2111
- }, xi = {
2142
+ }, qi = {
2112
2143
  class: "label"
2113
- }, Oi = {
2144
+ }, Li = {
2114
2145
  class: "count"
2115
- }, Ni = {
2146
+ }, Mi = {
2116
2147
  class: "action-bar"
2117
- }, Di = {
2148
+ }, Ki = {
2118
2149
  class: "verify-code-row"
2119
- }, Bi = {
2150
+ }, Fi = {
2120
2151
  class: "verify-code-row"
2121
- }, qi = /* @__PURE__ */ Y({
2152
+ }, Hi = /* @__PURE__ */ J({
2122
2153
  __name: "AuthkitAccountDelete",
2123
2154
  props: {
2124
2155
  size: {
@@ -2127,91 +2158,91 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2127
2158
  }
2128
2159
  },
2129
2160
  emits: ["deleted"],
2130
- setup(a, {
2161
+ setup(e, {
2131
2162
  emit: i
2132
2163
  }) {
2133
- const n = a, l = i, {
2164
+ const a = e, l = i, {
2134
2165
  userProfile: s,
2135
2166
  clearUserProfile: d
2136
- } = ae(), {
2167
+ } = ne(), {
2137
2168
  clearAuth: u
2138
- } = et(), e = z("check"), y = z(!1), g = z([]), f = z(!1), v = z(""), r = z(0);
2169
+ } = nt(), t = A("check"), y = A(!1), g = A([]), f = A(!1), v = A(""), r = A(0);
2139
2170
  let m = null;
2140
- const S = z("email"), R = $(() => {
2141
- var E;
2142
- const O = ((E = s.value) == null ? void 0 : E.email) || "";
2143
- if (!O) return "";
2144
- const [b, c] = O.split("@");
2145
- return b.length <= 2 ? O : `${b.slice(0, 2)}***@${c}`;
2171
+ const S = A("email"), R = $(() => {
2172
+ var C;
2173
+ const x = ((C = s.value) == null ? void 0 : C.email) || "";
2174
+ if (!x) return "";
2175
+ const [b, c] = x.split("@");
2176
+ return b.length <= 2 ? x : `${b.slice(0, 2)}***@${c}`;
2146
2177
  }), B = $(() => {
2147
2178
  var b;
2148
- const O = ((b = s.value) == null ? void 0 : b.phone) || "";
2149
- return O.length < 7 ? O : `${O.slice(0, 3)}****${O.slice(-4)}`;
2150
- }), K = $(() => S.value === "email" ? `为确保账号安全,我们将向您的邮箱 ${R.value} 发送验证码` : `为确保账号安全,我们将向您的手机号 ${B.value} 发送验证码`), j = $(() => S.value === "email" ? `验证码已发送至 ${R.value},注销后该账号将无法继续登录,请谨慎操作` : `验证码已发送至 ${B.value},注销后该账号将无法继续登录,请谨慎操作`), V = z(), w = z({
2179
+ const x = ((b = s.value) == null ? void 0 : b.phone) || "";
2180
+ return x.length < 7 ? x : `${x.slice(0, 3)}****${x.slice(-4)}`;
2181
+ }), K = $(() => S.value === "email" ? `为确保账号安全,我们将向您的邮箱 ${R.value} 发送验证码` : `为确保账号安全,我们将向您的手机号 ${B.value} 发送验证码`), j = $(() => S.value === "email" ? `验证码已发送至 ${R.value},注销后该账号将无法继续登录,请谨慎操作` : `验证码已发送至 ${B.value},注销后该账号将无法继续登录,请谨慎操作`), V = A(), w = A({
2151
2182
  userToken: "",
2152
2183
  code: "",
2153
2184
  password: "",
2154
2185
  confirmText: ""
2155
- }), q = z(!1);
2156
- function _(O, b) {
2157
- O !== "注销" ? b('请输入"注销"以确认操作') : b();
2186
+ }), q = A(!1);
2187
+ function _(x, b) {
2188
+ x !== "注销" ? b('请输入"注销"以确认操作') : b();
2158
2189
  }
2159
2190
  async function P() {
2160
- var O, b;
2161
- if (y.value = !0, y.value = !1, !((O = s.value) != null && O.email) && !((b = s.value) != null && b.phone)) {
2191
+ var x, b;
2192
+ if (y.value = !0, y.value = !1, !((x = s.value) != null && x.email) && !((b = s.value) != null && b.phone)) {
2162
2193
  G.error("请先绑定邮箱或手机号后再注销账号");
2163
2194
  return;
2164
2195
  }
2165
2196
  if (s.value.email && s.value.phone) {
2166
- e.value = "chooseMethod";
2197
+ t.value = "chooseMethod";
2167
2198
  return;
2168
2199
  }
2169
- S.value = s.value.email ? "email" : "phone", e.value = "sendCode";
2200
+ S.value = s.value.email ? "email" : "phone", t.value = "sendCode";
2170
2201
  }
2171
- function N(O) {
2172
- S.value = O, e.value = "sendCode";
2202
+ function N(x) {
2203
+ S.value = x, t.value = "sendCode";
2173
2204
  }
2174
2205
  async function F() {
2175
- var c, E;
2206
+ var c, C;
2176
2207
  if (S.value === "email") {
2177
2208
  if (!((c = s.value) != null && c.email)) {
2178
2209
  G.error("请先绑定邮箱");
2179
2210
  return;
2180
2211
  }
2181
2212
  f.value = !0;
2182
- const H = await x().auth.verify.email.retry.post({
2213
+ const H = await O().auth.verify.email.retry.post({
2183
2214
  email: s.value.email,
2184
2215
  purpose: "deleteAccount"
2185
2216
  });
2186
2217
  f.value = !1;
2187
- const oe = _e(H);
2188
- H.data && (v.value = H.data.emailVerifyId, G.success("验证码已发送"), e.value = "confirm"), D(oe);
2218
+ const oe = ke(H);
2219
+ H.data && (v.value = H.data.emailVerifyId, G.success("验证码已发送"), t.value = "confirm"), D(oe);
2189
2220
  return;
2190
2221
  }
2191
- if (!((E = s.value) != null && E.phone)) {
2222
+ if (!((C = s.value) != null && C.phone)) {
2192
2223
  G.error("请先绑定手机号");
2193
2224
  return;
2194
2225
  }
2195
2226
  f.value = !0;
2196
- const O = await x().auth.verify.sms.send.post({
2227
+ const x = await O().auth.verify.sms.send.post({
2197
2228
  phone: s.value.phone,
2198
2229
  purpose: "deleteAccount"
2199
2230
  });
2200
2231
  f.value = !1;
2201
- const b = _e(O);
2202
- O.error || (G.success("验证码已发送"), e.value = "confirm"), D(b);
2232
+ const b = ke(x);
2233
+ x.error || (G.success("验证码已发送"), t.value = "confirm"), D(b);
2203
2234
  }
2204
- function D(O) {
2205
- !O || O <= 0 || (r.value = Math.ceil(O), m && clearInterval(m), m = setInterval(() => {
2235
+ function D(x) {
2236
+ !x || x <= 0 || (r.value = Math.ceil(x), m && clearInterval(m), m = setInterval(() => {
2206
2237
  r.value--, r.value <= 0 && m && (clearInterval(m), m = null);
2207
2238
  }, 1e3));
2208
2239
  }
2209
- ke(() => {
2240
+ Ae(() => {
2210
2241
  m && (clearInterval(m), m = null);
2211
2242
  });
2212
2243
  async function Z() {
2213
- var E, H;
2214
- if (await ((E = V.value) == null ? void 0 : E.validate())) return;
2244
+ var C, H;
2245
+ if (await ((C = V.value) == null ? void 0 : C.validate())) return;
2215
2246
  q.value = !0;
2216
2247
  const b = S.value === "email" ? {
2217
2248
  method: "email",
@@ -2227,19 +2258,19 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2227
2258
  confirmText: w.value.confirmText
2228
2259
  }, {
2229
2260
  error: c
2230
- } = await x().auth.users.deleteAccount.post(b);
2231
- q.value = !1, c || (e.value = "success", d(), u(), l("deleted"));
2261
+ } = await O().auth.users.deleteAccount.post(b);
2262
+ q.value = !1, c || (t.value = "success", d(), u(), l("deleted"));
2232
2263
  }
2233
- function ne() {
2264
+ function ae() {
2234
2265
  window.location.href = "/";
2235
2266
  }
2236
- return (O, b) => e.value === "check" ? (h(), I(t(J), {
2267
+ return (x, b) => t.value === "check" ? (h(), I(n(Y), {
2237
2268
  key: 0,
2238
2269
  type: "warning",
2239
2270
  title: "注销账号"
2240
2271
  }, {
2241
- action: o(() => [p(t(T), {
2242
- size: n.size,
2272
+ action: o(() => [p(n(T), {
2273
+ size: a.size,
2243
2274
  type: "primary",
2244
2275
  status: "danger",
2245
2276
  loading: y.value,
@@ -2250,73 +2281,73 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2250
2281
  }, 8, ["size", "loading"])]),
2251
2282
  default: o(() => [b[10] || (b[10] = k(" 注销账号后,登录凭据、第三方绑定和当前登录态会被清除;历史订单、用量、审计等业务记录会保留用于对账和安全追溯。 ", -1))]),
2252
2283
  _: 1
2253
- })) : e.value === "dependencies" ? (h(), M(ie, {
2284
+ })) : t.value === "dependencies" ? (h(), M(ie, {
2254
2285
  key: 1
2255
- }, [p(t(J), {
2286
+ }, [p(n(Y), {
2256
2287
  type: "error",
2257
2288
  title: "无法注销账号"
2258
2289
  }, {
2259
2290
  default: o(() => [...b[11] || (b[11] = [k(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
2260
2291
  _: 1
2261
- }), A("div", Ui, [(h(!0), M(ie, null, Le(g.value, (c) => (h(), M("div", {
2292
+ }), z("div", Bi, [(h(!0), M(ie, null, Ke(g.value, (c) => (h(), M("div", {
2262
2293
  key: c.type,
2263
2294
  class: "dependency-item"
2264
- }, [A("span", xi, U(c.label), 1), A("span", Oi, U(c.count) + " 个", 1)]))), 128))]), A("div", Ni, [p(t(T), {
2265
- size: n.size,
2266
- onClick: b[0] || (b[0] = (c) => e.value = "check")
2295
+ }, [z("span", qi, U(c.label), 1), z("span", Li, U(c.count) + " 个", 1)]))), 128))]), z("div", Mi, [p(n(T), {
2296
+ size: a.size,
2297
+ onClick: b[0] || (b[0] = (c) => t.value = "check")
2267
2298
  }, {
2268
2299
  default: o(() => [...b[12] || (b[12] = [k("返回", -1)])]),
2269
2300
  _: 1
2270
- }, 8, ["size"])])], 64)) : e.value === "chooseMethod" ? (h(), I(t(J), {
2301
+ }, 8, ["size"])])], 64)) : t.value === "chooseMethod" ? (h(), I(n(Y), {
2271
2302
  key: 2,
2272
2303
  type: "normal",
2273
2304
  title: "选择验证方式"
2274
2305
  }, {
2275
- action: o(() => [p(t(pe), null, {
2306
+ action: o(() => [p(n(me), null, {
2276
2307
  default: o(() => {
2277
- var c, E;
2278
- return [p(t(T), {
2279
- size: n.size,
2280
- onClick: b[1] || (b[1] = (H) => e.value = "check")
2308
+ var c, C;
2309
+ return [p(n(T), {
2310
+ size: a.size,
2311
+ onClick: b[1] || (b[1] = (H) => t.value = "check")
2281
2312
  }, {
2282
2313
  default: o(() => [...b[13] || (b[13] = [k("取消", -1)])]),
2283
2314
  _: 1
2284
- }, 8, ["size"]), (c = t(s)) != null && c.email ? (h(), I(t(T), {
2315
+ }, 8, ["size"]), (c = n(s)) != null && c.email ? (h(), I(n(T), {
2285
2316
  key: 0,
2286
- size: n.size,
2317
+ size: a.size,
2287
2318
  type: "primary",
2288
2319
  onClick: b[2] || (b[2] = (H) => N("email"))
2289
2320
  }, {
2290
2321
  default: o(() => [...b[14] || (b[14] = [k(" 邮箱验证 ", -1)])]),
2291
2322
  _: 1
2292
- }, 8, ["size"])) : C("", !0), (E = t(s)) != null && E.phone ? (h(), I(t(T), {
2323
+ }, 8, ["size"])) : E("", !0), (C = n(s)) != null && C.phone ? (h(), I(n(T), {
2293
2324
  key: 1,
2294
- size: n.size,
2325
+ size: a.size,
2295
2326
  type: "primary",
2296
2327
  onClick: b[3] || (b[3] = (H) => N("phone"))
2297
2328
  }, {
2298
2329
  default: o(() => [...b[15] || (b[15] = [k(" 手机验证 ", -1)])]),
2299
2330
  _: 1
2300
- }, 8, ["size"])) : C("", !0)];
2331
+ }, 8, ["size"])) : E("", !0)];
2301
2332
  }),
2302
2333
  _: 1
2303
2334
  })]),
2304
2335
  default: o(() => [b[16] || (b[16] = k(" 请选择一种已绑定的身份验证方式。 ", -1))]),
2305
2336
  _: 1
2306
- })) : e.value === "sendCode" ? (h(), I(t(J), {
2337
+ })) : t.value === "sendCode" ? (h(), I(n(Y), {
2307
2338
  key: 3,
2308
2339
  type: "normal",
2309
2340
  title: "身份验证"
2310
2341
  }, {
2311
- action: o(() => [p(t(pe), null, {
2312
- default: o(() => [p(t(T), {
2313
- size: n.size,
2314
- onClick: b[4] || (b[4] = (c) => e.value = "check")
2342
+ action: o(() => [p(n(me), null, {
2343
+ default: o(() => [p(n(T), {
2344
+ size: a.size,
2345
+ onClick: b[4] || (b[4] = (c) => t.value = "check")
2315
2346
  }, {
2316
2347
  default: o(() => [...b[17] || (b[17] = [k("取消", -1)])]),
2317
2348
  _: 1
2318
- }, 8, ["size"]), p(t(T), {
2319
- size: n.size,
2349
+ }, 8, ["size"]), p(n(T), {
2350
+ size: a.size,
2320
2351
  type: "primary",
2321
2352
  loading: f.value,
2322
2353
  onClick: F
@@ -2328,25 +2359,25 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2328
2359
  })]),
2329
2360
  default: o(() => [k(U(K.value) + " ", 1)]),
2330
2361
  _: 1
2331
- })) : e.value === "confirm" ? (h(), M(ie, {
2362
+ })) : t.value === "confirm" ? (h(), M(ie, {
2332
2363
  key: 4
2333
- }, [p(t(J), {
2364
+ }, [p(n(Y), {
2334
2365
  type: "warning",
2335
2366
  title: "确认注销"
2336
2367
  }, {
2337
2368
  default: o(() => [k(U(j.value), 1)]),
2338
2369
  _: 1
2339
- }), p(t(le), {
2370
+ }), p(n(le), {
2340
2371
  ref_key: "formRef",
2341
2372
  ref: V,
2342
2373
  model: w.value,
2343
- size: n.size,
2374
+ size: a.size,
2344
2375
  class: "confirm-form",
2345
2376
  layout: "vertical"
2346
2377
  }, {
2347
2378
  default: o(() => {
2348
2379
  var c;
2349
- return [S.value === "email" ? (h(), I(t(L), {
2380
+ return [S.value === "email" ? (h(), I(n(L), {
2350
2381
  key: 0,
2351
2382
  field: "userToken",
2352
2383
  label: "邮箱验证码",
@@ -2355,13 +2386,13 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2355
2386
  message: "请输入验证码"
2356
2387
  }]
2357
2388
  }, {
2358
- default: o(() => [A("div", Di, [p(t(Q), {
2389
+ default: o(() => [z("div", Ki, [p(n(Q), {
2359
2390
  modelValue: w.value.userToken,
2360
- "onUpdate:modelValue": b[5] || (b[5] = (E) => w.value.userToken = E),
2391
+ "onUpdate:modelValue": b[5] || (b[5] = (C) => w.value.userToken = C),
2361
2392
  placeholder: "请输入6位验证码",
2362
2393
  "max-length": 6,
2363
2394
  "allow-clear": ""
2364
- }, null, 8, ["modelValue"]), p(t(T), {
2395
+ }, null, 8, ["modelValue"]), p(n(T), {
2365
2396
  disabled: r.value > 0,
2366
2397
  loading: f.value,
2367
2398
  onClick: F
@@ -2370,7 +2401,7 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2370
2401
  _: 1
2371
2402
  }, 8, ["disabled", "loading"])])]),
2372
2403
  _: 1
2373
- })) : (h(), I(t(L), {
2404
+ })) : (h(), I(n(L), {
2374
2405
  key: 1,
2375
2406
  field: "code",
2376
2407
  label: "短信验证码",
@@ -2379,12 +2410,12 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2379
2410
  message: "请输入验证码"
2380
2411
  }]
2381
2412
  }, {
2382
- default: o(() => [A("div", Bi, [p(t(Q), {
2413
+ default: o(() => [z("div", Fi, [p(n(Q), {
2383
2414
  modelValue: w.value.code,
2384
- "onUpdate:modelValue": b[6] || (b[6] = (E) => w.value.code = E),
2415
+ "onUpdate:modelValue": b[6] || (b[6] = (C) => w.value.code = C),
2385
2416
  placeholder: "请输入验证码",
2386
2417
  "allow-clear": ""
2387
- }, null, 8, ["modelValue"]), p(t(T), {
2418
+ }, null, 8, ["modelValue"]), p(n(T), {
2388
2419
  disabled: r.value > 0,
2389
2420
  loading: f.value,
2390
2421
  onClick: F
@@ -2393,7 +2424,7 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2393
2424
  _: 1
2394
2425
  }, 8, ["disabled", "loading"])])]),
2395
2426
  _: 1
2396
- })), (c = t(s)) != null && c.hasPassword ? (h(), I(t(L), {
2427
+ })), (c = n(s)) != null && c.hasPassword ? (h(), I(n(L), {
2397
2428
  key: 2,
2398
2429
  field: "password",
2399
2430
  label: "登录密码",
@@ -2402,14 +2433,14 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2402
2433
  message: "请输入密码"
2403
2434
  }]
2404
2435
  }, {
2405
- default: o(() => [p(t(Fe), {
2436
+ default: o(() => [p(n(We), {
2406
2437
  modelValue: w.value.password,
2407
- "onUpdate:modelValue": b[7] || (b[7] = (E) => w.value.password = E),
2438
+ "onUpdate:modelValue": b[7] || (b[7] = (C) => w.value.password = C),
2408
2439
  placeholder: "请输入您的登录密码",
2409
2440
  "allow-clear": ""
2410
2441
  }, null, 8, ["modelValue"])]),
2411
2442
  _: 1
2412
- })) : C("", !0), p(t(L), {
2443
+ })) : E("", !0), p(n(L), {
2413
2444
  field: "confirmText",
2414
2445
  label: "请输入「注销」以确认",
2415
2446
  rules: [{
@@ -2419,21 +2450,21 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2419
2450
  validator: _
2420
2451
  }]
2421
2452
  }, {
2422
- default: o(() => [p(t(Q), {
2453
+ default: o(() => [p(n(Q), {
2423
2454
  modelValue: w.value.confirmText,
2424
- "onUpdate:modelValue": b[8] || (b[8] = (E) => w.value.confirmText = E),
2455
+ "onUpdate:modelValue": b[8] || (b[8] = (C) => w.value.confirmText = C),
2425
2456
  placeholder: "注销",
2426
2457
  "allow-clear": ""
2427
2458
  }, null, 8, ["modelValue"])]),
2428
2459
  _: 1
2429
- }, 8, ["rules"]), p(t(L), null, {
2430
- default: o(() => [p(t(pe), null, {
2431
- default: o(() => [p(t(T), {
2432
- onClick: b[9] || (b[9] = (E) => e.value = "check")
2460
+ }, 8, ["rules"]), p(n(L), null, {
2461
+ default: o(() => [p(n(me), null, {
2462
+ default: o(() => [p(n(T), {
2463
+ onClick: b[9] || (b[9] = (C) => t.value = "check")
2433
2464
  }, {
2434
2465
  default: o(() => [...b[18] || (b[18] = [k("取消", -1)])]),
2435
2466
  _: 1
2436
- }), p(t(T), {
2467
+ }), p(n(T), {
2437
2468
  type: "primary",
2438
2469
  status: "danger",
2439
2470
  loading: q.value,
@@ -2448,69 +2479,69 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2448
2479
  })];
2449
2480
  }),
2450
2481
  _: 1
2451
- }, 8, ["model", "size"])], 64)) : e.value === "success" ? (h(), I(t(He), {
2482
+ }, 8, ["model", "size"])], 64)) : t.value === "success" ? (h(), I(n(Ge), {
2452
2483
  key: 5,
2453
2484
  status: "success",
2454
2485
  title: "账号已注销"
2455
2486
  }, {
2456
2487
  subtitle: o(() => [...b[19] || (b[19] = [k(" 您的账号已成功注销,登录凭据和绑定身份已清除 ", -1)])]),
2457
- extra: o(() => [p(t(T), {
2488
+ extra: o(() => [p(n(T), {
2458
2489
  type: "primary",
2459
- onClick: ne
2490
+ onClick: ae
2460
2491
  }, {
2461
2492
  default: o(() => [...b[20] || (b[20] = [k("返回首页", -1)])]),
2462
2493
  _: 1
2463
2494
  })]),
2464
2495
  _: 1
2465
- })) : C("", !0);
2496
+ })) : E("", !0);
2466
2497
  }
2467
- }), Li = /* @__PURE__ */ X(qi, [["__scopeId", "data-v-90439767"]]), Mi = {
2498
+ }), Wi = /* @__PURE__ */ X(Hi, [["__scopeId", "data-v-90439767"]]), Gi = {
2468
2499
  class: "content"
2469
- }, Ki = {
2500
+ }, Yi = {
2470
2501
  class: "left"
2471
- }, Fi = {
2502
+ }, Ji = {
2472
2503
  class: "right"
2473
- }, Hi = /* @__PURE__ */ Y({
2504
+ }, ji = /* @__PURE__ */ J({
2474
2505
  __name: "AuthkitAppSetting",
2475
2506
  emits: ["confirm", "cancel"],
2476
- setup(a, {
2507
+ setup(e, {
2477
2508
  expose: i,
2478
- emit: n
2509
+ emit: a
2479
2510
  }) {
2480
- const l = n;
2511
+ const l = a;
2481
2512
  function s() {
2482
- w.value = !1, e.value = ["PersonalInformation"], l("cancel");
2513
+ w.value = !1, t.value = ["PersonalInformation"], l("cancel");
2483
2514
  }
2484
2515
  function d() {
2485
2516
  s();
2486
2517
  }
2487
- const u = z("large"), e = z(["PersonalInformation"]), y = [{
2518
+ const u = A("large"), t = A(["PersonalInformation"]), y = [{
2488
2519
  provider: "github",
2489
- name: fe.github,
2520
+ name: pe.github,
2490
2521
  meta: {
2491
2522
  icon: re.github
2492
2523
  }
2493
2524
  }, {
2494
2525
  provider: "google",
2495
- name: fe.google,
2526
+ name: pe.google,
2496
2527
  meta: {
2497
2528
  icon: re.google
2498
2529
  }
2499
2530
  }, {
2500
2531
  provider: "microsoft",
2501
- name: fe.microsoft,
2532
+ name: pe.microsoft,
2502
2533
  meta: {
2503
2534
  icon: re.microsoft
2504
2535
  }
2505
2536
  }, {
2506
2537
  provider: "wechat",
2507
- name: fe.wechat,
2538
+ name: pe.wechat,
2508
2539
  meta: {
2509
2540
  icon: re.wechat
2510
2541
  }
2511
2542
  }], {
2512
2543
  appsData: g
2513
- } = Se(), f = $(() => {
2544
+ } = Ve(), f = $(() => {
2514
2545
  const _ = g.value.authMethods;
2515
2546
  return _.signUp.email || _.login.emailPassword || _.login.emailCode;
2516
2547
  }), v = $(() => {
@@ -2549,7 +2580,7 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2549
2580
  name: "Passkey",
2550
2581
  path: "PasskeyBinding",
2551
2582
  meta: {
2552
- icon: ki
2583
+ icon: Ei
2553
2584
  }
2554
2585
  }), _.push({
2555
2586
  name: "注销账号",
@@ -2581,98 +2612,102 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
2581
2612
  },
2582
2613
  children: R.value
2583
2614
  }), P;
2584
- }), K = $(() => R.value.find((_) => _.path === e.value[0]));
2615
+ }), K = $(() => R.value.find((_) => _.path === t.value[0]));
2585
2616
  function j(_) {
2586
2617
  const P = _.path;
2587
- e.value = [P];
2618
+ t.value = [P];
2588
2619
  }
2589
2620
  const {
2590
2621
  changeType: V,
2591
2622
  show: w
2592
- } = tt(l);
2593
- Ae(R, (_) => {
2594
- e.value[0].startsWith("OAuthBinding:") && !_.some((P) => P.path === e.value[0]) && (e.value = ["PersonalInformation"]);
2595
- }), Ae(B, (_) => {
2596
- const P = e.value[0];
2623
+ } = at(l);
2624
+ Ie(R, (_) => {
2625
+ t.value[0].startsWith("OAuthBinding:") && !_.some((P) => P.path === t.value[0]) && (t.value = ["PersonalInformation"]);
2626
+ }), Ie(B, (_) => {
2627
+ const P = t.value[0];
2597
2628
  _.some((F) => {
2598
2629
  var D;
2599
2630
  return F.path === P || ((D = F.children) == null ? void 0 : D.some((Z) => Z.path === P));
2600
- }) || (e.value = ["PersonalInformation"]);
2631
+ }) || (t.value = ["PersonalInformation"]);
2601
2632
  });
2602
2633
  function q(_, P) {
2603
2634
  w.value = P, V.value = "编辑";
2604
2635
  }
2605
2636
  return i({
2606
2637
  setData: q
2607
- }), (_, P) => t(w) ? (h(), I(t(We), {
2638
+ }), (_, P) => n(w) ? (h(), I(n(Ye), {
2608
2639
  key: 0,
2609
2640
  visible: !0,
2610
2641
  "body-class": "AppSettingbodyClass",
2611
2642
  "mask-closable": !1,
2612
2643
  footer: !1,
2613
- width: t(Ne),
2644
+ width: n(Be),
2614
2645
  onCancel: s
2615
2646
  }, {
2616
2647
  title: o(() => [...P[1] || (P[1] = [k(" 用户信息 ", -1)])]),
2617
- default: o(() => [A("div", Mi, [A("div", Ki, [p(Ze, {
2618
- "selected-keys": e.value,
2619
- "onUpdate:selectedKeys": P[0] || (P[0] = (N) => e.value = N),
2648
+ default: o(() => [z("div", Gi, [z("div", Yi, [p(it, {
2649
+ "selected-keys": t.value,
2650
+ "onUpdate:selectedKeys": P[0] || (P[0] = (N) => t.value = N),
2620
2651
  menus: B.value,
2621
2652
  onChange: j
2622
- }, null, 8, ["selected-keys", "menus"])]), A("div", Fi, [e.value[0] === "PersonalInformation" ? (h(), I(yt, {
2653
+ }, null, 8, ["selected-keys", "menus"])]), z("div", Ji, [t.value[0] === "PersonalInformation" ? (h(), I(bt, {
2623
2654
  key: 0,
2624
2655
  size: u.value
2625
- }, null, 8, ["size"])) : C("", !0), e.value[0] === "EmailBinding" ? (h(), I(ei, {
2656
+ }, null, 8, ["size"])) : E("", !0), t.value[0] === "EmailBinding" ? (h(), I(ni, {
2626
2657
  key: 1,
2627
2658
  size: u.value
2628
- }, null, 8, ["size"])) : C("", !0), e.value[0] === "PhoneBinding" ? (h(), I(ci, {
2659
+ }, null, 8, ["size"])) : E("", !0), t.value[0] === "PhoneBinding" ? (h(), I(mi, {
2629
2660
  key: 2,
2630
2661
  size: u.value
2631
- }, null, 8, ["size"])) : C("", !0), e.value[0] === "SetPassword" ? (h(), I(Rt, {
2662
+ }, null, 8, ["size"])) : E("", !0), t.value[0] === "SetPassword" ? (h(), I($t, {
2632
2663
  key: 3,
2633
2664
  size: u.value
2634
- }, null, 8, ["size"])) : C("", !0), e.value[0] === "PasskeyBinding" ? (h(), I(Wt, {
2665
+ }, null, 8, ["size"])) : E("", !0), t.value[0] === "PasskeyBinding" ? (h(), I(Jt, {
2635
2666
  key: 4,
2636
2667
  size: u.value
2637
- }, null, 8, ["size"])) : C("", !0), K.value ? (h(), I(Ti, {
2668
+ }, null, 8, ["size"])) : E("", !0), K.value ? (h(), I(Di, {
2638
2669
  key: 5,
2639
2670
  provider: K.value.provider,
2640
2671
  label: K.value.name,
2641
2672
  size: u.value
2642
- }, null, 8, ["provider", "label", "size"])) : C("", !0), e.value[0] === "AccountDelete" ? (h(), I(Li, {
2673
+ }, null, 8, ["provider", "label", "size"])) : E("", !0), t.value[0] === "AccountDelete" ? (h(), I(Wi, {
2643
2674
  key: 6,
2644
2675
  size: u.value,
2645
2676
  onDeleted: d
2646
- }, null, 8, ["size"])) : C("", !0)])])]),
2677
+ }, null, 8, ["size"])) : E("", !0)])])]),
2647
2678
  _: 1
2648
- }, 8, ["width"])) : C("", !0);
2679
+ }, 8, ["width"])) : E("", !0);
2649
2680
  }
2650
- }), ma = /* @__PURE__ */ X(Hi, [["__scopeId", "data-v-944e5438"]]);
2681
+ }), An = /* @__PURE__ */ X(ji, [["__scopeId", "data-v-944e5438"]]);
2651
2682
  export {
2652
- ma as A,
2653
- Zt as B,
2654
- Ti as O,
2655
- Wt as P,
2656
- ve as S,
2657
- ei as _,
2658
- di as a,
2659
- ye as b,
2660
- Et as c,
2661
- yt as d,
2662
- ci as e,
2663
- ge as f,
2664
- Rt as g,
2665
- gi as h,
2683
+ An as A,
2684
+ ii as B,
2685
+ Di as O,
2686
+ Jt as P,
2687
+ he as S,
2688
+ ni as _,
2689
+ pi as a,
2690
+ ge as b,
2691
+ Vt as c,
2692
+ bt as d,
2693
+ mi as e,
2694
+ we as f,
2695
+ $t as g,
2696
+ bn as h,
2666
2697
  Ai as i,
2667
- fa as j,
2668
- _i as k,
2669
- se as l,
2670
- pa as m,
2671
- re as n,
2672
- zi as o,
2673
- ki as p,
2674
- he as q,
2675
- fi as r,
2676
- Pi as s,
2677
- Lt as u
2698
+ Ri as j,
2699
+ _n as k,
2700
+ Ii as l,
2701
+ se as m,
2702
+ kn as n,
2703
+ Ci as o,
2704
+ re as p,
2705
+ Ei as q,
2706
+ ye as r,
2707
+ vi as s,
2708
+ hi as t,
2709
+ Ft as u,
2710
+ gn as v,
2711
+ wn as w,
2712
+ Si as x
2678
2713
  };