@ethora/chat-component 26.8.1 → 26.9.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.
Files changed (48) hide show
  1. package/README.md +1 -0
  2. package/dist/{ChatProfileModal-DZVi2WRb.js → ChatProfileModal-DfXEnzJf.js} +6 -3
  3. package/dist/{FilePreviewModal-BelSYN5e.js → FilePreviewModal-Cs1tij9R.js} +35 -35
  4. package/dist/{ManageDataModal-Bs_0SHBL.js → ManageDataModal-BBOui09n.js} +3 -3
  5. package/dist/{MarkdownBody-BYUK4GVM.js → MarkdownBody-DttRXyAK.js} +3 -3
  6. package/dist/{SideDrawer-C_nWZRwH.js → SideDrawer-DLqEOqAi.js} +35 -35
  7. package/dist/UserProfileModal-DEtLQxkJ.js +594 -0
  8. package/dist/{UserSettingsModal-J7uJfki1.js → UserSettingsModal-Ddht5fc0.js} +9 -9
  9. package/dist/{VideoCallOverlay-BXHNEhdX.js → VideoCallOverlay-BJMarThf.js} +2673 -2662
  10. package/dist/VisibilityModal-CckTnGKB.js +138 -0
  11. package/dist/assets/icons.d.ts +8 -0
  12. package/dist/components/MainComponents/AttachmentList.d.ts +5 -0
  13. package/dist/components/MainComponents/SealedAttachmentList.d.ts +14 -0
  14. package/dist/components/RoomComponents/styled/LastMessageSealed.d.ts +14 -0
  15. package/dist/components/styled/AudioMessage.d.ts +38 -0
  16. package/dist/components/styled/MessageImage.d.ts +10 -0
  17. package/dist/e2ee/crypto.d.ts +32 -0
  18. package/dist/e2ee/fileEnvelope.d.ts +48 -0
  19. package/dist/e2ee/index.d.ts +53 -0
  20. package/dist/e2ee/omemo.d.ts +130 -0
  21. package/dist/e2ee/protobuf.d.ts +25 -0
  22. package/dist/e2ee/ratchet.d.ts +54 -0
  23. package/dist/e2ee/stanza.d.ts +24 -0
  24. package/dist/e2ee/store.d.ts +12 -0
  25. package/dist/{handleCopyClick-Bj2V_brV.js → handleCopyClick-CWw4UAlT.js} +2 -2
  26. package/dist/helpers/findMessagesForFile.d.ts +25 -0
  27. package/dist/helpers/sealedAttachments.d.ts +25 -0
  28. package/dist/helpers/xmppIdShape.d.ts +9 -0
  29. package/dist/helpers/xmppUsername.d.ts +1 -1
  30. package/dist/hooks/useChatWrapperInit.d.ts +5 -1
  31. package/dist/{main-DmtEeYji.js → main-BHtKhpBZ.js} +21004 -16820
  32. package/dist/main.d.ts +2 -0
  33. package/dist/main.js +23 -20
  34. package/dist/networking/api-requests/auth.api.d.ts +10 -1
  35. package/dist/networking/api-requests/rooms.api.d.ts +1 -1
  36. package/dist/networking/authRefresh.d.ts +6 -0
  37. package/dist/networking/xmpp/sendMediaMessage.xmpp.d.ts +12 -1
  38. package/dist/networking/xmpp/sendTextMessage.xmpp.d.ts +1 -1
  39. package/dist/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.d.ts +1 -1
  40. package/dist/networking/xmppClient.d.ts +39 -0
  41. package/dist/roomStore/storage.d.ts +2 -1
  42. package/dist/styles/tokens.d.ts +14 -4
  43. package/dist/types/models/config.model.d.ts +33 -0
  44. package/dist/types/models/message.model.d.ts +27 -0
  45. package/dist/types/models/room.model.d.ts +10 -0
  46. package/package.json +4 -1
  47. package/dist/UserProfileModal-CD2IB5SD.js +0 -574
  48. package/dist/VisibilityModal-4QJnWpAL.js +0 -132
