@huyooo/ui 2.0.11 → 2.0.12

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.
@@ -1,30 +1,30 @@
1
- import { defineComponent as V, computed as T, openBlock as l, createElementBlock as k, normalizeStyle as G, normalizeClass as he, renderSlot as Z, createBlock as S, unref as e, createCommentVNode as I, createElementVNode as _, toDisplayString as L, ref as A, createVNode as i, withCtx as p, createTextVNode as O, watchEffect as ne, Fragment as D, renderList as re, useModel as Ue, watch as ye, mergeModels as $e, useSlots as Re, onMounted as E, onUnmounted as ue, Teleport as Te } from "vue";
1
+ import { defineComponent as C, computed as R, openBlock as n, createElementBlock as S, normalizeStyle as H, normalizeClass as ye, renderSlot as Q, createBlock as z, unref as e, createCommentVNode as A, ref as I, watch as ne, createElementVNode as k, createVNode as i, withCtx as p, createTextVNode as T, watchEffect as re, Fragment as F, renderList as ue, useModel as Ue, toDisplayString as B, mergeModels as $e, useSlots as Re, onMounted as M, onUnmounted as de, Teleport as Te } from "vue";
2
2
  import { useRouter as be, useRoute as qe } from "vue-router";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  import "./userMenuModal-D-nDaYqM.js";
6
- import { Message as X, Form as H, FormItem as P, Input as C, Button as B, Link as Y, Tabs as de, TabPane as ce, Checkbox as Oe, Modal as xe, List as Le, ListItem as ae, ListItemMeta as oe, Avatar as te, Alert as fe, Spin as Be, Empty as Me } from "@arco-design/web-vue";
7
- import { a as F, u as N } from "./useAuthkitAuth-cHrJMM8E.js";
8
- import { g as M, u as we } from "./apiClients-Ctcq8NZs.js";
9
- import { u as j } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
10
- import { o as ve, j as Fe, k as ge, l as _e, u as De, m as Ee, n as He, p as Q, q as Ge, i as ke, S as W, r as K, s as Se, t as ze, v as le, w as Ne, x as je, b as We } from "./AuthkitAppSetting-gE5wTmN1.js";
6
+ import { Form as D, FormItem as P, Input as V, Button as O, Link as J, Tabs as ce, TabPane as pe, Checkbox as Oe, Modal as xe, Message as le, List as Be, ListItem as ie, ListItemMeta as ae, Avatar as ee, Alert as ve, Spin as Le, Empty as Fe } from "@arco-design/web-vue";
7
+ import { a as L, u as G } from "./useAuthkitAuth-cHrJMM8E.js";
8
+ import { g as x, u as we } from "./apiClients-Ctcq8NZs.js";
9
+ import { u as N } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
10
+ import { o as ge, j as Me, k as he, l as _e, u as De, m as Ee, n as K, i as ke, p as He, S as j, q as W, r as Se, s as ze, t as oe, v as Ge, w as Ne, b as je } from "./AuthkitAppSetting-Dgxd5GMR.js";
11
11
  import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  /* empty css */
13
13
  import "./index-Cn6LcfZO.js";
14
14
  /* empty css */
15
- import { u as Ie, L as Ke, i as Je } from "./useLegalDocs-C4qk5CTb.js";
16
- import { u as pe } from "./runtime-Dp7MgwhI.js";
15
+ import { u as Ie, L as We, i as Ke } from "./useLegalDocs-C4qk5CTb.js";
16
+ import { u as me } from "./runtime-Dp7MgwhI.js";
17
17
  import { u as Ae } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
18
18
  /* empty css */
19
19
  /* empty css */
20
20
  import "./CustomTable-HDwqEcmB.js";
21
21
  /* empty css */
