sceyt-chat-react-uikit 1.8.8 → 1.8.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +409 -339
- package/index.modern.js +409 -339
- package/package.json +1 -1
package/index.modern.js
CHANGED
|
@@ -16051,6 +16051,75 @@ var createAttachmentUnavailableError = function createAttachmentUnavailableError
|
|
|
16051
16051
|
return error;
|
|
16052
16052
|
};
|
|
16053
16053
|
|
|
16054
|
+
var preparations = new Map();
|
|
16055
|
+
var beginVideoPreparation = function beginVideoPreparation(tid, file) {
|
|
16056
|
+
var resolvePreparation;
|
|
16057
|
+
var promise = new Promise(function (resolve) {
|
|
16058
|
+
resolvePreparation = resolve;
|
|
16059
|
+
});
|
|
16060
|
+
preparations.set(tid, {
|
|
16061
|
+
file: file,
|
|
16062
|
+
status: 'loading',
|
|
16063
|
+
promise: promise,
|
|
16064
|
+
resolve: resolvePreparation
|
|
16065
|
+
});
|
|
16066
|
+
};
|
|
16067
|
+
var completeVideoPreparation = function completeVideoPreparation(tid, preparation) {
|
|
16068
|
+
var entry = preparations.get(tid);
|
|
16069
|
+
if (!entry || entry.status !== 'loading') return;
|
|
16070
|
+
var completed = _extends({}, preparation, {
|
|
16071
|
+
status: 'ready'
|
|
16072
|
+
});
|
|
16073
|
+
preparations.set(tid, _extends({}, entry, completed));
|
|
16074
|
+
entry.resolve(completed);
|
|
16075
|
+
};
|
|
16076
|
+
var failVideoPreparation = function failVideoPreparation(tid) {
|
|
16077
|
+
var entry = preparations.get(tid);
|
|
16078
|
+
if (!entry || entry.status !== 'loading') return;
|
|
16079
|
+
var failed = {
|
|
16080
|
+
file: entry.file,
|
|
16081
|
+
status: 'failed'
|
|
16082
|
+
};
|
|
16083
|
+
preparations.set(tid, _extends({}, entry, failed));
|
|
16084
|
+
entry.resolve(failed);
|
|
16085
|
+
};
|
|
16086
|
+
var waitForVideoPreparation = function waitForVideoPreparation(tid, timeoutMs) {
|
|
16087
|
+
try {
|
|
16088
|
+
var _temp2 = function _temp2(_result) {
|
|
16089
|
+
return _exit ? _result : Promise.resolve(new Promise(function (resolve) {
|
|
16090
|
+
var timeout = setTimeout(function () {
|
|
16091
|
+
return resolve({
|
|
16092
|
+
file: entry.file,
|
|
16093
|
+
status: 'failed'
|
|
16094
|
+
});
|
|
16095
|
+
}, timeoutMs);
|
|
16096
|
+
entry.promise.then(function (prepared) {
|
|
16097
|
+
clearTimeout(timeout);
|
|
16098
|
+
resolve(prepared);
|
|
16099
|
+
});
|
|
16100
|
+
}));
|
|
16101
|
+
};
|
|
16102
|
+
var _exit = false;
|
|
16103
|
+
var entry = preparations.get(tid);
|
|
16104
|
+
if (!entry) return Promise.resolve(null);
|
|
16105
|
+
if (entry.status !== 'loading') return Promise.resolve(entry);
|
|
16106
|
+
var _temp = function () {
|
|
16107
|
+
if (timeoutMs === undefined) {
|
|
16108
|
+
return Promise.resolve(entry.promise).then(function (_await$entry$promise) {
|
|
16109
|
+
_exit = true;
|
|
16110
|
+
return _await$entry$promise;
|
|
16111
|
+
});
|
|
16112
|
+
}
|
|
16113
|
+
}();
|
|
16114
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
|
|
16115
|
+
} catch (e) {
|
|
16116
|
+
return Promise.reject(e);
|
|
16117
|
+
}
|
|
16118
|
+
};
|
|
16119
|
+
var clearVideoPreparation = function clearVideoPreparation(tid) {
|
|
16120
|
+
preparations["delete"](tid);
|
|
16121
|
+
};
|
|
16122
|
+
|
|
16054
16123
|
var _excluded$1 = ["lastMessage"];
|
|
16055
16124
|
var _marked = /*#__PURE__*/_regenerator().m(setMessageListLoading),
|
|
16056
16125
|
_marked2 = /*#__PURE__*/_regenerator().m(cancelChannelMessageProcesses),
|
|
@@ -16120,6 +16189,31 @@ var queuedPrefetchRequests = new Map();
|
|
|
16120
16189
|
var prefetchCompletionWaiters = new Map();
|
|
16121
16190
|
var prefetchCancelVersions = new Map();
|
|
16122
16191
|
var ACTIVE_CHANNEL_RECONNECT_REFRESH_TIMEOUT_MS = 1500;
|
|
16192
|
+
var applyPreparedVideoAttachments = function applyPreparedVideoAttachments(attachments) {
|
|
16193
|
+
try {
|
|
16194
|
+
return Promise.resolve(Promise.all(attachments.map(function (attachment) {
|
|
16195
|
+
try {
|
|
16196
|
+
if (!attachment.tid) return Promise.resolve();
|
|
16197
|
+
return Promise.resolve(waitForVideoPreparation(attachment.tid)).then(function (prepared) {
|
|
16198
|
+
if ((prepared === null || prepared === void 0 ? void 0 : prepared.status) === 'ready' && prepared.metadata) {
|
|
16199
|
+
attachment.url = prepared.file;
|
|
16200
|
+
attachment.data = prepared.file;
|
|
16201
|
+
attachment.name = prepared.file.name;
|
|
16202
|
+
attachment.size = prepared.file.size;
|
|
16203
|
+
attachment.metadata = prepared.metadata;
|
|
16204
|
+
}
|
|
16205
|
+
clearVideoPreparation(attachment.tid);
|
|
16206
|
+
});
|
|
16207
|
+
} catch (e) {
|
|
16208
|
+
return Promise.reject(e);
|
|
16209
|
+
}
|
|
16210
|
+
}))).then(function () {
|
|
16211
|
+
return attachments;
|
|
16212
|
+
});
|
|
16213
|
+
} catch (e) {
|
|
16214
|
+
return Promise.reject(e);
|
|
16215
|
+
}
|
|
16216
|
+
};
|
|
16123
16217
|
var activeDisplayedCacheKey = null;
|
|
16124
16218
|
var updateTabAttachmentCache = function updateTabAttachmentCache(channelId, attachments, messageUser) {
|
|
16125
16219
|
if (!(attachments !== null && attachments !== void 0 && attachments.length)) return;
|
|
@@ -17239,7 +17333,7 @@ function sendMessage(action) {
|
|
|
17239
17333
|
messagesToSend.push(messageToSend);
|
|
17240
17334
|
case 12:
|
|
17241
17335
|
_loop3 = /*#__PURE__*/_regenerator().m(function _callee4() {
|
|
17242
|
-
var messageAttachment, messageToSend, pendingState, messageCopy, _getStoredChannel6, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, activeChannelId, messageToUpdate, resolvedLastMessage, channelUpdateParam, _channel2, _messageToSend2, isErrorResendable, _messageToSend$attach, _iterator2, _step2, att, _t;
|
|
17336
|
+
var messageAttachment, messageToSend, pendingState, pendingAttachments, messageCopy, _getStoredChannel6, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, activeChannelId, messageToUpdate, resolvedLastMessage, channelUpdateParam, _channel2, _messageToSend2, isErrorResendable, _messageToSend$attach, _iterator2, _step2, att, _t;
|
|
17243
17337
|
return _regenerator().w(function (_context12) {
|
|
17244
17338
|
while (1) switch (_context12.p = _context12.n) {
|
|
17245
17339
|
case 0:
|
|
@@ -17262,21 +17356,40 @@ function sendMessage(action) {
|
|
|
17262
17356
|
messageToSend = _extends({}, messageToSend, pendingState);
|
|
17263
17357
|
case 2:
|
|
17264
17358
|
_context12.p = 2;
|
|
17359
|
+
_context12.n = 3;
|
|
17360
|
+
return call(applyPreparedVideoAttachments, messageAttachment);
|
|
17361
|
+
case 3:
|
|
17362
|
+
pendingAttachments = messageAttachment.map(function (attachment) {
|
|
17363
|
+
return _extends({}, attachment, {
|
|
17364
|
+
data: attachment.data || attachment.url
|
|
17365
|
+
});
|
|
17366
|
+
});
|
|
17367
|
+
updateMessageOnMap(channel.id, {
|
|
17368
|
+
messageId: messageToSend.tid,
|
|
17369
|
+
params: {
|
|
17370
|
+
attachments: pendingAttachments
|
|
17371
|
+
}
|
|
17372
|
+
});
|
|
17373
|
+
_context12.n = 4;
|
|
17374
|
+
return put(updateMessageAC(messageToSend.tid, {
|
|
17375
|
+
attachments: pendingAttachments
|
|
17376
|
+
}));
|
|
17377
|
+
case 4:
|
|
17265
17378
|
messageCopy = JSON.parse(JSON.stringify(messagesToSend[_i2]));
|
|
17266
17379
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
17267
|
-
_context12.n =
|
|
17380
|
+
_context12.n = 17;
|
|
17268
17381
|
break;
|
|
17269
17382
|
}
|
|
17270
17383
|
_attachmentsToSend = messageAttachment;
|
|
17271
17384
|
if (!customUploader) {
|
|
17272
|
-
_context12.n =
|
|
17385
|
+
_context12.n = 6;
|
|
17273
17386
|
break;
|
|
17274
17387
|
}
|
|
17275
|
-
_context12.n =
|
|
17388
|
+
_context12.n = 5;
|
|
17276
17389
|
return call(handleUploadAttachments, messageAttachment || [], messageCopy, channel);
|
|
17277
|
-
case
|
|
17390
|
+
case 5:
|
|
17278
17391
|
_attachmentsToSend = _context12.v;
|
|
17279
|
-
case
|
|
17392
|
+
case 6:
|
|
17280
17393
|
linkAttachmentToSend = null;
|
|
17281
17394
|
if (_i2 === 0 && linkAttachment) {
|
|
17282
17395
|
linkAttachmentBuilder = channel.createAttachmentBuilder(linkAttachment.data, linkAttachment.type);
|
|
@@ -17291,40 +17404,40 @@ function sendMessage(action) {
|
|
|
17291
17404
|
attachments: [].concat(_attachmentsToSend)
|
|
17292
17405
|
});
|
|
17293
17406
|
}
|
|
17294
|
-
_context12.n =
|
|
17407
|
+
_context12.n = 7;
|
|
17295
17408
|
return call(channel.sendMessage, messageToSend);
|
|
17296
|
-
case
|
|
17409
|
+
case 7:
|
|
17297
17410
|
messageResponse = _context12.v;
|
|
17298
17411
|
if (messageToSend.tid) {
|
|
17299
17412
|
autoResendAttempts["delete"](messageToSend.tid);
|
|
17300
17413
|
}
|
|
17301
17414
|
if (!customUploader) {
|
|
17302
|
-
_context12.n =
|
|
17415
|
+
_context12.n = 12;
|
|
17303
17416
|
break;
|
|
17304
17417
|
}
|
|
17305
17418
|
k = 0;
|
|
17306
|
-
case
|
|
17419
|
+
case 8:
|
|
17307
17420
|
if (!(k < messageAttachment.length)) {
|
|
17308
|
-
_context12.n =
|
|
17421
|
+
_context12.n = 12;
|
|
17309
17422
|
break;
|
|
17310
17423
|
}
|
|
17311
17424
|
messageResponse.attachments[k] = _extends({}, messageResponse.attachments[k], {
|
|
17312
17425
|
user: JSON.parse(JSON.stringify(messageResponse.user)),
|
|
17313
17426
|
tid: messageAttachment[k].tid
|
|
17314
17427
|
});
|
|
17315
|
-
_context12.n =
|
|
17428
|
+
_context12.n = 9;
|
|
17316
17429
|
return put(removeAttachmentProgressAC(messageAttachment[k].tid));
|
|
17317
|
-
case
|
|
17318
|
-
_context12.n =
|
|
17430
|
+
case 9:
|
|
17431
|
+
_context12.n = 10;
|
|
17319
17432
|
return put(removeAttachmentUploadingStateAC(messageAttachment[k].tid));
|
|
17320
|
-
case
|
|
17433
|
+
case 10:
|
|
17321
17434
|
deletePendingAttachment(messageAttachment[k].tid);
|
|
17322
17435
|
releaseBlobUrls(["compose_" + messageAttachment[k].tid]);
|
|
17323
|
-
case
|
|
17436
|
+
case 11:
|
|
17324
17437
|
k++;
|
|
17325
|
-
_context12.n =
|
|
17438
|
+
_context12.n = 8;
|
|
17326
17439
|
break;
|
|
17327
|
-
case
|
|
17440
|
+
case 12:
|
|
17328
17441
|
attachmentsToUpdate = [];
|
|
17329
17442
|
if (messageResponse.attachments && messageResponse.attachments.length > 0) {
|
|
17330
17443
|
currentAttachmentsMap = {};
|
|
@@ -17351,25 +17464,25 @@ function sendMessage(action) {
|
|
|
17351
17464
|
});
|
|
17352
17465
|
activeChannelId = getActiveChannelId();
|
|
17353
17466
|
if (!(activeChannelId === channel.id)) {
|
|
17354
|
-
_context12.n =
|
|
17467
|
+
_context12.n = 13;
|
|
17355
17468
|
break;
|
|
17356
17469
|
}
|
|
17357
|
-
_context12.n =
|
|
17470
|
+
_context12.n = 13;
|
|
17358
17471
|
return put(updateMessageAC(messageToSend.tid, messageUpdateData, true));
|
|
17359
|
-
case
|
|
17472
|
+
case 13:
|
|
17360
17473
|
messageToUpdate = JSON.parse(JSON.stringify(messageResponse));
|
|
17361
17474
|
addConfirmedMessageToCache(channel.id, messageToUpdate);
|
|
17362
17475
|
updateTabAttachmentCache(channel.id, attachmentsToUpdate, messageResponse.user);
|
|
17363
17476
|
if (!channel.unread) {
|
|
17364
|
-
_context12.n =
|
|
17477
|
+
_context12.n = 14;
|
|
17365
17478
|
break;
|
|
17366
17479
|
}
|
|
17367
|
-
_context12.n =
|
|
17480
|
+
_context12.n = 14;
|
|
17368
17481
|
return put(markChannelAsReadAC(channel.id));
|
|
17369
|
-
case
|
|
17482
|
+
case 14:
|
|
17370
17483
|
resolvedLastMessage = getResolvedChannelLastMessage(channel.id, messageToUpdate, messageToSend);
|
|
17371
17484
|
if (!lastMessageNeedsUpdate((_getStoredChannel6 = getStoredChannel(channel.id)) === null || _getStoredChannel6 === void 0 ? void 0 : _getStoredChannel6.lastMessage, resolvedLastMessage)) {
|
|
17372
|
-
_context12.n =
|
|
17485
|
+
_context12.n = 16;
|
|
17373
17486
|
break;
|
|
17374
17487
|
}
|
|
17375
17488
|
updateChannelLastMessageOnAllChannels(channel.id, resolvedLastMessage);
|
|
@@ -17377,54 +17490,54 @@ function sendMessage(action) {
|
|
|
17377
17490
|
lastMessage: resolvedLastMessage,
|
|
17378
17491
|
lastReactedMessage: null
|
|
17379
17492
|
};
|
|
17380
|
-
_context12.n =
|
|
17493
|
+
_context12.n = 15;
|
|
17381
17494
|
return put(updateChannelDataAC(channel.id, channelUpdateParam, true));
|
|
17382
|
-
case 13:
|
|
17383
|
-
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
17384
|
-
case 14:
|
|
17385
|
-
_context12.n = 16;
|
|
17386
|
-
break;
|
|
17387
17495
|
case 15:
|
|
17388
|
-
|
|
17496
|
+
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
17389
17497
|
case 16:
|
|
17390
|
-
_context12.n =
|
|
17498
|
+
_context12.n = 18;
|
|
17391
17499
|
break;
|
|
17392
17500
|
case 17:
|
|
17393
|
-
|
|
17501
|
+
throw new Error('Connection required to send message');
|
|
17502
|
+
case 18:
|
|
17503
|
+
_context12.n = 23;
|
|
17504
|
+
break;
|
|
17505
|
+
case 19:
|
|
17506
|
+
_context12.p = 19;
|
|
17394
17507
|
_t = _context12.v;
|
|
17395
17508
|
isErrorResendable = isResendableError(_t === null || _t === void 0 ? void 0 : _t.type);
|
|
17396
17509
|
if (!((_channel2 = channel) !== null && _channel2 !== void 0 && _channel2.id && (_messageToSend2 = messageToSend) !== null && _messageToSend2 !== void 0 && _messageToSend2.tid)) {
|
|
17397
|
-
_context12.n =
|
|
17510
|
+
_context12.n = 23;
|
|
17398
17511
|
break;
|
|
17399
17512
|
}
|
|
17400
17513
|
log.error('Error on uploading attachment', messageToSend.tid, _t);
|
|
17401
17514
|
if (!((_messageToSend$attach = messageToSend.attachments) !== null && _messageToSend$attach !== void 0 && _messageToSend$attach.length)) {
|
|
17402
|
-
_context12.n =
|
|
17515
|
+
_context12.n = 22;
|
|
17403
17516
|
break;
|
|
17404
17517
|
}
|
|
17405
17518
|
_iterator2 = _createForOfIteratorHelperLoose(messageToSend.attachments);
|
|
17406
|
-
case
|
|
17519
|
+
case 20:
|
|
17407
17520
|
if ((_step2 = _iterator2()).done) {
|
|
17408
|
-
_context12.n =
|
|
17521
|
+
_context12.n = 22;
|
|
17409
17522
|
break;
|
|
17410
17523
|
}
|
|
17411
17524
|
att = _step2.value;
|
|
17412
17525
|
if (!att.tid) {
|
|
17413
|
-
_context12.n =
|
|
17526
|
+
_context12.n = 21;
|
|
17414
17527
|
break;
|
|
17415
17528
|
}
|
|
17416
|
-
_context12.n =
|
|
17529
|
+
_context12.n = 21;
|
|
17417
17530
|
return put(updateAttachmentUploadingStateAC(UPLOAD_STATE.FAIL, att.tid));
|
|
17418
|
-
case
|
|
17419
|
-
_context12.n =
|
|
17531
|
+
case 21:
|
|
17532
|
+
_context12.n = 20;
|
|
17420
17533
|
break;
|
|
17421
|
-
case
|
|
17422
|
-
_context12.n =
|
|
17534
|
+
case 22:
|
|
17535
|
+
_context12.n = 23;
|
|
17423
17536
|
return call(syncFailedMessageState, channel, messageToSend.tid, pendingMessages[_i2] || messageToSend, isErrorResendable);
|
|
17424
|
-
case
|
|
17537
|
+
case 23:
|
|
17425
17538
|
return _context12.a(2);
|
|
17426
17539
|
}
|
|
17427
|
-
}, _callee4, null, [[2,
|
|
17540
|
+
}, _callee4, null, [[2, 19]]);
|
|
17428
17541
|
});
|
|
17429
17542
|
_i2 = 0;
|
|
17430
17543
|
case 13:
|
|
@@ -39563,7 +39676,7 @@ var VideoIcon = styled.div(_templateObject8$a || (_templateObject8$a = _taggedTe
|
|
|
39563
39676
|
return bg;
|
|
39564
39677
|
});
|
|
39565
39678
|
|
|
39566
|
-
var _templateObject$z, _templateObject2$v, _templateObject3$p, _templateObject4$l, _templateObject5$h, _templateObject6$e, _templateObject7$d, _templateObject8$b, _templateObject9$9, _templateObject0$8, _templateObject1$8, _templateObject10$6, _templateObject11$5;
|
|
39679
|
+
var _templateObject$z, _templateObject2$v, _templateObject3$p, _templateObject4$l, _templateObject5$h, _templateObject6$e, _templateObject7$d, _templateObject8$b, _templateObject9$9, _templateObject0$8, _templateObject1$8, _templateObject10$6, _templateObject11$5, _templateObject12$4, _templateObject13$4;
|
|
39567
39680
|
var Attachment = function Attachment(_ref) {
|
|
39568
39681
|
var attachment = _ref.attachment,
|
|
39569
39682
|
_ref$isPreview = _ref.isPreview,
|
|
@@ -40362,7 +40475,9 @@ var Attachment = function Attachment(_ref) {
|
|
|
40362
40475
|
border: selectedFileAttachmentsBoxBorder || (theme === THEME.DARK ? 'none' : ''),
|
|
40363
40476
|
width: fileAttachmentWidth,
|
|
40364
40477
|
borderColor: borderColor
|
|
40365
|
-
},
|
|
40478
|
+
}, attachment.thumbnailState === 'loading' ? (/*#__PURE__*/React__default.createElement(FileThumbnailSkeleton, {
|
|
40479
|
+
color: overlayBackground2
|
|
40480
|
+
})) : attachmentThumb ? (/*#__PURE__*/React__default.createElement(FileThumbnail, {
|
|
40366
40481
|
src: withPrefix ? "data:image/jpeg;base64," + attachmentThumb : attachmentThumb,
|
|
40367
40482
|
loading: 'lazy',
|
|
40368
40483
|
decoding: 'async',
|
|
@@ -40472,18 +40587,26 @@ var AttachmentImgCont = styled.div(_templateObject2$v || (_templateObject2$v = _
|
|
|
40472
40587
|
return props.isPreview && "\n width: 48px;\n min-width: 48px;\n height: 48px;\n ";
|
|
40473
40588
|
});
|
|
40474
40589
|
var FileThumbnail = styled.img(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteralLoose(["\n min-width: 40px;\n max-width: 40px;\n height: 40px;\n object-fit: cover;\n border-radius: 8px;\n"])));
|
|
40475
|
-
var
|
|
40590
|
+
var fileThumbnailShimmer = keyframes(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n 0% { background-position: -120px 0; }\n 100% { background-position: 120px 0; }\n"])));
|
|
40591
|
+
var FileThumbnailSkeleton = styled.div(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteralLoose(["\n min-width: 40px;\n max-width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ", ";\n background-image: linear-gradient(\n 90deg,\n ", ",\n rgba(255, 255, 255, 0.55),\n ", "\n );\n background-size: 240px 100%;\n animation: ", " 1.1s ease infinite;\n"])), function (props) {
|
|
40592
|
+
return props.color;
|
|
40593
|
+
}, function (props) {
|
|
40594
|
+
return props.color;
|
|
40595
|
+
}, function (props) {
|
|
40596
|
+
return props.color;
|
|
40597
|
+
}, fileThumbnailShimmer);
|
|
40598
|
+
var DownloadFile$1 = styled.span(_templateObject6$e || (_templateObject6$e = _taggedTemplateLiteralLoose(["\n display: none;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n background-color: ", ";\n min-width: 40px;\n max-width: 40px;\n height: 40px;\n position: ", ";\n border-radius: ", ";\n\n & > svg {\n width: 20px;\n height: 20px;\n }\n"])), function (props) {
|
|
40476
40599
|
return props.backgroundColor;
|
|
40477
40600
|
}, function (props) {
|
|
40478
40601
|
return props.widthThumb && 'absolute';
|
|
40479
40602
|
}, function (props) {
|
|
40480
40603
|
return props.widthThumb ? '7.3px' : '50%';
|
|
40481
40604
|
});
|
|
40482
|
-
var ProgressWrapper$1 = styled.span(
|
|
40483
|
-
var SizeProgress = styled.span(
|
|
40605
|
+
var ProgressWrapper$1 = styled.span(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 100%;\n animation: preloader 1.5s linear infinite;\n\n @keyframes preloader {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
|
|
40606
|
+
var SizeProgress = styled.span(_templateObject8$b || (_templateObject8$b = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: -26px;\n background-color: rgba(0, 0, 0, 0.4);\n color: ", ";\n font-size: 12px;\n border-radius: 12px;\n padding: 3px 6px;\n white-space: nowrap;\n"])), function (props) {
|
|
40484
40607
|
return props.color;
|
|
40485
40608
|
});
|
|
40486
|
-
var AttachmentFile$1 = styled.div(
|
|
40609
|
+
var AttachmentFile$1 = styled.div(_templateObject9$9 || (_templateObject9$9 = _taggedTemplateLiteralLoose(["\n display: flex;\n position: relative;\n align-items: center;\n padding: ", ";\n //width: ", ";\n min-width: ", ";\n //height: 70px;\n background: ", ";\n border: ", ";\n box-sizing: border-box;\n margin-right: ", ";\n border-radius: ", ";\n\n ", "\n\n & > ", " svg {\n width: 40px;\n height: 40px;\n }\n"])), function (props) {
|
|
40487
40610
|
return !props.isRepliedMessage && '8px 12px;';
|
|
40488
40611
|
}, function (props) {
|
|
40489
40612
|
return !props.isRepliedMessage && (props.width ? props.width + "px" : '350px');
|
|
@@ -40500,25 +40623,25 @@ var AttachmentFile$1 = styled.div(_templateObject7$d || (_templateObject7$d = _t
|
|
|
40500
40623
|
}, function (props) {
|
|
40501
40624
|
return !props.isRepliedMessage && !props.isPreview && !props.isUploading && "\n &:hover " + DownloadFile$1 + " {\n display: flex;\n }\n\n &:hover " + UploadPercent + " {\n border-radius: 50%\n }\n\n &:hover " + FileThumbnail + " {\n }\n &:hover " + AttachmentIconCont + " {\n display: none;\n }\n ";
|
|
40502
40625
|
}, AttachmentIconCont);
|
|
40503
|
-
var RemoveChosenFile = styled(SvgDeleteUpload)(
|
|
40626
|
+
var RemoveChosenFile = styled(SvgDeleteUpload)(_templateObject0$8 || (_templateObject0$8 = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: 20px;\n height: 20px !important;\n top: -11px;\n right: -11px;\n padding: 2px;\n cursor: pointer;\n color: ", ";\n z-index: 5;\n circle {\n stroke: ", ";\n }\n path {\n stroke: ", ";\n }\n"])), function (props) {
|
|
40504
40627
|
return props.color;
|
|
40505
40628
|
}, function (props) {
|
|
40506
40629
|
return props.$backgroundColor;
|
|
40507
40630
|
}, function (props) {
|
|
40508
40631
|
return props.$backgroundColor;
|
|
40509
40632
|
});
|
|
40510
|
-
var AttachmentName = styled.h3(
|
|
40633
|
+
var AttachmentName = styled.h3(_templateObject1$8 || (_templateObject1$8 = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n font-weight: 500;\n line-height: 18px;\n color: ", ";\n max-width: 275px;\n white-space: nowrap;\n margin: 0;\n"])), function (props) {
|
|
40511
40634
|
return props.color;
|
|
40512
40635
|
});
|
|
40513
|
-
var AttachmentSize = styled.span(
|
|
40636
|
+
var AttachmentSize = styled.span(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose(["\n font-size: 13px;\n color: ", ";\n & > span {\n color: ", ";\n margin-left: 8px;\n }\n"])), function (props) {
|
|
40514
40637
|
return props.color;
|
|
40515
40638
|
}, function (props) {
|
|
40516
40639
|
return props.errorColor;
|
|
40517
40640
|
});
|
|
40518
|
-
var AttachmentFileInfo = styled.div(
|
|
40641
|
+
var AttachmentFileInfo = styled.div(_templateObject11$5 || (_templateObject11$5 = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n ", "\n"])), function (props) {
|
|
40519
40642
|
return props.isPreview && "line-height: 14px;\n max-width: calc(100% - 44px);\n ";
|
|
40520
40643
|
});
|
|
40521
|
-
var AttachmentImg = styled.img(
|
|
40644
|
+
var AttachmentImg = styled.img(_templateObject12$4 || (_templateObject12$4 = _taggedTemplateLiteralLoose(["\n position: ", ";\n border-radius: ", ";\n padding: ", ";\n box-sizing: border-box;\n width: ", ";\n height: ", ";\n object-fit: cover;\n visibility: ", ";\n z-index: 2;\n opacity: ", ";\n transition: opacity 0.3s ease-in-out;\n"])), function (props) {
|
|
40522
40645
|
return props.absolute && 'absolute';
|
|
40523
40646
|
}, function (props) {
|
|
40524
40647
|
return props.isRepliedMessage ? '4px' : props.borderRadius || '6px';
|
|
@@ -40533,7 +40656,7 @@ var AttachmentImg = styled.img(_templateObject10$6 || (_templateObject10$6 = _ta
|
|
|
40533
40656
|
}, function (props) {
|
|
40534
40657
|
return props.$shouldAnimate && !props.$isLoaded ? 0 : 1;
|
|
40535
40658
|
});
|
|
40536
|
-
var VideoCont = styled.div(
|
|
40659
|
+
var VideoCont = styled.div(_templateObject13$4 || (_templateObject13$4 = _taggedTemplateLiteralLoose(["\n position: relative;\n cursor: pointer;\n height: ", ";\n"])), function (props) {
|
|
40537
40660
|
return props.isDetailsView && '100%';
|
|
40538
40661
|
});
|
|
40539
40662
|
|
|
@@ -41916,7 +42039,7 @@ function SvgFilledCheckbox(props) {
|
|
|
41916
42039
|
})));
|
|
41917
42040
|
}
|
|
41918
42041
|
|
|
41919
|
-
var _templateObject$G, _templateObject2$B, _templateObject3$v, _templateObject4$q, _templateObject5$l, _templateObject6$i, _templateObject7$h, _templateObject8$f, _templateObject9$c, _templateObject0$b, _templateObject1$b, _templateObject10$9, _templateObject11$6, _templateObject12$
|
|
42042
|
+
var _templateObject$G, _templateObject2$B, _templateObject3$v, _templateObject4$q, _templateObject5$l, _templateObject6$i, _templateObject7$h, _templateObject8$f, _templateObject9$c, _templateObject0$b, _templateObject1$b, _templateObject10$9, _templateObject11$6, _templateObject12$5;
|
|
41920
42043
|
var PollMessage = function PollMessage(_ref) {
|
|
41921
42044
|
var _poll$voteDetails3, _poll$voteDetails4, _poll$voteDetails5, _poll$voteDetails6, _poll$voteDetails7;
|
|
41922
42045
|
var message = _ref.message,
|
|
@@ -42107,7 +42230,7 @@ var Bar = styled.div(_templateObject10$9 || (_templateObject10$9 = _taggedTempla
|
|
|
42107
42230
|
return p.track;
|
|
42108
42231
|
});
|
|
42109
42232
|
var Fill = styled.div(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n height: 100%;\n border-radius: 6px;\n transition: width 0.3s ease-in-out;\n"])));
|
|
42110
|
-
var UsersContainer = styled.div(_templateObject12$
|
|
42233
|
+
var UsersContainer = styled.div(_templateObject12$5 || (_templateObject12$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-left: auto;\n padding-left: 16px;\n height: max-content;\n cursor: ", ";\n"])), function (p) {
|
|
42111
42234
|
return p.cursor;
|
|
42112
42235
|
});
|
|
42113
42236
|
|
|
@@ -43682,7 +43805,7 @@ function SvgCircleDashed(props) {
|
|
|
43682
43805
|
})));
|
|
43683
43806
|
}
|
|
43684
43807
|
|
|
43685
|
-
var _templateObject$L, _templateObject2$G, _templateObject3$A, _templateObject4$v, _templateObject5$q, _templateObject6$m, _templateObject7$l, _templateObject8$j, _templateObject9$g, _templateObject0$f, _templateObject1$d, _templateObject10$a, _templateObject11$7, _templateObject12$
|
|
43808
|
+
var _templateObject$L, _templateObject2$G, _templateObject3$A, _templateObject4$v, _templateObject5$q, _templateObject6$m, _templateObject7$l, _templateObject8$j, _templateObject9$g, _templateObject0$f, _templateObject1$d, _templateObject10$a, _templateObject11$7, _templateObject12$6, _templateObject13$5;
|
|
43686
43809
|
var defaultFormatDate = function defaultFormatDate(date) {
|
|
43687
43810
|
var m = moment(date);
|
|
43688
43811
|
if (m.isSame(moment(), 'day')) {
|
|
@@ -44305,10 +44428,10 @@ var Content = styled.div(_templateObject1$d || (_templateObject1$d = _taggedTemp
|
|
|
44305
44428
|
});
|
|
44306
44429
|
var P2PStatusList = styled.div(_templateObject10$a || (_templateObject10$a = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n"])));
|
|
44307
44430
|
var P2PStatusRow = styled.div(_templateObject11$7 || (_templateObject11$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 4px;\n height: 48px;\n"])));
|
|
44308
|
-
var P2PStatusLabel = styled.div(_templateObject12$
|
|
44431
|
+
var P2PStatusLabel = styled.div(_templateObject12$6 || (_templateObject12$6 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-family: Inter;\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n"])), function (p) {
|
|
44309
44432
|
return p.color;
|
|
44310
44433
|
});
|
|
44311
|
-
var P2PStatusDate = styled.div(_templateObject13$
|
|
44434
|
+
var P2PStatusDate = styled.div(_templateObject13$5 || (_templateObject13$5 = _taggedTemplateLiteralLoose(["\n color: ", ";\n min-width: max-content;\n font-family: Inter;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n letter-spacing: 0px;\n"])), function (p) {
|
|
44312
44435
|
return p.color;
|
|
44313
44436
|
});
|
|
44314
44437
|
|
|
@@ -52235,7 +52358,7 @@ var SettingItem = styled.div(_templateObject9$i || (_templateObject9$i = _tagged
|
|
|
52235
52358
|
return props.color;
|
|
52236
52359
|
});
|
|
52237
52360
|
|
|
52238
|
-
var _templateObject$W, _templateObject2$R, _templateObject3$I, _templateObject4$C, _templateObject5$x, _templateObject6$t, _templateObject7$q, _templateObject8$n, _templateObject9$j, _templateObject0$h, _templateObject1$f, _templateObject10$c, _templateObject11$9, _templateObject12$
|
|
52361
|
+
var _templateObject$W, _templateObject2$R, _templateObject3$I, _templateObject4$C, _templateObject5$x, _templateObject6$t, _templateObject7$q, _templateObject8$n, _templateObject9$j, _templateObject0$h, _templateObject1$f, _templateObject10$c, _templateObject11$9, _templateObject12$7, _templateObject13$6, _templateObject14$4, _templateObject15$2, _templateObject16$2, _templateObject17$2, _templateObject18$2, _templateObject19$2, _templateObject20$2, _templateObject21$2, _templateObject22$1, _templateObject23$1, _templateObject24$1, _templateObject25$1, _templateObject26$1, _templateObject27$1, _templateObject28$1, _templateObject29$1, _templateObject30$1, _templateObject31$1, _templateObject32$1, _templateObject33$1, _templateObject34$1, _templateObject35$1, _templateObject36$1, _templateObject37$1, _templateObject38$1, _templateObject39$1, _templateObject40$1, _templateObject41$1, _templateObject42, _templateObject43, _templateObject44, _templateObject45;
|
|
52239
52362
|
function AutoFocusPlugin(_ref) {
|
|
52240
52363
|
var messageForReply = _ref.messageForReply;
|
|
52241
52364
|
var _useLexicalComposerCo = useLexicalComposerContext(),
|
|
@@ -52790,7 +52913,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
52790
52913
|
upload: attachment.upload,
|
|
52791
52914
|
metadata: attachment.metadata,
|
|
52792
52915
|
type: attachment.type,
|
|
52793
|
-
size: attachment.size
|
|
52916
|
+
size: attachment.size,
|
|
52917
|
+
thumbnailState: attachment.thumbnailState
|
|
52794
52918
|
};
|
|
52795
52919
|
});
|
|
52796
52920
|
if (viewOnce && canShowViewOnceToggle) {
|
|
@@ -52934,10 +53058,14 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
52934
53058
|
var updatedAttachments = attachmentsUpdate.filter(function (item) {
|
|
52935
53059
|
return item.tid !== attachmentId;
|
|
52936
53060
|
});
|
|
53061
|
+
clearVideoPreparation(attachmentId);
|
|
52937
53062
|
releaseBlobUrls(["compose_" + attachmentId]);
|
|
52938
53063
|
setAttachments(updatedAttachments);
|
|
52939
53064
|
attachmentsUpdate = updatedAttachments;
|
|
52940
53065
|
} else {
|
|
53066
|
+
attachmentsUpdate.forEach(function (attachment) {
|
|
53067
|
+
return clearVideoPreparation(attachment.tid);
|
|
53068
|
+
});
|
|
52941
53069
|
releaseBlobUrls(attachmentsUpdate.map(function (item) {
|
|
52942
53070
|
return "compose_" + item.tid;
|
|
52943
53071
|
}));
|
|
@@ -53169,260 +53297,213 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
53169
53297
|
};
|
|
53170
53298
|
var handleAddAttachment = function handleAddAttachment(file, isMediaAttachment) {
|
|
53171
53299
|
try {
|
|
53172
|
-
var
|
|
53173
|
-
|
|
53174
|
-
|
|
53175
|
-
|
|
53176
|
-
|
|
53177
|
-
|
|
53178
|
-
|
|
53179
|
-
|
|
53180
|
-
|
|
53181
|
-
|
|
53182
|
-
|
|
53183
|
-
|
|
53184
|
-
|
|
53185
|
-
|
|
53186
|
-
|
|
53187
|
-
|
|
53188
|
-
|
|
53189
|
-
|
|
53190
|
-
|
|
53191
|
-
|
|
53192
|
-
|
|
53193
|
-
|
|
53194
|
-
|
|
53195
|
-
|
|
53196
|
-
|
|
53197
|
-
|
|
53198
|
-
|
|
53199
|
-
|
|
53200
|
-
|
|
53201
|
-
|
|
53202
|
-
|
|
53203
|
-
|
|
53204
|
-
|
|
53205
|
-
|
|
53206
|
-
|
|
53207
|
-
|
|
53208
|
-
|
|
53209
|
-
|
|
53210
|
-
|
|
53211
|
-
|
|
53212
|
-
|
|
53213
|
-
|
|
53214
|
-
|
|
53215
|
-
|
|
53216
|
-
|
|
53217
|
-
|
|
53218
|
-
|
|
53219
|
-
|
|
53220
|
-
|
|
53221
|
-
|
|
53222
|
-
|
|
53223
|
-
|
|
53224
|
-
|
|
53225
|
-
|
|
53226
|
-
|
|
53227
|
-
|
|
53228
|
-
|
|
53229
|
-
|
|
53230
|
-
|
|
53231
|
-
|
|
53232
|
-
|
|
53233
|
-
|
|
53234
|
-
|
|
53235
|
-
|
|
53236
|
-
|
|
53237
|
-
|
|
53238
|
-
|
|
53239
|
-
|
|
53240
|
-
|
|
53241
|
-
|
|
53242
|
-
|
|
53243
|
-
|
|
53244
|
-
|
|
53245
|
-
|
|
53246
|
-
|
|
53247
|
-
|
|
53248
|
-
var attachment = {
|
|
53249
|
-
data: file,
|
|
53250
|
-
upload: false,
|
|
53251
|
-
type: isMediaAttachment ? fileType : 'file',
|
|
53252
|
-
attachmentUrl: createComposePreviewUrl(tid, file),
|
|
53253
|
-
tid: tid,
|
|
53254
|
-
size: file.size,
|
|
53255
|
-
metadata: {
|
|
53256
|
-
szw: width,
|
|
53257
|
-
szh: height,
|
|
53258
|
-
tmb: thumb,
|
|
53259
|
-
dur: duration
|
|
53260
|
-
}
|
|
53261
|
-
};
|
|
53262
|
-
handleAttachmentVideoForCache(attachment);
|
|
53263
|
-
setAttachments(function (prevState) {
|
|
53264
|
-
return [].concat(prevState, [attachment]);
|
|
53265
|
-
});
|
|
53266
|
-
});
|
|
53267
|
-
} else {
|
|
53268
|
-
setAttachments(function (prevState) {
|
|
53269
|
-
return [].concat(prevState, [{
|
|
53270
|
-
data: file,
|
|
53271
|
-
upload: false,
|
|
53272
|
-
type: 'file',
|
|
53273
|
-
tid: tid,
|
|
53274
|
-
size: file.size
|
|
53275
|
-
}]);
|
|
53276
|
-
});
|
|
53277
|
-
}
|
|
53278
|
-
}();
|
|
53279
|
-
if (_temp1 && _temp1.then) return _temp1.then(function () {});
|
|
53280
|
-
}
|
|
53281
|
-
}();
|
|
53282
|
-
if (_temp6 && _temp6.then) return _temp6.then(function () {});
|
|
53283
|
-
} else {
|
|
53284
|
-
var _temp9 = function () {
|
|
53285
|
-
if (fileType === 'image') {
|
|
53286
|
-
var _temp7 = function () {
|
|
53287
|
-
if (isMediaAttachment) {
|
|
53288
|
-
return Promise.resolve(createImageThumbnail(file)).then(function (_ref6) {
|
|
53289
|
-
var thumbnail = _ref6.thumbnail,
|
|
53290
|
-
imageWidth = _ref6.imageWidth,
|
|
53291
|
-
imageHeight = _ref6.imageHeight;
|
|
53292
|
-
var metas = {
|
|
53293
|
-
thumbnail: thumbnail,
|
|
53294
|
-
imageWidth: imageWidth,
|
|
53295
|
-
imageHeight: imageHeight
|
|
53296
|
-
};
|
|
53297
|
-
if (file.type === 'image/gif') {
|
|
53298
|
-
setAttachments(function (prevState) {
|
|
53299
|
-
return [].concat(prevState, [{
|
|
53300
|
-
data: file,
|
|
53301
|
-
upload: true,
|
|
53302
|
-
attachmentUrl: createComposePreviewUrl(tid, file),
|
|
53303
|
-
tid: tid,
|
|
53304
|
-
type: fileType,
|
|
53305
|
-
size: file.size,
|
|
53306
|
-
metadata: JSON.stringify({
|
|
53307
|
-
tmb: metas.thumbnail,
|
|
53308
|
-
szw: metas.imageWidth,
|
|
53309
|
-
szh: metas.imageHeight
|
|
53310
|
-
})
|
|
53311
|
-
}]);
|
|
53312
|
-
});
|
|
53313
|
-
} else {
|
|
53314
|
-
resizeImage(file).then(function (resizedFileData) {
|
|
53315
|
-
try {
|
|
53316
|
-
var resizedFile = new File([resizedFileData.blob], resizedFileData.file.name);
|
|
53317
|
-
var attachment = {
|
|
53318
|
-
data: resizedFile,
|
|
53319
|
-
upload: true,
|
|
53320
|
-
attachmentUrl: createComposePreviewUrl(tid, resizedFile),
|
|
53321
|
-
tid: tid,
|
|
53322
|
-
type: fileType,
|
|
53323
|
-
size: resizedFile.size,
|
|
53324
|
-
metadata: JSON.stringify({
|
|
53325
|
-
tmb: metas.thumbnail,
|
|
53326
|
-
szw: resizedFileData.newWidth,
|
|
53327
|
-
szh: resizedFileData.newHeight
|
|
53328
|
-
})
|
|
53329
|
-
};
|
|
53330
|
-
handleAttachmentImageForCache(attachment);
|
|
53331
|
-
setAttachments(function (prevState) {
|
|
53332
|
-
return [].concat(prevState, [attachment]);
|
|
53333
|
-
});
|
|
53334
|
-
return Promise.resolve();
|
|
53335
|
-
} catch (e) {
|
|
53336
|
-
return Promise.reject(e);
|
|
53337
|
-
}
|
|
53338
|
-
});
|
|
53300
|
+
var customUploader = getCustomUploader();
|
|
53301
|
+
var fileType = file.type.split('/')[0];
|
|
53302
|
+
var tid = v4();
|
|
53303
|
+
var handleAttachmentImageForCache = function handleAttachmentImageForCache(attachment) {
|
|
53304
|
+
try {
|
|
53305
|
+
var _attachment$metadata;
|
|
53306
|
+
var url = URL.createObjectURL(attachment.data);
|
|
53307
|
+
dispatch(setUpdateMessageAttachmentAC((attachment === null || attachment === void 0 ? void 0 : (_attachment$metadata = attachment.metadata) === null || _attachment$metadata === void 0 ? void 0 : _attachment$metadata.tmb) || '', url));
|
|
53308
|
+
return Promise.resolve();
|
|
53309
|
+
} catch (e) {
|
|
53310
|
+
return Promise.reject(e);
|
|
53311
|
+
}
|
|
53312
|
+
};
|
|
53313
|
+
var handleAttachmentVideoForCache = function handleAttachmentVideoForCache(attachment) {
|
|
53314
|
+
try {
|
|
53315
|
+
var _calculateRenderedIma = calculateRenderedImageWidth(attachment.metadata.szh || 400, attachment.metadata.szh || 400),
|
|
53316
|
+
newWidth = _calculateRenderedIma[0],
|
|
53317
|
+
newHeight = _calculateRenderedIma[1];
|
|
53318
|
+
return Promise.resolve(getVideoFirstFrame(attachment.data, newWidth, newHeight)).then(function (result) {
|
|
53319
|
+
if (result) {
|
|
53320
|
+
var _attachment$metadata2;
|
|
53321
|
+
var frameBlobUrl = result.frameBlobUrl;
|
|
53322
|
+
dispatch(setUpdateMessageAttachmentAC((attachment === null || attachment === void 0 ? void 0 : (_attachment$metadata2 = attachment.metadata) === null || _attachment$metadata2 === void 0 ? void 0 : _attachment$metadata2.tmb) || '', frameBlobUrl));
|
|
53323
|
+
}
|
|
53324
|
+
});
|
|
53325
|
+
} catch (e) {
|
|
53326
|
+
return Promise.reject(e);
|
|
53327
|
+
}
|
|
53328
|
+
};
|
|
53329
|
+
setPendingAttachment(tid, {
|
|
53330
|
+
file: file
|
|
53331
|
+
});
|
|
53332
|
+
if (fileType === 'video') {
|
|
53333
|
+
beginVideoPreparation(tid, file);
|
|
53334
|
+
}
|
|
53335
|
+
var type = fileType === 'video' && (!customUploader || isMediaAttachment) ? 'video' : isMediaAttachment && fileType === 'image' ? 'image' : 'file';
|
|
53336
|
+
var attachment = _extends({
|
|
53337
|
+
data: file,
|
|
53338
|
+
upload: !customUploader,
|
|
53339
|
+
type: type,
|
|
53340
|
+
tid: tid,
|
|
53341
|
+
size: file.size
|
|
53342
|
+
}, fileType === 'video' && !isMediaAttachment ? {
|
|
53343
|
+
thumbnailState: 'loading'
|
|
53344
|
+
} : {}, fileType === 'image' || fileType === 'video' ? {
|
|
53345
|
+
attachmentUrl: createComposePreviewUrl(tid, file),
|
|
53346
|
+
metadata: customUploader ? {} : '{}'
|
|
53347
|
+
} : {});
|
|
53348
|
+
setAttachments(function (prevState) {
|
|
53349
|
+
return [].concat(prevState, [attachment]);
|
|
53350
|
+
});
|
|
53351
|
+
var updateAttachment = function updateAttachment(patch) {
|
|
53352
|
+
setAttachments(function (prevState) {
|
|
53353
|
+
return prevState.map(function (current) {
|
|
53354
|
+
return current.tid === tid ? _extends({}, current, patch) : current;
|
|
53355
|
+
});
|
|
53356
|
+
});
|
|
53357
|
+
};
|
|
53358
|
+
setTimeout(function () {
|
|
53359
|
+
try {
|
|
53360
|
+
var _temp1 = function () {
|
|
53361
|
+
if (fileType === 'image') {
|
|
53362
|
+
var _temp5 = _catch(function () {
|
|
53363
|
+
return Promise.resolve(createImageThumbnail(file)).then(function (_ref4) {
|
|
53364
|
+
var thumbnail = _ref4.thumbnail,
|
|
53365
|
+
imageWidth = _ref4.imageWidth,
|
|
53366
|
+
imageHeight = _ref4.imageHeight;
|
|
53367
|
+
var _temp4 = function () {
|
|
53368
|
+
if (customUploader) {
|
|
53369
|
+
return Promise.resolve(resizeImage(file)).then(function (resizedFile) {
|
|
53370
|
+
var patch = {
|
|
53371
|
+
size: isMediaAttachment && resizedFile !== null && resizedFile !== void 0 && resizedFile.blob ? resizedFile.blob.size : file.size,
|
|
53372
|
+
metadata: {
|
|
53373
|
+
szw: imageWidth,
|
|
53374
|
+
szh: imageHeight,
|
|
53375
|
+
tmb: thumbnail
|
|
53339
53376
|
}
|
|
53340
|
-
}
|
|
53341
|
-
|
|
53342
|
-
|
|
53343
|
-
|
|
53344
|
-
|
|
53345
|
-
|
|
53346
|
-
|
|
53347
|
-
|
|
53348
|
-
|
|
53349
|
-
|
|
53350
|
-
|
|
53351
|
-
|
|
53377
|
+
};
|
|
53378
|
+
updateAttachment(patch);
|
|
53379
|
+
handleAttachmentImageForCache(_extends({}, attachment, patch));
|
|
53380
|
+
});
|
|
53381
|
+
} else {
|
|
53382
|
+
var _temp10 = function () {
|
|
53383
|
+
if (isMediaAttachment && file.type !== 'image/gif') {
|
|
53384
|
+
return Promise.resolve(resizeImage(file)).then(function (resizedFileData) {
|
|
53385
|
+
var resizedFile = resizedFileData.blob ? new File([resizedFileData.blob], resizedFileData.file.name, {
|
|
53386
|
+
type: file.type
|
|
53387
|
+
}) : file;
|
|
53388
|
+
var patch = {
|
|
53389
|
+
data: resizedFile,
|
|
53390
|
+
size: resizedFile.size,
|
|
53352
53391
|
metadata: JSON.stringify({
|
|
53353
|
-
tmb: thumbnail
|
|
53392
|
+
tmb: thumbnail,
|
|
53393
|
+
szw: resizedFileData.newWidth,
|
|
53394
|
+
szh: resizedFileData.newHeight
|
|
53354
53395
|
})
|
|
53355
|
-
}
|
|
53396
|
+
};
|
|
53397
|
+
updateAttachment(patch);
|
|
53398
|
+
setPendingAttachment(tid, {
|
|
53399
|
+
file: resizedFile
|
|
53400
|
+
});
|
|
53401
|
+
handleAttachmentImageForCache(_extends({}, attachment, patch));
|
|
53402
|
+
});
|
|
53403
|
+
} else {
|
|
53404
|
+
updateAttachment({
|
|
53405
|
+
metadata: JSON.stringify({
|
|
53406
|
+
tmb: thumbnail,
|
|
53407
|
+
szw: imageWidth,
|
|
53408
|
+
szh: imageHeight
|
|
53409
|
+
})
|
|
53356
53410
|
});
|
|
53411
|
+
}
|
|
53412
|
+
}();
|
|
53413
|
+
if (_temp10 && _temp10.then) return _temp10.then(function () {});
|
|
53414
|
+
}
|
|
53415
|
+
}();
|
|
53416
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
53417
|
+
});
|
|
53418
|
+
}, function (error) {
|
|
53419
|
+
log.warn('Unable to prepare image attachment preview:', error);
|
|
53420
|
+
});
|
|
53421
|
+
if (_temp5 && _temp5.then) return _temp5.then(function () {});
|
|
53422
|
+
} else {
|
|
53423
|
+
var _temp11 = function () {
|
|
53424
|
+
if (fileType === 'video') {
|
|
53425
|
+
var _temp9 = function _temp9() {
|
|
53426
|
+
return Promise.resolve(remuxPromise).then(function (uploadFile) {
|
|
53427
|
+
if (uploadFile !== file) {
|
|
53428
|
+
updateAttachment({
|
|
53429
|
+
data: uploadFile,
|
|
53430
|
+
size: uploadFile.size
|
|
53431
|
+
});
|
|
53432
|
+
setPendingAttachment(tid, {
|
|
53433
|
+
file: uploadFile
|
|
53357
53434
|
});
|
|
53358
53435
|
}
|
|
53359
|
-
|
|
53360
|
-
|
|
53361
|
-
|
|
53362
|
-
|
|
53363
|
-
if (fileType === 'video') {
|
|
53364
|
-
return Promise.resolve(getFrame(file, 0)).then(function (_ref8) {
|
|
53365
|
-
var thumb = _ref8.thumb,
|
|
53366
|
-
width = _ref8.width,
|
|
53367
|
-
height = _ref8.height,
|
|
53368
|
-
duration = _ref8.duration;
|
|
53369
|
-
var metas = JSON.stringify({
|
|
53370
|
-
tmb: thumb,
|
|
53371
|
-
width: width,
|
|
53372
|
-
height: height,
|
|
53373
|
-
dur: duration
|
|
53374
|
-
});
|
|
53375
|
-
var attachment = {
|
|
53376
|
-
data: file,
|
|
53377
|
-
type: 'video',
|
|
53378
|
-
upload: true,
|
|
53379
|
-
size: file.size,
|
|
53380
|
-
attachmentUrl: createComposePreviewUrl(tid, file),
|
|
53381
|
-
tid: tid,
|
|
53382
|
-
metadata: metas
|
|
53383
|
-
};
|
|
53384
|
-
handleAttachmentVideoForCache(attachment);
|
|
53385
|
-
setAttachments(function (prevState) {
|
|
53386
|
-
return [].concat(prevState, [attachment]);
|
|
53387
|
-
});
|
|
53436
|
+
if (metadata) {
|
|
53437
|
+
completeVideoPreparation(tid, {
|
|
53438
|
+
file: uploadFile,
|
|
53439
|
+
metadata: metadata
|
|
53388
53440
|
});
|
|
53389
53441
|
} else {
|
|
53390
|
-
|
|
53391
|
-
|
|
53392
|
-
|
|
53393
|
-
upload: true,
|
|
53394
|
-
type: 'file',
|
|
53395
|
-
size: file.size,
|
|
53396
|
-
tid: tid
|
|
53397
|
-
}]);
|
|
53442
|
+
failVideoPreparation(tid);
|
|
53443
|
+
updateAttachment({
|
|
53444
|
+
thumbnailState: 'failed'
|
|
53398
53445
|
});
|
|
53399
53446
|
}
|
|
53400
|
-
}
|
|
53401
|
-
|
|
53402
|
-
|
|
53403
|
-
|
|
53404
|
-
|
|
53405
|
-
|
|
53406
|
-
|
|
53407
|
-
|
|
53408
|
-
|
|
53409
|
-
|
|
53410
|
-
|
|
53411
|
-
|
|
53412
|
-
|
|
53413
|
-
|
|
53414
|
-
|
|
53415
|
-
|
|
53416
|
-
|
|
53417
|
-
|
|
53418
|
-
|
|
53419
|
-
|
|
53420
|
-
|
|
53421
|
-
|
|
53422
|
-
|
|
53447
|
+
});
|
|
53448
|
+
};
|
|
53449
|
+
var remuxPromise = remuxVideoFileForUpload(file);
|
|
53450
|
+
var thumbnailSource = file;
|
|
53451
|
+
var metadata;
|
|
53452
|
+
var _temp8 = _catch(function () {
|
|
53453
|
+
function _temp7() {
|
|
53454
|
+
var _frame = frame,
|
|
53455
|
+
thumb = _frame.thumb,
|
|
53456
|
+
width = _frame.width,
|
|
53457
|
+
height = _frame.height,
|
|
53458
|
+
duration = _frame.duration;
|
|
53459
|
+
metadata = customUploader ? {
|
|
53460
|
+
szw: width,
|
|
53461
|
+
szh: height,
|
|
53462
|
+
tmb: thumb,
|
|
53463
|
+
dur: duration
|
|
53464
|
+
} : JSON.stringify({
|
|
53465
|
+
tmb: thumb,
|
|
53466
|
+
szw: width,
|
|
53467
|
+
szh: height,
|
|
53468
|
+
dur: duration
|
|
53469
|
+
});
|
|
53470
|
+
updateAttachment({
|
|
53471
|
+
metadata: metadata,
|
|
53472
|
+
thumbnailState: 'ready'
|
|
53473
|
+
});
|
|
53474
|
+
handleAttachmentVideoForCache(_extends({}, attachment, {
|
|
53475
|
+
metadata: metadata
|
|
53476
|
+
}));
|
|
53477
|
+
}
|
|
53478
|
+
var frame;
|
|
53479
|
+
var _temp6 = _catch(function () {
|
|
53480
|
+
return Promise.resolve(getFrame(thumbnailSource, 0)).then(function (_getFrame) {
|
|
53481
|
+
frame = _getFrame;
|
|
53482
|
+
});
|
|
53483
|
+
}, function () {
|
|
53484
|
+
return Promise.resolve(remuxPromise).then(function (_remuxPromise) {
|
|
53485
|
+
thumbnailSource = _remuxPromise;
|
|
53486
|
+
return Promise.resolve(getFrame(thumbnailSource, 0)).then(function (_getFrame2) {
|
|
53487
|
+
frame = _getFrame2;
|
|
53488
|
+
});
|
|
53489
|
+
});
|
|
53490
|
+
});
|
|
53491
|
+
return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
|
|
53492
|
+
}, function (error) {
|
|
53493
|
+
log.warn('Unable to generate video thumbnail:', error);
|
|
53494
|
+
});
|
|
53495
|
+
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
|
|
53496
|
+
}
|
|
53497
|
+
}();
|
|
53498
|
+
if (_temp11 && _temp11.then) return _temp11.then(function () {});
|
|
53499
|
+
}
|
|
53500
|
+
}();
|
|
53501
|
+
return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(function () {}) : void 0);
|
|
53502
|
+
} catch (e) {
|
|
53503
|
+
return Promise.reject(e);
|
|
53423
53504
|
}
|
|
53424
|
-
}
|
|
53425
|
-
return Promise.resolve(
|
|
53505
|
+
}, 0);
|
|
53506
|
+
return Promise.resolve();
|
|
53426
53507
|
} catch (e) {
|
|
53427
53508
|
return Promise.reject(e);
|
|
53428
53509
|
}
|
|
@@ -53481,14 +53562,14 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
53481
53562
|
}
|
|
53482
53563
|
}
|
|
53483
53564
|
}
|
|
53484
|
-
var
|
|
53565
|
+
var _temp12 = function () {
|
|
53485
53566
|
if (allowUpload) {
|
|
53486
53567
|
return Promise.resolve(handleAddAttachmentWithViewOnceCheck(file, isMediaAttachment)).then(function () {});
|
|
53487
53568
|
} else {
|
|
53488
53569
|
showFileUploadError(errorMessage);
|
|
53489
53570
|
}
|
|
53490
53571
|
}();
|
|
53491
|
-
return Promise.resolve(
|
|
53572
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {}) : void 0);
|
|
53492
53573
|
} catch (e) {
|
|
53493
53574
|
return Promise.reject(e);
|
|
53494
53575
|
}
|
|
@@ -53591,18 +53672,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
53591
53672
|
useEffect(function () {
|
|
53592
53673
|
if (messageText.trim() || editMessageText !== null && editMessageText !== void 0 && editMessageText.trim() && editMessageText && (editMessageText === null || editMessageText === void 0 ? void 0 : editMessageText.trim()) !== (messageToEdit === null || messageToEdit === void 0 ? void 0 : messageToEdit.body) || attachments.length) {
|
|
53593
53674
|
if (attachments.length) {
|
|
53594
|
-
|
|
53595
|
-
attachments.forEach(function (att) {
|
|
53596
|
-
if ((att.type === 'video' || att.data.type.split('/')[0] === 'video') && att.type !== 'file') {
|
|
53597
|
-
videoAttachment = true;
|
|
53598
|
-
if (readyVideoAttachments[att.tid]) {
|
|
53599
|
-
setSendMessageIsActive(true);
|
|
53600
|
-
}
|
|
53601
|
-
}
|
|
53602
|
-
});
|
|
53603
|
-
if (!videoAttachment) {
|
|
53604
|
-
setSendMessageIsActive(true);
|
|
53605
|
-
}
|
|
53675
|
+
setSendMessageIsActive(true);
|
|
53606
53676
|
} else {
|
|
53607
53677
|
setSendMessageIsActive(true);
|
|
53608
53678
|
}
|
|
@@ -54285,14 +54355,14 @@ var SendMessageInputContainer = styled.div(_templateObject11$9 || (_templateObje
|
|
|
54285
54355
|
}, AddAttachmentIcon, function (props) {
|
|
54286
54356
|
return props.iconColor;
|
|
54287
54357
|
});
|
|
54288
|
-
var MessageInputWrapper = styled.div(_templateObject12$
|
|
54358
|
+
var MessageInputWrapper = styled.div(_templateObject12$7 || (_templateObject12$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n max-width: calc(100% - 50px);\n //max-width: ", ";\n //max-width: calc(100% - 110px);\n background-color: ", ";\n border-radius: ", ";\n position: relative;\n"])), function (props) {
|
|
54289
54359
|
return props.channelDetailsIsOpen ? "calc(100% - " + (props.channelDetailsIsOpen ? 362 : 0) + "px)" : '';
|
|
54290
54360
|
}, function (props) {
|
|
54291
54361
|
return props.backgroundColor;
|
|
54292
54362
|
}, function (props) {
|
|
54293
54363
|
return props.borderRadius || '18px';
|
|
54294
54364
|
});
|
|
54295
|
-
var LexicalWrapper = styled.div(_templateObject13$
|
|
54365
|
+
var LexicalWrapper = styled.div(_templateObject13$6 || (_templateObject13$6 = _taggedTemplateLiteralLoose(["\n position: relative;\n width: 100%;\n\n & .rich_text_editor {\n width: 100%;\n max-height: 80px;\n min-height: 20px;\n display: block;\n border: none;\n box-sizing: border-box;\n outline: none !important;\n border-radius: ", ";\n background-color: ", ";\n padding: ", ";\n color: ", ";\n order: ", ";\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n\n & p {\n font-size: 15px;\n line-height: 20px;\n color: ", ";\n }\n\n &::selection {\n background-color: ", ";\n }\n\n & *::selection {\n background-color: ", ";\n }\n\n & span::selection {\n background-color: ", ";\n }\n\n &:empty:before {\n content: attr(data-placeholder);\n }\n\n & .content_editable_input {\n border: none !important;\n outline: none !important;\n }\n\n & .mention {\n color: ", ";\n background-color: inherit !important;\n user-modify: read-only;\n }\n\n & span.bold {\n font-weight: bold;\n }\n\n & .editor_paragraph {\n margin: 0;\n }\n\n & .text_bold {\n font-weight: 600;\n }\n\n & .text_italic {\n font-style: italic;\n }\n\n & .text_underline {\n text-decoration: underline;\n }\n\n & .text_strikethrough {\n text-decoration: line-through;\n }\n\n & .text_underlineStrikethrough {\n text-decoration: underline line-through;\n }\n\n & code {\n font-family: inherit;\n letter-spacing: 4px;\n }\n }\n"])), function (props) {
|
|
54296
54366
|
return props.borderRadius;
|
|
54297
54367
|
}, function (props) {
|
|
54298
54368
|
return props.backgroundColor;
|
|
@@ -55164,7 +55234,7 @@ var EmptyText = styled.div(_templateObject7$s || (_templateObject7$s = _taggedTe
|
|
|
55164
55234
|
});
|
|
55165
55235
|
var ChevronRightIconWrapper = styled.span(_templateObject8$p || (_templateObject8$p = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n\n & > svg {\n width: 16px;\n height: 16px;\n transform: rotate(-90deg);\n }\n"])));
|
|
55166
55236
|
|
|
55167
|
-
var _templateObject$_, _templateObject2$V, _templateObject3$M, _templateObject4$F, _templateObject5$A, _templateObject6$w, _templateObject7$t, _templateObject8$q, _templateObject9$k, _templateObject0$i, _templateObject1$g, _templateObject10$d, _templateObject11$a, _templateObject12$
|
|
55237
|
+
var _templateObject$_, _templateObject2$V, _templateObject3$M, _templateObject4$F, _templateObject5$A, _templateObject6$w, _templateObject7$t, _templateObject8$q, _templateObject9$k, _templateObject0$i, _templateObject1$g, _templateObject10$d, _templateObject11$a, _templateObject12$8, _templateObject13$7, _templateObject14$5, _templateObject15$3, _templateObject16$3, _templateObject17$3, _templateObject18$3, _templateObject19$3, _templateObject20$3;
|
|
55168
55238
|
var Actions = function Actions(_ref) {
|
|
55169
55239
|
var _getDisappearingSetti;
|
|
55170
55240
|
var setActionsHeight = _ref.setActionsHeight,
|
|
@@ -55701,8 +55771,8 @@ var DefaultMarkAsRead = styled(SvgMarkAsRead)(_templateObject0$i || (_templateOb
|
|
|
55701
55771
|
var DefaultMarkAsUnRead = styled(SvgMarkAsUnRead)(_templateObject1$g || (_templateObject1$g = _taggedTemplateLiteralLoose([""])));
|
|
55702
55772
|
var DefaultBlockIcon = styled(SvgBlockChannel)(_templateObject10$d || (_templateObject10$d = _taggedTemplateLiteralLoose([""])));
|
|
55703
55773
|
var DefaultReportIcon = styled(SvgReport)(_templateObject11$a || (_templateObject11$a = _taggedTemplateLiteralLoose([""])));
|
|
55704
|
-
var DefaultClearIcon = styled(SvgClear)(_templateObject12$
|
|
55705
|
-
var DefaultDeleteChannelIcon = styled(SvgDeleteChannel)(_templateObject13$
|
|
55774
|
+
var DefaultClearIcon = styled(SvgClear)(_templateObject12$8 || (_templateObject12$8 = _taggedTemplateLiteralLoose([""])));
|
|
55775
|
+
var DefaultDeleteChannelIcon = styled(SvgDeleteChannel)(_templateObject13$7 || (_templateObject13$7 = _taggedTemplateLiteralLoose([""])));
|
|
55706
55776
|
var DefaultBottomIcon = styled(SvgBottom)(_templateObject14$5 || (_templateObject14$5 = _taggedTemplateLiteralLoose([""])));
|
|
55707
55777
|
var DefaultMarkAsReadIcon = styled(SvgLeave)(_templateObject15$3 || (_templateObject15$3 = _taggedTemplateLiteralLoose([""])));
|
|
55708
55778
|
var DefaultWatchIcon = styled(SvgWatch)(_templateObject16$3 || (_templateObject16$3 = _taggedTemplateLiteralLoose(["\n width: 24px;\n height: 24px;\n\n path.watch-ticks,\n path:nth-child(2) {\n fill: ", " !important;\n }\n"])), function (props) {
|
|
@@ -55891,7 +55961,7 @@ function SvgDownloadFile(props) {
|
|
|
55891
55961
|
})));
|
|
55892
55962
|
}
|
|
55893
55963
|
|
|
55894
|
-
var _templateObject$10, _templateObject2$X, _templateObject3$O, _templateObject4$H, _templateObject5$C, _templateObject6$y, _templateObject7$v, _templateObject8$s, _templateObject9$m, _templateObject0$k, _templateObject1$h, _templateObject10$e, _templateObject11$b, _templateObject12$
|
|
55964
|
+
var _templateObject$10, _templateObject2$X, _templateObject3$O, _templateObject4$H, _templateObject5$C, _templateObject6$y, _templateObject7$v, _templateObject8$s, _templateObject9$m, _templateObject0$k, _templateObject1$h, _templateObject10$e, _templateObject11$b, _templateObject12$9, _templateObject13$8, _templateObject14$6, _templateObject15$4;
|
|
55895
55965
|
var Files = function Files(_ref) {
|
|
55896
55966
|
var channelId = _ref.channelId,
|
|
55897
55967
|
filePreviewIcon = _ref.filePreviewIcon,
|
|
@@ -56106,12 +56176,12 @@ var FileIconCont = styled.span(_templateObject11$b || (_templateObject11$b = _ta
|
|
|
56106
56176
|
}, function (props) {
|
|
56107
56177
|
return props.fillColor;
|
|
56108
56178
|
});
|
|
56109
|
-
var FileHoverIconCont = styled.span(_templateObject12$
|
|
56179
|
+
var FileHoverIconCont = styled.span(_templateObject12$9 || (_templateObject12$9 = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
56110
56180
|
return props.iconColor;
|
|
56111
56181
|
}, function (props) {
|
|
56112
56182
|
return props.fillColor;
|
|
56113
56183
|
});
|
|
56114
|
-
var FileThumb = styled.img(_templateObject13$
|
|
56184
|
+
var FileThumb = styled.img(_templateObject13$8 || (_templateObject13$8 = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 40px;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n object-fit: cover;\n"])));
|
|
56115
56185
|
var FileItem = styled.div(_templateObject14$6 || (_templateObject14$6 = _taggedTemplateLiteralLoose(["\n position: relative;\n padding: 11px 16px;\n display: flex;\n align-items: center;\n font-size: 15px;\n transition: all 0.2s;\n div {\n margin-left: 7px;\n width: calc(100% - 48px);\n }\n &:hover {\n background-color: ", ";\n ", " {\n visibility: visible;\n }\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n"])), function (props) {
|
|
56116
56186
|
return props.hoverBackgroundColor;
|
|
56117
56187
|
}, DownloadWrapper, FileIconCont, FileHoverIconCont);
|
|
@@ -56800,7 +56870,7 @@ function ResetLinkConfirmModal(_ref) {
|
|
|
56800
56870
|
});
|
|
56801
56871
|
}
|
|
56802
56872
|
|
|
56803
|
-
var _templateObject$16, _templateObject2$11, _templateObject3$U, _templateObject4$M, _templateObject5$H, _templateObject6$C, _templateObject7$z, _templateObject8$w, _templateObject9$p, _templateObject0$m, _templateObject1$i, _templateObject10$f, _templateObject11$c, _templateObject12$
|
|
56873
|
+
var _templateObject$16, _templateObject2$11, _templateObject3$U, _templateObject4$M, _templateObject5$H, _templateObject6$C, _templateObject7$z, _templateObject8$w, _templateObject9$p, _templateObject0$m, _templateObject1$i, _templateObject10$f, _templateObject11$c, _templateObject12$a, _templateObject13$9;
|
|
56804
56874
|
function loadImage$1(src) {
|
|
56805
56875
|
return new Promise(function (resolve, reject) {
|
|
56806
56876
|
var img = document.createElement('img');
|
|
@@ -57417,16 +57487,16 @@ var Switch = styled.div(_templateObject10$f || (_templateObject10$f = _taggedTem
|
|
|
57417
57487
|
return p.active ? '22px' : '3px';
|
|
57418
57488
|
});
|
|
57419
57489
|
var ResetLink = styled.button(_templateObject11$c || (_templateObject11$c = _taggedTemplateLiteralLoose(["\n margin-top: 12px;\n border: none;\n background: transparent;\n color: #ff4d4f;\n cursor: pointer;\n"])));
|
|
57420
|
-
var QRCodeBox = styled.div(_templateObject12$
|
|
57490
|
+
var QRCodeBox = styled.div(_templateObject12$a || (_templateObject12$a = _taggedTemplateLiteralLoose(["\n border-radius: 8px;\n border: 1px solid ", ";\n background-color: ", ";\n display: flex;\n width: max-content;\n padding: 13.5px;\n margin: auto;\n position: relative;\n"])), function (p) {
|
|
57421
57491
|
return p.borderColor;
|
|
57422
57492
|
}, function (p) {
|
|
57423
57493
|
return p.backgroundColor;
|
|
57424
57494
|
});
|
|
57425
|
-
var QrHint = styled.p(_templateObject13$
|
|
57495
|
+
var QrHint = styled.p(_templateObject13$9 || (_templateObject13$9 = _taggedTemplateLiteralLoose(["\n text-align: center;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n margin: 12px 0 0;\n"])), function (p) {
|
|
57426
57496
|
return p.color;
|
|
57427
57497
|
});
|
|
57428
57498
|
|
|
57429
|
-
var _templateObject$17, _templateObject2$12, _templateObject3$V, _templateObject4$N, _templateObject5$I, _templateObject6$D, _templateObject7$A, _templateObject8$x, _templateObject9$q, _templateObject0$n, _templateObject1$j, _templateObject10$g, _templateObject11$d, _templateObject12$
|
|
57499
|
+
var _templateObject$17, _templateObject2$12, _templateObject3$V, _templateObject4$N, _templateObject5$I, _templateObject6$D, _templateObject7$A, _templateObject8$x, _templateObject9$q, _templateObject0$n, _templateObject1$j, _templateObject10$g, _templateObject11$d, _templateObject12$b, _templateObject13$a;
|
|
57430
57500
|
var Members = function Members(_ref) {
|
|
57431
57501
|
var _members$find;
|
|
57432
57502
|
var channel = _ref.channel,
|
|
@@ -57784,12 +57854,12 @@ var SkeletonBlock$5 = styled.div(_templateObject0$n || (_templateObject0$n = _ta
|
|
|
57784
57854
|
var SkeletonMemberRow = styled.div(_templateObject1$j || (_templateObject1$j = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 6px 16px;\n gap: 12px;\n height: 56px;\n"])));
|
|
57785
57855
|
var SkeletonAvatar$1 = styled(SkeletonBlock$5)(_templateObject10$g || (_templateObject10$g = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 40px;\n border-radius: 50%;\n flex-shrink: 0;\n"])));
|
|
57786
57856
|
var SkeletonTextGroup$2 = styled.div(_templateObject11$d || (_templateObject11$d = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
57787
|
-
var SkeletonLine$4 = styled(SkeletonBlock$5)(_templateObject12$
|
|
57857
|
+
var SkeletonLine$4 = styled(SkeletonBlock$5)(_templateObject12$b || (_templateObject12$b = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n border-radius: 7px;\n"])), function (p) {
|
|
57788
57858
|
return p.width;
|
|
57789
57859
|
}, function (p) {
|
|
57790
57860
|
return p.height || '14px';
|
|
57791
57861
|
});
|
|
57792
|
-
var RoleBadge = styled.span(_templateObject13$
|
|
57862
|
+
var RoleBadge = styled.span(_templateObject13$a || (_templateObject13$a = _taggedTemplateLiteralLoose(["\n position: relative;\n padding: 2px 8px;\n border-radius: 12px;\n margin-left: 4px;\n font-weight: 500;\n font-size: 12px;\n line-height: 16px;\n color: ", ";\n\n &::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n border-radius: 12px;\n width: 100%;\n height: 100%;\n background-color: ", ";\n opacity: 0.1;\n }\n"])), function (props) {
|
|
57793
57863
|
return props.color;
|
|
57794
57864
|
}, function (props) {
|
|
57795
57865
|
return props.backgroundColor;
|
|
@@ -58769,7 +58839,7 @@ function SvgChevronDownSearch(props) {
|
|
|
58769
58839
|
})));
|
|
58770
58840
|
}
|
|
58771
58841
|
|
|
58772
|
-
var _templateObject$1b, _templateObject2$16, _templateObject3$Y, _templateObject4$Q, _templateObject5$K, _templateObject6$F, _templateObject7$C, _templateObject8$z, _templateObject9$s, _templateObject0$p, _templateObject1$l, _templateObject10$i, _templateObject11$f, _templateObject12$
|
|
58842
|
+
var _templateObject$1b, _templateObject2$16, _templateObject3$Y, _templateObject4$Q, _templateObject5$K, _templateObject6$F, _templateObject7$C, _templateObject8$z, _templateObject9$s, _templateObject0$p, _templateObject1$l, _templateObject10$i, _templateObject11$f, _templateObject12$c, _templateObject13$b, _templateObject14$7, _templateObject15$5, _templateObject16$4, _templateObject17$4, _templateObject18$4, _templateObject19$4, _templateObject20$4, _templateObject21$3, _templateObject22$2, _templateObject23$2, _templateObject24$2, _templateObject25$2;
|
|
58773
58843
|
var SEARCH_DEBOUNCE_MS = 400;
|
|
58774
58844
|
function formatMessageDate(date) {
|
|
58775
58845
|
if (!date) return '';
|
|
@@ -59211,8 +59281,8 @@ var StatusText$1 = styled.p(_templateObject11$f || (_templateObject11$f = _tagge
|
|
|
59211
59281
|
}, function (props) {
|
|
59212
59282
|
return props.full ? 'height: 100%;' : '';
|
|
59213
59283
|
});
|
|
59214
|
-
var GroupSection = styled.div(_templateObject12$
|
|
59215
|
-
var GroupLabel = styled.div(_templateObject13$
|
|
59284
|
+
var GroupSection = styled.div(_templateObject12$c || (_templateObject12$c = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
59285
|
+
var GroupLabel = styled.div(_templateObject13$b || (_templateObject13$b = _taggedTemplateLiteralLoose(["\n position: sticky;\n top: 0;\n z-index: 1;\n background-color: ", ";\n text-transform: capitalize;\n letter-spacing: 0.5px;\n color: ", ";\n padding: 12px 16px 4px;\n font-weight: 500;\n font-size: 13px;\n line-height: 16px;\n user-select: none;\n"])), function (p) {
|
|
59216
59286
|
return p.backgroundColor;
|
|
59217
59287
|
}, function (p) {
|
|
59218
59288
|
return p.color;
|