@huyooo/ui 2.0.13 → 2.1.0

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