@@ -0,0 +1,594 @@
1
+ import { jsxs as u, Fragment as $, jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as ge, useState as I, useCallback as y, useImperativeHandle as ve, useRef as ae, useMemo as M } from "react";
3
+ import { a as be, p as J, t as ye, v as xe, w as we, P as re, I as H, x as D, y as Ce, z as Se, C as Ie, D as te, E as De, F as Ne, G as ke, J as Ue, u as Q, K as Fe, L as Pe, N as Ae, O as Re, Q as Y, q as Z, R as ze, S as je, T as Be, s as $e, B as X, U as Ee, W as Oe, X as Te, Y as ee, Z as R, _ as Le, $ as Me, V as He, A as Xe, a0 as We, a1 as Je, a2 as Ke, a3 as Ve } from "./main-BHtKhpBZ.js";
4
+ import { D as E, a as W, b as Ge, e as qe, f as _e, S as Qe } from "./SideDrawer-DLqEOqAi.js";
5
+ import { P as ne, a as Ye, D as Ze, b as eo, h as oo } from "./handleCopyClick-CWw4UAlT.js";
6
+ const ao = (c, i) => {
7
+ const l = atob(c.split(",")[1]), g = new ArrayBuffer(l.length), e = new Uint8Array(g);
8
+ for (let r = 0; r < l.length; r++)
9
+ e[r] = l.charCodeAt(r);
10
+ const n = new Blob([e], { type: "image/jpeg" });
11
+ return new File([n], i, { type: "image/jpeg" });
12
+ }, ro = D.div`
13
+ display: flex;
14
+ flex-direction: column;
15
+ gap: var(--ethora-space-4, 16px);
16
+ width: 100%;
17
+ `, se = ge(
18
+ ({ setIsEditing: c, modalUser: i, config: l }, g) => {
19
+ const e = be(), n = J(), [r, t] = I(i?.firstName || ""), [f, U] = I(i?.lastName || ""), [b, w] = I(i?.description || ""), [v, x] = I(
20
+ i?.profileImage
21
+ ), C = y(async () => {
22
+ try {
23
+ let s = new FormData();
24
+ if (typeof v == "string" && v.startsWith("data:image/")) {
25
+ const F = ao(v, "profileImage.jpg");
26
+ s.append("file", F);
27
+ } else v instanceof File && s.append("file", v);
28
+ s.append("firstName", r), s.append("lastName", f), s.append("description", b);
29
+ const { user: N } = await ye(s);
30
+ e(
31
+ xe({
32
+ updates: {
33
+ firstName: r,
34
+ lastName: f,
35
+ description: b,
36
+ profileImage: N?.profileImage
37
+ }
38
+ })
39
+ ), c(!1);
40
+ } catch (s) {
41
+ we.log("error", s);
42
+ }
43
+ }, [
44
+ e,
45
+ b,
46
+ r,
47
+ f,
48
+ v,
49
+ c
50
+ ]);
51
+ ve(g, () => ({ save: C }), [C]);
52
+ const S = (s) => {
53
+ x(s);
54
+ };
55
+ return /* @__PURE__ */ u($, { children: [
56
+ /* @__PURE__ */ o(ne, { children: /* @__PURE__ */ o(
57
+ re,
58
+ {
59
+ icon: v,
60
+ name: `${r} ${f}`,
61
+ size: 96,
62
+ upload: {
63
+ onUpload: S,
64
+ active: !0
65
+ }
66
+ }
67
+ ) }),
68
+ /* @__PURE__ */ o(E, { children: /* @__PURE__ */ u(ro, { children: [
69
+ /* @__PURE__ */ o(
70
+ H,
71
+ {
72
+ color: l?.colors?.primary,
73
+ colorBg: l?.colors?.colorInput,
74
+ placeholder: n("field.firstName"),
75
+ label: n("field.firstName"),
76
+ value: r,
77
+ onChange: (s) => t(s.target.value)
78
+ }
79
+ ),
80
+ /* @__PURE__ */ o(
81
+ H,
82
+ {
83
+ color: l?.colors?.primary,
84
+ colorBg: l?.colors?.colorInput,
85
+ placeholder: n("field.lastName"),
86
+ label: n("field.lastName"),
87
+ value: f,
88
+ onChange: (s) => U(s.target.value)
89
+ }
90
+ ),
91
+ /* @__PURE__ */ o(
92
+ H,
93
+ {
94
+ color: l?.colors?.primary,
95
+ colorBg: l?.colors?.colorInput,
96
+ placeholder: n("modal.profile.about"),
97
+ label: n("modal.profile.about"),
98
+ value: b,
99
+ onChange: (s) => w(s.target.value)
100
+ }
101
+ )
102
+ ] }) })
103
+ ] });
104
+ }
105
+ );
106
+ se.displayName = "EditUserModal";
107
+ const to = te`
108
+ from {
109
+ transform: rotate(0deg);
110
+ }
111
+ to {
112
+ transform: rotate(180deg);
113
+ }
114
+ `, no = te`
115
+ from {
116
+ transform: rotate(180deg);
117
+ }
118
+ to {
119
+ transform: rotate(0deg);
120
+ }
121
+ `, so = D.div`
122
+ position: relative;
123
+ width: 100%;
124
+ `, io = D.div`
125
+ border: 1px solid
126
+ ${({ $borderColor: c, $isOpen: i }) => i ? c || "var(--ethora-color-primary, #0052cd)" : c || "var(--ethora-color-border, #e6e8ec)"};
127
+ padding: 0 16px;
128
+ height: 48px;
129
+ box-sizing: border-box;
130
+ display: flex;
131
+ justify-content: space-between;
132
+ align-items: center;
133
+ cursor: pointer;
134
+ background-color: var(--ethora-color-bg, #fff);
135
+ color: var(--ethora-color-text, #141414);
136
+ font-size: var(--ethora-font-size, 16px);
137
+ border-radius: var(--ethora-radius-md, 16px);
138
+ transition:
139
+ border-color var(--ethora-motion-fast, 150ms) var(--ethora-motion-ease, ease),
140
+ box-shadow var(--ethora-motion-fast, 150ms) var(--ethora-motion-ease, ease);
141
+
142
+ ${({ $isOpen: c }) => c && Se`
143
+ outline: 2px solid var(--ethora-color-primary, #0052cd);
144
+ outline-offset: 1px;
145
+ `}
146
+
147
+ &:focus-visible {
148
+ outline: 2px solid var(--ethora-color-primary, #0052cd);
149
+ outline-offset: 1px;
150
+ }
151
+ `, lo = D.span`
152
+ color: var(--ethora-color-text-muted, #8c8c8c);
153
+ `, co = D.span`
154
+ margin-left: 10px;
155
+ display: inline-block;
156
+ color: var(--ethora-color-text-muted, #8c8c8c);
157
+ font-size: 12px;
158
+ animation: ${(c) => c.$isOpen ? to : no} 0.3s ease
159
+ forwards;
160
+ `, po = D.div`
161
+ position: absolute;
162
+ top: 100%;
163
+ left: 0;
164
+ right: 0;
165
+ border: 1px solid var(--ethora-color-border, #e6e8ec);
166
+ background-color: var(--ethora-color-bg, #fff);
167
+ max-height: 200px;
168
+ overflow-y: auto;
169
+ margin-top: 4px;
170
+ border-radius: var(--ethora-radius-md, 16px);
171
+ box-shadow: var(--ethora-shadow-md, 0 4px 12px rgba(16, 24, 40, 0.1));
172
+ z-index: 100;
173
+ ${Ie}
174
+ `, mo = D.input`
175
+ width: 100%;
176
+ padding: 12px 16px;
177
+ border: none;
178
+ border-bottom: 1px solid var(--ethora-color-border, #e6e8ec);
179
+ outline: none;
180
+ box-sizing: border-box;
181
+ font-size: var(--ethora-font-size-sm, 14px);
182
+ background: transparent;
183
+ color: var(--ethora-color-text, #141414);
184
+
185
+ &::placeholder {
186
+ color: var(--ethora-color-text-muted, #8c8c8c);
187
+ }
188
+ `, oe = D.div`
189
+ padding: 12px 16px;
190
+ cursor: pointer;
191
+ font-size: var(--ethora-font-size-sm, 14px);
192
+ color: var(--ethora-color-text, #141414);
193
+ background-color: ${({ $selected: c }) => c ? "var(--ethora-color-primary-soft, #e7edf9)" : "transparent"};
194
+ transition: background-color var(--ethora-motion-fast, 150ms);
195
+
196
+ &:hover {
197
+ background-color: ${({ $selected: c }) => c ? "var(--ethora-color-primary-soft, #e7edf9)" : "var(--ethora-color-bg-hover, #f0f2f5)"};
198
+ }
199
+ `, ho = ({
200
+ options: c,
201
+ placeholder: i,
202
+ onSelect: l,
203
+ accentColor: g,
204
+ selectedValue: e
205
+ }) => {
206
+ const n = J(), [r, t] = I(!1), [f, U] = I(
207
+ e
208
+ ), [b, w] = I(""), v = ae(null), x = () => t((a) => !a), C = (a) => {
209
+ U(a), l(a), t(!1), w("");
210
+ }, S = c.filter(
211
+ (a) => a.name.toLowerCase().includes(b.toLowerCase())
212
+ ), s = y(() => t(!1), []);
213
+ Ce({
214
+ enabled: r,
215
+ onClose: s,
216
+ kind: "menu",
217
+ insideRefs: [v],
218
+ closeOnOutsidePress: !0
219
+ });
220
+ const N = (a) => {
221
+ a.key === "Enter" || a.key === " " ? (a.preventDefault(), x()) : a.key === "Escape" && r && t(!1);
222
+ }, F = (a, P) => {
223
+ (a.key === "Enter" || a.key === " ") && (a.preventDefault(), C(P));
224
+ };
225
+ return /* @__PURE__ */ u(so, { ref: v, children: [
226
+ /* @__PURE__ */ u(
227
+ io,
228
+ {
229
+ $isOpen: r,
230
+ onClick: x,
231
+ onKeyDown: N,
232
+ $borderColor: g,
233
+ role: "button",
234
+ tabIndex: 0,
235
+ "aria-haspopup": "listbox",
236
+ "aria-expanded": r,
237
+ children: [
238
+ f ? /* @__PURE__ */ o("span", { children: f.name }) : /* @__PURE__ */ o(lo, { children: i }),
239
+ /* @__PURE__ */ o(co, { style: { color: g }, $isOpen: r, children: "▼" })
240
+ ]
241
+ }
242
+ ),
243
+ r && /* @__PURE__ */ u(po, { role: "listbox", children: [
244
+ /* @__PURE__ */ o(
245
+ mo,
246
+ {
247
+ type: "text",
248
+ placeholder: n("search.placeholder"),
249
+ value: b,
250
+ onChange: (a) => w(a.target.value)
251
+ }
252
+ ),
253
+ S.length > 0 ? S.map((a) => /* @__PURE__ */ o(
254
+ oe,
255
+ {
256
+ onClick: () => C(a),
257
+ onKeyDown: (P) => F(P, a),
258
+ role: "option",
259
+ tabIndex: 0,
260
+ "aria-selected": f?.id === a.id,
261
+ $selected: f?.id === a.id,
262
+ children: a.name
263
+ },
264
+ a.id
265
+ )) : /* @__PURE__ */ o(oe, { children: n("select.noOptions") })
266
+ ] })
267
+ ] });
268
+ }, yo = ({
269
+ handleCloseModal: c
270
+ }) => {
271
+ const i = De(), { client: l } = Ne();
272
+ ke();
273
+ const { showToast: g } = Ue(), e = J(), { config: n, user: r, selectedUser: t, langSource: f } = Q(
274
+ (d) => d.chatSettingStore
275
+ ), U = Q((d) => d.call.phase), [b, w] = I(!1), v = ae(null), x = n?.videoCalls, C = n?.e2ee?.enabled === !0, S = x?.enabled === !0 && !!x?.livekitUrl?.trim() && (x?.allowedRoomTypes || ["private"]).includes("private"), s = S && x?.enableAudioCalls === !0, N = U !== "idle", F = y(() => {
276
+ i(Fe()), c();
277
+ }, []), a = y(() => {
278
+ Pe.performLogout();
279
+ }, []), P = M(
280
+ () => [
281
+ {
282
+ label: e("action.logOut"),
283
+ icon: /* @__PURE__ */ o(Ae, {}),
284
+ onClick: () => {
285
+ a();
286
+ },
287
+ styles: { color: "var(--ethora-color-danger, #D92D20)" }
288
+ }
289
+ ],
290
+ [a, e]
291
+ ), ie = (d) => {
292
+ i(Ve(d.id));
293
+ }, le = y(() => {
294
+ w(!0);
295
+ }, []), ce = async (d, h) => {
296
+ try {
297
+ const p = We(
298
+ d,
299
+ n?.xmppSettings?.conference,
300
+ h
301
+ );
302
+ if (!p || !p.jid)
303
+ return console.error(
304
+ "handleRoomCreation: failed to normalize new private room",
305
+ d
306
+ ), g({
307
+ id: Date.now().toString(),
308
+ title: e("toast.error"),
309
+ message: e("toast.couldNotOpenPrivateChat"),
310
+ type: "error",
311
+ duration: 4e3
312
+ }), null;
313
+ if (i(
314
+ Je({
315
+ room: p,
316
+ xmpp: l
317
+ })
318
+ ), l && p.jid) {
319
+ try {
320
+ await l.presenceInRoomStanza(p.jid);
321
+ } catch (k) {
322
+ console.warn("presenceInRoomStanza failed (non-fatal):", k);
323
+ }
324
+ try {
325
+ l.getHistoryStanza(p.jid, 10);
326
+ } catch (k) {
327
+ console.warn("getHistoryStanza failed (non-fatal):", k);
328
+ }
329
+ }
330
+ return i(Ke({ roomJID: p.jid })), g({
331
+ id: Date.now().toString(),
332
+ title: e("toast.success"),
333
+ message: e("toast.roomCreatedSuccess"),
334
+ type: "success",
335
+ duration: 3e3
336
+ }), { jid: p.jid };
337
+ } catch (p) {
338
+ return console.error("Error handling room creation:", p), null;
339
+ }
340
+ }, z = y(async (d = !1) => {
341
+ const h = String(
342
+ t?.name || `${t?.firstName || ""} ${t?.lastName || ""}`
343
+ ).trim() || "";
344
+ if (n?.newArch !== !1) {
345
+ const T = t?.xmppUsername || t?.userJID || t?.id;
346
+ if (!T)
347
+ return g({
348
+ id: Date.now().toString(),
349
+ title: e("toast.error"),
350
+ message: e("toast.couldNotResolveRecipient"),
351
+ type: "error",
352
+ duration: 4e3
353
+ }), null;
354
+ try {
355
+ const B = await Re(T, d), L = await ce(B, 2);
356
+ return L?.jid ? {
357
+ jid: L.jid,
358
+ bareName: L.jid.split("@")[0],
359
+ peerXmppUsername: String(T).split("@")[0],
360
+ peerDisplay: h
361
+ } : null;
362
+ } catch (B) {
363
+ return console.error("postPrivateRoom failed:", B), g({
364
+ id: Date.now().toString(),
365
+ title: e("toast.error"),
366
+ message: B?.message || e("toast.failedToCreatePrivateChat"),
367
+ type: "error",
368
+ duration: 4e3
369
+ }), null;
370
+ }
371
+ }
372
+ const p = Y(t.id), ue = [Y(r.defaultWallet.walletAddress), p].sort().join(".").toLowerCase(), _ = [r.firstName, t.name?.split(" ")?.[0]].sort().join(" and "), A = await l.createPrivateRoomStanza(
373
+ _,
374
+ `Private chat ${_}`,
375
+ ue
376
+ );
377
+ return A && (await l.inviteRoomRequestStanza(p, A), await l.getRoomsStanza()), A ? {
378
+ jid: A,
379
+ bareName: String(A).split("@")[0],
380
+ peerXmppUsername: p,
381
+ peerDisplay: h
382
+ } : null;
383
+ }, [t, n?.newArch, l, r]), j = y(
384
+ async (d) => {
385
+ g({
386
+ id: Date.now().toString(),
387
+ title: e("toast.roomCreationTitle"),
388
+ message: e("toast.roomCreating"),
389
+ type: "info",
390
+ duration: 3e3
391
+ }), await z(d), i(Z());
392
+ },
393
+ [z, i, g, e]
394
+ ), K = y(
395
+ () => j(!1),
396
+ [j]
397
+ ), V = y(
398
+ () => j(!0),
399
+ [j]
400
+ ), O = y(
401
+ async (d) => {
402
+ const h = await z();
403
+ if (!h) return;
404
+ const p = h.peerDisplay || h.bareName;
405
+ i(
406
+ ze({
407
+ roomJid: h.jid,
408
+ roomName: p,
409
+ roomBareName: h.bareName,
410
+ kind: d,
411
+ peerXmppUsername: h.peerXmppUsername || null
412
+ })
413
+ ), h.peerXmppUsername && je(d, {
414
+ peerXmppUsername: h.peerXmppUsername,
415
+ roomBareName: h.bareName
416
+ }), i(Z());
417
+ try {
418
+ await Be(h.bareName, { kind: d });
419
+ } catch (k) {
420
+ const q = k instanceof Error ? k.message : e("toast.failedToCreateCall");
421
+ i($e(q));
422
+ }
423
+ },
424
+ [z, i, e]
425
+ ), m = t ?? r, de = () => {
426
+ if (f)
427
+ return ee.find((d) => d.id === f);
428
+ }, pe = t ? void 0 : /* @__PURE__ */ u($, { children: [
429
+ /* @__PURE__ */ o(X, { onClick: le, "aria-label": e("action.editProfile"), children: /* @__PURE__ */ o(Ee, { color: "var(--ethora-color-text-muted, #8C8C8C)" }) }),
430
+ /* @__PURE__ */ o(
431
+ Oe,
432
+ {
433
+ options: P,
434
+ position: "left",
435
+ menuIcon: /* @__PURE__ */ o(Te, {})
436
+ }
437
+ )
438
+ ] }), me = /* @__PURE__ */ u($, { children: [
439
+ /* @__PURE__ */ o(
440
+ X,
441
+ {
442
+ variant: "ghost",
443
+ onClick: () => w(!1),
444
+ style: { width: "auto", padding: "0 var(--ethora-space-3, 12px)" },
445
+ children: e("action.cancel")
446
+ }
447
+ ),
448
+ /* @__PURE__ */ o(
449
+ X,
450
+ {
451
+ variant: "filled",
452
+ onClick: () => {
453
+ v.current?.save();
454
+ },
455
+ style: { width: "auto", padding: "0 var(--ethora-space-4, 16px)" },
456
+ children: e("action.save")
457
+ }
458
+ )
459
+ ] }), G = t && t.xmppUsername !== r.xmppUsername && !n?.disableProfilesInteractions, he = M(
460
+ () => /* @__PURE__ */ u($, { children: [
461
+ /* @__PURE__ */ u(ne, { children: [
462
+ /* @__PURE__ */ o(
463
+ re,
464
+ {
465
+ icon: m?.profileImage ?? null,
466
+ name: m?.name ?? m?.firstName,
467
+ size: 96
468
+ }
469
+ ),
470
+ /* @__PURE__ */ o(Ye, { children: m?.name ? `${m?.name}` : `${m?.firstName} ${m?.lastName}` })
471
+ ] }),
472
+ /* @__PURE__ */ u(E, { children: [
473
+ /* @__PURE__ */ o(W, { children: e("modal.profile.about") }),
474
+ /* @__PURE__ */ o(
475
+ Ze,
476
+ {
477
+ $empty: !(m?.description && m?.description?.length > 4),
478
+ children: m?.description && m?.description?.length > 4 ? m.description : e("modal.profile.noDescription")
479
+ }
480
+ )
481
+ ] }),
482
+ !t && n?.translates?.enabled && /* @__PURE__ */ u(E, { children: [
483
+ /* @__PURE__ */ o(W, { children: e("modal.profile.preferences") }),
484
+ /* @__PURE__ */ o(Ge, { children: /* @__PURE__ */ u(qe, { children: [
485
+ /* @__PURE__ */ o(_e, { children: e("modal.profile.languageHint") }),
486
+ /* @__PURE__ */ o(
487
+ ho,
488
+ {
489
+ options: ee,
490
+ placeholder: e("language.select"),
491
+ onSelect: ie,
492
+ accentColor: n?.colors?.primary,
493
+ selectedValue: de()
494
+ }
495
+ )
496
+ ] }) })
497
+ ] }),
498
+ G && /* @__PURE__ */ u(E, { children: [
499
+ /* @__PURE__ */ o(W, { children: e("modal.profile.actions") }),
500
+ /* @__PURE__ */ u(eo, { children: [
501
+ /* @__PURE__ */ o(
502
+ R,
503
+ {
504
+ StartIcon: /* @__PURE__ */ o(Le, {}),
505
+ onClick: K,
506
+ variant: "filled",
507
+ children: e("action.message")
508
+ }
509
+ ),
510
+ C && /* @__PURE__ */ o(
511
+ R,
512
+ {
513
+ StartIcon: /* @__PURE__ */ o(Me, { color: "var(--ethora-color-text-on-primary, #FFFFFF)" }),
514
+ onClick: V,
515
+ variant: "filled",
516
+ children: e("action.encryptedMessage")
517
+ }
518
+ ),
519
+ S && /* @__PURE__ */ o(
520
+ R,
521
+ {
522
+ StartIcon: /* @__PURE__ */ o(He, { color: "var(--ethora-color-text-on-primary, #FFFFFF)" }),
523
+ onClick: () => {
524
+ O("video");
525
+ },
526
+ disabled: N,
527
+ variant: "filled",
528
+ children: e(s ? "action.videoCall" : "action.call")
529
+ }
530
+ ),
531
+ s && /* @__PURE__ */ o(
532
+ R,
533
+ {
534
+ StartIcon: /* @__PURE__ */ o(Xe, { color: "var(--ethora-color-text-on-primary, #FFFFFF)" }),
535
+ onClick: () => {
536
+ O("audio");
537
+ },
538
+ disabled: N,
539
+ variant: "filled",
540
+ children: e("action.audioCall")
541
+ }
542
+ ),
543
+ /* @__PURE__ */ o(
544
+ R,
545
+ {
546
+ onClick: () => oo(t.id),
547
+ variant: "outlined",
548
+ children: e("action.copyUserId")
549
+ }
550
+ )
551
+ ] })
552
+ ] })
553
+ ] }),
554
+ [
555
+ m,
556
+ S,
557
+ s,
558
+ N,
559
+ O,
560
+ K,
561
+ V,
562
+ C,
563
+ t,
564
+ G,
565
+ r,
566
+ n,
567
+ f,
568
+ e
569
+ ]
570
+ ), fe = M(
571
+ () => /* @__PURE__ */ o(
572
+ se,
573
+ {
574
+ ref: v,
575
+ setIsEditing: w,
576
+ modalUser: m,
577
+ config: n
578
+ }
579
+ ),
580
+ [m]
581
+ );
582
+ return /* @__PURE__ */ o(
583
+ Qe,
584
+ {
585
+ title: e("modal.profile.title"),
586
+ onClose: F,
587
+ headerActions: b ? me : pe,
588
+ children: b ? fe : he
589
+ }
590
+ );
591
+ };
592
+ export {
593
+ yo as default
594
+ };
@@ -1,11 +1,11 @@
1
- import { jsx as i, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as r } from "react/jsx-runtime";
2
2
  import m, { useCallback as D, useMemo as h } from "react";
3
- import { n as g, a as p, o as w, M as r } from "./main-DmtEeYji.js";
4
- import { S as b, D as u, a as k, b as y, c as S, d as f } from "./SideDrawer-C_nWZRwH.js";
3
+ import { p, a as g, q as w, M as l } from "./main-BHtKhpBZ.js";
4
+ import { S as b, D as u, a as k, b as y, c as S, d as f } from "./SideDrawer-DLqEOqAi.js";
5
5
  const T = ({
6
- handleCloseModal: l
6
+ handleCloseModal: n
7
7
  }) => {
8
- const t = g(), s = p(), o = D(
8
+ const t = p(), s = g(), o = D(
9
9
  (e) => {
10
10
  s(w(e));
11
11
  },
@@ -16,12 +16,12 @@ const T = ({
16
16
  title: t("settings.section.privacy"),
17
17
  rows: [
18
18
  {
19
- key: r.MANAGE_DATA,
19
+ key: l.MANAGE_DATA,
20
20
  label: t("settings.manageData.title"),
21
21
  hint: t("settings.manageData.rowHint")
22
22
  },
23
23
  {
24
- key: r.VISIBILITY,
24
+ key: l.VISIBILITY,
25
25
  label: t("settings.visibility.title"),
26
26
  hint: t("settings.visibility.rowHint")
27
27
  }
@@ -30,9 +30,9 @@ const T = ({
30
30
  ],
31
31
  [t]
32
32
  );
33
- return /* @__PURE__ */ i(b, { title: t("settings.menu.title"), onClose: l, children: c.map((e) => /* @__PURE__ */ n(u, { children: [
33
+ return /* @__PURE__ */ i(b, { title: t("settings.menu.title"), onClose: n, children: c.map((e) => /* @__PURE__ */ r(u, { children: [
34
34
  /* @__PURE__ */ i(k, { children: e.title }),
35
- /* @__PURE__ */ i(y, { children: e.rows.map((a, d) => /* @__PURE__ */ n(m.Fragment, { children: [
35
+ /* @__PURE__ */ i(y, { children: e.rows.map((a, d) => /* @__PURE__ */ r(m.Fragment, { children: [
36
36
  d > 0 && /* @__PURE__ */ i(S, {}),
37
37
  /* @__PURE__ */ i(
38
38
  f,