22
- import { TiptapEditor as Qe, TiptapTitle as Xe } from "@huyooo/vue-tiptap";
23
- import { f as Ye } from "./fetchAuthPageAboutUs-DV7ArpNZ.js";
24
- const Ze = ["title", "aria-label", "disabled"], et = {
22
+ import { TiptapEditor as Je, TiptapTitle as Qe } from "@huyooo/vue-tiptap";
23
+ import { f as Xe } from "./fetchAuthPageAboutUs-DV7ArpNZ.js";
24
+ const Ye = ["title", "aria-label", "disabled"], Ze = {
25
25
  key: 0,
26
26
  class: "OAuthItem__spinner"
27
- }, tt = /* @__PURE__ */ V({
27
+ }, et = /* @__PURE__ */ C({
28
28
  __name: "AuthkitOauthItem",
29
29
  props: {
30
30
  size: {
@@ -48,39 +48,36 @@ const Ze = ["title", "aria-label", "disabled"], et = {
48
48
  default: !1
49
49
  }
50
50
  },
51
- setup(b) {
52
- const r = b, u = T(() => ({
53
- width: `${ge}px`,
54
- height: `${ge}px`,
55
- padding: `${Fe}px`,
56
- "--oauth-icon-size": `${ve}px`
51
+ setup(w) {
52
+ const r = w, u = R(() => ({
53
+ width: `${he}px`,
54
+ height: `${he}px`,
55
+ padding: `${Me}px`,
56
+ "--oauth-icon-size": `${ge}px`
57
57
  }));
58
- return (o, h) => (l(), k("button", {
59
- class: he(["OAuthItem", {
58
+ return (o, h) => (n(), S("button", {
59
+ class: ye(["OAuthItem", {
60
60
  "OAuthItem--loading": r.loading
61
61
  }]),
62
62
  type: "button",
63
63
  title: r.label,
64
64
  "aria-label": r.label,
65
65
  disabled: r.disabled || r.loading,
66
- style: G(u.value)
67
- }, [r.loading ? (l(), k("span", et)) : Z(o.$slots, "icon", {
66
+ style: H(u.value)
67
+ }, [r.loading ? (n(), S("span", Ze)) : Q(o.$slots, "icon", {
68
68
  key: 1
69
- }, () => [r.icon ? (l(), S(_e, {
69
+ }, () => [r.icon ? (n(), z(_e, {
70
70
  key: 0,
71
71
  icon: r.icon,
72
- size: e(ve)
73
- }, null, 8, ["icon", "size"])) : I("", !0)], !0)], 14, Ze));
72
+ size: e(ge)
73
+ }, null, 8, ["icon", "size"])) : A("", !0)], !0)], 14, Ye));
74
74
  }
75
- }), J = /* @__PURE__ */ U(tt, [["__scopeId", "data-v-e00c1d80"]]), st = {
75
+ }), Z = /* @__PURE__ */ U(et, [["__scopeId", "data-v-e00c1d80"]]), tt = {
76
76
  class: "OAuthList"
77
- }, it = {
77
+ }, st = {
78
78
  key: 0,
79
79
  class: "OAuthDivider"
80
- }, at = {
81
- key: 1,
82
- class: "OAuthHint"
83
- }, ot = /* @__PURE__ */ V({
80
+ }, it = /* @__PURE__ */ C({
84
81
  __name: "AuthkitOauthList",
85
82
  props: {
86
83
  size: {
@@ -89,96 +86,95 @@ const Ze = ["title", "aria-label", "disabled"], et = {
89
86
  }
90
87
  },
91
88
  emits: ["passkeySubmit"],
92
- setup(b, {
89
+ setup(w, {
93
90
  emit: r
94
91
  }) {
95
92
  const u = r, {
96
93
  appsData: o
97
- } = j(), {
98
- loading: h,
99
- supported: g,
100
- loginWithPasskey: a,
101
- formatError: s
94
+ } = N(), {
95
+ loginWithPasskey: h
102
96
  } = De(), {
103
- githubAuth: d,
104
- googleAuth: v,
105
- microsoftAuth: t,
106
- wechatAuth: f
97
+ githubAuth: g,
98
+ googleAuth: a,
99
+ microsoftAuth: s,
100
+ wechatAuth: d
107
101
  } = ke(), {
108
- acceptedTerms: n,
109
- ensureTermsAcceptedForSignIn: w
110
- } = F();
111
- function c($) {
112
- w() && $({
113
- acceptedTerms: n.value ? !0 : void 0
102
+ acceptedTerms: f,
103
+ ensureTermsAcceptedForSignIn: t
104
+ } = L();
105
+ function c(y) {
106
+ t() && y({
107
+ acceptedTerms: f.value ? !0 : void 0
114
108
  });
115
109
  }
116
- const m = b, y = T(() => o.value.authMethods.login.passkey && Ee() || ""), z = T(() => {
117
- const $ = o.value.oauth, R = $.google.enabled || $.microsoft.enabled || $.github.enabled || $.wechat.enabled, x = o.value.authMethods.login.passkey;
118
- return R || x;
119
- });
120
- async function q() {
121
- if (w())
122
- try {
123
- const $ = await a();
124
- if (!$)
125
- return;
126
- u("passkeySubmit", $);
127
- } catch ($) {
128
- const R = s($);
129
- if ($ instanceof Error && $.name === "NotAllowedError") {
130
- X.warning(R);
131
- return;
132
- }
133
- X.error(R);
110
+ const l = w, _ = R(() => {
111
+ const y = o.value.oauth;
112
+ return y.google.enabled || y.microsoft.enabled || y.github.enabled || y.wechat.enabled;
113
+ }), m = I(!1);
114
+ async function b() {
115
+ const y = He();
116
+ if (y) {
117
+ console.info(`[Passkey] ${y}`);
118
+ return;
119
+ }
120
+ try {
121
+ const v = await h(void 0, {
122
+ useBrowserAutofill: !0,
123
+ beforeVerify: t
124
+ });
125
+ if (!v)
126
+ return;
127
+ u("passkeySubmit", v);
128
+ } catch (v) {
129
+ if (v instanceof Error && (v.name === "AbortError" || v.name === "NotAllowedError")) {
130
+ console.info(`[Passkey] ${v.message}`);
131
+ return;
134
132
  }
133
+ console.warn("[Passkey] 条件式登录初始化失败", v);
134
+ }
135
135
  }
136
- return ($, R) => (l(), k("div", st, [z.value ? (l(), k("div", it, [...R[4] || (R[4] = [_("span", null, "其他登录方式", -1)])])) : I("", !0), _("div", {
136
+ return ne(() => o.value.authMethods.login.passkey, (y) => {
137
+ !y || m.value || (m.value = !0, b());
138
+ }, {
139
+ immediate: !0
140
+ }), (y, v) => (n(), S("div", tt, [_.value ? (n(), S("div", st, [...v[4] || (v[4] = [k("span", null, "其他登录方式", -1)])])) : A("", !0), k("div", {
137
141
  class: "OAuthIcons",
138
- style: G({
139
- gap: `${e(He)}px`
142
+ style: H({
143
+ gap: `${e(Ee)}px`
140
144
  })
141
- }, [e(o).oauth.google.enabled ? (l(), S(J, {
145
+ }, [e(o).oauth.google.enabled ? (n(), z(Z, {
142
146
  key: 0,
143
- icon: e(Q).google,
147
+ icon: e(K).google,
144
148
  label: "Google",
145
- size: m.size,
146
- onClick: R[0] || (R[0] = (x) => c(e(v)))
147
- }, null, 8, ["icon", "size"])) : I("", !0), e(o).oauth.github.enabled ? (l(), S(J, {
149
+ size: l.size,
150
+ onClick: v[0] || (v[0] = ($) => c(e(a)))
151
+ }, null, 8, ["icon", "size"])) : A("", !0), e(o).oauth.github.enabled ? (n(), z(Z, {
148
152
  key: 1,
149
- icon: e(Q).github,
153
+ icon: e(K).github,
150
154
  label: "Github",
151
- size: m.size,
152
- onClick: R[1] || (R[1] = (x) => c(e(d)))
153
- }, null, 8, ["icon", "size"])) : I("", !0), e(o).oauth.microsoft.enabled ? (l(), S(J, {
155
+ size: l.size,
156
+ onClick: v[1] || (v[1] = ($) => c(e(g)))
157
+ }, null, 8, ["icon", "size"])) : A("", !0), e(o).oauth.microsoft.enabled ? (n(), z(Z, {
154
158
  key: 2,
155
- icon: e(Q).microsoft,
159
+ icon: e(K).microsoft,
156
160
  label: "Microsoft",
157
- size: m.size,
158
- onClick: R[2] || (R[2] = (x) => c(e(t)))
159
- }, null, 8, ["icon", "size"])) : I("", !0), e(o).oauth.wechat.enabled ? (l(), S(J, {
161
+ size: l.size,
162
+ onClick: v[2] || (v[2] = ($) => c(e(s)))
163
+ }, null, 8, ["icon", "size"])) : A("", !0), e(o).oauth.wechat.enabled ? (n(), z(Z, {
160
164
  key: 3,
161
- icon: e(Q).wechat,
165
+ icon: e(K).wechat,
162
166
  label: "微信",
163
- size: m.size,
164
- onClick: R[3] || (R[3] = (x) => c(e(f)))
165
- }, null, 8, ["icon", "size"])) : I("", !0), e(o).authMethods.login.passkey ? (l(), S(J, {
166
- key: 4,
167
- icon: e(Ge),
168
- label: "Passkey",
169
- size: m.size,
170
- loading: e(h),
171
- disabled: !e(g),
172
- onClick: q
173
- }, null, 8, ["icon", "size", "loading", "disabled"])) : I("", !0)], 4), y.value ? (l(), k("p", at, L(y.value), 1)) : I("", !0)]));
167
+ size: l.size,
168
+ onClick: v[3] || (v[3] = ($) => c(e(d)))
169
+ }, null, 8, ["icon", "size"])) : A("", !0)], 4)]));
174
170
  }
175
- }), lt = /* @__PURE__ */ U(ot, [["__scopeId", "data-v-aa6a61de"]]), nt = {
171
+ }), at = /* @__PURE__ */ U(it, [["__scopeId", "data-v-b0f3f609"]]), ot = {
176
172
  class: "content"
177
- }, rt = {
173
+ }, lt = {
178
174
  class: "sendVerifyCodeItem"
179
- }, ut = {
175
+ }, nt = {
180
176
  class: "handle"
181
- }, dt = /* @__PURE__ */ V({
177
+ }, rt = /* @__PURE__ */ C({
182
178
  __name: "AuthkitPasswordUpdateAndVerify",
183
179
  props: {
184
180
  size: {
@@ -192,10 +188,10 @@ const Ze = ["title", "aria-label", "disabled"], et = {
192
188
  }
193
189
  },
194
190
  emits: ["signIn", "submit"],
195
- setup(b, {
191
+ setup(w, {
196
192
  emit: r
197
193
  }) {
198
- const u = r, o = b, h = A(), g = A(!1), a = A(), s = A({
194
+ const u = r, o = w, h = I(), g = I(!1), a = I(), s = I({
199
195
  email: void 0,
200
196
  userToken: void 0,
201
197
  emailVerifyId: void 0,
@@ -205,19 +201,19 @@ const Ze = ["title", "aria-label", "disabled"], et = {
205
201
  async function d() {
206
202
  if (!await a.value.validateField(["email"])) {
207
203
  g.value = !0;
208
- const f = await M().auth.verify.email.retry.post({
204
+ const c = await x().auth.verify.email.retry.post({
209
205
  email: s.value.email,
210
206
  purpose: "resetPassword"
211
207
  });
212
- g.value = !1, f.data && (s.value.emailVerifyId = f.data.emailVerifyId), K(h.value, f);
208
+ g.value = !1, c.data && (s.value.emailVerifyId = c.data.emailVerifyId), W(h.value, c);
213
209
  }
214
210
  }
215
- async function v() {
211
+ async function f() {
216
212
  a.value.validate().then((t) => {
217
213
  t || u("submit", s.value);
218
214
  });
219
215
  }
220
- return (t, f) => (l(), k("div", nt, [i(e(H), {
216
+ return (t, c) => (n(), S("div", ot, [i(e(D), {
221
217
  ref_key: "formRef",
222
218
  ref: a,
223
219
  model: s.value,
@@ -236,9 +232,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
236
232
  message: "请输入有效的邮箱"
237
233
  }]
238
234
  }, {
239
- default: p(() => [i(e(C), {
235
+ default: p(() => [i(e(V), {
240
236
  modelValue: s.value.email,
241
- "onUpdate:modelValue": f[0] || (f[0] = (n) => s.value.email = n),
237
+ "onUpdate:modelValue": c[0] || (c[0] = (l) => s.value.email = l),
242
238
  placeholder: "请输入邮箱"
243
239
  }, null, 8, ["modelValue"])]),
244
240
  _: 1
@@ -251,11 +247,11 @@ const Ze = ["title", "aria-label", "disabled"], et = {
251
247
  message: "请输入验证码"
252
248
  }]
253
249
  }, {
254
- default: p(() => [_("div", rt, [i(e(C), {
250
+ default: p(() => [k("div", lt, [i(e(V), {
255
251
  modelValue: s.value.userToken,
256
- "onUpdate:modelValue": f[1] || (f[1] = (n) => s.value.userToken = n),
252
+ "onUpdate:modelValue": c[1] || (c[1] = (l) => s.value.userToken = l),
257
253
  placeholder: "请输入验证码"
258
- }, null, 8, ["modelValue"]), i(W, {
254
+ }, null, 8, ["modelValue"]), i(j, {
259
255
  ref_key: "SendVerifyCodeRef",
260
256
  ref: h,
261
257
  size: o.size,
@@ -278,9 +274,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
278
274
  message: "密码不能少于10字符"
279
275
  }]
280
276
  }, {
281
- default: p(() => [i(e(C), {
277
+ default: p(() => [i(e(V), {
282
278
  modelValue: s.value.password,
283
- "onUpdate:modelValue": f[2] || (f[2] = (n) => s.value.password = n),
279
+ "onUpdate:modelValue": c[2] || (c[2] = (l) => s.value.password = l),
284
280
  placeholder: "请输入密码",
285
281
  type: "password",
286
282
  autocomplete: ""
@@ -297,37 +293,37 @@ const Ze = ["title", "aria-label", "disabled"], et = {
297
293
  minLength: 10,
298
294
  message: "确认密码不能少于10字符"
299
295
  }, {
300
- validator: (n, w) => {
301
- n !== s.value.password ? w("两次密码输入不一致,请重新输入") : w();
296
+ validator: (l, _) => {
297
+ l !== s.value.password ? _("两次密码输入不一致,请重新输入") : _();
302
298
  }
303
299
  }]
304
300
  }, {
305
- default: p(() => [i(e(C), {
301
+ default: p(() => [i(e(V), {
306
302
  modelValue: s.value.confirmPassword,
307
- "onUpdate:modelValue": f[3] || (f[3] = (n) => s.value.confirmPassword = n),
303
+ "onUpdate:modelValue": c[3] || (c[3] = (l) => s.value.confirmPassword = l),
308
304
  placeholder: "请输入确认密码密码",
309
305
  type: "password",
310
306
  autocomplete: ""
311
307
  }, null, 8, ["modelValue"])]),
312
308
  _: 1
313
- }, 8, ["rules"]), _("div", ut, [i(e(B), {
309
+ }, 8, ["rules"]), k("div", nt, [i(e(O), {
314
310
  type: "primary",
315
311
  loading: o.loading,
316
312
  long: "",
317
313
  size: o.size,
318
- onClick: v
314
+ onClick: f
319
315
  }, {
320
- default: p(() => [...f[4] || (f[4] = [O(" 提交 ", -1)])]),
316
+ default: p(() => [...c[4] || (c[4] = [T(" 提交 ", -1)])]),
321
317
  _: 1
322
318
  }, 8, ["loading", "size"])])]),
323
319
  _: 1
324
320
  }, 8, ["model", "size"])]));
325
321
  }
326
- }), ct = /* @__PURE__ */ U(dt, [["__scopeId", "data-v-4091e418"]]), pt = {
322
+ }), ut = /* @__PURE__ */ U(rt, [["__scopeId", "data-v-4091e418"]]), dt = {
327
323
  class: "content"
328
- }, mt = {
324
+ }, ct = {
329
325
  class: "sendVerifyCodeItem"
330
- }, ft = /* @__PURE__ */ V({
326
+ }, pt = /* @__PURE__ */ C({
331
327
  __name: "AuthkitPhonePasswordUpdateAndVerify",
332
328
  props: {
333
329
  size: {
@@ -341,10 +337,10 @@ const Ze = ["title", "aria-label", "disabled"], et = {
341
337
  }
342
338
  },
343
339
  emits: ["submit"],
344
- setup(b, {
340
+ setup(w, {
345
341
  emit: r
346
342
  }) {
347
- const u = r, o = b, h = A(), g = A(!1), a = A(), s = A({
343
+ const u = r, o = w, h = I(), g = I(!1), a = I(), s = I({
348
344
  phone: void 0,
349
345
  code: void 0,
350
346
  password: void 0,
@@ -356,27 +352,27 @@ const Ze = ["title", "aria-label", "disabled"], et = {
356
352
  minLength: 10,
357
353
  message: "确认密码不能少于10字符"
358
354
  }, {
359
- validator: (f, n) => {
360
- if (f !== s.value.password) {
361
- n("两次密码输入不一致,请重新输入");
355
+ validator: (c, l) => {
356
+ if (c !== s.value.password) {
357
+ l("两次密码输入不一致,请重新输入");
362
358
  return;
363
359
  }
364
- n();
360
+ l();
365
361
  }
366
362
  }];
367
- async function v() {
363
+ async function f() {
368
364
  if (!await a.value.validateField(["phone"])) {
369
365
  g.value = !0;
370
- const n = await M().auth.verify.sms.send.post({
366
+ const l = await x().auth.verify.sms.send.post({
371
367
  phone: s.value.phone,
372
368
  purpose: "resetPassword"
373
369
  });
374
- g.value = !1, K(h.value, n);
370
+ g.value = !1, W(h.value, l);
375
371
  }
376
372
  }
377
373
  async function t() {
378
- a.value.validate().then((f) => {
379
- f || u("submit", {
374
+ a.value.validate().then((c) => {
375
+ c || u("submit", {
380
376
  method: "phone",
381
377
  phone: s.value.phone,
382
378
  code: s.value.code,
@@ -384,7 +380,7 @@ const Ze = ["title", "aria-label", "disabled"], et = {
384
380
  });
385
381
  });
386
382
  }
387
- return (f, n) => (l(), k("div", pt, [i(e(H), {
383
+ return (c, l) => (n(), S("div", dt, [i(e(D), {
388
384
  ref_key: "formRef",
389
385
  ref: a,
390
386
  model: s.value,
@@ -403,9 +399,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
403
399
  message: "请输入有效的手机号"
404
400
  }]
405
401
  }, {
406
- default: p(() => [i(e(C), {
402
+ default: p(() => [i(e(V), {
407
403
  modelValue: s.value.phone,
408
- "onUpdate:modelValue": n[0] || (n[0] = (w) => s.value.phone = w),
404
+ "onUpdate:modelValue": l[0] || (l[0] = (_) => s.value.phone = _),
409
405
  placeholder: "请输入手机号",
410
406
  autocomplete: "tel",
411
407
  type: "tel"
@@ -420,12 +416,12 @@ const Ze = ["title", "aria-label", "disabled"], et = {
420
416
  message: "请输入验证码"
421
417
  }]
422
418
  }, {
423
- default: p(() => [_("div", mt, [i(e(C), {
419
+ default: p(() => [k("div", ct, [i(e(V), {
424
420
  modelValue: s.value.code,
425
- "onUpdate:modelValue": n[1] || (n[1] = (w) => s.value.code = w),
421
+ "onUpdate:modelValue": l[1] || (l[1] = (_) => s.value.code = _),
426
422
  placeholder: "请输入验证码",
427
423
  autocomplete: "one-time-code"
428
- }, null, 8, ["modelValue"]), i(W, {
424
+ }, null, 8, ["modelValue"]), i(j, {
429
425
  ref_key: "SendVerifyCodeRef",
430
426
  ref: h,
431
427
  size: o.size,
@@ -433,7 +429,7 @@ const Ze = ["title", "aria-label", "disabled"], et = {
433
429
  style: {
434
430
  "margin-left": "10px"
435
431
  },
436
- onSend: v
432
+ onSend: f
437
433
  }, null, 8, ["size", "loading"])])]),
438
434
  _: 1
439
435
  }), i(e(P), {
@@ -448,9 +444,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
448
444
  message: "密码不能少于10字符"
449
445
  }]
450
446
  }, {
451
- default: p(() => [i(e(C), {
447
+ default: p(() => [i(e(V), {
452
448
  modelValue: s.value.password,
453
- "onUpdate:modelValue": n[2] || (n[2] = (w) => s.value.password = w),
449
+ "onUpdate:modelValue": l[2] || (l[2] = (_) => s.value.password = _),
454
450
  placeholder: "请输入密码",
455
451
  type: "password",
456
452
  autocomplete: "new-password"
@@ -462,58 +458,58 @@ const Ze = ["title", "aria-label", "disabled"], et = {
462
458
  "hide-label": "",
463
459
  rules: d
464
460
  }, {
465
- default: p(() => [i(e(C), {
461
+ default: p(() => [i(e(V), {
466
462
  modelValue: s.value.confirmPassword,
467
- "onUpdate:modelValue": n[3] || (n[3] = (w) => s.value.confirmPassword = w),
463
+ "onUpdate:modelValue": l[3] || (l[3] = (_) => s.value.confirmPassword = _),
468
464
  placeholder: "请输入确认密码",
469
465
  type: "password",
470
466
  autocomplete: "new-password"
471
467
  }, null, 8, ["modelValue"])]),
472
468
  _: 1
473
- }), i(e(B), {
469
+ }), i(e(O), {
474
470
  type: "primary",
475
471
  loading: o.loading,
476
472
  long: "",
477
473
  size: o.size,
478
474
  onClick: t
479
475
  }, {
480
- default: p(() => [...n[4] || (n[4] = [O(" 提交 ", -1)])]),
476
+ default: p(() => [...l[4] || (l[4] = [T(" 提交 ", -1)])]),
481
477
  _: 1
482
478
  }, 8, ["loading", "size"])]),
483
479
  _: 1
484
480
  }, 8, ["model", "size"])]));
485
481
  }
486
- }), vt = /* @__PURE__ */ U(ft, [["__scopeId", "data-v-a01a994e"]]), gt = {
482
+ }), mt = /* @__PURE__ */ U(pt, [["__scopeId", "data-v-a01a994e"]]), ft = {
487
483
  class: "SwitchSignIn"
488
- }, ht = /* @__PURE__ */ V({
484
+ }, vt = /* @__PURE__ */ C({
489
485
  __name: "AuthkitSwitchSignIn",
490
486
  emits: ["switchSignIn"],
491
- setup(b, {
487
+ setup(w, {
492
488
  emit: r
493
489
  }) {
494
490
  const u = r;
495
491
  function o() {
496
492
  u("switchSignIn");
497
493
  }
498
- return (h, g) => (l(), k("div", gt, [_("span", null, [g[1] || (g[1] = _("span", null, "已经有账号?", -1)), i(e(Y), {
494
+ return (h, g) => (n(), S("div", ft, [k("span", null, [g[1] || (g[1] = k("span", null, "已经有账号?", -1)), i(e(J), {
499
495
  style: {
500
496
  padding: "0px"
501
497
  },
502
498
  onClick: o
503
499
  }, {
504
- default: p(() => [...g[0] || (g[0] = [O("去登录", -1)])]),
500
+ default: p(() => [...g[0] || (g[0] = [T("去登录", -1)])]),
505
501
  _: 1
506
502
  })])]));
507
503
  }
508
- }), me = /* @__PURE__ */ U(ht, [["__scopeId", "data-v-c09d6c18"]]), yt = {
504
+ }), fe = /* @__PURE__ */ U(vt, [["__scopeId", "data-v-c09d6c18"]]), gt = {
509
505
  class: "ResetPassword"
510
- }, bt = {
506
+ }, ht = {
511
507
  key: 0,
512
508
  class: "tabsContainer"
513
- }, wt = {
509
+ }, yt = {
514
510
  key: 3,
515
511
  class: "empty"
516
- }, _t = /* @__PURE__ */ V({
512
+ }, bt = /* @__PURE__ */ C({
517
513
  __name: "AuthkitResetPassword",
518
514
  props: {
519
515
  size: {
@@ -528,12 +524,12 @@ const Ze = ["title", "aria-label", "disabled"], et = {
528
524
  }
529
525
  },
530
526
  emits: ["switchSignIn", "submit"],
531
- setup(b, {
527
+ setup(w, {
532
528
  emit: r
533
529
  }) {
534
- const u = r, o = b, {
530
+ const u = r, o = w, {
535
531
  appsData: h
536
- } = j(), g = T(() => h.value.authMethods), a = T(() => {
532
+ } = N(), g = R(() => h.value.authMethods), a = R(() => {
537
533
  const t = [];
538
534
  return g.value.login.emailPassword && t.push({
539
535
  key: "email",
@@ -542,57 +538,57 @@ const Ze = ["title", "aria-label", "disabled"], et = {
542
538
  key: "phone",
543
539
  title: "手机号找回"
544
540
  }), t;
545
- }), s = A("email");
546
- ne(() => {
541
+ }), s = I("email");
542
+ re(() => {
547
543
  var t;
548
- a.value.some((f) => f.key === s.value) || (s.value = ((t = a.value[0]) == null ? void 0 : t.key) || "email");
544
+ a.value.some((c) => c.key === s.value) || (s.value = ((t = a.value[0]) == null ? void 0 : t.key) || "email");
549
545
  });
550
546
  function d() {
551
547
  u("switchSignIn");
552
548
  }
553
- async function v(t) {
549
+ async function f(t) {
554
550
  u("submit", {
555
551
  method: s.value,
556
552
  ...t
557
553
  });
558
554
  }
559
- return (t, f) => (l(), k("div", yt, [a.value.length > 1 ? (l(), k("div", bt, [i(e(de), {
555
+ return (t, c) => (n(), S("div", gt, [a.value.length > 1 ? (n(), S("div", ht, [i(e(ce), {
560
556
  "active-key": s.value,
561
- "onUpdate:activeKey": f[0] || (f[0] = (n) => s.value = n)
557
+ "onUpdate:activeKey": c[0] || (c[0] = (l) => s.value = l)
562
558
  }, {
563
- default: p(() => [(l(!0), k(D, null, re(a.value, (n) => (l(), S(e(ce), {
564
- key: n.key,
565
- title: n.title
559
+ default: p(() => [(n(!0), S(F, null, ue(a.value, (l) => (n(), z(e(pe), {
560
+ key: l.key,
561
+ title: l.title
566
562
  }, null, 8, ["title"]))), 128))]),
567
563
  _: 1
568
- }, 8, ["active-key"])])) : I("", !0), s.value === "email" && g.value.login.emailPassword ? (l(), S(ct, {
564
+ }, 8, ["active-key"])])) : A("", !0), s.value === "email" && g.value.login.emailPassword ? (n(), z(ut, {
569
565
  key: 1,
570
- loading: b.loading,
566
+ loading: w.loading,
571
567
  size: o.size,
572
- onSubmit: v
573
- }, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (l(), S(vt, {
568
+ onSubmit: f
569
+ }, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (n(), z(mt, {
574
570
  key: 2,
575
- loading: b.loading,
571
+ loading: w.loading,
576
572
  size: o.size,
577
- onSubmit: v
578
- }, null, 8, ["loading", "size"])) : (l(), k("div", wt, "当前应用未开放找回密码")), i(me, {
573
+ onSubmit: f
574
+ }, null, 8, ["loading", "size"])) : (n(), S("div", yt, "当前应用未开放找回密码")), i(fe, {
579
575
  onSwitchSignIn: d
580
576
  })]));
581
577
  }
582
- }), kt = /* @__PURE__ */ U(_t, [["__scopeId", "data-v-90d789bb"]]);
583
- let se = null, ie = null;
584
- function St(b) {
585
- se = b.onPrivacyPolicy ?? null, ie = b.onUserServiceAgreement ?? null;
578
+ }), wt = /* @__PURE__ */ U(bt, [["__scopeId", "data-v-90d789bb"]]);
579
+ let te = null, se = null;
580
+ function _t(w) {
581
+ te = w.onPrivacyPolicy ?? null, se = w.onUserServiceAgreement ?? null;
586
582
  }
587
- function zt() {
588
- se == null || se();
583
+ function kt() {
584
+ te == null || te();
589
585
  }
590
- function It() {
591
- ie == null || ie();
586
+ function St() {
587
+ se == null || se();
592
588
  }
593
- const At = {
589
+ const zt = {
594
590
  key: 2
595
- }, Pt = /* @__PURE__ */ V({
591
+ }, It = /* @__PURE__ */ C({
596
592
  __name: "AuthkitServiceAgreementAndPrivacyProtection",
597
593
  props: /* @__PURE__ */ $e({
598
594
  currentView: {}
@@ -604,78 +600,78 @@ const At = {
604
600
  acceptedTermsModifiers: {}
605
601
  }),
606
602
  emits: ["update:acceptedTerms"],
607
- setup(b) {
603
+ setup(w) {
608
604
  const {
609
605
  config: r
610
- } = pe(), u = b, o = Ue(b, "acceptedTerms"), {
606
+ } = me(), u = w, o = Ue(w, "acceptedTerms"), {
611
607
  getLink: h,
612
608
  openLegalDoc: g
613
609
  } = Ie(), {
614
610
  termsShaking: a,
615
611
  requiresAcceptanceForSignUp: s,
616
612
  requiresAcceptanceForOAuth: d,
617
- syncAcceptedTerms: v
618
- } = F();
619
- ye(o, (z) => {
620
- v(z);
613
+ syncAcceptedTerms: f
614
+ } = L();
615
+ ne(o, (v) => {
616
+ f(v);
621
617
  });
622
- const t = T(() => {
623
- const z = h("userServiceAgreement");
624
- return z != null && z.configured ? z : void 0;
625
- }), f = T(() => {
626
- const z = h("privacyPolicy");
627
- return z != null && z.configured ? z : void 0;
628
- }), n = T(() => !!(t.value || f.value)), w = T(() => u.currentView === "signUp" ? s() : u.currentView === "signIn" ? d() : !1), c = T(() => n.value && w.value);
629
- function m() {
618
+ const t = R(() => {
619
+ const v = h("userServiceAgreement");
620
+ return v != null && v.configured ? v : void 0;
621
+ }), c = R(() => {
622
+ const v = h("privacyPolicy");
623
+ return v != null && v.configured ? v : void 0;
624
+ }), l = R(() => !!(t.value || c.value)), _ = R(() => u.currentView === "signUp" ? s() : u.currentView === "signIn" ? d() : !1), m = R(() => l.value && _.value);
625
+ function b() {
630
626
  if (r.legalDocsMode === "builtin") {
631
627
  g("userServiceAgreement");
632
628
  return;
633
629
  }
634
- It();
630
+ St();
635
631
  }
636
632
  function y() {
637
633
  if (r.legalDocsMode === "builtin") {
638
634
  g("privacyPolicy");
639
635
  return;
640
636
  }
641
- zt();
637
+ kt();
642
638
  }
643
- return (z, q) => c.value ? (l(), k("div", {
639
+ return (v, $) => m.value ? (n(), S("div", {
644
640
  key: 0,
645
- class: he(["ServiceAgreementAndPrivacyProtection", {
641
+ class: ye(["ServiceAgreementAndPrivacyProtection", {
646
642
  "terms-shake": e(a)
647
643
  }])
648
- }, [n.value ? (l(), k(D, {
644
+ }, [l.value ? (n(), S(F, {
649
645
  key: 0
650
- }, [w.value ? (l(), S(e(Oe), {
646
+ }, [_.value ? (n(), z(e(Oe), {
651
647
  key: 0,
652
648
  modelValue: o.value,
653
- "onUpdate:modelValue": q[0] || (q[0] = ($) => o.value = $),
649
+ "onUpdate:modelValue": $[0] || ($[0] = (q) => o.value = q),
654
650
  class: "terms-checkbox"
655
651
  }, {
656
- default: p(() => [...q[1] || (q[1] = [_("span", {
652
+ default: p(() => [...$[1] || ($[1] = [k("span", {
657
653
  class: "terms-text"
658
654
  }, "我已阅读并同意", -1)])]),
659
655
  _: 1
660
- }, 8, ["modelValue"])) : I("", !0), t.value ? (l(), S(e(Y), {
656
+ }, 8, ["modelValue"])) : A("", !0), t.value ? (n(), z(e(J), {
661
657
  key: 1,
662
- onClick: m
658
+ onClick: b
663
659
  }, {
664
- default: p(() => [O(L(t.value.label), 1)]),
660
+ default: p(() => [T(B(t.value.label), 1)]),
665
661
  _: 1
666
- })) : I("", !0), t.value && f.value ? (l(), k("span", At, "和")) : I("", !0), f.value ? (l(), S(e(Y), {
662
+ })) : A("", !0), t.value && c.value ? (n(), S("span", zt, "和")) : A("", !0), c.value ? (n(), z(e(J), {
667
663
  key: 3,
668
664
  onClick: y
669
665
  }, {
670
- default: p(() => [O(L(f.value.label), 1)]),
666
+ default: p(() => [T(B(c.value.label), 1)]),
671
667
  _: 1
672
- })) : I("", !0)], 64)) : I("", !0)], 2)) : I("", !0);
668
+ })) : A("", !0)], 64)) : A("", !0)], 2)) : A("", !0);
673
669
  }
674
- }), ee = /* @__PURE__ */ U(Pt, [["__scopeId", "data-v-a0c2f361"]]), Vt = {
670
+ }), X = /* @__PURE__ */ U(It, [["__scopeId", "data-v-a0c2f361"]]), At = {
675
671
  class: "content"
676
- }, Ct = {
672
+ }, Pt = {
677
673
  class: "handle"
678
- }, Ut = /* @__PURE__ */ V({
674
+ }, Vt = /* @__PURE__ */ C({
679
675
  __name: "AuthkitPasswordAuth",
680
676
  props: {
681
677
  size: {
@@ -693,25 +689,25 @@ const At = {
693
689
  }
694
690
  },
695
691
  emits: ["submit"],
696
- setup(b, {
692
+ setup(w, {
697
693
  emit: r
698
694
  }) {
699
695
  const u = r, {
700
696
  useTermsFormField: o
701
- } = F(), {
697
+ } = L(), {
702
698
  showTermsField: h,
703
699
  termsRules: g
704
- } = o("signIn"), a = b, s = A(), d = A({
700
+ } = o("signIn"), a = w, s = I(), d = I({
705
701
  identifier: void 0,
706
702
  password: void 0,
707
703
  acceptedTerms: !1
708
704
  });
709
- async function v() {
705
+ async function f() {
710
706
  s.value.validate().then((t) => {
711
707
  t || u("submit", d.value);
712
708
  });
713
709
  }
714
- return (t, f) => (l(), k("div", Vt, [i(e(H), {
710
+ return (t, c) => (n(), S("div", At, [i(e(D), {
715
711
  ref_key: "formRef",
716
712
  ref: s,
717
713
  model: d.value,
@@ -727,11 +723,11 @@ const At = {
727
723
  message: "请输入邮箱或手机号"
728
724
  }]
729
725
  }, {
730
- default: p(() => [i(e(C), {
726
+ default: p(() => [i(e(V), {
731
727
  modelValue: d.value.identifier,
732
- "onUpdate:modelValue": f[0] || (f[0] = (n) => d.value.identifier = n),
728
+ "onUpdate:modelValue": c[0] || (c[0] = (l) => d.value.identifier = l),
733
729
  placeholder: a.allowPhone ? "请输入邮箱或手机号" : "请输入邮箱",
734
- autocomplete: "email username"
730
+ autocomplete: "username webauthn"
735
731
  }, null, 8, ["modelValue", "placeholder"])]),
736
732
  _: 1
737
733
  }), i(e(P), {
@@ -743,48 +739,48 @@ const At = {
743
739
  message: "请输入密码"
744
740
  }]
745
741
  }, {
746
- default: p(() => [i(e(C), {
742
+ default: p(() => [i(e(V), {
747
743
  modelValue: d.value.password,
748
- "onUpdate:modelValue": f[1] || (f[1] = (n) => d.value.password = n),
744
+ "onUpdate:modelValue": c[1] || (c[1] = (l) => d.value.password = l),
749
745
  placeholder: "请输入密码",
750
746
  type: "password",
751
747
  autocomplete: "current-password"
752
748
  }, null, 8, ["modelValue"])]),
753
749
  _: 1
754
- }), _("div", Ct, [i(e(B), {
750
+ }), k("div", Pt, [i(e(O), {
755
751
  type: "primary",
756
752
  loading: a.loading,
757
753
  long: "",
758
754
  size: a.size,
759
- onClick: v
755
+ onClick: f
760
756
  }, {
761
- default: p(() => [...f[3] || (f[3] = [O(" 登录 ", -1)])]),
757
+ default: p(() => [...c[3] || (c[3] = [T(" 登录 ", -1)])]),
762
758
  _: 1
763
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
759
+ }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
764
760
  key: 0,
765
761
  field: "acceptedTerms",
766
762
  "hide-label": "",
767
763
  rules: e(g)
768
764
  }, {
769
- default: p(() => [i(ee, {
765
+ default: p(() => [i(X, {
770
766
  "accepted-terms": d.value.acceptedTerms,
771
- "onUpdate:acceptedTerms": f[2] || (f[2] = (n) => d.value.acceptedTerms = n),
767
+ "onUpdate:acceptedTerms": c[2] || (c[2] = (l) => d.value.acceptedTerms = l),
772
768
  "current-view": "signIn"
773
769
  }, null, 8, ["accepted-terms"])]),
774
770
  _: 1
775
- }, 8, ["rules"])) : I("", !0)])]),
771
+ }, 8, ["rules"])) : A("", !0)])]),
776
772
  _: 1
777
773
  }, 8, ["model", "size"])]));
778
774
  }
779
- }), $t = /* @__PURE__ */ U(Ut, [["__scopeId", "data-v-cca59a39"]]), Rt = {
775
+ }), Ct = /* @__PURE__ */ U(Vt, [["__scopeId", "data-v-1e935b15"]]), Ut = {
780
776
  class: "SignInPhone"
781
- }, Tt = {
777
+ }, $t = {
782
778
  class: "content"
783
- }, qt = {
779
+ }, Rt = {
784
780
  class: "sendVerifyCodeItem"
785
- }, Ot = {
781
+ }, Tt = {
786
782
  class: "handle"
787
- }, xt = /* @__PURE__ */ V({
783
+ }, qt = /* @__PURE__ */ C({
788
784
  __name: "AuthkitSignInPhone",
789
785
  props: {
790
786
  size: {
@@ -798,41 +794,41 @@ const At = {
798
794
  }
799
795
  },
800
796
  emits: ["submit"],
801
- setup(b, {
797
+ setup(w, {
802
798
  emit: r
803
799
  }) {
804
800
  const u = r, {
805
801
  useTermsFormField: o
806
- } = F(), {
802
+ } = L(), {
807
803
  showTermsField: h,
808
804
  termsRules: g
809
- } = o("signIn"), a = b, s = A(), d = A(!1), v = A(), t = A({
805
+ } = o("signIn"), a = w, s = I(), d = I(!1), f = I(), t = I({
810
806
  phone: void 0,
811
807
  code: void 0,
812
808
  acceptedTerms: !1
813
809
  });
814
- async function f() {
815
- if (!await v.value.validateField(["phone"])) {
810
+ async function c() {
811
+ if (!await f.value.validateField(["phone"])) {
816
812
  d.value = !0;
817
- const c = await M().auth.verify.sms.send.post({
813
+ const m = await x().auth.verify.sms.send.post({
818
814
  phone: t.value.phone,
819
815
  purpose: "signIn"
820
816
  });
821
- d.value = !1, K(s.value, c);
817
+ d.value = !1, W(s.value, m);
822
818
  }
823
819
  }
824
- async function n() {
825
- v.value.validate().then((w) => {
826
- w || u("submit", {
820
+ async function l() {
821
+ f.value.validate().then((_) => {
822
+ _ || u("submit", {
827
823
  identifier: t.value.phone,
828
824
  code: t.value.code,
829
825
  method: "code"
830
826
  });
831
827
  });
832
828
  }
833
- return (w, c) => (l(), k("div", Rt, [_("div", Tt, [i(e(H), {
829
+ return (_, m) => (n(), S("div", Ut, [k("div", $t, [i(e(D), {
834
830
  ref_key: "formRef",
835
- ref: v,
831
+ ref: f,
836
832
  model: t.value,
837
833
  size: a.size,
838
834
  "auto-label-width": ""
@@ -849,11 +845,11 @@ const At = {
849
845
  message: "请输入有效的手机号"
850
846
  }]
851
847
  }, {
852
- default: p(() => [i(e(C), {
848
+ default: p(() => [i(e(V), {
853
849
  modelValue: t.value.phone,
854
- "onUpdate:modelValue": c[0] || (c[0] = (m) => t.value.phone = m),
850
+ "onUpdate:modelValue": m[0] || (m[0] = (b) => t.value.phone = b),
855
851
  placeholder: "请输入手机号",
856
- autocomplete: "tel",
852
+ autocomplete: "username webauthn",
857
853
  type: "tel"
858
854
  }, null, 8, ["modelValue"])]),
859
855
  _: 1
@@ -866,12 +862,12 @@ const At = {
866
862
  message: "请输入验证码"
867
863
  }]
868
864
  }, {
869
- default: p(() => [_("div", qt, [i(e(C), {
865
+ default: p(() => [k("div", Rt, [i(e(V), {
870
866
  modelValue: t.value.code,
871
- "onUpdate:modelValue": c[1] || (c[1] = (m) => t.value.code = m),
867
+ "onUpdate:modelValue": m[1] || (m[1] = (b) => t.value.code = b),
872
868
  placeholder: "请输入验证码",
873
869
  autocomplete: "one-time-code"
874
- }, null, 8, ["modelValue"]), i(W, {
870
+ }, null, 8, ["modelValue"]), i(j, {
875
871
  ref_key: "SendVerifyCodeRef",
876
872
  ref: s,
877
873
  size: a.size,
@@ -879,41 +875,41 @@ const At = {
879
875
  style: {
880
876
  "margin-left": "10px"
881
877
  },
882
- onSend: f
878
+ onSend: c
883
879
  }, null, 8, ["size", "loading"])])]),
884
880
  _: 1
885
- }), _("div", Ot, [i(e(B), {
881
+ }), k("div", Tt, [i(e(O), {
886
882
  type: "primary",
887
883
  loading: a.loading,
888
884
  long: "",
889
885
  size: a.size,
890
- onClick: n
886
+ onClick: l
891
887
  }, {
892
- default: p(() => [...c[3] || (c[3] = [O(" 登录 ", -1)])]),
888
+ default: p(() => [...m[3] || (m[3] = [T(" 登录 ", -1)])]),
893
889
  _: 1
894
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
890
+ }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
895
891
  key: 0,
896
892
  field: "acceptedTerms",
897
893
  "hide-label": "",
898
894
  rules: e(g)
899
895
  }, {
900
- default: p(() => [i(ee, {
896
+ default: p(() => [i(X, {
901
897
  "accepted-terms": t.value.acceptedTerms,
902
- "onUpdate:acceptedTerms": c[2] || (c[2] = (m) => t.value.acceptedTerms = m),
898
+ "onUpdate:acceptedTerms": m[2] || (m[2] = (b) => t.value.acceptedTerms = b),
903
899
  "current-view": "signIn"
904
900
  }, null, 8, ["accepted-terms"])]),
905
901
  _: 1
906
- }, 8, ["rules"])) : I("", !0)])]),
902
+ }, 8, ["rules"])) : A("", !0)])]),
907
903
  _: 1
908
904
  }, 8, ["model", "size"])])]));
909
905
  }
910
- }), Lt = /* @__PURE__ */ U(xt, [["__scopeId", "data-v-ef67e91c"]]), Bt = {
906
+ }), Ot = /* @__PURE__ */ U(qt, [["__scopeId", "data-v-fa7bbccf"]]), xt = {
911
907
  class: "SignInEmailCode"
912
- }, Mt = {
908
+ }, Bt = {
913
909
  class: "sendVerifyCodeItem"
914
- }, Ft = {
910
+ }, Lt = {
915
911
  class: "handle"
916
- }, Dt = /* @__PURE__ */ V({
912
+ }, Ft = /* @__PURE__ */ C({
917
913
  __name: "AuthkitSignInEmailCode",
918
914
  props: {
919
915
  size: {
@@ -927,34 +923,34 @@ const At = {
927
923
  }
928
924
  },
929
925
  emits: ["submit"],
930
- setup(b, {
926
+ setup(w, {
931
927
  emit: r
932
928
  }) {
933
929
  const u = r, {
934
930
  useTermsFormField: o
935
- } = F(), {
931
+ } = L(), {
936
932
  showTermsField: h,
937
933
  termsRules: g
938
- } = o("signIn"), a = b, s = A(), d = A(!1), v = A(), t = A({
934
+ } = o("signIn"), a = w, s = I(), d = I(!1), f = I(), t = I({
939
935
  email: void 0,
940
936
  code: void 0,
941
937
  emailVerifyId: "",
942
938
  acceptedTerms: !1
943
939
  });
944
- async function f() {
945
- var c;
946
- if (!await v.value.validateField(["email"])) {
940
+ async function c() {
941
+ var m;
942
+ if (!await f.value.validateField(["email"])) {
947
943
  d.value = !0;
948
- const m = await M().auth.verify.email.retry.post({
944
+ const b = await x().auth.verify.email.retry.post({
949
945
  email: t.value.email,
950
946
  purpose: "signIn"
951
947
  });
952
- d.value = !1, (c = m.data) != null && c.emailVerifyId && (t.value.emailVerifyId = m.data.emailVerifyId), K(s.value, m);
948
+ d.value = !1, (m = b.data) != null && m.emailVerifyId && (t.value.emailVerifyId = b.data.emailVerifyId), W(s.value, b);
953
949
  }
954
950
  }
955
- async function n() {
956
- v.value.validate().then((w) => {
957
- w || u("submit", {
951
+ async function l() {
952
+ f.value.validate().then((_) => {
953
+ _ || u("submit", {
958
954
  identifier: t.value.email,
959
955
  code: t.value.code,
960
956
  emailVerifyId: t.value.emailVerifyId,
@@ -962,9 +958,9 @@ const At = {
962
958
  });
963
959
  });
964
960
  }
965
- return (w, c) => (l(), k("div", Bt, [i(e(H), {
961
+ return (_, m) => (n(), S("div", xt, [i(e(D), {
966
962
  ref_key: "formRef",
967
- ref: v,
963
+ ref: f,
968
964
  model: t.value,
969
965
  size: a.size,
970
966
  "auto-label-width": ""
@@ -980,11 +976,11 @@ const At = {
980
976
  message: "请输入有效的邮箱"
981
977
  }]
982
978
  }, {
983
- default: p(() => [i(e(C), {
979
+ default: p(() => [i(e(V), {
984
980
  modelValue: t.value.email,
985
- "onUpdate:modelValue": c[0] || (c[0] = (m) => t.value.email = m),
981
+ "onUpdate:modelValue": m[0] || (m[0] = (b) => t.value.email = b),
986
982
  placeholder: "请输入邮箱",
987
- autocomplete: "email"
983
+ autocomplete: "username webauthn"
988
984
  }, null, 8, ["modelValue"])]),
989
985
  _: 1
990
986
  }), i(e(P), {
@@ -995,12 +991,12 @@ const At = {
995
991
  message: "请输入验证码"
996
992
  }]
997
993
  }, {
998
- default: p(() => [_("div", Mt, [i(e(C), {
994
+ default: p(() => [k("div", Bt, [i(e(V), {
999
995
  modelValue: t.value.code,
1000
- "onUpdate:modelValue": c[1] || (c[1] = (m) => t.value.code = m),
996
+ "onUpdate:modelValue": m[1] || (m[1] = (b) => t.value.code = b),
1001
997
  placeholder: "请输入验证码",
1002
998
  autocomplete: "one-time-code"
1003
- }, null, 8, ["modelValue"]), i(W, {
999
+ }, null, 8, ["modelValue"]), i(j, {
1004
1000
  ref_key: "SendVerifyCodeRef",
1005
1001
  ref: s,
1006
1002
  size: a.size,
@@ -1008,39 +1004,39 @@ const At = {
1008
1004
  style: {
1009
1005
  "margin-left": "10px"
1010
1006
  },
1011
- onSend: f
1007
+ onSend: c
1012
1008
  }, null, 8, ["size", "loading"])])]),
1013
1009
  _: 1
1014
- }), _("div", Ft, [i(e(B), {
1010
+ }), k("div", Lt, [i(e(O), {
1015
1011
  type: "primary",
1016
1012
  loading: a.loading,
1017
1013
  long: "",
1018
1014
  size: a.size,
1019
- onClick: n
1015
+ onClick: l
1020
1016
  }, {
1021
- default: p(() => [...c[3] || (c[3] = [O(" 登录 ", -1)])]),
1017
+ default: p(() => [...m[3] || (m[3] = [T(" 登录 ", -1)])]),
1022
1018
  _: 1
1023
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
1019
+ }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
1024
1020
  key: 0,
1025
1021
  field: "acceptedTerms",
1026
1022
  "hide-label": "",
1027
1023
  rules: e(g)
1028
1024
  }, {
1029
- default: p(() => [i(ee, {
1025
+ default: p(() => [i(X, {
1030
1026
  "accepted-terms": t.value.acceptedTerms,
1031
- "onUpdate:acceptedTerms": c[2] || (c[2] = (m) => t.value.acceptedTerms = m),
1027
+ "onUpdate:acceptedTerms": m[2] || (m[2] = (b) => t.value.acceptedTerms = b),
1032
1028
  "current-view": "signIn"
1033
1029
  }, null, 8, ["accepted-terms"])]),
1034
1030
  _: 1
1035
- }, 8, ["rules"])) : I("", !0)])]),
1031
+ }, 8, ["rules"])) : A("", !0)])]),
1036
1032
  _: 1
1037
1033
  }, 8, ["model", "size"])]));
1038
1034
  }
1039
- }), Et = /* @__PURE__ */ U(Dt, [["__scopeId", "data-v-fee4702f"]]), Ht = {
1035
+ }), Mt = /* @__PURE__ */ U(Ft, [["__scopeId", "data-v-2f4189ae"]]), Dt = {
1040
1036
  class: "SwitchSignUpOrResetPassword"
1041
- }, Gt = {
1037
+ }, Et = {
1042
1038
  key: 0
1043
- }, Nt = /* @__PURE__ */ V({
1039
+ }, Ht = /* @__PURE__ */ C({
1044
1040
  __name: "AuthkitSwitchSignUpOrResetPassword",
1045
1041
  props: {
1046
1042
  showSignUp: {
@@ -1053,41 +1049,41 @@ const At = {
1053
1049
  }
1054
1050
  },
1055
1051
  emits: ["switchSignUp", "switchResetPassword"],
1056
- setup(b, {
1052
+ setup(w, {
1057
1053
  emit: r
1058
1054
  }) {
1059
- const u = b, o = r;
1055
+ const u = w, o = r;
1060
1056
  function h() {
1061
1057
  o("switchSignUp");
1062
1058
  }
1063
1059
  function g() {
1064
1060
  o("switchResetPassword");
1065
1061
  }
1066
- return (a, s) => (l(), k("div", Ht, [u.showSignUp ? (l(), k("span", Gt, [s[1] || (s[1] = _("span", null, " 还没有账户?", -1)), i(e(Y), {
1062
+ return (a, s) => (n(), S("div", Dt, [u.showSignUp ? (n(), S("span", Et, [s[1] || (s[1] = k("span", null, " 还没有账户?", -1)), i(e(J), {
1067
1063
  style: {
1068
1064
  padding: "0px"
1069
1065
  },
1070
1066
  onClick: h
1071
1067
  }, {
1072
- default: p(() => [...s[0] || (s[0] = [O("去注册?", -1)])]),
1068
+ default: p(() => [...s[0] || (s[0] = [T("去注册?", -1)])]),
1073
1069
  _: 1
1074
- })])) : I("", !0), u.showResetPassword ? (l(), S(e(Y), {
1070
+ })])) : A("", !0), u.showResetPassword ? (n(), z(e(J), {
1075
1071
  key: 1,
1076
1072
  style: {
1077
1073
  padding: "0px"
1078
1074
  },
1079
1075
  onClick: g
1080
1076
  }, {
1081
- default: p(() => [...s[2] || (s[2] = [O(" 忘记密码? ", -1)])]),
1077
+ default: p(() => [...s[2] || (s[2] = [T(" 忘记密码? ", -1)])]),
1082
1078
  _: 1
1083
- })) : I("", !0)]));
1079
+ })) : A("", !0)]));
1084
1080
  }
1085
- }), jt = /* @__PURE__ */ U(Nt, [["__scopeId", "data-v-6ca7b1f2"]]), Wt = {
1081
+ }), Gt = /* @__PURE__ */ U(Ht, [["__scopeId", "data-v-6ca7b1f2"]]), Nt = {
1086
1082
  class: "SignIn"
1087
- }, Kt = {
1083
+ }, jt = {
1088
1084
  key: 0,
1089
1085
  class: "tabsContainer"
1090
- }, Jt = /* @__PURE__ */ V({
1086
+ }, Wt = /* @__PURE__ */ C({
1091
1087
  __name: "AuthkitSignIn",
1092
1088
  props: {
1093
1089
  size: {
@@ -1101,83 +1097,90 @@ const At = {
1101
1097
  }
1102
1098
  },
1103
1099
  emits: ["submit", "switchSignUp", "switchResetPassword"],
1104
- setup(b, {
1100
+ setup(w, {
1105
1101
  emit: r
1106
1102
  }) {
1107
- const u = r, o = b, h = Re(), g = T(() => !!h.OAuth), {
1103
+ const u = r, o = w, h = Re(), g = R(() => !!h.OAuth), {
1108
1104
  appsData: a
1109
- } = j(), {
1105
+ } = N(), {
1110
1106
  signUpAuthEnabled: s
1111
- } = F(), d = T(() => a.value.authMethods), v = T(() => s.value && (d.value.signUp.email || d.value.signUp.phone)), t = T(() => d.value.login.emailPassword || d.value.login.phonePassword), f = T(() => {
1112
- const y = [];
1113
- return (d.value.login.emailPassword || d.value.login.phonePassword) && y.push({
1107
+ } = L(), d = R(() => a.value.authMethods), f = R(() => s.value && (d.value.signUp.email || d.value.signUp.phone)), t = R(() => d.value.login.emailPassword || d.value.login.phonePassword), c = R(() => {
1108
+ const v = [];
1109
+ return (d.value.login.emailPassword || d.value.login.phonePassword) && v.push({
1114
1110
  key: "password",
1115
1111
  title: "密码登录"
1116
- }), d.value.login.phoneCode && y.push({
1112
+ }), d.value.login.phoneCode && v.push({
1117
1113
  key: "phoneCode",
1118
1114
  title: "手机验证码登录"
1119
- }), d.value.login.emailCode && y.push({
1115
+ }), d.value.login.emailCode && v.push({
1120
1116
  key: "emailCode",
1121
1117
  title: "邮箱验证码登录"
1122
- }), y;
1123
- }), n = A("password");
1124
- ne(() => {
1125
- var y;
1126
- f.value.some((z) => z.key === n.value) || (n.value = ((y = f.value[0]) == null ? void 0 : y.key) || "password");
1118
+ }), v;
1119
+ }), l = I("password"), _ = I("");
1120
+ re(() => {
1121
+ var v;
1122
+ c.value.some(($) => $.key === l.value) || (l.value = ((v = c.value[0]) == null ? void 0 : v.key) || "password");
1127
1123
  });
1128
- function w() {
1124
+ function m() {
1129
1125
  u("switchSignUp");
1130
1126
  }
1131
- function c() {
1127
+ function b() {
1132
1128
  u("switchResetPassword");
1133
1129
  }
1134
- async function m(y) {
1130
+ async function y(v) {
1135
1131
  u("submit", {
1136
- method: n.value === "password" ? "password" : "code",
1137
- ...y
1132
+ method: l.value === "password" ? "password" : "code",
1133
+ ...v
1138
1134
  });
1139
1135
  }
1140
- return (y, z) => (l(), k("div", Wt, [f.value.length > 1 ? (l(), k("div", Kt, [i(e(de), {
1141
- "active-key": n.value,
1142
- "onUpdate:activeKey": z[0] || (z[0] = (q) => n.value = q)
1136
+ return (v, $) => (n(), S("div", Nt, [c.value.length > 1 ? (n(), S("div", jt, [i(e(ce), {
1137
+ "active-key": l.value,
1138
+ "onUpdate:activeKey": $[0] || ($[0] = (q) => l.value = q)
1143
1139
  }, {
1144
- default: p(() => [(l(!0), k(D, null, re(f.value, (q) => (l(), S(e(ce), {
1140
+ default: p(() => [(n(!0), S(F, null, ue(c.value, (q) => (n(), z(e(pe), {
1145
1141
  key: q.key,
1146
1142
  title: q.title
1147
1143
  }, null, 8, ["title"]))), 128))]),
1148
1144
  _: 1
1149
- }, 8, ["active-key"])])) : I("", !0), n.value === "password" && (d.value.login.emailPassword || d.value.login.phonePassword) ? (l(), S($t, {
1145
+ }, 8, ["active-key"])])) : A("", !0), l.value === "password" && (d.value.login.emailPassword || d.value.login.phonePassword) ? (n(), z(Ct, {
1150
1146
  key: 1,
1151
1147
  loading: o.loading,
1152
1148
  size: o.size,
1153
1149
  "allow-phone": d.value.login.phonePassword,
1154
- onSubmit: m
1155
- }, null, 8, ["loading", "size", "allow-phone"])) : n.value === "phoneCode" ? (l(), S(Lt, {
1150
+ onSubmit: y
1151
+ }, null, 8, ["loading", "size", "allow-phone"])) : l.value === "phoneCode" ? (n(), z(Ot, {
1156
1152
  key: 2,
1157
1153
  loading: o.loading,
1158
1154
  size: o.size,
1159
- onSubmit: m
1160
- }, null, 8, ["loading", "size"])) : n.value === "emailCode" ? (l(), S(Et, {
1155
+ onSubmit: y
1156
+ }, null, 8, ["loading", "size"])) : l.value === "emailCode" ? (n(), z(Mt, {
1161
1157
  key: 3,
1162
1158
  loading: o.loading,
1163
1159
  size: o.size,
1164
- onSubmit: m
1165
- }, null, 8, ["loading", "size"])) : I("", !0), g.value ? Z(y.$slots, "OAuth", {
1166
- key: 4
1167
- }, void 0, !0) : I("", !0), i(jt, {
1168
- "show-sign-up": v.value,
1160
+ onSubmit: y
1161
+ }, null, 8, ["loading", "size"])) : d.value.login.passkey ? (n(), z(e(V), {
1162
+ key: 4,
1163
+ modelValue: _.value,
1164
+ "onUpdate:modelValue": $[1] || ($[1] = (q) => _.value = q),
1165
+ size: o.size,
1166
+ autocomplete: "username webauthn",
1167
+ placeholder: "请选择已绑定的通行密钥"
1168
+ }, null, 8, ["modelValue", "size"])) : A("", !0), g.value ? Q(v.$slots, "OAuth", {
1169
+ key: 5
1170
+ }, void 0, !0) : A("", !0), i(Gt, {
1171
+ "show-sign-up": f.value,
1169
1172
  "show-reset-password": t.value,
1170
- onSwitchSignUp: w,
1171
- onSwitchResetPassword: c
1173
+ onSwitchSignUp: m,
1174
+ onSwitchResetPassword: b
1172
1175
  }, null, 8, ["show-sign-up", "show-reset-password"])]));
1173
1176
  }
1174
- }), Qt = /* @__PURE__ */ U(Jt, [["__scopeId", "data-v-a7aef80e"]]), Xt = {
1177
+ }), Kt = /* @__PURE__ */ U(Wt, [["__scopeId", "data-v-c3eb10b3"]]), Jt = {
1175
1178
  class: "content"
1176
- }, Yt = {
1179
+ }, Qt = {
1177
1180
  class: "sendVerifyCodeItem"
1178
- }, Zt = {
1181
+ }, Xt = {
1179
1182
  class: "handle"
1180
- }, es = /* @__PURE__ */ V({
1183
+ }, Yt = /* @__PURE__ */ C({
1181
1184
  __name: "AuthkitEmailUpdate",
1182
1185
  props: {
1183
1186
  size: {
@@ -1195,15 +1198,15 @@ const At = {
1195
1198
  }
1196
1199
  },
1197
1200
  emits: ["submit"],
1198
- setup(b, {
1201
+ setup(w, {
1199
1202
  emit: r
1200
1203
  }) {
1201
1204
  const u = r, {
1202
1205
  useTermsFormField: o
1203
- } = F(), {
1206
+ } = L(), {
1204
1207
  showTermsField: h,
1205
1208
  termsRules: g
1206
- } = o("signUp"), a = b, s = A(), d = A(!1), v = A(), t = A({
1209
+ } = o("signUp"), a = w, s = I(), d = I(!1), f = I(), t = I({
1207
1210
  email: void 0,
1208
1211
  userToken: void 0,
1209
1212
  emailVerifyId: void 0,
@@ -1212,28 +1215,28 @@ const At = {
1212
1215
  inviteCode: void 0,
1213
1216
  acceptedTerms: !1
1214
1217
  });
1215
- E(() => {
1216
- const w = Se();
1217
- w && (t.value.inviteCode = w);
1218
+ M(() => {
1219
+ const _ = Se();
1220
+ _ && (t.value.inviteCode = _);
1218
1221
  });
1219
- async function f() {
1220
- if (!await v.value.validateField(["email"])) {
1222
+ async function c() {
1223
+ if (!await f.value.validateField(["email"])) {
1221
1224
  d.value = !0;
1222
- const c = await M().auth.verify.email.retry.post({
1225
+ const m = await x().auth.verify.email.retry.post({
1223
1226
  email: t.value.email,
1224
1227
  purpose: a.purpose
1225
1228
  });
1226
- d.value = !1, c.data && (t.value.emailVerifyId = c.data.emailVerifyId), K(s.value, c);
1229
+ d.value = !1, m.data && (t.value.emailVerifyId = m.data.emailVerifyId), W(s.value, m);
1227
1230
  }
1228
1231
  }
1229
- async function n() {
1230
- v.value.validate().then((w) => {
1231
- w || u("submit", t.value);
1232
+ async function l() {
1233
+ f.value.validate().then((_) => {
1234
+ _ || u("submit", t.value);
1232
1235
  });
1233
1236
  }
1234
- return (w, c) => (l(), k("div", Xt, [i(e(H), {
1237
+ return (_, m) => (n(), S("div", Jt, [i(e(D), {
1235
1238
  ref_key: "formRef",
1236
- ref: v,
1239
+ ref: f,
1237
1240
  model: t.value,
1238
1241
  size: a.size,
1239
1242
  "auto-label-width": ""
@@ -1250,9 +1253,9 @@ const At = {
1250
1253
  message: "请输入有效的邮箱"
1251
1254
  }]
1252
1255
  }, {
1253
- default: p(() => [i(e(C), {
1256
+ default: p(() => [i(e(V), {
1254
1257
  modelValue: t.value.email,
1255
- "onUpdate:modelValue": c[0] || (c[0] = (m) => t.value.email = m),
1258
+ "onUpdate:modelValue": m[0] || (m[0] = (b) => t.value.email = b),
1256
1259
  placeholder: "请输入邮箱",
1257
1260
  autocomplete: "email username",
1258
1261
  type: "email"
@@ -1267,12 +1270,12 @@ const At = {
1267
1270
  message: "请输入验证码"
1268
1271
  }]
1269
1272
  }, {
1270
- default: p(() => [_("div", Yt, [i(e(C), {
1273
+ default: p(() => [k("div", Qt, [i(e(V), {
1271
1274
  modelValue: t.value.userToken,
1272
- "onUpdate:modelValue": c[1] || (c[1] = (m) => t.value.userToken = m),
1275
+ "onUpdate:modelValue": m[1] || (m[1] = (b) => t.value.userToken = b),
1273
1276
  placeholder: "请输入验证码",
1274
1277
  autocomplete: "one-time-code"
1275
- }, null, 8, ["modelValue"]), i(W, {
1278
+ }, null, 8, ["modelValue"]), i(j, {
1276
1279
  ref_key: "SendVerifyCodeRef",
1277
1280
  ref: s,
1278
1281
  size: a.size,
@@ -1280,7 +1283,7 @@ const At = {
1280
1283
  style: {
1281
1284
  "margin-left": "10px"
1282
1285
  },
1283
- onSend: f
1286
+ onSend: c
1284
1287
  }, null, 8, ["size", "loading"])])]),
1285
1288
  _: 1
1286
1289
  }), i(e(P), {
@@ -1295,9 +1298,9 @@ const At = {
1295
1298
  message: "密码不能少于10字符"
1296
1299
  }]
1297
1300
  }, {
1298
- default: p(() => [i(e(C), {
1301
+ default: p(() => [i(e(V), {
1299
1302
  modelValue: t.value.password,
1300
- "onUpdate:modelValue": c[2] || (c[2] = (m) => t.value.password = m),
1303
+ "onUpdate:modelValue": m[2] || (m[2] = (b) => t.value.password = b),
1301
1304
  placeholder: "请输入密码",
1302
1305
  type: "password",
1303
1306
  autocomplete: "new-password"
@@ -1314,14 +1317,14 @@ const At = {
1314
1317
  minLength: 10,
1315
1318
  message: "确认密码不能少于10字符"
1316
1319
  }, {
1317
- validator: (m, y) => {
1318
- m !== t.value.password ? y("两次密码输入不一致,请重新输入") : y();
1320
+ validator: (b, y) => {
1321
+ b !== t.value.password ? y("两次密码输入不一致,请重新输入") : y();
1319
1322
  }
1320
1323
  }]
1321
1324
  }, {
1322
- default: p(() => [i(e(C), {
1325
+ default: p(() => [i(e(V), {
1323
1326
  modelValue: t.value.confirmPassword,
1324
- "onUpdate:modelValue": c[3] || (c[3] = (m) => t.value.confirmPassword = m),
1327
+ "onUpdate:modelValue": m[3] || (m[3] = (b) => t.value.confirmPassword = b),
1325
1328
  placeholder: "请输入确认密码密码",
1326
1329
  type: "password",
1327
1330
  autocomplete: "new-password"
@@ -1335,47 +1338,47 @@ const At = {
1335
1338
  required: !1
1336
1339
  }]
1337
1340
  }, {
1338
- default: p(() => [i(e(C), {
1341
+ default: p(() => [i(e(V), {
1339
1342
  modelValue: t.value.inviteCode,
1340
- "onUpdate:modelValue": c[4] || (c[4] = (m) => t.value.inviteCode = m),
1343
+ "onUpdate:modelValue": m[4] || (m[4] = (b) => t.value.inviteCode = b),
1341
1344
  placeholder: "邀请码(可选)",
1342
1345
  autocomplete: "off"
1343
1346
  }, null, 8, ["modelValue"])]),
1344
1347
  _: 1
1345
- }), _("div", Zt, [i(e(B), {
1348
+ }), k("div", Xt, [i(e(O), {
1346
1349
  type: "primary",
1347
1350
  loading: a.loading,
1348
1351
  long: "",
1349
1352
  size: a.size,
1350
- onClick: n
1353
+ onClick: l
1351
1354
  }, {
1352
- default: p(() => [...c[6] || (c[6] = [O(" 提交 ", -1)])]),
1355
+ default: p(() => [...m[6] || (m[6] = [T(" 提交 ", -1)])]),
1353
1356
  _: 1
1354
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
1357
+ }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
1355
1358
  key: 0,
1356
1359
  field: "acceptedTerms",
1357
1360
  "hide-label": "",
1358
1361
  rules: e(g)
1359
1362
  }, {
1360
- default: p(() => [i(ee, {
1363
+ default: p(() => [i(X, {
1361
1364
  "accepted-terms": t.value.acceptedTerms,
1362
- "onUpdate:acceptedTerms": c[5] || (c[5] = (m) => t.value.acceptedTerms = m),
1365
+ "onUpdate:acceptedTerms": m[5] || (m[5] = (b) => t.value.acceptedTerms = b),
1363
1366
  "current-view": "signUp"
1364
1367
  }, null, 8, ["accepted-terms"])]),
1365
1368
  _: 1
1366
- }, 8, ["rules"])) : I("", !0)])]),
1369
+ }, 8, ["rules"])) : A("", !0)])]),
1367
1370
  _: 1
1368
1371
  }, 8, ["model", "size"])]));
1369
1372
  }
1370
- }), ts = /* @__PURE__ */ U(es, [["__scopeId", "data-v-07ef9d49"]]), ss = {
1373
+ }), Zt = /* @__PURE__ */ U(Yt, [["__scopeId", "data-v-07ef9d49"]]), es = {
1371
1374
  class: "SignUpPhone"
1372
- }, is = {
1375
+ }, ts = {
1373
1376
  class: "content"
1374
- }, as = {
1377
+ }, ss = {
1375
1378
  class: "sendVerifyCodeItem"
1376
- }, os = {
1379
+ }, is = {
1377
1380
  class: "handle"
1378
- }, ls = /* @__PURE__ */ V({
1381
+ }, as = /* @__PURE__ */ C({
1379
1382
  __name: "AuthkitSignUpPhone",
1380
1383
  props: {
1381
1384
  size: {
@@ -1394,15 +1397,15 @@ const At = {
1394
1397
  }
1395
1398
  },
1396
1399
  emits: ["switchSignIn", "submit"],
1397
- setup(b, {
1400
+ setup(w, {
1398
1401
  emit: r
1399
1402
  }) {
1400
1403
  const u = r, {
1401
1404
  useTermsFormField: o
1402
- } = F(), {
1405
+ } = L(), {
1403
1406
  showTermsField: h,
1404
1407
  termsRules: g
1405
- } = o("signUp"), a = b, s = A(), d = A(!1), v = A(), t = A({
1408
+ } = o("signUp"), a = w, s = I(), d = I(!1), f = I(), t = I({
1406
1409
  phone: void 0,
1407
1410
  code: void 0,
1408
1411
  password: void 0,
@@ -1410,34 +1413,34 @@ const At = {
1410
1413
  inviteCode: void 0,
1411
1414
  acceptedTerms: !1
1412
1415
  });
1413
- E(() => {
1414
- const m = Se();
1415
- m && (t.value.inviteCode = m);
1416
+ M(() => {
1417
+ const b = Se();
1418
+ b && (t.value.inviteCode = b);
1416
1419
  });
1417
- const f = [{
1420
+ const c = [{
1418
1421
  required: !0,
1419
1422
  message: "请输入确认密码"
1420
1423
  }, {
1421
- validator: (m, y) => {
1422
- t.value.password && m !== t.value.password ? y("两次密码输入不一致") : y();
1424
+ validator: (b, y) => {
1425
+ t.value.password && b !== t.value.password ? y("两次密码输入不一致") : y();
1423
1426
  }
1424
1427
  }];
1425
- function n() {
1428
+ function l() {
1426
1429
  u("switchSignIn");
1427
1430
  }
1428
- async function w() {
1429
- if (!await v.value.validateField(["phone"])) {
1431
+ async function _() {
1432
+ if (!await f.value.validateField(["phone"])) {
1430
1433
  d.value = !0;
1431
- const y = await M().auth.verify.sms.send.post({
1434
+ const y = await x().auth.verify.sms.send.post({
1432
1435
  phone: t.value.phone,
1433
1436
  purpose: "signUp"
1434
1437
  });
1435
- d.value = !1, K(s.value, y);
1438
+ d.value = !1, W(s.value, y);
1436
1439
  }
1437
1440
  }
1438
- async function c() {
1439
- v.value.validate().then((m) => {
1440
- m || u("submit", {
1441
+ async function m() {
1442
+ f.value.validate().then((b) => {
1443
+ b || u("submit", {
1441
1444
  type: "phone",
1442
1445
  phone: t.value.phone,
1443
1446
  code: t.value.code,
@@ -1446,9 +1449,9 @@ const At = {
1446
1449
  });
1447
1450
  });
1448
1451
  }
1449
- return (m, y) => (l(), k("div", ss, [_("div", is, [i(e(H), {
1452
+ return (b, y) => (n(), S("div", es, [k("div", ts, [i(e(D), {
1450
1453
  ref_key: "formRef",
1451
- ref: v,
1454
+ ref: f,
1452
1455
  model: t.value,
1453
1456
  size: a.size,
1454
1457
  "auto-label-width": ""
@@ -1465,9 +1468,9 @@ const At = {
1465
1468
  message: "请输入有效的手机号"
1466
1469
  }]
1467
1470
  }, {
1468
- default: p(() => [i(e(C), {
1471
+ default: p(() => [i(e(V), {
1469
1472
  modelValue: t.value.phone,
1470
- "onUpdate:modelValue": y[0] || (y[0] = (z) => t.value.phone = z),
1473
+ "onUpdate:modelValue": y[0] || (y[0] = (v) => t.value.phone = v),
1471
1474
  placeholder: "请输入手机号",
1472
1475
  autocomplete: "tel",
1473
1476
  type: "tel"
@@ -1482,12 +1485,12 @@ const At = {
1482
1485
  message: "请输入验证码"
1483
1486
  }]
1484
1487
  }, {
1485
- default: p(() => [_("div", as, [i(e(C), {
1488
+ default: p(() => [k("div", ss, [i(e(V), {
1486
1489
  modelValue: t.value.code,
1487
- "onUpdate:modelValue": y[1] || (y[1] = (z) => t.value.code = z),
1490
+ "onUpdate:modelValue": y[1] || (y[1] = (v) => t.value.code = v),
1488
1491
  placeholder: "请输入验证码",
1489
1492
  autocomplete: "one-time-code"
1490
- }, null, 8, ["modelValue"]), i(W, {
1493
+ }, null, 8, ["modelValue"]), i(j, {
1491
1494
  ref_key: "SendVerifyCodeRef",
1492
1495
  ref: s,
1493
1496
  size: a.size,
@@ -1495,10 +1498,10 @@ const At = {
1495
1498
  style: {
1496
1499
  "margin-left": "10px"
1497
1500
  },
1498
- onSend: w
1501
+ onSend: _
1499
1502
  }, null, 8, ["size", "loading"])])]),
1500
1503
  _: 1
1501
- }), a.requirePassword ? (l(), S(e(P), {
1504
+ }), a.requirePassword ? (n(), z(e(P), {
1502
1505
  key: 0,
1503
1506
  field: "password",
1504
1507
  label: "密码",
@@ -1511,30 +1514,30 @@ const At = {
1511
1514
  message: "密码不能少于10字符"
1512
1515
  }]
1513
1516
  }, {
1514
- default: p(() => [i(e(C), {
1517
+ default: p(() => [i(e(V), {
1515
1518
  modelValue: t.value.password,
1516
- "onUpdate:modelValue": y[2] || (y[2] = (z) => t.value.password = z),
1519
+ "onUpdate:modelValue": y[2] || (y[2] = (v) => t.value.password = v),
1517
1520
  placeholder: "请输入密码(可选)",
1518
1521
  type: "password",
1519
1522
  autocomplete: "new-password"
1520
1523
  }, null, 8, ["modelValue"])]),
1521
1524
  _: 1
1522
- }, 8, ["rules"])) : I("", !0), a.requirePassword && t.value.password ? (l(), S(e(P), {
1525
+ }, 8, ["rules"])) : A("", !0), a.requirePassword && t.value.password ? (n(), z(e(P), {
1523
1526
  key: 1,
1524
1527
  field: "confirmPassword",
1525
1528
  label: "确认密码",
1526
1529
  "hide-label": "",
1527
- rules: f
1530
+ rules: c
1528
1531
  }, {
1529
- default: p(() => [i(e(C), {
1532
+ default: p(() => [i(e(V), {
1530
1533
  modelValue: t.value.confirmPassword,
1531
- "onUpdate:modelValue": y[3] || (y[3] = (z) => t.value.confirmPassword = z),
1534
+ "onUpdate:modelValue": y[3] || (y[3] = (v) => t.value.confirmPassword = v),
1532
1535
  placeholder: "请输入确认密码",
1533
1536
  type: "password",
1534
1537
  autocomplete: "new-password"
1535
1538
  }, null, 8, ["modelValue"])]),
1536
1539
  _: 1
1537
- })) : I("", !0), i(e(P), {
1540
+ })) : A("", !0), i(e(P), {
1538
1541
  field: "inviteCode",
1539
1542
  label: "邀请码",
1540
1543
  "hide-label": "",
@@ -1542,55 +1545,55 @@ const At = {
1542
1545
  required: !1
1543
1546
  }]
1544
1547
  }, {
1545
- default: p(() => [i(e(C), {
1548
+ default: p(() => [i(e(V), {
1546
1549
  modelValue: t.value.inviteCode,
1547
- "onUpdate:modelValue": y[4] || (y[4] = (z) => t.value.inviteCode = z),
1550
+ "onUpdate:modelValue": y[4] || (y[4] = (v) => t.value.inviteCode = v),
1548
1551
  placeholder: "邀请码(可选)",
1549
1552
  autocomplete: "off"
1550
1553
  }, null, 8, ["modelValue"])]),
1551
1554
  _: 1
1552
- }), _("div", os, [i(e(B), {
1555
+ }), k("div", is, [i(e(O), {
1553
1556
  type: "primary",
1554
1557
  loading: a.loading,
1555
1558
  long: "",
1556
1559
  size: a.size,
1557
- onClick: c
1560
+ onClick: m
1558
1561
  }, {
1559
- default: p(() => [...y[6] || (y[6] = [O(" 注册 ", -1)])]),
1562
+ default: p(() => [...y[6] || (y[6] = [T(" 注册 ", -1)])]),
1560
1563
  _: 1
1561
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
1564
+ }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
1562
1565
  key: 0,
1563
1566
  field: "acceptedTerms",
1564
1567
  "hide-label": "",
1565
1568
  rules: e(g)
1566
1569
  }, {
1567
- default: p(() => [i(ee, {
1570
+ default: p(() => [i(X, {
1568
1571
  "accepted-terms": t.value.acceptedTerms,
1569
- "onUpdate:acceptedTerms": y[5] || (y[5] = (z) => t.value.acceptedTerms = z),
1572
+ "onUpdate:acceptedTerms": y[5] || (y[5] = (v) => t.value.acceptedTerms = v),
1570
1573
  "current-view": "signUp"
1571
1574
  }, null, 8, ["accepted-terms"])]),
1572
1575
  _: 1
1573
- }, 8, ["rules"])) : I("", !0)])]),
1576
+ }, 8, ["rules"])) : A("", !0)])]),
1574
1577
  _: 1
1575
- }, 8, ["model", "size"])]), i(me, {
1576
- onSwitchSignIn: n
1578
+ }, 8, ["model", "size"])]), i(fe, {
1579
+ onSwitchSignIn: l
1577
1580
  })]));
1578
1581
  }
1579
- }), ns = /* @__PURE__ */ U(ls, [["__scopeId", "data-v-d0af58fd"]]), rs = {
1582
+ }), os = /* @__PURE__ */ U(as, [["__scopeId", "data-v-d0af58fd"]]), ls = {
1580
1583
  class: "SignUp"
1581
- }, us = {
1584
+ }, ns = {
1582
1585
  key: 0,
1583
1586
  class: "tabsContainer"
1584
- }, ds = {
1587
+ }, rs = {
1585
1588
  key: 1,
1586
1589
  class: "empty"
1587
- }, cs = {
1590
+ }, us = {
1588
1591
  key: 2,
1589
1592
  class: "empty"
1590
- }, ps = {
1593
+ }, ds = {
1591
1594
  key: 2,
1592
1595
  class: "empty"
1593
- }, ms = /* @__PURE__ */ V({
1596
+ }, cs = /* @__PURE__ */ C({
1594
1597
  __name: "AuthkitSignUp",
1595
1598
  props: {
1596
1599
  size: {
@@ -1604,65 +1607,65 @@ const At = {
1604
1607
  }
1605
1608
  },
1606
1609
  emits: ["switchSignIn", "submit"],
1607
- setup(b, {
1610
+ setup(w, {
1608
1611
  emit: r
1609
1612
  }) {
1610
- const u = r, o = b, {
1613
+ const u = r, o = w, {
1611
1614
  appsData: h
1612
- } = j(), {
1615
+ } = N(), {
1613
1616
  registrationBlocked: g,
1614
1617
  signUpAuthEnabled: a
1615
- } = F(), s = T(() => h.value.authMethods), d = T(() => {
1616
- const n = [];
1617
- return s.value.signUp.email && n.push({
1618
+ } = L(), s = R(() => h.value.authMethods), d = R(() => {
1619
+ const l = [];
1620
+ return s.value.signUp.email && l.push({
1618
1621
  key: "email",
1619
1622
  title: "邮箱注册"
1620
- }), s.value.signUp.phone && n.push({
1623
+ }), s.value.signUp.phone && l.push({
1621
1624
  key: "phone",
1622
1625
  title: "手机号注册"
1623
- }), n;
1624
- }), v = A("email");
1625
- ne(() => {
1626
- var n;
1627
- d.value.some((w) => w.key === v.value) || (v.value = ((n = d.value[0]) == null ? void 0 : n.key) || "email");
1626
+ }), l;
1627
+ }), f = I("email");
1628
+ re(() => {
1629
+ var l;
1630
+ d.value.some((_) => _.key === f.value) || (f.value = ((l = d.value[0]) == null ? void 0 : l.key) || "email");
1628
1631
  });
1629
1632
  function t() {
1630
1633
  u("switchSignIn");
1631
1634
  }
1632
- async function f(n) {
1635
+ async function c(l) {
1633
1636
  u("submit", {
1634
- type: v.value,
1635
- ...n
1637
+ type: f.value,
1638
+ ...l
1636
1639
  });
1637
1640
  }
1638
- return (n, w) => (l(), k("div", rs, [d.value.length > 1 ? (l(), k("div", us, [i(e(de), {
1639
- "active-key": v.value,
1640
- "onUpdate:activeKey": w[0] || (w[0] = (c) => v.value = c)
1641
+ return (l, _) => (n(), S("div", ls, [d.value.length > 1 ? (n(), S("div", ns, [i(e(ce), {
1642
+ "active-key": f.value,
1643
+ "onUpdate:activeKey": _[0] || (_[0] = (m) => f.value = m)
1641
1644
  }, {
1642
- default: p(() => [(l(!0), k(D, null, re(d.value, (c) => (l(), S(e(ce), {
1643
- key: c.key,
1644
- title: c.title
1645
+ default: p(() => [(n(!0), S(F, null, ue(d.value, (m) => (n(), z(e(pe), {
1646
+ key: m.key,
1647
+ title: m.title
1645
1648
  }, null, 8, ["title"]))), 128))]),
1646
1649
  _: 1
1647
- }, 8, ["active-key"])])) : I("", !0), e(a) ? e(g) ? (l(), k("div", cs, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (l(), k(D, {
1650
+ }, 8, ["active-key"])])) : A("", !0), e(a) ? e(g) ? (n(), S("div", us, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (n(), S(F, {
1648
1651
  key: 3
1649
- }, [v.value === "email" && s.value.signUp.email ? (l(), S(ts, {
1652
+ }, [f.value === "email" && s.value.signUp.email ? (n(), z(Zt, {
1650
1653
  key: 0,
1651
1654
  size: o.size,
1652
- loading: b.loading,
1653
- onSubmit: f
1654
- }, null, 8, ["size", "loading"])) : v.value === "phone" && s.value.signUp.phone ? (l(), S(ns, {
1655
+ loading: w.loading,
1656
+ onSubmit: c
1657
+ }, null, 8, ["size", "loading"])) : f.value === "phone" && s.value.signUp.phone ? (n(), z(os, {
1655
1658
  key: 1,
1656
1659
  size: o.size,
1657
- loading: b.loading,
1658
- onSubmit: f,
1660
+ loading: w.loading,
1661
+ onSubmit: c,
1659
1662
  onSwitchSignIn: t
1660
- }, null, 8, ["size", "loading"])) : (l(), k("div", ps, " 当前应用未开放用户注册 ")), v.value === "email" ? (l(), S(me, {
1663
+ }, null, 8, ["size", "loading"])) : (n(), S("div", ds, " 当前应用未开放用户注册 ")), f.value === "email" ? (n(), z(fe, {
1661
1664
  key: 3,
1662
1665
  onSwitchSignIn: t
1663
- })) : I("", !0)], 64)) : (l(), k("div", ds, " 系统已停止用户注册 "))]));
1666
+ })) : A("", !0)], 64)) : (n(), S("div", rs, " 系统已停止用户注册 "))]));
1664
1667
  }
1665
- }), fs = /* @__PURE__ */ U(ms, [["__scopeId", "data-v-b211d5ef"]]), vs = ["src"], gs = /* @__PURE__ */ V({
1668
+ }), ps = /* @__PURE__ */ U(cs, [["__scopeId", "data-v-b211d5ef"]]), ms = ["src"], fs = /* @__PURE__ */ C({
1666
1669
  __name: "AuthkitAuthTitle",
1667
1670
  props: {
1668
1671
  size: {
@@ -1681,32 +1684,32 @@ const At = {
1681
1684
  default: 60
1682
1685
  }
1683
1686
  },
1684
- setup(b) {
1685
- const r = b, u = `${r.size}px`, o = `${r.fontSize}px`, h = `${r.lineHeight}px`, {
1687
+ setup(w) {
1688
+ const r = w, u = `${r.size}px`, o = `${r.fontSize}px`, h = `${r.lineHeight}px`, {
1686
1689
  currentView: g
1687
- } = N(), {
1690
+ } = G(), {
1688
1691
  appsData: a
1689
- } = j(), s = T(() => g.value === "signIn" ? `${a.value.name}登录` : g.value === "signUp" ? `${a.value.name}账号注册` : g.value === "resetPassword" ? `${a.value.name}密码重置` : "");
1690
- return (d, v) => (l(), k("div", {
1692
+ } = N(), s = R(() => g.value === "signIn" ? `${a.value.name}登录` : g.value === "signUp" ? `${a.value.name}账号注册` : g.value === "resetPassword" ? `${a.value.name}密码重置` : "");
1693
+ return (d, f) => (n(), S("div", {
1691
1694
  class: "Title",
1692
- style: G({
1695
+ style: H({
1693
1696
  fontSize: o,
1694
1697
  lineHeight: h
1695
1698
  })
1696
- }, [e(a).applicationLogoUrl ? (l(), k("img", {
1699
+ }, [e(a).applicationLogoUrl ? (n(), S("img", {
1697
1700
  key: 0,
1698
1701
  src: e(a).applicationLogoUrl,
1699
1702
  srcset: "",
1700
- style: G({
1703
+ style: H({
1701
1704
  width: u
1702
1705
  })
1703
- }, null, 12, vs)) : I("", !0), _("span", null, L(s.value), 1), Z(d.$slots, "default", {}, void 0, !0)], 4));
1706
+ }, null, 12, ms)) : A("", !0), k("span", null, B(s.value), 1), Q(d.$slots, "default", {}, void 0, !0)], 4));
1704
1707
  }
1705
- }), Pe = /* @__PURE__ */ U(gs, [["__scopeId", "data-v-8ebe7939"]]), hs = {
1708
+ }), Pe = /* @__PURE__ */ U(fs, [["__scopeId", "data-v-8ebe7939"]]), vs = {
1706
1709
  class: "Auth"
1707
- }, ys = {
1710
+ }, gs = {
1708
1711
  class: "body"
1709
- }, bs = /* @__PURE__ */ V({
1712
+ }, hs = /* @__PURE__ */ C({
1710
1713
  __name: "AuthkitAuth",
1711
1714
  props: {
1712
1715
  size: {
@@ -1718,8 +1721,8 @@ const At = {
1718
1721
  default: () => !0
1719
1722
  }
1720
1723
  },
1721
- setup(b) {
1722
- const r = b, {
1724
+ setup(w) {
1725
+ const r = w, {
1723
1726
  signInSubmit: u,
1724
1727
  passkeySignInSubmit: o,
1725
1728
  signUpSubmit: h,
@@ -1727,43 +1730,43 @@ const At = {
1727
1730
  currentView: a,
1728
1731
  authSignInLoading: s,
1729
1732
  authSignUpLoading: d,
1730
- resetPasswordLoading: v,
1733
+ resetPasswordLoading: f,
1731
1734
  switchSignUp: t,
1732
- switchResetPassword: f,
1733
- switchSignIn: n
1734
- } = N();
1735
- return (w, c) => (l(), k("div", hs, [b.showTitle ? (l(), S(Pe, {
1735
+ switchResetPassword: c,
1736
+ switchSignIn: l
1737
+ } = G();
1738
+ return (_, m) => (n(), S("div", vs, [w.showTitle ? (n(), z(Pe, {
1736
1739
  key: 0,
1737
1740
  size: 32,
1738
1741
  "font-size": 20
1739
- })) : I("", !0), _("div", ys, [e(a) === "signIn" ? (l(), S(Qt, {
1742
+ })) : A("", !0), k("div", gs, [e(a) === "signIn" ? (n(), z(Kt, {
1740
1743
  key: 0,
1741
1744
  size: r.size,
1742
1745
  loading: e(s),
1743
1746
  onSwitchSignUp: e(t),
1744
- onSwitchResetPassword: e(f),
1745
- onSubmit: c[0] || (c[0] = (m) => e(u)(m))
1747
+ onSwitchResetPassword: e(c),
1748
+ onSubmit: m[0] || (m[0] = (b) => e(u)(b))
1746
1749
  }, {
1747
- OAuth: p(() => [i(lt, {
1750
+ OAuth: p(() => [i(at, {
1748
1751
  size: r.size,
1749
1752
  onPasskeySubmit: e(o)
1750
1753
  }, null, 8, ["size", "onPasskeySubmit"])]),
1751
1754
  _: 1
1752
- }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (l(), S(fs, {
1755
+ }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (n(), z(ps, {
1753
1756
  key: 1,
1754
1757
  size: r.size,
1755
1758
  loading: e(d),
1756
- onSwitchSignIn: e(n),
1757
- onSubmit: c[1] || (c[1] = (m) => e(h)(m))
1758
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (l(), S(kt, {
1759
+ onSwitchSignIn: e(l),
1760
+ onSubmit: m[1] || (m[1] = (b) => e(h)(b))
1761
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (n(), z(wt, {
1759
1762
  key: 2,
1760
1763
  size: r.size,
1761
- loading: e(v),
1762
- onSwitchSignIn: e(n),
1763
- onSubmit: c[2] || (c[2] = (m) => e(g)(m))
1764
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : I("", !0)])]));
1764
+ loading: e(f),
1765
+ onSwitchSignIn: e(l),
1766
+ onSubmit: m[2] || (m[2] = (b) => e(g)(b))
1767
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : A("", !0)])]));
1765
1768
  }
1766
- }), ws = /* @__PURE__ */ U(bs, [["__scopeId", "data-v-60874d88"]]), _s = /* @__PURE__ */ V({
1769
+ }), ys = /* @__PURE__ */ U(hs, [["__scopeId", "data-v-60874d88"]]), bs = /* @__PURE__ */ C({
1767
1770
  __name: "AuthkitAuthModal",
1768
1771
  props: {
1769
1772
  size: {
@@ -1771,28 +1774,28 @@ const At = {
1771
1774
  }
1772
1775
  },
1773
1776
  emits: ["close"],
1774
- setup(b, {
1777
+ setup(w, {
1775
1778
  emit: r
1776
1779
  }) {
1777
1780
  const u = r, {
1778
1781
  onSignIn: o,
1779
1782
  switchSignIn: h
1780
- } = N(), {
1783
+ } = G(), {
1781
1784
  close: g
1782
1785
  } = we();
1783
1786
  let a = null;
1784
- E(() => {
1787
+ M(() => {
1785
1788
  a = o(() => g());
1786
- }), ue(() => {
1789
+ }), de(() => {
1787
1790
  a == null || a(), a = null;
1788
1791
  });
1789
- function s(v) {
1790
- v || d();
1792
+ function s(f) {
1793
+ f || d();
1791
1794
  }
1792
1795
  function d() {
1793
1796
  h(), g(), u("close");
1794
1797
  }
1795
- return (v, t) => (l(), S(e(xe), {
1798
+ return (f, t) => (n(), z(e(xe), {
1796
1799
  visible: !0,
1797
1800
  footer: !1,
1798
1801
  "mask-closable": !1,
@@ -1803,51 +1806,51 @@ const At = {
1803
1806
  onClose: d
1804
1807
  }, {
1805
1808
  title: p(() => [i(Pe)]),
1806
- default: p(() => [i(ws, {
1809
+ default: p(() => [i(ys, {
1807
1810
  "show-title": !1,
1808
- size: b.size
1811
+ size: w.size
1809
1812
  }, null, 8, ["size"])]),
1810
1813
  _: 1
1811
1814
  }));
1812
1815
  }
1813
- }), ks = /* @__PURE__ */ U(_s, [["__scopeId", "data-v-19a4d5d0"]]);
1814
- function Ve(b, r = {}) {
1816
+ }), ws = /* @__PURE__ */ U(bs, [["__scopeId", "data-v-19a4d5d0"]]);
1817
+ function Ve(w, r = {}) {
1815
1818
  const {
1816
1819
  bindIdentityRedirect: u = "",
1817
1820
  closePopupOnBindSuccess: o = !0,
1818
1821
  restoreRedirectAfterSignIn: h = !0,
1819
1822
  defaultRedirect: g = ""
1820
- } = r, a = A(!1), {
1823
+ } = r, a = I(!1), {
1821
1824
  completeSignIn: s
1822
- } = N();
1825
+ } = G();
1823
1826
  async function d() {
1824
1827
  if (typeof window > "u")
1825
1828
  return !1;
1826
- const v = new URL(window.location.href);
1827
- if (!ze(v))
1829
+ const f = new URL(window.location.href);
1830
+ if (!ze(f))
1828
1831
  return !1;
1829
- const t = v.searchParams.get("error");
1832
+ const t = f.searchParams.get("error");
1830
1833
  if (t)
1831
- return window.history.replaceState({}, "", le(v)), X.error(t), !0;
1832
- if (v.searchParams.get("bindSuccess") === "true") {
1833
- const n = v.searchParams.get("provider");
1834
- return window.history.replaceState({}, "", le(v)), X.success(n ? `${n} 绑定成功` : "绑定成功"), o && window.opener && setTimeout(() => window.close(), 800), !0;
1834
+ return window.history.replaceState({}, "", oe(f)), le.error(t), !0;
1835
+ if (f.searchParams.get("bindSuccess") === "true") {
1836
+ const l = f.searchParams.get("provider");
1837
+ return window.history.replaceState({}, "", oe(f)), le.success(l ? `${l} 绑定成功` : "绑定成功"), o && window.opener && setTimeout(() => window.close(), 800), !0;
1835
1838
  }
1836
- const f = v.searchParams.get("token");
1837
- if (!f)
1839
+ const c = f.searchParams.get("token");
1840
+ if (!c)
1838
1841
  return !1;
1839
1842
  a.value = !0;
1840
1843
  try {
1841
- const n = v.searchParams.get("userId"), w = v.searchParams.get("appId"), c = v.searchParams.get("needBindIdentity") === "true";
1842
- if (window.history.replaceState({}, "", le(v)), s({
1843
- jwtToken: f,
1844
- userId: n,
1845
- appId: w,
1846
- needBindIdentity: c
1847
- }), c && u)
1848
- return await b.replace(u), !0;
1849
- const y = Ne(h) || g;
1850
- return y && await b.replace(y), !0;
1844
+ const l = f.searchParams.get("userId"), _ = f.searchParams.get("appId"), m = f.searchParams.get("needBindIdentity") === "true";
1845
+ if (window.history.replaceState({}, "", oe(f)), s({
1846
+ jwtToken: c,
1847
+ userId: l,
1848
+ appId: _,
1849
+ needBindIdentity: m
1850
+ }), m && u)
1851
+ return await w.replace(u), !0;
1852
+ const y = Ge(h) || g;
1853
+ return y && await w.replace(y), !0;
1851
1854
  } finally {
1852
1855
  a.value = !1;
1853
1856
  }
@@ -1857,12 +1860,12 @@ function Ve(b, r = {}) {
1857
1860
  handleOAuthCallback: d
1858
1861
  };
1859
1862
  }
1860
- const Ss = {
1863
+ const _s = {
1861
1864
  key: 0,
1862
1865
  class: "AuthkitOAuthCallbackOverlay",
1863
1866
  "aria-live": "polite",
1864
1867
  "aria-busy": "true"
1865
- }, zs = /* @__PURE__ */ V({
1868
+ }, ks = /* @__PURE__ */ C({
1866
1869
  __name: "AuthkitOAuthCallbackProvider",
1867
1870
  props: {
1868
1871
  bindIdentityRedirect: {
@@ -1877,8 +1880,8 @@ const Ss = {
1877
1880
  default: !0
1878
1881
  }
1879
1882
  },
1880
- setup(b) {
1881
- const r = b, u = be(), {
1883
+ setup(w) {
1884
+ const r = w, u = be(), {
1882
1885
  processing: o,
1883
1886
  handleOAuthCallback: h
1884
1887
  } = Ve(u, {
@@ -1886,19 +1889,19 @@ const Ss = {
1886
1889
  closePopupOnBindSuccess: r.closePopupOnBindSuccess,
1887
1890
  restoreRedirectAfterSignIn: r.restoreRedirectAfterSignIn
1888
1891
  });
1889
- return E(() => {
1892
+ return M(() => {
1890
1893
  h();
1891
- }), (g, a) => (l(), S(Te, {
1894
+ }), (g, a) => (n(), z(Te, {
1892
1895
  to: "body"
1893
- }, [e(o) ? (l(), k("div", Ss, [...a[0] || (a[0] = [_("div", {
1896
+ }, [e(o) ? (n(), S("div", _s, [...a[0] || (a[0] = [k("div", {
1894
1897
  class: "AuthkitOAuthCallbackOverlay__panel"
1895
- }, [_("div", {
1898
+ }, [k("div", {
1896
1899
  class: "AuthkitOAuthCallbackOverlay__spinner"
1897
- }), _("p", {
1900
+ }), k("p", {
1898
1901
  class: "AuthkitOAuthCallbackOverlay__text"
1899
- }, "正在登录...")], -1)])])) : I("", !0)]));
1902
+ }, "正在登录...")], -1)])])) : A("", !0)]));
1900
1903
  }
1901
- }), Is = /* @__PURE__ */ U(zs, [["__scopeId", "data-v-7162b776"]]), hi = /* @__PURE__ */ V({
1904
+ }), Ss = /* @__PURE__ */ U(ks, [["__scopeId", "data-v-7162b776"]]), vi = /* @__PURE__ */ C({
1902
1905
  __name: "AuthkitProvider",
1903
1906
  props: {
1904
1907
  handleOAuthCallback: {
@@ -1933,12 +1936,12 @@ const Ss = {
1933
1936
  }
1934
1937
  },
1935
1938
  emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
1936
- setup(b, {
1939
+ setup(w, {
1937
1940
  emit: r
1938
1941
  }) {
1939
1942
  const {
1940
1943
  config: u
1941
- } = pe(), o = b, h = r, g = qe(), {
1944
+ } = me(), o = w, h = r, g = qe(), {
1942
1945
  openLegalDoc: a
1943
1946
  } = Ie({
1944
1947
  route: g
@@ -1946,70 +1949,70 @@ const Ss = {
1946
1949
  isOpen: s
1947
1950
  } = we(), {
1948
1951
  restoreSession: d,
1949
- onSignIn: v,
1952
+ onSignIn: f,
1950
1953
  onSignOut: t
1951
- } = N(), {
1952
- fetchUserProfile: f,
1953
- clearUserProfile: n,
1954
- markAuthSessionBootstrapped: w
1954
+ } = G(), {
1955
+ fetchUserProfile: c,
1956
+ clearUserProfile: l,
1957
+ markAuthSessionBootstrapped: _
1955
1958
  } = Ae(), {
1956
- appsAuthPageInfoApi: c
1957
- } = j(), m = v(() => {
1958
- f();
1959
+ appsAuthPageInfoApi: m
1960
+ } = N(), b = f(() => {
1961
+ c();
1959
1962
  }), y = t(() => {
1960
- n();
1963
+ l();
1961
1964
  });
1962
- function z() {
1965
+ function v() {
1963
1966
  if (u.legalDocsMode === "builtin") {
1964
1967
  a("privacyPolicy");
1965
1968
  return;
1966
1969
  }
1967
1970
  h("toPrivacyPolicy");
1968
1971
  }
1969
- function q() {
1972
+ function $() {
1970
1973
  if (u.legalDocsMode === "builtin") {
1971
1974
  a("userServiceAgreement");
1972
1975
  return;
1973
1976
  }
1974
1977
  h("toUserServiceAgreement");
1975
1978
  }
1976
- let $ = null;
1977
- async function R() {
1979
+ let q = null;
1980
+ async function E() {
1978
1981
  try {
1979
- if (o.fetchAppInfo && c(), o.restoreSession && d()) {
1980
- await f();
1982
+ if (o.fetchAppInfo && m(), o.restoreSession && d()) {
1983
+ await c();
1981
1984
  return;
1982
1985
  }
1983
- n();
1986
+ l();
1984
1987
  } finally {
1985
- w();
1988
+ _();
1986
1989
  }
1987
1990
  }
1988
- function x() {
1989
- return $ || ($ = R()), $;
1991
+ function Y() {
1992
+ return q || (q = E()), q;
1990
1993
  }
1991
- return typeof window < "u" && x(), E(() => {
1992
- St({
1993
- onPrivacyPolicy: z,
1994
- onUserServiceAgreement: q
1994
+ return typeof window < "u" && Y(), M(() => {
1995
+ _t({
1996
+ onPrivacyPolicy: v,
1997
+ onUserServiceAgreement: $
1995
1998
  });
1996
- }), ue(() => {
1997
- m(), y();
1998
- }), (Ce, Ws) => (l(), k(D, null, [Z(Ce.$slots, "default"), o.handleOAuthCallback ? (l(), S(Is, {
1999
+ }), de(() => {
2000
+ b(), y();
2001
+ }), (Ce, Ns) => (n(), S(F, null, [Q(Ce.$slots, "default"), o.handleOAuthCallback ? (n(), z(Ss, {
1999
2002
  key: 0,
2000
2003
  "bind-identity-redirect": o.bindIdentityRedirect,
2001
2004
  "close-popup-on-bind-success": o.closePopupOnBindSuccess,
2002
2005
  "restore-redirect-after-sign-in": o.restoreRedirectAfterSignIn
2003
- }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), o.showAuthModal && e(s) ? (l(), S(ks, {
2006
+ }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : A("", !0), o.showAuthModal && e(s) ? (n(), z(ws, {
2004
2007
  key: 1,
2005
2008
  size: o.authModalSize
2006
- }, null, 8, ["size"])) : I("", !0)], 64));
2009
+ }, null, 8, ["size"])) : A("", !0)], 64));
2007
2010
  }
2008
- }), As = {
2011
+ }), zs = {
2009
2012
  class: "header"
2010
- }, Ps = ["href"], Vs = {
2013
+ }, Is = ["href"], As = {
2011
2014
  class: "container"
2012
- }, Cs = /* @__PURE__ */ V({
2015
+ }, Ps = /* @__PURE__ */ C({
2013
2016
  __name: "AuthkitAuthContainer",
2014
2017
  props: {
2015
2018
  applicationLogoUrl: {
@@ -2051,39 +2054,39 @@ const Ss = {
2051
2054
  default: "color"
2052
2055
  }
2053
2056
  },
2054
- setup(b) {
2055
- const r = b, u = T(() => r.backgroundType === "color" ? {
2057
+ setup(w) {
2058
+ const r = w, u = R(() => r.backgroundType === "color" ? {
2056
2059
  backgroundColor: r.backgroundColor
2057
2060
  } : {
2058
2061
  backgroundImage: `url(${r.backgroundImage})`
2059
2062
  });
2060
- return (o, h) => (l(), k("div", {
2063
+ return (o, h) => (n(), S("div", {
2061
2064
  class: "auth",
2062
- style: G(u.value)
2063
- }, [_("div", As, [r.name ? (l(), k("a", {
2065
+ style: H(u.value)
2066
+ }, [k("div", zs, [r.name ? (n(), S("a", {
2064
2067
  key: 0,
2065
2068
  href: r.appHomePage,
2066
2069
  target: "_self",
2067
2070
  class: "link",
2068
- style: G({
2071
+ style: H({
2069
2072
  color: r.linkColor
2070
2073
  })
2071
- }, " 返回主页 ", 12, Ps)) : I("", !0)]), _("div", Vs, [Z(o.$slots, "default", {}, void 0, !0)])], 4));
2074
+ }, " 返回主页 ", 12, Is)) : A("", !0)]), k("div", As, [Q(o.$slots, "default", {}, void 0, !0)])], 4));
2072
2075
  }
2073
- }), yi = /* @__PURE__ */ U(Cs, [["__scopeId", "data-v-0e13d3ff"]]), Us = {
2076
+ }), gi = /* @__PURE__ */ U(Ps, [["__scopeId", "data-v-0e13d3ff"]]), Vs = {
2074
2077
  class: "box"
2075
- }, $s = {
2078
+ }, Cs = {
2076
2079
  class: "title"
2077
- }, Rs = {
2080
+ }, Us = {
2078
2081
  class: "content"
2079
- }, Ts = {
2082
+ }, $s = {
2080
2083
  class: "redirect"
2081
- }, qs = {
2084
+ }, Rs = {
2082
2085
  style: {
2083
2086
  "font-weight": "bold",
2084
2087
  "font-size": "12px"
2085
2088
  }
2086
- }, Os = /* @__PURE__ */ V({
2089
+ }, Ts = /* @__PURE__ */ C({
2087
2090
  __name: "AuthkitAuthorize",
2088
2091
  props: {
2089
2092
  size: {
@@ -2131,8 +2134,8 @@ const Ss = {
2131
2134
  default: () => ""
2132
2135
  }
2133
2136
  },
2134
- setup(b) {
2135
- const r = A(!1), u = b, o = A({
2137
+ setup(w) {
2138
+ const r = I(!1), u = w, o = I({
2136
2139
  name: "",
2137
2140
  homePageUrl: "",
2138
2141
  createAt: "",
@@ -2142,7 +2145,7 @@ const Ss = {
2142
2145
  const {
2143
2146
  data: a,
2144
2147
  error: s
2145
- } = await M().auth.apps.authPageInfo.post({});
2148
+ } = await x().auth.apps.authPageInfo.post({});
2146
2149
  s || !a || (o.value = {
2147
2150
  name: a.name,
2148
2151
  homePageUrl: a.homePageUrl || "",
@@ -2156,7 +2159,7 @@ const Ss = {
2156
2159
  const {
2157
2160
  data: a,
2158
2161
  error: s
2159
- } = await M().auth.oauth2.authorize.post({
2162
+ } = await x().auth.oauth2.authorize.post({
2160
2163
  client_id: u.clientId,
2161
2164
  response_type: u.responseType,
2162
2165
  scope: u.scope,
@@ -2168,34 +2171,34 @@ const Ss = {
2168
2171
  const d = a;
2169
2172
  window.location.href = d.authorizeUrl;
2170
2173
  }
2171
- return (a, s) => (l(), k("div", Us, [_("div", $s, L(`授权 ${o.value.name}`), 1), _("div", Rs, [i(e(Le), null, {
2172
- default: p(() => [i(e(ae), null, {
2174
+ return (a, s) => (n(), S("div", Vs, [k("div", Cs, B(`授权 ${o.value.name}`), 1), k("div", Us, [i(e(Be), null, {
2175
+ default: p(() => [i(e(ie), null, {
2173
2176
  default: p(() => {
2174
2177
  var d;
2175
- return [i(e(oe), {
2178
+ return [i(e(ae), {
2176
2179
  title: o.value.name,
2177
2180
  description: `想要使用您的${(d = u.userInfo) == null ? void 0 : d.nickname}账户`
2178
2181
  }, {
2179
2182
  avatar: p(() => {
2180
- var v;
2181
- return [i(e(te), {
2183
+ var f;
2184
+ return [i(e(ee), {
2182
2185
  shape: "square",
2183
- "image-url": (v = u.userInfo) == null ? void 0 : v.avatar
2186
+ "image-url": (f = u.userInfo) == null ? void 0 : f.avatar
2184
2187
  }, null, 8, ["image-url"])];
2185
2188
  }),
2186
2189
  _: 1
2187
2190
  }, 8, ["title", "description"])];
2188
2191
  }),
2189
2192
  _: 1
2190
- }), i(e(ae), null, {
2191
- default: p(() => [i(e(oe), {
2193
+ }), i(e(ie), null, {
2194
+ default: p(() => [i(e(ae), {
2192
2195
  title: "公开信息",
2193
2196
  description: "头像、昵称"
2194
2197
  }, {
2195
- avatar: p(() => [i(e(te), {
2198
+ avatar: p(() => [i(e(ee), {
2196
2199
  shape: "square"
2197
2200
  }, {
2198
- default: p(() => [...s[0] || (s[0] = [_("img", {
2201
+ default: p(() => [...s[0] || (s[0] = [k("img", {
2199
2202
  alt: "avatar",
2200
2203
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
2201
2204
  }, null, -1)])]),
@@ -2204,15 +2207,15 @@ const Ss = {
2204
2207
  _: 1
2205
2208
  })]),
2206
2209
  _: 1
2207
- }), i(e(ae), null, {
2208
- default: p(() => [i(e(oe), {
2210
+ }), i(e(ie), null, {
2211
+ default: p(() => [i(e(ae), {
2209
2212
  title: "个人用户数据",
2210
2213
  description: "电子邮件地址"
2211
2214
  }, {
2212
- avatar: p(() => [i(e(te), {
2215
+ avatar: p(() => [i(e(ee), {
2213
2216
  shape: "square"
2214
2217
  }, {
2215
- default: p(() => [...s[1] || (s[1] = [_("img", {
2218
+ default: p(() => [...s[1] || (s[1] = [k("img", {
2216
2219
  alt: "avatar",
2217
2220
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
2218
2221
  }, null, -1)])]),
@@ -2223,30 +2226,30 @@ const Ss = {
2223
2226
  _: 1
2224
2227
  })]),
2225
2228
  _: 1
2226
- }), i(e(B), {
2229
+ }), i(e(O), {
2227
2230
  type: "primary",
2228
2231
  size: u.size,
2229
2232
  loading: r.value,
2230
2233
  onClick: g
2231
2234
  }, {
2232
- default: p(() => [...s[2] || (s[2] = [O(" 授权 ", -1)])]),
2235
+ default: p(() => [...s[2] || (s[2] = [T(" 授权 ", -1)])]),
2233
2236
  _: 1
2234
- }, 8, ["size", "loading"]), _("div", Ts, [s[3] || (s[3] = _("div", {
2237
+ }, 8, ["size", "loading"]), k("div", $s, [s[3] || (s[3] = k("div", {
2235
2238
  class: "redirect-hint"
2236
- }, "授权后将跳转至", -1)), _("div", qs, L(o.value.authorizationCallback), 1)])])]));
2239
+ }, "授权后将跳转至", -1)), k("div", Rs, B(o.value.authorizationCallback), 1)])])]));
2237
2240
  }
2238
- }), bi = /* @__PURE__ */ U(Os, [["__scopeId", "data-v-6c1792d3"]]), xs = {
2241
+ }), hi = /* @__PURE__ */ U(Ts, [["__scopeId", "data-v-6c1792d3"]]), qs = {
2239
2242
  class: "oauth-callback"
2240
- }, Ls = {
2243
+ }, Os = {
2241
2244
  key: 0,
2242
2245
  class: "callback-loading"
2243
- }, Bs = {
2246
+ }, xs = {
2244
2247
  key: 1,
2245
2248
  class: "callback-error"
2246
- }, Ms = {
2249
+ }, Bs = {
2247
2250
  key: 2,
2248
2251
  class: "callback-success"
2249
- }, Fs = /* @__PURE__ */ V({
2252
+ }, Ls = /* @__PURE__ */ C({
2250
2253
  __name: "AuthkitOauthCallback",
2251
2254
  props: {
2252
2255
  defaultRedirect: {},
@@ -2254,21 +2257,21 @@ const Ss = {
2254
2257
  bindIdentityRedirect: {}
2255
2258
  },
2256
2259
  emits: ["success", "error", "needBindIdentity"],
2257
- setup(b, {
2260
+ setup(w, {
2258
2261
  emit: r
2259
2262
  }) {
2260
- const u = b, o = r, h = A("登录成功,正在跳转..."), g = A(""), {
2263
+ const u = w, o = r, h = I("登录成功,正在跳转..."), g = I(""), {
2261
2264
  restoreSession: a
2262
- } = N(), s = be(), {
2265
+ } = G(), s = be(), {
2263
2266
  processing: d,
2264
- handleOAuthCallback: v
2267
+ handleOAuthCallback: f
2265
2268
  } = Ve(s, {
2266
2269
  bindIdentityRedirect: u.bindIdentityRedirect,
2267
2270
  defaultRedirect: u.defaultRedirect
2268
2271
  });
2269
2272
  async function t() {
2270
- const n = new URL(window.location.href);
2271
- if (!ze(n)) {
2273
+ const l = new URL(window.location.href);
2274
+ if (!ze(l)) {
2272
2275
  if (a()) {
2273
2276
  await s.replace(u.defaultRedirect || "/");
2274
2277
  return;
@@ -2276,40 +2279,40 @@ const Ss = {
2276
2279
  g.value = "无效的访问";
2277
2280
  return;
2278
2281
  }
2279
- const w = n.searchParams.get("error");
2280
- if (w) {
2281
- g.value = w, o("error", w), await v();
2282
+ const _ = l.searchParams.get("error");
2283
+ if (_) {
2284
+ g.value = _, o("error", _), await f();
2282
2285
  return;
2283
2286
  }
2284
- await v() || (g.value = "登录失败:未收到认证令牌", o("error", g.value));
2287
+ await f() || (g.value = "登录失败:未收到认证令牌", o("error", g.value));
2285
2288
  }
2286
- function f() {
2289
+ function c() {
2287
2290
  s.replace(u.defaultRedirect || "/");
2288
2291
  }
2289
- return E(() => {
2292
+ return M(() => {
2290
2293
  t();
2291
- }), (n, w) => (l(), k("div", xs, [e(d) ? (l(), k("div", Ls, [w[0] || (w[0] = _("div", {
2294
+ }), (l, _) => (n(), S("div", qs, [e(d) ? (n(), S("div", Os, [_[0] || (_[0] = k("div", {
2292
2295
  class: "spinner"
2293
- }, null, -1)), _("p", null, L(u.loadingText ?? "正在登录..."), 1)])) : g.value ? (l(), k("div", Bs, [w[1] || (w[1] = _("div", {
2296
+ }, null, -1)), k("p", null, B(u.loadingText ?? "正在登录..."), 1)])) : g.value ? (n(), S("div", xs, [_[1] || (_[1] = k("div", {
2294
2297
  class: "error-icon"
2295
- }, "✕", -1)), w[2] || (w[2] = _("h2", null, "登录失败", -1)), _("p", null, L(g.value), 1), _("button", {
2298
+ }, "✕", -1)), _[2] || (_[2] = k("h2", null, "登录失败", -1)), k("p", null, B(g.value), 1), k("button", {
2296
2299
  class: "retry-btn",
2297
2300
  type: "button",
2298
- onClick: f
2299
- }, "返回重试")])) : (l(), k("div", Ms, [w[3] || (w[3] = _("div", {
2301
+ onClick: c
2302
+ }, "返回重试")])) : (n(), S("div", Bs, [_[3] || (_[3] = k("div", {
2300
2303
  class: "success-icon"
2301
- }, "✓", -1)), _("p", null, L(h.value), 1)]))]));
2304
+ }, "✓", -1)), k("p", null, B(h.value), 1)]))]));
2302
2305
  }
2303
- }), wi = /* @__PURE__ */ U(Fs, [["__scopeId", "data-v-98babf68"]]), Ds = {
2306
+ }), yi = /* @__PURE__ */ U(Ls, [["__scopeId", "data-v-98babf68"]]), Fs = {
2304
2307
  class: "oauth-binding-account"
2305
- }, Es = {
2308
+ }, Ms = {
2306
2309
  key: 1,
2307
2310
  class: "oauth-binding-account__icon"
2308
- }, Hs = {
2311
+ }, Ds = {
2309
2312
  class: "oauth-binding-account__info"
2310
- }, Gs = {
2313
+ }, Es = {
2311
2314
  class: "oauth-binding-account__name"
2312
- }, Ns = /* @__PURE__ */ V({
2315
+ }, Hs = /* @__PURE__ */ C({
2313
2316
  __name: "AuthkitGithubBinding",
2314
2317
  props: {
2315
2318
  size: {
@@ -2317,181 +2320,181 @@ const Ss = {
2317
2320
  required: !0
2318
2321
  }
2319
2322
  },
2320
- setup(b) {
2323
+ setup(w) {
2321
2324
  const {
2322
2325
  config: r
2323
- } = pe(), {
2326
+ } = me(), {
2324
2327
  userProfile: u,
2325
2328
  fetchUserProfile: o
2326
- } = Ae(), h = A("hidden"), g = A(!1);
2329
+ } = Ae(), h = I("hidden"), g = I(!1);
2327
2330
  let a;
2328
- const s = b, d = T(() => {
2329
- var m, y, z;
2330
- return ((y = (m = u.value) == null ? void 0 : m.github) == null ? void 0 : y.avatar_url) || ((z = u.value) == null ? void 0 : z.avatar) || "";
2331
+ const s = w, d = R(() => {
2332
+ var b, y, v;
2333
+ return ((y = (b = u.value) == null ? void 0 : b.github) == null ? void 0 : y.avatar_url) || ((v = u.value) == null ? void 0 : v.avatar) || "";
2331
2334
  }), {
2332
- buildBindOauthRedirectUri: v
2335
+ buildBindOauthRedirectUri: f
2333
2336
  } = ke();
2334
- function t(m) {
2335
- h.value = m;
2337
+ function t(b) {
2338
+ h.value = b;
2336
2339
  }
2337
- async function f() {
2338
- const m = r.appId;
2339
- if (!m) {
2340
+ async function c() {
2341
+ const b = r.appId;
2342
+ if (!b) {
2340
2343
  console.error("GitHub OAuth 失败: appId 未配置");
2341
2344
  return;
2342
2345
  }
2343
2346
  const {
2344
2347
  data: y,
2345
- error: z
2346
- } = await M().auth.oauth.github.login.get({
2347
- appId: m,
2348
+ error: v
2349
+ } = await x().auth.oauth.github.login.get({
2350
+ appId: b,
2348
2351
  mode: "bind",
2349
- redirectUri: v()
2352
+ redirectUri: f()
2350
2353
  });
2351
- z || !y || (g.value = !0, window.open(y.redirectUri, "_blank"));
2354
+ v || !y || (g.value = !0, window.open(y.redirectUri, "_blank"));
2352
2355
  }
2353
- async function n() {
2356
+ async function l() {
2354
2357
  const {
2355
- error: m
2356
- } = await M().auth.users.unbind.oauth.post({
2358
+ error: b
2359
+ } = await x().auth.users.unbind.oauth.post({
2357
2360
  provider: "github"
2358
2361
  });
2359
- m || (X.success("解绑成功"), h.value = "hidden", o());
2362
+ b || (le.success("解绑成功"), h.value = "hidden", o());
2360
2363
  }
2361
- function w() {
2362
- h.value === "bind" && (h.value = "hidden", f()), h.value === "unbind" && n();
2364
+ function _() {
2365
+ h.value === "bind" && (h.value = "hidden", c()), h.value === "unbind" && l();
2363
2366
  }
2364
- function c() {
2367
+ function m() {
2365
2368
  g.value && o();
2366
2369
  }
2367
- return E(() => {
2368
- u.value || o(), a = setInterval(c, 1e3);
2369
- }), ue(() => {
2370
+ return M(() => {
2371
+ u.value || o(), a = setInterval(m, 1e3);
2372
+ }), de(() => {
2370
2373
  a && clearInterval(a);
2371
- }), (m, y) => {
2372
- var z, q, $;
2373
- return l(), k(D, null, [!((z = e(u)) != null && z.github) && h.value === "hidden" ? (l(), S(e(fe), {
2374
+ }), (b, y) => {
2375
+ var v, $, q;
2376
+ return n(), S(F, null, [!((v = e(u)) != null && v.github) && h.value === "hidden" ? (n(), z(e(ve), {
2374
2377
  key: 0,
2375
2378
  title: "绑定GitHub"
2376
2379
  }, {
2377
- action: p(() => [i(e(B), {
2380
+ action: p(() => [i(e(O), {
2378
2381
  size: s.size,
2379
2382
  type: "primary",
2380
- onClick: y[0] || (y[0] = (R) => t("bind"))
2383
+ onClick: y[0] || (y[0] = (E) => t("bind"))
2381
2384
  }, {
2382
- default: p(() => [...y[2] || (y[2] = [O(" 绑定GitHub ", -1)])]),
2385
+ default: p(() => [...y[2] || (y[2] = [T(" 绑定GitHub ", -1)])]),
2383
2386
  _: 1
2384
2387
  }, 8, ["size"])]),
2385
- default: p(() => [y[3] || (y[3] = O(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2388
+ default: p(() => [y[3] || (y[3] = T(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2386
2389
  _: 1
2387
- })) : I("", !0), (q = e(u)) != null && q.github && h.value === "hidden" ? (l(), S(e(fe), {
2390
+ })) : A("", !0), ($ = e(u)) != null && $.github && h.value === "hidden" ? (n(), z(e(ve), {
2388
2391
  key: 1,
2389
2392
  title: "解绑GitHub"
2390
2393
  }, {
2391
- action: p(() => [i(e(B), {
2394
+ action: p(() => [i(e(O), {
2392
2395
  size: s.size,
2393
2396
  type: "primary",
2394
- onClick: y[1] || (y[1] = (R) => t("unbind"))
2397
+ onClick: y[1] || (y[1] = (E) => t("unbind"))
2395
2398
  }, {
2396
- default: p(() => [...y[5] || (y[5] = [O(" 解绑GitHub ", -1)])]),
2399
+ default: p(() => [...y[5] || (y[5] = [T(" 解绑GitHub ", -1)])]),
2397
2400
  _: 1
2398
2401
  }, 8, ["size"])]),
2399
2402
  default: p(() => {
2400
- var R, x;
2401
- return [_("div", Ds, [d.value ? (l(), S(e(te), {
2403
+ var E, Y;
2404
+ return [k("div", Fs, [d.value ? (n(), z(e(ee), {
2402
2405
  key: 0,
2403
2406
  class: "oauth-binding-account__avatar",
2404
2407
  "image-url": d.value,
2405
2408
  size: 42
2406
- }, null, 8, ["image-url"])) : (l(), k("div", Es, [i(_e, {
2407
- icon: e(Q).github,
2408
- size: e(je),
2409
+ }, null, 8, ["image-url"])) : (n(), S("div", Ms, [i(_e, {
2410
+ icon: e(K).github,
2411
+ size: e(Ne),
2409
2412
  alt: "GitHub"
2410
- }, null, 8, ["icon", "size"])])), _("div", Hs, [y[4] || (y[4] = _("div", {
2413
+ }, null, 8, ["icon", "size"])])), k("div", Ds, [y[4] || (y[4] = k("div", {
2411
2414
  class: "oauth-binding-account__provider"
2412
- }, "GitHub", -1)), _("div", Gs, L(((x = (R = e(u)) == null ? void 0 : R.github) == null ? void 0 : x.login) || "GitHub"), 1)])])];
2415
+ }, "GitHub", -1)), k("div", Es, B(((Y = (E = e(u)) == null ? void 0 : E.github) == null ? void 0 : Y.login) || "GitHub"), 1)])])];
2413
2416
  }),
2414
2417
  _: 1
2415
- })) : I("", !0), h.value === "bind" || h.value === "unbind" ? (l(), S(We, {
2418
+ })) : A("", !0), h.value === "bind" || h.value === "unbind" ? (n(), z(je, {
2416
2419
  key: 2,
2417
2420
  size: s.size,
2418
- email: ($ = e(u)) == null ? void 0 : $.email,
2419
- onNext: w
2420
- }, null, 8, ["size", "email"])) : I("", !0)], 64);
2421
+ email: (q = e(u)) == null ? void 0 : q.email,
2422
+ onNext: _
2423
+ }, null, 8, ["size", "email"])) : A("", !0)], 64);
2421
2424
  };
2422
2425
  }
2423
- }), _i = /* @__PURE__ */ U(Ns, [["__scopeId", "data-v-1cfa8892"]]), js = /* @__PURE__ */ V({
2426
+ }), bi = /* @__PURE__ */ U(Hs, [["__scopeId", "data-v-1cfa8892"]]), Gs = /* @__PURE__ */ C({
2424
2427
  __name: "LegalDocViewer",
2425
2428
  props: {
2426
2429
  type: {},
2427
2430
  appId: {}
2428
2431
  },
2429
- setup(b) {
2430
- const r = b, u = T(() => Ke[r.type] ?? ""), o = A(!1), h = A(null);
2432
+ setup(w) {
2433
+ const r = w, u = R(() => We[r.type] ?? ""), o = I(!1), h = I(null);
2431
2434
  async function g() {
2432
2435
  if (!r.type || !r.appId) {
2433
2436
  h.value = null;
2434
2437
  return;
2435
2438
  }
2436
2439
  o.value = !0;
2437
- const a = await Ye(r.appId);
2440
+ const a = await Xe(r.appId);
2438
2441
  if (o.value = !1, !a) {
2439
2442
  h.value = null;
2440
2443
  return;
2441
2444
  }
2442
2445
  const s = a[r.type];
2443
- h.value = Je(s) ? s : null;
2446
+ h.value = Ke(s) ? s : null;
2444
2447
  }
2445
- return ye(() => [r.type, r.appId], () => {
2448
+ return ne(() => [r.type, r.appId], () => {
2446
2449
  g();
2447
2450
  }, {
2448
2451
  immediate: !0
2449
- }), (a, s) => o.value ? (l(), S(e(Be), {
2452
+ }), (a, s) => o.value ? (n(), z(e(Le), {
2450
2453
  key: 0,
2451
2454
  loading: o.value,
2452
2455
  class: "legal-doc-viewer-loading"
2453
- }, null, 8, ["loading"])) : h.value ? (l(), S(e(Qe), {
2456
+ }, null, 8, ["loading"])) : h.value ? (n(), z(e(Je), {
2454
2457
  key: 2,
2455
2458
  modelValue: h.value,
2456
2459
  "onUpdate:modelValue": s[1] || (s[1] = (d) => h.value = d),
2457
2460
  editable: !1
2458
2461
  }, {
2459
- title: p(() => [i(e(Xe), {
2462
+ title: p(() => [i(e(Qe), {
2460
2463
  modelValue: u.value,
2461
2464
  "onUpdate:modelValue": s[0] || (s[0] = (d) => u.value = d),
2462
2465
  editable: !1,
2463
2466
  class: "legal-doc-viewer-title"
2464
2467
  }, null, 8, ["modelValue"])]),
2465
2468
  _: 1
2466
- }, 8, ["modelValue"])) : (l(), S(e(Me), {
2469
+ }, 8, ["modelValue"])) : (n(), z(e(Fe), {
2467
2470
  key: 1,
2468
2471
  description: "暂无内容"
2469
2472
  }));
2470
2473
  }
2471
- }), ki = /* @__PURE__ */ U(js, [["__scopeId", "data-v-fe9a3621"]]);
2474
+ }), wi = /* @__PURE__ */ U(Gs, [["__scopeId", "data-v-fe9a3621"]]);
2472
2475
  export {
2473
- ws as A,
2474
- ts as E,
2475
- ki as L,
2476
- J as O,
2477
- $t as P,
2478
- kt as R,
2479
- ee as S,
2480
- hi as _,
2481
- yi as a,
2482
- ks as b,
2476
+ ys as A,
2477
+ Zt as E,
2478
+ wi as L,
2479
+ Z as O,
2480
+ Ct as P,
2481
+ wt as R,
2482
+ X as S,
2483
+ vi as _,
2484
+ gi as a,
2485
+ ws as b,
2483
2486
  Pe as c,
2484
- bi as d,
2485
- _i as e,
2486
- Is as f,
2487
- wi as g,
2488
- lt as h,
2489
- ct as i,
2490
- vt as j,
2491
- Qt as k,
2492
- Lt as l,
2493
- fs as m,
2494
- ns as n,
2495
- me as o,
2496
- jt as p
2487
+ hi as d,
2488
+ bi as e,
2489
+ Ss as f,
2490
+ yi as g,
2491
+ at as h,
2492
+ ut as i,
2493
+ mt as j,
2494
+ Kt as k,
2495
+ Ot as l,
2496
+ ps as m,
2497
+ os as n,
2498
+ fe as o,
2499
+ Gt as p
2497
2500
  };