@azure/communication-react 1.26.0-alpha-202504090018 → 1.26.0-alpha-202504162032

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 (55) hide show
  1. package/dist/communication-react.d.ts +47 -15
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DGvSX6E8.js → ChatMessageComponentAsRichTextEditBox-ClBYNQcI.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DGvSX6E8.js.map → ChatMessageComponentAsRichTextEditBox-ClBYNQcI.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DyvN1xv0.js → RichTextSendBoxWrapper-zKj5z_6J.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DyvN1xv0.js.map → RichTextSendBoxWrapper-zKj5z_6J.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-Bhb6v-9U.js → index-Y6qfhE4K.js} +610 -274
  7. package/dist/dist-cjs/communication-react/index-Y6qfhE4K.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -2
  12. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  13. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +3 -0
  14. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  15. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -0
  16. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +15 -6
  17. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +1 -1
  19. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/RealTimeText.d.ts +3 -3
  21. package/dist/dist-esm/react-components/src/components/RealTimeText.js +1 -1
  22. package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.d.ts +3 -3
  24. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js +1 -1
  25. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +3 -3
  27. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js +1 -1
  28. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +14 -3
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +12 -2
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -1
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -1
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +2 -2
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +1 -0
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +6 -8
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +10 -5
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -0
  44. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +66 -4
  45. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  46. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +24 -6
  47. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +77 -41
  48. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  49. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/OnFetchProfileCallback.d.ts +39 -0
  50. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/OnFetchProfileCallback.js +203 -0
  51. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/OnFetchProfileCallback.js.map +1 -0
  52. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +2 -0
  53. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  54. package/package.json +2 -2
  55. package/dist/dist-cjs/communication-react/index-Bhb6v-9U.js.map +0 -1
