@mobilon-dev/chotto 0.3.64 → 0.3.65
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/chotto.css +1 -1
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +262 -211
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +233 -221
- package/dist/types/components/2_feed_elements/types/messages.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as De, inject as R, computed as p, unref as l, toRefs as $e, ref as f, watch as ae, createElementBlock as c, openBlock as n, normalizeClass as le, createCommentVNode as C, createElementVNode as s, createVNode as j, withCtx as $, createTextVNode as _, toDisplayString as u, createBlock as T, Fragment as w, withDirectives as B, vShow as se, vModelText as Ee, Transition as oe, Teleport as Ve, renderList as Le, nextTick as Pe } from "vue";
|
|
2
2
|
import "../../../hooks/useMessageDraft.js";
|
|
3
3
|
import "../../../hooks/useSearchModel.js";
|
|
4
|
-
import { useTheme as
|
|
4
|
+
import { useTheme as Re } from "../../../hooks/useTheme.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { useMessageActions as
|
|
7
|
+
import { useMessageActions as je } from "../../../hooks/messages/useMessageActions.js";
|
|
8
8
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
9
9
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
10
10
|
import "../../../functions/parseMarkdown.js";
|
|
11
|
-
import { useSubtextTooltip as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
const
|
|
11
|
+
import { useSubtextTooltip as Be } from "../../../hooks/messages/useSubtextTooltip.js";
|
|
12
|
+
import Ue from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
|
|
13
|
+
import ne from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
14
|
+
import Oe from "./icons/IncomingCallIcon.vue.js";
|
|
15
|
+
import Ze from "./icons/OutgoingCallIcon.vue.js";
|
|
16
|
+
const qe = ["messageId"], ze = ["src"], He = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "call-message__subtext"
|
|
19
|
-
},
|
|
19
|
+
}, Ge = { class: "call-message__content" }, Je = { class: "call-message__header-container" }, Ke = { class: "call-message__title-wrapper" }, Qe = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "call-message__title"
|
|
22
|
-
},
|
|
22
|
+
}, Xe = { class: "call-message__call-participant" }, Ye = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "call-message__title call-message__title--missed"
|
|
25
|
-
},
|
|
25
|
+
}, We = { class: "call-message__call-participant" }, et = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "call-message__title"
|
|
28
|
-
},
|
|
28
|
+
}, tt = { class: "call-message__call-participant" }, at = {
|
|
29
29
|
key: 1,
|
|
30
30
|
class: "call-message__title call-message__title--missed"
|
|
31
|
-
},
|
|
31
|
+
}, lt = { class: "call-message__call-participant" }, st = {
|
|
32
32
|
key: 0,
|
|
33
33
|
class: "call-message__missed-info"
|
|
34
|
-
},
|
|
34
|
+
}, ot = {
|
|
35
35
|
key: 1,
|
|
36
36
|
class: "call-message__audio-wrapper"
|
|
37
|
-
},
|
|
37
|
+
}, nt = ["src"], it = { class: "call-message__audio-progress" }, ut = { class: "call-message__audio-progress-bar" }, rt = ["max"], ct = { class: "call-message__audio-time" }, dt = { class: "call-message__info-container" }, mt = { class: "call-message__time" }, vt = ["data-theme"], pt = { class: "call-message__modal" }, At = /* @__PURE__ */ De({
|
|
38
38
|
__name: "CallMessage",
|
|
39
39
|
props: {
|
|
40
40
|
message: {
|
|
@@ -52,20 +52,20 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
emits: ["action", "reply"],
|
|
55
|
-
setup(
|
|
56
|
-
const
|
|
57
|
-
if (U)
|
|
58
|
-
return s(U);
|
|
59
|
-
}), ce = v(() => {
|
|
55
|
+
setup(ie, { emit: ue }) {
|
|
56
|
+
const re = R("chatAppId"), { getTheme: U } = Re(re), O = R("channels", void 0), Z = R("selectedChat", void 0), ce = p(() => {
|
|
60
57
|
if (O)
|
|
61
|
-
return
|
|
62
|
-
}),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
return l(O);
|
|
59
|
+
}), de = p(() => {
|
|
60
|
+
if (Z)
|
|
61
|
+
return l(Z);
|
|
62
|
+
}), me = ue, M = ie, { message: a, applyStyle: ve } = $e(M), {
|
|
63
|
+
isOpenMenu: E,
|
|
64
|
+
buttonMenuVisible: pe,
|
|
65
|
+
showMenu: q,
|
|
66
|
+
hideMenu: V,
|
|
67
|
+
clickAction: ge
|
|
68
|
+
} = je(M.message, me), F = f(!1), o = f(null), b = f(void 0), m = f(!1), h = f(0), v = f(0), y = f(!1), N = f(0), L = [
|
|
69
69
|
{
|
|
70
70
|
text: "1.0x",
|
|
71
71
|
speed: 1
|
|
@@ -82,61 +82,72 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
|
|
|
82
82
|
text: "2.0x",
|
|
83
83
|
speed: 2
|
|
84
84
|
}
|
|
85
|
-
],
|
|
86
|
-
|
|
85
|
+
], P = p(() => L[N.value] ?? L[0]), _e = (e) => {
|
|
86
|
+
if (!e) return;
|
|
87
|
+
const r = e.trim().match(/^(\d+):([0-5]\d)$/);
|
|
88
|
+
if (!r) return;
|
|
89
|
+
const i = Number(r[1]), d = Number(r[2]);
|
|
90
|
+
if (!(Number.isNaN(i) || Number.isNaN(d)))
|
|
91
|
+
return i * 60 + d;
|
|
92
|
+
}, z = () => {
|
|
93
|
+
var e;
|
|
94
|
+
m.value = !1, v.value = 0, h.value = _e((e = a.value) == null ? void 0 : e.callDuration) ?? 0, y.value = !1, N.value = 0;
|
|
87
95
|
};
|
|
88
|
-
|
|
96
|
+
z(), ae(
|
|
89
97
|
() => {
|
|
90
|
-
var
|
|
91
|
-
return (
|
|
98
|
+
var e;
|
|
99
|
+
return (e = a.value) == null ? void 0 : e.url;
|
|
92
100
|
},
|
|
93
|
-
(
|
|
94
|
-
|
|
101
|
+
(e, t) => {
|
|
102
|
+
e !== t && (z(), b.value = void 0, o.value && (o.value.pause(), o.value.currentTime = 0, o.value.removeAttribute("src"), o.value.load()));
|
|
95
103
|
}
|
|
96
104
|
);
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
return `${
|
|
100
|
-
},
|
|
101
|
-
|
|
105
|
+
const H = (e) => {
|
|
106
|
+
const t = Math.floor(e / 60), r = Math.floor(e % 60);
|
|
107
|
+
return `${t.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
|
|
108
|
+
}, fe = p(() => H(v.value)), Ce = p(() => H(h.value)), G = async () => {
|
|
109
|
+
var e;
|
|
110
|
+
if (!(!o.value || !((e = a.value) != null && e.url)))
|
|
102
111
|
if (m.value)
|
|
103
112
|
o.value.pause(), m.value = !1;
|
|
104
113
|
else
|
|
105
114
|
try {
|
|
106
|
-
await o.value.play(), m.value = !0;
|
|
115
|
+
b.value || (b.value = a.value.url, await Pe(), o.value.load()), await o.value.play(), m.value = !0;
|
|
107
116
|
} catch (t) {
|
|
108
117
|
console.error("Не удалось воспроизвести запись звонка", t), m.value = !1;
|
|
109
118
|
}
|
|
110
|
-
},
|
|
111
|
-
|
|
119
|
+
}, he = () => {
|
|
120
|
+
N.value = (N.value + 1) % L.length, o.value && (o.value.playbackRate = P.value.speed);
|
|
112
121
|
};
|
|
113
|
-
|
|
114
|
-
() =>
|
|
122
|
+
ae(
|
|
123
|
+
() => v.value,
|
|
115
124
|
() => {
|
|
116
|
-
o.value &&
|
|
125
|
+
o.value && y.value && (o.value.duration !== 1 / 0 && !Number.isNaN(o.value.duration) && (o.value.currentTime = v.value), Math.abs(v.value - h.value) < 0.1 && (m.value = !1));
|
|
117
126
|
}
|
|
118
127
|
);
|
|
119
|
-
const
|
|
120
|
-
o.value &&
|
|
121
|
-
},
|
|
128
|
+
const J = () => {
|
|
129
|
+
o.value && y.value && o.value.duration !== 1 / 0 && !Number.isNaN(o.value.duration) && (o.value.currentTime = v.value), y.value = !1;
|
|
130
|
+
}, ye = () => {
|
|
122
131
|
if (!o.value) return;
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
o.value && (
|
|
132
|
+
const e = o.value;
|
|
133
|
+
if (h.value = 0, v.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
|
|
134
|
+
e.currentTime = 1e101;
|
|
135
|
+
const t = () => {
|
|
136
|
+
o.value && (h.value = o.value.duration || 0, v.value = 0, o.value.currentTime = 0);
|
|
128
137
|
};
|
|
129
|
-
|
|
138
|
+
e.addEventListener("timeupdate", t, { once: !0 });
|
|
130
139
|
} else
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
o.value && (
|
|
135
|
-
},
|
|
140
|
+
h.value = e.duration || 0;
|
|
141
|
+
e.playbackRate = P.value.speed;
|
|
142
|
+
}, we = () => {
|
|
143
|
+
o.value && (y.value || (v.value = o.value.currentTime), o.value.ended && m.value && (m.value = !1));
|
|
144
|
+
}, be = () => {
|
|
136
145
|
m.value = !1;
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
|
|
146
|
+
}, xe = () => {
|
|
147
|
+
console.error("Не удалось загрузить запись звонка"), m.value = !1, b.value = void 0, o.value && (o.value.pause(), o.value.currentTime = 0, o.value.removeAttribute("src"), o.value.load());
|
|
148
|
+
}, I = p(() => {
|
|
149
|
+
var e;
|
|
150
|
+
switch ((e = a.value) == null ? void 0 : e.direction) {
|
|
140
151
|
case "incoming":
|
|
141
152
|
return "Входящий";
|
|
142
153
|
case "outgoing":
|
|
@@ -144,9 +155,9 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
|
|
|
144
155
|
default:
|
|
145
156
|
return "Звонок";
|
|
146
157
|
}
|
|
147
|
-
}), S =
|
|
148
|
-
var
|
|
149
|
-
switch ((
|
|
158
|
+
}), S = p(() => {
|
|
159
|
+
var e;
|
|
160
|
+
switch ((e = a.value) == null ? void 0 : e.direction) {
|
|
150
161
|
case "incoming":
|
|
151
162
|
return "к";
|
|
152
163
|
case "outgoing":
|
|
@@ -154,37 +165,37 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
|
|
|
154
165
|
default:
|
|
155
166
|
return "к";
|
|
156
167
|
}
|
|
157
|
-
}),
|
|
158
|
-
var
|
|
159
|
-
const
|
|
168
|
+
}), K = p(() => {
|
|
169
|
+
var t, r;
|
|
170
|
+
const e = (t = a.value) == null ? void 0 : t.isMissedCall;
|
|
160
171
|
switch ((r = a.value) == null ? void 0 : r.direction) {
|
|
161
172
|
case "incoming":
|
|
162
|
-
return
|
|
173
|
+
return e ? "#F84932" : "#00AC47";
|
|
163
174
|
case "outgoing":
|
|
164
|
-
return
|
|
175
|
+
return e ? "#5F5F5F" : "#118ABF";
|
|
165
176
|
default:
|
|
166
|
-
return
|
|
177
|
+
return e ? "#5F5F5F" : "#00AC47";
|
|
167
178
|
}
|
|
168
|
-
}),
|
|
169
|
-
var
|
|
170
|
-
return ((
|
|
171
|
-
}),
|
|
179
|
+
}), ke = p(() => {
|
|
180
|
+
var e;
|
|
181
|
+
return ((e = a.value) == null ? void 0 : e.direction) === "outgoing" ? "Без ответа" : "Пропущенный";
|
|
182
|
+
}), Q = p(() => {
|
|
172
183
|
var g;
|
|
173
|
-
const
|
|
174
|
-
if (!(
|
|
184
|
+
const e = a.value, t = ce.value, r = de.value;
|
|
185
|
+
if (!(e != null && e.dialogId) || !t || !r)
|
|
175
186
|
return null;
|
|
176
|
-
const
|
|
177
|
-
if (!(
|
|
187
|
+
const i = (g = r.dialogs) == null ? void 0 : g.find((x) => x.dialogId === e.dialogId);
|
|
188
|
+
if (!(i != null && i.channelId))
|
|
178
189
|
return null;
|
|
179
|
-
const d =
|
|
190
|
+
const d = t.find((x) => x.channelId === i.channelId);
|
|
180
191
|
return (d == null ? void 0 : d.title) || null;
|
|
181
|
-
}),
|
|
192
|
+
}), Te = Be(() => M.message, () => M.subtextTooltipData), X = {
|
|
182
193
|
textDialog: "textDialog",
|
|
183
194
|
message: "message"
|
|
184
195
|
};
|
|
185
|
-
function
|
|
186
|
-
const r =
|
|
187
|
-
switch (
|
|
196
|
+
function Y(e, t) {
|
|
197
|
+
const r = e.position;
|
|
198
|
+
switch (t) {
|
|
188
199
|
case "textDialog":
|
|
189
200
|
return r === "left" ? "call-message__text-dialog-left" : "call-message__text-dialog-right";
|
|
190
201
|
case "message":
|
|
@@ -193,11 +204,11 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
|
|
|
193
204
|
return "";
|
|
194
205
|
}
|
|
195
206
|
}
|
|
196
|
-
const
|
|
207
|
+
const Me = () => {
|
|
197
208
|
alert("Перезвонить");
|
|
198
|
-
},
|
|
199
|
-
var
|
|
200
|
-
if ((
|
|
209
|
+
}, Fe = async () => {
|
|
210
|
+
var e, t, r, i, d;
|
|
211
|
+
if ((e = a.value) != null && e.url)
|
|
201
212
|
try {
|
|
202
213
|
const g = await fetch(a.value.url, {
|
|
203
214
|
headers: {
|
|
@@ -206,7 +217,7 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
|
|
|
206
217
|
});
|
|
207
218
|
if (!g.ok)
|
|
208
219
|
throw new Error(`HTTP error! status: ${g.status}`);
|
|
209
|
-
const x = g.headers.get("content-type") || "",
|
|
220
|
+
const x = g.headers.get("content-type") || "", Ie = await g.blob(), A = ((r = (t = a.value.url.split(".").pop()) == null ? void 0 : t.split("?")[0]) == null ? void 0 : r.toLowerCase()) || "", Se = {
|
|
210
221
|
"audio/mpeg": "mp3",
|
|
211
222
|
"audio/mp3": "mp3",
|
|
212
223
|
"audio/wav": "wav",
|
|
@@ -217,261 +228,262 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
|
|
|
217
228
|
"audio/flac": "flac",
|
|
218
229
|
"audio/m4a": "m4a",
|
|
219
230
|
"audio/x-m4a": "m4a",
|
|
220
|
-
"application/octet-stream":
|
|
221
|
-
},
|
|
222
|
-
|
|
231
|
+
"application/octet-stream": A || "mp3"
|
|
232
|
+
}, W = A && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(A) ? A : Se[x] || "mp3", ee = a.value.url.split("/"), D = decodeURIComponent(((i = ee[ee.length - 1]) == null ? void 0 : i.split("?")[0]) || ""), Ae = D ? D.includes(".") ? D : `${D}.${W}` : `call-${a.value.messageId}.${W}`, te = window.URL.createObjectURL(Ie), k = document.createElement("a");
|
|
233
|
+
k.href = te, k.download = Ae, document.body.appendChild(k), k.click(), document.body.removeChild(k), window.URL.revokeObjectURL(te);
|
|
223
234
|
} catch (g) {
|
|
224
235
|
console.error("Ошибка при скачивании аудио звонка:", g), (d = a.value) != null && d.url && window.open(a.value.url, "_blank");
|
|
225
236
|
}
|
|
226
|
-
},
|
|
227
|
-
|
|
237
|
+
}, Ne = (e) => {
|
|
238
|
+
e.action === "download" ? (Fe(), V()) : ge(e);
|
|
228
239
|
};
|
|
229
|
-
return (
|
|
240
|
+
return (e, t) => {
|
|
230
241
|
var r;
|
|
231
242
|
return n(), c("div", {
|
|
232
|
-
class:
|
|
233
|
-
|
|
234
|
-
|
|
243
|
+
class: le([
|
|
244
|
+
Y(l(a), X.message),
|
|
245
|
+
l(ve)(l(a))
|
|
235
246
|
]),
|
|
236
|
-
messageId:
|
|
237
|
-
onMouseenter:
|
|
238
|
-
(...
|
|
239
|
-
onMouseleave:
|
|
240
|
-
(...
|
|
247
|
+
messageId: l(a).messageId,
|
|
248
|
+
onMouseenter: t[6] || (t[6] = //@ts-ignore
|
|
249
|
+
(...i) => l(q) && l(q)(...i)),
|
|
250
|
+
onMouseleave: t[7] || (t[7] = //@ts-ignore
|
|
251
|
+
(...i) => l(V) && l(V)(...i))
|
|
241
252
|
}, [
|
|
242
|
-
|
|
253
|
+
l(a).avatar ? (n(), c("img", {
|
|
243
254
|
key: 0,
|
|
244
255
|
class: "call-message__avatar",
|
|
245
|
-
src:
|
|
256
|
+
src: l(a).avatar,
|
|
246
257
|
height: "32",
|
|
247
258
|
width: "32"
|
|
248
|
-
}, null, 8,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
text:
|
|
252
|
-
position:
|
|
259
|
+
}, null, 8, ze)) : C("", !0),
|
|
260
|
+
l(a).subText ? (n(), c("p", He, [
|
|
261
|
+
j(ne, {
|
|
262
|
+
text: l(Te),
|
|
263
|
+
position: l(a).position === "left" ? "right" : "left",
|
|
253
264
|
offset: 8
|
|
254
265
|
}, {
|
|
255
|
-
default:
|
|
256
|
-
_(
|
|
266
|
+
default: $(() => [
|
|
267
|
+
_(u(l(a).subText), 1)
|
|
257
268
|
]),
|
|
258
269
|
_: 1
|
|
259
270
|
}, 8, ["text", "position"])
|
|
260
|
-
])) :
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
271
|
+
])) : C("", !0),
|
|
272
|
+
s("div", Ge, [
|
|
273
|
+
s("div", Je, [
|
|
274
|
+
s("div", Ke, [
|
|
275
|
+
l(a).direction === "incoming" || !l(a).direction ? (n(), T(Oe, {
|
|
265
276
|
key: 0,
|
|
266
277
|
class: "call-message__direction-icon",
|
|
267
|
-
color:
|
|
268
|
-
}, null, 8, ["color"])) : (n(),
|
|
278
|
+
color: K.value
|
|
279
|
+
}, null, 8, ["color"])) : (n(), T(Ze, {
|
|
269
280
|
key: 1,
|
|
270
281
|
class: "call-message__direction-icon",
|
|
271
|
-
color:
|
|
282
|
+
color: K.value
|
|
272
283
|
}, null, 8, ["color"])),
|
|
273
|
-
|
|
284
|
+
Q.value ? (n(), T(ne, {
|
|
274
285
|
key: 2,
|
|
275
|
-
text:
|
|
286
|
+
text: Q.value,
|
|
276
287
|
position: "top",
|
|
277
288
|
offset: 8
|
|
278
289
|
}, {
|
|
279
|
-
default:
|
|
280
|
-
|
|
281
|
-
_(
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
290
|
+
default: $(() => [
|
|
291
|
+
l(a).isMissedCall ? (n(), c("span", Ye, [
|
|
292
|
+
_(u(I.value) + " ", 1),
|
|
293
|
+
l(a).direction !== "incoming" ? (n(), c(w, { key: 0 }, [
|
|
294
|
+
t[8] || (t[8] = _(" звонок ", -1)),
|
|
295
|
+
s("span", We, u(S.value) + " " + u(l(a).callParticipant), 1)
|
|
285
296
|
], 64)) : (n(), c(w, { key: 1 }, [
|
|
286
297
|
_(" звонок ")
|
|
287
298
|
], 64))
|
|
288
|
-
])) : (n(), c("span",
|
|
289
|
-
_(
|
|
290
|
-
|
|
299
|
+
])) : (n(), c("span", Qe, [
|
|
300
|
+
_(u(I.value) + " звонок ", 1),
|
|
301
|
+
s("span", Xe, u(S.value) + " " + u(l(a).callParticipant), 1)
|
|
291
302
|
]))
|
|
292
303
|
]),
|
|
293
304
|
_: 1
|
|
294
305
|
}, 8, ["text"])) : (n(), c(w, { key: 3 }, [
|
|
295
|
-
|
|
296
|
-
_(
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
306
|
+
l(a).isMissedCall ? (n(), c("span", at, [
|
|
307
|
+
_(u(I.value) + " ", 1),
|
|
308
|
+
l(a).direction !== "incoming" ? (n(), c(w, { key: 0 }, [
|
|
309
|
+
t[9] || (t[9] = _(" звонок ", -1)),
|
|
310
|
+
s("span", lt, u(S.value) + " " + u(l(a).callParticipant), 1)
|
|
300
311
|
], 64)) : (n(), c(w, { key: 1 }, [
|
|
301
312
|
_(" звонок ")
|
|
302
313
|
], 64))
|
|
303
|
-
])) : (n(), c("span",
|
|
304
|
-
_(
|
|
305
|
-
|
|
314
|
+
])) : (n(), c("span", et, [
|
|
315
|
+
_(u(I.value) + " звонок ", 1),
|
|
316
|
+
s("span", tt, u(S.value) + " " + u(l(a).callParticipant), 1)
|
|
306
317
|
]))
|
|
307
318
|
], 64))
|
|
308
319
|
]),
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
320
|
+
l(a).isMissedCall ? (n(), c("p", st, u(ke.value) + ": " + u(l(a).callAttemptDuration), 1)) : C("", !0),
|
|
321
|
+
l(a).url && !l(a).isMissedCall ? (n(), c("div", ot, [
|
|
322
|
+
s("audio", {
|
|
312
323
|
ref_key: "player",
|
|
313
324
|
ref: o,
|
|
314
|
-
src:
|
|
325
|
+
src: b.value,
|
|
315
326
|
type: "audio/webm",
|
|
316
|
-
onLoadedmetadata:
|
|
317
|
-
onTimeupdate:
|
|
318
|
-
onEnded:
|
|
319
|
-
|
|
320
|
-
|
|
327
|
+
onLoadedmetadata: ye,
|
|
328
|
+
onTimeupdate: we,
|
|
329
|
+
onEnded: be,
|
|
330
|
+
onError: xe
|
|
331
|
+
}, null, 40, nt),
|
|
332
|
+
B(s("button", {
|
|
321
333
|
class: "call-message__audio-play",
|
|
322
334
|
type: "button",
|
|
323
|
-
onClick:
|
|
324
|
-
}, [...
|
|
325
|
-
|
|
326
|
-
|
|
335
|
+
onClick: G
|
|
336
|
+
}, [...t[10] || (t[10] = [
|
|
337
|
+
s("div", { class: "call-message__audio-play-icon" }, [
|
|
338
|
+
s("svg", {
|
|
327
339
|
width: "20",
|
|
328
340
|
height: "23",
|
|
329
341
|
viewBox: "0 0 20 23",
|
|
330
342
|
fill: "none",
|
|
331
343
|
xmlns: "http://www.w3.org/2000/svg"
|
|
332
344
|
}, [
|
|
333
|
-
|
|
345
|
+
s("path", {
|
|
334
346
|
d: "M18.99 12.9934L3.0825 22.2234C1.7325 23.0059 0 22.0584 0 20.4809V2.02087C0 0.44587 1.73 -0.50413 3.0825 0.28087L18.99 9.51087C19.2971 9.68618 19.5524 9.93959 19.7299 10.2454C19.9075 10.5512 20.001 10.8985 20.001 11.2521C20.001 11.6057 19.9075 11.953 19.7299 12.2589C19.5524 12.5647 19.2971 12.8181 18.99 12.9934Z",
|
|
335
347
|
fill: "#5F5F5F"
|
|
336
348
|
})
|
|
337
349
|
])
|
|
338
350
|
], -1)
|
|
339
351
|
])], 512), [
|
|
340
|
-
[
|
|
352
|
+
[se, !m.value]
|
|
341
353
|
]),
|
|
342
|
-
|
|
354
|
+
B(s("button", {
|
|
343
355
|
class: "call-message__audio-pause",
|
|
344
356
|
type: "button",
|
|
345
|
-
onClick:
|
|
346
|
-
}, [...
|
|
347
|
-
|
|
348
|
-
|
|
357
|
+
onClick: G
|
|
358
|
+
}, [...t[11] || (t[11] = [
|
|
359
|
+
s("div", { class: "call-message__audio-pause-icon" }, [
|
|
360
|
+
s("svg", {
|
|
349
361
|
width: "20",
|
|
350
362
|
height: "23",
|
|
351
363
|
viewBox: "0 0 20 23",
|
|
352
364
|
fill: "none",
|
|
353
365
|
xmlns: "http://www.w3.org/2000/svg"
|
|
354
366
|
}, [
|
|
355
|
-
|
|
367
|
+
s("path", {
|
|
356
368
|
d: "M3.75 0C4.74456 0 5.69839 0.395088 6.40165 1.09835C7.10491 1.80161 7.5 2.75544 7.5 3.75V18.75C7.5 19.7446 7.10491 20.6984 6.40165 21.4017C5.69839 22.1049 4.74456 22.5 3.75 22.5C2.75544 22.5 1.80161 22.1049 1.09835 21.4017C0.395088 20.6984 0 19.7446 0 18.75V3.75C0 2.75544 0.395088 1.80161 1.09835 1.09835C1.80161 0.395088 2.75544 0 3.75 0ZM16.25 0C17.2446 0 18.1984 0.395088 18.9017 1.09835C19.6049 1.80161 20 2.75544 20 3.75V18.75C20 19.7446 19.6049 20.6984 18.9017 21.4017C18.1984 22.1049 17.2446 22.5 16.25 22.5C15.2554 22.5 14.3016 22.1049 13.5983 21.4017C12.8951 20.6984 12.5 19.7446 12.5 18.75V3.75C12.5 2.75544 12.8951 1.80161 13.5983 1.09835C14.3016 0.395088 15.2554 0 16.25 0Z",
|
|
357
369
|
fill: "#5F5F5F"
|
|
358
370
|
})
|
|
359
371
|
])
|
|
360
372
|
], -1)
|
|
361
373
|
])], 512), [
|
|
362
|
-
[
|
|
374
|
+
[se, m.value]
|
|
363
375
|
]),
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
"onUpdate:modelValue":
|
|
376
|
+
s("div", it, [
|
|
377
|
+
s("div", ut, [
|
|
378
|
+
B(s("input", {
|
|
379
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => v.value = i),
|
|
368
380
|
class: "call-message__audio-slider",
|
|
369
381
|
type: "range",
|
|
370
382
|
min: 0,
|
|
371
|
-
max:
|
|
383
|
+
max: h.value,
|
|
372
384
|
step: "0.1",
|
|
373
|
-
onMousedown:
|
|
374
|
-
onMouseup:
|
|
375
|
-
onTouchstartPassive:
|
|
376
|
-
onTouchendPassive:
|
|
377
|
-
}, null, 40,
|
|
378
|
-
[
|
|
385
|
+
onMousedown: t[1] || (t[1] = (i) => y.value = !0),
|
|
386
|
+
onMouseup: J,
|
|
387
|
+
onTouchstartPassive: t[2] || (t[2] = (i) => y.value = !0),
|
|
388
|
+
onTouchendPassive: J
|
|
389
|
+
}, null, 40, rt), [
|
|
390
|
+
[Ee, v.value]
|
|
379
391
|
]),
|
|
380
|
-
|
|
392
|
+
s("button", {
|
|
381
393
|
type: "button",
|
|
382
394
|
class: "call-message__audio-speed-btn",
|
|
383
|
-
onClick:
|
|
384
|
-
},
|
|
395
|
+
onClick: he
|
|
396
|
+
}, u(P.value.text), 1)
|
|
385
397
|
]),
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
398
|
+
s("div", ct, [
|
|
399
|
+
s("span", null, u(fe.value), 1),
|
|
400
|
+
s("span", null, u(Ce.value), 1)
|
|
389
401
|
])
|
|
390
402
|
])
|
|
391
|
-
])) :
|
|
403
|
+
])) : C("", !0)
|
|
392
404
|
]),
|
|
393
|
-
|
|
394
|
-
|
|
405
|
+
s("div", dt, [
|
|
406
|
+
s("button", {
|
|
395
407
|
class: "call-message__call-button",
|
|
396
408
|
type: "button",
|
|
397
|
-
onClick:
|
|
409
|
+
onClick: Me
|
|
398
410
|
}, " Нажмите, чтобы перезвонить "),
|
|
399
|
-
|
|
411
|
+
s("span", mt, u(l(a).time), 1)
|
|
400
412
|
]),
|
|
401
|
-
(r =
|
|
413
|
+
(r = l(a).transcript) != null && r.dialog ? (n(), c("button", {
|
|
402
414
|
key: 0,
|
|
403
415
|
class: "call-message__download-button",
|
|
404
|
-
onClick:
|
|
405
|
-
}, [...
|
|
406
|
-
|
|
407
|
-
])])) :
|
|
408
|
-
|
|
416
|
+
onClick: t[3] || (t[3] = (i) => F.value = !F.value)
|
|
417
|
+
}, [...t[12] || (t[12] = [
|
|
418
|
+
s("span", { class: "pi pi-arrow-up-right" }, null, -1)
|
|
419
|
+
])])) : C("", !0),
|
|
420
|
+
l(pe) && l(a).actions ? (n(), c("button", {
|
|
409
421
|
key: 1,
|
|
410
422
|
class: "call-message__menu-button",
|
|
411
|
-
onClick:
|
|
412
|
-
}, [...
|
|
413
|
-
|
|
423
|
+
onClick: t[4] || (t[4] = (i) => E.value = !l(E))
|
|
424
|
+
}, [...t[13] || (t[13] = [
|
|
425
|
+
s("svg", {
|
|
414
426
|
width: "4",
|
|
415
427
|
height: "17",
|
|
416
428
|
viewBox: "0 0 4 17",
|
|
417
429
|
fill: "none",
|
|
418
430
|
xmlns: "http://www.w3.org/2000/svg"
|
|
419
431
|
}, [
|
|
420
|
-
|
|
432
|
+
s("path", {
|
|
421
433
|
d: "M3.75 14.375C3.75 14.8723 3.55246 15.3492 3.20083 15.7008C2.84919 16.0525 2.37228 16.25 1.875 16.25C1.37772 16.25 0.900805 16.0525 0.549175 15.7008C0.197544 15.3492 0 14.8723 0 14.375C0 13.8777 0.197544 13.4008 0.549175 13.0492C0.900805 12.6975 1.37772 12.5 1.875 12.5C2.37228 12.5 2.84919 12.6975 3.20083 13.0492C3.55246 13.4008 3.75 13.8777 3.75 14.375ZM3.75 8.125C3.75 8.62228 3.55246 9.09919 3.20083 9.45083C2.84919 9.80246 2.37228 10 1.875 10C1.37772 10 0.900805 9.80246 0.549175 9.45083C0.197544 9.09919 0 8.62228 0 8.125C0 7.62772 0.197544 7.15081 0.549175 6.79917C0.900805 6.44754 1.37772 6.25 1.875 6.25C2.37228 6.25 2.84919 6.44754 3.20083 6.79917C3.55246 7.15081 3.75 7.62772 3.75 8.125ZM3.75 1.875C3.75 2.37228 3.55246 2.84919 3.20083 3.20083C2.84919 3.55246 2.37228 3.75 1.875 3.75C1.37772 3.75 0.900805 3.55246 0.549175 3.20083C0.197544 2.84919 0 2.37228 0 1.875C0 1.37772 0.197544 0.900806 0.549175 0.549175C0.900805 0.197544 1.37772 0 1.875 0C2.37228 0 2.84919 0.197544 3.20083 0.549175C3.55246 0.900806 3.75 1.37772 3.75 1.875Z",
|
|
422
434
|
fill: "#5F5F5F"
|
|
423
435
|
})
|
|
424
436
|
], -1)
|
|
425
|
-
])])) :
|
|
426
|
-
|
|
427
|
-
default:
|
|
428
|
-
|
|
437
|
+
])])) : C("", !0),
|
|
438
|
+
j(oe, null, {
|
|
439
|
+
default: $(() => [
|
|
440
|
+
l(E) && l(a).actions ? (n(), T(Ue, {
|
|
429
441
|
key: 0,
|
|
430
442
|
class: "call-message__context-menu",
|
|
431
|
-
actions:
|
|
432
|
-
onClick:
|
|
433
|
-
}, null, 8, ["actions"])) :
|
|
443
|
+
actions: l(a).actions,
|
|
444
|
+
onClick: Ne
|
|
445
|
+
}, null, 8, ["actions"])) : C("", !0)
|
|
434
446
|
]),
|
|
435
447
|
_: 1
|
|
436
448
|
}),
|
|
437
|
-
(n(),
|
|
438
|
-
|
|
439
|
-
default:
|
|
440
|
-
var
|
|
449
|
+
(n(), T(Ve, { to: "body" }, [
|
|
450
|
+
j(oe, { name: "modal-fade" }, {
|
|
451
|
+
default: $(() => {
|
|
452
|
+
var i;
|
|
441
453
|
return [
|
|
442
|
-
|
|
454
|
+
F.value ? (n(), c("div", {
|
|
443
455
|
key: 0,
|
|
444
456
|
class: "call-message__modal-overlay",
|
|
445
|
-
"data-theme":
|
|
457
|
+
"data-theme": l(U)().theme ? l(U)().theme : "light"
|
|
446
458
|
}, [
|
|
447
|
-
|
|
448
|
-
|
|
459
|
+
s("div", pt, [
|
|
460
|
+
s("button", {
|
|
449
461
|
class: "call-message__modal-close-button",
|
|
450
|
-
onClick:
|
|
451
|
-
}, [...
|
|
452
|
-
|
|
453
|
-
|
|
462
|
+
onClick: t[5] || (t[5] = (d) => F.value = !1)
|
|
463
|
+
}, [...t[14] || (t[14] = [
|
|
464
|
+
s("span", null, [
|
|
465
|
+
s("i", { class: "pi pi-times" })
|
|
454
466
|
], -1)
|
|
455
467
|
])]),
|
|
456
|
-
(n(!0), c(w, null,
|
|
468
|
+
(n(!0), c(w, null, Le((i = l(a).transcript) == null ? void 0 : i.dialog, (d) => (n(), c("div", {
|
|
457
469
|
key: d.time,
|
|
458
|
-
class:
|
|
470
|
+
class: le(Y(d, X.textDialog))
|
|
459
471
|
}, [
|
|
460
|
-
|
|
461
|
-
|
|
472
|
+
s("p", null, u(d.text), 1),
|
|
473
|
+
s("span", null, u(d.time), 1)
|
|
462
474
|
], 2))), 128))
|
|
463
475
|
])
|
|
464
|
-
], 8,
|
|
476
|
+
], 8, vt)) : C("", !0)
|
|
465
477
|
];
|
|
466
478
|
}),
|
|
467
479
|
_: 1
|
|
468
480
|
})
|
|
469
481
|
]))
|
|
470
482
|
])
|
|
471
|
-
], 42,
|
|
483
|
+
], 42, qe);
|
|
472
484
|
};
|
|
473
485
|
}
|
|
474
486
|
});
|
|
475
487
|
export {
|
|
476
|
-
|
|
488
|
+
At as default
|
|
477
489
|
};
|