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.
Files changed (3) hide show
  1. package/index.js +409 -339
  2. package/index.modern.js +409 -339
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -16071,6 +16071,75 @@ var createAttachmentUnavailableError = function createAttachmentUnavailableError
16071
16071
  return error;
16072
16072
  };
16073
16073
 
16074
+ var preparations = new Map();
16075
+ var beginVideoPreparation = function beginVideoPreparation(tid, file) {
16076
+ var resolvePreparation;
16077
+ var promise = new Promise(function (resolve) {
16078
+ resolvePreparation = resolve;
16079
+ });
16080
+ preparations.set(tid, {
16081
+ file: file,
16082
+ status: 'loading',
16083
+ promise: promise,
16084
+ resolve: resolvePreparation
16085
+ });
16086
+ };
16087
+ var completeVideoPreparation = function completeVideoPreparation(tid, preparation) {
16088
+ var entry = preparations.get(tid);
16089
+ if (!entry || entry.status !== 'loading') return;
16090
+ var completed = _extends({}, preparation, {
16091
+ status: 'ready'
16092
+ });
16093
+ preparations.set(tid, _extends({}, entry, completed));
16094
+ entry.resolve(completed);
16095
+ };
16096
+ var failVideoPreparation = function failVideoPreparation(tid) {
16097
+ var entry = preparations.get(tid);
16098
+ if (!entry || entry.status !== 'loading') return;
16099
+ var failed = {
16100
+ file: entry.file,
16101
+ status: 'failed'
16102
+ };
16103
+ preparations.set(tid, _extends({}, entry, failed));
16104
+ entry.resolve(failed);
16105
+ };
16106
+ var waitForVideoPreparation = function waitForVideoPreparation(tid, timeoutMs) {
16107
+ try {
16108
+ var _temp2 = function _temp2(_result) {
16109
+ return _exit ? _result : Promise.resolve(new Promise(function (resolve) {
16110
+ var timeout = setTimeout(function () {
16111
+ return resolve({
16112
+ file: entry.file,
16113
+ status: 'failed'
16114
+ });
16115
+ }, timeoutMs);
16116
+ entry.promise.then(function (prepared) {
16117
+ clearTimeout(timeout);
16118
+ resolve(prepared);
16119
+ });
16120
+ }));
16121
+ };
16122
+ var _exit = false;
16123
+ var entry = preparations.get(tid);
16124
+ if (!entry) return Promise.resolve(null);
16125
+ if (entry.status !== 'loading') return Promise.resolve(entry);
16126
+ var _temp = function () {
16127
+ if (timeoutMs === undefined) {
16128
+ return Promise.resolve(entry.promise).then(function (_await$entry$promise) {
16129
+ _exit = true;
16130
+ return _await$entry$promise;
16131
+ });
16132
+ }
16133
+ }();
16134
+ return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
16135
+ } catch (e) {
16136
+ return Promise.reject(e);
16137
+ }
16138
+ };
16139
+ var clearVideoPreparation = function clearVideoPreparation(tid) {
16140
+ preparations["delete"](tid);
16141
+ };
16142
+
16074
16143
  var _excluded$1 = ["lastMessage"];
16075
16144
  var _marked = /*#__PURE__*/_regenerator().m(setMessageListLoading),
16076
16145
  _marked2 = /*#__PURE__*/_regenerator().m(cancelChannelMessageProcesses),
@@ -16140,6 +16209,31 @@ var queuedPrefetchRequests = new Map();
16140
16209
  var prefetchCompletionWaiters = new Map();
16141
16210
  var prefetchCancelVersions = new Map();
16142
16211
  var ACTIVE_CHANNEL_RECONNECT_REFRESH_TIMEOUT_MS = 1500;
16212
+ var applyPreparedVideoAttachments = function applyPreparedVideoAttachments(attachments) {
16213
+ try {
16214
+ return Promise.resolve(Promise.all(attachments.map(function (attachment) {
16215
+ try {
16216
+ if (!attachment.tid) return Promise.resolve();
16217
+ return Promise.resolve(waitForVideoPreparation(attachment.tid)).then(function (prepared) {
16218
+ if ((prepared === null || prepared === void 0 ? void 0 : prepared.status) === 'ready' && prepared.metadata) {
16219
+ attachment.url = prepared.file;
16220
+ attachment.data = prepared.file;
16221
+ attachment.name = prepared.file.name;
16222
+ attachment.size = prepared.file.size;
16223
+ attachment.metadata = prepared.metadata;
16224
+ }
16225
+ clearVideoPreparation(attachment.tid);
16226
+ });
16227
+ } catch (e) {
16228
+ return Promise.reject(e);
16229
+ }
16230
+ }))).then(function () {
16231
+ return attachments;
16232
+ });
16233
+ } catch (e) {
16234
+ return Promise.reject(e);
16235
+ }
16236
+ };
16143
16237
  var activeDisplayedCacheKey = null;