@@ -187,7 +187,7 @@ function getDefaultExportFromCjs (x) {
187
187
  // Copyright (c) Microsoft Corporation.
188
188
  // Licensed under the MIT License.
189
189
  // GENERATED FILE. DO NOT EDIT MANUALLY.
190
- var telemetryVersion = '1.26.0-alpha-202504090018';
190
+ var telemetryVersion = '1.26.0-alpha-202504162032';
191
191
 
192
192
 
193
193
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -638,7 +638,7 @@ const getTogetherModeCallFeature = (state, props) => { var _a; return (_a = stat
638
638
 
639
639
  // Copyright (c) Microsoft Corporation.
640
640
  // Licensed under the MIT License.
641
- var __awaiter$13 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
641
+ var __awaiter$14 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
642
642
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
643
643
  return new (P || (P = Promise))(function (resolve, reject) {
644
644
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -678,7 +678,7 @@ const _isPreviewOn = (deviceManager) => {
678
678
  *
679
679
  * @private
680
680
  */
681
- const disposeAllLocalPreviewViews = (callClient) => __awaiter$13(undefined, undefined, undefined, function* () {
681
+ const disposeAllLocalPreviewViews = (callClient) => __awaiter$14(undefined, undefined, undefined, function* () {
682
682
  const unparentedViews = callClient.getState().deviceManager.unparentedViews;
683
683
  for (const view of unparentedViews) {
684
684
  yield callClient.disposeView(undefined, undefined, view);
@@ -754,7 +754,7 @@ const maskDisplayNameWithRole = (displayName, localUserRole, participantRole, is
754
754
  * Helper to create a local video stream from the selected camera.
755
755
  * @private
756
756
  */
757
- const createLocalVideoStream = (callClient) => __awaiter$13(undefined, undefined, undefined, function* () {
757
+ const createLocalVideoStream = (callClient) => __awaiter$14(undefined, undefined, undefined, function* () {
758
758
  const camera = yield (callClient === null || callClient === undefined ? undefined : callClient.getState().deviceManager.selectedCamera);
759
759
  if (camera) {
760
760
  return new communicationCalling.LocalVideoStream(camera);
@@ -889,7 +889,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
889
889
 
890
890
  // Copyright (c) Microsoft Corporation.
891
891
  // Licensed under the MIT License.
892
- var __awaiter$12 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
892
+ var __awaiter$13 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
893
893
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
894
894
  return new (P || (P = Promise))(function (resolve, reject) {
895
895
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -910,7 +910,7 @@ const areStreamsEqual = (prevStream, newStream) => {
910
910
  * @private
911
911
  */
912
912
  const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager, call, options) => {
913
- const onStartLocalVideo = () => __awaiter$12(undefined, undefined, undefined, function* () {
913
+ const onStartLocalVideo = () => __awaiter$13(undefined, undefined, undefined, function* () {
914
914
  // Before the call object creates a stream, dispose of any local preview streams.
915
915
  // @TODO: is there any way to parent the unparented view to the call object instead
916
916
  // of disposing and creating a new stream?
@@ -930,7 +930,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
930
930
  yield call.startVideo(stream);
931
931
  }
932
932
  });
933
- const onStopLocalVideo = (stream) => __awaiter$12(undefined, undefined, undefined, function* () {
933
+ const onStopLocalVideo = (stream) => __awaiter$13(undefined, undefined, undefined, function* () {
934
934
  const callId = call === null || call === undefined ? undefined : call.id;
935
935
  if (!callId) {
936
936
  return;
@@ -939,7 +939,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
939
939
  yield call.stopVideo(stream);
940
940
  }
941
941
  });
942
- const onToggleCamera = (options) => __awaiter$12(undefined, undefined, undefined, function* () {
942
+ const onToggleCamera = (options) => __awaiter$13(undefined, undefined, undefined, function* () {
943
943
  const previewOn = _isPreviewOn(callClient.getState().deviceManager);
944
944
  // the disposal of the unparented views is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
945
945
  // The root cause of the issue is caused by never transitioning the unparented view to the
@@ -996,19 +996,19 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
996
996
  }
997
997
  }
998
998
  });
999
- const onSelectMicrophone = (device) => __awaiter$12(undefined, undefined, undefined, function* () {
999
+ const onSelectMicrophone = (device) => __awaiter$13(undefined, undefined, undefined, function* () {
1000
1000
  if (!deviceManager) {
1001
1001
  return;
1002
1002
  }
1003
1003
  return deviceManager.selectMicrophone(device);
1004
1004
  });
1005
- const onSelectSpeaker = (device) => __awaiter$12(undefined, undefined, undefined, function* () {
1005
+ const onSelectSpeaker = (device) => __awaiter$13(undefined, undefined, undefined, function* () {
1006
1006
  if (!deviceManager) {
1007
1007
  return;
1008
1008
  }
1009
1009
  return deviceManager.selectSpeaker(device);
1010
1010
  });
1011
- const onSelectCamera = (device, options) => __awaiter$12(undefined, undefined, undefined, function* () {
1011
+ const onSelectCamera = (device, options) => __awaiter$13(undefined, undefined, undefined, function* () {
1012
1012
  if (!deviceManager) {
1013
1013
  return;
1014
1014
  }
@@ -1047,9 +1047,9 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1047
1047
  }, options);
1048
1048
  }
1049
1049
  });
1050
- const onRaiseHand = () => __awaiter$12(undefined, undefined, undefined, function* () { var _a; return yield ((_a = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.RaiseHand)) === null || _a === undefined ? undefined : _a.raiseHand()); });
1051
- const onLowerHand = () => __awaiter$12(undefined, undefined, undefined, function* () { var _b; return yield ((_b = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.RaiseHand)) === null || _b === undefined ? undefined : _b.lowerHand()); });
1052
- const onToggleRaiseHand = () => __awaiter$12(undefined, undefined, undefined, function* () {
1050
+ const onRaiseHand = () => __awaiter$13(undefined, undefined, undefined, function* () { var _a; return yield ((_a = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.RaiseHand)) === null || _a === undefined ? undefined : _a.raiseHand()); });
1051
+ const onLowerHand = () => __awaiter$13(undefined, undefined, undefined, function* () { var _b; return yield ((_b = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.RaiseHand)) === null || _b === undefined ? undefined : _b.lowerHand()); });
1052
+ const onToggleRaiseHand = () => __awaiter$13(undefined, undefined, undefined, function* () {
1053
1053
  const raiseHandFeature = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.RaiseHand);
1054
1054
  const localUserId = callClient.getState().userId;
1055
1055
  const isLocalRaisedHand = raiseHandFeature === null || raiseHandFeature === undefined ? undefined : raiseHandFeature.getRaisedHands().find((publishedState) => toFlatCommunicationIdentifier(publishedState.identifier) === toFlatCommunicationIdentifier(localUserId));
@@ -1060,7 +1060,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1060
1060
  yield (raiseHandFeature === null || raiseHandFeature === undefined ? undefined : raiseHandFeature.raiseHand());
1061
1061
  }
1062
1062
  });
1063
- const onReactionClick = (reaction) => __awaiter$12(undefined, undefined, undefined, function* () {
1063
+ const onReactionClick = (reaction) => __awaiter$13(undefined, undefined, undefined, function* () {
1064
1064
  var _c;
1065
1065
  if (reaction === 'like' ||
1066
1066
  reaction === 'applause' ||
@@ -1074,18 +1074,18 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1074
1074
  }
1075
1075
  return;
1076
1076
  });
1077
- const onToggleMicrophone = () => __awaiter$12(undefined, undefined, undefined, function* () {
1077
+ const onToggleMicrophone = () => __awaiter$13(undefined, undefined, undefined, function* () {
1078
1078
  if (!call || !(_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {
1079
1079
  throw new Error(`Please invoke onToggleMicrophone after call is started`);
1080
1080
  }
1081
1081
  return call.isMuted ? yield call.unmute() : yield call.mute();
1082
1082
  });
1083
- const onStartScreenShare = () => __awaiter$12(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.startScreenSharing()); });
1084
- const onStopScreenShare = () => __awaiter$12(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.stopScreenSharing()); });
1085
- const onToggleScreenShare = () => __awaiter$12(undefined, undefined, undefined, function* () { return (call === null || call === undefined ? undefined : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
1086
- const onHangUp = (forEveryone) => __awaiter$12(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
1087
- const onToggleHold = () => __awaiter$12(undefined, undefined, undefined, function* () { return (call === null || call === undefined ? undefined : call.state) === 'LocalHold' ? yield (call === null || call === undefined ? undefined : call.resume()) : yield (call === null || call === undefined ? undefined : call.hold()); });
1088
- const onCreateLocalStreamView = (...args_1) => __awaiter$12(undefined, [...args_1], undefined, function* (options = { scalingMode: 'Crop', isMirrored: true }) {
1083
+ const onStartScreenShare = () => __awaiter$13(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.startScreenSharing()); });
1084
+ const onStopScreenShare = () => __awaiter$13(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.stopScreenSharing()); });
1085
+ const onToggleScreenShare = () => __awaiter$13(undefined, undefined, undefined, function* () { return (call === null || call === undefined ? undefined : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
1086
+ const onHangUp = (forEveryone) => __awaiter$13(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
1087
+ const onToggleHold = () => __awaiter$13(undefined, undefined, undefined, function* () { return (call === null || call === undefined ? undefined : call.state) === 'LocalHold' ? yield (call === null || call === undefined ? undefined : call.resume()) : yield (call === null || call === undefined ? undefined : call.hold()); });
1088
+ const onCreateLocalStreamView = (...args_1) => __awaiter$13(undefined, [...args_1], undefined, function* (options = { scalingMode: 'Crop', isMirrored: true }) {
1089
1089
  if (!call || call.localVideoStreams.length === 0) {
1090
1090
  return;
1091
1091
  }
@@ -1109,7 +1109,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1109
1109
  }
1110
1110
  return (createViewResult === null || createViewResult === undefined ? undefined : createViewResult.view) ? { view: createViewResult === null || createViewResult === undefined ? undefined : createViewResult.view } : undefined;
1111
1111
  });
1112
- const onCreateRemoteStreamView = (userId_1, ...args_2) => __awaiter$12(undefined, [userId_1, ...args_2], undefined, function* (userId, options = { scalingMode: 'Crop' }) {
1112
+ const onCreateRemoteStreamView = (userId_1, ...args_2) => __awaiter$13(undefined, [userId_1, ...args_2], undefined, function* (userId, options = { scalingMode: 'Crop' }) {
1113
1113
  if (!call) {
1114
1114
  return;
1115
1115
  }
@@ -1146,7 +1146,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1146
1146
  }
1147
1147
  return (createViewResult === null || createViewResult === undefined ? undefined : createViewResult.view) ? { view: createViewResult === null || createViewResult === undefined ? undefined : createViewResult.view } : undefined;
1148
1148
  });
1149
- const onDisposeRemoteStreamView = (userId) => __awaiter$12(undefined, undefined, undefined, function* () {
1149
+ const onDisposeRemoteStreamView = (userId) => __awaiter$13(undefined, undefined, undefined, function* () {
1150
1150
  if (!call) {
1151
1151
  return;
1152
1152
  }
@@ -1167,7 +1167,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1167
1167
  callClient.disposeView(call.id, participant.identifier, screenShareStream);
1168
1168
  }
1169
1169
  });
1170
- const onDisposeRemoteVideoStreamView = (userId) => __awaiter$12(undefined, undefined, undefined, function* () {
1170
+ const onDisposeRemoteVideoStreamView = (userId) => __awaiter$13(undefined, undefined, undefined, function* () {
1171
1171
  if (!call) {
1172
1172
  return;
1173
1173
  }
@@ -1186,7 +1186,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1186
1186
  }
1187
1187
  }
1188
1188
  });
1189
- const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$12(undefined, undefined, undefined, function* () {
1189
+ const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$13(undefined, undefined, undefined, function* () {
1190
1190
  if (!call) {
1191
1191
  return;
1192
1192
  }
@@ -1205,7 +1205,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1205
1205
  }
1206
1206
  }
1207
1207
  });
1208
- const onDisposeLocalScreenShareStreamView = () => __awaiter$12(undefined, undefined, undefined, function* () {
1208
+ const onDisposeLocalScreenShareStreamView = () => __awaiter$13(undefined, undefined, undefined, function* () {
1209
1209
  if (!call) {
1210
1210
  return;
1211
1211
  }
@@ -1218,7 +1218,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1218
1218
  callClient.disposeView(call.id, undefined, screenShareStream);
1219
1219
  }
1220
1220
  });
1221
- const onDisposeLocalStreamView = () => __awaiter$12(undefined, undefined, undefined, function* () {
1221
+ const onDisposeLocalStreamView = () => __awaiter$13(undefined, undefined, undefined, function* () {
1222
1222
  // If the user is currently in a call, dispose of the local stream view attached to that call.
1223
1223
  const callState = call && callClient.getState().calls[call.id];
1224
1224
  const localStream = callState === null || callState === undefined ? undefined : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
@@ -1230,17 +1230,17 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1230
1230
  // TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.
1231
1231
  yield disposeAllLocalPreviewViews(callClient);
1232
1232
  });
1233
- const onSendDtmfTone = (dtmfTone) => __awaiter$12(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.sendDtmf(dtmfTone)); });
1233
+ const onSendDtmfTone = (dtmfTone) => __awaiter$13(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.sendDtmf(dtmfTone)); });
1234
1234
  const notImplemented = () => {
1235
1235
  throw new Error('Not implemented, cannot call a method from an abstract object');
1236
1236
  };
1237
1237
  /* @conditional-compile-remove(call-readiness) */
1238
- const askDevicePermission = (constrain) => __awaiter$12(undefined, undefined, undefined, function* () {
1238
+ const askDevicePermission = (constrain) => __awaiter$13(undefined, undefined, undefined, function* () {
1239
1239
  if (deviceManager) {
1240
1240
  yield (deviceManager === null || deviceManager === undefined ? undefined : deviceManager.askDevicePermission(constrain));
1241
1241
  }
1242
1242
  });
1243
- const onRemoveVideoBackgroundEffects = () => __awaiter$12(undefined, undefined, undefined, function* () {
1243
+ const onRemoveVideoBackgroundEffects = () => __awaiter$13(undefined, undefined, undefined, function* () {
1244
1244
  const stream = (call === null || call === undefined ? undefined : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
1245
1245
  (deviceManager === null || deviceManager === undefined ? undefined : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
1246
1246
  if (stream) {
@@ -1252,7 +1252,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1252
1252
  }
1253
1253
  }
1254
1254
  });
1255
- const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$12(undefined, undefined, undefined, function* () {
1255
+ const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$13(undefined, undefined, undefined, function* () {
1256
1256
  var _d;
1257
1257
  const stream = (call === null || call === undefined ? undefined : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
1258
1258
  (deviceManager === null || deviceManager === undefined ? undefined : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
@@ -1265,7 +1265,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1265
1265
  return createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundBlurConfig));
1266
1266
  }
1267
1267
  });
1268
- const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$12(undefined, undefined, undefined, function* () {
1268
+ const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$13(undefined, undefined, undefined, function* () {
1269
1269
  var _e;
1270
1270
  const stream = (call === null || call === undefined ? undefined : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
1271
1271
  (deviceManager === null || deviceManager === undefined ? undefined : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
@@ -1278,7 +1278,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1278
1278
  return (createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundReplacementConfig)));
1279
1279
  }
1280
1280
  });
1281
- const onStartNoiseSuppressionEffect = () => __awaiter$12(undefined, undefined, undefined, function* () {
1281
+ const onStartNoiseSuppressionEffect = () => __awaiter$13(undefined, undefined, undefined, function* () {
1282
1282
  var _f;
1283
1283
  const audioEffects = (options === null || options === undefined ? undefined : options.onResolveDeepNoiseSuppressionDependency) &&
1284
1284
  ((_f = (yield options.onResolveDeepNoiseSuppressionDependency())) === null || _f === undefined ? undefined : _f.deepNoiseSuppressionEffect);
@@ -1294,7 +1294,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1294
1294
  }
1295
1295
  }
1296
1296
  });
1297
- const onStopNoiseSuppressionEffect = () => __awaiter$12(undefined, undefined, undefined, function* () {
1297
+ const onStopNoiseSuppressionEffect = () => __awaiter$13(undefined, undefined, undefined, function* () {
1298
1298
  const stream = call === null || call === undefined ? undefined : call.localAudioStreams.find((stream) => stream.mediaStreamType === 'Audio');
1299
1299
  if (stream && (options === null || options === undefined ? undefined : options.onResolveDeepNoiseSuppressionDependency)) {
1300
1300
  const audioEffects = {
@@ -1303,42 +1303,42 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1303
1303
  return yield stream.feature(communicationCalling.Features.AudioEffects).stopEffects(audioEffects);
1304
1304
  }
1305
1305
  });
1306
- const onStartCaptions = (options) => __awaiter$12(undefined, undefined, undefined, function* () {
1306
+ const onStartCaptions = (options) => __awaiter$13(undefined, undefined, undefined, function* () {
1307
1307
  const captionsFeature = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Captions).captions;
1308
1308
  yield (captionsFeature === null || captionsFeature === undefined ? undefined : captionsFeature.startCaptions(options));
1309
1309
  });
1310
- const onStopCaptions = () => __awaiter$12(undefined, undefined, undefined, function* () {
1310
+ const onStopCaptions = () => __awaiter$13(undefined, undefined, undefined, function* () {
1311
1311
  const captionsFeature = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Captions).captions;
1312
1312
  yield (captionsFeature === null || captionsFeature === undefined ? undefined : captionsFeature.stopCaptions());
1313
1313
  });
1314
- const onSetSpokenLanguage = (language) => __awaiter$12(undefined, undefined, undefined, function* () {
1314
+ const onSetSpokenLanguage = (language) => __awaiter$13(undefined, undefined, undefined, function* () {
1315
1315
  const captionsFeature = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Captions).captions;
1316
1316
  yield (captionsFeature === null || captionsFeature === undefined ? undefined : captionsFeature.setSpokenLanguage(language));
1317
1317
  });
1318
- const onSetCaptionLanguage = (language) => __awaiter$12(undefined, undefined, undefined, function* () {
1318
+ const onSetCaptionLanguage = (language) => __awaiter$13(undefined, undefined, undefined, function* () {
1319
1319
  const captionsFeature = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Captions).captions;
1320
1320
  yield captionsFeature.setCaptionLanguage(language);
1321
1321
  });
1322
1322
  /* @conditional-compile-remove(rtt) */
1323
- const onSendRealTimeText = (text, isFinalized) => __awaiter$12(undefined, undefined, undefined, function* () {
1323
+ const onSendRealTimeText = (text, isFinalized) => __awaiter$13(undefined, undefined, undefined, function* () {
1324
1324
  const realTimeTextFeature = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.RealTimeText);
1325
1325
  yield (realTimeTextFeature === null || realTimeTextFeature === undefined ? undefined : realTimeTextFeature.sendRealTimeText(text, isFinalized));
1326
1326
  });
1327
- const onSubmitSurvey = (survey) => __awaiter$12(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.CallSurvey).submitSurvey(survey)); });
1328
- const onStartSpotlight = (userIds) => __awaiter$12(undefined, undefined, undefined, function* () {
1327
+ const onSubmitSurvey = (survey) => __awaiter$13(undefined, undefined, undefined, function* () { return yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.CallSurvey).submitSurvey(survey)); });
1328
+ const onStartSpotlight = (userIds) => __awaiter$13(undefined, undefined, undefined, function* () {
1329
1329
  const participants = userIds === null || userIds === undefined ? undefined : userIds.map((userId) => _toCommunicationIdentifier(userId));
1330
1330
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Spotlight).startSpotlight(participants));
1331
1331
  });
1332
- const onStopSpotlight = (userIds) => __awaiter$12(undefined, undefined, undefined, function* () {
1332
+ const onStopSpotlight = (userIds) => __awaiter$13(undefined, undefined, undefined, function* () {
1333
1333
  const participants = userIds === null || userIds === undefined ? undefined : userIds.map((userId) => _toCommunicationIdentifier(userId));
1334
1334
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Spotlight).stopSpotlight(participants));
1335
1335
  });
1336
- const onStopAllSpotlight = () => __awaiter$12(undefined, undefined, undefined, function* () {
1336
+ const onStopAllSpotlight = () => __awaiter$13(undefined, undefined, undefined, function* () {
1337
1337
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Spotlight).stopAllSpotlight());
1338
1338
  });
1339
- const onMuteParticipant = (userId) => __awaiter$12(undefined, undefined, undefined, function* () {
1339
+ const onMuteParticipant = (userId) => __awaiter$13(undefined, undefined, undefined, function* () {
1340
1340
  if (call === null || call === undefined ? undefined : call.remoteParticipants) {
1341
- call === null || call === undefined ? undefined : call.remoteParticipants.forEach((participant) => __awaiter$12(undefined, undefined, undefined, function* () {
1341
+ call === null || call === undefined ? undefined : call.remoteParticipants.forEach((participant) => __awaiter$13(undefined, undefined, undefined, function* () {
1342
1342
  // Using toFlatCommunicationIdentifier to convert the CommunicationIdentifier to string
1343
1343
  // as _toCommunicationIdentifier(userId) comparison to participant.identifier did not work for this case
1344
1344
  if (toFlatCommunicationIdentifier(participant.identifier) === userId) {
@@ -1347,33 +1347,33 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1347
1347
  }));
1348
1348
  }
1349
1349
  });
1350
- const onMuteAllRemoteParticipants = () => __awaiter$12(undefined, undefined, undefined, function* () {
1350
+ const onMuteAllRemoteParticipants = () => __awaiter$13(undefined, undefined, undefined, function* () {
1351
1351
  call === null || call === undefined ? undefined : call.muteAllRemoteParticipants();
1352
1352
  });
1353
1353
  const canStartSpotlight = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Capabilities).capabilities.spotlightParticipant.isPresent;
1354
1354
  const canRemoveSpotlight = call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Capabilities).capabilities.removeParticipantsSpotlight.isPresent;
1355
1355
  const onStartLocalSpotlight = canStartSpotlight
1356
- ? () => __awaiter$12(undefined, undefined, undefined, function* () {
1356
+ ? () => __awaiter$13(undefined, undefined, undefined, function* () {
1357
1357
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Spotlight).startSpotlight());
1358
1358
  })
1359
1359
  : undefined;
1360
- const onStopLocalSpotlight = () => __awaiter$12(undefined, undefined, undefined, function* () {
1360
+ const onStopLocalSpotlight = () => __awaiter$13(undefined, undefined, undefined, function* () {
1361
1361
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Spotlight).stopSpotlight());
1362
1362
  });
1363
1363
  const onStartRemoteSpotlight = canStartSpotlight
1364
- ? (userIds) => __awaiter$12(undefined, undefined, undefined, function* () {
1364
+ ? (userIds) => __awaiter$13(undefined, undefined, undefined, function* () {
1365
1365
  const participants = userIds === null || userIds === undefined ? undefined : userIds.map((userId) => _toCommunicationIdentifier(userId));
1366
1366
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Spotlight).startSpotlight(participants));
1367
1367
  })
1368
1368
  : undefined;
1369
1369
  const onStopRemoteSpotlight = canRemoveSpotlight
1370
- ? (userIds) => __awaiter$12(undefined, undefined, undefined, function* () {
1370
+ ? (userIds) => __awaiter$13(undefined, undefined, undefined, function* () {
1371
1371
  const participants = userIds === null || userIds === undefined ? undefined : userIds.map((userId) => _toCommunicationIdentifier(userId));
1372
1372
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.Spotlight).stopSpotlight(participants));
1373
1373
  })
1374
1374
  : undefined;
1375
1375
  /* @conditional-compile-remove(together-mode) */
1376
- const onCreateTogetherModeStreamView = (...args_3) => __awaiter$12(undefined, [...args_3], undefined, function* (options = { scalingMode: 'Fit', isMirrored: false, viewKind: 'main' }) {
1376
+ const onCreateTogetherModeStreamView = (...args_3) => __awaiter$13(undefined, [...args_3], undefined, function* (options = { scalingMode: 'Fit', isMirrored: false, viewKind: 'main' }) {
1377
1377
  if (!call) {
1378
1378
  return;
1379
1379
  }
@@ -1394,7 +1394,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1394
1394
  return togetherModeCreateViewResult;
1395
1395
  });
1396
1396
  /* @conditional-compile-remove(together-mode) */
1397
- const onDisposeTogetherModeStreamView = () => __awaiter$12(undefined, undefined, undefined, function* () {
1397
+ const onDisposeTogetherModeStreamView = () => __awaiter$13(undefined, undefined, undefined, function* () {
1398
1398
  if (!call) {
1399
1399
  return;
1400
1400
  }
@@ -1417,32 +1417,32 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1417
1417
  togetherModeFeature.sceneSize = { width, height };
1418
1418
  }
1419
1419
  };
1420
- const onForbidAudio = (userIds) => __awaiter$12(undefined, undefined, undefined, function* () {
1420
+ const onForbidAudio = (userIds) => __awaiter$13(undefined, undefined, undefined, function* () {
1421
1421
  const participants = userIds === null || userIds === undefined ? undefined : userIds.map((userId) => _toCommunicationIdentifier(userId));
1422
1422
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.MediaAccess).forbidAudio(participants));
1423
1423
  });
1424
- const onPermitAudio = (userIds) => __awaiter$12(undefined, undefined, undefined, function* () {
1424
+ const onPermitAudio = (userIds) => __awaiter$13(undefined, undefined, undefined, function* () {
1425
1425
  const participants = userIds === null || userIds === undefined ? undefined : userIds.map((userId) => _toCommunicationIdentifier(userId));
1426
1426
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.MediaAccess).permitAudio(participants));
1427
1427
  });
1428
- const onForbidOthersAudio = () => __awaiter$12(undefined, undefined, undefined, function* () {
1428
+ const onForbidOthersAudio = () => __awaiter$13(undefined, undefined, undefined, function* () {
1429
1429
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.MediaAccess).forbidOthersAudio());
1430
1430
  });
1431
- const onPermitOthersAudio = () => __awaiter$12(undefined, undefined, undefined, function* () {
1431
+ const onPermitOthersAudio = () => __awaiter$13(undefined, undefined, undefined, function* () {
1432
1432
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.MediaAccess).permitOthersAudio());
1433
1433
  });
1434
- const onForbidVideo = (userIds) => __awaiter$12(undefined, undefined, undefined, function* () {
1434
+ const onForbidVideo = (userIds) => __awaiter$13(undefined, undefined, undefined, function* () {
1435
1435
  const participants = userIds === null || userIds === undefined ? undefined : userIds.map((userId) => _toCommunicationIdentifier(userId));
1436
1436
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.MediaAccess).forbidVideo(participants));
1437
1437
  });
1438
- const onPermitVideo = (userIds) => __awaiter$12(undefined, undefined, undefined, function* () {
1438
+ const onPermitVideo = (userIds) => __awaiter$13(undefined, undefined, undefined, function* () {
1439
1439
  const participants = userIds === null || userIds === undefined ? undefined : userIds.map((userId) => _toCommunicationIdentifier(userId));
1440
1440
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.MediaAccess).permitVideo(participants));
1441
1441
  });
1442
- const onForbidOthersVideo = () => __awaiter$12(undefined, undefined, undefined, function* () {
1442
+ const onForbidOthersVideo = () => __awaiter$13(undefined, undefined, undefined, function* () {
1443
1443
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.MediaAccess).forbidOthersVideo());
1444
1444
  });
1445
- const onPermitOthersVideo = () => __awaiter$12(undefined, undefined, undefined, function* () {
1445
+ const onPermitOthersVideo = () => __awaiter$13(undefined, undefined, undefined, function* () {
1446
1446
  yield (call === null || call === undefined ? undefined : call.feature(communicationCalling.Features.MediaAccess).permitOthersVideo());
1447
1447
  });
1448
1448
  return {
@@ -1518,7 +1518,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1518
1518
 
1519
1519
  // Copyright (c) Microsoft Corporation.
1520
1520
  // Licensed under the MIT License.
1521
- var __awaiter$11 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1521
+ var __awaiter$12 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1522
1522
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1523
1523
  return new (P || (P = Promise))(function (resolve, reject) {
1524
1524
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -1542,7 +1542,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
1542
1542
  // FIXME: onStartCall API should use string, not the underlying SDK types.
1543
1543
  onStartCall: (participants, options) => {
1544
1544
  return callAgent === null || callAgent === undefined ? undefined : callAgent.startCall(participants, options);
1545
- }, onAddParticipant: (userId, options) => __awaiter$11(undefined, undefined, undefined, function* () {
1545
+ }, onAddParticipant: (userId, options) => __awaiter$12(undefined, undefined, undefined, function* () {
1546
1546
  const participant = _toCommunicationIdentifier(userId);
1547
1547
  if (communicationCommon.isPhoneNumberIdentifier(participant)) {
1548
1548
  call === null || call === undefined ? undefined : call.addParticipant(participant, options);
@@ -1550,16 +1550,16 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
1550
1550
  else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
1551
1551
  call === null || call === undefined ? undefined : call.addParticipant(participant);
1552
1552
  }
1553
- }), onRemoveParticipant: (userId) => __awaiter$11(undefined, undefined, undefined, function* () {
1553
+ }), onRemoveParticipant: (userId) => __awaiter$12(undefined, undefined, undefined, function* () {
1554
1554
  const participant = _toCommunicationIdentifier(userId);
1555
1555
  yield (call === null || call === undefined ? undefined : call.removeParticipant(participant));
1556
- }), onAcceptCall: (incomingCallId, useVideo) => __awaiter$11(undefined, undefined, undefined, function* () {
1556
+ }), onAcceptCall: (incomingCallId, useVideo) => __awaiter$12(undefined, undefined, undefined, function* () {
1557
1557
  const localVideoStream = useVideo ? yield createLocalVideoStream(callClient) : undefined;
1558
1558
  const incomingCall = callAgent === null || callAgent === undefined ? undefined : callAgent.incomingCalls.find((incomingCall) => incomingCall.id === incomingCallId);
1559
1559
  if (incomingCall) {
1560
1560
  yield incomingCall.accept(localVideoStream ? { videoOptions: { localVideoStreams: [localVideoStream] } } : undefined);
1561
1561
  }
1562
- }), onRejectCall: (incomingCallId) => __awaiter$11(undefined, undefined, undefined, function* () {
1562
+ }), onRejectCall: (incomingCallId) => __awaiter$12(undefined, undefined, undefined, function* () {
1563
1563
  const incomingCall = callAgent === null || callAgent === undefined ? undefined : callAgent.incomingCalls.find((incomingCall) => incomingCall.id === incomingCallId);
1564
1564
  if (incomingCall) {
1565
1565
  yield incomingCall.reject();
@@ -1569,7 +1569,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
1569
1569
 
1570
1570
  // Copyright (c) Microsoft Corporation.
1571
1571
  // Licensed under the MIT License.
1572
- var __awaiter$10 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1572
+ var __awaiter$11 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1573
1573
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1574
1574
  return new (P || (P = Promise))(function (resolve, reject) {
1575
1575
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -1600,7 +1600,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
1600
1600
  return undefined;
1601
1601
  },
1602
1602
  /* @conditional-compile-remove(teams-identity-support-beta) */
1603
- onAddParticipant: (userId, options) => __awaiter$10(undefined, undefined, undefined, function* () {
1603
+ onAddParticipant: (userId, options) => __awaiter$11(undefined, undefined, undefined, function* () {
1604
1604
  const participant = _toCommunicationIdentifier(userId);
1605
1605
  const threadId = options === null || options === undefined ? undefined : options.threadId;
1606
1606
  if (communicationCommon.isCommunicationUserIdentifier(participant)) {
@@ -1613,7 +1613,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
1613
1613
  call === null || call === undefined ? undefined : call.addParticipant(participant, threadId ? { threadId } : undefined);
1614
1614
  }
1615
1615
  call === null || call === undefined ? undefined : call.addParticipant(participant);
1616
- }), onRemoveParticipant: (userId) => __awaiter$10(undefined, undefined, undefined, function* () {
1616
+ }), onRemoveParticipant: (userId) => __awaiter$11(undefined, undefined, undefined, function* () {
1617
1617
  const participant = _toCommunicationIdentifier(userId);
1618
1618
  if (communicationCommon.isCommunicationUserIdentifier(participant)) {
1619
1619
  throw new Error('CommunicationIdentifier in Teams call is not supported!');
@@ -1622,20 +1622,20 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
1622
1622
  throw new Error('Removing Microsoft Teams app identifier is not supported!');
1623
1623
  }
1624
1624
  yield (call === null || call === undefined ? undefined : call.removeParticipant(participant));
1625
- }), onAcceptCall: (incomingCallId, useVideo) => __awaiter$10(undefined, undefined, undefined, function* () {
1625
+ }), onAcceptCall: (incomingCallId, useVideo) => __awaiter$11(undefined, undefined, undefined, function* () {
1626
1626
  const localVideoStream = useVideo ? yield createLocalVideoStream(callClient) : undefined;
1627
1627
  const incomingCall = callAgent === null || callAgent === undefined ? undefined : callAgent.incomingCalls.find((incomingCall) => incomingCall.id === incomingCallId);
1628
1628
  if (incomingCall) {
1629
1629
  yield incomingCall.accept(localVideoStream ? { videoOptions: { localVideoStreams: [localVideoStream] } } : undefined);
1630
1630
  }
1631
- }), onRejectCall: (incomingCallId) => __awaiter$10(undefined, undefined, undefined, function* () {
1631
+ }), onRejectCall: (incomingCallId) => __awaiter$11(undefined, undefined, undefined, function* () {
1632
1632
  const incomingCall = callAgent === null || callAgent === undefined ? undefined : callAgent.incomingCalls.find((incomingCall) => incomingCall.id === incomingCallId);
1633
1633
  if (incomingCall) {
1634
1634
  yield incomingCall.reject();
1635
1635
  }
1636
1636
  }),
1637
1637
  /* @conditional-compile-remove(together-mode) */
1638
- onStartTogetherMode: () => __awaiter$10(undefined, undefined, undefined, function* () {
1638
+ onStartTogetherMode: () => __awaiter$11(undefined, undefined, undefined, function* () {
1639
1639
  if (!call) {
1640
1640
  return;
1641
1641
  }
@@ -2089,7 +2089,7 @@ const getRealTimeTextDisplayName = (realTimeText, identifier, remoteParticipants
2089
2089
 
2090
2090
  // Copyright (c) Microsoft Corporation.
2091
2091
  // Licensed under the MIT License.
2092
- var __awaiter$$ = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
2092
+ var __awaiter$10 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
2093
2093
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2094
2094
  return new (P || (P = Promise))(function (resolve, reject) {
2095
2095
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -2170,7 +2170,7 @@ class ProxyDeviceManager {
2170
2170
  }
2171
2171
  }
2172
2172
  };
2173
- this.permissionsApiStateChangeHandler = () => __awaiter$$(this, undefined, undefined, function* () {
2173
+ this.permissionsApiStateChangeHandler = () => __awaiter$10(this, undefined, undefined, function* () {
2174
2174
  yield this.updateDevicePermissionState();
2175
2175
  });
2176
2176
  /**
@@ -2181,13 +2181,13 @@ class ProxyDeviceManager {
2181
2181
  this.selectCamera = (videoDeviceInfo) => {
2182
2182
  this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
2183
2183
  };
2184
- this.videoDevicesUpdated = () => __awaiter$$(this, undefined, undefined, function* () {
2184
+ this.videoDevicesUpdated = () => __awaiter$10(this, undefined, undefined, function* () {
2185
2185
  // Device Manager always has a camera with '' name if there are no real camera devices available.
2186
2186
  // We don't want to show that in the UI.
2187
2187
  const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
2188
2188
  this._context.setDeviceManagerCameras(dedupeById(realCameras));
2189
2189
  });
2190
- this.audioDevicesUpdated = () => __awaiter$$(this, undefined, undefined, function* () {
2190
+ this.audioDevicesUpdated = () => __awaiter$10(this, undefined, undefined, function* () {
2191
2191
  this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
2192
2192
  if (this._deviceManager.isSpeakerSelectionAvailable) {
2193
2193
  this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
@@ -2199,7 +2199,7 @@ class ProxyDeviceManager {
2199
2199
  this.selectedSpeakerChanged = () => {
2200
2200
  this._context.setDeviceManagerSelectedSpeaker(this._deviceManager.selectedSpeaker);
2201
2201
  };
2202
- this.updateDevicePermissionState = (sdkDeviceAccessState) => __awaiter$$(this, undefined, undefined, function* () {
2202
+ this.updateDevicePermissionState = (sdkDeviceAccessState) => __awaiter$10(this, undefined, undefined, function* () {
2203
2203
  let hasCameraPermission = !!(sdkDeviceAccessState === null || sdkDeviceAccessState === undefined ? undefined : sdkDeviceAccessState.video);
2204
2204
  let hasMicPermission = !!(sdkDeviceAccessState === null || sdkDeviceAccessState === undefined ? undefined : sdkDeviceAccessState.audio);
2205
2205
  // Supplement the SDK values with values from the Permissions API to get a better understanding of the device
@@ -2277,7 +2277,7 @@ class ProxyDeviceManager {
2277
2277
  }
2278
2278
  case 'askDevicePermission': {
2279
2279
  return this._context.withAsyncErrorTeedToState((...args) => {
2280
- return target.askDevicePermission(...args).then((deviceAccess) => __awaiter$$(this, undefined, undefined, function* () {
2280
+ return target.askDevicePermission(...args).then((deviceAccess) => __awaiter$10(this, undefined, undefined, function* () {
2281
2281
  yield this.updateDevicePermissionState(deviceAccess);
2282
2282
  return deviceAccess;
2283
2283
  }));
@@ -2703,7 +2703,7 @@ class CallIdHistory {
2703
2703
 
2704
2704
  // Copyright (c) Microsoft Corporation.
2705
2705
  // Licensed under the MIT License.
2706
- var __awaiter$_ = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
2706
+ var __awaiter$$ = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
2707
2707
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2708
2708
  return new (P || (P = Promise))(function (resolve, reject) {
2709
2709
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3892,7 +3892,7 @@ let CallContext$2 = class CallContext {
3892
3892
  * @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
3893
3893
  */
3894
3894
  withAsyncErrorTeedToState(action, target) {
3895
- return (...args) => __awaiter$_(this, undefined, undefined, function* () {
3895
+ return (...args) => __awaiter$$(this, undefined, undefined, function* () {
3896
3896
  try {
3897
3897
  return yield action(...args);
3898
3898
  }
@@ -4458,7 +4458,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
4458
4458
 
4459
4459
  // Copyright (c) Microsoft Corporation.
4460
4460
  // Licensed under the MIT License.
4461
- var __awaiter$Z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
4461
+ var __awaiter$_ = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
4462
4462
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4463
4463
  return new (P || (P = Promise))(function (resolve, reject) {
4464
4464
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -4468,7 +4468,7 @@ var __awaiter$Z = (window && window.__awaiter) || function (thisArg, _arguments,
4468
4468
  });
4469
4469
  };
4470
4470
  function createViewVideo(context, internalContext, callId, stream, participantId, options) {
4471
- return __awaiter$Z(this, undefined, undefined, function* () {
4471
+ return __awaiter$_(this, undefined, undefined, function* () {
4472
4472
  // we can only have 3 types of createView
4473
4473
  let streamEventType;
4474
4474
  // we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
@@ -4597,7 +4597,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
4597
4597
  });
4598
4598
  }
4599
4599
  function createViewUnparentedVideo(context, internalContext, stream, options) {
4600
- return __awaiter$Z(this, undefined, undefined, function* () {
4600
+ return __awaiter$_(this, undefined, undefined, function* () {
4601
4601
  const renderInfo = internalContext.getUnparentedRenderInfo(stream);
4602
4602
  if (renderInfo && renderInfo.status === 'Rendered') {
4603
4603
  console.warn('Unparented LocalVideoStream is already rendered');
@@ -4766,7 +4766,7 @@ function createView$1(context, internalContext, callId, participantId, stream, o
4766
4766
  // Render LocalVideoStream that is not part of a Call
4767
4767
  // Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).
4768
4768
  // We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
4769
- return context.withAsyncErrorTeedToState(() => __awaiter$Z(this, undefined, undefined, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
4769
+ return context.withAsyncErrorTeedToState(() => __awaiter$_(this, undefined, undefined, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
4770
4770
  }
4771
4771
  else {
4772
4772
  _logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
@@ -4962,7 +4962,7 @@ class RecordingSubscriber {
4962
4962
 
4963
4963
  // Copyright (c) Microsoft Corporation.
4964
4964
  // Licensed under the MIT License.
4965
- var __awaiter$Y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
4965
+ var __awaiter$Z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
4966
4966
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4967
4967
  return new (P || (P = Promise))(function (resolve, reject) {
4968
4968
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -4986,7 +4986,7 @@ class PPTLiveSubscriber {
4986
4986
  this._context.setCallPPTLiveActive(this._callIdRef.callId, this._pptLive.isActive);
4987
4987
  this.checkAndUpdatePPTLiveParticipant();
4988
4988
  };
4989
- this.checkAndUpdatePPTLiveParticipant = () => __awaiter$Y(this, undefined, undefined, function* () {
4989
+ this.checkAndUpdatePPTLiveParticipant = () => __awaiter$Z(this, undefined, undefined, function* () {
4990
4990
  if (!this._pptLive.activePresenterId) {
4991
4991
  return;
4992
4992
  }
@@ -5686,6 +5686,9 @@ class CallSubscriber {
5686
5686
  this._safeSubscribeInitTeamsMeetingConference = () => {
5687
5687
  this._safeSubscribe(this.initTeamsMeetingConference);
5688
5688
  };
5689
+ this._safeSubscribeInitRealTimeText = () => {
5690
+ this._safeSubscribe(this.initRealTimeText);
5691
+ };
5689
5692
  /* @conditional-compile-remove(local-recording-notification) */
5690
5693
  this._safeSubscribeInitLocalRecordingNotificationSubscriber = () => {
5691
5694
  this._safeSubscribe(this.initLocalRecordingNotificationSubscriber);
@@ -5706,6 +5709,7 @@ class CallSubscriber {
5706
5709
  /* @conditional-compile-remove(total-participant-count) */
5707
5710
  this._call.on('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);
5708
5711
  this._call.on('mutedByOthers', this.mutedByOthersHandler);
5712
+ this._safeSubscribeInitRealTimeText();
5709
5713
  for (const localVideoStream of this._call.localVideoStreams) {
5710
5714
  this._internalContext.setLocalRenderInfo(this._callIdRef.callId, localVideoStream.mediaStreamType, localVideoStream, 'NotRendered', undefined);
5711
5715
  }
@@ -5717,7 +5721,7 @@ class CallSubscriber {
5717
5721
  }
5718
5722
  };
5719
5723
  this.unsubscribe = () => {
5720
- var _a, _b, _c, _d, _e;
5724
+ var _a, _b, _c, _d;
5721
5725
  this._call.off('stateChanged', this.stateChanged);
5722
5726
  this._call.off('stateChanged', this._safeSubscribeInitCaptionSubscriber);
5723
5727
  this._call.off('stateChanged', this._safeSubscribeInitTeamsMeetingConference);
@@ -5752,10 +5756,12 @@ class CallSubscriber {
5752
5756
  this._pptLiveSubscriber.unsubscribe();
5753
5757
  (_b = this._CaptionsFeatureSubscriber) === null || _b === undefined ? undefined : _b.unsubscribe();
5754
5758
  /* @conditional-compile-remove(rtt) */
5755
- (_c = this._realTimeTextSubscriber) === null || _c === undefined ? undefined : _c.unsubscribe();
5756
- (_d = this._raiseHandSubscriber) === null || _d === undefined ? undefined : _d.unsubscribe();
5759
+ if (this._realTimeTextSubscriber) {
5760
+ this._realTimeTextSubscriber.unsubscribe();
5761
+ }
5762
+ (_c = this._raiseHandSubscriber) === null || _c === undefined ? undefined : _c.unsubscribe();
5757
5763
  this._capabilitiesSubscriber.unsubscribe();
5758
- (_e = this._reactionSubscriber) === null || _e === undefined ? undefined : _e.unsubscribe();
5764
+ (_d = this._reactionSubscriber) === null || _d === undefined ? undefined : _d.unsubscribe();
5759
5765
  this._spotlightSubscriber.unsubscribe();
5760
5766
  this._breakoutRoomsSubscriber.unsubscribe();
5761
5767
  /* @conditional-compile-remove(together-mode) */
@@ -5783,6 +5789,11 @@ class CallSubscriber {
5783
5789
  this._call.off('stateChanged', this._safeSubscribeInitTeamsMeetingConference);
5784
5790
  }
5785
5791
  };
5792
+ this.initRealTimeText = () => {
5793
+ if (this._context.getState().userId.kind !== 'microsoftTeamsUser') {
5794
+ this._realTimeTextSubscriber = new RealTimeTextSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.RealTimeText));
5795
+ }
5796
+ };
5786
5797
  /* @conditional-compile-remove(local-recording-notification) */
5787
5798
  this.initLocalRecordingNotificationSubscriber = () => {
5788
5799
  // Subscribe to LocalRecordingFeature as it is only available in interop scenarios
@@ -5884,8 +5895,6 @@ class CallSubscriber {
5884
5895
  /* @conditional-compile-remove(together-mode) */
5885
5896
  this._togetherModeSubscriber = new TogetherModeSubscriber(this._callIdRef, this._context, this._internalContext, this._call.feature(communicationCalling.Features.TogetherMode));
5886
5897
  this._mediaAccessSubscriber = new MediaAccessSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.MediaAccess));
5887
- /* @conditional-compile-remove(rtt) */
5888
- this._realTimeTextSubscriber = new RealTimeTextSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.RealTimeText));
5889
5898
  this.subscribe();
5890
5899
  }
5891
5900
  // This is a helper function to safely call subscriber functions. This is needed in order to prevent events
@@ -5945,7 +5954,7 @@ class IncomingCallSubscriber {
5945
5954
 
5946
5955
  // Copyright (c) Microsoft Corporation.
5947
5956
  // Licensed under the MIT License.
5948
- var __awaiter$X = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
5957
+ var __awaiter$Y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
5949
5958
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5950
5959
  return new (P || (P = Promise))(function (resolve, reject) {
5951
5960
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -5965,14 +5974,14 @@ class ProxyIncomingCall {
5965
5974
  switch (prop) {
5966
5975
  case 'accept': {
5967
5976
  return this._context.withAsyncErrorTeedToState(function (...args) {
5968
- return __awaiter$X(this, undefined, undefined, function* () {
5977
+ return __awaiter$Y(this, undefined, undefined, function* () {
5969
5978
  return yield target.accept(...args);
5970
5979
  });
5971
5980
  }, 'IncomingCall.accept');
5972
5981
  }
5973
5982
  case 'reject': {
5974
5983
  return this._context.withAsyncErrorTeedToState(function (...args) {
5975
- return __awaiter$X(this, undefined, undefined, function* () {
5984
+ return __awaiter$Y(this, undefined, undefined, function* () {
5976
5985
  return yield target.reject(...args);
5977
5986
  });
5978
5987
  }, 'IncomingCall.reject');
@@ -5994,7 +6003,7 @@ const incomingCallDeclaratify = (incomingCall, context) => {
5994
6003
 
5995
6004
  // Copyright (c) Microsoft Corporation.
5996
6005
  // Licensed under the MIT License.
5997
- var __awaiter$W = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6006
+ var __awaiter$X = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
5998
6007
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5999
6008
  return new (P || (P = Promise))(function (resolve, reject) {
6000
6009
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6014,14 +6023,14 @@ class ProxyTeamsIncomingCall {
6014
6023
  switch (prop) {
6015
6024
  case 'accept': {
6016
6025
  return this._context.withAsyncErrorTeedToState(function (...args) {
6017
- return __awaiter$W(this, undefined, undefined, function* () {
6026
+ return __awaiter$X(this, undefined, undefined, function* () {
6018
6027
  return yield target.accept(...args);
6019
6028
  });
6020
6029
  }, 'IncomingCall.accept');
6021
6030
  }
6022
6031
  case 'reject': {
6023
6032
  return this._context.withAsyncErrorTeedToState(function (...args) {
6024
- return __awaiter$W(this, undefined, undefined, function* () {
6033
+ return __awaiter$X(this, undefined, undefined, function* () {
6025
6034
  return yield target.reject(...args);
6026
6035
  });
6027
6036
  }, 'IncomingCall.reject');
@@ -6240,7 +6249,7 @@ const clearCallRelatedState = (context, internalContext) => {
6240
6249
 
6241
6250
  // Copyright (c) Microsoft Corporation.
6242
6251
  // Licensed under the MIT License.
6243
- var __awaiter$V = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6252
+ var __awaiter$W = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6244
6253
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6245
6254
  return new (P || (P = Promise))(function (resolve, reject) {
6246
6255
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6266,56 +6275,56 @@ class ProxyCallCommon {
6266
6275
  switch (prop) {
6267
6276
  case 'mute': {
6268
6277
  return this._context.withAsyncErrorTeedToState(function (...args) {
6269
- return __awaiter$V(this, undefined, undefined, function* () {
6278
+ return __awaiter$W(this, undefined, undefined, function* () {
6270
6279
  return yield target.mute(...args);
6271
6280
  });
6272
6281
  }, 'Call.mute');
6273
6282
  }
6274
6283
  case 'unmute': {
6275
6284
  return this._context.withAsyncErrorTeedToState(function (...args) {
6276
- return __awaiter$V(this, undefined, undefined, function* () {
6285
+ return __awaiter$W(this, undefined, undefined, function* () {
6277
6286
  return yield target.unmute(...args);
6278
6287
  });
6279
6288
  }, 'Call.unmute');
6280
6289
  }
6281
6290
  case 'startVideo': {
6282
6291
  return this._context.withAsyncErrorTeedToState(function (...args) {
6283
- return __awaiter$V(this, undefined, undefined, function* () {
6292
+ return __awaiter$W(this, undefined, undefined, function* () {
6284
6293
  return yield target.startVideo(...args);
6285
6294
  });
6286
6295
  }, 'Call.startVideo');
6287
6296
  }
6288
6297
  case 'stopVideo': {
6289
6298
  return this._context.withAsyncErrorTeedToState(function (...args) {
6290
- return __awaiter$V(this, undefined, undefined, function* () {
6299
+ return __awaiter$W(this, undefined, undefined, function* () {
6291
6300
  return yield target.stopVideo(...args);
6292
6301
  });
6293
6302
  }, 'Call.stopVideo');
6294
6303
  }
6295
6304
  case 'startScreenSharing': {
6296
6305
  return this._context.withAsyncErrorTeedToState(function (...args) {
6297
- return __awaiter$V(this, undefined, undefined, function* () {
6306
+ return __awaiter$W(this, undefined, undefined, function* () {
6298
6307
  return yield target.startScreenSharing(...args);
6299
6308
  });
6300
6309
  }, 'Call.startScreenSharing');
6301
6310
  }
6302
6311
  case 'stopScreenSharing': {
6303
6312
  return this._context.withAsyncErrorTeedToState(function (...args) {
6304
- return __awaiter$V(this, undefined, undefined, function* () {
6313
+ return __awaiter$W(this, undefined, undefined, function* () {
6305
6314
  return yield target.stopScreenSharing(...args);
6306
6315
  });
6307
6316
  }, 'Call.stopScreenSharing');
6308
6317
  }
6309
6318
  case 'hold': {
6310
6319
  return this._context.withAsyncErrorTeedToState(function (...args) {
6311
- return __awaiter$V(this, undefined, undefined, function* () {
6320
+ return __awaiter$W(this, undefined, undefined, function* () {
6312
6321
  return yield target.hold(...args);
6313
6322
  });
6314
6323
  }, 'Call.hold');
6315
6324
  }
6316
6325
  case 'resume': {
6317
6326
  return this._context.withAsyncErrorTeedToState(function (...args) {
6318
- return __awaiter$V(this, undefined, undefined, function* () {
6327
+ return __awaiter$W(this, undefined, undefined, function* () {
6319
6328
  return yield target.resume(...args);
6320
6329
  });
6321
6330
  }, 'Call.resume');
@@ -6363,6 +6372,9 @@ class ProxyCallCommon {
6363
6372
  const proxyFeature = new ProxySpotlightCallFeature(this._context);
6364
6373
  return new Proxy(spotlightFeature, proxyFeature);
6365
6374
  }
6375
+ if (args[0] === communicationCalling.Features.RealTimeText && this._context.getState().userId.kind === 'microsoftTeamsUser') {
6376
+ return;
6377
+ }
6366
6378
  return target.feature(...args);
6367
6379
  }, 'Call.feature');
6368
6380
  }
@@ -6382,7 +6394,7 @@ class ProxyTeamsCaptions {
6382
6394
  get(target, prop) {
6383
6395
  switch (prop) {
6384
6396
  case 'startCaptions':
6385
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$V(this, undefined, undefined, function* () {
6397
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$W(this, undefined, undefined, function* () {
6386
6398
  var _a, _b;
6387
6399
  this._context.setStartCaptionsInProgress(this._call.id, true);
6388
6400
  try {
@@ -6396,7 +6408,7 @@ class ProxyTeamsCaptions {
6396
6408
  }
6397
6409
  }), 'Call.feature');
6398
6410
  case 'stopCaptions':
6399
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$V(this, undefined, undefined, function* () {
6411
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$W(this, undefined, undefined, function* () {
6400
6412
  const ret = yield target.stopCaptions(...args);
6401
6413
  this._context.setIsCaptionActive(this._call.id, false);
6402
6414
  this._context.setStartCaptionsInProgress(this._call.id, false);
@@ -6404,13 +6416,13 @@ class ProxyTeamsCaptions {
6404
6416
  return ret;
6405
6417
  }), 'Call.feature');
6406
6418
  case 'setSpokenLanguage':
6407
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$V(this, undefined, undefined, function* () {
6419
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$W(this, undefined, undefined, function* () {
6408
6420
  const ret = yield target.setSpokenLanguage(...args);
6409
6421
  this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
6410
6422
  return ret;
6411
6423
  }), 'Call.feature');
6412
6424
  case 'setCaptionLanguage':
6413
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$V(this, undefined, undefined, function* () {
6425
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$W(this, undefined, undefined, function* () {
6414
6426
  const ret = yield target.setCaptionLanguage(...args);
6415
6427
  this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
6416
6428
  return ret;
@@ -6431,7 +6443,7 @@ class ProxyCaptions {
6431
6443
  get(target, prop) {
6432
6444
  switch (prop) {
6433
6445
  case 'startCaptions':
6434
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$V(this, undefined, undefined, function* () {
6446
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$W(this, undefined, undefined, function* () {
6435
6447
  var _a, _b;
6436
6448
  this._context.setStartCaptionsInProgress(this._call.id, true);
6437
6449
  try {
@@ -6445,7 +6457,7 @@ class ProxyCaptions {
6445
6457
  }
6446
6458
  }), 'Call.feature');
6447
6459
  case 'stopCaptions':
6448
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$V(this, undefined, undefined, function* () {
6460
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$W(this, undefined, undefined, function* () {
6449
6461
  const ret = yield target.stopCaptions(...args);
6450
6462
  this._context.setIsCaptionActive(this._call.id, false);
6451
6463
  this._context.setStartCaptionsInProgress(this._call.id, false);
@@ -6453,7 +6465,7 @@ class ProxyCaptions {
6453
6465
  return ret;
6454
6466
  }), 'Call.feature');
6455
6467
  case 'setSpokenLanguage':
6456
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$V(this, undefined, undefined, function* () {
6468
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$W(this, undefined, undefined, function* () {
6457
6469
  const ret = yield target.setSpokenLanguage(...args);
6458
6470
  this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
6459
6471
  return ret;
@@ -6473,12 +6485,12 @@ class ProxySpotlightCallFeature {
6473
6485
  get(target, prop) {
6474
6486
  switch (prop) {
6475
6487
  case 'startSpotlight':
6476
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$V(this, undefined, undefined, function* () {
6488
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$W(this, undefined, undefined, function* () {
6477
6489
  const ret = yield target.startSpotlight(...args);
6478
6490
  return ret;
6479
6491
  }), 'Call.feature');
6480
6492
  case 'stopSpotlight':
6481
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$V(this, undefined, undefined, function* () {
6493
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$W(this, undefined, undefined, function* () {
6482
6494
  const ret = yield target.stopSpotlight(...args);
6483
6495
  return ret;
6484
6496
  }), 'Call.feature');
@@ -6520,7 +6532,7 @@ class ProxyTransferCallFeature {
6520
6532
 
6521
6533
  // Copyright (c) Microsoft Corporation.
6522
6534
  // Licensed under the MIT License.
6523
- var __awaiter$U = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6535
+ var __awaiter$V = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6524
6536
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6525
6537
  return new (P || (P = Promise))(function (resolve, reject) {
6526
6538
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6534,7 +6546,7 @@ class ProxyCall extends ProxyCallCommon {
6534
6546
  switch (prop) {
6535
6547
  case 'addParticipant': {
6536
6548
  return this.getContext().withAsyncErrorTeedToState(function (...args) {
6537
- return __awaiter$U(this, undefined, undefined, function* () {
6549
+ return __awaiter$V(this, undefined, undefined, function* () {
6538
6550
  return yield target.addParticipant(...args);
6539
6551
  });
6540
6552
  }, 'Call.addParticipant');
@@ -6819,7 +6831,7 @@ class InternalCallContext {
6819
6831
 
6820
6832
  // Copyright (c) Microsoft Corporation.
6821
6833
  // Licensed under the MIT License.
6822
- var __awaiter$T = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6834
+ var __awaiter$U = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6823
6835
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6824
6836
  return new (P || (P = Promise))(function (resolve, reject) {
6825
6837
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6834,7 +6846,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
6834
6846
  /* @conditional-compile-remove(teams-identity-support-beta) */
6835
6847
  case 'addParticipant': {
6836
6848
  return this.getContext().withAsyncErrorTeedToState(function (...args) {
6837
- return __awaiter$T(this, undefined, undefined, function* () {
6849
+ return __awaiter$U(this, undefined, undefined, function* () {
6838
6850
  return yield target.addParticipant(...args);
6839
6851
  });
6840
6852
  }, 'TeamsCall.addParticipant');
@@ -6941,7 +6953,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
6941
6953
 
6942
6954
  // Copyright (c) Microsoft Corporation.
6943
6955
  // Licensed under the MIT License.
6944
- var __awaiter$S = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6956
+ var __awaiter$T = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6945
6957
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6946
6958
  return new (P || (P = Promise))(function (resolve, reject) {
6947
6959
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6963,7 +6975,7 @@ class ProxyVideoStreamRendererView {
6963
6975
  get(target, prop) {
6964
6976
  switch (prop) {
6965
6977
  case 'updateScalingMode': {
6966
- return (...args) => __awaiter$S(this, undefined, undefined, function* () {
6978
+ return (...args) => __awaiter$T(this, undefined, undefined, function* () {
6967
6979
  yield target.updateScalingMode(...args);
6968
6980
  this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
6969
6981
  });
@@ -6982,7 +6994,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
6982
6994
  return new Proxy(view, proxyVideoStreamRendererView);
6983
6995
  };
6984
6996
 
6985
- var __awaiter$R = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6997
+ var __awaiter$S = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6986
6998
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6987
6999
  return new (P || (P = Promise))(function (resolve, reject) {
6988
7000
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -7009,7 +7021,7 @@ function createView(context, internalContext, callId, stream, options) {
7009
7021
  /* @conditional-compile-remove(together-mode) */
7010
7022
  // This function is used to create a view for a stream that is part of a call feature.
7011
7023
  function createCallFeatureViewVideo(context, internalContext, callId, stream, options) {
7012
- return __awaiter$R(this, undefined, undefined, function* () {
7024
+ return __awaiter$S(this, undefined, undefined, function* () {
7013
7025
  const streamEventType = 'createViewCallFeature';
7014
7026
  const streamType = stream === null || stream === undefined ? undefined : stream.mediaStreamType;
7015
7027
  const callFeatureStreamId = stream && stream.id;
@@ -7180,7 +7192,7 @@ function isCallFeatureStream(stream) {
7180
7192
 
7181
7193
  // Copyright (c) Microsoft Corporation.
7182
7194
  // Licensed under the MIT License.
7183
- var __awaiter$Q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
7195
+ var __awaiter$R = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
7184
7196
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7185
7197
  return new (P || (P = Promise))(function (resolve, reject) {
7186
7198
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -7202,7 +7214,7 @@ class ProxyCallClient {
7202
7214
  get(target, prop) {
7203
7215
  switch (prop) {
7204
7216
  case 'createCallAgent': {
7205
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$Q(this, undefined, undefined, function* () {
7217
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, undefined, undefined, function* () {
7206
7218
  // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
7207
7219
  // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
7208
7220
  // callAgent if the createCallAgent succeeds.
@@ -7215,7 +7227,7 @@ class ProxyCallClient {
7215
7227
  }), 'CallClient.createCallAgent');
7216
7228
  }
7217
7229
  case 'createTeamsCallAgent': {
7218
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$Q(this, undefined, undefined, function* () {
7230
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, undefined, undefined, function* () {
7219
7231
  // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
7220
7232
  // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
7221
7233
  // callAgent if the createCallAgent succeeds.
@@ -7228,7 +7240,7 @@ class ProxyCallClient {
7228
7240
  }), 'CallClient.createTeamsCallAgent');
7229
7241
  }
7230
7242
  case 'getDeviceManager': {
7231
- return this._context.withAsyncErrorTeedToState(() => __awaiter$Q(this, undefined, undefined, function* () {
7243
+ return this._context.withAsyncErrorTeedToState(() => __awaiter$R(this, undefined, undefined, function* () {
7232
7244
  // As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
7233
7245
  // DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
7234
7246
  // throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
@@ -7256,7 +7268,7 @@ class ProxyCallClient {
7256
7268
  /**
7257
7269
  * add to this object if we want to proxy anything else off the DebugInfo feature object.
7258
7270
  */
7259
- return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$Q(this, undefined, undefined, function* () {
7271
+ return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$R(this, undefined, undefined, function* () {
7260
7272
  const environmentInfo = yield feature.getEnvironmentInfo();
7261
7273
  this._context.setEnvironmentInfo(environmentInfo);
7262
7274
  return environmentInfo;
@@ -7316,7 +7328,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
7316
7328
  });
7317
7329
  Object.defineProperty(callClient, 'createView', {
7318
7330
  configurable: false,
7319
- value: (callId, participantId, stream, options) => __awaiter$Q(undefined, undefined, undefined, function* () {
7331
+ value: (callId, participantId, stream, options) => __awaiter$R(undefined, undefined, undefined, function* () {
7320
7332
  /* @conditional-compile-remove(together-mode) */
7321
7333
  if ('feature' in stream) {
7322
7334
  return yield createView(context, internalContext, callId, stream, options);
@@ -10072,7 +10084,7 @@ const _MentionPopover = (props) => {
10072
10084
 
10073
10085
  // Copyright (c) Microsoft Corporation.
10074
10086
  // Licensed under the MIT License.
10075
- var __awaiter$P = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10087
+ var __awaiter$Q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10076
10088
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10077
10089
  return new (P || (P = Promise))(function (resolve, reject) {
10078
10090
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10258,7 +10270,7 @@ const TextFieldWithMention = (props) => {
10258
10270
  onSuggestionSelected,
10259
10271
  updateMentionSuggestions
10260
10272
  ]);
10261
- const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$P(undefined, undefined, undefined, function* () {
10273
+ const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$Q(undefined, undefined, undefined, function* () {
10262
10274
  var _a;
10263
10275
  let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === undefined ? undefined : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== undefined ? _a : [];
10264
10276
  suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
@@ -10435,7 +10447,7 @@ const TextFieldWithMention = (props) => {
10435
10447
  });
10436
10448
  }
10437
10449
  }, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
10438
- const handleOnChange = React.useCallback((_b) => __awaiter$P(undefined, [_b], undefined, function* ({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) {
10450
+ const handleOnChange = React.useCallback((_b) => __awaiter$Q(undefined, [_b], undefined, function* ({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) {
10439
10451
  var _c;
10440
10452
  debouncedQueryUpdate.cancel();
10441
10453
  if (event.currentTarget === null) {
@@ -10984,7 +10996,7 @@ const ATTACHMENT_CARD_MIN_PROGRESS = 0.05;
10984
10996
 
10985
10997
  // Copyright (c) Microsoft Corporation.
10986
10998
  // Licensed under the MIT License.
10987
- var __awaiter$O = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10999
+ var __awaiter$P = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10988
11000
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10989
11001
  return new (P || (P = Promise))(function (resolve, reject) {
10990
11002
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11073,7 +11085,7 @@ const MappedMenuItems = (menuActions, attachment, handleOnClickError) => {
11073
11085
  React.createElement(reactComponents.MenuTrigger, null,
11074
11086
  React.createElement(reactComponents.ToolbarButton, { "aria-label": localeStrings.attachmentMoreMenu, role: "button", icon: React.createElement(react.Icon, { iconName: "AttachmentMoreMenu" }) }))),
11075
11087
  React.createElement(reactComponents.MenuPopover, null,
11076
- React.createElement(reactComponents.MenuList, null, menuActions.map((menuItem, index) => (React.createElement(reactComponents.MenuItem, { "aria-label": menuItem.name, key: index, icon: menuItem.icon, onClick: () => __awaiter$O(undefined, undefined, undefined, function* () {
11088
+ React.createElement(reactComponents.MenuList, null, menuActions.map((menuItem, index) => (React.createElement(reactComponents.MenuItem, { "aria-label": menuItem.name, key: index, icon: menuItem.icon, onClick: () => __awaiter$P(undefined, undefined, undefined, function* () {
11077
11089
  try {
11078
11090
  yield menuItem.onClick(attachment);
11079
11091
  }
@@ -11208,7 +11220,7 @@ const _AttachmentUploadCards = (props) => {
11208
11220
 
11209
11221
  // Copyright (c) Microsoft Corporation.
11210
11222
  // Licensed under the MIT License.
11211
- var __awaiter$N = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11223
+ var __awaiter$O = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11212
11224
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11213
11225
  return new (P || (P = Promise))(function (resolve, reject) {
11214
11226
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11257,7 +11269,7 @@ const hasInlineImageContent = (content) => {
11257
11269
  *
11258
11270
  * @returns The updated message content.
11259
11271
  */
11260
- const updateStylesOfInlineImages = (message, initialInlineImages) => __awaiter$N(undefined, undefined, undefined, function* () {
11272
+ const updateStylesOfInlineImages = (message, initialInlineImages) => __awaiter$O(undefined, undefined, undefined, function* () {
11261
11273
  if (message === '') {
11262
11274
  return message;
11263
11275
  }
@@ -11349,7 +11361,7 @@ const toAttachmentMetadata = (attachmentsWithProgress) => {
11349
11361
  /**
11350
11362
  * @internal
11351
11363
  */
11352
- const modifyInlineImagesInContentString = (content, initialInlineImages, onCompleted) => __awaiter$N(undefined, undefined, undefined, function* () {
11364
+ const modifyInlineImagesInContentString = (content, initialInlineImages, onCompleted) => __awaiter$O(undefined, undefined, undefined, function* () {
11353
11365
  let newContent = content;
11354
11366
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
11355
11367
  try {
@@ -12631,7 +12643,7 @@ const removeSingleLocalBlob = (currentLocalBlobMap, imageId) => {
12631
12643
  }
12632
12644
  };
12633
12645
 
12634
- var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12646
+ var __awaiter$N = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12635
12647
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12636
12648
  return new (P || (P = Promise))(function (resolve, reject) {
12637
12649
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -12686,7 +12698,7 @@ class CopyPastePlugin {
12686
12698
  onPluginEvent(event) {
12687
12699
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
12688
12700
  if (event.eventType === PluginEventType.BeforeCutCopy) {
12689
- event.clonedRoot.querySelectorAll('img').forEach((image) => __awaiter$M(this, undefined, undefined, function* () {
12701
+ event.clonedRoot.querySelectorAll('img').forEach((image) => __awaiter$N(this, undefined, undefined, function* () {
12690
12702
  if (image.src.startsWith('blob:')) {
12691
12703
  const base64Data = this.imageBase64DataMap[image.id];
12692
12704
  image.src = base64Data || image.src;
@@ -16432,7 +16444,7 @@ class _ErrorBoundary extends React.Component {
16432
16444
  // Copyright (c) Microsoft Corporation.
16433
16445
  // Licensed under the MIT License.
16434
16446
  /* @conditional-compile-remove(rich-text-editor) */
16435
- const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DGvSX6E8.js'); }));
16447
+ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-ClBYNQcI.js'); }));
16436
16448
  /**
16437
16449
  * @private
16438
16450
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -16440,7 +16452,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
16440
16452
  *
16441
16453
  * @conditional-compile-remove(rich-text-editor)
16442
16454
  */
16443
- const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DGvSX6E8.js'); });
16455
+ const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-ClBYNQcI.js'); });
16444
16456
  /**
16445
16457
  * @private
16446
16458
  */
@@ -16459,7 +16471,7 @@ const ChatMessageComponentAsEditBoxPicker = (props) => {
16459
16471
 
16460
16472
  // Copyright (c) Microsoft Corporation.
16461
16473
  // Licensed under the MIT License.
16462
- var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16474
+ var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16463
16475
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16464
16476
  return new (P || (P = Promise))(function (resolve, reject) {
16465
16477
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -16519,7 +16531,7 @@ const ChatMyMessageComponent = (props) => {
16519
16531
  function (text,
16520
16532
  /* @conditional-compile-remove(file-sharing-acs) */
16521
16533
  attachments) {
16522
- return __awaiter$L(this, undefined, undefined, function* () {
16534
+ return __awaiter$M(this, undefined, undefined, function* () {
16523
16535
  /* @conditional-compile-remove(file-sharing-acs) */
16524
16536
  if (`attachments` in message && attachments) {
16525
16537
  message.attachments = attachments;
@@ -16926,7 +16938,7 @@ const fluentChatComponent = (props) => {
16926
16938
 
16927
16939
  // Copyright (c) Microsoft Corporation.
16928
16940
  // Licensed under the MIT License.
16929
- var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16941
+ var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16930
16942
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16931
16943
  return new (P || (P = Promise))(function (resolve, reject) {
16932
16944
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -17122,7 +17134,7 @@ const MessageThreadWrapper = (props) => {
17122
17134
  loadChatMessageComponentAsRichTextEditBox();
17123
17135
  }
17124
17136
  }, [richTextEditorOptions]);
17125
- const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$K(undefined, undefined, undefined, function* () {
17137
+ const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$L(undefined, undefined, undefined, function* () {
17126
17138
  if (!onDeleteMessage) {
17127
17139
  return;
17128
17140
  }
@@ -17203,7 +17215,7 @@ const MessageThreadWrapper = (props) => {
17203
17215
  */
17204
17216
  const clientHeight = (_a = chatThreadRef.current) === null || _a === undefined ? undefined : _a.clientHeight;
17205
17217
  // we try to only send those message status if user is scrolled to the bottom.
17206
- const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$K(undefined, undefined, undefined, function* () {
17218
+ const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$L(undefined, undefined, undefined, function* () {
17207
17219
  if (!isAtBottomOfScrollRef.current ||
17208
17220
  !document.hasFocus() ||
17209
17221
  !messagesRef.current ||
@@ -17254,7 +17266,7 @@ const MessageThreadWrapper = (props) => {
17254
17266
  setIsAtBottomOfScrollRef(atBottom);
17255
17267
  }, [scrollToBottom, sendMessageStatusIfAtBottom]);
17256
17268
  // Infinite scrolling + threadInitialize function
17257
- const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$K(undefined, undefined, undefined, function* () {
17269
+ const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$L(undefined, undefined, undefined, function* () {
17258
17270
  if (!isLoadingChatMessagesRef.current) {
17259
17271
  if (onLoadPreviousChatMessages) {
17260
17272
  isLoadingChatMessagesRef.current = true;
@@ -20846,7 +20858,7 @@ const localVideoTileContainerStyles = {
20846
20858
 
20847
20859
  // Copyright (c) Microsoft Corporation.
20848
20860
  // Licensed under the MIT License.
20849
- var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
20861
+ var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
20850
20862
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
20851
20863
  return new (P || (P = Promise))(function (resolve, reject) {
20852
20864
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -20863,7 +20875,7 @@ const LocalVideoCameraCycleButton = (props) => {
20863
20875
  const { cameras, selectedCamera, onSelectCamera, label, ariaDescription, size } = props;
20864
20876
  const theme = react.useTheme();
20865
20877
  const [waitForCamera, setWaitForCamera] = React.useState(false);
20866
- const onChangeCameraClick = React.useCallback((device) => __awaiter$J(undefined, undefined, undefined, function* () {
20878
+ const onChangeCameraClick = React.useCallback((device) => __awaiter$K(undefined, undefined, undefined, function* () {
20867
20879
  // Throttle changing camera to prevent too many callbacks
20868
20880
  if (onSelectCamera) {
20869
20881
  setWaitForCamera(true);
@@ -23754,7 +23766,7 @@ const DevicesButton = (props) => {
23754
23766
 
23755
23767
  // Copyright (c) Microsoft Corporation.
23756
23768
  // Licensed under the MIT License.
23757
- var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
23769
+ var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
23758
23770
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23759
23771
  return new (P || (P = Promise))(function (resolve, reject) {
23760
23772
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -23805,7 +23817,7 @@ const CameraButton = (props) => {
23805
23817
  setAnnouncerString(strings.tooltipVideoLoadingContent);
23806
23818
  }
23807
23819
  }, [setAnnouncerString, cameraOn, strings.tooltipVideoLoadingContent]);
23808
- const onToggleClick = React.useCallback(() => __awaiter$I(undefined, undefined, undefined, function* () {
23820
+ const onToggleClick = React.useCallback(() => __awaiter$J(undefined, undefined, undefined, function* () {
23809
23821
  // Throttle click on camera, need to await onToggleCamera then allow another click
23810
23822
  if (onToggleCamera) {
23811
23823
  setWaitForCamera(true);
@@ -23823,7 +23835,7 @@ const CameraButton = (props) => {
23823
23835
  onVideoIsLoadingAnnouncementCallback();
23824
23836
  onToggleClick();
23825
23837
  }, [onVideoIsLoadingAnnouncementCallback, onToggleClick]);
23826
- const onChangeCameraClick = React.useCallback((device) => __awaiter$I(undefined, undefined, undefined, function* () {
23838
+ const onChangeCameraClick = React.useCallback((device) => __awaiter$J(undefined, undefined, undefined, function* () {
23827
23839
  // Throttle changing camera to prevent too many callbacks
23828
23840
  if (onSelectCamera) {
23829
23841
  setWaitForCamera(true);
@@ -24038,7 +24050,7 @@ const menupButtonPadding = {
24038
24050
 
24039
24051
  // Copyright (c) Microsoft Corporation.
24040
24052
  // Licensed under the MIT License.
24041
- var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
24053
+ var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
24042
24054
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
24043
24055
  return new (P || (P = Promise))(function (resolve, reject) {
24044
24056
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -24080,7 +24092,7 @@ const MicrophoneButton = (props) => {
24080
24092
  const toggleAnnouncerString = React.useCallback((isMicOn) => {
24081
24093
  setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
24082
24094
  }, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
24083
- const onToggleClick = React.useCallback(() => __awaiter$H(undefined, undefined, undefined, function* () {
24095
+ const onToggleClick = React.useCallback(() => __awaiter$I(undefined, undefined, undefined, function* () {
24084
24096
  if (onToggleMicrophone) {
24085
24097
  try {
24086
24098
  yield onToggleMicrophone();
@@ -24106,7 +24118,7 @@ const MicrophoneButton = (props) => {
24106
24118
  splitButtonMenuItems.push({
24107
24119
  key: 'microphoneDNSToggle',
24108
24120
  onRender: () => {
24109
- return (React.createElement(react.Stack, { onClick: () => __awaiter$H(undefined, undefined, undefined, function* () {
24121
+ return (React.createElement(react.Stack, { onClick: () => __awaiter$I(undefined, undefined, undefined, function* () {
24110
24122
  var _a;
24111
24123
  yield ((_a = props.onClickNoiseSuppression) === null || _a === undefined ? undefined : _a.call(props));
24112
24124
  setAnnouncerString(props.isDeepNoiseSuppressionOn
@@ -24973,7 +24985,7 @@ const dtmfFrequencies = {
24973
24985
 
24974
24986
  // Copyright (c) Microsoft Corporation.
24975
24987
  // Licensed under the MIT License.
24976
- var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
24988
+ var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
24977
24989
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
24978
24990
  return new (P || (P = Promise))(function (resolve, reject) {
24979
24991
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -25017,10 +25029,10 @@ const DialpadButton = (props) => {
25017
25029
  const [buttonPressed, setButtonPressed] = React.useState(false);
25018
25030
  const dtmfToneSound = React.useRef(new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2));
25019
25031
  const useLongPressProps = React.useMemo(() => ({
25020
- onClick: () => __awaiter$G(undefined, undefined, undefined, function* () {
25032
+ onClick: () => __awaiter$H(undefined, undefined, undefined, function* () {
25021
25033
  onClick(digit, index);
25022
25034
  }),
25023
- onLongPress: () => __awaiter$G(undefined, undefined, undefined, function* () {
25035
+ onLongPress: () => __awaiter$H(undefined, undefined, undefined, function* () {
25024
25036
  onLongPress(digit, index);
25025
25037
  }),
25026
25038
  touchEventsOnly: longPressTrigger === 'touch'
@@ -26124,7 +26136,7 @@ const _Caption = (props) => {
26124
26136
  /* @conditional-compile-remove(rtt) */
26125
26137
  /* @conditional-compile-remove(rtt) */
26126
26138
  /**
26127
- * @beta
26139
+ * @public
26128
26140
  * A component for displaying a single line of RealTimeText
26129
26141
  */
26130
26142
  const RealTimeText = (props) => {
@@ -26570,7 +26582,7 @@ const CaptionsBanner = (props) => {
26570
26582
 
26571
26583
  // Copyright (c) Microsoft Corporation.
26572
26584
  // Licensed under the MIT License.
26573
- var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
26585
+ var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
26574
26586
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
26575
26587
  return new (P || (P = Promise))(function (resolve, reject) {
26576
26588
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -26601,7 +26613,7 @@ const StartCaptionsButton = (props) => {
26601
26613
  return { spokenLanguage: currentSpokenLanguage === '' ? defaultSpokenLanguage : currentSpokenLanguage };
26602
26614
  }, [currentSpokenLanguage]);
26603
26615
  const [hasSetSpokenLanguage, setHasSetSpokenLanguage] = React.useState(false);
26604
- const onToggleStartCaptions = React.useCallback(() => __awaiter$F(undefined, undefined, undefined, function* () {
26616
+ const onToggleStartCaptions = React.useCallback(() => __awaiter$G(undefined, undefined, undefined, function* () {
26605
26617
  if (props.checked) {
26606
26618
  onStopCaptions();
26607
26619
  }
@@ -26673,7 +26685,7 @@ const _spokenLanguageToCaptionLanguage = {
26673
26685
 
26674
26686
  // Copyright (c) Microsoft Corporation.
26675
26687
  // Licensed under the MIT License.
26676
- var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
26688
+ var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
26677
26689
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
26678
26690
  return new (P || (P = Promise))(function (resolve, reject) {
26679
26691
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -26723,7 +26735,7 @@ const CaptionsSettingsModal = (props) => {
26723
26735
  onDismissCaptionsSettings();
26724
26736
  }
26725
26737
  }, [onDismissCaptionsSettings]);
26726
- const onConfirm = React.useCallback(() => __awaiter$E(undefined, undefined, undefined, function* () {
26738
+ const onConfirm = React.useCallback(() => __awaiter$F(undefined, undefined, undefined, function* () {
26727
26739
  const spokenLanguageCode = selectedSpokenLanguage.key;
26728
26740
  const captionLanguageCode = selectedCaptionLanguage.key;
26729
26741
  if (isCaptionsFeatureActive) {
@@ -26820,7 +26832,7 @@ const CaptionsSettingsModal = (props) => {
26820
26832
  React.createElement("span", null, strings === null || strings === undefined ? undefined : strings.captionsSettingsCancelButtonLabel))))));
26821
26833
  };
26822
26834
 
26823
- var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
26835
+ var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
26824
26836
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
26825
26837
  return new (P || (P = Promise))(function (resolve, reject) {
26826
26838
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -26831,7 +26843,7 @@ var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments,
26831
26843
  };
26832
26844
  /* @conditional-compile-remove(rtt) */
26833
26845
  /**
26834
- * @beta
26846
+ * @public
26835
26847
  * a component for realTimeText modal
26836
26848
  */
26837
26849
  const RealTimeTextModal = (props) => {
@@ -26844,7 +26856,7 @@ const RealTimeTextModal = (props) => {
26844
26856
  onDismissModal();
26845
26857
  }
26846
26858
  }, [onDismissModal]);
26847
- const onConfirm = React.useCallback(() => __awaiter$D(undefined, undefined, undefined, function* () {
26859
+ const onConfirm = React.useCallback(() => __awaiter$E(undefined, undefined, undefined, function* () {
26848
26860
  if (onStartRealTimeText) {
26849
26861
  yield onStartRealTimeText();
26850
26862
  }
@@ -27233,7 +27245,7 @@ const IncomingCallStack = (props) => {
27233
27245
  * Can be used with {@link ControlBar}
27234
27246
  *
27235
27247
  * @param props - properties for the start RealTimeText button.
27236
- * @beta
27248
+ * @public
27237
27249
  */
27238
27250
  const StartRealTimeTextButton = (props) => {
27239
27251
  const { onStartRealTimeText, isRealTimeTextOn } = props;
@@ -28289,7 +28301,7 @@ const getImageAttachmentsFromHTMLContent = (content) => {
28289
28301
 
28290
28302
  // Copyright (c) Microsoft Corporation.
28291
28303
  // Licensed under the MIT License.
28292
- var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
28304
+ var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
28293
28305
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
28294
28306
  return new (P || (P = Promise))(function (resolve, reject) {
28295
28307
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -28315,7 +28327,7 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
28315
28327
  // due to a bug in babel, we can't use arrow function here
28316
28328
  // affecting conditional-compile-remove(attachment-upload)
28317
28329
  onSendMessage: function (content, options) {
28318
- return __awaiter$C(this, undefined, undefined, function* () {
28330
+ return __awaiter$D(this, undefined, undefined, function* () {
28319
28331
  const sendMessageRequest = {
28320
28332
  content,
28321
28333
  senderDisplayName: chatClient.getState().displayName
@@ -28351,14 +28363,14 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
28351
28363
  },
28352
28364
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
28353
28365
  onUploadImage: function (image, imageFilename) {
28354
- return __awaiter$C(this, undefined, undefined, function* () {
28366
+ return __awaiter$D(this, undefined, undefined, function* () {
28355
28367
  const imageResult = yield chatThreadClient.uploadImage(image, imageFilename);
28356
28368
  return imageResult;
28357
28369
  });
28358
28370
  },
28359
28371
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
28360
28372
  onDeleteImage: function (imageId) {
28361
- return __awaiter$C(this, undefined, undefined, function* () {
28373
+ return __awaiter$D(this, undefined, undefined, function* () {
28362
28374
  try {
28363
28375
  yield chatThreadClient.deleteImage(imageId);
28364
28376
  }
@@ -28373,7 +28385,7 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
28373
28385
  onUpdateMessage: function (messageId, content,
28374
28386
  /* @conditional-compile-remove(file-sharing-acs) */
28375
28387
  options) {
28376
- return __awaiter$C(this, undefined, undefined, function* () {
28388
+ return __awaiter$D(this, undefined, undefined, function* () {
28377
28389
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
28378
28390
  const imageAttachments = getImageAttachmentsFromHTMLContent(content);
28379
28391
  const updateMessageOptions = {
@@ -28386,23 +28398,23 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
28386
28398
  yield chatThreadClient.updateMessage(messageId, updateMessageOptions);
28387
28399
  });
28388
28400
  },
28389
- onDeleteMessage: (messageId) => __awaiter$C(undefined, undefined, undefined, function* () {
28401
+ onDeleteMessage: (messageId) => __awaiter$D(undefined, undefined, undefined, function* () {
28390
28402
  yield chatThreadClient.deleteMessage(messageId);
28391
28403
  }),
28392
28404
  // This handler is designed for chatThread to consume
28393
- onMessageSeen: (chatMessageId) => __awaiter$C(undefined, undefined, undefined, function* () {
28405
+ onMessageSeen: (chatMessageId) => __awaiter$D(undefined, undefined, undefined, function* () {
28394
28406
  yield chatThreadClient.sendReadReceipt({ chatMessageId });
28395
28407
  }),
28396
- onTyping: () => __awaiter$C(undefined, undefined, undefined, function* () {
28408
+ onTyping: () => __awaiter$D(undefined, undefined, undefined, function* () {
28397
28409
  yield chatThreadClient.sendTypingNotification();
28398
28410
  }),
28399
- onRemoveParticipant: (userId) => __awaiter$C(undefined, undefined, undefined, function* () {
28411
+ onRemoveParticipant: (userId) => __awaiter$D(undefined, undefined, undefined, function* () {
28400
28412
  yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
28401
28413
  }),
28402
- updateThreadTopicName: (topicName) => __awaiter$C(undefined, undefined, undefined, function* () {
28414
+ updateThreadTopicName: (topicName) => __awaiter$D(undefined, undefined, undefined, function* () {
28403
28415
  yield chatThreadClient.updateTopic(topicName);
28404
28416
  }),
28405
- onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$C(undefined, undefined, undefined, function* () {
28417
+ onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$D(undefined, undefined, undefined, function* () {
28406
28418
  var _a, _b, _c;
28407
28419
  if (messageIterator === undefined) {
28408
28420
  // Lazy definition so that errors in the method call are reported correctly.
@@ -29335,7 +29347,7 @@ const Constants = {
29335
29347
  */
29336
29348
  const chatStatefulLogger = logger.createClientLogger('communication-react:chat-stateful');
29337
29349
 
29338
- var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
29350
+ var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
29339
29351
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29340
29352
  return new (P || (P = Promise))(function (resolve, reject) {
29341
29353
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -29377,7 +29389,7 @@ class ResourceDownloadQueue {
29377
29389
  this._messagesNeedingResourceRetrieval.push(copy);
29378
29390
  }
29379
29391
  startQueue(threadId, operation, options) {
29380
- return __awaiter$B(this, undefined, undefined, function* () {
29392
+ return __awaiter$C(this, undefined, undefined, function* () {
29381
29393
  if (this.isActive) {
29382
29394
  return;
29383
29395
  }
@@ -29414,7 +29426,7 @@ class ResourceDownloadQueue {
29414
29426
  }
29415
29427
  }
29416
29428
  downloadSingleUrl(message, resourceUrl, operation) {
29417
- return __awaiter$B(this, undefined, undefined, function* () {
29429
+ return __awaiter$C(this, undefined, undefined, function* () {
29418
29430
  const response = { sourceUrl: '' };
29419
29431
  try {
29420
29432
  const abortController = new AbortController();
@@ -29430,7 +29442,7 @@ class ResourceDownloadQueue {
29430
29442
  });
29431
29443
  }
29432
29444
  downloadAllPreviewUrls(message, operation) {
29433
- return __awaiter$B(this, undefined, undefined, function* () {
29445
+ return __awaiter$C(this, undefined, undefined, function* () {
29434
29446
  var _a;
29435
29447
  const attachments = (_a = message.content) === null || _a === undefined ? undefined : _a.attachments;
29436
29448
  if (message.type === 'html' && attachments) {
@@ -29457,7 +29469,7 @@ class ResourceDownloadQueue {
29457
29469
  });
29458
29470
  }
29459
29471
  downloadResource(operation, url, abortController) {
29460
- return __awaiter$B(this, undefined, undefined, function* () {
29472
+ return __awaiter$C(this, undefined, undefined, function* () {
29461
29473
  this._requestsToCancel[url] = { src: url, abortController };
29462
29474
  const blobUrl = yield operation(url, { credential: this._credential, endpoint: this._endpoint }, { abortController });
29463
29475
  delete this._requestsToCancel[url];
@@ -29468,9 +29480,9 @@ class ResourceDownloadQueue {
29468
29480
  /**
29469
29481
  * @private
29470
29482
  */
29471
- const fetchImageSource = (src, authentication, options) => __awaiter$B(undefined, undefined, undefined, function* () {
29483
+ const fetchImageSource = (src, authentication, options) => __awaiter$C(undefined, undefined, undefined, function* () {
29472
29484
  function fetchWithAuthentication(url, token, options) {
29473
- return __awaiter$B(this, undefined, undefined, function* () {
29485
+ return __awaiter$C(this, undefined, undefined, function* () {
29474
29486
  const headers = new Headers();
29475
29487
  headers.append('Authorization', `Bearer ${token}`);
29476
29488
  return yield fetchWithTimeout(url, {
@@ -29481,7 +29493,7 @@ const fetchImageSource = (src, authentication, options) => __awaiter$B(undefined
29481
29493
  });
29482
29494
  }
29483
29495
  function fetchWithTimeout(resource, options) {
29484
- return __awaiter$B(this, undefined, undefined, function* () {
29496
+ return __awaiter$C(this, undefined, undefined, function* () {
29485
29497
  // default timeout is 30 seconds
29486
29498
  const { timeout = 30000, abortController } = options;
29487
29499
  const id = setTimeout(() => {
@@ -29508,7 +29520,7 @@ const fetchImageSource = (src, authentication, options) => __awaiter$B(undefined
29508
29520
 
29509
29521
  // Copyright (c) Microsoft Corporation.
29510
29522
  // Licensed under the MIT License.
29511
- var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
29523
+ var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
29512
29524
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29513
29525
  return new (P || (P = Promise))(function (resolve, reject) {
29514
29526
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -29582,7 +29594,7 @@ let ChatContext$1 = class ChatContext {
29582
29594
  // Any item in queue should be removed.
29583
29595
  }
29584
29596
  downloadResourceToCache(threadId, messageId, resourceUrl) {
29585
- return __awaiter$A(this, undefined, undefined, function* () {
29597
+ return __awaiter$B(this, undefined, undefined, function* () {
29586
29598
  var _a;
29587
29599
  let message = (_a = this.getState().threads[threadId]) === null || _a === undefined ? undefined : _a.chatMessages[messageId];
29588
29600
  if (message && this._fullsizeImageQueue) {
@@ -29861,7 +29873,7 @@ let ChatContext$1 = class ChatContext {
29861
29873
  * @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
29862
29874
  */
29863
29875
  withAsyncErrorTeedToState(f, target) {
29864
- return (...args) => __awaiter$A(this, undefined, undefined, function* () {
29876
+ return (...args) => __awaiter$B(this, undefined, undefined, function* () {
29865
29877
  try {
29866
29878
  return yield f(...args);
29867
29879
  }
@@ -29968,7 +29980,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
29968
29980
 
29969
29981
  // Copyright (c) Microsoft Corporation.
29970
29982
  // Licensed under the MIT License.
29971
- var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
29983
+ var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
29972
29984
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29973
29985
  return new (P || (P = Promise))(function (resolve, reject) {
29974
29986
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -30058,7 +30070,7 @@ class EventSubscriber {
30058
30070
  };
30059
30071
  // This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
30060
30072
  // Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
30061
- this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$z(this, undefined, undefined, function* () {
30073
+ this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$A(this, undefined, undefined, function* () {
30062
30074
  var _a, e_1, _b, _c;
30063
30075
  try {
30064
30076
  for (var _d = true, _e = __asyncValues$1(this.chatClient
@@ -30152,7 +30164,7 @@ class EventSubscriber {
30152
30164
 
30153
30165
  // Copyright (c) Microsoft Corporation.
30154
30166
  // Licensed under the MIT License.
30155
- var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
30167
+ var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
30156
30168
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30157
30169
  return new (P || (P = Promise))(function (resolve, reject) {
30158
30170
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -30174,7 +30186,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
30174
30186
  const threadsIterator = iteratorCreator(...args);
30175
30187
  return {
30176
30188
  next() {
30177
- return __awaiter$y(this, undefined, undefined, function* () {
30189
+ return __awaiter$z(this, undefined, undefined, function* () {
30178
30190
  const result = yield threadsIterator.next();
30179
30191
  if (!result.done && result.value) {
30180
30192
  decorateFn(result.value, context);
@@ -30189,7 +30201,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
30189
30201
  const pages = threadsIterator.byPage(settings);
30190
30202
  return {
30191
30203
  next() {
30192
- return __awaiter$y(this, undefined, undefined, function* () {
30204
+ return __awaiter$z(this, undefined, undefined, function* () {
30193
30205
  const result = yield pages.next();
30194
30206
  const page = result.value;
30195
30207
  if (!result.done && result.value) {
@@ -30276,7 +30288,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
30276
30288
 
30277
30289
  // Copyright (c) Microsoft Corporation.
30278
30290
  // Licensed under the MIT License.
30279
- var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
30291
+ var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
30280
30292
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30281
30293
  return new (P || (P = Promise))(function (resolve, reject) {
30282
30294
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -30295,14 +30307,14 @@ class ProxyChatThreadClient {
30295
30307
  return createDecoratedListMessages(chatThreadClient, this._context);
30296
30308
  }
30297
30309
  case 'getMessage': {
30298
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$x(this, undefined, undefined, function* () {
30310
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$y(this, undefined, undefined, function* () {
30299
30311
  const message = yield chatThreadClient.getMessage(...args);
30300
30312
  this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
30301
30313
  return message;
30302
30314
  }), 'ChatThreadClient.getMessage');
30303
30315
  }
30304
30316
  case 'sendMessage': {
30305
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$x(this, undefined, undefined, function* () {
30317
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$y(this, undefined, undefined, function* () {
30306
30318
  var _a;
30307
30319
  // Retry logic?
30308
30320
  const [request, options] = args;
@@ -30343,7 +30355,7 @@ class ProxyChatThreadClient {
30343
30355
  }), 'ChatThreadClient.sendMessage');
30344
30356
  }
30345
30357
  case 'addParticipants': {
30346
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$x(this, undefined, undefined, function* () {
30358
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$y(this, undefined, undefined, function* () {
30347
30359
  const result = yield chatThreadClient.addParticipants(...args);
30348
30360
  const [addRequest] = args;
30349
30361
  const participantsToAdd = addRequest.participants;
@@ -30352,7 +30364,7 @@ class ProxyChatThreadClient {
30352
30364
  }), 'ChatThreadClient.addParticipants');
30353
30365
  }
30354
30366
  case 'deleteMessage': {
30355
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$x(this, undefined, undefined, function* () {
30367
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$y(this, undefined, undefined, function* () {
30356
30368
  // DeleteMessage is able to either delete local one(for failed message) or synced message
30357
30369
  const [messageId] = args;
30358
30370
  if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
@@ -30370,12 +30382,12 @@ class ProxyChatThreadClient {
30370
30382
  return createDecoratedListReadReceipts(chatThreadClient, this._context);
30371
30383
  }
30372
30384
  case 'sendTypingNotification': {
30373
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$x(this, undefined, undefined, function* () {
30385
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$y(this, undefined, undefined, function* () {
30374
30386
  return yield chatThreadClient.sendTypingNotification(...args);
30375
30387
  }), 'ChatThreadClient.sendTypingNotification');
30376
30388
  }
30377
30389
  case 'removeParticipant': {
30378
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$x(this, undefined, undefined, function* () {
30390
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$y(this, undefined, undefined, function* () {
30379
30391
  const result = yield chatThreadClient.removeParticipant(...args);
30380
30392
  const [removeIdentifier] = args;
30381
30393
  this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
@@ -30383,7 +30395,7 @@ class ProxyChatThreadClient {
30383
30395
  }), 'ChatThreadClient.removeParticipant');
30384
30396
  }
30385
30397
  case 'updateMessage': {
30386
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$x(this, undefined, undefined, function* () {
30398
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$y(this, undefined, undefined, function* () {
30387
30399
  const result = yield chatThreadClient.updateMessage(...args);
30388
30400
  const [messageId, updateOption] = args;
30389
30401
  this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === undefined ? undefined : updateOption.content);
@@ -30391,7 +30403,7 @@ class ProxyChatThreadClient {
30391
30403
  }), 'ChatThreadClient.updateMessage');
30392
30404
  }
30393
30405
  case 'updateTopic': {
30394
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$x(this, undefined, undefined, function* () {
30406
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$y(this, undefined, undefined, function* () {
30395
30407
  const result = yield chatThreadClient.updateTopic(...args);
30396
30408
  const [topic] = args;
30397
30409
  this._context.updateThreadTopic(chatThreadClient.threadId, topic);
@@ -30399,7 +30411,7 @@ class ProxyChatThreadClient {
30399
30411
  }), 'ChatThreadClient.updateTopic');
30400
30412
  }
30401
30413
  case 'getProperties': {
30402
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$x(this, undefined, undefined, function* () {
30414
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$y(this, undefined, undefined, function* () {
30403
30415
  const result = yield chatThreadClient.getProperties(...args);
30404
30416
  this._context.updateThread(chatThreadClient.threadId, result);
30405
30417
  return result;
@@ -30437,7 +30449,7 @@ const createDecoratedListThreads = (chatClient, context) => {
30437
30449
 
30438
30450
  // Copyright (c) Microsoft Corporation.
30439
30451
  // Licensed under the MIT License.
30440
- var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
30452
+ var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
30441
30453
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30442
30454
  return new (P || (P = Promise))(function (resolve, reject) {
30443
30455
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -30456,7 +30468,7 @@ const proxyChatClient = {
30456
30468
  switch (prop) {
30457
30469
  case 'createChatThread': {
30458
30470
  return context.withAsyncErrorTeedToState(function (...args) {
30459
- return __awaiter$w(this, undefined, undefined, function* () {
30471
+ return __awaiter$x(this, undefined, undefined, function* () {
30460
30472
  const result = yield chatClient.createChatThread(...args);
30461
30473
  const thread = result.chatThread;
30462
30474
  if (thread) {
@@ -30469,7 +30481,7 @@ const proxyChatClient = {
30469
30481
  }
30470
30482
  case 'deleteChatThread': {
30471
30483
  return context.withAsyncErrorTeedToState(function (...args) {
30472
- return __awaiter$w(this, undefined, undefined, function* () {
30484
+ return __awaiter$x(this, undefined, undefined, function* () {
30473
30485
  const result = yield chatClient.deleteChatThread(...args);
30474
30486
  context.deleteThread(args[0]);
30475
30487
  return result;
@@ -30489,7 +30501,7 @@ const proxyChatClient = {
30489
30501
  }
30490
30502
  case 'startRealtimeNotifications': {
30491
30503
  return context.withAsyncErrorTeedToState(function (...args) {
30492
- return __awaiter$w(this, undefined, undefined, function* () {
30504
+ return __awaiter$x(this, undefined, undefined, function* () {
30493
30505
  const ret = yield chatClient.startRealtimeNotifications(...args);
30494
30506
  if (!receiver.eventSubscriber) {
30495
30507
  receiver.eventSubscriber = new EventSubscriber(chatClient, context);
@@ -30500,7 +30512,7 @@ const proxyChatClient = {
30500
30512
  }
30501
30513
  case 'stopRealtimeNotifications': {
30502
30514
  return context.withAsyncErrorTeedToState(function (...args) {
30503
- return __awaiter$w(this, undefined, undefined, function* () {
30515
+ return __awaiter$x(this, undefined, undefined, function* () {
30504
30516
  const ret = yield chatClient.stopRealtimeNotifications(...args);
30505
30517
  if (receiver.eventSubscriber) {
30506
30518
  receiver.eventSubscriber.unsubscribe();
@@ -30611,6 +30623,209 @@ const SEND_BOX_UPLOADS_KEY_VALUE = 'send-box';
30611
30623
  */
30612
30624
  const _DEFAULT_INLINE_IMAGE_FILE_NAME = 'image.png';
30613
30625
 
30626
+ // Copyright (c) Microsoft Corporation.
30627
+ // Licensed under the MIT License.
30628
+ var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
30629
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30630
+ return new (P || (P = Promise))(function (resolve, reject) {
30631
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
30632
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30633
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
30634
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
30635
+ });
30636
+ };
30637
+ /* @conditional-compile-remove(on-fetch-profile) */
30638
+ /**
30639
+ * @private
30640
+ */
30641
+ const createProfileStateModifier$1 = (onFetchProfile, notifyUpdate) => {
30642
+ const cachedDisplayName = {};
30643
+ return (state) => {
30644
+ var _a;
30645
+ const originalParticipants = (_a = state.thread) === null || _a === undefined ? undefined : _a.participants;
30646
+ (() => __awaiter$w(undefined, undefined, undefined, function* () {
30647
+ let shouldNotifyUpdates = false;
30648
+ if (!originalParticipants) {
30649
+ return;
30650
+ }
30651
+ for (const [key, participant] of Object.entries(originalParticipants)) {
30652
+ if (cachedDisplayName[key]) {
30653
+ continue;
30654
+ }
30655
+ const profile = yield onFetchProfile(key, { displayName: participant.displayName });
30656
+ if ((profile === null || profile === undefined ? undefined : profile.displayName) && participant.displayName !== (profile === null || profile === undefined ? undefined : profile.displayName)) {
30657
+ cachedDisplayName[key] = profile === null || profile === undefined ? undefined : profile.displayName;
30658
+ shouldNotifyUpdates = true;
30659
+ }
30660
+ }
30661
+ // notify update only when there is a change, which most likely will trigger modifier and setState again
30662
+ if (shouldNotifyUpdates) {
30663
+ notifyUpdate();
30664
+ }
30665
+ }))();
30666
+ const participantsModifier = createParticipantModifier$1((id, participant) => {
30667
+ if (cachedDisplayName[id]) {
30668
+ return Object.assign(Object.assign({}, participant), { displayName: cachedDisplayName[id] });
30669
+ }
30670
+ return undefined;
30671
+ });
30672
+ const modifiedParticipantState = participantsModifier(state);
30673
+ const chatMessagesModifier = createChatMessageModifier((id, chatMessage) => {
30674
+ var _a;
30675
+ const originalChatMessage = Object.assign({}, chatMessage);
30676
+ if ((_a = originalChatMessage.content) === null || _a === undefined ? undefined : _a.participants) {
30677
+ const newParticipants = originalChatMessage.content.participants.map((participant) => {
30678
+ if (participant.id) {
30679
+ if ('communicationUserId' in participant.id && cachedDisplayName[participant.id.communicationUserId]) {
30680
+ return Object.assign(Object.assign({}, participant), { displayName: cachedDisplayName[participant.id.communicationUserId] });
30681
+ }
30682
+ else if ('microsoftTeamsUserId' in participant.id &&
30683
+ 'rawId' in participant.id &&
30684
+ participant.id.rawId &&
30685
+ cachedDisplayName[participant.id.rawId]) {
30686
+ return Object.assign(Object.assign({}, participant), { displayName: cachedDisplayName[participant.id.rawId] });
30687
+ }
30688
+ else if ('teamsAppId' in participant.id &&
30689
+ 'rawId' in participant.id &&
30690
+ participant.id.rawId &&
30691
+ cachedDisplayName[participant.id.rawId]) {
30692
+ return Object.assign(Object.assign({}, participant), { displayName: cachedDisplayName[participant.id.rawId] });
30693
+ }
30694
+ else if ('phoneNumber' in participant.id &&
30695
+ 'rawId' in participant.id &&
30696
+ participant.id.rawId &&
30697
+ cachedDisplayName[participant.id.rawId]) {
30698
+ return Object.assign(Object.assign({}, participant), { displayName: cachedDisplayName[participant.id.rawId] });
30699
+ }
30700
+ else if ('id' in participant.id && cachedDisplayName[participant.id.id]) {
30701
+ return Object.assign(Object.assign({}, participant), { displayName: cachedDisplayName[participant.id.id] });
30702
+ }
30703
+ else {
30704
+ return participant;
30705
+ }
30706
+ }
30707
+ return participant;
30708
+ });
30709
+ originalChatMessage.content = Object.assign(Object.assign({}, originalChatMessage.content), { participants: newParticipants });
30710
+ }
30711
+ if (originalChatMessage.sender && originalChatMessage.senderDisplayName) {
30712
+ if (originalChatMessage.sender.kind === 'communicationUser' &&
30713
+ originalChatMessage.sender.communicationUserId &&
30714
+ cachedDisplayName[originalChatMessage.sender.communicationUserId]) {
30715
+ originalChatMessage.senderDisplayName = cachedDisplayName[originalChatMessage.sender.communicationUserId];
30716
+ }
30717
+ else if (originalChatMessage.sender.kind === 'microsoftTeamsUser' &&
30718
+ originalChatMessage.sender.rawId &&
30719
+ cachedDisplayName[originalChatMessage.sender.rawId]) {
30720
+ originalChatMessage.senderDisplayName = cachedDisplayName[originalChatMessage.sender.rawId];
30721
+ }
30722
+ else if (originalChatMessage.sender.kind === 'phoneNumber' &&
30723
+ originalChatMessage.sender.phoneNumber &&
30724
+ cachedDisplayName[originalChatMessage.sender.phoneNumber]) {
30725
+ originalChatMessage.senderDisplayName = cachedDisplayName[originalChatMessage.sender.phoneNumber];
30726
+ }
30727
+ else if (originalChatMessage.sender.kind === 'unknown' &&
30728
+ originalChatMessage.sender.id &&
30729
+ cachedDisplayName[originalChatMessage.sender.id]) {
30730
+ originalChatMessage.senderDisplayName = cachedDisplayName[originalChatMessage.sender.id];
30731
+ }
30732
+ else if (originalChatMessage.sender.kind === 'microsoftTeamsApp' &&
30733
+ originalChatMessage.sender.rawId &&
30734
+ cachedDisplayName[originalChatMessage.sender.rawId]) {
30735
+ originalChatMessage.senderDisplayName = cachedDisplayName[originalChatMessage.sender.rawId];
30736
+ }
30737
+ }
30738
+ return Object.assign({}, originalChatMessage);
30739
+ });
30740
+ return chatMessagesModifier(modifiedParticipantState);
30741
+ };
30742
+ };
30743
+ /* @conditional-compile-remove(on-fetch-profile) */
30744
+ /**
30745
+ * @private
30746
+ * This is the util function to create a participant modifier for remote participantList
30747
+ * It memoize previous original participant items and only update the changed participant
30748
+ * It takes in one modifier function to generate one single participant object, it returns undefined if the object keeps unmodified
30749
+ */
30750
+ const createParticipantModifier$1 = (createModifiedParticipant) => {
30751
+ let previousParticipantState = undefined;
30752
+ let modifiedParticipants = {};
30753
+ const memoizedParticipants = {};
30754
+ return (state) => {
30755
+ var _a, _b, _c, _d;
30756
+ // if root state is the same, we don't need to update the participants
30757
+ if (((_a = state.thread) === null || _a === undefined ? undefined : _a.participants) !== previousParticipantState) {
30758
+ modifiedParticipants = {};
30759
+ const originalParticipants = Object.entries(((_b = state.thread) === null || _b === undefined ? undefined : _b.participants) || {});
30760
+ for (const [key, originalParticipant] of originalParticipants) {
30761
+ const modifiedParticipant = createModifiedParticipant(key, originalParticipant);
30762
+ if (modifiedParticipant === undefined) {
30763
+ modifiedParticipants[key] = originalParticipant;
30764
+ continue;
30765
+ }
30766
+ // Generate the new item if original cached item has been changed
30767
+ if (((_c = memoizedParticipants[key]) === null || _c === undefined ? undefined : _c.originalRef) !== originalParticipant) {
30768
+ memoizedParticipants[key] = {
30769
+ newParticipant: modifiedParticipant,
30770
+ originalRef: originalParticipant
30771
+ };
30772
+ }
30773
+ // the modified participant is always coming from the memoized cache, whether is was refreshed
30774
+ // from the previous closure or not
30775
+ const memoizedParticipant = memoizedParticipants[key];
30776
+ if (!memoizedParticipant) {
30777
+ throw new Error('Participant modifier encountered an unhandled exception.');
30778
+ }
30779
+ modifiedParticipants[key] = memoizedParticipant.newParticipant;
30780
+ }
30781
+ previousParticipantState = (_d = state.thread) === null || _d === undefined ? undefined : _d.participants;
30782
+ }
30783
+ return Object.assign(Object.assign({}, state), { thread: Object.assign(Object.assign({}, state.thread), { participants: modifiedParticipants }) });
30784
+ };
30785
+ };
30786
+ /* @conditional-compile-remove(on-fetch-profile) */
30787
+ /**
30788
+ * @private
30789
+ * This is the util function to create a chat message modifier for remote participantList
30790
+ * It memoize previous original messages and only update the changed sender display name
30791
+ * It takes in one modifier function to generate one single participant object, it returns undefined if the object keeps unmodified
30792
+ */
30793
+ const createChatMessageModifier = (createModifiedChatMessage) => {
30794
+ let previousChatMessages;
30795
+ let modifiedChatMessages;
30796
+ const memoizedChatMessages = {};
30797
+ return (state) => {
30798
+ var _a, _b, _c, _d;
30799
+ if (((_a = state.thread) === null || _a === undefined ? undefined : _a.chatMessages) !== previousChatMessages) {
30800
+ modifiedChatMessages = {};
30801
+ const originalChatMessages = Object.entries(((_b = state.thread) === null || _b === undefined ? undefined : _b.chatMessages) || {});
30802
+ for (const [key, originalChatMessage] of originalChatMessages) {
30803
+ const modifiedChatMessage = createModifiedChatMessage(key, originalChatMessage);
30804
+ if (modifiedChatMessage === undefined) {
30805
+ modifiedChatMessages[key] = originalChatMessage;
30806
+ continue;
30807
+ }
30808
+ // Generate the new item if original cached item has been changed
30809
+ if (((_c = memoizedChatMessages[key]) === null || _c === undefined ? undefined : _c.originalRef) !== originalChatMessage) {
30810
+ memoizedChatMessages[key] = {
30811
+ newChatMessage: modifiedChatMessage,
30812
+ originalRef: originalChatMessage
30813
+ };
30814
+ }
30815
+ // the modified chat message is always coming from the memoized cache, whether is was refreshed
30816
+ // from the previous closure or not
30817
+ const memoizedChatMessage = memoizedChatMessages[key];
30818
+ if (!memoizedChatMessage) {
30819
+ throw new Error('Participant modifier encountered an unhandled exception.');
30820
+ }
30821
+ modifiedChatMessages[key] = memoizedChatMessage.newChatMessage;
30822
+ }
30823
+ previousChatMessages = (_d = state.thread) === null || _d === undefined ? undefined : _d.chatMessages;
30824
+ }
30825
+ return Object.assign(Object.assign({}, state), { thread: Object.assign(Object.assign({}, state.thread), { chatMessages: modifiedChatMessages }) });
30826
+ };
30827
+ };
30828
+
30614
30829
  // Copyright (c) Microsoft Corporation.
30615
30830
  // Licensed under the MIT License.
30616
30831
  var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -30634,7 +30849,9 @@ var __asyncValues = (window && window.__asyncValues) || function (o) {
30634
30849
  * @private
30635
30850
  */
30636
30851
  class ChatContext {
30637
- constructor(clientState, threadId) {
30852
+ constructor(clientState, threadId,
30853
+ /* @conditional-compile-remove(on-fetch-profile) */
30854
+ chatAdapterOptions) {
30638
30855
  this.emitter = new events.EventEmitter();
30639
30856
  const thread = clientState.threads[threadId];
30640
30857
  this.threadId = threadId;
@@ -30647,6 +30864,12 @@ class ChatContext {
30647
30864
  thread,
30648
30865
  latestErrors: clientState.latestErrors
30649
30866
  };
30867
+ /* @conditional-compile-remove(on-fetch-profile) */
30868
+ this.displayNameModifier = (chatAdapterOptions === null || chatAdapterOptions === undefined ? undefined : chatAdapterOptions.onFetchProfile)
30869
+ ? createProfileStateModifier$1(chatAdapterOptions.onFetchProfile, () => {
30870
+ this.setState(this.getState());
30871
+ })
30872
+ : undefined;
30650
30873
  }
30651
30874
  onStateChange(handler) {
30652
30875
  this.emitter.on('stateChanged', handler);
@@ -30656,6 +30879,8 @@ class ChatContext {
30656
30879
  }
30657
30880
  setState(state) {
30658
30881
  this.state = state;
30882
+ /* @conditional-compile-remove(on-fetch-profile) */
30883
+ this.state = this.displayNameModifier ? this.displayNameModifier(state) : state;
30659
30884
  this.emitter.emit('stateChanged', this.state);
30660
30885
  }
30661
30886
  getState() {
@@ -30684,12 +30909,16 @@ class ChatContext {
30684
30909
  * @private
30685
30910
  */
30686
30911
  class AzureCommunicationChatAdapter {
30687
- constructor(chatClient, chatThreadClient) {
30912
+ constructor(chatClient, chatThreadClient,
30913
+ /* @conditional-compile-remove(on-fetch-profile) */
30914
+ chatAdapterOptions) {
30688
30915
  this.emitter = new events.EventEmitter();
30689
30916
  this.bindAllPublicMethods();
30690
30917
  this.chatClient = chatClient;
30691
30918
  this.chatThreadClient = chatThreadClient;
30692
- this.context = new ChatContext(chatClient.getState(), chatThreadClient.threadId);
30919
+ this.context = new ChatContext(chatClient.getState(), chatThreadClient.threadId,
30920
+ /* @conditional-compile-remove(on-fetch-profile) */
30921
+ chatAdapterOptions);
30693
30922
  const onStateChange = (clientState) => {
30694
30923
  // unsubscribe when the instance gets disposed
30695
30924
  if (!this) {
@@ -30994,54 +31223,70 @@ const convertEventType = (type) => {
30994
31223
  *
30995
31224
  * @public
30996
31225
  */
30997
- const createAzureCommunicationChatAdapter = (_a) => __awaiter$v(undefined, [_a], undefined, function* ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) {
30998
- return _createAzureCommunicationChatAdapterInner(endpointUrl, userId, displayName, credential, threadId);
31226
+ const createAzureCommunicationChatAdapter = (_a) => __awaiter$v(undefined, [_a], undefined, function* ({ endpoint: endpointUrl, userId, displayName, credential, threadId,
31227
+ /* @conditional-compile-remove(on-fetch-profile) */
31228
+ chatAdapterOptions }) {
31229
+ return _createAzureCommunicationChatAdapterInner(endpointUrl, userId, displayName, credential, threadId, 'Chat',
31230
+ /* @conditional-compile-remove(on-fetch-profile) */
31231
+ chatAdapterOptions);
30999
31232
  });
31000
31233
  /**
31001
31234
  * This inner function is used to allow injection of TelemetryImplementationHint without changing the public API.
31002
31235
  *
31003
31236
  * @internal
31004
31237
  */
31005
- const _createAzureCommunicationChatAdapterInner = (endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1) => __awaiter$v(undefined, [endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1], undefined, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat') {
31006
- if (!_isValidIdentifier(userId)) {
31007
- throw new Error('Provided userId is invalid. Please provide valid identifier object.');
31008
- }
31009
- const chatClient = _createStatefulChatClientInner({
31010
- userId,
31011
- displayName,
31012
- endpoint,
31013
- credential
31014
- }, undefined, telemetryImplementationHint);
31015
- const chatThreadClient = yield chatClient.getChatThreadClient(threadId);
31016
- yield chatClient.startRealtimeNotifications();
31017
- const adapter = yield createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);
31018
- return adapter;
31019
- });
31238
+ const _createAzureCommunicationChatAdapterInner = function (endpoint_1, userId_1, displayName_1, credential_1, threadId_1) {
31239
+ return __awaiter$v(this, arguments, undefined, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat',
31240
+ /* @conditional-compile-remove(on-fetch-profile) */
31241
+ chatAdapterOptions) {
31242
+ if (!_isValidIdentifier(userId)) {
31243
+ throw new Error('Provided userId is invalid. Please provide valid identifier object.');
31244
+ }
31245
+ const chatClient = _createStatefulChatClientInner({
31246
+ userId,
31247
+ displayName,
31248
+ endpoint,
31249
+ credential
31250
+ }, undefined, telemetryImplementationHint);
31251
+ const chatThreadClient = yield chatClient.getChatThreadClient(threadId);
31252
+ yield chatClient.startRealtimeNotifications();
31253
+ const adapter = yield createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
31254
+ /* @conditional-compile-remove(on-fetch-profile) */
31255
+ chatAdapterOptions);
31256
+ return adapter;
31257
+ });
31258
+ };
31020
31259
  /**
31021
31260
  * This inner function to create ChatAdapterPromise in case when threadID is not avaialble.
31022
31261
  * ThreadId is a promise to allow for lazy initialization of the adapter.
31023
31262
  * @internal
31024
31263
  */
31025
- const _createLazyAzureCommunicationChatAdapterInner = (endpoint_2, userId_2, displayName_2, credential_2, threadId_2, ...args_2) => __awaiter$v(undefined, [endpoint_2, userId_2, displayName_2, credential_2, threadId_2, ...args_2], undefined, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat') {
31026
- if (!_isValidIdentifier(userId)) {
31027
- throw new Error('Provided userId is invalid. Please provide valid identifier object.');
31028
- }
31029
- const chatClient = _createStatefulChatClientInner({
31030
- userId,
31031
- displayName,
31032
- endpoint,
31033
- credential
31034
- }, undefined, telemetryImplementationHint);
31035
- return threadId.then((threadId) => __awaiter$v(undefined, undefined, undefined, function* () {
31036
- if (UNSUPPORTED_CHAT_THREAD_TYPE.some((t) => threadId.includes(t))) {
31037
- console.error(`Invalid Chat ThreadId: ${threadId}. Please note with Teams Channel Meetings, only Calling is supported and Chat is not currently supported. Read more: ${TEAMS_LIMITATION_LEARN_MORE}.`);
31264
+ const _createLazyAzureCommunicationChatAdapterInner = function (endpoint_1, userId_1, displayName_1, credential_1, threadId_1) {
31265
+ return __awaiter$v(this, arguments, undefined, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat',
31266
+ /* @conditional-compile-remove(on-fetch-profile) */
31267
+ chatAdapterOptions) {
31268
+ if (!_isValidIdentifier(userId)) {
31269
+ throw new Error('Provided userId is invalid. Please provide valid identifier object.');
31038
31270
  }
31039
- const chatThreadClient = yield chatClient.getChatThreadClient(threadId);
31040
- yield chatClient.startRealtimeNotifications();
31041
- const adapter = yield createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);
31042
- return adapter;
31043
- }));
31044
- });
31271
+ const chatClient = _createStatefulChatClientInner({
31272
+ userId,
31273
+ displayName,
31274
+ endpoint,
31275
+ credential
31276
+ }, undefined, telemetryImplementationHint);
31277
+ return threadId.then((threadId) => __awaiter$v(this, undefined, undefined, function* () {
31278
+ if (UNSUPPORTED_CHAT_THREAD_TYPE.some((t) => threadId.includes(t))) {
31279
+ console.error(`Invalid Chat ThreadId: ${threadId}. Please note with Teams Channel Meetings, only Calling is supported and Chat is not currently supported. Read more: ${TEAMS_LIMITATION_LEARN_MORE}.`);
31280
+ }
31281
+ const chatThreadClient = yield chatClient.getChatThreadClient(threadId);
31282
+ yield chatClient.startRealtimeNotifications();
31283
+ const adapter = yield createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
31284
+ /* @conditional-compile-remove(on-fetch-profile) */
31285
+ chatAdapterOptions);
31286
+ return adapter;
31287
+ }));
31288
+ });
31289
+ };
31045
31290
  /**
31046
31291
  * A custom React hook to simplify the creation of {@link ChatAdapter}.
31047
31292
  *
@@ -31153,9 +31398,13 @@ beforeDispose) => {
31153
31398
  *
31154
31399
  * @public
31155
31400
  */
31156
- function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient) {
31401
+ function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
31402
+ /* @conditional-compile-remove(on-fetch-profile) */
31403
+ chatAdapterOptions) {
31157
31404
  return __awaiter$v(this, undefined, undefined, function* () {
31158
- return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
31405
+ return new AzureCommunicationChatAdapter(chatClient, chatThreadClient,
31406
+ /* @conditional-compile-remove(on-fetch-profile) */
31407
+ chatAdapterOptions);
31159
31408
  });
31160
31409
  }
31161
31410
  const isChatError = (e) => {
@@ -32102,7 +32351,7 @@ const AttachmentDownloadErrorBar = (props) => {
32102
32351
  /**
32103
32352
  * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
32104
32353
  */
32105
- const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DyvN1xv0.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
32354
+ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-zKj5z_6J.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
32106
32355
  /**
32107
32356
  * @private
32108
32357
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -32110,7 +32359,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
32110
32359
  *
32111
32360
  /* @conditional-compile-remove(rich-text-editor-composite-support)
32112
32361
  */
32113
- const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DyvN1xv0.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
32362
+ const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-zKj5z_6J.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
32114
32363
  /**
32115
32364
  * @private
32116
32365
  */
@@ -39689,7 +39938,7 @@ const CallArrangement = (props) => {
39689
39938
  padding: verticalControlBar ? '0.25rem' : 'unset'
39690
39939
  }) }, isLegacyCallControlEnabled((_o = props.callControlProps) === null || _o === undefined ? undefined : _o.options) ? (React.createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView, peopleButtonChecked: isPeoplePaneOpen, onPeopleButtonClicked: togglePeoplePane, displayVertical: verticalControlBar }))) : (React.createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callControls: props.callControlProps.options, callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby, disableButtonsForHoldScreen: isInLocalHold, peopleButtonChecked: isPeoplePaneOpen, onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked, isCaptionsSupported: (useTeamsCaptions && hasJoinedCall) || hasJoinedCall,
39691
39940
  /* @conditional-compile-remove(rtt) */
39692
- isRealTimeTextSupported: hasJoinedCall && !props.isPstnCall,
39941
+ isRealTimeTextSupported: hasJoinedCall && props.isRTTSupportedCall,
39693
39942
  /* @conditional-compile-remove(rtt) */
39694
39943
  onStartRealTimeText: onStartRealTimeText,
39695
39944
  /* @conditional-compile-remove(rtt) */
@@ -39697,7 +39946,7 @@ const CallArrangement = (props) => {
39697
39946
  ((_p = props.callControlProps) === null || _p === undefined ? undefined : _p.options) !== false && showDrawer && (React.createElement(react.Stack, { styles: drawerContainerStylesValue },
39698
39947
  React.createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked, disableButtonsForHoldScreen: isInLocalHold, isCaptionsSupported: (useTeamsCaptions && hasJoinedCall) || hasJoinedCall,
39699
39948
  /* @conditional-compile-remove(rtt) */
39700
- isRealTimeTextSupported: hasJoinedCall && !props.isPstnCall,
39949
+ isRealTimeTextSupported: hasJoinedCall && props.isRTTSupportedCall,
39701
39950
  /* @conditional-compile-remove(rtt) */
39702
39951
  onStartRealTimeText: onStartRealTimeText,
39703
39952
  /* @conditional-compile-remove(rtt) */
@@ -39750,7 +39999,7 @@ const remoteVideoViewOptions = {
39750
39999
  */
39751
40000
  const MediaGallery = (props) => {
39752
40001
  var _a, _b;
39753
- const { pinnedParticipants = [], setPinnedParticipants, setIsPromptOpen, setPromptProps, hideSpotlightButtons, videoTilesOptions, captionsOptions } = props;
40002
+ const { pinnedParticipants = [], setPinnedParticipants, setIsPromptOpen, setPromptProps, hideSpotlightButtons, videoTilesOptions, captionsOptions, compositeContainerAspectRatio } = props;
39754
40003
  const videoGalleryProps = usePropsFor$1(VideoGallery);
39755
40004
  const cameraSwitcherCameras = useSelector$1(localVideoCameraCycleButtonSelector);
39756
40005
  const cameraSwitcherCallback = useHandlers();
@@ -39758,11 +40007,10 @@ const MediaGallery = (props) => {
39758
40007
  const userRole = useSelector$1(getRole);
39759
40008
  const capabilities = useSelector$1(getCapabilites);
39760
40009
  const isRoomsCall = useSelector$1(getIsRoomsCall);
40010
+ const reactionResources = useSelector$1(getReactionResources);
39761
40011
  const containerRef = React.useRef(null);
39762
40012
  const containerWidth = _useContainerWidth(containerRef);
39763
40013
  const containerHeight = _useContainerHeight(containerRef);
39764
- const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;
39765
- const reactionResources = useSelector$1(getReactionResources);
39766
40014
  const layoutBasedOnTilePosition = getVideoGalleryLayoutBasedOnLocalOptions((_a = props.localVideoTileOptions) === null || _a === undefined ? undefined : _a.position);
39767
40015
  const cameraSwitcherProps = React.useMemo(() => {
39768
40016
  return Object.assign(Object.assign({}, cameraSwitcherCallback), cameraSwitcherCameras);
@@ -39821,7 +40069,7 @@ const MediaGallery = (props) => {
39821
40069
  };
39822
40070
  return (React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { videoTilesOptions: videoTilesOptions, localVideoViewOptions: localVideoViewOptions$2, remoteVideoViewOptions: remoteVideoViewOptions, styles: galleryStyles, layout: layoutBasedOnUserSelection(), showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar, remoteVideoTileMenu: remoteVideoTileMenuOptions, overflowGalleryPosition: overflowGalleryPosition, localVideoTileSize: props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')
39823
40071
  ? 'hidden'
39824
- : props.isMobile && containerAspectRatio < 1
40072
+ : props.isMobile && compositeContainerAspectRatio && compositeContainerAspectRatio < 1
39825
40073
  ? '9:16'
39826
40074
  : '16:9', pinnedParticipants: pinnedParticipants, onPinParticipant: onPinParticipant, onUnpinParticipant: onUnpinParticipant, reactionResources: reactionResources, onStartLocalSpotlight: hideSpotlightButtons ? undefined : onStartLocalSpotlightWithPrompt, onStopLocalSpotlight: hideSpotlightButtons ? undefined : onStopLocalSpotlightWithPrompt, onStartRemoteSpotlight: hideSpotlightButtons ? undefined : onStartRemoteSpotlightWithPrompt, onStopRemoteSpotlight: hideSpotlightButtons ? undefined : onStopRemoteSpotlightWithPrompt, onMuteParticipant: ((_a = capabilities === null || capabilities === undefined ? undefined : capabilities.muteOthers) === null || _a === undefined ? undefined : _a.isPresent) || userRole === 'Unknown'
39827
40075
  ? videoGalleryProps.onMuteParticipant
@@ -39839,7 +40087,6 @@ const MediaGallery = (props) => {
39839
40087
  overflowGalleryPosition,
39840
40088
  userRole,
39841
40089
  isRoomsCall,
39842
- containerAspectRatio,
39843
40090
  pinnedParticipants,
39844
40091
  onPinParticipant,
39845
40092
  onUnpinParticipant,
@@ -39851,7 +40098,8 @@ const MediaGallery = (props) => {
39851
40098
  onStopRemoteSpotlightWithPrompt,
39852
40099
  layoutBasedOnTilePosition,
39853
40100
  capabilities === null || capabilities === undefined ? undefined : capabilities.muteOthers,
39854
- props.localScreenShareView
40101
+ props.localScreenShareView,
40102
+ compositeContainerAspectRatio
39855
40103
  ]);
39856
40104
  return (React.createElement("div", { ref: containerRef, style: mediaGalleryContainerStyles },
39857
40105
  React.createElement(Announcer$1, { announcementString: announcerString, ariaLive: 'polite' }),
@@ -40187,6 +40435,11 @@ const CallPage = (props) => {
40187
40435
  const renderDtmfDialerFromStart = showDtmfDialer(callees, remoteParticipantsConnected, disableAutoShowDtmfDialer);
40188
40436
  const [dtmfDialerPresent, setDtmfDialerPresent] = React.useState(renderDtmfDialerFromStart);
40189
40437
  const isPstnCall = callees === null || callees === undefined ? undefined : callees.some((callee) => communicationCommon.isPhoneNumberIdentifier(callee));
40438
+ const isCTECall = useSelector$1((state) => state.userId.kind === 'microsoftTeamsUser');
40439
+ const containerRef = React.useRef(null);
40440
+ const containerWidth = _useContainerWidth(containerRef);
40441
+ const containerHeight = _useContainerHeight(containerRef);
40442
+ const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;
40190
40443
  const strings = useLocale().strings.call;
40191
40444
  const pinnedParticipantsChecked = React.useMemo(() => pinnedParticipants.filter((pinnedParticipant) => remoteParticipantsConnected.find((remoteParticipant) => toFlatCommunicationIdentifier(remoteParticipant.identifier) === pinnedParticipant)), [pinnedParticipants, remoteParticipantsConnected]);
40192
40445
  // Reduce the controls shown when mobile view is enabled.
@@ -40211,10 +40464,10 @@ const CallPage = (props) => {
40211
40464
  return (React.createElement(DtmfDialpadPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, compositeAudioContext: compositeAudioContext }));
40212
40465
  }
40213
40466
  else {
40214
- return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, remoteVideoTileMenuOptions: options === null || options === undefined ? undefined : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId, localVideoTileOptions: options === null || options === undefined ? undefined : options.localVideoTile, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, userSetGalleryLayout: galleryLayout, pinnedParticipants: pinnedParticipantsChecked, setPinnedParticipants: setPinnedParticipants, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_a = options === null || options === undefined ? undefined : options.spotlight) === null || _a === undefined ? undefined : _a.hideSpotlightButtons, videoTilesOptions: options === null || options === undefined ? undefined : options.videoTilesOptions, captionsOptions: options === null || options === undefined ? undefined : options.captionsBanner, localScreenShareView: (_b = options === null || options === undefined ? undefined : options.galleryOptions) === null || _b === undefined ? undefined : _b.localScreenShareView })));
40467
+ return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, remoteVideoTileMenuOptions: options === null || options === undefined ? undefined : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId, localVideoTileOptions: options === null || options === undefined ? undefined : options.localVideoTile, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, userSetGalleryLayout: galleryLayout, pinnedParticipants: pinnedParticipantsChecked, setPinnedParticipants: setPinnedParticipants, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_a = options === null || options === undefined ? undefined : options.spotlight) === null || _a === undefined ? undefined : _a.hideSpotlightButtons, videoTilesOptions: options === null || options === undefined ? undefined : options.videoTilesOptions, captionsOptions: options === null || options === undefined ? undefined : options.captionsBanner, localScreenShareView: (_b = options === null || options === undefined ? undefined : options.galleryOptions) === null || _b === undefined ? undefined : _b.localScreenShareView, compositeContainerAspectRatio: containerAspectRatio })));
40215
40468
  }
40216
40469
  };
40217
- return (React.createElement(React.Fragment, null,
40470
+ return (React.createElement("div", { ref: containerRef, style: { height: '100%', width: '100%' } },
40218
40471
  React.createElement(CallArrangement, { id: drawerMenuHostId, complianceBannerProps: Object.assign(Object.assign({}, complianceBannerProps), { strings }), errorBarProps: (options === null || options === undefined ? undefined : options.errorBar) !== false && errorBarProps, showErrorNotifications: (_a = options === null || options === undefined ? undefined : options.errorBar) !== null && _a !== undefined ? _a : true, mutedNotificationProps: mutedNotificationProps, callControlProps: {
40219
40472
  callInvitationURL: callInvitationURL,
40220
40473
  onFetchParticipantMenuItems: onFetchParticipantMenuItems,
@@ -40222,7 +40475,7 @@ const CallPage = (props) => {
40222
40475
  increaseFlyoutItemSize: mobileView
40223
40476
  }, onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (onRenderGalleryContentTrampoline()) : (React.createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps, { isMobile: mobileView })))) : (galleryContentWhenNotInCall), updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: onCloseChatPane, dataUiId: 'call-page', latestErrors: props.latestErrors, latestNotifications: latestNotifications, onDismissError: props.onDismissError, onDismissNotification: onDismissNotification, onUserSetOverflowGalleryPositionChange: onSetUserSetOverflowGalleryPosition, onUserSetGalleryLayoutChange: onUserSetGalleryLayoutChange, userSetGalleryLayout: galleryLayout, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_b = options === null || options === undefined ? undefined : options.spotlight) === null || _b === undefined ? undefined : _b.hideSpotlightButtons, pinnedParticipants: pinnedParticipantsChecked, setPinnedParticipants: setPinnedParticipants,
40224
40477
  /* @conditional-compile-remove(call-readiness) */
40225
- doNotShowCameraAccessNotifications: ((_d = (_c = props.options) === null || _c === undefined ? undefined : _c.deviceChecks) === null || _d === undefined ? undefined : _d.camera) === 'doNotPrompt', captionsOptions: options === null || options === undefined ? undefined : options.captionsBanner, dtmfDialerOptions: disableAutoShowDtmfDialer, notificationOptions: props.notificationOptions, isPstnCall: isPstnCall }),
40478
+ doNotShowCameraAccessNotifications: ((_d = (_c = props.options) === null || _c === undefined ? undefined : _c.deviceChecks) === null || _d === undefined ? undefined : _d.camera) === 'doNotPrompt', captionsOptions: options === null || options === undefined ? undefined : options.captionsBanner, dtmfDialerOptions: disableAutoShowDtmfDialer, notificationOptions: props.notificationOptions, isRTTSupportedCall: !isPstnCall && !isCTECall }),
40226
40479
  React.createElement(Prompt, Object.assign({ isOpen: isPromptOpen, onDismiss: () => setIsPromptOpen(false) }, promptProps))));
40227
40480
  };
40228
40481
  /**
@@ -42579,11 +42832,22 @@ const MainScreen = (props) => {
42579
42832
  const closeSidePane = () => {
42580
42833
  setSidePaneRenderer(undefined);
42581
42834
  };
42582
- adapter.on('callEnded', closeSidePane);
42835
+ /* @conditional-compile-remove(together-mode) */
42836
+ const resetUserGalleryLayout = () => {
42837
+ if (userSetGalleryLayout === 'togetherMode') {
42838
+ setUserSetGalleryLayout('floatingLocalVideo');
42839
+ }
42840
+ };
42841
+ const handleCallEnded = () => {
42842
+ closeSidePane();
42843
+ /* @conditional-compile-remove(together-mode) */
42844
+ resetUserGalleryLayout();
42845
+ };
42846
+ adapter.on('callEnded', handleCallEnded);
42583
42847
  return () => {
42584
- adapter.off('callEnded', closeSidePane);
42848
+ adapter.off('callEnded', handleCallEnded);
42585
42849
  };
42586
- }, [adapter]);
42850
+ }, [adapter, /* @conditional-compile-remove(together-mode) */ userSetGalleryLayout]);
42587
42851
  const compositeAudioContext = useAudio();
42588
42852
  const capabilitiesChangedInfoAndRole = useSelector$1(capabilitiesChangedInfoAndRoleSelector);
42589
42853
  const capabilitiesChangedNotificationBarProps = useTrackedCapabilityChangedNotifications(capabilitiesChangedInfoAndRole);
@@ -44113,7 +44377,12 @@ class AzureCommunicationCallAdapter {
44113
44377
  (_g = this.call) === null || _g === undefined ? undefined : _g.feature(communicationCalling.Features.Capabilities).on('capabilitiesChanged', this.capabilitiesChanged.bind(this));
44114
44378
  (_h = this.call) === null || _h === undefined ? undefined : _h.feature(communicationCalling.Features.Spotlight).on('spotlightChanged', this.spotlightChanged.bind(this));
44115
44379
  /* @conditional-compile-remove(rtt) */
44116
- (_j = this.call) === null || _j === undefined ? undefined : _j.feature(communicationCalling.Features.RealTimeText).on('realTimeTextReceived', this.realTimeTextReceived.bind(this));
44380
+ try {
44381
+ (_j = this.call) === null || _j === void 0 ? void 0 : _j.feature(communicationCalling.Features.RealTimeText).on('realTimeTextReceived', this.realTimeTextReceived.bind(this));
44382
+ }
44383
+ catch (e) {
44384
+ console.log('RealTimeText feature is not supported');
44385
+ }
44117
44386
  const breakoutRoomsFeature = (_k = this.call) === null || _k === undefined ? undefined : _k.feature(communicationCalling.Features.BreakoutRooms);
44118
44387
  if (breakoutRoomsFeature) {
44119
44388
  breakoutRoomsFeature.on('breakoutRoomsUpdated', this.breakoutRoomsUpdated.bind(this));
@@ -44132,7 +44401,12 @@ class AzureCommunicationCallAdapter {
44132
44401
  (_e = this.call) === null || _e === undefined ? undefined : _e.off('roleChanged', this.roleChanged.bind(this));
44133
44402
  this.unsubscribeFromCaptionEvents();
44134
44403
  /* @conditional-compile-remove(rtt) */
44135
- (_f = this.call) === null || _f === undefined ? undefined : _f.feature(communicationCalling.Features.RealTimeText).off('realTimeTextReceived', this.realTimeTextReceived.bind(this));
44404
+ try {
44405
+ (_f = this.call) === null || _f === void 0 ? void 0 : _f.feature(communicationCalling.Features.RealTimeText).off('realTimeTextReceived', this.realTimeTextReceived.bind(this));
44406
+ }
44407
+ catch (e) {
44408
+ console.log('RealTimeText feature is not supported');
44409
+ }
44136
44410
  if (this.callingSoundSubscriber) {
44137
44411
  this.callingSoundSubscriber.unsubscribeAll();
44138
44412
  }
@@ -45630,9 +45904,29 @@ class CallWithChatContext {
45630
45904
  * Created for easy use with the {@link CallWithChatComposite}.
45631
45905
  */
45632
45906
  class AzureCommunicationCallWithChatAdapter {
45907
+ // This function is used to store a listener to the internal map of chat event listeners and should be
45908
+ // used when a listener subscribes to a chat event
45909
+ storeChatEventListener(event, listener) {
45910
+ var _a;
45911
+ if (!this.chatEventListeners.has(event)) {
45912
+ this.chatEventListeners.set(event, new Set());
45913
+ }
45914
+ (_a = this.chatEventListeners.get(event)) === null || _a === undefined ? undefined : _a.add(listener);
45915
+ }
45916
+ // This function is used to remove a listener from the internal map of chat event listeners and should
45917
+ // be used when a listener unsubscribes from a chat event
45918
+ removeChatEventListener(event, listener) {
45919
+ var _a;
45920
+ if (this.chatEventListeners.has(event)) {
45921
+ (_a = this.chatEventListeners.get(event)) === null || _a === undefined ? undefined : _a.delete(listener);
45922
+ }
45923
+ }
45633
45924
  constructor(callAdapter, chatAdapter) {
45634
45925
  this.emitter = new events.EventEmitter();
45635
45926
  this.isAdapterDisposed = false;
45927
+ // This map is used to store the listeners subscribed to chat events so that we can re-subscribe them
45928
+ // to the new chat adapter when the thread id changes
45929
+ this.chatEventListeners = new Map();
45636
45930
  this.bindPublicMethods();
45637
45931
  this.callAdapter = callAdapter;
45638
45932
  this.context = new CallWithChatContext(callWithChatAdapterStateFromBackingStates(callAdapter));
@@ -45757,11 +46051,23 @@ class AzureCommunicationCallWithChatAdapter {
45757
46051
  updateChatAdapter(chatAdapter) {
45758
46052
  var _a;
45759
46053
  (_a = this.chatAdapter) === null || _a === undefined ? undefined : _a.offStateChange(this.onChatStateChange);
46054
+ this.updateChatEventListeners(chatAdapter);
45760
46055
  this.chatAdapter = chatAdapter;
45761
46056
  this.chatAdapter.onStateChange(this.onChatStateChange);
45762
46057
  this.context.updateClientStateWithChatState(chatAdapter.getState());
45763
46058
  this.emitter.emit('chatInitialized', this.chatAdapter);
45764
46059
  }
46060
+ updateChatEventListeners(chatAdapter) {
46061
+ var _a;
46062
+ for (const [eventName, listeners] of this.chatEventListeners) {
46063
+ for (const listener of listeners) {
46064
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
46065
+ (_a = this.chatAdapter) === null || _a === undefined ? undefined : _a.off(eventName, listener);
46066
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
46067
+ chatAdapter.on(eventName, listener);
46068
+ }
46069
+ }
46070
+ }
45765
46071
  bindPublicMethods() {
45766
46072
  this.joinCall.bind(this);
45767
46073
  this.leaveCall.bind(this);
@@ -45878,6 +46184,8 @@ class AzureCommunicationCallWithChatAdapter {
45878
46184
  }
45879
46185
  this.callAdapter.offStateChange(this.onCallStateChange);
45880
46186
  this.callAdapter.dispose();
46187
+ // Clear chat event listeners
46188
+ this.chatEventListeners.clear();
45881
46189
  }
45882
46190
  /** Remove a participant from the Call only. */
45883
46191
  removeParticipant(userId) {
@@ -46338,36 +46646,43 @@ class AzureCommunicationCallWithChatAdapter {
46338
46646
  this.callAdapter.on('isSpokenLanguageChanged', listener);
46339
46647
  break;
46340
46648
  case 'messageReceived':
46649
+ this.storeChatEventListener('messageReceived', listener);
46341
46650
  this.executeWithResolvedChatAdapter((adapter) => {
46342
46651
  adapter.on('messageReceived', listener);
46343
46652
  });
46344
46653
  break;
46345
46654
  case 'messageEdited':
46655
+ this.storeChatEventListener('messageEdited', listener);
46346
46656
  this.executeWithResolvedChatAdapter((adapter) => {
46347
46657
  adapter.on('messageEdited', listener);
46348
46658
  });
46349
46659
  break;
46350
46660
  case 'messageDeleted':
46661
+ this.storeChatEventListener('messageDeleted', listener);
46351
46662
  this.executeWithResolvedChatAdapter((adapter) => {
46352
46663
  adapter.on('messageDeleted', listener);
46353
46664
  });
46354
46665
  break;
46355
46666
  case 'messageSent':
46667
+ this.storeChatEventListener('messageSent', listener);
46356
46668
  this.executeWithResolvedChatAdapter((adapter) => {
46357
46669
  adapter.on('messageSent', listener);
46358
46670
  });
46359
46671
  break;
46360
46672
  case 'messageRead':
46673
+ this.storeChatEventListener('messageRead', listener);
46361
46674
  this.executeWithResolvedChatAdapter((adapter) => {
46362
46675
  adapter.on('messageRead', listener);
46363
46676
  });
46364
46677
  break;
46365
46678
  case 'chatParticipantsAdded':
46679
+ this.storeChatEventListener('chatParticipantsAdded', listener);
46366
46680
  this.executeWithResolvedChatAdapter((adapter) => {
46367
46681
  adapter.on('participantsAdded', listener);
46368
46682
  });
46369
46683
  break;
46370
46684
  case 'chatParticipantsRemoved':
46685
+ this.storeChatEventListener('chatParticipantsRemoved', listener);
46371
46686
  this.executeWithResolvedChatAdapter((adapter) => {
46372
46687
  adapter.on('participantsRemoved', listener);
46373
46688
  });
@@ -46376,6 +46691,7 @@ class AzureCommunicationCallWithChatAdapter {
46376
46691
  this.callAdapter.on('error', listener);
46377
46692
  break;
46378
46693
  case 'chatError':
46694
+ this.storeChatEventListener('chatError', listener);
46379
46695
  this.executeWithResolvedChatAdapter((adapter) => {
46380
46696
  adapter.on('error', listener);
46381
46697
  });
@@ -46446,36 +46762,43 @@ class AzureCommunicationCallWithChatAdapter {
46446
46762
  this.callAdapter.off('isSpokenLanguageChanged', listener);
46447
46763
  break;
46448
46764
  case 'messageReceived':
46765
+ this.removeChatEventListener('messageReceived', listener);
46449
46766
  this.executeWithResolvedChatAdapter((adapter) => {
46450
46767
  adapter.off('messageReceived', listener);
46451
46768
  });
46452
46769
  break;
46453
46770
  case 'messageEdited':
46771
+ this.removeChatEventListener('messageEdited', listener);
46454
46772
  this.executeWithResolvedChatAdapter((adapter) => {
46455
46773
  adapter.off('messageEdited', listener);
46456
46774
  });
46457
46775
  break;
46458
46776
  case 'messageDeleted':
46777
+ this.removeChatEventListener('messageDeleted', listener);
46459
46778
  this.executeWithResolvedChatAdapter((adapter) => {
46460
46779
  adapter.off('messageDeleted', listener);
46461
46780
  });
46462
46781
  break;
46463
46782
  case 'messageSent':
46783
+ this.removeChatEventListener('messageSent', listener);
46464
46784
  this.executeWithResolvedChatAdapter((adapter) => {
46465
46785
  adapter.off('messageSent', listener);
46466
46786
  });
46467
46787
  break;
46468
46788
  case 'messageRead':
46789
+ this.removeChatEventListener('messageRead', listener);
46469
46790
  this.executeWithResolvedChatAdapter((adapter) => {
46470
46791
  adapter.off('messageRead', listener);
46471
46792
  });
46472
46793
  break;
46473
46794
  case 'chatParticipantsAdded':
46795
+ this.removeChatEventListener('chatParticipantsAdded', listener);
46474
46796
  this.executeWithResolvedChatAdapter((adapter) => {
46475
46797
  adapter.off('participantsAdded', listener);
46476
46798
  });
46477
46799
  break;
46478
46800
  case 'chatParticipantsRemoved':
46801
+ this.removeChatEventListener('chatParticipantsRemoved', listener);
46479
46802
  this.executeWithResolvedChatAdapter((adapter) => {
46480
46803
  adapter.off('participantsRemoved', listener);
46481
46804
  });
@@ -46484,6 +46807,7 @@ class AzureCommunicationCallWithChatAdapter {
46484
46807
  this.callAdapter.off('error', listener);
46485
46808
  break;
46486
46809
  case 'chatError':
46810
+ this.removeChatEventListener('chatError', listener);
46487
46811
  this.executeWithResolvedChatAdapter((adapter) => {
46488
46812
  adapter.off('error', listener);
46489
46813
  });
@@ -46639,17 +46963,29 @@ const createAzureCommunicationCallWithChatAdapter = (_a) => __awaiter$4(undefine
46639
46963
  telemetryImplementationHint: 'CallWithChat'
46640
46964
  });
46641
46965
  const chatThreadAdapter = _createChatThreadAdapterInner(locator, callAdapter);
46966
+ /* @conditional-compile-remove(on-fetch-profile) */
46967
+ const chatAdapterOptions = {
46968
+ onFetchProfile: callAdapterOptions === null || callAdapterOptions === undefined ? undefined : callAdapterOptions.onFetchProfile
46969
+ };
46642
46970
  if (chatThreadAdapter.isCallInfoRequired()) {
46643
46971
  const callWithChatAdapter = new AzureCommunicationCallWithChatAdapter(yield callAdapter);
46644
- const chatAdapterPromise = _createLazyAzureCommunicationChatAdapterInner(endpoint, userId, displayName, credential, chatThreadAdapter.getChatThreadPromise(), 'CallWithChat');
46972
+ const chatAdapterPromise = _createLazyAzureCommunicationChatAdapterInner(endpoint, userId, displayName, credential, chatThreadAdapter.getChatThreadPromise(), 'CallWithChat',
46973
+ /* @conditional-compile-remove(on-fetch-profile) */
46974
+ chatAdapterOptions);
46645
46975
  callWithChatAdapter.setChatAdapterPromise(chatAdapterPromise);
46646
- callWithChatAdapter.setCreateChatAdapterCallback((threadId) => _createAzureCommunicationChatAdapterInner(endpoint, userId, displayName, credential, threadId, 'CallWithChat'));
46976
+ callWithChatAdapter.setCreateChatAdapterCallback((threadId) => _createAzureCommunicationChatAdapterInner(endpoint, userId, displayName, credential, threadId, 'CallWithChat',
46977
+ /* @conditional-compile-remove(on-fetch-profile) */
46978
+ chatAdapterOptions));
46647
46979
  return callWithChatAdapter;
46648
46980
  }
46649
46981
  else {
46650
- const chatAdapter = _createAzureCommunicationChatAdapterInner(endpoint, userId, displayName, credential, chatThreadAdapter.getChatThread(), 'CallWithChat');
46982
+ const chatAdapter = _createAzureCommunicationChatAdapterInner(endpoint, userId, displayName, credential, chatThreadAdapter.getChatThread(), 'CallWithChat',
46983
+ /* @conditional-compile-remove(on-fetch-profile) */
46984
+ chatAdapterOptions);
46651
46985
  const callWithChatAdapter = new AzureCommunicationCallWithChatAdapter(yield callAdapter, yield chatAdapter);
46652
- callWithChatAdapter.setCreateChatAdapterCallback((threadId) => _createAzureCommunicationChatAdapterInner(endpoint, userId, displayName, credential, threadId, 'CallWithChat'));
46986
+ callWithChatAdapter.setCreateChatAdapterCallback((threadId) => _createAzureCommunicationChatAdapterInner(endpoint, userId, displayName, credential, threadId, 'CallWithChat',
46987
+ /* @conditional-compile-remove(on-fetch-profile) */
46988
+ chatAdapterOptions));
46653
46989
  return callWithChatAdapter;
46654
46990
  }
46655
46991
  });
@@ -47488,4 +47824,4 @@ exports.useTeamsCall = useTeamsCall;
47488
47824
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
47489
47825
  exports.useTeamsCallAgent = useTeamsCallAgent;
47490
47826
  exports.useTheme = useTheme;
47491
- //# sourceMappingURL=index-Bhb6v-9U.js.map
47827
+ //# sourceMappingURL=index-Y6qfhE4K.js.map