@yourgoods/ui-smart 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ProfileEmailDialog-hqiCAvmA.js → ProfileEmailDialog-DZfdsLfO.js} +2 -2
- package/dist/{ProfilePasswordDialog-CwshEPVD.js → ProfilePasswordDialog-DLXWVm3l.js} +1 -1
- package/dist/{ProfilePhoneDialog-B9ivxKlS.js → ProfilePhoneDialog-CarYpXMn.js} +235 -219
- package/dist/{index-BAX9rbeD.js → index-D0TK0qAd.js} +32 -32
- package/dist/index.js +1 -1
- package/dist/{useRateLimitToast-BROS1T6Q.js → useRateLimitToast-CpNES7IA.js} +1 -1
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as Z, ref as M, reactive as J, watch as j, computed as V, toRefs as se, createElementBlock as k, openBlock as y, createElementVNode as S, createCommentVNode as P, toDisplayString as K, createVNode as b, unref as c, isRef as Q, withCtx as q, createTextVNode as te, Fragment as Oe, createBlock as R, resolveDynamicComponent as Ce, onMounted as Ue } from "vue";
|
|
2
|
-
import { T as de, c as Ve, _ as Ae, u as Fe, a as Re, P as ye, b as ze } from "./useRateLimitToast-
|
|
3
|
-
import { C as D, B as We, p as F, g as He } from "./index-
|
|
2
|
+
import { T as de, c as Ve, _ as Ae, u as Fe, a as Re, P as ye, b as ze } from "./useRateLimitToast-CpNES7IA.js";
|
|
3
|
+
import { C as D, B as We, p as F, g as He } from "./index-D0TK0qAd.js";
|
|
4
4
|
import { PInput as _, IconMailMd as re, PButton as le, IconEyeMd as ge, IconEyeClosedMd as he, PDialog as qe, PTopBar as je, IconCrossMd as _e } from "@profeat/ui-kit";
|
|
5
5
|
const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dialogDefaultContainerTextHint" }, Je = {
|
|
6
6
|
key: 0,
|
|
@@ -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-D0TK0qAd.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,14 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as fe, c as Oe, a as
|
|
3
|
-
import { IconTelegramSm as ge, PInput as te, IconPhoneMd as
|
|
4
|
-
import { C as U, t as Be, p as
|
|
5
|
-
const
|
|
1
|
+
import { createElementBlock as T, openBlock as p, createElementVNode as z, defineComponent as re, reactive as ue, watch as X, ref as O, toRefs as me, computed as A, createCommentVNode as $, createVNode as S, toDisplayString as q, createBlock as j, createTextVNode as Q, unref as r, isRef as ee, withCtx as J, onMounted as Ue, Fragment as qe } from "vue";
|
|
2
|
+
import { T as fe, c as Oe, a as We, u as je, P as Ee, b as He } from "./useRateLimitToast-CpNES7IA.js";
|
|
3
|
+
import { IconTelegramSm as ge, PInput as te, IconPhoneMd as Ge, IconMailMd as Le, PButton as De, PDialog as Je, PTopBar as Ke, IconCrossMd as Qe, PTeleportContainer as Xe } from "@profeat/ui-kit";
|
|
4
|
+
import { C as U, t as Be, p as Z, g as Ie } from "./index-D0TK0qAd.js";
|
|
5
|
+
const Ye = {
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
width: "12",
|
|
8
|
+
height: "16",
|
|
9
|
+
fill: "none"
|
|
10
|
+
};
|
|
11
|
+
function Ze(N, b) {
|
|
12
|
+
return p(), T("svg", Ye, b[0] || (b[0] = [
|
|
13
|
+
z("path", {
|
|
14
|
+
fill: "#1C7EF1",
|
|
15
|
+
"fill-rule": "evenodd",
|
|
16
|
+
d: "M1 0a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1zm1.5 2a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5zM6 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2",
|
|
17
|
+
"clip-rule": "evenodd"
|
|
18
|
+
}, null, -1)
|
|
19
|
+
]));
|
|
20
|
+
}
|
|
21
|
+
const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }, et = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, tt = { class: "dialogDefaultContainerTextHint" }, ot = { class: "chip" }, nt = {
|
|
6
22
|
key: 0,
|
|
7
23
|
class: "input-wrapper"
|
|
8
|
-
},
|
|
24
|
+
}, at = {
|
|
9
25
|
key: 1,
|
|
10
26
|
class: "input-wrapper"
|
|
11
|
-
},
|
|
27
|
+
}, lt = /* @__PURE__ */ re({
|
|
12
28
|
__name: "OldPhoneContent",
|
|
13
29
|
props: {
|
|
14
30
|
phone: {},
|
|
@@ -26,16 +42,16 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
26
42
|
isTg: { type: Boolean }
|
|
27
43
|
},
|
|
28
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"],
|
|
29
|
-
setup(N, { emit:
|
|
30
|
-
const
|
|
45
|
+
setup(N, { emit: b }) {
|
|
46
|
+
const k = N, u = b, c = ue({
|
|
31
47
|
touched: { phone: !1, code: !1 },
|
|
32
|
-
phoneModel:
|
|
33
|
-
codeModel:
|
|
48
|
+
phoneModel: k.phone,
|
|
49
|
+
codeModel: k.code
|
|
34
50
|
});
|
|
35
|
-
|
|
51
|
+
X(
|
|
36
52
|
() => c.phoneModel,
|
|
37
53
|
(i) => u("update:phone", i)
|
|
38
|
-
),
|
|
54
|
+
), X(
|
|
39
55
|
() => c.codeModel,
|
|
40
56
|
(i) => u("update:code", i)
|
|
41
57
|
);
|
|
@@ -45,87 +61,87 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
45
61
|
let f = O("");
|
|
46
62
|
const B = (i) => {
|
|
47
63
|
u("on-clear-code-error");
|
|
48
|
-
const
|
|
49
|
-
let v = ((
|
|
50
|
-
v.length > 4 && (v = v.slice(0, 4)), M.value = v,
|
|
51
|
-
},
|
|
64
|
+
const h = i.target;
|
|
65
|
+
let v = ((h == null ? void 0 : h.value) ?? "").replace(/\D/g, "");
|
|
66
|
+
v.length > 4 && (v = v.slice(0, 4)), M.value = v, h && h.value !== v && (h.value = v), v.length === 4 && v !== f.value && (f.value = v, u("on-match-code", { phone: e.value, code: v }));
|
|
67
|
+
}, W = () => u("on-send-code-again", { phone: c.phoneModel }), H = () => {
|
|
52
68
|
console.debug("onSendCodeViaSms"), u("on-send-only-sms", { phone: c.phoneModel });
|
|
53
|
-
}, { phoneModel: e, codeModel: M, touched: C } = me(c), y = A(() => C.value.phone && !e.value.trim() ? "Введите телефон" :
|
|
54
|
-
return (i,
|
|
55
|
-
z("div",
|
|
56
|
-
z("div",
|
|
57
|
-
z("div",
|
|
58
|
-
i.isTg ? (
|
|
69
|
+
}, { phoneModel: e, codeModel: M, touched: C } = me(c), y = A(() => C.value.phone && !e.value.trim() ? "Введите телефон" : k.phoneError), x = A(() => k.isNotMatchCode ? "Неверный код" : C.value.code ? M.value.trim() ? k.codeError ?? null : "Введите код" : "");
|
|
70
|
+
return (i, h) => (p(), T("div", _e, [
|
|
71
|
+
z("div", et, [
|
|
72
|
+
z("div", tt, q(i.hintText), 1),
|
|
73
|
+
z("div", ot, [
|
|
74
|
+
i.isTg ? (p(), j(r(ge), { key: 0 })) : (p(), j(r(oe), {
|
|
59
75
|
key: 1,
|
|
60
76
|
style: { "margin-left": "5px" }
|
|
61
77
|
})),
|
|
62
|
-
|
|
78
|
+
Q(" " + q(i.isTg ? "Telegram" : "СМС"), 1)
|
|
63
79
|
])
|
|
64
80
|
]),
|
|
65
|
-
i.showPhone ? (
|
|
66
|
-
|
|
81
|
+
i.showPhone ? (p(), T("div", nt, [
|
|
82
|
+
S(r(te), {
|
|
67
83
|
modelValue: r(e),
|
|
68
|
-
"onUpdate:modelValue":
|
|
84
|
+
"onUpdate:modelValue": h[0] || (h[0] = (v) => ee(e) ? e.value = v : null),
|
|
69
85
|
size: "large",
|
|
70
86
|
"text-size": "medium",
|
|
71
87
|
label: "Телефон",
|
|
72
88
|
type: "tel",
|
|
73
89
|
error: y.value,
|
|
74
90
|
disabled: !0,
|
|
75
|
-
onBlur:
|
|
76
|
-
onInput:
|
|
91
|
+
onBlur: h[1] || (h[1] = (v) => g("phone")),
|
|
92
|
+
onInput: h[2] || (h[2] = (v) => g("phone"))
|
|
77
93
|
}, null, 8, ["modelValue", "error"]),
|
|
78
|
-
|
|
94
|
+
S(r(Ge), {
|
|
79
95
|
class: "icon-locked",
|
|
80
|
-
onClick:
|
|
96
|
+
onClick: h[3] || (h[3] = (v) => i.$emit("edit", "phone"))
|
|
81
97
|
})
|
|
82
|
-
])) :
|
|
83
|
-
i.showCode ? (
|
|
84
|
-
|
|
98
|
+
])) : $("", !0),
|
|
99
|
+
i.showCode ? (p(), T("div", at, [
|
|
100
|
+
S(r(te), {
|
|
85
101
|
modelValue: r(M),
|
|
86
|
-
"onUpdate:modelValue":
|
|
102
|
+
"onUpdate:modelValue": h[4] || (h[4] = (v) => ee(M) ? M.value = v : null),
|
|
87
103
|
size: "large",
|
|
88
104
|
"text-size": "medium",
|
|
89
105
|
label: "Код",
|
|
90
106
|
type: "text",
|
|
91
107
|
error: x.value,
|
|
92
108
|
onInput: B,
|
|
93
|
-
onBlur:
|
|
109
|
+
onBlur: h[5] || (h[5] = (v) => g("code"))
|
|
94
110
|
}, null, 8, ["modelValue", "error"])
|
|
95
|
-
])) :
|
|
96
|
-
|
|
111
|
+
])) : $("", !0),
|
|
112
|
+
S(fe, {
|
|
97
113
|
loading: i.loading,
|
|
98
114
|
"rate-limit-text": i.rateLimitText,
|
|
99
115
|
"is-final-limit": i.isFinalLimit,
|
|
100
|
-
"on-send-again":
|
|
116
|
+
"on-send-again": W
|
|
101
117
|
}, {
|
|
102
|
-
extra:
|
|
103
|
-
i.isTg ? (
|
|
118
|
+
extra: J(() => [
|
|
119
|
+
i.isTg ? (p(), T("span", {
|
|
104
120
|
key: 0,
|
|
105
121
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
106
|
-
onClick:
|
|
122
|
+
onClick: H
|
|
107
123
|
}, [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
])) :
|
|
124
|
+
Q(q(i.sendCodeBySmsText) + " ", 1),
|
|
125
|
+
S(r(oe), { style: { "margin-left": "5px" } })
|
|
126
|
+
])) : $("", !0)
|
|
111
127
|
]),
|
|
112
128
|
_: 1
|
|
113
129
|
}, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
114
130
|
]));
|
|
115
131
|
}
|
|
116
|
-
}),
|
|
132
|
+
}), st = { class: "dialogDefaultContainerInsideContent" }, it = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, dt = { class: "dialogDefaultContainerTextHint" }, rt = {
|
|
117
133
|
key: 0,
|
|
118
134
|
class: "chip"
|
|
119
|
-
},
|
|
135
|
+
}, ut = {
|
|
120
136
|
key: 0,
|
|
121
137
|
class: "input-wrapper"
|
|
122
|
-
},
|
|
138
|
+
}, ct = {
|
|
123
139
|
key: 1,
|
|
124
140
|
class: "input-wrapper"
|
|
125
|
-
},
|
|
141
|
+
}, pt = {
|
|
126
142
|
key: 2,
|
|
127
143
|
class: "input-wrapper"
|
|
128
|
-
},
|
|
144
|
+
}, ht = { key: 3 }, vt = /* @__PURE__ */ re({
|
|
129
145
|
__name: "NewPhoneContent",
|
|
130
146
|
props: {
|
|
131
147
|
phone: {},
|
|
@@ -142,27 +158,27 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
142
158
|
isTg: { type: Boolean }
|
|
143
159
|
},
|
|
144
160
|
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"],
|
|
145
|
-
setup(N, { emit:
|
|
146
|
-
const
|
|
161
|
+
setup(N, { emit: b }) {
|
|
162
|
+
const k = N, u = b, c = O(!1), g = O(""), f = ue({
|
|
147
163
|
touched: { phone: !1, code: !1 },
|
|
148
164
|
phoneModel: "",
|
|
149
165
|
codeModel: ""
|
|
150
166
|
});
|
|
151
|
-
|
|
167
|
+
X(
|
|
152
168
|
() => f.phoneModel,
|
|
153
169
|
(n) => {
|
|
154
170
|
u("update:phone", n), g.value = "";
|
|
155
171
|
}
|
|
156
|
-
),
|
|
172
|
+
), X(
|
|
157
173
|
() => f.codeModel,
|
|
158
174
|
(n) => u("update:code", n)
|
|
159
175
|
);
|
|
160
|
-
const B = (n) => f.touched[n] = !0,
|
|
176
|
+
const B = (n) => f.touched[n] = !0, W = A(() => {
|
|
161
177
|
const o = f.phoneModel.trim().replace(/[()\-\s]/g, "");
|
|
162
178
|
return /^\+?\d{10,15}$/.test(o);
|
|
163
|
-
}),
|
|
164
|
-
var
|
|
165
|
-
if (B("phone"), !
|
|
179
|
+
}), H = async () => {
|
|
180
|
+
var K;
|
|
181
|
+
if (B("phone"), !W.value) {
|
|
166
182
|
g.value = "Это не похоже на номер телефона";
|
|
167
183
|
return;
|
|
168
184
|
}
|
|
@@ -173,11 +189,11 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
173
189
|
g.value = "Это не похоже на номер телефона";
|
|
174
190
|
return;
|
|
175
191
|
}
|
|
176
|
-
if (!(((
|
|
192
|
+
if (!(((K = n == null ? void 0 : n[0]) == null ? void 0 : K.available) ?? !1)) {
|
|
177
193
|
g.value = "Такой номер уже используется";
|
|
178
194
|
return;
|
|
179
195
|
}
|
|
180
|
-
g.value = "", u("on-send-code", { phone: f.phoneModel, prevPhone:
|
|
196
|
+
g.value = "", u("on-send-code", { phone: f.phoneModel, prevPhone: k.oldPhone, offLoading: !0 }), c.value = !0;
|
|
181
197
|
};
|
|
182
198
|
let e = O("");
|
|
183
199
|
const M = (n) => {
|
|
@@ -189,20 +205,20 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
189
205
|
u("on-send-code-again", { phone: f.phoneModel });
|
|
190
206
|
}, y = () => {
|
|
191
207
|
console.debug("onSendCodeViaSms"), u("on-send-only-sms", { phone: f.phoneModel });
|
|
192
|
-
}, { phoneModel: x, codeModel: i, touched:
|
|
193
|
-
return (n, o) => (
|
|
194
|
-
z("div",
|
|
195
|
-
z("div",
|
|
196
|
-
c.value ? (
|
|
197
|
-
n.isTg ? (
|
|
208
|
+
}, { phoneModel: x, codeModel: i, touched: h } = me(f), v = A(() => g.value ? g.value : h.value.phone && !x.value.trim() ? "Это не похоже на номер телефона" : k.phoneError || ""), G = A(() => k.isNotMatchCode ? "Неверный код" : h.value.code ? i.value.trim() ? k.codeError ?? null : "Введите код" : "");
|
|
209
|
+
return (n, o) => (p(), T("div", st, [
|
|
210
|
+
z("div", it, [
|
|
211
|
+
z("div", dt, q(c.value ? "Чтобы продолжить, введите код подтверждения из" : n.hintText), 1),
|
|
212
|
+
c.value ? (p(), T("div", rt, [
|
|
213
|
+
n.isTg ? (p(), j(r(ge), { key: 0 })) : (p(), j(r(oe), {
|
|
198
214
|
key: 1,
|
|
199
215
|
style: { "margin-left": "5px" }
|
|
200
216
|
})),
|
|
201
|
-
|
|
202
|
-
])) :
|
|
217
|
+
Q(" " + q(n.isTg ? "Telegram" : "СМС"), 1)
|
|
218
|
+
])) : $("", !0)
|
|
203
219
|
]),
|
|
204
|
-
n.showPhone ? (
|
|
205
|
-
|
|
220
|
+
n.showPhone ? (p(), T("div", ut, [
|
|
221
|
+
S(r(te), {
|
|
206
222
|
modelValue: r(x),
|
|
207
223
|
"onUpdate:modelValue": o[0] || (o[0] = (s) => ee(x) ? x.value = s : null),
|
|
208
224
|
size: "large",
|
|
@@ -213,69 +229,69 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
213
229
|
onBlur: o[1] || (o[1] = (s) => B("phone")),
|
|
214
230
|
onInput: o[2] || (o[2] = (s) => B("phone"))
|
|
215
231
|
}, null, 8, ["modelValue", "error"]),
|
|
216
|
-
|
|
232
|
+
S(r(Le), {
|
|
217
233
|
class: "icon-locked",
|
|
218
234
|
onClick: o[3] || (o[3] = (s) => n.$emit("edit", "phone"))
|
|
219
235
|
})
|
|
220
|
-
])) :
|
|
221
|
-
c.value ?
|
|
222
|
-
|
|
236
|
+
])) : $("", !0),
|
|
237
|
+
c.value ? $("", !0) : (p(), T("div", ct, [
|
|
238
|
+
S(r(De), {
|
|
223
239
|
style: { width: "100%" },
|
|
224
|
-
disabled: !
|
|
225
|
-
onClick:
|
|
240
|
+
disabled: !W.value,
|
|
241
|
+
onClick: H
|
|
226
242
|
}, {
|
|
227
|
-
default:
|
|
228
|
-
|
|
243
|
+
default: J(() => o[6] || (o[6] = [
|
|
244
|
+
Q(" Отправить код ")
|
|
229
245
|
])),
|
|
230
246
|
_: 1,
|
|
231
247
|
__: [6]
|
|
232
248
|
}, 8, ["disabled"])
|
|
233
249
|
])),
|
|
234
|
-
c.value ? (
|
|
235
|
-
|
|
250
|
+
c.value ? (p(), T("div", pt, [
|
|
251
|
+
S(r(te), {
|
|
236
252
|
modelValue: r(i),
|
|
237
253
|
"onUpdate:modelValue": o[4] || (o[4] = (s) => ee(i) ? i.value = s : null),
|
|
238
254
|
size: "large",
|
|
239
255
|
"text-size": "medium",
|
|
240
256
|
label: "Код",
|
|
241
257
|
type: "text",
|
|
242
|
-
error:
|
|
258
|
+
error: G.value,
|
|
243
259
|
onInput: M,
|
|
244
260
|
onBlur: o[5] || (o[5] = (s) => B("code"))
|
|
245
261
|
}, null, 8, ["modelValue", "error"])
|
|
246
|
-
])) :
|
|
247
|
-
!n.loading && c.value ? (
|
|
248
|
-
|
|
262
|
+
])) : $("", !0),
|
|
263
|
+
!n.loading && c.value ? (p(), T("div", ht, [
|
|
264
|
+
S(fe, {
|
|
249
265
|
loading: n.loading,
|
|
250
266
|
"rate-limit-text": n.rateLimitText,
|
|
251
267
|
"is-final-limit": n.isFinalLimit,
|
|
252
268
|
"on-send-again": C
|
|
253
269
|
}, {
|
|
254
|
-
extra:
|
|
255
|
-
n.isTg ? (
|
|
270
|
+
extra: J(() => [
|
|
271
|
+
n.isTg ? (p(), T("span", {
|
|
256
272
|
key: 0,
|
|
257
273
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
258
274
|
onClick: y
|
|
259
275
|
}, [
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
])) :
|
|
276
|
+
Q(q(n.sendCodeBySmsText) + " ", 1),
|
|
277
|
+
S(r(oe), { style: { "margin-left": "5px" } })
|
|
278
|
+
])) : $("", !0)
|
|
263
279
|
]),
|
|
264
280
|
_: 1
|
|
265
281
|
}, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
266
|
-
])) :
|
|
282
|
+
])) : $("", !0)
|
|
267
283
|
]));
|
|
268
284
|
}
|
|
269
|
-
}),
|
|
285
|
+
}), mt = { class: "dialogDefaultContainerInsideContent" }, ft = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, gt = { class: "dialogDefaultContainerTextHint" }, yt = { class: "chip" }, Ct = {
|
|
270
286
|
key: 0,
|
|
271
287
|
class: "input-wrapper"
|
|
272
|
-
},
|
|
288
|
+
}, wt = {
|
|
273
289
|
key: 1,
|
|
274
290
|
class: "input-wrapper"
|
|
275
|
-
},
|
|
291
|
+
}, Pt = {
|
|
276
292
|
key: 2,
|
|
277
293
|
class: "input-wrapper"
|
|
278
|
-
},
|
|
294
|
+
}, Tt = { key: 3 }, St = /* @__PURE__ */ re({
|
|
279
295
|
__name: "AddNewPhoneContent",
|
|
280
296
|
props: {
|
|
281
297
|
phone: {},
|
|
@@ -292,27 +308,27 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
292
308
|
isTg: { type: Boolean }
|
|
293
309
|
},
|
|
294
310
|
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"],
|
|
295
|
-
setup(N, { emit:
|
|
296
|
-
const
|
|
311
|
+
setup(N, { emit: b }) {
|
|
312
|
+
const k = N, u = b, c = O(!1), g = O(""), f = ue({
|
|
297
313
|
touched: { phone: !1, code: !1 },
|
|
298
314
|
phoneModel: "",
|
|
299
315
|
codeModel: ""
|
|
300
316
|
});
|
|
301
|
-
|
|
317
|
+
X(
|
|
302
318
|
() => f.phoneModel,
|
|
303
319
|
(n) => {
|
|
304
320
|
u("update:phone", n), g.value = "";
|
|
305
321
|
}
|
|
306
|
-
),
|
|
322
|
+
), X(
|
|
307
323
|
() => f.codeModel,
|
|
308
324
|
(n) => u("update:code", n)
|
|
309
325
|
);
|
|
310
|
-
const B = (n) => f.touched[n] = !0,
|
|
326
|
+
const B = (n) => f.touched[n] = !0, W = A(() => {
|
|
311
327
|
const o = f.phoneModel.trim().replace(/[()\-\s]/g, "");
|
|
312
328
|
return /^\+?\d{10,15}$/.test(o);
|
|
313
|
-
}),
|
|
314
|
-
var
|
|
315
|
-
if (B("phone"), !
|
|
329
|
+
}), H = async () => {
|
|
330
|
+
var K;
|
|
331
|
+
if (B("phone"), !W.value) {
|
|
316
332
|
g.value = "Это не похоже на номер телефона";
|
|
317
333
|
return;
|
|
318
334
|
}
|
|
@@ -323,11 +339,11 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
323
339
|
g.value = "Это не похоже на номер телефона";
|
|
324
340
|
return;
|
|
325
341
|
}
|
|
326
|
-
if (!(((
|
|
342
|
+
if (!(((K = n == null ? void 0 : n[0]) == null ? void 0 : K.available) ?? !1)) {
|
|
327
343
|
g.value = "Такой номер уже используется";
|
|
328
344
|
return;
|
|
329
345
|
}
|
|
330
|
-
g.value = "", u("on-send-code", { phone: f.phoneModel, prevPhone:
|
|
346
|
+
g.value = "", u("on-send-code", { phone: f.phoneModel, prevPhone: k.oldPhone, offLoading: !0 }), c.value = !0;
|
|
331
347
|
};
|
|
332
348
|
let e = "";
|
|
333
349
|
const M = (n) => {
|
|
@@ -339,20 +355,20 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
339
355
|
u("on-send-code-again", { phone: f.phoneModel });
|
|
340
356
|
}, y = () => {
|
|
341
357
|
console.debug("onSendCodeViaSms"), u("on-send-only-sms", { phone: f.phoneModel });
|
|
342
|
-
}, { phoneModel: x, codeModel: i, touched:
|
|
343
|
-
return (n, o) => (
|
|
344
|
-
z("div",
|
|
345
|
-
z("div",
|
|
346
|
-
z("div",
|
|
347
|
-
n.isTg ? (
|
|
358
|
+
}, { phoneModel: x, codeModel: i, touched: h } = me(f), v = A(() => g.value ? g.value : h.value.phone && !x.value.trim() ? "Это не похоже на номер телефона" : k.phoneError || ""), G = A(() => k.isNotMatchCode ? "Неверный код" : f.touched.code ? i.value.trim() ? k.codeError ?? null : "Введите код" : "");
|
|
359
|
+
return (n, o) => (p(), T("div", mt, [
|
|
360
|
+
z("div", ft, [
|
|
361
|
+
z("div", gt, q(c.value ? "Чтобы продолжить, введите код подтверждения из" : n.hintText), 1),
|
|
362
|
+
z("div", yt, [
|
|
363
|
+
n.isTg ? (p(), j(r(ge), { key: 0 })) : (p(), j(r(oe), {
|
|
348
364
|
key: 1,
|
|
349
365
|
style: { "margin-left": "5px" }
|
|
350
366
|
})),
|
|
351
|
-
|
|
367
|
+
Q(" " + q(n.isTg ? "Telegram" : "СМС"), 1)
|
|
352
368
|
])
|
|
353
369
|
]),
|
|
354
|
-
n.showPhone ? (
|
|
355
|
-
|
|
370
|
+
n.showPhone ? (p(), T("div", Ct, [
|
|
371
|
+
S(r(te), {
|
|
356
372
|
modelValue: r(x),
|
|
357
373
|
"onUpdate:modelValue": o[0] || (o[0] = (s) => ee(x) ? x.value = s : null),
|
|
358
374
|
size: "large",
|
|
@@ -363,75 +379,75 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
363
379
|
onBlur: o[1] || (o[1] = (s) => B("phone")),
|
|
364
380
|
onInput: o[2] || (o[2] = (s) => B("phone"))
|
|
365
381
|
}, null, 8, ["modelValue", "error"]),
|
|
366
|
-
|
|
382
|
+
S(r(Le), {
|
|
367
383
|
class: "icon-locked",
|
|
368
384
|
onClick: o[3] || (o[3] = (s) => n.$emit("edit", "phone"))
|
|
369
385
|
})
|
|
370
|
-
])) :
|
|
371
|
-
c.value ?
|
|
372
|
-
|
|
386
|
+
])) : $("", !0),
|
|
387
|
+
c.value ? $("", !0) : (p(), T("div", wt, [
|
|
388
|
+
S(r(De), {
|
|
373
389
|
style: { width: "100%" },
|
|
374
|
-
disabled: !
|
|
375
|
-
onClick:
|
|
390
|
+
disabled: !W.value,
|
|
391
|
+
onClick: H
|
|
376
392
|
}, {
|
|
377
|
-
default:
|
|
378
|
-
|
|
393
|
+
default: J(() => o[6] || (o[6] = [
|
|
394
|
+
Q(" Отправить код ")
|
|
379
395
|
])),
|
|
380
396
|
_: 1,
|
|
381
397
|
__: [6]
|
|
382
398
|
}, 8, ["disabled"])
|
|
383
399
|
])),
|
|
384
|
-
c.value ? (
|
|
385
|
-
|
|
400
|
+
c.value ? (p(), T("div", Pt, [
|
|
401
|
+
S(r(te), {
|
|
386
402
|
modelValue: r(i),
|
|
387
403
|
"onUpdate:modelValue": o[4] || (o[4] = (s) => ee(i) ? i.value = s : null),
|
|
388
404
|
size: "large",
|
|
389
405
|
"text-size": "medium",
|
|
390
406
|
label: "Код",
|
|
391
407
|
type: "text",
|
|
392
|
-
error:
|
|
408
|
+
error: G.value,
|
|
393
409
|
onInput: M,
|
|
394
410
|
onBlur: o[5] || (o[5] = (s) => B("code"))
|
|
395
411
|
}, null, 8, ["modelValue", "error"])
|
|
396
|
-
])) :
|
|
397
|
-
c.value ? (
|
|
398
|
-
|
|
412
|
+
])) : $("", !0),
|
|
413
|
+
c.value ? (p(), T("div", Tt, [
|
|
414
|
+
S(fe, {
|
|
399
415
|
loading: n.loading,
|
|
400
416
|
"rate-limit-text": n.rateLimitText,
|
|
401
417
|
"is-final-limit": n.isFinalLimit,
|
|
402
418
|
"on-send-again": C
|
|
403
419
|
}, {
|
|
404
|
-
extra:
|
|
405
|
-
n.isTg ? (
|
|
420
|
+
extra: J(() => [
|
|
421
|
+
n.isTg ? (p(), T("span", {
|
|
406
422
|
key: 0,
|
|
407
423
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
408
424
|
onClick: y
|
|
409
425
|
}, [
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
])) :
|
|
426
|
+
Q(q(n.sendCodeBySmsText) + " ", 1),
|
|
427
|
+
S(r(oe), { style: { "margin-left": "5px" } })
|
|
428
|
+
])) : $("", !0)
|
|
413
429
|
]),
|
|
414
430
|
_: 1
|
|
415
431
|
}, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
416
|
-
])) :
|
|
432
|
+
])) : $("", !0)
|
|
417
433
|
]));
|
|
418
434
|
}
|
|
419
435
|
}), de = (N) => {
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
422
|
-
if (
|
|
423
|
-
return `+7${
|
|
424
|
-
if (
|
|
425
|
-
return `+${
|
|
436
|
+
const b = N.replace(/\D/g, "");
|
|
437
|
+
if (b.length >= 10 && b.length <= 15) {
|
|
438
|
+
if (b.startsWith("8"))
|
|
439
|
+
return `+7${b.slice(1)}`;
|
|
440
|
+
if (b.startsWith("7"))
|
|
441
|
+
return `+${b}`;
|
|
426
442
|
}
|
|
427
|
-
return N.trim().startsWith("+") ? N.trim() : `+${
|
|
428
|
-
},
|
|
443
|
+
return N.trim().startsWith("+") ? N.trim() : `+${b}`;
|
|
444
|
+
}, Mt = { class: "text-center w-full" }, xt = { class: "dialogTitle" }, bt = {
|
|
429
445
|
key: 0,
|
|
430
446
|
class: "dialogDefaultContainer"
|
|
431
|
-
},
|
|
447
|
+
}, Vt = { key: 3 }, kt = {
|
|
432
448
|
key: 1,
|
|
433
449
|
class: "dialogDefaultContainer"
|
|
434
|
-
}, ae = 3,
|
|
450
|
+
}, ae = 3, Ot = /* @__PURE__ */ re({
|
|
435
451
|
__name: "ProfilePhoneDialog",
|
|
436
452
|
props: {
|
|
437
453
|
modelValue: { type: Boolean },
|
|
@@ -443,32 +459,32 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
443
459
|
mode: { default: void 0 }
|
|
444
460
|
},
|
|
445
461
|
emits: ["update:modelValue", "submit-phone", "edit", "close", "clean-input-errors", "on-update-jwt", "update-phone-field", "on-toast"],
|
|
446
|
-
setup(N, { expose:
|
|
447
|
-
const u = N, c =
|
|
448
|
-
|
|
462
|
+
setup(N, { expose: b, emit: k }) {
|
|
463
|
+
const u = N, c = k, g = O(u.modelValue);
|
|
464
|
+
X(
|
|
449
465
|
() => u.modelValue,
|
|
450
466
|
(l) => g.value = l
|
|
451
|
-
),
|
|
452
|
-
const f = A(() => u.language ?? "ru"), B = (l) => Be[f.value] && Be[f.value][l] || (u.title ?? l),
|
|
467
|
+
), X(g, (l) => c("update:modelValue", l));
|
|
468
|
+
const f = A(() => u.language ?? "ru"), B = (l) => Be[f.value] && Be[f.value][l] || (u.title ?? l), W = A(() => u.title ?? B("Смена номера телефона")), H = A(() => u.hintText ?? B("Чтобы продолжить, введите новый номер")), e = ue({
|
|
453
469
|
oldPhone: u.initialPhone ?? "",
|
|
454
470
|
newPhone: "",
|
|
455
471
|
code: "",
|
|
456
472
|
addPhone: "",
|
|
457
473
|
addCode: ""
|
|
458
|
-
}), M = O(U.OLD), C = O(null), y = O(!1), x = O(!1), i = O("tg"),
|
|
474
|
+
}), M = O(U.OLD), C = O(null), y = O(!1), x = O(!1), i = O("tg"), h = A(() => i.value === "tg"), v = O(!1), { startTimer: G, remainingSeconds: n, isAvailableForSendAgain: o, totalRateAttempts: s, currentRateAttempt: _ } = We(), { showRateLimitToast: K } = He(c), { isEditFlow: ce, getFlow: Ae } = je(O(u.mode)), le = A(() => o.value ? "Повторить" : `${n.value}`), ne = O(ae), se = A(() => ne.value === 0), Ne = (l) => new Promise((a) => setTimeout(a, l));
|
|
459
475
|
async function pe(l = "email") {
|
|
460
476
|
var t;
|
|
461
477
|
return (t = (await Ie("/users/profile/session/get-edit-session", { params: { field: l } })).data) == null ? void 0 : t.data;
|
|
462
478
|
}
|
|
463
479
|
async function ye(l = "phone") {
|
|
464
480
|
var V;
|
|
465
|
-
const t = (V = (await
|
|
481
|
+
const t = (V = (await Z("/users/profile/session/create-if-not-exists", {
|
|
466
482
|
field: l,
|
|
467
483
|
oldValue: u.initialPhone
|
|
468
484
|
})).data) == null ? void 0 : V.data;
|
|
469
485
|
C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? U.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "";
|
|
470
486
|
}
|
|
471
|
-
async function
|
|
487
|
+
async function ze() {
|
|
472
488
|
try {
|
|
473
489
|
const l = await pe("phone");
|
|
474
490
|
C.value = l.sessionId, M.value = l.step, e.oldPhone = l.oldValue ?? "", l.sessionId || await ye("phone");
|
|
@@ -479,7 +495,7 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
479
495
|
async function Ce(l, a = !1) {
|
|
480
496
|
var t;
|
|
481
497
|
try {
|
|
482
|
-
const V = await
|
|
498
|
+
const V = await Z(
|
|
483
499
|
"/users/profile/check-throttler",
|
|
484
500
|
{
|
|
485
501
|
method: "sms",
|
|
@@ -494,16 +510,16 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
494
510
|
);
|
|
495
511
|
await Ne(1e3);
|
|
496
512
|
const w = (t = V.data) == null ? void 0 : t.data;
|
|
497
|
-
return w ? (w.restTimeSec > 0 ? (
|
|
513
|
+
return w ? (w.restTimeSec > 0 ? (G(w.restTimeSec), o.value = !1, s.value = w.attempts.total, _.value = w.attempts.total - w.attempts.available, ne.value = w.attempts.available ?? ae) : o.value = !0, w) : null;
|
|
498
514
|
} catch {
|
|
499
515
|
return null;
|
|
500
516
|
}
|
|
501
517
|
}
|
|
502
|
-
const he = async ({ phone: l }) => (v.value = !0, await
|
|
503
|
-
var V, w, L, D, F,
|
|
518
|
+
const he = async ({ phone: l }) => (v.value = !0, await Y({ value: l, isOnlySms: !0 })), Y = async ({ value: l, isOnlySms: a, offLoading: t } = {}) => {
|
|
519
|
+
var V, w, L, D, F, E;
|
|
504
520
|
y.value = !0;
|
|
505
521
|
try {
|
|
506
|
-
const m = l ?? e.oldPhone, d = await
|
|
522
|
+
const m = l ?? e.oldPhone, d = await Z(
|
|
507
523
|
"/users/profile/phone/contact/send-code",
|
|
508
524
|
{
|
|
509
525
|
sessionId: C.value,
|
|
@@ -526,32 +542,32 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
526
542
|
const I = (F = (D = d.data) == null ? void 0 : D.tooManyRequests) == null ? void 0 : F.type;
|
|
527
543
|
i.value = I;
|
|
528
544
|
const R = d.data.tooManyRequests;
|
|
529
|
-
return R.restTimeSec > 0 ? (
|
|
545
|
+
return R.restTimeSec > 0 ? (G(R.restTimeSec), s.value = R.attempts.total, _.value = R.attempts.total - R.attempts.available, ne.value = R.attempts.available ?? ae) : o.value = !0, d;
|
|
530
546
|
}
|
|
531
547
|
return console.debug("sendContactCode after обработка 403 tooManyRequests", d), await Ce(m), d;
|
|
532
548
|
} catch (m) {
|
|
533
|
-
const d = (
|
|
549
|
+
const d = (E = m == null ? void 0 : m.data) == null ? void 0 : E.tooManyRequests;
|
|
534
550
|
if ((m == null ? void 0 : m.status) === 403 && d) {
|
|
535
551
|
const { restTimeSec: P, attempts: I } = d;
|
|
536
|
-
return P > 0 ? (
|
|
552
|
+
return P > 0 ? (G(P), s.value = I.total, _.value = I.total - I.available, ne.value = I.available ?? ae) : o.value = !0, m;
|
|
537
553
|
}
|
|
538
554
|
throw m;
|
|
539
555
|
} finally {
|
|
540
556
|
y.value = !1, t && (y.value = !1);
|
|
541
557
|
}
|
|
542
558
|
}, we = async (l, a) => {
|
|
543
|
-
var t, V, w, L, D, F,
|
|
559
|
+
var t, V, w, L, D, F, E, m;
|
|
544
560
|
y.value = !0;
|
|
545
561
|
try {
|
|
546
562
|
const d = await pe("phone");
|
|
547
563
|
C.value = d.sessionId, M.value = d.step, e.oldPhone = d.oldValue ?? e.oldPhone, e.newPhone = d.newValue ?? e.newPhone;
|
|
548
|
-
const P = await
|
|
564
|
+
const P = await Z("/users/profile/change/phone/match-code", {
|
|
549
565
|
phone: a === U.NEW ? e.newPhone : e.oldPhone,
|
|
550
566
|
sessionId: C.value,
|
|
551
567
|
code: l,
|
|
552
568
|
step: a
|
|
553
|
-
}), I = ((t = P.data) == null ? void 0 : t.nextStep) ?? ((w = (V = P.data) == null ? void 0 : V.data) == null ? void 0 : w.nextStep), R = ((D = (L = P.data) == null ? void 0 : L.data) == null ? void 0 : D.rateLimit) ?? ((F = P.data) == null ? void 0 : F.rateLimit) ?? null,
|
|
554
|
-
if (
|
|
569
|
+
}), I = ((t = P.data) == null ? void 0 : t.nextStep) ?? ((w = (V = P.data) == null ? void 0 : V.data) == null ? void 0 : w.nextStep), R = ((D = (L = P.data) == null ? void 0 : L.data) == null ? void 0 : D.rateLimit) ?? ((F = P.data) == null ? void 0 : F.rateLimit) ?? null, Re = ((E = P.data) == null ? void 0 : E.data.success) ?? ((m = P.data) == null ? void 0 : m.success);
|
|
570
|
+
if (K(R), !Re) {
|
|
555
571
|
x.value = !0;
|
|
556
572
|
return;
|
|
557
573
|
}
|
|
@@ -577,7 +593,7 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
577
593
|
var t;
|
|
578
594
|
return (t = (await Ie("/users/profile/session/get-bind-session", { params: { field: l } })).data) == null ? void 0 : t.data;
|
|
579
595
|
}
|
|
580
|
-
async function
|
|
596
|
+
async function be({
|
|
581
597
|
value: l,
|
|
582
598
|
field: a = "phone",
|
|
583
599
|
offLoading: t = !0
|
|
@@ -586,7 +602,7 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
586
602
|
y.value = !0;
|
|
587
603
|
try {
|
|
588
604
|
if (!C.value) {
|
|
589
|
-
const D = await
|
|
605
|
+
const D = await Z("/users/profile/session/bind/create", {
|
|
590
606
|
field: a,
|
|
591
607
|
newValue: l ?? e.addPhone
|
|
592
608
|
});
|
|
@@ -597,12 +613,12 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
597
613
|
t && (y.value = !1);
|
|
598
614
|
}
|
|
599
615
|
}
|
|
600
|
-
async function
|
|
616
|
+
async function Fe() {
|
|
601
617
|
try {
|
|
602
618
|
const l = await xe("phone");
|
|
603
|
-
C.value = l.sessionId, M.value = l.step, e.addPhone = l.newValue ?? "", l.sessionId || await
|
|
619
|
+
C.value = l.sessionId, M.value = l.step, e.addPhone = l.newValue ?? "", l.sessionId || await be({ field: "phone", value: e.addPhone });
|
|
604
620
|
} catch {
|
|
605
|
-
await
|
|
621
|
+
await be({ field: "phone", value: e.addPhone });
|
|
606
622
|
}
|
|
607
623
|
}
|
|
608
624
|
const ve = async ({
|
|
@@ -616,7 +632,7 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
616
632
|
try {
|
|
617
633
|
if (!C.value)
|
|
618
634
|
throw new Error("bind-сессия не найдена. создайте её через createBindSession.");
|
|
619
|
-
const F = l ?? e.addPhone,
|
|
635
|
+
const F = l ?? e.addPhone, E = await Z(
|
|
620
636
|
`/users/profile/bind/contact/send-code/${a}`,
|
|
621
637
|
{
|
|
622
638
|
sessionId: C.value,
|
|
@@ -629,32 +645,32 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
629
645
|
"x-only-sms": t ?? !1
|
|
630
646
|
}
|
|
631
647
|
}
|
|
632
|
-
), m = (L = (w =
|
|
648
|
+
), m = (L = (w = E == null ? void 0 : E.data) == null ? void 0 : w.data) == null ? void 0 : L.deliveryType;
|
|
633
649
|
(m === "tg" || m === "sms") && (i.value = m, m === "tg" && (v.value = !1));
|
|
634
|
-
const d = (D =
|
|
635
|
-
if (
|
|
650
|
+
const d = (D = E.data) == null ? void 0 : D.tooManyRequests;
|
|
651
|
+
if (E.status === 403 && d) {
|
|
636
652
|
const I = d == null ? void 0 : d.type;
|
|
637
|
-
return i.value = I, d.restTimeSec > 0 ? (
|
|
653
|
+
return i.value = I, d.restTimeSec > 0 ? (G(d.restTimeSec), s.value = d.attempts.total, _.value = d.attempts.total - d.attempts.available, ne.value = d.attempts.available ?? ae) : o.value = !0, E;
|
|
638
654
|
}
|
|
639
655
|
const P = await Ce(F);
|
|
640
|
-
return P && P.restTimeSec > 0 ? (
|
|
656
|
+
return P && P.restTimeSec > 0 ? (G(P.restTimeSec), o.value = !1) : o.value = !0, E;
|
|
641
657
|
} finally {
|
|
642
658
|
V && (y.value = !1);
|
|
643
659
|
}
|
|
644
|
-
},
|
|
645
|
-
var a, t, V, w, L, D, F,
|
|
660
|
+
}, Ve = async ({ code: l }) => {
|
|
661
|
+
var a, t, V, w, L, D, F, E;
|
|
646
662
|
y.value = !0;
|
|
647
663
|
try {
|
|
648
664
|
if (!C.value) {
|
|
649
665
|
const R = await xe("phone");
|
|
650
666
|
C.value = R.sessionId, e.addPhone = R.newValue ?? e.addPhone;
|
|
651
667
|
}
|
|
652
|
-
const m = await
|
|
668
|
+
const m = await Z("/users/profile/bind/phone/match-code", {
|
|
653
669
|
phone: e.addPhone,
|
|
654
670
|
sessionId: C.value,
|
|
655
671
|
code: l
|
|
656
|
-
}), d = ((a = m.data) == null ? void 0 : a.nextStep) ?? ((V = (t = m.data) == null ? void 0 : t.data) == null ? void 0 : V.nextStep), P = ((L = (w = m.data) == null ? void 0 : w.data) == null ? void 0 : L.rateLimit) ?? ((D = m.data) == null ? void 0 : D.rateLimit) ?? null, I = ((F = m.data) == null ? void 0 : F.data.success) ?? ((
|
|
657
|
-
if (
|
|
672
|
+
}), d = ((a = m.data) == null ? void 0 : a.nextStep) ?? ((V = (t = m.data) == null ? void 0 : t.data) == null ? void 0 : V.nextStep), P = ((L = (w = m.data) == null ? void 0 : w.data) == null ? void 0 : L.rateLimit) ?? ((D = m.data) == null ? void 0 : D.rateLimit) ?? null, I = ((F = m.data) == null ? void 0 : F.data.success) ?? ((E = m.data) == null ? void 0 : E.success);
|
|
673
|
+
if (K(P), !I) {
|
|
658
674
|
x.value = !0;
|
|
659
675
|
return;
|
|
660
676
|
}
|
|
@@ -664,34 +680,34 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
664
680
|
}
|
|
665
681
|
}, ke = async () => {
|
|
666
682
|
};
|
|
667
|
-
return
|
|
683
|
+
return Ue(async () => {
|
|
668
684
|
y.value = !0;
|
|
669
685
|
const l = await Ae("phone");
|
|
670
686
|
if (u.mode === "bind" && l === "bind") {
|
|
671
|
-
await
|
|
687
|
+
await Fe(), y.value = !1;
|
|
672
688
|
return;
|
|
673
689
|
}
|
|
674
|
-
await
|
|
675
|
-
}),
|
|
690
|
+
await ze(), await Y({});
|
|
691
|
+
}), b({
|
|
676
692
|
localVisible: g,
|
|
677
693
|
form: e,
|
|
678
694
|
currentStep: M,
|
|
679
695
|
loading: y,
|
|
680
696
|
rateLimitText: le,
|
|
681
697
|
isAvailable: se,
|
|
682
|
-
title:
|
|
683
|
-
hintText:
|
|
698
|
+
title: W,
|
|
699
|
+
hintText: H,
|
|
684
700
|
handleClose: ie,
|
|
685
|
-
sendContactCode:
|
|
701
|
+
sendContactCode: Y,
|
|
686
702
|
sendBindContactCode: ve,
|
|
687
703
|
handleOldCodeSuccess: Pe,
|
|
688
704
|
handleOldCodeError: Te,
|
|
689
705
|
handleNewCodeSuccess: Se,
|
|
690
706
|
handleNewCodeError: Me,
|
|
691
|
-
matchBindCode:
|
|
707
|
+
matchBindCode: Ve,
|
|
692
708
|
matchBindCodeError: ke
|
|
693
|
-
}), (l, a) => (
|
|
694
|
-
|
|
709
|
+
}), (l, a) => (p(), T(qe, null, [
|
|
710
|
+
S(r(Je), {
|
|
695
711
|
modelValue: g.value,
|
|
696
712
|
"onUpdate:modelValue": [
|
|
697
713
|
a[15] || (a[15] = (t) => g.value = t),
|
|
@@ -702,19 +718,19 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
702
718
|
"close-on-click-outside": !0,
|
|
703
719
|
"onClick:outside": ie
|
|
704
720
|
}, {
|
|
705
|
-
header:
|
|
706
|
-
z("div",
|
|
707
|
-
|
|
721
|
+
header: J(() => [
|
|
722
|
+
z("div", Mt, [
|
|
723
|
+
S(r(Ke), {
|
|
708
724
|
"slot-left": !1,
|
|
709
725
|
size: "small",
|
|
710
726
|
borded: !0,
|
|
711
727
|
"no-padding": !1
|
|
712
728
|
}, {
|
|
713
|
-
title:
|
|
714
|
-
z("span",
|
|
729
|
+
title: J(() => [
|
|
730
|
+
z("span", xt, q(r(ce) ? W.value : "Добавление номера телефона"), 1)
|
|
715
731
|
]),
|
|
716
|
-
"right-button":
|
|
717
|
-
|
|
732
|
+
"right-button": J(() => [
|
|
733
|
+
S(r(Qe), {
|
|
718
734
|
class: "cross",
|
|
719
735
|
onClick: ie
|
|
720
736
|
})
|
|
@@ -723,10 +739,10 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
723
739
|
})
|
|
724
740
|
])
|
|
725
741
|
]),
|
|
726
|
-
default:
|
|
727
|
-
r(ce) ? (
|
|
728
|
-
y.value ? (
|
|
729
|
-
M.value === r(U).OLD ? (
|
|
742
|
+
default: J(() => [
|
|
743
|
+
r(ce) ? (p(), T("div", bt, [
|
|
744
|
+
y.value ? (p(), j(Ee, { key: 0 })) : $("", !0),
|
|
745
|
+
M.value === r(U).OLD ? (p(), j(lt, {
|
|
730
746
|
key: 1,
|
|
731
747
|
phone: e.oldPhone,
|
|
732
748
|
"onUpdate:phone": a[0] || (a[0] = (t) => e.oldPhone = t),
|
|
@@ -736,13 +752,13 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
736
752
|
"is-final-limit": se.value,
|
|
737
753
|
"is-not-match-code": x.value,
|
|
738
754
|
loading: y.value,
|
|
739
|
-
"is-tg":
|
|
740
|
-
onOnSendCode: a[2] || (a[2] = (t) =>
|
|
741
|
-
onOnSendCodeAgain: a[3] || (a[3] = (t) =>
|
|
755
|
+
"is-tg": h.value,
|
|
756
|
+
onOnSendCode: a[2] || (a[2] = (t) => Y({ value: e.oldPhone })),
|
|
757
|
+
onOnSendCodeAgain: a[3] || (a[3] = (t) => Y({ value: e.oldPhone, isOnlySms: !h.value && v.value })),
|
|
742
758
|
onOnSendOnlySms: he,
|
|
743
759
|
onOnMatchCode: Pe,
|
|
744
760
|
onOnMatchCodeError: Te
|
|
745
|
-
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(U).NEW ? (
|
|
761
|
+
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(U).NEW ? (p(), j(vt, {
|
|
746
762
|
key: 2,
|
|
747
763
|
phone: e.newPhone,
|
|
748
764
|
"onUpdate:phone": a[4] || (a[4] = (t) => e.newPhone = t),
|
|
@@ -750,50 +766,50 @@ const oe = "data:image/svg+xml,%3csvg%20width='12'%20height='16'%20viewBox='0%20
|
|
|
750
766
|
"onUpdate:oldPhone": a[5] || (a[5] = (t) => e.oldPhone = t),
|
|
751
767
|
code: e.code,
|
|
752
768
|
"onUpdate:code": a[6] || (a[6] = (t) => e.code = t),
|
|
753
|
-
"hint-text":
|
|
769
|
+
"hint-text": H.value,
|
|
754
770
|
"rate-limit-text": le.value,
|
|
755
771
|
"is-final-limit": se.value,
|
|
756
772
|
"is-not-match-code": x.value,
|
|
757
773
|
loading: y.value,
|
|
758
|
-
"is-tg":
|
|
759
|
-
onOnSendCode: a[7] || (a[7] = (t) =>
|
|
760
|
-
onOnSendCodeAgain: a[8] || (a[8] = (t) =>
|
|
774
|
+
"is-tg": h.value,
|
|
775
|
+
onOnSendCode: a[7] || (a[7] = (t) => Y({ value: e.newPhone })),
|
|
776
|
+
onOnSendCodeAgain: a[8] || (a[8] = (t) => Y({ value: e.newPhone, isOnlySms: !h.value && v.value })),
|
|
761
777
|
onOnSendOnlySms: he,
|
|
762
778
|
onOnMatchCode: Se,
|
|
763
779
|
onOnMatchCodeError: Me,
|
|
764
780
|
onOnClearCodeError: a[9] || (a[9] = (t) => x.value = !1)
|
|
765
|
-
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(U).COMPLETED ? (
|
|
781
|
+
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(U).COMPLETED ? (p(), T("div", Vt, [
|
|
766
782
|
z("p", null, q(B("Телефон успешно изменен")), 1)
|
|
767
|
-
])) :
|
|
768
|
-
])) : (
|
|
769
|
-
y.value ? (
|
|
770
|
-
|
|
783
|
+
])) : $("", !0)
|
|
784
|
+
])) : (p(), T("div", kt, [
|
|
785
|
+
y.value ? (p(), j(Ee, { key: 0 })) : $("", !0),
|
|
786
|
+
S(St, {
|
|
771
787
|
phone: e.addPhone,
|
|
772
788
|
"onUpdate:phone": a[10] || (a[10] = (t) => e.addPhone = t),
|
|
773
789
|
oldPhone: e.oldPhone,
|
|
774
790
|
"onUpdate:oldPhone": a[11] || (a[11] = (t) => e.oldPhone = t),
|
|
775
791
|
code: e.addCode,
|
|
776
792
|
"onUpdate:code": a[12] || (a[12] = (t) => e.addCode = t),
|
|
777
|
-
"hint-text": r(ce) ?
|
|
793
|
+
"hint-text": r(ce) ? H.value : "Чтобы продолжить, введите новый номер",
|
|
778
794
|
"rate-limit-text": le.value,
|
|
779
795
|
"is-final-limit": se.value,
|
|
780
796
|
"is-not-match-code": x.value,
|
|
781
797
|
loading: y.value,
|
|
782
|
-
"is-tg":
|
|
798
|
+
"is-tg": h.value,
|
|
783
799
|
onOnSendCode: a[13] || (a[13] = (t) => ve({ value: e.addPhone, field: "phone" })),
|
|
784
|
-
onOnSendCodeAgain: a[14] || (a[14] = (t) => ve({ value: e.addPhone, field: "phone", isOnlySms: !
|
|
800
|
+
onOnSendCodeAgain: a[14] || (a[14] = (t) => ve({ value: e.addPhone, field: "phone", isOnlySms: !h.value && v.value })),
|
|
785
801
|
onOnSendOnlySms: he,
|
|
786
|
-
onOnMatchCode:
|
|
802
|
+
onOnMatchCode: Ve,
|
|
787
803
|
onOnMatchCodeError: ke
|
|
788
804
|
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])
|
|
789
805
|
]))
|
|
790
806
|
]),
|
|
791
807
|
_: 1
|
|
792
808
|
}, 8, ["modelValue"]),
|
|
793
|
-
|
|
809
|
+
S(r(Xe))
|
|
794
810
|
], 64));
|
|
795
811
|
}
|
|
796
812
|
});
|
|
797
813
|
export {
|
|
798
|
-
|
|
814
|
+
Ot as default
|
|
799
815
|
};
|
|
@@ -212,13 +212,13 @@ const Ke = {
|
|
|
212
212
|
},
|
|
213
213
|
emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
|
|
214
214
|
setup(d, { emit: r }) {
|
|
215
|
-
const n = r, u = v(!0), { currentDialog: w, dialogPayload:
|
|
216
|
-
email: L(() => import("./ProfileEmailDialog-
|
|
217
|
-
phone: L(() => import("./ProfilePhoneDialog-
|
|
218
|
-
password: L(() => import("./ProfilePasswordDialog-
|
|
215
|
+
const n = r, u = v(!0), { currentDialog: w, dialogPayload: c, closeDialog: B } = W(), l = {
|
|
216
|
+
email: L(() => import("./ProfileEmailDialog-DZfdsLfO.js")),
|
|
217
|
+
phone: L(() => import("./ProfilePhoneDialog-CarYpXMn.js")),
|
|
218
|
+
password: L(() => import("./ProfilePasswordDialog-DLXWVm3l.js"))
|
|
219
219
|
}, m = ({ email: y }) => {
|
|
220
220
|
n("update-email-field", y);
|
|
221
|
-
},
|
|
221
|
+
}, p = ({ phone: y }) => {
|
|
222
222
|
n("update-phone-field", y);
|
|
223
223
|
};
|
|
224
224
|
return se(w, (y) => {
|
|
@@ -229,12 +229,12 @@ const Ke = {
|
|
|
229
229
|
"onUpdate:modelValue": s[0] || (s[0] = (f) => u.value = f),
|
|
230
230
|
language: y.language,
|
|
231
231
|
provider: y.provider
|
|
232
|
-
}, i(
|
|
232
|
+
}, i(c), {
|
|
233
233
|
onClose: i(B),
|
|
234
234
|
onCleanInputErrors: s[1] || (s[1] = (f) => n("clean-input-errors")),
|
|
235
235
|
onOnUpdateJwt: s[2] || (s[2] = (f, N, o) => n("on-update-jwt", f, N, o)),
|
|
236
236
|
onSubmitEmail: m,
|
|
237
|
-
onSubmitPhone:
|
|
237
|
+
onSubmitPhone: p,
|
|
238
238
|
onOnPasswordError: s[3] || (s[3] = (f, N) => n("on-password-error", f, N)),
|
|
239
239
|
onOnToast: s[4] || (s[4] = (f) => n("on-toast", f))
|
|
240
240
|
}), null, 16, ["modelValue", "language", "provider", "onClose"])) : E("", !0);
|
|
@@ -267,7 +267,7 @@ const Ke = {
|
|
|
267
267
|
},
|
|
268
268
|
emits: ["open-email-dialog", "open-phone-dialog", "open-password-dialog", "on-update-jwt", "on-password-error", "update-tokens"],
|
|
269
269
|
setup(d, { emit: r }) {
|
|
270
|
-
const n = d, u = r, w = b(() => n.language ?? "ru"),
|
|
270
|
+
const n = d, u = r, w = b(() => n.language ?? "ru"), c = (e) => Ke[w.value][e] || e, { openDialog: B } = W(), l = R({ firstName: "", lastName: "" }), m = v({ firstName: "", lastName: "" }), p = R({ firstName: !1, lastName: !1, email: !1, phone: !1 }), y = v(""), s = v(""), f = v(""), N = v(!1), o = R({
|
|
271
271
|
value: null,
|
|
272
272
|
loading: !1,
|
|
273
273
|
accept: ["image/png", "image/jpeg"],
|
|
@@ -275,11 +275,11 @@ const Ke = {
|
|
|
275
275
|
// 10mb вроде
|
|
276
276
|
imageBinary: null,
|
|
277
277
|
imageContent: ""
|
|
278
|
-
}), K = v(!1), V = v(!1), x = v(!1), Z = v(!0), H = v(!0), Q = v(void 0), X = v(""), de = b(() => ae(l.firstName,
|
|
278
|
+
}), K = v(!1), V = v(!1), x = v(!1), Z = v(!0), H = v(!0), Q = v(void 0), X = v(""), de = b(() => ae(l.firstName, p.firstName)), pe = b(() => ae(l.lastName, p.lastName)), ce = b(() => p.email && !s.value.trim() ? "Введите e-mail" : ""), fe = b(() => p.phone && !f.value.trim() ? "Введите номер телефона" : ""), U = (e) => n.fields.some((a) => a.key === e), ee = (e) => e && e.trim() ? "edit" : "bind", M = () => setTimeout(() => {
|
|
279
279
|
var e;
|
|
280
280
|
return (e = document.activeElement) == null ? void 0 : e.blur();
|
|
281
281
|
}, 0), ge = b(() => !!(s.value && s.value.trim() !== ""));
|
|
282
|
-
b(() => o.imageContent ?
|
|
282
|
+
b(() => o.imageContent ? c("Загрузить другое фото") : c("Загрузить фото"));
|
|
283
283
|
const ae = (e, a) => {
|
|
284
284
|
if (!a) return "";
|
|
285
285
|
const t = e.trim();
|
|
@@ -301,7 +301,7 @@ const Ke = {
|
|
|
301
301
|
}, z = (e) => {
|
|
302
302
|
x.value = !0, Q.value = e.color ?? "", X.value = e.text ?? "";
|
|
303
303
|
}, A = (e) => {
|
|
304
|
-
if (
|
|
304
|
+
if (p[e] = !0, e === "firstName" || e === "lastName") {
|
|
305
305
|
const a = l[e];
|
|
306
306
|
a.length > 40 && (l[e] = a.slice(0, 40), console.debug(`[Input Limit] Поле '${e}' достигло 40 символов. Ввод обрезан.`));
|
|
307
307
|
}
|
|
@@ -384,7 +384,7 @@ const Ke = {
|
|
|
384
384
|
} catch (e) {
|
|
385
385
|
console.error(e), z({
|
|
386
386
|
color: "error",
|
|
387
|
-
text:
|
|
387
|
+
text: c("Не удалось сохранить изменения. Попробуйте позже")
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
390
|
}, Ie = () => {
|
|
@@ -417,15 +417,15 @@ const Ke = {
|
|
|
417
417
|
src: o.imageContent,
|
|
418
418
|
accept: o.accept,
|
|
419
419
|
loading: o.loading,
|
|
420
|
-
label:
|
|
420
|
+
label: c("Загрузить фото"),
|
|
421
421
|
"upload-limit": o.uploadLimit,
|
|
422
422
|
"onChange:error": ke
|
|
423
423
|
}, {
|
|
424
424
|
afterLoadLabel: F(() => [
|
|
425
|
-
j(D(
|
|
425
|
+
j(D(c("Загрузить фото")), 1)
|
|
426
426
|
]),
|
|
427
427
|
subtext: F(() => [
|
|
428
|
-
K.value ? (h(), P("span", Qe, D(
|
|
428
|
+
K.value ? (h(), P("span", Qe, D("Размер фото слишком большой. Загрузите JPEG, PNG до 10 MB"))) : (h(), P("span", Xe, D(`${c("Формат")} ${i(Ye)(o.accept).join(", ")} ${c("до")} ${i(Je)(o.uploadLimit)}`), 1))
|
|
429
429
|
]),
|
|
430
430
|
_: 1
|
|
431
431
|
}, 8, ["modelValue", "src", "accept", "loading", "label", "upload-limit"])) : E("", !0),
|
|
@@ -434,9 +434,9 @@ const Ke = {
|
|
|
434
434
|
modelValue: l.firstName,
|
|
435
435
|
"onUpdate:modelValue": a[2] || (a[2] = (t) => l.firstName = t),
|
|
436
436
|
size: "large",
|
|
437
|
-
label:
|
|
437
|
+
label: c("Имя"),
|
|
438
438
|
error: de.value,
|
|
439
|
-
onBlur: a[3] || (a[3] = (t) =>
|
|
439
|
+
onBlur: a[3] || (a[3] = (t) => p.firstName = !0),
|
|
440
440
|
onInput: a[4] || (a[4] = (t) => A("firstName"))
|
|
441
441
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
442
442
|
g(i(S), { class: "icon-locked" })
|
|
@@ -446,9 +446,9 @@ const Ke = {
|
|
|
446
446
|
modelValue: l.lastName,
|
|
447
447
|
"onUpdate:modelValue": a[5] || (a[5] = (t) => l.lastName = t),
|
|
448
448
|
size: "large",
|
|
449
|
-
label:
|
|
449
|
+
label: c("Фамилия"),
|
|
450
450
|
error: pe.value,
|
|
451
|
-
onBlur: a[6] || (a[6] = (t) =>
|
|
451
|
+
onBlur: a[6] || (a[6] = (t) => p.lastName = !0),
|
|
452
452
|
onInput: a[7] || (a[7] = (t) => A("lastName"))
|
|
453
453
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
454
454
|
g(i(S), { class: "icon-locked" })
|
|
@@ -464,7 +464,7 @@ const Ke = {
|
|
|
464
464
|
readonly: "",
|
|
465
465
|
style: { cursor: "pointer" },
|
|
466
466
|
error: ce.value && H.value,
|
|
467
|
-
onBlur: a[9] || (a[9] = (t) =>
|
|
467
|
+
onBlur: a[9] || (a[9] = (t) => p.email = !0),
|
|
468
468
|
onInput: a[10] || (a[10] = (t) => A("email")),
|
|
469
469
|
onClick: he
|
|
470
470
|
}, null, 8, ["modelValue", "error"]),
|
|
@@ -476,12 +476,12 @@ const Ke = {
|
|
|
476
476
|
"onUpdate:modelValue": a[11] || (a[11] = (t) => f.value = t),
|
|
477
477
|
size: "large",
|
|
478
478
|
"text-size": "medium",
|
|
479
|
-
label:
|
|
479
|
+
label: c("Номер телефона"),
|
|
480
480
|
type: "tel",
|
|
481
481
|
readonly: "",
|
|
482
482
|
style: { cursor: "pointer" },
|
|
483
483
|
error: fe.value && Z.value,
|
|
484
|
-
onBlur: a[12] || (a[12] = (t) =>
|
|
484
|
+
onBlur: a[12] || (a[12] = (t) => p.phone = !0),
|
|
485
485
|
onInput: a[13] || (a[13] = (t) => A("phone")),
|
|
486
486
|
onClick: we
|
|
487
487
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
@@ -494,7 +494,7 @@ const Ke = {
|
|
|
494
494
|
onClick: Ie
|
|
495
495
|
}, {
|
|
496
496
|
default: F(() => [
|
|
497
|
-
j(D(
|
|
497
|
+
j(D(c("Сменить пароль")), 1)
|
|
498
498
|
]),
|
|
499
499
|
_: 1
|
|
500
500
|
})) : E("", !0),
|
|
@@ -503,7 +503,7 @@ const Ke = {
|
|
|
503
503
|
onClick: De
|
|
504
504
|
}, {
|
|
505
505
|
default: F(() => [
|
|
506
|
-
j(D(
|
|
506
|
+
j(D(c("Сохранить")), 1)
|
|
507
507
|
]),
|
|
508
508
|
_: 1
|
|
509
509
|
}, 8, ["disabled"])
|
|
@@ -556,16 +556,16 @@ const Ke = {
|
|
|
556
556
|
},
|
|
557
557
|
emits: ["on-update-jwt", "update-tokens"],
|
|
558
558
|
setup(d, { emit: r }) {
|
|
559
|
-
const n = r, { openDialog: u } = W(), w = (m,
|
|
560
|
-
u("email", { initialEmail: m, mode:
|
|
561
|
-
},
|
|
562
|
-
u("phone", { initialPhone: m, mode:
|
|
559
|
+
const n = r, { openDialog: u } = W(), w = (m, p) => {
|
|
560
|
+
u("email", { initialEmail: m, mode: p });
|
|
561
|
+
}, c = (m, p) => {
|
|
562
|
+
u("phone", { initialPhone: m, mode: p });
|
|
563
563
|
}, B = () => {
|
|
564
564
|
u("password");
|
|
565
|
-
}, l = (m,
|
|
566
|
-
n("on-update-jwt", m,
|
|
565
|
+
}, l = (m, p, y) => {
|
|
566
|
+
n("on-update-jwt", m, p, y);
|
|
567
567
|
};
|
|
568
|
-
return (m,
|
|
568
|
+
return (m, p) => (h(), P(ie, null, [
|
|
569
569
|
g(i(je)),
|
|
570
570
|
g(sa, {
|
|
571
571
|
"throttler-prefix": m.throttlerPrefix,
|
|
@@ -576,7 +576,7 @@ const Ke = {
|
|
|
576
576
|
"access-token": m.accessToken,
|
|
577
577
|
"refresh-token": m.refreshToken,
|
|
578
578
|
onOpenEmailDialog: w,
|
|
579
|
-
onOpenPhoneDialog:
|
|
579
|
+
onOpenPhoneDialog: c,
|
|
580
580
|
onOpenPasswordDialog: B,
|
|
581
581
|
onOnUpdateJwt: l
|
|
582
582
|
}, null, 8, ["throttler-prefix", "provider", "request-url", "language", "fields", "access-token", "refresh-token"]),
|
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(".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 { _ as r } from "./index-
|
|
2
|
+
import { _ as r } from "./index-D0TK0qAd.js";
|
|
3
3
|
export {
|
|
4
4
|
r as PEditUserContact
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as r, defineComponent as L, createElementBlock as f, openBlock as v, normalizeClass as l, createVNode as E, unref as F, computed as T, renderSlot as m, 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 { g as R, p as h } from "./index-
|
|
3
|
+
import { g as R, p as h } from "./index-D0TK0qAd.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")}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yourgoods/ui-smart",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"vite": "^5.4.10",
|
|
40
40
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
41
41
|
"vite-plugin-dts": "^4.3.0",
|
|
42
|
+
"vite-svg-loader": "^5.1.0",
|
|
42
43
|
"vue": "3.5.17",
|
|
43
44
|
"vue-tsc": "^2.1.10"
|
|
44
45
|
},
|