16144
16238
  var updateTabAttachmentCache = function updateTabAttachmentCache(channelId, attachments, messageUser) {
16145
16239
  if (!(attachments !== null && attachments !== void 0 && attachments.length)) return;
@@ -17259,7 +17353,7 @@ function sendMessage(action) {
17259
17353
  messagesToSend.push(messageToSend);
17260
17354
  case 12:
17261
17355
  _loop3 = /*#__PURE__*/_regenerator().m(function _callee4() {
17262
- 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;
17356
+ 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;
17263
17357
  return _regenerator().w(function (_context12) {
17264
17358
  while (1) switch (_context12.p = _context12.n) {
17265
17359
  case 0:
@@ -17282,21 +17376,40 @@ function sendMessage(action) {
17282
17376
  messageToSend = _extends({}, messageToSend, pendingState);
17283
17377
  case 2:
17284
17378
  _context12.p = 2;
17379
+ _context12.n = 3;
17380
+ return effects.call(applyPreparedVideoAttachments, messageAttachment);
17381
+ case 3:
17382
+ pendingAttachments = messageAttachment.map(function (attachment) {
17383
+ return _extends({}, attachment, {
17384
+ data: attachment.data || attachment.url
17385
+ });
17386
+ });
17387
+ updateMessageOnMap(channel.id, {
17388
+ messageId: messageToSend.tid,
17389
+ params: {
17390
+ attachments: pendingAttachments
17391
+ }
17392
+ });
17393
+ _context12.n = 4;
17394
+ return effects.put(updateMessageAC(messageToSend.tid, {
17395
+ attachments: pendingAttachments
17396
+ }));
17397
+ case 4:
17285
17398
  messageCopy = JSON.parse(JSON.stringify(messagesToSend[_i2]));
17286
17399
  if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
17287
- _context12.n = 15;
17400
+ _context12.n = 17;
17288
17401
  break;
17289
17402
  }
17290
17403
  _attachmentsToSend = messageAttachment;
17291
17404
  if (!customUploader) {
17292
- _context12.n = 4;
17405
+ _context12.n = 6;
17293
17406
  break;
17294
17407
  }
17295
- _context12.n = 3;
17408
+ _context12.n = 5;
17296
17409
  return effects.call(handleUploadAttachments, messageAttachment || [], messageCopy, channel);
17297
- case 3:
17410
+ case 5:
17298
17411
  _attachmentsToSend = _context12.v;
17299
- case 4:
17412
+ case 6:
17300
17413
  linkAttachmentToSend = null;
17301
17414
  if (_i2 === 0 && linkAttachment) {
17302
17415
  linkAttachmentBuilder = channel.createAttachmentBuilder(linkAttachment.data, linkAttachment.type);
@@ -17311,40 +17424,40 @@ function sendMessage(action) {
17311
17424
  attachments: [].concat(_attachmentsToSend)
17312
17425
  });
17313
17426
  }
17314
- _context12.n = 5;
17427
+ _context12.n = 7;
17315
17428
  return effects.call(channel.sendMessage, messageToSend);
17316
- case 5:
17429
+ case 7:
17317
17430
  messageResponse = _context12.v;
17318
17431
  if (messageToSend.tid) {
17319
17432
  autoResendAttempts["delete"](messageToSend.tid);
17320
17433
  }
17321
17434
  if (!customUploader) {
17322
- _context12.n = 10;
17435
+ _context12.n = 12;
17323
17436
  break;
17324
17437
  }
17325
17438
  k = 0;
17326
- case 6:
17439
+ case 8:
17327
17440
  if (!(k < messageAttachment.length)) {
17328
- _context12.n = 10;
17441
+ _context12.n = 12;
17329
17442
  break;
17330
17443
  }
17331
17444
  messageResponse.attachments[k] = _extends({}, messageResponse.attachments[k], {
17332
17445
  user: JSON.parse(JSON.stringify(messageResponse.user)),
17333
17446
  tid: messageAttachment[k].tid
17334
17447
  });
17335
- _context12.n = 7;
17448
+ _context12.n = 9;
17336
17449
  return effects.put(removeAttachmentProgressAC(messageAttachment[k].tid));
17337
- case 7:
17338
- _context12.n = 8;
17450
+ case 9:
17451
+ _context12.n = 10;
17339
17452
  return effects.put(removeAttachmentUploadingStateAC(messageAttachment[k].tid));
17340
- case 8:
17453
+ case 10:
17341
17454
  deletePendingAttachment(messageAttachment[k].tid);
17342
17455
  releaseBlobUrls(["compose_" + messageAttachment[k].tid]);
17343
- case 9:
17456
+ case 11:
17344
17457
  k++;
17345
- _context12.n = 6;
17458
+ _context12.n = 8;
17346
17459
  break;
17347
- case 10:
17460
+ case 12:
17348
17461
  attachmentsToUpdate = [];
17349
17462
  if (messageResponse.attachments && messageResponse.attachments.length > 0) {
17350
17463
  currentAttachmentsMap = {};
@@ -17371,25 +17484,25 @@ function sendMessage(action) {
17371
17484
  });
17372
17485
  activeChannelId = getActiveChannelId();
17373
17486
  if (!(activeChannelId === channel.id)) {
17374
- _context12.n = 11;
17487
+ _context12.n = 13;
17375
17488
  break;
17376
17489
  }
17377
- _context12.n = 11;
17490
+ _context12.n = 13;
17378
17491
  return effects.put(updateMessageAC(messageToSend.tid, messageUpdateData, true));
17379
- case 11:
17492
+ case 13:
17380
17493
  messageToUpdate = JSON.parse(JSON.stringify(messageResponse));
17381
17494
  addConfirmedMessageToCache(channel.id, messageToUpdate);
17382
17495
  updateTabAttachmentCache(channel.id, attachmentsToUpdate, messageResponse.user);
17383
17496
  if (!channel.unread) {
17384
- _context12.n = 12;
17497
+ _context12.n = 14;
17385
17498
  break;
17386
17499
  }
17387
- _context12.n = 12;
17500
+ _context12.n = 14;
17388
17501
  return effects.put(markChannelAsReadAC(channel.id));
17389
- case 12:
17502
+ case 14:
17390
17503
  resolvedLastMessage = getResolvedChannelLastMessage(channel.id, messageToUpdate, messageToSend);
17391
17504
  if (!lastMessageNeedsUpdate((_getStoredChannel6 = getStoredChannel(channel.id)) === null || _getStoredChannel6 === void 0 ? void 0 : _getStoredChannel6.lastMessage, resolvedLastMessage)) {
17392
- _context12.n = 14;
17505
+ _context12.n = 16;
17393
17506
  break;
17394
17507
  }
17395
17508
  updateChannelLastMessageOnAllChannels(channel.id, resolvedLastMessage);
@@ -17397,54 +17510,54 @@ function sendMessage(action) {
17397
17510
  lastMessage: resolvedLastMessage,
17398
17511
  lastReactedMessage: null
17399
17512
  };
17400
- _context12.n = 13;
17513
+ _context12.n = 15;
17401
17514
  return effects.put(updateChannelDataAC(channel.id, channelUpdateParam, true));
17402
- case 13:
17403
- updateChannelOnAllChannels(channel.id, channelUpdateParam);
17404
- case 14:
17405
- _context12.n = 16;
17406
- break;
17407
17515
  case 15:
17408
- throw new Error('Connection required to send message');
17516
+ updateChannelOnAllChannels(channel.id, channelUpdateParam);
17409
17517
  case 16:
17410
- _context12.n = 21;
17518
+ _context12.n = 18;
17411
17519
  break;
17412
17520
  case 17:
17413
- _context12.p = 17;
17521
+ throw new Error('Connection required to send message');
17522
+ case 18:
17523
+ _context12.n = 23;
17524
+ break;
17525
+ case 19:
17526
+ _context12.p = 19;
17414
17527
  _t = _context12.v;
17415
17528
  isErrorResendable = isResendableError(_t === null || _t === void 0 ? void 0 : _t.type);
17416
17529
  if (!((_channel2 = channel) !== null && _channel2 !== void 0 && _channel2.id && (_messageToSend2 = messageToSend) !== null && _messageToSend2 !== void 0 && _messageToSend2.tid)) {
17417
- _context12.n = 21;
17530
+ _context12.n = 23;
17418
17531
  break;
17419
17532
  }
17420
17533
  log.error('Error on uploading attachment', messageToSend.tid, _t);
17421
17534
  if (!((_messageToSend$attach = messageToSend.attachments) !== null && _messageToSend$attach !== void 0 && _messageToSend$attach.length)) {
17422
- _context12.n = 20;
17535
+ _context12.n = 22;
17423
17536
  break;
17424
17537
  }
17425
17538
  _iterator2 = _createForOfIteratorHelperLoose(messageToSend.attachments);
17426
- case 18:
17539
+ case 20:
17427
17540
  if ((_step2 = _iterator2()).done) {
17428
- _context12.n = 20;
17541
+ _context12.n = 22;
17429
17542
  break;
17430
17543
  }
17431
17544
  att = _step2.value;
17432
17545
  if (!att.tid) {
17433
- _context12.n = 19;
17546
+ _context12.n = 21;
17434
17547
  break;
17435
17548
  }
17436
- _context12.n = 19;
17549
+ _context12.n = 21;
17437
17550
  return effects.put(updateAttachmentUploadingStateAC(UPLOAD_STATE.FAIL, att.tid));
17438
- case 19:
17439
- _context12.n = 18;
17551
+ case 21:
17552
+ _context12.n = 20;
17440
17553
  break;
17441
- case 20:
17442
- _context12.n = 21;
17554
+ case 22:
17555
+ _context12.n = 23;
17443
17556
  return effects.call(syncFailedMessageState, channel, messageToSend.tid, pendingMessages[_i2] || messageToSend, isErrorResendable);
17444
- case 21:
17557
+ case 23:
17445
17558
  return _context12.a(2);
17446
17559
  }
17447
- }, _callee4, null, [[2, 17]]);
17560
+ }, _callee4, null, [[2, 19]]);
17448
17561
  });
