@yourgoods/ui-smart 0.46.8 → 0.47.1
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-D7OoILE6.js → ProfileEmailDialog-MzhcuunW.js} +73 -75
- package/dist/{ProfilePasswordDialog-Hibce_6h.js → ProfilePasswordDialog-DThU1gK-.js} +1 -1
- package/dist/{ProfilePhoneDialog-Cm_s-YCX.js → ProfilePhoneDialog-CfQWR0hT.js} +83 -86
- package/dist/{index-DgXqm9qe.js → index-dEoNAWMA.js} +94 -94
- package/dist/index.js +2 -2
- package/dist/{useRateLimitToast-gpF7vjbF.js → useRateLimitToast-CcrT2O8l.js} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
2
|
-
import { T as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-
|
|
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 i, 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-CcrT2O8l.js";
|
|
3
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-
|
|
4
|
+
import { C as j, t as De, p as te, g as Ae } from "./index-dEoNAWMA.js";
|
|
5
5
|
const _e = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "12",
|
|
@@ -43,35 +43,34 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
43
43
|
},
|
|
44
44
|
emits: ["update:phone", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code-again", "on-send-only-sms", "on-clear-code-error"],
|
|
45
45
|
setup(R, { emit: x }) {
|
|
46
|
-
const B = R,
|
|
46
|
+
const B = R, r = x, u = ve({
|
|
47
47
|
touched: { phone: !1, code: !1 },
|
|
48
48
|
phoneModel: B.phone,
|
|
49
49
|
codeModel: B.code
|
|
50
50
|
});
|
|
51
51
|
Z(
|
|
52
52
|
() => u.phoneModel,
|
|
53
|
-
(v) =>
|
|
53
|
+
(v) => r("update:phone", v)
|
|
54
54
|
), Z(
|
|
55
55
|
() => u.codeModel,
|
|
56
|
-
(v) =>
|
|
56
|
+
(v) => r("update:code", v)
|
|
57
57
|
);
|
|
58
58
|
const h = (v) => {
|
|
59
59
|
u.touched[v] = !0;
|
|
60
60
|
};
|
|
61
61
|
let c = L("");
|
|
62
62
|
const F = (v) => {
|
|
63
|
-
i("on-clear-code-error");
|
|
64
63
|
const m = v.target;
|
|
65
|
-
let
|
|
66
|
-
r.length > 4 && (
|
|
67
|
-
}, X = () =>
|
|
68
|
-
console.debug("onSendCodeViaSms"),
|
|
64
|
+
let d = ((m == null ? void 0 : m.value) ?? "").replace(/\D/g, "");
|
|
65
|
+
d.length < 4 && r("on-clear-code-error"), d.length > 4 && (d = d.slice(0, 4)), M.value = d, m && m.value !== d && (m.value = d), d.length === 4 && d !== c.value && (c.value = d, r("on-match-code", { phone: e.value, code: d }));
|
|
66
|
+
}, X = () => r("on-send-code-again", { phone: u.phoneModel }), J = () => {
|
|
67
|
+
console.debug("onSendCodeViaSms"), r("on-send-only-sms", { phone: u.phoneModel });
|
|
69
68
|
}, { 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
69
|
return (v, m) => (p(), P("div", tt, [
|
|
71
70
|
q("div", ot, [
|
|
72
71
|
q("div", nt, H(v.hintText), 1),
|
|
73
72
|
q("div", at, [
|
|
74
|
-
v.isTg ? (p(), G(
|
|
73
|
+
v.isTg ? (p(), G(i(Pe), { key: 0 })) : (p(), G(i(le), {
|
|
75
74
|
key: 1,
|
|
76
75
|
style: { "margin-left": "5px" }
|
|
77
76
|
})),
|
|
@@ -79,34 +78,34 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
79
78
|
])
|
|
80
79
|
]),
|
|
81
80
|
v.showPhone ? (p(), P("div", lt, [
|
|
82
|
-
T(
|
|
83
|
-
modelValue:
|
|
84
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
81
|
+
T(i(ae), {
|
|
82
|
+
modelValue: i(e),
|
|
83
|
+
"onUpdate:modelValue": m[0] || (m[0] = (d) => ne(e) ? e.value = d : null),
|
|
85
84
|
size: "large",
|
|
86
85
|
"text-size": "medium",
|
|
87
86
|
label: "Телефон",
|
|
88
87
|
type: "tel",
|
|
89
88
|
error: f.value,
|
|
90
89
|
disabled: !0,
|
|
91
|
-
onBlur: m[1] || (m[1] = (
|
|
92
|
-
onInput: m[2] || (m[2] = (
|
|
90
|
+
onBlur: m[1] || (m[1] = (d) => h("phone")),
|
|
91
|
+
onInput: m[2] || (m[2] = (d) => h("phone"))
|
|
93
92
|
}, null, 8, ["modelValue", "error"]),
|
|
94
|
-
T(
|
|
93
|
+
T(i(Ke), {
|
|
95
94
|
class: "icon-locked",
|
|
96
|
-
onClick: m[3] || (m[3] = (
|
|
95
|
+
onClick: m[3] || (m[3] = (d) => v.$emit("edit", "phone"))
|
|
97
96
|
})
|
|
98
97
|
])) : $("", !0),
|
|
99
98
|
v.showCode ? (p(), P("div", st, [
|
|
100
|
-
T(
|
|
101
|
-
modelValue:
|
|
102
|
-
"onUpdate:modelValue": m[4] || (m[4] = (
|
|
99
|
+
T(i(ae), {
|
|
100
|
+
modelValue: i(M),
|
|
101
|
+
"onUpdate:modelValue": m[4] || (m[4] = (d) => ne(M) ? M.value = d : null),
|
|
103
102
|
size: "large",
|
|
104
103
|
"text-size": "medium",
|
|
105
104
|
label: "Код",
|
|
106
105
|
type: "text",
|
|
107
106
|
error: O.value,
|
|
108
107
|
onInput: F,
|
|
109
|
-
onBlur: m[5] || (m[5] = (
|
|
108
|
+
onBlur: m[5] || (m[5] = (d) => h("code"))
|
|
110
109
|
}, null, 8, ["modelValue", "error"])
|
|
111
110
|
])) : $("", !0),
|
|
112
111
|
T(we, {
|
|
@@ -122,7 +121,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
122
121
|
onClick: J
|
|
123
122
|
}, [
|
|
124
123
|
Y(H(v.sendCodeBySmsText) + " ", 1),
|
|
125
|
-
T(
|
|
124
|
+
T(i(le), { style: { "margin-left": "5px" } })
|
|
126
125
|
])) : $("", !0)
|
|
127
126
|
]),
|
|
128
127
|
_: 1
|
|
@@ -168,7 +167,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
168
167
|
},
|
|
169
168
|
emits: ["update:phone", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-send-only-sms", "on-clear-code-error"],
|
|
170
169
|
setup(R, { emit: x }) {
|
|
171
|
-
const B = R,
|
|
170
|
+
const B = R, r = x, u = L(!1), h = L(""), c = ve({
|
|
172
171
|
touched: { phone: !1, code: !1 },
|
|
173
172
|
phoneModel: "",
|
|
174
173
|
codeModel: ""
|
|
@@ -176,11 +175,11 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
176
175
|
Z(
|
|
177
176
|
() => c.phoneModel,
|
|
178
177
|
(o) => {
|
|
179
|
-
|
|
178
|
+
r("update:phone", o), h.value = "";
|
|
180
179
|
}
|
|
181
180
|
), Z(
|
|
182
181
|
() => c.codeModel,
|
|
183
|
-
(o) =>
|
|
182
|
+
(o) => r("update:code", o)
|
|
184
183
|
);
|
|
185
184
|
const F = (o) => c.touched[o] = !0, X = (o) => c.touched[o] = !1, J = () => {
|
|
186
185
|
h.value = "", X("phone");
|
|
@@ -202,22 +201,21 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
202
201
|
h.value = "Такой номер уже используется";
|
|
203
202
|
return;
|
|
204
203
|
}
|
|
205
|
-
h.value = "",
|
|
204
|
+
h.value = "", r("on-send-code", { phone: c.phoneModel, prevPhone: B.oldPhone, offLoading: !0 }), u.value = !0;
|
|
206
205
|
} catch (n) {
|
|
207
206
|
console.error("Неизвестная ошибка при проверке доступности телефона:", n), h.value = "Это не похоже на номер телефона";
|
|
208
207
|
}
|
|
209
208
|
};
|
|
210
209
|
let f = L("");
|
|
211
210
|
const O = (o) => {
|
|
212
|
-
i("on-clear-code-error");
|
|
213
211
|
const n = o.target;
|
|
214
212
|
let s = ((n == null ? void 0 : n.value) ?? "").replace(/\D/g, "");
|
|
215
|
-
s.length > 4 && (s = s.slice(0, 4)), I.value = s, n && n.value !== s && (n.value = s), s.length === 4 && s !== f.value && (f.value = s,
|
|
213
|
+
s.length < 4 && r("on-clear-code-error"), s.length > 4 && (s = s.slice(0, 4)), I.value = s, n && n.value !== s && (n.value = s), s.length === 4 && s !== f.value && (f.value = s, r("on-match-code", { phone: d.value, code: s }));
|
|
216
214
|
}, v = () => {
|
|
217
|
-
|
|
215
|
+
r("on-send-code-again", { phone: c.phoneModel });
|
|
218
216
|
}, m = () => {
|
|
219
|
-
console.debug("onSendCodeViaSms"),
|
|
220
|
-
}, { phoneModel:
|
|
217
|
+
console.debug("onSendCodeViaSms"), r("on-send-only-sms", { phone: c.phoneModel });
|
|
218
|
+
}, { phoneModel: d, codeModel: I, touched: se } = Ce(c), W = E(() => {
|
|
221
219
|
if (h.value) return h.value;
|
|
222
220
|
if (c.touched.phone) {
|
|
223
221
|
if (!c.phoneModel.trim()) return "Введите номер телефона";
|
|
@@ -229,7 +227,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
229
227
|
q("div", rt, [
|
|
230
228
|
q("div", ut, H(u.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
|
|
231
229
|
u.value ? (p(), P("div", ct, [
|
|
232
|
-
o.isTg ? (p(), G(
|
|
230
|
+
o.isTg ? (p(), G(i(Pe), { key: 0 })) : (p(), G(i(le), {
|
|
233
231
|
key: 1,
|
|
234
232
|
style: { "margin-left": "5px" }
|
|
235
233
|
})),
|
|
@@ -237,9 +235,9 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
237
235
|
])) : $("", !0)
|
|
238
236
|
]),
|
|
239
237
|
o.showPhone ? (p(), P("div", pt, [
|
|
240
|
-
T(
|
|
241
|
-
modelValue: d
|
|
242
|
-
"onUpdate:modelValue": n[0] || (n[0] = (s) => ne(
|
|
238
|
+
T(i(ae), {
|
|
239
|
+
modelValue: i(d),
|
|
240
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => ne(d) ? d.value = s : null),
|
|
243
241
|
size: "large",
|
|
244
242
|
"text-size": "medium",
|
|
245
243
|
label: "Телефон",
|
|
@@ -248,13 +246,13 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
248
246
|
onBlur: n[1] || (n[1] = (s) => F("phone")),
|
|
249
247
|
onInput: J
|
|
250
248
|
}, null, 8, ["modelValue", "error"]),
|
|
251
|
-
T(
|
|
249
|
+
T(i(ze), {
|
|
252
250
|
class: "icon-locked",
|
|
253
251
|
onClick: n[2] || (n[2] = (s) => o.$emit("edit", "phone"))
|
|
254
252
|
})
|
|
255
253
|
])) : $("", !0),
|
|
256
254
|
u.value ? $("", !0) : (p(), P("div", ht, [
|
|
257
|
-
T(
|
|
255
|
+
T(i(Fe), {
|
|
258
256
|
style: { width: "100%" },
|
|
259
257
|
disabled: M.value,
|
|
260
258
|
onClick: C
|
|
@@ -267,8 +265,8 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
267
265
|
}, 8, ["disabled"])
|
|
268
266
|
])),
|
|
269
267
|
u.value ? (p(), P("div", vt, [
|
|
270
|
-
T(
|
|
271
|
-
modelValue:
|
|
268
|
+
T(i(ae), {
|
|
269
|
+
modelValue: i(I),
|
|
272
270
|
"onUpdate:modelValue": n[3] || (n[3] = (s) => ne(I) ? I.value = s : null),
|
|
273
271
|
size: "large",
|
|
274
272
|
"text-size": "medium",
|
|
@@ -293,7 +291,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
293
291
|
onClick: m
|
|
294
292
|
}, [
|
|
295
293
|
Y(H(o.sendCodeBySmsText) + " ", 1),
|
|
296
|
-
T(
|
|
294
|
+
T(i(le), { style: { "margin-left": "5px" } })
|
|
297
295
|
])) : $("", !0)
|
|
298
296
|
]),
|
|
299
297
|
_: 1
|
|
@@ -331,7 +329,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
331
329
|
},
|
|
332
330
|
emits: ["update:phone", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-send-only-sms", "on-clear-code-error"],
|
|
333
331
|
setup(R, { emit: x }) {
|
|
334
|
-
const B = R,
|
|
332
|
+
const B = R, r = x, u = L(!1), h = L(""), c = ve({
|
|
335
333
|
touched: { phone: !1, code: !1 },
|
|
336
334
|
phoneModel: "",
|
|
337
335
|
codeModel: ""
|
|
@@ -339,11 +337,11 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
339
337
|
Z(
|
|
340
338
|
() => c.phoneModel,
|
|
341
339
|
(o) => {
|
|
342
|
-
|
|
340
|
+
r("update:phone", o), h.value = "";
|
|
343
341
|
}
|
|
344
342
|
), Z(
|
|
345
343
|
() => c.codeModel,
|
|
346
|
-
(o) =>
|
|
344
|
+
(o) => r("update:code", o)
|
|
347
345
|
);
|
|
348
346
|
const F = (o) => c.touched[o] = !0, X = (o) => c.touched[o] = !1, J = () => {
|
|
349
347
|
h.value = "", X("phone");
|
|
@@ -362,22 +360,21 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
362
360
|
h.value = "Такой номер уже используется";
|
|
363
361
|
return;
|
|
364
362
|
}
|
|
365
|
-
h.value = "",
|
|
363
|
+
h.value = "", r("on-send-code", { phone: c.phoneModel, prevPhone: B.oldPhone, offLoading: !0 }), u.value = !0;
|
|
366
364
|
} catch (n) {
|
|
367
365
|
console.error("Неизвестная ошибка при проверке доступности телефона:", n), h.value = "Это не похоже на номер телефона";
|
|
368
366
|
}
|
|
369
367
|
};
|
|
370
368
|
let f = "";
|
|
371
369
|
const O = (o) => {
|
|
372
|
-
i("on-clear-code-error");
|
|
373
370
|
const n = o.target;
|
|
374
371
|
let s = n.value.replace(/\D/g, "");
|
|
375
|
-
s.length > 4 && (s = s.slice(0, 4), n.value = s), c.codeModel = s, s.length === 4 && s !== f && (f = s,
|
|
372
|
+
s.length < 4 && r("on-clear-code-error"), s.length > 4 && (s = s.slice(0, 4), n.value = s), c.codeModel = s, s.length === 4 && s !== f && (f = s, r("on-match-code", { phone: c.phoneModel, code: s }));
|
|
376
373
|
}, v = () => {
|
|
377
|
-
|
|
374
|
+
r("on-send-code-again", { phone: c.phoneModel });
|
|
378
375
|
}, m = () => {
|
|
379
|
-
console.debug("onSendCodeViaSms"),
|
|
380
|
-
}, { phoneModel:
|
|
376
|
+
console.debug("onSendCodeViaSms"), r("on-send-only-sms", { phone: c.phoneModel });
|
|
377
|
+
}, { phoneModel: d, codeModel: I, touched: se } = Ce(c), W = E(() => {
|
|
381
378
|
if (h.value) return h.value;
|
|
382
379
|
if (c.touched.phone) {
|
|
383
380
|
if (!c.phoneModel.trim()) return "Введите номер телефона";
|
|
@@ -389,7 +386,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
389
386
|
q("div", yt, [
|
|
390
387
|
q("div", Ct, H(u.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
|
|
391
388
|
u.value ? (p(), P("div", wt, [
|
|
392
|
-
o.isTg ? (p(), G(
|
|
389
|
+
o.isTg ? (p(), G(i(Pe), { key: 0 })) : (p(), G(i(le), {
|
|
393
390
|
key: 1,
|
|
394
391
|
style: { "margin-left": "5px" }
|
|
395
392
|
})),
|
|
@@ -397,9 +394,9 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
397
394
|
])) : $("", !0)
|
|
398
395
|
]),
|
|
399
396
|
o.showPhone ? (p(), P("div", Pt, [
|
|
400
|
-
T(
|
|
401
|
-
modelValue: d
|
|
402
|
-
"onUpdate:modelValue": n[0] || (n[0] = (s) => ne(
|
|
397
|
+
T(i(ae), {
|
|
398
|
+
modelValue: i(d),
|
|
399
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => ne(d) ? d.value = s : null),
|
|
403
400
|
size: "large",
|
|
404
401
|
"text-size": "medium",
|
|
405
402
|
label: "Телефон",
|
|
@@ -408,13 +405,13 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
408
405
|
onBlur: n[1] || (n[1] = (s) => F("phone")),
|
|
409
406
|
onInput: J
|
|
410
407
|
}, null, 8, ["modelValue", "error"]),
|
|
411
|
-
T(
|
|
408
|
+
T(i(ze), {
|
|
412
409
|
class: "icon-locked",
|
|
413
410
|
onClick: n[2] || (n[2] = (s) => o.$emit("edit", "phone"))
|
|
414
411
|
})
|
|
415
412
|
])) : $("", !0),
|
|
416
413
|
u.value ? $("", !0) : (p(), P("div", Tt, [
|
|
417
|
-
T(
|
|
414
|
+
T(i(Fe), {
|
|
418
415
|
style: { width: "100%" },
|
|
419
416
|
disabled: M.value,
|
|
420
417
|
onClick: C
|
|
@@ -427,8 +424,8 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
427
424
|
}, 8, ["disabled"])
|
|
428
425
|
])),
|
|
429
426
|
u.value ? (p(), P("div", St, [
|
|
430
|
-
T(
|
|
431
|
-
modelValue:
|
|
427
|
+
T(i(ae), {
|
|
428
|
+
modelValue: i(I),
|
|
432
429
|
"onUpdate:modelValue": n[3] || (n[3] = (s) => ne(I) ? I.value = s : null),
|
|
433
430
|
size: "large",
|
|
434
431
|
"text-size": "medium",
|
|
@@ -453,7 +450,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
453
450
|
onClick: m
|
|
454
451
|
}, [
|
|
455
452
|
Y(H(o.sendCodeBySmsText) + " ", 1),
|
|
456
|
-
T(
|
|
453
|
+
T(i(le), { style: { "margin-left": "5px" } })
|
|
457
454
|
])) : $("", !0)
|
|
458
455
|
]),
|
|
459
456
|
_: 1
|
|
@@ -480,18 +477,18 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
480
477
|
},
|
|
481
478
|
emits: ["update:modelValue", "submit-phone", "edit", "close", "clean-input-errors", "on-update-jwt", "update-phone-field", "on-toast"],
|
|
482
479
|
setup(R, { expose: x, emit: B }) {
|
|
483
|
-
const
|
|
480
|
+
const r = R, u = B, h = L(r.modelValue);
|
|
484
481
|
Z(
|
|
485
|
-
() =>
|
|
482
|
+
() => r.modelValue,
|
|
486
483
|
(a) => h.value = a
|
|
487
484
|
), Z(h, (a) => u("update:modelValue", a));
|
|
488
|
-
const c = E(() =>
|
|
489
|
-
oldPhone:
|
|
485
|
+
const c = E(() => r.language ?? "ru"), F = (a) => De[c.value] && De[c.value][a] || (r.title ?? a), X = E(() => r.title ?? F("Смена номера телефона")), J = E(() => r.hintText ?? F("Чтобы продолжить, введите новый номер")), e = ve({
|
|
486
|
+
oldPhone: r.initialPhone ?? "",
|
|
490
487
|
newPhone: "",
|
|
491
488
|
code: "",
|
|
492
489
|
addPhone: "",
|
|
493
490
|
addCode: ""
|
|
494
|
-
}), M = L(j.OLD), C = L(null), f = L(!1), O = L(!1), v = L("tg"), m = E(() => v.value === "tg"),
|
|
491
|
+
}), M = L(j.OLD), C = L(null), f = L(!1), O = L(!1), v = L("tg"), m = E(() => v.value === "tg"), d = L(!1), { startTimer: I, remainingSeconds: se, isAvailableForSendAgain: W, totalRateAttempts: _, currentRateAttempt: o } = He(), { showRateLimitToast: n } = Je(u), { isEditFlow: s, getFlow: me } = Ge(L(r.mode)), de = E(() => W.value ? "Повторить" : `${se.value}`), ie = L(pe), re = E(() => ie.value === 0), Ue = (a) => new Promise((l) => setTimeout(l, a));
|
|
495
492
|
async function fe(a = "email") {
|
|
496
493
|
var t;
|
|
497
494
|
return (t = (await Ae("/users/profile/session/get-edit-session", { params: { field: a } })).data) == null ? void 0 : t.data;
|
|
@@ -500,7 +497,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
500
497
|
var b;
|
|
501
498
|
const t = (b = (await te("/users/profile/session/create-if-not-exists", {
|
|
502
499
|
field: a,
|
|
503
|
-
oldValue: U(
|
|
500
|
+
oldValue: U(r.initialPhone)
|
|
504
501
|
})).data) == null ? void 0 : b.data;
|
|
505
502
|
return C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? j.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "", t;
|
|
506
503
|
}
|
|
@@ -524,7 +521,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
524
521
|
},
|
|
525
522
|
{
|
|
526
523
|
headers: {
|
|
527
|
-
"x-only-sms":
|
|
524
|
+
"x-only-sms": d.value ?? !1
|
|
528
525
|
}
|
|
529
526
|
}
|
|
530
527
|
);
|
|
@@ -535,7 +532,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
535
532
|
return null;
|
|
536
533
|
}
|
|
537
534
|
}
|
|
538
|
-
const ge = async ({ phone: a }) => (
|
|
535
|
+
const ge = async ({ phone: a }) => (d.value = !0, await ee({ value: a, isOnlySms: !0 })), ee = async ({ value: a, isOnlySms: l, offLoading: t } = {}) => {
|
|
539
536
|
var b, w, D, A, N;
|
|
540
537
|
f.value = !0;
|
|
541
538
|
try {
|
|
@@ -546,7 +543,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
546
543
|
phone: U(k),
|
|
547
544
|
value: U(k),
|
|
548
545
|
oldValue: U(e.oldPhone),
|
|
549
|
-
provider:
|
|
546
|
+
provider: r.provider,
|
|
550
547
|
isOnlySms: l ?? !1
|
|
551
548
|
},
|
|
552
549
|
{
|
|
@@ -557,7 +554,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
557
554
|
);
|
|
558
555
|
console.debug("response sendContactCode: ", g);
|
|
559
556
|
const S = (w = (b = g == null ? void 0 : g.data) == null ? void 0 : b.data) == null ? void 0 : w.deliveryType;
|
|
560
|
-
if ((S === "tg" || S === "sms") && (v.value = S, S === "tg" && (
|
|
557
|
+
if ((S === "tg" || S === "sms") && (v.value = S, S === "tg" && (d.value = !1)), console.debug("sendContactCode before обработка 403 tooManyRequests", g), (g == null ? void 0 : g.status) === 403 && ((D = g.data) != null && D.tooManyRequests)) {
|
|
561
558
|
console.debug("sendContactCode IN обработка 403 tooManyRequests", g);
|
|
562
559
|
const K = (N = (A = g.data) == null ? void 0 : A.tooManyRequests) == null ? void 0 : N.type;
|
|
563
560
|
v.value = K;
|
|
@@ -659,7 +656,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
659
656
|
{
|
|
660
657
|
sessionId: C.value,
|
|
661
658
|
phone: U(N),
|
|
662
|
-
provider:
|
|
659
|
+
provider: r.provider,
|
|
663
660
|
isOnlySms: t ?? !1
|
|
664
661
|
},
|
|
665
662
|
{
|
|
@@ -668,7 +665,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
668
665
|
}
|
|
669
666
|
}
|
|
670
667
|
), g = (D = (w = k == null ? void 0 : k.data) == null ? void 0 : w.data) == null ? void 0 : D.deliveryType;
|
|
671
|
-
(g === "tg" || g === "sms") && (v.value = g, g === "tg" && (
|
|
668
|
+
(g === "tg" || g === "sms") && (v.value = g, g === "tg" && (d.value = !1));
|
|
672
669
|
const S = (A = k.data) == null ? void 0 : A.tooManyRequests;
|
|
673
670
|
if (k.status === 403 && S) {
|
|
674
671
|
const K = S == null ? void 0 : S.type;
|
|
@@ -712,7 +709,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
712
709
|
return je(async () => {
|
|
713
710
|
f.value = !0;
|
|
714
711
|
const a = await me("phone");
|
|
715
|
-
if (
|
|
712
|
+
if (r.mode === "bind" && a === "bind") {
|
|
716
713
|
await We(), f.value = !1;
|
|
717
714
|
return;
|
|
718
715
|
}
|
|
@@ -736,7 +733,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
736
733
|
matchBindCode: Ee,
|
|
737
734
|
matchBindCodeError: Ie
|
|
738
735
|
}), (a, l) => (p(), P(qe, null, [
|
|
739
|
-
T(
|
|
736
|
+
T(i(Qe), {
|
|
740
737
|
modelValue: h.value,
|
|
741
738
|
"onUpdate:modelValue": [
|
|
742
739
|
l[15] || (l[15] = (t) => h.value = t),
|
|
@@ -749,17 +746,17 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
749
746
|
}, {
|
|
750
747
|
header: Q(() => [
|
|
751
748
|
q("div", bt, [
|
|
752
|
-
T(
|
|
749
|
+
T(i(Xe), {
|
|
753
750
|
"slot-left": !1,
|
|
754
751
|
size: "small",
|
|
755
752
|
borded: !0,
|
|
756
753
|
"no-padding": !1
|
|
757
754
|
}, {
|
|
758
755
|
title: Q(() => [
|
|
759
|
-
q("span", kt, H(
|
|
756
|
+
q("span", kt, H(i(s) ? X.value : "Добавление номера телефона"), 1)
|
|
760
757
|
]),
|
|
761
758
|
"right-button": Q(() => [
|
|
762
|
-
T(
|
|
759
|
+
T(i(Ye), {
|
|
763
760
|
class: "cross",
|
|
764
761
|
onClick: ue
|
|
765
762
|
})
|
|
@@ -769,9 +766,9 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
769
766
|
])
|
|
770
767
|
]),
|
|
771
768
|
default: Q(() => [
|
|
772
|
-
|
|
769
|
+
i(s) ? (p(), P("div", Vt, [
|
|
773
770
|
f.value ? (p(), G(Oe, { key: 0 })) : $("", !0),
|
|
774
|
-
M.value ===
|
|
771
|
+
M.value === i(j).OLD ? (p(), G(dt, {
|
|
775
772
|
key: 1,
|
|
776
773
|
phone: e.oldPhone,
|
|
777
774
|
"onUpdate:phone": l[0] || (l[0] = (t) => e.oldPhone = t),
|
|
@@ -783,11 +780,11 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
783
780
|
loading: f.value,
|
|
784
781
|
"is-tg": m.value,
|
|
785
782
|
onOnSendCode: l[2] || (l[2] = (t) => ee({ value: e.oldPhone })),
|
|
786
|
-
onOnSendCodeAgain: l[3] || (l[3] = (t) => ee({ value: e.oldPhone, isOnlySms: !m.value &&
|
|
783
|
+
onOnSendCodeAgain: l[3] || (l[3] = (t) => ee({ value: e.oldPhone, isOnlySms: !m.value && d.value })),
|
|
787
784
|
onOnSendOnlySms: ge,
|
|
788
785
|
onOnMatchCode: xe,
|
|
789
786
|
onOnMatchCodeError: be
|
|
790
|
-
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value ===
|
|
787
|
+
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === i(j).NEW ? (p(), G(ft, {
|
|
791
788
|
key: 2,
|
|
792
789
|
phone: e.newPhone,
|
|
793
790
|
"onUpdate:phone": l[4] || (l[4] = (t) => e.newPhone = t),
|
|
@@ -802,12 +799,12 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
802
799
|
loading: f.value,
|
|
803
800
|
"is-tg": m.value,
|
|
804
801
|
onOnSendCode: l[7] || (l[7] = (t) => ee({ value: e.newPhone })),
|
|
805
|
-
onOnSendCodeAgain: l[8] || (l[8] = (t) => ee({ value: e.newPhone, isOnlySms: !m.value &&
|
|
802
|
+
onOnSendCodeAgain: l[8] || (l[8] = (t) => ee({ value: e.newPhone, isOnlySms: !m.value && d.value })),
|
|
806
803
|
onOnSendOnlySms: ge,
|
|
807
804
|
onOnMatchCode: ke,
|
|
808
805
|
onOnMatchCodeError: Ve,
|
|
809
806
|
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 ===
|
|
807
|
+
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === i(j).COMPLETED ? (p(), P("div", $t, [
|
|
811
808
|
q("p", null, H(F("Телефон успешно изменен")), 1)
|
|
812
809
|
])) : $("", !0)
|
|
813
810
|
])) : (p(), P("div", Bt, [
|
|
@@ -819,14 +816,14 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
819
816
|
"onUpdate:oldPhone": l[11] || (l[11] = (t) => e.oldPhone = t),
|
|
820
817
|
code: e.addCode,
|
|
821
818
|
"onUpdate:code": l[12] || (l[12] = (t) => e.addCode = t),
|
|
822
|
-
"hint-text":
|
|
819
|
+
"hint-text": i(s) ? J.value : "Чтобы продолжить, введите новый номер",
|
|
823
820
|
"rate-limit-text": de.value,
|
|
824
821
|
"is-final-limit": re.value,
|
|
825
822
|
"is-not-match-code": O.value,
|
|
826
823
|
loading: f.value,
|
|
827
824
|
"is-tg": m.value,
|
|
828
825
|
onOnSendCode: l[13] || (l[13] = (t) => ye({ value: e.addPhone, field: "phone" })),
|
|
829
|
-
onOnSendCodeAgain: l[14] || (l[14] = (t) => ye({ value: e.addPhone, field: "phone", isOnlySms: !m.value &&
|
|
826
|
+
onOnSendCodeAgain: l[14] || (l[14] = (t) => ye({ value: e.addPhone, field: "phone", isOnlySms: !m.value && d.value })),
|
|
830
827
|
onOnSendOnlySms: ge,
|
|
831
828
|
onOnMatchCode: Ee,
|
|
832
829
|
onOnMatchCodeError: Ie
|
|
@@ -835,7 +832,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
835
832
|
]),
|
|
836
833
|
_: 1
|
|
837
834
|
}, 8, ["modelValue"]),
|
|
838
|
-
T(
|
|
835
|
+
T(i(Ze))
|
|
839
836
|
], 64));
|
|
840
837
|
}
|
|
841
838
|
});
|