@100mslive/roomkit-react 0.1.7-alpha.0 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-F5BDZVT2.js → HLSView-3S74KF3A.js} +6 -5
- package/dist/{HLSView-F5BDZVT2.js.map → HLSView-3S74KF3A.js.map} +2 -2
- package/dist/Prebuilt/components/RoleChangeRequest/RequestPrompt.d.ts +9 -0
- package/dist/VideoTile/StyledVideoTile.d.ts +445 -3
- package/dist/{VirtualBackground-THDRYDRA.js → VirtualBackground-3TI5NA4V.js} +3 -3
- package/dist/{chunk-JSH7SKEH.js → chunk-36X4ZCLC.js} +2 -2
- package/dist/{chunk-U3G743OY.js → chunk-5DQ3WTED.js} +2 -2
- package/dist/{chunk-U3G743OY.js.map → chunk-5DQ3WTED.js.map} +1 -1
- package/dist/{chunk-CDYRVICT.js → chunk-Z7P5WITU.js} +40 -32
- package/dist/chunk-Z7P5WITU.js.map +7 -0
- package/dist/{conference-6IVZHILI.js → conference-JNABIZBG.js} +506 -490
- package/dist/conference-JNABIZBG.js.map +7 -0
- package/dist/index.cjs.js +826 -790
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +185 -126
- package/dist/meta.esbuild.json +221 -162
- package/package.json +6 -6
- package/src/Input/Input.tsx +1 -1
- package/src/Prebuilt/common/utils.js +7 -0
- package/src/Prebuilt/components/Chat/ChatBody.jsx +125 -106
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +1 -1
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +36 -44
- package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +23 -35
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +5 -3
- package/src/Prebuilt/components/RaiseHand.jsx +4 -11
- package/src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx +66 -0
- package/src/Prebuilt/components/{RoleChangeRequestModal.tsx → RoleChangeRequest/RoleChangeRequestModal.tsx} +18 -50
- package/src/Prebuilt/components/VideoTile.jsx +18 -12
- package/src/Prebuilt/components/conference.jsx +1 -1
- package/src/Prebuilt/components/hooks/useMetadata.jsx +2 -1
- package/src/Prebuilt/layouts/HLSView.jsx +3 -2
- package/src/Prebuilt/layouts/SidePane.tsx +0 -1
- package/src/VideoTile/StyledVideoTile.tsx +10 -14
- package/dist/chunk-CDYRVICT.js.map +0 -7
- package/dist/conference-6IVZHILI.js.map +0 -7
- /package/dist/Prebuilt/components/{RoleChangeRequestModal.d.ts → RoleChangeRequest/RoleChangeRequestModal.d.ts} +0 -0
- /package/dist/{VirtualBackground-THDRYDRA.js.map → VirtualBackground-3TI5NA4V.js.map} +0 -0
- /package/dist/{chunk-JSH7SKEH.js.map → chunk-36X4ZCLC.js.map} +0 -0
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../src/Button/Button.tsx", "../src/Theme/ThemeProvider.tsx", "../src/Theme/useSSR.tsx", "../src/Avatar/Avatar.tsx", "../src/Avatar/getAvatarBg.ts", "../src/Divider/Divider.tsx", "../src/Switch/Switch.tsx", "../src/Select/Select.tsx", "../src/Slider/Slider.tsx", "../src/Modal/Dialog.tsx", "../src/Modal/DialogContent.tsx", "../src/Input/Input.tsx", "../src/VideoTile/StyledVideoTile.tsx", "../src/VideoList/videoListUtils.tsx", "../src/VideoList/StyledVideoList.tsx", "../src/Pagination/StyledPagination.tsx", "../src/Dropdown/Dropdown.tsx", "../src/Video/Video.tsx", "../src/TileMenu/StyledMenuTile.tsx", "../src/AudioLevel/AudioLevel.tsx", "../src/Popover/index.tsx", "../src/Stats/Stats.tsx", "../src/Stats/formatBytes.ts", "../src/Stats/StyledStats.tsx", "../src/Checkbox/Checkbox.tsx", "../src/Label/Label.tsx", "../src/RadioGroup/RadioGroup.tsx", "../src/Toast/Toast.tsx", "../src/Accordion/Accordion.tsx", "../src/Accordion/index.ts", "../src/Fieldset/Fieldset.tsx", "../src/Footer/Footer.tsx", "../src/ReactSelect/index.ts", "../src/ReactSelect/ReactSelect.tsx", "../src/Tabs/Tabs.tsx", "../src/QRCode/QRCode.tsx", "../src/Link/Link.tsx", "../src/Collapsible/Collapsible.tsx", "../src/Prebuilt/App.tsx", "../src/Prebuilt/components/AppData/AppData.jsx", "../src/Prebuilt/components/init/initUtils.js", "../src/Prebuilt/components/hooks/useUserPreferences.jsx", "../src/Prebuilt/components/AppData/useSidepane.js", "../src/Prebuilt/common/constants.js", "../src/Prebuilt/components/AppData/useUISettings.js", "../src/Prebuilt/components/AuthToken.jsx", "../src/Prebuilt/AppContext.tsx", "../src/Prebuilt/primitives/DialogContent.jsx", "../src/Prebuilt/components/ErrorBoundary.jsx", "../src/Prebuilt/components/FullPageProgress.jsx", "../src/Prebuilt/components/init/Init.jsx", "../src/Prebuilt/services/FeatureFlags.jsx", "../src/Prebuilt/components/Input/KeyboardInputManager.js", "../src/Prebuilt/components/Notifications/Notifications.jsx", "../src/Prebuilt/provider/roomLayoutProvider/index.tsx", "../src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts", "../src/Prebuilt/provider/roomLayoutProvider/constants/index.ts", "../src/Prebuilt/components/Toast/ToastConfig.jsx", "../src/Prebuilt/components/Toast/ToastManager.js", "../src/Prebuilt/components/Toast/ToastBatcher.js", "../src/Prebuilt/components/Notifications/AutoplayBlockedModal.jsx", "../src/Prebuilt/components/Notifications/InitErrorModal.jsx", "../src/Prebuilt/components/Notifications/PeerNotifications.jsx", "../src/Prebuilt/components/Notifications/PermissionErrorModal.jsx", "../src/Prebuilt/components/Notifications/ReconnectNotifications.jsx", "../src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.jsx", "../src/Prebuilt/components/Notifications/TrackNotifications.jsx", "../src/Prebuilt/components/Notifications/TrackUnmuteModal.jsx", "../src/Prebuilt/components/hooks/useRedirectToLeave.tsx", "../src/Prebuilt/components/PIP/PIPManager.js", "../src/Prebuilt/components/PIP/pipUtils.js", "../src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts", "../src/Prebuilt/common/utils.js", "../src/Prebuilt/components/PostLeave.jsx", "../src/Prebuilt/components/Header/Header.tsx", "../src/Prebuilt/components/Header/HeaderComponents.jsx", "../src/Prebuilt/components/Header/StreamActions.tsx", "../src/Sheet/Sheet.tsx", "../src/Prebuilt/components/Header/AdditionalRoomState.jsx", "../src/Prebuilt/plugins/whiteboard/useWhiteboardMetadata.js", "../src/Prebuilt/components/hooks/useMetadata.jsx", "../src/Prebuilt/components/hooks/usePlaylistMusic.js", "../src/Prebuilt/components/hooks/useScreenshareAudio.js", "../src/Prebuilt/components/Header/common.jsx", "../src/Prebuilt/components/Preview/PreviewContainer.tsx", "../src/Prebuilt/components/Preview/PreviewJoin.tsx", "../src/Prebuilt/components/AudioVideoToggle.jsx", "../src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx", "../src/Prebuilt/components/Chip.jsx", "../src/Prebuilt/components/Connection/TileConnection.tsx", "../src/Prebuilt/components/Connection/ConnectionIndicator.tsx", "../src/Prebuilt/components/Connection/connectionQualityUtils.js", "../src/Prebuilt/components/Settings/SettingsModal.jsx", "../src/Prebuilt/components/Settings/common.js", "../src/Prebuilt/components/Settings/DeviceSettings.jsx", "../src/Prebuilt/primitives/DropdownTrigger.jsx", "../src/Prebuilt/components/hooks/useDropdownSelection.jsx", "../src/Prebuilt/components/Settings/LayoutSettings.jsx", "../src/Prebuilt/components/Settings/SwitchWithLabel.jsx", "../src/Prebuilt/components/Settings/NotificationSettings.jsx", "../src/Prebuilt/components/VideoTile.jsx", "../src/Prebuilt/components/TileMenu/TileMenu.jsx", "../src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx", "../src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx", "../src/Prebuilt/components/TileMenu/TileMenuContent.jsx", "../src/Prebuilt/components/hooks/useDropdownList.jsx", "../src/Prebuilt/components/peerTileUtils.jsx", "../src/Prebuilt/components/Preview/PreviewForm.tsx", "../src/Prebuilt/components/Toast/ToastContainer.jsx", "../src/Prebuilt/components/Toast/Toast.jsx", "../src/Prebuilt/plugins/FlyingEmoji.jsx", "../src/Prebuilt/plugins/RemoteStopScreenshare.jsx", "../src/Prebuilt/components/hooks/useAutoStartStreaming.tsx", "../src/Prebuilt/common/hooks.js", "../src/Progress/index.tsx"],
|
4
|
-
"sourcesContent": ["import React, { ComponentPropsWithRef, PropsWithChildren } from 'react';\nimport { Flex } from '../Layout';\nimport { Loading } from '../Loading';\nimport { styled } from '../Theme';\nimport { flexCenter } from '../utils/styles';\n\n/**\n * @param base bg color\n * @param hover hover state bg color\n * @param active active state bg color\n * @returns CSS object based on the state\n */\n\nconst getOutlinedVariants = (\n base: string,\n hover: string,\n active: string,\n disabled: string,\n text: string,\n textDisabled: string,\n) => {\n return {\n bg: '$transparent',\n border: `solid $space$px $colors${base}`,\n c: text,\n '&[disabled]': {\n c: textDisabled,\n bg: '$transparent',\n border: `solid $space$px $colors${disabled}`,\n cursor: 'not-allowed',\n },\n '&:not([disabled]):hover': {\n border: `solid $space$px $colors${hover}`,\n bg: '$transparent',\n },\n '&:not([disabled]):active': {\n border: `solid $space$px $colors${active}`,\n bg: '$transparent',\n },\n '&:not([disabled]):focus-visible': {\n boxShadow: `0 0 0 3px $colors${base}`,\n },\n };\n};\n\nconst getButtonVariants = (\n base: string,\n hover: string,\n active: string,\n disabled: string,\n text: string,\n textDisabled: string,\n) => {\n return {\n bg: base,\n border: `1px solid ${base}`,\n c: text,\n '&[disabled]': {\n c: textDisabled,\n cursor: 'not-allowed',\n bg: disabled,\n border: `1px solid ${disabled}`,\n },\n '&:not([disabled]):hover': {\n bg: hover,\n border: `1px solid ${hover}`,\n },\n '&:not([disabled]):active': {\n bg: active,\n border: `1px solid ${active}`,\n },\n '&:not([disabled]):focus-visible': {\n boxShadow: `0 0 0 3px ${base}`,\n },\n };\n};\n\nconst StyledButton = styled('button', {\n ...flexCenter,\n cursor: 'pointer',\n fontFamily: '$sans',\n lineHeight: 'inherit',\n textTransform: 'none',\n position: 'relative',\n outline: 'none',\n border: 'none',\n fs: '$md',\n r: '$1',\n backgroundColor: '$primary_default',\n fontWeight: '500',\n whiteSpace: 'nowrap',\n p: '$4 $8',\n '-webkit-appearance': 'button',\n '&:focus': {\n outline: 'none',\n },\n '&:not([disabled]):focus-visible': {\n boxShadow: '0 0 0 3px $colors$primary_default',\n },\n transition: 'all 0.2s ease',\n compoundVariants: [\n {\n variant: 'standard',\n outlined: true,\n css: getOutlinedVariants(\n '$secondary_default',\n '$secondary_bright',\n '$secondary_dim',\n '$secondary_disabled',\n '$on_surface_high',\n '$on_surface_low',\n ),\n },\n {\n variant: 'danger',\n outlined: true,\n css: getOutlinedVariants(\n '$alert_error_default',\n '$alert_error_bright',\n '$alert_error_dim',\n '$alert_error_brighter',\n '$on_surface_high',\n '$on_surface_low',\n ),\n },\n {\n variant: 'primary',\n outlined: true,\n css: getOutlinedVariants(\n '$primary_default',\n '$primary_bright',\n '$primary_dim',\n '$primary_disabled',\n '$on_surface_high',\n '$on_surface_low',\n ),\n },\n ],\n variants: {\n variant: {\n standard: getButtonVariants(\n '$surface_brighter',\n '$surface_bright',\n '$surface_default',\n '$surface_dim',\n '$on_surface_high',\n '$on_surface_low',\n ),\n danger: getButtonVariants(\n '$alert_error_default',\n '$alert_error_bright',\n '$alert_error_dim',\n '$alert_error_dim',\n '$alert_error_brighter',\n '$on_primary_low',\n ),\n primary: getButtonVariants(\n '$primary_default',\n '$primary_bright',\n '$primary_dim',\n '$primary_disabled',\n '$on_primary_high',\n '$on_primary_low',\n ),\n },\n outlined: {\n true: {},\n },\n icon: {\n true: {},\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n});\n\nexport const Button = React.forwardRef<\n HTMLButtonElement,\n PropsWithChildren<{ loading?: boolean } & ComponentPropsWithRef<typeof StyledButton>>\n>(({ children, loading = false, icon, ...buttonProps }, ref) => {\n return (\n <StyledButton {...buttonProps} ref={ref}>\n <>\n {loading && (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ w: '100%', position: 'absolute', left: '0', color: '$on_primary_low' }}\n >\n <Loading color=\"currentColor\" />\n </Flex>\n )}\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ visibility: loading ? 'hidden' : 'visible', gap: icon ? '$4' : '0' }}\n >\n {children}\n </Flex>\n </>\n </StyledButton>\n );\n});\n", "import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { Theme } from './stitches.config';\nimport { createTheme, theme } from './stitches.config';\nimport useSSR from './useSSR';\n\nconst defaultAspectRatio = {\n width: 1,\n height: 1,\n};\n\nexport enum ThemeTypes {\n // eslint-disable-next-line no-unused-vars\n default = 'default',\n}\n\nexport type ThemeContextValue = {\n themeType: string;\n theme: Theme;\n aspectRatio: { width: number; height: number };\n /**\n * @param {ThemeTypes} themeToUpdateTo - optional\n * Use this to toggle or update the currentTheme.\n * if a param is passed, it will set the theme to passed value, otherwise will toggle between light and dark\n * depending on current applied theme\n */\n toggleTheme: (themeToUpdateTo?: ThemeTypes) => void;\n};\n\nexport type ThemeProviderProps = {\n themeType?: string;\n theme?: Theme;\n aspectRatio?: { width: number; height: number };\n};\n\nconst defaultContext = {\n themeType: ThemeTypes.default,\n theme,\n aspectRatio: { width: 1, height: 1 },\n toggleTheme: (_themeToUpdateTo?: ThemeTypes) => {\n return;\n },\n};\nexport const ThemeContext = React.createContext<ThemeContextValue>(defaultContext);\n\n/**\n * Wrap this around your root component to get access to theme\n * eg:\n * <ThemeProvider type=\"dark\" appBuilder={{ aspectRatio: { width:1, height: 1} }}>\n * <App />\n * </ThemeProvider>\n */\nexport const HMSThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderProps>> = ({\n themeType,\n theme: userTheme,\n aspectRatio = defaultAspectRatio,\n children,\n}) => {\n const systemTheme = ThemeTypes.default;\n const [currentTheme, setCurrentTheme] = useState(themeType || systemTheme);\n const previousClassName = useRef('');\n const { isBrowser } = useSSR();\n const updatedTheme = useMemo(() => {\n const updatedTheme = createTheme({ themeType: currentTheme, theme: userTheme || {} });\n if (!isBrowser) {\n return updatedTheme;\n }\n if (previousClassName.current) {\n document.documentElement.classList.remove(previousClassName.current);\n }\n previousClassName.current = updatedTheme.className;\n document.documentElement.classList.add(updatedTheme);\n return updatedTheme;\n }, [userTheme, currentTheme, isBrowser]);\n\n const toggleTheme = useCallback((themeToUpdateTo?: ThemeTypes) => {\n if (themeToUpdateTo) {\n setCurrentTheme(themeToUpdateTo);\n return;\n }\n setCurrentTheme(ThemeTypes.default);\n }, []);\n\n useEffect(() => {\n if (themeType) {\n setCurrentTheme(themeType);\n }\n }, [themeType]);\n\n return (\n <ThemeContext.Provider\n value={{ themeType: currentTheme, theme: updatedTheme as unknown as Theme, aspectRatio, toggleTheme }}\n >\n {children}\n </ThemeContext.Provider>\n );\n};\n\nexport const useTheme = () => React.useContext(ThemeContext);\n", "import { useEffect, useState } from 'react';\n\nconst isBrowser = (): boolean => {\n return Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\n};\n\nexport type SSRState = {\n isBrowser: boolean;\n isServer: boolean;\n};\n\nconst useSSR = (): SSRState => {\n const [browser, setBrowser] = useState<boolean>(false);\n useEffect(() => {\n setBrowser(isBrowser());\n }, []);\n\n return {\n isBrowser: browser,\n isServer: !browser,\n };\n};\n\nexport default useSSR;\n", "import React from 'react';\nimport { VariantProps } from '@stitches/react';\nimport { PersonIcon } from '@100mslive/react-icons';\nimport { styled } from '../Theme';\nimport { getAvatarBg } from './getAvatarBg';\nimport { flexCenter } from '../utils/styles';\n\nconst getAvatarShape = (radii: string) => ({\n borderRadius: radii,\n});\n\nexport const StyledAvatar = styled('div', {\n ...flexCenter,\n color: '$colors$on_primary_high',\n fontFamily: '$sans',\n aspectRatio: 1,\n fontWeight: 600,\n fontSize: '$space$9',\n variants: {\n shape: {\n circle: getAvatarShape('$round'),\n square: getAvatarShape('$1'),\n },\n size: {\n small: {\n height: '$16 !important',\n fontSize: '$space$6',\n },\n medium: {\n height: '$18 !important',\n fontSize: '$space$10',\n },\n large: {\n height: '$20 !important',\n fontSize: '$space$12',\n },\n },\n },\n defaultVariants: {\n shape: 'circle',\n },\n});\n\ntype Props = VariantProps<typeof StyledAvatar> &\n React.ComponentProps<typeof StyledAvatar> & {\n name: string;\n };\n\nexport const Avatar: React.FC<Props> = ({ name, css, ...props }) => {\n const { initials } = getAvatarBg(name);\n let { color } = getAvatarBg(name);\n if (!name) {\n color = '#7E47EB';\n }\n return (\n <StyledAvatar css={{ bg: color, ...css }} {...props}>\n {initials || <PersonIcon height={40} width={40} />}\n </StyledAvatar>\n );\n};\n", "const getInitials = (name: string | undefined) => {\n if (!name) {\n return undefined;\n } else {\n return name\n .trim()\n .match(/(^\\S\\S?|\\b\\S)?/g)\n ?.join('')\n ?.match(/(^\\S|\\S$)?/g)\n ?.join('')\n .toUpperCase();\n }\n};\n\n/**\n calculates the initials of the name and choose a background color based on the first later of the initials\n */\nexport const getAvatarBg = (name: string): { initials: string; color: string } => {\n const initials = getInitials(name);\n const indexFactor = 20;\n const colorIndex = ((initials?.codePointAt(0) || 0) % indexFactor) + 1;\n return { initials: initials || '', color: colorsList[colorIndex - 1] };\n};\n\nconst colorsList = [\n '#616161',\n '#F44336',\n '#3F51B5',\n '#4CAF50',\n '#FFA000',\n '#795548',\n '#E91E63',\n '#2F80FF',\n '#8BC34A',\n '#F57C00',\n '#4E342E',\n '#9C27B0',\n '#00BCD4',\n '#C0CA33',\n '#F4511E',\n '#673AB7',\n '#009688',\n '#FBC02D',\n '#BF360C',\n '#455A64',\n];\n", "import { styled } from '../Theme';\n\nconst getVerticalSpace = (space: string) => ({\n marginLeft: space,\n marginRight: space,\n});\nconst getHorizontalSpace = (space: string) => ({\n marginTop: space,\n marginBottom: space,\n});\n\nexport const VerticalDivider = styled('span', {\n height: '25px',\n width: '1px',\n backgroundColor: '$border_bright',\n variants: {\n space: {\n 1: getVerticalSpace('$1'),\n 2: getVerticalSpace('$2'),\n 3: getVerticalSpace('$3'),\n 4: getVerticalSpace('$4'),\n },\n },\n defaultVariants: {\n space: 1,\n },\n});\n\nexport const HorizontalDivider = styled('span', {\n height: '1px',\n width: '100%',\n display: 'block',\n backgroundColor: '$border_bright',\n variants: {\n space: {\n 1: getHorizontalSpace('$1'),\n 2: getHorizontalSpace('$2'),\n 3: getHorizontalSpace('$3'),\n 4: getHorizontalSpace('$4'),\n },\n },\n defaultVariants: {\n space: 1,\n },\n});\n", "import React from 'react';\nimport * as BaseSwitch from '@radix-ui/react-switch';\nimport { styled } from '../Theme';\n\nconst SwitchRoot = styled(BaseSwitch.Root, {\n all: 'unset',\n width: '30px',\n height: '14px',\n border: 'solid $space$px $secondary_default',\n borderRadius: '$3',\n p: '$2',\n position: 'relative',\n cursor: 'pointer',\n '&[data-state=\"checked\"]': {\n backgroundColor: '$primary_default',\n border: 'solid $space$px $primary_default',\n },\n '&:focus': {\n outline: 'none',\n },\n '&[disabled]': {\n opacity: 0.5,\n cursor: 'not-allowed',\n },\n});\n\nconst SwitchThumb = styled(BaseSwitch.Thumb, {\n display: 'block',\n top: '3px',\n position: 'absolute',\n width: '$md',\n height: '$md',\n backgroundColor: '$secondary_default',\n borderRadius: '$round',\n transition: 'right 500ms ease-in',\n left: '$2',\n '&[data-state=\"checked\"]': {\n left: 'unset',\n right: '$2',\n backgroundColor: '$on_primary_high',\n },\n});\n\ntype SwitchProps = React.ComponentProps<typeof SwitchRoot>;\n\nexport const Switch: React.FC<SwitchProps> = props => (\n <SwitchRoot {...props}>\n <SwitchThumb />\n </SwitchRoot>\n);\n\nSwitch.displayName = 'Switch';\n", "import React from 'react';\nimport { ChevronDownIcon } from '@100mslive/react-icons';\nimport { styled } from '../Theme';\n\nconst Root = styled('div', {\n color: '$on_primary_high',\n display: 'inline-flex',\n position: 'relative',\n outline: 'none',\n overflow: 'hidden',\n borderRadius: '$1',\n backgroundColor: '$surface_default',\n maxWidth: '100%',\n});\n\n// TODO: replace these with tokens\nconst SelectRoot = styled('select', {\n h: '$16',\n fontSize: '$md',\n fontWeight: '500',\n lineHeight: 'inherit',\n textTransform: 'none',\n appearance: 'none',\n color: '$on_secondary_high',\n padding: '5px',\n paddingLeft: '12px',\n paddingRight: '30px',\n border: 'none',\n borderRadius: '8px',\n backgroundColor: '$secondary_default',\n '&:not([disabled]):focus-visible': {\n boxShadow: '0 0 0 3px $colors$primary_default',\n },\n '&[disabled]': {\n opacity: 0.5,\n cursor: 'not-allowed',\n },\n});\n\nconst Arrow = styled('span', {\n color: '$on_secondary_high',\n width: '30px',\n height: '100%',\n position: 'absolute',\n right: 0,\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n transition: 'border .2s ease 0s',\n});\n\nconst DefaultDownIcon = ({ ...props }) => (\n <Arrow {...props}>\n <ChevronDownIcon />\n </Arrow>\n);\n\nexport const Select = {\n Root,\n DownIcon: Arrow,\n DefaultDownIcon,\n Select: SelectRoot,\n};\n", "import React from 'react';\nimport * as BaseSlider from '@radix-ui/react-slider';\nimport { CSS } from '@stitches/react';\nimport { styled } from '../Theme';\nimport { Tooltip } from '../Tooltip';\n\nconst Root = styled(BaseSlider.Root, {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n userSelect: 'none',\n touchAction: 'none',\n width: '100%',\n '&[data-orientation=\"horizontal\"]': {\n height: 20,\n },\n});\n\nconst Track = styled(BaseSlider.Track, {\n backgroundColor: '$surface_bright',\n position: 'relative',\n flexGrow: 1,\n borderRadius: '$round',\n cursor: 'pointer',\n '&[data-orientation=\"horizontal\"]': { height: 3 },\n});\n\nconst Range = styled(BaseSlider.Range, {\n position: 'absolute',\n backgroundColor: '$primary_default',\n borderRadius: '$round',\n height: '100%',\n});\n\nconst Thumb = styled(BaseSlider.Thumb, {\n all: 'unset',\n display: 'block',\n width: '$8',\n height: '$8',\n backgroundColor: '$primary_default',\n cursor: 'pointer',\n boxShadow: `0 2px 10px $colors$surface_default`,\n borderRadius: 10,\n '&:hover': { backgroundColor: '$primary_default' },\n '&:focus': { boxShadow: 'none' },\n});\n\ntype SliderProps = React.ComponentProps<typeof Root> & {\n thumbStyles?: CSS;\n showTooltip?: boolean;\n};\n\nexport const Slider: React.FC<SliderProps & { showTooltip?: boolean }> = ({\n showTooltip = true,\n thumbStyles,\n ...props\n}) => (\n <Root {...props}>\n <Track>\n <Range />\n </Track>\n {showTooltip ? (\n <Tooltip title={String(props.value?.[0])}>\n <Thumb css={thumbStyles} />\n </Tooltip>\n ) : (\n <Thumb css={thumbStyles} />\n )}\n </Root>\n);\n", "import { Root } from '@radix-ui/react-dialog';\nimport { styled } from '@stitches/react';\nimport {\n DialogClose,\n DialogDefaultCloseIcon,\n DialogDescription,\n DialogTitle,\n StyledDialogContent,\n StyledDialogOverlay,\n StyledDialogPortal,\n StyledDialogTrigger,\n} from './DialogContent';\n\nconst StyledDialog = styled(Root, {});\n\nexport const Dialog = {\n Root: StyledDialog,\n Trigger: StyledDialogTrigger,\n Overlay: StyledDialogOverlay,\n Content: StyledDialogContent,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n DefaultClose: DialogDefaultCloseIcon,\n Portal: StyledDialogPortal,\n};\n", "import React, { ComponentProps } from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { CrossIcon } from '@100mslive/react-icons';\nimport { IconButton } from '../IconButton';\nimport { styled } from '../Theme';\nimport { dialogClose, dialogOpen } from '../utils/animations';\n\nexport const DialogClose = styled(DialogPrimitive.Close, {\n backgroundColor: 'transparent',\n padding: '0',\n margin: '0',\n border: 'none',\n backgroundImage: 'none',\n});\n\nexport const StyledDialogTrigger = styled(DialogPrimitive.Trigger, {\n appearance: 'none !important', // Needed for safari it shows white overlay\n});\n\nexport const StyledDialogOverlay = styled(DialogPrimitive.Overlay, {\n backgroundColor: 'rgba(0, 0, 0, 0.5);',\n position: 'fixed',\n inset: 0,\n});\n\nexport const StyledDialogPortal = styled(DialogPrimitive.Portal, {});\n\nexport const StyledDialogContent = styled(DialogPrimitive.Content, {\n color: '$on_surface_medium',\n backgroundColor: '$surface_default',\n borderRadius: '8px',\n position: 'fixed',\n top: '50%',\n left: '50%',\n border: '$space$px solid $border_bright',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n transform: 'translate(-50%, -50%)',\n zIndex: 999,\n padding: '$12',\n '@allowMotion': {\n '&[data-state=\"open\"]': {\n animation: `${dialogOpen} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,\n },\n '&[data-state=\"closed\"]': {\n animation: `${dialogClose} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,\n },\n },\n '&:focus': { outline: 'none' },\n});\n\nexport const DialogTitle = styled(DialogPrimitive.Title, {\n margin: 0,\n});\n\nexport const DialogDescription = styled(DialogPrimitive.Description, {});\n\nexport const DialogDefaultCloseIcon = (props: ComponentProps<typeof IconButton>) => (\n <DialogClose asChild>\n <IconButton {...props}>\n <CrossIcon />\n </IconButton>\n </DialogClose>\n);\n", "import React, { ComponentProps, PropsWithChildren, PropsWithRef } from 'react';\nimport { CSS } from '@stitches/react';\nimport { CopyIcon, EyeCloseIcon, EyeOpenIcon } from '@100mslive/react-icons';\nimport { Flex } from '../Layout';\nimport { styled } from '../Theme';\n\nexport const Input = styled('input', {\n fontFamily: '$sans',\n lineHeight: 'inherit',\n backgroundColor: '$surface_default',\n borderRadius: '8px',\n outline: 'none',\n border: '1px solid $border_default',\n padding: '0.5rem 0.75rem',\n minHeight: '30px',\n color: '$on_surface_high',\n fontSize: '$md',\n '&:focus': {\n boxShadow: '0 0 0 1px $colors$primary_default',\n border: '1px solid transparent',\n },\n '&::placeholder': {\n color: '$on_surface_low',\n },\n variants: {\n alert_error_default: {\n true: {\n '&:focus': {\n boxShadow: '0 0 0 3px $colors$alert_error_default',\n },\n },\n },\n },\n});\n\nconst PasswordRoot = styled('div', {\n w: '100%',\n position: 'relative',\n display: 'flex',\n});\n\nconst PasswordShowIcon: React.FC<ComponentProps<typeof Flex> & { showPassword?: boolean; css?: CSS }> = ({\n showPassword,\n css,\n ...props\n}) => {\n return (\n <Flex css={{ ...css }} {...props}>\n {showPassword ? <EyeOpenIcon /> : <EyeCloseIcon />}\n </Flex>\n );\n};\n\nconst PasswordCopyIcon: React.FC<ComponentProps<typeof Flex & { css?: CSS }>> = ({ css, ...props }) => {\n return (\n <Flex css={{ ...css }} {...props}>\n <CopyIcon />\n </Flex>\n );\n};\n\nconst PasswordIcons = React.forwardRef<HTMLDivElement, PropsWithChildren<ComponentProps<typeof Flex & { css?: CSS }>>>(\n ({ css, ...props }, ref) => {\n return (\n <Flex\n css={{\n position: 'absolute',\n top: 0,\n height: '100%',\n zIndex: 10,\n right: '$4',\n bg: '$surface_bright',\n alignItems: 'center',\n ...css,\n }}\n ref={ref}\n {...props}\n >\n {props.children}\n </Flex>\n );\n },\n);\n\nconst ReactInput: React.FC<PropsWithRef<ComponentProps<typeof Input> & { showPassword?: boolean; css?: CSS }>> =\n React.forwardRef<\n HTMLInputElement,\n PropsWithRef<ComponentProps<typeof Input> & { showPassword?: boolean; css?: CSS }>\n >(({ showPassword = false, css, ...props }, ref) => {\n return (\n <Input\n css={{ flexGrow: 1, width: '100%', ...css }}\n type={showPassword ? 'text' : 'password'}\n {...props}\n ref={ref}\n />\n );\n });\n\nexport const PasswordInput = {\n Root: PasswordRoot,\n Icons: PasswordIcons,\n Input: ReactInput,\n ShowIcon: PasswordShowIcon,\n CopyIcon: PasswordCopyIcon,\n};\n", "import { Box } from '../Layout';\nimport { styled } from '../Theme';\nimport { flexCenter } from '../utils';\n\nexport const Root = styled('div', {\n padding: '0.75rem',\n // show videotile context menu on hover\n // [`&:hover .tile-menu`]: {\n // display: 'inline-block',\n // },\n});\n\nconst Container = styled('div', {\n width: '100%',\n height: '100%',\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '$2',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: '$background_default',\n variants: {\n transparentBg: {\n true: {\n background: 'transparent',\n },\n },\n noRadius: {\n true: {\n borderRadius: 0,\n },\n },\n },\n});\n\nconst Overlay = styled('div', {\n position: 'absolute',\n width: '100%',\n height: '100%',\n});\n\nconst Info = styled('div', {\n color: '$on_primary_high',\n position: 'absolute',\n bottom: '5px',\n left: '50%',\n fontSize: '$sm',\n transform: 'translateX(-50%)',\n textAlign: 'center',\n width: '80%',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: '$sans',\n});\n\nconst AttributeBox = styled('div', {\n position: 'absolute',\n color: '$on_primary_high',\n w: '$12',\n h: '$12',\n bg: '$secondary_dim',\n r: '$round',\n ...flexCenter,\n});\n\nconst AudioIndicator = styled('div', {\n position: 'absolute',\n top: '$4',\n right: '$4',\n color: '$on_primary_high',\n bg: '$secondary_dim',\n borderRadius: '$round',\n width: '$14',\n height: '$14',\n mb: '5px',\n ...flexCenter,\n variants: {\n size: {\n small: {\n width: '$10',\n height: '$10',\n '& > svg': {\n width: '$8',\n height: '$8',\n },\n },\n medium: {\n width: '$13',\n height: '$13',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n\nconst FullScreenButton = styled('button', {\n width: '2.25rem',\n height: '2.25rem',\n color: '$on_surface_high',\n borderRadius: '$round',\n backgroundColor: '$surface_default',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n top: '$2',\n right: '$2',\n zIndex: 5,\n '&:not([disabled]):focus': {\n outline: 'none',\n boxShadow: '0 0 0 3px $colors$primary_bright',\n },\n});\n\nconst AvatarContainer = styled(Box, {\n ...flexCenter,\n flexDirection: 'column',\n position: 'absolute',\n left: '50%',\n top: '50%',\n transform: 'translateX(-50%) translateY(-50%)',\n width: '40%',\n height: '40%',\n '& > div': {\n maxHeight: '$20',\n height: '100%',\n },\n});\n\ninterface VideoTileType {\n Root: typeof Root;\n Container: typeof Container;\n Overlay: typeof Overlay;\n Info: typeof Info;\n AudioIndicator: typeof AudioIndicator;\n AvatarContainer: typeof AvatarContainer;\n AttributeBox: typeof AttributeBox;\n FullScreenButton: typeof FullScreenButton;\n}\n\nexport const StyledVideoTile: VideoTileType = {\n Root,\n Container,\n Overlay,\n Info,\n AudioIndicator,\n AvatarContainer,\n AttributeBox,\n FullScreenButton,\n};\n", "export const getLeft = (index: number, currentPageIndex: number) => {\n //active slide\n if (index === currentPageIndex) {\n return 0;\n }\n //prev slide\n if (index + 1 === currentPageIndex) {\n return '-100%';\n }\n //next slide\n if (index - 1 === currentPageIndex) {\n return '100%';\n }\n //all slides before prev\n if (index < currentPageIndex) {\n return '-200%';\n }\n //all slides after next\n return '200%';\n};\n", "import { styled } from '../Theme';\n\nconst Root = styled('div', {\n height: '100%',\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n});\n\nconst Container = styled('div', {\n height: '100%',\n width: '100%',\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n overflow: 'hidden',\n});\n\nconst View = styled('div', {\n height: '100%',\n width: '100%',\n position: 'absolute',\n display: 'flex',\n placeContent: 'center',\n flexWrap: 'wrap',\n alignItems: 'center',\n});\n\ninterface VideoListType {\n Root: typeof Root;\n Container: typeof Container;\n View: typeof View;\n}\n\nexport const StyledVideoList: VideoListType = {\n Root,\n Container,\n View,\n};\n", "import { styled } from '../Theme';\n\nconst Root = styled('div', {\n height: '2rem',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n '& > * + *': {\n marginRight: '0',\n marginLeft: '0.5rem',\n },\n});\n\nconst Chevron = styled('button', {\n color: '$on_surface_high',\n '&:focus': {\n outline: 'none',\n },\n '&[disabled]': {\n color: '$on_surface_low',\n cursor: 'not-allowed',\n },\n backgroundColor: 'transparent',\n display: 'flex',\n});\n\nconst Dots = styled('div', {\n display: 'flex',\n alignItems: 'center',\n '& > * + *': {\n marginRight: '0',\n marginLeft: '0.5rem',\n },\n});\n\nconst Dot = styled('button', {\n '&:focus': {\n outline: 'none',\n },\n borderRadius: '9999px',\n width: '0.5rem',\n height: '0.5rem',\n backgroundColor: '$on_surface_low',\n padding: '0px',\n border: 'none',\n cursor: 'pointer',\n variants: {\n active: {\n true: {\n backgroundColor: '$on_surface_high',\n },\n },\n },\n});\n\ninterface PaginationType {\n Root: typeof Root;\n Chevron: typeof Chevron;\n Dots: typeof Dots;\n Dot: typeof Dot;\n}\n\nexport const StyledPagination: PaginationType = {\n Root,\n Chevron,\n Dots,\n Dot,\n};\n", "import {\n CheckboxItem,\n Content,\n Group,\n Item,\n ItemIndicator,\n Label,\n Portal,\n Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n Trigger,\n} from '@radix-ui/react-dropdown-menu';\nimport { styled } from '../Theme';\n\nconst DropdownRoot = styled(Root, {});\n\nconst DropdownTrigger = styled(Trigger, {\n cursor: 'pointer',\n appearance: 'none !important',\n '&[data-state=\"open\"]': {\n backgroundColor: '$surface_bright',\n },\n '&:focus': {\n outline: 'none',\n },\n '&:focus-visible': {\n boxShadow: '0 0 0 3px $colors$primary_default',\n },\n});\n\nconst DropdownTriggerItem = styled(SubTrigger, {\n w: '100%',\n color: '$on_surface_high',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n '&:hover': {\n cursor: 'pointer',\n bg: '$surface_brighter',\n },\n '&:focus-visible': {\n bg: '$surface_brighter',\n outline: 'none',\n },\n});\n\nconst DropdownItem = styled(Item, {\n color: '$on_surface_high',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n outline: 'none',\n backgroundColor: '$surface_dim',\n '&:hover': {\n cursor: 'pointer',\n bg: '$surface_bright',\n },\n '&:focus-visible': {\n bg: '$surface_bright',\n },\n});\n\nconst DropdownItemSeparator = styled(Separator, {\n h: 1,\n backgroundColor: '$border_bright',\n m: '$4 $8',\n});\n\nconst DropdownContent = styled(Content, {\n w: '$80',\n maxHeight: '$64',\n r: '$1',\n py: '$4',\n backgroundColor: '$surface_dim',\n overflowY: 'auto',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n zIndex: 20,\n fontFamily: '$sans',\n});\n\nconst DropdownLabel = styled(Label, {\n display: 'flex',\n alignItems: 'center',\n h: '$12',\n w: '100%',\n p: '$8 $4',\n});\n\nconst DropdownGroup = styled(Group, {});\n\nconst DropdownSubMenu = styled(Sub, {});\n\nconst DropdownSubMenuContent = styled(SubContent, {\n w: '$80',\n maxHeight: '$64',\n r: '$1',\n py: '$4',\n backgroundColor: '$surface_bright',\n overflowY: 'auto',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n zIndex: 20,\n});\n\nconst DropdownCheckboxItem = styled(CheckboxItem, {\n color: '$on_surface_high',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n outline: 'none',\n '&:hover': {\n cursor: 'pointer',\n bg: '$surface_brighter',\n },\n '&:focus-visible': {\n bg: '$surface_brighter',\n },\n gap: '$2',\n});\n\nconst DropdownItemIndicator = styled(ItemIndicator, {\n w: '$10',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n});\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: DropdownTrigger,\n TriggerItem: DropdownTriggerItem,\n Content: DropdownContent,\n Portal: Portal,\n SubMenu: DropdownSubMenu,\n SubMenuContent: DropdownSubMenuContent,\n Item: DropdownItem,\n Label: DropdownLabel,\n Group: DropdownGroup,\n ItemSeparator: DropdownItemSeparator,\n CheckboxItem: DropdownCheckboxItem,\n ItemIndicator: DropdownItemIndicator,\n};\n", "import React from 'react';\nimport type { VariantProps } from '@stitches/react';\nimport { HMSPeer, useVideo } from '@100mslive/react-sdk';\nimport { styled } from '../Theme';\n\nexport const StyledVideo = styled('video', {\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '$2',\n objectFit: 'cover',\n background: '$background_default',\n variants: {\n mirror: {\n true: {\n transform: 'scaleX(-1)',\n },\n },\n screenShare: {\n true: {\n objectFit: 'contain',\n },\n },\n degraded: {\n // send the video behind when it's degraded so avatar can show on top of it. Video will be stuck frame in this case.\n // not hiding by using display none, because it will lead it to be detached as it will no longer be in view.\n true: {\n zIndex: -100,\n },\n },\n noRadius: {\n true: {\n borderRadius: 0,\n },\n },\n },\n defaultVariants: {\n mirror: false,\n },\n});\n\ntype StyledProps = VariantProps<typeof StyledVideo> & React.ComponentProps<typeof StyledVideo>;\n\ninterface Props {\n /**\n * trackID for peer (videoTrack)\n */\n trackId: HMSPeer['videoTrack'];\n /**\n * Boolean stating whether to override the internal behaviour.\n * when attach is false, even if tile is inView or enabled, it won't be rendered\n */\n attach?: boolean;\n}\n\nexport const Video: React.FC<Props & StyledProps> = ({ trackId, attach, ...props }) => {\n const { videoRef } = useVideo({ trackId, attach });\n return <StyledVideo autoPlay muted playsInline controls={false} ref={videoRef} {...props} />;\n};\n", "import * as Popover from '@radix-ui/react-popover';\nimport { styled } from '../Theme';\nimport { popoverAnimation } from '../utils/animations';\nimport { flexCenter } from '../utils/styles';\n\nconst Root = Popover.Root;\n\nconst StyledTrigger = styled(Popover.Trigger, {\n position: 'absolute',\n bottom: '$2',\n right: '$2',\n zIndex: 10,\n width: '$13',\n height: '$13',\n color: '$on_surface_high',\n borderRadius: '$2',\n backgroundColor: '$surface_bright',\n cursor: 'pointer',\n border: 'none',\n ...flexCenter,\n '&:not([disabled]):focus': {\n outline: 'none',\n boxShadow: '0 0 0 3px $colors$primary_bright',\n },\n});\n\nconst StyledContent = styled(Popover.Content, {\n fontFamily: '$sans',\n backgroundColor: '$surface_dim',\n padding: '$5 0',\n display: 'flex',\n flexDirection: 'column',\n borderRadius: '$space$6',\n zIndex: 11,\n width: '$60',\n ...popoverAnimation,\n});\n\nconst styledItem = {\n fontSize: '$sm',\n color: '$on_surface_high',\n display: 'flex',\n alignItems: 'center',\n padding: '$4 $6',\n width: '100%',\n backgroundColor: '$menuBg',\n};\n\nconst StyledItemButton = styled('button', {\n ...styledItem,\n height: '$14',\n '&:hover': {\n backgroundColor: '$surface_brighter',\n },\n cursor: 'pointer',\n // TODO: default focus applied cause issues with this style\n '&:focus': {\n outline: 'none',\n // backgroundColor: '$grey3',\n },\n '& > * + *': {\n marginRight: '0',\n marginLeft: '$4',\n },\n});\n\nconst StyledVolumeItem = styled('div', {\n // TODO: maybe keep this as base comp and extend button variant\n ...styledItem,\n alignItems: 'start',\n flexDirection: 'column',\n marginBottom: '0',\n});\n\nexport const Flex = styled('div', {\n display: 'flex',\n '& > * + *': {\n marginRight: '0',\n marginLeft: '$4',\n },\n});\n\nconst RemoveMenuItem = styled(StyledItemButton, {\n color: '$alert_error_default',\n borderTop: '1px solid $border_bright',\n});\n\ninterface MenuTileType {\n Root: typeof Root;\n Trigger: typeof StyledTrigger;\n Content: typeof StyledContent;\n ItemButton: typeof StyledItemButton;\n VolumeItem: typeof StyledVolumeItem;\n RemoveItem: typeof RemoveMenuItem;\n}\n\nexport const StyledMenuTile: MenuTileType = {\n Root,\n Trigger: StyledTrigger,\n Content: StyledContent,\n ItemButton: StyledItemButton,\n VolumeItem: StyledVolumeItem,\n RemoveItem: RemoveMenuItem,\n};\n", "import { useCallback, useRef } from 'react';\nimport { HMSTrackID } from '@100mslive/hms-video-store';\nimport { useAudioLevelStyles } from '@100mslive/react-sdk';\nimport { useTheme } from '../Theme';\n\n/**\n * pass in a track id and get a ref. That ref can be attached to an element which will have border\n * as per audio level post that.\n */\nexport function useBorderAudioLevel(audioTrackId?: HMSTrackID) {\n const { theme } = useTheme();\n const color = theme.colors.primary_default.value;\n const getStyle = useCallback(\n (level: number) => {\n const style: Record<string, string> = {\n transition: 'outline 0.4s ease-in-out',\n };\n style['outline'] = level ? `${sigmoid(level) * 4}px solid ${color}` : '0px solid transparent';\n return style;\n },\n [color],\n );\n const ref = useRef(null);\n useAudioLevelStyles({\n trackId: audioTrackId,\n getStyle,\n ref,\n });\n return ref;\n}\n\nexport const sigmoid = (z: number) => {\n return 1 / (1 + Math.exp(-z));\n};\n", "import { Arrow, Close, Content, Popover as Root, Portal, Trigger } from '@radix-ui/react-popover';\nimport { styled } from '../Theme';\nimport { popoverAnimation } from '../utils/animations';\n\nconst StyledContent = styled(Content, {\n padding: '$6',\n borderRadius: '$2',\n backgroundColor: '$background_default',\n boxShadow: '$sm',\n zIndex: 12,\n ...popoverAnimation,\n});\n\nconst StyledArrow = styled(Arrow, {\n ...popoverAnimation,\n});\n\nconst StyledTrigger = styled(Trigger, {});\n\nexport const Popover = {\n Root,\n Content: StyledContent,\n Trigger: StyledTrigger,\n Portal: Portal,\n Arrow: StyledArrow,\n Close: Close,\n};\n", "import React, { Fragment } from 'react';\nimport {\n HMSPeerID,\n HMSTrackID,\n HMSTrackStats,\n RID,\n selectConnectionQualityByPeerID,\n selectHMSStats,\n simulcastMapping,\n useHMSStatsStore,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { Tooltip } from '../Tooltip';\nimport { formatBytes } from './formatBytes';\nimport { Stats } from './StyledStats';\n\nexport interface VideoTileStatsProps {\n videoTrackID?: HMSTrackID;\n audioTrackID?: HMSTrackID;\n peerID?: HMSPeerID;\n isLocal: boolean;\n}\n\n/**\n * This component can be used to overlay webrtc stats over the Video Tile. For the local tracks it also includes\n * remote inbound stats as sent by the SFU in receiver report.\n */\nexport function VideoTileStats({ videoTrackID, audioTrackID, peerID, isLocal = false }: VideoTileStatsProps) {\n const audioSelector = isLocal ? selectHMSStats.localAudioTrackStatsByID : selectHMSStats.trackStatsByID;\n const audioTrackStats = useHMSStatsStore(audioSelector(audioTrackID));\n const localVideoTrackStats = useHMSStatsStore(selectHMSStats.localVideoTrackStatsByID(videoTrackID));\n const remoteVideoTrackStats = useHMSStatsStore(selectHMSStats.trackStatsByID(videoTrackID));\n const videoTrackStats = isLocal ? localVideoTrackStats?.[0] : remoteVideoTrackStats;\n const downlinkScore = useHMSStore(selectConnectionQualityByPeerID(peerID))?.downlinkQuality;\n const availableOutgoingBitrate = useHMSStatsStore(selectHMSStats.availablePublishBitrate);\n\n // Viewer role - no stats to show\n if (!(audioTrackStats || videoTrackStats)) {\n return null;\n }\n return (\n <Stats.Root>\n <table>\n <tbody>\n {isLocal ? (\n <Fragment>\n <StatsRow\n show={isNotNullishAndNot0(availableOutgoingBitrate)}\n label=\"AOBR\"\n tooltip=\"Available Outgoing Bitrate\"\n value={formatBytes(availableOutgoingBitrate, 'b/s')}\n />\n {localVideoTrackStats?.map(stat => {\n if (!stat) {\n return null;\n }\n const layer = stat.rid ? simulcastMapping[stat.rid as RID] : '';\n return (\n <Fragment>\n {layer && <StatsRow label={layer.toUpperCase()} value=\"\" />}\n <StatsRow\n show={isNotNullishAndNot0(stat.frameWidth)}\n label=\"Width\"\n value={stat.frameWidth?.toString()}\n />\n <StatsRow\n show={isNotNullishAndNot0(stat.frameHeight)}\n label=\"Height\"\n value={stat.frameHeight?.toString()}\n />\n <StatsRow\n show={isNotNullishAndNot0(stat.framesPerSecond)}\n label=\"FPS\"\n value={`${stat.framesPerSecond} ${\n isNotNullishAndNot0(stat.framesDropped) ? `(${stat.framesDropped} dropped)` : ''\n }`}\n />\n <StatsRow\n show={isNotNullish(stat.bitrate)}\n label=\"Bitrate(V)\"\n value={formatBytes(stat.bitrate, 'b/s')}\n />\n <Stats.Gap />\n </Fragment>\n );\n })}\n </Fragment>\n ) : (\n <Fragment>\n <StatsRow\n show={isNotNullishAndNot0(videoTrackStats?.frameWidth)}\n label=\"Width\"\n value={videoTrackStats?.frameWidth?.toString()}\n />\n <StatsRow\n show={isNotNullishAndNot0(videoTrackStats?.frameHeight)}\n label=\"Height\"\n value={videoTrackStats?.frameHeight?.toString()}\n />\n <StatsRow\n show={isNotNullishAndNot0(videoTrackStats?.framesPerSecond)}\n label=\"FPS\"\n value={`${videoTrackStats?.framesPerSecond} ${\n isNotNullishAndNot0(videoTrackStats?.framesDropped)\n ? `(${videoTrackStats?.framesDropped} dropped)`\n : ''\n }`}\n />\n <StatsRow\n show={isNotNullish(videoTrackStats?.bitrate)}\n label=\"Bitrate(V)\"\n value={formatBytes(videoTrackStats?.bitrate, 'b/s')}\n />\n </Fragment>\n )}\n\n <StatsRow\n show={isNotNullish(audioTrackStats?.bitrate)}\n label=\"Bitrate(A)\"\n value={formatBytes(audioTrackStats?.bitrate, 'b/s')}\n />\n\n <StatsRow show={isNotNullish(downlinkScore)} label=\"Downlink\" value={downlinkScore} />\n\n <StatsRow show={isNotNullish(videoTrackStats?.codec)} label=\"Codec(V)\" value={videoTrackStats?.codec} />\n\n <StatsRow show={isNotNullish(audioTrackStats?.codec)} label=\"Codec(A)\" value={audioTrackStats?.codec} />\n\n <PacketLostAndJitter audioTrackStats={audioTrackStats} videoTrackStats={videoTrackStats} />\n </tbody>\n </table>\n </Stats.Root>\n );\n}\n\nconst PacketLostAndJitter = ({\n audioTrackStats,\n videoTrackStats,\n}: {\n audioTrackStats?: HMSTrackStats;\n videoTrackStats?: HMSTrackStats;\n}) => {\n // for local peer, we'll use the remote inbound stats to get packet loss and jitter, to know whether the track is\n // local we check if the stats type has outbound in it as it's being published from local. Both audio and video\n // tracks are checked in case the user has permission to publish only one of them.\n const isLocalPeer = audioTrackStats?.type.includes('outbound') || videoTrackStats?.type.includes('outbound');\n const audioStats = isLocalPeer ? audioTrackStats?.remote : audioTrackStats;\n const videoStats = isLocalPeer ? videoTrackStats?.remote : videoTrackStats;\n return (\n <>\n <TrackPacketsLostRow label=\"Packet Loss(V)\" stats={videoStats} />\n <TrackPacketsLostRow label=\"Packet Loss(A)\" stats={audioStats} />\n <StatsRow show={isNotNullish(videoStats?.jitter)} label=\"Jitter(V)\" value={videoStats?.jitter?.toFixed(4)} />\n <StatsRow show={isNotNullish(audioStats?.jitter)} label=\"Jitter(A)\" value={audioStats?.jitter?.toFixed(4)} />\n </>\n );\n};\n\nconst TrackPacketsLostRow = ({\n stats,\n label,\n}: {\n stats?: Pick<HMSTrackStats, 'packetsLost' | 'packetsLostRate'>;\n label: string;\n}) => {\n const packetsLostRate = `${stats?.packetsLostRate ? stats.packetsLostRate.toFixed(2) : 0}/s`;\n\n return (\n <StatsRow\n show={isNotNullishAndNot0(stats?.packetsLost)}\n label={label}\n value={`${stats?.packetsLost}(${packetsLostRate})`}\n />\n );\n};\n\nconst RawStatsRow = ({\n label = '',\n value = '',\n tooltip = '',\n show = true,\n}: {\n label: string;\n value?: string | number;\n show?: boolean;\n tooltip?: string;\n}) => {\n const statsLabel = <Stats.Label css={{ fontWeight: !value ? '$semiBold' : '$regular' }}>{label}</Stats.Label>;\n\n return (\n <>\n {show ? (\n <Stats.Row>\n {tooltip ? (\n <Tooltip side=\"top\" title={tooltip}>\n {statsLabel}\n </Tooltip>\n ) : (\n statsLabel\n )}\n {value === '' ? <Stats.Value /> : <Stats.Value>{value}</Stats.Value>}\n </Stats.Row>\n ) : null}\n </>\n );\n};\n\n// memoize so only the rows which change rerender\nconst StatsRow = React.memo(RawStatsRow);\n\nexport function isNotNullishAndNot0(value: number | undefined | null) {\n return isNotNullish(value) && value !== 0;\n}\n\n/**\n * Check only for presence(not truthy) of a value.\n * Use in places where 0, false need to be considered valid.\n */\nexport function isNotNullish(value: number | string | undefined | null) {\n return value !== undefined && value !== null;\n}\n", "export const formatBytes = (bytes?: number, unit = 'B', decimals = 2) => {\n if (bytes === 0) {\n return `0 ${unit}`;\n }\n if (!bytes) {\n return '-';\n }\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'].map(size => size + unit);\n\n let i = Math.floor(Math.log(bytes) / Math.log(k));\n\n // B to KB\n i === 0 && i++;\n\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;\n};\n", "import { styled } from '../Theme';\n\nexport const Root = styled('div', {\n backgroundColor: 'rgba(0,0,0,0.75)',\n position: 'absolute',\n top: '$3',\n left: '$3',\n zIndex: 7,\n borderRadius: '$2',\n padding: '$2',\n fontSize: '$xs',\n overflowY: 'auto',\n maxHeight: '75%',\n maxWidth: '85%',\n});\n\nexport const Table = styled('table', {});\n\nexport const Row = styled('tr', {\n width: '100%',\n '& > * + *': {\n px: '$4',\n },\n whiteSpace: 'nowrap',\n textAlign: 'left',\n});\n\nexport const Label = styled('td', {\n color: '$on_primary_high',\n fontWeight: '$regular',\n});\n\nexport const Value = styled('td', {\n color: '$on_primary_high',\n});\n\nexport const Gap = styled('tr', {\n height: '$4',\n});\n\ninterface StatsType {\n Root: typeof Root;\n Row: typeof Row;\n Label: typeof Label;\n Value: typeof Value;\n Table: typeof Table;\n Gap: typeof Gap;\n}\n\nexport const Stats: StatsType = {\n Root,\n Row,\n Label,\n Value,\n Table,\n Gap,\n};\n", "import * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { styled } from '../Theme';\n\nconst CheckboxRoot = styled(CheckboxPrimitive.Root, {\n all: 'unset',\n border: '1px solid $primary_default',\n backgroundColor: '$on_primary_high',\n width: '$8',\n height: '$8',\n borderRadius: '$0',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n boxShadow: 'none',\n outline: 'none',\n cursor: 'pointer',\n '&:focus': {\n boxShadow: 'none',\n outline: 'none',\n },\n '&[data-state=\"checked\"]': {\n backgroundColor: '$primary_default',\n },\n});\n\nconst CheckboxIndicator = styled(CheckboxPrimitive.Indicator, {\n color: '$on_primary_high',\n});\n\nexport const Checkbox = {\n Root: CheckboxRoot,\n Indicator: CheckboxIndicator,\n};\n", "import * as LabelPrimitive from '@radix-ui/react-label';\nimport { styled } from '../Theme';\n\nexport const Label = styled(LabelPrimitive.Root, {\n fontFamily: '$sans',\n fontSize: '$md',\n color: '$on_primary_high',\n});\n", "import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { styled } from '../Theme';\n\nconst RadioGroupRoot = styled(RadioGroupPrimitive.Root, {\n display: 'flex',\n alignItems: 'center',\n});\n\nconst RadioGroupItem = styled(RadioGroupPrimitive.Item, {\n bg: '$on_primary_high',\n width: '$8',\n height: '$8',\n border: '1px solid $primary_default',\n cursor: 'pointer',\n borderRadius: '$round',\n '&:focus': {\n boxShadow: 'none',\n outline: 'none',\n },\n '&[data-state=\"checked\"]': {\n borderWidth: '$space$2',\n p: '$1',\n },\n});\nconst RadioGroupIndicator = styled(RadioGroupPrimitive.Indicator, {\n bg: '$primary_default',\n});\n\nexport const RadioGroup = {\n Root: RadioGroupRoot,\n Item: RadioGroupItem,\n Indicator: RadioGroupIndicator,\n};\n", "import React, { ComponentProps } from 'react';\nimport type { ToastProps } from '@radix-ui/react-toast';\nimport * as ToastPrimitives from '@radix-ui/react-toast';\nimport { CrossIcon } from '@100mslive/react-icons';\nimport { IconButton } from '../IconButton';\nimport { Box, Flex } from '../Layout';\nimport { Text } from '../Text';\nimport { styled } from '../Theme';\nimport { toastAnimation } from '../utils';\n\nconst getToastVariant = (base: string) => {\n return {\n borderLeftColor: base,\n borderLeft: 0,\n '&:before': {\n position: 'absolute',\n top: '-1px',\n left: '-$4',\n width: '$8',\n borderLeft: `solid $space$px ${base}`,\n borderTop: `solid $space$px ${base}`,\n borderBottom: `solid $space$px ${base}`,\n borderTopLeftRadius: '$3',\n borderBottomLeftRadius: '$3',\n bg: base,\n content: ' ',\n height: '100%',\n zIndex: 10,\n },\n '@sm': {\n '&:before': {\n content: 'none',\n },\n border: `solid $space$px ${base}`,\n },\n };\n};\n\nconst ToastRoot = styled(ToastPrimitives.Root, {\n r: '$3',\n bg: '$surface_default',\n p: '$10',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n fontFamily: '$sans',\n border: 'solid $space$px $border_bright',\n overflow: 'hidden',\n ...toastAnimation,\n '@sm': {\n p: '$8 $11',\n },\n variants: {\n variant: {\n standard: getToastVariant('$secondary_default'),\n warning: getToastVariant('$alert_warning'),\n error: getToastVariant('$alert_error_default'),\n success: getToastVariant('$alert_success'),\n },\n },\n defaultVariants: {\n variant: 'standard',\n },\n});\n\nconst ToastTitle = styled(ToastPrimitives.Title, {\n fontSize: '$md',\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n});\nconst ToastDescription = styled(ToastPrimitives.Description, {\n color: '$on_surface_medium',\n});\nconst ToastClose = styled(ToastPrimitives.Close, {});\nconst ToastAction = styled(ToastPrimitives.Action, {\n cursor: 'pointer',\n background: 'none',\n});\nconst ToastViewport = styled(ToastPrimitives.Viewport, {\n position: 'fixed',\n bottom: 0,\n left: 0,\n display: 'flex',\n flexDirection: 'column',\n padding: '$8',\n gap: 10,\n width: 390,\n '@sm': {\n width: '100%',\n padding: '$6',\n },\n maxWidth: '100vw',\n margin: 0,\n listStyle: 'none',\n zIndex: 1000,\n});\n\nconst DefaultClose = ({ css }: Pick<ComponentProps<typeof ToastClose>, 'css'>) => {\n return (\n <ToastClose css={css} asChild>\n <IconButton>\n <CrossIcon />\n </IconButton>\n </ToastClose>\n );\n};\n\ninterface HMSToastProps extends ToastProps {\n title: string;\n description?: string;\n isClosable?: boolean;\n icon?: React.ReactNode;\n action?: React.ReactNode;\n inlineAction?: boolean;\n}\n\nconst HMSToast: React.FC<HMSToastProps> = ({\n title,\n description,\n isClosable = true,\n icon,\n action,\n inlineAction = false,\n ...props\n}) => {\n return (\n <>\n <ToastRoot {...props}>\n <ToastTitle>\n <Flex align=\"center\" css={{ gap: '$4', flex: '1 1 0', minWidth: 0 }}>\n {icon ? <Box css={{ w: '$10', h: '$10', alignSelf: 'start', mt: '$2' }}>{icon}</Box> : null}\n <Text variant=\"sub1\" css={{ c: 'inherit', wordBreak: 'break-word' }}>\n {title}\n </Text>\n </Flex>\n {isClosable ? <DefaultClose /> : null}\n {!isClosable && inlineAction && action ? (\n <ToastAction altText={`${title}Action`}>{action}</ToastAction>\n ) : null}\n </ToastTitle>\n {description ? (\n <ToastDescription>\n <Text variant=\"body1\" css={{ fontWeight: '$regular', c: '$on_surface_medium' }}>\n {description}\n </Text>\n </ToastDescription>\n ) : null}\n {!inlineAction && action ? (\n <ToastAction altText={`${title}Action`} css={{ mt: '$10' }}>\n {action}\n </ToastAction>\n ) : null}\n </ToastRoot>\n </>\n );\n};\nexport const Toast = {\n Provider: ToastPrimitives.Provider,\n Root: ToastRoot,\n Title: ToastTitle,\n Description: ToastDescription,\n Close: DefaultClose,\n Action: ToastAction,\n Viewport: ToastViewport,\n HMSToast: HMSToast,\n};\n", "import React, { PropsWithChildren } from 'react';\nimport * as BaseAccordion from '@radix-ui/react-accordion';\nimport { CSS } from '@stitches/react';\nimport { ChevronUpIcon } from '@100mslive/react-icons';\nimport { Box } from '../Layout';\nimport { styled } from '../Theme';\nimport { slideDown, slideUp } from '../utils';\n\nconst StyledAccordion = styled(BaseAccordion.Root, {});\n\nconst StyledItem = styled(BaseAccordion.Item, {\n marginTop: '$px',\n display: 'block',\n '&:first-child': {\n marginTop: 0,\n borderTopLeftRadius: '$0',\n borderTopRightRadius: '$0',\n },\n '&:last-child': {\n borderBottomLeftRadius: '$4',\n borderBottomRightRadius: '$4',\n },\n});\n\nconst StyledHeader = styled(BaseAccordion.Header, {\n all: 'unset',\n display: 'flex',\n fontFamily: '$sans',\n});\n\nconst StyledTrigger = styled(BaseAccordion.Trigger, {\n all: 'unset',\n fontFamily: '$sans',\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n fontSize: '$md',\n lineHeight: '$md',\n color: '$on_surface_high',\n});\n\nconst StyledContent = styled(BaseAccordion.Content, {\n display: 'contents',\n fontSize: '$md',\n fontFamily: '$sans',\n color: '$on_surface_medium',\n '&[data-state=\"open\"]': {\n animation: `${slideDown('--radix-accordion-content-height')} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,\n },\n '&[data-state=\"closed\"]': {\n animation: `${slideUp('--radix-accordion-content-height')} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,\n },\n});\n\nconst StyledChevron = styled(ChevronUpIcon, {\n color: '$on_primary_high',\n transition: 'transform 300ms cubic-bezier(0.87, 0, 0.13, 1)',\n '[data-state=closed] &': { transform: 'rotate(180deg)' },\n});\n\n// Exports\nexport const AccordionRoot = StyledAccordion;\nexport const AccordionItem = StyledItem;\n\nexport const AccordionHeader: React.FC<\n PropsWithChildren<BaseAccordion.AccordionTriggerProps & { iconStyles?: CSS; css?: CSS }>\n> = React.forwardRef<\n HTMLButtonElement,\n PropsWithChildren<BaseAccordion.AccordionTriggerProps & { iconStyles?: CSS; css?: CSS }>\n>(({ children, iconStyles, css, ...props }, forwardedRef) => (\n <StyledHeader css={css}>\n <StyledTrigger {...props} ref={forwardedRef}>\n {children}\n <StyledChevron aria-hidden css={iconStyles} />\n </StyledTrigger>\n </StyledHeader>\n));\n\nexport const AccordionContent: React.FC<\n PropsWithChildren<BaseAccordion.AccordionContentProps & { contentStyles?: CSS }>\n> = React.forwardRef<HTMLDivElement, PropsWithChildren<BaseAccordion.AccordionContentProps & { contentStyles?: CSS }>>(\n ({ children, contentStyles, ...props }, forwardedRef) => (\n <StyledContent {...props} ref={forwardedRef}>\n <Box css={contentStyles}>{children}</Box>\n </StyledContent>\n ),\n);\n", "import { AccordionContent, AccordionHeader, AccordionItem, AccordionRoot } from './Accordion';\n\nexport const Accordion = {\n Root: AccordionRoot,\n Item: AccordionItem,\n Content: AccordionContent,\n Header: AccordionHeader,\n};\n", "import { styled } from '../Theme';\n\nconst StyledFieldset = styled('fieldset', {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n border: 'none',\n backgroundColor: '$transparent',\n});\n\nexport const Fieldset = StyledFieldset;\n", "import { Flex } from '../Layout';\nimport { styled } from '../Theme';\n\nconst Root = styled(Flex, {\n justifyContent: 'space-between',\n alignItems: 'center',\n py: '$4',\n position: 'relative',\n height: '100%',\n '@md': { flexWrap: 'wrap', gap: '$4' },\n});\n\nconst Left = styled(Flex, {\n alignItems: 'center',\n position: 'absolute',\n left: '$10',\n gap: '$8',\n '@md': {\n position: 'unset',\n justifyContent: 'center',\n w: '100%',\n },\n});\n\nconst Center = styled(Flex, {\n w: '100%',\n justifyContent: 'center',\n alignItems: 'center',\n gap: '$8',\n});\n\nconst Right = styled(Flex, {\n alignItems: 'center',\n position: 'absolute',\n right: '$10',\n gap: '$8',\n '@md': {\n display: 'none',\n },\n});\n\nexport const Footer = {\n Root,\n Left,\n Center,\n Right,\n};\n", "export { Select } from './ReactSelect';\n", "import * as SelectPrimitive from '@radix-ui/react-select';\nimport { styled } from '../Theme';\n\nconst StyledRoot = styled(SelectPrimitive.Root, {});\n\nconst StyledTrigger = styled(SelectPrimitive.SelectTrigger, {\n all: 'unset',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '$2',\n padding: '$8',\n lineHeight: '$px',\n gap: '$8',\n backgroundColor: '$secondary_default',\n color: '$on_primary_high',\n fontSize: '$8',\n cursor: 'pointer',\n r: '$1',\n});\n\nconst StyledContent = styled(SelectPrimitive.Content, {\n overflow: 'hidden',\n backgroundColor: '$surface_bright',\n r: '$1',\n h: '$80',\n});\n\nconst StyledViewport = styled(SelectPrimitive.Viewport, {\n padding: '$3',\n});\n\nconst StyledItem = styled(SelectPrimitive.Item, {\n all: 'unset',\n fontSize: '$7',\n r: '$1',\n display: 'flex',\n p: '$4 $8',\n w: '$52',\n position: 'relative',\n userSelect: 'none',\n cursor: 'pointer',\n});\n\nconst StyledLabel = styled(SelectPrimitive.Label, {\n p: '$4 $8',\n lineHeight: '$10',\n color: '$on_primary_high',\n});\n\nconst StyledSeparator = styled(SelectPrimitive.Separator, {\n height: '$px',\n backgroundColor: '$on_primary_high',\n margin: '$4',\n opacity: 0.4,\n});\n\nconst StyledItemIndicator = styled(SelectPrimitive.ItemIndicator, {\n position: 'absolute',\n right: '$8',\n width: '$8',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: '$on_primary_high',\n});\n\nconst scrollButtonStyles = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n p: '$4',\n backgroundColor: '$surface_bright',\n color: '$on_primary_high',\n cursor: 'default',\n};\n\nconst StyledScrollUpButton = styled(SelectPrimitive.ScrollUpButton, scrollButtonStyles);\n\nconst StyledScrollDownButton = styled(SelectPrimitive.ScrollDownButton, scrollButtonStyles);\n\nexport const Select = {\n Root: StyledRoot,\n Trigger: StyledTrigger,\n Content: StyledContent,\n Viewport: StyledViewport,\n Item: StyledItem,\n Label: StyledLabel,\n Separator: StyledSeparator,\n ItemIndicator: StyledItemIndicator,\n ScrollUpButton: StyledScrollUpButton,\n ScrollDownButton: StyledScrollDownButton,\n Value: SelectPrimitive.Value,\n Icon: SelectPrimitive.Icon,\n ItemText: SelectPrimitive.ItemText,\n Group: SelectPrimitive.Group,\n};\n", "import * as TabsPrimitive from '@radix-ui/react-tabs';\nimport { styled } from '../Theme';\n\nconst StyledTabsRoot = styled(TabsPrimitive.Root, {\n display: 'flex',\n});\n\nconst StyledList = styled(TabsPrimitive.List, {\n flexShrink: 0,\n display: 'flex',\n});\n\nconst StyledTrigger = styled(TabsPrimitive.Trigger, {\n all: 'unset',\n fontFamily: '$sans',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n fontSize: '$sm',\n lineHeight: '$sm',\n color: '$on_surface_high',\n userSelect: 'none',\n cursor: 'pointer',\n '&[data-state=\"active\"]': {\n bg: '$surface_brighter',\n r: '$1',\n },\n});\n\nconst StyledContent = styled(TabsPrimitive.Content, {\n flex: '1 1 0',\n padding: '$10',\n outline: 'none',\n});\n\nexport const Tabs = {\n Root: StyledTabsRoot,\n List: StyledList,\n Content: StyledContent,\n Trigger: StyledTrigger,\n};\n", "import React, { ComponentProps } from 'react';\nimport { QRCodeSVG } from 'qrcode.react';\n\nexport const QRCode = (props: ComponentProps<typeof QRCodeSVG>) => {\n return <QRCodeSVG style={{ width: '100%', height: '100%' }} {...props} />;\n};\n", "import React from 'react';\nimport * as icons from '@100mslive/react-icons';\nimport { Flex } from '../Layout';\nimport { Text } from '../Text';\nimport { styled } from '../Theme';\n\nconst LinkComponent = styled('a', {\n textDecoration: 'none',\n display: 'flex',\n alignItems: 'center',\n gap: '$5',\n variants: {\n color: {\n highEmp: {\n color: '$on_surface_high',\n '&:hover': {\n color: '$on_surface_medium',\n },\n },\n primary: {\n color: '$primary_default',\n '&:hover': {\n color: '$primary_bright',\n },\n },\n },\n },\n});\n\nexport interface LinkProps extends React.ComponentProps<typeof LinkComponent> {\n as?: React.ElementType;\n iconSide?: 'left' | 'right' | 'none';\n icon?: keyof typeof icons;\n color?: 'highEmp' | 'primary';\n}\n\nexport const Link = ({ iconSide = 'left', icon, color = 'primary', children, ...rest }: LinkProps) => {\n const Icon = icon ? icons[icon] : React.Fragment;\n const renderedIcon = icon ? (\n <Flex as=\"span\">\n <Icon height={13.33} width={13.33} />{' '}\n </Flex>\n ) : null;\n\n return (\n <LinkComponent {...rest} color={color}>\n {iconSide === 'left' && renderedIcon}\n <Text as=\"span\" variant=\"body2\" css={{ color: 'inherit' }}>\n {children}\n </Text>\n {iconSide === 'right' && renderedIcon}\n </LinkComponent>\n );\n};\n", "import { Content, Root, Trigger } from '@radix-ui/react-collapsible';\nimport { styled } from '../Theme';\nimport { slideDown, slideUp } from '../utils';\n\nconst CollapsibleRoot = styled(Root, {});\n\nconst CollapsibleTrigger = styled(Trigger, {\n cursor: 'pointer',\n appearance: 'none !important',\n '&:focus': {\n outline: 'none',\n },\n '&:focus-visible': {\n boxShadow: '0 0 0 3px $colors$primary_default',\n },\n});\n\nconst CollapsibleContent = styled(Content, {\n w: '$80',\n r: '$1',\n overflowY: 'auto',\n '&[data-state=\"open\"]': {\n animation: `${slideDown('--radix-collapsible-content-height')} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,\n },\n '&[data-state=\"closed\"]': {\n animation: `${slideUp('--radix-collapsible-content-height')} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,\n },\n});\n\nexport const Collapsible = {\n Root: CollapsibleRoot,\n Trigger: CollapsibleTrigger,\n Content: CollapsibleContent,\n};\n", "import React, { MutableRefObject, ReactElement, Suspense, useEffect, useRef } from 'react';\nimport { BrowserRouter, MemoryRouter, Navigate, Route, Routes, useParams } from 'react-router-dom';\nimport { HMSStatsStoreWrapper, HMSStoreWrapper, IHMSNotifications } from '@100mslive/hms-video-store';\nimport { Layout, Logo, Screens, Theme, Typography } from '@100mslive/types-prebuilt';\nimport {\n HMSActions,\n HMSReactiveStore,\n HMSRoomProvider,\n selectIsConnectedToRoom,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { AppData } from './components/AppData/AppData';\n// @ts-ignore: No implicit Any\nimport AuthToken from './components/AuthToken';\n// @ts-ignore: No implicit Any\nimport { ErrorBoundary } from './components/ErrorBoundary';\n// @ts-ignore: No implicit Any\nimport FullPageProgress from './components/FullPageProgress';\n// @ts-ignore: No implicit Any\nimport { Init } from './components/init/Init';\n// @ts-ignore: No implicit Any\nimport { KeyboardHandler } from './components/Input/KeyboardInputManager';\n// @ts-ignore: No implicit Any\nimport { Notifications } from './components/Notifications';\n// @ts-ignore: No implicit Any\nimport PostLeave from './components/PostLeave';\n// @ts-ignore: No implicit Any\nimport PreviewContainer from './components/Preview/PreviewContainer';\n// @ts-ignore: No implicit Any\nimport { ToastContainer } from './components/Toast/ToastContainer';\nimport { RoomLayoutContext, RoomLayoutProvider, useRoomLayout } from './provider/roomLayoutProvider';\nimport { Box } from '../Layout';\nimport { globalStyles, HMSThemeProvider } from '../Theme';\nimport { HMSPrebuiltContext, useHMSPrebuiltContext } from './AppContext';\n// @ts-ignore: No implicit Any\nimport { FlyingEmoji } from './plugins/FlyingEmoji';\n// @ts-ignore: No implicit Any\nimport { RemoteStopScreenshare } from './plugins/RemoteStopScreenshare';\n// @ts-ignore: No implicit Any\nimport { useIsNotificationDisabled } from './components/AppData/useUISettings';\nimport { useAutoStartStreaming } from './components/hooks/useAutoStartStreaming';\nimport {\n useRoomLayoutLeaveScreen,\n useRoomLayoutPreviewScreen,\n} from './provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { FeatureFlags } from './services/FeatureFlags';\n\n// @ts-ignore: No implicit Any\nconst Conference = React.lazy(() => import('./components/conference'));\n\nexport type HMSPrebuiltOptions = {\n userName?: string;\n userId?: string;\n endpoints?: object;\n};\n\nexport type HMSPrebuiltProps = {\n roomCode?: string;\n logo?: Logo;\n typography?: Typography;\n themes?: Theme[];\n options?: HMSPrebuiltOptions;\n screens?: Screens;\n authToken?: string;\n roomId?: string;\n role?: string;\n onLeave?: () => void;\n};\n\nexport type HMSPrebuiltRefType = {\n hmsActions: HMSActions;\n hmsStore: HMSStoreWrapper;\n hmsStats: HMSStatsStoreWrapper;\n hmsNotifications: IHMSNotifications;\n};\n\nexport const HMSPrebuilt = React.forwardRef<HMSPrebuiltRefType, HMSPrebuiltProps>(\n (\n {\n roomCode = '',\n authToken = '',\n roomId = '',\n role = '',\n logo,\n typography,\n themes,\n options: { userName = '', userId = '', endpoints } = {},\n screens,\n onLeave,\n },\n ref,\n ) => {\n const metadata = '';\n const reactiveStore = useRef<HMSPrebuiltRefType>();\n\n const [hydrated, setHydrated] = React.useState(false);\n useEffect(() => {\n setHydrated(true);\n const hms = new HMSReactiveStore();\n const hmsStore = hms.getStore();\n const hmsActions = hms.getActions();\n const hmsNotifications = hms.getNotifications();\n const hmsStats = hms.getStats();\n hms.triggerOnSubscribe();\n\n reactiveStore.current = {\n hmsActions,\n hmsStats,\n hmsStore,\n hmsNotifications,\n };\n }, []);\n\n useEffect(() => {\n if (!ref || !reactiveStore.current) {\n return;\n }\n (ref as MutableRefObject<HMSPrebuiltRefType>).current = { ...reactiveStore.current };\n }, [ref]);\n\n // leave room when component unmounts\n useEffect(\n () => () => {\n reactiveStore?.current?.hmsActions.leave();\n },\n [],\n );\n\n const endpointsObj = endpoints as\n | {\n init: string;\n tokenByRoomCode: string;\n tokenByRoomIdRole: string;\n roomLayout: string;\n }\n | undefined;\n const tokenByRoomCodeEndpoint: string = endpointsObj?.tokenByRoomCode || '';\n const initEndpoint: string = endpointsObj?.init || '';\n const roomLayoutEndpoint: string = endpointsObj?.roomLayout || '';\n const tokenByRoomIdRoleEndpoint: string = endpointsObj?.tokenByRoomIdRole || '';\n\n const overrideLayout: Partial<Layout> = {\n logo,\n themes,\n typography,\n screens,\n };\n\n if (!roomCode && !(authToken && roomId && role)) {\n console.error(`\n HMSPrebuilt can be initialised by providing: \n either just \"roomCode\" or \"authToken\" and \"roomId\" and \"role\".\n Please check if you are providing the above values for initialising prebuilt.\n `);\n throw Error('Incorrect initializing params for HMSPrebuilt component');\n }\n\n if (!hydrated) {\n return null;\n }\n\n globalStyles();\n\n return (\n <ErrorBoundary>\n <HMSPrebuiltContext.Provider\n value={{\n roomCode,\n roomId,\n role,\n onLeave,\n userName,\n userId,\n endpoints: {\n tokenByRoomCode: tokenByRoomCodeEndpoint,\n init: initEndpoint,\n tokenByRoomIdRole: tokenByRoomIdRoleEndpoint,\n roomLayout: roomLayoutEndpoint,\n },\n }}\n >\n <HMSRoomProvider\n isHMSStatsOn={FeatureFlags.enableStatsForNerds}\n actions={reactiveStore.current?.hmsActions}\n store={reactiveStore.current?.hmsStore}\n notifications={reactiveStore.current?.hmsNotifications}\n stats={reactiveStore.current?.hmsStats}\n >\n <RoomLayoutProvider roomLayoutEndpoint={roomLayoutEndpoint} overrideLayout={overrideLayout}>\n <RoomLayoutContext.Consumer>\n {data => {\n const layout = data?.layout;\n const theme: Theme = layout?.themes?.[0] || ({} as Theme);\n const { typography } = layout || {};\n let fontFamily = ['sans-serif'];\n if (typography?.font_family) {\n fontFamily = [`${typography?.font_family}`, ...fontFamily];\n }\n\n return (\n <HMSThemeProvider\n // issue is with stichtes caching the theme using the theme name / class\n // no updates to the themes are fired if the name is same.\n // TODO: cache the theme and do deep check to trigger name change in the theme\n themeType={`${theme.name}-${Date.now()}`}\n theme={{\n //@ts-ignore: Prebuilt theme to match stiches theme\n colors: theme.palette,\n fonts: {\n //@ts-ignore: font list to match token types of stiches\n sans: fontFamily,\n },\n }}\n >\n <AppData appDetails={metadata} tokenEndpoint={tokenByRoomIdRoleEndpoint} />\n <Init />\n <Box\n css={{\n bg: '$background_dim',\n size: '100%',\n lineHeight: '1.5',\n '-webkit-text-size-adjust': '100%',\n }}\n >\n <AppRoutes authTokenByRoomCodeEndpoint={tokenByRoomCodeEndpoint} defaultAuthToken={authToken} />\n </Box>\n </HMSThemeProvider>\n );\n }}\n </RoomLayoutContext.Consumer>\n </RoomLayoutProvider>\n </HMSRoomProvider>\n </HMSPrebuiltContext.Provider>\n </ErrorBoundary>\n );\n },\n);\n\nHMSPrebuilt.displayName = 'HMSPrebuilt';\n\nconst Redirector = ({ showPreview }: { showPreview: boolean }) => {\n const { roomId, role } = useParams();\n return <Navigate to={`/${showPreview ? 'preview' : 'meeting'}/${roomId}/${role || ''}`} />;\n};\n\nconst RouteList = () => {\n const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();\n const { isLeaveScreenEnabled } = useRoomLayoutLeaveScreen();\n useAutoStartStreaming();\n return (\n <Routes>\n {isPreviewScreenEnabled ? (\n <Route path=\"preview\">\n <Route\n path=\":roomId/:role\"\n element={\n <Suspense fallback={<FullPageProgress text=\"Loading preview...\" />}>\n <PreviewContainer />\n </Suspense>\n }\n />\n <Route\n path=\":roomId\"\n element={\n <Suspense fallback={<FullPageProgress text=\"Loading preview...\" />}>\n <PreviewContainer />\n </Suspense>\n }\n />\n </Route>\n ) : null}\n <Route path=\"meeting\">\n <Route\n path=\":roomId/:role\"\n element={\n <Suspense fallback={<FullPageProgress text=\"Joining...\" />}>\n <Conference />\n </Suspense>\n }\n />\n <Route\n path=\":roomId\"\n element={\n <Suspense fallback={<FullPageProgress text=\"Joining...\" />}>\n <Conference />\n </Suspense>\n }\n />\n </Route>\n {isLeaveScreenEnabled ? (\n <Route path=\"leave\">\n <Route path=\":roomId/:role\" element={<PostLeave />} />\n <Route path=\":roomId\" element={<PostLeave />} />\n </Route>\n ) : null}\n\n <Route path=\"/:roomId/:role\" element={<Redirector showPreview={isPreviewScreenEnabled} />} />\n <Route path=\"/:roomId/\" element={<Redirector showPreview={isPreviewScreenEnabled} />} />\n </Routes>\n );\n};\n\nconst BackSwipe = () => {\n const isConnectedToRoom = useHMSStore(selectIsConnectedToRoom);\n const hmsActions = useHMSActions();\n useEffect(() => {\n const onRouteLeave = async () => {\n if (isConnectedToRoom) {\n await hmsActions.leave();\n }\n };\n window.addEventListener('popstate', onRouteLeave);\n return () => {\n window.removeEventListener('popstate', onRouteLeave);\n };\n }, [hmsActions, isConnectedToRoom]);\n return null;\n};\n\nconst Router = ({ children }: { children: ReactElement }) => {\n const { roomId, role, roomCode } = useHMSPrebuiltContext();\n return [roomId, role, roomCode].every(value => !value) ? (\n <BrowserRouter>{children}</BrowserRouter>\n ) : (\n <MemoryRouter initialEntries={[`/${roomCode ? roomCode : `${roomId}/${role || ''}`}`]} initialIndex={0}>\n {children}\n </MemoryRouter>\n );\n};\n\nfunction AppRoutes({\n authTokenByRoomCodeEndpoint,\n defaultAuthToken,\n}: {\n authTokenByRoomCodeEndpoint: string;\n defaultAuthToken?: string;\n}) {\n const roomLayout = useRoomLayout();\n const isNotificationsDisabled = useIsNotificationDisabled();\n return (\n <Router>\n <>\n <ToastContainer />\n <Notifications />\n <BackSwipe />\n {!isNotificationsDisabled && <FlyingEmoji />}\n <RemoteStopScreenshare />\n <KeyboardHandler />\n <AuthToken authTokenByRoomCodeEndpoint={authTokenByRoomCodeEndpoint} defaultAuthToken={defaultAuthToken} />\n {roomLayout && (\n <Routes>\n <Route path=\"/*\" element={<RouteList />} />\n </Routes>\n )}\n </>\n </Router>\n );\n}\n", "import React, { useEffect } from 'react';\nimport {\n HMSRoomState,\n selectAvailableRoleNames,\n selectFullAppData,\n selectHLSState,\n selectIsConnectedToRoom,\n selectLocalPeerRoleName,\n selectRolesMap,\n selectRoomState,\n selectRTMPState,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport { normalizeAppPolicyConfig } from '../init/initUtils';\nimport { UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\nimport { useIsSidepaneTypeOpen, useSidepaneReset, useSidepaneState, useSidepaneToggle } from './useSidepane';\nimport { useSetAppDataByKey } from './useUISettings';\nimport {\n APP_DATA,\n CHAT_SELECTOR,\n DEFAULT_WAITING_VIEWER_ROLE,\n SIDE_PANE_OPTIONS,\n UI_MODE_GRID,\n UI_SETTINGS,\n} from '../../common/constants';\n\nexport const getAppDetails = appDetails => {\n try {\n return !appDetails ? {} : JSON.parse(appDetails);\n } catch (error) {\n return {};\n }\n};\n\nconst initialAppData = {\n [APP_DATA.uiSettings]: {\n [UI_SETTINGS.isAudioOnly]: false,\n [UI_SETTINGS.maxTileCount]: 9,\n [UI_SETTINGS.showStatsOnTiles]: false,\n [UI_SETTINGS.enableAmbientMusic]: false,\n [UI_SETTINGS.uiViewMode]: UI_MODE_GRID,\n [UI_SETTINGS.mirrorLocalVideo]: true,\n },\n [APP_DATA.subscribedNotifications]: {\n PEER_JOINED: false,\n PEER_LEFT: false,\n NEW_MESSAGE: true,\n ERROR: true,\n METADATA_UPDATED: true,\n },\n [APP_DATA.chatOpen]: false,\n [APP_DATA.chatSelector]: {\n [CHAT_SELECTOR.ROLE]: '',\n [CHAT_SELECTOR.PEER_ID]: '',\n },\n [APP_DATA.chatDraft]: '',\n [APP_DATA.sidePane]: '',\n [APP_DATA.hlsStarted]: false,\n [APP_DATA.rtmpStarted]: false,\n [APP_DATA.recordingStarted]: false,\n [APP_DATA.waitingViewerRole]: DEFAULT_WAITING_VIEWER_ROLE,\n [APP_DATA.dropdownList]: [],\n [APP_DATA.authToken]: '',\n [APP_DATA.minimiseInset]: false,\n [APP_DATA.activeScreensharePeerId]: '',\n [APP_DATA.disableNotificiations]: false,\n};\n\nexport const AppData = React.memo(({ appDetails, tokenEndpoint }) => {\n const hmsActions = useHMSActions();\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const sidePane = useSidepaneState();\n const resetSidePane = useSidepaneReset();\n const [preferences = {}] = useUserPreferences(UserPreferencesKeys.UI_SETTINGS);\n const roleNames = useHMSStore(selectAvailableRoleNames);\n const rolesMap = useHMSStore(selectRolesMap);\n const localPeerRole = useHMSStore(selectLocalPeerRoleName);\n const appData = useHMSStore(selectFullAppData);\n\n useEffect(() => {\n if (!isConnected && sidePane && sidePane !== SIDE_PANE_OPTIONS.PARTICIPANTS) {\n resetSidePane();\n }\n }, [isConnected, sidePane, resetSidePane]);\n\n useEffect(() => {\n hmsActions.initAppData({\n ...initialAppData,\n ...appData,\n });\n hmsActions.setFrameworkInfo({\n type: 'react-web',\n isPrebuilt: true,\n version: React.version,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hmsActions]);\n\n useEffect(() => {\n const uiSettings = preferences || {};\n const updatedSettings = {\n ...uiSettings,\n [UI_SETTINGS.uiViewMode]: uiSettings.uiViewMode || UI_MODE_GRID,\n };\n hmsActions.setAppData(APP_DATA.uiSettings, updatedSettings, true);\n }, [preferences, hmsActions]);\n\n useEffect(() => {\n const appData = {\n [APP_DATA.tokenEndpoint]: tokenEndpoint,\n [APP_DATA.appConfig]: getAppDetails(appDetails),\n };\n for (const key in appData) {\n hmsActions.setAppData([key], appData[key]);\n }\n }, [appDetails, tokenEndpoint, hmsActions]);\n\n useEffect(() => {\n if (!preferences.subscribedNotifications) {\n return;\n }\n hmsActions.setAppData(APP_DATA.subscribedNotifications, preferences.subscribedNotifications, true);\n }, [preferences.subscribedNotifications, hmsActions]);\n\n useEffect(() => {\n if (localPeerRole) {\n const config = normalizeAppPolicyConfig(roleNames, rolesMap);\n hmsActions.setAppData(APP_DATA.appLayout, config[localPeerRole]);\n }\n }, [roleNames, rolesMap, localPeerRole, hmsActions]);\n\n return <ResetStreamingStart />;\n});\n\n/**\n * reset hlsStarted, rtmpStarted values when streaming starts\n */\nconst ResetStreamingStart = () => {\n const { isHLSRunning, isRTMPRunning, isBrowserRecordingOn } = useRecordingStreaming();\n const hlsError = useHMSStore(selectHLSState).error;\n const rtmpError = useHMSStore(selectRTMPState).error;\n const roomState = useHMSStore(selectRoomState);\n const [hlsStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);\n const [recordingStarted, setRecordingStarted] = useSetAppDataByKey(APP_DATA.recordingStarted);\n const [rtmpStarted, setRTMPStarted] = useSetAppDataByKey(APP_DATA.rtmpStarted);\n const toggleStreaming = useSidepaneToggle(SIDE_PANE_OPTIONS.STREAMING);\n const isStreamingOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.STREAMING);\n\n useEffect(() => {\n if (isBrowserRecordingOn && recordingStarted) {\n setRecordingStarted(false);\n }\n }, [isBrowserRecordingOn, recordingStarted, setRecordingStarted]);\n /**\n * Reset on leave\n */\n useEffect(() => {\n if (roomState === HMSRoomState.Disconnected) {\n setHLSStarted(false);\n setRecordingStarted(false);\n setRTMPStarted(false);\n }\n }, [roomState, setHLSStarted, setRTMPStarted, setRecordingStarted]);\n useEffect(() => {\n if (isHLSRunning || hlsError) {\n if (hlsStarted) {\n setHLSStarted(false);\n if (isStreamingOpen) {\n toggleStreaming();\n }\n }\n }\n }, [isHLSRunning, hlsStarted, setHLSStarted, hlsError, isStreamingOpen, toggleStreaming]);\n useEffect(() => {\n if (isRTMPRunning || rtmpError || isBrowserRecordingOn) {\n if (rtmpStarted) {\n setRTMPStarted(false);\n if (isStreamingOpen) {\n toggleStreaming();\n }\n }\n }\n }, [isRTMPRunning, setRTMPStarted, rtmpStarted, rtmpError, isBrowserRecordingOn, isStreamingOpen, toggleStreaming]);\n return null;\n};\n", "// interface RoleConfig {\n// center?: HMSRoleName[];\n// sidepane?: HMSRoleName[];\n// selfRoleChangeTo?: HMSRoleName[];\n// remoteRoleChangeFor?: HMSRoleName[];\n// }\n\n// interface PolicyConfig {\n// [role: string]: RoleConfig;\n// }\n\n/**\n * check if a role is allowed to publish either of audio or video\n */\nfunction canPublishAV(role) {\n const params = role?.publishParams;\n if (params?.allowed) {\n return params.allowed.includes('video') || params.allowed.includes('audio');\n }\n return false;\n}\n\n/**\n * Figure out the layout for each role. There is some extra work being done\n * here currently to figure out the layout for roles other than local peer too\n * which can be avoided.\n */\nexport const normalizeAppPolicyConfig = (roleNames, rolesMap, appPolicyConfig = {}) => {\n const newConfig = Object.assign({}, appPolicyConfig);\n // eslint-disable-next-line complexity\n roleNames.forEach(roleName => {\n if (!newConfig[roleName]) {\n newConfig[roleName] = {};\n }\n const subscribedRoles = rolesMap[roleName].subscribeParams?.subscribeToRoles || [];\n\n const isNotSubscribingOrSubscribingToSelf =\n subscribedRoles.length === 0 || (subscribedRoles.length === 1 && subscribedRoles[0] === roleName);\n if (!newConfig[roleName].center) {\n const publishingRoleNames = roleNames.filter(\n roleName => canPublishAV(rolesMap[roleName]) && subscribedRoles.includes(roleName),\n );\n if (isNotSubscribingOrSubscribingToSelf) {\n newConfig[roleName].center = [roleName];\n } else {\n // all other publishing roles apart from local role in center by default\n newConfig[roleName].center = publishingRoleNames.filter(rName => rName !== roleName);\n }\n }\n // everyone from my role is in sidepane by default if they can publish\n if (!newConfig[roleName].sidepane) {\n if (isNotSubscribingOrSubscribingToSelf) {\n newConfig[roleName].sidepane = [];\n } else {\n newConfig[roleName].sidepane = canPublishAV(rolesMap[roleName]) ? [roleName] : [];\n }\n }\n if (!newConfig[roleName].selfRoleChangeTo) {\n newConfig[roleName].selfRoleChangeTo = roleNames;\n }\n if (!newConfig[roleName].remoteRoleChangeFor) {\n newConfig[roleName].remoteRoleChangeFor = roleNames;\n }\n });\n\n return newConfig;\n};\n", "import { useState } from 'react';\nimport { useLocalStorage } from 'react-use';\n\nexport const UserPreferencesKeys = {\n PREVIEW: 'preview',\n NOTIFICATIONS: 'notifications',\n UI_SETTINGS: 'uiSettings',\n RTMP_URLS: 'rtmpUrls',\n};\n\nexport const defaultPreviewPreference = {\n name: '',\n isAudioMuted: false,\n isVideoMuted: false,\n};\n\nexport const useUserPreferences = (key, defaultPreference) => {\n const [localStorageValue, setStorageValue] = useLocalStorage(key, defaultPreference);\n const [preference, setPreference] = useState(localStorageValue || defaultPreference);\n const changePreference = value => {\n setPreference(value);\n setStorageValue(value);\n };\n return [preference, changePreference];\n};\n", "import { useCallback } from 'react';\nimport { selectAppData, useHMSActions, useHMSStore, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport { APP_DATA } from '../../common/constants';\n\n/**\n * Gives a boolean value if the sidepaneType matches current sidepane value in store\n * @param {string} sidepaneType\n * @returns {boolean} - if the sidepaneType is passed returns boolean else the current value\n */\nexport const useIsSidepaneTypeOpen = sidepaneType => {\n if (!sidepaneType) {\n throw Error('Pass one of the side pane options');\n }\n return useHMSStore(selectAppData(APP_DATA.sidePane)) === sidepaneType;\n};\n\n/**\n * Gives the current value of sidepane in store\n * @returns {string} - if the sidepaneType is passed returns boolean else the current value\n */\nexport const useSidepaneState = () => {\n const sidePane = useHMSStore(selectAppData(APP_DATA.sidePane));\n return sidePane;\n};\n\n/**\n * Toggle the sidepane value between passed sidePaneType and '';\n * @param {string} sidepaneType\n */\nexport const useSidepaneToggle = sidepaneType => {\n const hmsActions = useHMSActions();\n const vanillaStore = useHMSVanillaStore();\n const toggleSidepane = useCallback(() => {\n const isOpen = vanillaStore.getState(selectAppData(APP_DATA.sidePane)) === sidepaneType;\n hmsActions.setAppData(APP_DATA.sidePane, !isOpen ? sidepaneType : '');\n }, [vanillaStore, hmsActions, sidepaneType]);\n return toggleSidepane;\n};\n\n/**\n * reset's the sidepane value\n */\nexport const useSidepaneReset = () => {\n const hmsActions = useHMSActions();\n const resetSidepane = useCallback(() => {\n hmsActions.setAppData(APP_DATA.sidePane, '');\n }, [hmsActions]);\n return resetSidepane;\n};\n", "import { parsedUserAgent } from '@100mslive/react-sdk';\n\nexport const DEFAULT_WAITING_VIEWER_ROLE = 'waiting-room';\nexport const QUERY_PARAM_SKIP_PREVIEW = 'skip_preview';\nexport const QUERY_PARAM_SKIP_PREVIEW_HEADFUL = 'skip_preview_headful';\nexport const QUERY_PARAM_NAME = 'name';\nexport const QUERY_PARAM_VIEW_MODE = 'ui_mode';\nexport const QUERY_PARAM_PREVIEW_AS_ROLE = 'preview_as_role';\nexport const UI_MODE_GRID = 'grid';\nexport const MAX_TOASTS = 5;\nexport const RTMP_RECORD_RESOLUTION_MIN = 480;\nexport const RTMP_RECORD_RESOLUTION_MAX = 1280;\nexport const RTMP_RECORD_DEFAULT_RESOLUTION = {\n width: 1280,\n height: 720,\n};\nexport const EMOJI_REACTION_TYPE = 'EMOJI_REACTION';\n\nexport const CHAT_SELECTOR = {\n PEER_ID: 'peer_id',\n ROLE: 'role',\n};\n\nexport const APP_DATA = {\n uiSettings: 'uiSettings',\n chatOpen: 'chatOpen',\n chatSelector: 'chatSelector',\n chatDraft: 'chatDraft',\n appConfig: 'appConfig',\n sidePane: 'sidePane',\n hlsStats: 'hlsStats',\n waitingViewerRole: 'waitingViewerRole',\n subscribedNotifications: 'subscribedNotifications',\n logo: 'logo',\n tokenEndpoint: 'tokenEndpoint',\n appLayout: 'appLayout',\n hlsStarted: 'hlsStarted',\n rtmpStarted: 'rtmpStarted',\n recordingStarted: 'recordingStarted',\n embedConfig: 'embedConfig',\n pinnedTrackId: 'pinnedTrackId',\n dropdownList: 'dropdownList',\n authToken: 'authToken',\n pdfConfig: 'pdfConfig',\n minimiseInset: 'minimiseInset',\n activeScreensharePeerId: 'activeScreensharePeerId',\n disableNotificiations: 'disableNotificiations',\n};\nexport const UI_SETTINGS = {\n isAudioOnly: 'isAudioOnly',\n maxTileCount: 'maxTileCount',\n uiViewMode: 'uiViewMode',\n showStatsOnTiles: 'showStatsOnTiles',\n enableAmbientMusic: 'enableAmbientMusic',\n mirrorLocalVideo: 'mirrorLocalVideo',\n};\n\nexport const SIDE_PANE_OPTIONS = {\n PARTICIPANTS: 'Participants',\n CHAT: 'Chat',\n STREAMING: 'STREAMING',\n};\n\nexport const SUBSCRIBED_NOTIFICATIONS = {\n PEER_JOINED: 'PEER_JOINED',\n PEER_LEFT: 'PEER_LEFT',\n METADATA_UPDATED: 'METADATA_UPDATED',\n NEW_MESSAGE: 'NEW_MESSAGE',\n ERROR: 'ERROR',\n};\n\nexport const CREATE_ROOM_DOC_URL = 'https://github.com/100mslive/100ms-web/wiki/Creating-and-joining-a-room';\nexport const HLS_TIMED_METADATA_DOC_URL =\n 'https://www.100ms.live/docs/javascript/v2/how--to-guides/record-and-live-stream/hls/hls-timed-metadata';\n\nexport const REMOTE_STOP_SCREENSHARE_TYPE = 'REMOTE_STOP_SCREENSHARE';\n\nexport const isChrome = parsedUserAgent.getBrowser()?.name?.toLowerCase() === 'chrome';\nexport const isFirefox = parsedUserAgent.getBrowser()?.name?.toLowerCase() === 'firefox';\nexport const isSafari = parsedUserAgent.getBrowser()?.name?.toLowerCase() === 'safari';\nexport const isIOS = parsedUserAgent.getOS()?.name?.toLowerCase() === 'ios';\nexport const isMacOS = parsedUserAgent.getOS()?.name?.toLowerCase() === 'mac os';\nexport const isAndroid = parsedUserAgent.getOS()?.name?.toLowerCase() === 'android';\nexport const isIPadOS = false;\n// typeof navigator !== \"undefined\" &&\n// navigator?.maxTouchPoints &&\n// navigator?.maxTouchPoints > 2 &&\n// navigator?.userAgent?.match(/Mac/);\n\nexport const SESSION_STORE_KEY = {\n TRANSCRIPTION_STATE: 'transcriptionState',\n PINNED_MESSAGE: 'pinnedMessage',\n SPOTLIGHT: 'spotlight',\n};\n\nexport const ROLE_CHANGE_DECLINED = 'role_change_declined';\n", "import { useCallback } from 'react';\nimport {\n selectAppData,\n selectAppDataByPath,\n selectAudioTrackByPeerID,\n selectSessionStore,\n selectTrackByID,\n selectVideoTrackByPeerID,\n useHMSActions,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\nimport { APP_DATA, SESSION_STORE_KEY } from '../../common/constants';\n\n/**\n * fields saved related to UI settings in store's app data can be\n * accessed using this hook. key is optional if not passed\n * the whole UI settings object is returned. Usage -\n * 1. val = useUiSettings(\"isAudioOnly\");\n * console.log(val); // false\n * 2. val = useUISettings();\n * console.log(val); // {isAudioOnly: false}\n * @param {string | undefined} uiSettingKey\n */\nexport const useUISettings = uiSettingKey => {\n const uiSettings = useHMSStore(selectAppDataByPath(APP_DATA.uiSettings, uiSettingKey));\n return uiSettings;\n};\n\n/**\n * fields saved related to UI settings in store's app data can be\n * accessed using this hook. key is optional if not passed\n * the whole UI settings object is returned. Usage -\n * [val, setVal] = useUiSettings(\"isAudioOnly\");\n * console.log(val); // false\n * setVal(true);\n * @param {string} uiSettingKey\n */\nexport const useSetUiSettings = uiSettingKey => {\n const value = useUISettings(uiSettingKey);\n const setValue = useSetAppData({\n key1: APP_DATA.uiSettings,\n key2: uiSettingKey,\n });\n return [value, setValue];\n};\n\nexport const useWaitingViewerRole = () => {\n return useHMSStore(selectAppData(APP_DATA.waitingViewerRole));\n};\nexport const useIsHLSStartedFromUI = () => {\n return useHMSStore(selectAppData(APP_DATA.hlsStarted));\n};\n\nexport const useIsRTMPStartedFromUI = () => {\n return useHMSStore(selectAppData(APP_DATA.rtmpStarted));\n};\n\nexport const useTokenEndpoint = () => {\n return useHMSStore(selectAppData(APP_DATA.tokenEndpoint));\n};\n\nexport const useAuthToken = () => {\n return useHMSStore(selectAppData(APP_DATA.authToken));\n};\n\nexport const useUrlToEmbed = () => {\n return useHMSStore(selectAppData(APP_DATA.embedConfig))?.url;\n};\n\nexport const usePDFAnnotator = () => {\n return useHMSStore(selectAppData(APP_DATA.pdfConfig))?.state;\n};\nexport const usePinnedTrack = () => {\n const pinnedTrackId = useHMSStore(selectAppData(APP_DATA.pinnedTrackId));\n const spotlightPeerId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));\n const spotlightVideoTrackId = useHMSStore(selectVideoTrackByPeerID(spotlightPeerId))?.id;\n const spotlightAudioTrackId = useHMSStore(selectAudioTrackByPeerID(spotlightPeerId))?.id;\n return useHMSStore(selectTrackByID(pinnedTrackId || spotlightVideoTrackId || spotlightAudioTrackId));\n};\n\nexport const useSubscribedNotifications = notificationKey => {\n const notificationPreference = useHMSStore(selectAppDataByPath(APP_DATA.subscribedNotifications, notificationKey));\n return notificationPreference;\n};\n\nexport const useIsNotificationDisabled = () => {\n const notificationPreference = useHMSStore(selectAppDataByPath(APP_DATA.disableNotificiations));\n return notificationPreference;\n};\n\nexport const useSetSubscribedNotifications = notificationKey => {\n const value = useSubscribedNotifications(notificationKey);\n const setValue = useSetAppData({\n key1: APP_DATA.subscribedNotifications,\n key2: notificationKey,\n });\n return [value, setValue];\n};\n\nexport const useSubscribeChatSelector = chatSelectorKey => {\n const chatSelectorPreference = useHMSStore(selectAppDataByPath(APP_DATA.chatSelector, chatSelectorKey));\n return chatSelectorPreference;\n};\n\nexport const useSetSubscribedChatSelector = chatSelectorKey => {\n const value = useSubscribeChatSelector(chatSelectorKey);\n const setValue = useSetAppData({\n key1: APP_DATA.chatSelector,\n key2: chatSelectorKey,\n });\n return [value, setValue];\n};\n\nexport const useSetAppDataByKey = appDataKey => {\n const value = useHMSStore(selectAppData(appDataKey));\n const actions = useHMSActions();\n const setValue = useCallback(\n value => {\n actions.setAppData(appDataKey, value);\n },\n [actions, appDataKey],\n );\n return [value, setValue];\n};\n\nconst useSetAppData = ({ key1, key2 }) => {\n const actions = useHMSActions();\n const store = useHMSVanillaStore();\n const [, setPreferences] = useUserPreferences(UserPreferencesKeys.UI_SETTINGS);\n const setValue = useCallback(\n value => {\n if (!key1) {\n return;\n }\n actions.setAppData(\n key1,\n key2\n ? {\n [key2]: value,\n }\n : value,\n true,\n );\n const appData = store.getState(selectAppData());\n setPreferences({\n ...appData.uiSettings,\n subscribedNotifications: appData.subscribedNotifications,\n });\n },\n [actions, key1, key2, store, setPreferences],\n );\n return setValue;\n};\n", "import React, { useEffect, useState } from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { styled } from '../../Theme';\nimport { useHMSPrebuiltContext } from '../AppContext';\nimport { ErrorDialog } from '../primitives/DialogContent';\nimport { useSetAppDataByKey, useTokenEndpoint } from './AppData/useUISettings';\nimport { APP_DATA } from '../common/constants';\n\n/**\n * query params exposed -\n * skip_preview=true => used by recording and streaming service, skips preview and directly joins\n * header and footer don't show up in this case\n * skip_preview_headful=true => used by automation testing to skip preview without impacting the UI\n * name=abc => gives the initial name for the peer joining\n * auth_token=123 => uses the passed in token to join instead of fetching from token endpoint\n * ui_mode=activespeaker => lands in active speaker mode after joining the room\n */\nconst AuthToken = React.memo(({ authTokenByRoomCodeEndpoint, defaultAuthToken }) => {\n const hmsActions = useHMSActions();\n const tokenEndpoint = useTokenEndpoint();\n const { roomCode, userId } = useHMSPrebuiltContext();\n const [error, setError] = useState({ title: '', body: '' });\n let authToken = defaultAuthToken;\n const [, setAuthTokenInAppData] = useSetAppDataByKey(APP_DATA.authToken);\n\n useEffect(() => {\n if (authToken) {\n setAuthTokenInAppData(authToken);\n return;\n }\n if (!tokenEndpoint && !roomCode) {\n return;\n }\n\n hmsActions\n .getAuthTokenByRoomCode({ roomCode, userId }, { endpoint: authTokenByRoomCodeEndpoint })\n .then(token => setAuthTokenInAppData(token))\n .catch(error => setError(convertError(error)));\n }, [hmsActions, tokenEndpoint, authToken, authTokenByRoomCodeEndpoint, setAuthTokenInAppData, roomCode, userId]);\n\n if (error.title) {\n return <ErrorDialog title={error.title}>{error.body}</ErrorDialog>;\n }\n return null;\n});\n\nconst convertError = error => {\n console.error('[error]', { error });\n if (error.action === 'GET_TOKEN' && error.code === 403) {\n return {\n title: 'Room code is disabled',\n body: ErrorWithSupportLink('Room code corresponding to this link is no more active.'),\n };\n } else if (error.action === 'GET_TOKEN' && error.code === 404) {\n return {\n title: 'Room code does not exist',\n body: ErrorWithSupportLink('We could not find a room code corresponding to this link.'),\n };\n } else if (error.action === 'GET_TOKEN' && error.code === 2003) {\n return {\n title: 'Endpoint is not reachable',\n body: ErrorWithSupportLink(`Endpoint is not reachable. ${error.description}.`),\n };\n } else if (error.response && error.response.status === 404) {\n return {\n title: 'Room does not exist',\n body: ErrorWithSupportLink('We could not find a room corresponding to this link.'),\n };\n } else if (error.response && error.response.status === 403) {\n return {\n title: 'Accessing room using this link format is disabled',\n body: ErrorWithSupportLink('You can re-enable this from the developer section in Dashboard.'),\n };\n } else {\n console.error('Token API Error', error);\n return {\n title: 'Error fetching token',\n body: ErrorWithSupportLink(\n 'An error occurred while fetching the app token. Please look into logs for more details.',\n ),\n };\n }\n};\n\nconst Link = styled('a', {\n color: '#2f80e1',\n});\n\nexport const ErrorWithSupportLink = errorMessage => (\n <div>\n {errorMessage} If you think this is a mistake on our side, please create{' '}\n <Link target=\"_blank\" href=\"https://github.com/100mslive/100ms-web/issues\" rel=\"noreferrer\">\n an issue\n </Link>{' '}\n or reach out over{' '}\n <Link target=\"_blank\" href=\"https://discord.com/invite/kGdmszyzq2\" rel=\"noreferrer\">\n Discord\n </Link>\n .\n </div>\n);\n\nexport default AuthToken;\n", "import React, { useContext } from 'react';\n\ntype HMSPrebuiltContextType = {\n roomCode: string;\n roomId?: string;\n role?: string;\n userName?: string;\n userId?: string;\n endpoints?: Record<string, string>;\n onLeave?: () => void;\n};\n\nexport const HMSPrebuiltContext = React.createContext<HMSPrebuiltContextType>({\n roomCode: '',\n userName: '',\n userId: '',\n endpoints: {},\n onLeave: undefined,\n});\n\nHMSPrebuiltContext.displayName = 'HMSPrebuiltContext';\n\nexport const useHMSPrebuiltContext = () => {\n const context = useContext(HMSPrebuiltContext);\n if (!context) {\n throw Error('Make sure HMSPrebuiltContext.Provider is present at the top level of your application');\n }\n return context;\n};\n", "import React, { useRef } from 'react';\nimport { CheckIcon, CloudUploadIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../Button';\nimport { Checkbox } from '../../Checkbox';\nimport { HorizontalDivider } from '../../Divider';\nimport { IconButton } from '../../IconButton';\nimport { Input } from '../../Input';\nimport { Label } from '../../Label';\nimport { Box, Flex } from '../../Layout';\nimport { Dialog } from '../../Modal';\nimport { Select } from '../../Select';\nimport { Switch } from '../../Switch';\nimport { Text } from '../../Text';\n\nexport const DialogContent = ({ Icon, title, closeable = true, children, css, iconCSS = {}, ...props }) => {\n return (\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ width: 'min(600px, 100%)', ...css }} {...props}>\n <Dialog.Title>\n <Flex justify=\"between\">\n <Flex align=\"center\" css={{ mb: '$1' }}>\n {Icon ? (\n <Box css={{ mr: '$2', color: '$on_primary_high', ...iconCSS }}>\n <Icon />\n </Box>\n ) : null}\n <Text variant=\"h6\" inline>\n {title}\n </Text>\n </Flex>\n {closeable && <Dialog.DefaultClose data-testid=\"dialoge_cross_icon\" />}\n </Flex>\n </Dialog.Title>\n <HorizontalDivider css={{ mt: '0.8rem' }} />\n <Box>{children}</Box>\n </Dialog.Content>\n </Dialog.Portal>\n );\n};\n\nexport const ErrorDialog = ({ open = true, onOpenChange, title, children, ...props }) => {\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <DialogContent\n Icon={CrossIcon}\n title={title}\n onInteractOutside={e => e.preventDefault()}\n onEscapeKeyDown={e => e.preventDefault()}\n onPointerDownOutside={e => e.preventDefault()}\n closeable={false}\n iconCSS={{ color: '$alert_error_default' }}\n {...props}\n >\n <Box css={{ mt: '$lg' }}>{children}</Box>\n </DialogContent>\n </Dialog.Root>\n );\n};\n\nexport const RequestDialog = ({ open = true, onOpenChange, title, body, actionText = 'Accept', onAction, Icon }) => (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ width: 'min(400px,80%)', p: '$10' }}>\n <Dialog.Title css={{ p: 0, display: 'flex', flexDirection: 'row', gap: '$md' }}>\n {Icon ? Icon : null}\n <Text variant=\"h6\">{title}</Text>\n </Dialog.Title>\n {typeof body === 'string' ? (\n <Text\n variant=\"md\"\n css={{\n fontWeight: 400,\n mt: '$4',\n mb: '$10',\n c: '$on_surface_medium',\n }}\n >\n {body}\n </Text>\n ) : (\n <Box css={{ mt: '$4', mb: '$10' }}>{body}</Box>\n )}\n <Flex justify=\"center\" align=\"center\" css={{ width: '100%', gap: '$md' }}>\n <Box css={{ width: '50%' }}>\n <Dialog.Close css={{ width: '100%' }}>\n <Button variant=\"standard\" outlined css={{ width: '100%' }}>\n Cancel\n </Button>\n </Dialog.Close>\n </Box>\n <Box css={{ width: '50%' }}>\n <Button variant=\"primary\" css={{ width: '100%' }} onClick={onAction}>\n {actionText}\n </Button>\n </Box>\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n);\n\n/**\n * a row of items which breaks into column on small screen. For e.g. title on left and options to select\n * from on right for select component.\n */\nexport const DialogRow = ({ children, breakSm = false, css, justify = 'between' }) => {\n let finalCSS = {\n margin: '$10 0',\n w: '100%',\n };\n if (breakSm) {\n finalCSS['@sm'] = {\n flexDirection: 'column',\n alignItems: 'flex-start',\n };\n }\n if (css) {\n finalCSS = Object.assign(finalCSS, css);\n }\n return (\n <Flex align=\"center\" justify={justify} css={finalCSS}>\n {children}\n </Flex>\n );\n};\n\nexport const DialogCol = ({ children, breakSm = false, css, align = 'center', justify = 'between', ...props }) => {\n let finalCSS = {\n margin: '$10 0',\n w: '100%',\n };\n if (breakSm) {\n finalCSS['@sm'] = {\n alignItems: 'flex-start',\n };\n }\n if (css) {\n finalCSS = Object.assign(finalCSS, css);\n }\n return (\n <Flex direction=\"column\" align={align} justify={justify} css={finalCSS} {...props}>\n {children}\n </Flex>\n );\n};\n\n/**\n * key field and label field are optional, option is directly used if not passed\n */\nexport const DialogSelect = ({ title, options, keyField, labelField, selected, onChange, ...props }) => {\n return (\n <DialogRow breakSm>\n <Label>{title}</Label>\n <Select.Root data-testid={`dialog_select_${title}`} css={{ width: '70%', '@sm': { width: '100%' } }} {...props}>\n <Select.DefaultDownIcon />\n <Select.Select onChange={e => onChange(e.target.value)} value={selected} css={{ width: '100%' }}>\n {options.map(option => {\n const id = keyField ? option[keyField] : option;\n const label = labelField ? option[labelField] : option;\n return (\n <option value={id} key={id}>\n {label}\n </option>\n );\n })}\n </Select.Select>\n </Select.Root>\n </DialogRow>\n );\n};\n\nexport const DialogInput = ({ title, value, onChange, placeholder, disabled, type, ...props }) => {\n return (\n <DialogRow breakSm>\n <Label>{title}</Label>\n <Input\n css={{ width: '70%', '@sm': { width: '100%' }, bg: '$surface_bright' }}\n value={value}\n onChange={e => onChange(e.target.value)}\n placeholder={placeholder}\n disabled={disabled}\n type={type}\n {...props}\n />\n </DialogRow>\n );\n};\n\nexport const DialogInputFile = ({ value, onChange, placeholder, disabled, type, ...props }) => {\n const inputRef = useRef();\n return (\n <DialogCol\n breakSm\n onClick={() => inputRef.current?.click()}\n css={{\n justifyContent: 'center',\n position: 'relative',\n cursor: 'pointer',\n py: '$12',\n border: '1px dashed $border_bright',\n r: '$1',\n height: 'max(140px, 30%)',\n alignItems: 'center',\n m: '$6 0',\n }}\n gap=\"8\"\n >\n <IconButton\n variant=\"standard\"\n css={{\n border: 'none',\n background: 'none',\n '&:hover': {\n border: 'none',\n background: 'none',\n bg: '$transparent !important',\n },\n }}\n >\n <CloudUploadIcon\n style={{\n width: '3rem',\n height: '3rem',\n }}\n />\n </IconButton>\n <Flex direction=\"row\">\n <Input\n ref={inputRef}\n css={{ width: '70%', '@sm': { width: '100%' } }}\n value={value}\n onChange={e => onChange(e.target)}\n placeholder={placeholder}\n disabled={disabled}\n type={type}\n hidden={true}\n {...props}\n />\n <IconButton\n variant=\"standard\"\n css={{\n background: 'none',\n border: 'none',\n textDecoration: 'underline',\n '&:hover': {\n background: 'none !important',\n border: 'none !important',\n },\n }}\n >\n <Text variant=\"md\">{placeholder}</Text>\n </IconButton>\n </Flex>\n </DialogCol>\n );\n};\n\nexport const DialogSwitch = ({ title, value, onChange, disabled }) => {\n return (\n <DialogRow>\n <Text>{title}</Text>\n <Flex justify=\"end\" css={{ width: '70%' }}>\n <Switch checked={value} disabled={disabled} onCheckedChange={onChange} />\n </Flex>\n </DialogRow>\n );\n};\n\nexport const DialogCheckbox = ({ title, value, onChange, disabled, css, id }) => {\n return (\n <DialogRow css={css}>\n <Label htmlFor={id} css={{ cursor: 'pointer' }}>\n {title}\n </Label>\n <Checkbox.Root checked={value} onCheckedChange={value => onChange(value)} disabled={disabled} id={id}>\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n </DialogRow>\n );\n};\n", "import React, { Component } from 'react';\nimport { CopyIcon } from '@100mslive/react-icons';\nimport { Button } from '../../Button';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { Tooltip } from '../../Tooltip';\nimport { ErrorWithSupportLink } from './AuthToken';\n\nexport class ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.state = { error: null, errorInfo: null, isErrorCopied: false };\n }\n\n componentDidCatch(error, errorInfo) {\n console.error(`react error boundary - ${error.message}`, error, errorInfo);\n // Catch errors in any components below and re-render with error message\n this.setState({\n error: error?.message,\n errorInfo: errorInfo,\n });\n }\n\n render() {\n if (this.state.errorInfo) {\n return (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n size: '100%',\n height: '100vh',\n width: '100%',\n color: '$on_primary_high',\n backgroundColor: '$background_default',\n }}\n >\n <Box css={{ position: 'relative', overflow: 'hidden', r: '$3', height: '100%', width: '100%' }}>\n <Flex\n direction=\"column\"\n css={{\n position: 'absolute',\n size: '100%',\n top: '33.33%',\n left: 0,\n }}\n >\n <div style={{ margin: '1.5rem', width: '100%' }}>\n <Text>Something went wrong</Text>\n <Text>Message: ${this.state.error}</Text>\n <br />\n {ErrorWithSupportLink(`Please reload to see if it works.`)}\n </div>\n <Flex>\n <Tooltip title=\"Reload page\">\n <Button\n onClick={() => {\n window.location.reload();\n }}\n css={{ mx: '$8' }}\n data-testid=\"join_again_btn\"\n >\n Reload\n </Button>\n </Tooltip>\n <Tooltip title=\"Copy error details to clipboard\">\n <Button\n onClick={() => {\n const { error, errorInfo } = this.state;\n navigator.clipboard.writeText(\n JSON.stringify({\n error,\n errorInfo,\n }),\n );\n this.setState({ isErrorCopied: true });\n }}\n css={{ mx: '$8' }}\n data-testid=\"join_again_btn\"\n >\n <CopyIcon /> {this.state.isErrorCopied ? 'Copied' : 'Copy Details'}\n </Button>\n </Tooltip>\n </Flex>\n\n <details style={{ whiteSpace: 'pre-wrap', margin: '1.5rem' }}>\n <Text>{this.state.error && this.state.error.toString()}</Text>\n <br />\n <Text>{JSON.stringify(this.state.errorInfo)}</Text>\n </details>\n </Flex>\n </Box>\n </Flex>\n );\n }\n\n return this.props.children;\n }\n}\n", "import React from 'react';\nimport { Flex } from '../../Layout';\nimport { Loading } from '../../Loading';\nimport { Text } from '../../Text';\n\nconst FullPageProgress = ({ loaderColor = '$primary_default', text = '', css = {} }) => (\n <Flex direction=\"column\" justify=\"center\" align=\"center\" css={{ size: '100%', color: loaderColor, ...css }}>\n <Loading color=\"currentColor\" size={100} />\n {text ? <Text css={{ mt: '$10', color: '$on_surface_high' }}>{text}</Text> : null}\n </Flex>\n);\n\nexport default FullPageProgress;\n", "import React, { useEffect } from 'react';\nimport { useTheme } from '../../../';\nimport { FeatureFlagsInit } from '../../services/FeatureFlags';\n\nconst Init = () => {\n const { toggleTheme } = useTheme();\n\n useEffect(() => {\n window.toggleUiTheme = toggleTheme;\n }, [toggleTheme]);\n\n useEffect(() => {\n function resetHeight() {\n // reset the body height to that of the inner browser\n // The window.innerHeight property returns integer values. When the actual height is in decimal, window.innerHeight returns a larger value than the actual value. This can cause a scrollbar to appear on some screens.\n // Hence using window.visualViewport.height which returns a decimal value.\n document.body.style.height = `${window.visualViewport?.height || window.innerHeight}px`;\n }\n // reset the height whenever the window's resized\n window.addEventListener('resize', resetHeight);\n // called to initially set the height.\n resetHeight();\n return () => {\n window.removeEventListener('resize', resetHeight);\n };\n }, []);\n\n return <FeatureFlagsInit />;\n};\n\nexport { Init };\n", "import { useEffect } from 'react';\nimport { selectRoomID, useHMSStore } from '@100mslive/react-sdk';\n\nexport class FeatureFlags {\n static enableTranscription = process.env.REACT_APP_ENABLE_TRANSCRIPTION === 'true';\n static enableStatsForNerds = process.env.REACT_APP_ENABLE_STATS_FOR_NERDS === 'true';\n static enableWhiteboard =\n process.env.REACT_APP_ENABLE_WHITEBOARD &&\n process.env.REACT_APP_PUSHER_APP_KEY &&\n process.env.REACT_APP_PUSHER_AUTHENDPOINT;\n\n static init(roomId) {\n if (!window.HMS) {\n window.HMS = {};\n }\n // some extra config to hls js to bring down latency\n window.HMS.OPTIMISE_HLS_LATENCY = false;\n // ask permissions in preview even if role doesn't have it\n window.HMS.ALWAYS_REQUEST_PERMISSIONS = false;\n window.HMS.SHOW_NS = process.env.REACT_APP_ENV !== 'prod';\n\n this.enableTranscription = process.env.REACT_APP_TRANSCRIPTION_ROOM_ID === roomId;\n }\n\n static showNS() {\n return window.HMS.SHOW_NS;\n }\n\n static optimiseHLSLatency() {\n return window.HMS.OPTIMISE_HLS_LATENCY;\n }\n\n static alwaysRequestPermissions() {\n return window.HMS.ALWAYS_REQUEST_PERMISSIONS;\n }\n}\n\nexport function FeatureFlagsInit() {\n const roomId = useHMSStore(selectRoomID);\n useEffect(() => {\n if (roomId) {\n FeatureFlags.init(roomId);\n }\n }, [roomId]);\n return null;\n}\n", "import { useEffect } from 'react';\nimport {\n selectAppData,\n selectIsLocalAudioEnabled,\n selectIsLocalVideoEnabled,\n useHMSActions,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { APP_DATA, isMacOS } from '../../common/constants';\n\nlet isEvenListenersAttached = false;\nexport class KeyboardInputManager {\n #actions;\n #store;\n constructor(store, actions) {\n this.#actions = actions;\n this.#store = store;\n }\n #toggleAudio = async () => {\n const enabled = this.#store.getState(selectIsLocalAudioEnabled);\n await this.#actions.setLocalAudioEnabled(!enabled);\n };\n\n #toggleVideo = async () => {\n const enabled = this.#store.getState(selectIsLocalVideoEnabled);\n await this.#actions.setLocalVideoEnabled(!enabled);\n };\n\n #hideSidepane = () => {\n if (this.#store.getState(selectAppData(APP_DATA.sidePane))) {\n this.#actions.setAppData(APP_DATA.sidePane, '');\n }\n };\n\n #toggleStatsForNerds = () => {\n const uiSettings = this.#store.getState(selectAppData(APP_DATA.uiSettings));\n const statsEnabled = uiSettings.showStatsOnTiles;\n this.#actions.setAppData(APP_DATA.uiSettings, {\n ...uiSettings,\n showStatsOnTiles: !statsEnabled,\n });\n };\n\n #toggleHlsStats = () => {\n this.#actions.setAppData(APP_DATA.hlsStats, !this.#store.getState(selectAppData(APP_DATA.hlsStats)));\n };\n\n // eslint-disable-next-line complexity\n #keyDownHandler = async e => {\n const CONTROL_KEY = isMacOS ? e.metaKey : e.ctrlKey;\n const D_KEY = e.key === 'd' || e.key === 'D';\n const E_KEY = e.key === 'e' || e.key === 'E';\n const SNF_KEY = e.key === ']' || e.key === '}';\n\n const SHORTCUT_TOGGLE_AUDIO = CONTROL_KEY && D_KEY;\n const SHORTCUT_TOGGLE_VIDEO = CONTROL_KEY && E_KEY;\n const SHORTCUT_SIDEPANE_CLOSE = e.key === 'Escape';\n const SHORTCUT_STATS_FOR_NERDS = CONTROL_KEY && SNF_KEY;\n\n if (SHORTCUT_TOGGLE_AUDIO) {\n e.preventDefault();\n await this.#toggleAudio();\n } else if (SHORTCUT_TOGGLE_VIDEO) {\n e.preventDefault();\n await this.#toggleVideo();\n } else if (SHORTCUT_SIDEPANE_CLOSE) {\n this.#hideSidepane();\n } else if (SHORTCUT_STATS_FOR_NERDS) {\n this.#toggleHlsStats();\n this.#toggleStatsForNerds();\n }\n };\n\n #bind = () => {\n document.addEventListener('keydown', this.#keyDownHandler, false);\n };\n\n #unbind = () => {\n document.removeEventListener('keydown', this.#keyDownHandler, false);\n };\n\n bindAllShortcuts = () => {\n if (!isEvenListenersAttached) {\n this.#bind();\n isEvenListenersAttached = true;\n }\n };\n\n unbindAllShortcuts = () => {\n if (isEvenListenersAttached) {\n this.#unbind();\n isEvenListenersAttached = false;\n }\n };\n}\n\nexport const KeyboardHandler = () => {\n const store = useHMSVanillaStore();\n const actions = useHMSActions();\n\n useEffect(() => {\n const keyboardManager = new KeyboardInputManager(store, actions);\n keyboardManager.bindAllShortcuts();\n return keyboardManager.unbindAllShortcuts;\n }, [actions, store]);\n return null;\n};\n", "/* eslint-disable no-case-declarations */\nimport React, { useCallback, useEffect } from 'react';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport {\n HMSNotificationTypes,\n HMSRoomState,\n selectHasPeerHandRaised,\n selectRoomState,\n useCustomEvent,\n useHMSNotifications,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { Button } from '../../../';\nimport { useUpdateRoomLayout } from '../../provider/roomLayoutProvider';\nimport { ToastBatcher } from '../Toast/ToastBatcher';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { AutoplayBlockedModal } from './AutoplayBlockedModal';\nimport { InitErrorModal } from './InitErrorModal';\nimport { PeerNotifications } from './PeerNotifications';\nimport { PermissionErrorModal } from './PermissionErrorModal';\nimport { ReconnectNotifications } from './ReconnectNotifications';\nimport { TrackBulkUnmuteModal } from './TrackBulkUnmuteModal';\nimport { TrackNotifications } from './TrackNotifications';\nimport { TrackUnmuteModal } from './TrackUnmuteModal';\nimport { useIsNotificationDisabled, useSubscribedNotifications } from '../AppData/useUISettings';\nimport { useRedirectToLeave } from '../hooks/useRedirectToLeave';\nimport { getMetadata } from '../../common/utils';\nimport { ROLE_CHANGE_DECLINED } from '../../common/constants';\nexport function Notifications() {\n const notification = useHMSNotifications();\n const navigate = useNavigate();\n const params = useParams();\n const subscribedNotifications = useSubscribedNotifications() || {};\n const roomState = useHMSStore(selectRoomState);\n const updateRoomLayoutForRole = useUpdateRoomLayout();\n const isNotificationDisabled = useIsNotificationDisabled();\n const { redirectToLeave } = useRedirectToLeave();\n const vanillaStore = useHMSVanillaStore();\n\n const handleRoleChangeDenied = useCallback(request => {\n ToastManager.addToast({\n title: `${request.peerName} denied your request to join the ${request.role.name} role`,\n variant: 'error',\n });\n }, []);\n\n useCustomEvent({ type: ROLE_CHANGE_DECLINED, onEvent: handleRoleChangeDenied });\n\n useEffect(() => {\n if (!notification || isNotificationDisabled) {\n return;\n }\n switch (notification.type) {\n case HMSNotificationTypes.HAND_RAISE_CHANGED: {\n if (roomState !== HMSRoomState.Connected || notification.data.isLocal) {\n return;\n }\n const hasPeerHandRaised = vanillaStore.getState(selectHasPeerHandRaised(notification.data.id));\n if (hasPeerHandRaised) {\n ToastBatcher.showToast({ notification, type: 'RAISE_HAND' });\n }\n break;\n }\n case HMSNotificationTypes.METADATA_UPDATED:\n if (roomState !== HMSRoomState.Connected) {\n return;\n }\n // Don't show toast message when metadata is updated and raiseHand is false.\n // Don't show toast message in case of local peer.\n const metadata = getMetadata(notification.data?.metadata);\n if (!metadata?.isHandRaised || notification.data.isLocal) return;\n\n console.debug('Metadata updated', notification.data);\n if (!subscribedNotifications.METADATA_UPDATED) return;\n ToastBatcher.showToast({ notification, type: 'RAISE_HAND' });\n break;\n case HMSNotificationTypes.NAME_UPDATED:\n console.log(notification.data.id + ' changed their name to ' + notification.data.name);\n break;\n case HMSNotificationTypes.ERROR:\n if (notification.data?.isTerminal && notification.data?.action !== 'INIT') {\n if ([500, 6008].includes(notification.data?.code)) {\n ToastManager.addToast({\n title: `Error: ${notification.data?.message}`,\n });\n } else {\n // show button action when the error is terminal\n const toastId = ToastManager.addToast({\n title:\n notification.data?.message ||\n 'We couldn\u2019t reconnect you. When you\u2019re back online, try joining the room.',\n inlineAction: true,\n action: (\n <Button\n onClick={() => {\n ToastManager.removeToast(toastId);\n navigate(`/${params.roomId}${params.role ? `/${params.role}` : ''}`);\n }}\n >\n Rejoin\n </Button>\n ),\n close: false,\n });\n }\n // goto leave for terminal if any action is not performed within 2secs\n // if network is still unavailable going to preview will throw an error\n redirectToLeave(1000);\n return;\n }\n // Autoplay error or user denied screen share (cancelled browser pop-up)\n if (notification.data?.code === 3008 || notification.data?.code === 3001 || notification.data?.code === 3011) {\n return;\n }\n if (notification.data?.action === 'INIT') {\n return;\n }\n if (!subscribedNotifications.ERROR) return;\n ToastManager.addToast({\n title: `Error: ${notification.data?.message} - ${notification.data?.description}`,\n });\n break;\n case HMSNotificationTypes.ROLE_UPDATED: {\n if (notification.data?.isLocal) {\n ToastManager.addToast({\n title: `You are now a ${notification.data.roleName}`,\n });\n updateRoomLayoutForRole(notification.data.roleName);\n }\n break;\n }\n case HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST:\n const track = notification.data?.track;\n if (!notification.data.enabled) {\n ToastManager.addToast({\n title: `Your ${track.source} ${track.type} was muted by\n ${notification.data.requestedBy?.name}.`,\n });\n }\n break;\n case HMSNotificationTypes.REMOVED_FROM_ROOM:\n case HMSNotificationTypes.ROOM_ENDED:\n ToastManager.addToast({\n title: `${notification.message}. \n ${notification.data.reason && `Reason: ${notification.data.reason}`}`,\n });\n redirectToLeave(1000);\n break;\n case HMSNotificationTypes.DEVICE_CHANGE_UPDATE:\n ToastManager.addToast({\n title: notification.message,\n });\n break;\n default:\n break;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [notification, subscribedNotifications.ERROR, subscribedNotifications.METADATA_UPDATED]);\n\n if (isNotificationDisabled) {\n return null;\n }\n\n return (\n <>\n <TrackUnmuteModal />\n <TrackBulkUnmuteModal />\n <TrackNotifications />\n {roomState === HMSRoomState.Connected ? <PeerNotifications /> : null}\n <ReconnectNotifications />\n <AutoplayBlockedModal />\n <PermissionErrorModal />\n <InitErrorModal notification={notification} />\n </>\n );\n}\n", "import React from 'react';\nimport type { Layout } from '@100mslive/types-prebuilt';\nimport merge from 'lodash.merge';\n// @ts-ignore: fix types\nimport { useAuthToken } from '../../components/AppData/useUISettings';\nimport { useFetchRoomLayout, useFetchRoomLayoutResponse } from './hooks/useFetchRoomLayout';\n\nexport type RoomLayoutProviderProps = {\n roomLayoutEndpoint?: string;\n overrideLayout?: Partial<Layout>;\n};\n\nexport const RoomLayoutContext = React.createContext<\n | {\n layout: Layout | undefined;\n updateRoomLayoutForRole: useFetchRoomLayoutResponse['updateRoomLayoutForRole'] | undefined;\n }\n | undefined\n>(undefined);\n\nexport const RoomLayoutProvider: React.FC<React.PropsWithChildren<RoomLayoutProviderProps>> = ({\n children,\n roomLayoutEndpoint,\n overrideLayout,\n}) => {\n const authToken: string = useAuthToken();\n const { layout, updateRoomLayoutForRole } = useFetchRoomLayout({ authToken, endpoint: roomLayoutEndpoint });\n const mergedLayout = authToken && layout ? merge(layout, overrideLayout) : layout;\n return (\n <RoomLayoutContext.Provider value={{ layout: mergedLayout, updateRoomLayoutForRole }}>\n {children}\n </RoomLayoutContext.Provider>\n );\n};\n\nexport const useRoomLayout = () => React.useContext(RoomLayoutContext)?.layout;\nexport const useUpdateRoomLayout = () => React.useContext(RoomLayoutContext)?.updateRoomLayoutForRole;\n", "import { useCallback, useEffect, useRef, useState } from 'react';\nimport type { GetResponse, Layout } from '@100mslive/types-prebuilt';\nimport { defaultLayout } from '../constants';\n\n// TODO: remove this usage\nconst fetchWithRetry = async (url = '', options = {}) => {\n const MAX_RETRIES = 4;\n let error = Error('something went wrong');\n for (let i = 0; i < MAX_RETRIES; i++) {\n try {\n return await fetch(url, options);\n } catch (err) {\n error = err as Error;\n }\n }\n console.error('Fetch failed after max retries', { url, options });\n throw error;\n};\n\n// this should take endpoint and return\nexport type useFetchRoomLayoutProps = {\n endpoint?: string;\n authToken: string;\n};\n\nexport type useFetchRoomLayoutResponse = {\n layout: Layout | undefined;\n updateRoomLayoutForRole: (role: string) => void;\n};\n\nexport const useFetchRoomLayout = ({\n endpoint = '',\n authToken = '',\n}: useFetchRoomLayoutProps): useFetchRoomLayoutResponse => {\n const [layout, setLayout] = useState<Layout | undefined>(undefined);\n const layoutResp = useRef<GetResponse>();\n const isFetchInProgress = useRef(false);\n const updateRoomLayoutForRole = useCallback((role: string) => {\n if (!layoutResp.current) {\n return;\n }\n const [layout] = (layoutResp.current?.data || []).filter(layout => layout.role === role);\n if (layout) {\n setLayout(layout);\n }\n }, []);\n useEffect(() => {\n (async () => {\n if (isFetchInProgress.current || !authToken) {\n return;\n }\n isFetchInProgress.current = true;\n try {\n const resp = await fetchWithRetry(endpoint || 'https://api.100ms.live/v2/layouts/ui', {\n headers: {\n Authorization: `Bearer ${authToken}`,\n },\n });\n layoutResp.current = await resp.json();\n } catch (e) {\n console.error('[Room Layout API]: Failed to fetch / process room layout. Resorting to default layout.', e);\n layoutResp.current = {\n data: [defaultLayout],\n };\n }\n let layoutForRole = layoutResp.current?.data?.[0];\n if (!layoutForRole) {\n console.error(\n '[Room Layout API]: Unable to figure out room layout from API response. Resorting to default layout.',\n );\n layoutForRole = defaultLayout;\n }\n const layout = layoutForRole;\n setLayout(layout);\n isFetchInProgress.current = false;\n })();\n }, [authToken, endpoint]);\n\n return { layout, updateRoomLayoutForRole };\n};\n", "import type { Layout } from '@100mslive/types-prebuilt';\nimport { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';\n\nexport const defaultLayout: Layout = {\n id: '',\n role_id: '',\n template_id: '',\n app_id: '',\n typography: {\n font_family: 'Inter',\n },\n themes: [],\n options: {},\n screens: {\n preview: {\n default: {\n elements: {\n preview_header: {\n title: 'Get Started',\n sub_title: 'Setup your audio and video before joining',\n },\n join_form: {\n join_btn_type: JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_ONLY,\n join_btn_label: 'Join Now',\n go_live_btn_label: 'Go Live',\n },\n },\n },\n },\n conferencing: {\n default: {\n elements: {\n chat: {},\n participant_list: {},\n video_tile_layout: {\n grid: {\n enable_local_tile_inset: true,\n prominent_roles: [],\n enable_spotlighting_peer: true,\n },\n },\n emoji_reactions: {},\n },\n },\n },\n leave: {},\n },\n};\n", "import React, { useCallback } from 'react';\nimport { selectPeerByID, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport {\n ChatUnreadIcon,\n ConnectivityIcon,\n HandIcon,\n PeopleAddIcon,\n PeopleRemoveIcon,\n PoorConnectivityIcon,\n} from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\nconst ChatAction = React.forwardRef((_, ref) => {\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);\n\n if (isChatOpen) {\n return null;\n }\n\n return (\n <Button outlined as=\"div\" variant=\"standard\" css={{ w: 'max-content' }} onClick={toggleChat} ref={ref}>\n Open Chat\n </Button>\n );\n});\n\nconst HandRaiseAction = React.forwardRef(({ id = '', isSingleHandRaise = true }, ref) => {\n const hmsActions = useHMSActions();\n const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const peer = useHMSStore(selectPeerByID(id));\n const layout = useRoomLayout();\n const {\n bring_to_stage_label,\n on_stage_role,\n off_stage_roles = [],\n } = layout?.screens?.conferencing?.default?.elements.on_stage_exp || {};\n\n const onClickHandler = useCallback(() => {\n if (isSingleHandRaise) {\n hmsActions.changeRoleOfPeer(id, on_stage_role);\n } else {\n !isParticipantsOpen && toggleSidepane();\n }\n }, [hmsActions, id, isParticipantsOpen, isSingleHandRaise, on_stage_role, toggleSidepane]);\n\n // show nothing if handRaise is single and peer role is not hls\n if (isSingleHandRaise && (!peer || !off_stage_roles.includes(peer.roleName))) {\n return null;\n }\n return (\n <Button outlined as=\"div\" variant=\"standard\" css={{ w: 'max-content' }} onClick={onClickHandler} ref={ref}>\n {isSingleHandRaise ? bring_to_stage_label : 'View'}\n </Button>\n );\n});\nexport const ToastConfig = {\n PEER_LIST: {\n single: function (notification) {\n if (notification.data.length === 1) {\n return {\n title: `${notification.data[0]?.name} joined`,\n icon: <PeopleAddIcon />,\n };\n }\n return {\n title: `${notification.data[notification.data.length - 1]?.name} and ${\n notification.data.length - 1\n } others joined`,\n icon: <PeopleAddIcon />,\n };\n },\n multiple: notifications => {\n return {\n title: `${notifications[0].data.name} and ${notifications.length - 1} others joined`,\n icon: <PeopleAddIcon />,\n };\n },\n },\n PEER_JOINED: {\n single: function (notification) {\n return {\n title: `${notification.data?.name} joined`,\n icon: <PeopleAddIcon />,\n };\n },\n multiple: function (notifications) {\n return {\n title: `${notifications[notifications.length - 1].data.name} and ${notifications.length - 1} others joined`,\n icon: <PeopleAddIcon />,\n };\n },\n },\n PEER_LEFT: {\n single: function (notification) {\n return {\n title: `${notification.data?.name} left`,\n icon: <PeopleRemoveIcon />,\n };\n },\n multiple: function (notifications) {\n return {\n title: `${notifications[notifications.length - 1].data.name} and ${notifications.length - 1} others left`,\n icon: <PeopleRemoveIcon />,\n };\n },\n },\n RAISE_HAND: {\n single: notification => {\n return {\n title: `${notification.data?.name} raised hand`,\n icon: <HandIcon />,\n action: <HandRaiseAction id={notification.data?.id} />,\n };\n },\n multiple: notifications => {\n const count = new Set(notifications.map(notification => notification.data?.id)).size;\n return {\n title: `${notifications[notifications.length - 1].data?.name} ${\n count > 1 ? `${count} and others` : ''\n } raised hand`,\n icon: <HandIcon />,\n action: <HandRaiseAction isSingleHandRaise={false} />,\n };\n },\n },\n NEW_MESSAGE: {\n single: notification => {\n return {\n title: `New message from ${notification.data?.senderName}`,\n icon: <ChatUnreadIcon />,\n action: <ChatAction />,\n };\n },\n multiple: notifications => {\n return {\n title: `${notifications.length} new messages`,\n icon: <ChatUnreadIcon />,\n action: <ChatAction />,\n };\n },\n },\n RECONNECTED: {\n single: () => {\n return {\n title: `You are now connected`,\n icon: <ConnectivityIcon />,\n variant: 'success',\n duration: 3000,\n };\n },\n },\n RECONNECTING: {\n single: message => {\n return {\n title: `You are offline for now. while we try to reconnect, please check\n your internet connection. ${message}.\n `,\n icon: <PoorConnectivityIcon />,\n variant: 'warning',\n duration: 30000,\n };\n },\n },\n};\n", "import { v4 } from 'uuid';\n\nexport const ToastManager = {\n toasts: new Map(),\n listeners: new Map(),\n addToast(toast) {\n const id = toast.id ? toast.id : v4();\n this.toasts.set(id, { ...toast, id });\n this.onChange();\n return id;\n },\n\n clearAllToast() {\n this.toasts.clear();\n this.onChange();\n },\n\n removeToast(id) {\n this.toasts.delete(id);\n this.onChange();\n },\n replaceToast(id, toast) {\n if (this.isActive(id)) {\n this.toasts.set(id, { ...this.toasts.get(id), ...toast });\n this.onChange();\n return id;\n } else {\n return this.addToast(toast);\n }\n },\n addListener(cb) {\n this.listeners.set(cb, cb);\n },\n removeListener(cb) {\n this.listeners.delete(cb);\n },\n isActive(id) {\n return this.toasts.has(id);\n },\n onChange() {\n const toasts = Array.from(this.toasts.values());\n this.listeners.forEach(listener => listener(toasts));\n },\n};\n", "import { ToastConfig } from './ToastConfig';\nimport { ToastManager } from './ToastManager';\n\nexport const ToastBatcher = {\n toastsType: new Map(),\n showToastInternal({ notification, duration, type }) {\n let notificationType = type;\n if (!type) {\n notificationType = notification.type;\n }\n const toastType = this.toastsType.has(notificationType);\n if (toastType) {\n let { notifications } = this.toastsType.get(notificationType);\n const { id } = this.toastsType.get(notificationType);\n notifications.push(notification);\n const toastObject = ToastConfig[notificationType].multiple(notifications);\n const toastId = ToastManager.replaceToast(id, {\n ...toastObject,\n duration: duration,\n });\n this.toastsType.set(notificationType, {\n id: toastId,\n notifications: notifications,\n duration: duration,\n });\n } else {\n const toastObject = ToastConfig[notificationType].single(notification);\n const toastId = ToastManager.addToast({\n ...toastObject,\n duration: duration,\n });\n let notifications = [];\n notifications.push(notification);\n this.toastsType.set(notificationType, {\n id: toastId,\n notifications: [...notifications],\n duration: duration,\n });\n }\n },\n showToast({ notification, duration = 3000, type }) {\n try {\n this.showToastInternal({ notification, duration, type });\n } catch (err) {\n console.debug('Notifications', err);\n }\n },\n syncUItoast(toastsDisplaying) {\n for (const [toastType, toastInfo] of this.toastsType.entries()) {\n if (!toastsDisplaying.find(toast => toast.id === toastInfo.id)) {\n this.toastsType.delete(toastType);\n }\n }\n },\n};\n\nToastManager.addListener(ToastBatcher.syncUItoast.bind(ToastBatcher));\n", "import React from 'react';\nimport { useAutoplayError } from '@100mslive/react-sdk';\nimport { Button, Dialog, Text } from '../../../';\nimport { DialogContent, DialogRow } from '../../primitives/DialogContent';\n\nexport function AutoplayBlockedModal() {\n const { error, resetError, unblockAudio } = useAutoplayError();\n return (\n <Dialog.Root\n open={!!error}\n onOpenChange={value => {\n if (!value) {\n unblockAudio();\n }\n resetError();\n }}\n >\n <DialogContent title=\"Permission Error\" closeable={false}>\n <DialogRow>\n <Text variant=\"md\">\n The browser wants us to get a confirmation for playing the Audio. Please allow audio to proceed.\n </Text>\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button\n variant=\"primary\"\n onClick={() => {\n unblockAudio();\n resetError();\n }}\n >\n Allow Audio\n </Button>\n </DialogRow>\n </DialogContent>\n </Dialog.Root>\n );\n}\n", "import React, { useEffect, useState } from 'react';\nimport { Text } from '../../../';\nimport { ErrorDialog } from '../../primitives/DialogContent';\n\nexport const InitErrorModal = ({ notification }) => {\n const [showModal, setShowModal] = useState(false);\n const [info, setInfo] = useState({ title: 'Init Error', description: '' });\n\n useEffect(() => {\n const data = notification?.data;\n if (!data || data.action !== 'INIT') {\n return;\n }\n let description;\n let title;\n if (data.description.includes('role is invalid')) {\n description = 'This role does not exist for the given room. Try again with a valid role.';\n title = 'Invalid Role';\n } else if (data.description.includes('room is not active')) {\n title = 'Room is disabled';\n description =\n 'This room is disabled and cannot be joined. To enable the room, use the 100ms dashboard or the API.';\n } else {\n description = data.description;\n title = 'Init Error';\n }\n setInfo({ title, description });\n setShowModal(true);\n }, [notification]);\n\n return (\n <ErrorDialog open={showModal} onOpenChange={setShowModal} title={info.title}>\n <Text variant=\"sm\" css={{ wordBreak: 'break-word' }}>\n {info.description} <br />\n Current URL - {window.location.href}\n </Text>\n </ErrorDialog>\n );\n};\n", "import { useEffect } from 'react';\nimport { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';\nimport { ToastBatcher } from '../Toast/ToastBatcher';\nimport { useSubscribedNotifications } from '../AppData/useUISettings';\nimport { SUBSCRIBED_NOTIFICATIONS } from '../../common/constants';\n\nconst notificationTypes = [\n HMSNotificationTypes.PEER_LIST,\n HMSNotificationTypes.PEER_JOINED,\n HMSNotificationTypes.PEER_LEFT,\n];\n\nexport const PeerNotifications = () => {\n const notification = useHMSNotifications(notificationTypes);\n const isPeerJoinSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_JOINED);\n const isPeerLeftSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_LEFT);\n useEffect(() => {\n if (!notification?.data) {\n return;\n }\n\n console.debug(`[${notification.type}]`, notification);\n switch (notification.type) {\n case HMSNotificationTypes.PEER_LIST:\n if (!isPeerJoinSubscribed || notification.data.length === 0) {\n return;\n }\n break;\n case HMSNotificationTypes.PEER_JOINED:\n if (!isPeerJoinSubscribed) {\n return;\n }\n break;\n case HMSNotificationTypes.PEER_LEFT:\n if (!isPeerLeftSubscribed) {\n return;\n }\n break;\n default:\n return;\n }\n\n ToastBatcher.showToast({ notification });\n }, [notification, isPeerJoinSubscribed, isPeerLeftSubscribed]);\n\n return null;\n};\n", "import React, { useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';\nimport { Button, config as cssConfig, Dialog, Flex, Text } from '../../../';\nimport androidPermissionAlert from '../../images/android-perm-1.png';\nimport iosPermissions from '../../images/ios-perm-0.png';\nimport { isAndroid, isIOS } from '../../common/constants';\n\nexport function PermissionErrorModal() {\n const notification = useHMSNotifications(HMSNotificationTypes.ERROR);\n const [deviceType, setDeviceType] = useState('');\n const [isSystemError, setIsSystemError] = useState(false);\n const isMobile = useMedia(cssConfig.media.md);\n\n useEffect(() => {\n if (\n !notification ||\n (notification.data?.code !== 3001 && notification.data?.code !== 3011) ||\n (notification.data?.code === 3001 && notification.data?.message.includes('screen'))\n ) {\n return;\n }\n console.error(`[${notification.type}]`, notification);\n const errorMessage = notification.data?.message;\n const hasAudio = errorMessage.includes('audio');\n const hasVideo = errorMessage.includes('video');\n const hasScreen = errorMessage.includes('screen');\n if (hasAudio && hasVideo) {\n setDeviceType('camera and microphone');\n } else if (hasAudio) {\n setDeviceType('microphone');\n } else if (hasVideo) {\n setDeviceType('camera');\n } else if (hasScreen) {\n setDeviceType('screen');\n }\n setIsSystemError(notification.data.code === 3011);\n }, [notification]);\n\n return deviceType ? (\n <Dialog.Root open={!!deviceType}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(380px, 90%)', p: '$8' }}>\n <Dialog.Title\n css={{\n borderBottom: '1px solid $border_default',\n }}\n >\n {isMobile && isIOS ? (\n <img style={{ maxWidth: '100%', maxHeight: '100%' }} src={iosPermissions} alt=\"iOS Permission flow\" />\n ) : null}\n\n {/* Images for android */}\n {isMobile && isAndroid ? (\n <img\n src={androidPermissionAlert}\n style={{ maxWidth: '100%', maxHeight: '100%' }}\n alt=\"Android Permission flow \"\n />\n ) : null}\n\n <Text variant=\"h6\">We can't access your {deviceType}</Text>\n </Dialog.Title>\n\n <Text variant=\"sm\" css={{ pt: '$4', pb: '$10', color: '$on_surface_medium' }}>\n {/* IOS prompt text */}\n {isMobile && isIOS\n ? 'Enable permissions by reloading this page and clicking \"Allow\" on the pop-up, or change settings from the address bar.'\n : null}\n\n {/* Prompt for android devices */}\n {isMobile && isAndroid\n ? `To allow other users to see and hear you, click the blocked camera icon in your browser's address bar.`\n : null}\n\n {/* Prompt for desktops */}\n {!isMobile ? `Access to ${deviceType} is required. ` : null}\n\n {isSystemError && !isMobile\n ? `Enable permissions for ${deviceType}${deviceType === 'screen' ? 'share' : ''} from sytem settings`\n : null}\n {!isSystemError && !isMobile\n ? `Enable permissions for ${deviceType}${\n deviceType === 'screen' ? 'share' : ''\n } from address bar or browser settings.`\n : null}\n </Text>\n\n {/* CTA section */}\n {isMobile && isIOS ? (\n <>\n <Button onClick={() => window.location.reload()} css={{ w: '100%', mb: '$6' }}>\n Reload\n </Button>\n <Button outlined variant=\"standard\" onClick={() => setDeviceType('')} css={{ w: '100%' }}>\n Continue anyway\n </Button>\n </>\n ) : null}\n\n {isMobile && isAndroid ? (\n <>\n <Button onClick={() => setDeviceType('')} css={{ w: '100%', mb: '$6' }}>\n I've allowed access\n </Button>\n <Button outlined variant=\"standard\" onClick={() => setDeviceType('')} css={{ w: '100%' }}>\n Continue anyway\n </Button>\n </>\n ) : null}\n\n {!isMobile ? (\n <Flex justify=\"end\" css={{ w: '100%' }}>\n <Button outlined variant=\"standard\" onClick={() => setDeviceType('')}>\n Dismiss\n </Button>\n </Flex>\n ) : null}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n ) : null;\n}\n", "import React, { useEffect, useState } from 'react';\nimport { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';\nimport { Dialog, Flex, Loading, Text } from '../../../';\nimport { ToastConfig } from '../Toast/ToastConfig';\nimport { ToastManager } from '../Toast/ToastManager';\n\nconst notificationTypes = [\n HMSNotificationTypes.RECONNECTED,\n HMSNotificationTypes.RECONNECTING,\n HMSNotificationTypes.ERROR,\n];\nlet notificationId = null;\n\nexport const ReconnectNotifications = () => {\n const notification = useHMSNotifications(notificationTypes);\n const [open, setOpen] = useState(false);\n useEffect(() => {\n if (notification?.type === HMSNotificationTypes.ERROR && notification?.data?.isTerminal) {\n setOpen(false);\n } else if (notification?.type === HMSNotificationTypes.RECONNECTED) {\n notificationId = ToastManager.replaceToast(notificationId, ToastConfig.RECONNECTED.single());\n setOpen(false);\n } else if (notification?.type === HMSNotificationTypes.RECONNECTING) {\n notificationId = ToastManager.replaceToast(\n notificationId,\n ToastConfig.RECONNECTING.single(notification.data.message),\n );\n }\n }, [notification]);\n if (!open) return null;\n return (\n <Dialog.Root open={open} modal={true}>\n <Dialog.Portal container={document.getElementById('conferencing')}>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n width: 'fit-content',\n maxWidth: '80%',\n p: '$4 $8',\n position: 'relative',\n top: 'unset',\n bottom: '$9',\n transform: 'translate(-50%, -100%)',\n animation: 'none !important',\n }}\n >\n <Flex align=\"center\">\n <div style={{ display: 'inline', margin: '0.25rem' }}>\n <Loading size={16} />\n </div>\n <Text css={{ fontSize: '$space$8', color: '$on_surface_high' }}>\n You lost your network connection. Trying to reconnect.\n </Text>\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "import React, { useEffect, useState } from 'react';\nimport { HMSNotificationTypes, useHMSActions, useHMSNotifications } from '@100mslive/react-sdk';\nimport { MicOnIcon } from '@100mslive/react-icons';\nimport { RequestDialog } from '../../primitives/DialogContent';\n\nexport const TrackBulkUnmuteModal = () => {\n const hmsActions = useHMSActions();\n const [muteNotification, setMuteNotification] = useState(null);\n const notification = useHMSNotifications([\n HMSNotificationTypes.CHANGE_MULTI_TRACK_STATE_REQUEST,\n HMSNotificationTypes.ROOM_ENDED,\n HMSNotificationTypes.REMOVED_FROM_ROOM,\n ]);\n\n useEffect(() => {\n switch (notification?.type) {\n case HMSNotificationTypes.REMOVED_FROM_ROOM:\n case HMSNotificationTypes.ROOM_ENDED:\n setMuteNotification(null);\n break;\n case HMSNotificationTypes.CHANGE_MULTI_TRACK_STATE_REQUEST:\n if (notification?.data.enabled) {\n setMuteNotification(notification.data);\n }\n break;\n default:\n return;\n }\n }, [notification]);\n\n if (!muteNotification) {\n return null;\n }\n\n const { requestedBy: peer, tracks, enabled } = muteNotification;\n\n return (\n <RequestDialog\n title=\"Track Unmute Request\"\n body={`${peer?.name} has requested you to unmute your tracks.`}\n onOpenChange={value => !value && setMuteNotification(null)}\n onAction={() => {\n tracks.forEach(track => {\n hmsActions.setEnabledTrack(track.id, enabled);\n });\n setMuteNotification(null);\n }}\n Icon={MicOnIcon}\n />\n );\n};\n", "import { useEffect } from 'react';\nimport { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';\n\nconst notificationTypes = [\n HMSNotificationTypes.TRACK_ADDED,\n HMSNotificationTypes.TRACK_REMOVED,\n HMSNotificationTypes.TRACK_MUTED,\n HMSNotificationTypes.TRACK_UNMUTED,\n];\nexport const TrackNotifications = () => {\n const notification = useHMSNotifications(notificationTypes);\n useEffect(() => {\n if (notification) {\n console.debug(`[${notification.type}]`, notification);\n }\n }, [notification]);\n\n return null;\n};\n", "import React, { useEffect, useState } from 'react';\nimport { HMSNotificationTypes, useHMSActions, useHMSNotifications } from '@100mslive/react-sdk';\nimport { MicOnIcon } from '@100mslive/react-icons';\nimport { RequestDialog } from '../../primitives/DialogContent';\n\nexport const TrackUnmuteModal = () => {\n const hmsActions = useHMSActions();\n const notification = useHMSNotifications([\n HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST,\n HMSNotificationTypes.ROOM_ENDED,\n HMSNotificationTypes.REMOVED_FROM_ROOM,\n ]);\n const [muteNotification, setMuteNotification] = useState(null);\n\n useEffect(() => {\n switch (notification?.type) {\n case HMSNotificationTypes.REMOVED_FROM_ROOM:\n case HMSNotificationTypes.ROOM_ENDED:\n setMuteNotification(null);\n break;\n case HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST:\n if (notification?.data.enabled) {\n setMuteNotification(notification.data);\n }\n break;\n default:\n return;\n }\n }, [notification]);\n\n if (!muteNotification) {\n return null;\n }\n\n const { requestedBy: peer, track, enabled } = muteNotification;\n\n return (\n <RequestDialog\n title=\"Track Unmute Request\"\n onOpenChange={value => !value && setMuteNotification(null)}\n body={`${peer?.name} has requested you to unmute your ${track?.source} ${track?.type}.`}\n onAction={() => {\n hmsActions.setEnabledTrack(track.id, enabled);\n setMuteNotification(null);\n }}\n Icon={MicOnIcon}\n />\n );\n};\n", "import { useCallback } from 'react';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { useHMSPrebuiltContext } from '../../AppContext';\n// @ts-ignore: No implicit Any\nimport { PictureInPicture } from '../PIP/PIPManager';\n// @ts-ignore: No implicit Any\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useRoomLayoutLeaveScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n\nexport const useRedirectToLeave = () => {\n const { isLeaveScreenEnabled } = useRoomLayoutLeaveScreen();\n const { onLeave } = useHMSPrebuiltContext();\n const params = useParams();\n const navigate = useNavigate();\n\n const redirect = useCallback(\n (timeout = 0) => {\n setTimeout(() => {\n const prefix = isLeaveScreenEnabled ? '/leave/' : '/';\n if (params.role) {\n navigate(prefix + params.roomId + '/' + params.role);\n } else {\n navigate(prefix + params.roomId);\n }\n PictureInPicture.stop().catch(() => console.error('stopping pip'));\n ToastManager.clearAllToast();\n onLeave?.();\n }, timeout);\n },\n [isLeaveScreenEnabled, navigate, onLeave, params.role, params.roomId],\n );\n\n return { redirectToLeave: redirect };\n};\n", "import * as workerTimers from 'worker-timers';\nimport { drawVideoElementsOnCanvas, dummyChangeInCanvas, resetPIPCanvasColors } from './pipUtils';\nimport { isIOS, isMacOS, isSafari } from '../../common/constants';\nconst MAX_NUMBER_OF_TILES_IN_PIP = 4;\nconst DEFAULT_FPS = 30;\nconst DEFAULT_CANVAS_WIDTH = 480;\nconst DEFAULT_CANVAS_HEIGHT = 320;\nconst LEAVE_EVENT_NAME = 'leavepictureinpicture';\n\nconst PIPStates = {\n starting: 'starting',\n started: 'started',\n stopping: 'stopping',\n stopped: 'stopped',\n};\n\n/**\n * video elements are stitched together as a canvas which is converted to\n * another video element converted to PIP.\n * The task is split into two parts -\n * 1. a function which gets hit when the input changes and updates the tracks\n * to show\n * 2. an independent loop which updates the canvas periodically based on the current\n * tracks which should be shown.\n */\nclass PipManager {\n listeners = new Set();\n constructor() {\n this.reset();\n }\n\n listenToStateChange(cb) {\n this.listeners.add(cb);\n }\n\n /**\n * @private\n */\n reset() {\n console.debug('resetting PIP state');\n resetPIPCanvasColors();\n this.canvas = null; // where stitching will take place\n this.pipVideo = null; // the element which will be sent in PIP\n this.timeoutRef = null; // setTimeout reference so it can be cancelled\n this.hmsActions = null; // for attaching detaching\n this.videoElements = []; // for attaching tracks\n this.tracksToShow = [];\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n this.onStateChange = () => {}; // for user of this class to listen to changes\n this.state = PIPStates.stopped;\n }\n\n /**\n * check if PIP is supported in this browser env\n */\n isSupported() {\n return !!document.pictureInPictureEnabled && !isIOS && !(isMacOS && isSafari);\n }\n\n /**\n * check if pip is currently turned on\n */\n isOn() {\n return !!document.pictureInPictureElement;\n }\n\n /**\n * request browser to start pip and start the render loop updating the pip\n * video element with peer tracks.\n * @param hmsActions\n * @param onStateChangeFn {function(bool):void} callback called to notify change in pip state\n */\n async start(hmsActions, onStateChangeFn) {\n if (!this.isSupported()) {\n throw new Error('pip is not supported on this browser');\n }\n console.debug('starting PIP, current state', this.state);\n if (this.state === PIPStates.started) {\n await this.stop(); // if anything is already running\n } else if (this.state === PIPStates.starting) {\n return; // ignore double clicks\n }\n this.state = PIPStates.starting;\n try {\n await this.init(hmsActions, onStateChangeFn);\n // when user closes pip, call internal stop\n this.pipVideo.addEventListener(LEAVE_EVENT_NAME, this.stop);\n this.renderLoop();\n if (!this.isOn()) {\n await this.requestPIP();\n }\n console.debug('pip started');\n this.state = PIPStates.started;\n this.onStateChange(true);\n this.callListeners(true);\n } catch (err) {\n console.error('error in request pip', err);\n this.state = PIPStates.stopped;\n }\n }\n\n stop = async () => {\n if (this.state === PIPStates.stopped) {\n return;\n }\n this.state = PIPStates.stopping;\n this.pipVideo?.removeEventListener(LEAVE_EVENT_NAME, this.stop);\n if (this.timeoutRef) {\n workerTimers.clearTimeout(this.timeoutRef);\n this.timeoutRef = null;\n }\n if (this.isOn()) {\n this.exitPIP();\n }\n // detach all to avoid bandwidth consumption\n await this.detachOldAttachNewTracks(this.tracksToShow, []);\n this.onStateChange(false); // notify parent about this\n this.callListeners(false);\n this.reset(); // cleanup\n this.state = PIPStates.stopped;\n };\n\n /**\n * @param peers {Array} All Remote Peers present in call.\n * @param tracksMap {Object} map of track id to track\n * */\n async updatePeersAndTracks(peers, tracksMap) {\n if (!this.canvas) {\n return;\n }\n const newTracksToShowUnordered = this.pickTracksToShow(peers, tracksMap);\n const currentTracksShowing = this.tracksToShow;\n this.tracksToShow = this.orderNewTracksToShow(newTracksToShowUnordered, currentTracksShowing);\n try {\n await this.detachOldAttachNewTracks(currentTracksShowing, this.tracksToShow, tracksMap);\n } catch (error) {\n console.error('error in detaching/attaching tracks', error);\n }\n }\n\n // ------- Private function --------------\n /**\n * @private {boolean} on - whether pip is on/off\n */\n callListeners = on => {\n this.listeners.forEach(listener => listener?.(on));\n };\n\n /**\n * @private\n */\n async init(hmsActions, onStateChangeFn) {\n await this.initMediaElements();\n this.hmsActions = hmsActions;\n this.onStateChange = onStateChangeFn;\n }\n\n async initMediaElements() {\n if (!this.canvas) {\n const { canvas, pipVideo } = this.initializeCanvasAndVideoElement();\n this.canvas = canvas; // where stitching will take place\n this.pipVideo = pipVideo; // the element which will be sent in PIP\n this.videoElements = this.initializeVideoElements(); // for attaching tracks\n const videoPlayPromise = this.pipVideo.play();\n dummyChangeInCanvas(this.canvas);\n await videoPlayPromise;\n }\n }\n\n initializeCanvasAndVideoElement() {\n const canvas = document.createElement('canvas');\n canvas.width = DEFAULT_CANVAS_WIDTH;\n canvas.height = DEFAULT_CANVAS_HEIGHT;\n const pipVideo = document.createElement('video');\n pipVideo.width = DEFAULT_CANVAS_WIDTH;\n pipVideo.height = DEFAULT_CANVAS_HEIGHT;\n pipVideo.muted = true;\n pipVideo.srcObject = canvas.captureStream();\n return { canvas, pipVideo };\n }\n\n initializeVideoElements() {\n let videoElements = [];\n for (let i = 0; i < MAX_NUMBER_OF_TILES_IN_PIP; i++) {\n const videoElement = document.createElement('video');\n videoElement.autoplay = true;\n videoElement.playsinline = true;\n videoElements.push(videoElement);\n }\n return videoElements;\n }\n\n /**\n * render loop is responsible for rendering the video elements on canvas/pip.\n * in each loop current video elements are stitched and painted on canvas\n */\n renderLoop() {\n const delay = 1000 / DEFAULT_FPS;\n this.timeoutRef = workerTimers.setTimeout(() => {\n if (this.state === PIPStates.stopping || this.state === PIPStates.stopped) {\n return;\n }\n if (this.state === PIPStates.started) {\n drawVideoElementsOnCanvas(this.videoElements, this.canvas);\n }\n this.renderLoop();\n }, delay);\n }\n\n async requestPIP() {\n try {\n if (this.isOn()) {\n this.exitPIP(); // is this really needed?\n }\n await this.pipVideo.requestPictureInPicture();\n } catch (error) {\n console.error('error in requestpip', error, 'state', this.state);\n throw error;\n }\n }\n\n exitPIP() {\n document.exitPictureInPicture();\n }\n\n /**\n * Logic - pick only enabled video tracks\n * @param peers {Array<any>}\n * @param tracksMap {Record<string, any>}\n */\n pickTracksToShow(peers, tracksMap) {\n const tracksToShow = [];\n for (const peer of peers) {\n if (tracksToShow.length === MAX_NUMBER_OF_TILES_IN_PIP) {\n break;\n } else if (peer.videoTrack && tracksMap[peer.videoTrack]?.enabled) {\n tracksToShow.push(peer.videoTrack);\n }\n }\n return tracksToShow;\n }\n\n /**\n * there has to be a smart reordering of new tracks based on currently showing\n * ones to reduce unnecessary displacement. If someone was showing up both\n * earlier and now, it's a better UX to keep their position same instead\n * of letting it change.\n * The returned array is a shuffled version of newTracks with position of\n * tracks present in the old tracks intact.\n * eg. old = [1,5,9,3], new = [3,8,2,9], result = [8,2,9,3]\n * @param oldTracks {Array}\n * @param newTracks {Array}\n * @return {Array}\n */\n orderNewTracksToShow(newTracks, oldTracks) {\n const betterNewTracks = [];\n const leftOvers = [];\n // put the common ones in right position\n newTracks.forEach(track => {\n const oldPosition = oldTracks.indexOf(track);\n if (oldPosition !== -1 && oldPosition < newTracks.length) {\n // if track is there currently and we can put it on the same position\n betterNewTracks[oldPosition] = track;\n } else {\n leftOvers.push(track);\n }\n });\n // put the left overs in remaining empty positions\n for (let i = 0; i < newTracks.length; i++) {\n if (!betterNewTracks[i]) {\n betterNewTracks[i] = leftOvers.shift();\n }\n }\n return betterNewTracks;\n }\n\n /**\n * call detach for tracks which no longer need to be shown and attach for\n * new ones which are to be shown now.\n * Note: oldTracks and newTracks are not necessarily of same length\n * @param oldTracks {Array<String>}\n * @param newTracks {Array<String>}\n * @param tracksMap {Record<String, any>}\n */\n // eslint-disable-next-line complexity\n async detachOldAttachNewTracks(oldTracks, newTracks, tracksMap = null) {\n const numTracks = Math.max(oldTracks.length, newTracks.length);\n for (let i = 0; i < numTracks; i++) {\n if (oldTracks[i] === newTracks[i]) {\n continue; // it would already have been attached previously\n } else if (oldTracks[i]) {\n // old track is there but not equal to new track, detach\n // no need to call detach if we know for sure track is no longer in store\n if (!tracksMap || tracksMap[oldTracks[i]]) {\n await this.hmsActions.detachVideo(oldTracks[i], this.videoElements[i]);\n }\n if (this.videoElements[i]) {\n // even if old track got removed from the room, element needs to be cleaned up\n this.videoElements[i].srcObject = null;\n }\n }\n if (newTracks[i]) {\n await this.hmsActions.attachVideo(newTracks[i], this.videoElements[i]);\n }\n }\n }\n}\n\nexport const PictureInPicture = new PipManager();\n// PictureInPicture.initMediaElements().catch(console.error); // for safari, init early\n", "let CANVAS_FILL_COLOR;\nlet CANVAS_STROKE_COLOR;\n\nfunction setPIPCanvasColors() {\n if (!CANVAS_FILL_COLOR) {\n CANVAS_FILL_COLOR = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue('--hms-ui-colors-surface_bright');\n }\n if (!CANVAS_STROKE_COLOR) {\n CANVAS_STROKE_COLOR = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue('--hms-ui-colors-border_bright');\n }\n}\n\nexport function resetPIPCanvasColors() {\n CANVAS_FILL_COLOR = '';\n CANVAS_STROKE_COLOR = '';\n}\n/**\n * no tile - blank canvas, black image\n * 1 tile - takes full space on canvas\n * 2 tile - stack two video adjacent to each other\n * 3 tile - two rows first row has two tile second row has one tile centered.\n * 4 tiles - two rows two columns - all equal size\n * All videos will respect their aspect ratios.\n */\nexport function drawVideoElementsOnCanvas(videoElements, canvas) {\n let videoTiles = videoElements.filter(videoElement => videoElement.srcObject !== null);\n\n const ctx = canvas.getContext('2d');\n setPIPCanvasColors();\n ctx.fillStyle = CANVAS_FILL_COLOR;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n if (videoTiles.length === 0) {\n // no tile to render, render black image\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n return;\n }\n\n fillGridTiles(videoTiles.slice(0, 4), ctx, canvas);\n}\n\n// this is to send some data for stream and resolve video element's play for a\n// video element rendering this canvas' capture stream\nexport function dummyChangeInCanvas(canvas) {\n const ctx = canvas.getContext('2d');\n setPIPCanvasColors();\n ctx.fillStyle = CANVAS_FILL_COLOR;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n}\n\n/**\n * Imagine the canvas as a grid with passed in number of rows and columns. Go\n * over the tiles in the grid in order while drawing the videoElements upon them.\n */\nfunction fillGridTiles(videoElements, ctx, canvas) {\n const offset = 8;\n canvas.width = 480;\n canvas.height = 320;\n\n ctx.fillStyle = CANVAS_FILL_COLOR;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n // Show borders only when there is atleast one video\n if (videoElements.length > 0) {\n ctx.strokeStyle = CANVAS_STROKE_COLOR;\n ctx.lineWidth = offset / 2;\n ctx.strokeRect(0, 0, canvas.width, canvas.height);\n }\n\n if (videoElements.length === 1) {\n const video = videoElements[0];\n const { width, height } = getRenderDimensions(video, canvas.width - offset, canvas.height - offset);\n /**\n * The x and y offset are to center the video tile horizontally and vertically\n * width and height are the aspect ratio constrained video tile dimensions\n */\n const xOffset = (canvas.width - width) / 2;\n const yOffset = (canvas.height - height) / 2;\n ctx.drawImage(video, xOffset, yOffset, width, height);\n }\n\n if (videoElements.length === 2) {\n videoElements.forEach((video, index) => {\n const { width, height } = getRenderDimensions(\n video,\n canvas.width / 2 - offset, // This will be the max available width for each tile\n canvas.height - offset,\n );\n /**\n * (canvas.width / 2 - width) / 2 This is to center width wise within in the box\n * (canvas.width / 2) * index This is the start offset\n * for 1st element it is 0, for second it will be canvas.width/2 which starts from the center\n */\n const xOffset = (canvas.width / 2 - width) / 2 + (canvas.width / 2) * index;\n /**\n * (canvas.height - height) / 2 This is to center height wise\n */\n const yOffset = (canvas.height - height) / 2;\n\n ctx.drawImage(video, xOffset, yOffset, width, height);\n });\n /**\n * Draw a border between tiles\n */\n const path = new Path2D();\n path.moveTo(canvas.width / 2, 0);\n path.lineTo(canvas.width / 2, canvas.height);\n ctx.stroke(path);\n }\n\n if (videoElements.length === 3) {\n videoElements.forEach((video, index) => {\n const { width, height } = getRenderDimensions(video, canvas.width / 2 - offset, canvas.height / 2 - offset);\n /**\n * for first two tiles, xOffset is similar to the 2 tiles calculation with only difference being the height. it is half now.\n */\n const xOffset =\n index < 2 ? (canvas.width / 2 - width) / 2 + (canvas.width / 2) * index : canvas.width / 2 - width / 2;\n const yOffset = (index < 2 ? 0 : canvas.height / 2) + (canvas.height / 2 - height) / 2;\n\n ctx.drawImage(video, xOffset, yOffset, width, height);\n });\n /**\n * Draw borders between tiles\n */\n const path = new Path2D();\n path.moveTo(canvas.width / 2, 0);\n path.lineTo(canvas.width / 2, canvas.height / 2);\n ctx.stroke(path);\n path.moveTo(0, canvas.height / 2);\n path.lineTo(canvas.width, canvas.height / 2);\n ctx.stroke(path);\n }\n if (videoElements.length === 4) {\n videoElements.forEach((video, index) => {\n const { width, height } = getRenderDimensions(video, canvas.width / 2 - offset, canvas.height / 2 - offset);\n /**\n * Similar to two tiles repeat after 2 tiles\n * (canvas.width / 2 - width) / 2 is to center horizontally\n */\n const xOffset = (canvas.width / 2 - width) / 2 + (canvas.width / 2) * (index % 2);\n /**\n * Similar to two tiles with the yOffset being height/2 for the 3rd and 4th tiles\n * (canvas.height / 2 - height) / 2 is to center vertically\n */\n const yOffset = (index < 2 ? 0 : canvas.height / 2) + (canvas.height / 2 - height) / 2;\n\n ctx.drawImage(video, xOffset, yOffset, width, height);\n });\n /**\n * Draw borders between tiles\n */\n const path = new Path2D();\n path.moveTo(canvas.width / 2, 0);\n path.lineTo(canvas.width / 2, canvas.height);\n ctx.stroke(path);\n path.moveTo(0, canvas.height / 2);\n path.lineTo(canvas.width, canvas.height / 2);\n ctx.stroke(path);\n }\n}\n\n/**\n * Restrict the dimensions within the available dimension with aspect ratio\n * constraint applied\n * @param {HTMLVideoElement} video\n * @param {number} width\n * @param {number} height\n * @returns { width: number, height: number }\n */\nfunction getRenderDimensions(video, width, height) {\n let finalWidth = (video.videoWidth / video.videoHeight) * height;\n let finalHeight = height;\n\n if (finalWidth > width) {\n finalWidth = width;\n finalHeight = (video.videoHeight / video.videoWidth) * width;\n }\n return { width: finalWidth, height: finalHeight };\n}\n", "import {\n ConferencingScreen,\n DefaultPreviewScreen_Elements,\n LeaveScreen,\n PreviewScreen,\n Screens,\n} from '@100mslive/types-prebuilt';\nimport { useRoomLayout } from '..';\n\nexport type useRoomLayoutScreenProps = {\n screen: keyof Screens;\n};\n\ntype useRoomLayoutScreenReturnType<T extends useRoomLayoutScreenProps> = T['screen'] extends 'conferencing'\n ? ConferencingScreen\n : T['screen'] extends 'leave'\n ? LeaveScreen\n : T['screen'] extends 'preview'\n ? PreviewScreen\n : undefined;\n\nfunction useRoomLayoutScreen<T extends useRoomLayoutScreenProps>({\n screen,\n}: T): useRoomLayoutScreenReturnType<T> | undefined {\n const roomLayout = useRoomLayout();\n const screenProps = roomLayout?.screens?.[screen] as useRoomLayoutScreenReturnType<T> | undefined;\n return screenProps;\n}\n\nexport function useRoomLayoutPreviewScreen() {\n const screenProps = useRoomLayoutScreen({ screen: 'preview' });\n const isPreviewScreenEnabled = !!screenProps;\n let elements: DefaultPreviewScreen_Elements | undefined;\n let screenType: keyof PreviewScreen | undefined;\n if (isPreviewScreenEnabled) {\n screenType = Object.keys(screenProps)[0] as keyof PreviewScreen;\n elements = screenProps[screenType]?.elements;\n }\n return {\n isPreviewScreenEnabled,\n elements,\n screenType,\n };\n}\n\nexport function useRoomLayoutConferencingScreen() {\n const screenProps = useRoomLayoutScreen({ screen: 'conferencing' }) || {};\n const screenType = Object.keys(screenProps)[0] as keyof ConferencingScreen;\n const elements = screenProps[screenType]?.elements;\n // @ts-ignore\n const hideSections: string[] = screenProps[screenType]?.hideSections || [];\n return {\n hideSections,\n elements,\n screenType,\n };\n}\n\nexport function useRoomLayoutLeaveScreen() {\n const screenProps = useRoomLayoutScreen({ screen: 'leave' });\n const isLeaveScreenEnabled = !!screenProps;\n return {\n isLeaveScreenEnabled,\n };\n}\n", "// eslint-disable-next-line complexity\nexport function shadeColor(color, percent) {\n let R = parseInt(color.substring(1, 3), 16);\n let G = parseInt(color.substring(3, 5), 16);\n let B = parseInt(color.substring(5, 7), 16);\n\n R = Math.floor((R * (100 + percent)) / 100);\n G = Math.floor((G * (100 + percent)) / 100);\n B = Math.floor((B * (100 + percent)) / 100);\n\n R = R < 255 ? R : 255;\n G = G < 255 ? G : 255;\n B = B < 255 ? B : 255;\n\n const RR = R.toString(16).length === 1 ? `0${R.toString(16)}` : R.toString(16);\n const GG = G.toString(16).length === 1 ? `0${G.toString(16)}` : G.toString(16);\n const BB = B.toString(16).length === 1 ? `0${B.toString(16)}` : B.toString(16);\n\n return `#${RR}${GG}${BB}`;\n}\n\n/**\n * TODO: this is currently an O(N**2) function, don't use with peer lists, it's currently\n * being used to find intersection between list of role names where the complexity shouldn't matter much.\n */\nexport const arrayIntersection = (a, b) => {\n if (a === undefined || b === undefined) {\n return [];\n }\n // ensure \"a\" is the bigger array\n if (b.length > a.length) {\n let t = b;\n b = a;\n a = t;\n }\n return a.filter(function (e) {\n return b.indexOf(e) > -1;\n });\n};\n\nexport const getMetadata = metadataString => {\n try {\n return !metadataString ? {} : JSON.parse(metadataString);\n } catch (error) {\n return {};\n }\n};\n\nexport const metadataProps = function (peer) {\n return {\n isHandRaised: getMetadata(peer.metadata)?.isHandRaised,\n };\n};\n\nexport const isScreenshareSupported = () => {\n return typeof navigator.mediaDevices.getDisplayMedia !== 'undefined';\n};\n\nexport const metadataPayloadParser = payload => {\n try {\n const data = window.atob(payload);\n const parsedData = JSON.parse(data);\n return parsedData;\n } catch (e) {\n return { payload };\n }\n};\n\n// For bottom action sheet, returns updated height based on drag\nexport const getUpdatedHeight = (e, MINIMUM_HEIGHT) => {\n const heightToPercentage = 100 - ((e?.touches?.[0] || e).pageY / window.innerHeight) * 100;\n // Snap to top if height > 80%, should be at least 40vh\n const sheetHeightInVH = Math.max(MINIMUM_HEIGHT, heightToPercentage > 80 ? 100 : heightToPercentage);\n return `${sheetHeightInVH}vh`;\n};\n\nexport const getFormattedCount = num => {\n const formatter = new Intl.NumberFormat('en', { notation: 'compact', maximumFractionDigits: 2 });\n const formattedNum = formatter.format(num);\n return formattedNum;\n};\n\nexport const formatTime = timeInSeconds => {\n timeInSeconds = Math.floor(timeInSeconds / 1000);\n const hours = Math.floor(timeInSeconds / 3600);\n const minutes = Math.floor((timeInSeconds % 3600) / 60);\n const seconds = timeInSeconds % 60;\n const hour = hours !== 0 ? `${hours < 10 ? '0' : ''}${hours}:` : '';\n return `${hour}${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;\n};\n", "import React from 'react';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { ExitIcon } from '@100mslive/react-icons';\nimport { ToastManager } from './Toast/ToastManager';\nimport { Button } from '../../Button';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { useHMSPrebuiltContext } from '../AppContext';\nimport { Header } from './Header';\nimport { useRoomLayoutPreviewScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { defaultPreviewPreference, UserPreferencesKeys, useUserPreferences } from './hooks/useUserPreferences';\nimport { textEllipsis } from '../../utils';\n\nconst PostLeave = () => {\n const navigate = useNavigate();\n const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();\n const { roomCode } = useHMSPrebuiltContext();\n const { roomId, role } = useParams();\n const [previewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW, defaultPreviewPreference);\n return (\n <Flex direction=\"column\" css={{ size: '100%' }}>\n <Box css={{ h: '$18', '@md': { h: '$17' } }} data-testid=\"header\">\n <Header />\n </Box>\n <Flex\n justify=\"center\"\n direction=\"column\"\n align=\"center\"\n css={{ bg: '$background_dim', flex: '1 1 0', position: 'relative' }}\n >\n <Text variant=\"h2\" css={{ fontWeight: '$semiBold' }}>\n \uD83D\uDC4B\n </Text>\n <Text variant=\"h4\" css={{ color: '$on_surface_high', fontWeight: '$semiBold', mt: '$12' }}>\n You left the room\n </Text>\n <Text\n variant=\"body1\"\n css={{\n color: '$on_surface_medium',\n mt: '$8',\n fontWeight: '$regular',\n textAlign: 'center',\n }}\n >\n Have a nice day\n {previewPreference.name && (\n <Box as=\"span\" css={{ ...textEllipsis(100) }}>\n , {previewPreference.name}\n </Box>\n )}\n !\n </Text>\n <Flex css={{ mt: '$14', gap: '$10', alignItems: 'center' }}>\n <Text variant=\"body1\" css={{ color: '$on_surface_medium', fontWeight: '$regular' }}>\n Left by mistake?\n </Text>\n <Button\n onClick={() => {\n let redirectUrl = `${isPreviewScreenEnabled ? '/preview/' : '/meeting/'}${roomCode || roomId}`;\n if (role && roomId) redirectUrl += '/' + role;\n navigate(redirectUrl);\n ToastManager.clearAllToast();\n }}\n data-testid=\"join_again_btn\"\n >\n <ExitIcon />\n <Text css={{ ml: '$3', fontWeight: '$semiBold', color: 'inherit' }}>Rejoin</Text>\n </Button>\n </Flex>\n </Flex>\n </Flex>\n );\n};\n\nexport default PostLeave;\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { HMSRoomState, selectRoomState, useHMSStore } from '@100mslive/react-sdk';\nimport { config as cssConfig, Flex } from '../../..';\n// @ts-ignore: No implicit any\nimport { Logo, SpeakerTag } from './HeaderComponents';\n// @ts-ignore: No implicit any\nimport { LiveStatus, RecordingStatus, StreamActions } from './StreamActions';\n// @ts-ignore: No implicit any\nimport { AudioOutputActions, CamaraFlipActions } from './common';\n\nexport const Header = () => {\n const roomState = useHMSStore(selectRoomState);\n const isMobile = useMedia(cssConfig.media.md);\n // Header should be present only inside the call - not in preview, leave room states\n if (roomState !== HMSRoomState.Connected) {\n return <></>;\n }\n return (\n <Flex justify=\"between\" align=\"center\" css={{ position: 'relative', height: '100%' }}>\n <Flex align=\"center\" gap=\"2\" css={{ position: 'absolute', left: '$10' }}>\n <Logo />\n <SpeakerTag />\n {isMobile && (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <LiveStatus />\n <RecordingStatus />\n </Flex>\n )}\n </Flex>\n <Flex\n align=\"center\"\n css={{\n position: 'absolute',\n right: '$10',\n gap: '$4',\n }}\n >\n <StreamActions />\n {isMobile ? (\n <>\n <CamaraFlipActions />\n <AudioOutputActions />\n </>\n ) : null}\n </Flex>\n </Flex>\n );\n};\n", "import React, { useEffect, useState } from 'react';\nimport { selectDominantSpeaker, useHMSStore } from '@100mslive/react-sdk';\nimport { VolumeOneIcon } from '@100mslive/react-icons';\nimport { Flex, styled, Text, textEllipsis, VerticalDivider } from '../../../';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\n\nexport const SpeakerTag = () => {\n const dominantSpeaker = useHMSStore(selectDominantSpeaker);\n return (\n dominantSpeaker &&\n dominantSpeaker.name && (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ flex: '1 1 0', color: '$on_primary_high', '@md': { display: 'none' } }}\n >\n <VerticalDivider css={{ ml: '$8' }} />\n <VolumeOneIcon />\n <Text variant=\"md\" css={{ ...textEllipsis(200), ml: '$2' }} title={dominantSpeaker.name}>\n {dominantSpeaker.name}\n </Text>\n </Flex>\n )\n );\n};\n\nconst LogoImg = styled('img', {\n maxHeight: '$14',\n w: 'auto',\n objectFit: 'contain',\n '@md': {\n maxHeight: '$12',\n },\n});\n\nexport const Logo = () => {\n const roomLayout = useRoomLayout();\n const logo = roomLayout?.logo?.url;\n const [hideImage, setHideImage] = useState(false);\n // Hide logo for now as there is not enough space\n useEffect(() => {\n if (hideImage) {\n setHideImage(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [logo]);\n\n return logo && !hideImage ? (\n <LogoImg\n src={logo}\n alt=\"Brand Logo\"\n onError={e => {\n e.target.onerror = null;\n setHideImage(true);\n }}\n />\n ) : null;\n};\n", "import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n HMSRoomState,\n selectHLSState,\n selectIsConnectedToRoom,\n selectPermissions,\n selectRoomState,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport { AlertTriangleIcon, CrossIcon, RecordIcon } from '@100mslive/react-icons';\nimport { Box, Button, config as cssConfig, Flex, HorizontalDivider, Loading, Popover, Text, Tooltip } from '../../..';\nimport { Sheet } from '../../../Sheet';\n// @ts-ignore\nimport { ToastManager } from '../Toast/ToastManager';\n// @ts-ignore\nimport { AdditionalRoomState, getRecordingText } from './AdditionalRoomState';\n// @ts-ignore\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\n// @ts-ignore\nimport { formatTime } from '../../common/utils';\n// @ts-ignore\nimport { APP_DATA } from '../../common/constants';\n\nexport const LiveStatus = () => {\n const { isHLSRunning, isRTMPRunning } = useRecordingStreaming();\n const hlsState = useHMSStore(selectHLSState);\n const isMobile = useMedia(cssConfig.media.md);\n const intervalRef = useRef<NodeJS.Timeout | null>(null);\n\n const [liveTime, setLiveTime] = useState(0);\n\n const startTimer = useCallback(() => {\n intervalRef.current = setInterval(() => {\n if (hlsState?.running && hlsState?.variants[0]?.startedAt) {\n setLiveTime(Date.now() - hlsState.variants[0].startedAt.getTime());\n }\n }, 1000);\n }, [hlsState?.running, hlsState?.variants]);\n\n useEffect(() => {\n if (hlsState?.running) {\n startTimer();\n }\n if (!hlsState?.running && intervalRef.current) {\n clearInterval(intervalRef.current);\n }\n return () => {\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n }\n };\n }, [hlsState.running, isMobile, startTimer]);\n\n if (!isHLSRunning && !isRTMPRunning) {\n return null;\n }\n return (\n <Flex\n align=\"center\"\n gap=\"1\"\n css={{\n border: '1px solid $border_default',\n padding: '$4 $6 $4 $6',\n borderRadius: '$1',\n }}\n >\n <Box css={{ w: '$4', h: '$4', r: '$round', bg: '$alert_error_default', mr: '$2' }} />\n <Flex align=\"center\" gap=\"2\">\n <Text variant={!isMobile ? 'button' : 'body2'}>LIVE</Text>\n <Text variant=\"caption\">{hlsState?.variants?.length > 0 ? formatTime(liveTime) : ''}</Text>\n </Flex>\n </Flex>\n );\n};\n\nexport const RecordingStatus = () => {\n const { isBrowserRecordingOn, isServerRecordingOn, isHLSRecordingOn, isRecordingOn } = useRecordingStreaming();\n const permissions = useHMSStore(selectPermissions);\n const isMobile = useMedia(cssConfig.media.md);\n\n if (\n !isRecordingOn ||\n // if only browser recording is enabled, stop recording is shown\n // so no need to show this as it duplicates\n [permissions?.browserRecording, !isServerRecordingOn, !isHLSRecordingOn, isBrowserRecordingOn].every(\n value => !!value,\n )\n ) {\n // show recording icon in mobile without popover\n if (!(isMobile && isRecordingOn)) return null;\n }\n\n return (\n <Tooltip\n boxCss={{ zIndex: 1 }}\n title={getRecordingText({\n isBrowserRecordingOn,\n isServerRecordingOn,\n isHLSRecordingOn,\n })}\n >\n <Flex\n css={{\n color: '$alert_error_default',\n alignItems: 'center',\n }}\n >\n <RecordIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n );\n};\n\nconst StartRecording = () => {\n const permissions = useHMSStore(selectPermissions);\n const [open, setOpen] = useState(false);\n const [recordingStarted, setRecordingState] = useSetAppDataByKey(APP_DATA.recordingStarted);\n const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();\n const hmsActions = useHMSActions();\n if (!permissions?.browserRecording || isHLSRunning) {\n return null;\n }\n if (isBrowserRecordingOn) {\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild>\n <Button variant=\"danger\" data-testid=\"stop_recording\" icon outlined onClick={() => setOpen(true)}>\n <RecordIcon />\n <Text as=\"span\" css={{ '@md': { display: 'none' }, color: 'currentColor' }}>\n Stop Recording\n </Text>\n </Button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content align=\"end\" sideOffset={8} css={{ w: '$64' }}>\n <Text variant=\"body1\" css={{ color: '$on_surface_medium' }}>\n Are you sure you want to end the recording?\n </Text>\n <Button\n data-testid=\"stop_recording_confirm\"\n variant=\"danger\"\n icon\n css={{ ml: 'auto' }}\n onClick={async () => {\n try {\n await hmsActions.stopRTMPAndRecording();\n } catch (error) {\n const err = error as Error;\n ToastManager.addToast({\n title: err.message,\n variant: 'error',\n });\n }\n setOpen(false);\n }}\n >\n Stop\n </Button>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n }\n return (\n <Button\n data-testid=\"start_recording\"\n variant=\"standard\"\n icon\n disabled={recordingStarted || isStreamingOn}\n onClick={async () => {\n try {\n setRecordingState(true);\n await hmsActions.startRTMPOrRecording({\n record: true,\n });\n } catch (error) {\n const err = error as Error;\n if (err.message.includes('stream already running')) {\n ToastManager.addToast({\n title: 'Recording already running',\n variant: 'error',\n });\n } else {\n ToastManager.addToast({\n title: err.message,\n variant: 'error',\n });\n }\n setRecordingState(false);\n }\n }}\n >\n {recordingStarted ? <Loading size={24} color=\"currentColor\" /> : <RecordIcon />}\n <Text as=\"span\" css={{ '@md': { display: 'none' }, color: 'currentColor' }}>\n {recordingStarted ? 'Starting' : 'Start'} Recording\n </Text>\n </Button>\n );\n};\n\n/**\n * @description only start recording button will be shown.\n */\nexport const StreamActions = () => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const isMobile = useMedia(cssConfig.media.md);\n const roomState = useHMSStore(selectRoomState);\n\n return (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <AdditionalRoomState />\n {!isMobile && (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <RecordingStatus />\n {roomState !== HMSRoomState.Preview ? <LiveStatus /> : null}\n </Flex>\n )}\n {isConnected && !isMobile ? <StartRecording /> : null}\n </Flex>\n );\n};\n\nexport const StopRecordingInSheet = ({\n onStopRecording,\n onClose,\n}: {\n onStopRecording: () => void;\n onClose: () => void;\n}) => {\n return (\n <Sheet.Root open={true}>\n <Sheet.Content>\n <Sheet.Title css={{ p: '$10' }}>\n <Flex direction=\"row\" justify=\"between\" css={{ w: '100%', c: '$alert_error_default' }}>\n <Flex justify=\"start\" align=\"center\" gap=\"3\">\n <AlertTriangleIcon />\n <Text variant=\"h5\" css={{ c: '$alert_error_default' }}>\n Stop Recording\n </Text>\n </Flex>\n <Sheet.Close css={{ color: 'white' }} onClick={onClose}>\n <CrossIcon />\n </Sheet.Close>\n </Flex>\n </Sheet.Title>\n <HorizontalDivider />\n <Box as=\"div\" css={{ p: '$10', overflowY: 'scroll', maxHeight: '70vh' }}>\n <Text variant=\"caption\" css={{ c: '$on_surface_medium', pb: '$8' }}>\n Are you sure you want to stop recording? You can\u2019t undo this action.\n </Text>\n <Button\n variant=\"danger\"\n css={{ width: '100%' }}\n type=\"submit\"\n data-testid=\"popup_change_btn\"\n onClick={onStopRecording}\n >\n Stop\n </Button>\n </Box>\n </Sheet.Content>\n </Sheet.Root>\n );\n};\n", "import React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { CSS, VariantProps } from '@stitches/react';\nimport { Dialog } from '../Modal';\nimport { styled } from '../Theme';\nimport { sheetFadeIn, sheetFadeOut, sheetSlideIn, sheetSlideOut } from '../utils';\n\nconst SheetRoot = styled(DialogPrimitive.Root, {\n minHeight: '240px',\n maxWidth: '100%',\n});\nconst SheetTrigger = styled(DialogPrimitive.Trigger, {\n appearance: 'none !important', // Needed for safari it shows white overlay\n});\n\nconst StyledOverlay = styled(Dialog.Overlay, {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n\n '&[data-state=\"open\"]': {\n animation: `${sheetFadeIn} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n '&[data-state=\"closed\"]': {\n animation: `${sheetFadeOut} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n});\n\nconst StyledContent = styled(DialogPrimitive.Content, {\n color: '$on_surface_medium',\n backgroundColor: '$surface_default',\n borderTopLeftRadius: '$3',\n borderTopRightRadius: '$3',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n position: 'fixed',\n zIndex: 1001,\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n maxHeight: '96%',\n\n // Among other things, prevents text alignment inconsistencies when dialog can't be centered in the viewport evenly.\n // Affects animated and non-animated dialogs alike.\n willChange: 'transform',\n\n '&:focus': {\n outline: 'none',\n },\n '@allowMotion': {\n '&[data-state=\"open\"]': {\n animation: `${sheetSlideIn} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n '&[data-state=\"closed\"]': {\n animation: `${sheetSlideOut} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n },\n\n variants: {\n side: {\n top: {\n $$transformValue: 'translate3d(0,-100%,0)',\n bottom: 'auto',\n },\n right: {\n $$transformValue: 'translate3d(100%,0,0)',\n right: 0,\n },\n bottom: {\n $$transformValue: 'translate3d(0,100%,0)',\n bottom: 0,\n top: 'auto',\n },\n left: {\n $$transformValue: 'translate3d(-100%,0,0)',\n left: 0,\n },\n },\n },\n\n defaultVariants: {\n side: 'bottom',\n },\n});\n\ntype SheetContentVariants = VariantProps<typeof StyledContent>;\ntype DialogContentPrimitiveProps = React.ComponentProps<typeof DialogPrimitive.Content>;\ntype SheetContentProps = DialogContentPrimitiveProps & SheetContentVariants & { css?: CSS };\n\nconst SheetContent = React.forwardRef<React.ElementRef<typeof StyledContent>, SheetContentProps>(\n ({ children, ...props }, forwardedRef) => (\n <Dialog.Portal>\n <StyledOverlay />\n <StyledContent {...props} ref={forwardedRef}>\n {children}\n </StyledContent>\n </Dialog.Portal>\n ),\n);\nconst SheetClose = Dialog.Close;\nconst SheetTitle = styled(DialogPrimitive.Title, {\n margin: 0,\n});\nconst SheetDescription = Dialog.Description;\nconst SheetDefaultCloseIcon = Dialog.DefaultClose;\n\nexport const Sheet = {\n Root: SheetRoot,\n Trigger: SheetTrigger,\n Content: SheetContent,\n Description: SheetDescription,\n Title: SheetTitle,\n Close: SheetClose,\n DefaultClose: SheetDefaultCloseIcon,\n};\n", "import React, { useState } from 'react';\nimport { selectLocalPeerID, selectPeerSharingVideoPlaylist, useHMSStore, useScreenShare } from '@100mslive/react-sdk';\nimport {\n AudioPlayerIcon,\n ChevronDownIcon,\n ChevronUpIcon,\n MusicIcon,\n PencilDrawIcon,\n ShareScreenIcon,\n VideoPlayerIcon,\n} from '@100mslive/react-icons';\nimport { Box, Dropdown, Flex, Text, Tooltip } from '../../../';\nimport { useWhiteboardMetadata } from '../../plugins/whiteboard/useWhiteboardMetadata';\nimport { useUISettings } from '../AppData/useUISettings';\nimport { usePlaylistMusic } from '../hooks/usePlaylistMusic';\nimport { useScreenshareAudio } from '../hooks/useScreenshareAudio';\nimport { UI_SETTINGS } from '../../common/constants';\n\nexport const getRecordingText = ({ isBrowserRecordingOn, isServerRecordingOn, isHLSRecordingOn }, delimiter = ', ') => {\n if (!isBrowserRecordingOn && !isServerRecordingOn && !isHLSRecordingOn) {\n return '';\n }\n const title = [];\n if (isBrowserRecordingOn) {\n title.push('Browser');\n }\n if (isServerRecordingOn) {\n title.push('Server');\n }\n if (isHLSRecordingOn) {\n title.push('HLS');\n }\n return title.join(delimiter);\n};\n\n/**\n * Display state of recording, streaming, playlist, whiteboard\n */\nexport const AdditionalRoomState = () => {\n const playlist = usePlaylistMusic();\n const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);\n const screenshareAudio = useScreenshareAudio();\n const [open, setOpen] = useState(false);\n const isPlaylistInactive = [\n !playlist.peer || !playlist.track,\n !playlist.peer?.isLocal && !playlist.track?.enabled,\n playlist.peer?.isLocal && !playlist.selection,\n ].some(Boolean);\n const isAudioshareInactive = [\n !screenshareAudio.peer || !screenshareAudio.track,\n !screenshareAudio.peer?.isLocal && !screenshareAudio.track?.enabled,\n ].some(Boolean);\n\n const peerSharingPlaylist = useHMSStore(selectPeerSharingVideoPlaylist);\n const localPeerID = useHMSStore(selectLocalPeerID);\n const isVideoPlayListPlaying = !!peerSharingPlaylist?.id;\n const { screenSharingPeerName, screenSharingPeerId, screenShareVideoTrackId } = useScreenShare();\n\n const isVideoScreenSharingOn = !!screenShareVideoTrackId;\n const { whiteboardOwner, amIWhiteboardOwner, toggleWhiteboard } = useWhiteboardMetadata();\n const shouldShowScreenShareState = isAudioOnly && isVideoScreenSharingOn;\n const shouldShowVideoState = isAudioOnly && isVideoPlayListPlaying;\n if (\n isPlaylistInactive &&\n isAudioshareInactive &&\n !shouldShowScreenShareState &&\n !shouldShowVideoState &&\n !whiteboardOwner\n ) {\n return null;\n }\n\n return (\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <Dropdown.Trigger asChild>\n <Flex\n align=\"center\"\n css={{\n color: '$on_primary_high',\n borderRadius: '$1',\n border: '1px solid $on_surface_low',\n padding: '$4',\n '@sm': { display: 'none' },\n }}\n data-testid=\"record_status_dropdown\"\n >\n {!isAudioshareInactive && (\n <Tooltip title=\"Screenshare Audio\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <MusicIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n {shouldShowScreenShareState && (\n <Tooltip title=\"Screenshare\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <ShareScreenIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n {shouldShowVideoState && (\n <Tooltip title=\"video playlist\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <VideoPlayerIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n {!isPlaylistInactive && (\n <Tooltip title=\"Playlist Music\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <AudioPlayerIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n {whiteboardOwner && (\n <Tooltip title=\"Whiteboard\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <PencilDrawIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n <Box css={{ '@lg': { display: 'none' }, color: '$on_surface_low' }}>\n {open ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </Box>\n </Flex>\n </Dropdown.Trigger>\n <Dropdown.Content sideOffset={5} align=\"end\" css={{ w: '$60' }}>\n {!isPlaylistInactive && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <AudioPlayerIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n Playlist is playing\n </Text>\n {playlist.peer.isLocal ? (\n <Text\n variant=\"sm\"\n css={{ color: '$alert_error_default', cursor: 'pointer', ml: '$2' }}\n onClick={e => {\n e.preventDefault();\n playlist.selection.playing ? playlist.pause() : playlist.play(playlist.selection.id);\n }}\n >\n {playlist.selection.playing ? 'Pause' : 'Play'}\n </Text>\n ) : (\n <Text\n variant=\"sm\"\n css={{ color: '$alert_error_default', ml: '$2', cursor: 'pointer' }}\n onClick={e => {\n e.preventDefault();\n playlist.setVolume(!playlist.track.volume ? 100 : 0);\n }}\n >\n {playlist.track.volume === 0 ? 'Unmute' : 'Mute'}\n </Text>\n )}\n </Dropdown.Item>\n )}\n {!isAudioshareInactive && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <MusicIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n Music is playing\n </Text>\n <Text\n variant=\"sm\"\n css={{ color: '$alert_error_default', ml: '$2', cursor: 'pointer' }}\n onClick={e => {\n e.preventDefault();\n screenshareAudio.onToggle();\n }}\n >\n {screenshareAudio.muted ? 'Unmute' : 'Mute'}\n </Text>\n </Dropdown.Item>\n )}\n {shouldShowScreenShareState && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <ShareScreenIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n {`Shared by: ${screenSharingPeerId === localPeerID ? 'You' : screenSharingPeerName}`}\n </Text>\n </Dropdown.Item>\n )}\n {shouldShowVideoState && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <VideoPlayerIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n {`Shared by: ${peerSharingPlaylist.id === localPeerID ? 'You' : peerSharingPlaylist.name}`}\n </Text>\n </Dropdown.Item>\n )}\n {whiteboardOwner && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <PencilDrawIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n Whiteboard Owner - {whiteboardOwner.name}\n {amIWhiteboardOwner && '(You)'}\n </Text>\n {amIWhiteboardOwner && (\n <Text\n variant=\"sm\"\n css={{ color: '$alert_error_default', ml: '$2', cursor: 'pointer' }}\n onClick={e => {\n e.preventDefault();\n toggleWhiteboard();\n }}\n >\n Stop\n </Text>\n )}\n </Dropdown.Item>\n )}\n </Dropdown.Content>\n </Dropdown.Root>\n );\n};\n", "import { useCallback, useEffect, useMemo } from 'react';\nimport { selectLocalPeerID, selectPeerByCondition, useHMSStore } from '@100mslive/react-sdk';\nimport { useMyMetadata } from '../../components/hooks/useMetadata';\nimport { getMetadata } from '../../common/utils';\nimport { FeatureFlags } from '../../services/FeatureFlags';\n\nconst isWhiteboardOwner = peer => {\n return !!getMetadata(peer?.metadata).whiteboardOwner;\n};\n\nexport const useWhiteboardMetadata = () => {\n const localPeerID = useHMSStore(selectLocalPeerID);\n const { updateMetaData } = useMyMetadata();\n const whiteboardOwner = useHMSStore(selectPeerByCondition(isWhiteboardOwner));\n const amIWhiteboardOwner = useMemo(() => localPeerID === whiteboardOwner?.id, [localPeerID, whiteboardOwner]);\n\n /**\n * @param enabled {boolean}\n */\n const toggleWhiteboard = useCallback(async () => {\n if (!process.env.REACT_APP_PUSHER_APP_KEY) {\n console.error('Cannot start whiteboard - Pusher Key unavailable');\n }\n try {\n if (!whiteboardOwner || amIWhiteboardOwner) {\n await updateMetaData({ whiteboardOwner: !whiteboardOwner });\n } else {\n console.warn('Cannot toggle whiteboard as it was shared by another peer');\n }\n } catch (error) {\n console.error('failed to toggle whiteboard to ', !whiteboardOwner, error);\n }\n }, [whiteboardOwner, updateMetaData, amIWhiteboardOwner]);\n\n useEffect(() => {\n window.toggleWhiteboard = toggleWhiteboard;\n }, [toggleWhiteboard]);\n\n return {\n /** is whiteboard enabled for the room */\n whiteboardEnabled: FeatureFlags.enableWhiteboard,\n /** owner of the active whiteboard, can also be used to check if whiteboard is active */\n whiteboardOwner,\n amIWhiteboardOwner,\n toggleWhiteboard,\n };\n};\n", "import { useCallback } from 'react';\nimport {\n selectHasPeerHandRaised,\n selectLocalPeerID,\n selectPeerMetadata,\n useHMSActions,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\n\nexport const useMyMetadata = () => {\n const hmsActions = useHMSActions();\n const localPeerId = useHMSStore(selectLocalPeerID);\n const vanillaStore = useHMSVanillaStore();\n const metaData = useHMSStore(selectPeerMetadata(localPeerId));\n const isHandRaised = useHMSStore(selectHasPeerHandRaised(localPeerId));\n\n const update = async updatedFields => {\n try {\n // get current state from store and merge updated fields\n const currentMetadata = vanillaStore.getState(selectPeerMetadata(localPeerId));\n await hmsActions.changeMetadata(Object.assign(currentMetadata, updatedFields));\n return true;\n } catch (error) {\n console.error('failed to update metadata ', updatedFields);\n }\n };\n\n const toggleHandRaise = useCallback(async () => {\n if (isHandRaised) {\n await hmsActions.lowerLocalPeerHand();\n } else {\n await hmsActions.raiseLocalPeerHand();\n }\n }, [isHandRaised]); //eslint-disable-line\n\n const toggleBRB = useCallback(async () => {\n const newValue = !metaData?.isBRBOn;\n await update({ isBRBOn: !metaData?.isBRBOn });\n if (newValue) {\n await hmsActions.lowerLocalPeerHand();\n }\n }, [metaData?.isBRBOn]); //eslint-disable-line\n\n const setPrevRole = async role => {\n await update({\n prevRole: role,\n });\n };\n\n return {\n isHandRaised,\n isBRBOn: !!metaData?.isBRBOn,\n metaData,\n updateMetaData: update,\n toggleHandRaise,\n toggleBRB,\n setPrevRole,\n };\n};\n", "import { useCallback } from 'react';\nimport {\n selectAudioPlaylist,\n selectAudioPlaylistTrackByPeerID,\n selectPeerSharingAudioPlaylist,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\n\nexport const usePlaylistMusic = () => {\n const peer = useHMSStore(selectPeerSharingAudioPlaylist);\n const track = useHMSStore(selectAudioPlaylistTrackByPeerID(peer?.id));\n const selection = useHMSStore(selectAudioPlaylist.selectedItem);\n const hmsActions = useHMSActions();\n\n const play = useCallback(\n async selectedId => {\n await hmsActions.audioPlaylist.play(selectedId);\n },\n [hmsActions],\n );\n\n const pause = useCallback(() => {\n hmsActions.audioPlaylist.pause();\n }, [hmsActions]);\n\n const setVolume = useCallback(\n value => {\n hmsActions.setVolume(value, track?.id);\n },\n [hmsActions, track],\n );\n\n return { selection, peer, track, play, pause, setVolume };\n};\n", "import { useCallback } from 'react';\nimport {\n selectPeerSharingAudio,\n selectScreenShareAudioByPeerID,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\n\nexport const useScreenshareAudio = () => {\n const hmsActions = useHMSActions();\n const peer = useHMSStore(selectPeerSharingAudio);\n const track = useHMSStore(selectScreenShareAudioByPeerID(peer?.id));\n\n const handleMute = useCallback(() => {\n if (!peer.isLocal) {\n hmsActions.setVolume(!track.volume ? 100 : 0, track.id);\n } else {\n hmsActions.setEnabledTrack(track.id, !track.enabled).catch(console.error);\n }\n }, [peer, hmsActions, track]);\n\n let muted = undefined;\n if (peer && track) {\n muted = peer.isLocal ? !track.enabled : track.volume === 0;\n }\n\n return { peer, track, muted, onToggle: handleMute };\n};\n", "import React from 'react';\nimport {\n DeviceType,\n selectIsLocalVideoEnabled,\n selectLocalVideoTrackID,\n selectVideoTrackByID,\n useDevices,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { CameraFlipIcon, CheckIcon, CrossIcon, SpeakerIcon } from '@100mslive/react-icons';\nimport { HorizontalDivider } from '../../../Divider';\nimport { Label } from '../../../Label';\nimport { Box, Flex } from '../../../Layout';\nimport { Sheet } from '../../../Sheet';\nimport { Text } from '../../../Text';\nimport IconButton from '../../IconButton';\nimport { ToastManager } from '../Toast/ToastManager';\n\nexport const CamaraFlipActions = () => {\n const actions = useHMSActions();\n const { allDevices } = useDevices();\n const { videoInput } = allDevices;\n const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);\n\n const videoTrackId = useHMSStore(selectLocalVideoTrackID);\n const localVideoTrack = useHMSStore(selectVideoTrackByID(videoTrackId));\n if (!videoInput || !videoInput?.length || !localVideoTrack?.facingMode) {\n return null;\n }\n return (\n <Box>\n <IconButton\n disabled={!isVideoOn}\n onClick={async () => {\n try {\n await actions.switchCamera();\n } catch (e) {\n ToastManager.addToast({\n title: `Error while flipping camera ${e.message || ''}`,\n variant: 'error',\n });\n }\n }}\n >\n <CameraFlipIcon />\n </IconButton>\n </Box>\n );\n};\n\nexport const AudioOutputActions = () => {\n const { allDevices, selectedDeviceIDs, updateDevice } = useDevices();\n const { audioOutput } = allDevices;\n // don't show speaker selector where the API is not supported, and use\n // a generic word(\"Audio\") for Mic. In some cases(Chrome Android for e.g.) this changes both mic and speaker keeping them in sync.\n const shouldShowAudioOutput = 'setSinkId' in HTMLMediaElement.prototype;\n\n /**\n * Chromium browsers return an audioOutput with empty label when no permissions are given\n */\n const audioOutputFiltered = audioOutput?.filter(item => !!item.label) ?? [];\n if (!shouldShowAudioOutput || !audioOutputFiltered?.length > 0) {\n return null;\n }\n return (\n <AudioOutputSelectionSheet\n outputDevices={audioOutput}\n outputSelected={selectedDeviceIDs.outputDevices}\n onChange={async deviceId => {\n try {\n await updateDevice({\n deviceId,\n deviceType: DeviceType.audioOutput,\n });\n } catch (e) {\n ToastManager.addToast({\n title: `Error while changing audio output ${e.message || ''}`,\n variant: 'error',\n });\n }\n }}\n >\n <Box>\n <IconButton>\n <SpeakerIcon />\n </IconButton>\n </Box>\n </AudioOutputSelectionSheet>\n );\n};\n\nconst AudioOutputSelectionSheet = ({ outputDevices, outputSelected, onChange, children }) => {\n return (\n <Sheet.Root>\n <Sheet.Trigger asChild>{children}</Sheet.Trigger>\n <Sheet.Content>\n <Sheet.Title css={{ py: '$10', px: '$8', alignItems: 'center' }}>\n <Flex direction=\"row\" justify=\"between\" css={{ w: '100%' }}>\n <Text variant=\"h6\" css={{ display: 'flex' }}>\n Audio Output\n </Text>\n <Sheet.Close>\n <IconButton as=\"div\" data-testid=\"dialog_cross_icon\">\n <CrossIcon />\n </IconButton>\n </Sheet.Close>\n </Flex>\n </Sheet.Title>\n <HorizontalDivider />\n <Flex\n direction=\"column\"\n css={{\n px: '$8',\n maxHeight: '80vh',\n overflowY: 'scroll',\n }}\n >\n {outputDevices.map(audioDevice => {\n return (\n <SelectWithLabel\n key={audioDevice.deviceId}\n label={audioDevice.label}\n id={audioDevice.deviceId}\n checked={audioDevice.deviceId === outputSelected}\n onChange={() => onChange(audioDevice.deviceId)}\n />\n );\n })}\n </Flex>\n </Sheet.Content>\n </Sheet.Root>\n );\n};\n\nconst SelectWithLabel = ({ label, icon = <></>, checked, id, onChange }) => {\n return (\n <Flex\n align=\"center\"\n css={{\n my: '$2',\n py: '$8',\n w: '100%',\n borderBottom: '1px solid $border_default',\n }}\n onClick={onChange}\n >\n <Label\n htmlFor={id}\n css={{\n fontSize: '$md',\n fontWeight: '$semiBold',\n color: checked ? '$on_surface_high' : '$on_surface_low',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n gap: '$8',\n flex: '1 1 0',\n }}\n >\n {icon}\n {label}\n </Label>\n {checked && <CheckIcon width={24} height={24} />}\n </Flex>\n );\n};\n", "import React from 'react';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { useSearchParam } from 'react-use';\nimport { Flex } from '../../..';\nimport { useHMSPrebuiltContext } from '../../AppContext';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\n// @ts-ignore: No implicit Any\nimport FullPageProgress from '../FullPageProgress';\n// @ts-ignore: No implicit Any\nimport PreviewJoin from './PreviewJoin';\nimport { useRoomLayoutPreviewScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { useAuthToken } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { QUERY_PARAM_PREVIEW_AS_ROLE } from '../../common/constants';\n\nconst PreviewContainer = () => {\n const navigate = useNavigate();\n const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();\n const skipPreview = !isPreviewScreenEnabled;\n const previewAsRole = useSearchParam(QUERY_PARAM_PREVIEW_AS_ROLE);\n const { userName } = useHMSPrebuiltContext();\n const initialName = userName || (skipPreview ? 'Beam' : '');\n const { roomId: urlRoomId, role: userRole } = useParams(); // from the url\n const authToken = useAuthToken();\n const roomLayout = useRoomLayout();\n const { preview_header: previewHeader = {} } = roomLayout?.screens?.preview?.default?.elements || {};\n\n const onJoin = () => {\n let meetingURL = `/meeting/${urlRoomId}`;\n if (userRole) {\n meetingURL += `/${userRole}`;\n }\n navigate(meetingURL);\n };\n return (\n <Flex direction=\"column\" css={{ size: '100%' }}>\n <Flex\n css={{ flex: '1 1 0', position: 'relative', overflowY: 'auto', color: '$primary_default' }}\n justify=\"center\"\n align=\"center\"\n >\n {authToken && Object.keys(previewHeader).length > 0 ? (\n <PreviewJoin\n initialName={initialName}\n skipPreview={skipPreview}\n asRole={previewAsRole ?? undefined}\n onJoin={onJoin}\n />\n ) : (\n <FullPageProgress />\n )}\n </Flex>\n </Flex>\n );\n};\n\nexport default PreviewContainer;\n", "import React, { Fragment, Suspense, useCallback, useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n HMSRoomState,\n selectIsLocalVideoEnabled,\n selectLocalPeer,\n selectRoomState,\n selectVideoTrackByID,\n useAVToggle,\n useHMSStore,\n useParticipants,\n usePreviewJoin,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport { MicOffIcon, SettingsIcon } from '@100mslive/react-icons';\nimport { Avatar, Box, config as cssConfig, Flex, flexCenter, styled, StyledVideoTile, Text, Video } from '../../..';\nimport { useHMSPrebuiltContext } from '../../AppContext';\n// @ts-ignore: No implicit Any\nimport IconButton from '../../IconButton';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\n// @ts-ignore: No implicit Any\nimport { AudioVideoToggle } from '../AudioVideoToggle';\n// @ts-ignore: No implicit Any\nimport Chip from '../Chip';\n// @ts-ignore: No implicit Any\nimport TileConnection from '../Connection/TileConnection';\n// @ts-ignore: No implicit Any\nimport FullPageProgress from '../FullPageProgress';\n// @ts-ignore: No implicit Any\nimport { Logo } from '../Header/HeaderComponents';\n// @ts-ignore: No implicit Any\nimport SettingsModal from '../Settings/SettingsModal';\n// @ts-ignore: No implicit Any\nimport { AudioLevel } from '../VideoTile';\n// @ts-ignore: No implicit Any\nimport PreviewForm from './PreviewForm';\n// @ts-ignore: No implicit Any\nimport { useAuthToken, useUISettings } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { defaultPreviewPreference, UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\n// @ts-ignore: No implicit Any\nimport { getFormattedCount } from '../../common/utils';\n// @ts-ignore: No implicit Any\nimport { UI_SETTINGS } from '../../common/constants';\n\n// @ts-ignore: No implicit Any\nconst VirtualBackground = React.lazy(() => import('../../plugins/VirtualBackground/VirtualBackground'));\n\nconst getParticipantChipContent = (peerCount = 0) => {\n if (peerCount === 0) {\n return 'You are the first to join';\n }\n const formattedNum = getFormattedCount(peerCount);\n return `${formattedNum} other${parseInt(formattedNum) === 1 ? '' : 's'} in the session`;\n};\n\nconst PreviewJoin = ({\n onJoin,\n skipPreview,\n initialName,\n asRole,\n}: {\n onJoin: () => void;\n skipPreview?: boolean;\n initialName?: string;\n asRole?: string;\n}) => {\n const [previewPreference, setPreviewPreference] = useUserPreferences(\n UserPreferencesKeys.PREVIEW,\n defaultPreviewPreference,\n );\n const { isStreamingOn } = useRecordingStreaming();\n const authToken = useAuthToken();\n const [name, setName] = useState(initialName || previewPreference.name);\n const { toggleAudio, toggleVideo } = useAVToggle();\n const [previewError, setPreviewError] = useState(false);\n const { endpoints } = useHMSPrebuiltContext();\n const { peerCount } = useParticipants();\n const { enableJoin, preview, join } = usePreviewJoin({\n name,\n token: authToken,\n initEndpoint: endpoints?.init,\n initialSettings: {\n isAudioMuted: skipPreview || previewPreference.isAudioMuted,\n isVideoMuted: skipPreview || previewPreference.isVideoMuted,\n speakerAutoSelectionBlacklist: ['Yeti Stereo Microphone'],\n },\n captureNetworkQualityInPreview: true,\n handleError: (_, method) => {\n if (method === 'preview') {\n setPreviewError(true);\n }\n },\n asRole,\n });\n const roomState = useHMSStore(selectRoomState);\n\n const savePreferenceAndJoin = useCallback(() => {\n setPreviewPreference({\n name,\n });\n join();\n onJoin && onJoin();\n }, [join, name, setPreviewPreference, onJoin]);\n const roomLayout = useRoomLayout();\n\n const { preview_header: previewHeader = {} } = roomLayout?.screens?.preview?.default?.elements || {};\n const localPeer = useHMSStore(selectLocalPeer);\n const videoTrack = useHMSStore(selectVideoTrackByID(localPeer?.videoTrack));\n const isMobile = useMedia(cssConfig.media.md);\n const aspectRatio =\n videoTrack?.width && videoTrack?.height ? videoTrack.width / videoTrack.height : isMobile ? 9 / 16 : 16 / 9;\n useEffect(() => {\n if (authToken) {\n if (skipPreview) {\n savePreferenceAndJoin();\n } else {\n preview();\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [authToken, skipPreview]);\n\n useEffect(() => {\n if (initialName) {\n setName(initialName);\n }\n }, [initialName]);\n\n return roomState === HMSRoomState.Preview ? (\n <Container css={{ h: '100%', pt: '$10', '@md': { justifyContent: 'space-between' } }}>\n {toggleVideo ? null : <Box />}\n <Flex direction=\"column\" justify=\"center\" css={{ w: '100%', maxWidth: '640px' }}>\n <Logo />\n <Text\n variant=\"h4\"\n css={{ wordBreak: 'break-word', textAlign: 'center', mt: '$14', mb: '$4', '@md': { mt: '$8', mb: '$2' } }}\n >\n {previewHeader.title}\n </Text>\n <Text\n css={{ c: '$on_surface_medium', my: '0', textAlign: 'center', maxWidth: '100%', wordWrap: 'break-word' }}\n variant=\"sm\"\n >\n {previewHeader.sub_title}\n </Text>\n <Flex justify=\"center\" css={{ mt: '$14', '@md': { mt: '$8', mb: '0' }, gap: '$4' }}>\n {isStreamingOn ? (\n <Chip\n content=\"LIVE\"\n backgroundColor=\"$alert_error_default\"\n textColor=\"#FFF\"\n icon={<Box css={{ h: '$sm', w: '$sm', backgroundColor: '$on_primary_high', borderRadius: '$round' }} />}\n />\n ) : null}\n <Chip content={getParticipantChipContent(peerCount)} hideIfNoContent />\n </Flex>\n </Flex>\n {toggleVideo ? (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n mt: '$14',\n '@md': { mt: 0 },\n '@sm': { width: '100%' },\n flexDirection: 'column',\n }}\n >\n <PreviewTile name={name} error={previewError} />\n </Flex>\n ) : null}\n <Box css={{ w: '100%', maxWidth: `${aspectRatio * 360}px` }}>\n <PreviewControls hideSettings={!toggleVideo && !toggleAudio} />\n <PreviewForm\n name={name}\n onChange={setName}\n enableJoin={enableJoin}\n onJoin={savePreferenceAndJoin}\n cannotPublishVideo={!toggleVideo}\n cannotPublishAudio={!toggleAudio}\n />\n </Box>\n </Container>\n ) : (\n <FullPageProgress />\n );\n};\n\nconst Container = styled('div', {\n width: '100%',\n ...flexCenter,\n flexDirection: 'column',\n px: '$10',\n});\n\nexport const PreviewTile = ({ name, error }: { name: string; error?: boolean }) => {\n const localPeer = useHMSStore(selectLocalPeer);\n const { isLocalAudioEnabled, toggleAudio } = useAVToggle();\n const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);\n const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);\n const trackSelector = selectVideoTrackByID(localPeer?.videoTrack);\n const track = useHMSStore(trackSelector);\n const showMuteIcon = !isLocalAudioEnabled || !toggleAudio;\n const videoTrack = useHMSStore(selectVideoTrackByID(localPeer?.videoTrack));\n const isMobile = useMedia(cssConfig.media.md);\n const aspectRatio =\n videoTrack?.width && videoTrack?.height ? videoTrack.width / videoTrack.height : isMobile ? 9 / 16 : 16 / 9;\n\n return (\n <StyledVideoTile.Container\n css={{\n bg: '$surface_default',\n aspectRatio,\n height: 'min(360px, 70vh)',\n maxWidth: '640px',\n overflow: 'clip',\n '@md': {\n width: 'min(220px, 70vw)',\n maxWidth: '100%',\n my: '$4',\n },\n }}\n >\n {localPeer ? (\n <>\n <TileConnection name={name} peerId={localPeer.id} hideLabel={true} />\n <Video\n mirror={track?.facingMode !== 'environment' && mirrorLocalVideo}\n trackId={localPeer.videoTrack}\n data-testid=\"preview_tile\"\n />\n {!isVideoOn ? (\n <StyledVideoTile.AvatarContainer>\n <Avatar name={name} data-testid=\"preview_avatar_tile\" />\n </StyledVideoTile.AvatarContainer>\n ) : null}\n </>\n ) : !error ? (\n <FullPageProgress />\n ) : null}\n {showMuteIcon ? (\n <StyledVideoTile.AudioIndicator size=\"medium\">\n <MicOffIcon />\n </StyledVideoTile.AudioIndicator>\n ) : (\n <AudioLevel trackId={localPeer?.audioTrack} />\n )}\n </StyledVideoTile.Container>\n );\n};\n\nexport const PreviewControls = ({ hideSettings }: { hideSettings: boolean }) => {\n const isMobile = useMedia(cssConfig.media.md);\n\n return (\n <Flex\n justify=\"between\"\n css={{\n width: '100%',\n mt: '$8',\n }}\n >\n <Flex css={{ gap: '$4' }}>\n <AudioVideoToggle />\n <Suspense fallback=\"\">{!isMobile ? <VirtualBackground /> : null}</Suspense>\n </Flex>\n {!hideSettings ? <PreviewSettings /> : null}\n </Flex>\n );\n};\n\nexport const PreviewSettings = React.memo(() => {\n const [open, setOpen] = useState(false);\n\n return (\n <Fragment>\n <IconButton data-testid=\"preview_setting_btn\" css={{ flexShrink: 0 }} onClick={() => setOpen(value => !value)}>\n <SettingsIcon />\n </IconButton>\n {open && <SettingsModal open={open} onOpenChange={setOpen} />}\n </Fragment>\n );\n});\n\nexport default PreviewJoin;\n", "import React, { Fragment } from 'react';\nimport {\n DeviceType,\n HMSRoomState,\n selectLocalVideoTrackID,\n selectRoomState,\n selectVideoTrackByID,\n useAVToggle,\n useDevices,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { CameraFlipIcon, MicOffIcon, MicOnIcon, VideoOffIcon, VideoOnIcon } from '@100mslive/react-icons';\nimport { IconButtonWithOptions } from './IconButtonWithOptions/IconButtonWithOptions';\nimport { ToastManager } from './Toast/ToastManager';\nimport { Text } from '../../Text';\nimport { Tooltip } from '../../Tooltip';\nimport IconButton from '../IconButton';\nimport { isMacOS } from '../common/constants';\n\nconst optionsCSS = { fontWeight: '$semiBold', color: '$on_surface_high', w: '100%', p: '$8' };\n\nexport const AudioVideoToggle = ({ hideOptions = false }) => {\n const { allDevices, selectedDeviceIDs, updateDevice } = useDevices();\n const { videoInput, audioInput } = allDevices;\n\n const formattedVideoInputList = videoInput?.map(videoInput => ({\n active: selectedDeviceIDs.videoInput === videoInput.deviceId,\n content: (\n <Text\n variant=\"sm\"\n onClick={() =>\n updateDevice({\n deviceType: DeviceType.videoInput,\n deviceId: videoInput.deviceId,\n })\n }\n css={optionsCSS}\n >\n {videoInput.label}\n </Text>\n ),\n title: videoInput.label,\n }));\n\n const formattedAudioInputList = audioInput?.map(audioInput => ({\n active: selectedDeviceIDs.audioInput === audioInput.deviceId,\n content: (\n <Text\n variant=\"sm\"\n onClick={() =>\n updateDevice({\n deviceType: DeviceType.audioInput,\n deviceId: audioInput.deviceId,\n })\n }\n css={optionsCSS}\n >\n {audioInput.label}\n </Text>\n ),\n title: audioInput.label,\n }));\n\n const { isLocalVideoEnabled, isLocalAudioEnabled, toggleAudio, toggleVideo } = useAVToggle();\n const actions = useHMSActions();\n const videoTrackId = useHMSStore(selectLocalVideoTrackID);\n const localVideoTrack = useHMSStore(selectVideoTrackByID(videoTrackId));\n const roomState = useHMSStore(selectRoomState);\n const hasAudioDevices = audioInput?.length > 0;\n const hasVideoDevices = videoInput?.length > 0;\n\n return (\n <Fragment>\n {toggleAudio ? (\n hideOptions || !hasAudioDevices ? (\n <Tooltip title={`Turn ${isLocalAudioEnabled ? 'off' : 'on'} audio (${isMacOS ? '\u2318' : 'ctrl'} + d)`}>\n <IconButton\n active={isLocalAudioEnabled}\n disabled={!toggleAudio}\n onClick={toggleAudio}\n key=\"toggleAudio\"\n data-testid=\"audio_btn\"\n className=\"__cancel-drag-event\"\n >\n {!isLocalAudioEnabled ? (\n <MicOffIcon data-testid=\"audio_off_btn\" />\n ) : (\n <MicOnIcon data-testid=\"audio_on_btn\" />\n )}\n </IconButton>\n </Tooltip>\n ) : (\n <IconButtonWithOptions\n options={formattedAudioInputList}\n disabled={!toggleAudio}\n onDisabledClick={toggleAudio}\n tooltipMessage={`Turn ${isLocalAudioEnabled ? 'off' : 'on'} audio (${isMacOS ? '\u2318' : 'ctrl'} + d)`}\n icon={\n !isLocalAudioEnabled ? (\n <MicOffIcon data-testid=\"audio_off_btn\" />\n ) : (\n <MicOnIcon data-testid=\"audio_on_btn\" />\n )\n }\n active={isLocalAudioEnabled}\n onClick={toggleAudio}\n key=\"toggleAudio\"\n />\n )\n ) : null}\n\n {toggleVideo ? (\n hideOptions || !hasVideoDevices ? (\n <Tooltip title={`Turn ${isLocalVideoEnabled ? 'off' : 'on'} video (${isMacOS ? '\u2318' : 'ctrl'} + e)`}>\n <IconButton\n key=\"toggleVideo\"\n active={isLocalVideoEnabled}\n disabled={!toggleVideo}\n onClick={toggleVideo}\n data-testid=\"video_btn\"\n className=\"__cancel-drag-event\"\n >\n {!isLocalVideoEnabled ? (\n <VideoOffIcon data-testid=\"video_off_btn\" />\n ) : (\n <VideoOnIcon data-testid=\"video_on_btn\" />\n )}\n </IconButton>\n </Tooltip>\n ) : (\n <IconButtonWithOptions\n disabled={!toggleVideo}\n onDisabledClick={toggleVideo}\n options={formattedVideoInputList}\n tooltipMessage={`Turn ${isLocalVideoEnabled ? 'off' : 'on'} video (${isMacOS ? '\u2318' : 'ctrl'} + e)`}\n icon={\n !isLocalVideoEnabled ? (\n <VideoOffIcon data-testid=\"video_off_btn\" />\n ) : (\n <VideoOnIcon data-testid=\"video_on_btn\" />\n )\n }\n key=\"toggleVideo\"\n active={isLocalVideoEnabled}\n onClick={toggleVideo}\n />\n )\n ) : null}\n\n {localVideoTrack?.facingMode && roomState === HMSRoomState.Preview ? (\n <Tooltip title=\"Switch Camera\" key=\"switchCamera\">\n <IconButton\n onClick={async () => {\n try {\n await actions.switchCamera();\n } catch (e) {\n ToastManager.addToast({\n title: `Error while flipping camera ${e.message || ''}`,\n variant: 'error',\n });\n }\n }}\n >\n <CameraFlipIcon />\n </IconButton>\n </Tooltip>\n ) : null}\n </Fragment>\n );\n};\n", "import React from 'react';\nimport { VerticalMenuIcon } from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { Box, Flex } from '../../../Layout';\nimport { styled } from '../../../Theme';\nimport { Tooltip } from '../../../Tooltip';\nimport IconButton from '../../IconButton';\n\nconst IconSection = styled(IconButton, {\n w: 'unset',\n h: '$14',\n p: '$4',\n r: '$1',\n borderTopRightRadius: 0,\n borderColor: '$border_default',\n borderBottomRightRadius: 0,\n position: 'relative',\n '&:not([disabled]):focus-visible': {\n zIndex: 1,\n },\n '@md': {\n mx: 0,\n borderTopRightRadius: '$1',\n borderBottomRightRadius: '$1',\n },\n});\n\nconst OptionsSection = styled(IconButton, {\n w: 'unset',\n h: '$14',\n p: '$4',\n r: '$1',\n borderTopLeftRadius: 0,\n borderColor: '$border_default',\n borderBottomLeftRadius: 0,\n borderLeftWidth: 0,\n position: 'relative',\n '&:not([disabled]):focus-visible': {\n zIndex: 1,\n },\n '@md': {\n display: 'none',\n },\n});\n\nexport const IconButtonWithOptions = ({\n disabled = false,\n onDisabledClick = () => {\n return;\n },\n tooltipMessage = '',\n icon,\n options = [],\n active,\n onClick = () => {\n return;\n },\n}) => {\n const bgCss = { backgroundColor: disabled ? '$surface_brighter' : active ? '$transparent' : '$secondary_dim' };\n const iconCss = { color: disabled ? '$on_surface_low' : active ? '$on_surface_high' : '$on_primary_high' };\n\n return (\n <Flex>\n <IconSection css={bgCss} onClick={onClick}>\n <Tooltip disabled={!tooltipMessage} title={tooltipMessage}>\n <Flex align=\"center\" justify=\"center\" css={iconCss}>\n {icon}\n </Flex>\n </Tooltip>\n </IconSection>\n <Dropdown.Root>\n <Dropdown.Trigger\n asChild\n // onClick does not work\n onPointerDown={e => {\n if (disabled) {\n e.preventDefault();\n onDisabledClick();\n }\n }}\n >\n <OptionsSection css={bgCss}>\n <Tooltip title=\"View Options\">\n <Box css={iconCss}>\n <VerticalMenuIcon />\n </Box>\n </Tooltip>\n </OptionsSection>\n </Dropdown.Trigger>\n <Dropdown.Content\n sideOffset={5}\n align=\"center\"\n css={{\n w: '$64',\n maxHeight: '$96',\n p: 0,\n border: 'none',\n }}\n >\n {options.map((option, index) => (\n <Dropdown.Item\n key={option.title}\n css={{\n flexDirection: 'column',\n alignItems: 'flex-start',\n backgroundColor: option.active ? '$surface_bright' : '$surface_dim',\n borderTop: index === 0 ? 'none' : '1px solid $border_default',\n '&:hover': {\n cursor: 'pointer',\n },\n p: '0',\n }}\n >\n {option.content}\n </Dropdown.Item>\n ))}\n </Dropdown.Content>\n </Dropdown.Root>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { Flex } from '../../Layout';\nimport { Text } from '../../Text';\n\nconst Chip = ({\n icon = <></>,\n content = '',\n backgroundColor = '$surface_default',\n textColor = '$on_surface_high',\n hideIfNoContent = false,\n}) => {\n if (hideIfNoContent && !content) {\n return;\n }\n return (\n <Flex align=\"center\" css={{ backgroundColor, p: '$4 $6', borderRadius: '$4' }}>\n {icon}\n <Text variant=\"sm\" css={{ fontWeight: '$semiBold', color: textColor, ml: '$2' }}>\n {content}\n </Text>\n </Flex>\n );\n};\n\nexport default Chip;\n", "import React from 'react';\nimport { PinIcon, SpotlightIcon } from '@100mslive/react-icons';\nimport { Flex, styled, Text, textEllipsis } from '../../..';\nimport { ConnectionIndicator } from './ConnectionIndicator';\n\nconst TileConnection = ({\n name,\n peerId,\n hideLabel,\n width,\n spotlighted,\n pinned,\n}: {\n name: string;\n peerId: string;\n hideLabel: boolean;\n width?: number;\n spotlighted?: boolean;\n pinned?: boolean;\n}) => {\n return (\n <Wrapper>\n {!hideLabel ? (\n <>\n <Flex align=\"center\">\n {pinned && (\n <IconWrapper>\n <PinIcon width=\"15\" height=\"15\" />\n </IconWrapper>\n )}\n {spotlighted && (\n <IconWrapper>\n <SpotlightIcon width=\"15\" height=\"15\" />\n </IconWrapper>\n )}\n <Text\n css={{\n c: '$on_surface_high',\n verticalAlign: 'baseline',\n ...(width ? textEllipsis(width - 60) : {}),\n }}\n variant=\"xs\"\n >\n {name}\n </Text>\n </Flex>\n <ConnectionIndicator isTile peerId={peerId} hideBg />\n </>\n ) : null}\n </Wrapper>\n );\n};\n\nconst IconWrapper = styled('div', { c: '$on_surface_high', ml: '$3', mt: '$1' });\n\nconst Wrapper = styled('div', {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n position: 'absolute',\n bottom: '$2',\n left: '$2',\n backgroundColor: '$background_dim',\n borderRadius: '$1',\n maxWidth: '85%',\n '& p,span': {\n p: '$2 $3',\n },\n});\n\nexport default TileConnection;\n", "import React from 'react';\nimport { selectConnectionQualityByPeerID, useHMSStore } from '@100mslive/react-sdk';\nimport { PoorConnectivityIcon } from '@100mslive/react-icons';\nimport { styled, Tooltip, useTheme } from '../../..';\n// @ts-ignore\nimport { getColor, getTooltipText } from './connectionQualityUtils';\n\nconst Wrapper = styled('span', {\n width: '28px',\n height: '28px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '$round',\n variants: {\n isTile: {\n true: {\n width: 'unset',\n height: 'unset',\n },\n },\n },\n});\n\nexport const ConnectionIndicator = ({\n peerId,\n isTile = false,\n hideBg = false,\n}: {\n peerId: string;\n isTile?: boolean;\n hideBg?: boolean;\n}) => {\n const downlinkQuality = useHMSStore(selectConnectionQualityByPeerID(peerId))?.downlinkQuality;\n const { theme } = useTheme();\n const defaultColor = theme.colors.surface_brighter;\n if (downlinkQuality === -1 || downlinkQuality === undefined) {\n return null;\n }\n if (downlinkQuality === 0) {\n return (\n <Tooltip title={getTooltipText(downlinkQuality)}>\n <Wrapper isTile={isTile} css={{ color: '#ED4C5A' }} data-testid=\"tile_network\">\n <PoorConnectivityIcon />\n </Wrapper>\n </Tooltip>\n );\n }\n const size = isTile ? 12 : 16;\n return (\n <Tooltip title={getTooltipText(downlinkQuality)}>\n <Wrapper isTile={isTile} data-testid=\"tile_network\" css={{ backgroundColor: hideBg ? '' : '$surface_bright' }}>\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 14 12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlSpace=\"preserve\"\n style={{\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n strokeLinejoin: 'round',\n strokeMiterlimit: 2,\n }}\n >\n <path\n d=\"M6.875 0c2.549.035 4.679.902 6.445 2.648.366.362.45.796.216 1.096-.239.306-.714.34-1.142.072a2.28 2.28 0 0 1-.341-.271C9.24.862 4.924.775 1.992 3.346c-.284.249-.594.419-.983.393-.272-.019-.49-.135-.613-.388-.125-.261-.05-.498.114-.713.073-.092.156-.177.245-.254C2.516.804 4.591.039 6.875 0Z\"\n fill={getColor(4, downlinkQuality, defaultColor, theme)}\n transform=\"translate(-.333)\"\n />\n <path\n d=\"M7.056 2.964c1.756.035 3.208.7 4.499 1.763.162.134.277.315.354.512.098.251.114.503-.075.72-.193.222-.452.259-.725.198-.293-.066-.518-.247-.738-.443a4.859 4.859 0 0 0-6.198-.26c-.166.127-.318.271-.475.409-.242.211-.513.343-.843.317-.43-.034-.679-.397-.561-.81.062-.211.181-.4.345-.546 1.265-1.162 2.733-1.836 4.417-1.86Z\"\n fill={getColor(3, downlinkQuality, defaultColor, theme)}\n transform=\"translate(-.333)\"\n />\n <path\n d=\"M7.384,6.052C8.293,6.068 9.157,6.449 9.783,7.108C10.005,7.339 10.157,7.6 10.07,7.942C9.959,8.377 9.435,8.581 9.071,8.243C7.935,7.191 6.356,7.183 5.152,8.183C4.816,8.462 4.6,8.485 4.332,8.27C4.063,8.055 3.998,7.691 4.177,7.358C4.273,7.179 4.414,7.038 4.57,6.911C5.26,6.349 6.149,6.05 7.384,6.052L7.384,6.052Z\"\n fill={getColor(2, downlinkQuality, defaultColor, theme)}\n />\n <path\n d=\"M8.214,9.941C8.214,10.234 8.097,10.515 7.888,10.721C7.68,10.928 7.398,11.042 7.104,11.039C6.471,11.036 5.982,10.541 5.993,9.912C6.004,9.259 6.499,8.766 7.133,8.779C7.744,8.791 8.22,9.301 8.214,9.941Z\"\n fill={getColor(1, downlinkQuality, defaultColor, theme)}\n />\n </svg>\n </Wrapper>\n </Tooltip>\n );\n};\n", "const connectionTooltip = {\n 0: 'Reconnecting',\n 1: 'Very Bad Connection',\n 2: 'Bad Connection',\n 3: 'Moderate Connection',\n 4: 'Good Connection',\n 5: 'Excellent Connection',\n};\nconnectionTooltip[-1] = 'Network Unknown';\n\n/**\n * @param connectionScore -> 1-5 connection score for network quality\n */\nexport const getTooltipText = connectionScore => {\n return connectionTooltip[connectionScore];\n};\n\n/**\n * position is needed here as we don't want all the dots/arcs to be colored,\n * the non colored ones will be passed in the default color. If user is\n * disconnected(score=0), no dot/arc will be colored.\n * @param position -> 1 to 5\n * @param connectionScore -> 0 to 5, 0 means disconnected\n * @param defaultColor -> color for components not taking the connection color\n */\nexport const getColor = (position, connectionScore, defaultColor, theme) => {\n const shouldBeColored = position <= connectionScore;\n if (!shouldBeColored) {\n return defaultColor;\n }\n if (connectionScore >= 4) {\n return theme.colors.alert_success;\n } else if (connectionScore >= 3) {\n return theme.colors.alert_warning;\n } else if (connectionScore >= 1) {\n return theme.colors.alert_default;\n }\n return defaultColor;\n};\n", "import React, { useCallback, useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';\nimport { HorizontalDivider } from '../../../Divider';\nimport { IconButton } from '../../../IconButton';\nimport { Box, Flex } from '../../../Layout';\nimport { Dialog } from '../../../Modal';\nimport { Sheet } from '../../../Sheet';\nimport { Tabs } from '../../../Tabs';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\nimport { settingContent, settingsList } from './common.js';\n\nconst SettingsModal = ({ open, onOpenChange, screenType, children = <></> }) => {\n const mediaQueryLg = cssConfig.media.md;\n const isMobile = useMedia(mediaQueryLg);\n\n const [showSetting, setShowSetting] = useState(() =>\n settingsList.reduce((obj, { tabName }) => ({ ...obj, [tabName]: true }), {}),\n );\n\n const hideSettingByTabName = useCallback(\n key => hide => setShowSetting(prev => ({ ...prev, [key]: !hide })),\n [setShowSetting],\n );\n\n useEffect(() => {\n if (screenType === 'hls_live_streaming') {\n hideSettingByTabName('layout')(true);\n }\n }, [screenType, hideSettingByTabName]);\n\n const [selection, setSelection] = useState(() => Object.keys(showSetting).find(key => showSetting[key]) ?? '');\n const resetSelection = useCallback(() => {\n setSelection('');\n }, []);\n\n useEffect(() => {\n if (isMobile) {\n setSelection('');\n } else {\n const firstNotHiddenTabName = Object.keys(showSetting).find(key => showSetting[key]) ?? '';\n setSelection(firstNotHiddenTabName);\n }\n }, [isMobile, showSetting]);\n\n return isMobile ? (\n <MobileSettingModal\n open={open}\n onOpenChange={onOpenChange}\n selection={selection}\n setSelection={setSelection}\n showSetting={showSetting}\n hideSettingByTabName={hideSettingByTabName}\n resetSelection={resetSelection}\n children={children}\n />\n ) : (\n <DesktopSettingModal\n open={open}\n onOpenChange={onOpenChange}\n selection={selection}\n setSelection={setSelection}\n showSetting={showSetting}\n hideSettingByTabName={hideSettingByTabName}\n resetSelection={resetSelection}\n children={children}\n />\n );\n};\n\nconst MobileSettingModal = ({\n open,\n onOpenChange,\n selection,\n setSelection,\n showSetting,\n hideSettingByTabName,\n resetSelection,\n children = <></>,\n}) => {\n return (\n <Sheet.Root open={open} onOpenChange={onOpenChange}>\n <Sheet.Trigger asChild>{children}</Sheet.Trigger>\n <Sheet.Content\n css={{\n bg: '$surface_dim',\n overflowY: 'auto',\n }}\n >\n <Sheet.Title css={{ py: '$10', px: '$8', alignItems: 'center' }}>\n <Flex direction=\"row\" justify=\"between\" css={{ w: '100%' }}>\n {!selection ? (\n <Text variant=\"h6\" css={{ display: 'flex' }}>\n Settings\n </Text>\n ) : (\n <Text variant=\"h6\" css={{ display: 'flex' }}>\n <Box as=\"span\" css={{ r: '$round', mr: '$2' }} onClick={resetSelection}>\n <ChevronLeftIcon />\n </Box>\n {selection?.charAt(0).toUpperCase() + selection.slice(1)}\n </Text>\n )}\n <Sheet.Close>\n <IconButton as=\"div\" data-testid=\"dialog_cross_icon\">\n <CrossIcon />\n </IconButton>\n </Sheet.Close>\n </Flex>\n </Sheet.Title>\n <HorizontalDivider />\n {!selection ? (\n <Flex\n direction=\"column\"\n css={{\n px: '$8',\n pb: '$8',\n overflowY: 'auto',\n }}\n >\n {settingsList\n .filter(({ tabName }) => showSetting[tabName])\n .map(({ icon: Icon, tabName, title }) => {\n return (\n <Box\n key={tabName}\n value={tabName}\n onClick={() => {\n setSelection(tabName);\n }}\n as=\"div\"\n css={{\n all: 'unset',\n fontFamily: '$sans',\n py: '$10',\n display: 'flex',\n alignItems: 'center',\n fontSize: '$sm',\n lineHeight: '$sm',\n color: '$on_surface_high',\n userSelect: 'none',\n gap: '$8',\n cursor: 'pointer',\n '&:hover': {\n bg: '$surface_brighter',\n r: '$1',\n gap: '$8',\n border: 'none',\n },\n borderBottom: '1px solid $border_default',\n }}\n >\n <Icon />\n {title}\n </Box>\n );\n })}\n </Flex>\n ) : (\n <Box\n direction=\"column\"\n css={{ overflowY: 'scroll', px: '$8', py: '$10', maxHeight: '70vh', overflowX: 'hidden' }}\n >\n {settingsList\n .filter(({ tabName }) => showSetting[tabName] && selection === tabName)\n .map(({ content: Content, title, tabName }) => {\n return <Content key={title} setHide={hideSettingByTabName(tabName)} />;\n })}\n </Box>\n )}\n </Sheet.Content>\n </Sheet.Root>\n );\n};\nconst DesktopSettingModal = ({\n open,\n onOpenChange,\n selection,\n setSelection,\n showSetting,\n hideSettingByTabName,\n resetSelection,\n children = <></>,\n}) => {\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Trigger asChild>{children}</Dialog.Trigger>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n w: 'min(800px, 90%)',\n height: 'min(656px, 90%)',\n p: 0,\n r: '$4',\n }}\n >\n <Tabs.Root\n value={selection}\n activationMode=\"automatic\"\n onValueChange={setSelection}\n css={{ size: '100%', position: 'relative' }}\n >\n <Tabs.List\n css={{\n w: '18.625rem',\n flexDirection: 'column',\n bg: '$background_default',\n p: '$14 $10',\n borderTopLeftRadius: '$4',\n borderBottomLeftRadius: '$4',\n }}\n >\n <Text variant=\"h5\">Settings </Text>\n <Flex direction=\"column\" css={{ mx: 0, overflowY: 'auto', pt: '$10' }}>\n {settingsList\n .filter(({ tabName }) => showSetting[tabName])\n .map(({ icon: Icon, tabName, title }) => {\n return (\n <Tabs.Trigger key={tabName} value={tabName} css={{ gap: '$8' }}>\n <Icon />\n {title}\n </Tabs.Trigger>\n );\n })}\n </Flex>\n </Tabs.List>\n {selection && (\n <Flex\n direction=\"column\"\n css={{\n flex: '1 1 0',\n minWidth: 0,\n mr: '$4',\n }}\n >\n {settingsList\n .filter(({ tabName }) => showSetting[tabName])\n .map(({ content: Content, title, tabName }) => {\n return (\n <Tabs.Content key={tabName} value={tabName} className={settingContent()}>\n <SettingsContentHeader onBack={resetSelection} isMobile={false}>\n {title}\n </SettingsContentHeader>\n <Content setHide={hideSettingByTabName(tabName)} />\n </Tabs.Content>\n );\n })}\n </Flex>\n )}\n </Tabs.Root>\n <Dialog.Close css={{ position: 'absolute', right: '$10', top: '$10' }}>\n <IconButton as=\"div\" data-testid=\"dialog_cross_icon\">\n <CrossIcon />\n </IconButton>\n </Dialog.Close>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\nconst SettingsContentHeader = ({ children, isMobile, onBack }) => {\n return (\n <Text variant=\"h6\" css={{ mb: '$12', display: 'flex', alignItems: 'center' }}>\n {isMobile && (\n <Box as=\"span\" css={{ bg: '$surface_bright', mr: '$4', r: '$round', p: '$2' }} onClick={onBack}>\n <ChevronLeftIcon />\n </Box>\n )}\n {children}\n </Text>\n );\n};\n\nexport default SettingsModal;\n", "import { GridFourIcon, NotificationsIcon, SettingsIcon } from '@100mslive/react-icons';\nimport { css } from '../../..';\nimport DeviceSettings from '../Settings/DeviceSettings';\nimport { LayoutSettings } from '../Settings/LayoutSettings';\nimport { NotificationSettings } from '../Settings/NotificationSettings';\n\nexport const settingOverflow = css({\n flex: '1 1 0',\n pr: '$12',\n mr: '-$12',\n overflowY: 'auto',\n});\n\nexport const settingContent = css({\n display: 'flex',\n flexDirection: 'column',\n '&[hidden]': {\n display: 'none',\n },\n});\n\nexport const settingsList = [\n {\n tabName: 'devices',\n title: 'Device Settings',\n icon: SettingsIcon,\n content: DeviceSettings,\n },\n {\n tabName: 'notifications',\n title: 'Notifications',\n icon: NotificationsIcon,\n content: NotificationSettings,\n },\n {\n tabName: 'layout',\n title: 'Layout',\n icon: GridFourIcon,\n content: LayoutSettings,\n },\n];\n", "import React, { Fragment, useEffect, useRef, useState } from 'react';\nimport {\n DeviceType,\n selectIsLocalVideoEnabled,\n selectLocalVideoTrackID,\n selectVideoTrackByID,\n useDevices,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { MicOnIcon, SpeakerIcon, VideoOnIcon } from '@100mslive/react-icons';\nimport { Box, Button, Dropdown, Flex, StyledVideoTile, Text, Video } from '../../../';\nimport { DialogDropdownTrigger } from '../../primitives/DropdownTrigger';\nimport { useUISettings } from '../AppData/useUISettings';\nimport { useDropdownSelection } from '../hooks/useDropdownSelection';\nimport { settingOverflow } from './common.js';\nimport { UI_SETTINGS } from '../../common/constants';\n\n/**\n * wrap the button on click of whom settings should open, this component will take care of the rest,\n * it'll give the user options to change input/output device as well as check speaker.\n * There is also another controlled way of using this by passing in open and onOpenChange.\n */\nconst Settings = ({ setHide }) => {\n const { allDevices, selectedDeviceIDs, updateDevice } = useDevices();\n const { videoInput, audioInput, audioOutput } = allDevices;\n const videoTrackId = useHMSStore(selectLocalVideoTrackID);\n const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);\n // don't show speaker selector where the API is not supported, and use\n // a generic word(\"Audio\") for Mic. In some cases(Chrome Android for e.g.) this changes both mic and speaker keeping them in sync.\n const shouldShowAudioOutput = 'setSinkId' in HTMLMediaElement.prototype;\n const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);\n const trackSelector = selectVideoTrackByID(videoTrackId);\n const track = useHMSStore(trackSelector);\n\n /**\n * Chromium browsers return an audioOutput with empty label when no permissions are given\n */\n const audioOutputFiltered = audioOutput?.filter(item => !!item.label) ?? [];\n\n if (!videoInput?.length && !audioInput?.length && !audioOutputFiltered?.length) {\n setHide(true);\n }\n\n return (\n <Box className={settingOverflow()}>\n {videoInput?.length ? (\n <Fragment>\n {isVideoOn && (\n <StyledVideoTile.Container\n css={{\n w: '90%',\n px: '$10',\n height: '$48',\n bg: 'transparent',\n m: '$10 auto',\n }}\n >\n <Video trackId={videoTrackId} mirror={track?.facingMode !== 'environment' && mirrorLocalVideo} />\n </StyledVideoTile.Container>\n )}\n <DeviceSelector\n title=\"Video\"\n devices={videoInput}\n icon={<VideoOnIcon />}\n selection={selectedDeviceIDs.videoInput}\n onChange={deviceId =>\n updateDevice({\n deviceId,\n deviceType: DeviceType.videoInput,\n })\n }\n />\n </Fragment>\n ) : null}\n\n {audioInput?.length ? (\n <DeviceSelector\n title={shouldShowAudioOutput ? 'Microphone' : 'Audio'}\n icon={<MicOnIcon />}\n devices={audioInput}\n selection={selectedDeviceIDs.audioInput}\n onChange={deviceId =>\n updateDevice({\n deviceId,\n deviceType: DeviceType.audioInput,\n })\n }\n />\n ) : null}\n\n {audioOutputFiltered?.length && shouldShowAudioOutput ? (\n <DeviceSelector\n title=\"Speaker\"\n icon={<SpeakerIcon />}\n devices={audioOutput}\n selection={selectedDeviceIDs.audioOutput}\n onChange={deviceId =>\n updateDevice({\n deviceId,\n deviceType: DeviceType.audioOutput,\n })\n }\n >\n <TestAudio id={selectedDeviceIDs.audioOutput} />\n </DeviceSelector>\n ) : null}\n </Box>\n );\n};\n\nconst DeviceSelector = ({ title, devices, selection, onChange, icon, children = null }) => {\n const [open, setOpen] = useState(false);\n const selectionBg = useDropdownSelection();\n const ref = useRef(null);\n\n return (\n <Box css={{ mb: '$10' }}>\n <Text css={{ mb: '$4' }}>{title}</Text>\n <Flex\n align=\"center\"\n css={{\n gap: '$4',\n '@md': {\n flexDirection: children ? 'column' : 'row',\n alignItems: children ? 'start' : 'center',\n },\n }}\n >\n <Box\n css={{\n position: 'relative',\n flex: '1 1 0',\n minWidth: 0,\n w: '100%',\n maxWidth: '100%',\n '@md': {\n mb: children ? '$8' : 0,\n },\n }}\n >\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <DialogDropdownTrigger\n ref={ref}\n icon={icon}\n title={devices.find(({ deviceId }) => deviceId === selection)?.label || 'Select device from list'}\n open={open}\n />\n <Dropdown.Portal>\n <Dropdown.Content align=\"start\" sideOffset={8} css={{ w: ref.current?.clientWidth, zIndex: 1001 }}>\n {devices.map(device => {\n return (\n <Dropdown.Item\n key={device.label}\n onSelect={() => onChange(device.deviceId)}\n css={{\n px: '$9',\n bg: device.deviceId === selection ? selectionBg : undefined,\n }}\n >\n {device.label}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n </Box>\n {children}\n </Flex>\n </Box>\n );\n};\n\nconst TEST_AUDIO_URL = 'https://100ms.live/test-audio.wav';\n\nconst TestAudio = ({ id }) => {\n const audioRef = useRef(null);\n const [playing, setPlaying] = useState(false);\n useEffect(() => {\n if (audioRef.current && id) {\n try {\n if (typeof audioRef.current.setSinkId !== 'undefined') {\n audioRef.current.setSinkId(id);\n }\n } catch (error) {\n console.log(error);\n }\n }\n }, [id]);\n return (\n <>\n <Button\n variant=\"standard\"\n css={{\n flexShrink: 0,\n p: '$6 $9',\n '@md': {\n w: '100%',\n },\n }}\n onClick={() => audioRef.current?.play()}\n disabled={playing}\n >\n <SpeakerIcon />\n Test{' '}\n <Text as=\"span\" css={{ display: 'none', '@md': { display: 'inline' } }}>\n speaker\n </Text>\n </Button>\n <audio ref={audioRef} src={TEST_AUDIO_URL} onEnded={() => setPlaying(false)} onPlay={() => setPlaying(true)} />\n </>\n );\n};\n\nexport default Settings;\n", "import React from 'react';\nimport { ChevronDownIcon, ChevronUpIcon } from '@100mslive/react-icons';\nimport { Dropdown, Flex, Text, textEllipsis } from '../../index';\n\nconst DialogDropdownTrigger = React.forwardRef(({ title, css, open, icon, titleCSS = {} }, ref) => {\n return (\n <Dropdown.Trigger\n asChild\n data-testid={`${title}_selector`}\n css={{\n border: '1px solid $border_bright',\n bg: '$surface_bright',\n r: '$1',\n p: '$6 $9',\n zIndex: 10,\n ...css,\n }}\n ref={ref}\n >\n <Flex\n css={{\n display: 'flex',\n justifyContent: 'space-between',\n color: '$on_surface_high',\n w: '100%',\n }}\n >\n {icon}\n <Text\n css={{\n color: 'inherit',\n ...textEllipsis('90%'),\n flex: '1 1 0',\n mx: icon ? '$6' : '0',\n ...titleCSS,\n }}\n >\n {title}\n </Text>\n {open ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </Flex>\n </Dropdown.Trigger>\n );\n});\n\nexport { DialogDropdownTrigger };\n", "export const useDropdownSelection = () => {\n return '$primary_dim';\n};\n", "import React, { useCallback } from 'react';\nimport { selectIsLocalScreenShared, selectIsLocalVideoEnabled, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { Box, Flex, Slider, Text } from '../../../';\nimport SwitchWithLabel from './SwitchWithLabel';\nimport { useSetUiSettings } from '../AppData/useUISettings';\nimport { settingOverflow } from './common.js';\nimport { UI_SETTINGS } from '../../common/constants';\n\nexport const LayoutSettings = () => {\n const hmsActions = useHMSActions();\n const isLocalVideoEnabled = useHMSStore(selectIsLocalVideoEnabled);\n const isLocalScreenShared = useHMSStore(selectIsLocalScreenShared);\n const [{ isAudioOnly, maxTileCount, mirrorLocalVideo }, setUISettings] = useSetUiSettings();\n const toggleIsAudioOnly = useCallback(\n async isAudioOnlyModeOn => {\n if (isAudioOnlyModeOn) {\n // turn off video and screen share if user switches to audio only mode\n isLocalVideoEnabled && (await hmsActions.setLocalVideoEnabled(false));\n isLocalScreenShared && (await hmsActions.setScreenShareEnabled(false));\n }\n setUISettings({ [UI_SETTINGS.isAudioOnly]: isAudioOnlyModeOn });\n },\n [hmsActions, isLocalVideoEnabled, isLocalScreenShared, setUISettings],\n );\n\n return (\n <Box className={settingOverflow()}>\n <SwitchWithLabel label=\"Audio Only Mode\" id=\"audioOnlyMode\" checked={isAudioOnly} onChange={toggleIsAudioOnly} />\n <SwitchWithLabel\n label=\"Mirror Local Video\"\n id=\"mirrorMode\"\n checked={mirrorLocalVideo}\n onChange={value => {\n setUISettings({\n [UI_SETTINGS.mirrorLocalVideo]: value,\n });\n }}\n />\n <Flex align=\"center\" css={{ w: '100%', my: '$2', py: '$8', '@md': { display: 'none' } }}>\n <Text variant=\"md\" css={{ fontWeight: '$semiBold' }}>\n Tiles In View({maxTileCount})\n </Text>\n <Flex justify=\"end\" css={{ flex: '1 1 0' }}>\n <Slider\n step={1}\n value={[maxTileCount]}\n min={1}\n max={49}\n onValueChange={e => {\n setUISettings({ [UI_SETTINGS.maxTileCount]: e[0] });\n }}\n css={{ w: '70%' }}\n />\n </Flex>\n </Flex>\n </Box>\n );\n};\n", "import React from 'react';\nimport { Label } from '../../../Label';\nimport { Flex } from '../../../Layout';\nimport { Switch } from '../../../Switch';\n\nconst SwitchWithLabel = ({ label, icon, id, onChange, checked, hide = false }) => {\n return (\n <Flex\n align=\"center\"\n css={{\n my: '$2',\n py: '$8',\n w: '100%',\n borderBottom: '1px solid $border_default',\n display: hide ? 'none' : 'flex',\n }}\n >\n <Label\n htmlFor={id}\n css={{\n fontSize: '$md',\n fontWeight: '$semiBold',\n color: checked ? '$on_surface_high' : '$on_surface_low',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n gap: '$8',\n flex: '1 1 0',\n }}\n >\n {icon}\n {label}\n </Label>\n <Switch id={id} checked={checked} onCheckedChange={onChange} />\n </Flex>\n );\n};\n\nexport default SwitchWithLabel;\n", "import React from 'react';\nimport { AlertOctagonIcon, HandIcon, PeopleAddIcon, PeopleRemoveIcon } from '@100mslive/react-icons';\nimport { Box } from '../../../';\nimport SwitchWithLabel from './SwitchWithLabel';\nimport { useSetSubscribedNotifications, useSubscribedNotifications } from '../AppData/useUISettings';\nimport { settingOverflow } from './common.js';\nimport { SUBSCRIBED_NOTIFICATIONS } from '../../common/constants';\n\nconst NotificationItem = ({ type, label, icon, checked }) => {\n const [, setSubscribedNotifications] = useSetSubscribedNotifications(type);\n return (\n <SwitchWithLabel\n label={label}\n id={type}\n icon={icon}\n checked={checked}\n onChange={value => {\n setSubscribedNotifications(value);\n }}\n />\n );\n};\n\nexport const NotificationSettings = () => {\n const subscribedNotifications = useSubscribedNotifications();\n\n return (\n <Box className={settingOverflow()}>\n <NotificationItem\n label=\"Peer Joined\"\n type={SUBSCRIBED_NOTIFICATIONS.PEER_JOINED}\n icon={<PeopleAddIcon />}\n checked={subscribedNotifications.PEER_JOINED}\n />\n <NotificationItem\n label=\"Peer Leave\"\n type={SUBSCRIBED_NOTIFICATIONS.PEER_LEFT}\n icon={<PeopleRemoveIcon />}\n checked={subscribedNotifications.PEER_LEFT}\n />\n <NotificationItem\n label=\"Hand Raised\"\n type={SUBSCRIBED_NOTIFICATIONS.METADATA_UPDATED}\n icon={<HandIcon />}\n checked={subscribedNotifications.METADATA_UPDATED}\n />\n <NotificationItem\n label=\"Error\"\n type={SUBSCRIBED_NOTIFICATIONS.ERROR}\n icon={<AlertOctagonIcon />}\n checked={subscribedNotifications.ERROR}\n />\n </Box>\n );\n};\n", "import React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectAudioTrackByPeerID,\n selectHasPeerHandRaised,\n selectIsPeerAudioEnabled,\n selectLocalPeerID,\n selectPeerMetadata,\n selectPeerNameByID,\n selectSessionStore,\n selectTrackAudioByID,\n selectVideoTrackByID,\n selectVideoTrackByPeerID,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { BrbTileIcon, HandIcon, MicOffIcon } from '@100mslive/react-icons';\nimport TileConnection from './Connection/TileConnection';\nimport TileMenu, { isSameTile } from './TileMenu/TileMenu';\nimport { Avatar } from '../../Avatar';\nimport { Box, Flex } from '../../Layout';\nimport { VideoTileStats } from '../../Stats';\nimport { config as cssConfig, keyframes } from '../../Theme';\nimport { Video } from '../../Video';\nimport { StyledVideoTile } from '../../VideoTile';\nimport { getVideoTileLabel } from './peerTileUtils';\nimport { useSetAppDataByKey, useUISettings } from './AppData/useUISettings';\nimport { APP_DATA, SESSION_STORE_KEY, UI_SETTINGS } from '../common/constants';\n\nconst Tile = ({\n peerId,\n trackId,\n width,\n height,\n objectFit = 'cover',\n canMinimise = false,\n isDragabble = false,\n rootCSS = {},\n containerCSS = {},\n enableSpotlightingPeer = true,\n hideParticipantNameOnTile = false,\n roundedVideoTile = true,\n hideAudioMuteOnTile = false,\n hideMetadataOnTile = false,\n}) => {\n const trackSelector = trackId ? selectVideoTrackByID(trackId) : selectVideoTrackByPeerID(peerId);\n const track = useHMSStore(trackSelector);\n const isMobile = useMedia(cssConfig.media.md);\n const peerName = useHMSStore(selectPeerNameByID(peerId));\n const audioTrack = useHMSStore(selectAudioTrackByPeerID(peerId));\n const localPeerID = useHMSStore(selectLocalPeerID);\n const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);\n const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);\n const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);\n const isAudioMuted = !useHMSStore(selectIsPeerAudioEnabled(peerId));\n const isVideoMuted = !track?.enabled;\n const [isMouseHovered, setIsMouseHovered] = useState(false);\n const isVideoDegraded = track?.degraded;\n const isLocal = localPeerID === peerId;\n const [pinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);\n const pinned = isSameTile({\n trackId: pinnedTrackId,\n videoTrackID: track?.id,\n audioTrackID: audioTrack?.id,\n });\n const spotlighted = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT)) === peerId;\n const label = getVideoTileLabel({\n peerName,\n track,\n isLocal,\n });\n const onHoverHandler = useCallback(event => {\n setIsMouseHovered(event.type === 'mouseenter');\n }, []);\n const isTileBigEnoughToShowStats = height >= 180 && width >= 180;\n const avatarSize = useMemo(() => {\n if (!width || !height) {\n return undefined;\n }\n if (width <= 150 || height <= 150) {\n return 'small';\n } else if (width <= 300 || height <= 300) {\n return 'medium';\n }\n return 'large';\n }, [width, height]);\n\n return (\n <StyledVideoTile.Root\n css={{\n width,\n height,\n ...rootCSS,\n }}\n data-testid={`participant_tile_${peerName}`}\n >\n {peerName !== undefined ? (\n <StyledVideoTile.Container\n onMouseEnter={onHoverHandler}\n onMouseLeave={onHoverHandler}\n noRadius={!roundedVideoTile}\n css={containerCSS}\n >\n {showStatsOnTiles && isTileBigEnoughToShowStats ? (\n <VideoTileStats audioTrackID={audioTrack?.id} videoTrackID={track?.id} peerID={peerId} isLocal={isLocal} />\n ) : null}\n\n <Video\n trackId={track?.id}\n attach={isLocal ? undefined : !isAudioOnly}\n mirror={\n mirrorLocalVideo &&\n peerId === localPeerID &&\n track?.source === 'regular' &&\n track?.facingMode !== 'environment'\n }\n noRadius={!roundedVideoTile}\n data-testid=\"participant_video_tile\"\n css={{\n objectFit,\n filter: isVideoDegraded ? 'blur($space$2)' : undefined,\n bg: 'transparent',\n }}\n />\n\n {isVideoMuted || (!isLocal && isAudioOnly) ? (\n <StyledVideoTile.AvatarContainer>\n <Avatar name={peerName || ''} data-testid=\"participant_avatar_icon\" size={avatarSize} />\n </StyledVideoTile.AvatarContainer>\n ) : null}\n\n {!hideAudioMuteOnTile ? (\n isAudioMuted ? (\n <StyledVideoTile.AudioIndicator\n data-testid=\"participant_audio_mute_icon\"\n size={width && height && (width < 180 || height < 180) ? 'small' : 'medium'}\n >\n <MicOffIcon />\n </StyledVideoTile.AudioIndicator>\n ) : (\n <AudioLevel trackId={audioTrack?.id} />\n )\n ) : null}\n {isMouseHovered || (isDragabble && isMobile) ? (\n <TileMenu\n peerID={peerId}\n audioTrackID={audioTrack?.id}\n videoTrackID={track?.id}\n canMinimise={canMinimise}\n enableSpotlightingPeer={enableSpotlightingPeer}\n />\n ) : null}\n {!hideMetadataOnTile && <PeerMetadata peerId={peerId} />}\n\n <TileConnection\n hideLabel={hideParticipantNameOnTile}\n name={label}\n isTile\n peerId={peerId}\n width={width}\n pinned={pinned}\n spotlighted={spotlighted}\n />\n </StyledVideoTile.Container>\n ) : null}\n </StyledVideoTile.Root>\n );\n};\n\nconst metaStyles = { top: '$4', left: '$4', width: '$14', height: '$14' };\n\nconst heightAnimation = value =>\n keyframes({\n '50%': {\n transform: `scale3d(1,${value},1)`,\n },\n '100%': {\n transform: `scale3d(1,1,1)`,\n },\n });\n\nconst AudioLevelIndicator = ({ trackId, value, delay }) => {\n const vanillaStore = useHMSVanillaStore();\n const ref = useRef();\n\n useEffect(() => {\n const unsubscribe = vanillaStore.subscribe(audioLevel => {\n if (ref.current) {\n ref.current.style['animation'] = `${heightAnimation(\n audioLevel ? value : 1,\n )} 0.3s cubic-bezier(0.61, 1, 0.88, 1) infinite ${delay}s`;\n }\n }, selectTrackAudioByID(trackId));\n return unsubscribe;\n }, [vanillaStore, trackId, value, delay]);\n return (\n <Box\n ref={ref}\n css={{\n w: 4,\n height: 6,\n r: 2,\n bg: '$on_primary_high',\n }}\n />\n );\n};\n\nexport const AudioLevel = ({ trackId }) => {\n return (\n <StyledVideoTile.AudioIndicator>\n <Flex align=\"center\" justify=\"center\" css={{ gap: '$2' }}>\n {[3, 2, 3].map((v, i) => (\n <AudioLevelIndicator trackId={trackId} value={v} delay={i * 0.15} key={i} />\n ))}\n </Flex>\n </StyledVideoTile.AudioIndicator>\n );\n};\n\nconst PeerMetadata = ({ peerId }) => {\n const metaData = useHMSStore(selectPeerMetadata(peerId));\n const isBRB = metaData?.isBRBOn || false;\n const isHandRaised = useHMSStore(selectHasPeerHandRaised(peerId));\n\n return (\n <Fragment>\n {isHandRaised ? (\n <StyledVideoTile.AttributeBox css={metaStyles} data-testid=\"raiseHand_icon_onTile\">\n <HandIcon width={24} height={24} />\n </StyledVideoTile.AttributeBox>\n ) : null}\n {isBRB ? (\n <StyledVideoTile.AttributeBox css={metaStyles} data-testid=\"brb_icon_onTile\">\n <BrbTileIcon width={22} height={22} />\n </StyledVideoTile.AttributeBox>\n ) : null}\n </Fragment>\n );\n};\n\nconst VideoTile = React.memo(Tile);\n\nexport default VideoTile;\n", "import React, { useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectLocalPeerID,\n selectPeerByID,\n selectPermissions,\n selectTrackByID,\n selectVideoTrackByPeerID,\n useHMSStore,\n useRemoteAVToggle,\n} from '@100mslive/react-sdk';\nimport { CrossIcon, VerticalMenuIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Sheet } from '../../../Sheet';\nimport { Text } from '../../../Text';\nimport { config as cssConfig, useTheme } from '../../../Theme';\nimport { StyledMenuTile } from '../../../TileMenu';\nimport { ChangeNameModal } from '../MoreSettings/ChangeNameModal';\nimport { TileMenuContent } from './TileMenuContent';\nimport { useDropdownList } from '../hooks/useDropdownList';\n\n/**\n * Taking peerID as peer won't necesarilly have tracks\n */\nconst TileMenu = ({\n audioTrackID,\n videoTrackID,\n peerID,\n isScreenshare = false,\n canMinimise,\n enableSpotlightingPeer = true,\n}) => {\n const [open, setOpen] = useState(false);\n const { theme } = useTheme();\n\n const localPeerID = useHMSStore(selectLocalPeerID);\n const isLocal = localPeerID === peerID;\n const { removeOthers } = useHMSStore(selectPermissions);\n const { setVolume, toggleAudio, toggleVideo } = useRemoteAVToggle(audioTrackID, videoTrackID);\n const showSpotlight = enableSpotlightingPeer;\n\n const isPrimaryVideoTrack = useHMSStore(selectVideoTrackByPeerID(peerID))?.id === videoTrackID;\n const showPinAction = audioTrackID || (videoTrackID && isPrimaryVideoTrack);\n\n const track = useHMSStore(selectTrackByID(videoTrackID));\n const hideSimulcastLayers = !track?.layerDefinitions?.length || track.degraded || !track.enabled;\n const isMobile = useMedia(cssConfig.media.md);\n const peer = useHMSStore(selectPeerByID(peerID));\n const [showNameChangeModal, setShowNameChangeModal] = useState(false);\n useDropdownList({ open, name: 'TileMenu' });\n\n if (!(removeOthers || toggleAudio || toggleVideo || setVolume || showPinAction) && hideSimulcastLayers) {\n return null;\n }\n\n const openNameChangeModal = () => setShowNameChangeModal(true);\n\n const props = {\n isLocal,\n isScreenshare,\n audioTrackID,\n videoTrackID,\n peerID,\n isPrimaryVideoTrack,\n showSpotlight,\n showPinAction,\n canMinimise,\n openNameChangeModal,\n };\n\n return (\n <>\n <StyledMenuTile.Root open={open} onOpenChange={setOpen}>\n <StyledMenuTile.Trigger\n data-testid=\"participant_menu_btn\"\n css={{ bg: `${theme.colors.background_dim.value}A3`, p: '$2', w: 'unset', h: 'unset' }}\n onClick={e => e.stopPropagation()}\n className={isMobile ? '__cancel-drag-event' : ''}\n >\n <VerticalMenuIcon width={20} height={20} />\n </StyledMenuTile.Trigger>\n\n {isMobile ? (\n <Sheet.Root open={open} onOpenChange={setOpen}>\n <Sheet.Content css={{ bg: '$surface_dim', pt: '$8' }}>\n <Flex\n css={{\n color: '$on_surface_high',\n display: 'flex',\n w: '100%',\n justifyContent: 'space-between',\n alignItems: 'center',\n px: '$10',\n pb: '$8',\n borderBottom: '1px solid $border_default',\n }}\n >\n <Box>\n <Text css={{ color: '$on_surface_high', fontWeight: '$semiBold' }}>\n {peer.name}\n {isLocal ? ` (You)` : null}\n </Text>\n {peer?.roleName ? (\n <Text variant=\"xs\" css={{ color: '$on_surface_low', mt: '$2' }}>\n {peer.roleName}\n </Text>\n ) : null}\n </Box>\n\n <Sheet.Close css={{ color: 'inherit' }}>\n <CrossIcon />\n </Sheet.Close>\n </Flex>\n <Box css={{ px: '$8', pb: '$8', maxHeight: '80vh', overflowY: 'auto' }}>\n <TileMenuContent {...props} closeSheetOnClick={() => setOpen(false)} />\n </Box>\n </Sheet.Content>\n </Sheet.Root>\n ) : (\n <StyledMenuTile.Content side=\"top\" align=\"end\" css={{ maxHeight: '$80', overflowY: 'auto' }}>\n <TileMenuContent {...props} />\n </StyledMenuTile.Content>\n )}\n </StyledMenuTile.Root>\n {showNameChangeModal && <ChangeNameModal onOpenChange={setShowNameChangeModal} />}\n </>\n );\n};\n\nexport { isSameTile } from './TileMenuContent';\n\nexport default TileMenu;\n", "import React, { useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { selectLocalPeerName, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { config as cssConfig, Dialog } from '../../../';\nimport { Sheet } from '../../../Sheet';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { ChangeNameContent } from './ChangeNameContent';\nimport { UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\n\nexport const ChangeNameModal = ({ onOpenChange, openParentSheet = null }) => {\n const [previewPreference, setPreviewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW);\n const hmsActions = useHMSActions();\n const localPeerName = useHMSStore(selectLocalPeerName);\n const [currentName, setCurrentName] = useState(localPeerName);\n const isMobile = useMedia(cssConfig.media.md);\n\n const changeName = async () => {\n const name = currentName.trim();\n if (!name || name === localPeerName) {\n return;\n }\n try {\n await hmsActions.changeName(name);\n setPreviewPreference({\n ...(previewPreference || {}),\n name,\n });\n } catch (error) {\n console.error('failed to update name', error);\n ToastManager.addToast({ title: error.message });\n } finally {\n onOpenChange(false);\n }\n };\n\n const props = {\n changeName,\n setCurrentName,\n currentName,\n localPeerName,\n isMobile,\n onExit: () => onOpenChange(false),\n onBackClick: () => {\n onOpenChange(false);\n openParentSheet();\n },\n };\n\n if (isMobile) {\n return (\n <Sheet.Root defaultOpen onOpenChange={onOpenChange}>\n <Sheet.Content css={{ bg: '$surface_dim', p: '$8 0' }}>\n <ChangeNameContent {...props} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ bg: '$surface_dim', width: 'min(400px,80%)', p: '$10' }}>\n <ChangeNameContent {...props} />\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Input } from '../../../Input';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n\nexport const ChangeNameContent = ({\n changeName,\n setCurrentName,\n currentName,\n localPeerName,\n isMobile,\n onExit,\n onBackClick,\n}) => {\n return (\n <form\n onSubmit={async e => {\n e.preventDefault();\n await changeName();\n }}\n >\n <Text\n variant={isMobile ? 'md' : 'lg'}\n css={{\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n display: 'flex',\n pb: '$4',\n '@md': { px: '$8', borderBottom: '1px solid $border_default' },\n }}\n >\n {isMobile ? <ChevronLeftIcon onClick={onBackClick} style={{ marginRight: '0.5rem' }} /> : null}\n Change Name\n <Box\n css={{ color: 'inherit', ml: 'auto', '&:hover': { color: '$on_surface_medium', cursor: 'pointer' } }}\n onClick={onExit}\n >\n <CrossIcon />\n </Box>\n </Text>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', pb: '$6', mb: '$8', '@md': { px: '$8', mt: '$4' } }}>\n Your name will be visible to other participants in the session.\n </Text>\n <Flex justify=\"center\" align=\"center\" css={{ my: '$8', w: '100%', '@md': { px: '$8' } }}>\n <Input\n css={{ width: '100%', bg: '$surface_default' }}\n value={currentName}\n // Prevents popup from showing up on chrome mweb\n type={isMobile ? 'search' : 'text'}\n onChange={e => {\n setCurrentName(e.target.value);\n }}\n autoComplete=\"name\"\n required\n data-testid=\"change_name_field\"\n onKeyDown={async e => {\n if (e.key === 'Enter' && currentName.trim().length > 0 && currentName !== localPeerName) {\n e.preventDefault();\n if (isMobile) {\n return;\n }\n changeName();\n }\n }}\n />\n </Flex>\n\n <Flex\n justify=\"between\"\n align=\"center\"\n css={{\n width: '100%',\n gap: '$md',\n mt: '$10',\n '@md': { px: '$4' },\n }}\n >\n {isMobile ? null : (\n <Button\n variant=\"standard\"\n css={{ w: '100%' }}\n outlined\n type=\"submit\"\n disabled={!localPeerName}\n onClick={onExit}\n >\n Cancel\n </Button>\n )}\n\n <Button\n variant=\"primary\"\n css={{ width: '100%' }}\n type=\"submit\"\n disabled={!currentName.trim() || currentName.trim() === localPeerName}\n data-testid=\"popup_change_btn\"\n >\n Change\n </Button>\n </Flex>\n </form>\n );\n};\n", "import React, { Fragment } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectPermissions,\n selectSessionStore,\n selectTrackByID,\n useCustomEvent,\n useHMSActions,\n useHMSStore,\n useRemoteAVToggle,\n} from '@100mslive/react-sdk';\nimport {\n MicOffIcon,\n MicOnIcon,\n PencilIcon,\n PinIcon,\n RemoveUserIcon,\n ShareScreenIcon,\n ShrinkIcon,\n SpeakerIcon,\n StarIcon,\n VideoOffIcon,\n VideoOnIcon,\n} from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Slider } from '../../../Slider';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\nimport { StyledMenuTile } from '../../../TileMenu';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { useDropdownSelection } from '../hooks/useDropdownSelection';\nimport { APP_DATA, REMOTE_STOP_SCREENSHARE_TYPE, SESSION_STORE_KEY } from '../../common/constants';\n\nexport const isSameTile = ({ trackId, videoTrackID, audioTrackID }) =>\n trackId && ((videoTrackID && videoTrackID === trackId) || (audioTrackID && audioTrackID === trackId));\n\nconst spacingCSS = { '@md': { my: '$8', fontWeight: '$semiBold', fontSize: 'sm' } };\n\nconst SpotlightActions = ({\n peerId,\n onSpotLightClick = () => {\n return;\n },\n}) => {\n const hmsActions = useHMSActions();\n const spotlightPeerId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));\n const isTileSpotlighted = spotlightPeerId === peerId;\n\n const setSpotlightPeerId = peer =>\n hmsActions.sessionStore\n .set(SESSION_STORE_KEY.SPOTLIGHT, peer)\n .catch(err => ToastManager.addToast({ title: err.description }));\n\n return (\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => {\n if (isTileSpotlighted) {\n setSpotlightPeerId();\n } else {\n setSpotlightPeerId(peerId);\n }\n onSpotLightClick();\n }}\n >\n <StarIcon height={20} width={20} />\n <span>{isTileSpotlighted ? 'Remove from Spotlight' : 'Spotlight Tile for everyone'}</span>\n </StyledMenuTile.ItemButton>\n );\n};\n\nconst PinActions = ({ audioTrackID, videoTrackID }) => {\n const [pinnedTrackId, setPinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);\n\n const isTilePinned = isSameTile({\n trackId: pinnedTrackId,\n videoTrackID,\n audioTrackID,\n });\n\n return (\n <>\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => (isTilePinned ? setPinnedTrackId() : setPinnedTrackId(videoTrackID || audioTrackID))}\n >\n <PinIcon height={20} width={20} />\n <span>{isTilePinned ? 'Unpin' : 'Pin'} Tile for myself</span>\n </StyledMenuTile.ItemButton>\n </>\n );\n};\n\nconst MinimiseInset = () => {\n const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);\n\n return (\n <>\n <StyledMenuTile.ItemButton css={spacingCSS} onClick={() => setMinimised(!minimised)}>\n <ShrinkIcon height={20} width={20} />\n <span>{minimised ? 'Show' : 'Minimise'} your video</span>\n </StyledMenuTile.ItemButton>\n </>\n );\n};\n\nconst SimulcastLayers = ({ trackId }) => {\n const track = useHMSStore(selectTrackByID(trackId));\n const actions = useHMSActions();\n const bg = useDropdownSelection();\n if (!track?.layerDefinitions?.length || track.degraded || !track.enabled) {\n return null;\n }\n const currentLayer = track.layerDefinitions.find(layer => layer.layer === track.layer);\n return (\n <Fragment>\n <StyledMenuTile.ItemButton css={{ color: '$on_surface_medium', cursor: 'default' }}>\n Select maximum resolution\n </StyledMenuTile.ItemButton>\n {track.layerDefinitions.map(layer => {\n return (\n <StyledMenuTile.ItemButton\n key={layer.layer}\n onClick={async () => {\n await actions.setPreferredLayer(trackId, layer.layer);\n }}\n css={{\n justifyContent: 'space-between',\n bg: track.preferredLayer === layer.layer ? bg : undefined,\n '&:hover': {\n bg: track.preferredLayer === layer.layer ? bg : undefined,\n },\n }}\n >\n <Text\n as=\"span\"\n css={{\n textTransform: 'capitalize',\n mr: '$2',\n fontWeight: track.preferredLayer === layer.layer ? '$semiBold' : '$regular',\n color: track.preferredLayer === layer.layer ? '$on_primary_high' : '$on_surface_high',\n }}\n >\n {layer.layer}\n </Text>\n <Text\n as=\"span\"\n variant=\"xs\"\n css={{\n color: track.preferredLayer === layer.layer ? '$on_primary_high' : '$on_surface_high',\n }}\n >\n {layer.resolution.width}x{layer.resolution.height}\n </Text>\n </StyledMenuTile.ItemButton>\n );\n })}\n <StyledMenuTile.ItemButton>\n <Text as=\"span\" variant=\"xs\" css={{ color: '$on_surface_medium' }}>\n Currently streaming:\n <Text\n as=\"span\"\n variant=\"xs\"\n css={{\n fontWeight: '$semiBold',\n textTransform: 'capitalize',\n color: '$on_surface_medium',\n ml: '$2',\n }}\n >\n {currentLayer ? (\n <>\n {track.layer} ({currentLayer.resolution.width}x{currentLayer.resolution.height})\n </>\n ) : (\n '-'\n )}\n </Text>\n </Text>\n </StyledMenuTile.ItemButton>\n </Fragment>\n );\n};\n\nexport const TileMenuContent = props => {\n const actions = useHMSActions();\n const { removeOthers } = useHMSStore(selectPermissions);\n const {\n videoTrackID,\n audioTrackID,\n isLocal,\n isScreenshare,\n showSpotlight,\n showPinAction,\n peerID,\n canMinimise,\n closeSheetOnClick = () => {\n return;\n },\n openNameChangeModal = () => {\n return;\n },\n } = props;\n\n const { isAudioEnabled, isVideoEnabled, setVolume, toggleAudio, toggleVideo, volume } = useRemoteAVToggle(\n audioTrackID,\n videoTrackID,\n );\n\n const { sendEvent } = useCustomEvent({\n type: REMOTE_STOP_SCREENSHARE_TYPE,\n });\n\n const isMobile = useMedia(cssConfig.media.md);\n\n return isLocal ? (\n (showPinAction || canMinimise) && (\n <>\n {showPinAction && <PinActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />}\n {showSpotlight && <SpotlightActions peerId={peerID} onSpotLightClick={() => closeSheetOnClick()} />}\n {canMinimise && <MinimiseInset />}\n <StyledMenuTile.ItemButton\n onClick={() => {\n openNameChangeModal();\n closeSheetOnClick();\n }}\n >\n <PencilIcon height={20} width={20} />\n <Text variant=\"sm\" css={{ '@md': { fontWeight: '$semiBold' }, c: '$on_surface_high' }}>\n Change Name\n </Text>\n </StyledMenuTile.ItemButton>\n </>\n )\n ) : (\n <>\n {toggleVideo ? (\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => {\n toggleVideo();\n closeSheetOnClick();\n }}\n data-testid={isVideoEnabled ? 'mute_video_participant_btn' : 'unmute_video_participant_btn'}\n >\n {isVideoEnabled ? <VideoOnIcon height={20} width={20} /> : <VideoOffIcon height={20} width={20} />}\n <span>{isVideoEnabled ? 'Mute' : 'Request Unmute'}</span>\n </StyledMenuTile.ItemButton>\n ) : null}\n\n {toggleAudio ? (\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => {\n toggleAudio();\n closeSheetOnClick();\n }}\n data-testid={isVideoEnabled ? 'mute_audio_participant_btn' : 'unmute_audio_participant_btn'}\n >\n {isAudioEnabled ? <MicOnIcon height={20} width={20} /> : <MicOffIcon height={20} width={20} />}\n <span>{isAudioEnabled ? 'Mute' : 'Request Unmute'}</span>\n </StyledMenuTile.ItemButton>\n ) : null}\n\n {audioTrackID ? (\n <StyledMenuTile.VolumeItem data-testid=\"participant_volume_slider\" css={{ ...spacingCSS, mb: '$0' }}>\n <Flex align=\"center\" gap={1}>\n <SpeakerIcon height={20} width={20} />\n <Box as=\"span\" css={{ ml: '$4' }}>\n Volume ({volume})\n </Box>\n </Flex>\n <Slider css={{ my: '0.5rem' }} step={5} value={[volume]} onValueChange={e => setVolume(e[0])} />\n </StyledMenuTile.VolumeItem>\n ) : null}\n\n {showPinAction && (\n <>\n <PinActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />\n {showSpotlight && <SpotlightActions peerId={peerID} onSpotLightClick={() => closeSheetOnClick()} />}\n </>\n )}\n\n {isMobile ? null : <SimulcastLayers trackId={videoTrackID} />}\n\n {removeOthers ? (\n <StyledMenuTile.RemoveItem\n css={{ ...spacingCSS, borderTop: 'none' }}\n onClick={async () => {\n try {\n await actions.removePeer(peerID, '');\n } catch (error) {\n // TODO: Toast here\n }\n closeSheetOnClick();\n }}\n data-testid=\"remove_participant_btn\"\n >\n <RemoveUserIcon height={20} width={20} />\n <span>Remove Participant</span>\n </StyledMenuTile.RemoveItem>\n ) : null}\n\n {removeOthers && isScreenshare ? (\n <StyledMenuTile.RemoveItem\n onClick={() => {\n sendEvent({});\n closeSheetOnClick();\n }}\n css={spacingCSS}\n >\n <ShareScreenIcon height={20} width={20} />\n <span>Stop Screenshare</span>\n </StyledMenuTile.RemoveItem>\n ) : null}\n </>\n );\n};\n", "import { useEffect } from 'react';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { APP_DATA } from '../../common/constants';\n\nexport const useDropdownList = ({ name, open }) => {\n const [dropdownList = [], setDropdownList] = useSetAppDataByKey(APP_DATA.dropdownList);\n\n useEffect(() => {\n if (open) {\n if (!dropdownList.includes(name)) {\n setDropdownList([...dropdownList, name]);\n }\n } else {\n const index = dropdownList.indexOf(name);\n if (index >= 0) {\n const newDropdownList = [...dropdownList];\n newDropdownList.splice(index, 1);\n setDropdownList(newDropdownList);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, name]);\n};\n", "const PEER_NAME_PLACEHOLDER = 'peerName';\nconst labelMap = new Map([\n [[true, 'screen'].toString(), 'Your Screen'],\n [[true, 'regular'].toString(), `You (${PEER_NAME_PLACEHOLDER})`],\n [[false, 'screen'].toString(), `${PEER_NAME_PLACEHOLDER}'s Screen`],\n [[false, 'regular'].toString(), PEER_NAME_PLACEHOLDER],\n [[true, undefined].toString(), `You (${PEER_NAME_PLACEHOLDER})`],\n [[false, undefined].toString(), `${PEER_NAME_PLACEHOLDER}`],\n]);\n\nexport const getVideoTileLabel = ({ peerName, isLocal, track }) => {\n const isPeerPresent = peerName !== undefined;\n if (!isPeerPresent || !track) {\n // for peers with only audio track\n return isPeerPresent ? labelMap.get([isLocal, undefined].toString()).replace(PEER_NAME_PLACEHOLDER, peerName) : '';\n }\n const isLocallyMuted = track.volume === 0;\n // Map [isLocal, videoSource] to the label to be displayed.\n let label = labelMap.get([isLocal, track.source].toString());\n if (label) {\n label = label.replace(PEER_NAME_PLACEHOLDER, peerName);\n } else {\n label = `${peerName} ${track.source}`;\n }\n // label = `${label}${track.degraded ? '(Degraded)' : ''}`;\n return `${label}${isLocallyMuted ? ' (Muted for you)' : ''}`;\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';\nimport { useRecordingStreaming } from '@100mslive/react-sdk';\nimport { RadioIcon } from '@100mslive/react-icons';\nimport { Button, config as cssConfig, Flex, Input, styled } from '../../..';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\n// @ts-ignore: No implicit Any\nimport { PreviewSettings } from './PreviewJoin';\n\nconst PreviewForm = ({\n name,\n onChange,\n onJoin,\n enableJoin,\n cannotPublishVideo = false,\n cannotPublishAudio = false,\n}: {\n name: string;\n onChange: (name: string) => void;\n onJoin: () => void;\n enableJoin: boolean;\n cannotPublishVideo: boolean;\n cannotPublishAudio: boolean;\n}) => {\n const formSubmit = (e: React.SyntheticEvent) => {\n e.preventDefault();\n };\n const isMobile = useMedia(cssConfig.media.md);\n const { isHLSRunning } = useRecordingStreaming();\n const layout = useRoomLayout();\n const { join_form: joinForm = {} } = layout?.screens?.preview?.default?.elements || {};\n const showGoLive = joinForm?.join_btn_type === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE && !isHLSRunning;\n\n return (\n <Form\n css={{ flexDirection: cannotPublishVideo ? 'column' : 'row', '@md': { flexDirection: 'row' } }}\n onSubmit={formSubmit}\n >\n <Flex align=\"center\" css={{ gap: '$8', w: '100%' }}>\n <Input\n required\n id=\"name\"\n css={{ w: '100%', boxSizing: 'border-box' }}\n value={name}\n onChange={e => onChange(e.target.value.trimStart())}\n placeholder=\"Enter name\"\n autoFocus\n autoComplete=\"name\"\n onKeyDown={e => {\n if (e.key === 'Enter' && name.trim().length > 0) {\n e.preventDefault();\n if (isMobile) {\n return;\n }\n onJoin();\n }\n }}\n />\n {cannotPublishAudio && cannotPublishVideo && !isMobile ? <PreviewSettings /> : null}\n </Flex>\n\n <Button type=\"submit\" icon disabled={!name || !enableJoin} onClick={onJoin}>\n {/* Conditions to show go live: The first broadcaster joins a streaming kit that is not live */}\n {showGoLive ? <RadioIcon height={18} width={18} /> : null}\n {showGoLive ? joinForm.go_live_btn_label : joinForm.join_btn_label}\n </Button>\n </Form>\n );\n};\n\nconst Form = styled('form', {\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n gap: '$8',\n mt: '$10',\n mb: '$10',\n '@md': {\n gap: '$4',\n },\n});\n\nexport default PreviewForm;\n", "import React, { useEffect, useState } from 'react';\nimport { selectIsConnectedToRoom, useHMSStore } from '@100mslive/react-sdk';\nimport { Toast as ToastPrimitive } from '../../../Toast';\nimport { Toast } from './Toast';\nimport { ToastManager } from './ToastManager';\nimport { MAX_TOASTS } from '../../common/constants';\n\nexport const ToastContainer = () => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const [toasts, setToast] = useState([]);\n useEffect(() => {\n ToastManager.addListener(setToast);\n return () => {\n ToastManager.removeListener(setToast);\n };\n }, []);\n return (\n <ToastPrimitive.Provider swipeDirection=\"left\" duration={3000}>\n {toasts.slice(0, MAX_TOASTS).map(toast => {\n return <Toast key={toast.id} {...toast} onOpenChange={value => !value && ToastManager.removeToast(toast.id)} />;\n })}\n <ToastPrimitive.Viewport\n css={{\n position: 'absolute',\n ...(!isConnected ? {} : { bottom: '$24' }),\n }}\n />\n </ToastPrimitive.Provider>\n );\n};\n", "import React from 'react';\nimport { Toast as ToastPrimitive } from '../../../Toast';\n\nexport const Toast = ({ title, description, close = true, open, duration, onOpenChange, icon, ...props }) => {\n return (\n <ToastPrimitive.HMSToast\n title={title}\n description={description}\n open={open}\n isClosable={close}\n onOpenChange={onOpenChange}\n duration={!close ? 600000 : duration}\n icon={icon}\n {...props}\n />\n );\n};\n", "import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectLocalPeerID,\n selectPeerNameByID,\n useCustomEvent,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { config as cssConfig, keyframes } from '../../Theme';\nimport { EMOJI_REACTION_TYPE } from '../common/constants';\n\nlet emojiCount = 1;\n\nconst flyAndFade = keyframes({\n '20%': { opacity: 1 },\n '100%': { bottom: '60%', opacity: 0 },\n});\n\nconst wiggleLeftRight = keyframes({\n '0%': { marginLeft: '-50px' },\n '100%': { marginLeft: '50px' },\n});\n\nconst wiggleRightLeft = keyframes({\n '0%': { marginLeft: '50px' },\n '100%': { marginLeft: '-50px' },\n});\n\nconst getStartingPoints = isMobile => {\n let arr = [];\n const min = 5;\n const max = isMobile ? 30 : 20;\n const inc = isMobile ? 8 : 5;\n for (let i = min; i <= max; i += inc) {\n arr.push(i);\n }\n return arr;\n};\n\nexport function FlyingEmoji() {\n const localPeerId = useHMSStore(selectLocalPeerID);\n const vanillaStore = useHMSVanillaStore();\n const [emojis, setEmojis] = useState([]);\n const isMobile = useMedia(cssConfig.media.md);\n\n const startingPoints = useMemo(() => getStartingPoints(isMobile), [isMobile]);\n\n const showFlyingEmoji = useCallback(\n ({ emojiId, senderId }) => {\n if (!emojiId || !senderId || document.hidden) {\n return;\n }\n const senderPeerName = vanillaStore.getState(selectPeerNameByID(senderId));\n const nameToShow = localPeerId === senderId ? 'You' : senderPeerName;\n const startingPoint = startingPoints[emojiCount % startingPoints.length];\n const id = emojiCount++;\n\n setEmojis(emojis => {\n return [\n ...emojis,\n {\n id: id,\n emojiId: emojiId,\n senderName: nameToShow,\n startingPoint: `${startingPoint}%`,\n wiggleType: Math.random() < 0.5 ? 0 : 1,\n },\n ];\n });\n },\n [localPeerId, vanillaStore, startingPoints],\n );\n\n useCustomEvent({\n type: EMOJI_REACTION_TYPE,\n onEvent: showFlyingEmoji,\n });\n\n useEffect(() => {\n window.showFlyingEmoji = showFlyingEmoji;\n }, [showFlyingEmoji]);\n\n return (\n <Box\n css={{\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n overflow: 'hidden',\n pointerEvents: 'none',\n userSelect: 'none',\n zIndex: 999,\n }}\n >\n {emojis.map(emoji => {\n return (\n <Flex\n key={emoji.id}\n css={{\n left: emoji.startingPoint,\n flexDirection: 'column',\n alignItems: 'center',\n position: 'absolute',\n bottom: 0,\n animation: `${flyAndFade()} 5s forwards, ${\n emoji.wiggleType === 0 ? wiggleLeftRight() : wiggleRightLeft()\n } 1s ease-in-out infinite alternate`,\n }}\n onAnimationEnd={() => {\n setEmojis(emojis.filter(item => item.id !== emoji.id));\n }}\n >\n <Box>\n <em-emoji id={emoji.emojiId} size=\"48px\" set=\"apple\"></em-emoji>\n </Box>\n <Box\n css={{\n width: 'fit-content',\n padding: '$2 $4',\n background: '$surface_bright',\n borderRadius: '$1',\n }}\n >\n <Text\n css={{\n fontSize: '$space$6',\n lineHeight: '$xs',\n color: '$on_surface_high',\n }}\n >\n {emoji.senderName}\n </Text>\n </Box>\n </Flex>\n );\n })}\n </Box>\n );\n}\n", "import React, { useCallback } from 'react';\nimport { useCustomEvent, useHMSActions } from '@100mslive/react-sdk';\nimport { REMOTE_STOP_SCREENSHARE_TYPE } from '../common/constants';\n\nexport function RemoteStopScreenshare() {\n const actions = useHMSActions();\n\n const onRemoteStopScreenshare = useCallback(async () => {\n await actions.setScreenShareEnabled(false);\n }, [actions]);\n\n useCustomEvent({\n type: REMOTE_STOP_SCREENSHARE_TYPE,\n onEvent: onRemoteStopScreenshare,\n });\n\n return <></>;\n}\n", "import { useCallback, useEffect, useRef } from 'react';\nimport {\n HMSException,\n selectIsConnectedToRoom,\n selectPermissions,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { useShowStreamingUI } from '../../common/hooks';\n// @ts-ignore: No implicit Any\nimport { APP_DATA } from '../../common/constants';\n\nexport const useAutoStartStreaming = () => {\n const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);\n const permissions = useHMSStore(selectPermissions);\n const showStreamingUI = useShowStreamingUI();\n const hmsActions = useHMSActions();\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const { isHLSRunning } = useRecordingStreaming();\n const streamStartedRef = useRef(false);\n\n const startHLS = useCallback(async () => {\n try {\n if (isHLSStarted || !showStreamingUI || isHLSRunning) {\n return;\n }\n setHLSStarted(true);\n streamStartedRef.current = true;\n await hmsActions.startHLSStreaming();\n } catch (error) {\n if ((error as HMSException).message?.includes('beam already started')) {\n return;\n }\n streamStartedRef.current = false;\n setHLSStarted(false);\n }\n }, [hmsActions, isHLSRunning, isHLSStarted, setHLSStarted, showStreamingUI]);\n\n useEffect(() => {\n if (!isHLSStarted && !isHLSRunning) {\n streamStartedRef.current = false;\n }\n }, [isHLSStarted, isHLSRunning]);\n\n useEffect(() => {\n if (!isConnected || streamStartedRef.current || !permissions?.hlsStreaming) {\n return;\n }\n // Is a streaming kit and broadcaster joins\n startHLS();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isConnected]);\n};\n", "// @ts-check\nimport { useEffect, useRef, useState } from 'react';\nimport { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';\nimport {\n selectAvailableRoleNames,\n selectIsConnectedToRoom,\n selectPeerCount,\n selectPeerMetadata,\n selectPeers,\n selectRemotePeers,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { useRoomLayout } from '../provider/roomLayoutProvider';\n\n/**\n * Hook to execute a callback when alone in room(after a certain 5d of time)\n * @param {number} thresholdMs The threshold(in ms) after which the callback is executed,\n * starting from the instant when alone in room.\n * note: the cb is not called when another peer joins during this period.\n */\nexport const useWhenAloneInRoom = (thresholdMs = 5 * 60 * 1000) => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const peerCount = useHMSStore(selectPeerCount);\n const [aloneForLong, setAloneForLong] = useState(false);\n const cbTimeout = useRef(null);\n const alone = isConnected && peerCount === 1;\n\n useEffect(() => {\n if (alone && !cbTimeout.current) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n cbTimeout.current = setTimeout(() => {\n setAloneForLong(true);\n }, thresholdMs);\n } else if (!alone) {\n cbTimeout.current && clearTimeout(cbTimeout.current);\n cbTimeout.current = null;\n setAloneForLong(false);\n }\n }, [alone, thresholdMs]);\n\n useEffect(() => {\n return () => {\n if (cbTimeout.current) {\n clearTimeout(cbTimeout.current);\n }\n };\n }, []);\n\n return { alone, aloneForLong };\n};\n\nexport const useFilteredRoles = () => {\n const roles = useHMSStore(selectAvailableRoleNames);\n return roles;\n};\n\nexport const useShowStreamingUI = () => {\n const layout = useRoomLayout();\n const { join_form } = layout?.screens?.preview?.default?.elements || {};\n return join_form?.join_btn_type === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE;\n};\n\n// The search results should not have role name matches\nexport const useParticipants = params => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const peerCount = useHMSStore(selectPeerCount);\n const availableRoles = useHMSStore(selectAvailableRoleNames);\n let participantList = useHMSStore(isConnected ? selectPeers : selectRemotePeers);\n const rolesWithParticipants = Array.from(new Set(participantList.map(peer => peer.roleName)));\n const vanillaStore = useHMSVanillaStore();\n if (params?.metadata?.isHandRaised) {\n participantList = participantList.filter(peer => {\n return vanillaStore.getState(selectPeerMetadata(peer.id)).isHandRaised;\n });\n }\n if (params?.role && availableRoles.includes(params.role)) {\n participantList = participantList.filter(peer => peer.roleName === params.role);\n }\n if (params?.search) {\n const search = params.search;\n // Removed peer.roleName?.toLowerCase().includes(search)\n participantList = participantList.filter(peer => peer.name.toLowerCase().includes(search));\n }\n return { participants: participantList, isConnected, peerCount, rolesWithParticipants };\n};\n", "import { Indicator, Root } from '@radix-ui/react-progress';\nimport { styled } from '../Theme';\n\nconst StyledIndicator = styled(Indicator, { h: '$4', backgroundColor: '$primary_default' });\n\nconst StyledRoot = styled(Root, {\n w: '100%',\n h: '$4',\n borderRadius: '$round',\n backgroundColor: '$secondary_dim',\n overflow: 'hidden',\n});\n\nexport const Progress = {\n Root: StyledRoot,\n Content: StyledIndicator,\n};\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,YAAyD;;;ACAhE,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oC,GACxG,cACC,gBAAAA,QAAA,cAAC,cACC,gBAAAA,QAAA,cAAC,SAAM,MAAK,MAAK,SAAS,gBAAAA,QAAA,cAAC,eAAU,GAAI,CAC3C,CAEJ,CACF;AAEJ;;;A4ExWA,SAAS,aAAAY,YAAW,QAAAC,cAAY;AAGhC,IAAM,kBAAkB,OAAOC,YAAW,EAAE,GAAG,MAAM,iBAAiB,mBAAmB,CAAC;AAE1F,IAAMC,cAAa,OAAOC,QAAM;AAAA,EAC9B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,UAAU;AACZ,CAAC;AAEM,IAAM,WAAW;AAAA,EACtB,MAAMD;AAAA,EACN,SAAS;AACX;",
|
6
|
-
"names": ["React", "useEffect", "useState", "ThemeTypes", "useState", "isBrowser", "updatedTheme", "useEffect", "React", "_a", "_b", "React", "_a", "_b", "_a", "_b", "css", "React", "React", "React", "React", "Root", "_a", "React", "React", "Root", "Track", "Range", "Thumb", "_a", "_b", "React", "Root", "styled", "React", "React", "styled", "Root", "React", "_a", "_b", "css", "React", "Root", "Overlay", "Root", "Container", "Root", "Content", "Portal", "Root", "Trigger", "Root", "Trigger", "Content", "Portal", "React", "_a", "_b", "React", "Root", "Flex", "useCallback", "useRef", "theme", "useCallback", "useRef", "Arrow", "Close", "Content", "Root", "Portal", "Trigger", "StyledContent", "Content", "Arrow", "StyledTrigger", "Trigger", "Popover", "Root", "Portal", "Close", "React", "Root", "Label", "_a", "_b", "React", "Label", "React", "CrossIcon", "css", "React", "CrossIcon", "_a", "_b", "React", "StyledTrigger", "StyledContent", "React", "_a", "_b", "css", "Root", "Select", "StyledTrigger", "StyledContent", "StyledItem", "Select", "StyledTrigger", "StyledContent", "React", "React", "React", "_a", "_b", "Icon", "React", "Content", "Root", "Trigger", "Root", "Trigger", "Content", "React", "Suspense", "useEffect", "useRef", "useParams", "selectIsConnectedToRoom", "useHMSActions", "useHMSStore", "React", "useEffect", "useHMSActions", "useHMSStore", "_a", "roleName", "useState", "useCallback", "useHMSStore", "_a", "_b", "useHMSStore", "useCallback", "useCallback", "selectAppData", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "useHMSStore", "selectAppData", "useHMSStore", "selectAppData", "_a", "_b", "useHMSActions", "useCallback", "value", "useHMSVanillaStore", "React", "useHMSActions", "useHMSStore", "useEffect", "appData", "config", "React", "useEffect", "useState", "useHMSActions", "React", "React", "useRef", "CrossIcon", "_a", "_b", "Icon", "css", "React", "CrossIcon", "Label", "_a", "_b", "useRef", "React", "React", "useHMSActions", "useState", "useEffect", "error", "Link", "React", "CopyIcon", "React", "CopyIcon", "React", "css", "React", "React", "useEffect", "useEffect", "useHMSStore", "useHMSStore", "useEffect", "useEffect", "_a", "React", "useEffect", "selectAppData", "useHMSActions", "useHMSVanillaStore", "selectAppData", "useHMSVanillaStore", "useHMSActions", "useEffect", "React", "useCallback", "useEffect", "useNavigate", "useParams", "HMSNotificationTypes", "HMSRoomState", "selectRoomState", "useHMSNotifications", "useHMSStore", "useHMSVanillaStore", "React", "useCallback", "useEffect", "useRef", "useState", "useState", "useRef", "useCallback", "_a", "layout", "useEffect", "_b", "React", "_a", "React", "useCallback", "useHMSActions", "useHMSStore", "React", "_a", "_b", "useHMSActions", "useHMSStore", "useCallback", "React", "React", "React", "useEffect", "useState", "useState", "useEffect", "React", "useEffect", "useEffect", "React", "useEffect", "useState", "HMSNotificationTypes", "useHMSNotifications", "useHMSNotifications", "HMSNotificationTypes", "useState", "useEffect", "_a", "_b", "React", "React", "useEffect", "useState", "HMSNotificationTypes", "useHMSNotifications", "notificationTypes", "HMSNotificationTypes", "useHMSNotifications", "useState", "useEffect", "_a", "React", "React", "useEffect", "useState", "HMSNotificationTypes", "useHMSActions", "useHMSNotifications", "useHMSActions", "useState", "useHMSNotifications", "HMSNotificationTypes", "useEffect", "React", "useEffect", "HMSNotificationTypes", "useHMSNotifications", "notificationTypes", "React", "useEffect", "useState", "HMSNotificationTypes", "useHMSActions", "useHMSNotifications", "MicOnIcon", "useHMSActions", "useHMSNotifications", "HMSNotificationTypes", "useState", "useEffect", "React", "MicOnIcon", "useCallback", "_a", "_a", "_b", "useCallback", "useHMSNotifications", "useNavigate", "useParams", "useHMSStore", "selectRoomState", "useHMSVanillaStore", "useCallback", "useEffect", "_a", "_b", "HMSNotificationTypes", "HMSRoomState", "React", "React", "useNavigate", "useParams", "React", "useMedia", "HMSRoomState", "selectRoomState", "useHMSStore", "React", "useEffect", "useState", "useHMSStore", "useHMSStore", "React", "_a", "useState", "useEffect", "React", "useCallback", "useEffect", "useRef", "useState", "useMedia", "HMSRoomState", "selectHLSState", "selectIsConnectedToRoom", "selectRoomState", "useHMSActions", "useHMSStore", "useRecordingStreaming", "CrossIcon", "React", "DialogPrimitive", "StyledContent", "React", "_a", "_b", "React", "useState", "selectLocalPeerID", "useHMSStore", "ChevronDownIcon", "ChevronUpIcon", "useCallback", "useEffect", "useMemo", "selectLocalPeerID", "useHMSStore", "useCallback", "selectHasPeerHandRaised", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "selectHasPeerHandRaised", "useCallback", "useHMSStore", "selectLocalPeerID", "useMemo", "useCallback", "useEffect", "useCallback", "useHMSActions", "useHMSStore", "useHMSStore", "useHMSActions", "useCallback", "useCallback", "useHMSActions", "useHMSStore", "_a", "_b", "useState", "useHMSStore", "selectLocalPeerID", "React", "ChevronUpIcon", "ChevronDownIcon", "_a", "useRecordingStreaming", "useHMSStore", "selectHLSState", "useMedia", "useRef", "useState", "useCallback", "useEffect", "React", "useHMSActions", "Popover", "selectIsConnectedToRoom", "selectRoomState", "HMSRoomState", "CrossIcon", "React", "selectIsLocalVideoEnabled", "useHMSActions", "useHMSStore", "CheckIcon", "CrossIcon", "useHMSActions", "useHMSStore", "selectIsLocalVideoEnabled", "React", "_a", "CrossIcon", "Label", "CheckIcon", "Header", "useHMSStore", "selectRoomState", "useMedia", "HMSRoomState", "React", "useNavigate", "useParams", "React", "Header", "React", "useNavigate", "useParams", "React", "Fragment", "useCallback", "useEffect", "useState", "useMedia", "HMSRoomState", "selectIsLocalVideoEnabled", "selectRoomState", "selectVideoTrackByID", "useAVToggle", "useHMSStore", "useRecordingStreaming", "MicOffIcon", "SettingsIcon", "React", "Fragment", "DeviceType", "HMSRoomState", "selectLocalVideoTrackID", "selectRoomState", "selectVideoTrackByID", "useDevices", "useHMSActions", "useHMSStore", "CameraFlipIcon", "MicOnIcon", "React", "React", "useDevices", "videoInput", "React", "DeviceType", "audioInput", "useHMSActions", "useHMSStore", "selectLocalVideoTrackID", "selectVideoTrackByID", "selectRoomState", "Fragment", "MicOnIcon", "HMSRoomState", "CameraFlipIcon", "React", "React", "React", "React", "selectConnectionQualityByPeerID", "useHMSStore", "PoorConnectivityIcon", "theme", "_a", "useHMSStore", "selectConnectionQualityByPeerID", "theme", "React", "PoorConnectivityIcon", "React", "Wrapper", "React", "useCallback", "useEffect", "useState", "useMedia", "CrossIcon", "React", "Fragment", "useEffect", "useRef", "useState", "DeviceType", "selectIsLocalVideoEnabled", "selectLocalVideoTrackID", "selectVideoTrackByID", "useDevices", "useHMSStore", "MicOnIcon", "SpeakerIcon", "VideoOnIcon", "React", "ChevronDownIcon", "ChevronUpIcon", "React", "css", "ChevronUpIcon", "ChevronDownIcon", "_a", "useDevices", "useHMSStore", "selectLocalVideoTrackID", "selectIsLocalVideoEnabled", "selectVideoTrackByID", "React", "Fragment", "VideoOnIcon", "DeviceType", "MicOnIcon", "SpeakerIcon", "_b", "useState", "useRef", "useEffect", "React", "useCallback", "selectIsLocalVideoEnabled", "useHMSActions", "useHMSStore", "React", "React", "Label", "useHMSActions", "useHMSStore", "selectIsLocalVideoEnabled", "useCallback", "React", "React", "HandIcon", "PeopleAddIcon", "PeopleRemoveIcon", "React", "PeopleAddIcon", "PeopleRemoveIcon", "HandIcon", "React", "useMedia", "useState", "useCallback", "useEffect", "_a", "CrossIcon", "Icon", "Content", "React", "Fragment", "useCallback", "useEffect", "useMemo", "useRef", "useState", "useMedia", "selectAudioTrackByPeerID", "selectHasPeerHandRaised", "selectLocalPeerID", "selectPeerMetadata", "selectSessionStore", "selectVideoTrackByID", "selectVideoTrackByPeerID", "useHMSStore", "useHMSVanillaStore", "HandIcon", "MicOffIcon", "React", "useState", "useMedia", "selectLocalPeerID", "selectPeerByID", "selectPermissions", "selectTrackByID", "selectVideoTrackByPeerID", "useHMSStore", "useRemoteAVToggle", "CrossIcon", "VerticalMenuIcon", "React", "useState", "useMedia", "useHMSActions", "useHMSStore", "React", "ChevronLeftIcon", "CrossIcon", "React", "ChevronLeftIcon", "CrossIcon", "useHMSActions", "useHMSStore", "useState", "useMedia", "React", "React", "Fragment", "useMedia", "selectPermissions", "selectSessionStore", "selectTrackByID", "useCustomEvent", "useHMSActions", "useHMSStore", "MicOffIcon", "MicOnIcon", "PinIcon", "ShareScreenIcon", "SpeakerIcon", "VideoOffIcon", "VideoOnIcon", "useHMSActions", "useHMSStore", "selectSessionStore", "React", "PinIcon", "_a", "selectTrackByID", "Fragment", "selectPermissions", "useCustomEvent", "useMedia", "VideoOnIcon", "VideoOffIcon", "MicOnIcon", "MicOffIcon", "SpeakerIcon", "ShareScreenIcon", "useEffect", "useEffect", "_a", "_b", "useState", "theme", "useHMSStore", "selectLocalPeerID", "selectPermissions", "useRemoteAVToggle", "selectVideoTrackByPeerID", "selectTrackByID", "useMedia", "selectPeerByID", "React", "VerticalMenuIcon", "CrossIcon", "selectVideoTrackByID", "selectVideoTrackByPeerID", "useHMSStore", "useMedia", "selectAudioTrackByPeerID", "selectLocalPeerID", "useState", "selectSessionStore", "useCallback", "useMemo", "React", "MicOffIcon", "useHMSVanillaStore", "useRef", "useEffect", "selectPeerMetadata", "selectHasPeerHandRaised", "Fragment", "HandIcon", "React", "useMedia", "JoinForm_JoinBtnType", "useRecordingStreaming", "_a", "_b", "useMedia", "useRecordingStreaming", "JoinForm_JoinBtnType", "React", "React", "_a", "_b", "useRecordingStreaming", "useState", "useAVToggle", "useHMSStore", "selectRoomState", "useCallback", "selectVideoTrackByID", "useMedia", "useEffect", "HMSRoomState", "Container", "selectIsLocalVideoEnabled", "MicOffIcon", "Fragment", "SettingsIcon", "_a", "_b", "useNavigate", "useParams", "React", "React", "useEffect", "useState", "selectIsConnectedToRoom", "useHMSStore", "React", "Toast", "_a", "_b", "React", "useHMSStore", "selectIsConnectedToRoom", "useState", "useEffect", "React", "Toast", "React", "useCallback", "useEffect", "useMemo", "useState", "useMedia", "selectLocalPeerID", "selectPeerNameByID", "useCustomEvent", "useHMSStore", "useHMSVanillaStore", "useHMSStore", "selectLocalPeerID", "useHMSVanillaStore", "useState", "useMedia", "useMemo", "useCallback", "selectPeerNameByID", "emojis", "useCustomEvent", "useEffect", "React", "React", "useCallback", "useCustomEvent", "useHMSActions", "useHMSActions", "useCallback", "useCustomEvent", "React", "useCallback", "useEffect", "useRef", "selectIsConnectedToRoom", "selectPermissions", "useHMSActions", "useHMSStore", "useRecordingStreaming", "useEffect", "useRef", "useState", "JoinForm_JoinBtnType", "selectAvailableRoleNames", "selectIsConnectedToRoom", "selectPeerMetadata", "useHMSStore", "useHMSVanillaStore", "useHMSStore", "selectAvailableRoleNames", "_a", "_b", "JoinForm_JoinBtnType", "useParticipants", "selectIsConnectedToRoom", "useHMSVanillaStore", "selectPeerMetadata", "useHMSStore", "selectPermissions", "useHMSActions", "selectIsConnectedToRoom", "useRecordingStreaming", "useRef", "useCallback", "_a", "useEffect", "React", "_a", "_b", "useRef", "useEffect", "theme", "typography", "useParams", "Suspense", "useHMSStore", "selectIsConnectedToRoom", "useHMSActions", "Indicator", "Root", "Indicator", "StyledRoot", "Root"]
|
7
|
-
}
|