17449
17562
  _i2 = 0;
17450
17563
  case 13:
@@ -39583,7 +39696,7 @@ var VideoIcon = styled__default.div(_templateObject8$a || (_templateObject8$a =
39583
39696
  return bg;
39584
39697
  });
39585
39698
 
39586
- 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;
39699
+ 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;
39587
39700
  var Attachment = function Attachment(_ref) {
39588
39701
  var attachment = _ref.attachment,
39589
39702
  _ref$isPreview = _ref.isPreview,
@@ -40382,7 +40495,9 @@ var Attachment = function Attachment(_ref) {
40382
40495
  border: selectedFileAttachmentsBoxBorder || (theme === THEME.DARK ? 'none' : ''),
40383
40496
  width: fileAttachmentWidth,
40384
40497
  borderColor: borderColor
40385
- }, attachmentThumb ? (/*#__PURE__*/React__default.createElement(FileThumbnail, {
40498
+ }, attachment.thumbnailState === 'loading' ? (/*#__PURE__*/React__default.createElement(FileThumbnailSkeleton, {
40499
+ color: overlayBackground2
40500
+ })) : attachmentThumb ? (/*#__PURE__*/React__default.createElement(FileThumbnail, {
40386
40501
  src: withPrefix ? "data:image/jpeg;base64," + attachmentThumb : attachmentThumb,
40387
40502
  loading: 'lazy',
40388
40503
  decoding: 'async',
@@ -40492,18 +40607,26 @@ var AttachmentImgCont = styled__default.div(_templateObject2$v || (_templateObje
40492
40607
  return props.isPreview && "\n width: 48px;\n min-width: 48px;\n height: 48px;\n ";
40493
40608
  });
40494
40609
  var FileThumbnail = styled__default.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"])));
40495
- var DownloadFile$1 = styled__default.span(_templateObject4$l || (_templateObject4$l = _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) {
40610
+ var fileThumbnailShimmer = styled.keyframes(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n 0% { background-position: -120px 0; }\n 100% { background-position: 120px 0; }\n"])));
40611
+ var FileThumbnailSkeleton = styled__default.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) {
40612
+ return props.color;
40613
+ }, function (props) {
40614
+ return props.color;
40615
+ }, function (props) {
40616
+ return props.color;
40617
+ }, fileThumbnailShimmer);
40618
+ var DownloadFile$1 = styled__default.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) {
40496
40619
  return props.backgroundColor;
40497
40620
  }, function (props) {
40498
40621
  return props.widthThumb && 'absolute';
40499
40622
  }, function (props) {
40500
40623
  return props.widthThumb ? '7.3px' : '50%';
40501
40624
  });
40502
- var ProgressWrapper$1 = styled__default.span(_templateObject5$h || (_templateObject5$h = _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"])));
40503
- var SizeProgress = styled__default.span(_templateObject6$e || (_templateObject6$e = _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) {
40625
+ var ProgressWrapper$1 = styled__default.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"])));
40626
+ var SizeProgress = styled__default.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) {
40504
40627
  return props.color;
40505
40628
  });
40506
- var AttachmentFile$1 = styled__default.div(_templateObject7$d || (_templateObject7$d = _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) {
40629
+ var AttachmentFile$1 = styled__default.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) {
40507
40630
  return !props.isRepliedMessage && '8px 12px;';
40508
40631
  }, function (props) {
40509
40632
  return !props.isRepliedMessage && (props.width ? props.width + "px" : '350px');
@@ -40520,25 +40643,25 @@ var AttachmentFile$1 = styled__default.div(_templateObject7$d || (_templateObjec
40520
40643
  }, function (props) {
40521
40644
  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 ";
40522
40645
  }, AttachmentIconCont);
40523
- var RemoveChosenFile = styled__default(SvgDeleteUpload)(_templateObject8$b || (_templateObject8$b = _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) {
40646
+ var RemoveChosenFile = styled__default(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) {
40524
40647
  return props.color;
40525
40648
  }, function (props) {
40526
40649
  return props.$backgroundColor;
40527
40650
  }, function (props) {
40528
40651
  return props.$backgroundColor;
40529
40652
  });
40530
- var AttachmentName = styled__default.h3(_templateObject9$9 || (_templateObject9$9 = _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) {
40653
+ var AttachmentName = styled__default.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) {
40531
40654
  return props.color;
40532
40655
  });
40533
- var AttachmentSize = styled__default.span(_templateObject0$8 || (_templateObject0$8 = _taggedTemplateLiteralLoose(["\n font-size: 13px;\n color: ", ";\n & > span {\n color: ", ";\n margin-left: 8px;\n }\n"])), function (props) {
40656
+ var AttachmentSize = styled__default.span(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose(["\n font-size: 13px;\n color: ", ";\n & > span {\n color: ", ";\n margin-left: 8px;\n }\n"])), function (props) {
40534
40657
  return props.color;
40535
40658
  }, function (props) {
40536
40659
  return props.errorColor;
40537
40660
  });
40538
- var AttachmentFileInfo = styled__default.div(_templateObject1$8 || (_templateObject1$8 = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n ", "\n"])), function (props) {
40661
+ var AttachmentFileInfo = styled__default.div(_templateObject11$5 || (_templateObject11$5 = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n ", "\n"])), function (props) {
40539
40662
  return props.isPreview && "line-height: 14px;\n max-width: calc(100% - 44px);\n ";
40540
40663
  });
40541
- var AttachmentImg = styled__default.img(_templateObject10$6 || (_templateObject10$6 = _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) {
40664
+ var AttachmentImg = styled__default.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) {
40542
40665
  return props.absolute && 'absolute';
40543
40666
  }, function (props) {
40544
40667
  return props.isRepliedMessage ? '4px' : props.borderRadius || '6px';
@@ -40553,7 +40676,7 @@ var AttachmentImg = styled__default.img(_templateObject10$6 || (_templateObject1
40553
40676
  }, function (props) {
40554
40677
  return props.$shouldAnimate && !props.$isLoaded ? 0 : 1;
40555
40678
  });
40556
- var VideoCont = styled__default.div(_templateObject11$5 || (_templateObject11$5 = _taggedTemplateLiteralLoose(["\n position: relative;\n cursor: pointer;\n height: ", ";\n"])), function (props) {
40679
+ var VideoCont = styled__default.div(_templateObject13$4 || (_templateObject13$4 = _taggedTemplateLiteralLoose(["\n position: relative;\n cursor: pointer;\n height: ", ";\n"])), function (props) {
40557
40680
  return props.isDetailsView && '100%';
40558
40681
  });
40559
40682
 
@@ -41936,7 +42059,7 @@ function SvgFilledCheckbox(props) {
41936
42059
  })));
41937
42060
  }
41938
42061
 
41939
- 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$4;
42062
+ 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;
41940
42063
  var PollMessage = function PollMessage(_ref) {
41941
42064
  var _poll$voteDetails3, _poll$voteDetails4, _poll$voteDetails5, _poll$voteDetails6, _poll$voteDetails7;
41942
42065
  var message = _ref.message,
@@ -42127,7 +42250,7 @@ var Bar = styled__default.div(_templateObject10$9 || (_templateObject10$9 = _tag
42127
42250
  return p.track;
42128
42251
  });
42129
42252
  var Fill = styled__default.div(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n height: 100%;\n border-radius: 6px;\n transition: width 0.3s ease-in-out;\n"])));
42130
- var UsersContainer = styled__default.div(_templateObject12$4 || (_templateObject12$4 = _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) {
42253
+ var UsersContainer = styled__default.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) {
42131
42254
  return p.cursor;
42132
42255
  });
42133
42256
 
@@ -43702,7 +43825,7 @@ function SvgCircleDashed(props) {
43702
43825
  })));
43703
43826
  }
43704
43827
 
43705
- 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$5, _templateObject13$4;
43828
+ 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;
43706
43829
  var defaultFormatDate = function defaultFormatDate(date) {
43707
43830
  var m = moment(date);
43708
43831
  if (m.isSame(moment(), 'day')) {
@@ -44325,10 +44448,10 @@ var Content = styled__default.div(_templateObject1$d || (_templateObject1$d = _t
44325
44448
  });
44326
44449
  var P2PStatusList = styled__default.div(_templateObject10$a || (_templateObject10$a = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n"])));
44327
44450
  var P2PStatusRow = styled__default.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"])));
44328
- var P2PStatusLabel = styled__default.div(_templateObject12$5 || (_templateObject12$5 = _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) {
44451
+ var P2PStatusLabel = styled__default.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) {
44329
44452
  return p.color;
44330
44453
  });
44331
- var P2PStatusDate = styled__default.div(_templateObject13$4 || (_templateObject13$4 = _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) {
44454
+ var P2PStatusDate = styled__default.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) {
44332
44455
  return p.color;
44333
44456
  });
44334
44457
 
@@ -52255,7 +52378,7 @@ var SettingItem = styled__default.div(_templateObject9$i || (_templateObject9$i
52255
52378
  return props.color;
52256
52379
  });
52257
52380
 
52258
- 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$6, _templateObject13$5, _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;
52381
+ 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;
52259
52382
  function AutoFocusPlugin(_ref) {
52260
52383
  var messageForReply = _ref.messageForReply;
52261
52384
  var _useLexicalComposerCo = LexicalComposerContext.useLexicalComposerContext(),
@@ -52810,7 +52933,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
52810
52933
  upload: attachment.upload,
52811
52934
  metadata: attachment.metadata,
52812
52935
  type: attachment.type,
52813
- size: attachment.size
52936
+ size: attachment.size,
52937
+ thumbnailState: attachment.thumbnailState
52814
52938
  };
52815
52939
  });
52816
52940
  if (viewOnce && canShowViewOnceToggle) {
@@ -52954,10 +53078,14 @@ var SendMessageInput = function SendMessageInput(_ref3) {
52954
53078
  var updatedAttachments = attachmentsUpdate.filter(function (item) {
52955
53079
  return item.tid !== attachmentId;
52956
53080
  });
53081
+ clearVideoPreparation(attachmentId);
52957
53082
  releaseBlobUrls(["compose_" + attachmentId]);
52958
53083
  setAttachments(updatedAttachments);
52959
53084
  attachmentsUpdate = updatedAttachments;
52960
53085
  } else {
53086
+ attachmentsUpdate.forEach(function (attachment) {
53087
+ return clearVideoPreparation(attachment.tid);
53088
+ });
52961
53089
  releaseBlobUrls(attachmentsUpdate.map(function (item) {
52962
53090
  return "compose_" + item.tid;
52963
53091
  }));
@@ -53189,260 +53317,213 @@ var SendMessageInput = function SendMessageInput(_ref3) {
53189
53317
  };
53190
53318
  var handleAddAttachment = function handleAddAttachment(file, isMediaAttachment) {
53191
53319
  try {
53192
- var _temp4 = function _temp4() {
53193
- var fileType = file.type.split('/')[0];
53194
- var tid = uuid.v4();
53195
- var reader = new FileReader();
53196
- var handleAttachmentImageForCache = function handleAttachmentImageForCache(attachment) {
53197
- try {
53198
- var _attachment$metadata;
53199
- var url = URL.createObjectURL(attachment.data);
53200
- dispatch(setUpdateMessageAttachmentAC((attachment === null || attachment === void 0 ? void 0 : (_attachment$metadata = attachment.metadata) === null || _attachment$metadata === void 0 ? void 0 : _attachment$metadata.tmb) || '', url));
53201
- return Promise.resolve();
53202
- } catch (e) {
53203
- return Promise.reject(e);
53204
- }
53205
- };
53206
- var handleAttachmentVideoForCache = function handleAttachmentVideoForCache(attachment) {
53207
- try {
53208
- var _calculateRenderedIma = calculateRenderedImageWidth(attachment.metadata.szh || 400, attachment.metadata.szh || 400),
53209
- newWidth = _calculateRenderedIma[0],
53210
- newHeight = _calculateRenderedIma[1];
53211
- return Promise.resolve(getVideoFirstFrame(attachment.data, newWidth, newHeight)).then(function (result) {
53212
- if (result) {
53213
- var _attachment$metadata2;
53214
- var frameBlobUrl = result.frameBlobUrl;
53215
- dispatch(setUpdateMessageAttachmentAC((attachment === null || attachment === void 0 ? void 0 : (_attachment$metadata2 = attachment.metadata) === null || _attachment$metadata2 === void 0 ? void 0 : _attachment$metadata2.tmb) || '', frameBlobUrl));
53216
- }
53217
- });
53218
- } catch (e) {
53219
- return Promise.reject(e);
53220
- }
53221
- };
53222
- reader.onload = function () {
53223
- try {
53224
- setPendingAttachment(tid, {
53225
- file: file
53226
- });
53227
- var _temp0 = function () {
53228
- if (customUploader) {
53229
- var _temp6 = function () {
53230
- if (fileType === 'image') {
53231
- resizeImage(file).then(function (resizedFile) {
53232
- try {
53233
- return Promise.resolve(createImageThumbnail(file)).then(function (_ref4) {
53234
- var _resizedFile$blob;
53235
- var thumbnail = _ref4.thumbnail,
53236
- imageWidth = _ref4.imageWidth,
53237
- imageHeight = _ref4.imageHeight;
53238
- var attachment = {
53239
- data: file,
53240
- upload: false,
53241
- type: isMediaAttachment ? fileType : 'file',
53242
- attachmentUrl: createComposePreviewUrl(tid, resizedFile.blob),
53243
- tid: tid,
53244
- size: isMediaAttachment ? resizedFile !== null && resizedFile !== void 0 && resizedFile.blob ? resizedFile === null || resizedFile === void 0 ? void 0 : (_resizedFile$blob = resizedFile.blob) === null || _resizedFile$blob === void 0 ? void 0 : _resizedFile$blob.size : file.size : file.size,
53245
- metadata: {
53246
- szw: imageWidth,
53247
- szh: imageHeight,
53248
- tmb: thumbnail
53249
- }
53250
- };
53251
- handleAttachmentImageForCache(attachment);
53252
- setAttachments(function (prevState) {
53253
- return [].concat(prevState, [attachment]);
53254
- });
53255
- });
53256
- } catch (e) {
53257
- return Promise.reject(e);
53258
- }
53259
- });
53260
- } else {
53261
- var _temp1 = function () {
53262
- if (fileType === 'video') {
53263
- return Promise.resolve(getFrame(file, 0)).then(function (_ref5) {
53264
- var thumb = _ref5.thumb,
53265
- width = _ref5.width,
53266
- height = _ref5.height,
53267
- duration = _ref5.duration;
53268
- var attachment = {
53269
- data: file,
53270
- upload: false,
53271
- type: isMediaAttachment ? fileType : 'file',
53272
- attachmentUrl: createComposePreviewUrl(tid, file),
53273
- tid: tid,
53274
- size: file.size,
53275
- metadata: {
53276
- szw: width,
53277
- szh: height,
53278
- tmb: thumb,
53279
- dur: duration
53280
- }
53281
- };
53282
- handleAttachmentVideoForCache(attachment);
53283
- setAttachments(function (prevState) {
53284
- return [].concat(prevState, [attachment]);
53285
- });
53286
- });
53287
- } else {
53288
- setAttachments(function (prevState) {
53289
- return [].concat(prevState, [{
53290
- data: file,
53291
- upload: false,
53292
- type: 'file',
53293
- tid: tid,
53294
- size: file.size
53295
- }]);
53296
- });
53297
- }
53298
- }();
53299
- if (_temp1 && _temp1.then) return _temp1.then(function () {});
53300
- }
53301
- }();
53302
- if (_temp6 && _temp6.then) return _temp6.then(function () {});
53303
- } else {
53304
- var _temp9 = function () {
53305
- if (fileType === 'image') {
53306
- var _temp7 = function () {
53307
- if (isMediaAttachment) {
53308
- return Promise.resolve(createImageThumbnail(file)).then(function (_ref6) {
53309
- var thumbnail = _ref6.thumbnail,
53310
- imageWidth = _ref6.imageWidth,
53311
- imageHeight = _ref6.imageHeight;
53312
- var metas = {
53313
- thumbnail: thumbnail,
53314
- imageWidth: imageWidth,
53315
- imageHeight: imageHeight
53316
- };
53317
- if (file.type === 'image/gif') {
53318
- setAttachments(function (prevState) {
53319
- return [].concat(prevState, [{
53320
- data: file,
53321
- upload: true,
53322
- attachmentUrl: createComposePreviewUrl(tid, file),
53323
- tid: tid,
53324
- type: fileType,
53325
- size: file.size,
53326
- metadata: JSON.stringify({
53327
- tmb: metas.thumbnail,
53328
- szw: metas.imageWidth,
53329
- szh: metas.imageHeight
53330
- })
53331
- }]);
53332
- });
53333
- } else {
53334
- resizeImage(file).then(function (resizedFileData) {
53335
- try {
53336
- var resizedFile = new File([resizedFileData.blob], resizedFileData.file.name);
53337
- var attachment = {
53338
- data: resizedFile,
53339
- upload: true,
53340
- attachmentUrl: createComposePreviewUrl(tid, resizedFile),
53341
- tid: tid,
53342
- type: fileType,
53343
- size: resizedFile.size,
53344
- metadata: JSON.stringify({
53345
- tmb: metas.thumbnail,
53346
- szw: resizedFileData.newWidth,
53347
- szh: resizedFileData.newHeight
53348
- })
53349
- };
53350
- handleAttachmentImageForCache(attachment);
53351
- setAttachments(function (prevState) {
53352
- return [].concat(prevState, [attachment]);
53353
- });
53354
- return Promise.resolve();
53355
- } catch (e) {
53356
- return Promise.reject(e);
53357
- }
53358
- });
53320
+ var customUploader = getCustomUploader();
53321
+ var fileType = file.type.split('/')[0];
53322
+ var tid = uuid.v4();
53323
+ var handleAttachmentImageForCache = function handleAttachmentImageForCache(attachment) {
53324
+ try {
53325
+ var _attachment$metadata;
53326
+ var url = URL.createObjectURL(attachment.data);
53327
+ dispatch(setUpdateMessageAttachmentAC((attachment === null || attachment === void 0 ? void 0 : (_attachment$metadata = attachment.metadata) === null || _attachment$metadata === void 0 ? void 0 : _attachment$metadata.tmb) || '', url));
53328
+ return Promise.resolve();
53329
+ } catch (e) {
53330
+ return Promise.reject(e);
53331
+ }
53332
+ };
53333
+ var handleAttachmentVideoForCache = function handleAttachmentVideoForCache(attachment) {
53334
+ try {
53335
+ var _calculateRenderedIma = calculateRenderedImageWidth(attachment.metadata.szh || 400, attachment.metadata.szh || 400),
53336
+ newWidth = _calculateRenderedIma[0],
53337
+ newHeight = _calculateRenderedIma[1];
53338
+ return Promise.resolve(getVideoFirstFrame(attachment.data, newWidth, newHeight)).then(function (result) {
53339
+ if (result) {
53340
+ var _attachment$metadata2;
53341
+ var frameBlobUrl = result.frameBlobUrl;
53342
+ dispatch(setUpdateMessageAttachmentAC((attachment === null || attachment === void 0 ? void 0 : (_attachment$metadata2 = attachment.metadata) === null || _attachment$metadata2 === void 0 ? void 0 : _attachment$metadata2.tmb) || '', frameBlobUrl));
53343
+ }
53344
+ });
53345
+ } catch (e) {
53346
+ return Promise.reject(e);
53347
+ }
53348
+ };
53349
+ setPendingAttachment(tid, {
53350
+ file: file
53351
+ });
53352
+ if (fileType === 'video') {
53353
+ beginVideoPreparation(tid, file);
53354
+ }
53355
+ var type = fileType === 'video' && (!customUploader || isMediaAttachment) ? 'video' : isMediaAttachment && fileType === 'image' ? 'image' : 'file';
53356
+ var attachment = _extends({
53357
+ data: file,
53358
+ upload: !customUploader,
53359
+ type: type,
53360
+ tid: tid,
53361
+ size: file.size
53362
+ }, fileType === 'video' && !isMediaAttachment ? {
53363
+ thumbnailState: 'loading'
53364
+ } : {}, fileType === 'image' || fileType === 'video' ? {
53365
+ attachmentUrl: createComposePreviewUrl(tid, file),
53366
+ metadata: customUploader ? {} : '{}'
53367
+ } : {});
53368
+ setAttachments(function (prevState) {
53369
+ return [].concat(prevState, [attachment]);
53370
+ });
53371
+ var updateAttachment = function updateAttachment(patch) {
53372
+ setAttachments(function (prevState) {
53373
+ return prevState.map(function (current) {
53374
+ return current.tid === tid ? _extends({}, current, patch) : current;
53375
+ });
53376
+ });
53377
+ };
53378
+ setTimeout(function () {
53379
+ try {
53380
+ var _temp1 = function () {
53381
+ if (fileType === 'image') {
53382
+ var _temp5 = _catch(function () {
53383
+ return Promise.resolve(createImageThumbnail(file)).then(function (_ref4) {
53384
+ var thumbnail = _ref4.thumbnail,
53385
+ imageWidth = _ref4.imageWidth,
53386
+ imageHeight = _ref4.imageHeight;
53387
+ var _temp4 = function () {
53388
+ if (customUploader) {
53389
+ return Promise.resolve(resizeImage(file)).then(function (resizedFile) {
53390
+ var patch = {
53391
+ size: isMediaAttachment && resizedFile !== null && resizedFile !== void 0 && resizedFile.blob ? resizedFile.blob.size : file.size,
53392
+ metadata: {
53393
+ szw: imageWidth,
53394
+ szh: imageHeight,
53395
+ tmb: thumbnail
53359
53396
  }
53360
- });
53361
- } else {
53362
- return Promise.resolve(createImageThumbnail(file, undefined, 50, 50)).then(function (_ref7) {
53363
- var thumbnail = _ref7.thumbnail;
53364
- setAttachments(function (prevState) {
53365
- return [].concat(prevState, [{
53366
- data: file,
53367
- type: 'file',
53368
- upload: true,
53369
- attachmentUrl: createComposePreviewUrl(tid, file),
53370
- tid: tid,
53371
- size: file.size,
53397
+ };
53398
+ updateAttachment(patch);
53399
+ handleAttachmentImageForCache(_extends({}, attachment, patch));
53400
+ });
53401
+ } else {
53402
+ var _temp10 = function () {
53403
+ if (isMediaAttachment && file.type !== 'image/gif') {
53404
+ return Promise.resolve(resizeImage(file)).then(function (resizedFileData) {
53405
+ var resizedFile = resizedFileData.blob ? new File([resizedFileData.blob], resizedFileData.file.name, {
53406
+ type: file.type
53407
+ }) : file;
53408
+ var patch = {
53409
+ data: resizedFile,
53410
+ size: resizedFile.size,
53372
53411
  metadata: JSON.stringify({
53373
- tmb: thumbnail
53412
+ tmb: thumbnail,
53413
+ szw: resizedFileData.newWidth,
53414
+ szh: resizedFileData.newHeight
53374
53415
  })
53375
- }]);
53416
+ };
53417
+ updateAttachment(patch);
53418
+ setPendingAttachment(tid, {
53419
+ file: resizedFile
53420
+ });
53421
+ handleAttachmentImageForCache(_extends({}, attachment, patch));
53422
+ });
53423
+ } else {
53424
+ updateAttachment({
53425
+ metadata: JSON.stringify({
53426
+ tmb: thumbnail,
53427
+ szw: imageWidth,
53428
+ szh: imageHeight
53429
+ })
53376
53430
  });
53431
+ }
53432
+ }();
53433
+ if (_temp10 && _temp10.then) return _temp10.then(function () {});
53434
+ }
53435
+ }();
53436
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
53437
+ });
53438
+ }, function (error) {
53439
+ log.warn('Unable to prepare image attachment preview:', error);
53440
+ });
53441
+ if (_temp5 && _temp5.then) return _temp5.then(function () {});
53442
+ } else {
53443
+ var _temp11 = function () {
53444
+ if (fileType === 'video') {
53445
+ var _temp9 = function _temp9() {
53446
+ return Promise.resolve(remuxPromise).then(function (uploadFile) {
53447
+ if (uploadFile !== file) {
53448
+ updateAttachment({
53449
+ data: uploadFile,
53450
+ size: uploadFile.size
53451
+ });
53452
+ setPendingAttachment(tid, {
53453
+ file: uploadFile
53377
53454
  });
53378
53455
  }
53379
- }();
53380
- if (_temp7 && _temp7.then) return _temp7.then(function () {});
53381
- } else {
53382
- var _temp10 = function () {
53383
- if (fileType === 'video') {
53384
- return Promise.resolve(getFrame(file, 0)).then(function (_ref8) {
53385
- var thumb = _ref8.thumb,
53386
- width = _ref8.width,
53387
- height = _ref8.height,
53388
- duration = _ref8.duration;
53389
- var metas = JSON.stringify({
53390
- tmb: thumb,
53391
- width: width,
53392
- height: height,
53393
- dur: duration
53394
- });
53395
- var attachment = {
53396
- data: file,
53397
- type: 'video',
53398
- upload: true,
53399
- size: file.size,
53400
- attachmentUrl: createComposePreviewUrl(tid, file),
53401
- tid: tid,
53402
- metadata: metas
53403
- };
53404
- handleAttachmentVideoForCache(attachment);
53405
- setAttachments(function (prevState) {
53406
- return [].concat(prevState, [attachment]);
53407
- });
53456
+ if (metadata) {
53457
+ completeVideoPreparation(tid, {
53458
+ file: uploadFile,
53459
+ metadata: metadata
53408
53460
  });
53409
53461
  } else {
53410
- setAttachments(function (prevState) {
53411
- return [].concat(prevState, [{
53412
- data: file,
53413
- upload: true,
53414
- type: 'file',
53415
- size: file.size,
53416
- tid: tid
53417
- }]);
53462
+ failVideoPreparation(tid);
53463
+ updateAttachment({
53464
+ thumbnailState: 'failed'
53418
53465
  });
53419
53466
  }
53420
- }();
53421
- if (_temp10 && _temp10.then) return _temp10.then(function () {});
53422
- }
53423
- }();
53424
- if (_temp9 && _temp9.then) return _temp9.then(function () {});
53425
- }
53426
- }();
53427
- return Promise.resolve(_temp0 && _temp0.then ? _temp0.then(function () {}) : void 0);
53428
- } catch (e) {
53429
- return Promise.reject(e);
53430
- }
53431
- };
53432
- reader.onerror = function (e) {
53433
- log.info(' error on read file onError', e);
53434
- };
53435
- reader.readAsBinaryString(file);
53436
- };
53437
- var customUploader = getCustomUploader();
53438
- var _temp3 = function () {
53439
- if (file.type.split('/')[0] === 'video') {
53440
- return Promise.resolve(remuxVideoFileForUpload(file)).then(function (_remuxVideoFileForUpl) {
53441
- file = _remuxVideoFileForUpl;
53442
- });
53467
+ });
53468
+ };
53469
+ var remuxPromise = remuxVideoFileForUpload(file);
53470
+ var thumbnailSource = file;
53471
+ var metadata;
53472
+ var _temp8 = _catch(function () {
53473
+ function _temp7() {
53474
+ var _frame = frame,
53475
+ thumb = _frame.thumb,
53476
+ width = _frame.width,
53477
+ height = _frame.height,
53478
+ duration = _frame.duration;
53479
+ metadata = customUploader ? {
53480
+ szw: width,
53481
+ szh: height,
53482
+ tmb: thumb,
53483
+ dur: duration
53484
+ } : JSON.stringify({
53485
+ tmb: thumb,
53486
+ szw: width,
53487
+ szh: height,
53488
+ dur: duration
53489
+ });
53490
+ updateAttachment({
53491
+ metadata: metadata,
53492
+ thumbnailState: 'ready'
53493
+ });
53494
+ handleAttachmentVideoForCache(_extends({}, attachment, {
53495
+ metadata: metadata
53496
+ }));
53497
+ }
53498
+ var frame;
53499
+ var _temp6 = _catch(function () {
53500
+ return Promise.resolve(getFrame(thumbnailSource, 0)).then(function (_getFrame) {
53501
+ frame = _getFrame;
53502
+ });
53503
+ }, function () {
53504
+ return Promise.resolve(remuxPromise).then(function (_remuxPromise) {
53505
+ thumbnailSource = _remuxPromise;
53506
+ return Promise.resolve(getFrame(thumbnailSource, 0)).then(function (_getFrame2) {
53507
+ frame = _getFrame2;
53508
+ });
53509
+ });
53510
+ });
53511
+ return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
53512
+ }, function (error) {
53513
+ log.warn('Unable to generate video thumbnail:', error);
53514
+ });
53515
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
53516
+ }
53517
+ }();
53518
+ if (_temp11 && _temp11.then) return _temp11.then(function () {});
53519
+ }
53520
+ }();
53521
+ return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(function () {}) : void 0);
53522
+ } catch (e) {
53523
+ return Promise.reject(e);
53443
53524
  }
53444
- }();
53445
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3));
53525
+ }, 0);
53526
+ return Promise.resolve();
53446
53527
  } catch (e) {
53447
53528
  return Promise.reject(e);
53448
53529
  }
@@ -53501,14 +53582,14 @@ var SendMessageInput = function SendMessageInput(_ref3) {
53501
53582
  }
53502
53583
  }
53503
53584
  }
53504
- var _temp11 = function () {
53585
+ var _temp12 = function () {
53505
53586
  if (allowUpload) {
53506
53587
  return Promise.resolve(handleAddAttachmentWithViewOnceCheck(file, isMediaAttachment)).then(function () {});
53507
53588
  } else {
53508
53589
  showFileUploadError(errorMessage);
53509
53590
  }
53510
53591
  }();
53511
- return Promise.resolve(_temp11 && _temp11.then ? _temp11.then(function () {}) : void 0);
53592
+ return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {}) : void 0);
53512
53593
  } catch (e) {
53513
53594
  return Promise.reject(e);
53514
53595
  }
@@ -53611,18 +53692,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
53611
53692
  React.useEffect(function () {
53612
53693
  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) {
53613
53694
  if (attachments.length) {
53614
- var videoAttachment = false;
53615
- attachments.forEach(function (att) {
53616
- if ((att.type === 'video' || att.data.type.split('/')[0] === 'video') && att.type !== 'file') {
53617
- videoAttachment = true;
53618
- if (readyVideoAttachments[att.tid]) {
53619
- setSendMessageIsActive(true);
53620
- }
53621
- }
53622
- });
53623
- if (!videoAttachment) {
53624
- setSendMessageIsActive(true);
53625
- }
53695
+ setSendMessageIsActive(true);
53626
53696
  } else {
53627
53697
  setSendMessageIsActive(true);
53628
53698
  }
@@ -54305,14 +54375,14 @@ var SendMessageInputContainer = styled__default.div(_templateObject11$9 || (_tem
54305
54375
  }, AddAttachmentIcon, function (props) {
54306
54376
  return props.iconColor;
54307
54377
  });
54308
- var MessageInputWrapper = styled__default.div(_templateObject12$6 || (_templateObject12$6 = _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) {
54378
+ var MessageInputWrapper = styled__default.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) {
54309
54379
  return props.channelDetailsIsOpen ? "calc(100% - " + (props.channelDetailsIsOpen ? 362 : 0) + "px)" : '';
54310
54380
  }, function (props) {
54311
54381
  return props.backgroundColor;
54312
54382
  }, function (props) {
54313
54383
  return props.borderRadius || '18px';
54314
54384
  });
54315
- var LexicalWrapper = styled__default.div(_templateObject13$5 || (_templateObject13$5 = _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) {
54385
+ var LexicalWrapper = styled__default.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) {
54316
54386
  return props.borderRadius;
54317
54387
  }, function (props) {
54318
54388
  return props.backgroundColor;
@@ -55184,7 +55254,7 @@ var EmptyText = styled__default.div(_templateObject7$s || (_templateObject7$s =
55184
55254
  });
55185
55255
  var ChevronRightIconWrapper = styled__default.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"])));
55186
55256
 
55187
- 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$7, _templateObject13$6, _templateObject14$5, _templateObject15$3, _templateObject16$3, _templateObject17$3, _templateObject18$3, _templateObject19$3, _templateObject20$3;
55257
+ 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;
55188
55258
  var Actions = function Actions(_ref) {
55189
55259
  var _getDisappearingSetti;
55190
55260
  var setActionsHeight = _ref.setActionsHeight,
@@ -55721,8 +55791,8 @@ var DefaultMarkAsRead = styled__default(SvgMarkAsRead)(_templateObject0$i || (_t
55721
55791
  var DefaultMarkAsUnRead = styled__default(SvgMarkAsUnRead)(_templateObject1$g || (_templateObject1$g = _taggedTemplateLiteralLoose([""])));
55722
55792
  var DefaultBlockIcon = styled__default(SvgBlockChannel)(_templateObject10$d || (_templateObject10$d = _taggedTemplateLiteralLoose([""])));
55723
55793
  var DefaultReportIcon = styled__default(SvgReport)(_templateObject11$a || (_templateObject11$a = _taggedTemplateLiteralLoose([""])));
55724
- var DefaultClearIcon = styled__default(SvgClear)(_templateObject12$7 || (_templateObject12$7 = _taggedTemplateLiteralLoose([""])));
55725
- var DefaultDeleteChannelIcon = styled__default(SvgDeleteChannel)(_templateObject13$6 || (_templateObject13$6 = _taggedTemplateLiteralLoose([""])));
55794
+ var DefaultClearIcon = styled__default(SvgClear)(_templateObject12$8 || (_templateObject12$8 = _taggedTemplateLiteralLoose([""])));
55795
+ var DefaultDeleteChannelIcon = styled__default(SvgDeleteChannel)(_templateObject13$7 || (_templateObject13$7 = _taggedTemplateLiteralLoose([""])));
55726
55796
  var DefaultBottomIcon = styled__default(SvgBottom)(_templateObject14$5 || (_templateObject14$5 = _taggedTemplateLiteralLoose([""])));
55727
55797
  var DefaultMarkAsReadIcon = styled__default(SvgLeave)(_templateObject15$3 || (_templateObject15$3 = _taggedTemplateLiteralLoose([""])));
55728
55798
  var DefaultWatchIcon = styled__default(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) {
@@ -55911,7 +55981,7 @@ function SvgDownloadFile(props) {
55911
55981
  })));
55912
55982
  }
55913
55983
 
55914
- 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$8, _templateObject13$7, _templateObject14$6, _templateObject15$4;
55984
+ 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;
55915
55985
  var Files = function Files(_ref) {
55916
55986
  var channelId = _ref.channelId,
55917
55987
  filePreviewIcon = _ref.filePreviewIcon,
@@ -56126,12 +56196,12 @@ var FileIconCont = styled__default.span(_templateObject11$b || (_templateObject1
56126
56196
  }, function (props) {
56127
56197
  return props.fillColor;
56128
56198
  });
56129
- var FileHoverIconCont = styled__default.span(_templateObject12$8 || (_templateObject12$8 = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
56199
+ var FileHoverIconCont = styled__default.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) {
56130
56200
  return props.iconColor;
56131
56201
  }, function (props) {
56132
56202
  return props.fillColor;
56133
56203
  });
56134
- var FileThumb = styled__default.img(_templateObject13$7 || (_templateObject13$7 = _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"])));
56204
+ var FileThumb = styled__default.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"])));
56135
56205
  var FileItem = styled__default.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) {
56136
56206
  return props.hoverBackgroundColor;
56137
56207
  }, DownloadWrapper, FileIconCont, FileHoverIconCont);
@@ -56820,7 +56890,7 @@ function ResetLinkConfirmModal(_ref) {
56820
56890
  });
56821
56891
  }
56822
56892
 
56823
- 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$9, _templateObject13$8;
56893
+ 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;
56824
56894
  function loadImage$1(src) {
56825
56895
  return new Promise(function (resolve, reject) {
56826
56896
  var img = document.createElement('img');
@@ -57437,16 +57507,16 @@ var Switch = styled__default.div(_templateObject10$f || (_templateObject10$f = _
57437
57507
  return p.active ? '22px' : '3px';
57438
57508
  });
57439
57509
  var ResetLink = styled__default.button(_templateObject11$c || (_templateObject11$c = _taggedTemplateLiteralLoose(["\n margin-top: 12px;\n border: none;\n background: transparent;\n color: #ff4d4f;\n cursor: pointer;\n"])));
57440
- var QRCodeBox = styled__default.div(_templateObject12$9 || (_templateObject12$9 = _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) {
57510
+ var QRCodeBox = styled__default.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) {
57441
57511
  return p.borderColor;
57442
57512
  }, function (p) {
57443
57513
  return p.backgroundColor;
57444
57514
  });
57445
- var QrHint = styled__default.p(_templateObject13$8 || (_templateObject13$8 = _taggedTemplateLiteralLoose(["\n text-align: center;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n margin: 12px 0 0;\n"])), function (p) {
57515
+ var QrHint = styled__default.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) {
57446
57516
  return p.color;
57447
57517
  });
57448
57518
 
57449
- 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$a, _templateObject13$9;
57519
+ 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;
57450
57520
  var Members = function Members(_ref) {
57451
57521
  var _members$find;
57452
57522
  var channel = _ref.channel,
@@ -57804,12 +57874,12 @@ var SkeletonBlock$5 = styled__default.div(_templateObject0$n || (_templateObject
57804
57874
  var SkeletonMemberRow = styled__default.div(_templateObject1$j || (_templateObject1$j = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 6px 16px;\n gap: 12px;\n height: 56px;\n"])));
57805
57875
  var SkeletonAvatar$1 = styled__default(SkeletonBlock$5)(_templateObject10$g || (_templateObject10$g = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 40px;\n border-radius: 50%;\n flex-shrink: 0;\n"])));
57806
57876
  var SkeletonTextGroup$2 = styled__default.div(_templateObject11$d || (_templateObject11$d = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
57807
- var SkeletonLine$4 = styled__default(SkeletonBlock$5)(_templateObject12$a || (_templateObject12$a = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n border-radius: 7px;\n"])), function (p) {
57877
+ var SkeletonLine$4 = styled__default(SkeletonBlock$5)(_templateObject12$b || (_templateObject12$b = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n border-radius: 7px;\n"])), function (p) {
57808
57878
  return p.width;
57809
57879
  }, function (p) {
57810
57880
  return p.height || '14px';
57811
57881
  });
57812
- var RoleBadge = styled__default.span(_templateObject13$9 || (_templateObject13$9 = _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) {
57882
+ var RoleBadge = styled__default.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) {
57813
57883
  return props.color;
57814
57884
  }, function (props) {
57815
57885
  return props.backgroundColor;
@@ -58789,7 +58859,7 @@ function SvgChevronDownSearch(props) {
58789
58859
  })));
58790
58860
  }
58791
58861
 
58792
- 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$b, _templateObject13$a, _templateObject14$7, _templateObject15$5, _templateObject16$4, _templateObject17$4, _templateObject18$4, _templateObject19$4, _templateObject20$4, _templateObject21$3, _templateObject22$2, _templateObject23$2, _templateObject24$2, _templateObject25$2;
58862
+ 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;
58793
58863
  var SEARCH_DEBOUNCE_MS = 400;
58794
58864
  function formatMessageDate(date) {
58795
58865
  if (!date) return '';
@@ -59231,8 +59301,8 @@ var StatusText$1 = styled__default.p(_templateObject11$f || (_templateObject11$f
59231
59301
  }, function (props) {
59232
59302
  return props.full ? 'height: 100%;' : '';
59233
59303
  });
59234
- var GroupSection = styled__default.div(_templateObject12$b || (_templateObject12$b = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
59235
- var GroupLabel = styled__default.div(_templateObject13$a || (_templateObject13$a = _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) {
59304
+ var GroupSection = styled__default.div(_templateObject12$c || (_templateObject12$c = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
59305
+ var GroupLabel = styled__default.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) {
59236
59306
  return p.backgroundColor;
59237
59307
  }, function (p) {
59238
59308
  return p.color;