@yourgoods/ui-smart 0.46.3 → 0.46.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ProfileEmailDialog-CyEyVksj.js → ProfileEmailDialog-anbTLDAX.js} +189 -189
- package/dist/{ProfilePasswordDialog-9f1LPFRr.js → ProfilePasswordDialog-CeKV-Qzk.js} +1 -1
- package/dist/ProfilePhoneDialog-Cu_Ug6x9.js +841 -0
- package/dist/components/PEditUserContact/ProfileDialogs/ProfilePhoneDialog.vue.d.ts +1 -1
- package/dist/{index-CsonpLgW.js → index-BKwB1EH3.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/{useRateLimitToast-CclSktkZ.js → useRateLimitToast--LDSCeNe.js} +1 -1
- package/package.json +1 -1
- package/dist/ProfilePhoneDialog-DakDmdje.js +0 -846
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as ie, ref as x, reactive as
|
|
2
|
-
import { T as ve, c as $e, u as ze, a as We, P as Te, b as He } from "./useRateLimitToast
|
|
3
|
-
import { C as R, _ as _e, B as qe, p as
|
|
4
|
-
import { PInput as
|
|
1
|
+
import { defineComponent as ie, ref as x, reactive as Z, watch as Y, computed as V, toRefs as ce, createElementBlock as I, openBlock as w, createElementVNode as B, createCommentVNode as D, toDisplayString as ee, createVNode as $, unref as u, isRef as te, withCtx as G, createTextVNode as ne, Fragment as Fe, createBlock as _, resolveDynamicComponent as he, onMounted as Re } from "vue";
|
|
2
|
+
import { T as ve, c as $e, u as ze, a as We, P as Te, b as He } from "./useRateLimitToast--LDSCeNe.js";
|
|
3
|
+
import { C as R, _ as _e, B as qe, p as H, g as je } from "./index-BKwB1EH3.js";
|
|
4
|
+
import { PInput as J, IconMailMd as pe, PButton as se, IconEyeMd as Me, IconEyeClosedMd as be, PDialog as Ge, PTopBar as Ye, IconCrossMd as Je } from "@profeat/ui-kit";
|
|
5
5
|
const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dialogDefaultContainerTextHint" }, Xe = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "input-wrapper"
|
|
@@ -26,29 +26,29 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
26
26
|
loading: { type: Boolean }
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:email", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-clear-code-error"],
|
|
29
|
-
setup(
|
|
30
|
-
const v =
|
|
29
|
+
setup(q, { emit: W }) {
|
|
30
|
+
const v = q, s = W, m = x(!1), e = x(""), n = Z({
|
|
31
31
|
emailModel: v.email || "",
|
|
32
32
|
codeModel: "",
|
|
33
33
|
touched: { email: !1, code: !1 }
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
Y(
|
|
36
36
|
() => n.emailModel,
|
|
37
37
|
(p) => {
|
|
38
38
|
s("update:email", p);
|
|
39
39
|
}
|
|
40
|
-
),
|
|
40
|
+
), Y(
|
|
41
41
|
() => n.codeModel,
|
|
42
42
|
(p) => s("update:code", p)
|
|
43
43
|
);
|
|
44
|
-
const
|
|
44
|
+
const h = (p) => {
|
|
45
45
|
n.touched[p] = !0;
|
|
46
46
|
}, d = (p) => n.touched[p] = !1, r = () => {
|
|
47
47
|
e.value = "", d("email");
|
|
48
|
-
},
|
|
48
|
+
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())), U = V(() => !T.value || !!e.value), L = async () => {
|
|
49
49
|
var p;
|
|
50
50
|
try {
|
|
51
|
-
if (
|
|
51
|
+
if (h("email"), !T.value) {
|
|
52
52
|
e.value = "Это не похоже на e-mail";
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
@@ -67,7 +67,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
let A = "";
|
|
70
|
-
const
|
|
70
|
+
const C = (p) => {
|
|
71
71
|
s("on-clear-code-error");
|
|
72
72
|
const a = p.target;
|
|
73
73
|
let i = a.value.replace(/\D/g, "");
|
|
@@ -78,58 +78,58 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
78
78
|
if (e.value) return e.value;
|
|
79
79
|
if (n.touched.email) {
|
|
80
80
|
if (!n.emailModel.trim()) return "Введите e-mail";
|
|
81
|
-
if (!
|
|
81
|
+
if (!T.value) return "Это не похоже на e-mail";
|
|
82
82
|
}
|
|
83
83
|
return v.emailError || "";
|
|
84
|
-
}),
|
|
84
|
+
}), M = V(() => v.isNotMatchCode ? "Неверный код" : n.touched.code ? F.value.trim() ? v.codeError ?? null : "Введите код" : ""), { emailModel: P, codeModel: F } = ce(n);
|
|
85
85
|
return (p, a) => {
|
|
86
86
|
const i = ve;
|
|
87
|
-
return
|
|
88
|
-
B("div", Qe,
|
|
89
|
-
p.showEmail ? (
|
|
90
|
-
$(u(
|
|
87
|
+
return w(), I("div", Ke, [
|
|
88
|
+
B("div", Qe, ee(m.value ? "Введите код подтверждения" : p.hintText), 1),
|
|
89
|
+
p.showEmail ? (w(), I("div", Xe, [
|
|
90
|
+
$(u(J), {
|
|
91
91
|
modelValue: u(P),
|
|
92
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
92
|
+
"onUpdate:modelValue": a[0] || (a[0] = (y) => te(P) ? P.value = y : null),
|
|
93
93
|
size: "large",
|
|
94
94
|
"text-size": "medium",
|
|
95
95
|
label: "Почта",
|
|
96
96
|
type: "email",
|
|
97
97
|
error: b.value,
|
|
98
|
-
onBlur: a[1] || (a[1] = (
|
|
98
|
+
onBlur: a[1] || (a[1] = (y) => h("email")),
|
|
99
99
|
onInput: r
|
|
100
100
|
}, null, 8, ["modelValue", "error"]),
|
|
101
101
|
$(u(pe), {
|
|
102
102
|
class: "icon-locked",
|
|
103
|
-
onClick: a[2] || (a[2] = (
|
|
103
|
+
onClick: a[2] || (a[2] = (y) => p.$emit("edit", "email"))
|
|
104
104
|
})
|
|
105
105
|
])) : D("", !0),
|
|
106
|
-
m.value ? D("", !0) : (
|
|
106
|
+
m.value ? D("", !0) : (w(), I("div", Ze, [
|
|
107
107
|
$(u(se), {
|
|
108
108
|
style: { width: "100%" },
|
|
109
109
|
disabled: U.value,
|
|
110
110
|
onClick: L
|
|
111
111
|
}, {
|
|
112
|
-
default:
|
|
112
|
+
default: G(() => a[5] || (a[5] = [
|
|
113
113
|
ne(" Отправить код ")
|
|
114
114
|
])),
|
|
115
115
|
_: 1,
|
|
116
116
|
__: [5]
|
|
117
117
|
}, 8, ["disabled"])
|
|
118
118
|
])),
|
|
119
|
-
m.value ? (
|
|
120
|
-
$(u(
|
|
119
|
+
m.value ? (w(), I("div", et, [
|
|
120
|
+
$(u(J), {
|
|
121
121
|
modelValue: u(F),
|
|
122
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
122
|
+
"onUpdate:modelValue": a[3] || (a[3] = (y) => te(F) ? F.value = y : null),
|
|
123
123
|
size: "large",
|
|
124
124
|
"text-size": "medium",
|
|
125
125
|
label: "Код",
|
|
126
126
|
type: "text",
|
|
127
|
-
error:
|
|
128
|
-
onInput:
|
|
129
|
-
onBlur: a[4] || (a[4] = (
|
|
127
|
+
error: M.value,
|
|
128
|
+
onInput: C,
|
|
129
|
+
onBlur: a[4] || (a[4] = (y) => h("code"))
|
|
130
130
|
}, null, 8, ["modelValue", "error"])
|
|
131
131
|
])) : D("", !0),
|
|
132
|
-
!p.loading && m.value ? (
|
|
132
|
+
!p.loading && m.value ? (w(), I("div", tt, [
|
|
133
133
|
$(i, {
|
|
134
134
|
loading: p.loading,
|
|
135
135
|
"rate-limit-text": p.rateLimitText,
|
|
@@ -152,42 +152,42 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
152
152
|
emailSessionId: {}
|
|
153
153
|
},
|
|
154
154
|
emits: ["update:modelValue", "submit", "close", "update-user"],
|
|
155
|
-
setup(
|
|
156
|
-
const v = W, s = x(!1), m = x(""), e = x(""), n =
|
|
155
|
+
setup(q, { emit: W }) {
|
|
156
|
+
const v = W, s = x(!1), m = x(""), e = x(""), n = Z({
|
|
157
157
|
newPassword: !1,
|
|
158
158
|
newPasswordConfirm: !1
|
|
159
|
-
}),
|
|
159
|
+
}), h = x(R.NEW), d = x(!1), r = x(!1), T = V(() => d.value ? "text" : "password"), U = V(() => r.value ? "text" : "password"), L = () => {
|
|
160
160
|
d.value = !d.value;
|
|
161
161
|
}, A = () => {
|
|
162
162
|
r.value = !r.value;
|
|
163
|
-
},
|
|
163
|
+
}, C = V(() => n.newPassword ? m.value.trim() ? m.value.trim().length < Ve ? `Пароль слишком короткий. Введите хотя бы ${Ve} символов` : "" : "Введите пароль" : ""), c = V(() => n.newPasswordConfirm ? e.value.trim() ? e.value !== m.value ? "Пароли не совпадают" : "" : "Повторите пароль" : ""), b = V(() => !!(C.value || c.value)), M = V(() => s.value || !m.value.trim() || !e.value.trim() ? !0 : b.value), P = () => {
|
|
164
164
|
v("update:modelValue", !1), v("close");
|
|
165
165
|
}, F = async () => {
|
|
166
166
|
v("update-user", m.value);
|
|
167
167
|
};
|
|
168
|
-
return (p, a) => (
|
|
168
|
+
return (p, a) => (w(), I(Fe, null, [
|
|
169
169
|
B("div", lt, [
|
|
170
170
|
B("div", ot, [
|
|
171
|
-
a[7] || (a[7] = B("div", { class: "dialogDefaultContainerTextHint" },
|
|
171
|
+
a[7] || (a[7] = B("div", { class: "dialogDefaultContainerTextHint" }, ee("Установите новый пароль для защиты аккаунта. Пароль должен содержать не менее 8 символов."), -1)),
|
|
172
172
|
B("div", it, [
|
|
173
|
-
$(u(
|
|
173
|
+
$(u(J), {
|
|
174
174
|
modelValue: m.value,
|
|
175
175
|
"onUpdate:modelValue": a[0] || (a[0] = (i) => m.value = i),
|
|
176
176
|
size: "large",
|
|
177
177
|
"text-size": "medium",
|
|
178
178
|
label: "Новый пароль",
|
|
179
|
-
type:
|
|
180
|
-
error:
|
|
179
|
+
type: T.value,
|
|
180
|
+
error: C.value,
|
|
181
181
|
onBlur: a[1] || (a[1] = () => n.newPassword = !0),
|
|
182
182
|
onInput: a[2] || (a[2] = () => n.newPassword = !0)
|
|
183
183
|
}, null, 8, ["modelValue", "type", "error"]),
|
|
184
|
-
(
|
|
184
|
+
(w(), _(he(d.value ? u(Me) : u(be)), {
|
|
185
185
|
class: "icon-locked",
|
|
186
186
|
onClick: L
|
|
187
187
|
}))
|
|
188
188
|
]),
|
|
189
189
|
B("div", nt, [
|
|
190
|
-
$(u(
|
|
190
|
+
$(u(J), {
|
|
191
191
|
modelValue: e.value,
|
|
192
192
|
"onUpdate:modelValue": a[3] || (a[3] = (i) => e.value = i),
|
|
193
193
|
size: "large",
|
|
@@ -198,7 +198,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
198
198
|
onBlur: a[4] || (a[4] = () => n.newPasswordConfirm = !0),
|
|
199
199
|
onInput: a[5] || (a[5] = () => n.newPasswordConfirm = !0)
|
|
200
200
|
}, null, 8, ["modelValue", "type", "error"]),
|
|
201
|
-
(
|
|
201
|
+
(w(), _(he(r.value ? u(Me) : u(be)), {
|
|
202
202
|
class: "icon-locked",
|
|
203
203
|
onClick: A
|
|
204
204
|
}))
|
|
@@ -206,11 +206,11 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
206
206
|
B("div", st, [
|
|
207
207
|
$(u(se), {
|
|
208
208
|
style: { width: "100%" },
|
|
209
|
-
disabled:
|
|
209
|
+
disabled: M.value,
|
|
210
210
|
onClick: F
|
|
211
211
|
}, {
|
|
212
|
-
default:
|
|
213
|
-
ne(
|
|
212
|
+
default: G(() => a[6] || (a[6] = [
|
|
213
|
+
ne(ee("Сохранить"))
|
|
214
214
|
])),
|
|
215
215
|
_: 1,
|
|
216
216
|
__: [6]
|
|
@@ -218,7 +218,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
218
218
|
])
|
|
219
219
|
])
|
|
220
220
|
]),
|
|
221
|
-
|
|
221
|
+
h.value === u(R).COMPLETED ? (w(), I("div", dt, [
|
|
222
222
|
B("div", rt, [
|
|
223
223
|
a[9] || (a[9] = B("p", null, "Пароль успешно установлен", -1)),
|
|
224
224
|
B("div", ut, [
|
|
@@ -226,7 +226,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
226
226
|
style: { width: "100%" },
|
|
227
227
|
onClick: P
|
|
228
228
|
}, {
|
|
229
|
-
default:
|
|
229
|
+
default: G(() => a[8] || (a[8] = [
|
|
230
230
|
ne("Закрыть")
|
|
231
231
|
])),
|
|
232
232
|
_: 1,
|
|
@@ -259,8 +259,8 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
259
259
|
loading: { type: Boolean }
|
|
260
260
|
},
|
|
261
261
|
emits: ["update:email", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code-again", "on-clear-code-error"],
|
|
262
|
-
setup(
|
|
263
|
-
const v =
|
|
262
|
+
setup(q, { emit: W }) {
|
|
263
|
+
const v = q, s = W, m = Z({
|
|
264
264
|
touched: {
|
|
265
265
|
email: !1,
|
|
266
266
|
code: !1
|
|
@@ -268,62 +268,62 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
268
268
|
emailModel: v.email,
|
|
269
269
|
codeModel: v.code
|
|
270
270
|
});
|
|
271
|
-
|
|
271
|
+
Y(
|
|
272
272
|
() => m.emailModel,
|
|
273
|
-
(
|
|
274
|
-
),
|
|
273
|
+
(C) => s("update:email", C)
|
|
274
|
+
), Y(
|
|
275
275
|
() => m.codeModel,
|
|
276
|
-
(
|
|
276
|
+
(C) => s("update:code", C)
|
|
277
277
|
);
|
|
278
|
-
const e = (
|
|
279
|
-
m.touched[
|
|
280
|
-
}, n = x(""),
|
|
278
|
+
const e = (C) => {
|
|
279
|
+
m.touched[C] = !0;
|
|
280
|
+
}, n = x(""), h = (C) => {
|
|
281
281
|
s("on-clear-code-error");
|
|
282
|
-
const c =
|
|
282
|
+
const c = C.target;
|
|
283
283
|
let b = ((c == null ? void 0 : c.value) ?? "").replace(/\D/g, "");
|
|
284
|
-
b.length > 4 && (b = b.slice(0, 4)),
|
|
284
|
+
b.length > 4 && (b = b.slice(0, 4)), T.value = b, c && c.value !== b && (c.value = b), b.length === 4 && b !== n.value && (n.value = b, s("on-match-code", { email: r.value, code: b }));
|
|
285
285
|
}, d = () => {
|
|
286
286
|
s("on-send-code-again", { email: r.value });
|
|
287
|
-
}, { emailModel: r, codeModel:
|
|
288
|
-
return (
|
|
287
|
+
}, { emailModel: r, codeModel: T, touched: U } = ce(m), L = V(() => U.value.email && !r.value.trim() ? "Введите e-mail" : v.emailError), A = V(() => v.isNotMatchCode ? "Неверный код" : U.value.code ? T.value.trim() ? v.codeError ?? null : "Введите код" : "");
|
|
288
|
+
return (C, c) => {
|
|
289
289
|
const b = ve;
|
|
290
|
-
return
|
|
291
|
-
B("div", vt,
|
|
292
|
-
|
|
293
|
-
$(u(
|
|
290
|
+
return w(), I("div", ct, [
|
|
291
|
+
B("div", vt, ee(C.hintText), 1),
|
|
292
|
+
C.showEmail ? (w(), I("div", pt, [
|
|
293
|
+
$(u(J), {
|
|
294
294
|
modelValue: u(r),
|
|
295
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
295
|
+
"onUpdate:modelValue": c[0] || (c[0] = (M) => te(r) ? r.value = M : null),
|
|
296
296
|
size: "large",
|
|
297
297
|
"text-size": "medium",
|
|
298
298
|
label: "Почта",
|
|
299
299
|
type: "email",
|
|
300
300
|
error: L.value,
|
|
301
301
|
disabled: !0,
|
|
302
|
-
onBlur: c[1] || (c[1] = (
|
|
303
|
-
onInput: c[2] || (c[2] = (
|
|
302
|
+
onBlur: c[1] || (c[1] = (M) => e("email")),
|
|
303
|
+
onInput: c[2] || (c[2] = (M) => e("email"))
|
|
304
304
|
}, null, 8, ["modelValue", "error"]),
|
|
305
305
|
$(u(pe), {
|
|
306
306
|
class: "icon-locked",
|
|
307
|
-
onClick: c[3] || (c[3] = (
|
|
307
|
+
onClick: c[3] || (c[3] = (M) => C.$emit("edit", "email"))
|
|
308
308
|
})
|
|
309
309
|
])) : D("", !0),
|
|
310
|
-
|
|
311
|
-
$(u(
|
|
312
|
-
modelValue: u(
|
|
313
|
-
"onUpdate:modelValue": c[4] || (c[4] = (
|
|
310
|
+
C.showCode ? (w(), I("div", ft, [
|
|
311
|
+
$(u(J), {
|
|
312
|
+
modelValue: u(T),
|
|
313
|
+
"onUpdate:modelValue": c[4] || (c[4] = (M) => te(T) ? T.value = M : null),
|
|
314
314
|
size: "large",
|
|
315
315
|
"text-size": "medium",
|
|
316
316
|
label: "Код",
|
|
317
317
|
type: "text",
|
|
318
318
|
error: A.value,
|
|
319
|
-
onInput:
|
|
320
|
-
onBlur: c[5] || (c[5] = (
|
|
319
|
+
onInput: h,
|
|
320
|
+
onBlur: c[5] || (c[5] = (M) => e("code"))
|
|
321
321
|
}, null, 8, ["modelValue", "error"])
|
|
322
322
|
])) : D("", !0),
|
|
323
323
|
$(b, {
|
|
324
|
-
loading:
|
|
325
|
-
"rate-limit-text":
|
|
326
|
-
"is-final-limit":
|
|
324
|
+
loading: C.loading,
|
|
325
|
+
"rate-limit-text": C.rateLimitText,
|
|
326
|
+
"is-final-limit": C.isFinalLimit,
|
|
327
327
|
"on-send-again": d
|
|
328
328
|
}, null, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
329
329
|
]);
|
|
@@ -353,32 +353,32 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
353
353
|
loading: { type: Boolean }
|
|
354
354
|
},
|
|
355
355
|
emits: ["update:email", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-clear-code-error"],
|
|
356
|
-
setup(
|
|
357
|
-
const v =
|
|
356
|
+
setup(q, { emit: W }) {
|
|
357
|
+
const v = q, s = W, m = x(!1), e = x(""), n = Z({
|
|
358
358
|
touched: { email: !1, code: !1 },
|
|
359
359
|
emailModel: "",
|
|
360
360
|
codeModel: ""
|
|
361
361
|
});
|
|
362
|
-
|
|
362
|
+
Y(
|
|
363
363
|
() => n.emailModel,
|
|
364
364
|
(a) => {
|
|
365
365
|
s("update:email", a);
|
|
366
366
|
}
|
|
367
|
-
),
|
|
367
|
+
), Y(
|
|
368
368
|
() => n.codeModel,
|
|
369
369
|
(a) => s("update:code", a)
|
|
370
370
|
);
|
|
371
|
-
const
|
|
371
|
+
const h = (a) => n.touched[a] = !0, d = (a) => n.touched[a] = !1, r = () => {
|
|
372
372
|
e.value = "", d("email");
|
|
373
|
-
},
|
|
373
|
+
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())), U = V(() => !T.value || !!e.value), L = async () => {
|
|
374
374
|
var a;
|
|
375
375
|
try {
|
|
376
|
-
if (
|
|
376
|
+
if (h("email"), !T.value) {
|
|
377
377
|
e.value = "Это не похоже на e-mail";
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
|
-
const i = await $e(n.emailModel), { data:
|
|
381
|
-
if (!(((a =
|
|
380
|
+
const i = await $e(n.emailModel), { data: y } = i.data;
|
|
381
|
+
if (!(((a = y.data[0]) == null ? void 0 : a.available) ?? !1)) {
|
|
382
382
|
e.value = "Такой email уже используется";
|
|
383
383
|
return;
|
|
384
384
|
}
|
|
@@ -388,35 +388,35 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
let A = "";
|
|
391
|
-
const
|
|
391
|
+
const C = (a) => {
|
|
392
392
|
s("on-clear-code-error");
|
|
393
393
|
const i = a.target;
|
|
394
|
-
let
|
|
395
|
-
|
|
394
|
+
let y = i.value.replace(/\D/g, "");
|
|
395
|
+
y.length > 4 && (y = y.slice(0, 4), i.value = y), n.codeModel = y, y.length === 4 && y !== A && (A = y, s("on-match-code", { email: n.emailModel, code: y }));
|
|
396
396
|
}, c = () => {
|
|
397
397
|
s("on-send-code-again", { email: n.emailModel });
|
|
398
|
-
}, { emailModel: b, codeModel:
|
|
398
|
+
}, { emailModel: b, codeModel: M, touched: P } = ce(n), F = V(() => {
|
|
399
399
|
if (e.value) return e.value;
|
|
400
400
|
if (n.touched.email) {
|
|
401
401
|
if (!n.emailModel.trim()) return "Введите e-mail";
|
|
402
|
-
if (!
|
|
402
|
+
if (!T.value) return "Это не похоже на e-mail";
|
|
403
403
|
}
|
|
404
404
|
return v.emailError || "";
|
|
405
|
-
}), p = V(() => v.isNotMatchCode ? "Неверный код" : P.value.code ?
|
|
405
|
+
}), p = V(() => v.isNotMatchCode ? "Неверный код" : P.value.code ? M.value.trim() ? v.codeError ?? null : "Введите код" : "");
|
|
406
406
|
return (a, i) => {
|
|
407
|
-
const
|
|
408
|
-
return
|
|
409
|
-
B("div", yt,
|
|
410
|
-
a.showEmail ? (
|
|
411
|
-
$(u(
|
|
407
|
+
const y = ve;
|
|
408
|
+
return w(), I("div", Ct, [
|
|
409
|
+
B("div", yt, ee(m.value ? "Введите код подтверждения" : a.hintText), 1),
|
|
410
|
+
a.showEmail ? (w(), I("div", gt, [
|
|
411
|
+
$(u(J), {
|
|
412
412
|
modelValue: u(b),
|
|
413
|
-
"onUpdate:modelValue": i[0] || (i[0] = (z) =>
|
|
413
|
+
"onUpdate:modelValue": i[0] || (i[0] = (z) => te(b) ? b.value = z : null),
|
|
414
414
|
size: "large",
|
|
415
415
|
"text-size": "medium",
|
|
416
416
|
label: "Почта",
|
|
417
417
|
type: "email",
|
|
418
418
|
error: F.value,
|
|
419
|
-
onBlur: i[1] || (i[1] = (z) =>
|
|
419
|
+
onBlur: i[1] || (i[1] = (z) => h("email")),
|
|
420
420
|
onInput: r
|
|
421
421
|
}, null, 8, ["modelValue", "error"]),
|
|
422
422
|
$(u(pe), {
|
|
@@ -424,34 +424,34 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
424
424
|
onClick: i[2] || (i[2] = (z) => a.$emit("edit", "email"))
|
|
425
425
|
})
|
|
426
426
|
])) : D("", !0),
|
|
427
|
-
m.value ? D("", !0) : (
|
|
427
|
+
m.value ? D("", !0) : (w(), I("div", ht, [
|
|
428
428
|
$(u(se), {
|
|
429
429
|
style: { width: "100%" },
|
|
430
430
|
disabled: U.value,
|
|
431
431
|
onClick: L
|
|
432
432
|
}, {
|
|
433
|
-
default:
|
|
433
|
+
default: G(() => i[5] || (i[5] = [
|
|
434
434
|
ne(" Отправить код ")
|
|
435
435
|
])),
|
|
436
436
|
_: 1,
|
|
437
437
|
__: [5]
|
|
438
438
|
}, 8, ["disabled"])
|
|
439
439
|
])),
|
|
440
|
-
m.value ? (
|
|
441
|
-
$(u(
|
|
442
|
-
modelValue: u(
|
|
443
|
-
"onUpdate:modelValue": i[3] || (i[3] = (z) =>
|
|
440
|
+
m.value ? (w(), I("div", Tt, [
|
|
441
|
+
$(u(J), {
|
|
442
|
+
modelValue: u(M),
|
|
443
|
+
"onUpdate:modelValue": i[3] || (i[3] = (z) => te(M) ? M.value = z : null),
|
|
444
444
|
size: "large",
|
|
445
445
|
"text-size": "medium",
|
|
446
446
|
label: "Код",
|
|
447
447
|
type: "text",
|
|
448
448
|
error: p.value,
|
|
449
|
-
onInput:
|
|
450
|
-
onBlur: i[4] || (i[4] = (z) =>
|
|
449
|
+
onInput: C,
|
|
450
|
+
onBlur: i[4] || (i[4] = (z) => h("code"))
|
|
451
451
|
}, null, 8, ["modelValue", "error"])
|
|
452
452
|
])) : D("", !0),
|
|
453
|
-
m.value ? (
|
|
454
|
-
$(
|
|
453
|
+
m.value ? (w(), I("div", Mt, [
|
|
454
|
+
$(y, {
|
|
455
455
|
loading: a.loading,
|
|
456
456
|
"rate-limit-text": a.rateLimitText,
|
|
457
457
|
"is-final-limit": a.isFinalLimit,
|
|
@@ -479,26 +479,26 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
479
479
|
mode: {}
|
|
480
480
|
},
|
|
481
481
|
emits: ["update:modelValue", "submit-email", "edit", "close", "notify", "clean-input-errors", "on-update-jwt", "update-email-field", "on-password-error", "on-toast"],
|
|
482
|
-
setup(
|
|
483
|
-
const v =
|
|
482
|
+
setup(q, { emit: W }) {
|
|
483
|
+
const v = q, s = W, m = x(v.modelValue), e = Z({
|
|
484
484
|
oldEmail: v.initialEmail,
|
|
485
485
|
newEmail: "",
|
|
486
486
|
code: "",
|
|
487
487
|
addEmail: "",
|
|
488
488
|
addCode: ""
|
|
489
|
-
}), n =
|
|
490
|
-
|
|
489
|
+
}), n = Z({ email: !1, code: !1 }), h = x(R.OLD), d = x(null), r = x(!1), T = x(!1), U = x(!1), L = x(qe.VERIFY_EMAIL), A = V(() => L.value === "password-flow"), C = V(() => p.value ? v.title : A.value ? "Добавление пароля" : "Добавление почты"), { startTimer: c, remainingSeconds: b, isAvailableForSendAgain: M, totalRateAttempts: P, currentRateAttempt: F } = We(), { isEditFlow: p, getFlow: a } = ze(x(v.mode ?? "edit")), { showRateLimitToast: i } = He(s), y = V(() => n.email && !e.oldEmail.trim() ? "Введите e-mail" : ""), z = V(() => n.code && !e.code.trim() ? "Введите код" : ""), de = V(() => M.value ? "Повторить" : `${b.value}`), j = x(xe), ke = V(() => j.value === 0), Ie = (l) => new Promise((t) => setTimeout(t, l));
|
|
490
|
+
Y(
|
|
491
491
|
() => v.modelValue,
|
|
492
492
|
(l) => m.value = l
|
|
493
|
-
),
|
|
493
|
+
), Y(m, (l) => s("update:modelValue", l));
|
|
494
494
|
const re = () => {
|
|
495
495
|
s("close"), m.value = !1;
|
|
496
496
|
}, fe = (l) => s("edit", l);
|
|
497
497
|
async function Ee(l, t = !1) {
|
|
498
498
|
var o;
|
|
499
499
|
try {
|
|
500
|
-
const
|
|
501
|
-
return
|
|
500
|
+
const E = (o = (await H("/users/profile/check-throttler", { method: "email", email: l, isInvite: t })).data) == null ? void 0 : o.data;
|
|
501
|
+
return E ? (await Ie(1e3), E.restTimeSec > 0 ? (c(E.restTimeSec), M.value = !1, P.value = E.attempts.total ?? P.value, F.value = (E.attempts.total ?? 0) - (E.attempts.available ?? 0), j.value = E.attempts.available ?? j.value) : M.value = !0, E) : null;
|
|
502
502
|
} catch {
|
|
503
503
|
return null;
|
|
504
504
|
}
|
|
@@ -510,7 +510,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
510
510
|
async function Se(l = "email") {
|
|
511
511
|
try {
|
|
512
512
|
const t = await ue(l);
|
|
513
|
-
d.value = (t == null ? void 0 : t.sessionId) ?? d.value,
|
|
513
|
+
d.value = (t == null ? void 0 : t.sessionId) ?? d.value, h.value = (t == null ? void 0 : t.step) ?? h.value, e.oldEmail = (t == null ? void 0 : t.oldValue) ?? e.oldEmail, t != null && t.sessionId || await we(l);
|
|
514
514
|
} catch {
|
|
515
515
|
await we(l);
|
|
516
516
|
}
|
|
@@ -518,16 +518,16 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
518
518
|
async function we(l = "email") {
|
|
519
519
|
var t;
|
|
520
520
|
try {
|
|
521
|
-
const o = await
|
|
522
|
-
d.value = (f == null ? void 0 : f.sessionId) ?? d.value,
|
|
521
|
+
const o = await H("/users/profile/session/create-if-not-exists", { field: l, oldValue: v.initialEmail }), f = ((t = o.data) == null ? void 0 : t.data) ?? o.data;
|
|
522
|
+
d.value = (f == null ? void 0 : f.sessionId) ?? d.value, h.value = (f == null ? void 0 : f.step) ?? h.value, e.oldEmail = (f == null ? void 0 : f.oldValue) ?? e.oldEmail, e.newEmail = (f == null ? void 0 : f.newValue) ?? e.newEmail;
|
|
523
523
|
} catch {
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
async function
|
|
526
|
+
async function ae({ value: l, offLoading: t = !0 }) {
|
|
527
527
|
var o;
|
|
528
528
|
try {
|
|
529
529
|
r.value = !0;
|
|
530
|
-
const f = l ?? e.addEmail,
|
|
530
|
+
const f = l ?? e.addEmail, E = await H(
|
|
531
531
|
"/users/profile/email/contact/send-code",
|
|
532
532
|
{
|
|
533
533
|
sessionId: d.value,
|
|
@@ -538,55 +538,55 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
538
538
|
}
|
|
539
539
|
// { headers: { 'x-only-sms': 'true' } }
|
|
540
540
|
);
|
|
541
|
-
if (
|
|
542
|
-
const S =
|
|
543
|
-
return S.restTimeSec > 0 ? (c(S.restTimeSec), P.value = S.attempts.total ?? P.value, F.value = (S.attempts.total ?? 0) - (S.attempts.available ?? 0),
|
|
541
|
+
if (E.status === 403 && ((o = E.data) != null && o.tooManyRequests)) {
|
|
542
|
+
const S = E.data.tooManyRequests;
|
|
543
|
+
return S.restTimeSec > 0 ? (c(S.restTimeSec), P.value = S.attempts.total ?? P.value, F.value = (S.attempts.total ?? 0) - (S.attempts.available ?? 0), j.value = S.attempts.available ?? j.value) : M.value = !0, E;
|
|
544
544
|
}
|
|
545
|
-
return
|
|
545
|
+
return E;
|
|
546
546
|
} catch (f) {
|
|
547
547
|
throw console.error(f), f;
|
|
548
548
|
} finally {
|
|
549
|
-
t && (r.value = !1);
|
|
549
|
+
await Ee(l ?? e.oldEmail), t && (r.value = !1);
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
const Ce = async (l, t) => {
|
|
553
|
-
var o, f,
|
|
553
|
+
var o, f, E, S, N, le, oe, k, K;
|
|
554
554
|
if (!e.oldEmail && t === R.OLD) throw new Error("oldEmail пустой — модель потерялась");
|
|
555
555
|
try {
|
|
556
556
|
r.value = !0;
|
|
557
|
-
const
|
|
558
|
-
if (d.value = (
|
|
559
|
-
const O = await
|
|
557
|
+
const g = await ue();
|
|
558
|
+
if (d.value = (g == null ? void 0 : g.sessionId) ?? d.value, h.value = (g == null ? void 0 : g.step) ?? h.value, e.oldEmail = (g == null ? void 0 : g.oldValue) ?? e.oldEmail, e.newEmail = (g == null ? void 0 : g.newValue) ?? e.newEmail, !d.value) throw new Error("Нет sessionId для match");
|
|
559
|
+
const O = await H("/users/profile/change/email/match-code", {
|
|
560
560
|
email: t === R.NEW ? e.newEmail : e.oldEmail,
|
|
561
561
|
sessionId: d.value,
|
|
562
562
|
code: l,
|
|
563
563
|
step: t
|
|
564
|
-
}),
|
|
564
|
+
}), Q = ((o = O.data) == null ? void 0 : o.nextStep) ?? ((E = (f = O.data) == null ? void 0 : f.data) == null ? void 0 : E.nextStep) ?? null, Ue = ((N = (S = O.data) == null ? void 0 : S.data) == null ? void 0 : N.rateLimit) ?? ((le = O.data) == null ? void 0 : le.rateLimit) ?? null, Ae = O.data.data.success ?? O.data.success;
|
|
565
565
|
if (i(Ue), !Ae) {
|
|
566
|
-
|
|
566
|
+
T.value = !0;
|
|
567
567
|
return;
|
|
568
568
|
}
|
|
569
|
-
if (
|
|
570
|
-
if (
|
|
571
|
-
const
|
|
572
|
-
e.oldEmail = (
|
|
569
|
+
if (Q) {
|
|
570
|
+
if (h.value = Q, h.value === R.NEW) {
|
|
571
|
+
const X = await ue();
|
|
572
|
+
e.oldEmail = (X == null ? void 0 : X.oldValue) ?? e.oldEmail, e.newEmail = (X == null ? void 0 : X.newValue) ?? e.newEmail, e.code = "";
|
|
573
573
|
}
|
|
574
|
-
|
|
574
|
+
h.value === R.COMPLETED && (e.code = "", s("submit-email", { email: e.addEmail, code: l }), s("on-toast", { color: "success", text: "E-mail изменён" }), s("on-update-jwt", "email", "edit", e.newEmail), d.value = null, s("close"));
|
|
575
575
|
}
|
|
576
576
|
return O;
|
|
577
|
-
} catch (
|
|
578
|
-
const O = (k = (oe =
|
|
579
|
-
if (console.error("rate-limit debug error: ",
|
|
580
|
-
console.debug("rate-limit debug status and exists rateLimit: ", O), i(O),
|
|
577
|
+
} catch (g) {
|
|
578
|
+
const O = (k = (oe = g == null ? void 0 : g.response) == null ? void 0 : oe.data) == null ? void 0 : k.rateLimit, Q = (K = g == null ? void 0 : g.response) == null ? void 0 : K.data.statusCode;
|
|
579
|
+
if (console.error("rate-limit debug error: ", g), Q === 429 && O) {
|
|
580
|
+
console.debug("rate-limit debug status and exists rateLimit: ", O), i(O), T.value = !0;
|
|
581
581
|
return;
|
|
582
582
|
}
|
|
583
|
-
throw
|
|
583
|
+
throw g;
|
|
584
584
|
} finally {
|
|
585
585
|
r.value = !1;
|
|
586
586
|
}
|
|
587
587
|
}, Be = async () => {
|
|
588
588
|
try {
|
|
589
|
-
const l = await
|
|
589
|
+
const l = await H("/users/profile/bind/email/cancel", {
|
|
590
590
|
sessionId: d.value
|
|
591
591
|
});
|
|
592
592
|
if ((l.data.data ?? l.data).success) {
|
|
@@ -613,42 +613,42 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
613
613
|
var f;
|
|
614
614
|
try {
|
|
615
615
|
if (r.value = !0, !d.value) throw new Error("Bind-сессия не найдена. Создайте её через createBindSession.");
|
|
616
|
-
const
|
|
616
|
+
const E = l ?? e.addEmail, S = await H(`/users/profile/bind/contact/send-code/${t}`, {
|
|
617
617
|
sessionId: d.value,
|
|
618
|
-
email:
|
|
618
|
+
email: E,
|
|
619
619
|
provider: v.provider
|
|
620
620
|
}), N = (f = S.data) == null ? void 0 : f.tooManyRequests;
|
|
621
621
|
if (S.status === 403 && N) {
|
|
622
|
-
N.restTimeSec > 0 ? (c(N.restTimeSec), P.value = N.attempts.total ?? P.value, F.value = (N.attempts.total ?? 0) - (N.attempts.available ?? 0),
|
|
622
|
+
N.restTimeSec > 0 ? (c(N.restTimeSec), P.value = N.attempts.total ?? P.value, F.value = (N.attempts.total ?? 0) - (N.attempts.available ?? 0), j.value = N.attempts.available ?? xe) : M.value = !0;
|
|
623
623
|
return;
|
|
624
624
|
}
|
|
625
|
-
|
|
626
|
-
return H && H.restTimeSec > 0 ? c(H.restTimeSec) : T.value = !0, S;
|
|
625
|
+
return S;
|
|
627
626
|
} finally {
|
|
628
|
-
|
|
627
|
+
const E = await Ee(l ?? e.addEmail);
|
|
628
|
+
E && E.restTimeSec > 0 ? c(E.restTimeSec) : M.value = !0, o && (r.value = !1);
|
|
629
629
|
}
|
|
630
630
|
}, De = async () => {
|
|
631
|
-
var l, t, o, f,
|
|
631
|
+
var l, t, o, f, E, S, N, le, oe;
|
|
632
632
|
try {
|
|
633
633
|
if (!d.value) {
|
|
634
|
-
const
|
|
635
|
-
d.value =
|
|
634
|
+
const Q = await me();
|
|
635
|
+
d.value = Q.sessionId ?? d.value;
|
|
636
636
|
}
|
|
637
|
-
const k = await
|
|
637
|
+
const k = await H("/users/profile/bind/email/match-code", {
|
|
638
638
|
email: e.addEmail,
|
|
639
639
|
sessionId: d.value,
|
|
640
640
|
code: e.addCode
|
|
641
|
-
}),
|
|
642
|
-
L.value =
|
|
643
|
-
const
|
|
644
|
-
if (i(
|
|
641
|
+
}), K = ((l = k.data) == null ? void 0 : l.nextStep) ?? ((o = (t = k.data) == null ? void 0 : t.data) == null ? void 0 : o.nextStep);
|
|
642
|
+
L.value = K ?? L.value;
|
|
643
|
+
const g = ((E = (f = k.data) == null ? void 0 : f.data) == null ? void 0 : E.rateLimit) ?? ((S = k.data) == null ? void 0 : S.rateLimit) ?? null, O = k.data.data.success ?? k.data.success;
|
|
644
|
+
if (i(g), !O) {
|
|
645
645
|
U.value = !0;
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
648
648
|
} catch (k) {
|
|
649
|
-
const
|
|
650
|
-
if (((oe = k == null ? void 0 : k.response) == null ? void 0 : oe.status) === 429 &&
|
|
651
|
-
i(
|
|
649
|
+
const K = (le = (N = k == null ? void 0 : k.response) == null ? void 0 : N.data) == null ? void 0 : le.rateLimit;
|
|
650
|
+
if (((oe = k == null ? void 0 : k.response) == null ? void 0 : oe.status) === 429 && K) {
|
|
651
|
+
i(K), T.value = !0;
|
|
652
652
|
return;
|
|
653
653
|
}
|
|
654
654
|
throw k;
|
|
@@ -661,14 +661,14 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
661
661
|
}
|
|
662
662
|
r.value = !0;
|
|
663
663
|
try {
|
|
664
|
-
await
|
|
664
|
+
await H("/users/profile/bind/email/password/set", { sessionId: d.value, newPassword: l }), L.value = R.COMPLETED, s("on-toast", { color: "success", text: "E-mail успешно привязан к аккаунту" }), s("update-email-field", e.addEmail), s("submit-email", { email: e.addEmail, code: e.addCode }), s("on-update-jwt", "email", "bind", e.addEmail), s("close");
|
|
665
665
|
} finally {
|
|
666
666
|
r.value = !1;
|
|
667
667
|
}
|
|
668
668
|
}, me = async () => {
|
|
669
669
|
r.value = !0;
|
|
670
670
|
try {
|
|
671
|
-
const l = await
|
|
671
|
+
const l = await H("/users/profile/bind/email/init", { email: "" }), t = l.data.data ?? l.data;
|
|
672
672
|
return L.value = t.step ?? L.value, d.value = t.sessionId ?? d.value, t;
|
|
673
673
|
} finally {
|
|
674
674
|
r.value = !1;
|
|
@@ -681,8 +681,8 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
681
681
|
await me(), r.value = !1;
|
|
682
682
|
return;
|
|
683
683
|
}
|
|
684
|
-
await Se(), e.oldEmail && await
|
|
685
|
-
}), (l, t) => (
|
|
684
|
+
await Se(), e.oldEmail && await ae({ value: e.oldEmail }), r.value = !1;
|
|
685
|
+
}), (l, t) => (w(), _(u(Ge), {
|
|
686
686
|
modelValue: m.value,
|
|
687
687
|
"onUpdate:modelValue": [
|
|
688
688
|
t[18] || (t[18] = (o) => m.value = o),
|
|
@@ -693,7 +693,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
693
693
|
"close-on-click-outside": !0,
|
|
694
694
|
"onClick:outside": re
|
|
695
695
|
}, {
|
|
696
|
-
header:
|
|
696
|
+
header: G(() => [
|
|
697
697
|
B("div", Vt, [
|
|
698
698
|
$(u(Ye), {
|
|
699
699
|
"slot-left": !1,
|
|
@@ -701,10 +701,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
701
701
|
borded: !0,
|
|
702
702
|
"no-padding": !1
|
|
703
703
|
}, {
|
|
704
|
-
title:
|
|
705
|
-
B("span", xt,
|
|
704
|
+
title: G(() => [
|
|
705
|
+
B("span", xt, ee(C.value), 1)
|
|
706
706
|
]),
|
|
707
|
-
"right-button":
|
|
707
|
+
"right-button": G(() => [
|
|
708
708
|
$(u(Je), {
|
|
709
709
|
class: "cross",
|
|
710
710
|
onClick: re
|
|
@@ -714,30 +714,30 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
714
714
|
})
|
|
715
715
|
])
|
|
716
716
|
]),
|
|
717
|
-
default:
|
|
717
|
+
default: G(() => [
|
|
718
718
|
B("div", null, [
|
|
719
|
-
u(p) ? (
|
|
720
|
-
r.value ? (
|
|
721
|
-
|
|
719
|
+
u(p) ? (w(), I("div", $t, [
|
|
720
|
+
r.value ? (w(), _(Te, { key: 0 })) : D("", !0),
|
|
721
|
+
h.value === u(R).OLD ? (w(), _(wt, {
|
|
722
722
|
key: 1,
|
|
723
723
|
email: e.oldEmail,
|
|
724
724
|
"onUpdate:email": t[0] || (t[0] = (o) => e.oldEmail = o),
|
|
725
725
|
code: e.code,
|
|
726
726
|
"onUpdate:code": t[1] || (t[1] = (o) => e.code = o),
|
|
727
727
|
"hint-text": l.hintText,
|
|
728
|
-
"email-error":
|
|
728
|
+
"email-error": y.value,
|
|
729
729
|
"code-error": z.value,
|
|
730
730
|
"rate-limit-text": de.value,
|
|
731
|
-
"is-final-limit":
|
|
732
|
-
"is-not-match-code":
|
|
731
|
+
"is-final-limit": j.value === 0,
|
|
732
|
+
"is-not-match-code": T.value,
|
|
733
733
|
loading: r.value,
|
|
734
734
|
onEdit: fe,
|
|
735
735
|
onOnMatchCode: Le,
|
|
736
736
|
onOnMatchCodeError: ye,
|
|
737
|
-
onSendCode: t[2] || (t[2] = (o) =>
|
|
738
|
-
onOnSendCodeAgain: t[3] || (t[3] = (o) =>
|
|
739
|
-
onOnClearCodeError: t[4] || (t[4] = (o) =>
|
|
740
|
-
}, null, 8, ["email", "code", "hint-text", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) :
|
|
737
|
+
onSendCode: t[2] || (t[2] = (o) => ae({ value: e.oldEmail })),
|
|
738
|
+
onOnSendCodeAgain: t[3] || (t[3] = (o) => ae({ value: e.oldEmail })),
|
|
739
|
+
onOnClearCodeError: t[4] || (t[4] = (o) => T.value = !1)
|
|
740
|
+
}, null, 8, ["email", "code", "hint-text", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) : h.value === u(R).NEW ? (w(), _(bt, {
|
|
741
741
|
key: 2,
|
|
742
742
|
email: e.newEmail,
|
|
743
743
|
"onUpdate:email": t[5] || (t[5] = (o) => e.newEmail = o),
|
|
@@ -746,29 +746,29 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
746
746
|
code: e.code,
|
|
747
747
|
"onUpdate:code": t[7] || (t[7] = (o) => e.code = o),
|
|
748
748
|
"hint-text": "Введите новый адрес вашей почты",
|
|
749
|
-
"email-error":
|
|
749
|
+
"email-error": y.value,
|
|
750
750
|
"code-error": z.value,
|
|
751
751
|
"rate-limit-text": de.value,
|
|
752
|
-
"is-final-limit":
|
|
753
|
-
"is-not-match-code":
|
|
752
|
+
"is-final-limit": j.value === 0,
|
|
753
|
+
"is-not-match-code": T.value,
|
|
754
754
|
loading: r.value,
|
|
755
755
|
onEdit: fe,
|
|
756
756
|
onOnMatchCode: Pe,
|
|
757
757
|
onOnMatchCodeError: ye,
|
|
758
|
-
onOnSendCode: t[8] || (t[8] = (o) =>
|
|
759
|
-
onOnSendCodeAgain: t[9] || (t[9] = (o) =>
|
|
760
|
-
onOnClearCodeError: t[10] || (t[10] = (o) =>
|
|
758
|
+
onOnSendCode: t[8] || (t[8] = (o) => ae({ value: e.newEmail })),
|
|
759
|
+
onOnSendCodeAgain: t[9] || (t[9] = (o) => ae({ value: e.newEmail })),
|
|
760
|
+
onOnClearCodeError: t[10] || (t[10] = (o) => T.value = !1)
|
|
761
761
|
}, null, 8, ["email", "oldEmail", "code", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) : D("", !0)
|
|
762
|
-
])) : (
|
|
763
|
-
r.value ? (
|
|
764
|
-
A.value ? (
|
|
762
|
+
])) : (w(), I("div", kt, [
|
|
763
|
+
r.value ? (w(), _(Te, { key: 0 })) : D("", !0),
|
|
764
|
+
A.value ? (w(), _(mt, {
|
|
765
765
|
key: 2,
|
|
766
766
|
"model-value": m.value,
|
|
767
767
|
"email-session-id": d.value,
|
|
768
768
|
"onUpdate:modelValue": t[17] || (t[17] = (o) => s("update:modelValue", o)),
|
|
769
769
|
onUpdateUser: Oe,
|
|
770
770
|
onClose: Be
|
|
771
|
-
}, null, 8, ["model-value", "email-session-id"])) : (
|
|
771
|
+
}, null, 8, ["model-value", "email-session-id"])) : (w(), _(at, {
|
|
772
772
|
key: 1,
|
|
773
773
|
email: e.addEmail,
|
|
774
774
|
"onUpdate:email": t[11] || (t[11] = (o) => e.addEmail = o),
|