@yourgoods/ui-smart 0.46.6 → 0.46.7
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-Cwnt9uWm.js → ProfileEmailDialog-DlGErflr.js} +95 -95
- package/dist/{ProfilePasswordDialog-BxLfRPXi.js → ProfilePasswordDialog-DLrepGiM.js} +1 -1
- package/dist/{ProfilePhoneDialog-BmTMMKvs.js → ProfilePhoneDialog-C8_OQsEV.js} +76 -76
- package/dist/{index-DW7ADhQu.js → index-BSr7kEC4.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/{useRateLimitToast-Ml1JyBMo.js → useRateLimitToast-D6JDxDzB.js} +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
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
|
|
2
|
-
import { T as ve, c as $e, u as
|
|
3
|
-
import { C as R, _ as
|
|
4
|
-
import { PInput as J, IconMailMd as pe, PButton as se, IconEyeMd as Me, IconEyeClosedMd as be, PDialog as
|
|
5
|
-
const
|
|
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 Ae, createBlock as _, resolveDynamicComponent as he, onMounted as Fe } from "vue";
|
|
2
|
+
import { T as ve, c as $e, u as Re, a as ze, P as Te, b as We } from "./useRateLimitToast-D6JDxDzB.js";
|
|
3
|
+
import { C as R, _ as He, B as _e, p as H, g as qe } from "./index-BSr7kEC4.js";
|
|
4
|
+
import { PInput as J, IconMailMd as pe, PButton as se, IconEyeMd as Me, IconEyeClosedMd as be, PDialog as je, PTopBar as Ge, IconCrossMd as Ye } from "@profeat/ui-kit";
|
|
5
|
+
const Je = { class: "dialogDefaultContainerInsideContent" }, Ke = { class: "dialogDefaultContainerTextHint" }, Qe = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "input-wrapper"
|
|
8
|
-
},
|
|
8
|
+
}, Xe = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "input-wrapper"
|
|
11
|
-
},
|
|
11
|
+
}, Ze = {
|
|
12
12
|
key: 2,
|
|
13
13
|
class: "input-wrapper"
|
|
14
|
-
},
|
|
14
|
+
}, et = { key: 3 }, tt = /* @__PURE__ */ ie({
|
|
15
15
|
__name: "AddNewEmailContent",
|
|
16
16
|
props: {
|
|
17
17
|
email: {},
|
|
@@ -45,7 +45,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
45
45
|
n.touched[p] = !0;
|
|
46
46
|
}, d = (p) => n.touched[p] = !1, r = () => {
|
|
47
47
|
e.value = "", d("email");
|
|
48
|
-
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())),
|
|
48
|
+
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())), O = V(() => !T.value || !!e.value), L = async () => {
|
|
49
49
|
var p;
|
|
50
50
|
try {
|
|
51
51
|
if (h("email"), !T.value) {
|
|
@@ -66,12 +66,12 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
66
66
|
console.error("Неизвестная ошибка при проверке доступности email:", a), e.value = "Это не похоже на e-mail";
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
let
|
|
69
|
+
let U = "";
|
|
70
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, "");
|
|
74
|
-
i.length > 4 && (i = i.slice(0, 4)), a.value = i, n.codeModel = i, i.length === 4 && i !==
|
|
74
|
+
i.length > 4 && (i = i.slice(0, 4)), a.value = i, n.codeModel = i, i.length === 4 && i !== U && (U = i, s("on-match-code", { email: n.emailModel, code: i }));
|
|
75
75
|
}, c = () => {
|
|
76
76
|
s("on-send-code-again", { email: n.emailModel });
|
|
77
77
|
}, b = V(() => {
|
|
@@ -81,12 +81,12 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
81
81
|
if (!T.value) return "Это не похоже на e-mail";
|
|
82
82
|
}
|
|
83
83
|
return v.emailError || "";
|
|
84
|
-
}), M = V(() => v.isNotMatchCode ? "Неверный код" : n.touched.code ?
|
|
84
|
+
}), M = V(() => v.isNotMatchCode ? "Неверный код" : n.touched.code ? A.value.trim() ? v.codeError ?? null : "Введите код" : ""), { emailModel: P, codeModel: A } = ce(n);
|
|
85
85
|
return (p, a) => {
|
|
86
86
|
const i = ve;
|
|
87
|
-
return w(), I("div",
|
|
88
|
-
B("div",
|
|
89
|
-
p.showEmail ? (w(), I("div",
|
|
87
|
+
return w(), I("div", Je, [
|
|
88
|
+
B("div", Ke, ee(m.value ? "Введите код подтверждения" : p.hintText), 1),
|
|
89
|
+
p.showEmail ? (w(), I("div", Qe, [
|
|
90
90
|
$(u(J), {
|
|
91
91
|
modelValue: u(P),
|
|
92
92
|
"onUpdate:modelValue": a[0] || (a[0] = (y) => te(P) ? P.value = y : null),
|
|
@@ -103,10 +103,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
103
103
|
onClick: a[2] || (a[2] = (y) => p.$emit("edit", "email"))
|
|
104
104
|
})
|
|
105
105
|
])) : D("", !0),
|
|
106
|
-
m.value ? D("", !0) : (w(), I("div",
|
|
106
|
+
m.value ? D("", !0) : (w(), I("div", Xe, [
|
|
107
107
|
$(u(se), {
|
|
108
108
|
style: { width: "100%" },
|
|
109
|
-
disabled:
|
|
109
|
+
disabled: O.value,
|
|
110
110
|
onClick: L
|
|
111
111
|
}, {
|
|
112
112
|
default: G(() => a[5] || (a[5] = [
|
|
@@ -116,10 +116,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
116
116
|
__: [5]
|
|
117
117
|
}, 8, ["disabled"])
|
|
118
118
|
])),
|
|
119
|
-
m.value ? (w(), I("div",
|
|
119
|
+
m.value ? (w(), I("div", Ze, [
|
|
120
120
|
$(u(J), {
|
|
121
|
-
modelValue: u(
|
|
122
|
-
"onUpdate:modelValue": a[3] || (a[3] = (y) => te(
|
|
121
|
+
modelValue: u(A),
|
|
122
|
+
"onUpdate:modelValue": a[3] || (a[3] = (y) => te(A) ? A.value = y : null),
|
|
123
123
|
size: "large",
|
|
124
124
|
"text-size": "medium",
|
|
125
125
|
label: "Код",
|
|
@@ -129,7 +129,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
129
129
|
onBlur: a[4] || (a[4] = (y) => h("code"))
|
|
130
130
|
}, null, 8, ["modelValue", "error"])
|
|
131
131
|
])) : D("", !0),
|
|
132
|
-
!p.loading && m.value ? (w(), I("div",
|
|
132
|
+
!p.loading && m.value ? (w(), I("div", et, [
|
|
133
133
|
$(i, {
|
|
134
134
|
loading: p.loading,
|
|
135
135
|
"rate-limit-text": p.rateLimitText,
|
|
@@ -140,10 +140,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
140
140
|
]);
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
}),
|
|
143
|
+
}), at = { class: "dialogDefaultContainer" }, lt = { class: "dialogDefaultContainerInsideContent" }, ot = { class: "input-wrapper" }, it = { class: "input-wrapper" }, nt = { style: { width: "100%", display: "flex" } }, st = {
|
|
144
144
|
key: 0,
|
|
145
145
|
class: "dialogDefaultContainer"
|
|
146
|
-
},
|
|
146
|
+
}, dt = { class: "dialogDefaultContainerInsideContent" }, rt = { style: { "margin-top": "12px" } }, Ve = 8, ut = /* @__PURE__ */ ie({
|
|
147
147
|
__name: "AddNewPasswordContent",
|
|
148
148
|
props: {
|
|
149
149
|
modelValue: { type: Boolean },
|
|
@@ -156,20 +156,20 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
156
156
|
const v = W, s = x(!1), m = x(""), e = x(""), n = Z({
|
|
157
157
|
newPassword: !1,
|
|
158
158
|
newPasswordConfirm: !1
|
|
159
|
-
}), h = x(R.NEW), d = x(!1), r = x(!1), T = V(() => d.value ? "text" : "password"),
|
|
159
|
+
}), h = x(R.NEW), d = x(!1), r = x(!1), T = V(() => d.value ? "text" : "password"), O = V(() => r.value ? "text" : "password"), L = () => {
|
|
160
160
|
d.value = !d.value;
|
|
161
|
-
},
|
|
161
|
+
}, U = () => {
|
|
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
|
+
}, A = async () => {
|
|
166
166
|
v("update-user", m.value);
|
|
167
167
|
};
|
|
168
|
-
return (p, a) => (w(), I(
|
|
169
|
-
B("div",
|
|
170
|
-
B("div",
|
|
168
|
+
return (p, a) => (w(), I(Ae, null, [
|
|
169
|
+
B("div", at, [
|
|
170
|
+
B("div", lt, [
|
|
171
171
|
a[7] || (a[7] = B("div", { class: "dialogDefaultContainerTextHint" }, ee("Установите новый пароль для защиты аккаунта. Пароль должен содержать не менее 8 символов."), -1)),
|
|
172
|
-
B("div",
|
|
172
|
+
B("div", ot, [
|
|
173
173
|
$(u(J), {
|
|
174
174
|
modelValue: m.value,
|
|
175
175
|
"onUpdate:modelValue": a[0] || (a[0] = (i) => m.value = i),
|
|
@@ -186,28 +186,28 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
186
186
|
onClick: L
|
|
187
187
|
}))
|
|
188
188
|
]),
|
|
189
|
-
B("div",
|
|
189
|
+
B("div", it, [
|
|
190
190
|
$(u(J), {
|
|
191
191
|
modelValue: e.value,
|
|
192
192
|
"onUpdate:modelValue": a[3] || (a[3] = (i) => e.value = i),
|
|
193
193
|
size: "large",
|
|
194
194
|
"text-size": "medium",
|
|
195
195
|
label: "Повторите новый пароль",
|
|
196
|
-
type:
|
|
196
|
+
type: O.value,
|
|
197
197
|
error: c.value,
|
|
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
|
-
onClick:
|
|
203
|
+
onClick: U
|
|
204
204
|
}))
|
|
205
205
|
]),
|
|
206
|
-
B("div",
|
|
206
|
+
B("div", nt, [
|
|
207
207
|
$(u(se), {
|
|
208
208
|
style: { width: "100%" },
|
|
209
209
|
disabled: M.value,
|
|
210
|
-
onClick:
|
|
210
|
+
onClick: A
|
|
211
211
|
}, {
|
|
212
212
|
default: G(() => a[6] || (a[6] = [
|
|
213
213
|
ne(ee("Сохранить"))
|
|
@@ -218,10 +218,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
218
218
|
])
|
|
219
219
|
])
|
|
220
220
|
]),
|
|
221
|
-
h.value === u(R).COMPLETED ? (w(), I("div",
|
|
222
|
-
B("div",
|
|
221
|
+
h.value === u(R).COMPLETED ? (w(), I("div", st, [
|
|
222
|
+
B("div", dt, [
|
|
223
223
|
a[9] || (a[9] = B("p", null, "Пароль успешно установлен", -1)),
|
|
224
|
-
B("div",
|
|
224
|
+
B("div", rt, [
|
|
225
225
|
$(u(se), {
|
|
226
226
|
style: { width: "100%" },
|
|
227
227
|
onClick: P
|
|
@@ -237,13 +237,13 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
237
237
|
])) : D("", !0)
|
|
238
238
|
], 64));
|
|
239
239
|
}
|
|
240
|
-
}),
|
|
240
|
+
}), mt = { class: "dialogDefaultContainerInsideContent" }, ct = { class: "dialogDefaultContainerTextHint" }, vt = {
|
|
241
241
|
key: 0,
|
|
242
242
|
class: "input-wrapper"
|
|
243
|
-
},
|
|
243
|
+
}, pt = {
|
|
244
244
|
key: 1,
|
|
245
245
|
class: "input-wrapper"
|
|
246
|
-
},
|
|
246
|
+
}, ft = /* @__PURE__ */ ie({
|
|
247
247
|
__name: "OldEmailContent",
|
|
248
248
|
props: {
|
|
249
249
|
email: {},
|
|
@@ -284,12 +284,12 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
284
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: T, touched:
|
|
287
|
+
}, { emailModel: r, codeModel: T, touched: O } = ce(m), L = V(() => O.value.email && !r.value.trim() ? "Введите e-mail" : v.emailError), U = V(() => v.isNotMatchCode ? "Неверный код" : O.value.code ? T.value.trim() ? v.codeError ?? null : "Введите код" : "");
|
|
288
288
|
return (C, c) => {
|
|
289
289
|
const b = ve;
|
|
290
|
-
return w(), I("div",
|
|
291
|
-
B("div",
|
|
292
|
-
C.showEmail ? (w(), I("div",
|
|
290
|
+
return w(), I("div", mt, [
|
|
291
|
+
B("div", ct, ee(C.hintText), 1),
|
|
292
|
+
C.showEmail ? (w(), I("div", vt, [
|
|
293
293
|
$(u(J), {
|
|
294
294
|
modelValue: u(r),
|
|
295
295
|
"onUpdate:modelValue": c[0] || (c[0] = (M) => te(r) ? r.value = M : null),
|
|
@@ -307,7 +307,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
307
307
|
onClick: c[3] || (c[3] = (M) => C.$emit("edit", "email"))
|
|
308
308
|
})
|
|
309
309
|
])) : D("", !0),
|
|
310
|
-
C.showCode ? (w(), I("div",
|
|
310
|
+
C.showCode ? (w(), I("div", pt, [
|
|
311
311
|
$(u(J), {
|
|
312
312
|
modelValue: u(T),
|
|
313
313
|
"onUpdate:modelValue": c[4] || (c[4] = (M) => te(T) ? T.value = M : null),
|
|
@@ -315,7 +315,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
315
315
|
"text-size": "medium",
|
|
316
316
|
label: "Код",
|
|
317
317
|
type: "text",
|
|
318
|
-
error:
|
|
318
|
+
error: U.value,
|
|
319
319
|
onInput: h,
|
|
320
320
|
onBlur: c[5] || (c[5] = (M) => e("code"))
|
|
321
321
|
}, null, 8, ["modelValue", "error"])
|
|
@@ -329,16 +329,16 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
329
329
|
]);
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
}),
|
|
332
|
+
}), Et = /* @__PURE__ */ He(ft, [["__scopeId", "data-v-5e561fbe"]]), wt = { class: "dialogDefaultContainerInsideContent" }, Ct = { class: "dialogDefaultContainerTextHint" }, yt = {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "input-wrapper"
|
|
335
|
-
},
|
|
335
|
+
}, gt = {
|
|
336
336
|
key: 1,
|
|
337
337
|
class: "input-wrapper"
|
|
338
|
-
},
|
|
338
|
+
}, ht = {
|
|
339
339
|
key: 2,
|
|
340
340
|
class: "input-wrapper"
|
|
341
|
-
},
|
|
341
|
+
}, Tt = { key: 3 }, Mt = /* @__PURE__ */ ie({
|
|
342
342
|
__name: "NewEmailContent",
|
|
343
343
|
props: {
|
|
344
344
|
email: {},
|
|
@@ -370,7 +370,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
370
370
|
);
|
|
371
371
|
const h = (a) => n.touched[a] = !0, d = (a) => n.touched[a] = !1, r = () => {
|
|
372
372
|
e.value = "", d("email");
|
|
373
|
-
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())),
|
|
373
|
+
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())), O = V(() => !T.value || !!e.value), L = async () => {
|
|
374
374
|
var a;
|
|
375
375
|
try {
|
|
376
376
|
if (h("email"), !T.value) {
|
|
@@ -387,15 +387,15 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
387
387
|
console.error("Неизвестная ошибка при проверке доступности email:", i), e.value = "Это не похоже на e-mail";
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
|
-
let
|
|
390
|
+
let U = "";
|
|
391
391
|
const C = (a) => {
|
|
392
392
|
s("on-clear-code-error");
|
|
393
393
|
const i = a.target;
|
|
394
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 !==
|
|
395
|
+
y.length > 4 && (y = y.slice(0, 4), i.value = y), n.codeModel = y, y.length === 4 && y !== U && (U = 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: M, touched: P } = ce(n),
|
|
398
|
+
}, { emailModel: b, codeModel: M, touched: P } = ce(n), A = V(() => {
|
|
399
399
|
if (e.value) return e.value;
|
|
400
400
|
if (n.touched.email) {
|
|
401
401
|
if (!n.emailModel.trim()) return "Введите e-mail";
|
|
@@ -405,9 +405,9 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
405
405
|
}), p = V(() => v.isNotMatchCode ? "Неверный код" : P.value.code ? M.value.trim() ? v.codeError ?? null : "Введите код" : "");
|
|
406
406
|
return (a, i) => {
|
|
407
407
|
const y = ve;
|
|
408
|
-
return w(), I("div",
|
|
409
|
-
B("div",
|
|
410
|
-
a.showEmail ? (w(), I("div",
|
|
408
|
+
return w(), I("div", wt, [
|
|
409
|
+
B("div", Ct, ee(m.value ? "Введите код подтверждения" : a.hintText), 1),
|
|
410
|
+
a.showEmail ? (w(), I("div", yt, [
|
|
411
411
|
$(u(J), {
|
|
412
412
|
modelValue: u(b),
|
|
413
413
|
"onUpdate:modelValue": i[0] || (i[0] = (z) => te(b) ? b.value = z : null),
|
|
@@ -415,7 +415,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
415
415
|
"text-size": "medium",
|
|
416
416
|
label: "Почта",
|
|
417
417
|
type: "email",
|
|
418
|
-
error:
|
|
418
|
+
error: A.value,
|
|
419
419
|
onBlur: i[1] || (i[1] = (z) => h("email")),
|
|
420
420
|
onInput: r
|
|
421
421
|
}, null, 8, ["modelValue", "error"]),
|
|
@@ -424,10 +424,10 @@ 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) : (w(), I("div",
|
|
427
|
+
m.value ? D("", !0) : (w(), I("div", gt, [
|
|
428
428
|
$(u(se), {
|
|
429
429
|
style: { width: "100%" },
|
|
430
|
-
disabled:
|
|
430
|
+
disabled: O.value,
|
|
431
431
|
onClick: L
|
|
432
432
|
}, {
|
|
433
433
|
default: G(() => i[5] || (i[5] = [
|
|
@@ -437,7 +437,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
437
437
|
__: [5]
|
|
438
438
|
}, 8, ["disabled"])
|
|
439
439
|
])),
|
|
440
|
-
m.value ? (w(), I("div",
|
|
440
|
+
m.value ? (w(), I("div", ht, [
|
|
441
441
|
$(u(J), {
|
|
442
442
|
modelValue: u(M),
|
|
443
443
|
"onUpdate:modelValue": i[3] || (i[3] = (z) => te(M) ? M.value = z : null),
|
|
@@ -450,7 +450,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
450
450
|
onBlur: i[4] || (i[4] = (z) => h("code"))
|
|
451
451
|
}, null, 8, ["modelValue", "error"])
|
|
452
452
|
])) : D("", !0),
|
|
453
|
-
m.value ? (w(), I("div",
|
|
453
|
+
m.value ? (w(), I("div", Tt, [
|
|
454
454
|
$(y, {
|
|
455
455
|
loading: a.loading,
|
|
456
456
|
"rate-limit-text": a.rateLimitText,
|
|
@@ -461,10 +461,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
461
461
|
]);
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
|
-
}),
|
|
464
|
+
}), bt = { class: "text-center w-full" }, Vt = { class: "dialogTitle" }, xt = {
|
|
465
465
|
key: 0,
|
|
466
466
|
class: "dialogDefaultContainer"
|
|
467
|
-
},
|
|
467
|
+
}, $t = {
|
|
468
468
|
key: 1,
|
|
469
469
|
class: "dialogDefaultContainer"
|
|
470
470
|
}, xe = 3, Pt = /* @__PURE__ */ ie({
|
|
@@ -486,7 +486,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
486
486
|
code: "",
|
|
487
487
|
addEmail: "",
|
|
488
488
|
addCode: ""
|
|
489
|
-
}), n = Z({ email: !1, code: !1 }), h = x(R.OLD), d = x(null), r = x(!1), T = x(!1),
|
|
489
|
+
}), n = Z({ email: !1, code: !1 }), h = x(R.OLD), d = x(null), r = x(!1), T = x(!1), O = x(!1), L = x(_e.VERIFY_EMAIL), U = V(() => L.value === "password-flow"), C = V(() => p.value ? v.title : U.value ? "Добавление пароля" : "Добавление почты"), { startTimer: c, remainingSeconds: b, isAvailableForSendAgain: M, totalRateAttempts: P, currentRateAttempt: A } = ze(), { isEditFlow: p, getFlow: a } = Re(x(v.mode ?? "edit")), { showRateLimitToast: i } = We(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
490
|
Y(
|
|
491
491
|
() => v.modelValue,
|
|
492
492
|
(l) => m.value = l
|
|
@@ -498,14 +498,14 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
498
498
|
var o;
|
|
499
499
|
try {
|
|
500
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,
|
|
501
|
+
return E ? (await Ie(1e3), E.restTimeSec > 0 ? (c(E.restTimeSec), M.value = !1, P.value = E.attempts.total ?? P.value, A.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
|
}
|
|
505
505
|
}
|
|
506
506
|
async function ue(l = "email") {
|
|
507
507
|
var o;
|
|
508
|
-
return ((o = (await
|
|
508
|
+
return ((o = (await qe("/users/profile/session/get-edit-session", { params: { field: l } })).data) == null ? void 0 : o.data) ?? null;
|
|
509
509
|
}
|
|
510
510
|
async function Se(l = "email") {
|
|
511
511
|
try {
|
|
@@ -540,7 +540,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
540
540
|
);
|
|
541
541
|
if (E.status === 403 && ((o = E.data) != null && o.tooManyRequests)) {
|
|
542
542
|
const S = E.data.tooManyRequests;
|
|
543
|
-
return S.restTimeSec > 0 ? (c(S.restTimeSec), P.value = S.attempts.total ?? P.value,
|
|
543
|
+
return S.restTimeSec > 0 ? (c(S.restTimeSec), P.value = S.attempts.total ?? P.value, A.value = (S.attempts.total ?? 0) - (S.attempts.available ?? 0), j.value = S.attempts.available ?? j.value) : M.value = !0, E;
|
|
544
544
|
}
|
|
545
545
|
return E;
|
|
546
546
|
} catch (f) {
|
|
@@ -556,14 +556,14 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
556
556
|
r.value = !0;
|
|
557
557
|
const g = await ue();
|
|
558
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
|
|
559
|
+
const F = 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
|
-
}), Q = ((o =
|
|
565
|
-
if (
|
|
566
|
-
T.value = !0;
|
|
564
|
+
}), Q = ((o = F.data) == null ? void 0 : o.nextStep) ?? ((E = (f = F.data) == null ? void 0 : f.data) == null ? void 0 : E.nextStep) ?? null, Ue = ((N = (S = F.data) == null ? void 0 : S.data) == null ? void 0 : N.rateLimit) ?? ((le = F.data) == null ? void 0 : le.rateLimit) ?? null;
|
|
565
|
+
if (!(F.data.data.success ?? F.data.success)) {
|
|
566
|
+
i(Ue), T.value = !0;
|
|
567
567
|
return;
|
|
568
568
|
}
|
|
569
569
|
if (Q) {
|
|
@@ -573,11 +573,11 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
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
|
-
return
|
|
576
|
+
return F;
|
|
577
577
|
} catch (g) {
|
|
578
|
-
const
|
|
579
|
-
if (console.error("rate-limit debug error: ", g), Q === 429 &&
|
|
580
|
-
console.debug("rate-limit debug status and exists rateLimit: ",
|
|
578
|
+
const F = (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 && F) {
|
|
580
|
+
console.debug("rate-limit debug status and exists rateLimit: ", F), i(F), T.value = !0;
|
|
581
581
|
return;
|
|
582
582
|
}
|
|
583
583
|
throw g;
|
|
@@ -619,7 +619,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
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,
|
|
622
|
+
N.restTimeSec > 0 ? (c(N.restTimeSec), P.value = N.attempts.total ?? P.value, A.value = (N.attempts.total ?? 0) - (N.attempts.available ?? 0), j.value = N.attempts.available ?? xe) : M.value = !0;
|
|
623
623
|
return;
|
|
624
624
|
}
|
|
625
625
|
return S;
|
|
@@ -640,9 +640,9 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
640
640
|
code: e.addCode
|
|
641
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
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
|
|
644
|
-
if (
|
|
645
|
-
|
|
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;
|
|
644
|
+
if (!(k.data.data.success ?? k.data.success)) {
|
|
645
|
+
i(g), O.value = !0;
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
648
648
|
} catch (k) {
|
|
@@ -674,7 +674,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
674
674
|
r.value = !1;
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
|
-
return
|
|
677
|
+
return Fe(async () => {
|
|
678
678
|
r.value = !0;
|
|
679
679
|
const l = await a("email");
|
|
680
680
|
if (v.mode === "bind" && l === "bind") {
|
|
@@ -682,7 +682,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
682
682
|
return;
|
|
683
683
|
}
|
|
684
684
|
await Se(), e.oldEmail && await ae({ value: e.oldEmail }), r.value = !1;
|
|
685
|
-
}), (l, t) => (w(), _(u(
|
|
685
|
+
}), (l, t) => (w(), _(u(je), {
|
|
686
686
|
modelValue: m.value,
|
|
687
687
|
"onUpdate:modelValue": [
|
|
688
688
|
t[18] || (t[18] = (o) => m.value = o),
|
|
@@ -694,18 +694,18 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
694
694
|
"onClick:outside": re
|
|
695
695
|
}, {
|
|
696
696
|
header: G(() => [
|
|
697
|
-
B("div",
|
|
698
|
-
$(u(
|
|
697
|
+
B("div", bt, [
|
|
698
|
+
$(u(Ge), {
|
|
699
699
|
"slot-left": !1,
|
|
700
700
|
size: "small",
|
|
701
701
|
borded: !0,
|
|
702
702
|
"no-padding": !1
|
|
703
703
|
}, {
|
|
704
704
|
title: G(() => [
|
|
705
|
-
B("span",
|
|
705
|
+
B("span", Vt, ee(C.value), 1)
|
|
706
706
|
]),
|
|
707
707
|
"right-button": G(() => [
|
|
708
|
-
$(u(
|
|
708
|
+
$(u(Ye), {
|
|
709
709
|
class: "cross",
|
|
710
710
|
onClick: re
|
|
711
711
|
})
|
|
@@ -716,9 +716,9 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
716
716
|
]),
|
|
717
717
|
default: G(() => [
|
|
718
718
|
B("div", null, [
|
|
719
|
-
u(p) ? (w(), I("div",
|
|
719
|
+
u(p) ? (w(), I("div", xt, [
|
|
720
720
|
r.value ? (w(), _(Te, { key: 0 })) : D("", !0),
|
|
721
|
-
h.value === u(R).OLD ? (w(), _(
|
|
721
|
+
h.value === u(R).OLD ? (w(), _(Et, {
|
|
722
722
|
key: 1,
|
|
723
723
|
email: e.oldEmail,
|
|
724
724
|
"onUpdate:email": t[0] || (t[0] = (o) => e.oldEmail = o),
|
|
@@ -737,7 +737,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
737
737
|
onSendCode: t[2] || (t[2] = (o) => ae({ value: e.oldEmail })),
|
|
738
738
|
onOnSendCodeAgain: t[3] || (t[3] = (o) => ae({ value: e.oldEmail })),
|
|
739
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(), _(
|
|
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(), _(Mt, {
|
|
741
741
|
key: 2,
|
|
742
742
|
email: e.newEmail,
|
|
743
743
|
"onUpdate:email": t[5] || (t[5] = (o) => e.newEmail = o),
|
|
@@ -759,16 +759,16 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
759
759
|
onOnSendCodeAgain: t[9] || (t[9] = (o) => ae({ value: e.newEmail })),
|
|
760
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
|
-
])) : (w(), I("div",
|
|
762
|
+
])) : (w(), I("div", $t, [
|
|
763
763
|
r.value ? (w(), _(Te, { key: 0 })) : D("", !0),
|
|
764
|
-
|
|
764
|
+
U.value ? (w(), _(ut, {
|
|
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"])) : (w(), _(
|
|
771
|
+
}, null, 8, ["model-value", "email-session-id"])) : (w(), _(tt, {
|
|
772
772
|
key: 1,
|
|
773
773
|
email: e.addEmail,
|
|
774
774
|
"onUpdate:email": t[11] || (t[11] = (o) => e.addEmail = o),
|
|
@@ -779,13 +779,13 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
779
779
|
"hint-text": u(p) ? l.hintText : "Чтобы продолжить, введите новый адрес вашей почты",
|
|
780
780
|
"rate-limit-text": de.value,
|
|
781
781
|
"is-final-limit": ke.value,
|
|
782
|
-
"is-not-match-code":
|
|
782
|
+
"is-not-match-code": O.value,
|
|
783
783
|
loading: r.value,
|
|
784
784
|
onOnSendCode: t[14] || (t[14] = (o) => ge({ value: e.addEmail, field: "email" })),
|
|
785
785
|
onOnSendCodeAgain: t[15] || (t[15] = (o) => ge({ value: e.addEmail, field: "email" })),
|
|
786
786
|
onOnMatchCode: De,
|
|
787
787
|
onOnMatchCodeError: Ne,
|
|
788
|
-
onOnClearCodeError: t[16] || (t[16] = (o) =>
|
|
788
|
+
onOnClearCodeError: t[16] || (t[16] = (o) => O.value = !1)
|
|
789
789
|
}, null, 8, ["email", "oldEmail", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"]))
|
|
790
790
|
]))
|
|
791
791
|
])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as ye, ref as a, reactive as _, computed as u, watch as Z, onMounted as Ce, createElementBlock as S, openBlock as g, Fragment as ge, createVNode as n, unref as o, withCtx as m, createCommentVNode as ee, createElementVNode as r, toDisplayString as V, createBlock as B, resolveDynamicComponent as $, createTextVNode as z } from "vue";
|
|
2
|
-
import { C as I, p as D, g as Ve } from "./index-
|
|
2
|
+
import { C as I, p as D, g as Ve } from "./index-BSr7kEC4.js";
|
|
3
3
|
import { PDialog as be, PInput as M, IconEyeMd as O, IconEyeClosedMd as U, PButton as F, PTopBar as Te, IconCrossMd as Ie, PTeleportContainer as xe } from "@profeat/ui-kit";
|
|
4
4
|
function ke(b) {
|
|
5
5
|
return { showPasswordRateLimitToast: (P) => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { createElementBlock as P, openBlock as p, createElementVNode as q, defineComponent as he, reactive as ve, watch as Z, ref as L, toRefs as Ce, computed as E, createCommentVNode as $, createVNode as T, toDisplayString as H, createBlock as G, createTextVNode as Y, unref as d, isRef as ne, withCtx as Q, onMounted as
|
|
2
|
-
import { T as we, c as Ne, a as
|
|
3
|
-
import { IconTelegramSm as Pe, PInput as ae, IconPhoneMd as
|
|
4
|
-
import { C as j, t as De, p as
|
|
5
|
-
const
|
|
1
|
+
import { createElementBlock as P, openBlock as p, createElementVNode as q, defineComponent as he, reactive as ve, watch as Z, ref as L, toRefs as Ce, computed as E, createCommentVNode as $, createVNode as T, toDisplayString as H, createBlock as G, createTextVNode as Y, unref as d, isRef as ne, withCtx as Q, onMounted as je, Fragment as qe } from "vue";
|
|
2
|
+
import { T as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-D6JDxDzB.js";
|
|
3
|
+
import { IconTelegramSm as Pe, PInput as ae, IconPhoneMd as Ke, IconMailMd as ze, PButton as Fe, PDialog as Qe, PTopBar as Xe, IconCrossMd as Ye, PTeleportContainer as Ze } from "@profeat/ui-kit";
|
|
4
|
+
import { C as j, t as De, p as te, g as Ae } from "./index-BSr7kEC4.js";
|
|
5
|
+
const _e = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "12",
|
|
8
8
|
height: "16",
|
|
9
9
|
fill: "none"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
return p(), P("svg",
|
|
11
|
+
function et(R, x) {
|
|
12
|
+
return p(), P("svg", _e, x[0] || (x[0] = [
|
|
13
13
|
q("path", {
|
|
14
14
|
fill: "#1C7EF1",
|
|
15
15
|
"fill-rule": "evenodd",
|
|
@@ -18,13 +18,13 @@ function tt(R, x) {
|
|
|
18
18
|
}, null, -1)
|
|
19
19
|
]));
|
|
20
20
|
}
|
|
21
|
-
const le = { render:
|
|
21
|
+
const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }, ot = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, nt = { class: "dialogDefaultContainerTextHint" }, at = { class: "chip" }, lt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "input-wrapper"
|
|
24
|
-
},
|
|
24
|
+
}, st = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "input-wrapper"
|
|
27
|
-
},
|
|
27
|
+
}, dt = /* @__PURE__ */ he({
|
|
28
28
|
__name: "OldPhoneContent",
|
|
29
29
|
props: {
|
|
30
30
|
phone: {},
|
|
@@ -67,10 +67,10 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
67
67
|
}, X = () => i("on-send-code-again", { phone: u.phoneModel }), J = () => {
|
|
68
68
|
console.debug("onSendCodeViaSms"), i("on-send-only-sms", { phone: u.phoneModel });
|
|
69
69
|
}, { phoneModel: e, codeModel: M, touched: C } = Ce(u), f = E(() => C.value.phone && !e.value.trim() ? "Введите телефон" : B.phoneError), O = E(() => B.isNotMatchCode ? "Неверный код" : C.value.code ? M.value.trim() ? B.codeError ?? null : "Введите код" : "");
|
|
70
|
-
return (v, m) => (p(), P("div",
|
|
71
|
-
q("div",
|
|
72
|
-
q("div",
|
|
73
|
-
q("div",
|
|
70
|
+
return (v, m) => (p(), P("div", tt, [
|
|
71
|
+
q("div", ot, [
|
|
72
|
+
q("div", nt, H(v.hintText), 1),
|
|
73
|
+
q("div", at, [
|
|
74
74
|
v.isTg ? (p(), G(d(Pe), { key: 0 })) : (p(), G(d(le), {
|
|
75
75
|
key: 1,
|
|
76
76
|
style: { "margin-left": "5px" }
|
|
@@ -78,7 +78,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
78
78
|
Y(" " + H(v.isTg ? "Telegram" : "СМС"), 1)
|
|
79
79
|
])
|
|
80
80
|
]),
|
|
81
|
-
v.showPhone ? (p(), P("div",
|
|
81
|
+
v.showPhone ? (p(), P("div", lt, [
|
|
82
82
|
T(d(ae), {
|
|
83
83
|
modelValue: d(e),
|
|
84
84
|
"onUpdate:modelValue": m[0] || (m[0] = (r) => ne(e) ? e.value = r : null),
|
|
@@ -91,12 +91,12 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
91
91
|
onBlur: m[1] || (m[1] = (r) => h("phone")),
|
|
92
92
|
onInput: m[2] || (m[2] = (r) => h("phone"))
|
|
93
93
|
}, null, 8, ["modelValue", "error"]),
|
|
94
|
-
T(d(
|
|
94
|
+
T(d(Ke), {
|
|
95
95
|
class: "icon-locked",
|
|
96
96
|
onClick: m[3] || (m[3] = (r) => v.$emit("edit", "phone"))
|
|
97
97
|
})
|
|
98
98
|
])) : $("", !0),
|
|
99
|
-
v.showCode ? (p(), P("div",
|
|
99
|
+
v.showCode ? (p(), P("div", st, [
|
|
100
100
|
T(d(ae), {
|
|
101
101
|
modelValue: d(M),
|
|
102
102
|
"onUpdate:modelValue": m[4] || (m[4] = (r) => ne(M) ? M.value = r : null),
|
|
@@ -138,19 +138,19 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
138
138
|
return `+${x}`;
|
|
139
139
|
}
|
|
140
140
|
return R.trim().startsWith("+") ? R.trim() : `+${x}`;
|
|
141
|
-
},
|
|
141
|
+
}, it = { class: "dialogDefaultContainerInsideContent" }, rt = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, ut = { class: "dialogDefaultContainerTextHint" }, ct = {
|
|
142
142
|
key: 0,
|
|
143
143
|
class: "chip"
|
|
144
|
-
},
|
|
144
|
+
}, pt = {
|
|
145
145
|
key: 0,
|
|
146
146
|
class: "input-wrapper"
|
|
147
|
-
},
|
|
147
|
+
}, ht = {
|
|
148
148
|
key: 1,
|
|
149
149
|
class: "input-wrapper"
|
|
150
|
-
},
|
|
150
|
+
}, vt = {
|
|
151
151
|
key: 2,
|
|
152
152
|
class: "input-wrapper"
|
|
153
|
-
},
|
|
153
|
+
}, mt = { key: 3 }, ft = /* @__PURE__ */ he({
|
|
154
154
|
__name: "NewPhoneContent",
|
|
155
155
|
props: {
|
|
156
156
|
phone: {},
|
|
@@ -225,10 +225,10 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
225
225
|
}
|
|
226
226
|
return B.phoneError || "";
|
|
227
227
|
}), _ = E(() => B.isNotMatchCode ? "Неверный код" : se.value.code ? I.value.trim() ? B.codeError ?? null : "Введите код" : "");
|
|
228
|
-
return (o, n) => (p(), P("div",
|
|
229
|
-
q("div",
|
|
230
|
-
q("div",
|
|
231
|
-
u.value ? (p(), P("div",
|
|
228
|
+
return (o, n) => (p(), P("div", it, [
|
|
229
|
+
q("div", rt, [
|
|
230
|
+
q("div", ut, H(u.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
|
|
231
|
+
u.value ? (p(), P("div", ct, [
|
|
232
232
|
o.isTg ? (p(), G(d(Pe), { key: 0 })) : (p(), G(d(le), {
|
|
233
233
|
key: 1,
|
|
234
234
|
style: { "margin-left": "5px" }
|
|
@@ -236,7 +236,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
236
236
|
Y(" " + H(o.isTg ? "Telegram" : "СМС"), 1)
|
|
237
237
|
])) : $("", !0)
|
|
238
238
|
]),
|
|
239
|
-
o.showPhone ? (p(), P("div",
|
|
239
|
+
o.showPhone ? (p(), P("div", pt, [
|
|
240
240
|
T(d(ae), {
|
|
241
241
|
modelValue: d(r),
|
|
242
242
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => ne(r) ? r.value = s : null),
|
|
@@ -253,7 +253,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
253
253
|
onClick: n[2] || (n[2] = (s) => o.$emit("edit", "phone"))
|
|
254
254
|
})
|
|
255
255
|
])) : $("", !0),
|
|
256
|
-
u.value ? $("", !0) : (p(), P("div",
|
|
256
|
+
u.value ? $("", !0) : (p(), P("div", ht, [
|
|
257
257
|
T(d(Fe), {
|
|
258
258
|
style: { width: "100%" },
|
|
259
259
|
disabled: M.value,
|
|
@@ -266,7 +266,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
266
266
|
__: [5]
|
|
267
267
|
}, 8, ["disabled"])
|
|
268
268
|
])),
|
|
269
|
-
u.value ? (p(), P("div",
|
|
269
|
+
u.value ? (p(), P("div", vt, [
|
|
270
270
|
T(d(ae), {
|
|
271
271
|
modelValue: d(I),
|
|
272
272
|
"onUpdate:modelValue": n[3] || (n[3] = (s) => ne(I) ? I.value = s : null),
|
|
@@ -279,7 +279,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
279
279
|
onBlur: n[4] || (n[4] = (s) => F("code"))
|
|
280
280
|
}, null, 8, ["modelValue", "error"])
|
|
281
281
|
])) : $("", !0),
|
|
282
|
-
!o.loading && u.value ? (p(), P("div",
|
|
282
|
+
!o.loading && u.value ? (p(), P("div", mt, [
|
|
283
283
|
T(we, {
|
|
284
284
|
loading: o.loading,
|
|
285
285
|
"rate-limit-text": o.rateLimitText,
|
|
@@ -301,19 +301,19 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
301
301
|
])) : $("", !0)
|
|
302
302
|
]));
|
|
303
303
|
}
|
|
304
|
-
}),
|
|
304
|
+
}), gt = { class: "dialogDefaultContainerInsideContent" }, yt = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, Ct = { class: "dialogDefaultContainerTextHint" }, wt = {
|
|
305
305
|
key: 0,
|
|
306
306
|
class: "chip"
|
|
307
|
-
},
|
|
307
|
+
}, Pt = {
|
|
308
308
|
key: 0,
|
|
309
309
|
class: "input-wrapper"
|
|
310
|
-
},
|
|
310
|
+
}, Tt = {
|
|
311
311
|
key: 1,
|
|
312
312
|
class: "input-wrapper"
|
|
313
|
-
},
|
|
313
|
+
}, St = {
|
|
314
314
|
key: 2,
|
|
315
315
|
class: "input-wrapper"
|
|
316
|
-
},
|
|
316
|
+
}, Mt = { key: 3 }, xt = /* @__PURE__ */ he({
|
|
317
317
|
__name: "AddNewPhoneContent",
|
|
318
318
|
props: {
|
|
319
319
|
phone: {},
|
|
@@ -385,10 +385,10 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
385
385
|
}
|
|
386
386
|
return B.phoneError || "";
|
|
387
387
|
}), _ = E(() => B.isNotMatchCode ? "Неверный код" : c.touched.code ? I.value.trim() ? B.codeError ?? null : "Введите код" : "");
|
|
388
|
-
return (o, n) => (p(), P("div",
|
|
389
|
-
q("div",
|
|
390
|
-
q("div",
|
|
391
|
-
u.value ? (p(), P("div",
|
|
388
|
+
return (o, n) => (p(), P("div", gt, [
|
|
389
|
+
q("div", yt, [
|
|
390
|
+
q("div", Ct, H(u.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
|
|
391
|
+
u.value ? (p(), P("div", wt, [
|
|
392
392
|
o.isTg ? (p(), G(d(Pe), { key: 0 })) : (p(), G(d(le), {
|
|
393
393
|
key: 1,
|
|
394
394
|
style: { "margin-left": "5px" }
|
|
@@ -396,7 +396,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
396
396
|
Y(" " + H(o.isTg ? "Telegram" : "СМС"), 1)
|
|
397
397
|
])) : $("", !0)
|
|
398
398
|
]),
|
|
399
|
-
o.showPhone ? (p(), P("div",
|
|
399
|
+
o.showPhone ? (p(), P("div", Pt, [
|
|
400
400
|
T(d(ae), {
|
|
401
401
|
modelValue: d(r),
|
|
402
402
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => ne(r) ? r.value = s : null),
|
|
@@ -413,7 +413,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
413
413
|
onClick: n[2] || (n[2] = (s) => o.$emit("edit", "phone"))
|
|
414
414
|
})
|
|
415
415
|
])) : $("", !0),
|
|
416
|
-
u.value ? $("", !0) : (p(), P("div",
|
|
416
|
+
u.value ? $("", !0) : (p(), P("div", Tt, [
|
|
417
417
|
T(d(Fe), {
|
|
418
418
|
style: { width: "100%" },
|
|
419
419
|
disabled: M.value,
|
|
@@ -426,7 +426,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
426
426
|
__: [5]
|
|
427
427
|
}, 8, ["disabled"])
|
|
428
428
|
])),
|
|
429
|
-
u.value ? (p(), P("div",
|
|
429
|
+
u.value ? (p(), P("div", St, [
|
|
430
430
|
T(d(ae), {
|
|
431
431
|
modelValue: d(I),
|
|
432
432
|
"onUpdate:modelValue": n[3] || (n[3] = (s) => ne(I) ? I.value = s : null),
|
|
@@ -439,7 +439,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
439
439
|
onBlur: n[4] || (n[4] = (s) => F("code"))
|
|
440
440
|
}, null, 8, ["modelValue", "error"])
|
|
441
441
|
])) : $("", !0),
|
|
442
|
-
u.value ? (p(), P("div",
|
|
442
|
+
u.value ? (p(), P("div", Mt, [
|
|
443
443
|
T(we, {
|
|
444
444
|
loading: o.loading,
|
|
445
445
|
"rate-limit-text": o.rateLimitText,
|
|
@@ -461,10 +461,10 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
461
461
|
])) : $("", !0)
|
|
462
462
|
]));
|
|
463
463
|
}
|
|
464
|
-
}),
|
|
464
|
+
}), bt = { class: "text-center w-full" }, kt = { class: "dialogTitle" }, Vt = {
|
|
465
465
|
key: 0,
|
|
466
466
|
class: "dialogDefaultContainer"
|
|
467
|
-
},
|
|
467
|
+
}, $t = { key: 3 }, Bt = {
|
|
468
468
|
key: 1,
|
|
469
469
|
class: "dialogDefaultContainer"
|
|
470
470
|
}, pe = 3, At = /* @__PURE__ */ he({
|
|
@@ -491,14 +491,14 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
491
491
|
code: "",
|
|
492
492
|
addPhone: "",
|
|
493
493
|
addCode: ""
|
|
494
|
-
}), M = L(j.OLD), C = L(null), f = L(!1), O = L(!1), v = L("tg"), m = E(() => v.value === "tg"), r = L(!1), { startTimer: I, remainingSeconds: se, isAvailableForSendAgain: W, totalRateAttempts: _, currentRateAttempt: o } =
|
|
494
|
+
}), M = L(j.OLD), C = L(null), f = L(!1), O = L(!1), v = L("tg"), m = E(() => v.value === "tg"), r = L(!1), { startTimer: I, remainingSeconds: se, isAvailableForSendAgain: W, totalRateAttempts: _, currentRateAttempt: o } = He(), { showRateLimitToast: n } = Je(u), { isEditFlow: s, getFlow: me } = Ge(L(i.mode)), de = E(() => W.value ? "Повторить" : `${se.value}`), ie = L(pe), re = E(() => ie.value === 0), Ue = (a) => new Promise((l) => setTimeout(l, a));
|
|
495
495
|
async function fe(a = "email") {
|
|
496
496
|
var t;
|
|
497
497
|
return (t = (await Ae("/users/profile/session/get-edit-session", { params: { field: a } })).data) == null ? void 0 : t.data;
|
|
498
498
|
}
|
|
499
499
|
async function Te(a = "phone") {
|
|
500
500
|
var b;
|
|
501
|
-
const t = (b = (await
|
|
501
|
+
const t = (b = (await te("/users/profile/session/create-if-not-exists", {
|
|
502
502
|
field: a,
|
|
503
503
|
oldValue: U(i.initialPhone)
|
|
504
504
|
})).data) == null ? void 0 : b.data;
|
|
@@ -515,7 +515,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
515
515
|
async function Se(a, l = !1) {
|
|
516
516
|
var t;
|
|
517
517
|
try {
|
|
518
|
-
const b = await
|
|
518
|
+
const b = await te(
|
|
519
519
|
"/users/profile/check-throttler",
|
|
520
520
|
{
|
|
521
521
|
method: "sms",
|
|
@@ -539,7 +539,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
539
539
|
var b, w, D, A, N;
|
|
540
540
|
f.value = !0;
|
|
541
541
|
try {
|
|
542
|
-
const k = a ?? e.oldPhone, g = await
|
|
542
|
+
const k = a ?? e.oldPhone, g = await te(
|
|
543
543
|
"/users/profile/phone/contact/send-code",
|
|
544
544
|
{
|
|
545
545
|
sessionId: C.value,
|
|
@@ -576,22 +576,22 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
576
576
|
try {
|
|
577
577
|
const V = await fe("phone");
|
|
578
578
|
C.value = V.sessionId, M.value = V.step, e.oldPhone = V.oldValue ?? e.oldPhone, e.newPhone = V.newValue ?? e.newPhone;
|
|
579
|
-
const z = await
|
|
579
|
+
const z = await te("/users/profile/change/phone/match-code", {
|
|
580
580
|
phone: l === j.NEW ? U(e.newPhone) : U(e.oldPhone),
|
|
581
581
|
sessionId: C.value,
|
|
582
582
|
code: a,
|
|
583
583
|
step: l
|
|
584
|
-
}),
|
|
585
|
-
if (
|
|
586
|
-
O.value = !0;
|
|
584
|
+
}), oe = ((t = z.data) == null ? void 0 : t.nextStep) ?? ((w = (b = z.data) == null ? void 0 : b.data) == null ? void 0 : w.nextStep), ce = ((A = (D = z.data) == null ? void 0 : D.data) == null ? void 0 : A.rateLimit) ?? ((N = z.data) == null ? void 0 : N.rateLimit) ?? null;
|
|
585
|
+
if (!(((k = z.data) == null ? void 0 : k.data.success) ?? ((g = z.data) == null ? void 0 : g.success))) {
|
|
586
|
+
n(ce), O.value = !0;
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
|
-
if (!
|
|
590
|
-
if (M.value =
|
|
589
|
+
if (!oe) return z;
|
|
590
|
+
if (M.value = oe, oe === j.NEW) {
|
|
591
591
|
const Le = await fe("phone");
|
|
592
592
|
e.oldPhone = Le.oldValue ?? e.oldPhone, e.newPhone = Le.newValue ?? e.newPhone, e.code = "";
|
|
593
593
|
}
|
|
594
|
-
return
|
|
594
|
+
return oe === j.COMPLETED && (e.code = "", u("update-phone-field", e.addPhone), u("submit-phone", { phone: e.oldPhone, code: a }), u("on-toast", { color: "success", text: "Номер телефона изменён" }), u("on-update-jwt", "phone", "edit", e.newPhone), C.value = null, u("close")), z;
|
|
595
595
|
} catch (V) {
|
|
596
596
|
const z = (K = (S = V == null ? void 0 : V.response) == null ? void 0 : S.data) == null ? void 0 : K.rateLimit;
|
|
597
597
|
if (((y = V == null ? void 0 : V.response) == null ? void 0 : y.status) === 429 && z) {
|
|
@@ -624,7 +624,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
624
624
|
f.value = !0;
|
|
625
625
|
try {
|
|
626
626
|
if (!C.value) {
|
|
627
|
-
const A = await
|
|
627
|
+
const A = await te("/users/profile/session/bind/create", {
|
|
628
628
|
field: l,
|
|
629
629
|
newValue: U(a || e.addPhone)
|
|
630
630
|
});
|
|
@@ -654,7 +654,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
654
654
|
try {
|
|
655
655
|
if (!C.value)
|
|
656
656
|
throw new Error("bind-сессия не найдена. создайте её через createBindSession.");
|
|
657
|
-
const N = a ?? e.addPhone, k = await
|
|
657
|
+
const N = a ?? e.addPhone, k = await te(
|
|
658
658
|
`/users/profile/bind/contact/send-code/${l}`,
|
|
659
659
|
{
|
|
660
660
|
sessionId: C.value,
|
|
@@ -687,13 +687,13 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
687
687
|
const ce = await $e("phone");
|
|
688
688
|
C.value = ce.sessionId, e.addPhone = ce.newValue ?? e.addPhone;
|
|
689
689
|
}
|
|
690
|
-
const y = await
|
|
690
|
+
const y = await te("/users/profile/bind/phone/match-code", {
|
|
691
691
|
phone: U(e.addPhone),
|
|
692
692
|
sessionId: C.value,
|
|
693
693
|
code: a
|
|
694
|
-
}), V = ((l = y.data) == null ? void 0 : l.nextStep) ?? ((b = (t = y.data) == null ? void 0 : t.data) == null ? void 0 : b.nextStep), z = ((D = (w = y.data) == null ? void 0 : w.data) == null ? void 0 : D.rateLimit) ?? ((A = y.data) == null ? void 0 : A.rateLimit) ?? null
|
|
695
|
-
if (
|
|
696
|
-
O.value = !0;
|
|
694
|
+
}), V = ((l = y.data) == null ? void 0 : l.nextStep) ?? ((b = (t = y.data) == null ? void 0 : t.data) == null ? void 0 : b.nextStep), z = ((D = (w = y.data) == null ? void 0 : w.data) == null ? void 0 : D.rateLimit) ?? ((A = y.data) == null ? void 0 : A.rateLimit) ?? null;
|
|
695
|
+
if (!(((N = y.data) == null ? void 0 : N.data.success) ?? ((k = y.data) == null ? void 0 : k.success))) {
|
|
696
|
+
n(z), O.value = !0;
|
|
697
697
|
return;
|
|
698
698
|
}
|
|
699
699
|
return V && V === j.COMPLETED && (e.code = "", u("update-phone-field", e.addPhone), u("submit-phone", { phone: e.addPhone, code: a }), u("on-update-jwt", "phone", "bind", e.addPhone), u("on-toast", { color: "success", text: "Номер телефона успешно привязан к аккаунту" }), C.value = null, u("close")), y;
|
|
@@ -709,7 +709,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
709
709
|
}
|
|
710
710
|
}, Ie = async () => {
|
|
711
711
|
};
|
|
712
|
-
return
|
|
712
|
+
return je(async () => {
|
|
713
713
|
f.value = !0;
|
|
714
714
|
const a = await me("phone");
|
|
715
715
|
if (i.mode === "bind" && a === "bind") {
|
|
@@ -735,8 +735,8 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
735
735
|
handleNewCodeError: Ve,
|
|
736
736
|
matchBindCode: Ee,
|
|
737
737
|
matchBindCodeError: Ie
|
|
738
|
-
}), (a, l) => (p(), P(
|
|
739
|
-
T(d(
|
|
738
|
+
}), (a, l) => (p(), P(qe, null, [
|
|
739
|
+
T(d(Qe), {
|
|
740
740
|
modelValue: h.value,
|
|
741
741
|
"onUpdate:modelValue": [
|
|
742
742
|
l[15] || (l[15] = (t) => h.value = t),
|
|
@@ -748,18 +748,18 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
748
748
|
"onClick:outside": ue
|
|
749
749
|
}, {
|
|
750
750
|
header: Q(() => [
|
|
751
|
-
q("div",
|
|
752
|
-
T(d(
|
|
751
|
+
q("div", bt, [
|
|
752
|
+
T(d(Xe), {
|
|
753
753
|
"slot-left": !1,
|
|
754
754
|
size: "small",
|
|
755
755
|
borded: !0,
|
|
756
756
|
"no-padding": !1
|
|
757
757
|
}, {
|
|
758
758
|
title: Q(() => [
|
|
759
|
-
q("span",
|
|
759
|
+
q("span", kt, H(d(s) ? X.value : "Добавление номера телефона"), 1)
|
|
760
760
|
]),
|
|
761
761
|
"right-button": Q(() => [
|
|
762
|
-
T(d(
|
|
762
|
+
T(d(Ye), {
|
|
763
763
|
class: "cross",
|
|
764
764
|
onClick: ue
|
|
765
765
|
})
|
|
@@ -769,9 +769,9 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
769
769
|
])
|
|
770
770
|
]),
|
|
771
771
|
default: Q(() => [
|
|
772
|
-
d(s) ? (p(), P("div",
|
|
772
|
+
d(s) ? (p(), P("div", Vt, [
|
|
773
773
|
f.value ? (p(), G(Oe, { key: 0 })) : $("", !0),
|
|
774
|
-
M.value === d(j).OLD ? (p(), G(
|
|
774
|
+
M.value === d(j).OLD ? (p(), G(dt, {
|
|
775
775
|
key: 1,
|
|
776
776
|
phone: e.oldPhone,
|
|
777
777
|
"onUpdate:phone": l[0] || (l[0] = (t) => e.oldPhone = t),
|
|
@@ -787,7 +787,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
787
787
|
onOnSendOnlySms: ge,
|
|
788
788
|
onOnMatchCode: xe,
|
|
789
789
|
onOnMatchCodeError: be
|
|
790
|
-
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).NEW ? (p(), G(
|
|
790
|
+
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).NEW ? (p(), G(ft, {
|
|
791
791
|
key: 2,
|
|
792
792
|
phone: e.newPhone,
|
|
793
793
|
"onUpdate:phone": l[4] || (l[4] = (t) => e.newPhone = t),
|
|
@@ -807,12 +807,12 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
807
807
|
onOnMatchCode: ke,
|
|
808
808
|
onOnMatchCodeError: Ve,
|
|
809
809
|
onOnClearCodeError: l[9] || (l[9] = (t) => O.value = !1)
|
|
810
|
-
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).COMPLETED ? (p(), P("div",
|
|
810
|
+
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).COMPLETED ? (p(), P("div", $t, [
|
|
811
811
|
q("p", null, H(F("Телефон успешно изменен")), 1)
|
|
812
812
|
])) : $("", !0)
|
|
813
|
-
])) : (p(), P("div",
|
|
813
|
+
])) : (p(), P("div", Bt, [
|
|
814
814
|
f.value ? (p(), G(Oe, { key: 0 })) : $("", !0),
|
|
815
|
-
T(
|
|
815
|
+
T(xt, {
|
|
816
816
|
phone: e.addPhone,
|
|
817
817
|
"onUpdate:phone": l[10] || (l[10] = (t) => e.addPhone = t),
|
|
818
818
|
oldPhone: e.oldPhone,
|
|
@@ -835,7 +835,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
835
835
|
]),
|
|
836
836
|
_: 1
|
|
837
837
|
}, 8, ["modelValue"]),
|
|
838
|
-
T(d(
|
|
838
|
+
T(d(Ze))
|
|
839
839
|
], 64));
|
|
840
840
|
}
|
|
841
841
|
});
|
|
@@ -216,9 +216,9 @@ const ra = {
|
|
|
216
216
|
emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
|
|
217
217
|
setup(s, { emit: n }) {
|
|
218
218
|
const r = n, u = h(!0), { currentDialog: v, dialogPayload: p, closeDialog: U } = X(), l = {
|
|
219
|
-
email: q(() => import("./ProfileEmailDialog-
|
|
220
|
-
phone: q(() => import("./ProfilePhoneDialog-
|
|
221
|
-
password: q(() => import("./ProfilePasswordDialog-
|
|
219
|
+
email: q(() => import("./ProfileEmailDialog-DlGErflr.js")),
|
|
220
|
+
phone: q(() => import("./ProfilePhoneDialog-C8_OQsEV.js")),
|
|
221
|
+
password: q(() => import("./ProfilePasswordDialog-DLrepGiM.js"))
|
|
222
222
|
}, i = ({ email: y }) => {
|
|
223
223
|
r("update-email-field", y);
|
|
224
224
|
}, c = ({ phone: y }) => {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-965c8738] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-965c8738] .p-input-file:hover .overlay{visibility:visible}.icon-locked{pointer-events:auto;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.input-wrapper{position:relative;width:100%}.dialogTitle{z-index:10;width:100%;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#2b3238}.dialogDefaultContainer{display:flex;align-items:flex-start;flex-direction:column;width:100%;gap:32px;margin-top:16px;padding:10px 16px}.dialogDefaultContainerTextHint{font-weight:400;font-size:14px;line-height:20px;text-align:center;color:#1b1b1b}.dialogDefaultContainerRateLimitText{font-weight:600;font-size:14px;line-height:20px;color:#d0dbe4}.dialogDefaultContainerInsideContent{width:100%;display:flex;flex-direction:column;gap:24px}.dialogDefaultContainerRateLimitTextActive{color:#1c7ef1;cursor:pointer}.dialogDefaultContainerSendCodeBySmsText{color:#1c7ef1;cursor:pointer;font-size:14px;font-weight:600;display:flex;align-items:center;text-align:center}.chip{display:flex;align-items:center;justify-content:center;flex-direction:row;gap:4px;height:24px;font-size:12px;font-weight:600;color:#1b1b1b;padding:4px;line-height:16px;background-color:#b6d7ff4d;border-radius:4px;text-align:center;margin-left:5px}.cross{cursor:pointer;text-align:end}.finalLimitWrapper{display:flex;flex-direction:column;align-items:center;padding:12px 0;gap:12px;width:440px;min-height:94px;background:#e4606026;border-radius:8px}.finalLimitText{text-align:center;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#5d7285}.finalLimitLink{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:#1c7ef1;text-align:center;cursor:pointer;text-decoration:none}.finalLimitLink:hover{text-decoration:underline}.toastWrapper{position:fixed;bottom:1rem;right:1rem;z-index:9999}.toast{width:100%}.base-container{margin-top:1.5rem;display:flex;flex-direction:column;gap:1.25rem;width:490px;height:428px}.icon-disabled{pointer-events:none;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.centered-overlay{position:absolute;left:50%;top:50%;z-index:1000;height:100%;width:100%;transform:translate(-50%,-50%)}.buttons-container{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-start}.buttons-container PButton{flex:1 1 100%}._loaderOverlay_cpu73_1[data-v-9e697525]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background:#ffffffb3;border-radius:16px;z-index:99}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { a as o } from "./index-
|
|
2
|
+
import { a as o } from "./index-BSr7kEC4.js";
|
|
3
3
|
export {
|
|
4
4
|
o as PEditUserContact
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as l, defineComponent as L, createElementBlock as f, openBlock as v, normalizeClass as r, createVNode as E, unref as F, computed as T, renderSlot as d, createCommentVNode as $, createElementVNode as o, toDisplayString as y, createTextVNode as p } from "vue";
|
|
2
2
|
import { PLoader as w } from "@profeat/ui-kit";
|
|
3
|
-
import { _ as g, g as R, p as h } from "./index-
|
|
3
|
+
import { _ as g, g as R, p as h } from "./index-BSr7kEC4.js";
|
|
4
4
|
function C(e) {
|
|
5
5
|
const t = Math.floor(e / 60), a = e % 60;
|
|
6
6
|
return `${String(t).padStart(2, "0")}:${String(a).padStart(2, "0")}`;
|