@100mslive/roomkit-react 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/dist/AudioLevel/AudioLevel.d.ts +5 -8
  2. package/dist/AudioLevel/index.d.ts +2 -1
  3. package/dist/AudioLevel/useBorderAudioLevel.d.ts +8 -0
  4. package/dist/{HLSView-3S74KF3A.js → HLSView-DDGPZHA2.js} +5 -4
  5. package/dist/{HLSView-3S74KF3A.js.map → HLSView-DDGPZHA2.js.map} +2 -2
  6. package/dist/Prebuilt/App.d.ts +1 -0
  7. package/dist/Prebuilt/AppContext.d.ts +1 -0
  8. package/dist/Prebuilt/components/Chip.d.ts +12 -0
  9. package/dist/Prebuilt/components/Footer/PaginatedParticipants.d.ts +5 -0
  10. package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +10 -3
  11. package/dist/Prebuilt/components/Notifications/HeadlessEndRoomListener.d.ts +2 -0
  12. package/dist/Prebuilt/components/PrebuiltDialogPortal.d.ts +4 -0
  13. package/dist/Prebuilt/components/PrebuiltTileElements.d.ts +2198 -0
  14. package/dist/{VirtualBackground-3TI5NA4V.js → VirtualBackground-UVZJVOA2.js} +3 -3
  15. package/dist/{chunk-5DQ3WTED.js → chunk-6SQTFOK6.js} +2 -2
  16. package/dist/{chunk-5DQ3WTED.js.map → chunk-6SQTFOK6.js.map} +1 -1
  17. package/dist/{chunk-36X4ZCLC.js → chunk-HUMNPIYI.js} +2 -2
  18. package/dist/{chunk-Z7P5WITU.js → chunk-PRM33R4R.js} +591 -1186
  19. package/dist/chunk-PRM33R4R.js.map +7 -0
  20. package/dist/{conference-JNABIZBG.js → conference-N7S47TDK.js} +1505 -717
  21. package/dist/conference-N7S47TDK.js.map +7 -0
  22. package/dist/index.cjs.js +3083 -2825
  23. package/dist/index.cjs.js.map +4 -4
  24. package/dist/index.js +4 -2
  25. package/dist/meta.cjs.json +1107 -740
  26. package/dist/meta.esbuild.json +1160 -791
  27. package/package.json +6 -6
  28. package/src/AudioLevel/AudioLevel.tsx +79 -30
  29. package/src/AudioLevel/audio-level.png +0 -0
  30. package/src/AudioLevel/index.ts +2 -1
  31. package/src/AudioLevel/useBorderAudioLevel.tsx +34 -0
  32. package/src/Prebuilt/App.tsx +6 -0
  33. package/src/Prebuilt/AppContext.tsx +2 -0
  34. package/src/Prebuilt/common/constants.js +1 -1
  35. package/src/Prebuilt/common/utils.js +0 -7
  36. package/src/Prebuilt/components/AppData/AppData.jsx +1 -1
  37. package/src/Prebuilt/components/AppData/useUISettings.js +1 -1
  38. package/src/Prebuilt/components/{Chip.jsx → Chip.tsx} +18 -3
  39. package/src/Prebuilt/components/Footer/PaginatedParticipants.tsx +94 -0
  40. package/src/Prebuilt/components/Footer/ParticipantList.jsx +67 -26
  41. package/src/Prebuilt/components/Footer/RoleAccordion.tsx +91 -49
  42. package/src/Prebuilt/components/Footer/RoleOptions.tsx +1 -1
  43. package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +7 -4
  44. package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +3 -2
  45. package/src/Prebuilt/components/MoreSettings/EmbedUrl.jsx +3 -2
  46. package/src/Prebuilt/components/MwebLandscapePrompt.jsx +58 -0
  47. package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -2
  48. package/src/Prebuilt/components/Notifications/HeadlessEndRoomListener.tsx +23 -0
  49. package/src/Prebuilt/components/Notifications/Notifications.jsx +1 -1
  50. package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +3 -2
  51. package/src/Prebuilt/components/PrebuiltDialogPortal.tsx +6 -0
  52. package/src/Prebuilt/components/PrebuiltTileElements.tsx +5 -0
  53. package/src/Prebuilt/components/Preview/PreviewJoin.tsx +11 -7
  54. package/src/Prebuilt/components/RoleChangeModal.jsx +3 -2
  55. package/src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx +3 -2
  56. package/src/Prebuilt/components/Settings/SettingsModal.jsx +3 -2
  57. package/src/Prebuilt/components/Settings/StartRecording.jsx +3 -2
  58. package/src/Prebuilt/components/SidePaneTabs.tsx +31 -5
  59. package/src/Prebuilt/components/StatsForNerds.jsx +3 -2
  60. package/src/Prebuilt/components/VideoTile.jsx +21 -83
  61. package/src/Prebuilt/components/conference.jsx +4 -3
  62. package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +1 -1
  63. package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +3 -2
  64. package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +4 -29
  65. package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +3 -2
  66. package/src/Prebuilt/layouts/HLSView.jsx +1 -0
  67. package/src/Prebuilt/layouts/SidePane.tsx +1 -0
  68. package/src/Prebuilt/primitives/DialogContent.jsx +5 -4
  69. package/dist/chunk-Z7P5WITU.js.map +0 -7
  70. package/dist/conference-JNABIZBG.js.map +0 -7
  71. /package/dist/{VirtualBackground-3TI5NA4V.js.map → VirtualBackground-UVZJVOA2.js.map} +0 -0
  72. /package/dist/{chunk-36X4ZCLC.js.map → chunk-HUMNPIYI.js.map} +0 -0
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  ActionTile
3
- } from "./chunk-36X4ZCLC.js";
3
+ } from "./chunk-HUMNPIYI.js";
4
4
  import {
5
5
  APP_DATA,
6
6
  Accordion,
7
+ AudioLevel,
7
8
  AudioVideoToggle,
9
+ Avatar,
8
10
  Button,
9
11
  CHAT_SELECTOR,
10
- ChangeNameModal,
11
12
  Checkbox,
12
13
  ConnectionIndicator,
13
14
  Dialog,
@@ -27,8 +28,12 @@ import {
27
28
  Label,
28
29
  PictureInPicture,
29
30
  Popover,
31
+ PrebuiltAttributeBox,
32
+ PrebuiltAudioIndicator,
33
+ PrebuiltDialogPortal,
30
34
  PreviewControls,
31
35
  PreviewTile,
36
+ REMOTE_STOP_SCREENSHARE_TYPE,
32
37
  ROLE_CHANGE_DECLINED,
33
38
  RTMP_RECORD_DEFAULT_RESOLUTION,
34
39
  RTMP_RECORD_RESOLUTION_MAX,
@@ -38,22 +43,22 @@ import {
38
43
  SIDE_PANE_OPTIONS,
39
44
  SettingsModal_default,
40
45
  Sheet,
46
+ Slider,
41
47
  StopRecordingInSheet,
48
+ StyledMenuTile,
42
49
  StyledPagination,
43
50
  StyledVideoTile,
44
51
  Switch,
45
52
  Tabs,
46
53
  ThemeTypes,
47
- TileMenu_default,
54
+ TileConnection_default,
48
55
  ToastManager,
49
56
  UI_SETTINGS,
50
57
  UserPreferencesKeys,
51
58
  Video,
52
59
  VideoTileStats,
53
- VideoTile_default,
54
60
  getFormattedCount,
55
61
  getMetadata,
56
- getVideoTileLabel,
57
62
  isAndroid,
58
63
  isChrome,
59
64
  isIOS,
@@ -61,7 +66,6 @@ import {
61
66
  isMacOS,
62
67
  isScreenshareSupported,
63
68
  useAuthToken,
64
- useDropdownList,
65
69
  useDropdownSelection,
66
70
  useFilteredRoles,
67
71
  useHMSPrebuiltContext,
@@ -83,7 +87,7 @@ import {
83
87
  useUrlToEmbed,
84
88
  useUserPreferences,
85
89
  useWaitingViewerRole
86
- } from "./chunk-Z7P5WITU.js";
90
+ } from "./chunk-PRM33R4R.js";
87
91
  import {
88
92
  Box,
89
93
  Flex,
@@ -102,24 +106,24 @@ import {
102
106
  slideLeftAndFade,
103
107
  styled,
104
108
  textEllipsis
105
- } from "./chunk-5DQ3WTED.js";
109
+ } from "./chunk-6SQTFOK6.js";
106
110
 
107
111
  // src/Prebuilt/components/conference.jsx
108
- import React63, { useEffect as useEffect25, useRef as useRef14, useState as useState35 } from "react";
112
+ import React69, { useEffect as useEffect28, useRef as useRef16, useState as useState39 } from "react";
109
113
  import { useNavigate, useParams } from "react-router-dom";
110
114
  import { usePrevious } from "react-use";
111
115
  import {
112
116
  HMSRoomState,
113
117
  selectAppData as selectAppData4,
114
- selectIsConnectedToRoom as selectIsConnectedToRoom7,
118
+ selectIsConnectedToRoom as selectIsConnectedToRoom8,
115
119
  selectRoomState,
116
- useHMSActions as useHMSActions22,
117
- useHMSStore as useHMSStore35
120
+ useHMSActions as useHMSActions24,
121
+ useHMSStore as useHMSStore41
118
122
  } from "@100mslive/react-sdk";
119
123
 
120
124
  // src/Prebuilt/components/Footer/Footer.tsx
121
- import React36, { Suspense, useEffect as useEffect6 } from "react";
122
- import { useMedia as useMedia5 } from "react-use";
125
+ import React38, { Suspense, useEffect as useEffect8 } from "react";
126
+ import { useMedia as useMedia6 } from "react-use";
123
127
  import { Chat_ChatState } from "@100mslive/types-prebuilt/elements/chat";
124
128
  import { useAVToggle as useAVToggle2 } from "@100mslive/react-sdk";
125
129
 
@@ -159,6 +163,26 @@ var EmojiContainer = styled("span", {
159
163
  }
160
164
  });
161
165
 
166
+ // src/Prebuilt/components/hooks/useDropdownList.jsx
167
+ import { useEffect } from "react";
168
+ var useDropdownList = ({ name, open }) => {
169
+ const [dropdownList = [], setDropdownList] = useSetAppDataByKey(APP_DATA.dropdownList);
170
+ useEffect(() => {
171
+ if (open) {
172
+ if (!dropdownList.includes(name)) {
173
+ setDropdownList([...dropdownList, name]);
174
+ }
175
+ } else {
176
+ const index = dropdownList.indexOf(name);
177
+ if (index >= 0) {
178
+ const newDropdownList = [...dropdownList];
179
+ newDropdownList.splice(index, 1);
180
+ setDropdownList(newDropdownList);
181
+ }
182
+ }
183
+ }, [open, name]);
184
+ };
185
+
162
186
  // src/Prebuilt/components/EmojiReaction.jsx
163
187
  init({ data });
164
188
  var EmojiReaction = () => {
@@ -431,7 +455,7 @@ var DesktopLeaveRoom = ({
431
455
  "data-testid": "leave_room_btn"
432
456
  },
433
457
  /* @__PURE__ */ React6.createElement(Tooltip, { title: "Leave Room" }, /* @__PURE__ */ React6.createElement(Box, null, /* @__PURE__ */ React6.createElement(ExitIcon, { style: { transform: "rotate(180deg)" } })))
434
- ), /* @__PURE__ */ React6.createElement(Dialog.Root, { open: showEndStreamAlert, modal: false }, /* @__PURE__ */ React6.createElement(Dialog.Portal, null, /* @__PURE__ */ React6.createElement(Dialog.Overlay, null), /* @__PURE__ */ React6.createElement(Dialog.Content, { css: { w: "min(420px, 90%)", p: "$8", bg: "$surface_dim" } }, /* @__PURE__ */ React6.createElement(
458
+ ), /* @__PURE__ */ React6.createElement(Dialog.Root, { open: showEndStreamAlert, modal: false }, /* @__PURE__ */ React6.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React6.createElement(Dialog.Overlay, null), /* @__PURE__ */ React6.createElement(Dialog.Content, { css: { w: "min(420px, 90%)", p: "$8", bg: "$surface_dim" } }, /* @__PURE__ */ React6.createElement(
435
459
  EndSessionContent,
436
460
  {
437
461
  setShowEndStreamAlert,
@@ -439,7 +463,7 @@ var DesktopLeaveRoom = ({
439
463
  isStreamingOn,
440
464
  isModal: true
441
465
  }
442
- )))), /* @__PURE__ */ React6.createElement(Dialog.Root, { open: showLeaveRoomAlert, modal: false }, /* @__PURE__ */ React6.createElement(Dialog.Portal, null, /* @__PURE__ */ React6.createElement(Dialog.Overlay, null), /* @__PURE__ */ React6.createElement(Dialog.Content, { css: { w: "min(420px, 90%)", p: "$8", bg: "$surface_dim" } }, /* @__PURE__ */ React6.createElement(LeaveSessionContent, { setShowLeaveRoomAlert, leaveRoom, isModal: true })))));
466
+ )))), /* @__PURE__ */ React6.createElement(Dialog.Root, { open: showLeaveRoomAlert, modal: false }, /* @__PURE__ */ React6.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React6.createElement(Dialog.Overlay, null), /* @__PURE__ */ React6.createElement(Dialog.Content, { css: { w: "min(420px, 90%)", p: "$8", bg: "$surface_dim" } }, /* @__PURE__ */ React6.createElement(LeaveSessionContent, { setShowLeaveRoomAlert, leaveRoom, isModal: true })))));
443
467
  };
444
468
 
445
469
  // src/Prebuilt/components/Leave/MwebLeaveRoom.tsx
@@ -553,8 +577,8 @@ var LeaveRoom = ({ screenType }) => {
553
577
  };
554
578
 
555
579
  // src/Prebuilt/components/MoreSettings/MoreSettings.tsx
556
- import React23 from "react";
557
- import { useMedia as useMedia3 } from "react-use";
580
+ import React25 from "react";
581
+ import { useMedia as useMedia4 } from "react-use";
558
582
 
559
583
  // src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx
560
584
  import React21, { Fragment as Fragment4, useState as useState13 } from "react";
@@ -566,7 +590,7 @@ import { BrbIcon, CheckIcon as CheckIcon3, DragHandleIcon, InfoIcon as InfoIcon2
566
590
  import React10 from "react";
567
591
 
568
592
  // src/Prebuilt/components/PIP/PIPComponent.jsx
569
- import React9, { useCallback, useEffect, useState as useState4 } from "react";
593
+ import React9, { useCallback, useEffect as useEffect2, useState as useState4 } from "react";
570
594
  import { selectPeers, selectTracksMap, useHMSActions as useHMSActions2, useHMSStore as useHMSStore5, useHMSVanillaStore } from "@100mslive/react-sdk";
571
595
  import { PipIcon } from "@100mslive/react-icons";
572
596
 
@@ -646,7 +670,7 @@ var ActivatedPIP = () => {
646
670
  const tracksMap = useHMSStore5(selectTracksMap);
647
671
  const storePeers = useHMSStore5(selectPeers);
648
672
  const pinnedTrack = usePinnedTrack();
649
- useEffect(() => {
673
+ useEffect2(() => {
650
674
  function updatePIP() {
651
675
  if (!PictureInPicture.isOn()) {
652
676
  return;
@@ -707,7 +731,7 @@ var RoleChangeModal = ({ peerId, onOpenChange }) => {
707
731
  return null;
708
732
  }
709
733
  const peerNameMaxWidth = 200;
710
- return /* @__PURE__ */ React11.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React11.createElement(Dialog.Portal, null, /* @__PURE__ */ React11.createElement(Dialog.Overlay, null), /* @__PURE__ */ React11.createElement(Dialog.Content, { css: { width: "min(400px,80%)", p: "$10" } }, /* @__PURE__ */ React11.createElement(Dialog.Title, { css: { p: 0 }, asChild: true }, /* @__PURE__ */ React11.createElement(Text, { as: "h6", variant: "h6" }, "Change Role")), /* @__PURE__ */ React11.createElement(Dialog.Description, { asChild: true }, /* @__PURE__ */ React11.createElement(
734
+ return /* @__PURE__ */ React11.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React11.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React11.createElement(Dialog.Overlay, null), /* @__PURE__ */ React11.createElement(Dialog.Content, { css: { width: "min(400px,80%)", p: "$10" } }, /* @__PURE__ */ React11.createElement(Dialog.Title, { css: { p: 0 }, asChild: true }, /* @__PURE__ */ React11.createElement(Text, { as: "h6", variant: "h6" }, "Change Role")), /* @__PURE__ */ React11.createElement(Dialog.Description, { asChild: true }, /* @__PURE__ */ React11.createElement(
711
735
  Text,
712
736
  {
713
737
  variant: "body2",
@@ -873,7 +897,7 @@ var ResolutionInput = ({ onResolutionChange, disabled, tooltipText, css, testId
873
897
  };
874
898
 
875
899
  // src/Prebuilt/components/Streaming/RTMPStreaming.jsx
876
- import React14, { useEffect as useEffect2, useRef as useRef2, useState as useState7 } from "react";
900
+ import React14, { useEffect as useEffect3, useRef as useRef2, useState as useState7 } from "react";
877
901
  import { useHMSActions as useHMSActions4, useRecordingStreaming as useRecordingStreaming3 } from "@100mslive/react-sdk";
878
902
  import { AddCircleIcon, EndStreamIcon, GoLiveIcon, PencilIcon, SettingsIcon, TrashIcon } from "@100mslive/react-icons";
879
903
 
@@ -1086,7 +1110,7 @@ var EndRTMP = () => {
1086
1110
  const [inProgress, setInProgress] = useState7(false);
1087
1111
  const [error, setError] = useState7("");
1088
1112
  const { isRTMPRunning } = useRecordingStreaming3();
1089
- useEffect2(() => {
1113
+ useEffect3(() => {
1090
1114
  if (inProgress && !isRTMPRunning) {
1091
1115
  setInProgress(false);
1092
1116
  }
@@ -1240,7 +1264,7 @@ var StartRecording = ({ open, onOpenChange }) => {
1240
1264
  return null;
1241
1265
  }
1242
1266
  if (isBrowserRecordingOn) {
1243
- return /* @__PURE__ */ React15.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ React15.createElement(Dialog.Portal, null, /* @__PURE__ */ React15.createElement(
1267
+ return /* @__PURE__ */ React15.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ React15.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React15.createElement(
1244
1268
  Dialog.Content,
1245
1269
  {
1246
1270
  css: {
@@ -1319,7 +1343,7 @@ var StartRecording = ({ open, onOpenChange }) => {
1319
1343
  var StartRecording_default = StartRecording;
1320
1344
 
1321
1345
  // src/Prebuilt/components/StatsForNerds.jsx
1322
- import React16, { useEffect as useEffect3, useMemo, useRef as useRef3, useState as useState9 } from "react";
1346
+ import React16, { useEffect as useEffect4, useMemo, useRef as useRef3, useState as useState9 } from "react";
1323
1347
  import {
1324
1348
  selectHMSStats,
1325
1349
  selectLocalPeerID as selectLocalPeerID2,
@@ -1340,12 +1364,12 @@ var StatsForNerds = ({ onOpenChange }) => {
1340
1364
  const [open, setOpen] = useState9(false);
1341
1365
  const ref = useRef3();
1342
1366
  const selectionBg = useDropdownSelection();
1343
- useEffect3(() => {
1367
+ useEffect4(() => {
1344
1368
  if (selectedStat.id !== "local-peer" && !tracksWithLabels.find((track) => track.id === selectedStat.id)) {
1345
1369
  setSelectedStat("local-peer");
1346
1370
  }
1347
1371
  }, [tracksWithLabels, selectedStat]);
1348
- return /* @__PURE__ */ React16.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React16.createElement(Dialog.Portal, null, /* @__PURE__ */ React16.createElement(Dialog.Overlay, null), /* @__PURE__ */ React16.createElement(
1372
+ return /* @__PURE__ */ React16.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React16.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React16.createElement(Dialog.Overlay, null), /* @__PURE__ */ React16.createElement(
1349
1373
  Dialog.Content,
1350
1374
  {
1351
1375
  css: {
@@ -1604,7 +1628,7 @@ import React18 from "react";
1604
1628
  import { ExpandIcon } from "@100mslive/react-icons";
1605
1629
 
1606
1630
  // src/Prebuilt/components/hooks/useFullscreen.js
1607
- import { useCallback as useCallback4, useEffect as useEffect4, useState as useState11 } from "react";
1631
+ import { useCallback as useCallback4, useEffect as useEffect5, useState as useState11 } from "react";
1608
1632
  import screenfull from "screenfull";
1609
1633
  var useFullscreen = () => {
1610
1634
  const [isFullScreenEnabled, setIsFullScreenEnabled] = useState11(screenfull.isFullscreen);
@@ -1623,7 +1647,7 @@ var useFullscreen = () => {
1623
1647
  ToastManager.addToast({ title: err.message });
1624
1648
  }
1625
1649
  }), [isFullScreenEnabled]);
1626
- useEffect4(() => {
1650
+ useEffect5(() => {
1627
1651
  const onChange = () => {
1628
1652
  setIsFullScreenEnabled(screenfull.isFullscreen);
1629
1653
  };
@@ -1857,20 +1881,20 @@ var DesktopOptions = ({
1857
1881
  };
1858
1882
 
1859
1883
  // src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx
1860
- import React22, { useRef as useRef5, useState as useState14 } from "react";
1884
+ import React24, { useRef as useRef5, useState as useState15 } from "react";
1861
1885
  import { useClickAway } from "react-use";
1862
1886
  import {
1863
1887
  selectIsConnectedToRoom as selectIsConnectedToRoom5,
1864
1888
  selectPeerCount,
1865
1889
  selectPermissions as selectPermissions6,
1866
1890
  useAVToggle,
1867
- useHMSActions as useHMSActions9,
1868
- useHMSStore as useHMSStore11,
1891
+ useHMSActions as useHMSActions10,
1892
+ useHMSStore as useHMSStore12,
1869
1893
  useRecordingStreaming as useRecordingStreaming5
1870
1894
  } from "@100mslive/react-sdk";
1871
1895
  import {
1872
1896
  BrbIcon as BrbIcon2,
1873
- CrossIcon as CrossIcon4,
1897
+ CrossIcon as CrossIcon5,
1874
1898
  DragHandleIcon as DragHandleIcon2,
1875
1899
  EmojiIcon as EmojiIcon2,
1876
1900
  HandIcon,
@@ -1879,6 +1903,161 @@ import {
1879
1903
  RecordIcon as RecordIcon2,
1880
1904
  SettingsIcon as SettingsIcon3
1881
1905
  } from "@100mslive/react-icons";
1906
+
1907
+ // src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx
1908
+ import React23, { useState as useState14 } from "react";
1909
+ import { useMedia as useMedia3 } from "react-use";
1910
+ import { selectLocalPeerName, useHMSActions as useHMSActions9, useHMSStore as useHMSStore11 } from "@100mslive/react-sdk";
1911
+
1912
+ // src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx
1913
+ import React22 from "react";
1914
+ import { ChevronLeftIcon as ChevronLeftIcon2, CrossIcon as CrossIcon4 } from "@100mslive/react-icons";
1915
+ var ChangeNameContent = ({
1916
+ changeName,
1917
+ setCurrentName,
1918
+ currentName,
1919
+ localPeerName,
1920
+ isMobile,
1921
+ onExit,
1922
+ onBackClick
1923
+ }) => {
1924
+ return /* @__PURE__ */ React22.createElement(
1925
+ "form",
1926
+ {
1927
+ onSubmit: (e) => __async(void 0, null, function* () {
1928
+ e.preventDefault();
1929
+ yield changeName();
1930
+ })
1931
+ },
1932
+ /* @__PURE__ */ React22.createElement(
1933
+ Text,
1934
+ {
1935
+ variant: isMobile ? "md" : "lg",
1936
+ css: {
1937
+ color: "$on_surface_high",
1938
+ fontWeight: "$semiBold",
1939
+ display: "flex",
1940
+ pb: "$4",
1941
+ "@md": { px: "$8", borderBottom: "1px solid $border_default" }
1942
+ }
1943
+ },
1944
+ isMobile ? /* @__PURE__ */ React22.createElement(ChevronLeftIcon2, { onClick: onBackClick, style: { marginRight: "0.5rem" } }) : null,
1945
+ "Change Name",
1946
+ /* @__PURE__ */ React22.createElement(
1947
+ Box,
1948
+ {
1949
+ css: { color: "inherit", ml: "auto", "&:hover": { color: "$on_surface_medium", cursor: "pointer" } },
1950
+ onClick: onExit
1951
+ },
1952
+ /* @__PURE__ */ React22.createElement(CrossIcon4, null)
1953
+ )
1954
+ ),
1955
+ /* @__PURE__ */ React22.createElement(Text, { variant: "sm", css: { color: "$on_surface_medium", pb: "$6", mb: "$8", "@md": { px: "$8", mt: "$4" } } }, "Your name will be visible to other participants in the session."),
1956
+ /* @__PURE__ */ React22.createElement(Flex, { justify: "center", align: "center", css: { my: "$8", w: "100%", "@md": { px: "$8" } } }, /* @__PURE__ */ React22.createElement(
1957
+ Input,
1958
+ {
1959
+ css: { width: "100%", bg: "$surface_default" },
1960
+ value: currentName,
1961
+ type: isMobile ? "search" : "text",
1962
+ onChange: (e) => {
1963
+ setCurrentName(e.target.value);
1964
+ },
1965
+ autoComplete: "name",
1966
+ required: true,
1967
+ "data-testid": "change_name_field",
1968
+ onKeyDown: (e) => __async(void 0, null, function* () {
1969
+ if (e.key === "Enter" && currentName.trim().length > 0 && currentName !== localPeerName) {
1970
+ e.preventDefault();
1971
+ if (isMobile) {
1972
+ return;
1973
+ }
1974
+ changeName();
1975
+ }
1976
+ })
1977
+ }
1978
+ )),
1979
+ /* @__PURE__ */ React22.createElement(
1980
+ Flex,
1981
+ {
1982
+ justify: "between",
1983
+ align: "center",
1984
+ css: {
1985
+ width: "100%",
1986
+ gap: "$md",
1987
+ mt: "$10",
1988
+ "@md": { px: "$4" }
1989
+ }
1990
+ },
1991
+ isMobile ? null : /* @__PURE__ */ React22.createElement(
1992
+ Button,
1993
+ {
1994
+ variant: "standard",
1995
+ css: { w: "100%" },
1996
+ outlined: true,
1997
+ type: "submit",
1998
+ disabled: !localPeerName,
1999
+ onClick: onExit
2000
+ },
2001
+ "Cancel"
2002
+ ),
2003
+ /* @__PURE__ */ React22.createElement(
2004
+ Button,
2005
+ {
2006
+ variant: "primary",
2007
+ css: { width: "100%" },
2008
+ type: "submit",
2009
+ disabled: !currentName.trim() || currentName.trim() === localPeerName,
2010
+ "data-testid": "popup_change_btn"
2011
+ },
2012
+ "Change"
2013
+ )
2014
+ )
2015
+ );
2016
+ };
2017
+
2018
+ // src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx
2019
+ var ChangeNameModal = ({ onOpenChange, openParentSheet = null }) => {
2020
+ const [previewPreference, setPreviewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW);
2021
+ const hmsActions = useHMSActions9();
2022
+ const localPeerName = useHMSStore11(selectLocalPeerName);
2023
+ const [currentName, setCurrentName] = useState14(localPeerName);
2024
+ const isMobile = useMedia3(config.media.md);
2025
+ const changeName = () => __async(void 0, null, function* () {
2026
+ const name = currentName.trim();
2027
+ if (!name || name === localPeerName) {
2028
+ return;
2029
+ }
2030
+ try {
2031
+ yield hmsActions.changeName(name);
2032
+ setPreviewPreference(__spreadProps(__spreadValues({}, previewPreference || {}), {
2033
+ name
2034
+ }));
2035
+ } catch (error) {
2036
+ console.error("failed to update name", error);
2037
+ ToastManager.addToast({ title: error.message });
2038
+ } finally {
2039
+ onOpenChange(false);
2040
+ }
2041
+ });
2042
+ const props = {
2043
+ changeName,
2044
+ setCurrentName,
2045
+ currentName,
2046
+ localPeerName,
2047
+ isMobile,
2048
+ onExit: () => onOpenChange(false),
2049
+ onBackClick: () => {
2050
+ onOpenChange(false);
2051
+ openParentSheet();
2052
+ }
2053
+ };
2054
+ if (isMobile) {
2055
+ return /* @__PURE__ */ React23.createElement(Sheet.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React23.createElement(Sheet.Content, { css: { bg: "$surface_dim", p: "$8 0" } }, /* @__PURE__ */ React23.createElement(ChangeNameContent, __spreadValues({}, props))));
2056
+ }
2057
+ return /* @__PURE__ */ React23.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React23.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React23.createElement(Dialog.Overlay, null), /* @__PURE__ */ React23.createElement(Dialog.Content, { css: { bg: "$surface_dim", width: "min(400px,80%)", p: "$10" } }, /* @__PURE__ */ React23.createElement(ChangeNameContent, __spreadValues({}, props)))));
2058
+ };
2059
+
2060
+ // src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx
1882
2061
  var MODALS2 = {
1883
2062
  CHANGE_NAME: "changeName",
1884
2063
  SELF_ROLE_CHANGE: "selfRoleChange",
@@ -1894,18 +2073,18 @@ var MwebOptions = ({
1894
2073
  elements,
1895
2074
  screenType
1896
2075
  }) => {
1897
- const hmsActions = useHMSActions9();
1898
- const permissions = useHMSStore11(selectPermissions6);
1899
- const isConnected = useHMSStore11(selectIsConnectedToRoom5);
2076
+ const hmsActions = useHMSActions10();
2077
+ const permissions = useHMSStore12(selectPermissions6);
2078
+ const isConnected = useHMSStore12(selectIsConnectedToRoom5);
1900
2079
  const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming5();
1901
- const [openModals, setOpenModals] = useState14(/* @__PURE__ */ new Set());
1902
- const [openOptionsSheet, setOpenOptionsSheet] = useState14(false);
1903
- const [openSettingsSheet, setOpenSettingsSheet] = useState14(false);
1904
- const [showEmojiCard, setShowEmojiCard] = useState14(false);
1905
- const [showRecordingOn, setShowRecordingOn] = useState14(false);
1906
- const [isRecordingLoading, setIsRecordingLoading] = useState14(false);
2080
+ const [openModals, setOpenModals] = useState15(/* @__PURE__ */ new Set());
2081
+ const [openOptionsSheet, setOpenOptionsSheet] = useState15(false);
2082
+ const [openSettingsSheet, setOpenSettingsSheet] = useState15(false);
2083
+ const [showEmojiCard, setShowEmojiCard] = useState15(false);
2084
+ const [showRecordingOn, setShowRecordingOn] = useState15(false);
2085
+ const [isRecordingLoading, setIsRecordingLoading] = useState15(false);
1907
2086
  const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
1908
- const peerCount = useHMSStore11(selectPeerCount);
2087
+ const peerCount = useHMSStore12(selectPeerCount);
1909
2088
  const emojiCardRef = useRef5(null);
1910
2089
  const { isBRBOn, toggleBRB, isHandRaised, toggleHandRaise } = useMyMetadata();
1911
2090
  const { toggleAudio, toggleVideo } = useAVToggle();
@@ -1923,7 +2102,7 @@ var MwebOptions = ({
1923
2102
  });
1924
2103
  };
1925
2104
  useClickAway(emojiCardRef, () => setShowEmojiCard(false));
1926
- return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Sheet.Root, { open: openOptionsSheet, onOpenChange: setOpenOptionsSheet }, /* @__PURE__ */ React22.createElement(Tooltip, { title: "More options" }, /* @__PURE__ */ React22.createElement(Sheet.Trigger, { asChild: true, "data-testid": "more_settings_btn" }, /* @__PURE__ */ React22.createElement(IconButton_default, null, /* @__PURE__ */ React22.createElement(DragHandleIcon2, null)))), /* @__PURE__ */ React22.createElement(Sheet.Content, { css: { bg: "$surface_dim", pb: "$14" } }, /* @__PURE__ */ React22.createElement(
2105
+ return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(Sheet.Root, { open: openOptionsSheet, onOpenChange: setOpenOptionsSheet }, /* @__PURE__ */ React24.createElement(Tooltip, { title: "More options" }, /* @__PURE__ */ React24.createElement(Sheet.Trigger, { asChild: true, "data-testid": "more_settings_btn" }, /* @__PURE__ */ React24.createElement(IconButton_default, null, /* @__PURE__ */ React24.createElement(DragHandleIcon2, null)))), /* @__PURE__ */ React24.createElement(Sheet.Content, { css: { bg: "$surface_dim", pb: "$14" } }, /* @__PURE__ */ React24.createElement(
1927
2106
  Sheet.Title,
1928
2107
  {
1929
2108
  css: {
@@ -1941,8 +2120,8 @@ var MwebOptions = ({
1941
2120
  }
1942
2121
  },
1943
2122
  "Options",
1944
- /* @__PURE__ */ React22.createElement(Sheet.Close, null, /* @__PURE__ */ React22.createElement(Box, { css: { color: "$on_surface_high" } }, /* @__PURE__ */ React22.createElement(CrossIcon4, null)))
1945
- ), /* @__PURE__ */ React22.createElement(
2123
+ /* @__PURE__ */ React24.createElement(Sheet.Close, null, /* @__PURE__ */ React24.createElement(Box, { css: { color: "$on_surface_high" } }, /* @__PURE__ */ React24.createElement(CrossIcon5, null)))
2124
+ ), /* @__PURE__ */ React24.createElement(
1946
2125
  Box,
1947
2126
  {
1948
2127
  css: {
@@ -1954,7 +2133,7 @@ var MwebOptions = ({
1954
2133
  px: "$9"
1955
2134
  }
1956
2135
  },
1957
- (elements == null ? void 0 : elements.participant_list) && /* @__PURE__ */ React22.createElement(
2136
+ (elements == null ? void 0 : elements.participant_list) && /* @__PURE__ */ React24.createElement(
1958
2137
  ActionTile.Root,
1959
2138
  {
1960
2139
  onClick: () => {
@@ -1962,11 +2141,11 @@ var MwebOptions = ({
1962
2141
  setOpenOptionsSheet(false);
1963
2142
  }
1964
2143
  },
1965
- /* @__PURE__ */ React22.createElement(ActionTile.Count, null, getFormattedCount(peerCount)),
1966
- /* @__PURE__ */ React22.createElement(PeopleIcon, null),
1967
- /* @__PURE__ */ React22.createElement(ActionTile.Title, null, "Participants")
2144
+ /* @__PURE__ */ React24.createElement(ActionTile.Count, null, getFormattedCount(peerCount)),
2145
+ /* @__PURE__ */ React24.createElement(PeopleIcon, null),
2146
+ /* @__PURE__ */ React24.createElement(ActionTile.Title, null, "Participants")
1968
2147
  ),
1969
- !noAVPermissions ? /* @__PURE__ */ React22.createElement(
2148
+ !noAVPermissions ? /* @__PURE__ */ React24.createElement(
1970
2149
  ActionTile.Root,
1971
2150
  {
1972
2151
  active: isHandRaised,
@@ -1975,10 +2154,10 @@ var MwebOptions = ({
1975
2154
  setOpenOptionsSheet(false);
1976
2155
  }
1977
2156
  },
1978
- isHandRaised ? /* @__PURE__ */ React22.createElement(HandRaiseSlashedIcon, null) : /* @__PURE__ */ React22.createElement(HandIcon, null),
1979
- /* @__PURE__ */ React22.createElement(ActionTile.Title, null, isHandRaised ? "Lower" : "Raise", " Hand")
2157
+ isHandRaised ? /* @__PURE__ */ React24.createElement(HandRaiseSlashedIcon, null) : /* @__PURE__ */ React24.createElement(HandIcon, null),
2158
+ /* @__PURE__ */ React24.createElement(ActionTile.Title, null, isHandRaised ? "Lower" : "Raise", " Hand")
1980
2159
  ) : null,
1981
- (elements == null ? void 0 : elements.emoji_reactions) && /* @__PURE__ */ React22.createElement(
2160
+ (elements == null ? void 0 : elements.emoji_reactions) && /* @__PURE__ */ React24.createElement(
1982
2161
  ActionTile.Root,
1983
2162
  {
1984
2163
  onClick: () => {
@@ -1986,10 +2165,10 @@ var MwebOptions = ({
1986
2165
  setOpenOptionsSheet(false);
1987
2166
  }
1988
2167
  },
1989
- /* @__PURE__ */ React22.createElement(EmojiIcon2, null),
1990
- /* @__PURE__ */ React22.createElement(ActionTile.Title, null, "Emoji Reactions")
2168
+ /* @__PURE__ */ React24.createElement(EmojiIcon2, null),
2169
+ /* @__PURE__ */ React24.createElement(ActionTile.Title, null, "Emoji Reactions")
1991
2170
  ),
1992
- (elements == null ? void 0 : elements.brb) && /* @__PURE__ */ React22.createElement(
2171
+ (elements == null ? void 0 : elements.brb) && /* @__PURE__ */ React24.createElement(
1993
2172
  ActionTile.Root,
1994
2173
  {
1995
2174
  active: isBRBOn,
@@ -1998,10 +2177,10 @@ var MwebOptions = ({
1998
2177
  setOpenOptionsSheet(false);
1999
2178
  }
2000
2179
  },
2001
- /* @__PURE__ */ React22.createElement(BrbIcon2, null),
2002
- /* @__PURE__ */ React22.createElement(ActionTile.Title, null, "Be Right Back")
2180
+ /* @__PURE__ */ React24.createElement(BrbIcon2, null),
2181
+ /* @__PURE__ */ React24.createElement(ActionTile.Title, null, "Be Right Back")
2003
2182
  ),
2004
- /* @__PURE__ */ React22.createElement(
2183
+ /* @__PURE__ */ React24.createElement(
2005
2184
  ActionTile.Root,
2006
2185
  {
2007
2186
  onClick: () => {
@@ -2009,10 +2188,10 @@ var MwebOptions = ({
2009
2188
  setOpenOptionsSheet(false);
2010
2189
  }
2011
2190
  },
2012
- /* @__PURE__ */ React22.createElement(SettingsIcon3, null),
2013
- /* @__PURE__ */ React22.createElement(ActionTile.Title, null, "Settings")
2191
+ /* @__PURE__ */ React24.createElement(SettingsIcon3, null),
2192
+ /* @__PURE__ */ React24.createElement(ActionTile.Title, null, "Settings")
2014
2193
  ),
2015
- isConnected && (permissions == null ? void 0 : permissions.browserRecording) ? /* @__PURE__ */ React22.createElement(
2194
+ isConnected && (permissions == null ? void 0 : permissions.browserRecording) ? /* @__PURE__ */ React24.createElement(
2016
2195
  ActionTile.Root,
2017
2196
  {
2018
2197
  disabled: isHLSRunning,
@@ -2052,16 +2231,16 @@ var MwebOptions = ({
2052
2231
  }
2053
2232
  })
2054
2233
  },
2055
- isRecordingLoading ? /* @__PURE__ */ React22.createElement(Loading, null) : /* @__PURE__ */ React22.createElement(RecordIcon2, null),
2056
- /* @__PURE__ */ React22.createElement(ActionTile.Title, null, isBrowserRecordingOn ? "Recording On" : isRecordingLoading ? "Starting Recording" : "Start Recording")
2234
+ isRecordingLoading ? /* @__PURE__ */ React24.createElement(Loading, null) : /* @__PURE__ */ React24.createElement(RecordIcon2, null),
2235
+ /* @__PURE__ */ React24.createElement(ActionTile.Title, null, isBrowserRecordingOn ? "Recording On" : isRecordingLoading ? "Starting Recording" : "Start Recording")
2057
2236
  ) : null
2058
- ))), /* @__PURE__ */ React22.createElement(SettingsModal_default, { open: openSettingsSheet, onOpenChange: setOpenSettingsSheet, screenType }), openModals.has(MODALS2.MUTE_ALL) && /* @__PURE__ */ React22.createElement(MuteAllModal, { onOpenChange: (value) => updateState(MODALS2.MUTE_ALL, value), isMobile: true }), openModals.has(MODALS2.CHANGE_NAME) && /* @__PURE__ */ React22.createElement(
2237
+ ))), /* @__PURE__ */ React24.createElement(SettingsModal_default, { open: openSettingsSheet, onOpenChange: setOpenSettingsSheet, screenType }), openModals.has(MODALS2.MUTE_ALL) && /* @__PURE__ */ React24.createElement(MuteAllModal, { onOpenChange: (value) => updateState(MODALS2.MUTE_ALL, value), isMobile: true }), openModals.has(MODALS2.CHANGE_NAME) && /* @__PURE__ */ React24.createElement(
2059
2238
  ChangeNameModal,
2060
2239
  {
2061
2240
  onOpenChange: (value) => updateState(MODALS2.CHANGE_NAME, value),
2062
2241
  openParentSheet: () => setOpenOptionsSheet(true)
2063
2242
  }
2064
- ), showEmojiCard && /* @__PURE__ */ React22.createElement(
2243
+ ), showEmojiCard && /* @__PURE__ */ React24.createElement(
2065
2244
  Box,
2066
2245
  {
2067
2246
  ref: emojiCardRef,
@@ -2080,8 +2259,8 @@ var MwebOptions = ({
2080
2259
  mx: "$4"
2081
2260
  }
2082
2261
  },
2083
- /* @__PURE__ */ React22.createElement(EmojiReaction, null)
2084
- ), showRecordingOn && /* @__PURE__ */ React22.createElement(
2262
+ /* @__PURE__ */ React24.createElement(EmojiReaction, null)
2263
+ ), showRecordingOn && /* @__PURE__ */ React24.createElement(
2085
2264
  StopRecordingInSheet,
2086
2265
  {
2087
2266
  onClose: () => setShowRecordingOn(false),
@@ -2106,27 +2285,27 @@ var MoreSettings = ({
2106
2285
  elements,
2107
2286
  screenType
2108
2287
  }) => {
2109
- const isMobile = useMedia3(config.media.md);
2110
- return isMobile ? /* @__PURE__ */ React23.createElement(MwebOptions, { elements, screenType }) : /* @__PURE__ */ React23.createElement(DesktopOptions, { elements, screenType });
2288
+ const isMobile = useMedia4(config.media.md);
2289
+ return isMobile ? /* @__PURE__ */ React25.createElement(MwebOptions, { elements, screenType }) : /* @__PURE__ */ React25.createElement(DesktopOptions, { elements, screenType });
2111
2290
  };
2112
2291
 
2113
2292
  // src/Prebuilt/components/RaiseHand.jsx
2114
- import React24 from "react";
2293
+ import React26 from "react";
2115
2294
  import { HandIcon as HandIcon2 } from "@100mslive/react-icons";
2116
2295
  var RaiseHand = () => {
2117
2296
  const { isHandRaised, toggleHandRaise } = useMyMetadata();
2118
- return /* @__PURE__ */ React24.createElement(Tooltip, { title: isHandRaised ? "Lower hand" : "Raise hand" }, /* @__PURE__ */ React24.createElement(IconButton_default, { active: !isHandRaised, onClick: () => __async(void 0, null, function* () {
2297
+ return /* @__PURE__ */ React26.createElement(Tooltip, { title: isHandRaised ? "Lower hand" : "Raise hand" }, /* @__PURE__ */ React26.createElement(IconButton_default, { active: !isHandRaised, onClick: () => __async(void 0, null, function* () {
2119
2298
  return yield toggleHandRaise();
2120
- }) }, /* @__PURE__ */ React24.createElement(HandIcon2, null)));
2299
+ }) }, /* @__PURE__ */ React26.createElement(HandIcon2, null)));
2121
2300
  };
2122
2301
 
2123
2302
  // src/Prebuilt/components/ScreenShareToggle.jsx
2124
- import React31, { Fragment as Fragment6 } from "react";
2125
- import { selectIsAllowedToPublish, useHMSStore as useHMSStore12, useScreenShare as useScreenShare2 } from "@100mslive/react-sdk";
2303
+ import React33, { Fragment as Fragment6 } from "react";
2304
+ import { selectIsAllowedToPublish, useHMSStore as useHMSStore13, useScreenShare as useScreenShare2 } from "@100mslive/react-sdk";
2126
2305
  import { ShareScreenIcon } from "@100mslive/react-icons";
2127
2306
 
2128
2307
  // src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx
2129
- import React30, { Fragment as Fragment5, useState as useState16 } from "react";
2308
+ import React32, { Fragment as Fragment5, useState as useState17 } from "react";
2130
2309
  import { useScreenShare } from "@100mslive/react-sdk";
2131
2310
  import { StarIcon, VerticalMenuIcon as VerticalMenuIcon2 } from "@100mslive/react-icons";
2132
2311
 
@@ -2162,12 +2341,12 @@ var ShareMenuIcon = styled(ScreenShareButton, {
2162
2341
  });
2163
2342
 
2164
2343
  // src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx
2165
- import React29, { useState as useState15 } from "react";
2344
+ import React31, { useState as useState16 } from "react";
2166
2345
 
2167
2346
  // src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx
2168
- import React25 from "react";
2347
+ import React27 from "react";
2169
2348
  var PDFHeader = () => {
2170
- return /* @__PURE__ */ React25.createElement(
2349
+ return /* @__PURE__ */ React27.createElement(
2171
2350
  DialogCol,
2172
2351
  {
2173
2352
  align: "start",
@@ -2176,8 +2355,8 @@ var PDFHeader = () => {
2176
2355
  mb: "$6"
2177
2356
  }
2178
2357
  },
2179
- /* @__PURE__ */ React25.createElement(Dialog.Title, { asChild: true }, /* @__PURE__ */ React25.createElement(Text, { as: "h6", variant: "h6" }, "Share PDF")),
2180
- /* @__PURE__ */ React25.createElement(Dialog.Description, { asChild: true }, /* @__PURE__ */ React25.createElement(
2358
+ /* @__PURE__ */ React27.createElement(Dialog.Title, { asChild: true }, /* @__PURE__ */ React27.createElement(Text, { as: "h6", variant: "h6" }, "Share PDF")),
2359
+ /* @__PURE__ */ React27.createElement(Dialog.Description, { asChild: true }, /* @__PURE__ */ React27.createElement(
2181
2360
  Text,
2182
2361
  {
2183
2362
  variant: "sm",
@@ -2191,10 +2370,10 @@ var PDFHeader = () => {
2191
2370
  };
2192
2371
 
2193
2372
  // src/Prebuilt/components/pdfAnnotator/submitPdf.jsx
2194
- import React26 from "react";
2373
+ import React28 from "react";
2195
2374
  var SubmitPDF = ({ pdfFile, onOpenChange }) => {
2196
2375
  const [, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);
2197
- return /* @__PURE__ */ React26.createElement(
2376
+ return /* @__PURE__ */ React28.createElement(
2198
2377
  Flex,
2199
2378
  {
2200
2379
  direction: "row",
@@ -2204,7 +2383,7 @@ var SubmitPDF = ({ pdfFile, onOpenChange }) => {
2204
2383
  gap: "$8"
2205
2384
  }
2206
2385
  },
2207
- /* @__PURE__ */ React26.createElement(
2386
+ /* @__PURE__ */ React28.createElement(
2208
2387
  Button,
2209
2388
  {
2210
2389
  variant: "standard",
@@ -2217,7 +2396,7 @@ var SubmitPDF = ({ pdfFile, onOpenChange }) => {
2217
2396
  },
2218
2397
  "Cancel"
2219
2398
  ),
2220
- /* @__PURE__ */ React26.createElement(
2399
+ /* @__PURE__ */ React28.createElement(
2221
2400
  Button,
2222
2401
  {
2223
2402
  variant: "primary",
@@ -2240,14 +2419,14 @@ var SubmitPDF = ({ pdfFile, onOpenChange }) => {
2240
2419
  };
2241
2420
 
2242
2421
  // src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx
2243
- import React28 from "react";
2422
+ import React30 from "react";
2244
2423
  import { TrashIcon as TrashIcon2 } from "@100mslive/react-icons";
2245
2424
 
2246
2425
  // src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx
2247
- import React27 from "react";
2426
+ import React29 from "react";
2248
2427
  import { InfoIcon as InfoIcon3 } from "@100mslive/react-icons";
2249
2428
  var PDFInfo = () => {
2250
- return /* @__PURE__ */ React27.createElement(
2429
+ return /* @__PURE__ */ React29.createElement(
2251
2430
  DialogRow,
2252
2431
  {
2253
2432
  css: {
@@ -2260,7 +2439,7 @@ var PDFInfo = () => {
2260
2439
  minHeight: "$11"
2261
2440
  }
2262
2441
  },
2263
- /* @__PURE__ */ React27.createElement(
2442
+ /* @__PURE__ */ React29.createElement(
2264
2443
  InfoIcon3,
2265
2444
  {
2266
2445
  width: "64px",
@@ -2270,14 +2449,14 @@ var PDFInfo = () => {
2270
2449
  }
2271
2450
  }
2272
2451
  ),
2273
- /* @__PURE__ */ React27.createElement(Text, { variant: "caption" }, "On the next screen, ensure you select \u201CThis Tab\u201D and click on share. Only the PDF viewer will be seen by other participants")
2452
+ /* @__PURE__ */ React29.createElement(Text, { variant: "caption" }, "On the next screen, ensure you select \u201CThis Tab\u201D and click on share. Only the PDF viewer will be seen by other participants")
2274
2453
  );
2275
2454
  };
2276
2455
 
2277
2456
  // src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx
2278
2457
  var UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {
2279
2458
  const [fileName, ext] = pdfFile.name.split(".");
2280
- return /* @__PURE__ */ React28.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React28.createElement(Dialog.Portal, null, /* @__PURE__ */ React28.createElement(Dialog.Overlay, null), /* @__PURE__ */ React28.createElement(
2459
+ return /* @__PURE__ */ React30.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React30.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React30.createElement(Dialog.Overlay, null), /* @__PURE__ */ React30.createElement(
2281
2460
  Dialog.Content,
2282
2461
  {
2283
2462
  css: {
@@ -2287,7 +2466,7 @@ var UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {
2287
2466
  bg: "$surface_dim"
2288
2467
  }
2289
2468
  },
2290
- /* @__PURE__ */ React28.createElement(Flex, { direction: "column" }, /* @__PURE__ */ React28.createElement(PDFHeader, null), /* @__PURE__ */ React28.createElement(
2469
+ /* @__PURE__ */ React30.createElement(Flex, { direction: "column" }, /* @__PURE__ */ React30.createElement(PDFHeader, null), /* @__PURE__ */ React30.createElement(
2291
2470
  DialogRow,
2292
2471
  {
2293
2472
  css: {
@@ -2309,7 +2488,7 @@ var UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {
2309
2488
  mt: "$6"
2310
2489
  }
2311
2490
  },
2312
- /* @__PURE__ */ React28.createElement(Flex, { direction: "row", css: { flexGrow: "1", maxWidth: "88%" } }, /* @__PURE__ */ React28.createElement(
2491
+ /* @__PURE__ */ React30.createElement(Flex, { direction: "row", css: { flexGrow: "1", maxWidth: "88%" } }, /* @__PURE__ */ React30.createElement(
2313
2492
  Text,
2314
2493
  {
2315
2494
  css: {
@@ -2319,8 +2498,8 @@ var UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {
2319
2498
  }
2320
2499
  },
2321
2500
  fileName
2322
- ), /* @__PURE__ */ React28.createElement(Text, { css: { whiteSpace: "nowrap" } }, ".", ext)),
2323
- /* @__PURE__ */ React28.createElement(
2501
+ ), /* @__PURE__ */ React30.createElement(Text, { css: { whiteSpace: "nowrap" } }, ".", ext)),
2502
+ /* @__PURE__ */ React30.createElement(
2324
2503
  TrashIcon2,
2325
2504
  {
2326
2505
  onClick: () => setPDFFile(null),
@@ -2329,14 +2508,14 @@ var UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {
2329
2508
  }
2330
2509
  }
2331
2510
  )
2332
- ), /* @__PURE__ */ React28.createElement(PDFInfo, null), /* @__PURE__ */ React28.createElement(SubmitPDF, { pdfFile, onOpenChange }))
2511
+ ), /* @__PURE__ */ React30.createElement(PDFInfo, null), /* @__PURE__ */ React30.createElement(SubmitPDF, { pdfFile, onOpenChange }))
2333
2512
  )));
2334
2513
  };
2335
2514
 
2336
2515
  // src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx
2337
2516
  function PDFFileOptions({ onOpenChange }) {
2338
- const [pdfFile, setPDFFile] = useState15(null);
2339
- return !pdfFile ? /* @__PURE__ */ React29.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React29.createElement(Dialog.Portal, null, /* @__PURE__ */ React29.createElement(Dialog.Overlay, null), /* @__PURE__ */ React29.createElement(
2517
+ const [pdfFile, setPDFFile] = useState16(null);
2518
+ return !pdfFile ? /* @__PURE__ */ React31.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React31.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React31.createElement(Dialog.Overlay, null), /* @__PURE__ */ React31.createElement(
2340
2519
  Dialog.Content,
2341
2520
  {
2342
2521
  css: {
@@ -2346,7 +2525,7 @@ function PDFFileOptions({ onOpenChange }) {
2346
2525
  bg: "$surface_dim"
2347
2526
  }
2348
2527
  },
2349
- /* @__PURE__ */ React29.createElement(Flex, { direction: "column" }, /* @__PURE__ */ React29.createElement(PDFHeader, null), /* @__PURE__ */ React29.createElement(
2528
+ /* @__PURE__ */ React31.createElement(Flex, { direction: "column" }, /* @__PURE__ */ React31.createElement(PDFHeader, null), /* @__PURE__ */ React31.createElement(
2350
2529
  DialogInputFile,
2351
2530
  {
2352
2531
  onChange: (target) => {
@@ -2356,8 +2535,8 @@ function PDFFileOptions({ onOpenChange }) {
2356
2535
  type: "file",
2357
2536
  accept: ".pdf"
2358
2537
  }
2359
- ), /* @__PURE__ */ React29.createElement(SubmitPDF, { pdfFile, onOpenChange }))
2360
- ))) : /* @__PURE__ */ React29.createElement(UploadedFile, { pdfFile, setPDFFile, onOpenChange });
2538
+ ), /* @__PURE__ */ React31.createElement(SubmitPDF, { pdfFile, onOpenChange }))
2539
+ ))) : /* @__PURE__ */ React31.createElement(UploadedFile, { pdfFile, setPDFFile, onOpenChange });
2361
2540
  }
2362
2541
 
2363
2542
  // src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx
@@ -2367,7 +2546,7 @@ var MODALS3 = {
2367
2546
  PDF_SHARE: "pdfShare"
2368
2547
  };
2369
2548
  function ShareScreenOptions() {
2370
- const [openModals, setOpenModals] = useState16(/* @__PURE__ */ new Set());
2549
+ const [openModals, setOpenModals] = useState17(/* @__PURE__ */ new Set());
2371
2550
  const { amIScreenSharing } = useScreenShare();
2372
2551
  const updateState = (modalName, value) => {
2373
2552
  setOpenModals((modals) => {
@@ -2381,15 +2560,15 @@ function ShareScreenOptions() {
2381
2560
  });
2382
2561
  };
2383
2562
  const { toggleScreenShare } = useScreenShare();
2384
- return /* @__PURE__ */ React30.createElement(Fragment5, null, /* @__PURE__ */ React30.createElement(
2563
+ return /* @__PURE__ */ React32.createElement(Fragment5, null, /* @__PURE__ */ React32.createElement(
2385
2564
  Dropdown.Root,
2386
2565
  {
2387
2566
  open: openModals.has(MODALS3.SHARE),
2388
2567
  onOpenChange: (value) => updateState(MODALS3.SHARE, value),
2389
2568
  modal: false
2390
2569
  },
2391
- /* @__PURE__ */ React30.createElement(Dropdown.Trigger, { asChild: true, "data-testid": "sharing_btn", disabled: amIScreenSharing }, /* @__PURE__ */ React30.createElement(ShareMenuIcon, { disabled: amIScreenSharing }, /* @__PURE__ */ React30.createElement(Tooltip, { title: "Share" }, /* @__PURE__ */ React30.createElement(Box, null, /* @__PURE__ */ React30.createElement(VerticalMenuIcon2, null))))),
2392
- /* @__PURE__ */ React30.createElement(
2570
+ /* @__PURE__ */ React32.createElement(Dropdown.Trigger, { asChild: true, "data-testid": "sharing_btn", disabled: amIScreenSharing }, /* @__PURE__ */ React32.createElement(ShareMenuIcon, { disabled: amIScreenSharing }, /* @__PURE__ */ React32.createElement(Tooltip, { title: "Share" }, /* @__PURE__ */ React32.createElement(Box, null, /* @__PURE__ */ React32.createElement(VerticalMenuIcon2, null))))),
2571
+ /* @__PURE__ */ React32.createElement(
2393
2572
  Dropdown.Content,
2394
2573
  {
2395
2574
  sideOffset: 5,
@@ -2400,7 +2579,7 @@ function ShareScreenOptions() {
2400
2579
  bg: "$surface_dim"
2401
2580
  }
2402
2581
  },
2403
- /* @__PURE__ */ React30.createElement(
2582
+ /* @__PURE__ */ React32.createElement(
2404
2583
  Dropdown.Item,
2405
2584
  {
2406
2585
  css: {
@@ -2415,10 +2594,10 @@ function ShareScreenOptions() {
2415
2594
  }
2416
2595
  }
2417
2596
  },
2418
- /* @__PURE__ */ React30.createElement(Text, { variant: "h6" }, "Start Sharing"),
2419
- /* @__PURE__ */ React30.createElement(Text, { variant: "sm" }, "Choose what you want to share")
2597
+ /* @__PURE__ */ React32.createElement(Text, { variant: "h6" }, "Start Sharing"),
2598
+ /* @__PURE__ */ React32.createElement(Text, { variant: "sm" }, "Choose what you want to share")
2420
2599
  ),
2421
- /* @__PURE__ */ React30.createElement(
2600
+ /* @__PURE__ */ React32.createElement(
2422
2601
  Dropdown.Item,
2423
2602
  {
2424
2603
  css: {
@@ -2426,14 +2605,15 @@ function ShareScreenOptions() {
2426
2605
  alignItems: "flex-start",
2427
2606
  gap: "$8",
2428
2607
  px: "$10",
2429
- py: "$6",
2608
+ pt: "$6",
2609
+ pb: "$10",
2430
2610
  "&:hover": {
2431
2611
  bg: "$transparent",
2432
2612
  cursor: "default"
2433
2613
  }
2434
2614
  }
2435
2615
  },
2436
- /* @__PURE__ */ React30.createElement(
2616
+ /* @__PURE__ */ React32.createElement(
2437
2617
  Flex,
2438
2618
  {
2439
2619
  direction: "column",
@@ -2442,7 +2622,7 @@ function ShareScreenOptions() {
2442
2622
  gap: "$6"
2443
2623
  }
2444
2624
  },
2445
- /* @__PURE__ */ React30.createElement(
2625
+ /* @__PURE__ */ React32.createElement(
2446
2626
  IconButton,
2447
2627
  {
2448
2628
  as: "div",
@@ -2457,7 +2637,7 @@ function ShareScreenOptions() {
2457
2637
  pb: "0"
2458
2638
  }
2459
2639
  },
2460
- /* @__PURE__ */ React30.createElement(
2640
+ /* @__PURE__ */ React32.createElement(
2461
2641
  "img",
2462
2642
  {
2463
2643
  src: screen_share_default,
@@ -2472,7 +2652,7 @@ function ShareScreenOptions() {
2472
2652
  }
2473
2653
  )
2474
2654
  ),
2475
- /* @__PURE__ */ React30.createElement(Flex, { direction: "column", align: "center" }, /* @__PURE__ */ React30.createElement(Text, { variant: "body2" }, "Share Screen"), /* @__PURE__ */ React30.createElement(
2655
+ /* @__PURE__ */ React32.createElement(Flex, { direction: "column", align: "center" }, /* @__PURE__ */ React32.createElement(Text, { variant: "body2" }, "Share Screen"), /* @__PURE__ */ React32.createElement(
2476
2656
  Text,
2477
2657
  {
2478
2658
  variant: "caption",
@@ -2484,7 +2664,7 @@ function ShareScreenOptions() {
2484
2664
  "Share your tab, window or your entire screen"
2485
2665
  ))
2486
2666
  ),
2487
- /* @__PURE__ */ React30.createElement(
2667
+ /* @__PURE__ */ React32.createElement(
2488
2668
  Flex,
2489
2669
  {
2490
2670
  direction: "column",
@@ -2493,7 +2673,7 @@ function ShareScreenOptions() {
2493
2673
  gap: "$6"
2494
2674
  }
2495
2675
  },
2496
- /* @__PURE__ */ React30.createElement(
2676
+ /* @__PURE__ */ React32.createElement(
2497
2677
  IconButton,
2498
2678
  {
2499
2679
  onClick: () => {
@@ -2510,7 +2690,7 @@ function ShareScreenOptions() {
2510
2690
  pb: "0"
2511
2691
  }
2512
2692
  },
2513
- /* @__PURE__ */ React30.createElement(
2693
+ /* @__PURE__ */ React32.createElement(
2514
2694
  "img",
2515
2695
  {
2516
2696
  src: pdf_share_default,
@@ -2524,14 +2704,14 @@ function ShareScreenOptions() {
2524
2704
  }
2525
2705
  }
2526
2706
  ),
2527
- /* @__PURE__ */ React30.createElement(
2707
+ /* @__PURE__ */ React32.createElement(
2528
2708
  Flex,
2529
2709
  {
2530
2710
  direction: "row",
2531
2711
  align: "center",
2532
2712
  css: {
2533
2713
  position: "absolute",
2534
- top: "29%",
2714
+ top: "35%",
2535
2715
  left: "54%",
2536
2716
  padding: "$2 $4",
2537
2717
  r: "$2",
@@ -2540,8 +2720,8 @@ function ShareScreenOptions() {
2540
2720
  gap: "$2"
2541
2721
  }
2542
2722
  },
2543
- /* @__PURE__ */ React30.createElement(StarIcon, { height: 14, width: 14 }),
2544
- /* @__PURE__ */ React30.createElement(
2723
+ /* @__PURE__ */ React32.createElement(StarIcon, { height: 14, width: 14 }),
2724
+ /* @__PURE__ */ React32.createElement(
2545
2725
  Text,
2546
2726
  {
2547
2727
  variant: "xs",
@@ -2555,7 +2735,7 @@ function ShareScreenOptions() {
2555
2735
  )
2556
2736
  )
2557
2737
  ),
2558
- /* @__PURE__ */ React30.createElement(Flex, { direction: "column", align: "center" }, /* @__PURE__ */ React30.createElement(Text, { variant: "body2" }, "Share PDF"), /* @__PURE__ */ React30.createElement(
2738
+ /* @__PURE__ */ React32.createElement(Flex, { direction: "column", align: "center" }, /* @__PURE__ */ React32.createElement(Text, { variant: "body2" }, "Share PDF"), /* @__PURE__ */ React32.createElement(
2559
2739
  Text,
2560
2740
  {
2561
2741
  variant: "caption",
@@ -2567,51 +2747,21 @@ function ShareScreenOptions() {
2567
2747
  "Annotate, draw shapes, and more over PDFs"
2568
2748
  ))
2569
2749
  )
2570
- ),
2571
- /* @__PURE__ */ React30.createElement(
2572
- Dropdown.Item,
2573
- {
2574
- css: {
2575
- px: "$10",
2576
- pb: "$10",
2577
- pt: "$6",
2578
- "&:hover": {
2579
- bg: "$transparent",
2580
- cursor: "default"
2581
- }
2582
- }
2583
- },
2584
- /* @__PURE__ */ React30.createElement(
2585
- Button,
2586
- {
2587
- variant: "standard",
2588
- outlined: true,
2589
- type: "submit",
2590
- onClick: () => {
2591
- updateState(MODALS3.SHARE, false);
2592
- },
2593
- "data-testid": "share_btn",
2594
- css: {
2595
- w: "100%"
2596
- }
2597
- },
2598
- "Cancel"
2599
- )
2600
2750
  )
2601
2751
  )
2602
- ), openModals.has(MODALS3.PDF_SHARE) && /* @__PURE__ */ React30.createElement(PDFFileOptions, { onOpenChange: (value) => updateState(MODALS3.PDF_SHARE, value) }));
2752
+ ), openModals.has(MODALS3.PDF_SHARE) && /* @__PURE__ */ React32.createElement(PDFFileOptions, { onOpenChange: (value) => updateState(MODALS3.PDF_SHARE, value) }));
2603
2753
  }
2604
2754
 
2605
2755
  // src/Prebuilt/components/ScreenShareToggle.jsx
2606
2756
  var ScreenshareToggle = ({ css = {} }) => {
2607
- const isAllowedToPublish = useHMSStore12(selectIsAllowedToPublish);
2757
+ const isAllowedToPublish = useHMSStore13(selectIsAllowedToPublish);
2608
2758
  const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
2609
2759
  const { amIScreenSharing, screenShareVideoTrackId: video, toggleScreenShare } = useScreenShare2();
2610
2760
  const isVideoScreenshare = amIScreenSharing && !!video;
2611
2761
  if (!isAllowedToPublish.screen || !isScreenshareSupported()) {
2612
2762
  return null;
2613
2763
  }
2614
- return /* @__PURE__ */ React31.createElement(Fragment6, null, /* @__PURE__ */ React31.createElement(Flex, { direction: "row", css: { "@md": { display: "none" } } }, /* @__PURE__ */ React31.createElement(
2764
+ return /* @__PURE__ */ React33.createElement(Fragment6, null, /* @__PURE__ */ React33.createElement(Flex, { direction: "row", css: { "@md": { display: "none" } } }, /* @__PURE__ */ React33.createElement(
2615
2765
  ScreenShareButton,
2616
2766
  {
2617
2767
  variant: "standard",
@@ -2623,34 +2773,35 @@ var ScreenshareToggle = ({ css = {} }) => {
2623
2773
  toggleScreenShare();
2624
2774
  }
2625
2775
  },
2626
- /* @__PURE__ */ React31.createElement(Tooltip, { title: `${!isVideoScreenshare ? "Start" : "Stop"} screen sharing` }, /* @__PURE__ */ React31.createElement(Box, null, /* @__PURE__ */ React31.createElement(ShareScreenIcon, null)))
2627
- ), /* @__PURE__ */ React31.createElement(ShareScreenOptions, null)));
2776
+ /* @__PURE__ */ React33.createElement(Tooltip, { title: `${!isVideoScreenshare ? "Start" : "Stop"} screen sharing` }, /* @__PURE__ */ React33.createElement(Box, null, /* @__PURE__ */ React33.createElement(ShareScreenIcon, null)))
2777
+ ), /* @__PURE__ */ React33.createElement(ShareScreenOptions, null)));
2628
2778
  };
2629
2779
 
2630
2780
  // src/Prebuilt/components/Footer/ChatToggle.tsx
2631
- import React32 from "react";
2632
- import { selectUnreadHMSMessagesCount, useHMSStore as useHMSStore13 } from "@100mslive/react-sdk";
2781
+ import React34 from "react";
2782
+ import { selectUnreadHMSMessagesCount, useHMSStore as useHMSStore14 } from "@100mslive/react-sdk";
2633
2783
  import { ChatIcon, ChatUnreadIcon } from "@100mslive/react-icons";
2634
2784
  var ChatToggle = () => {
2635
- const countUnreadMessages = useHMSStore13(selectUnreadHMSMessagesCount);
2785
+ const countUnreadMessages = useHMSStore14(selectUnreadHMSMessagesCount);
2636
2786
  const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
2637
2787
  const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
2638
- return /* @__PURE__ */ React32.createElement(Tooltip, { key: "chat", title: `${isChatOpen ? "Close" : "Open"} chat` }, /* @__PURE__ */ React32.createElement(IconButton_default, { onClick: toggleChat, active: !isChatOpen, "data-testid": "chat_btn" }, countUnreadMessages === 0 ? /* @__PURE__ */ React32.createElement(ChatIcon, null) : /* @__PURE__ */ React32.createElement(ChatUnreadIcon, { "data-testid": "chat_unread_btn" })));
2788
+ return /* @__PURE__ */ React34.createElement(Tooltip, { key: "chat", title: `${isChatOpen ? "Close" : "Open"} chat` }, /* @__PURE__ */ React34.createElement(IconButton_default, { onClick: toggleChat, active: !isChatOpen, "data-testid": "chat_btn" }, countUnreadMessages === 0 ? /* @__PURE__ */ React34.createElement(ChatIcon, null) : /* @__PURE__ */ React34.createElement(ChatUnreadIcon, { "data-testid": "chat_unread_btn" })));
2639
2789
  };
2640
2790
 
2641
2791
  // src/Prebuilt/components/Footer/ParticipantList.jsx
2642
- import React35, { Fragment as Fragment7, useCallback as useCallback6, useEffect as useEffect5, useState as useState18 } from "react";
2643
- import { useDebounce, useMedia as useMedia4 } from "react-use";
2792
+ import React37, { Fragment as Fragment7, useCallback as useCallback6, useEffect as useEffect7, useState as useState19 } from "react";
2793
+ import { useDebounce, useMedia as useMedia5 } from "react-use";
2644
2794
  import {
2645
2795
  selectHandRaisedPeers,
2646
2796
  selectHasPeerHandRaised,
2797
+ selectIsLargeRoom as selectIsLargeRoom2,
2647
2798
  selectIsPeerAudioEnabled,
2648
2799
  selectLocalPeerID as selectLocalPeerID4,
2649
2800
  selectPeerCount as selectPeerCount2,
2650
2801
  selectPeerMetadata,
2651
2802
  selectPermissions as selectPermissions8,
2652
- useHMSActions as useHMSActions11,
2653
- useHMSStore as useHMSStore15
2803
+ useHMSActions as useHMSActions12,
2804
+ useHMSStore as useHMSStore17
2654
2805
  } from "@100mslive/react-sdk";
2655
2806
  import {
2656
2807
  ChangeRoleIcon as ChangeRoleIcon2,
@@ -2663,13 +2814,15 @@ import {
2663
2814
  } from "@100mslive/react-icons";
2664
2815
 
2665
2816
  // src/Prebuilt/components/Footer/RoleAccordion.tsx
2666
- import React34 from "react";
2817
+ import React36, { useEffect as useEffect6 } from "react";
2667
2818
  import { useMeasure } from "react-use";
2668
2819
  import { FixedSizeList } from "react-window";
2820
+ import { selectIsLargeRoom, useHMSStore as useHMSStore16, usePaginatedParticipants } from "@100mslive/react-sdk";
2821
+ import { ChevronRightIcon as ChevronRightIcon2 } from "@100mslive/react-icons";
2669
2822
 
2670
2823
  // src/Prebuilt/components/Footer/RoleOptions.tsx
2671
- import React33, { useState as useState17 } from "react";
2672
- import { selectPermissions as selectPermissions7, useHMSActions as useHMSActions10, useHMSStore as useHMSStore14, useHMSVanillaStore as useHMSVanillaStore2 } from "@100mslive/react-sdk";
2824
+ import React35, { useState as useState18 } from "react";
2825
+ import { selectPermissions as selectPermissions7, useHMSActions as useHMSActions11, useHMSStore as useHMSStore15, useHMSVanillaStore as useHMSVanillaStore2 } from "@100mslive/react-sdk";
2673
2826
  import {
2674
2827
  MicOffIcon as MicOffIcon2,
2675
2828
  MicOnIcon,
@@ -2682,9 +2835,9 @@ import {
2682
2835
  var dropdownItemCSS = { backgroundColor: "$surface_default", gap: "$4", p: "$8" };
2683
2836
  var optionTextCSS = { fontWeight: "$semiBold", color: "$on_surface_high", textTransform: "none" };
2684
2837
  var RoleOptions = ({ roleName, peerList }) => {
2685
- const [openOptions, setOpenOptions] = useState17(false);
2686
- const permissions = useHMSStore14(selectPermissions7);
2687
- const hmsActions = useHMSActions10();
2838
+ const [openOptions, setOpenOptions] = useState18(false);
2839
+ const permissions = useHMSStore15(selectPermissions7);
2840
+ const hmsActions = useHMSActions11();
2688
2841
  const { elements } = useRoomLayoutConferencingScreen();
2689
2842
  const { on_stage_role, off_stage_roles = [] } = (elements == null ? void 0 : elements.on_stage_exp) || {};
2690
2843
  const vanillaStore = useHMSVanillaStore2();
@@ -2701,7 +2854,7 @@ var RoleOptions = ({ roleName, peerList }) => {
2701
2854
  const canMuteRole = (permissions == null ? void 0 : permissions.mute) && roleName === on_stage_role;
2702
2855
  const canRemoveRoleFromStage = (permissions == null ? void 0 : permissions.changeRole) && roleName === on_stage_role;
2703
2856
  const canRemoveRoleFromRoom = (permissions == null ? void 0 : permissions.removeOthers) && (on_stage_role === roleName || (off_stage_roles == null ? void 0 : off_stage_roles.includes(roleName)));
2704
- if (!(canMuteRole || canRemoveRoleFromStage || canRemoveRoleFromRoom)) {
2857
+ if (!(canMuteRole || canRemoveRoleFromStage || canRemoveRoleFromRoom) || peerList.length === 0) {
2705
2858
  return null;
2706
2859
  }
2707
2860
  const removeAllFromStage = () => {
@@ -2728,7 +2881,7 @@ var RoleOptions = ({ roleName, peerList }) => {
2728
2881
  console.error(e);
2729
2882
  }
2730
2883
  });
2731
- return /* @__PURE__ */ React33.createElement(Dropdown.Root, { open: openOptions, onOpenChange: setOpenOptions }, /* @__PURE__ */ React33.createElement(
2884
+ return /* @__PURE__ */ React35.createElement(Dropdown.Root, { open: openOptions, onOpenChange: setOpenOptions }, /* @__PURE__ */ React35.createElement(
2732
2885
  Dropdown.Trigger,
2733
2886
  {
2734
2887
  onClick: (e) => e.stopPropagation(),
@@ -2747,122 +2900,164 @@ var RoleOptions = ({ roleName, peerList }) => {
2747
2900
  }
2748
2901
  }
2749
2902
  },
2750
- /* @__PURE__ */ React33.createElement(Flex, null, /* @__PURE__ */ React33.createElement(VerticalMenuIcon3, null))
2751
- ), /* @__PURE__ */ React33.createElement(
2903
+ /* @__PURE__ */ React35.createElement(Flex, null, /* @__PURE__ */ React35.createElement(VerticalMenuIcon3, null))
2904
+ ), /* @__PURE__ */ React35.createElement(
2752
2905
  Dropdown.Content,
2753
2906
  {
2754
2907
  onClick: (e) => e.stopPropagation(),
2755
2908
  css: { w: "max-content", maxWidth: "$64", bg: "$surface_default", py: 0 },
2756
2909
  align: "end"
2757
2910
  },
2758
- canRemoveRoleFromStage && /* @__PURE__ */ React33.createElement(
2911
+ canRemoveRoleFromStage && /* @__PURE__ */ React35.createElement(
2759
2912
  Dropdown.Item,
2760
2913
  {
2761
2914
  css: __spreadProps(__spreadValues({}, dropdownItemCSS), { borderBottom: "1px solid $border_bright" }),
2762
2915
  onClick: removeAllFromStage
2763
2916
  },
2764
- /* @__PURE__ */ React33.createElement(PersonRectangleIcon, null),
2765
- /* @__PURE__ */ React33.createElement(Text, { variant: "sm", css: optionTextCSS }, "Remove all from Stage")
2917
+ /* @__PURE__ */ React35.createElement(PersonRectangleIcon, null),
2918
+ /* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: optionTextCSS }, "Remove all from Stage")
2766
2919
  ),
2767
- canMuteRole && /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(Dropdown.Item, { css: dropdownItemCSS, onClick: () => setTrackEnabled("audio", !allPeersHaveAudioOn) }, allPeersHaveAudioOn ? /* @__PURE__ */ React33.createElement(MicOffIcon2, null) : /* @__PURE__ */ React33.createElement(MicOnIcon, null), /* @__PURE__ */ React33.createElement(Text, { variant: "sm", css: optionTextCSS }, allPeersHaveAudioOn ? "Mute" : "Unmute", " Audio")), /* @__PURE__ */ React33.createElement(
2920
+ canMuteRole && /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(Dropdown.Item, { css: dropdownItemCSS, onClick: () => setTrackEnabled("audio", !allPeersHaveAudioOn) }, allPeersHaveAudioOn ? /* @__PURE__ */ React35.createElement(MicOffIcon2, null) : /* @__PURE__ */ React35.createElement(MicOnIcon, null), /* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: optionTextCSS }, allPeersHaveAudioOn ? "Mute" : "Unmute", " Audio")), /* @__PURE__ */ React35.createElement(
2768
2921
  Dropdown.Item,
2769
2922
  {
2770
2923
  css: __spreadProps(__spreadValues({}, dropdownItemCSS), { borderTop: "1px solid $border_bright" }),
2771
2924
  onClick: () => setTrackEnabled("video", !allPeersHaveVideoOn)
2772
2925
  },
2773
- allPeersHaveVideoOn ? /* @__PURE__ */ React33.createElement(VideoOffIcon, null) : /* @__PURE__ */ React33.createElement(VideoOnIcon, null),
2774
- /* @__PURE__ */ React33.createElement(Text, { variant: "sm", css: optionTextCSS }, allPeersHaveVideoOn ? "Mute" : "Unmute", " Video")
2926
+ allPeersHaveVideoOn ? /* @__PURE__ */ React35.createElement(VideoOffIcon, null) : /* @__PURE__ */ React35.createElement(VideoOnIcon, null),
2927
+ /* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: optionTextCSS }, allPeersHaveVideoOn ? "Mute" : "Unmute", " Video")
2775
2928
  )),
2776
- canRemoveRoleFromRoom && /* @__PURE__ */ React33.createElement(
2929
+ canRemoveRoleFromRoom && /* @__PURE__ */ React35.createElement(
2777
2930
  Dropdown.Item,
2778
2931
  {
2779
2932
  css: __spreadProps(__spreadValues({}, dropdownItemCSS), { borderTop: "1px solid $border_bright", color: "$alert_error_default" }),
2780
2933
  onClick: removePeersFromRoom
2781
2934
  },
2782
- /* @__PURE__ */ React33.createElement(RemoveUserIcon, null),
2783
- /* @__PURE__ */ React33.createElement(Text, { variant: "sm", css: __spreadProps(__spreadValues({}, optionTextCSS), { color: "inherit" }) }, "Remove all from Room")
2935
+ /* @__PURE__ */ React35.createElement(RemoveUserIcon, null),
2936
+ /* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: __spreadProps(__spreadValues({}, optionTextCSS), { color: "inherit" }) }, "Remove all from Room")
2784
2937
  )
2785
2938
  ));
2786
2939
  };
2787
2940
 
2788
2941
  // src/Prebuilt/components/Footer/RoleAccordion.tsx
2789
2942
  var ROW_HEIGHT = 50;
2943
+ var ITER_TIMER = 5e3;
2790
2944
  function itemKey(index, data3) {
2791
2945
  return data3.peerList[index].id;
2792
2946
  }
2793
- var VirtualizedParticipantItem = React34.memo(({ index, data: data3 }) => {
2794
- return /* @__PURE__ */ React34.createElement(Participant, { key: data3.peerList[index].id, peer: data3.peerList[index], isConnected: data3.isConnected });
2947
+ var VirtualizedParticipantItem = React36.memo(({ index, data: data3 }) => {
2948
+ return /* @__PURE__ */ React36.createElement(Participant, { key: data3.peerList[index].id, peer: data3.peerList[index], isConnected: data3.isConnected });
2795
2949
  });
2796
2950
  var RoleAccordion = ({
2797
2951
  peerList = [],
2798
2952
  roleName,
2799
2953
  isConnected,
2800
2954
  filter,
2801
- isHandRaisedAccordion = false
2955
+ isHandRaisedAccordion = false,
2956
+ offStageRoles,
2957
+ onActive
2802
2958
  }) => {
2803
2959
  const [ref, { width }] = useMeasure();
2804
2960
  const showAcordion = (filter == null ? void 0 : filter.search) ? peerList.some((peer) => peer.name.toLowerCase().includes(filter.search)) : true;
2805
- if (!showAcordion || isHandRaisedAccordion && (filter == null ? void 0 : filter.search) || peerList.length === 0) {
2961
+ const isLargeRoom = useHMSStore16(selectIsLargeRoom);
2962
+ const { peers, total, loadPeers } = usePaginatedParticipants({ role: roleName, limit: 10 });
2963
+ const isOffStageRole = roleName && offStageRoles.includes(roleName);
2964
+ useEffect6(() => {
2965
+ if (!isOffStageRole || !isLargeRoom) {
2966
+ return;
2967
+ }
2968
+ loadPeers();
2969
+ const interval = setInterval(() => {
2970
+ loadPeers();
2971
+ }, ITER_TIMER);
2972
+ return () => clearInterval(interval);
2973
+ }, [isOffStageRole, isLargeRoom]);
2974
+ if (!showAcordion || isHandRaisedAccordion && (filter == null ? void 0 : filter.search) || peerList.length === 0 && (filter == null ? void 0 : filter.search)) {
2975
+ return null;
2976
+ }
2977
+ const height = ROW_HEIGHT * (peers.length || peerList.length);
2978
+ const peersInAccordion = isOffStageRole && isLargeRoom ? peers : peerList;
2979
+ const hasNext = total > peersInAccordion.length;
2980
+ if (peersInAccordion.length === 0) {
2806
2981
  return null;
2807
2982
  }
2808
- const height = ROW_HEIGHT * peerList.length;
2809
- return /* @__PURE__ */ React34.createElement(Flex, { direction: "column", css: { "&:hover .role_actions": { visibility: "visible" } }, ref }, /* @__PURE__ */ React34.createElement(
2810
- Accordion.Root,
2983
+ return /* @__PURE__ */ React36.createElement(Accordion.Item, { value: roleName, css: { "&:hover .role_actions": { visibility: "visible" }, mb: "$8" }, ref }, /* @__PURE__ */ React36.createElement(
2984
+ Accordion.Header,
2811
2985
  {
2812
- type: "single",
2813
- collapsible: true,
2814
- defaultValue: roleName,
2815
- css: { borderRadius: "$1", border: "1px solid $border_bright" }
2986
+ iconStyles: { c: "$on_surface_high" },
2987
+ css: {
2988
+ textTransform: "capitalize",
2989
+ p: "$6 $8",
2990
+ fontSize: "$sm",
2991
+ fontWeight: "$semiBold",
2992
+ c: "$on_surface_medium",
2993
+ borderRadius: "$1",
2994
+ border: "1px solid $border_default",
2995
+ '&[data-state="open"]': {
2996
+ borderBottomLeftRadius: 0,
2997
+ borderBottomRightRadius: 0
2998
+ }
2999
+ }
2816
3000
  },
2817
- /* @__PURE__ */ React34.createElement(Accordion.Item, { value: roleName }, /* @__PURE__ */ React34.createElement(
2818
- Accordion.Header,
3001
+ /* @__PURE__ */ React36.createElement(Flex, { justify: "between", css: { flexGrow: 1, pr: "$6" } }, /* @__PURE__ */ React36.createElement(
3002
+ Text,
2819
3003
  {
2820
- iconStyles: { c: "$on_surface_high" },
2821
- css: {
2822
- textTransform: "capitalize",
2823
- p: "$6 $8",
2824
- fontSize: "$sm",
2825
- fontWeight: "$semiBold",
2826
- c: "$on_surface_medium"
2827
- }
3004
+ variant: "sm",
3005
+ css: { fontWeight: "$semiBold", textTransform: "capitalize", color: "$on_surface_medium" }
2828
3006
  },
2829
- /* @__PURE__ */ React34.createElement(Flex, { justify: "between", css: { flexGrow: 1, pr: "$6" } }, /* @__PURE__ */ React34.createElement(
2830
- Text,
2831
- {
2832
- variant: "sm",
2833
- css: { fontWeight: "$semiBold", textTransform: "capitalize", color: "$on_surface_medium" }
2834
- },
2835
- roleName,
2836
- " ",
2837
- `(${getFormattedCount(peerList.length)})`
2838
- ), /* @__PURE__ */ React34.createElement(RoleOptions, { roleName, peerList }))
2839
- ), /* @__PURE__ */ React34.createElement(Accordion.Content, null, /* @__PURE__ */ React34.createElement(Box, { css: { borderTop: "1px solid $border_default" } }), /* @__PURE__ */ React34.createElement(
2840
- FixedSizeList,
2841
- {
2842
- itemSize: ROW_HEIGHT,
2843
- itemData: { peerList, isConnected },
2844
- itemKey,
2845
- itemCount: peerList.length,
2846
- width,
2847
- height
3007
+ roleName,
3008
+ " ",
3009
+ `(${getFormattedCount(isLargeRoom && isOffStageRole ? total : peerList.length)})`
3010
+ ), /* @__PURE__ */ React36.createElement(RoleOptions, { roleName, peerList: peersInAccordion }))
3011
+ ), /* @__PURE__ */ React36.createElement(Accordion.Content, { contentStyles: { border: "1px solid $border_default", borderTop: "none" } }, /* @__PURE__ */ React36.createElement(
3012
+ FixedSizeList,
3013
+ {
3014
+ itemSize: ROW_HEIGHT,
3015
+ itemData: { peerList: peersInAccordion, isConnected },
3016
+ itemKey,
3017
+ itemCount: peersInAccordion.length,
3018
+ width,
3019
+ height
3020
+ },
3021
+ VirtualizedParticipantItem
3022
+ ), (offStageRoles == null ? void 0 : offStageRoles.includes(roleName)) && hasNext ? /* @__PURE__ */ React36.createElement(
3023
+ Flex,
3024
+ {
3025
+ align: "center",
3026
+ justify: "end",
3027
+ css: {
3028
+ gap: "$1",
3029
+ cursor: "pointer",
3030
+ color: "$on_surface_high",
3031
+ p: "$6",
3032
+ borderTop: "1px solid $border_default"
2848
3033
  },
2849
- VirtualizedParticipantItem
2850
- )))
2851
- ));
3034
+ onClick: () => onActive == null ? void 0 : onActive(roleName)
3035
+ },
3036
+ /* @__PURE__ */ React36.createElement(Text, { variant: "sm", css: { color: "inherit" } }, "View All"),
3037
+ /* @__PURE__ */ React36.createElement(ChevronRightIcon2, null)
3038
+ ) : null));
2852
3039
  };
2853
3040
 
2854
3041
  // src/Prebuilt/components/Footer/ParticipantList.jsx
2855
- var ParticipantList = () => {
2856
- const [filter, setFilter] = useState18();
3042
+ var ParticipantList = ({ offStageRoles = [], onActive }) => {
3043
+ const [filter, setFilter] = useState19();
2857
3044
  const { participants, isConnected, peerCount } = useParticipants(filter);
3045
+ const isLargeRoom = useHMSStore17(selectIsLargeRoom2);
2858
3046
  const peersOrderedByRoles = {};
2859
- const handRaisedPeers = useHMSStore15(selectHandRaisedPeers);
3047
+ const handRaisedPeers = useHMSStore17(selectHandRaisedPeers);
2860
3048
  participants.forEach((participant) => {
2861
3049
  if (peersOrderedByRoles[participant.roleName] === void 0) {
2862
3050
  peersOrderedByRoles[participant.roleName] = [];
2863
3051
  }
2864
3052
  peersOrderedByRoles[participant.roleName].push(participant);
2865
3053
  });
3054
+ if (isLargeRoom) {
3055
+ offStageRoles.forEach((role) => {
3056
+ if (!peersOrderedByRoles[role]) {
3057
+ peersOrderedByRoles[role] = [];
3058
+ }
3059
+ });
3060
+ }
2866
3061
  const onSearch = useCallback6((value) => {
2867
3062
  setFilter((filterValue) => {
2868
3063
  if (!filterValue) {
@@ -2875,21 +3070,24 @@ var ParticipantList = () => {
2875
3070
  if (peerCount === 0) {
2876
3071
  return null;
2877
3072
  }
2878
- return /* @__PURE__ */ React35.createElement(Fragment7, null, /* @__PURE__ */ React35.createElement(Flex, { direction: "column", css: { size: "100%", gap: "$4" } }, !(filter == null ? void 0 : filter.search) && participants.length === 0 ? null : /* @__PURE__ */ React35.createElement(ParticipantSearch, { onSearch, inSidePane: true }), participants.length === 0 ? /* @__PURE__ */ React35.createElement(Flex, { align: "center", justify: "center", css: { w: "100%", p: "$8 0" } }, /* @__PURE__ */ React35.createElement(Text, { variant: "sm" }, !filter ? "No participants" : "No matching participants")) : null, /* @__PURE__ */ React35.createElement(
3073
+ return /* @__PURE__ */ React37.createElement(Fragment7, null, /* @__PURE__ */ React37.createElement(Flex, { direction: "column", css: { size: "100%", gap: "$4" } }, !(filter == null ? void 0 : filter.search) && participants.length === 0 ? null : /* @__PURE__ */ React37.createElement(ParticipantSearch, { onSearch, inSidePane: true }), participants.length === 0 ? /* @__PURE__ */ React37.createElement(Flex, { align: "center", justify: "center", css: { w: "100%", p: "$8 0" } }, /* @__PURE__ */ React37.createElement(Text, { variant: "sm" }, !filter ? "No participants" : "No matching participants")) : null, /* @__PURE__ */ React37.createElement(
2879
3074
  VirtualizedParticipants,
2880
3075
  {
2881
3076
  peersOrderedByRoles,
2882
3077
  handRaisedList: handRaisedPeers,
2883
3078
  isConnected,
2884
- filter
3079
+ filter,
3080
+ offStageRoles,
3081
+ isLargeRoom,
3082
+ onActive
2885
3083
  }
2886
3084
  )));
2887
3085
  };
2888
3086
  var ParticipantCount = () => {
2889
- const peerCount = useHMSStore15(selectPeerCount2);
3087
+ const peerCount = useHMSStore17(selectPeerCount2);
2890
3088
  const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
2891
3089
  const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);
2892
- useEffect5(() => {
3090
+ useEffect7(() => {
2893
3091
  if (isParticipantsOpen && peerCount === 0) {
2894
3092
  toggleSidepane();
2895
3093
  }
@@ -2897,7 +3095,7 @@ var ParticipantCount = () => {
2897
3095
  if (peerCount === 0) {
2898
3096
  return null;
2899
3097
  }
2900
- return /* @__PURE__ */ React35.createElement(
3098
+ return /* @__PURE__ */ React37.createElement(
2901
3099
  IconButton_default,
2902
3100
  {
2903
3101
  css: {
@@ -2913,12 +3111,20 @@ var ParticipantCount = () => {
2913
3111
  active: !isParticipantsOpen,
2914
3112
  "data-testid": "participant_list"
2915
3113
  },
2916
- /* @__PURE__ */ React35.createElement(PeopleIcon2, null),
2917
- /* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: { mx: "$4", c: "inherit" } }, getFormattedCount(peerCount))
3114
+ /* @__PURE__ */ React37.createElement(PeopleIcon2, null),
3115
+ /* @__PURE__ */ React37.createElement(Text, { variant: "sm", css: { mx: "$4", c: "inherit" } }, getFormattedCount(peerCount))
2918
3116
  );
2919
3117
  };
2920
- var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter, handRaisedList = [] }) => {
2921
- return /* @__PURE__ */ React35.createElement(
3118
+ var VirtualizedParticipants = ({
3119
+ peersOrderedByRoles = {},
3120
+ isConnected,
3121
+ filter,
3122
+ handRaisedList = [],
3123
+ offStageRoles,
3124
+ isLargeRoom,
3125
+ onActive
3126
+ }) => {
3127
+ return /* @__PURE__ */ React37.createElement(
2922
3128
  Flex,
2923
3129
  {
2924
3130
  direction: "column",
@@ -2931,31 +3137,33 @@ var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter,
2931
3137
  flex: "1 1 0"
2932
3138
  }
2933
3139
  },
2934
- /* @__PURE__ */ React35.createElement(
3140
+ /* @__PURE__ */ React37.createElement(Accordion.Root, { type: isLargeRoom ? "single" : "multiple", collapsible: true }, handRaisedList.length > 0 ? /* @__PURE__ */ React37.createElement(
2935
3141
  RoleAccordion,
2936
3142
  {
2937
3143
  peerList: handRaisedList,
2938
3144
  roleName: "Hand Raised",
2939
3145
  filter,
2940
3146
  isConnected,
2941
- isHandRaisedAccordion: true
3147
+ isHandRaisedAccordion: true,
3148
+ offStageRoles
2942
3149
  }
2943
- ),
2944
- Object.keys(peersOrderedByRoles).map((role) => /* @__PURE__ */ React35.createElement(
3150
+ ) : null, Object.keys(peersOrderedByRoles).map((role) => /* @__PURE__ */ React37.createElement(
2945
3151
  RoleAccordion,
2946
3152
  {
2947
3153
  key: role,
2948
3154
  peerList: peersOrderedByRoles[role],
2949
3155
  roleName: role,
2950
3156
  isConnected,
2951
- filter
3157
+ filter,
3158
+ offStageRoles,
3159
+ onActive
2952
3160
  }
2953
- ))
3161
+ )))
2954
3162
  );
2955
3163
  };
2956
3164
  var Participant = ({ peer, isConnected }) => {
2957
- const localPeerId = useHMSStore15(selectLocalPeerID4);
2958
- return /* @__PURE__ */ React35.createElement(
3165
+ const localPeerId = useHMSStore17(selectLocalPeerID4);
3166
+ return /* @__PURE__ */ React37.createElement(
2959
3167
  Flex,
2960
3168
  {
2961
3169
  key: peer.id,
@@ -2970,17 +3178,29 @@ var Participant = ({ peer, isConnected }) => {
2970
3178
  justify: "between",
2971
3179
  "data-testid": "participant_" + peer.name
2972
3180
  },
2973
- /* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: __spreadProps(__spreadValues({}, textEllipsis(150)), { fontWeight: "$semiBold", color: "$on_surface_high" }) }, peer.name, " ", localPeerId === peer.id ? "(You)" : ""),
2974
- isConnected ? /* @__PURE__ */ React35.createElement(ParticipantActions, { peerId: peer.id, isLocal: peer.id === localPeerId, role: peer.roleName }) : null
3181
+ /* @__PURE__ */ React37.createElement(
3182
+ Text,
3183
+ {
3184
+ variant: "sm",
3185
+ css: __spreadProps(__spreadValues({}, textEllipsis("100%")), { flex: "1 1 0", mr: "$8", fontWeight: "$semiBold", color: "$on_surface_high" })
3186
+ },
3187
+ peer.name,
3188
+ " ",
3189
+ localPeerId === peer.id ? "(You)" : ""
3190
+ ),
3191
+ isConnected ? /* @__PURE__ */ React37.createElement(ParticipantActions, { peerId: peer.id, isLocal: peer.id === localPeerId, role: peer.roleName }) : null
2975
3192
  );
2976
3193
  };
2977
- var ParticipantActions = React35.memo(({ peerId, role, isLocal }) => {
2978
- var _a;
2979
- const isHandRaised = useHMSStore15(selectHasPeerHandRaised(peerId));
2980
- const canChangeRole = (_a = useHMSStore15(selectPermissions8)) == null ? void 0 : _a.changeRole;
2981
- const shouldShowMoreActions = canChangeRole;
2982
- const isAudioMuted = !useHMSStore15(selectIsPeerAudioEnabled(peerId));
2983
- return /* @__PURE__ */ React35.createElement(
3194
+ var ParticipantActions = React37.memo(({ peerId, role, isLocal }) => {
3195
+ var _a, _b;
3196
+ const isHandRaised = useHMSStore17(selectHasPeerHandRaised(peerId));
3197
+ const canChangeRole = (_a = useHMSStore17(selectPermissions8)) == null ? void 0 : _a.changeRole;
3198
+ const canRemoveOthers = (_b = useHMSStore17(selectPermissions8)) == null ? void 0 : _b.removeOthers;
3199
+ const { elements } = useRoomLayoutConferencingScreen();
3200
+ const { on_stage_exp } = elements || {};
3201
+ const shouldShowMoreActions = on_stage_exp && canChangeRole || canRemoveOthers;
3202
+ const isAudioMuted = !useHMSStore17(selectIsPeerAudioEnabled(peerId));
3203
+ return /* @__PURE__ */ React37.createElement(
2984
3204
  Flex,
2985
3205
  {
2986
3206
  align: "center",
@@ -2989,33 +3209,40 @@ var ParticipantActions = React35.memo(({ peerId, role, isLocal }) => {
2989
3209
  gap: "$8"
2990
3210
  }
2991
3211
  },
2992
- /* @__PURE__ */ React35.createElement(ConnectionIndicator, { peerId }),
2993
- isHandRaised && /* @__PURE__ */ React35.createElement(
3212
+ /* @__PURE__ */ React37.createElement(ConnectionIndicator, { peerId }),
3213
+ isHandRaised && /* @__PURE__ */ React37.createElement(
2994
3214
  Flex,
2995
3215
  {
2996
3216
  align: "center",
2997
3217
  justify: "center",
2998
3218
  css: { p: "$1", c: "$on_surface_high", bg: "$surface_bright", borderRadius: "$round" }
2999
3219
  },
3000
- /* @__PURE__ */ React35.createElement(HandIcon3, { height: 19, width: 19 })
3220
+ /* @__PURE__ */ React37.createElement(HandIcon3, { height: 19, width: 19 })
3001
3221
  ),
3002
- isAudioMuted ? /* @__PURE__ */ React35.createElement(
3222
+ isAudioMuted ? /* @__PURE__ */ React37.createElement(
3003
3223
  Flex,
3004
3224
  {
3005
3225
  align: "center",
3006
3226
  justify: "center",
3007
3227
  css: { p: "$2", c: "$on_surface_high", bg: "$surface_bright", borderRadius: "$round" }
3008
3228
  },
3009
- /* @__PURE__ */ React35.createElement(MicOffIcon3, { height: 19, width: 19 })
3229
+ /* @__PURE__ */ React37.createElement(MicOffIcon3, { height: 19, width: 19 })
3010
3230
  ) : null,
3011
- shouldShowMoreActions && !isLocal ? /* @__PURE__ */ React35.createElement(ParticipantMoreActions, { peerId, role }) : null
3231
+ shouldShowMoreActions && !isLocal ? /* @__PURE__ */ React37.createElement(
3232
+ ParticipantMoreActions,
3233
+ {
3234
+ peerId,
3235
+ role,
3236
+ elements,
3237
+ canChangeRole,
3238
+ canRemoveOthers
3239
+ }
3240
+ ) : null
3012
3241
  );
3013
3242
  });
3014
- var ParticipantMoreActions = ({ peerId, role }) => {
3243
+ var ParticipantMoreActions = ({ peerId, role, elements, canChangeRole, canRemoveOthers }) => {
3015
3244
  var _a;
3016
- const hmsActions = useHMSActions11();
3017
- const { changeRole: canChangeRole, removeOthers: canRemoveOthers } = useHMSStore15(selectPermissions8);
3018
- const { elements } = useRoomLayoutConferencingScreen();
3245
+ const hmsActions = useHMSActions12();
3019
3246
  const {
3020
3247
  bring_to_stage_label,
3021
3248
  remove_from_stage_label,
@@ -3024,10 +3251,10 @@ var ParticipantMoreActions = ({ peerId, role }) => {
3024
3251
  } = elements.on_stage_exp || {};
3025
3252
  const isInStage = role === on_stage_role;
3026
3253
  const shouldShowStageRoleChange = canChangeRole && (isInStage && remove_from_stage_label || (off_stage_roles == null ? void 0 : off_stage_roles.includes(role)) && bring_to_stage_label);
3027
- const prevRole = (_a = useHMSStore15(selectPeerMetadata(peerId))) == null ? void 0 : _a.prevRole;
3028
- const localPeerId = useHMSStore15(selectLocalPeerID4);
3254
+ const prevRole = (_a = useHMSStore17(selectPeerMetadata(peerId))) == null ? void 0 : _a.prevRole;
3255
+ const localPeerId = useHMSStore17(selectLocalPeerID4);
3029
3256
  const isLocal = localPeerId === peerId;
3030
- const [open, setOpen] = useState18(false);
3257
+ const [open, setOpen] = useState19(false);
3031
3258
  const handleStageAction = () => __async(void 0, null, function* () {
3032
3259
  if (isInStage) {
3033
3260
  prevRole && hmsActions.changeRoleOfPeer(peerId, prevRole, true);
@@ -3036,7 +3263,7 @@ var ParticipantMoreActions = ({ peerId, role }) => {
3036
3263
  }
3037
3264
  setOpen(false);
3038
3265
  });
3039
- return /* @__PURE__ */ React35.createElement(Dropdown.Root, { open, onOpenChange: (value) => setOpen(value), modal: false }, /* @__PURE__ */ React35.createElement(
3266
+ return /* @__PURE__ */ React37.createElement(Dropdown.Root, { open, onOpenChange: (value) => setOpen(value), modal: false }, /* @__PURE__ */ React37.createElement(
3040
3267
  Dropdown.Trigger,
3041
3268
  {
3042
3269
  asChild: true,
@@ -3056,8 +3283,8 @@ var ParticipantMoreActions = ({ peerId, role }) => {
3056
3283
  },
3057
3284
  tabIndex: 0
3058
3285
  },
3059
- /* @__PURE__ */ React35.createElement(Box, { css: { my: "auto" } }, /* @__PURE__ */ React35.createElement(VerticalMenuIcon4, null))
3060
- ), /* @__PURE__ */ React35.createElement(Dropdown.Portal, null, /* @__PURE__ */ React35.createElement(Dropdown.Content, { align: "end", sideOffset: 8, css: { w: "$64", bg: "$surface_default" } }, shouldShowStageRoleChange ? /* @__PURE__ */ React35.createElement(Dropdown.Item, { css: { bg: "$surface_default" }, onClick: () => handleStageAction() }, /* @__PURE__ */ React35.createElement(ChangeRoleIcon2, null), /* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: { ml: "$4", fontWeight: "$semiBold", c: "$on_surface_high" } }, isInStage ? remove_from_stage_label : bring_to_stage_label)) : null, !isLocal && canRemoveOthers && /* @__PURE__ */ React35.createElement(
3286
+ /* @__PURE__ */ React37.createElement(Box, { css: { my: "auto" } }, /* @__PURE__ */ React37.createElement(VerticalMenuIcon4, null))
3287
+ ), /* @__PURE__ */ React37.createElement(Dropdown.Portal, null, /* @__PURE__ */ React37.createElement(Dropdown.Content, { align: "end", sideOffset: 8, css: { w: "$64", bg: "$surface_default" } }, shouldShowStageRoleChange ? /* @__PURE__ */ React37.createElement(Dropdown.Item, { css: { bg: "$surface_default" }, onClick: () => handleStageAction() }, /* @__PURE__ */ React37.createElement(ChangeRoleIcon2, null), /* @__PURE__ */ React37.createElement(Text, { variant: "sm", css: { ml: "$4", fontWeight: "$semiBold", c: "$on_surface_high" } }, isInStage ? remove_from_stage_label : bring_to_stage_label)) : null, !isLocal && canRemoveOthers && /* @__PURE__ */ React37.createElement(
3061
3288
  Dropdown.Item,
3062
3289
  {
3063
3290
  css: { color: "$alert_error_default", bg: "$surface_default" },
@@ -3069,13 +3296,13 @@ var ParticipantMoreActions = ({ peerId, role }) => {
3069
3296
  }
3070
3297
  })
3071
3298
  },
3072
- /* @__PURE__ */ React35.createElement(PeopleRemoveIcon, null),
3073
- /* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: { ml: "$4", color: "inherit", fontWeight: "$semiBold" } }, "Remove Participant")
3299
+ /* @__PURE__ */ React37.createElement(PeopleRemoveIcon, null),
3300
+ /* @__PURE__ */ React37.createElement(Text, { variant: "sm", css: { ml: "$4", color: "inherit", fontWeight: "$semiBold" } }, "Remove Participant")
3074
3301
  ))));
3075
3302
  };
3076
3303
  var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
3077
- const [value, setValue] = React35.useState("");
3078
- const isMobile = useMedia4(config.media.md);
3304
+ const [value, setValue] = React37.useState("");
3305
+ const isMobile = useMedia5(config.media.md);
3079
3306
  useDebounce(
3080
3307
  () => {
3081
3308
  onSearch(value);
@@ -3083,7 +3310,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
3083
3310
  300,
3084
3311
  [value, onSearch]
3085
3312
  );
3086
- return /* @__PURE__ */ React35.createElement(
3313
+ return /* @__PURE__ */ React37.createElement(
3087
3314
  Flex,
3088
3315
  {
3089
3316
  align: "center",
@@ -3095,13 +3322,13 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
3095
3322
  mt: inSidePane ? "$4" : ""
3096
3323
  }
3097
3324
  },
3098
- /* @__PURE__ */ React35.createElement(SearchIcon, { style: { position: "absolute", left: isMobile ? "1.25rem" : "0.5rem" } }),
3099
- /* @__PURE__ */ React35.createElement(
3325
+ /* @__PURE__ */ React37.createElement(SearchIcon, { style: { position: "absolute", left: isMobile ? "1.25rem" : "0.5rem" } }),
3326
+ /* @__PURE__ */ React37.createElement(
3100
3327
  Input,
3101
3328
  {
3102
3329
  type: "text",
3103
3330
  placeholder: placeholder || "Search for participants",
3104
- css: { w: "100%", p: "$6", pl: "$16", mr: "$4", bg: inSidePane ? "$surface_default" : "$surface_dim" },
3331
+ css: { w: "100%", p: "$6", pl: "$14", bg: inSidePane ? "$surface_default" : "$surface_dim" },
3105
3332
  value,
3106
3333
  onKeyDown: (event) => {
3107
3334
  event.stopPropagation();
@@ -3117,25 +3344,25 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
3117
3344
  };
3118
3345
 
3119
3346
  // src/Prebuilt/components/Footer/Footer.tsx
3120
- var VirtualBackground = React36.lazy(() => import("./VirtualBackground-3TI5NA4V.js"));
3347
+ var VirtualBackground = React38.lazy(() => import("./VirtualBackground-UVZJVOA2.js"));
3121
3348
  var Footer2 = ({
3122
3349
  screenType,
3123
3350
  elements
3124
3351
  }) => {
3125
3352
  var _a, _b;
3126
- const isMobile = useMedia5(config.media.md);
3353
+ const isMobile = useMedia6(config.media.md);
3127
3354
  const isOverlayChat = !!((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay);
3128
3355
  const openByDefault = ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.initial_state) === Chat_ChatState.CHAT_STATE_OPEN;
3129
3356
  const { toggleAudio, toggleVideo } = useAVToggle2();
3130
3357
  const noAVPermissions = !(toggleAudio || toggleVideo);
3131
3358
  const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
3132
3359
  const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
3133
- useEffect6(() => {
3360
+ useEffect8(() => {
3134
3361
  if (!isChatOpen && openByDefault) {
3135
3362
  toggleChat();
3136
3363
  }
3137
3364
  }, [toggleChat, openByDefault]);
3138
- return /* @__PURE__ */ React36.createElement(
3365
+ return /* @__PURE__ */ React38.createElement(
3139
3366
  Footer.Root,
3140
3367
  {
3141
3368
  css: {
@@ -3149,7 +3376,7 @@ var Footer2 = ({
3149
3376
  }
3150
3377
  }
3151
3378
  },
3152
- /* @__PURE__ */ React36.createElement(
3379
+ /* @__PURE__ */ React38.createElement(
3153
3380
  Footer.Left,
3154
3381
  {
3155
3382
  css: {
@@ -3160,11 +3387,11 @@ var Footer2 = ({
3160
3387
  }
3161
3388
  }
3162
3389
  },
3163
- isMobile ? /* @__PURE__ */ React36.createElement(LeaveRoom, { screenType }) : null,
3164
- /* @__PURE__ */ React36.createElement(AudioVideoToggle, null),
3165
- isMobile ? null : /* @__PURE__ */ React36.createElement(Suspense, { fallback: /* @__PURE__ */ React36.createElement(React36.Fragment, null) }, /* @__PURE__ */ React36.createElement(VirtualBackground, null))
3390
+ isMobile ? /* @__PURE__ */ React38.createElement(LeaveRoom, { screenType }) : null,
3391
+ /* @__PURE__ */ React38.createElement(AudioVideoToggle, null),
3392
+ isMobile ? null : /* @__PURE__ */ React38.createElement(Suspense, { fallback: /* @__PURE__ */ React38.createElement(React38.Fragment, null) }, /* @__PURE__ */ React38.createElement(VirtualBackground, null))
3166
3393
  ),
3167
- /* @__PURE__ */ React36.createElement(
3394
+ /* @__PURE__ */ React38.createElement(
3168
3395
  Footer.Center,
3169
3396
  {
3170
3397
  css: {
@@ -3174,19 +3401,19 @@ var Footer2 = ({
3174
3401
  }
3175
3402
  }
3176
3403
  },
3177
- isMobile ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, noAVPermissions ? /* @__PURE__ */ React36.createElement(RaiseHand, null) : null, (elements == null ? void 0 : elements.chat) && /* @__PURE__ */ React36.createElement(ChatToggle, null), /* @__PURE__ */ React36.createElement(MoreSettings, { elements, screenType })) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(ScreenshareToggle, null), /* @__PURE__ */ React36.createElement(RaiseHand, null), (elements == null ? void 0 : elements.emoji_reactions) && /* @__PURE__ */ React36.createElement(EmojiReaction, null), /* @__PURE__ */ React36.createElement(LeaveRoom, { screenType }))
3404
+ isMobile ? /* @__PURE__ */ React38.createElement(React38.Fragment, null, noAVPermissions ? /* @__PURE__ */ React38.createElement(RaiseHand, null) : null, (elements == null ? void 0 : elements.chat) && /* @__PURE__ */ React38.createElement(ChatToggle, null), /* @__PURE__ */ React38.createElement(MoreSettings, { elements, screenType })) : /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(ScreenshareToggle, null), /* @__PURE__ */ React38.createElement(RaiseHand, null), (elements == null ? void 0 : elements.emoji_reactions) && /* @__PURE__ */ React38.createElement(EmojiReaction, null), /* @__PURE__ */ React38.createElement(LeaveRoom, { screenType }))
3178
3405
  ),
3179
- /* @__PURE__ */ React36.createElement(Footer.Right, null, !isMobile && (elements == null ? void 0 : elements.chat) && /* @__PURE__ */ React36.createElement(ChatToggle, null), (elements == null ? void 0 : elements.participant_list) && /* @__PURE__ */ React36.createElement(ParticipantCount, null), /* @__PURE__ */ React36.createElement(MoreSettings, { elements, screenType }))
3406
+ /* @__PURE__ */ React38.createElement(Footer.Right, null, !isMobile && (elements == null ? void 0 : elements.chat) && /* @__PURE__ */ React38.createElement(ChatToggle, null), (elements == null ? void 0 : elements.participant_list) && /* @__PURE__ */ React38.createElement(ParticipantCount, null), /* @__PURE__ */ React38.createElement(MoreSettings, { elements, screenType }))
3180
3407
  );
3181
3408
  };
3182
3409
 
3183
3410
  // src/Prebuilt/components/Notifications/HLSFailureModal.jsx
3184
- import React37, { useCallback as useCallback7, useState as useState19 } from "react";
3185
- import { selectHLSState as selectHLSState2, useHMSActions as useHMSActions12, useHMSStore as useHMSStore16 } from "@100mslive/react-sdk";
3411
+ import React39, { useCallback as useCallback7, useState as useState20 } from "react";
3412
+ import { selectHLSState as selectHLSState2, useHMSActions as useHMSActions13, useHMSStore as useHMSStore18 } from "@100mslive/react-sdk";
3186
3413
  function HLSFailureModal() {
3187
- const { hlsError } = useHMSStore16(selectHLSState2).error || false;
3188
- const [openModal, setOpenModal] = useState19(!!hlsError);
3189
- const hmsActions = useHMSActions12();
3414
+ const { hlsError } = useHMSStore18(selectHLSState2).error || false;
3415
+ const [openModal, setOpenModal] = useState20(!!hlsError);
3416
+ const hmsActions = useHMSActions13();
3190
3417
  const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
3191
3418
  const startHLS = useCallback7(() => __async(this, null, function* () {
3192
3419
  try {
@@ -3203,7 +3430,7 @@ function HLSFailureModal() {
3203
3430
  setHLSStarted(false);
3204
3431
  }
3205
3432
  }), [hmsActions, isHLSStarted, setHLSStarted]);
3206
- return hlsError ? /* @__PURE__ */ React37.createElement(
3433
+ return hlsError ? /* @__PURE__ */ React39.createElement(
3207
3434
  Dialog.Root,
3208
3435
  {
3209
3436
  open: openModal,
@@ -3213,7 +3440,7 @@ function HLSFailureModal() {
3213
3440
  }
3214
3441
  }
3215
3442
  },
3216
- /* @__PURE__ */ React37.createElement(Dialog.Portal, null, /* @__PURE__ */ React37.createElement(Dialog.Overlay, null), /* @__PURE__ */ React37.createElement(Dialog.Content, { css: { w: "min(360px, 90%)" } }, /* @__PURE__ */ React37.createElement(
3443
+ /* @__PURE__ */ React39.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React39.createElement(Dialog.Overlay, null), /* @__PURE__ */ React39.createElement(Dialog.Content, { css: { w: "min(360px, 90%)" } }, /* @__PURE__ */ React39.createElement(
3217
3444
  Dialog.Title,
3218
3445
  {
3219
3446
  css: {
@@ -3224,25 +3451,25 @@ function HLSFailureModal() {
3224
3451
  mt: "$4"
3225
3452
  }
3226
3453
  },
3227
- /* @__PURE__ */ React37.createElement(Text, { variant: "h6", css: { fontWeight: "$semiBold" } }, "Failed to Go Live")
3228
- ), /* @__PURE__ */ React37.createElement(Text, { variant: "sm", css: { mb: "$10", color: "$on_surface_medium" } }, "Something went wrong and your live broadcast failed. Please try again."), /* @__PURE__ */ React37.createElement(Flex, { align: "center", justify: "between", css: { w: "100%", gap: "$8" } }, /* @__PURE__ */ React37.createElement(Button, { outlined: true, variant: "standard", css: { w: "100%" }, onClick: () => setOpenModal(false) }, "Dismiss"), /* @__PURE__ */ React37.createElement(Button, { css: { w: "100%" }, onClick: startHLS }, "Go Live"))))
3454
+ /* @__PURE__ */ React39.createElement(Text, { variant: "h6", css: { fontWeight: "$semiBold" } }, "Failed to Go Live")
3455
+ ), /* @__PURE__ */ React39.createElement(Text, { variant: "sm", css: { mb: "$10", color: "$on_surface_medium" } }, "Something went wrong and your live broadcast failed. Please try again."), /* @__PURE__ */ React39.createElement(Flex, { align: "center", justify: "between", css: { w: "100%", gap: "$8" } }, /* @__PURE__ */ React39.createElement(Button, { outlined: true, variant: "standard", css: { w: "100%" }, onClick: () => setOpenModal(false) }, "Dismiss"), /* @__PURE__ */ React39.createElement(Button, { css: { w: "100%" }, onClick: startHLS }, "Go Live"))))
3229
3456
  ) : null;
3230
3457
  }
3231
3458
 
3232
3459
  // src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx
3233
- import React39, { useEffect as useEffect7 } from "react";
3460
+ import React41, { useEffect as useEffect9 } from "react";
3234
3461
  import {
3235
- selectLocalPeerName,
3462
+ selectLocalPeerName as selectLocalPeerName2,
3236
3463
  selectLocalPeerRoleName,
3237
3464
  selectRoleChangeRequest,
3238
3465
  useCustomEvent as useCustomEvent2,
3239
- useHMSActions as useHMSActions13,
3240
- useHMSStore as useHMSStore17
3466
+ useHMSActions as useHMSActions14,
3467
+ useHMSStore as useHMSStore19
3241
3468
  } from "@100mslive/react-sdk";
3242
3469
 
3243
3470
  // src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx
3244
- import React38 from "react";
3245
- import { useMedia as useMedia6 } from "react-use";
3471
+ import React40 from "react";
3472
+ import { useMedia as useMedia7 } from "react-use";
3246
3473
  var RequestPrompt = ({
3247
3474
  open = true,
3248
3475
  onOpenChange,
@@ -3251,23 +3478,23 @@ var RequestPrompt = ({
3251
3478
  actionText = "Accept",
3252
3479
  onAction
3253
3480
  }) => {
3254
- const isMobile = useMedia6(config.media.md);
3481
+ const isMobile = useMedia7(config.media.md);
3255
3482
  if (isMobile) {
3256
- return /* @__PURE__ */ React38.createElement(Sheet.Root, { open, onOpenChange }, /* @__PURE__ */ React38.createElement(Sheet.Content, { css: { py: "$8" } }, /* @__PURE__ */ React38.createElement(Text, { css: { fontWeight: "$semiBold", c: "$on_surface_high", "@md": { px: "$8" } } }, title), body, /* @__PURE__ */ React38.createElement(RequestActions, { actionText, onAction })));
3483
+ return /* @__PURE__ */ React40.createElement(Sheet.Root, { open, onOpenChange }, /* @__PURE__ */ React40.createElement(Sheet.Content, { css: { py: "$8" } }, /* @__PURE__ */ React40.createElement(Text, { css: { fontWeight: "$semiBold", c: "$on_surface_high", "@md": { px: "$8" } } }, title), body, /* @__PURE__ */ React40.createElement(RequestActions, { actionText, onAction })));
3257
3484
  }
3258
- return /* @__PURE__ */ React38.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ React38.createElement(Dialog.Portal, null, /* @__PURE__ */ React38.createElement(Dialog.Overlay, null), /* @__PURE__ */ React38.createElement(Dialog.Content, { css: { p: "$10" } }, /* @__PURE__ */ React38.createElement(Dialog.Title, { css: { p: 0, display: "flex", flexDirection: "row", gap: "$md", justifyContent: "center" } }, /* @__PURE__ */ React38.createElement(Text, { variant: "h6" }, title)), /* @__PURE__ */ React38.createElement(Box, { css: { mt: "$4", mb: "$10" } }, body), /* @__PURE__ */ React38.createElement(RequestActions, { actionText, onAction }))));
3485
+ return /* @__PURE__ */ React40.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ React40.createElement(PrebuiltDialogPortal, null, /* @__PURE__ */ React40.createElement(Dialog.Overlay, null), /* @__PURE__ */ React40.createElement(Dialog.Content, { css: { p: "$10" } }, /* @__PURE__ */ React40.createElement(Dialog.Title, { css: { p: 0, display: "flex", flexDirection: "row", gap: "$md", justifyContent: "center" } }, /* @__PURE__ */ React40.createElement(Text, { variant: "h6" }, title)), /* @__PURE__ */ React40.createElement(Box, { css: { mt: "$4", mb: "$10" } }, body), /* @__PURE__ */ React40.createElement(RequestActions, { actionText, onAction }))));
3259
3486
  };
3260
- var RequestActions = ({ onAction, actionText }) => /* @__PURE__ */ React38.createElement(Flex, { justify: "center", align: "center", css: { width: "100%", gap: "$md", "@md": { mt: "$8", px: "$8" } } }, /* @__PURE__ */ React38.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ React38.createElement(Dialog.Close, { css: { width: "100%" } }, /* @__PURE__ */ React38.createElement(Button, { variant: "standard", outlined: true, css: { width: "100%" } }, "Decline"))), /* @__PURE__ */ React38.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ React38.createElement(Button, { variant: "primary", css: { width: "100%" }, onClick: onAction }, actionText)));
3487
+ var RequestActions = ({ onAction, actionText }) => /* @__PURE__ */ React40.createElement(Flex, { justify: "center", align: "center", css: { width: "100%", gap: "$md", "@md": { mt: "$8", px: "$8" } } }, /* @__PURE__ */ React40.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ React40.createElement(Dialog.Close, { css: { width: "100%" } }, /* @__PURE__ */ React40.createElement(Button, { variant: "standard", outlined: true, css: { width: "100%" } }, "Decline"))), /* @__PURE__ */ React40.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ React40.createElement(Button, { variant: "primary", css: { width: "100%" }, onClick: onAction }, actionText)));
3261
3488
 
3262
3489
  // src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx
3263
3490
  var RoleChangeRequestModal = () => {
3264
- const hmsActions = useHMSActions13();
3491
+ const hmsActions = useHMSActions14();
3265
3492
  const { updateMetaData } = useMyMetadata();
3266
- const currentRole = useHMSStore17(selectLocalPeerRoleName);
3267
- const roleChangeRequest = useHMSStore17(selectRoleChangeRequest);
3268
- const name = useHMSStore17(selectLocalPeerName);
3493
+ const currentRole = useHMSStore19(selectLocalPeerRoleName);
3494
+ const roleChangeRequest = useHMSStore19(selectRoleChangeRequest);
3495
+ const name = useHMSStore19(selectLocalPeerName2);
3269
3496
  const { sendEvent } = useCustomEvent2({ type: ROLE_CHANGE_DECLINED });
3270
- useEffect7(() => {
3497
+ useEffect9(() => {
3271
3498
  if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
3272
3499
  return;
3273
3500
  }
@@ -3278,7 +3505,7 @@ var RoleChangeRequestModal = () => {
3278
3505
  if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
3279
3506
  return null;
3280
3507
  }
3281
- const body = /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(
3508
+ const body = /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(
3282
3509
  Text,
3283
3510
  {
3284
3511
  variant: "xs",
@@ -3289,7 +3516,7 @@ var RoleChangeRequestModal = () => {
3289
3516
  }
3290
3517
  },
3291
3518
  "Setup your audio and video before joining"
3292
- ), /* @__PURE__ */ React39.createElement(
3519
+ ), /* @__PURE__ */ React41.createElement(
3293
3520
  Flex,
3294
3521
  {
3295
3522
  align: "center",
@@ -3301,10 +3528,10 @@ var RoleChangeRequestModal = () => {
3301
3528
  "@md": { px: "$8" }
3302
3529
  }
3303
3530
  },
3304
- /* @__PURE__ */ React39.createElement(PreviewTile, { name: name || "" }),
3305
- /* @__PURE__ */ React39.createElement(PreviewControls, { hideSettings: true })
3531
+ /* @__PURE__ */ React41.createElement(PreviewTile, { name: name || "" }),
3532
+ /* @__PURE__ */ React41.createElement(PreviewControls, { hideSettings: true })
3306
3533
  ));
3307
- return /* @__PURE__ */ React39.createElement(
3534
+ return /* @__PURE__ */ React41.createElement(
3308
3535
  RequestPrompt,
3309
3536
  {
3310
3537
  title: "You're invited to join the stage",
@@ -3329,64 +3556,546 @@ var RoleChangeRequestModal = () => {
3329
3556
  };
3330
3557
 
3331
3558
  // src/Prebuilt/layouts/VideoStreamingSection.tsx
3332
- import React62, { Suspense as Suspense2, useEffect as useEffect24 } from "react";
3333
- import { selectIsConnectedToRoom as selectIsConnectedToRoom6, selectLocalPeerRoleName as selectLocalPeerRoleName3, useHMSActions as useHMSActions21, useHMSStore as useHMSStore34 } from "@100mslive/react-sdk";
3559
+ import React68, { Suspense as Suspense2, useEffect as useEffect27 } from "react";
3560
+ import { selectIsConnectedToRoom as selectIsConnectedToRoom7, selectLocalPeerRoleName as selectLocalPeerRoleName3, useHMSActions as useHMSActions23, useHMSStore as useHMSStore40 } from "@100mslive/react-sdk";
3334
3561
 
3335
3562
  // src/Prebuilt/components/VideoLayouts/GridLayout.tsx
3336
- import React51, { useEffect as useEffect15, useMemo as useMemo6, useState as useState26 } from "react";
3337
- import { selectPeers as selectPeers2, selectPeerScreenSharing, useHMSStore as useHMSStore23, useHMSVanillaStore as useHMSVanillaStore4 } from "@100mslive/react-sdk";
3563
+ import React56, { useEffect as useEffect17, useMemo as useMemo6, useState as useState29 } from "react";
3564
+ import { selectPeers as selectPeers2, selectPeerScreenSharing, useHMSStore as useHMSStore28, useHMSVanillaStore as useHMSVanillaStore4 } from "@100mslive/react-sdk";
3338
3565
 
3339
3566
  // src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
3340
- import React44, { useEffect as useEffect11, useMemo as useMemo3, useState as useState21 } from "react";
3341
- import { useMedia as useMedia9 } from "react-use";
3342
- import { selectLocalPeer as selectLocalPeer2, useHMSStore as useHMSStore19 } from "@100mslive/react-sdk";
3567
+ import React49, { useEffect as useEffect13, useMemo as useMemo3, useState as useState24 } from "react";
3568
+ import { useMedia as useMedia13 } from "react-use";
3569
+ import { selectLocalPeer as selectLocalPeer2, useHMSStore as useHMSStore24 } from "@100mslive/react-sdk";
3343
3570
 
3344
3571
  // src/Prebuilt/components/InsetTile.tsx
3345
- import React41, { useEffect as useEffect8, useRef as useRef6 } from "react";
3572
+ import React46, { useEffect as useEffect10, useRef as useRef7 } from "react";
3346
3573
  import Draggable from "react-draggable";
3347
- import { useMedia as useMedia7 } from "react-use";
3348
- import { selectIsAllowedToPublish as selectIsAllowedToPublish2, selectLocalPeer, selectVideoTrackByID, useHMSStore as useHMSStore18 } from "@100mslive/react-sdk";
3574
+ import { useMedia as useMedia11 } from "react-use";
3575
+ import { selectIsAllowedToPublish as selectIsAllowedToPublish2, selectLocalPeer, selectVideoTrackByID as selectVideoTrackByID2, useHMSStore as useHMSStore23 } from "@100mslive/react-sdk";
3349
3576
  import { ExpandIcon as ExpandIcon2 } from "@100mslive/react-icons";
3350
3577
 
3351
- // src/Prebuilt/components/hooks/useVideoTileLayout.ts
3352
- import React40, { useContext } from "react";
3353
- var VideoTileContext = React40.createContext({
3354
- enableSpotlightingPeer: true,
3355
- hideParticipantNameOnTile: false,
3356
- roundedVideoTile: true,
3357
- hideAudioMuteOnTile: false,
3358
- hideAudioLevelOnTile: false,
3359
- objectFit: "contain",
3360
- hideMetadataOnTile: false
3361
- });
3362
- var useVideoTileContext = () => {
3363
- const context = useContext(VideoTileContext);
3364
- return context;
3365
- };
3578
+ // src/Prebuilt/components/VideoTile.jsx
3579
+ import React44, { Fragment as Fragment9, useCallback as useCallback8, useRef as useRef6, useState as useState22 } from "react";
3580
+ import { useMedia as useMedia10 } from "react-use";
3581
+ import {
3582
+ selectAudioTrackByPeerID,
3583
+ selectHasPeerHandRaised as selectHasPeerHandRaised2,
3584
+ selectIsPeerAudioEnabled as selectIsPeerAudioEnabled2,
3585
+ selectLocalPeerID as selectLocalPeerID6,
3586
+ selectPeerMetadata as selectPeerMetadata2,
3587
+ selectPeerNameByID,
3588
+ selectSessionStore as selectSessionStore2,
3589
+ selectVideoTrackByID,
3590
+ selectVideoTrackByPeerID as selectVideoTrackByPeerID2,
3591
+ useHMSStore as useHMSStore22
3592
+ } from "@100mslive/react-sdk";
3593
+ import { BrbTileIcon, HandIcon as HandIcon4, MicOffIcon as MicOffIcon5 } from "@100mslive/react-icons";
3366
3594
 
3367
- // src/Prebuilt/components/InsetTile.tsx
3368
- var MinimisedTile = ({ setMinimised }) => {
3369
- return /* @__PURE__ */ React41.createElement(Flex, { align: "center", css: { gap: "$6", r: "$1", bg: "$surface_default", p: "$4", color: "$on_surface_high" } }, /* @__PURE__ */ React41.createElement(AudioVideoToggle, { hideOptions: true }), /* @__PURE__ */ React41.createElement(Text, null, "You"), /* @__PURE__ */ React41.createElement(
3370
- IconButton_default,
3595
+ // src/Prebuilt/components/TileMenu/TileMenu.jsx
3596
+ import React43, { useState as useState21 } from "react";
3597
+ import { useMedia as useMedia9 } from "react-use";
3598
+ import {
3599
+ selectLocalPeerID as selectLocalPeerID5,
3600
+ selectPeerByID as selectPeerByID2,
3601
+ selectPermissions as selectPermissions10,
3602
+ selectTrackByID as selectTrackByID2,
3603
+ selectVideoTrackByPeerID,
3604
+ useHMSStore as useHMSStore21,
3605
+ useRemoteAVToggle as useRemoteAVToggle2
3606
+ } from "@100mslive/react-sdk";
3607
+ import { CrossIcon as CrossIcon6, VerticalMenuIcon as VerticalMenuIcon5 } from "@100mslive/react-icons";
3608
+
3609
+ // src/Prebuilt/components/TileMenu/TileMenuContent.jsx
3610
+ import React42, { Fragment as Fragment8 } from "react";
3611
+ import { useMedia as useMedia8 } from "react-use";
3612
+ import {
3613
+ selectPermissions as selectPermissions9,
3614
+ selectSessionStore,
3615
+ selectTrackByID,
3616
+ useCustomEvent as useCustomEvent3,
3617
+ useHMSActions as useHMSActions15,
3618
+ useHMSStore as useHMSStore20,
3619
+ useRemoteAVToggle
3620
+ } from "@100mslive/react-sdk";
3621
+ import {
3622
+ MicOffIcon as MicOffIcon4,
3623
+ MicOnIcon as MicOnIcon2,
3624
+ PencilIcon as PencilIcon2,
3625
+ PinIcon,
3626
+ RemoveUserIcon as RemoveUserIcon2,
3627
+ ShareScreenIcon as ShareScreenIcon2,
3628
+ ShrinkIcon,
3629
+ SpeakerIcon,
3630
+ StarIcon as StarIcon2,
3631
+ VideoOffIcon as VideoOffIcon2,
3632
+ VideoOnIcon as VideoOnIcon2
3633
+ } from "@100mslive/react-icons";
3634
+ var isSameTile = ({ trackId, videoTrackID, audioTrackID }) => trackId && (videoTrackID && videoTrackID === trackId || audioTrackID && audioTrackID === trackId);
3635
+ var spacingCSS = { "@md": { my: "$8", fontWeight: "$semiBold", fontSize: "sm" } };
3636
+ var SpotlightActions = ({
3637
+ peerId,
3638
+ onSpotLightClick = () => {
3639
+ return;
3640
+ }
3641
+ }) => {
3642
+ const hmsActions = useHMSActions15();
3643
+ const spotlightPeerId = useHMSStore20(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));
3644
+ const isTileSpotlighted = spotlightPeerId === peerId;
3645
+ const setSpotlightPeerId = (peer) => hmsActions.sessionStore.set(SESSION_STORE_KEY.SPOTLIGHT, peer).catch((err) => ToastManager.addToast({ title: err.description }));
3646
+ return /* @__PURE__ */ React42.createElement(
3647
+ StyledMenuTile.ItemButton,
3371
3648
  {
3372
- className: "__cancel-drag-event",
3373
- onClick: () => setMinimised(false),
3374
- css: { bg: "transparent", border: "transparent" }
3375
- },
3376
- /* @__PURE__ */ React41.createElement(ExpandIcon2, null)
3377
- ));
3649
+ css: spacingCSS,
3650
+ onClick: () => {
3651
+ if (isTileSpotlighted) {
3652
+ setSpotlightPeerId();
3653
+ } else {
3654
+ setSpotlightPeerId(peerId);
3655
+ }
3656
+ onSpotLightClick();
3657
+ }
3658
+ },
3659
+ /* @__PURE__ */ React42.createElement(StarIcon2, { height: 20, width: 20 }),
3660
+ /* @__PURE__ */ React42.createElement("span", null, isTileSpotlighted ? "Remove from Spotlight" : "Spotlight Tile for everyone")
3661
+ );
3662
+ };
3663
+ var PinActions = ({ audioTrackID, videoTrackID }) => {
3664
+ const [pinnedTrackId, setPinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);
3665
+ const isTilePinned = isSameTile({
3666
+ trackId: pinnedTrackId,
3667
+ videoTrackID,
3668
+ audioTrackID
3669
+ });
3670
+ return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(
3671
+ StyledMenuTile.ItemButton,
3672
+ {
3673
+ css: spacingCSS,
3674
+ onClick: () => isTilePinned ? setPinnedTrackId() : setPinnedTrackId(videoTrackID || audioTrackID)
3675
+ },
3676
+ /* @__PURE__ */ React42.createElement(PinIcon, { height: 20, width: 20 }),
3677
+ /* @__PURE__ */ React42.createElement("span", null, isTilePinned ? "Unpin" : "Pin", " Tile for myself")
3678
+ ));
3679
+ };
3680
+ var MinimiseInset = () => {
3681
+ const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);
3682
+ return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(StyledMenuTile.ItemButton, { css: spacingCSS, onClick: () => setMinimised(!minimised) }, /* @__PURE__ */ React42.createElement(ShrinkIcon, { height: 20, width: 20 }), /* @__PURE__ */ React42.createElement("span", null, minimised ? "Show" : "Minimise", " your video")));
3683
+ };
3684
+ var SimulcastLayers = ({ trackId }) => {
3685
+ var _a;
3686
+ const track = useHMSStore20(selectTrackByID(trackId));
3687
+ const actions = useHMSActions15();
3688
+ const bg = useDropdownSelection();
3689
+ if (!((_a = track == null ? void 0 : track.layerDefinitions) == null ? void 0 : _a.length) || track.degraded || !track.enabled) {
3690
+ return null;
3691
+ }
3692
+ const currentLayer = track.layerDefinitions.find((layer) => layer.layer === track.layer);
3693
+ return /* @__PURE__ */ React42.createElement(Fragment8, null, /* @__PURE__ */ React42.createElement(StyledMenuTile.ItemButton, { css: { color: "$on_surface_medium", cursor: "default" } }, "Select maximum resolution"), track.layerDefinitions.map((layer) => {
3694
+ return /* @__PURE__ */ React42.createElement(
3695
+ StyledMenuTile.ItemButton,
3696
+ {
3697
+ key: layer.layer,
3698
+ onClick: () => __async(void 0, null, function* () {
3699
+ yield actions.setPreferredLayer(trackId, layer.layer);
3700
+ }),
3701
+ css: {
3702
+ justifyContent: "space-between",
3703
+ bg: track.preferredLayer === layer.layer ? bg : void 0,
3704
+ "&:hover": {
3705
+ bg: track.preferredLayer === layer.layer ? bg : void 0
3706
+ }
3707
+ }
3708
+ },
3709
+ /* @__PURE__ */ React42.createElement(
3710
+ Text,
3711
+ {
3712
+ as: "span",
3713
+ css: {
3714
+ textTransform: "capitalize",
3715
+ mr: "$2",
3716
+ fontWeight: track.preferredLayer === layer.layer ? "$semiBold" : "$regular",
3717
+ color: track.preferredLayer === layer.layer ? "$on_primary_high" : "$on_surface_high"
3718
+ }
3719
+ },
3720
+ layer.layer
3721
+ ),
3722
+ /* @__PURE__ */ React42.createElement(
3723
+ Text,
3724
+ {
3725
+ as: "span",
3726
+ variant: "xs",
3727
+ css: {
3728
+ color: track.preferredLayer === layer.layer ? "$on_primary_high" : "$on_surface_high"
3729
+ }
3730
+ },
3731
+ layer.resolution.width,
3732
+ "x",
3733
+ layer.resolution.height
3734
+ )
3735
+ );
3736
+ }), /* @__PURE__ */ React42.createElement(StyledMenuTile.ItemButton, null, /* @__PURE__ */ React42.createElement(Text, { as: "span", variant: "xs", css: { color: "$on_surface_medium" } }, "Currently streaming:", /* @__PURE__ */ React42.createElement(
3737
+ Text,
3738
+ {
3739
+ as: "span",
3740
+ variant: "xs",
3741
+ css: {
3742
+ fontWeight: "$semiBold",
3743
+ textTransform: "capitalize",
3744
+ color: "$on_surface_medium",
3745
+ ml: "$2"
3746
+ }
3747
+ },
3748
+ currentLayer ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, track.layer, " (", currentLayer.resolution.width, "x", currentLayer.resolution.height, ")") : "-"
3749
+ ))));
3750
+ };
3751
+ var TileMenuContent = (props) => {
3752
+ const actions = useHMSActions15();
3753
+ const { removeOthers } = useHMSStore20(selectPermissions9);
3754
+ const {
3755
+ videoTrackID,
3756
+ audioTrackID,
3757
+ isLocal,
3758
+ isScreenshare,
3759
+ showSpotlight,
3760
+ showPinAction,
3761
+ peerID,
3762
+ canMinimise,
3763
+ closeSheetOnClick = () => {
3764
+ return;
3765
+ },
3766
+ openNameChangeModal = () => {
3767
+ return;
3768
+ }
3769
+ } = props;
3770
+ const { isAudioEnabled, isVideoEnabled, setVolume, toggleAudio, toggleVideo, volume } = useRemoteAVToggle(
3771
+ audioTrackID,
3772
+ videoTrackID
3773
+ );
3774
+ const { sendEvent } = useCustomEvent3({
3775
+ type: REMOTE_STOP_SCREENSHARE_TYPE
3776
+ });
3777
+ const isMobile = useMedia8(config.media.md);
3778
+ return isLocal ? (showPinAction || canMinimise) && /* @__PURE__ */ React42.createElement(React42.Fragment, null, showPinAction && /* @__PURE__ */ React42.createElement(PinActions, { audioTrackID, videoTrackID }), showSpotlight && /* @__PURE__ */ React42.createElement(SpotlightActions, { peerId: peerID, onSpotLightClick: () => closeSheetOnClick() }), canMinimise && /* @__PURE__ */ React42.createElement(MinimiseInset, null), /* @__PURE__ */ React42.createElement(
3779
+ StyledMenuTile.ItemButton,
3780
+ {
3781
+ onClick: () => {
3782
+ openNameChangeModal();
3783
+ closeSheetOnClick();
3784
+ }
3785
+ },
3786
+ /* @__PURE__ */ React42.createElement(PencilIcon2, { height: 20, width: 20 }),
3787
+ /* @__PURE__ */ React42.createElement(Text, { variant: "sm", css: { "@md": { fontWeight: "$semiBold" }, c: "$on_surface_high" } }, "Change Name")
3788
+ )) : /* @__PURE__ */ React42.createElement(React42.Fragment, null, toggleVideo ? /* @__PURE__ */ React42.createElement(
3789
+ StyledMenuTile.ItemButton,
3790
+ {
3791
+ css: spacingCSS,
3792
+ onClick: () => {
3793
+ toggleVideo();
3794
+ closeSheetOnClick();
3795
+ },
3796
+ "data-testid": isVideoEnabled ? "mute_video_participant_btn" : "unmute_video_participant_btn"
3797
+ },
3798
+ isVideoEnabled ? /* @__PURE__ */ React42.createElement(VideoOnIcon2, { height: 20, width: 20 }) : /* @__PURE__ */ React42.createElement(VideoOffIcon2, { height: 20, width: 20 }),
3799
+ /* @__PURE__ */ React42.createElement("span", null, isVideoEnabled ? "Mute" : "Request Unmute")
3800
+ ) : null, toggleAudio ? /* @__PURE__ */ React42.createElement(
3801
+ StyledMenuTile.ItemButton,
3802
+ {
3803
+ css: spacingCSS,
3804
+ onClick: () => {
3805
+ toggleAudio();
3806
+ closeSheetOnClick();
3807
+ },
3808
+ "data-testid": isVideoEnabled ? "mute_audio_participant_btn" : "unmute_audio_participant_btn"
3809
+ },
3810
+ isAudioEnabled ? /* @__PURE__ */ React42.createElement(MicOnIcon2, { height: 20, width: 20 }) : /* @__PURE__ */ React42.createElement(MicOffIcon4, { height: 20, width: 20 }),
3811
+ /* @__PURE__ */ React42.createElement("span", null, isAudioEnabled ? "Mute" : "Request Unmute")
3812
+ ) : null, audioTrackID ? /* @__PURE__ */ React42.createElement(StyledMenuTile.VolumeItem, { "data-testid": "participant_volume_slider", css: __spreadProps(__spreadValues({}, spacingCSS), { mb: "$0" }) }, /* @__PURE__ */ React42.createElement(Flex, { align: "center", gap: 1 }, /* @__PURE__ */ React42.createElement(SpeakerIcon, { height: 20, width: 20 }), /* @__PURE__ */ React42.createElement(Box, { as: "span", css: { ml: "$4" } }, "Volume (", volume, ")")), /* @__PURE__ */ React42.createElement(Slider, { css: { my: "0.5rem" }, step: 5, value: [volume], onValueChange: (e) => setVolume(e[0]) })) : null, showPinAction && /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(PinActions, { audioTrackID, videoTrackID }), showSpotlight && /* @__PURE__ */ React42.createElement(SpotlightActions, { peerId: peerID, onSpotLightClick: () => closeSheetOnClick() })), isMobile ? null : /* @__PURE__ */ React42.createElement(SimulcastLayers, { trackId: videoTrackID }), removeOthers ? /* @__PURE__ */ React42.createElement(
3813
+ StyledMenuTile.RemoveItem,
3814
+ {
3815
+ css: __spreadProps(__spreadValues({}, spacingCSS), { borderTop: "none" }),
3816
+ onClick: () => __async(void 0, null, function* () {
3817
+ try {
3818
+ yield actions.removePeer(peerID, "");
3819
+ } catch (error) {
3820
+ }
3821
+ closeSheetOnClick();
3822
+ }),
3823
+ "data-testid": "remove_participant_btn"
3824
+ },
3825
+ /* @__PURE__ */ React42.createElement(RemoveUserIcon2, { height: 20, width: 20 }),
3826
+ /* @__PURE__ */ React42.createElement("span", null, "Remove Participant")
3827
+ ) : null, removeOthers && isScreenshare ? /* @__PURE__ */ React42.createElement(
3828
+ StyledMenuTile.RemoveItem,
3829
+ {
3830
+ onClick: () => {
3831
+ sendEvent({});
3832
+ closeSheetOnClick();
3833
+ },
3834
+ css: spacingCSS
3835
+ },
3836
+ /* @__PURE__ */ React42.createElement(ShareScreenIcon2, { height: 20, width: 20 }),
3837
+ /* @__PURE__ */ React42.createElement("span", null, "Stop Screenshare")
3838
+ ) : null);
3839
+ };
3840
+
3841
+ // src/Prebuilt/components/TileMenu/TileMenu.jsx
3842
+ var TileMenu = ({
3843
+ audioTrackID,
3844
+ videoTrackID,
3845
+ peerID,
3846
+ isScreenshare = false,
3847
+ canMinimise,
3848
+ enableSpotlightingPeer = true
3849
+ }) => {
3850
+ var _a, _b;
3851
+ const [open, setOpen] = useState21(false);
3852
+ const { theme } = useTheme();
3853
+ const localPeerID = useHMSStore21(selectLocalPeerID5);
3854
+ const isLocal = localPeerID === peerID;
3855
+ const { removeOthers } = useHMSStore21(selectPermissions10);
3856
+ const { setVolume, toggleAudio, toggleVideo } = useRemoteAVToggle2(audioTrackID, videoTrackID);
3857
+ const showSpotlight = enableSpotlightingPeer;
3858
+ const isPrimaryVideoTrack = ((_a = useHMSStore21(selectVideoTrackByPeerID(peerID))) == null ? void 0 : _a.id) === videoTrackID;
3859
+ const showPinAction = audioTrackID || videoTrackID && isPrimaryVideoTrack;
3860
+ const track = useHMSStore21(selectTrackByID2(videoTrackID));
3861
+ const hideSimulcastLayers = !((_b = track == null ? void 0 : track.layerDefinitions) == null ? void 0 : _b.length) || track.degraded || !track.enabled;
3862
+ const isMobile = useMedia9(config.media.md);
3863
+ const peer = useHMSStore21(selectPeerByID2(peerID));
3864
+ const [showNameChangeModal, setShowNameChangeModal] = useState21(false);
3865
+ useDropdownList({ open, name: "TileMenu" });
3866
+ if (!(removeOthers || toggleAudio || toggleVideo || setVolume || showPinAction) && hideSimulcastLayers) {
3867
+ return null;
3868
+ }
3869
+ const openNameChangeModal = () => setShowNameChangeModal(true);
3870
+ const props = {
3871
+ isLocal,
3872
+ isScreenshare,
3873
+ audioTrackID,
3874
+ videoTrackID,
3875
+ peerID,
3876
+ isPrimaryVideoTrack,
3877
+ showSpotlight,
3878
+ showPinAction,
3879
+ canMinimise,
3880
+ openNameChangeModal
3881
+ };
3882
+ return /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(StyledMenuTile.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React43.createElement(
3883
+ StyledMenuTile.Trigger,
3884
+ {
3885
+ "data-testid": "participant_menu_btn",
3886
+ css: { bg: `${theme.colors.background_dim.value}A3`, p: "$2", w: "unset", h: "unset" },
3887
+ onClick: (e) => e.stopPropagation(),
3888
+ className: isMobile ? "__cancel-drag-event" : ""
3889
+ },
3890
+ /* @__PURE__ */ React43.createElement(VerticalMenuIcon5, { width: 20, height: 20 })
3891
+ ), isMobile ? /* @__PURE__ */ React43.createElement(Sheet.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React43.createElement(Sheet.Content, { css: { bg: "$surface_dim", pt: "$8" } }, /* @__PURE__ */ React43.createElement(
3892
+ Flex,
3893
+ {
3894
+ css: {
3895
+ color: "$on_surface_high",
3896
+ display: "flex",
3897
+ w: "100%",
3898
+ justifyContent: "space-between",
3899
+ alignItems: "center",
3900
+ px: "$10",
3901
+ pb: "$8",
3902
+ borderBottom: "1px solid $border_default"
3903
+ }
3904
+ },
3905
+ /* @__PURE__ */ React43.createElement(Box, null, /* @__PURE__ */ React43.createElement(Text, { css: { color: "$on_surface_high", fontWeight: "$semiBold" } }, peer.name, isLocal ? ` (You)` : null), (peer == null ? void 0 : peer.roleName) ? /* @__PURE__ */ React43.createElement(Text, { variant: "xs", css: { color: "$on_surface_low", mt: "$2" } }, peer.roleName) : null),
3906
+ /* @__PURE__ */ React43.createElement(Sheet.Close, { css: { color: "inherit" } }, /* @__PURE__ */ React43.createElement(CrossIcon6, null))
3907
+ ), /* @__PURE__ */ React43.createElement(Box, { css: { px: "$8", pb: "$8", maxHeight: "80vh", overflowY: "auto" } }, /* @__PURE__ */ React43.createElement(TileMenuContent, __spreadProps(__spreadValues({}, props), { closeSheetOnClick: () => setOpen(false) }))))) : /* @__PURE__ */ React43.createElement(StyledMenuTile.Content, { side: "top", align: "end", css: { maxHeight: "$80", overflowY: "auto" } }, /* @__PURE__ */ React43.createElement(TileMenuContent, __spreadValues({}, props)))), showNameChangeModal && /* @__PURE__ */ React43.createElement(ChangeNameModal, { onOpenChange: setShowNameChangeModal }));
3908
+ };
3909
+ var TileMenu_default = TileMenu;
3910
+
3911
+ // src/Prebuilt/components/peerTileUtils.jsx
3912
+ var PEER_NAME_PLACEHOLDER = "peerName";
3913
+ var labelMap = /* @__PURE__ */ new Map([
3914
+ [[true, "screen"].toString(), "Your Screen"],
3915
+ [[true, "regular"].toString(), `You (${PEER_NAME_PLACEHOLDER})`],
3916
+ [[false, "screen"].toString(), `${PEER_NAME_PLACEHOLDER}'s Screen`],
3917
+ [[false, "regular"].toString(), PEER_NAME_PLACEHOLDER],
3918
+ [[true, void 0].toString(), `You (${PEER_NAME_PLACEHOLDER})`],
3919
+ [[false, void 0].toString(), `${PEER_NAME_PLACEHOLDER}`]
3920
+ ]);
3921
+ var getVideoTileLabel = ({ peerName, isLocal, track }) => {
3922
+ const isPeerPresent = peerName !== void 0;
3923
+ if (!isPeerPresent || !track) {
3924
+ return isPeerPresent ? labelMap.get([isLocal, void 0].toString()).replace(PEER_NAME_PLACEHOLDER, peerName) : "";
3925
+ }
3926
+ const isLocallyMuted = track.volume === 0;
3927
+ let label = labelMap.get([isLocal, track.source].toString());
3928
+ if (label) {
3929
+ label = label.replace(PEER_NAME_PLACEHOLDER, peerName);
3930
+ } else {
3931
+ label = `${peerName} ${track.source}`;
3932
+ }
3933
+ return `${label}${isLocallyMuted ? " (Muted for you)" : ""}`;
3934
+ };
3935
+
3936
+ // src/Prebuilt/components/VideoTile.jsx
3937
+ var iconDims = { height: "1rem", width: "1rem" };
3938
+ var Tile = ({
3939
+ peerId,
3940
+ trackId,
3941
+ width,
3942
+ height,
3943
+ objectFit = "cover",
3944
+ canMinimise = false,
3945
+ isDragabble = false,
3946
+ rootCSS = {},
3947
+ containerCSS = {},
3948
+ enableSpotlightingPeer = true,
3949
+ hideParticipantNameOnTile = false,
3950
+ roundedVideoTile = true,
3951
+ hideAudioMuteOnTile = false,
3952
+ hideMetadataOnTile = false
3953
+ }) => {
3954
+ var _a, _b;
3955
+ const trackSelector = trackId ? selectVideoTrackByID(trackId) : selectVideoTrackByPeerID2(peerId);
3956
+ const track = useHMSStore22(trackSelector);
3957
+ const isMobile = useMedia10(config.media.md);
3958
+ const peerName = useHMSStore22(selectPeerNameByID(peerId));
3959
+ const audioTrack = useHMSStore22(selectAudioTrackByPeerID(peerId));
3960
+ const localPeerID = useHMSStore22(selectLocalPeerID6);
3961
+ const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
3962
+ const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);
3963
+ const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
3964
+ const isAudioMuted = !useHMSStore22(selectIsPeerAudioEnabled2(peerId));
3965
+ const isVideoMuted = !(track == null ? void 0 : track.enabled);
3966
+ const [isMouseHovered, setIsMouseHovered] = useState22(false);
3967
+ const isVideoDegraded = track == null ? void 0 : track.degraded;
3968
+ const isLocal = localPeerID === peerId;
3969
+ const [pinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);
3970
+ const pinned = isSameTile({
3971
+ trackId: pinnedTrackId,
3972
+ videoTrackID: track == null ? void 0 : track.id,
3973
+ audioTrackID: audioTrack == null ? void 0 : audioTrack.id
3974
+ });
3975
+ const spotlighted = useHMSStore22(selectSessionStore2(SESSION_STORE_KEY.SPOTLIGHT)) === peerId;
3976
+ const label = getVideoTileLabel({
3977
+ peerName,
3978
+ track,
3979
+ isLocal
3980
+ });
3981
+ const onHoverHandler = useCallback8((event) => {
3982
+ setIsMouseHovered(event.type === "mouseenter");
3983
+ }, []);
3984
+ const ref = useRef6(null);
3985
+ const calculatedHeight = ((_a = ref.current) == null ? void 0 : _a.clientHeight) || "";
3986
+ const calculatedWidth = ((_b = ref.current) == null ? void 0 : _b.clientWidth) || "";
3987
+ const isTileBigEnoughToShowStats = calculatedHeight >= 180 && calculatedWidth >= 180;
3988
+ const avatarSize = "medium";
3989
+ return /* @__PURE__ */ React44.createElement(
3990
+ StyledVideoTile.Root,
3991
+ {
3992
+ ref,
3993
+ css: __spreadValues({
3994
+ width,
3995
+ height
3996
+ }, rootCSS),
3997
+ "data-testid": `participant_tile_${peerName}`
3998
+ },
3999
+ peerName !== void 0 ? /* @__PURE__ */ React44.createElement(
4000
+ StyledVideoTile.Container,
4001
+ {
4002
+ onMouseEnter: onHoverHandler,
4003
+ onMouseLeave: onHoverHandler,
4004
+ noRadius: !roundedVideoTile,
4005
+ css: containerCSS
4006
+ },
4007
+ showStatsOnTiles && isTileBigEnoughToShowStats ? /* @__PURE__ */ React44.createElement(VideoTileStats, { audioTrackID: audioTrack == null ? void 0 : audioTrack.id, videoTrackID: track == null ? void 0 : track.id, peerID: peerId, isLocal }) : null,
4008
+ /* @__PURE__ */ React44.createElement(
4009
+ Video,
4010
+ {
4011
+ trackId: track == null ? void 0 : track.id,
4012
+ attach: isLocal ? void 0 : !isAudioOnly,
4013
+ mirror: mirrorLocalVideo && peerId === localPeerID && (track == null ? void 0 : track.source) === "regular" && (track == null ? void 0 : track.facingMode) !== "environment",
4014
+ noRadius: !roundedVideoTile,
4015
+ "data-testid": "participant_video_tile",
4016
+ css: {
4017
+ objectFit,
4018
+ filter: isVideoDegraded ? "blur($space$2)" : void 0,
4019
+ bg: "transparent"
4020
+ }
4021
+ }
4022
+ ),
4023
+ isVideoMuted || !isLocal && isAudioOnly ? /* @__PURE__ */ React44.createElement(StyledVideoTile.AvatarContainer, null, /* @__PURE__ */ React44.createElement(Avatar, { name: peerName || "", "data-testid": "participant_avatar_icon", size: avatarSize })) : null,
4024
+ !hideAudioMuteOnTile ? isAudioMuted ? /* @__PURE__ */ React44.createElement(PrebuiltAudioIndicator, { "data-testid": "participant_audio_mute_icon" }, /* @__PURE__ */ React44.createElement(MicOffIcon5, { style: iconDims })) : /* @__PURE__ */ React44.createElement(PrebuiltAudioIndicator, null, /* @__PURE__ */ React44.createElement(AudioLevel, { trackId: audioTrack == null ? void 0 : audioTrack.id })) : null,
4025
+ isMouseHovered || isDragabble && isMobile ? /* @__PURE__ */ React44.createElement(
4026
+ TileMenu_default,
4027
+ {
4028
+ peerID: peerId,
4029
+ audioTrackID: audioTrack == null ? void 0 : audioTrack.id,
4030
+ videoTrackID: track == null ? void 0 : track.id,
4031
+ canMinimise,
4032
+ enableSpotlightingPeer
4033
+ }
4034
+ ) : null,
4035
+ !hideMetadataOnTile && /* @__PURE__ */ React44.createElement(PeerMetadata, { peerId }),
4036
+ /* @__PURE__ */ React44.createElement(
4037
+ TileConnection_default,
4038
+ {
4039
+ hideLabel: hideParticipantNameOnTile,
4040
+ name: label,
4041
+ isTile: true,
4042
+ peerId,
4043
+ width,
4044
+ pinned,
4045
+ spotlighted
4046
+ }
4047
+ )
4048
+ ) : null
4049
+ );
4050
+ };
4051
+ var PeerMetadata = ({ peerId }) => {
4052
+ const metaData = useHMSStore22(selectPeerMetadata2(peerId));
4053
+ const isBRB = (metaData == null ? void 0 : metaData.isBRBOn) || false;
4054
+ const isHandRaised = useHMSStore22(selectHasPeerHandRaised2(peerId));
4055
+ return /* @__PURE__ */ React44.createElement(Fragment9, null, isHandRaised ? /* @__PURE__ */ React44.createElement(PrebuiltAttributeBox, { "data-testid": "raiseHand_icon_onTile" }, /* @__PURE__ */ React44.createElement(HandIcon4, { style: iconDims })) : null, isBRB ? /* @__PURE__ */ React44.createElement(PrebuiltAttributeBox, { "data-testid": "brb_icon_onTile" }, /* @__PURE__ */ React44.createElement(BrbTileIcon, { style: iconDims })) : null);
4056
+ };
4057
+ var VideoTile = React44.memo(Tile);
4058
+ var VideoTile_default = VideoTile;
4059
+
4060
+ // src/Prebuilt/components/hooks/useVideoTileLayout.ts
4061
+ import React45, { useContext } from "react";
4062
+ var VideoTileContext = React45.createContext({
4063
+ enableSpotlightingPeer: true,
4064
+ hideParticipantNameOnTile: false,
4065
+ roundedVideoTile: true,
4066
+ hideAudioMuteOnTile: false,
4067
+ hideAudioLevelOnTile: false,
4068
+ objectFit: "contain",
4069
+ hideMetadataOnTile: false
4070
+ });
4071
+ var useVideoTileContext = () => {
4072
+ const context = useContext(VideoTileContext);
4073
+ return context;
4074
+ };
4075
+
4076
+ // src/Prebuilt/components/InsetTile.tsx
4077
+ var MinimisedTile = ({ setMinimised }) => {
4078
+ return /* @__PURE__ */ React46.createElement(Flex, { align: "center", css: { gap: "$6", r: "$1", bg: "$surface_default", p: "$4", color: "$on_surface_high" } }, /* @__PURE__ */ React46.createElement(AudioVideoToggle, { hideOptions: true }), /* @__PURE__ */ React46.createElement(Text, null, "You"), /* @__PURE__ */ React46.createElement(
4079
+ IconButton_default,
4080
+ {
4081
+ className: "__cancel-drag-event",
4082
+ onClick: () => setMinimised(false),
4083
+ css: { bg: "transparent", border: "transparent" }
4084
+ },
4085
+ /* @__PURE__ */ React46.createElement(ExpandIcon2, null)
4086
+ ));
3378
4087
  };
3379
4088
  var insetHeightPx = 180;
3380
4089
  var insetMaxWidthPx = 240;
3381
4090
  var defaultMobileAspectRatio = 9 / 16;
3382
4091
  var desktopAspectRatio = 1 / defaultMobileAspectRatio;
3383
4092
  var InsetTile = () => {
3384
- const isMobile = useMedia7(config.media.md);
3385
- const isLandscape = useMedia7(config.media.ls);
3386
- const localPeer = useHMSStore18(selectLocalPeer);
4093
+ const isMobile = useMedia11(config.media.md);
4094
+ const isLandscape = useMedia11(config.media.ls);
4095
+ const localPeer = useHMSStore23(selectLocalPeer);
3387
4096
  const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);
3388
- const videoTrack = useHMSStore18(selectVideoTrackByID(localPeer == null ? void 0 : localPeer.videoTrack));
3389
- const isAllowedToPublish = useHMSStore18(selectIsAllowedToPublish2);
4097
+ const videoTrack = useHMSStore23(selectVideoTrackByID2(localPeer == null ? void 0 : localPeer.videoTrack));
4098
+ const isAllowedToPublish = useHMSStore23(selectIsAllowedToPublish2);
3390
4099
  const videoTileProps = useVideoTileContext();
3391
4100
  let aspectRatio = isMobile ? defaultMobileAspectRatio : desktopAspectRatio;
3392
4101
  if ((videoTrack == null ? void 0 : videoTrack.width) && (videoTrack == null ? void 0 : videoTrack.height) && !isMobile) {
@@ -3398,8 +4107,8 @@ var InsetTile = () => {
3398
4107
  width = 240;
3399
4108
  height = width / aspectRatio;
3400
4109
  }
3401
- const nodeRef = useRef6(null);
3402
- useEffect8(() => {
4110
+ const nodeRef = useRef7(null);
4111
+ useEffect10(() => {
3403
4112
  const node = nodeRef.current;
3404
4113
  if (!node || !window.ResizeObserver) {
3405
4114
  return;
@@ -3420,7 +4129,7 @@ var InsetTile = () => {
3420
4129
  if (!isAllowedToPublish.video && !isAllowedToPublish.audio) {
3421
4130
  return null;
3422
4131
  }
3423
- return /* @__PURE__ */ React41.createElement(Draggable, { bounds: "parent", nodeRef, cancel: ".__cancel-drag-event" }, /* @__PURE__ */ React41.createElement(
4132
+ return /* @__PURE__ */ React46.createElement(Draggable, { bounds: "parent", nodeRef, cancel: ".__cancel-drag-event" }, /* @__PURE__ */ React46.createElement(
3424
4133
  Box,
3425
4134
  {
3426
4135
  ref: nodeRef,
@@ -3436,7 +4145,7 @@ var InsetTile = () => {
3436
4145
  h: height
3437
4146
  } : {})
3438
4147
  },
3439
- minimised ? /* @__PURE__ */ React41.createElement(MinimisedTile, { setMinimised }) : /* @__PURE__ */ React41.createElement(
4148
+ minimised ? /* @__PURE__ */ React46.createElement(MinimisedTile, { setMinimised }) : /* @__PURE__ */ React46.createElement(
3440
4149
  VideoTile_default,
3441
4150
  __spreadProps(__spreadValues({
3442
4151
  peerId: localPeer == null ? void 0 : localPeer.id,
@@ -3458,8 +4167,8 @@ var InsetTile = () => {
3458
4167
  };
3459
4168
 
3460
4169
  // src/Prebuilt/components/Pagination.tsx
3461
- import React42, { useEffect as useEffect9 } from "react";
3462
- import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon2 } from "@100mslive/react-icons";
4170
+ import React47, { useEffect as useEffect11 } from "react";
4171
+ import { ChevronLeftIcon as ChevronLeftIcon3, ChevronRightIcon as ChevronRightIcon3 } from "@100mslive/react-icons";
3463
4172
  var Pagination = ({
3464
4173
  page,
3465
4174
  onPageChange,
@@ -3475,7 +4184,7 @@ var Pagination = ({
3475
4184
  e.stopPropagation();
3476
4185
  onPageChange(Math.max(page - 1, 0));
3477
4186
  };
3478
- useEffect9(() => {
4187
+ useEffect11(() => {
3479
4188
  if (page >= numPages) {
3480
4189
  onPageChange(Math.max(0, numPages - 1));
3481
4190
  }
@@ -3483,7 +4192,7 @@ var Pagination = ({
3483
4192
  if (numPages <= 1) {
3484
4193
  return null;
3485
4194
  }
3486
- return /* @__PURE__ */ React42.createElement(StyledPagination.Root, { css: { flexShrink: 0 } }, /* @__PURE__ */ React42.createElement(StyledPagination.Chevron, { disabled: disableLeft, onClick: prevPage }, /* @__PURE__ */ React42.createElement(ChevronLeftIcon2, { width: 16, height: 16, style: { cursor: disableLeft ? "not-allowed" : "pointer" } })), numPages <= 5 ? /* @__PURE__ */ React42.createElement(StyledPagination.Dots, null, [...Array(numPages)].map((_, i) => /* @__PURE__ */ React42.createElement(
4195
+ return /* @__PURE__ */ React47.createElement(StyledPagination.Root, { css: { flexShrink: 0 } }, /* @__PURE__ */ React47.createElement(StyledPagination.Chevron, { disabled: disableLeft, onClick: prevPage }, /* @__PURE__ */ React47.createElement(ChevronLeftIcon3, { width: 16, height: 16, style: { cursor: disableLeft ? "not-allowed" : "pointer" } })), numPages <= 5 ? /* @__PURE__ */ React47.createElement(StyledPagination.Dots, null, [...Array(numPages)].map((_, i) => /* @__PURE__ */ React47.createElement(
3487
4196
  StyledPagination.Dot,
3488
4197
  {
3489
4198
  key: i,
@@ -3493,15 +4202,15 @@ var Pagination = ({
3493
4202
  onPageChange(i);
3494
4203
  }
3495
4204
  }
3496
- ))) : null, /* @__PURE__ */ React42.createElement(StyledPagination.Chevron, { disabled: disableRight, onClick: nextPage }, /* @__PURE__ */ React42.createElement(ChevronRightIcon2, { width: 16, height: 16, style: { cursor: disableRight ? "not-allowed" : "pointer" } })));
4205
+ ))) : null, /* @__PURE__ */ React47.createElement(StyledPagination.Chevron, { disabled: disableRight, onClick: nextPage }, /* @__PURE__ */ React47.createElement(ChevronRightIcon3, { width: 16, height: 16, style: { cursor: disableRight ? "not-allowed" : "pointer" } })));
3497
4206
  };
3498
4207
 
3499
4208
  // src/Prebuilt/components/VideoLayouts/Grid.tsx
3500
- import React43 from "react";
3501
- var Grid = React43.forwardRef(
4209
+ import React48 from "react";
4210
+ var Grid = React48.forwardRef(
3502
4211
  ({ tiles, edgeToEdge }, ref) => {
3503
4212
  const videoTileProps = useVideoTileContext();
3504
- return /* @__PURE__ */ React43.createElement(
4213
+ return /* @__PURE__ */ React48.createElement(
3505
4214
  Box,
3506
4215
  {
3507
4216
  ref,
@@ -3519,7 +4228,7 @@ var Grid = React43.forwardRef(
3519
4228
  },
3520
4229
  tiles == null ? void 0 : tiles.map((tile) => {
3521
4230
  var _a, _b, _c, _d;
3522
- return /* @__PURE__ */ React43.createElement(
4231
+ return /* @__PURE__ */ React48.createElement(
3523
4232
  VideoTile_default,
3524
4233
  __spreadValues({
3525
4234
  key: ((_a = tile.track) == null ? void 0 : _a.id) || ((_b = tile.peer) == null ? void 0 : _b.id),
@@ -3537,8 +4246,8 @@ var Grid = React43.forwardRef(
3537
4246
  );
3538
4247
 
3539
4248
  // src/Prebuilt/components/hooks/useTileLayout.tsx
3540
- import { useEffect as useEffect10, useMemo as useMemo2, useState as useState20 } from "react";
3541
- import { useMeasure as useMeasure2, useMedia as useMedia8 } from "react-use";
4249
+ import { useEffect as useEffect12, useMemo as useMemo2, useState as useState23 } from "react";
4250
+ import { useMeasure as useMeasure2, useMedia as useMedia12 } from "react-use";
3542
4251
  import {
3543
4252
  getPeersWithTiles,
3544
4253
  selectTracksMap as selectTracksMap3,
@@ -3574,9 +4283,9 @@ var useTileLayout = ({
3574
4283
  }) => {
3575
4284
  const vanillaStore = useHMSVanillaStore3();
3576
4285
  const [ref, { width, height }] = useMeasure2();
3577
- const isMobile = useMedia8(config.media.lg);
3578
- const [pagesWithTiles, setPagesWithTiles] = useState20([]);
3579
- useEffect10(() => {
4286
+ const isMobile = useMedia12(config.media.lg);
4287
+ const [pagesWithTiles, setPagesWithTiles] = useState23([]);
4288
+ useEffect12(() => {
3580
4289
  if (width === 0 || height === 0) {
3581
4290
  return;
3582
4291
  }
@@ -3643,8 +4352,8 @@ var useTileLayout = ({
3643
4352
  // src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
3644
4353
  function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSize, edgeToEdge }) {
3645
4354
  var _a;
3646
- const localPeer = useHMSStore19(selectLocalPeer2);
3647
- const isMobile = useMedia9(config.media.md);
4355
+ const localPeer = useHMSStore24(selectLocalPeer2);
4356
+ const isMobile = useMedia13(config.media.md);
3648
4357
  let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
3649
4358
  maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;
3650
4359
  let pageList = usePagesWithTiles({
@@ -3664,14 +4373,14 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
3664
4373
  maxTileCount,
3665
4374
  edgeToEdge
3666
4375
  });
3667
- const [page, setPage] = useState21(0);
4376
+ const [page, setPage] = useState24(0);
3668
4377
  const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
3669
- useEffect11(() => {
4378
+ useEffect13(() => {
3670
4379
  if (pageSize > 0) {
3671
4380
  onPageSize == null ? void 0 : onPageSize(pageSize);
3672
4381
  }
3673
4382
  }, [pageSize, onPageSize]);
3674
- return /* @__PURE__ */ React44.createElement(Flex, { direction: "column", css: { flex: "1 1 0", h: "100%", position: "relative", minWidth: 0 } }, /* @__PURE__ */ React44.createElement(Grid, { tiles: pagesWithTiles[page], ref, edgeToEdge }), !edgeToEdge && /* @__PURE__ */ React44.createElement(
4383
+ return /* @__PURE__ */ React49.createElement(Flex, { direction: "column", css: { flex: "1 1 0", h: "100%", position: "relative", minWidth: 0 } }, /* @__PURE__ */ React49.createElement(Grid, { tiles: pagesWithTiles[page], ref, edgeToEdge }), !edgeToEdge && /* @__PURE__ */ React49.createElement(
3675
4384
  Pagination,
3676
4385
  {
3677
4386
  page,
@@ -3681,20 +4390,20 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
3681
4390
  },
3682
4391
  numPages: pagesWithTiles.length
3683
4392
  }
3684
- ), isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== (localPeer == null ? void 0 : localPeer.id) && /* @__PURE__ */ React44.createElement(InsetTile, null));
4393
+ ), isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== (localPeer == null ? void 0 : localPeer.id) && /* @__PURE__ */ React49.createElement(InsetTile, null));
3685
4394
  }
3686
4395
 
3687
4396
  // src/Prebuilt/components/VideoLayouts/RoleProminence.tsx
3688
- import React47, { useEffect as useEffect13, useState as useState23 } from "react";
3689
- import { selectLocalPeer as selectLocalPeer3, useHMSStore as useHMSStore20 } from "@100mslive/react-sdk";
4397
+ import React52, { useEffect as useEffect15, useState as useState26 } from "react";
4398
+ import { selectLocalPeer as selectLocalPeer3, useHMSStore as useHMSStore25 } from "@100mslive/react-sdk";
3690
4399
 
3691
4400
  // src/Prebuilt/components/SecondaryTiles.tsx
3692
- import React46, { useEffect as useEffect12, useState as useState22 } from "react";
3693
- import { useMedia as useMedia10 } from "react-use";
4401
+ import React51, { useEffect as useEffect14, useState as useState25 } from "react";
4402
+ import { useMedia as useMedia14 } from "react-use";
3694
4403
 
3695
4404
  // src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx
3696
- import React45 from "react";
3697
- var Root = ({ children, edgeToEdge }) => /* @__PURE__ */ React45.createElement(
4405
+ import React50 from "react";
4406
+ var Root = ({ children, edgeToEdge }) => /* @__PURE__ */ React50.createElement(
3698
4407
  Flex,
3699
4408
  {
3700
4409
  direction: "column",
@@ -3703,7 +4412,7 @@ var Root = ({ children, edgeToEdge }) => /* @__PURE__ */ React45.createElement(
3703
4412
  children
3704
4413
  );
3705
4414
  var ProminentSection = ({ children, css = {} }) => {
3706
- return /* @__PURE__ */ React45.createElement(Flex, { direction: "column", css: __spreadValues({ flex: "1 1 0", gap: "$2", minHeight: 0 }, css) }, children);
4415
+ return /* @__PURE__ */ React50.createElement(Flex, { direction: "column", css: __spreadValues({ flex: "1 1 0", gap: "$2", minHeight: 0 }, css) }, children);
3707
4416
  };
3708
4417
  var SecondarySection = ({
3709
4418
  tiles,
@@ -3714,12 +4423,12 @@ var SecondarySection = ({
3714
4423
  if (!(tiles == null ? void 0 : tiles.length)) {
3715
4424
  return null;
3716
4425
  }
3717
- return /* @__PURE__ */ React45.createElement(
4426
+ return /* @__PURE__ */ React50.createElement(
3718
4427
  Box,
3719
4428
  {
3720
4429
  css: {
3721
4430
  display: "grid",
3722
- gridTemplateRows: React45.Children.count(children) > 0 ? "136px auto" : "154px",
4431
+ gridTemplateRows: React50.Children.count(children) > 0 ? "136px auto" : "154px",
3723
4432
  gridTemplateColumns: `repeat(${tiles.length}, minmax(0, 1fr))`,
3724
4433
  margin: "0 auto",
3725
4434
  gap: "$2 $4",
@@ -3729,7 +4438,7 @@ var SecondarySection = ({
3729
4438
  },
3730
4439
  tiles.map((tile) => {
3731
4440
  var _a, _b, _c, _d;
3732
- return /* @__PURE__ */ React45.createElement(
4441
+ return /* @__PURE__ */ React50.createElement(
3733
4442
  VideoTile_default,
3734
4443
  __spreadValues({
3735
4444
  key: ((_a = tile.track) == null ? void 0 : _a.id) || ((_b = tile.peer) == null ? void 0 : _b.id),
@@ -3746,7 +4455,7 @@ var SecondarySection = ({
3746
4455
  }, tileLayoutProps)
3747
4456
  );
3748
4457
  }),
3749
- /* @__PURE__ */ React45.createElement(Box, { css: { gridColumn: `1/span ${tiles.length}` } }, children)
4458
+ /* @__PURE__ */ React50.createElement(Box, { css: { gridColumn: `1/span ${tiles.length}` } }, children)
3750
4459
  );
3751
4460
  };
3752
4461
  var ProminenceLayout = {
@@ -3758,17 +4467,17 @@ var ProminenceLayout = {
3758
4467
  // src/Prebuilt/components/SecondaryTiles.tsx
3759
4468
  var SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
3760
4469
  var _a;
3761
- const isMobile = useMedia10(config.media.md);
4470
+ const isMobile = useMedia14(config.media.md);
3762
4471
  const maxTileCount = isMobile ? 2 : 4;
3763
4472
  const pagesWithTiles = usePagesWithTiles({ peers, maxTileCount });
3764
- const [page, setPage] = useState22(0);
4473
+ const [page, setPage] = useState25(0);
3765
4474
  const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
3766
- useEffect12(() => {
4475
+ useEffect14(() => {
3767
4476
  if (pageSize > 0) {
3768
4477
  onPageSize == null ? void 0 : onPageSize(pageSize);
3769
4478
  }
3770
4479
  }, [pageSize, onPageSize]);
3771
- return /* @__PURE__ */ React46.createElement(ProminenceLayout.SecondarySection, { tiles: pagesWithTiles[page], edgeToEdge }, !edgeToEdge && /* @__PURE__ */ React46.createElement(
4480
+ return /* @__PURE__ */ React51.createElement(ProminenceLayout.SecondarySection, { tiles: pagesWithTiles[page], edgeToEdge }, !edgeToEdge && /* @__PURE__ */ React51.createElement(
3772
4481
  Pagination,
3773
4482
  {
3774
4483
  page,
@@ -3826,7 +4535,7 @@ function RoleProminence({
3826
4535
  }) {
3827
4536
  var _a;
3828
4537
  const { prominentPeers, secondaryPeers } = useRoleProminencePeers(prominentRoles, peers, isInsetEnabled);
3829
- const localPeer = useHMSStore20(selectLocalPeer3);
4538
+ const localPeer = useHMSStore25(selectLocalPeer3);
3830
4539
  const maxTileCount = 4;
3831
4540
  const pageList = usePagesWithTiles({
3832
4541
  peers: prominentPeers,
@@ -3836,14 +4545,14 @@ function RoleProminence({
3836
4545
  pageList,
3837
4546
  maxTileCount
3838
4547
  });
3839
- const [page, setPage] = useState23(0);
4548
+ const [page, setPage] = useState26(0);
3840
4549
  const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
3841
- useEffect13(() => {
4550
+ useEffect15(() => {
3842
4551
  if (pageSize > 0) {
3843
4552
  onPageSize == null ? void 0 : onPageSize(pageSize);
3844
4553
  }
3845
4554
  }, [pageSize, onPageSize]);
3846
- return /* @__PURE__ */ React47.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ React47.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React47.createElement(Grid, { ref, tiles: pagesWithTiles[page] })), !edgeToEdge && /* @__PURE__ */ React47.createElement(
4555
+ return /* @__PURE__ */ React52.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ React52.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React52.createElement(Grid, { ref, tiles: pagesWithTiles[page] })), !edgeToEdge && /* @__PURE__ */ React52.createElement(
3847
4556
  Pagination,
3848
4557
  {
3849
4558
  page,
@@ -3853,34 +4562,34 @@ function RoleProminence({
3853
4562
  },
3854
4563
  numPages: pagesWithTiles.length
3855
4564
  }
3856
- ), /* @__PURE__ */ React47.createElement(SecondaryTiles, { peers: secondaryPeers, isInsetEnabled, edgeToEdge }), isInsetEnabled && localPeer && !prominentPeers.includes(localPeer) && /* @__PURE__ */ React47.createElement(InsetTile, null));
4565
+ ), /* @__PURE__ */ React52.createElement(SecondaryTiles, { peers: secondaryPeers, isInsetEnabled, edgeToEdge }), isInsetEnabled && localPeer && !prominentPeers.includes(localPeer) && /* @__PURE__ */ React52.createElement(InsetTile, null));
3857
4566
  }
3858
4567
 
3859
4568
  // src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
3860
- import React50, { useEffect as useEffect14, useMemo as useMemo5, useState as useState25 } from "react";
3861
- import { useMedia as useMedia11 } from "react-use";
3862
- import { selectPeersScreenSharing, useHMSStore as useHMSStore22 } from "@100mslive/react-sdk";
4569
+ import React55, { useEffect as useEffect16, useMemo as useMemo5, useState as useState28 } from "react";
4570
+ import { useMedia as useMedia15 } from "react-use";
4571
+ import { selectPeersScreenSharing, useHMSStore as useHMSStore27 } from "@100mslive/react-sdk";
3863
4572
 
3864
4573
  // src/Prebuilt/components/ScreenshareTile.jsx
3865
- import React49, { useRef as useRef7, useState as useState24 } from "react";
4574
+ import React54, { useRef as useRef8, useState as useState27 } from "react";
3866
4575
  import { useFullscreen as useFullscreen2 } from "react-use";
3867
4576
  import screenfull2 from "screenfull";
3868
4577
  import {
3869
- selectLocalPeerID as selectLocalPeerID5,
3870
- selectPeerByID as selectPeerByID2,
4578
+ selectLocalPeerID as selectLocalPeerID7,
4579
+ selectPeerByID as selectPeerByID3,
3871
4580
  selectScreenShareAudioByPeerID,
3872
4581
  selectScreenShareByPeerID,
3873
- useHMSStore as useHMSStore21
4582
+ useHMSStore as useHMSStore26
3874
4583
  } from "@100mslive/react-sdk";
3875
- import { ExpandIcon as ExpandIcon3, ShrinkIcon } from "@100mslive/react-icons";
4584
+ import { ExpandIcon as ExpandIcon3, ShrinkIcon as ShrinkIcon2 } from "@100mslive/react-icons";
3876
4585
 
3877
4586
  // src/Prebuilt/components/ScreenshareDisplay.jsx
3878
- import React48 from "react";
3879
- import { useHMSActions as useHMSActions14 } from "@100mslive/react-sdk";
3880
- import { CrossIcon as CrossIcon5, ShareScreenIcon as ShareScreenIcon2 } from "@100mslive/react-icons";
4587
+ import React53 from "react";
4588
+ import { useHMSActions as useHMSActions16 } from "@100mslive/react-sdk";
4589
+ import { CrossIcon as CrossIcon7, ShareScreenIcon as ShareScreenIcon3 } from "@100mslive/react-icons";
3881
4590
  var ScreenshareDisplay = () => {
3882
- const hmsActions = useHMSActions14();
3883
- return /* @__PURE__ */ React48.createElement(
4591
+ const hmsActions = useHMSActions16();
4592
+ return /* @__PURE__ */ React53.createElement(
3884
4593
  Flex,
3885
4594
  {
3886
4595
  direction: "column",
@@ -3892,9 +4601,9 @@ var ScreenshareDisplay = () => {
3892
4601
  color: "$on_surface_high"
3893
4602
  }
3894
4603
  },
3895
- /* @__PURE__ */ React48.createElement(ShareScreenIcon2, { width: 48, height: 48 }),
3896
- /* @__PURE__ */ React48.createElement(Text, { variant: "h5", css: { m: "$8 0" } }, "You are sharing your screen"),
3897
- /* @__PURE__ */ React48.createElement(
4604
+ /* @__PURE__ */ React53.createElement(ShareScreenIcon3, { width: 48, height: 48 }),
4605
+ /* @__PURE__ */ React53.createElement(Text, { variant: "h5", css: { m: "$8 0" } }, "You are sharing your screen"),
4606
+ /* @__PURE__ */ React53.createElement(
3898
4607
  Button,
3899
4608
  {
3900
4609
  variant: "danger",
@@ -3904,7 +4613,7 @@ var ScreenshareDisplay = () => {
3904
4613
  }),
3905
4614
  "data-testid": "stop_screen_share_btn"
3906
4615
  },
3907
- /* @__PURE__ */ React48.createElement(CrossIcon5, { width: 18, height: 18 }),
4616
+ /* @__PURE__ */ React53.createElement(CrossIcon7, { width: 18, height: 18 }),
3908
4617
  "\xA0 Stop screen share"
3909
4618
  )
3910
4619
  );
@@ -3919,22 +4628,22 @@ var labelStyles = {
3919
4628
  transform: "none",
3920
4629
  flexShrink: 0
3921
4630
  };
3922
- var Tile = ({ peerId, width = "100%", height = "100%" }) => {
3923
- const isLocal = useHMSStore21(selectLocalPeerID5) === peerId;
3924
- const track = useHMSStore21(selectScreenShareByPeerID(peerId));
3925
- const peer = useHMSStore21(selectPeerByID2(peerId));
4631
+ var Tile2 = ({ peerId, width = "100%", height = "100%" }) => {
4632
+ const isLocal = useHMSStore26(selectLocalPeerID7) === peerId;
4633
+ const track = useHMSStore26(selectScreenShareByPeerID(peerId));
4634
+ const peer = useHMSStore26(selectPeerByID3(peerId));
3926
4635
  const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
3927
- const [isMouseHovered, setIsMouseHovered] = useState24(false);
4636
+ const [isMouseHovered, setIsMouseHovered] = useState27(false);
3928
4637
  const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
3929
- const fullscreenRef = useRef7(null);
3930
- const [fullscreen, setFullscreen] = useState24(false);
4638
+ const fullscreenRef = useRef8(null);
4639
+ const [fullscreen, setFullscreen] = useState27(false);
3931
4640
  const isFullscreen = useFullscreen2(fullscreenRef, fullscreen, {
3932
4641
  onClose: () => setFullscreen(false)
3933
4642
  });
3934
4643
  const isFullScreenSupported = screenfull2.isEnabled;
3935
- const audioTrack = useHMSStore21(selectScreenShareAudioByPeerID(peer == null ? void 0 : peer.id));
4644
+ const audioTrack = useHMSStore26(selectScreenShareAudioByPeerID(peer == null ? void 0 : peer.id));
3936
4645
  if (isLocal && !["browser", "window", "application"].includes(track == null ? void 0 : track.displaySurface)) {
3937
- return /* @__PURE__ */ React49.createElement(ScreenshareDisplay, null);
4646
+ return /* @__PURE__ */ React54.createElement(ScreenshareDisplay, null);
3938
4647
  }
3939
4648
  if (!peer) {
3940
4649
  return null;
@@ -3944,7 +4653,7 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
3944
4653
  isLocal: false,
3945
4654
  track
3946
4655
  });
3947
- return /* @__PURE__ */ React49.createElement(StyledVideoTile.Root, { css: { width, height, p: 0, minHeight: 0 }, "data-testid": "screenshare_tile" }, /* @__PURE__ */ React49.createElement(
4656
+ return /* @__PURE__ */ React54.createElement(StyledVideoTile.Root, { css: { width, height, p: 0, minHeight: 0 }, "data-testid": "screenshare_tile" }, /* @__PURE__ */ React54.createElement(
3948
4657
  StyledVideoTile.Container,
3949
4658
  {
3950
4659
  transparentBg: true,
@@ -3955,9 +4664,9 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
3955
4664
  setIsMouseHovered(false);
3956
4665
  }
3957
4666
  },
3958
- showStatsOnTiles ? /* @__PURE__ */ React49.createElement(VideoTileStats, { audioTrackID: audioTrack == null ? void 0 : audioTrack.id, videoTrackID: track == null ? void 0 : track.id, peerID: peerId, isLocal }) : null,
3959
- isFullScreenSupported && isMouseHovered ? /* @__PURE__ */ React49.createElement(StyledVideoTile.FullScreenButton, { onClick: () => setFullscreen(!fullscreen) }, isFullscreen ? /* @__PURE__ */ React49.createElement(ShrinkIcon, null) : /* @__PURE__ */ React49.createElement(ExpandIcon3, null)) : null,
3960
- track ? /* @__PURE__ */ React49.createElement(
4667
+ showStatsOnTiles ? /* @__PURE__ */ React54.createElement(VideoTileStats, { audioTrackID: audioTrack == null ? void 0 : audioTrack.id, videoTrackID: track == null ? void 0 : track.id, peerID: peerId, isLocal }) : null,
4668
+ isFullScreenSupported && isMouseHovered ? /* @__PURE__ */ React54.createElement(StyledVideoTile.FullScreenButton, { onClick: () => setFullscreen(!fullscreen) }, isFullscreen ? /* @__PURE__ */ React54.createElement(ShrinkIcon2, null) : /* @__PURE__ */ React54.createElement(ExpandIcon3, null)) : null,
4669
+ track ? /* @__PURE__ */ React54.createElement(
3961
4670
  Video,
3962
4671
  {
3963
4672
  screenShare: true,
@@ -3967,8 +4676,8 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
3967
4676
  css: { minHeight: 0 }
3968
4677
  }
3969
4678
  ) : null,
3970
- /* @__PURE__ */ React49.createElement(StyledVideoTile.Info, { css: labelStyles }, label),
3971
- isMouseHovered && !peer.isLocal ? /* @__PURE__ */ React49.createElement(
4679
+ /* @__PURE__ */ React54.createElement(StyledVideoTile.Info, { css: labelStyles }, label),
4680
+ isMouseHovered && !peer.isLocal ? /* @__PURE__ */ React54.createElement(
3972
4681
  TileMenu_default,
3973
4682
  {
3974
4683
  isScreenshare: true,
@@ -3980,28 +4689,28 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
3980
4689
  ) : null
3981
4690
  ));
3982
4691
  };
3983
- var ScreenshareTile = React49.memo(Tile);
4692
+ var ScreenshareTile = React54.memo(Tile2);
3984
4693
  var ScreenshareTile_default = ScreenshareTile;
3985
4694
 
3986
4695
  // src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
3987
4696
  var ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
3988
4697
  var _a;
3989
- const peersSharing = useHMSStore22(selectPeersScreenSharing);
4698
+ const peersSharing = useHMSStore27(selectPeersScreenSharing);
3990
4699
  const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
3991
- const [page, setPage] = useState25(0);
4700
+ const [page, setPage] = useState28(0);
3992
4701
  const activeSharePeer = peersSharing[page];
3993
- const isMobile = useMedia11(config.media.md);
4702
+ const isMobile = useMedia15(config.media.md);
3994
4703
  const secondaryPeers = useMemo5(
3995
4704
  () => isMobile ? activeSharePeer ? [activeSharePeer, ...peers.filter((p) => p.id !== (activeSharePeer == null ? void 0 : activeSharePeer.id))] : peers : peers.filter((p) => p.id !== (activeSharePeer == null ? void 0 : activeSharePeer.id)),
3996
4705
  [activeSharePeer, peers, isMobile]
3997
4706
  );
3998
- useEffect14(() => {
4707
+ useEffect16(() => {
3999
4708
  setActiveScreenSharePeer(isMobile ? "" : activeSharePeer == null ? void 0 : activeSharePeer.id);
4000
4709
  return () => {
4001
4710
  setActiveScreenSharePeer("");
4002
4711
  };
4003
4712
  }, [activeSharePeer == null ? void 0 : activeSharePeer.id, isMobile, setActiveScreenSharePeer]);
4004
- return /* @__PURE__ */ React50.createElement(ProminenceLayout.Root, { edgeToEdge }, /* @__PURE__ */ React50.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React50.createElement(ScreenshareTile_default, { peerId: (_a = peersSharing[page]) == null ? void 0 : _a.id }), !edgeToEdge && /* @__PURE__ */ React50.createElement(Pagination, { page, onPageChange: setPage, numPages: peersSharing.length })), /* @__PURE__ */ React50.createElement(
4713
+ return /* @__PURE__ */ React55.createElement(ProminenceLayout.Root, { edgeToEdge }, /* @__PURE__ */ React55.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React55.createElement(ScreenshareTile_default, { peerId: (_a = peersSharing[page]) == null ? void 0 : _a.id }), !edgeToEdge && /* @__PURE__ */ React55.createElement(Pagination, { page, onPageChange: setPage, numPages: peersSharing.length })), /* @__PURE__ */ React55.createElement(
4005
4714
  SecondaryTiles,
4006
4715
  {
4007
4716
  peers: secondaryPeers,
@@ -4106,9 +4815,9 @@ var GridLayout = ({
4106
4815
  edge_to_edge = false,
4107
4816
  hide_metadata_on_tile = false
4108
4817
  }) => {
4109
- const peerSharing = useHMSStore23(selectPeerScreenSharing);
4818
+ const peerSharing = useHMSStore28(selectPeerScreenSharing);
4110
4819
  const pinnedTrack = usePinnedTrack();
4111
- const peers = useHMSStore23(selectPeers2);
4820
+ const peers = useHMSStore28(selectPeers2);
4112
4821
  const isRoleProminence = prominentRoles.length && peers.some(
4113
4822
  (peer) => peer.roleName && prominentRoles.includes(peer.roleName) && (peer.videoTrack || peer.audioTrack)
4114
4823
  ) || pinnedTrack;
@@ -4119,10 +4828,10 @@ var GridLayout = ({
4119
4828
  return peers;
4120
4829
  }, [isInsetEnabled, isRoleProminence, peerSharing, peers]);
4121
4830
  const vanillaStore = useHMSVanillaStore4();
4122
- const [sortedPeers, setSortedPeers] = useState26(updatedPeers);
4831
+ const [sortedPeers, setSortedPeers] = useState29(updatedPeers);
4123
4832
  const peersSorter = useMemo6(() => new PeersSorter_default(vanillaStore), [vanillaStore]);
4124
- const [pageSize, setPageSize] = useState26(0);
4125
- const [mainPage, setMainPage] = useState26(0);
4833
+ const [pageSize, setPageSize] = useState29(0);
4834
+ const [mainPage, setMainPage] = useState29(0);
4126
4835
  const tileLayout = {
4127
4836
  enableSpotlightingPeer: enable_spotlighting_peer,
4128
4837
  hideParticipantNameOnTile: hide_participant_name_on_tile,
@@ -4131,7 +4840,7 @@ var GridLayout = ({
4131
4840
  hideMetadataOnTile: hide_metadata_on_tile,
4132
4841
  objectFit: video_object_fit
4133
4842
  };
4134
- useEffect15(() => {
4843
+ useEffect17(() => {
4135
4844
  if (mainPage !== 0) {
4136
4845
  return;
4137
4846
  }
@@ -4142,7 +4851,7 @@ var GridLayout = ({
4142
4851
  peersSorter.onUpdate(setSortedPeers);
4143
4852
  }, [mainPage, peersSorter, updatedPeers, pageSize]);
4144
4853
  if (peerSharing) {
4145
- return /* @__PURE__ */ React51.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React51.createElement(
4854
+ return /* @__PURE__ */ React56.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React56.createElement(
4146
4855
  ScreenshareLayout,
4147
4856
  {
4148
4857
  peers: sortedPeers,
@@ -4152,7 +4861,7 @@ var GridLayout = ({
4152
4861
  }
4153
4862
  ));
4154
4863
  } else if (isRoleProminence) {
4155
- return /* @__PURE__ */ React51.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React51.createElement(
4864
+ return /* @__PURE__ */ React56.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React56.createElement(
4156
4865
  RoleProminence,
4157
4866
  {
4158
4867
  peers: sortedPeers,
@@ -4164,7 +4873,7 @@ var GridLayout = ({
4164
4873
  }
4165
4874
  ));
4166
4875
  }
4167
- return /* @__PURE__ */ React51.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React51.createElement(
4876
+ return /* @__PURE__ */ React56.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React56.createElement(
4168
4877
  EqualProminence,
4169
4878
  {
4170
4879
  peers: sortedPeers,
@@ -4177,46 +4886,46 @@ var GridLayout = ({
4177
4886
  };
4178
4887
 
4179
4888
  // src/Prebuilt/layouts/EmbedView.jsx
4180
- import React52, { useCallback as useCallback8, useEffect as useEffect16, useMemo as useMemo7, useRef as useRef8, useState as useState27 } from "react";
4889
+ import React57, { useCallback as useCallback9, useEffect as useEffect18, useMemo as useMemo7, useRef as useRef9, useState as useState30 } from "react";
4181
4890
  import {
4182
4891
  selectPeers as selectPeers3,
4183
4892
  selectPeerScreenSharing as selectPeerScreenSharing2,
4184
4893
  throwErrorHandler,
4185
- useHMSStore as useHMSStore24,
4894
+ useHMSStore as useHMSStore29,
4186
4895
  useScreenShare as useScreenShare3
4187
4896
  } from "@100mslive/react-sdk";
4188
4897
  var EmbedView = () => {
4189
- return /* @__PURE__ */ React52.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React52.createElement(EmbedComponent, null));
4898
+ return /* @__PURE__ */ React57.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React57.createElement(EmbedComponent, null));
4190
4899
  };
4191
4900
  var EmbebScreenShareView = ({ children }) => {
4192
- const peers = useHMSStore24(selectPeers3);
4193
- const peerPresenting = useHMSStore24(selectPeerScreenSharing2);
4901
+ const peers = useHMSStore29(selectPeers3);
4902
+ const peerPresenting = useHMSStore29(selectPeerScreenSharing2);
4194
4903
  const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
4195
4904
  const smallTilePeers = useMemo7(() => {
4196
4905
  const smallTilePeers2 = peers.filter((peer) => peer.id !== (peerPresenting == null ? void 0 : peerPresenting.id));
4197
4906
  return smallTilePeers2;
4198
4907
  }, [peers, peerPresenting]);
4199
- useEffect16(() => {
4908
+ useEffect18(() => {
4200
4909
  setActiveScreenSharePeer(peerPresenting == null ? void 0 : peerPresenting.id);
4201
4910
  return () => {
4202
4911
  setActiveScreenSharePeer("");
4203
4912
  };
4204
4913
  }, [peerPresenting == null ? void 0 : peerPresenting.id, setActiveScreenSharePeer]);
4205
- return /* @__PURE__ */ React52.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ React52.createElement(ProminenceLayout.ProminentSection, null, children), /* @__PURE__ */ React52.createElement(SecondaryTiles, { peers: smallTilePeers }));
4914
+ return /* @__PURE__ */ React57.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ React57.createElement(ProminenceLayout.ProminentSection, null, children), /* @__PURE__ */ React57.createElement(SecondaryTiles, { peers: smallTilePeers }));
4206
4915
  };
4207
4916
  var EmbedComponent = () => {
4208
4917
  const { amIScreenSharing, toggleScreenShare } = useScreenShare3(throwErrorHandler);
4209
4918
  const [embedConfig, setEmbedConfig] = useSetAppDataByKey(APP_DATA.embedConfig);
4210
- const [wasScreenShared, setWasScreenShared] = useState27(false);
4211
- const screenShareAttemptInProgress = useRef8(false);
4919
+ const [wasScreenShared, setWasScreenShared] = useState30(false);
4920
+ const screenShareAttemptInProgress = useRef9(false);
4212
4921
  const src = embedConfig.url;
4213
- const iframeRef = useRef8();
4214
- const resetEmbedConfig = useCallback8(() => {
4922
+ const iframeRef = useRef9();
4923
+ const resetEmbedConfig = useCallback9(() => {
4215
4924
  if (src) {
4216
4925
  setEmbedConfig({ url: "" });
4217
4926
  }
4218
4927
  }, [src, setEmbedConfig]);
4219
- useEffect16(() => {
4928
+ useEffect18(() => {
4220
4929
  if (embedConfig.shareScreen && !amIScreenSharing && !wasScreenShared && !screenShareAttemptInProgress.current) {
4221
4930
  screenShareAttemptInProgress.current = true;
4222
4931
  toggleScreenShare({
@@ -4229,7 +4938,7 @@ var EmbedComponent = () => {
4229
4938
  });
4230
4939
  }
4231
4940
  }, []);
4232
- useEffect16(() => {
4941
+ useEffect18(() => {
4233
4942
  if (wasScreenShared && !amIScreenSharing) {
4234
4943
  resetEmbedConfig();
4235
4944
  }
@@ -4240,7 +4949,7 @@ var EmbedComponent = () => {
4240
4949
  }
4241
4950
  };
4242
4951
  }, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
4243
- return /* @__PURE__ */ React52.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ React52.createElement(
4952
+ return /* @__PURE__ */ React57.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ React57.createElement(
4244
4953
  "iframe",
4245
4954
  {
4246
4955
  src,
@@ -4253,28 +4962,28 @@ var EmbedComponent = () => {
4253
4962
  };
4254
4963
 
4255
4964
  // src/Prebuilt/layouts/PDFView.jsx
4256
- import React53, { useCallback as useCallback9, useEffect as useEffect17, useRef as useRef9, useState as useState28 } from "react";
4965
+ import React58, { useCallback as useCallback10, useEffect as useEffect19, useRef as useRef10, useState as useState31 } from "react";
4257
4966
  import { throwErrorHandler as throwErrorHandler2, useScreenShare as useScreenShare4 } from "@100mslive/react-sdk";
4258
4967
  var PDFView = () => {
4259
- return /* @__PURE__ */ React53.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React53.createElement(PDFEmbedComponent, null));
4968
+ return /* @__PURE__ */ React58.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React58.createElement(PDFEmbedComponent, null));
4260
4969
  };
4261
4970
  var PDFEmbedComponent = () => {
4262
- const ref = useRef9();
4971
+ const ref = useRef10();
4263
4972
  const themeType = useTheme().themeType;
4264
- const [isPDFLoaded, setIsPDFLoaded] = useState28(false);
4973
+ const [isPDFLoaded, setIsPDFLoaded] = useState31(false);
4265
4974
  let pdfJSURL = define_process_env_default.REACT_APP_PDFJS_IFRAME_URL;
4266
4975
  const { amIScreenSharing, toggleScreenShare } = useScreenShare4(throwErrorHandler2);
4267
4976
  const [pdfConfig, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);
4268
4977
  if (pdfConfig.url && !pdfConfig.file) {
4269
4978
  pdfJSURL = pdfJSURL + "?file=" + encodeURIComponent(pdfConfig.url);
4270
4979
  }
4271
- const [wasScreenShared, setWasScreenShared] = useState28(false);
4272
- const screenShareAttemptInProgress = useRef9(false);
4273
- const iframeRef = useRef9();
4274
- const resetEmbedConfig = useCallback9(() => {
4980
+ const [wasScreenShared, setWasScreenShared] = useState31(false);
4981
+ const screenShareAttemptInProgress = useRef10(false);
4982
+ const iframeRef = useRef10();
4983
+ const resetEmbedConfig = useCallback10(() => {
4275
4984
  setPDFConfig({ state: false });
4276
4985
  }, [setPDFConfig]);
4277
- useEffect17(() => {
4986
+ useEffect19(() => {
4278
4987
  if (isPDFLoaded && ref.current) {
4279
4988
  ref.current.contentWindow.postMessage(
4280
4989
  {
@@ -4284,7 +4993,7 @@ var PDFEmbedComponent = () => {
4284
4993
  );
4285
4994
  }
4286
4995
  }, [isPDFLoaded, themeType]);
4287
- useEffect17(() => {
4996
+ useEffect19(() => {
4288
4997
  if (!amIScreenSharing && !wasScreenShared && !screenShareAttemptInProgress.current) {
4289
4998
  screenShareAttemptInProgress.current = true;
4290
4999
  toggleScreenShare({
@@ -4298,7 +5007,7 @@ var PDFEmbedComponent = () => {
4298
5007
  });
4299
5008
  }
4300
5009
  }, []);
4301
- useEffect17(() => {
5010
+ useEffect19(() => {
4302
5011
  if (wasScreenShared && !amIScreenSharing) {
4303
5012
  resetEmbedConfig();
4304
5013
  }
@@ -4309,7 +5018,7 @@ var PDFEmbedComponent = () => {
4309
5018
  }
4310
5019
  };
4311
5020
  }, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
4312
- return /* @__PURE__ */ React53.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ React53.createElement(
5021
+ return /* @__PURE__ */ React58.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ React58.createElement(
4313
5022
  "iframe",
4314
5023
  {
4315
5024
  src: pdfJSURL,
@@ -4342,72 +5051,72 @@ var PDFEmbedComponent = () => {
4342
5051
  };
4343
5052
 
4344
5053
  // src/Prebuilt/layouts/SidePane.tsx
4345
- import React60 from "react";
4346
- import { useMedia as useMedia16 } from "react-use";
4347
- import { selectAppData as selectAppData3, selectVideoTrackByPeerID, useHMSStore as useHMSStore33 } from "@100mslive/react-sdk";
5054
+ import React66 from "react";
5055
+ import { useMedia as useMedia20 } from "react-use";
5056
+ import { selectAppData as selectAppData3, selectVideoTrackByPeerID as selectVideoTrackByPeerID3, useHMSStore as useHMSStore39 } from "@100mslive/react-sdk";
4348
5057
 
4349
5058
  // src/Prebuilt/components/SidePaneTabs.tsx
4350
- import React57, { useEffect as useEffect22, useState as useState32 } from "react";
4351
- import { useMedia as useMedia15 } from "react-use";
4352
- import { selectPeerCount as selectPeerCount3, useHMSStore as useHMSStore30 } from "@100mslive/react-sdk";
4353
- import { CrossIcon as CrossIcon7 } from "@100mslive/react-icons";
5059
+ import React63, { useEffect as useEffect25, useState as useState36 } from "react";
5060
+ import { useMedia as useMedia19 } from "react-use";
5061
+ import { selectPeerCount as selectPeerCount3, useHMSStore as useHMSStore36 } from "@100mslive/react-sdk";
5062
+ import { CrossIcon as CrossIcon10 } from "@100mslive/react-icons";
4354
5063
 
4355
5064
  // src/Prebuilt/components/Chat/Chat.jsx
4356
- import React56, { useCallback as useCallback14, useEffect as useEffect21, useRef as useRef13, useState as useState31 } from "react";
4357
- import { useMedia as useMedia14 } from "react-use";
5065
+ import React61, { useCallback as useCallback15, useEffect as useEffect23, useRef as useRef14, useState as useState34 } from "react";
5066
+ import { useMedia as useMedia18 } from "react-use";
4358
5067
  import {
4359
5068
  HMSNotificationTypes,
4360
5069
  selectHMSMessagesCount,
4361
- selectPeerNameByID as selectPeerNameByID3,
4362
- selectPermissions as selectPermissions10,
4363
- selectSessionStore,
4364
- useHMSActions as useHMSActions19,
5070
+ selectPeerNameByID as selectPeerNameByID4,
5071
+ selectPermissions as selectPermissions12,
5072
+ selectSessionStore as selectSessionStore3,
5073
+ useHMSActions as useHMSActions21,
4365
5074
  useHMSNotifications,
4366
- useHMSStore as useHMSStore29
5075
+ useHMSStore as useHMSStore34
4367
5076
  } from "@100mslive/react-sdk";
4368
- import { ChevronDownIcon as ChevronDownIcon2, CrossIcon as CrossIcon6, PinIcon as PinIcon2 } from "@100mslive/react-icons";
5077
+ import { ChevronDownIcon as ChevronDownIcon2, CrossIcon as CrossIcon8, PinIcon as PinIcon3 } from "@100mslive/react-icons";
4369
5078
 
4370
5079
  // src/Prebuilt/components/Chat/ChatBody.jsx
4371
- import React54, { Fragment as Fragment8, useCallback as useCallback11, useEffect as useEffect18, useLayoutEffect, useMemo as useMemo8, useRef as useRef10, useState as useState29 } from "react";
5080
+ import React59, { Fragment as Fragment10, useCallback as useCallback12, useEffect as useEffect20, useLayoutEffect, useMemo as useMemo8, useRef as useRef11, useState as useState32 } from "react";
4372
5081
  import { useInView } from "react-intersection-observer";
4373
- import { useMedia as useMedia12 } from "react-use";
5082
+ import { useMedia as useMedia16 } from "react-use";
4374
5083
  import AutoSizer from "react-virtualized-auto-sizer";
4375
5084
  import { VariableSizeList } from "react-window";
4376
5085
  import {
4377
5086
  selectHMSMessages,
4378
- selectLocalPeerID as selectLocalPeerID6,
5087
+ selectLocalPeerID as selectLocalPeerID8,
4379
5088
  selectLocalPeerRoleName as selectLocalPeerRoleName2,
4380
5089
  selectMessagesByPeerID,
4381
5090
  selectMessagesByRole,
4382
- selectPeerNameByID as selectPeerNameByID2,
4383
- selectPermissions as selectPermissions9,
4384
- useHMSActions as useHMSActions16,
4385
- useHMSStore as useHMSStore27
5091
+ selectPeerNameByID as selectPeerNameByID3,
5092
+ selectPermissions as selectPermissions11,
5093
+ useHMSActions as useHMSActions18,
5094
+ useHMSStore as useHMSStore32
4386
5095
  } from "@100mslive/react-sdk";
4387
- import { PinIcon, VerticalMenuIcon as VerticalMenuIcon5 } from "@100mslive/react-icons";
5096
+ import { PinIcon as PinIcon2, VerticalMenuIcon as VerticalMenuIcon6 } from "@100mslive/react-icons";
4388
5097
 
4389
5098
  // src/Prebuilt/images/empty-chat.svg
4390
5099
  var empty_chat_default = 'data:image/svg+xml,<svg width="184" height="133" viewBox="0 0 184 133" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M144.885 91.3998C145.318 91.023 145.861 90.7947 146.433 90.7483L146.446 90.7473L169.355 89.1614C169.702 89.1376 170.049 89.2101 170.358 89.3712C170.662 89.5305 170.918 89.7702 171.096 90.0642C171.098 90.0672 171.1 90.0703 171.102 90.0734L171.104 90.0766C171.281 90.3744 171.373 90.7154 171.369 91.062C171.365 91.4097 171.265 91.7496 171.08 92.044L158.85 111.504C158.539 111.986 158.081 112.356 157.544 112.56C157.007 112.764 156.419 112.791 155.866 112.636C155.313 112.482 154.823 112.155 154.469 111.703C154.115 111.25 153.915 110.697 153.898 110.123C153.898 110.109 153.898 110.094 153.898 110.08L153.996 100.307L145.347 95.7858C145.334 95.779 145.321 95.7721 145.308 95.7649C144.811 95.4785 144.417 95.0404 144.186 94.5146C143.955 93.9888 143.898 93.4029 144.024 92.8425C144.15 92.2821 144.451 91.7765 144.885 91.3998ZM167.441 91.0088L146.603 92.8952C146.49 92.9053 146.383 92.9508 146.298 93.0251C146.211 93.1005 146.151 93.2016 146.125 93.3137C146.1 93.4257 146.112 93.5429 146.158 93.6481C146.202 93.7484 146.276 93.8327 146.369 93.89L155.26 98.296L167.441 91.0088ZM156.32 100.171L168.547 92.8564L157.039 110.339C156.976 110.434 156.886 110.506 156.78 110.547C156.673 110.587 156.555 110.593 156.444 110.562C156.334 110.531 156.236 110.466 156.165 110.375C156.097 110.289 156.058 110.184 156.052 110.075L156.32 100.171Z" fill="%23444954"/>%0A<path d="M83.3248 35.4156C71.7182 47.1017 51.2098 75.5175 62.0292 95.6918C75.5536 120.91 140.453 79.2983 115.364 67.6657C90.2756 56.0331 65.8818 122.018 101.568 120.391C116.398 118.62 131.221 114.699 145.703 105.512" stroke="%23293042" stroke-width="2.25" stroke-dasharray="6 6"/>%0A<rect x="0.00256348" y="0.5" width="173.524" height="58.3398" rx="29.1699" fill="%23272A31"/>%0A<g opacity="0.4">%0A<rect x="24.7526" y="20.9312" width="111" height="4.5" rx="2.25" fill="%23444954"/>%0A</g>%0A<g opacity="0.4">%0A<rect x="38.2526" y="34.4312" width="110.25" height="4.5" rx="2.25" fill="%23444954"/>%0A</g>%0A<path d="M40.3918 71.5547L28.4246 55.0999L52.3589 55.0999L40.3918 71.5547Z" fill="%23272A31"/>%0A</svg>%0A';
4391
5100
 
4392
5101
  // src/Prebuilt/components/hooks/useSetPinnedMessage.js
4393
- import { useCallback as useCallback10 } from "react";
5102
+ import { useCallback as useCallback11 } from "react";
4394
5103
  import {
4395
- selectPeerNameByID,
5104
+ selectPeerNameByID as selectPeerNameByID2,
4396
5105
  selectSessionMetadata,
4397
- useHMSActions as useHMSActions15,
4398
- useHMSStore as useHMSStore25,
5106
+ useHMSActions as useHMSActions17,
5107
+ useHMSStore as useHMSStore30,
4399
5108
  useHMSVanillaStore as useHMSVanillaStore5
4400
5109
  } from "@100mslive/react-sdk";
4401
5110
  var useSetPinnedMessage = () => {
4402
- const hmsActions = useHMSActions15();
5111
+ const hmsActions = useHMSActions17();
4403
5112
  const vanillaStore = useHMSVanillaStore5();
4404
- const pinnedMessage = useHMSStore25(selectSessionMetadata);
4405
- const setPinnedMessage = useCallback10(
5113
+ const pinnedMessage = useHMSStore30(selectSessionMetadata);
5114
+ const setPinnedMessage = useCallback11(
4406
5115
  /**
4407
5116
  * @param {import("@100mslive/react-sdk").HMSMessage | undefined} message
4408
5117
  */
4409
5118
  (message) => __async(void 0, null, function* () {
4410
- const peerName = vanillaStore.getState(selectPeerNameByID(message == null ? void 0 : message.sender)) || (message == null ? void 0 : message.senderName);
5119
+ const peerName = vanillaStore.getState(selectPeerNameByID2(message == null ? void 0 : message.sender)) || (message == null ? void 0 : message.senderName);
4411
5120
  const newPinnedMessage = message ? peerName ? `${peerName}: ${message.message}` : message.message : null;
4412
5121
  if (newPinnedMessage !== pinnedMessage) {
4413
5122
  yield hmsActions.sessionStore.set(SESSION_STORE_KEY.PINNED_MESSAGE, newPinnedMessage).catch((err) => ToastManager.addToast({ title: err.description }));
@@ -4423,11 +5132,11 @@ import {
4423
5132
  selectMessagesUnreadCountByPeerID,
4424
5133
  selectMessagesUnreadCountByRole,
4425
5134
  selectUnreadHMSMessagesCount as selectUnreadHMSMessagesCount2,
4426
- useHMSStore as useHMSStore26
5135
+ useHMSStore as useHMSStore31
4427
5136
  } from "@100mslive/react-sdk";
4428
5137
  var useUnreadCount = ({ role, peerId }) => {
4429
5138
  const unreadCountSelector = role ? selectMessagesUnreadCountByRole(role) : peerId ? selectMessagesUnreadCountByPeerID(peerId) : selectUnreadHMSMessagesCount2;
4430
- const unreadCount = useHMSStore26(unreadCountSelector);
5139
+ const unreadCount = useHMSStore31(unreadCountSelector);
4431
5140
  return unreadCount;
4432
5141
  };
4433
5142
 
@@ -4448,7 +5157,7 @@ var formatTime = (date) => {
4448
5157
  return `${hours}:${mins} ${suffix}`;
4449
5158
  };
4450
5159
  var MessageTypeContainer = ({ left, right }) => {
4451
- return /* @__PURE__ */ React54.createElement(
5160
+ return /* @__PURE__ */ React59.createElement(
4452
5161
  Flex,
4453
5162
  {
4454
5163
  align: "center",
@@ -4460,16 +5169,16 @@ var MessageTypeContainer = ({ left, right }) => {
4460
5169
  r: "$0"
4461
5170
  }
4462
5171
  },
4463
- left && /* @__PURE__ */ React54.createElement(SenderName, { variant: "tiny", as: "span", css: { color: "$on_surface_medium" } }, left),
4464
- left && right && /* @__PURE__ */ React54.createElement(Box, { css: { borderLeft: "1px solid $border_bright", mx: "$4", h: "$8" } }),
4465
- right && /* @__PURE__ */ React54.createElement(SenderName, { as: "span", variant: "tiny", css: { textTransform: "uppercase" } }, right)
5172
+ left && /* @__PURE__ */ React59.createElement(SenderName, { variant: "tiny", as: "span", css: { color: "$on_surface_medium" } }, left),
5173
+ left && right && /* @__PURE__ */ React59.createElement(Box, { css: { borderLeft: "1px solid $border_bright", mx: "$4", h: "$8" } }),
5174
+ right && /* @__PURE__ */ React59.createElement(SenderName, { as: "span", variant: "tiny", css: { textTransform: "uppercase" } }, right)
4466
5175
  );
4467
5176
  };
4468
5177
  var MessageType = ({ roles, hasCurrentUserSent, receiver }) => {
4469
- const peerName = useHMSStore27(selectPeerNameByID2(receiver));
4470
- const localPeerRoleName = useHMSStore27(selectLocalPeerRoleName2);
5178
+ const peerName = useHMSStore32(selectPeerNameByID3(receiver));
5179
+ const localPeerRoleName = useHMSStore32(selectLocalPeerRoleName2);
4471
5180
  if (receiver) {
4472
- return /* @__PURE__ */ React54.createElement(
5181
+ return /* @__PURE__ */ React59.createElement(
4473
5182
  MessageTypeContainer,
4474
5183
  {
4475
5184
  left: hasCurrentUserSent ? `${peerName ? `TO ${peerName}` : ""}` : "TO YOU",
@@ -4478,7 +5187,7 @@ var MessageType = ({ roles, hasCurrentUserSent, receiver }) => {
4478
5187
  );
4479
5188
  }
4480
5189
  if (roles && roles.length) {
4481
- return /* @__PURE__ */ React54.createElement(MessageTypeContainer, { left: "TO", right: hasCurrentUserSent ? roles.join(",") : localPeerRoleName });
5190
+ return /* @__PURE__ */ React59.createElement(MessageTypeContainer, { left: "TO", right: hasCurrentUserSent ? roles.join(",") : localPeerRoleName });
4482
5191
  }
4483
5192
  return null;
4484
5193
  };
@@ -4492,10 +5201,10 @@ var Link = styled("a", {
4492
5201
  });
4493
5202
  var AnnotisedMessage = ({ message }) => {
4494
5203
  if (!message) {
4495
- return /* @__PURE__ */ React54.createElement(Fragment8, null);
5204
+ return /* @__PURE__ */ React59.createElement(Fragment10, null);
4496
5205
  }
4497
- return /* @__PURE__ */ React54.createElement(Fragment8, null, message.trim().split(/(\s)/).map(
4498
- (part) => URL_REGEX.test(part) ? /* @__PURE__ */ React54.createElement(Link, { href: part, key: part, target: "_blank", rel: "noopener noreferrer" }, part) : part
5206
+ return /* @__PURE__ */ React59.createElement(Fragment10, null, message.trim().split(/(\s)/).map(
5207
+ (part) => URL_REGEX.test(part) ? /* @__PURE__ */ React59.createElement(Link, { href: part, key: part, target: "_blank", rel: "noopener noreferrer" }, part) : part
4499
5208
  ));
4500
5209
  };
4501
5210
  var getMessageType = ({ roles, receiver }) => {
@@ -4505,18 +5214,18 @@ var getMessageType = ({ roles, receiver }) => {
4505
5214
  return receiver ? "private" : "";
4506
5215
  };
4507
5216
  var ChatActions = ({ onPin, showPinAction }) => {
4508
- const [open, setOpen] = useState29(false);
5217
+ const [open, setOpen] = useState32(false);
4509
5218
  if (!showPinAction) {
4510
5219
  return null;
4511
5220
  }
4512
- return /* @__PURE__ */ React54.createElement(Dropdown.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React54.createElement(Dropdown.Trigger, { className: "chat_actions", css: { opacity: open ? 1 : 0, "@md": { opacity: 1 } }, asChild: true }, /* @__PURE__ */ React54.createElement(IconButton, null, /* @__PURE__ */ React54.createElement(Tooltip, { title: "More options" }, /* @__PURE__ */ React54.createElement(VerticalMenuIcon5, null)))), /* @__PURE__ */ React54.createElement(Dropdown.Portal, null, /* @__PURE__ */ React54.createElement(
5221
+ return /* @__PURE__ */ React59.createElement(Dropdown.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React59.createElement(Dropdown.Trigger, { className: "chat_actions", css: { opacity: open ? 1 : 0, "@md": { opacity: 1 } }, asChild: true }, /* @__PURE__ */ React59.createElement(IconButton, null, /* @__PURE__ */ React59.createElement(Tooltip, { title: "More options" }, /* @__PURE__ */ React59.createElement(VerticalMenuIcon6, null)))), /* @__PURE__ */ React59.createElement(Dropdown.Portal, null, /* @__PURE__ */ React59.createElement(
4513
5222
  Dropdown.Content,
4514
5223
  {
4515
5224
  sideOffset: 5,
4516
5225
  align: "end",
4517
5226
  css: { width: "$48", backgroundColor: "$surface_bright", py: "$0", border: "1px solid $border_bright" }
4518
5227
  },
4519
- /* @__PURE__ */ React54.createElement(Dropdown.Item, { "data-testid": "pin_message_btn", onClick: onPin }, /* @__PURE__ */ React54.createElement(PinIcon, null), /* @__PURE__ */ React54.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Pin Message"))
5228
+ /* @__PURE__ */ React59.createElement(Dropdown.Item, { "data-testid": "pin_message_btn", onClick: onPin }, /* @__PURE__ */ React59.createElement(PinIcon2, null), /* @__PURE__ */ React59.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Pin Message"))
4520
5229
  )));
4521
5230
  };
4522
5231
  var SenderName = styled(Text, {
@@ -4528,38 +5237,38 @@ var SenderName = styled(Text, {
4528
5237
  color: "$on_surface_high",
4529
5238
  fontWeight: "$semiBold"
4530
5239
  });
4531
- var ChatMessage = React54.memo(
5240
+ var ChatMessage = React59.memo(
4532
5241
  ({ index, style = {}, message, setRowHeight, isLast = false, unreadCount = 0, scrollToBottom, onPin }) => {
4533
5242
  var _a, _b;
4534
5243
  const { ref, inView } = useInView({ threshold: 0.5, triggerOnce: true });
4535
- const rowRef = useRef10(null);
4536
- useEffect18(() => {
5244
+ const rowRef = useRef11(null);
5245
+ useEffect20(() => {
4537
5246
  if (rowRef.current) {
4538
5247
  setRowHeight(index, rowRef.current.clientHeight);
4539
5248
  }
4540
5249
  }, [index, setRowHeight]);
4541
- const isMobile = useMedia12(config.media.md);
5250
+ const isMobile = useMedia16(config.media.md);
4542
5251
  const { elements } = useRoomLayoutConferencingScreen();
4543
5252
  const isOverlay = ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) && isMobile;
4544
- const hmsActions = useHMSActions16();
4545
- const localPeerId = useHMSStore27(selectLocalPeerID6);
4546
- const permissions = useHMSStore27(selectPermissions9);
5253
+ const hmsActions = useHMSActions18();
5254
+ const localPeerId = useHMSStore32(selectLocalPeerID8);
5255
+ const permissions = useHMSStore32(selectPermissions11);
4547
5256
  const messageType = getMessageType({
4548
5257
  roles: message.recipientRoles,
4549
5258
  receiver: message.recipientPeer
4550
5259
  });
4551
5260
  const showPinAction = permissions.removeOthers && !messageType && ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.allow_pinning_messages);
4552
- useEffect18(() => {
5261
+ useEffect20(() => {
4553
5262
  if (message.id && !message.read && inView) {
4554
5263
  hmsActions.setMessageRead(true, message.id);
4555
5264
  }
4556
5265
  }, [message.read, hmsActions, inView, message.id]);
4557
- useEffect18(() => {
5266
+ useEffect20(() => {
4558
5267
  if (isLast && inView && unreadCount >= 1) {
4559
5268
  scrollToBottom(1);
4560
5269
  }
4561
5270
  }, [inView, isLast, scrollToBottom, unreadCount]);
4562
- return /* @__PURE__ */ React54.createElement(
5271
+ return /* @__PURE__ */ React59.createElement(
4563
5272
  Box,
4564
5273
  {
4565
5274
  ref,
@@ -4567,7 +5276,7 @@ var ChatMessage = React54.memo(
4567
5276
  css: { mb: "$10", pr: "$10", mt: "$8", "&:hover .chat_actions": { opacity: 1 } },
4568
5277
  style
4569
5278
  },
4570
- /* @__PURE__ */ React54.createElement(
5279
+ /* @__PURE__ */ React59.createElement(
4571
5280
  Flex,
4572
5281
  {
4573
5282
  ref: rowRef,
@@ -4584,7 +5293,7 @@ var ChatMessage = React54.memo(
4584
5293
  key: message.time,
4585
5294
  "data-testid": "chat_msg"
4586
5295
  },
4587
- /* @__PURE__ */ React54.createElement(
5296
+ /* @__PURE__ */ React59.createElement(
4588
5297
  Text,
4589
5298
  {
4590
5299
  css: {
@@ -4597,7 +5306,7 @@ var ChatMessage = React54.memo(
4597
5306
  },
4598
5307
  as: "div"
4599
5308
  },
4600
- /* @__PURE__ */ React54.createElement(Flex, { align: "baseline" }, message.senderName === "You" || !message.senderName ? /* @__PURE__ */ React54.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName || "Anonymous") : /* @__PURE__ */ React54.createElement(Tooltip, { title: message.senderName, side: "top", align: "start" }, /* @__PURE__ */ React54.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName)), !isOverlay ? /* @__PURE__ */ React54.createElement(
5309
+ /* @__PURE__ */ React59.createElement(Flex, { align: "baseline" }, message.senderName === "You" || !message.senderName ? /* @__PURE__ */ React59.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName || "Anonymous") : /* @__PURE__ */ React59.createElement(Tooltip, { title: message.senderName, side: "top", align: "start" }, /* @__PURE__ */ React59.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName)), !isOverlay ? /* @__PURE__ */ React59.createElement(
4601
5310
  Text,
4602
5311
  {
4603
5312
  as: "span",
@@ -4610,7 +5319,7 @@ var ChatMessage = React54.memo(
4610
5319
  },
4611
5320
  formatTime(message.time)
4612
5321
  ) : null),
4613
- /* @__PURE__ */ React54.createElement(
5322
+ /* @__PURE__ */ React59.createElement(
4614
5323
  MessageType,
4615
5324
  {
4616
5325
  hasCurrentUserSent: message.sender === localPeerId,
@@ -4618,9 +5327,9 @@ var ChatMessage = React54.memo(
4618
5327
  roles: message.recipientRoles
4619
5328
  }
4620
5329
  ),
4621
- !isOverlay ? /* @__PURE__ */ React54.createElement(ChatActions, { onPin, showPinAction }) : null
5330
+ !isOverlay ? /* @__PURE__ */ React59.createElement(ChatActions, { onPin, showPinAction }) : null
4622
5331
  ),
4623
- /* @__PURE__ */ React54.createElement(
5332
+ /* @__PURE__ */ React59.createElement(
4624
5333
  Text,
4625
5334
  {
4626
5335
  variant: "sm",
@@ -4634,13 +5343,13 @@ var ChatMessage = React54.memo(
4634
5343
  },
4635
5344
  onClick: (e) => e.stopPropagation()
4636
5345
  },
4637
- /* @__PURE__ */ React54.createElement(AnnotisedMessage, { message: message.message })
5346
+ /* @__PURE__ */ React59.createElement(AnnotisedMessage, { message: message.message })
4638
5347
  )
4639
5348
  )
4640
5349
  );
4641
5350
  }
4642
5351
  );
4643
- var ChatList = React54.forwardRef(
5352
+ var ChatList = React59.forwardRef(
4644
5353
  ({ width, height, setRowHeight, getRowHeight, messages, unreadCount = 0, scrollToBottom }, listRef) => {
4645
5354
  const { setPinnedMessage } = useSetPinnedMessage();
4646
5355
  useLayoutEffect(() => {
@@ -4648,7 +5357,7 @@ var ChatList = React54.forwardRef(
4648
5357
  scrollToBottom(1);
4649
5358
  }
4650
5359
  }, [listRef]);
4651
- return /* @__PURE__ */ React54.createElement(
5360
+ return /* @__PURE__ */ React59.createElement(
4652
5361
  VariableSizeList,
4653
5362
  {
4654
5363
  ref: listRef,
@@ -4660,7 +5369,7 @@ var ChatList = React54.forwardRef(
4660
5369
  overflowX: "hidden"
4661
5370
  }
4662
5371
  },
4663
- ({ index, style }) => /* @__PURE__ */ React54.createElement(
5372
+ ({ index, style }) => /* @__PURE__ */ React59.createElement(
4664
5373
  ChatMessage,
4665
5374
  {
4666
5375
  style,
@@ -4677,19 +5386,19 @@ var ChatList = React54.forwardRef(
4677
5386
  );
4678
5387
  }
4679
5388
  );
4680
- var VirtualizedChatMessages = React54.forwardRef(({ messages, unreadCount = 0, scrollToBottom }, listRef) => {
4681
- const rowHeights = useRef10({});
5389
+ var VirtualizedChatMessages = React59.forwardRef(({ messages, unreadCount = 0, scrollToBottom }, listRef) => {
5390
+ const rowHeights = useRef11({});
4682
5391
  function getRowHeight(index) {
4683
5392
  return rowHeights.current[index] + 16 || 72;
4684
5393
  }
4685
- const setRowHeight = useCallback11(
5394
+ const setRowHeight = useCallback12(
4686
5395
  (index, size) => {
4687
5396
  listRef.current.resetAfterIndex(0);
4688
5397
  rowHeights.current = __spreadProps(__spreadValues({}, rowHeights.current), { [index]: size });
4689
5398
  },
4690
5399
  [listRef]
4691
5400
  );
4692
- return /* @__PURE__ */ React54.createElement(
5401
+ return /* @__PURE__ */ React59.createElement(
4693
5402
  Box,
4694
5403
  {
4695
5404
  css: {
@@ -4698,14 +5407,14 @@ var VirtualizedChatMessages = React54.forwardRef(({ messages, unreadCount = 0, s
4698
5407
  },
4699
5408
  as: "div"
4700
5409
  },
4701
- /* @__PURE__ */ React54.createElement(
5410
+ /* @__PURE__ */ React59.createElement(
4702
5411
  AutoSizer,
4703
5412
  {
4704
5413
  style: {
4705
5414
  width: "90%"
4706
5415
  }
4707
5416
  },
4708
- ({ height, width }) => /* @__PURE__ */ React54.createElement(
5417
+ ({ height, width }) => /* @__PURE__ */ React59.createElement(
4709
5418
  ChatList,
4710
5419
  {
4711
5420
  width,
@@ -4721,16 +5430,16 @@ var VirtualizedChatMessages = React54.forwardRef(({ messages, unreadCount = 0, s
4721
5430
  )
4722
5431
  );
4723
5432
  });
4724
- var ChatBody = React54.forwardRef(({ role, peerId, scrollToBottom }, listRef) => {
5433
+ var ChatBody = React59.forwardRef(({ role, peerId, scrollToBottom }, listRef) => {
4725
5434
  var _a;
4726
5435
  const storeMessageSelector = role ? selectMessagesByRole(role) : peerId ? selectMessagesByPeerID(peerId) : selectHMSMessages;
4727
- let messages = useHMSStore27(storeMessageSelector);
5436
+ let messages = useHMSStore32(storeMessageSelector);
4728
5437
  messages = useMemo8(() => (messages == null ? void 0 : messages.filter((message) => message.type === "chat")) || [], [messages]);
4729
- const isMobile = useMedia12(config.media.md);
5438
+ const isMobile = useMedia16(config.media.md);
4730
5439
  const { elements } = useRoomLayoutConferencingScreen();
4731
5440
  const unreadCount = useUnreadCount({ role, peerId });
4732
5441
  if (messages.length === 0 && !(isMobile && ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay))) {
4733
- return /* @__PURE__ */ React54.createElement(
5442
+ return /* @__PURE__ */ React59.createElement(
4734
5443
  Flex,
4735
5444
  {
4736
5445
  css: {
@@ -4742,7 +5451,7 @@ var ChatBody = React54.forwardRef(({ role, peerId, scrollToBottom }, listRef) =>
4742
5451
  align: "center",
4743
5452
  justify: "center"
4744
5453
  },
4745
- /* @__PURE__ */ React54.createElement(Box, null, /* @__PURE__ */ React54.createElement("img", { src: empty_chat_default, alt: "Empty Chat", height: 132, width: 185, style: { margin: "0 auto" } }), /* @__PURE__ */ React54.createElement(Text, { variant: "h5", css: { mt: "$8", c: "$on_surface_high" } }, "Start a conversation"), /* @__PURE__ */ React54.createElement(
5454
+ /* @__PURE__ */ React59.createElement(Box, null, /* @__PURE__ */ React59.createElement("img", { src: empty_chat_default, alt: "Empty Chat", height: 132, width: 185, style: { margin: "0 auto" } }), /* @__PURE__ */ React59.createElement(Text, { variant: "h5", css: { mt: "$8", c: "$on_surface_high" } }, "Start a conversation"), /* @__PURE__ */ React59.createElement(
4746
5455
  Text,
4747
5456
  {
4748
5457
  variant: "sm",
@@ -4752,7 +5461,7 @@ var ChatBody = React54.forwardRef(({ role, peerId, scrollToBottom }, listRef) =>
4752
5461
  ))
4753
5462
  );
4754
5463
  }
4755
- return /* @__PURE__ */ React54.createElement(Fragment8, null, /* @__PURE__ */ React54.createElement(
5464
+ return /* @__PURE__ */ React59.createElement(Fragment10, null, /* @__PURE__ */ React59.createElement(
4756
5465
  VirtualizedChatMessages,
4757
5466
  {
4758
5467
  messages,
@@ -4764,23 +5473,23 @@ var ChatBody = React54.forwardRef(({ role, peerId, scrollToBottom }, listRef) =>
4764
5473
  });
4765
5474
 
4766
5475
  // src/Prebuilt/components/Chat/ChatFooter.tsx
4767
- import React55, { useCallback as useCallback13, useEffect as useEffect20, useRef as useRef12, useState as useState30 } from "react";
4768
- import { useMedia as useMedia13 } from "react-use";
5476
+ import React60, { useCallback as useCallback14, useEffect as useEffect22, useRef as useRef13, useState as useState33 } from "react";
5477
+ import { useMedia as useMedia17 } from "react-use";
4769
5478
  import data2 from "@emoji-mart/data";
4770
5479
  import Picker from "@emoji-mart/react";
4771
- import { useHMSActions as useHMSActions18 } from "@100mslive/react-sdk";
5480
+ import { useHMSActions as useHMSActions20 } from "@100mslive/react-sdk";
4772
5481
  import { EmojiIcon as EmojiIcon3, SendIcon } from "@100mslive/react-icons";
4773
5482
 
4774
5483
  // src/Prebuilt/components/AppData/useChatState.js
4775
- import { useCallback as useCallback12 } from "react";
4776
- import { selectAppData as selectAppData2, useHMSActions as useHMSActions17, useHMSStore as useHMSStore28 } from "@100mslive/react-sdk";
5484
+ import { useCallback as useCallback13 } from "react";
5485
+ import { selectAppData as selectAppData2, useHMSActions as useHMSActions19, useHMSStore as useHMSStore33 } from "@100mslive/react-sdk";
4777
5486
  var useChatDraftMessage = () => {
4778
- const hmsActions = useHMSActions17();
4779
- let chatDraftMessage = useHMSStore28(selectAppData2(APP_DATA.chatDraft));
5487
+ const hmsActions = useHMSActions19();
5488
+ let chatDraftMessage = useHMSStore33(selectAppData2(APP_DATA.chatDraft));
4780
5489
  if (chatDraftMessage === void 0 || chatDraftMessage === null) {
4781
5490
  chatDraftMessage = "";
4782
5491
  }
4783
- const setDraftMessage = useCallback12(
5492
+ const setDraftMessage = useCallback13(
4784
5493
  (message) => {
4785
5494
  hmsActions.setAppData(APP_DATA.chatDraft, message, true);
4786
5495
  },
@@ -4790,10 +5499,10 @@ var useChatDraftMessage = () => {
4790
5499
  };
4791
5500
 
4792
5501
  // src/Prebuilt/components/Chat/useEmojiPickerStyles.js
4793
- import { useEffect as useEffect19, useRef as useRef11 } from "react";
5502
+ import { useEffect as useEffect21, useRef as useRef12 } from "react";
4794
5503
  var useEmojiPickerStyles = (showing) => {
4795
- const ref = useRef11(null);
4796
- useEffect19(() => {
5504
+ const ref = useRef12(null);
5505
+ useEffect21(() => {
4797
5506
  if (showing) {
4798
5507
  setTimeout(() => {
4799
5508
  var _a, _b;
@@ -4841,9 +5550,9 @@ var TextArea = styled("textarea", {
4841
5550
  }
4842
5551
  });
4843
5552
  function EmojiPicker({ onSelect }) {
4844
- const [showEmoji, setShowEmoji] = useState30(false);
5553
+ const [showEmoji, setShowEmoji] = useState33(false);
4845
5554
  const ref = useEmojiPickerStyles(showEmoji);
4846
- return /* @__PURE__ */ React55.createElement(Popover.Root, { open: showEmoji, onOpenChange: setShowEmoji }, /* @__PURE__ */ React55.createElement(Popover.Trigger, { asChild: true, css: { appearance: "none" } }, /* @__PURE__ */ React55.createElement(IconButton, { as: "div" }, /* @__PURE__ */ React55.createElement(EmojiIcon3, null))), /* @__PURE__ */ React55.createElement(Popover.Portal, null, /* @__PURE__ */ React55.createElement(
5555
+ return /* @__PURE__ */ React60.createElement(Popover.Root, { open: showEmoji, onOpenChange: setShowEmoji }, /* @__PURE__ */ React60.createElement(Popover.Trigger, { asChild: true, css: { appearance: "none" } }, /* @__PURE__ */ React60.createElement(IconButton, { as: "div" }, /* @__PURE__ */ React60.createElement(EmojiIcon3, null))), /* @__PURE__ */ React60.createElement(Popover.Portal, null, /* @__PURE__ */ React60.createElement(
4847
5556
  Popover.Content,
4848
5557
  {
4849
5558
  alignOffset: -40,
@@ -4853,7 +5562,7 @@ function EmojiPicker({ onSelect }) {
4853
5562
  p: 0
4854
5563
  }
4855
5564
  },
4856
- /* @__PURE__ */ React55.createElement(
5565
+ /* @__PURE__ */ React60.createElement(
4857
5566
  Box,
4858
5567
  {
4859
5568
  css: {
@@ -4862,7 +5571,7 @@ function EmojiPicker({ onSelect }) {
4862
5571
  },
4863
5572
  ref
4864
5573
  },
4865
- /* @__PURE__ */ React55.createElement(Picker, { onEmojiSelect: onSelect, data: data2, previewPosition: "none", skinPosition: "search" })
5574
+ /* @__PURE__ */ React60.createElement(Picker, { onEmojiSelect: onSelect, data: data2, previewPosition: "none", skinPosition: "search" })
4866
5575
  )
4867
5576
  )));
4868
5577
  }
@@ -4873,13 +5582,13 @@ var ChatFooter = ({
4873
5582
  children
4874
5583
  }) => {
4875
5584
  var _a;
4876
- const hmsActions = useHMSActions18();
4877
- const inputRef = useRef12(null);
5585
+ const hmsActions = useHMSActions20();
5586
+ const inputRef = useRef13(null);
4878
5587
  const [draftMessage, setDraftMessage] = useChatDraftMessage();
4879
- const isMobile = useMedia13(config.media.md);
5588
+ const isMobile = useMedia17(config.media.md);
4880
5589
  const { elements } = useRoomLayoutConferencingScreen();
4881
5590
  const isOverlayChat = (_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay;
4882
- const sendMessage = useCallback13(() => __async(void 0, null, function* () {
5591
+ const sendMessage = useCallback14(() => __async(void 0, null, function* () {
4883
5592
  var _a2;
4884
5593
  const message = (_a2 = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a2.value;
4885
5594
  if (!message || !message.trim().length) {
@@ -4902,19 +5611,19 @@ var ChatFooter = ({
4902
5611
  ToastManager.addToast({ title: err.message });
4903
5612
  }
4904
5613
  }), [role, peerId, hmsActions, onSend]);
4905
- useEffect20(() => {
5614
+ useEffect22(() => {
4906
5615
  const messageElement = inputRef.current;
4907
5616
  if (messageElement) {
4908
5617
  messageElement.value = draftMessage;
4909
5618
  }
4910
5619
  }, [draftMessage]);
4911
- useEffect20(() => {
5620
+ useEffect22(() => {
4912
5621
  const messageElement = inputRef.current;
4913
5622
  return () => {
4914
5623
  setDraftMessage((messageElement == null ? void 0 : messageElement.value) || "");
4915
5624
  };
4916
5625
  }, [setDraftMessage]);
4917
- return /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Flex, { align: "center", css: { gap: "$4", w: "100%" } }, /* @__PURE__ */ React55.createElement(
5626
+ return /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(Flex, { align: "center", css: { gap: "$4", w: "100%" } }, /* @__PURE__ */ React60.createElement(
4918
5627
  Flex,
4919
5628
  {
4920
5629
  align: "center",
@@ -4935,7 +5644,7 @@ var ChatFooter = ({
4935
5644
  }
4936
5645
  },
4937
5646
  children,
4938
- /* @__PURE__ */ React55.createElement(
5647
+ /* @__PURE__ */ React60.createElement(
4939
5648
  TextArea,
4940
5649
  {
4941
5650
  css: {
@@ -4963,7 +5672,7 @@ var ChatFooter = ({
4963
5672
  onCopy: (e) => e.stopPropagation()
4964
5673
  }
4965
5674
  ),
4966
- !isMobile ? /* @__PURE__ */ React55.createElement(
5675
+ !isMobile ? /* @__PURE__ */ React60.createElement(
4967
5676
  EmojiPicker,
4968
5677
  {
4969
5678
  onSelect: (emoji) => {
@@ -4973,7 +5682,7 @@ var ChatFooter = ({
4973
5682
  }
4974
5683
  }
4975
5684
  ) : null,
4976
- /* @__PURE__ */ React55.createElement(
5685
+ /* @__PURE__ */ React60.createElement(
4977
5686
  IconButton,
4978
5687
  {
4979
5688
  className: "send-msg",
@@ -4986,7 +5695,7 @@ var ChatFooter = ({
4986
5695
  },
4987
5696
  "data-testid": "send_msg_btn"
4988
5697
  },
4989
- /* @__PURE__ */ React55.createElement(SendIcon, null)
5698
+ /* @__PURE__ */ React60.createElement(SendIcon, null)
4990
5699
  )
4991
5700
  )));
4992
5701
  };
@@ -4994,10 +5703,10 @@ var ChatFooter = ({
4994
5703
  // src/Prebuilt/components/Chat/Chat.jsx
4995
5704
  var PINNED_MESSAGE_LENGTH = 80;
4996
5705
  var PinnedMessage = ({ clearPinnedMessage }) => {
4997
- const permissions = useHMSStore29(selectPermissions10);
4998
- const pinnedMessage = useHMSStore29(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGE));
5706
+ const permissions = useHMSStore34(selectPermissions12);
5707
+ const pinnedMessage = useHMSStore34(selectSessionStore3(SESSION_STORE_KEY.PINNED_MESSAGE));
4999
5708
  const formattedPinnedMessage = (pinnedMessage == null ? void 0 : pinnedMessage.length) && pinnedMessage.length > PINNED_MESSAGE_LENGTH ? `${pinnedMessage.slice(0, PINNED_MESSAGE_LENGTH)}...` : pinnedMessage;
5000
- return pinnedMessage ? /* @__PURE__ */ React56.createElement(
5709
+ return pinnedMessage ? /* @__PURE__ */ React61.createElement(
5001
5710
  Flex,
5002
5711
  {
5003
5712
  title: pinnedMessage,
@@ -5005,8 +5714,8 @@ var PinnedMessage = ({ clearPinnedMessage }) => {
5005
5714
  align: "center",
5006
5715
  justify: "between"
5007
5716
  },
5008
- /* @__PURE__ */ React56.createElement(PinIcon2, null),
5009
- /* @__PURE__ */ React56.createElement(
5717
+ /* @__PURE__ */ React61.createElement(PinIcon3, null),
5718
+ /* @__PURE__ */ React61.createElement(
5010
5719
  Box,
5011
5720
  {
5012
5721
  css: {
@@ -5016,15 +5725,15 @@ var PinnedMessage = ({ clearPinnedMessage }) => {
5016
5725
  overflowY: "auto"
5017
5726
  }
5018
5727
  },
5019
- /* @__PURE__ */ React56.createElement(Text, { variant: "sm" }, /* @__PURE__ */ React56.createElement(AnnotisedMessage, { message: formattedPinnedMessage }))
5728
+ /* @__PURE__ */ React61.createElement(Text, { variant: "sm" }, /* @__PURE__ */ React61.createElement(AnnotisedMessage, { message: formattedPinnedMessage }))
5020
5729
  ),
5021
- permissions.removeOthers && /* @__PURE__ */ React56.createElement(
5730
+ permissions.removeOthers && /* @__PURE__ */ React61.createElement(
5022
5731
  Flex,
5023
5732
  {
5024
5733
  onClick: () => clearPinnedMessage(),
5025
5734
  css: { cursor: "pointer", color: "$on_surface_medium", "&:hover": { color: "$on_surface_high" } }
5026
5735
  },
5027
- /* @__PURE__ */ React56.createElement(CrossIcon6, null)
5736
+ /* @__PURE__ */ React61.createElement(CrossIcon8, null)
5028
5737
  )
5029
5738
  ) : null;
5030
5739
  };
@@ -5033,17 +5742,17 @@ var Chat = ({ screenType }) => {
5033
5742
  const notification = useHMSNotifications(HMSNotificationTypes.PEER_LEFT);
5034
5743
  const [peerSelector, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER_ID);
5035
5744
  const [roleSelector, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);
5036
- const peerName = useHMSStore29(selectPeerNameByID3(peerSelector));
5037
- const [chatOptions, setChatOptions] = useState31({
5745
+ const peerName = useHMSStore34(selectPeerNameByID4(peerSelector));
5746
+ const [chatOptions, setChatOptions] = useState34({
5038
5747
  role: roleSelector || "",
5039
5748
  peerId: peerSelector && peerName ? peerSelector : "",
5040
5749
  selection: roleSelector ? roleSelector : peerSelector && peerName ? peerName : "Everyone"
5041
5750
  });
5042
- const [isSelectorOpen] = useState31(false);
5043
- const listRef = useRef13(null);
5044
- const hmsActions = useHMSActions19();
5751
+ const [isSelectorOpen] = useState34(false);
5752
+ const listRef = useRef14(null);
5753
+ const hmsActions = useHMSActions21();
5045
5754
  const { setPinnedMessage } = useSetPinnedMessage();
5046
- useEffect21(() => {
5755
+ useEffect23(() => {
5047
5756
  if (notification && notification.data && peerSelector === notification.data.id) {
5048
5757
  setPeerSelector("");
5049
5758
  setChatOptions({
@@ -5055,14 +5764,14 @@ var Chat = ({ screenType }) => {
5055
5764
  }, [notification, peerSelector, setPeerSelector]);
5056
5765
  const storeMessageSelector = selectHMSMessagesCount;
5057
5766
  const { elements } = useRoomLayoutConferencingScreen();
5058
- const isMobile = useMedia14(config.media.md);
5767
+ const isMobile = useMedia18(config.media.md);
5059
5768
  let isScrolledToBottom = false;
5060
5769
  if (listRef.current) {
5061
5770
  const currentRef = listRef.current._outerRef;
5062
5771
  isScrolledToBottom = currentRef.scrollHeight - currentRef.clientHeight - currentRef.scrollTop < 10;
5063
5772
  }
5064
- const messagesCount = useHMSStore29(storeMessageSelector) || 0;
5065
- const scrollToBottom = useCallback14(
5773
+ const messagesCount = useHMSStore34(storeMessageSelector) || 0;
5774
+ const scrollToBottom = useCallback15(
5066
5775
  (unreadCount = 0) => {
5067
5776
  var _a2;
5068
5777
  if (listRef.current && listRef.current.scrollToItem && unreadCount > 0) {
@@ -5076,7 +5785,7 @@ var Chat = ({ screenType }) => {
5076
5785
  },
5077
5786
  [hmsActions, messagesCount]
5078
5787
  );
5079
- return /* @__PURE__ */ React56.createElement(
5788
+ return /* @__PURE__ */ React61.createElement(
5080
5789
  Flex,
5081
5790
  {
5082
5791
  direction: "column",
@@ -5085,8 +5794,8 @@ var Chat = ({ screenType }) => {
5085
5794
  gap: "$4"
5086
5795
  }
5087
5796
  },
5088
- isMobile && ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) ? null : /* @__PURE__ */ React56.createElement(React56.Fragment, null, ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.allow_pinning_messages) ? /* @__PURE__ */ React56.createElement(PinnedMessage, { clearPinnedMessage: setPinnedMessage }) : null),
5089
- /* @__PURE__ */ React56.createElement(
5797
+ isMobile && ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) ? null : /* @__PURE__ */ React61.createElement(React61.Fragment, null, ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.allow_pinning_messages) ? /* @__PURE__ */ React61.createElement(PinnedMessage, { clearPinnedMessage: setPinnedMessage }) : null),
5798
+ /* @__PURE__ */ React61.createElement(
5090
5799
  ChatBody,
5091
5800
  {
5092
5801
  role: chatOptions.role,
@@ -5096,7 +5805,7 @@ var Chat = ({ screenType }) => {
5096
5805
  screenType
5097
5806
  }
5098
5807
  ),
5099
- /* @__PURE__ */ React56.createElement(
5808
+ /* @__PURE__ */ React61.createElement(
5100
5809
  ChatFooter,
5101
5810
  {
5102
5811
  role: chatOptions.role,
@@ -5114,7 +5823,7 @@ var Chat = ({ screenType }) => {
5114
5823
  },
5115
5824
  peerId: chatOptions.peerId
5116
5825
  },
5117
- !isSelectorOpen && !isScrolledToBottom && /* @__PURE__ */ React56.createElement(NewMessageIndicator, { role: chatOptions.role, peerId: chatOptions.peerId, scrollToBottom })
5826
+ !isSelectorOpen && !isScrolledToBottom && /* @__PURE__ */ React61.createElement(NewMessageIndicator, { role: chatOptions.role, peerId: chatOptions.peerId, scrollToBottom })
5118
5827
  )
5119
5828
  );
5120
5829
  };
@@ -5123,7 +5832,7 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
5123
5832
  if (!unreadCount) {
5124
5833
  return null;
5125
5834
  }
5126
- return /* @__PURE__ */ React56.createElement(
5835
+ return /* @__PURE__ */ React61.createElement(
5127
5836
  Flex,
5128
5837
  {
5129
5838
  justify: "center",
@@ -5134,7 +5843,7 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
5134
5843
  position: "absolute"
5135
5844
  }
5136
5845
  },
5137
- /* @__PURE__ */ React56.createElement(
5846
+ /* @__PURE__ */ React61.createElement(
5138
5847
  Button,
5139
5848
  {
5140
5849
  variant: "standard",
@@ -5157,11 +5866,70 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
5157
5866
  },
5158
5867
  "New ",
5159
5868
  unreadCount === 1 ? "message" : "messages",
5160
- /* @__PURE__ */ React56.createElement(ChevronDownIcon2, null)
5869
+ /* @__PURE__ */ React61.createElement(ChevronDownIcon2, null)
5161
5870
  )
5162
5871
  );
5163
5872
  };
5164
5873
 
5874
+ // src/Prebuilt/components/Footer/PaginatedParticipants.tsx
5875
+ import React62, { useEffect as useEffect24, useRef as useRef15, useState as useState35 } from "react";
5876
+ import { useMeasure as useMeasure3 } from "react-use";
5877
+ import { FixedSizeList as FixedSizeList2 } from "react-window";
5878
+ import { selectIsConnectedToRoom as selectIsConnectedToRoom6, useHMSStore as useHMSStore35, usePaginatedParticipants as usePaginatedParticipants2 } from "@100mslive/react-sdk";
5879
+ import { ChevronLeftIcon as ChevronLeftIcon4, CrossIcon as CrossIcon9 } from "@100mslive/react-icons";
5880
+ var PaginatedParticipants = ({ roleName, onBack }) => {
5881
+ const { peers, total, loadPeers, loadMorePeers } = usePaginatedParticipants2({ role: roleName, limit: 20 });
5882
+ const [search, setSearch] = useState35("");
5883
+ const [isLoading, setIsLoading] = useState35(false);
5884
+ const filteredPeers = peers.filter((p) => {
5885
+ var _a;
5886
+ return (_a = p.name) == null ? void 0 : _a.toLowerCase().includes(search);
5887
+ });
5888
+ const isConnected = useHMSStore35(selectIsConnectedToRoom6);
5889
+ const [ref, { width }] = useMeasure3();
5890
+ const containerRef = useRef15(null);
5891
+ const height = ROW_HEIGHT * peers.length;
5892
+ const resetSidePane = useSidepaneReset();
5893
+ const hasNext = total > peers.length;
5894
+ useEffect24(() => {
5895
+ loadPeers();
5896
+ }, []);
5897
+ return /* @__PURE__ */ React62.createElement(Flex, { ref, direction: "column", css: { size: "100%", gap: "$4" } }, /* @__PURE__ */ React62.createElement(Flex, { align: "center" }, /* @__PURE__ */ React62.createElement(Flex, { align: "center", css: { flex: "1 1 0", cursor: "pointer" }, onClick: onBack }, /* @__PURE__ */ React62.createElement(ChevronLeftIcon4, null), /* @__PURE__ */ React62.createElement(Text, { variant: "lg", css: { flex: "1 1 0" } }, "Participants")), /* @__PURE__ */ React62.createElement(
5898
+ IconButton,
5899
+ {
5900
+ onClick: (e) => {
5901
+ e.stopPropagation();
5902
+ resetSidePane();
5903
+ },
5904
+ "data-testid": "close_sidepane"
5905
+ },
5906
+ /* @__PURE__ */ React62.createElement(CrossIcon9, null)
5907
+ )), /* @__PURE__ */ React62.createElement(ParticipantSearch, { onSearch: (search2) => setSearch(search2), placeholder: `Search for ${roleName}` }), /* @__PURE__ */ React62.createElement(Flex, { direction: "column", css: { border: "1px solid $border_default", borderRadius: "$1", flex: "1 1 0" } }, /* @__PURE__ */ React62.createElement(Flex, { align: "center", css: { height: ROW_HEIGHT, borderBottom: "1px solid $border_default", px: "$8" } }, /* @__PURE__ */ React62.createElement(Text, { css: { fontSize: "$space$7" } }, roleName, "(", getFormattedCount(peers.length), "/", getFormattedCount(total), ")")), /* @__PURE__ */ React62.createElement(Box, { css: { flex: "1 1 0", overflowY: "auto", overflowX: "hidden", mr: "-$10" } }, /* @__PURE__ */ React62.createElement(
5908
+ FixedSizeList2,
5909
+ {
5910
+ itemSize: ROW_HEIGHT,
5911
+ itemData: { peerList: filteredPeers, isConnected: isConnected === true },
5912
+ itemKey,
5913
+ itemCount: filteredPeers.length,
5914
+ width,
5915
+ height,
5916
+ outerRef: containerRef
5917
+ },
5918
+ VirtualizedParticipantItem
5919
+ ), hasNext ? /* @__PURE__ */ React62.createElement(Flex, { justify: "center", css: { w: "100%" } }, /* @__PURE__ */ React62.createElement(
5920
+ Button,
5921
+ {
5922
+ css: { w: "max-content", p: "$4" },
5923
+ onClick: () => {
5924
+ setIsLoading(true);
5925
+ loadMorePeers().catch(console.error).finally(() => setIsLoading(false));
5926
+ },
5927
+ disabled: isLoading
5928
+ },
5929
+ isLoading ? /* @__PURE__ */ React62.createElement(Loading, { size: 16 }) : "Load More"
5930
+ )) : null)));
5931
+ };
5932
+
5165
5933
  // src/Prebuilt/components/SidePaneTabs.tsx
5166
5934
  var tabTriggerCSS = {
5167
5935
  color: "$on_surface_high",
@@ -5172,23 +5940,25 @@ var tabTriggerCSS = {
5172
5940
  justifyContent: "center"
5173
5941
  };
5174
5942
  var ParticipantCount2 = ({ count }) => {
5175
- return count < 1e3 ? /* @__PURE__ */ React57.createElement("span", null, "(", count, ")") : /* @__PURE__ */ React57.createElement(Tooltip, { title: count }, /* @__PURE__ */ React57.createElement("span", null, "(", getFormattedCount(count), ")"));
5943
+ return count < 1e3 ? /* @__PURE__ */ React63.createElement("span", null, "(", count, ")") : /* @__PURE__ */ React63.createElement(Tooltip, { title: count }, /* @__PURE__ */ React63.createElement("span", null, "(", getFormattedCount(count), ")"));
5176
5944
  };
5177
- var SidePaneTabs = React57.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {
5945
+ var SidePaneTabs = React63.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {
5178
5946
  var _a;
5179
5947
  const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
5180
5948
  const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
5181
5949
  const resetSidePane = useSidepaneReset();
5182
- const [activeTab, setActiveTab] = useState32(active);
5183
- const peerCount = useHMSStore30(selectPeerCount3);
5950
+ const [activeTab, setActiveTab] = useState36(active);
5951
+ const [activeRole, setActiveRole] = useState36("");
5952
+ const peerCount = useHMSStore36(selectPeerCount3);
5184
5953
  const { elements } = useRoomLayoutConferencingScreen();
5185
5954
  const showChat = !!(elements == null ? void 0 : elements.chat);
5186
5955
  const showParticipants = !!(elements == null ? void 0 : elements.participant_list);
5187
5956
  const hideTabs = !(showChat && showParticipants);
5188
- const isMobile = useMedia15(config.media.md);
5957
+ const isMobile = useMedia19(config.media.md);
5189
5958
  const isOverlayChat = !!((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) && isMobile;
5959
+ const { off_stage_roles = [] } = (elements == null ? void 0 : elements.on_stage_exp) || {};
5190
5960
  const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
5191
- useEffect22(() => {
5961
+ useEffect25(() => {
5192
5962
  if (activeTab === SIDE_PANE_OPTIONS.CHAT && !showChat && showParticipants) {
5193
5963
  setActiveTab(SIDE_PANE_OPTIONS.PARTICIPANTS);
5194
5964
  } else if (activeTab === SIDE_PANE_OPTIONS.PARTICIPANTS && showChat && !showParticipants) {
@@ -5197,10 +5967,26 @@ var SidePaneTabs = React57.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
5197
5967
  resetSidePane();
5198
5968
  }
5199
5969
  }, [showChat, activeTab, showParticipants, resetSidePane]);
5200
- useEffect22(() => {
5970
+ useEffect25(() => {
5201
5971
  setActiveTab(active);
5202
5972
  }, [active]);
5203
- return /* @__PURE__ */ React57.createElement(
5973
+ if (activeRole) {
5974
+ return /* @__PURE__ */ React63.createElement(
5975
+ Flex,
5976
+ {
5977
+ direction: "column",
5978
+ css: {
5979
+ color: "$on_primary_high",
5980
+ h: "100%",
5981
+ marginTop: hideControls && isOverlayChat ? "$17" : "0",
5982
+ transition: "margin 0.3s ease-in-out",
5983
+ position: "relative"
5984
+ }
5985
+ },
5986
+ /* @__PURE__ */ React63.createElement(Box, { css: { position: "absolute", left: 0, top: 0, size: "100%", zIndex: 21, bg: "$surface_dim" } }, /* @__PURE__ */ React63.createElement(PaginatedParticipants, { roleName: activeRole, onBack: () => setActiveRole("") }))
5987
+ );
5988
+ }
5989
+ return /* @__PURE__ */ React63.createElement(
5204
5990
  Flex,
5205
5991
  {
5206
5992
  direction: "column",
@@ -5211,7 +5997,7 @@ var SidePaneTabs = React57.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
5211
5997
  transition: "margin 0.3s ease-in-out"
5212
5998
  }
5213
5999
  },
5214
- isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */ React57.createElement(Chat, { screenType }) : /* @__PURE__ */ React57.createElement(React57.Fragment, null, hideTabs ? /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" : /* @__PURE__ */ React57.createElement("span", null, "Participants ", /* @__PURE__ */ React57.createElement(ParticipantCount2, { count: peerCount }))), showChat ? /* @__PURE__ */ React57.createElement(Chat, { screenType }) : /* @__PURE__ */ React57.createElement(ParticipantList, null)) : /* @__PURE__ */ React57.createElement(
6000
+ isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */ React63.createElement(Chat, { screenType }) : /* @__PURE__ */ React63.createElement(React63.Fragment, null, hideTabs ? /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" : /* @__PURE__ */ React63.createElement("span", null, "Participants ", /* @__PURE__ */ React63.createElement(ParticipantCount2, { count: peerCount }))), showChat ? /* @__PURE__ */ React63.createElement(Chat, { screenType }) : /* @__PURE__ */ React63.createElement(ParticipantList, { offStageRoles: off_stage_roles, onActive: setActiveRole })) : /* @__PURE__ */ React63.createElement(
5215
6001
  Tabs.Root,
5216
6002
  {
5217
6003
  value: activeTab,
@@ -5221,7 +6007,7 @@ var SidePaneTabs = React57.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
5221
6007
  size: "100%"
5222
6008
  }
5223
6009
  },
5224
- /* @__PURE__ */ React57.createElement(Tabs.List, { css: { w: "calc(100% - $12)", p: "$2", borderRadius: "$2", bg: "$surface_default" } }, /* @__PURE__ */ React57.createElement(
6010
+ /* @__PURE__ */ React63.createElement(Tabs.List, { css: { w: "calc(100% - $12)", p: "$2", borderRadius: "$2", bg: "$surface_default" } }, /* @__PURE__ */ React63.createElement(
5225
6011
  Tabs.Trigger,
5226
6012
  {
5227
6013
  value: SIDE_PANE_OPTIONS.CHAT,
@@ -5231,7 +6017,7 @@ var SidePaneTabs = React57.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
5231
6017
  })
5232
6018
  },
5233
6019
  "Chat"
5234
- ), /* @__PURE__ */ React57.createElement(
6020
+ ), /* @__PURE__ */ React63.createElement(
5235
6021
  Tabs.Trigger,
5236
6022
  {
5237
6023
  value: SIDE_PANE_OPTIONS.PARTICIPANTS,
@@ -5241,15 +6027,15 @@ var SidePaneTabs = React57.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
5241
6027
  })
5242
6028
  },
5243
6029
  "Participants ",
5244
- /* @__PURE__ */ React57.createElement(ParticipantCount2, { count: peerCount })
6030
+ /* @__PURE__ */ React63.createElement(ParticipantCount2, { count: peerCount })
5245
6031
  )),
5246
- /* @__PURE__ */ React57.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.PARTICIPANTS, css: { p: 0 } }, /* @__PURE__ */ React57.createElement(ParticipantList, null)),
5247
- /* @__PURE__ */ React57.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.CHAT, css: { p: 0 } }, /* @__PURE__ */ React57.createElement(Chat, { screenType }))
6032
+ /* @__PURE__ */ React63.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.PARTICIPANTS, css: { p: 0 } }, /* @__PURE__ */ React63.createElement(ParticipantList, { offStageRoles: off_stage_roles, onActive: setActiveRole })),
6033
+ /* @__PURE__ */ React63.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.CHAT, css: { p: 0 } }, /* @__PURE__ */ React63.createElement(Chat, { screenType }))
5248
6034
  )),
5249
- isOverlayChat && isChatOpen ? null : /* @__PURE__ */ React57.createElement(
6035
+ isOverlayChat && isChatOpen ? null : /* @__PURE__ */ React63.createElement(
5250
6036
  IconButton,
5251
6037
  {
5252
- css: { position: "absolute", right: "$10", top: "$11", "@md": { top: "$8", right: "$8" } },
6038
+ css: { position: "absolute", right: "$9", top: "$11", "@md": { top: "$8", right: "$6" } },
5253
6039
  onClick: (e) => {
5254
6040
  e.stopPropagation();
5255
6041
  if (activeTab === SIDE_PANE_OPTIONS.CHAT) {
@@ -5260,22 +6046,22 @@ var SidePaneTabs = React57.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
5260
6046
  },
5261
6047
  "data-testid": "close_chat"
5262
6048
  },
5263
- /* @__PURE__ */ React57.createElement(CrossIcon7, null)
6049
+ /* @__PURE__ */ React63.createElement(CrossIcon10, null)
5264
6050
  )
5265
6051
  );
5266
6052
  });
5267
6053
 
5268
6054
  // src/Prebuilt/components/Streaming/StreamingLanding.jsx
5269
- import React59, { Fragment as Fragment10, useState as useState34 } from "react";
5270
- import { selectPermissions as selectPermissions11, useHMSStore as useHMSStore32, useRecordingStreaming as useRecordingStreaming7 } from "@100mslive/react-sdk";
5271
- import { ColoredHandIcon, CrossIcon as CrossIcon8, GoLiveIcon as GoLiveIcon3 } from "@100mslive/react-icons";
6055
+ import React65, { Fragment as Fragment12, useState as useState38 } from "react";
6056
+ import { selectPermissions as selectPermissions13, useHMSStore as useHMSStore38, useRecordingStreaming as useRecordingStreaming7 } from "@100mslive/react-sdk";
6057
+ import { ColoredHandIcon, CrossIcon as CrossIcon11, GoLiveIcon as GoLiveIcon3 } from "@100mslive/react-icons";
5272
6058
 
5273
6059
  // src/Prebuilt/images/rtmp.png
5274
6060
  var rtmp_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABlCAYAAAC7vkbxAAAVDUlEQVR4Ae1dDXgU9Zl//7OfiWz4SCKEgCR+kIVQWb76aKUSxHp6aiGtvZ6e1XC94l3VKsVeH73rCU/vWu85rHJie9JrDWix3nFH/KhaEY1CvZ58uFQDCVQIKEkgAUO+92Pm3/ed2Zmd2cwmu5uZzQL+nmfJzOwwX7//+/l/31mAz5BTYHCWwe+/ogwc4SrgUCYBTGOMl9Gy+j0H6GQMOjlnzQLAUYmzYNgj1jcHg51wFuCsIMQ/a34V59JS4HwZrpZBBkCigoyxeuaS1jUGg82Qo8hZQsoCgXF5EaFGAn4nPs0AWAgiR2BsXWPD3lrIMeQkIRWz5t0HXFqNT25c4nc8fxJEShZKou8SEMdeFuJOX56UP7EXQMhT9pD6HX1tLtZ/wu0480dwdB+SHB1BQehrMztVM0rNmlwiJqcIIdUkSeJjeFEGiZAKLmmPlFxdHCq/BbhrDGQCIsfV9k7I9clvPYPIYajOXLw6F1RZzhBSUTn3MbQR9+u3iUUBGJi+HKKFlmoscH/8GngOPg2DiOFsZdOBvY/DKGLUCSFb4YmwraieqtRtEqql/sCDlhORCFNiGHu8qWHvShgljCoh/kCgjIfZW6DznMIXfw2loiZj1ZQuiAwvkuJCclSQ0Q+7+eLRcJVHjZBEMogAkorIpIUwGvAc3gLehie09dEiZVQISSSDVFTvlevkv6MJ56kg5O/6B2CRHnl9NEgRYBQghdFm5BgZBLJZdC2quiRvzx0RHoMswgFZxvSZcx/GG/1LWqYb7134s5wgQwX3TgBxfKVs8AlESlHR5DOnOlp/D1lAVgmhOAMDvlp1vX/ew3jzMyHXIA8Qlw+c7e8pGxhcUVw66fmOtjbbVZcTsgguiU+ryyGML+ww4BUTBemGmS6YUcLYZcUM8twCj4ic9YY59IQA2ro4b+nk8PqBKOw5JiZV2aGLbwFH1yHV+xrHI4yufTHYjKwRQqoKKSmjZRqBAxU1YCUmFjD+o6Ue/ueVzsSHzBJ8F3lFlEBCQoY8Zn/lveBs26kYeYyT/JVza+xOs2TFqJNXxYDXqOtkOK1EZYlD2nbvBWBCxohANm4ASdHWOX8YbEZWCJHCwp0Q86rCU6+31IhPHc/gub/2smKfPS48XW+0SMsYlJGUgI3ICiF66SDbYSX+tdojFfuYrfGU/po5TQfYCNsJiY2oMloW0c+3UjrmTxPExdOdtt8DxSdaKodsyaxAFdgE22+Gc1iqLoen3gBW4q4verKWaQij16WCS8IysAn2e1mM0/y3DJxYAiux4KLhx9OOP4p8/dsRaGgReW84PgCjIk9rMIan3ACeptrYGqdBdj/YAFslRAkElVk/UlfcaV0GN88FHF3dIa//0ElJunNjP7xzKMpO9XJhIMJB/UQlSAukanlc3ZbRtAHYAFsJYVzS3BOrpQPJGHaff3o5xPoj1nlf+kDWG7FHbdlKiMRhkbosFlwGVsIpDO9Z7f1Y4mAhxLGXxld4ZtUvw8Feo864JtaGm8kSwlFu6f3pBxXVhIENsFll6QrYnNmZAbQT+nsQmJIGshq2EsJ1cx7nAvT3wc9KlfUZ0sZnhOQYsjofkgm23pXHryh3ZOS6Hvlhcru1cG2f9FGHlHMD8ryUEAwK+ZFTUk6W0Z6XhBzpkDhGKOcfIXjHzfJJzAudRw3HO3lGZOjvA8PSZrAB9rq9DLSigFwipaFVhEwg9Ldqy+j2ngEbYK+ESLBPO1F/7hBy7DTPKKVCFfQqGLAg2AB7CRHiF00VHLmCwx2ZpbgcXTpCHJIthNjq9nKGFx1T187WnRAq/xqki2f/P8LrDw5OEhaO4exbV7mHtAVrt0UkszR74wkxMxuiI4RHwBZCbPc0KirnfEpzIjQF2n3t85bltC4tFmDHqvwh9yn/QQ/OfYAlIJXre+PrygqDYFPD+3PABtjv9nJWT3+otsnVtgPOVrhaddfO2dtgE2wnhAmSVoTlOvYanK1wH9miLTtZvBzWatieOhlwQtATQfcX1RaV+9PH7s6odCD0tcrqKNELlPImyZUmUn6JLB2a247qqqEhaIv9INhOCPVW+GfOXcdBqfrzND0N0S9YW7mYKlhUUZtydy4ODL0bm/IxOKsDG5GV5OKAW3rcE2H3jYaUEAnOjvfBfXiLfN6RAgfW6oqZc2owVK+z4yUEtnhZVJHhHfAaqzKEcI0qJTSd23P1L2AkGM7L6uruhrk1teD4aIvWEZUIj+CDIlcF+ByTwe0YAx7m074L8W7oibZCV7QFOiJNSc/DGasVXNIaq4gZMSHyw486A/TqC855FeZ4yswa/hNB5f76QuZ0MRQhm57ZDOt/ugG6uroN24mAcu9iKPXOhcnu+eBzToZU0RLaDcdDe+BIf70pQVYRkzEh2vtHqG43BQLM0Iu2JFPVZUbI8ZYWePCh1fDerj2G7aWe+bCgYAUUuisMUpApusUW2NX1FJK0R5YgHdB5YWtG0uueNiEKEeLD+r5yPQoKfFA6eTL4fMYbP368RX5gepAX07PoF7JHky4SCTGTCpWIyfjXDhAxjb0vwR96NkNI0kkjg3rm4sszkZaUCVEa/IWHE9+2QAT4Kyrg2iVVsAQ/REYy0MNqbGqCHz/yKBxoVMRebvpESUmXFD0hP3pkLRLynPYdqaIl41fbRkQiVIkhcnRoZm6+OF1SUiLErMGfiLjjG7fBHbffJi+nAzK41V+9VZYaQiakECG/WSHCPfeuMqgo/wU3w1XjHtBUE92gpdVyCVCPT2V7jb0vws7OR/XS0ulkfHE6ccuwhEyfMW8ZRttP6+3EPXfflRERehAZdyxfoZGidCvdk3KFfPnYXpi4+36UtIPatoVIxOVjbrOdhGQgUrrRptS1r9DblrRIGZKQ6ZXz7mS6rtnS0snw5L8/Cn5/BViBRFII5H2FKpYPm4SkBn9X2055mbynhWMfgAqUjlxAD6qwVzpW6b2xlElJ2hZdGQgEuAha8mkGkvDrzRtlUqwCSdi111RBI45y1eA7P90PrpY3MfE1ht6HZfr/6IUxnqMvauu3XLgRpnq/ALkCNw6QS/P/DD4e+D/ok07RJq8E7Pri0kkvDNdabUoI2QwpzF7FRVlNXbtkMaxHyRiJikoGOmb1sptlWVVtgZIZ3ilH1tQCQPkkFe6PX4W8hvXa+jXj18BFOUSGCifzyKR81P+6alPGgcQCp9rbNg71/0xVFqYGjkDMgJNkbHx6gy1kJMJMhRHI6Icuvb1PGjMlPy/4iJbo+3zBXTAfP7kMUl/Pn7g1buiHeSfXIEKUV1/w1bRM6mkTkmGlmkoFW+telGOKRGL0uDhvMVxf+CicDaAonwy9CnSHy5O5wwZCZPc2wt5XPaof/8saRZ2MEpIRQ3HGsuINcg4qHZRfCTCnGmzBjp8DtCcpG6CHvKNzrRxAxjbU44yj6VshjNleJfCTyahe9uXMyZAdc06Z0djlMP0XKUejdA0knXfUrDBsX4BqSs5DpeHbzvgSwJLvYo7Tpik57wXJv6PLpGtu6ntJUV2xTt7GD4P1iftqhCjBX7yf/J5vr0h68MiePeDahyn0jw4DP3ECnGIUoK8fpO4uzLWHkAsu74mcyDUORIH87BwCSBeMAQfaI+7ygFhcCGxaGQgzZoKjapHiyCfg8wvmy5/3du2W14kIf/7NyrEhNQSWAVz9d/H1IM5o9H8KI4bTiw/61tT29Tp8coxEET2Bc0aZ7/pBx9SWIkKVeovqyEwEJhMh8p37wPnkk3KlWOJkipnLxhL+Crp1/WANz5oF7JXfgGvqRTAUFsSMeKpk0AO7ssa4bT/6jx3NMGLkjUudEBqjRIiW90oiJdoz0b+hoHrZTaYHFZ/ZBM7162MSYC1cH34IkXsHdxo3Nh0cJB2pYt5fDCZjNEEBLJGiwqzfXSaE1JWavSXJIBUxGEjC1hdtrRvyvPUGSD3GyaSNm36lLc/W3cxwmP91gKu+CTmHyw33wO9MbK+WCZFEhzYpYU6GbBGAH05/DjodCJQ6P3nSsE2fOCzPq4JUMW0BpI3xUwDm3qJ8DOYMx+LspYotGjcFRgSSktJ4Fhon94wvjZYJEUSuI2Se6YFITbGWVhgOoZtuBn7RVMgUXDdnQupKdXmL3BVpu7nporAcE5TfUj56VUAK+ot/qzgGJX4YMfQDK1FtCbETzlY3lJaWmB6Eh0LATw/vmji/cTvwd3bCwN3fBikTH7MrXlR+4ECjtjzZMw/OFRgknfFF+u+E2EZNjyWbYJI6O9GLSq2M3zHtIsh7Aj2xxgYQv3QdzTdDynNhn8ZJ16fWS7M02ZQNkKQXqPP5HAJ6OyITou8nT5omQQmBIfpceGIMgauOy/zgeP23EHp2M0QuvhhSAR8Ia8uNOkIKHCVwLqHQFZ/CuCASf/5p6JTkozzidkF/vhciXgz2BAbRaBREUZQ/4XAYhGuvgUj1jRByOiDqGwNDSguPl6vTdK/ZDZwL8OkGmAiCZsNTL5QTmNyBYxaRkQfmFBxyRB6ROAjoAEgS7osRfOjxn4D7qQ3gONmOSTU3REQ8gAP3F81jGZYfL1xQCxbSKdc5W1Cguyccg5rKkgnh1C8XU1vk1ZiqLUx3SChQDhjccOFGKYCwompo7DtcLhDf2g7SfSvB98EHkA5Y4QT5L827a6d2ZIeQ5vcAfvlXyrJOUGUX+JnlyvJAD1gCjzBGf3wjITjwj6rmgWbuzAhxFBQo6uZMFwwF3twM0euuA8e2N5C8DCJ6r1f+051Q5JYNRNFM0rt9zXDGpCMvrwAsh2LUda1njQcOmu7ImQBswgQYDs7vfx+c27ap6cS0wX023KUNKJgI8OV/jq9blUxS4hAW75c70GROCD1gqcKCqGgISKQbyhVvzFdgrLPNJRRMAvjKvymkEH6/CeATixoUZEKohwNiLczbt781qCZWAQNhXgb5iDQgzp4NjvGKOi3QVT4aqgJHGZReueXROBnv/hLTO7+CtBGS4sYIfaB4+zj9E/t9DJljMqZ6d9OAVfdD5JJLlJFsNcYWgPiEcapZtWXd0RawFCzJZ5h9ii5BMn4CMKYIZB1Vj7Hv7uchI+hrggWn1KwuO+PnZxsxBV9Fy+uf3ACbagdHxo7xE0Da8Ttgv94M4W3bwdVzBqKftABrawEhFFbyXUOk5tXgUcR4hE0oAl5YiHmvKcD8M8Dxzb+BvMpKw/6UNVBzWXQDBRa5v8seQfUYNW7bgw92X6yyyIvCecMPUBpKjft4cFbQlUfJWIBtawGa3oSMcSoSNw2CFH8rhEbIgEuq80TYYzSfTvMP9DHL/LpKUFZXrgTPSuV3s9zqF+gnciID4wseHsAP5r5ESZ4zZU4XCBiDMJcb6KV7TqI/BSnz+6drcyEt4T2WEZJvUqvvioU/+ei3VCNhhdPM/29kAOAVNOZHd8GIoG9p0BfQaZE6qS3GmdZrRlKSFsgLo+DQ5QSBpmnHF4KzqBicEwpll5mhO8twCleg/VJUeTOQELMbsAu+YsU+JCNjAD3+//37kZNBxdmaXWTGfndD6oRaz1TjTiNz06bNMJqYMSPu1VGjjJ3wXQjwVVRD45IIYd9pgC0PAJywYFxQWZCGhBZrAyEkJVzgy9X19T99ChN89o/MZFj/5FPaMhn2UzZKyeduVNxZM3TjnNmWVQCnj4IlaOx9WVtmglSn/25QcvHgB1SToXSaksd193dWDWq0yQaIjDe2v2XYdthmKTFD1wlFMjotegSkro7HJaQ5scjBNLkYckvLPWFGGcgyubyzZgV6XRuGbMaxEkQGSWciqGLjct9tKbWlnT6GN+c2/45shNM7ePvJQ8YcVghDhe1oVbtPgGXY1x03A+iT1id+n9S6+v2BMi7Em3TkstIskKJ0Q23WXSBfg+7yIrUIQ+0BGQlu+xnGFLrpGSJh+2MA+18H2/Fs201aDMIkXt7YaCwpTTofQjvif1gMsbfCkaRUf+VW2Fr3EtgBUouyJCaQ0bg/uJoxvkbdto/qmixMpZAUvPLD7JBBRXIaGQzqE8kgDPmzeR0dbZ3FhZNewP9NE/HjQphi3/5mPT68VvSAphvSG5mC7NTP/7MWHvrH1XD4SLO2XSVDvo6Tbc1FF5ZU4WJZGN1FKvWfMoIp3c/dhPHGeMVY//d3AVr3g+0gp+R3Z+Ltbk7Gq9vb2wblkIf9HUOVFAzlxuNTkme2yPOikUzEFGBKPpPqeJWIVd97EHbsfBdniGNTt+h2M4Hf0NgQrNXvXzxx0lF0EWtomaJc6r2gkppMQIRE8XT/8z28jiy96O7dM2vlPncC2o7axv3vP2W2X1pJKX9loCZWk1qm364W1y25ZhFMwWWzljc5R3agSS7teWN7vRaBJ1xOHZOklWaiTKiYOXcr3o5cNkNFD0uL0wxeY7gR7+Cd/7DWWA8FckZ2dq5VVmjAiXxOsntMv08djT2qsNWYAlk61AsD9Ma/u6c7SQY5dhGoTzEJtsasGlyP2G+vH1HPOxs9rqvGPgDpwulRJqOyAXJz/8vQsMNXNh0Ipt6wkypkYhxQheJHL5VJ/3UMlBGQ2EbmkOqGI8Jw3lmBKi4xLUCxwuuyC0TGC4aOXFbXtH/vkB0qluTRNXIkIYD6fzbNz3OdWqP399IrYzFXFmRM2ofLwXRIGHS+mYHVOBC0H3mkPkN/jnTgqhhMBsheazJVpcLO2mlb4a+cU4vJZa1iP5ckJVMyCFn/+W6r0NHeVld8YUk5Lsrq8tjAu/L20a5wpHzbyx33xskgzSDxK1Mhg3DWEkIgUoqKJ2NEAVfQOr2dhz6l3nkZu8QjAXlTr55apZ9ybk6HDMJZTQjhVHvra8XFk6iKr4rWSV0cGaiXCSl2Z6HakSlzNdtOPwQNvVv036SsphIOd27ALEaiikdqgUun6yodJHkLEIKvC/XB6ubmYCekiXOGEIIWIzEw/ICwSkypZ54lPSY0wfSHnudwOsA4PUD2gkt8+cEDwTrIEOcUISqSZRQIZPSpP6PINT3l92lRHqolvBvaMWXT1PvS4LIk2aXn6wb64PFMpMJ4qHMYQxGjoij22j8zyemINslkJK0LixEBEtSmayuS4ZwmRIX8c9siqxku3ZMqKNWD2egX+nuhdqQSMejYcJ5BJkcSqqiVjFMMMxxBStFHM6Z53sb57+BAL9RZTYLxdOc5ysoC47xeJMVpVGsODp2iCJ1WqaJU8SdC2O29RZg76wAAAABJRU5ErkJggg==";
5275
6061
 
5276
6062
  // src/Prebuilt/components/Streaming/HLSStreaming.jsx
5277
- import React58, { Fragment as Fragment9, useCallback as useCallback15, useEffect as useEffect23, useState as useState33 } from "react";
5278
- import { selectRoomID, useHMSActions as useHMSActions20, useHMSStore as useHMSStore31, useRecordingStreaming as useRecordingStreaming6 } from "@100mslive/react-sdk";
6063
+ import React64, { Fragment as Fragment11, useCallback as useCallback16, useEffect as useEffect26, useState as useState37 } from "react";
6064
+ import { selectRoomID, useHMSActions as useHMSActions22, useHMSStore as useHMSStore37, useRecordingStreaming as useRecordingStreaming6 } from "@100mslive/react-sdk";
5279
6065
  import {
5280
6066
  EndStreamIcon as EndStreamIcon2,
5281
6067
  EyeOpenIcon,
@@ -5294,7 +6080,7 @@ var getCardData = (roleName, roomId) => {
5294
6080
  data3 = {
5295
6081
  title: formattedRoleName,
5296
6082
  content: "Broadcasters can livestream audio or video, manage stream appearance and control the room via HLS.",
5297
- icon: /* @__PURE__ */ React58.createElement(SupportIcon, null)
6083
+ icon: /* @__PURE__ */ React64.createElement(SupportIcon, null)
5298
6084
  };
5299
6085
  break;
5300
6086
  }
@@ -5302,7 +6088,7 @@ var getCardData = (roleName, roomId) => {
5302
6088
  data3 = {
5303
6089
  title: "HLS Viewer",
5304
6090
  content: "Viewers can view and send chat messages, but need to be made broadcasters to participate with audio or video.",
5305
- icon: /* @__PURE__ */ React58.createElement(EyeOpenIcon, null)
6091
+ icon: /* @__PURE__ */ React64.createElement(EyeOpenIcon, null)
5306
6092
  };
5307
6093
  break;
5308
6094
  }
@@ -5310,7 +6096,7 @@ var getCardData = (roleName, roomId) => {
5310
6096
  data3 = {
5311
6097
  title: formattedRoleName,
5312
6098
  content: `${formattedRoleName} is customised with specific permissions, which will determine how it interacts with this room.`,
5313
- icon: /* @__PURE__ */ React58.createElement(WrenchIcon, null),
6099
+ icon: /* @__PURE__ */ React64.createElement(WrenchIcon, null),
5314
6100
  order: 1
5315
6101
  };
5316
6102
  }
@@ -5318,8 +6104,8 @@ var getCardData = (roleName, roomId) => {
5318
6104
  return data3;
5319
6105
  };
5320
6106
  var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
5321
- const [copied, setCopied] = useState33(false);
5322
- return isHLSRunning ? /* @__PURE__ */ React58.createElement(
6107
+ const [copied, setCopied] = useState37(false);
6108
+ return isHLSRunning ? /* @__PURE__ */ React64.createElement(
5323
6109
  Box,
5324
6110
  {
5325
6111
  key: title,
@@ -5330,9 +6116,9 @@ var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
5330
6116
  borderRadius: "$2"
5331
6117
  }
5332
6118
  },
5333
- /* @__PURE__ */ React58.createElement(Flex, { align: "center", gap: "2", css: { color: "$primary_bright" } }, icon, /* @__PURE__ */ React58.createElement(Text, { variant: "h6", css: { fontWeight: "$semiBold" } }, title)),
5334
- /* @__PURE__ */ React58.createElement(Text, { variant: "sm", css: { color: "$on_surface_medium", mt: "$6" } }, content),
5335
- /* @__PURE__ */ React58.createElement(
6119
+ /* @__PURE__ */ React64.createElement(Flex, { align: "center", gap: "2", css: { color: "$primary_bright" } }, icon, /* @__PURE__ */ React64.createElement(Text, { variant: "h6", css: { fontWeight: "$semiBold" } }, title)),
6120
+ /* @__PURE__ */ React64.createElement(Text, { variant: "sm", css: { color: "$on_surface_medium", mt: "$6" } }, content),
6121
+ /* @__PURE__ */ React64.createElement(
5336
6122
  Button,
5337
6123
  {
5338
6124
  variant: "standard",
@@ -5344,24 +6130,24 @@ var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
5344
6130
  css: { w: "100%", r: "$1", mt: "$10", fontWeight: "$semiBold" },
5345
6131
  icon: true
5346
6132
  },
5347
- copied ? /* @__PURE__ */ React58.createElement(React58.Fragment, null, "Link copied!") : /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(LinkIcon, { style: { color: "inherit" } }), "Copy Invite Link")
6133
+ copied ? /* @__PURE__ */ React64.createElement(React64.Fragment, null, "Link copied!") : /* @__PURE__ */ React64.createElement(React64.Fragment, null, /* @__PURE__ */ React64.createElement(LinkIcon, { style: { color: "inherit" } }), "Copy Invite Link")
5348
6134
  )
5349
6135
  ) : null;
5350
6136
  };
5351
6137
  var HLSStreaming = ({ onBack }) => {
5352
6138
  const roleNames = useFilteredRoles();
5353
- const roomId = useHMSStore31(selectRoomID);
6139
+ const roomId = useHMSStore37(selectRoomID);
5354
6140
  const cards = roleNames.map((roleName) => getCardData(roleName, roomId));
5355
6141
  const { isHLSRunning } = useRecordingStreaming6();
5356
- const [showLinks, setShowLinks] = useState33(false);
5357
- return !showLinks ? /* @__PURE__ */ React58.createElement(Container, { rounded: true }, /* @__PURE__ */ React58.createElement(ContentHeader, { title: "Start Streaming", content: "HLS", onBack }), /* @__PURE__ */ React58.createElement(ContentBody, { title: "HLS Streaming", Icon: GoLiveIcon2, removeVerticalPadding: true }, "Stream directly from the browser using any device with multiple hosts and real-time messaging, all within this platform."), isHLSRunning ? /* @__PURE__ */ React58.createElement(EndHLS, { setShowLinks }) : /* @__PURE__ */ React58.createElement(StartHLS, null)) : /* @__PURE__ */ React58.createElement(Container, { rounded: true }, /* @__PURE__ */ React58.createElement(ContentHeader, { title: "Invite People", content: "Start the conversation", onBack: () => setShowLinks(false) }), /* @__PURE__ */ React58.createElement(Flex, { direction: "column", css: { gap: "$10", p: "$0 $10", overflowY: "auto", mb: "$10" } }, cards.map((card) => /* @__PURE__ */ React58.createElement(Card, __spreadProps(__spreadValues({ key: card.title }, card), { isHLSRunning })))));
6142
+ const [showLinks, setShowLinks] = useState37(false);
6143
+ return !showLinks ? /* @__PURE__ */ React64.createElement(Container, { rounded: true }, /* @__PURE__ */ React64.createElement(ContentHeader, { title: "Start Streaming", content: "HLS", onBack }), /* @__PURE__ */ React64.createElement(ContentBody, { title: "HLS Streaming", Icon: GoLiveIcon2, removeVerticalPadding: true }, "Stream directly from the browser using any device with multiple hosts and real-time messaging, all within this platform."), isHLSRunning ? /* @__PURE__ */ React64.createElement(EndHLS, { setShowLinks }) : /* @__PURE__ */ React64.createElement(StartHLS, null)) : /* @__PURE__ */ React64.createElement(Container, { rounded: true }, /* @__PURE__ */ React64.createElement(ContentHeader, { title: "Invite People", content: "Start the conversation", onBack: () => setShowLinks(false) }), /* @__PURE__ */ React64.createElement(Flex, { direction: "column", css: { gap: "$10", p: "$0 $10", overflowY: "auto", mb: "$10" } }, cards.map((card) => /* @__PURE__ */ React64.createElement(Card, __spreadProps(__spreadValues({ key: card.title }, card), { isHLSRunning })))));
5358
6144
  };
5359
6145
  var StartHLS = () => {
5360
- const [record, setRecord] = useState33(false);
5361
- const [error, setError] = useState33(false);
5362
- const hmsActions = useHMSActions20();
6146
+ const [record, setRecord] = useState37(false);
6147
+ const [error, setError] = useState37(false);
6148
+ const hmsActions = useHMSActions22();
5363
6149
  const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
5364
- const startHLS = useCallback15(
6150
+ const startHLS = useCallback16(
5365
6151
  (variants) => __async(void 0, null, function* () {
5366
6152
  try {
5367
6153
  if (isHLSStarted) {
@@ -5380,7 +6166,7 @@ var StartHLS = () => {
5380
6166
  }),
5381
6167
  [hmsActions, record, isHLSStarted, setHLSStarted]
5382
6168
  );
5383
- return /* @__PURE__ */ React58.createElement(Fragment9, null, /* @__PURE__ */ React58.createElement(RecordStream, { record, setRecord, testId: "hls-recording" }), /* @__PURE__ */ React58.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ React58.createElement(ErrorText, { error }), /* @__PURE__ */ React58.createElement(
6169
+ return /* @__PURE__ */ React64.createElement(Fragment11, null, /* @__PURE__ */ React64.createElement(RecordStream, { record, setRecord, testId: "hls-recording" }), /* @__PURE__ */ React64.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ React64.createElement(ErrorText, { error }), /* @__PURE__ */ React64.createElement(
5384
6170
  Button,
5385
6171
  {
5386
6172
  "data-testid": "start_hls",
@@ -5389,21 +6175,21 @@ var StartHLS = () => {
5389
6175
  onClick: () => startHLS(),
5390
6176
  disabled: isHLSStarted
5391
6177
  },
5392
- isHLSStarted ? /* @__PURE__ */ React58.createElement(Loading, { size: 24, color: "currentColor" }) : /* @__PURE__ */ React58.createElement(GoLiveIcon2, null),
6178
+ isHLSStarted ? /* @__PURE__ */ React64.createElement(Loading, { size: 24, color: "currentColor" }) : /* @__PURE__ */ React64.createElement(GoLiveIcon2, null),
5393
6179
  isHLSStarted ? "Starting stream..." : "Go Live"
5394
- )), /* @__PURE__ */ React58.createElement(Flex, { align: "center", css: { p: "$4 $10" } }, /* @__PURE__ */ React58.createElement(Text, null, /* @__PURE__ */ React58.createElement(InfoIcon4, { width: 16, height: 16 })), /* @__PURE__ */ React58.createElement(Text, { variant: "tiny", color: "$on_surface_medium", css: { mx: "$8" } }, "You cannot start recording once the stream starts, you will have to stop the stream to enable recording.")));
6180
+ )), /* @__PURE__ */ React64.createElement(Flex, { align: "center", css: { p: "$4 $10" } }, /* @__PURE__ */ React64.createElement(Text, null, /* @__PURE__ */ React64.createElement(InfoIcon4, { width: 16, height: 16 })), /* @__PURE__ */ React64.createElement(Text, { variant: "tiny", color: "$on_surface_medium", css: { mx: "$8" } }, "You cannot start recording once the stream starts, you will have to stop the stream to enable recording.")));
5395
6181
  };
5396
6182
  var EndHLS = ({ setShowLinks }) => {
5397
- const hmsActions = useHMSActions20();
5398
- const [inProgress, setInProgress] = useState33(false);
5399
- const [error, setError] = useState33("");
6183
+ const hmsActions = useHMSActions22();
6184
+ const [inProgress, setInProgress] = useState37(false);
6185
+ const [error, setError] = useState37("");
5400
6186
  const { isHLSRunning } = useRecordingStreaming6();
5401
- useEffect23(() => {
6187
+ useEffect26(() => {
5402
6188
  if (inProgress && !isHLSRunning) {
5403
6189
  setInProgress(false);
5404
6190
  }
5405
6191
  }, [inProgress, isHLSRunning]);
5406
- return /* @__PURE__ */ React58.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ React58.createElement(ErrorText, { error }), /* @__PURE__ */ React58.createElement(
6192
+ return /* @__PURE__ */ React64.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ React64.createElement(ErrorText, { error }), /* @__PURE__ */ React64.createElement(
5407
6193
  Button,
5408
6194
  {
5409
6195
  "data-testid": "stop_hls",
@@ -5422,23 +6208,23 @@ var EndHLS = ({ setShowLinks }) => {
5422
6208
  }
5423
6209
  })
5424
6210
  },
5425
- /* @__PURE__ */ React58.createElement(EndStreamIcon2, null),
6211
+ /* @__PURE__ */ React64.createElement(EndStreamIcon2, null),
5426
6212
  "End Stream"
5427
- ), /* @__PURE__ */ React58.createElement(Button, { icon: true, css: { w: "100%", r: "$0", mt: "$8" }, onClick: () => setShowLinks(true) }, /* @__PURE__ */ React58.createElement(PeopleIcon3, null), " Invite People"));
6213
+ ), /* @__PURE__ */ React64.createElement(Button, { icon: true, css: { w: "100%", r: "$0", mt: "$8" }, onClick: () => setShowLinks(true) }, /* @__PURE__ */ React64.createElement(PeopleIcon3, null), " Invite People"));
5428
6214
  };
5429
6215
 
5430
6216
  // src/Prebuilt/components/Streaming/StreamingLanding.jsx
5431
6217
  var StreamingLanding = () => {
5432
6218
  const toggleStreaming = useSidepaneToggle(SIDE_PANE_OPTIONS.STREAMING);
5433
6219
  const { isHLSRunning, isRTMPRunning } = useRecordingStreaming7();
5434
- const permissions = useHMSStore32(selectPermissions11);
5435
- const [showHLS, setShowHLS] = useState34(isHLSRunning);
5436
- const [showRTMP, setShowRTMP] = useState34(isRTMPRunning);
6220
+ const permissions = useHMSStore38(selectPermissions13);
6221
+ const [showHLS, setShowHLS] = useState38(isHLSRunning);
6222
+ const [showRTMP, setShowRTMP] = useState38(isRTMPRunning);
5437
6223
  if (!(permissions == null ? void 0 : permissions.hlsStreaming) && !(permissions == null ? void 0 : permissions.rtmpStreaming)) {
5438
6224
  toggleStreaming();
5439
6225
  return null;
5440
6226
  }
5441
- return /* @__PURE__ */ React59.createElement(Fragment10, null, /* @__PURE__ */ React59.createElement(Flex, { css: { w: "100%", py: "$8" } }, /* @__PURE__ */ React59.createElement(
6227
+ return /* @__PURE__ */ React65.createElement(Fragment12, null, /* @__PURE__ */ React65.createElement(Flex, { css: { w: "100%", py: "$8" } }, /* @__PURE__ */ React65.createElement(
5442
6228
  Box,
5443
6229
  {
5444
6230
  css: {
@@ -5448,8 +6234,8 @@ var StreamingLanding = () => {
5448
6234
  r: "$round"
5449
6235
  }
5450
6236
  },
5451
- /* @__PURE__ */ React59.createElement(ColoredHandIcon, { width: 40, height: 40 })
5452
- ), /* @__PURE__ */ React59.createElement(Box, { css: { flex: "1 1 0", mx: "$8" } }, /* @__PURE__ */ React59.createElement(Text, { variant: "sm" }, "Welcome !"), /* @__PURE__ */ React59.createElement(Text, { variant: "h6" }, "Let\u2019s get you started")), /* @__PURE__ */ React59.createElement(IconButton_default, { onClick: toggleStreaming, css: { alignSelf: "flex-start" }, "data-testid": "close_streaming" }, /* @__PURE__ */ React59.createElement(CrossIcon8, null))), /* @__PURE__ */ React59.createElement(Text, { variant: "tiny", color: "$on_surface_medium" }, "Start Streaming"), (permissions == null ? void 0 : permissions.hlsStreaming) && /* @__PURE__ */ React59.createElement(
6237
+ /* @__PURE__ */ React65.createElement(ColoredHandIcon, { width: 40, height: 40 })
6238
+ ), /* @__PURE__ */ React65.createElement(Box, { css: { flex: "1 1 0", mx: "$8" } }, /* @__PURE__ */ React65.createElement(Text, { variant: "sm" }, "Welcome !"), /* @__PURE__ */ React65.createElement(Text, { variant: "h6" }, "Let\u2019s get you started")), /* @__PURE__ */ React65.createElement(IconButton_default, { onClick: toggleStreaming, css: { alignSelf: "flex-start" }, "data-testid": "close_streaming" }, /* @__PURE__ */ React65.createElement(CrossIcon11, null))), /* @__PURE__ */ React65.createElement(Text, { variant: "tiny", color: "$on_surface_medium" }, "Start Streaming"), (permissions == null ? void 0 : permissions.hlsStreaming) && /* @__PURE__ */ React65.createElement(
5453
6239
  StreamCard,
5454
6240
  {
5455
6241
  testId: "hls_stream",
@@ -5459,7 +6245,7 @@ var StreamingLanding = () => {
5459
6245
  onClick: () => setShowHLS(true),
5460
6246
  Icon: GoLiveIcon3
5461
6247
  }
5462
- ), (permissions == null ? void 0 : permissions.rtmpStreaming) && /* @__PURE__ */ React59.createElement(
6248
+ ), (permissions == null ? void 0 : permissions.rtmpStreaming) && /* @__PURE__ */ React65.createElement(
5463
6249
  StreamCard,
5464
6250
  {
5465
6251
  testId: "rtmp_stream",
@@ -5471,7 +6257,7 @@ var StreamingLanding = () => {
5471
6257
  },
5472
6258
  imgSrc: rtmp_default
5473
6259
  }
5474
- ), showHLS && /* @__PURE__ */ React59.createElement(HLSStreaming, { onBack: () => setShowHLS(false) }), showRTMP && /* @__PURE__ */ React59.createElement(RTMPStreaming, { onBack: () => setShowRTMP(false) }));
6260
+ ), showHLS && /* @__PURE__ */ React65.createElement(HLSStreaming, { onBack: () => setShowHLS(false) }), showRTMP && /* @__PURE__ */ React65.createElement(RTMPStreaming, { onBack: () => setShowRTMP(false) }));
5475
6261
  };
5476
6262
 
5477
6263
  // src/Prebuilt/layouts/SidePane.tsx
@@ -5481,16 +6267,16 @@ var SidePane = ({
5481
6267
  hideControls = false
5482
6268
  }) => {
5483
6269
  var _a, _b;
5484
- const isMobile = useMedia16(config.media.md);
5485
- const sidepane = useHMSStore33(selectAppData3(APP_DATA.sidePane));
5486
- const activeScreensharePeerId = useHMSStore33(selectAppData3(APP_DATA.activeScreensharePeerId));
5487
- const trackId = (_a = useHMSStore33(selectVideoTrackByPeerID(activeScreensharePeerId))) == null ? void 0 : _a.id;
6270
+ const isMobile = useMedia20(config.media.md);
6271
+ const sidepane = useHMSStore39(selectAppData3(APP_DATA.sidePane));
6272
+ const activeScreensharePeerId = useHMSStore39(selectAppData3(APP_DATA.activeScreensharePeerId));
6273
+ const trackId = (_a = useHMSStore39(selectVideoTrackByPeerID3(activeScreensharePeerId))) == null ? void 0 : _a.id;
5488
6274
  const { elements } = useRoomLayoutConferencingScreen();
5489
6275
  let ViewComponent;
5490
6276
  if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS || sidepane === SIDE_PANE_OPTIONS.CHAT) {
5491
- ViewComponent = /* @__PURE__ */ React60.createElement(SidePaneTabs, { screenType, hideControls, active: sidepane });
6277
+ ViewComponent = /* @__PURE__ */ React66.createElement(SidePaneTabs, { screenType, hideControls, active: sidepane });
5492
6278
  } else if (sidepane === SIDE_PANE_OPTIONS.STREAMING) {
5493
- ViewComponent = /* @__PURE__ */ React60.createElement(StreamingLanding, null);
6279
+ ViewComponent = /* @__PURE__ */ React66.createElement(StreamingLanding, null);
5494
6280
  }
5495
6281
  if (!ViewComponent && !trackId) {
5496
6282
  return null;
@@ -5503,7 +6289,7 @@ var SidePane = ({
5503
6289
  objectFit: tileProps == null ? void 0 : tileProps.video_object_fit
5504
6290
  };
5505
6291
  const mwebStreamingChat = isMobile && sidepane === SIDE_PANE_OPTIONS.CHAT && ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.is_overlay);
5506
- return /* @__PURE__ */ React60.createElement(
6292
+ return /* @__PURE__ */ React66.createElement(
5507
6293
  Flex,
5508
6294
  {
5509
6295
  direction: "column",
@@ -5516,16 +6302,17 @@ var SidePane = ({
5516
6302
  "@md": { position: mwebStreamingChat ? "absolute" : "", zIndex: 12 }
5517
6303
  }
5518
6304
  },
5519
- trackId && /* @__PURE__ */ React60.createElement(
6305
+ trackId && /* @__PURE__ */ React66.createElement(
5520
6306
  VideoTile_default,
5521
6307
  __spreadValues({
5522
6308
  peerId: activeScreensharePeerId,
5523
6309
  trackId,
6310
+ width: "100%",
5524
6311
  height: 225,
5525
6312
  rootCSS: { p: 0, alignSelf: "start", flexShrink: 0 }
5526
6313
  }, tileLayout)
5527
6314
  ),
5528
- !!ViewComponent && /* @__PURE__ */ React60.createElement(
6315
+ !!ViewComponent && /* @__PURE__ */ React66.createElement(
5529
6316
  Box,
5530
6317
  {
5531
6318
  css: {
@@ -5561,10 +6348,10 @@ var SidePane = ({
5561
6348
  var SidePane_default = SidePane;
5562
6349
 
5563
6350
  // src/Prebuilt/layouts/WaitingView.jsx
5564
- import React61 from "react";
6351
+ import React67 from "react";
5565
6352
  import { ColoredTimeIcon } from "@100mslive/react-icons";
5566
- var WaitingView = React61.memo(() => {
5567
- return /* @__PURE__ */ React61.createElement(
6353
+ var WaitingView = React67.memo(() => {
6354
+ return /* @__PURE__ */ React67.createElement(
5568
6355
  Box,
5569
6356
  {
5570
6357
  css: {
@@ -5578,7 +6365,7 @@ var WaitingView = React61.memo(() => {
5578
6365
  },
5579
6366
  "data-testid": "waiting_view"
5580
6367
  },
5581
- /* @__PURE__ */ React61.createElement(
6368
+ /* @__PURE__ */ React67.createElement(
5582
6369
  Flex,
5583
6370
  {
5584
6371
  align: "center",
@@ -5592,8 +6379,8 @@ var WaitingView = React61.memo(() => {
5592
6379
  gap: "$8"
5593
6380
  }
5594
6381
  },
5595
- /* @__PURE__ */ React61.createElement(ColoredTimeIcon, { width: "80px", height: "80px" }),
5596
- /* @__PURE__ */ React61.createElement(
6382
+ /* @__PURE__ */ React67.createElement(ColoredTimeIcon, { width: "80px", height: "80px" }),
6383
+ /* @__PURE__ */ React67.createElement(
5597
6384
  Flex,
5598
6385
  {
5599
6386
  direction: "column",
@@ -5603,28 +6390,28 @@ var WaitingView = React61.memo(() => {
5603
6390
  gap: "$4"
5604
6391
  }
5605
6392
  },
5606
- /* @__PURE__ */ React61.createElement(Text, { color: "white", variant: "h6", css: { "@md": { fontSize: "$md" } } }, "Please wait"),
5607
- /* @__PURE__ */ React61.createElement(Text, { color: "$on_surface_medium", css: { mt: "$4", "@md": { fontSize: "$sm" } } }, "Sit back and relax till others let you join.")
6393
+ /* @__PURE__ */ React67.createElement(Text, { color: "white", variant: "h6", css: { "@md": { fontSize: "$md" } } }, "Please wait"),
6394
+ /* @__PURE__ */ React67.createElement(Text, { color: "$on_surface_medium", css: { mt: "$4", "@md": { fontSize: "$sm" } } }, "Sit back and relax till others let you join.")
5608
6395
  )
5609
6396
  )
5610
6397
  );
5611
6398
  });
5612
6399
 
5613
6400
  // src/Prebuilt/layouts/VideoStreamingSection.tsx
5614
- var HLSView = React62.lazy(() => import("./HLSView-3S74KF3A.js"));
6401
+ var HLSView = React68.lazy(() => import("./HLSView-DDGPZHA2.js"));
5615
6402
  var VideoStreamingSection = ({
5616
6403
  screenType,
5617
6404
  elements,
5618
6405
  hideControls = false
5619
6406
  }) => {
5620
6407
  var _a, _b;
5621
- const localPeerRole = useHMSStore34(selectLocalPeerRoleName3);
5622
- const isConnected = useHMSStore34(selectIsConnectedToRoom6);
5623
- const hmsActions = useHMSActions21();
6408
+ const localPeerRole = useHMSStore40(selectLocalPeerRoleName3);
6409
+ const isConnected = useHMSStore40(selectIsConnectedToRoom7);
6410
+ const hmsActions = useHMSActions23();
5624
6411
  const waitingViewerRole = useWaitingViewerRole();
5625
6412
  const urlToIframe = useUrlToEmbed();
5626
6413
  const pdfAnnotatorActive = usePDFAnnotator();
5627
- useEffect24(() => {
6414
+ useEffect27(() => {
5628
6415
  if (!isConnected) {
5629
6416
  return;
5630
6417
  }
@@ -5635,17 +6422,17 @@ var VideoStreamingSection = ({
5635
6422
  }
5636
6423
  let ViewComponent;
5637
6424
  if (screenType === "hls_live_streaming") {
5638
- ViewComponent = /* @__PURE__ */ React62.createElement(HLSView, null);
6425
+ ViewComponent = /* @__PURE__ */ React68.createElement(HLSView, null);
5639
6426
  } else if (localPeerRole === waitingViewerRole) {
5640
- ViewComponent = /* @__PURE__ */ React62.createElement(WaitingView, null);
6427
+ ViewComponent = /* @__PURE__ */ React68.createElement(WaitingView, null);
5641
6428
  } else if (pdfAnnotatorActive) {
5642
- ViewComponent = /* @__PURE__ */ React62.createElement(PDFView, null);
6429
+ ViewComponent = /* @__PURE__ */ React68.createElement(PDFView, null);
5643
6430
  } else if (urlToIframe) {
5644
- ViewComponent = /* @__PURE__ */ React62.createElement(EmbedView, null);
6431
+ ViewComponent = /* @__PURE__ */ React68.createElement(EmbedView, null);
5645
6432
  } else {
5646
- ViewComponent = /* @__PURE__ */ React62.createElement(GridLayout, __spreadValues({}, (_a = elements == null ? void 0 : elements.video_tile_layout) == null ? void 0 : _a.grid));
6433
+ ViewComponent = /* @__PURE__ */ React68.createElement(GridLayout, __spreadValues({}, (_a = elements == null ? void 0 : elements.video_tile_layout) == null ? void 0 : _a.grid));
5647
6434
  }
5648
- return /* @__PURE__ */ React62.createElement(Suspense2, { fallback: /* @__PURE__ */ React62.createElement(FullPageProgress_default, null) }, /* @__PURE__ */ React62.createElement(
6435
+ return /* @__PURE__ */ React68.createElement(Suspense2, { fallback: /* @__PURE__ */ React68.createElement(FullPageProgress_default, null) }, /* @__PURE__ */ React68.createElement(
5649
6436
  Flex,
5650
6437
  {
5651
6438
  css: {
@@ -5655,7 +6442,7 @@ var VideoStreamingSection = ({
5655
6442
  }
5656
6443
  },
5657
6444
  ViewComponent,
5658
- /* @__PURE__ */ React62.createElement(
6445
+ /* @__PURE__ */ React68.createElement(
5659
6446
  SidePane_default,
5660
6447
  {
5661
6448
  screenType,
@@ -5671,20 +6458,20 @@ var Conference = () => {
5671
6458
  var _a, _b, _c, _d, _e;
5672
6459
  const navigate = useNavigate();
5673
6460
  const { roomId, role } = useParams();
5674
- const { userName, endpoints } = useHMSPrebuiltContext();
6461
+ const { userName, endpoints, onJoin: onJoinFunc } = useHMSPrebuiltContext();
5675
6462
  const screenProps = useRoomLayoutConferencingScreen();
5676
6463
  const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
5677
- const roomState = useHMSStore35(selectRoomState);
6464
+ const roomState = useHMSStore41(selectRoomState);
5678
6465
  const prevState = usePrevious(roomState);
5679
- const isConnectedToRoom = useHMSStore35(selectIsConnectedToRoom7);
5680
- const hmsActions = useHMSActions22();
5681
- const [hideControls, setHideControls] = useState35(false);
5682
- const dropdownList = useHMSStore35(selectAppData4(APP_DATA.dropdownList));
6466
+ const isConnectedToRoom = useHMSStore41(selectIsConnectedToRoom8);
6467
+ const hmsActions = useHMSActions24();
6468
+ const [hideControls, setHideControls] = useState39(false);
6469
+ const dropdownList = useHMSStore41(selectAppData4(APP_DATA.dropdownList));
5683
6470
  const authTokenInAppData = useAuthToken();
5684
- const headerRef = useRef14();
5685
- const footerRef = useRef14();
6471
+ const headerRef = useRef16();
6472
+ const footerRef = useRef16();
5686
6473
  const isMobileDevice = isAndroid || isIOS || isIPadOS;
5687
- const dropdownListRef = useRef14();
6474
+ const dropdownListRef = useRef16();
5688
6475
  const [isHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
5689
6476
  const toggleControls = () => {
5690
6477
  var _a2;
@@ -5692,8 +6479,8 @@ var Conference = () => {
5692
6479
  setHideControls((value) => !value);
5693
6480
  }
5694
6481
  };
5695
- const autoRoomJoined = useRef14(isPreviewScreenEnabled);
5696
- useEffect25(() => {
6482
+ const autoRoomJoined = useRef16(isPreviewScreenEnabled);
6483
+ useEffect28(() => {
5697
6484
  let timeout = null;
5698
6485
  dropdownListRef.current = dropdownList || [];
5699
6486
  if (dropdownListRef.current.length === 0) {
@@ -5708,7 +6495,7 @@ var Conference = () => {
5708
6495
  clearTimeout(timeout);
5709
6496
  };
5710
6497
  }, [dropdownList, hideControls, isMobileDevice]);
5711
- useEffect25(() => {
6498
+ useEffect28(() => {
5712
6499
  if (!roomId) {
5713
6500
  navigate(`/`);
5714
6501
  return;
@@ -5723,7 +6510,7 @@ var Conference = () => {
5723
6510
  navigate(`/preview/${roomId || ""}`);
5724
6511
  }
5725
6512
  }, [isConnectedToRoom, prevState, roomState, navigate, role, roomId, isPreviewScreenEnabled]);
5726
- useEffect25(() => {
6513
+ useEffect28(() => {
5727
6514
  if (authTokenInAppData && !isConnectedToRoom && !isPreviewScreenEnabled && roomState !== HMSRoomState.Connecting && !autoRoomJoined.current) {
5728
6515
  hmsActions.join({
5729
6516
  userName,
@@ -5738,15 +6525,16 @@ var Conference = () => {
5738
6525
  autoRoomJoined.current = true;
5739
6526
  }
5740
6527
  }, [authTokenInAppData, endpoints == null ? void 0 : endpoints.init, hmsActions, isConnectedToRoom, isPreviewScreenEnabled, roomState, userName]);
5741
- useEffect25(() => {
6528
+ useEffect28(() => {
6529
+ onJoinFunc == null ? void 0 : onJoinFunc();
5742
6530
  return () => {
5743
6531
  PictureInPicture.stop().catch((error) => console.error("stopping pip", error));
5744
6532
  };
5745
6533
  }, []);
5746
- if (!isConnectedToRoom) {
5747
- return /* @__PURE__ */ React63.createElement(FullPageProgress_default, { text: "Joining..." });
6534
+ if (!isConnectedToRoom && ![HMSRoomState.Reconnecting, HMSRoomState.Disconnected].includes(roomState)) {
6535
+ return /* @__PURE__ */ React69.createElement(FullPageProgress_default, { text: roomState === HMSRoomState.Connecting ? "Joining..." : "" });
5748
6536
  }
5749
- return /* @__PURE__ */ React63.createElement(React63.Fragment, null, isHLSStarted ? /* @__PURE__ */ React63.createElement(Box, { css: { position: "fixed", zIndex: 100, w: "100%", h: "100%", left: 0, top: 0 } }, /* @__PURE__ */ React63.createElement(FullPageProgress_default, { text: "Starting live stream...", css: { opacity: 0.8, bg: "$background_dim" } })) : null, /* @__PURE__ */ React63.createElement(Flex, { css: { size: "100%", overflow: "hidden" }, direction: "column" }, !screenProps.hideSections.includes("header") && /* @__PURE__ */ React63.createElement(
6537
+ return /* @__PURE__ */ React69.createElement(React69.Fragment, null, isHLSStarted ? /* @__PURE__ */ React69.createElement(Box, { css: { position: "fixed", zIndex: 100, w: "100%", h: "100%", left: 0, top: 0 } }, /* @__PURE__ */ React69.createElement(FullPageProgress_default, { text: "Starting live stream...", css: { opacity: 0.8, bg: "$background_dim" } })) : null, /* @__PURE__ */ React69.createElement(Flex, { css: { size: "100%", overflow: "hidden" }, direction: "column" }, !screenProps.hideSections.includes("header") && /* @__PURE__ */ React69.createElement(
5750
6538
  Box,
5751
6539
  {
5752
6540
  ref: headerRef,
@@ -5760,8 +6548,8 @@ var Conference = () => {
5760
6548
  },
5761
6549
  "data-testid": "header"
5762
6550
  },
5763
- /* @__PURE__ */ React63.createElement(Header, { elements: screenProps.elements, screenType: screenProps.screenType })
5764
- ), /* @__PURE__ */ React63.createElement(
6551
+ /* @__PURE__ */ React69.createElement(Header, { elements: screenProps.elements, screenType: screenProps.screenType })
6552
+ ), /* @__PURE__ */ React69.createElement(
5765
6553
  Box,
5766
6554
  {
5767
6555
  css: {
@@ -5779,7 +6567,7 @@ var Conference = () => {
5779
6567
  "data-testid": "conferencing",
5780
6568
  onClick: toggleControls
5781
6569
  },
5782
- /* @__PURE__ */ React63.createElement(
6570
+ /* @__PURE__ */ React69.createElement(
5783
6571
  VideoStreamingSection,
5784
6572
  {
5785
6573
  screenType: screenProps.screenType,
@@ -5787,7 +6575,7 @@ var Conference = () => {
5787
6575
  hideControls
5788
6576
  }
5789
6577
  )
5790
- ), !screenProps.hideSections.includes("footer") && /* @__PURE__ */ React63.createElement(
6578
+ ), !screenProps.hideSections.includes("footer") && /* @__PURE__ */ React69.createElement(
5791
6579
  Box,
5792
6580
  {
5793
6581
  ref: footerRef,
@@ -5804,11 +6592,11 @@ var Conference = () => {
5804
6592
  },
5805
6593
  "data-testid": "footer"
5806
6594
  },
5807
- /* @__PURE__ */ React63.createElement(Footer2, { elements: screenProps.elements, screenType: screenProps.screenType })
5808
- ), /* @__PURE__ */ React63.createElement(RoleChangeRequestModal, null), /* @__PURE__ */ React63.createElement(HLSFailureModal, null), /* @__PURE__ */ React63.createElement(ActivatedPIP, null)));
6595
+ /* @__PURE__ */ React69.createElement(Footer2, { elements: screenProps.elements, screenType: screenProps.screenType })
6596
+ ), /* @__PURE__ */ React69.createElement(RoleChangeRequestModal, null), /* @__PURE__ */ React69.createElement(HLSFailureModal, null), /* @__PURE__ */ React69.createElement(ActivatedPIP, null)));
5809
6597
  };
5810
6598
  var conference_default = Conference;
5811
6599
  export {
5812
6600
  conference_default as default
5813
6601
  };
5814
- //# sourceMappingURL=conference-JNABIZBG.js.map
6602
+ //# sourceMappingURL=conference-N7S47TDK.js.map