@100mslive/roomkit-react 0.3.14-alpha.8 → 0.3.14-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,7 +107,7 @@ var __async = (__this, __arguments, generator) => {
107
107
  var define_process_env_default;
108
108
  var init_define_process_env = __esm({
109
109
  "<define:process.env>"() {
110
- define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_27575a21-5737-454e-8e27-786155458b41", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.4-alpha.8", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.3 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.14-alpha.8", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_27575a21-5737-454e-8e27-786155458b41", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.14-alpha.8", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "593", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240616.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:16135", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.14-alpha.8", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9613734740", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "16a110b525265ba74c72960c828e6ce933df52cf", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "b1fde51e3dfa43537b62c313ed425931ffc6c01ee0651880125bf51b6a28d58c", npm_package_exports___import: "./dist/index.js", STATS_BLT: "true", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1718973604964-0.10726757358908445:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718973604770-0.33744061216691046:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718973579202-0.226299014918115:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718973579021-0.0699281435738186:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_7ad3cca2-cc6f-4b07-8c13-cddbd3cd61ad", INVOCATION_ID: "19e1902fb66a4b0faa182d54d9c9486b", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "585", GITHUB_TRIGGERING_ACTOR: "github-actions[bot]", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 374", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "publish-alpha", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.14-alpha.8", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.14-alpha.8", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "16a110b525265ba74c72960c828e6ce933df52cf", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/publish-alpha", GITHUB_ACTOR: "github-actions[bot]", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_27575a21-5737-454e-8e27-786155458b41", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "41898282", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_27575a21-5737-454e-8e27-786155458b41", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_27575a21-5737-454e-8e27-786155458b41" };
110
+ define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_64e68346-fe70-4da2-95d3-209214f9bdaf", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.4-alpha.9", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.3 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.14-alpha.9", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_64e68346-fe70-4da2-95d3-209214f9bdaf", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.14-alpha.9", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "592", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240616.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:16186", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.14-alpha.9", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9643076846", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "3caf5ae1abb71e5e7dede48bc4b9b8dfa5a25a8a", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "45931fde6bf77d2d1cd3b95a11a2f9c9943817998bd64fda1e0d9d0cbbf7acbf", npm_package_exports___import: "./dist/index.js", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1719221877947-0.7338311406643205:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719221877752-0.7893639730050881:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719221852672-0.07427928548185037:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719221852496-0.7880008360495065:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_b19dd9ee-c4a0-4f55-ae8f-3ea51e07fb3d", INVOCATION_ID: "0c5c352daeb1430cbd335645819f2fd5", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "586", GITHUB_TRIGGERING_ACTOR: "github-actions[bot]", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 469", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "publish-alpha", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.14-alpha.9", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.14-alpha.9", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "3caf5ae1abb71e5e7dede48bc4b9b8dfa5a25a8a", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/publish-alpha", GITHUB_ACTOR: "github-actions[bot]", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_64e68346-fe70-4da2-95d3-209214f9bdaf", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "41898282", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_64e68346-fe70-4da2-95d3-209214f9bdaf", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_64e68346-fe70-4da2-95d3-209214f9bdaf" };
111
111
  }
112
112
  });
113
113
 
@@ -20327,7 +20327,7 @@ function create(createState) {
20327
20327
  var vanilla_default = create;
20328
20328
 
20329
20329
  // ../hms-video-store/dist/index.js
20330
- var Kt = __toESM(require_lib());
20330
+ var $t = __toESM(require_lib());
20331
20331
  import { EventEmitter2 as en2 } from "eventemitter2";
20332
20332
  import { v4 as on2 } from "uuid";
20333
20333
  import { EventEmitter2 as nn2 } from "eventemitter2";
@@ -20337,7 +20337,7 @@ import { v4 as pn2 } from "uuid";
20337
20337
  var qa = Object.defineProperty;
20338
20338
  var ja = Object.defineProperties;
20339
20339
  var Ja = Object.getOwnPropertyDescriptors;
20340
- var ei = Object.getOwnPropertySymbols;
20340
+ var Zt = Object.getOwnPropertySymbols;
20341
20341
  var Qa = Object.getPrototypeOf;
20342
20342
  var is = Object.prototype.hasOwnProperty;
20343
20343
  var rs = Object.prototype.propertyIsEnumerable;
@@ -20346,8 +20346,8 @@ var ts = (a11, e, t2) => e in a11 ? qa(a11, e, { enumerable: true, configurable:
20346
20346
  var m = (a11, e) => {
20347
20347
  for (var t2 in e || (e = {}))
20348
20348
  is.call(e, t2) && ts(a11, t2, e[t2]);
20349
- if (ei)
20350
- for (var t2 of ei(e))
20349
+ if (Zt)
20350
+ for (var t2 of Zt(e))
20351
20351
  rs.call(e, t2) && ts(a11, t2, e[t2]);
20352
20352
  return a11;
20353
20353
  };
@@ -20356,8 +20356,8 @@ var mr = (a11, e) => {
20356
20356
  var t2 = {};
20357
20357
  for (var i2 in a11)
20358
20358
  is.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
20359
- if (a11 != null && ei)
20360
- for (var i2 of ei(a11))
20359
+ if (a11 != null && Zt)
20360
+ for (var i2 of Zt(a11))
20361
20361
  e.indexOf(i2) < 0 && rs.call(a11, i2) && (t2[i2] = a11[i2]);
20362
20362
  return t2;
20363
20363
  };
@@ -20380,37 +20380,37 @@ var c2 = (a11, e, t2) => new Promise((i2, r2) => {
20380
20380
  n2((t2 = t2.apply(a11, e)).next());
20381
20381
  });
20382
20382
  var Mr = Ya((Vc, oo) => {
20383
- oo.exports = { version: "0.12.14-alpha.8", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
20383
+ oo.exports = { version: "0.12.14-alpha.9", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
20384
20384
  });
20385
20385
  var Sr = ((n2) => (n2.Disconnected = "Disconnected", n2.Preview = "Preview", n2.Connecting = "Connecting", n2.Connected = "Connected", n2.Reconnecting = "Reconnecting", n2.Disconnecting = "Disconnecting", n2.Failed = "Failed", n2))(Sr || {});
20386
- var ti = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
20387
- var ii = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20386
+ var ei = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
20387
+ var ti = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20388
20388
  var Xa = ((e) => (e.CHAT = "chat", e))(Xa || {});
20389
20389
  var ss = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(ss || {});
20390
20390
  var gr = ((D2) => (D2.PEER_JOINED = "PEER_JOINED", D2.PEER_LEFT = "PEER_LEFT", D2.PEER_LIST = "PEER_LIST", D2.NEW_MESSAGE = "NEW_MESSAGE", D2.ERROR = "ERROR", D2.RECONNECTING = "RECONNECTING", D2.RECONNECTED = "RECONNECTED", D2.TRACK_ADDED = "TRACK_ADDED", D2.TRACK_REMOVED = "TRACK_REMOVED", D2.TRACK_MUTED = "TRACK_MUTED", D2.TRACK_UNMUTED = "TRACK_UNMUTED", D2.TRACK_DEGRADED = "TRACK_DEGRADED", D2.TRACK_RESTORED = "TRACK_RESTORED", D2.TRACK_DESCRIPTION_CHANGED = "TRACK_DESCRIPTION_CHANGED", D2.ROLE_UPDATED = "ROLE_UPDATED", D2.CHANGE_TRACK_STATE_REQUEST = "CHANGE_TRACK_STATE_REQUEST", D2.CHANGE_MULTI_TRACK_STATE_REQUEST = "CHANGE_MULTI_TRACK_STATE_REQUEST", D2.ROOM_ENDED = "ROOM_ENDED", D2.REMOVED_FROM_ROOM = "REMOVED_FROM_ROOM", D2.DEVICE_CHANGE_UPDATE = "DEVICE_CHANGE_UPDATE", D2.PLAYLIST_TRACK_ENDED = "PLAYLIST_TRACK_ENDED", D2.NAME_UPDATED = "NAME_UPDATED", D2.METADATA_UPDATED = "METADATA_UPDATED", D2.POLL_CREATED = "POLL_CREATED", D2.POLL_STARTED = "POLL_STARTED", D2.POLL_STOPPED = "POLL_STOPPED", D2.POLL_VOTES_UPDATED = "POLL_VOTES_UPDATED", D2.POLLS_LIST = "POLLS_LIST", D2.HAND_RAISE_CHANGED = "HAND_RAISE_CHANGED", D2.TRANSCRIPTION_STATE_UPDATED = "TRANSCRIPTION_STATE_UPDATED", D2))(gr || {});
20391
20391
  var as = ((t2) => (t2.audio = "audio", t2.video = "video", t2))(as || {});
20392
- function Ue(a11, e) {
20392
+ function xe(a11, e) {
20393
20393
  let t2, i2;
20394
20394
  if (e)
20395
20395
  for (let r2 of e.auxiliaryTracks) {
20396
20396
  let s2 = a11[r2];
20397
- Za(s2) && (i2 = pt(s2) ? s2 : i2, t2 = ht(s2) ? s2 : t2);
20397
+ Za(s2) && (i2 = ut(s2) ? s2 : i2, t2 = pt(s2) ? s2 : t2);
20398
20398
  }
20399
20399
  return { video: t2, audio: i2 };
20400
20400
  }
20401
- function pt(a11) {
20401
+ function ut(a11) {
20402
20402
  return a11 && a11.type === "audio";
20403
20403
  }
20404
- function ht(a11) {
20404
+ function pt(a11) {
20405
20405
  return a11 && a11.type === "video";
20406
20406
  }
20407
20407
  function Za(a11) {
20408
20408
  return a11 && a11.source === "screen";
20409
20409
  }
20410
- function ri(a11) {
20410
+ function ii(a11) {
20411
20411
  return a11 && a11.source === "audioplaylist";
20412
20412
  }
20413
- function mt(a11) {
20413
+ function ht(a11) {
20414
20414
  return a11 && a11.source === "videoplaylist";
20415
20415
  }
20416
20416
  function os(a11) {
@@ -20422,7 +20422,7 @@ function je(a11, e) {
20422
20422
  function ns(a11, e) {
20423
20423
  return e && a11.tracks[e] ? a11.tracks[e].displayEnabled : false;
20424
20424
  }
20425
- function St(a11) {
20425
+ function mt(a11) {
20426
20426
  var r2;
20427
20427
  let e = false, t2 = false, i2 = false;
20428
20428
  return (r2 = a11 == null ? void 0 : a11.publishParams) != null && r2.allowed && (e = a11.publishParams.allowed.includes("video"), t2 = a11.publishParams.allowed.includes("audio"), i2 = a11.publishParams.allowed.includes("screen")), { video: e, audio: t2, screen: i2 };
@@ -20507,8 +20507,8 @@ var Je = class {
20507
20507
  var ge = new import_ua_parser_js.UAParser();
20508
20508
  var O2 = typeof window != "undefined";
20509
20509
  var ds;
20510
- var Be = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
20511
- var io = () => !Be;
20510
+ var Ue = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
20511
+ var io = () => !Ue;
20512
20512
  var tc = io();
20513
20513
  var Te = () => ge.getDevice().type === "mobile";
20514
20514
  var ps = () => typeof document != "undefined" && document.hidden;
@@ -20519,7 +20519,7 @@ var Tr = () => {
20519
20519
  var ls;
20520
20520
  var us;
20521
20521
  var hs = ((us = (ls = ge.getBrowser()) == null ? void 0 : ls.name) == null ? void 0 : us.toLowerCase()) === "firefox";
20522
- var si = (a11) => a11 ? `{
20522
+ var ri = (a11) => a11 ? `{
20523
20523
  trackId: ${a11.id};
20524
20524
  kind: ${a11.kind};
20525
20525
  enabled: ${a11.enabled};
@@ -20565,7 +20565,7 @@ var Re = class {
20565
20565
  logIdentifier: ${this.logIdentifier};
20566
20566
  source: ${this.source};
20567
20567
  enabled: ${this.enabled};
20568
- nativeTrack: ${si(this.nativeTrack)};
20568
+ nativeTrack: ${ri(this.nativeTrack)};
20569
20569
  }`;
20570
20570
  }
20571
20571
  };
@@ -20851,22 +20851,22 @@ var Ts = "[VALIDATIONS]";
20851
20851
  function oe(a11) {
20852
20852
  return a11 != null;
20853
20853
  }
20854
- var gt = () => {
20854
+ var St = () => {
20855
20855
  if (!oe(RTCPeerConnection)) {
20856
20856
  let a11 = S2.GenericErrors.MissingRTCPeerConnection();
20857
20857
  throw d2.e(Ts, a11), a11;
20858
20858
  }
20859
20859
  };
20860
- var Tt = () => {
20860
+ var gt = () => {
20861
20861
  if (!oe(navigator.mediaDevices)) {
20862
20862
  let a11 = S2.GenericErrors.MissingMediaDevices();
20863
20863
  throw d2.e(Ts, a11), a11;
20864
20864
  }
20865
20865
  };
20866
20866
  var fs = Mr().version;
20867
- function ft(a11 = "prod", e) {
20867
+ function Tt(a11 = "prod", e) {
20868
20868
  let t2 = "web", i2 = Qe !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
20869
- if (Be)
20869
+ if (Ue)
20870
20870
  return vs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: fs, env: i2, domain: Qe, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
20871
20871
  let r2 = ge.getOS(), s2 = ge.getDevice(), o2 = ge.getBrowser(), n2 = yr(`web_${r2.name}`), l2 = r2.version || "", u2 = yr(`${o2.name}_${o2.version}`), p2 = u2;
20872
20872
  return s2.type && (p2 = `${yr(`${s2.vendor}_${s2.type}`)}/${u2}`), vs({ os: n2, os_version: l2, sdk: t2, sdk_version: fs, device_model: p2, env: i2, domain: Qe, is_prebuilt: !!(e != null && e.isPrebuilt), framework: e == null ? void 0 : e.type, framework_version: e == null ? void 0 : e.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
@@ -20877,7 +20877,7 @@ function yr(a11) {
20877
20877
  var vs = (a11, e = ",") => Object.keys(a11).filter((t2) => oe(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
20878
20878
  var H2 = class {
20879
20879
  constructor({ name: e, level: t2, properties: i2, includesPII: r2, timestamp: s2 }) {
20880
- this.metadata = { peer: {}, userAgent: ft() };
20880
+ this.metadata = { peer: {}, userAgent: Tt() };
20881
20881
  this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = no(), this.device_id = gs();
20882
20882
  }
20883
20883
  toSignalParams() {
@@ -21040,7 +21040,7 @@ var ne = class {
21040
21040
  return new H2({ name: l2, level: u2, properties: p2 });
21041
21041
  }
21042
21042
  };
21043
- var ai = class {
21043
+ var si = class {
21044
21044
  constructor(e) {
21045
21045
  this.eventBus = e;
21046
21046
  this.TAG = "[AudioPluginsAnalytics]";
@@ -21086,12 +21086,12 @@ var ai = class {
21086
21086
  };
21087
21087
  var co = 48e3;
21088
21088
  var lo = () => navigator.userAgent.indexOf("Firefox") !== -1;
21089
- var vt = class {
21089
+ var ft = class {
21090
21090
  constructor(e, t2, i2) {
21091
21091
  this.eventBus = t2;
21092
21092
  this.TAG = "[AudioPluginsManager]";
21093
21093
  this.pluginAddInProgress = false;
21094
- this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new ai(t2), this.createAudioContext(), this.room = i2;
21094
+ this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new si(t2), this.createAudioContext(), this.room = i2;
21095
21095
  }
21096
21096
  getPlugins() {
21097
21097
  return Array.from(this.pluginsMap.keys());
@@ -21380,7 +21380,7 @@ function Es() {
21380
21380
  };
21381
21381
  })) };
21382
21382
  }
21383
- function oi(a11, e = 300) {
21383
+ function ai(a11, e = 300) {
21384
21384
  let t2;
21385
21385
  return function(...i2) {
21386
21386
  clearTimeout(t2), t2 = void 0;
@@ -21392,7 +21392,7 @@ function oi(a11, e = 300) {
21392
21392
  }
21393
21393
  var mo = 35;
21394
21394
  var So = 5;
21395
- var ni = class {
21395
+ var oi = class {
21396
21396
  constructor(e, t2, i2) {
21397
21397
  this.track = e;
21398
21398
  this.audioLevelEvent = t2;
@@ -21487,7 +21487,7 @@ var Rs = ((t2) => (t2.DVR = "dvr", t2.NO_DVR = "no-dvr", t2))(Rs || {});
21487
21487
  var Is = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(Is || {});
21488
21488
  var As = ((r2) => (r2.INITIALISED = "initialised", r2.STARTED = "started", r2.STOPPED = "stopped", r2.FAILED = "failed", r2))(As || {});
21489
21489
  var Hs = ((e) => (e.CAPTION = "caption", e))(Hs || {});
21490
- var Ve = { f: "high", h: "medium", q: "low" };
21490
+ var Be = { f: "high", h: "medium", q: "low" };
21491
21491
  var Cs = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Cs || {});
21492
21492
  var ee = class {
21493
21493
  constructor() {
@@ -21521,10 +21521,10 @@ var ee = class {
21521
21521
  return this._advanced = e, this;
21522
21522
  }
21523
21523
  build() {
21524
- return new Fe(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
21524
+ return new Ve(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
21525
21525
  }
21526
21526
  };
21527
- var Fe = class {
21527
+ var Ve = class {
21528
21528
  constructor(e, t2, i2, r2, s2, o2) {
21529
21529
  this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2, this.audioMode = o2, this.audioMode === "music" && (this.maxBitrate = 320);
21530
21530
  }
@@ -21573,10 +21573,10 @@ var z2 = class {
21573
21573
  return this._facingMode = e, this;
21574
21574
  }
21575
21575
  build() {
21576
- return new Ge(this._width, this._height, this._codec, this._maxFramerate, this._deviceId, this._advanced, this._maxBitrate, this._facingMode);
21576
+ return new Fe(this._width, this._height, this._codec, this._maxFramerate, this._deviceId, this._advanced, this._maxBitrate, this._facingMode);
21577
21577
  }
21578
21578
  };
21579
- var Ge = class {
21579
+ var Fe = class {
21580
21580
  constructor(e, t2, i2, r2, s2, o2, n2, l2) {
21581
21581
  this.width = e, this.height = t2, this.codec = i2, this.maxFramerate = r2, this.maxBitrate = n2, this.deviceId = s2, this.advanced = o2, this.facingMode = l2;
21582
21582
  }
@@ -21661,7 +21661,7 @@ var ce = class a3 extends Ie {
21661
21661
  !i3 && t3.deviceId && (Q2.updateSelection("audioInput", { deviceId: t3.deviceId, groupId: s3 }), this.eventBus.deviceChange.publish({ isUserSelection: true, type: "audioInput", selection: { deviceId: t3.deviceId, groupId: s3 } }));
21662
21662
  }
21663
21663
  });
21664
- t2.tracks.push(this), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && !ue(i2) && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new vt(this, s2, n2), this.setFirstTrackId(i2.id), Tr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21664
+ t2.tracks.push(this), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && !ue(i2) && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new ft(this, s2, n2), this.setFirstTrackId(i2.id), Tr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21665
21665
  }
21666
21666
  getManuallySelectedDeviceId() {
21667
21667
  return this.manuallySelectedDeviceId;
@@ -21727,7 +21727,7 @@ var ce = class a3 extends Ie {
21727
21727
  });
21728
21728
  }
21729
21729
  initAudioLevelMonitor() {
21730
- this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new ni(this, this.eventBus.trackAudioLevelUpdate, this.eventBus.localAudioSilence), this.audioLevelMonitor.start(), this.audioLevelMonitor.detectSilence();
21730
+ this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new oi(this, this.eventBus.trackAudioLevelUpdate, this.eventBus.localAudioSilence), this.audioLevelMonitor.start(), this.audioLevelMonitor.detectSilence();
21731
21731
  }
21732
21732
  destroyAudioLevelMonitor() {
21733
21733
  var t2;
@@ -21747,7 +21747,7 @@ var ce = class a3 extends Ie {
21747
21747
  }
21748
21748
  buildNewSettings(t2) {
21749
21749
  let { volume: i2, codec: r2, maxBitrate: s2, deviceId: o2, advanced: n2, audioMode: l2 } = m(m({}, this.settings), t2);
21750
- return new Fe(i2, r2, s2, o2, n2, l2);
21750
+ return new Ve(i2, r2, s2, o2, n2, l2);
21751
21751
  }
21752
21752
  };
21753
21753
  var se = class a4 extends Ie {
@@ -21815,10 +21815,10 @@ var Ye = class extends Re {
21815
21815
  this.sinkCount > 0 && this.sinkCount--;
21816
21816
  }
21817
21817
  };
21818
- var Mt = { none: -1, low: 0, medium: 1, high: 2 };
21818
+ var vt = { none: -1, low: 0, medium: 1, high: 2 };
21819
21819
  var To = 0.5;
21820
21820
  var ws = (a11, e) => {
21821
- let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) => Mt[o2.layer] - Mt[n2.layer]), s2 = e[i2] * ((window == null ? void 0 : window.devicePixelRatio) || 1);
21821
+ let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) => vt[o2.layer] - vt[n2.layer]), s2 = e[i2] * ((window == null ? void 0 : window.devicePixelRatio) || 1);
21822
21822
  for (let o2 = 0; o2 < r2.length; o2++) {
21823
21823
  let { resolution: n2, layer: l2 } = r2[o2], u2 = n2[i2];
21824
21824
  if (s2 <= u2) {
@@ -21875,7 +21875,7 @@ var Ir = class {
21875
21875
  (t2 = this.resizeObserver) == null || t2.unobserve(e), this.listeners.delete(e);
21876
21876
  };
21877
21877
  this.createObserver = () => {
21878
- this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(oi(this.handleResize, 300)));
21878
+ this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(ai(this.handleResize, 300)));
21879
21879
  };
21880
21880
  this.handleResize = (e) => {
21881
21881
  var t2;
@@ -21954,7 +21954,7 @@ var Xe = class {
21954
21954
  if (r2 === 0 || s2 === 0)
21955
21955
  continue;
21956
21956
  let o2 = ws(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
21957
- e ? e = Mt[o2] > Mt[e] ? o2 : e : e = o2;
21957
+ e ? e = vt[o2] > vt[e] ? o2 : e : e = o2;
21958
21958
  }
21959
21959
  e && (d2.d(this.TAG, `selecting max layer ${e} for the track`, `${this.track}`), yield this.track.setPreferredLayer(e));
21960
21960
  });
@@ -21962,7 +21962,7 @@ var Xe = class {
21962
21962
  };
21963
21963
  var Ar = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ar || {});
21964
21964
  var Hr = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Hr || {});
21965
- var yt = class {
21965
+ var Mt = class {
21966
21966
  constructor() {
21967
21967
  this.total = 0;
21968
21968
  this.count = 0;
@@ -21981,10 +21981,10 @@ var Ze = class {
21981
21981
  constructor(e) {
21982
21982
  this.eventBus = e;
21983
21983
  this.TAG = "[VideoPluginsAnalytics]";
21984
- this.initTime = {}, this.preProcessingAvgs = new yt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
21984
+ this.initTime = {}, this.preProcessingAvgs = new Mt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
21985
21985
  }
21986
21986
  added(e, t2, i2) {
21987
- this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new yt(), t2 && (this.pluginInputFrameRate[e] = t2, this.pluginFrameRate[e] = i2 || t2), this.eventBus.analytics.publish(ne.added(e, this.addedTimestamps[e]));
21987
+ this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new Mt(), t2 && (this.pluginInputFrameRate[e] = t2, this.pluginFrameRate[e] = i2 || t2), this.eventBus.analytics.publish(ne.added(e, this.addedTimestamps[e]));
21988
21988
  }
21989
21989
  removed(e) {
21990
21990
  var t2;
@@ -22044,7 +22044,7 @@ var Ze = class {
22044
22044
  var Os = 24;
22045
22045
  var vo = 320;
22046
22046
  var Mo = 240;
22047
- var kt = class {
22047
+ var yt = class {
22048
22048
  constructor(e, t2) {
22049
22049
  this.TAG = "[VideoPluginsManager]";
22050
22050
  this.pluginsLoopRunning = false;
@@ -22267,7 +22267,7 @@ var kt = class {
22267
22267
  return this.pluginNumFramesSkipped[e] < this.pluginNumFramesToSkip[e] ? (this.pluginNumFramesSkipped[e]++, t2 = true) : (t2 = false, this.pluginNumFramesSkipped[e] = 0), t2;
22268
22268
  }
22269
22269
  };
22270
- var ci = class {
22270
+ var ni = class {
22271
22271
  constructor(e, t2) {
22272
22272
  this.TAG = "[MediaStreamPluginsManager]";
22273
22273
  this.plugins = /* @__PURE__ */ new Set(), this.analytics = new Ze(e), this.room = t2;
@@ -22312,7 +22312,7 @@ var ci = class {
22312
22312
  }
22313
22313
  };
22314
22314
  var yo = ["init_response_time", "ws_connect_time", "on_policy_change_time", "local_audio_track_time", "local_video_track_time", "peer_list_time", "room_state_time", "join_response_time"];
22315
- var di = class {
22315
+ var ci = class {
22316
22316
  constructor() {
22317
22317
  this.eventPerformanceMeasures = {};
22318
22318
  }
@@ -22340,7 +22340,7 @@ var di = class {
22340
22340
  };
22341
22341
  var Cr = { isAudioMuted: false, isVideoMuted: false, audioInputDeviceId: "default", audioOutputDeviceId: "default", videoDeviceId: "default" };
22342
22342
  var pe;
22343
- var li;
22343
+ var di;
22344
22344
  var ve = class a5 {
22345
22345
  constructor(e, t2, i2, r2, s2) {
22346
22346
  this.store = e;
@@ -22420,7 +22420,7 @@ var ve = class a5 {
22420
22420
  let f2 = Ae(g2, "screen");
22421
22421
  throw this.eventBus.analytics.publish(y2.publish({ error: f2, devices: this.deviceManager.getDevices(), settings: new ze(r2 == null ? void 0 : r2.video, r2 == null ? void 0 : r2.audio, false) })), f2;
22422
22422
  }
22423
- let n2 = [], l2 = new We(o2), u2 = o2.getVideoTracks()[0], p2 = new F(l2, u2, "screen", this.eventBus, r2 == null ? void 0 : r2.video, this.store.getRoom());
22423
+ let n2 = [], l2 = new Ge(o2), u2 = o2.getVideoTracks()[0], p2 = new F(l2, u2, "screen", this.eventBus, r2 == null ? void 0 : r2.video, this.store.getRoom());
22424
22424
  p2.setSimulcastDefinitons(this.store.getSimulcastDefinitionsForPeer(this.store.getLocalPeer(), "screen"));
22425
22425
  try {
22426
22426
  let g2 = this.validateCurrentTabCapture(p2, i2.forceCurrentTab);
@@ -22459,7 +22459,7 @@ var ve = class a5 {
22459
22459
  static getEmptyVideoTrack(e) {
22460
22460
  var n2, l2, u2;
22461
22461
  let t2 = ((n2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : n2.width) || 320, i2 = ((l2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : l2.height) || 240, r2 = 1;
22462
- pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)), li || (li = setInterval(() => {
22462
+ pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)), di || (di = setInterval(() => {
22463
22463
  let p2 = pe == null ? void 0 : pe.getContext("2d");
22464
22464
  p2 && p2.fillRect(0, 0, 1, 1);
22465
22465
  }, 1e3 / r2));
@@ -22473,7 +22473,7 @@ var ve = class a5 {
22473
22473
  return r2.enabled = false, r2;
22474
22474
  }
22475
22475
  static cleanup() {
22476
- clearInterval(li), li = void 0, pe = void 0;
22476
+ clearInterval(di), di = void 0, pe = void 0;
22477
22477
  }
22478
22478
  getAVTracks(e) {
22479
22479
  return c2(this, null, function* () {
@@ -22504,7 +22504,7 @@ var ve = class a5 {
22504
22504
  this.observer.onFailure(e);
22505
22505
  let s2 = e.code === E2.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
22506
22506
  if (s2) {
22507
- let l2 = new De().video(new Ge()).audio(new Fe()).build();
22507
+ let l2 = new De().video(new Fe()).audio(new Ve()).build();
22508
22508
  d2.w(this.TAG, "Fetch AV Tracks failed with overconstrained error", { fetchTrackOptions: i2 }, { error: e });
22509
22509
  try {
22510
22510
  return yield this.getLocalTracks(i2, l2, r2);
@@ -22575,7 +22575,7 @@ var ve = class a5 {
22575
22575
  }
22576
22576
  createHMSLocalTracks(e, t2, i2) {
22577
22577
  let r2 = e.find((n2) => n2.kind === "video"), s2 = e.find((n2) => n2.kind === "audio");
22578
- i2 ? e.forEach((n2) => i2 == null ? void 0 : i2.nativeStream.addTrack(n2)) : i2 = new We(new MediaStream(e));
22578
+ i2 ? e.forEach((n2) => i2 == null ? void 0 : i2.nativeStream.addTrack(n2)) : i2 = new Ge(new MediaStream(e));
22579
22579
  let o2 = [];
22580
22580
  if (s2 && (t2 != null && t2.audio)) {
22581
22581
  let n2 = new ce(i2, s2, "regular", this.eventBus, t2.audio, this.store.getRoom());
@@ -22611,7 +22611,7 @@ var F = class a6 extends Ye {
22611
22611
  });
22612
22612
  this.buildNewSettings = (t3) => {
22613
22613
  let { width: i3, height: r3, codec: s3, maxFramerate: o3, maxBitrate: n3, deviceId: l2, advanced: u2, facingMode: p2 } = m(m({}, this.settings), t3);
22614
- return new Ge(i3, r3, s3, o3, l2, u2, n3, p2);
22614
+ return new Fe(i3, r3, s3, o3, l2, u2, n3, p2);
22615
22615
  };
22616
22616
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
22617
22617
  let i3 = this.stream, r3 = xs(t3, this.settings);
@@ -22639,7 +22639,7 @@ var F = class a6 extends Ye {
22639
22639
  this.handleVisibilityChange = () => c2(this, null, function* () {
22640
22640
  document.visibilityState === "hidden" && this.source === "regular" ? (this.enabledStateBeforeBackground = this.enabled, this.nativeTrack.enabled = false, this.replaceSenderTrack(this.nativeTrack)) : (this.nativeTrack.enabled = this.enabledStateBeforeBackground, this.replaceSenderTrack(this.processedTrack || this.nativeTrack)), this.eventBus.localVideoEnabled.publish({ enabled: this.nativeTrack.enabled, track: this });
22641
22641
  });
22642
- t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new kt(this, s2), this.mediaStreamPluginsManager = new ci(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
22642
+ t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new yt(this, s2), this.mediaStreamPluginsManager = new ni(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
22643
22643
  }
22644
22644
  setSimulcastDefinitons(t2) {
22645
22645
  this._layerDefinitions = t2;
@@ -22795,11 +22795,11 @@ var F = class a6 extends Ye {
22795
22795
  }
22796
22796
  };
22797
22797
  var et = "renegotiation-callback-id";
22798
- var ui = "ion-sfu";
22798
+ var li = "ion-sfu";
22799
22799
  var tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
22800
22800
  var Us = "https://event.100ms.live/v2/client/report";
22801
22801
  var Bs = "https://event-nonprod.100ms.live/v2/client/report";
22802
- var Pt = Math.pow(2, 31) - 1;
22802
+ var kt = Math.pow(2, 31) - 1;
22803
22803
  var G2 = { DEVICE_CHANGE: "device-change", LOCAL_AUDIO_ENABLED: "local-audio-enabled", LOCAL_VIDEO_ENABLED: "local-video-enabled", STATS_UPDATE: "stats-update", RTC_STATS_UPDATE: "rtc-stats-update", TRACK_DEGRADED: "track-degraded", TRACK_RESTORED: "track-restored", TRACK_AUDIO_LEVEL_UPDATE: "track-audio-level-update", LOCAL_AUDIO_SILENCE: "local-audio-silence", ANALYTICS: "analytics", AUDIO_PLUGIN_FAILED: "audio-plugin-failed", POLICY_CHANGE: "policy-change", LOCAL_ROLE_UPDATE: "local-role-update", AUDIO_TRACK_UPDATE: "audio-track-update", AUDIO_TRACK_ADDED: "audio-track-added", AUDIO_TRACK_REMOVED: "audio-track-removed", AUTOPLAY_ERROR: "autoplay-error", LEAVE: "leave" };
22804
22804
  var Vs = "2.5";
22805
22805
  var Fs = "20240521";
@@ -22936,7 +22936,7 @@ var _r = class {
22936
22936
  e.time = (/* @__PURE__ */ new Date()).toISOString().split("T")[1], this.history.push(e);
22937
22937
  }
22938
22938
  };
22939
- var We = class extends Je {
22939
+ var Ge = class extends Je {
22940
22940
  constructor() {
22941
22941
  super(...arguments);
22942
22942
  this.TAG = "[HMSLocalStream]";
@@ -22982,7 +22982,7 @@ var We = class extends Je {
22982
22982
  d2.d(this.TAG, "Simulcast enabled with layers", i2), r2.push(...i2);
22983
22983
  else {
22984
22984
  let s2 = { active: this.nativeStream.active };
22985
- t2.settings.maxBitrate && !Be && (s2.maxBitrate = t2.settings.maxBitrate), r2.push(s2);
22985
+ t2.settings.maxBitrate && !Ue && (s2.maxBitrate = t2.settings.maxBitrate), r2.push(s2);
22986
22986
  }
22987
22987
  return r2;
22988
22988
  }
@@ -23050,7 +23050,7 @@ var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23050
23050
  let h2 = (k2 = l2[p2]) == null ? void 0 : k2.codecId, T = h2 ? n2[h2] : void 0, g2;
23051
23051
  T && (g2 = T.substring(T.indexOf("/") + 1));
23052
23052
  let f2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), P7 = u2[f2.ssrc];
23053
- s2[p2] = M2(m({}, f2), { bitrate: Et("bytesSent", f2, i2 == null ? void 0 : i2[p2]), packetsLost: P7 == null ? void 0 : P7.packetsLost, jitter: P7 == null ? void 0 : P7.jitter, roundTripTime: P7 == null ? void 0 : P7.roundTripTime, totalRoundTripTime: P7 == null ? void 0 : P7.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
23053
+ s2[p2] = M2(m({}, f2), { bitrate: Pt("bytesSent", f2, i2 == null ? void 0 : i2[p2]), packetsLost: P7 == null ? void 0 : P7.packetsLost, jitter: P7 == null ? void 0 : P7.jitter, roundTripTime: P7 == null ? void 0 : P7.roundTripTime, totalRoundTripTime: P7 == null ? void 0 : P7.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
23054
23054
  });
23055
23055
  } catch (n2) {
23056
23056
  a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting local track stats ${e.trackId} - ${n2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting local track stats", e, n2, n2.name);
@@ -23066,7 +23066,7 @@ var Ks = (a11, e, t2, i2) => c2(void 0, null, function* () {
23066
23066
  } catch (u2) {
23067
23067
  a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting remote track stats ${e.trackId} - ${u2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting remote track stats", e, u2);
23068
23068
  }
23069
- let s2 = Eo(r2), o2 = Et("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
23069
+ let s2 = Eo(r2), o2 = Pt("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
23070
23070
  return s2 != null && s2.remote && Object.assign(s2.remote, { packetsLostRate: Nr("packetsLost", s2.remote, i2 == null ? void 0 : i2.remote) }), s2 && M2(m({}, s2), { bitrate: o2, packetsLostRate: n2, peerID: e.peerId, enabled: e.enabled, peerName: t2, codec: s2.codec });
23071
23071
  });
23072
23072
  var Eo = (a11) => {
@@ -23093,7 +23093,7 @@ var Eo = (a11) => {
23093
23093
  return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
23094
23094
  };
23095
23095
  var Or = (a11, e, t2) => {
23096
- let i2 = bo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23096
+ let i2 = bo(e), r2 = Pt(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23097
23097
  return i2 && Object.assign(i2, { bitrate: r2 });
23098
23098
  };
23099
23099
  var bo = (a11) => {
@@ -23111,13 +23111,13 @@ var qs = (a11) => {
23111
23111
  }), e;
23112
23112
  };
23113
23113
  var js = (a11, e) => Array.from(new Set(a11.concat(e)));
23114
- var Et = (a11, e, t2) => Nr(a11, e, t2) * 8;
23114
+ var Pt = (a11, e, t2) => Nr(a11, e, t2) * 8;
23115
23115
  var Nr = (a11, e, t2) => {
23116
23116
  let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
23117
23117
  return [e, t2, oe(i2), oe(r2)].every((o2) => !!o2) ? xr(i2, r2, e == null ? void 0 : e.timestamp, t2 == null ? void 0 : t2.timestamp) * 1e3 : 0;
23118
23118
  };
23119
23119
  var xr = (a11, e, t2, i2) => oe(a11) && oe(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
23120
- var pi = class {
23120
+ var ui = class {
23121
23121
  constructor(e, t2, i2) {
23122
23122
  this.getStats = e;
23123
23123
  this.store = t2;
@@ -23177,7 +23177,7 @@ var pi = class {
23177
23177
  this.localPeerID = (r2 = this.store.getLocalPeer()) == null ? void 0 : r2.peerId;
23178
23178
  }
23179
23179
  };
23180
- var hi = class {
23180
+ var pi = class {
23181
23181
  constructor(e, t2, i2, r2) {
23182
23182
  this.store = e;
23183
23183
  this.eventBus = t2;
@@ -23207,7 +23207,7 @@ var hi = class {
23207
23207
  }
23208
23208
  setPeerConnections({ publish: e, subscribe: t2 }) {
23209
23209
  var i2, r2;
23210
- this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new pi({ publish: (i2 = this.publishConnection) == null ? void 0 : i2.getStats.bind(this.publishConnection), subscribe: (r2 = this.subscribeConnection) == null ? void 0 : r2.getStats.bind(this.subscribeConnection) }, this.store, this.eventBus);
23210
+ this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new ui({ publish: (i2 = this.publishConnection) == null ? void 0 : i2.getStats.bind(this.publishConnection), subscribe: (r2 = this.subscribeConnection) == null ? void 0 : r2.getStats.bind(this.subscribeConnection) }, this.store, this.eventBus);
23211
23211
  }
23212
23212
  start() {
23213
23213
  return c2(this, null, function* () {
@@ -23275,7 +23275,7 @@ var it = class {
23275
23275
  var rt = class {
23276
23276
  };
23277
23277
  rt.makePeerId = () => Ro();
23278
- var $e = class extends it {
23278
+ var We = class extends it {
23279
23279
  constructor(t2) {
23280
23280
  super(M2(m({}, t2), { peerId: rt.makePeerId(), isLocal: true }));
23281
23281
  this.isLocal = true;
@@ -23298,7 +23298,7 @@ var $e = class extends it {
23298
23298
  }`;
23299
23299
  }
23300
23300
  };
23301
- var bt = class extends it {
23301
+ var Et = class extends it {
23302
23302
  constructor(t2) {
23303
23303
  super(M2(m({}, t2), { isLocal: false }));
23304
23304
  this.isLocal = false;
@@ -23307,8 +23307,8 @@ var bt = class extends it {
23307
23307
  this.fromRoomState = !!t2.fromRoomState;
23308
23308
  }
23309
23309
  };
23310
- var he = (a11, e) => new bt({ peerId: a11.peer_id, name: a11.info.name, role: e.getPolicyForRole(a11.role), customerUserId: a11.info.user_id, metadata: a11.info.data, groups: a11.groups, type: a11.info.type });
23311
- var mi = class {
23310
+ var he = (a11, e) => new Et({ peerId: a11.peer_id, name: a11.info.name, role: e.getPolicyForRole(a11.role), customerUserId: a11.info.user_id, metadata: a11.info.data, groups: a11.groups, type: a11.info.type });
23311
+ var hi = class {
23312
23312
  constructor(e, t2, i2) {
23313
23313
  this.transport = e;
23314
23314
  this.store = t2;
@@ -23388,7 +23388,7 @@ var we = class extends Io {
23388
23388
  return super.listeners(e);
23389
23389
  }
23390
23390
  };
23391
- var Si = class extends we {
23391
+ var mi = class extends we {
23392
23392
  constructor() {
23393
23393
  super(...arguments);
23394
23394
  this.audioElement = null;
@@ -23440,7 +23440,7 @@ var Si = class extends we {
23440
23440
  }), this.audioContextManager = new st(t2), t2;
23441
23441
  }
23442
23442
  };
23443
- var gi = class extends we {
23443
+ var Si = class extends we {
23444
23444
  constructor() {
23445
23445
  super(...arguments);
23446
23446
  this.TAG = "[PlaylistVideoManager]";
@@ -23514,13 +23514,13 @@ var gi = class extends we {
23514
23514
  this.canvas || (this.canvas = document.createElement("canvas"), this.canvasContext = this.canvas.getContext("2d"));
23515
23515
  }
23516
23516
  };
23517
- var Ti = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
23518
- var Rt = class extends we {
23517
+ var gi = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
23518
+ var bt = class extends we {
23519
23519
  constructor(t2, i2) {
23520
23520
  super();
23521
23521
  this.sdk = t2;
23522
23522
  this.eventBus = i2;
23523
- this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) };
23523
+ this.state = { audio: m({}, gi.audio), video: m({}, gi.video) };
23524
23524
  this.TAG = "[PlaylistManager]";
23525
23525
  this.handlePausePlaylist = (r2) => c2(this, [r2], function* ({ enabled: t3, track: i3 }) {
23526
23526
  var o2;
@@ -23530,12 +23530,12 @@ var Rt = class extends we {
23530
23530
  i3.source === "audioplaylist" && (s2 = "audio"), i3.source === "videoplaylist" && (s2 = "video"), s2 && ((o2 = this.getElement(s2)) == null || o2.pause());
23531
23531
  });
23532
23532
  this.addTrack = (t3, i3) => c2(this, null, function* () {
23533
- yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", si(t3));
23533
+ yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", ri(t3));
23534
23534
  });
23535
23535
  this.removeTrack = (t3) => c2(this, null, function* () {
23536
23536
  yield this.sdk.removeTrack(t3, true), d2.d(this.TAG, "Playlist track removed", t3);
23537
23537
  });
23538
- this.audioManager = new Si(), this.videoManager = new gi(), this.addListeners();
23538
+ this.audioManager = new mi(), this.videoManager = new Si(), this.addListeners();
23539
23539
  }
23540
23540
  getList(t2 = "audio") {
23541
23541
  return this.state[t2].list;
@@ -23658,7 +23658,7 @@ var Rt = class extends we {
23658
23658
  });
23659
23659
  }
23660
23660
  cleanup() {
23661
- this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) }, this.eventBus.localAudioEnabled.unsubscribe(this.handlePausePlaylist), this.eventBus.localVideoEnabled.unsubscribe(this.handlePausePlaylist), this.audioManager.stop(), this.videoManager.stop();
23661
+ this.state = { audio: m({}, gi.audio), video: m({}, gi.video) }, this.eventBus.localAudioEnabled.unsubscribe(this.handlePausePlaylist), this.eventBus.localVideoEnabled.unsubscribe(this.handlePausePlaylist), this.audioManager.stop(), this.videoManager.stop();
23662
23662
  }
23663
23663
  onProgress(t2) {
23664
23664
  this.videoManager.on("progress", () => {
@@ -23740,7 +23740,7 @@ var Ao = (a11) => a11.errors;
23740
23740
  var Wh = createSelector(Ao, (a11) => a11.length === 0 ? null : a11.at(-1));
23741
23741
  var $h = createSelector(B2, (a11) => a11.id);
23742
23742
  var K = (a11) => a11.peers;
23743
- var fi = (a11) => a11.messages.byID;
23743
+ var Ti = (a11) => a11.messages.byID;
23744
23744
  var Js = (a11) => a11.messages.allIDs;
23745
23745
  var N2 = (a11) => a11.tracks;
23746
23746
  var Qs = (a11) => a11.settings;
@@ -23785,13 +23785,13 @@ var Ys = (a11) => {
23785
23785
  return ns(a11, e == null ? void 0 : e.videoTrack);
23786
23786
  };
23787
23787
  var Vr = createSelector(te, N2, (a11, e) => {
23788
- let { video: t2, audio: i2 } = Ue(e, a11);
23788
+ let { video: t2, audio: i2 } = xe(e, a11);
23789
23789
  return !!(t2 || i2);
23790
23790
  });
23791
23791
  var wo = createSelector(K, N2, (a11, e) => {
23792
23792
  let t2;
23793
23793
  for (let i2 in a11) {
23794
- let r2 = a11[i2], { video: s2, audio: o2 } = Ue(e, r2);
23794
+ let r2 = a11[i2], { video: s2, audio: o2 } = xe(e, r2);
23795
23795
  if (s2)
23796
23796
  return r2;
23797
23797
  o2 && !t2 && (t2 = r2);
@@ -23801,7 +23801,7 @@ var wo = createSelector(K, N2, (a11, e) => {
23801
23801
  var Zh = createSelector(wo, (a11) => !!a11);
23802
23802
  var em = createSelector(K, N2, (a11, e) => {
23803
23803
  for (let t2 in a11) {
23804
- let i2 = a11[t2], { audio: r2, video: s2 } = Ue(e, i2);
23804
+ let i2 = a11[t2], { audio: r2, video: s2 } = xe(e, i2);
23805
23805
  if (!s2 && r2)
23806
23806
  return i2;
23807
23807
  }
@@ -23809,7 +23809,7 @@ var em = createSelector(K, N2, (a11, e) => {
23809
23809
  var tm = createSelector(K, N2, (a11, e) => {
23810
23810
  let t2 = [], i2 = [];
23811
23811
  for (let r2 in a11) {
23812
- let s2 = a11[r2], { video: o2, audio: n2 } = Ue(e, s2);
23812
+ let s2 = a11[r2], { video: o2, audio: n2 } = xe(e, s2);
23813
23813
  o2 ? t2.push(s2) : n2 && i2.push(s2);
23814
23814
  }
23815
23815
  return t2.concat(i2);
@@ -23817,27 +23817,27 @@ var tm = createSelector(K, N2, (a11, e) => {
23817
23817
  var im = createSelector(K, N2, (a11, e) => {
23818
23818
  for (let t2 in e) {
23819
23819
  let i2 = e[t2];
23820
- if (mt(i2) && ht(i2) && i2.peerId)
23820
+ if (ht(i2) && pt(i2) && i2.peerId)
23821
23821
  return a11[i2.peerId];
23822
23822
  }
23823
23823
  });
23824
23824
  var rm = createSelector(K, N2, (a11, e) => {
23825
23825
  for (let t2 in e) {
23826
23826
  let i2 = e[t2];
23827
- if (ri(i2) && i2.peerId)
23827
+ if (ii(i2) && i2.peerId)
23828
23828
  return a11[i2.peerId];
23829
23829
  }
23830
23830
  });
23831
23831
  var sm = createSelector(Lo, (a11) => a11.filter(os));
23832
23832
  var am = createSelector(Js, (a11) => a11.length);
23833
- var om = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
23834
- var It = createSelector(Js, fi, (a11, e) => {
23833
+ var om = createSelector(Ti, (a11) => Object.values(a11).filter((e) => !e.read).length);
23834
+ var Rt = createSelector(Js, Ti, (a11, e) => {
23835
23835
  let t2 = [];
23836
23836
  return a11.forEach((i2) => {
23837
23837
  t2.push(e[i2]);
23838
23838
  }), t2;
23839
23839
  });
23840
- var _o = createSelector(It, (a11) => a11.filter((e) => {
23840
+ var _o = createSelector(Rt, (a11) => a11.filter((e) => {
23841
23841
  var t2;
23842
23842
  return !e.recipientPeer && !(e.recipientRoles && ((t2 = e.recipientRoles) == null ? void 0 : t2.length) > 0);
23843
23843
  }));
@@ -23888,7 +23888,7 @@ var ua = { selection: Fr("video"), progress: sa("video"), currentTime: aa("video
23888
23888
  function A2(a11) {
23889
23889
  return (e) => (t2) => a11(t2, e);
23890
23890
  }
23891
- var At = "HMS-Store:";
23891
+ var It = "HMS-Store:";
23892
23892
  var b2 = class {
23893
23893
  static v(e, ...t2) {
23894
23894
  this.log(0, e, ...t2);
@@ -23918,23 +23918,23 @@ var b2 = class {
23918
23918
  if (!(this.level.valueOf() > e.valueOf()))
23919
23919
  switch (e) {
23920
23920
  case 0: {
23921
- console.log(At, ...t2);
23921
+ console.log(It, ...t2);
23922
23922
  break;
23923
23923
  }
23924
23924
  case 1: {
23925
- console.debug(At, ...t2);
23925
+ console.debug(It, ...t2);
23926
23926
  break;
23927
23927
  }
23928
23928
  case 2: {
23929
- console.info(At, ...t2);
23929
+ console.info(It, ...t2);
23930
23930
  break;
23931
23931
  }
23932
23932
  case 3: {
23933
- console.warn(At, ...t2);
23933
+ console.warn(It, ...t2);
23934
23934
  break;
23935
23935
  }
23936
23936
  case 6: {
23937
- console.error(At, ...t2);
23937
+ console.error(It, ...t2);
23938
23938
  break;
23939
23939
  }
23940
23940
  case 4: {
@@ -23956,31 +23956,31 @@ var b2 = class {
23956
23956
  };
23957
23957
  b2.level = 0;
23958
23958
  var Gr = (a11, e) => e;
23959
- var Ht = (a11, e) => e;
23959
+ var At = (a11, e) => e;
23960
23960
  var pa = (a11, e) => e;
23961
23961
  var xo = (a11, e) => e;
23962
23962
  var Uo = (a11, e) => e;
23963
23963
  var q2 = createSelector([K, Gr], (a11, e) => e ? a11[e] : null);
23964
- var Wr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
23965
- var Bo = createSelector([N2, Ht], (a11, e) => {
23964
+ var Wr = createSelector([N2, At], (a11, e) => e ? a11[e] : null);
23965
+ var Bo = createSelector([N2, At], (a11, e) => {
23966
23966
  if (!e)
23967
23967
  return null;
23968
23968
  let t2 = a11[e];
23969
23969
  return (t2 == null ? void 0 : t2.type) === "video" ? t2 : null;
23970
23970
  });
23971
- var Vo = createSelector([N2, Ht], (a11, e) => {
23971
+ var Vo = createSelector([N2, At], (a11, e) => {
23972
23972
  if (!e)
23973
23973
  return null;
23974
23974
  let t2 = a11[e];
23975
23975
  return (t2 == null ? void 0 : t2.type) === "audio" ? t2 : null;
23976
23976
  });
23977
- var Fo = createSelector([N2, Ht], (a11, e) => {
23977
+ var Fo = createSelector([N2, At], (a11, e) => {
23978
23978
  if (!e)
23979
23979
  return null;
23980
23980
  let t2 = a11[e];
23981
23981
  return (t2 == null ? void 0 : t2.type) === "audio" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
23982
23982
  });
23983
- var Go = createSelector([N2, Ht], (a11, e) => {
23983
+ var Go = createSelector([N2, At], (a11, e) => {
23984
23984
  if (!e)
23985
23985
  return null;
23986
23986
  let t2 = a11[e];
@@ -24000,7 +24000,7 @@ function xm(a11) {
24000
24000
  }
24001
24001
  var Bm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.name));
24002
24002
  var Vm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.type));
24003
- var vi = A2(Wr);
24003
+ var fi = A2(Wr);
24004
24004
  var ha = A2(Bo);
24005
24005
  var Fm = A2(Vo);
24006
24006
  var Gm = A2(Fo);
@@ -24033,32 +24033,32 @@ var Jm = A2((a11, e) => {
24033
24033
  var Qm = A2((a11, e) => {
24034
24034
  let t2 = q2(a11, e);
24035
24035
  if (t2) {
24036
- let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => pt(a11.tracks[r2]));
24036
+ let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => ut(a11.tracks[r2]));
24037
24037
  return i2 ? a11.tracks[i2] : void 0;
24038
24038
  }
24039
24039
  });
24040
24040
  var zm = A2(createSelector(N2, q2, (a11, e) => {
24041
24041
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24042
24042
  let r2 = a11[i2];
24043
- return mt(r2) && ht(r2);
24043
+ return ht(r2) && pt(r2);
24044
24044
  });
24045
24045
  return t2 ? a11[t2] : void 0;
24046
24046
  }));
24047
24047
  var Ym = A2(createSelector(N2, q2, (a11, e) => {
24048
24048
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24049
24049
  let r2 = a11[i2];
24050
- return mt(r2) && pt(r2);
24050
+ return ht(r2) && ut(r2);
24051
24051
  });
24052
24052
  return t2 ? a11[t2] : void 0;
24053
24053
  }));
24054
24054
  var Xm = A2(createSelector(N2, q2, (a11, e) => {
24055
24055
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24056
24056
  let r2 = a11[i2];
24057
- return ri(r2) && pt(r2);
24057
+ return ii(r2) && ut(r2);
24058
24058
  });
24059
24059
  return t2 ? a11[t2] : void 0;
24060
24060
  }));
24061
- var Sa = A2(createSelector(N2, q2, (a11, e) => Ue(a11, e)));
24061
+ var Sa = A2(createSelector(N2, q2, (a11, e) => xe(a11, e)));
24062
24062
  var ga = (a11) => createSelector(Sa(a11), (e) => e.audio);
24063
24063
  var eS = A2((a11, e) => {
24064
24064
  let t2 = q2(a11, e);
@@ -24108,21 +24108,21 @@ var oS = A2((a11, e) => {
24108
24108
  return t2.layer;
24109
24109
  }
24110
24110
  });
24111
- var va = createSelector([It, ye, Gr], (a11, e, t2) => {
24111
+ var va = createSelector([Rt, ye, Gr], (a11, e, t2) => {
24112
24112
  if (t2)
24113
24113
  return a11.filter((i2) => {
24114
24114
  var r2;
24115
24115
  return !i2.recipientPeer && !((r2 = i2.recipientRoles) != null && r2.length) || i2.sender && ![e, t2].includes(i2.sender) ? false : [e, t2].includes(i2.recipientPeer);
24116
24116
  });
24117
24117
  });
24118
- var Ma = createSelector([It, pa], (a11, e) => {
24118
+ var Ma = createSelector([Rt, pa], (a11, e) => {
24119
24119
  if (e)
24120
24120
  return a11.filter((t2) => {
24121
24121
  var i2, r2;
24122
24122
  return (i2 = t2.recipientRoles) != null && i2.length ? (r2 = t2.recipientRoles) == null ? void 0 : r2.includes(e) : false;
24123
24123
  });
24124
24124
  });
24125
- var jo = createSelector(It, (a11) => a11.filter((e) => {
24125
+ var jo = createSelector(Rt, (a11) => a11.filter((e) => {
24126
24126
  var t2;
24127
24127
  return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
24128
24128
  }));
@@ -24140,8 +24140,8 @@ var PS = createSelector([K, N2], (a11, e) => Object.values(a11).map((i2) => {
24140
24140
  }));
24141
24141
  var zo = (a11) => a11.roleChangeRequests[0] || null;
24142
24142
  var ES = createSelector([zo, K, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
24143
- var bS = createSelector([at], (a11) => St(a11));
24144
- var RS = createSelector([Zs], (a11) => St(a11));
24143
+ var bS = createSelector([at], (a11) => mt(a11));
24144
+ var RS = createSelector([Zs], (a11) => mt(a11));
24145
24145
  var Xo = createSelector([Y2, N2], (a11, e) => {
24146
24146
  let t2 = null;
24147
24147
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
@@ -24150,12 +24150,12 @@ var Zo = createSelector([ae, N2], (a11, e) => {
24150
24150
  let t2 = null;
24151
24151
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24152
24152
  });
24153
- var yi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24154
- var Ct = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24155
- var ki = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24153
+ var Mi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24154
+ var Ht = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24155
+ var yi = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24156
24156
  var ka = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24157
24157
  var $r = "hmsNotification";
24158
- var Pi = class {
24158
+ var ki = class {
24159
24159
  constructor(e) {
24160
24160
  this.id = 0;
24161
24161
  this.onNotification = (e2, t2) => {
@@ -24194,14 +24194,14 @@ var Pi = class {
24194
24194
  this.emitEvent(t2);
24195
24195
  }
24196
24196
  sendPeerUpdate(e, t2) {
24197
- let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 = yi[e];
24197
+ let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 = Mi[e];
24198
24198
  if (r2 && i2) {
24199
24199
  let s2 = this.createNotification(r2, i2, "info");
24200
24200
  this.emitEvent(s2);
24201
24201
  }
24202
24202
  }
24203
24203
  sendTrackUpdate(e, t2) {
24204
- let i2 = this.store.getState(vi(t2)), r2 = Ct[e];
24204
+ let i2 = this.store.getState(fi(t2)), r2 = Ht[e];
24205
24205
  if (r2) {
24206
24206
  let s2 = this.createNotification(r2, i2, "info");
24207
24207
  this.emitEvent(s2);
@@ -24232,7 +24232,7 @@ var Pi = class {
24232
24232
  this.emitEvent(t2);
24233
24233
  }
24234
24234
  sendPollUpdate(e, t2) {
24235
- let i2 = ki[e], r2 = this.store.getState(ya(t2));
24235
+ let i2 = yi[e], r2 = this.store.getState(ya(t2));
24236
24236
  if (i2) {
24237
24237
  let s2 = this.createNotification(i2, r2, "info");
24238
24238
  this.emitEvent(s2);
@@ -24249,7 +24249,7 @@ var Pi = class {
24249
24249
  return this.id++, { id: this.id, type: e, message: r2, data: t2, severity: i2 };
24250
24250
  }
24251
24251
  };
24252
- var Ei = class {
24252
+ var Pi = class {
24253
24253
  constructor(e) {
24254
24254
  this.queuedUpdates = {};
24255
24255
  this.timers = {};
@@ -24280,35 +24280,35 @@ function Pa(a11) {
24280
24280
  return a11 instanceof se || a11 instanceof U2;
24281
24281
  }
24282
24282
  var Ea = (a11, e) => {
24283
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24283
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24284
24284
  for (let i2 of t2) {
24285
24285
  let r2 = a11[i2], s2 = e[i2];
24286
- Ke(r2, s2) ? (re(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && re(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24286
+ $e(r2, s2) ? (re(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && re(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
24287
24287
  }
24288
24288
  };
24289
24289
  var ba = (a11, e) => {
24290
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24290
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24291
24291
  for (let i2 of t2) {
24292
24292
  let r2 = a11[i2], s2 = e[i2];
24293
- Ke(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24293
+ $e(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
24294
24294
  }
24295
24295
  };
24296
24296
  var Ra = (a11, e) => {
24297
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24297
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24298
24298
  for (let i2 of t2) {
24299
24299
  let r2 = a11[i2], s2 = e[i2];
24300
- Ke(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
24300
+ $e(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : Ei(r2, s2) && (a11[i2] = s2);
24301
24301
  }
24302
24302
  };
24303
24303
  var Kr = (a11, e) => {
24304
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24304
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24305
24305
  for (let i2 of t2) {
24306
24306
  let r2 = a11[i2], s2 = e[i2];
24307
- Ke(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24307
+ $e(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
24308
24308
  }
24309
24309
  };
24310
24310
  var Ia = (a11, e, t2) => {
24311
- let i2 = t2.reduce((s2, o2) => (s2[o2.firstTrackId] = Object.values(e[o2.getTrackIDBeingSent()] || {}).sort((n2, l2) => !n2.rid || !l2.rid ? 0 : n2.rid < l2.rid ? -1 : 1), s2), {}), r2 = Lt(Object.keys(a11), Object.keys(i2));
24311
+ let i2 = t2.reduce((s2, o2) => (s2[o2.firstTrackId] = Object.values(e[o2.getTrackIDBeingSent()] || {}).sort((n2, l2) => !n2.rid || !l2.rid ? 0 : n2.rid < l2.rid ? -1 : 1), s2), {}), r2 = Ct(Object.keys(a11), Object.keys(i2));
24312
24312
  for (let s2 of r2) {
24313
24313
  if (!i2[s2]) {
24314
24314
  delete a11[s2];
@@ -24320,9 +24320,9 @@ var Ia = (a11, e, t2) => {
24320
24320
  var qr = (a11, e) => {
24321
24321
  a11.plugins && re(a11.plugins, e.plugins) && (e.plugins = a11.plugins), a11.type === "video" && a11.layerDefinitions && re(a11.layerDefinitions, e.layerDefinitions) && (e.layerDefinitions = a11.layerDefinitions);
24322
24322
  };
24323
- var Ke = (a11, e) => a11 && e;
24323
+ var $e = (a11, e) => a11 && e;
24324
24324
  var jr = (a11, e) => a11 && !e;
24325
- var bi = (a11, e) => !a11 && e;
24325
+ var Ei = (a11, e) => !a11 && e;
24326
24326
  var re = (a11, e) => {
24327
24327
  if (a11 === e || a11.length === 0 && (e == null ? void 0 : e.length) === 0)
24328
24328
  return true;
@@ -24333,7 +24333,7 @@ var re = (a11, e) => {
24333
24333
  return false;
24334
24334
  return true;
24335
24335
  };
24336
- var Lt = (a11, e) => {
24336
+ var Ct = (a11, e) => {
24337
24337
  let t2 = /* @__PURE__ */ new Set();
24338
24338
  for (let i2 of a11)
24339
24339
  t2.add(i2);
@@ -24418,7 +24418,7 @@ var _2 = class a8 {
24418
24418
  return { recording: { browser: m({ running: false }, e == null ? void 0 : e.browser), server: m({ running: false }, e == null ? void 0 : e.server), hls: m({ running: false }, e == null ? void 0 : e.hls) }, rtmp: m({ running: false }, t2), hls: { variants: ((s2 = i2 == null ? void 0 : i2.variants) == null ? void 0 : s2.map((o2) => o2)) || [], running: !!(i2 != null && i2.running), error: i2 == null ? void 0 : i2.error }, transcriptions: r2 || [] };
24419
24419
  }
24420
24420
  };
24421
- var Dt = class {
24421
+ var Lt = class {
24422
24422
  constructor(e, t2, i2, r2) {
24423
24423
  this.playlistManager = e;
24424
24424
  this.syncPlaylistState = i2;
@@ -24489,7 +24489,7 @@ var Dt = class {
24489
24489
  });
24490
24490
  }
24491
24491
  };
24492
- var Ri = class {
24492
+ var bi = class {
24493
24493
  constructor(e, t2) {
24494
24494
  this.sdk = e;
24495
24495
  this.setLocally = t2;
@@ -24516,7 +24516,7 @@ var Ri = class {
24516
24516
  });
24517
24517
  }
24518
24518
  };
24519
- var Ii = class {
24519
+ var Ri = class {
24520
24520
  constructor(e, t2) {
24521
24521
  this.intervalMs = 100, this.shouldMonitor = false, this.hasStarted = false, this.unsubs = [], this.analysers = {}, this.store = e, this.actions = t2;
24522
24522
  }
@@ -24596,7 +24596,7 @@ var Aa = 2e4;
24596
24596
  var Ha = 1e4;
24597
24597
  var ot = { name: "diagnostics-role", priority: 1, publishParams: { allowed: ["audio", "video"], audio: { bitRate: 32, codec: "opus" }, video: { bitRate: 100, codec: "vp8", frameRate: 30, height: 720, width: 1280 }, screen: { bitRate: 100, codec: "vp8", frameRate: 10, height: 1080, width: 1920 } }, subscribeParams: { subscribeToRoles: [], maxSubsBitRate: 3200 }, permissions: { browserRecording: false, changeRole: false, endRoom: false, hlsStreaming: false, mute: false, pollRead: false, pollWrite: false, removeOthers: false, rtmpStreaming: false, unmute: false } };
24598
24598
  var Ca = "https://100ms.live/test-audio.wav";
24599
- var Ai = class {
24599
+ var Ii = class {
24600
24600
  constructor() {
24601
24601
  this.networkScores = [];
24602
24602
  this.lastPushedAt = 0;
@@ -24622,7 +24622,7 @@ var Ne = (a11, e) => {
24622
24622
  let t2 = a11.filter((i2) => tn2(e(i2)));
24623
24623
  return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
24624
24624
  };
24625
- var Hi = class {
24625
+ var Ai = class {
24626
24626
  constructor(e) {
24627
24627
  this.sdk = e;
24628
24628
  this.peerStatsList = [];
@@ -24641,14 +24641,14 @@ var Hi = class {
24641
24641
  let o2 = yield (f2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : f2.getStats();
24642
24642
  o2 == null || o2.forEach((P7) => {
24643
24643
  if (P7.type === "inbound-rtp") {
24644
- let k2 = P7.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Et("bytesReceived", P7, de(k2));
24644
+ let k2 = P7.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Pt("bytesReceived", P7, de(k2));
24645
24645
  k2.push(M2(m({}, P7), { bitrate: w2 }));
24646
24646
  }
24647
24647
  });
24648
24648
  });
24649
24649
  }
24650
24650
  buildReport() {
24651
- var T, g2, f2, P7, k2, w2, xe, Zt;
24651
+ var T, g2, f2, P7, k2, w2, Oe, Xt;
24652
24652
  let e = (T = de(this.peerStatsList)) == null ? void 0 : T.publish, t2 = (g2 = de(this.peerStatsList)) == null ? void 0 : g2.subscribe, i2 = e != null && e.responsesReceived ? ((e == null ? void 0 : e.totalRoundTripTime) || 0) / e.responsesReceived : 0, r2 = t2 != null && t2.responsesReceived ? ((t2 == null ? void 0 : t2.totalRoundTripTime) || 0) / t2.responsesReceived : 0, s2 = Number(((i2 + r2) / 2 * 1e3).toFixed(2)), o2 = ((f2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : f2.packetsReceived) || 0, n2 = ((P7 = de(this.remoteVideoTrackStatsList)) == null ? void 0 : P7.packetsReceived) || 0, l2 = this.localAudioTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), u2 = this.localVideoTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), p2 = de(this.localAudioTrackStatsList), h2 = de(this.localVideoTrackStatsList);
24653
24653
  return { combined: { roundTripTime: s2, packetsReceived: o2 + n2, packetsLost: (t2 == null ? void 0 : t2.packetsLost) || 0, bytesSent: (e == null ? void 0 : e.bytesSent) || 0, bytesReceived: (t2 == null ? void 0 : t2.bytesReceived) || 0, bitrateSent: Ne(this.peerStatsList, (x2) => {
24654
24654
  var $;
@@ -24656,13 +24656,13 @@ var Hi = class {
24656
24656
  }), bitrateReceived: Ne(this.peerStatsList, (x2) => {
24657
24657
  var $;
24658
24658
  return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
24659
- }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((k2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : k2.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: Ne(l2, (x2) => x2), bitrateReceived: Ne(this.remoteAudioTrackStatsList, (x2) => x2.bitrate), bytesSent: p2 ? Object.values(p2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 }, video: { roundTripTime: s2, packetsLost: ((xe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : xe.packetsLost) || 0, bytesReceived: ((Zt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Zt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: Ne(u2, (x2) => x2), bitrateReceived: Ne(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24659
+ }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((k2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : k2.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: Ne(l2, (x2) => x2), bitrateReceived: Ne(this.remoteAudioTrackStatsList, (x2) => x2.bitrate), bytesSent: p2 ? Object.values(p2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 }, video: { roundTripTime: s2, packetsLost: ((Oe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Oe.packetsLost) || 0, bytesReceived: ((Xt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Xt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: Ne(u2, (x2) => x2), bitrateReceived: Ne(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24660
24660
  }
24661
24661
  };
24662
24662
  var rn2 = ((n2) => (n2[n2.STARTING = 0] = "STARTING", n2[n2.INIT_FETCHED = 1] = "INIT_FETCHED", n2[n2.SIGNAL_CONNECTED = 2] = "SIGNAL_CONNECTED", n2[n2.ICE_ESTABLISHED = 3] = "ICE_ESTABLISHED", n2[n2.MEDIA_CAPTURED = 4] = "MEDIA_CAPTURED", n2[n2.MEDIA_PUBLISHED = 5] = "MEDIA_PUBLISHED", n2[n2.COMPLETED = 6] = "COMPLETED", n2))(rn2 || {});
24663
24663
  var La;
24664
24664
  var Da;
24665
- var Ci = class {
24665
+ var Hi = class {
24666
24666
  constructor(e, t2, i2, r2) {
24667
24667
  this.sdk = e;
24668
24668
  this.sdkListener = t2;
@@ -24679,7 +24679,7 @@ var Ci = class {
24679
24679
  this.isVideoTrackCaptured = false;
24680
24680
  this.isAudioTrackPublished = false;
24681
24681
  this.isVideoTrackPublished = false;
24682
- this.cqsCalculator = new Ai();
24682
+ this.cqsCalculator = new Ii();
24683
24683
  this.timestamp = Date.now();
24684
24684
  this.onRoomUpdate = this.sdkListener.onRoomUpdate.bind(this.sdkListener);
24685
24685
  this.onPeerUpdate = this.sdkListener.onPeerUpdate.bind(this.sdkListener);
@@ -24703,7 +24703,7 @@ var Ci = class {
24703
24703
  });
24704
24704
  this.cqsCalculator.pushScore(t3 == null ? void 0 : t3.downlinkQuality);
24705
24705
  };
24706
- this.statsCollector = new Hi(e), this.state = 0;
24706
+ this.statsCollector = new Ai(e), this.state = 0;
24707
24707
  }
24708
24708
  get state() {
24709
24709
  return this._state;
@@ -24769,7 +24769,7 @@ var Ci = class {
24769
24769
  }
24770
24770
  cleanupAndReport() {
24771
24771
  var e;
24772
- clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 && this.errors.length === 0 && (this.state = 6), (e = this.completionCallback) == null || e.call(this, this.buildReport()), this.sdk.leave();
24772
+ clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 && (this.state = 6), (e = this.completionCallback) == null || e.call(this, this.buildReport()), this.sdk.leave();
24773
24773
  }
24774
24774
  buildReport() {
24775
24775
  this.cqsCalculator.addPendingCQSTillNow();
@@ -24777,7 +24777,7 @@ var Ci = class {
24777
24777
  return { testTimestamp: this.timestamp, connectivityState: this.state, errors: this.errors, signallingReport: { isConnected: this.wsConnected, isInitConnected: this.initConnected, websocketUrl: this.websocketURL }, mediaServerReport: { stats: t2, connectionQualityScore: e, isPublishICEConnected: this.isPublishICEConnected, isSubscribeICEConnected: this.isSubscribeICEConnected, publishICECandidatePairSelected: this.selectedPublishICECandidate, subscribeICECandidatePairSelected: this.selectedSubscribeICECandidate, publishIceCandidatesGathered: this.gatheredPublishICECandidates, subscribeIceCandidatesGathered: this.gatheredSubscribeICECandidates } };
24778
24778
  }
24779
24779
  };
24780
- var Oe = class {
24780
+ var Ke = class {
24781
24781
  constructor(e) {
24782
24782
  this.recording = { server: { running: false }, browser: { running: false }, hls: { running: false } };
24783
24783
  this.rtmp = { running: false };
@@ -24786,7 +24786,7 @@ var Oe = class {
24786
24786
  this.id = e;
24787
24787
  }
24788
24788
  };
24789
- var Li = (a11, e, t2) => c2(void 0, null, function* () {
24789
+ var Ci = (a11, e, t2) => c2(void 0, null, function* () {
24790
24790
  let r2 = Error("something went wrong during fetch");
24791
24791
  for (let s2 = 0; s2 < 4; s2++)
24792
24792
  try {
@@ -24799,33 +24799,19 @@ var Li = (a11, e, t2) => c2(void 0, null, function* () {
24799
24799
  }
24800
24800
  throw ["Failed to fetch", "NetworkError"].some((s2) => r2.message.includes(s2)) ? S2.APIErrors.EndpointUnreachable("GET_TOKEN", r2.message) : r2;
24801
24801
  });
24802
- function nt(a11) {
24803
- if (!a11 || a11.length === 0)
24804
- throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
24805
- let e = a11.split(".");
24806
- if (e.length !== 3)
24807
- throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
24808
- let t2 = atob(e[1]);
24809
- try {
24810
- let i2 = JSON.parse(t2);
24811
- return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
24812
- } catch (i2) {
24813
- throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
24814
- }
24815
- }
24816
- var wt = class {
24802
+ var Dt = class {
24817
24803
  constructor(e, t2) {
24818
24804
  this.sdk = e;
24819
24805
  this.sdkListener = t2;
24820
24806
  this.recordedAudio = Ca;
24821
- this.initSdkWithLocalPeer();
24807
+ this.sdk.setIsDiagnostics(true), this.initSdkWithLocalPeer();
24822
24808
  }
24823
24809
  get localPeer() {
24824
24810
  var e;
24825
24811
  return (e = this.sdk) == null ? void 0 : e.store.getLocalPeer();
24826
24812
  }
24827
24813
  checkBrowserSupport() {
24828
- Tt(), gt();
24814
+ gt(), St();
24829
24815
  }
24830
24816
  requestPermission(e) {
24831
24817
  return c2(this, null, function* () {
@@ -24890,14 +24876,13 @@ var wt = class {
24890
24876
  }
24891
24877
  startConnectivityCheck(e, t2, i2) {
24892
24878
  return c2(this, null, function* () {
24893
- var o2;
24894
24879
  if (!this.sdk)
24895
24880
  throw new Error("SDK not found");
24896
- this.connectivityCheck = new Ci(this.sdk, this.sdkListener, e, t2);
24897
- let r2 = yield this.getAuthToken(i2), { roomId: s2 } = nt(r2);
24898
- yield this.sdk.leave(), (o2 = this.sdk) == null || o2.store.setRoom(new Oe(s2)), yield this.sdk.join({ authToken: r2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, this.connectivityCheck), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: (n2) => {
24899
- var l2;
24900
- (l2 = this.connectivityCheck) == null || l2.handleConnectionQualityUpdate(n2);
24881
+ this.connectivityCheck = new Hi(this.sdk, this.sdkListener, e, t2);
24882
+ let r2 = yield this.getAuthToken(i2);
24883
+ yield this.sdk.leave(), yield this.sdk.join({ authToken: r2, userName: "diagnostics-test" }, this.connectivityCheck), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: (s2) => {
24884
+ var o2;
24885
+ (o2 = this.connectivityCheck) == null || o2.handleConnectionQualityUpdate(s2);
24901
24886
  } });
24902
24887
  });
24903
24888
  }
@@ -24912,16 +24897,16 @@ var wt = class {
24912
24897
  this.sdkListener && ((r2 = this.sdk) == null || r2.initStoreAndManagers(M2(m({}, this.sdkListener), { onError: (n2) => {
24913
24898
  e == null || e(n2), this.sdkListener.onError(n2);
24914
24899
  } })));
24915
- let t2 = new $e({ name: "diagnostics-peer", role: ot, type: "regular" });
24900
+ let t2 = new We({ name: "diagnostics-peer", role: ot, type: "regular" });
24916
24901
  (s2 = this.sdk) == null || s2.store.addPeer(t2);
24917
- let i2 = new Oe("diagnostics-room");
24902
+ let i2 = new Ke("diagnostics-room");
24918
24903
  this.sdk.store.setRoom(i2), this.sdkListener.onRoomUpdate("ROOM_PEER_COUNT_UPDATED", i2), (o2 = this.sdk) == null || o2.deviceManager.init(true);
24919
24904
  }
24920
24905
  getAuthToken(e) {
24921
24906
  return c2(this, null, function* () {
24922
- let t2 = new URL("https://api-nonprod.100ms.live/v2/diagnostics/token");
24907
+ let t2 = new URL("https://api.100ms.live/v2/diagnostics/token");
24923
24908
  e && t2.searchParams.append("region", e);
24924
- let i2 = yield Li(t2.toString(), { method: "GET" }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), r2 = yield i2.json();
24909
+ let i2 = yield Ci(t2.toString(), { method: "GET" }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), r2 = yield i2.json();
24925
24910
  if (!i2.ok)
24926
24911
  throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
24927
24912
  let { token: s2 } = r2;
@@ -24941,7 +24926,7 @@ var wt = class {
24941
24926
  });
24942
24927
  }
24943
24928
  };
24944
- var Di = class {
24929
+ var Li = class {
24945
24930
  constructor(e, t2, i2) {
24946
24931
  this.isRoomJoinCalled = false;
24947
24932
  this.ignoredMessageTypes = [];
@@ -24956,7 +24941,7 @@ var Di = class {
24956
24941
  }, e2);
24957
24942
  };
24958
24943
  this.sendPeerUpdateNotification = (e2, t3) => {
24959
- let i3 = this.store.getState(X2(t3.peerId)), r2 = yi[e2] || "peerUpdate";
24944
+ let i3 = this.store.getState(X2(t3.peerId)), r2 = Mi[e2] || "peerUpdate";
24960
24945
  if (e2 === 8)
24961
24946
  this.syncRoomState(r2), this.updateMidCallPreviewRoomState(e2, t3);
24962
24947
  else if ([0, 1].includes(e2))
@@ -24967,14 +24952,14 @@ var Di = class {
24967
24952
  let s2 = _2.convertPeer(t3);
24968
24953
  this.setState((o2) => {
24969
24954
  let n2 = o2.peers[s2.id];
24970
- Ke(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
24955
+ $e(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
24971
24956
  }, r2);
24972
24957
  }
24973
24958
  this.hmsNotifications.sendPeerUpdate(e2, i3);
24974
24959
  };
24975
24960
  this.getSDKHMSPeer = (e2) => this.sdk.getPeerMap()[e2];
24976
24961
  this.setState = (e2, t3) => this.store.namedSetState(e2, t3);
24977
- this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new Ri(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Ei(e);
24962
+ this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new bi(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Pi(e);
24978
24963
  }
24979
24964
  getLocalTrack(e) {
24980
24965
  return this.sdk.store.getLocalPeerTracks().find((t2) => t2.trackId === e);
@@ -25478,16 +25463,16 @@ var Di = class {
25478
25463
  }
25479
25464
  enableBeamSpeakerLabelsLogging() {
25480
25465
  return c2(this, null, function* () {
25481
- this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ii(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25466
+ this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ri(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25482
25467
  });
25483
25468
  }
25484
25469
  initDiagnostics() {
25485
- let e = new wt(this.sdk, { onJoin: this.onJoin.bind(this), onPreview: this.onPreview.bind(this), onRoomUpdate: this.onRoomUpdate.bind(this), onPeerUpdate: this.onPeerUpdate.bind(this), onTrackUpdate: this.onTrackUpdate.bind(this), onMessageReceived: this.onMessageReceived.bind(this), onError: this.onError.bind(this), onReconnected: this.onReconnected.bind(this), onReconnecting: this.onReconnecting.bind(this), onRoleChangeRequest: this.onRoleChangeRequest.bind(this), onRoleUpdate: this.onRoleUpdate.bind(this), onDeviceChange: this.onDeviceChange.bind(this), onChangeTrackStateRequest: this.onChangeTrackStateRequest.bind(this), onChangeMultiTrackStateRequest: this.onChangeMultiTrackStateRequest.bind(this), onRemovedFromRoom: this.onRemovedFromRoom.bind(this), onNetworkQuality: this.onNetworkQuality.bind(this), onSessionStoreUpdate: this.onSessionStoreUpdate.bind(this), onPollsUpdate: this.onPollsUpdate.bind(this), onWhiteboardUpdate: this.onWhiteboardUpdate.bind(this) });
25470
+ let e = new Dt(this.sdk, { onJoin: this.onJoin.bind(this), onPreview: this.onPreview.bind(this), onRoomUpdate: this.onRoomUpdate.bind(this), onPeerUpdate: this.onPeerUpdate.bind(this), onTrackUpdate: this.onTrackUpdate.bind(this), onMessageReceived: this.onMessageReceived.bind(this), onError: this.onError.bind(this), onReconnected: this.onReconnected.bind(this), onReconnecting: this.onReconnecting.bind(this), onRoleChangeRequest: this.onRoleChangeRequest.bind(this), onRoleUpdate: this.onRoleUpdate.bind(this), onDeviceChange: this.onDeviceChange.bind(this), onChangeTrackStateRequest: this.onChangeTrackStateRequest.bind(this), onChangeMultiTrackStateRequest: this.onChangeMultiTrackStateRequest.bind(this), onRemovedFromRoom: this.onRemovedFromRoom.bind(this), onNetworkQuality: this.onNetworkQuality.bind(this), onSessionStoreUpdate: this.onSessionStoreUpdate.bind(this), onPollsUpdate: this.onPollsUpdate.bind(this), onWhiteboardUpdate: this.onWhiteboardUpdate.bind(this) });
25486
25471
  return this.sdk.addAudioListener({ onAudioLevelUpdate: this.onAudioLevelUpdate.bind(this) }), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: this.onConnectionQualityUpdate.bind(this) }), e;
25487
25472
  }
25488
25473
  resetState(e = "resetState") {
25489
25474
  this.isRoomJoinCalled = false, b2.cleanup(), this.setState((t2) => {
25490
- Object.assign(t2, ti());
25475
+ Object.assign(t2, ei());
25491
25476
  }, e);
25492
25477
  }
25493
25478
  sdkJoinWithListeners(e) {
@@ -25532,7 +25517,7 @@ var Di = class {
25532
25517
  this.setSessionStoreValueLocally(e, "sessionStoreUpdate");
25533
25518
  }
25534
25519
  onPollsUpdate(e, t2) {
25535
- let i2 = ki[e];
25520
+ let i2 = yi[e];
25536
25521
  this.setState((r2) => {
25537
25522
  let s2 = t2.reduce((o2, n2) => {
25538
25523
  var l2;
@@ -25599,7 +25584,7 @@ var Di = class {
25599
25584
  }
25600
25585
  onJoin(e) {
25601
25586
  let t2 = this.sdk.getPlaylistManager();
25602
- this.audioPlaylist = new Dt(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Dt(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
25587
+ this.audioPlaylist = new Lt(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Lt(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
25603
25588
  var r2;
25604
25589
  Object.assign(i2.room, _2.convertRoom(e, (r2 = this.sdk.getLocalPeer()) == null ? void 0 : r2.peerId)), i2.room.isConnected = true, i2.room.roomState = "Connected";
25605
25590
  }, "joined"), t2.onProgress(this.setProgress), t2.onNewTrackStart((i2) => {
@@ -25641,13 +25626,13 @@ var Di = class {
25641
25626
  if (e === 1)
25642
25627
  this.hmsNotifications.sendTrackUpdate(e, t2.trackId), this.handleTrackRemove(t2, i2);
25643
25628
  else if ([0, 1].includes(e)) {
25644
- let r2 = Ct[e];
25629
+ let r2 = Ht[e];
25645
25630
  this.syncRoomState(r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
25646
25631
  } else {
25647
- let r2 = Ct[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25632
+ let r2 = Ht[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25648
25633
  this.setState((o2) => {
25649
25634
  let n2 = o2.tracks[s2.id];
25650
- Ke(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
25635
+ $e(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
25651
25636
  }, r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
25652
25637
  }
25653
25638
  }
@@ -25684,7 +25669,7 @@ var Di = class {
25684
25669
  }
25685
25670
  onChangeTrackStateRequest(e) {
25686
25671
  var s2;
25687
- let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(vi(i2));
25672
+ let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(fi(i2));
25688
25673
  if (!r2)
25689
25674
  return this.logPossibleInconsistency(`Not found track for which track state change was requested, ${e.track}`);
25690
25675
  e.enabled || this.syncRoomState("changeTrackStateRequest"), this.hmsNotifications.sendChangeTrackStateRequest({ requestedBy: t2 || void 0, track: r2, enabled: e.enabled });
@@ -25856,8 +25841,8 @@ var Di = class {
25856
25841
  }, t2);
25857
25842
  }
25858
25843
  };
25859
- var wi = (a11) => O2 ? `${a11} ${document.title}` : a11;
25860
- var _i = class {
25844
+ var Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
25845
+ var wi = class {
25861
25846
  constructor(e, t2) {
25862
25847
  this.eventBus = e;
25863
25848
  this.listener = t2;
@@ -25912,7 +25897,7 @@ var _i = class {
25912
25897
  e !== this.score && (this.score = e, (i2 = (t2 = this.listener) == null ? void 0 : t2.onNetworkQuality) == null || i2.call(t2, e));
25913
25898
  }
25914
25899
  };
25915
- var _t = class {
25900
+ var wt = class {
25916
25901
  constructor(e, t2, i2, r2, s2, o2) {
25917
25902
  this.store = e;
25918
25903
  this.transport = t2;
@@ -25926,8 +25911,8 @@ var _t = class {
25926
25911
  r3 && (yield this.diffRolesAndPublishTracks({ oldRole: e2, newRole: t3 }), (s3 = this.listener) == null || s3.onPeerUpdate(8, r3));
25927
25912
  });
25928
25913
  this.diffRolesAndPublishTracks = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
25929
- var g2, f2, P7, k2, w2, xe;
25930
- let r3 = new Set(e2.publishParams.allowed), s3 = new Set(t3.publishParams.allowed), o3 = this.removeTrack(r3, s3, "video"), n2 = this.removeTrack(r3, s3, "audio"), l2 = this.removeTrack(r3, s3, "screen"), u2 = this.hasSimulcastDifference((g2 = e2.publishParams.simulcast) == null ? void 0 : g2.video, (f2 = t3.publishParams.simulcast) == null ? void 0 : f2.video), p2 = this.hasSimulcastDifference((P7 = e2.publishParams.simulcast) == null ? void 0 : P7.screen, (k2 = t3.publishParams.simulcast) == null ? void 0 : k2.screen), h2 = (xe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : xe.enabled;
25914
+ var g2, f2, P7, k2, w2, Oe;
25915
+ let r3 = new Set(e2.publishParams.allowed), s3 = new Set(t3.publishParams.allowed), o3 = this.removeTrack(r3, s3, "video"), n2 = this.removeTrack(r3, s3, "audio"), l2 = this.removeTrack(r3, s3, "screen"), u2 = this.hasSimulcastDifference((g2 = e2.publishParams.simulcast) == null ? void 0 : g2.video, (f2 = t3.publishParams.simulcast) == null ? void 0 : f2.video), p2 = this.hasSimulcastDifference((P7 = e2.publishParams.simulcast) == null ? void 0 : P7.screen, (k2 = t3.publishParams.simulcast) == null ? void 0 : k2.screen), h2 = (Oe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : Oe.enabled;
25931
25916
  yield this.removeAudioTrack(n2), yield this.removeVideoTracks(o3 || u2), yield this.removeScreenTracks(l2 || p2);
25932
25917
  let T = this.getSettings();
25933
25918
  u2 && (T.isVideoMuted = !h2), yield this.publish(T), yield this.syncDevices(T, t3);
@@ -26034,12 +26019,12 @@ var Jr = class {
26034
26019
  }
26035
26020
  };
26036
26021
  var Pe = new Jr();
26037
- var Nt = class {
26022
+ var _t = class {
26038
26023
  constructor(e) {
26039
26024
  this.type = e.type, this.source = e.source || "regular", this.description = "", e instanceof Re ? (this.mute = !e.enabled, this.track_id = e.publishedTrackId, this.stream_id = e.stream.id) : (this.mute = e.mute, this.track_id = e.track_id, this.stream_id = e.stream_id);
26040
26025
  }
26041
26026
  };
26042
- var Ot = class {
26027
+ var Nt = class {
26043
26028
  constructor() {
26044
26029
  this.TAG = "[Store]:";
26045
26030
  this.knownRoles = {};
@@ -26050,7 +26035,7 @@ var Ot = class {
26050
26035
  this.roleDetailsArrived = false;
26051
26036
  this.env = "prod";
26052
26037
  this.simulcastEnabled = false;
26053
- this.userAgent = ft(this.env);
26038
+ this.userAgent = Tt(this.env);
26054
26039
  this.polls = /* @__PURE__ */ new Map();
26055
26040
  this.whiteboards = /* @__PURE__ */ new Map();
26056
26041
  this.addPermissionToRole = (e, t2, i2, r2) => {
@@ -26170,7 +26155,7 @@ var Ot = class {
26170
26155
  return this.userAgent;
26171
26156
  }
26172
26157
  createAndSetUserAgent(e) {
26173
- this.userAgent = ft(this.env, e);
26158
+ this.userAgent = Tt(this.env, e);
26174
26159
  }
26175
26160
  setRoom(e) {
26176
26161
  this.room = e;
@@ -26242,7 +26227,7 @@ var Ot = class {
26242
26227
  return [];
26243
26228
  let i2 = this.getPolicyForRole(e.role.name).publishParams, r2, s2, o2;
26244
26229
  return t2 === "regular" ? (r2 = (n2 = i2.simulcast) == null ? void 0 : n2.video, s2 = i2.video.width, o2 = i2.video.height) : t2 === "screen" && (r2 = (l2 = i2.simulcast) == null ? void 0 : l2.screen, s2 = i2.screen.width, o2 = i2.screen.height), ((u2 = r2 == null ? void 0 : r2.layers) == null ? void 0 : u2.map((p2) => {
26245
- let h2 = Ve[p2.rid], T = { width: Math.floor(s2 / p2.scaleResolutionDownBy), height: Math.floor(o2 / p2.scaleResolutionDownBy) };
26230
+ let h2 = Be[p2.rid], T = { width: Math.floor(s2 / p2.scaleResolutionDownBy), height: Math.floor(o2 / p2.scaleResolutionDownBy) };
26246
26231
  return { layer: h2, resolution: T };
26247
26232
  })) || [];
26248
26233
  }
@@ -26310,7 +26295,7 @@ var Ot = class {
26310
26295
  t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
26311
26296
  }
26312
26297
  };
26313
- var Ni = class {
26298
+ var _i = class {
26314
26299
  constructor() {
26315
26300
  this.TAG = "[WakeLockManager]";
26316
26301
  this.wakeLock = null;
@@ -26344,7 +26329,7 @@ var Ni = class {
26344
26329
  });
26345
26330
  }
26346
26331
  };
26347
- var Oi = class {
26332
+ var Ni = class {
26348
26333
  constructor(e) {
26349
26334
  this.store = e;
26350
26335
  this.bufferSize = 100;
@@ -26387,7 +26372,7 @@ var Oi = class {
26387
26372
  }
26388
26373
  };
26389
26374
  var wa = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26390
- var xt = class {
26375
+ var Ot = class {
26391
26376
  constructor(e, t2, i2) {
26392
26377
  this.store = e;
26393
26378
  this.deviceManager = t2;
@@ -26525,7 +26510,7 @@ var xt = class {
26525
26510
  });
26526
26511
  }
26527
26512
  };
26528
- var xi = class {
26513
+ var Oi = class {
26529
26514
  constructor(e) {
26530
26515
  this.eventBus = e;
26531
26516
  this.pluginUsage = /* @__PURE__ */ new Map();
@@ -26564,7 +26549,7 @@ var xi = class {
26564
26549
  this.eventBus.analytics.subscribe((t2) => this.updatePluginUsageData(t2));
26565
26550
  }
26566
26551
  };
26567
- var Ut = class {
26552
+ var xt = class {
26568
26553
  constructor(e, t2) {
26569
26554
  this.store = e;
26570
26555
  this.eventBus = t2;
@@ -26602,7 +26587,7 @@ var Ut = class {
26602
26587
  let e2 = this.store.getLocalPeer();
26603
26588
  !((s2 = (r2 = this.store.getConfig()) == null ? void 0 : r2.settings) == null ? void 0 : s2.videoDeviceId) && (e2 != null && e2.videoTrack) && (yield e2.videoTrack.setSettings({ deviceId: (o2 = this.videoInput[0]) == null ? void 0 : o2.deviceId }, true)), !((l2 = (n2 = this.store.getConfig()) == null ? void 0 : n2.settings) == null ? void 0 : l2.audioInputDeviceId) && (e2 != null && e2.audioTrack) && (yield e2.audioTrack.setSettings({ deviceId: (u2 = this.audioInput[0]) == null ? void 0 : u2.deviceId }, true));
26604
26589
  });
26605
- this.handleDeviceChange = oi(() => c2(this, null, function* () {
26590
+ this.handleDeviceChange = ai(() => c2(this, null, function* () {
26606
26591
  yield this.enumerateDevices(), this.logDevices("After Device Change");
26607
26592
  let e2 = this.store.getLocalPeer();
26608
26593
  yield this.setOutputDevice(true), yield this.handleAudioInputDeviceChange(e2 == null ? void 0 : e2.audioTrack), yield this.handleVideoInputDeviceChange(e2 == null ? void 0 : e2.videoTrack), this.eventBus.analytics.publish(y2.deviceChange({ selection: this.getCurrentSelection(), type: "change", devices: this.getDevices() }));
@@ -26708,7 +26693,7 @@ var Ut = class {
26708
26693
  d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
26709
26694
  }
26710
26695
  };
26711
- var Ui = class {
26696
+ var xi = class {
26712
26697
  constructor(e, t2) {
26713
26698
  this.deviceManager = e;
26714
26699
  this.audioSinkManager = t2;
@@ -26755,7 +26740,7 @@ var V = class {
26755
26740
  };
26756
26741
  }
26757
26742
  };
26758
- var Bt = class {
26743
+ var Ut = class {
26759
26744
  constructor() {
26760
26745
  this.eventEmitter = new nn2();
26761
26746
  this.analytics = new V(G2.ANALYTICS, this.eventEmitter);
@@ -26777,7 +26762,7 @@ var Bt = class {
26777
26762
  this.leave = new V(G2.LEAVE, this.eventEmitter);
26778
26763
  }
26779
26764
  };
26780
- var Bi = class {
26765
+ var Ui = class {
26781
26766
  constructor(e, t2, i2) {
26782
26767
  this.store = e;
26783
26768
  this.listener = t2;
@@ -26795,7 +26780,7 @@ var Bi = class {
26795
26780
  (n2 = this.listener) == null || n2.onPeerUpdate(5, null);
26796
26781
  }
26797
26782
  };
26798
- var Vi = class {
26783
+ var Bi = class {
26799
26784
  constructor(e) {
26800
26785
  this.listener = e;
26801
26786
  this.TAG = "[BroadcastManager]";
@@ -26808,7 +26793,7 @@ var Vi = class {
26808
26793
  d2.d(this.TAG, `Received Message from sender=${(t2 = e == null ? void 0 : e.peer) == null ? void 0 : t2.peer_id}: ${e}`), (i2 = this.listener) == null || i2.onMessageReceived(e);
26809
26794
  }
26810
26795
  };
26811
- var Fi = class {
26796
+ var Vi = class {
26812
26797
  constructor(e, t2) {
26813
26798
  this.store = e;
26814
26799
  this.listener = t2;
@@ -26822,7 +26807,7 @@ var Fi = class {
26822
26807
  (r2 = this.listener) == null || r2.onConnectionQualityUpdate(i2);
26823
26808
  }
26824
26809
  };
26825
- var ct = class {
26810
+ var nt = class {
26826
26811
  constructor(e, t2, i2) {
26827
26812
  this.store = e;
26828
26813
  this.eventBus = t2;
@@ -26954,7 +26939,7 @@ var ct = class {
26954
26939
  return t2.mute !== i2.mute ? (r2 = i2.mute ? 2 : 3, e.type === "audio" && this.eventBus.audioTrackUpdate.publish({ track: e, enabled: !i2.mute })) : t2.description !== i2.description && (r2 = 4), r2;
26955
26940
  }
26956
26941
  };
26957
- var Gi = class extends ct {
26942
+ var Fi = class extends nt {
26958
26943
  constructor(t2, i2, r2, s2) {
26959
26944
  super(t2, i2, s2);
26960
26945
  this.transport = r2;
@@ -26994,7 +26979,7 @@ var Gi = class extends ct {
26994
26979
  return r2 && ((l2 = (o2 = (s2 = i2 == null ? void 0 : i2.role) == null ? void 0 : s2.subscribeParams) == null ? void 0 : o2.subscribeToRoles) == null ? void 0 : l2.includes((n2 = r2.role) == null ? void 0 : n2.name));
26995
26980
  }
26996
26981
  };
26997
- var Wi = class {
26982
+ var Gi = class {
26998
26983
  constructor(e, t2, i2, r2) {
26999
26984
  this.store = e;
27000
26985
  this.peerManager = t2;
@@ -27061,7 +27046,7 @@ var Wi = class {
27061
27046
  }
27062
27047
  };
27063
27048
  var C = (a11) => a11 ? new Date(a11) : void 0;
27064
- var $i = class {
27049
+ var Wi = class {
27065
27050
  constructor(e, t2, i2) {
27066
27051
  this.store = e;
27067
27052
  this.trackManager = t2;
@@ -27160,7 +27145,7 @@ var $i = class {
27160
27145
  });
27161
27146
  }
27162
27147
  };
27163
- var Ki = class {
27148
+ var $i = class {
27164
27149
  constructor(e, t2) {
27165
27150
  this.store = e;
27166
27151
  this.eventBus = t2;
@@ -27184,11 +27169,11 @@ var Ki = class {
27184
27169
  }
27185
27170
  }
27186
27171
  };
27187
- var Vt = (a11, e, t2) => {
27172
+ var Bt = (a11, e, t2) => {
27188
27173
  let i2 = t2 === "qa" ? Ws : Gs, r2 = new URL(i2);
27189
27174
  return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
27190
27175
  };
27191
- var qi = class {
27176
+ var Ki = class {
27192
27177
  constructor(e, t2, i2) {
27193
27178
  this.transport = e;
27194
27179
  this.store = t2;
@@ -27206,7 +27191,7 @@ var qi = class {
27206
27191
  let t2 = this.store.getWhiteboard(e == null ? void 0 : e.id), i2 = t2 == null ? void 0 : t2.id;
27207
27192
  if (t2 || (i2 = (yield this.transport.signal.createWhiteboard(this.getCreateOptionsWithDefaults(e))).id), !i2)
27208
27193
  throw new Error(`Whiteboard ID: ${i2} not found`);
27209
- let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url: Vt(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
27194
+ let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url: Bt(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
27210
27195
  this.store.setWhiteboard(s2), (o2 = this.listener) == null || o2.onWhiteboardUpdate(s2);
27211
27196
  });
27212
27197
  }
@@ -27231,7 +27216,7 @@ var qi = class {
27231
27216
  let e = this.store.getWhiteboards();
27232
27217
  for (let s2 of e.values())
27233
27218
  if (s2.url) {
27234
- let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url: Vt(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
27219
+ let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url: Bt(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
27235
27220
  this.store.setWhiteboard(p2), (r2 = this.listener) == null || r2.onWhiteboardUpdate(p2);
27236
27221
  }
27237
27222
  });
@@ -27245,12 +27230,12 @@ var qi = class {
27245
27230
  }), { title: (e == null ? void 0 : e.title) || `${(o2 = this.store.getRoom()) == null ? void 0 : o2.id} Whiteboard`, reader: (e == null ? void 0 : e.reader) || i2, writer: (e == null ? void 0 : e.writer) || r2, admin: (e == null ? void 0 : e.admin) || s2 };
27246
27231
  }
27247
27232
  };
27248
- var Ft = class {
27233
+ var Vt = class {
27249
27234
  constructor(e, t2, i2) {
27250
27235
  this.transport = e;
27251
27236
  this.store = t2;
27252
27237
  this.listener = i2;
27253
- this.whiteboard = new qi(e, t2, i2);
27238
+ this.whiteboard = new Ki(e, t2, i2);
27254
27239
  }
27255
27240
  setListener(e) {
27256
27241
  this.listener = e, this.whiteboard.setListener(e);
@@ -27260,7 +27245,7 @@ var Ft = class {
27260
27245
  var o2, n2;
27261
27246
  let t2 = { customerID: "userid", peerID: "peerid", userName: "username" }, { poll_id: i2 } = yield this.transport.signal.setPollInfo(M2(m({}, e), { mode: e.mode ? t2[e.mode] : void 0, poll_id: e.id, vote: e.rolesThatCanVote, responses: e.rolesThatCanViewResponses }));
27262
27247
  e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
27263
- let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 = ji(M2(m({}, e), { poll_id: e.id, state: "created", created_by: (o2 = this.store.getLocalPeer()) == null ? void 0 : o2.peerId }));
27248
+ let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 = qi(M2(m({}, e), { poll_id: e.id, state: "created", created_by: (o2 = this.store.getLocalPeer()) == null ? void 0 : o2.peerId }));
27264
27249
  s2.questions = r2.questions.map(({ question: l2, options: u2, answer: p2 }) => M2(m({}, l2), { options: u2, answer: p2 })), (n2 = this.listener) == null || n2.onPollsUpdate(0, [s2]);
27265
27250
  });
27266
27251
  }
@@ -27328,7 +27313,7 @@ var Ft = class {
27328
27313
  r2 = [...l2.polls, ...r2, ...u2.polls];
27329
27314
  }
27330
27315
  for (let l2 of r2) {
27331
- let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = ji(l2), h2 = this.store.getPoll(l2.poll_id);
27316
+ let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = qi(l2), h2 = this.store.getPoll(l2.poll_id);
27332
27317
  p2.questions = u2.questions.map(({ question: T, options: g2, answer: f2 }, P7) => {
27333
27318
  var k2, w2;
27334
27319
  return M2(m({}, T), { options: g2, answer: f2, responses: (w2 = (k2 = h2 == null ? void 0 : h2.questions) == null ? void 0 : k2[P7]) == null ? void 0 : w2.responses });
@@ -27354,11 +27339,11 @@ var Ft = class {
27354
27339
  return i2;
27355
27340
  }
27356
27341
  };
27357
- var ji = (a11) => {
27342
+ var qi = (a11) => {
27358
27343
  let e = { userid: "customerID", peerid: "peerID", username: "userName" };
27359
27344
  return { id: a11.poll_id, title: a11.title, startedBy: a11.started_by, createdBy: a11.created_by, anonymous: a11.anonymous, type: a11.type, duration: a11.duration, locked: a11.locked, mode: a11.mode ? e[a11.mode] : void 0, visibility: a11.visibility, rolesThatCanVote: a11.vote || [], rolesThatCanViewResponses: a11.responses || [], state: a11.state, stoppedBy: a11.stopped_by, startedAt: C(a11.started_at), stoppedAt: C(a11.stopped_at), createdAt: C(a11.created_at) };
27360
27345
  };
27361
- var Ji = class {
27346
+ var ji = class {
27362
27347
  constructor(e, t2, i2) {
27363
27348
  this.store = e;
27364
27349
  this.transport = t2;
@@ -27391,7 +27376,7 @@ var Ji = class {
27391
27376
  (i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
27392
27377
  return;
27393
27378
  }
27394
- let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = ji(s2);
27379
+ let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = qi(s2);
27395
27380
  l2.questions = n2.questions.map(({ question: u2, options: p2, answer: h2 }) => M2(m({}, u2), { options: p2, answer: h2 })), yield this.updatePollResponses(l2, true), t2.push(l2), this.store.setPoll(l2);
27396
27381
  }
27397
27382
  (r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
@@ -27451,7 +27436,7 @@ var Ji = class {
27451
27436
  });
27452
27437
  }
27453
27438
  };
27454
- var Qi = class {
27439
+ var Ji = class {
27455
27440
  constructor(e, t2) {
27456
27441
  this.store = e;
27457
27442
  this.listener = t2;
@@ -27512,7 +27497,7 @@ var Qi = class {
27512
27497
  return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
27513
27498
  }
27514
27499
  };
27515
- var zi = class {
27500
+ var Qi = class {
27516
27501
  constructor(e, t2) {
27517
27502
  this.store = e;
27518
27503
  this.listener = t2;
@@ -27669,7 +27654,7 @@ var zi = class {
27669
27654
  return d2.e(this.TAG, "error in streaming/recording", i2), i2;
27670
27655
  }
27671
27656
  };
27672
- var Yi = class {
27657
+ var zi = class {
27673
27658
  constructor(e, t2) {
27674
27659
  this.store = e;
27675
27660
  this.listener = t2;
@@ -27683,7 +27668,7 @@ var Yi = class {
27683
27668
  (i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
27684
27669
  }
27685
27670
  };
27686
- var Xi = class {
27671
+ var Yi = class {
27687
27672
  constructor(e, t2, i2) {
27688
27673
  this.store = e;
27689
27674
  this.transport = t2;
@@ -27708,13 +27693,13 @@ var Xi = class {
27708
27693
  o2.url = i2 == null ? void 0 : i2.url, o2.token = i2 == null ? void 0 : i2.token, o2.addr = i2 == null ? void 0 : i2.addr, o2.permissions = i2 == null ? void 0 : i2.permissions;
27709
27694
  else {
27710
27695
  let l2 = yield this.transport.signal.getWhiteboard({ id: e.id });
27711
- o2.url = Vt(l2.token, l2.addr, this.store.getEnv()), o2.token = l2.token, o2.addr = l2.addr, o2.permissions = l2.permissions, o2.open = l2.permissions.length > 0;
27696
+ o2.url = Bt(l2.token, l2.addr, this.store.getEnv()), o2.token = l2.token, o2.addr = l2.addr, o2.permissions = l2.permissions, o2.open = l2.permissions.length > 0;
27712
27697
  }
27713
27698
  this.store.setWhiteboard(o2), (n2 = this.listener) == null || n2.onWhiteboardUpdate(o2);
27714
27699
  });
27715
27700
  }
27716
27701
  };
27717
- var Zi = class {
27702
+ var Xi = class {
27718
27703
  constructor(e, t2, i2, r2, s2, o2) {
27719
27704
  this.store = e;
27720
27705
  this.transport = i2;
@@ -27741,7 +27726,7 @@ var Zi = class {
27741
27726
  this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
27742
27727
  };
27743
27728
  let n2 = this.transport.isFlagEnabled("onDemandTracks");
27744
- this.trackManager = n2 ? new Gi(this.store, t2, this.transport, this.listener) : new ct(this.store, t2, this.listener), this.peerManager = new $i(this.store, this.trackManager, this.listener), this.peerListManager = new Wi(this.store, this.peerManager, this.trackManager, this.listener), this.broadcastManager = new Vi(this.listener), this.policyChangeManager = new Ki(this.store, t2), this.requestManager = new Qi(this.store, this.listener), this.activeSpeakerManager = new Bi(this.store, this.listener, this.audioListener), this.connectionQualityManager = new Fi(this.store, this.connectionQualityListener), this.roomUpdateManager = new zi(this.store, this.listener), this.sessionMetadataManager = new Yi(this.store, this.listener), this.pollsManager = new Ji(this.store, this.transport, this.listener), this.whiteboardManager = new Xi(this.store, this.transport, this.listener);
27729
+ this.trackManager = n2 ? new Fi(this.store, t2, this.transport, this.listener) : new nt(this.store, t2, this.listener), this.peerManager = new Wi(this.store, this.trackManager, this.listener), this.peerListManager = new Gi(this.store, this.peerManager, this.trackManager, this.listener), this.broadcastManager = new Bi(this.listener), this.policyChangeManager = new $i(this.store, t2), this.requestManager = new Ji(this.store, this.listener), this.activeSpeakerManager = new Ui(this.store, this.listener, this.audioListener), this.connectionQualityManager = new Vi(this.store, this.connectionQualityListener), this.roomUpdateManager = new Qi(this.store, this.listener), this.sessionMetadataManager = new zi(this.store, this.listener), this.pollsManager = new ji(this.store, this.transport, this.listener), this.whiteboardManager = new Yi(this.store, this.transport, this.listener);
27745
27730
  }
27746
27731
  setListener(e) {
27747
27732
  this.listener = e, this.trackManager.listener = e, this.peerManager.listener = e, this.peerListManager.listener = e, this.broadcastManager.listener = e, this.requestManager.listener = e, this.activeSpeakerManager.listener = e, this.roomUpdateManager.listener = e, this.sessionMetadataManager.listener = e, this.pollsManager.listener = e, this.whiteboardManager.listener = e;
@@ -27793,7 +27778,7 @@ var Zi = class {
27793
27778
  }
27794
27779
  }
27795
27780
  };
27796
- var er = class {
27781
+ var Zi = class {
27797
27782
  constructor(e) {
27798
27783
  this.transport = e;
27799
27784
  this.observedKeys = /* @__PURE__ */ new Set();
@@ -27833,7 +27818,7 @@ var er = class {
27833
27818
  });
27834
27819
  }
27835
27820
  };
27836
- var tr = class {
27821
+ var er = class {
27837
27822
  constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
27838
27823
  this.authToken = e;
27839
27824
  this.peerId = t2;
@@ -27846,15 +27831,15 @@ var tr = class {
27846
27831
  };
27847
27832
  var j2 = ((s2) => (s2[s2.ConnectFailed = 0] = "ConnectFailed", s2[s2.SignalDisconnect = 1] = "SignalDisconnect", s2[s2.JoinWSMessageFailed = 2] = "JoinWSMessageFailed", s2[s2.PublishIceConnectionFailed = 3] = "PublishIceConnectionFailed", s2[s2.SubscribeIceConnectionFailed = 4] = "SubscribeIceConnectionFailed", s2))(j2 || {});
27848
27833
  var _a7 = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27849
- var ir = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(ir || {});
27850
- var rr = class {
27834
+ var tr = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(tr || {});
27835
+ var ir = class {
27851
27836
  constructor(e) {
27852
27837
  this.promise = new Promise((t2, i2) => {
27853
27838
  this.resolve = t2, this.reject = i2, e(t2, i2);
27854
27839
  });
27855
27840
  }
27856
27841
  };
27857
- var sr = class {
27842
+ var rr = class {
27858
27843
  constructor(e, t2) {
27859
27844
  this.onStateChange = e;
27860
27845
  this.sendEvent = t2;
@@ -27881,7 +27866,7 @@ var sr = class {
27881
27866
  d2.d(this.TAG, `schedule: Already a task for ${j2[e]} scheduled, waiting for its completion`), yield g2.promise;
27882
27867
  return;
27883
27868
  }
27884
- let f2 = new rr((P7, k2) => {
27869
+ let f2 = new ir((P7, k2) => {
27885
27870
  });
27886
27871
  this.inProgress.set(e, f2), this.sendEvent(t2, e);
27887
27872
  }
@@ -27942,7 +27927,7 @@ var sr = class {
27942
27927
  });
27943
27928
  }
27944
27929
  };
27945
- var ar = class extends Ce {
27930
+ var sr = class extends Ce {
27946
27931
  constructor() {
27947
27932
  super(100);
27948
27933
  this.localStorage = new le("hms-analytics");
@@ -27963,7 +27948,7 @@ var ar = class extends Ce {
27963
27948
  });
27964
27949
  }
27965
27950
  };
27966
- var or = class {
27951
+ var ar = class {
27967
27952
  constructor() {
27968
27953
  this.TAG = "[AnalyticsTransport]";
27969
27954
  }
@@ -27993,14 +27978,14 @@ var or = class {
27993
27978
  }
27994
27979
  }
27995
27980
  };
27996
- var nr = class extends or {
27981
+ var or = class extends ar {
27997
27982
  constructor(t2) {
27998
27983
  super();
27999
27984
  this.transportProvider = t2;
28000
- this.failedEvents = new ar();
27985
+ this.failedEvents = new sr();
28001
27986
  }
28002
27987
  };
28003
- var dt = class {
27988
+ var ct = class {
28004
27989
  constructor(e, t2, i2, r2) {
28005
27990
  this.store = e;
28006
27991
  this.eventBus = t2;
@@ -28035,7 +28020,7 @@ var dt = class {
28035
28020
  });
28036
28021
  }
28037
28022
  };
28038
- var lt = class {
28023
+ var dt = class {
28039
28024
  constructor({ track: e, ssrc: t2, rid: i2, kind: r2, sampleWindowSize: s2 }) {
28040
28025
  this.samples = [];
28041
28026
  this.tempStats = [];
@@ -28078,10 +28063,10 @@ var lt = class {
28078
28063
  return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
28079
28064
  }
28080
28065
  };
28081
- var cr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28082
- var dr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28083
- var Gt = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28084
- var Wt = class extends dt {
28066
+ var nr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28067
+ var cr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28068
+ var Ft = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28069
+ var Gt = class extends ct {
28085
28070
  constructor() {
28086
28071
  super(...arguments);
28087
28072
  this.trackAnalytics = /* @__PURE__ */ new Map();
@@ -28121,22 +28106,22 @@ var Wt = class extends dt {
28121
28106
  return i2.rid ? `${t2}:${i2.rid}` : t2;
28122
28107
  }
28123
28108
  };
28124
- var zr = class extends lt {
28109
+ var zr = class extends dt {
28125
28110
  constructor() {
28126
28111
  super(...arguments);
28127
28112
  this.samples = [];
28128
28113
  this.collateSample = () => {
28129
28114
  let t2 = this.getLatestStat(), i2 = t2.qualityLimitationDurations, r2 = i2 && { bandwidth_sec: i2.bandwidth, cpu_sec: i2.cpu, other_sec: i2.other }, s2 = t2.frameHeight ? { height_px: this.getLatestStat().frameHeight, width_px: this.getLatestStat().frameWidth } : void 0, o2 = this.calculateAverage("jitter", false), n2 = o2 ? Math.round(o2 * 1e3) : void 0, l2 = this.calculateAverage("roundTripTime", false), u2 = l2 ? Math.round(l2 * 1e3) : void 0;
28130
- return Gt({ timestamp: Date.now(), avg_available_outgoing_bitrate_bps: this.calculateAverage("availableOutgoingBitrate"), avg_bitrate_bps: this.calculateAverage("bitrate"), avg_fps: this.calculateAverage("framesPerSecond"), total_packets_lost: this.getLatestStat().packetsLost, total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample("totalPacketSendDelay").toFixed(4)), total_fir_count: this.calculateDifferenceForSample("firCount"), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_ms: n2, avg_round_trip_time_ms: u2, total_quality_limitation: r2, resolution: s2 });
28115
+ return Ft({ timestamp: Date.now(), avg_available_outgoing_bitrate_bps: this.calculateAverage("availableOutgoingBitrate"), avg_bitrate_bps: this.calculateAverage("bitrate"), avg_fps: this.calculateAverage("framesPerSecond"), total_packets_lost: this.getLatestStat().packetsLost, total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample("totalPacketSendDelay").toFixed(4)), total_fir_count: this.calculateDifferenceForSample("firCount"), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_ms: n2, avg_round_trip_time_ms: u2, total_quality_limitation: r2, resolution: s2 });
28131
28116
  };
28132
28117
  this.shouldCreateSample = () => {
28133
28118
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28134
- return t2 === 30 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28119
+ return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28135
28120
  };
28136
28121
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28137
28122
  }
28138
28123
  };
28139
- var $t = class extends dt {
28124
+ var Wt = class extends ct {
28140
28125
  constructor() {
28141
28126
  super(...arguments);
28142
28127
  this.trackAnalytics = /* @__PURE__ */ new Map();
@@ -28156,7 +28141,7 @@ var $t = class extends dt {
28156
28141
  Object.keys(i2).forEach((s2) => {
28157
28142
  var f2, P7;
28158
28143
  let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (f2 = this.trackAnalytics.get(s2)) == null ? void 0 : f2.getLatestStat(), p2 = ((k2, w2) => {
28159
- let xe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((k2 == null ? void 0 : k2.jitterBufferDelay) || 0) - xe, $ = ((k2 == null ? void 0 : k2.jitterBufferEmittedCount) || 0) - Zt;
28144
+ let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Xt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((k2 == null ? void 0 : k2.jitterBufferDelay) || 0) - Oe, $ = ((k2 == null ? void 0 : k2.jitterBufferEmittedCount) || 0) - Xt;
28160
28145
  return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
28161
28146
  })(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
28162
28147
  if (n2.kind === "video") {
@@ -28178,42 +28163,42 @@ var $t = class extends dt {
28178
28163
  return;
28179
28164
  let r2 = this.store.getPeerById(t2.peerID), s2 = r2 == null ? void 0 : r2.audioTrack, o2 = r2 == null ? void 0 : r2.videoTrack;
28180
28165
  if (!(s2 && o2 && s2.enabled && o2.enabled))
28181
- return Pt;
28166
+ return kt;
28182
28167
  let l2 = i2.getRemoteTrackStats(s2.trackId);
28183
28168
  if (!l2)
28184
- return Pt;
28169
+ return kt;
28185
28170
  if (l2.estimatedPlayoutTimestamp)
28186
28171
  return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
28187
28172
  }
28188
28173
  };
28189
- var Xr = class extends lt {
28174
+ var Xr = class extends dt {
28190
28175
  constructor() {
28191
28176
  super(...arguments);
28192
28177
  this.samples = [];
28193
28178
  this.collateSample = () => {
28194
28179
  let t2 = this.getLatestStat(), i2 = this.getFirstStat(), r2 = { timestamp: Date.now(), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_buffer_delay: this.calculateAverage("calculatedJitterBufferDelay", false) };
28195
28180
  if (t2.kind === "video")
28196
- return Gt(M2(m({}, r2), { avg_av_sync_ms: this.calculateAvgAvSyncForSample(), avg_frames_received_per_sec: this.calculateDifferenceAverage("framesReceived"), avg_frames_dropped_per_sec: this.calculateDifferenceAverage("framesDropped"), avg_frames_decoded_per_sec: this.calculateDifferenceAverage("framesDecoded"), frame_width: this.calculateAverage("frameWidth"), frame_height: this.calculateAverage("frameHeight"), expected_frame_width: this.calculateAverage("expectedFrameWidth"), expected_frame_height: this.calculateAverage("expectedFrameHeight"), pause_count: this.calculateDifferenceForSample("pauseCount"), pause_duration_seconds: this.calculateDifferenceForSample("totalPausesDuration"), freeze_count: this.calculateDifferenceForSample("freezeCount"), freeze_duration_seconds: this.calculateDifferenceForSample("totalFreezesDuration") }));
28181
+ return Ft(M2(m({}, r2), { avg_av_sync_ms: this.calculateAvgAvSyncForSample(), avg_frames_received_per_sec: this.calculateDifferenceAverage("framesReceived"), avg_frames_dropped_per_sec: this.calculateDifferenceAverage("framesDropped"), avg_frames_decoded_per_sec: this.calculateDifferenceAverage("framesDecoded"), frame_width: this.calculateAverage("frameWidth"), frame_height: this.calculateAverage("frameHeight"), expected_frame_width: this.calculateAverage("expectedFrameWidth"), expected_frame_height: this.calculateAverage("expectedFrameHeight"), pause_count: this.calculateDifferenceForSample("pauseCount"), pause_duration_seconds: this.calculateDifferenceForSample("totalPausesDuration"), freeze_count: this.calculateDifferenceForSample("freezeCount"), freeze_duration_seconds: this.calculateDifferenceForSample("totalFreezesDuration") }));
28197
28182
  {
28198
28183
  let s2 = (t2.concealedSamples || 0) - (t2.silentConcealedSamples || 0) - ((i2.concealedSamples || 0) - (i2.silentConcealedSamples || 0));
28199
- return Gt(M2(m({}, r2), { audio_level: this.calculateInstancesOfHigh("audioLevel", 0.05), audio_concealed_samples: s2, audio_total_samples_received: this.calculateDifferenceForSample("totalSamplesReceived"), audio_concealment_events: this.calculateDifferenceForSample("concealmentEvents"), fec_packets_discarded: this.calculateDifferenceForSample("fecPacketsDiscarded"), fec_packets_received: this.calculateDifferenceForSample("fecPacketsReceived"), total_samples_duration: this.calculateDifferenceForSample("totalSamplesDuration"), total_packets_received: this.calculateDifferenceForSample("packetsReceived"), total_packets_lost: this.calculateDifferenceForSample("packetsLost") }));
28184
+ return Ft(M2(m({}, r2), { audio_level: this.calculateInstancesOfHigh("audioLevel", 0.05), audio_concealed_samples: s2, audio_total_samples_received: this.calculateDifferenceForSample("totalSamplesReceived"), audio_concealment_events: this.calculateDifferenceForSample("concealmentEvents"), fec_packets_discarded: this.calculateDifferenceForSample("fecPacketsDiscarded"), fec_packets_received: this.calculateDifferenceForSample("fecPacketsReceived"), total_samples_duration: this.calculateDifferenceForSample("totalSamplesDuration"), total_packets_received: this.calculateDifferenceForSample("packetsReceived"), total_packets_lost: this.calculateDifferenceForSample("packetsLost") }));
28200
28185
  }
28201
28186
  };
28202
28187
  this.shouldCreateSample = () => {
28203
28188
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28204
- return t2 === 10 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28189
+ return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28205
28190
  };
28206
28191
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28207
28192
  }
28208
28193
  calculateAvgAvSyncForSample() {
28209
- let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== Pt);
28210
- return i2.length === 0 ? Pt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28194
+ let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== kt);
28195
+ return i2.length === 0 ? kt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28211
28196
  }
28212
28197
  };
28213
- var ur = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(ur || {});
28198
+ var lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
28214
28199
  function Na(a11, e) {
28215
28200
  var r2;
28216
- let t2 = Kt.parse(a11.sdp);
28201
+ let t2 = $t.parse(a11.sdp);
28217
28202
  if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
28218
28203
  return a11;
28219
28204
  let i2 = e ? Array.from(e.values()) : [];
@@ -28221,13 +28206,13 @@ function Na(a11, e) {
28221
28206
  var l2, u2, p2;
28222
28207
  let o2 = (l2 = s2.msid) == null ? void 0 : l2.split(" ")[0], n2 = (u2 = i2.find((h2) => h2.type === s2.type && h2.stream_id === o2)) == null ? void 0 : u2.track_id;
28223
28208
  n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
28224
- }), { type: a11.type, sdp: Kt.write(t2) };
28209
+ }), { type: a11.type, sdp: $t.write(t2) };
28225
28210
  }
28226
28211
  function Oa(a11, e) {
28227
28212
  var s2;
28228
28213
  if (!(a11 != null && a11.sdp) || !e)
28229
28214
  return;
28230
- let i2 = Kt.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
28215
+ let i2 = $t.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
28231
28216
  return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
28232
28217
  }
28233
28218
  function xa(a11) {
@@ -28311,13 +28296,13 @@ var qe = class {
28311
28296
  let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
28312
28297
  if (t2.transport) {
28313
28298
  let s2 = t2.transport.iceTransport, o2 = () => {
28314
- typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${ur[this.role]} connection`, `selected ${i2 || "unknown"} candidate pair`, JSON.stringify(this.selectedCandidatePair, null, 2))));
28299
+ typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${lr[this.role]} connection`, `selected ${i2 || "unknown"} candidate pair`, JSON.stringify(this.selectedCandidatePair, null, 2))));
28315
28300
  };
28316
28301
  typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
28317
28302
  }
28318
28303
  });
28319
28304
  } catch (e) {
28320
- d2.w(Ee, `Error in logging selected ice candidate pair for ${ur[this.role]} connection`, e);
28305
+ d2.w(Ee, `Error in logging selected ice candidate pair for ${lr[this.role]} connection`, e);
28321
28306
  }
28322
28307
  }
28323
28308
  removeTrack(e) {
@@ -28350,11 +28335,11 @@ var qe = class {
28350
28335
  return this.nativeConnection.getReceivers();
28351
28336
  }
28352
28337
  };
28353
- var qt = class extends qe {
28338
+ var Kt = class extends qe {
28354
28339
  constructor(t2, i2, r2) {
28355
28340
  super(0, t2);
28356
28341
  this.TAG = "[HMSPublishConnection]";
28357
- this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(ui, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
28342
+ this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(li, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
28358
28343
  s2 && (this.observer.onIceCandidate(s2), t2.trickle(this.role, s2));
28359
28344
  }, this.nativeConnection.oniceconnectionstatechange = () => {
28360
28345
  this.observer.onIceConnectionChange(this.nativeConnection.iceConnectionState);
@@ -28374,7 +28359,7 @@ var qt = class extends qe {
28374
28359
  });
28375
28360
  }
28376
28361
  };
28377
- var jt = class {
28362
+ var qt = class {
28378
28363
  constructor(e, t2, i2 = "") {
28379
28364
  this.TAG = "[HMSDataChannel]";
28380
28365
  this.nativeChannel = e, this.observer = t2, this.metadata = i2, e.onmessage = (r2) => {
@@ -28397,7 +28382,7 @@ var jt = class {
28397
28382
  this.nativeChannel.close();
28398
28383
  }
28399
28384
  };
28400
- var Jt = class a9 extends qe {
28385
+ var jt = class a9 extends qe {
28401
28386
  constructor(t2, i2, r2, s2) {
28402
28387
  super(1, t2);
28403
28388
  this.isFlagEnabled = r2;
@@ -28444,7 +28429,7 @@ var Jt = class a9 extends qe {
28444
28429
  }, this.nativeConnection.onconnectionstatechange = () => {
28445
28430
  this.observer.onConnectionStateChange(this.nativeConnection.connectionState);
28446
28431
  }, this.nativeConnection.ondatachannel = (t2) => {
28447
- t2.channel.label === ui && (this.apiChannel = new jt(t2.channel, { onMessage: (i2) => {
28432
+ t2.channel.label === li && (this.apiChannel = new qt(t2.channel, { onMessage: (i2) => {
28448
28433
  this.eventEmitter.emit("message", i2), this.observer.onApiChannelMessage(i2);
28449
28434
  } }, `role=${this.role}`), t2.channel.onopen = this.handlePendingApiMessages);
28450
28435
  }, this.nativeConnection.onicecandidate = (t2) => {
@@ -28494,8 +28479,8 @@ var Jt = class a9 extends qe {
28494
28479
  }
28495
28480
  };
28496
28481
  var Ua = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28497
- var pr = "[InitService]";
28498
- var Qt = class {
28482
+ var ur = "[InitService]";
28483
+ var Jt = class {
28499
28484
  static handleError(e, t2) {
28500
28485
  switch (e.status) {
28501
28486
  case 404:
@@ -28508,16 +28493,16 @@ var Qt = class {
28508
28493
  }
28509
28494
  static fetchInitConfig(n2) {
28510
28495
  return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
28511
- d2.d(pr, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28496
+ d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28512
28497
  let l2 = ln2(r2, t2, i2, s2);
28513
28498
  try {
28514
28499
  let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
28515
28500
  try {
28516
28501
  let p2 = yield u2.clone().json();
28517
- return this.handleError(u2, p2), d2.d(pr, `config is ${JSON.stringify(p2, null, 2)}`), un2(p2, o2);
28502
+ return this.handleError(u2, p2), d2.d(ur, `config is ${JSON.stringify(p2, null, 2)}`), un2(p2, o2);
28518
28503
  } catch (p2) {
28519
28504
  let h2 = yield u2.text();
28520
- throw d2.e(pr, "json error", p2.message, h2), p2 instanceof v2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28505
+ throw d2.e(ur, "json error", p2.message, h2), p2 instanceof v2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28521
28506
  }
28522
28507
  } catch (u2) {
28523
28508
  let p2 = u2;
@@ -28532,14 +28517,14 @@ function ln2(a11, e, t2, i2) {
28532
28517
  return i2 && i2.trim().length > 0 && r2.searchParams.set("region", i2.trim()), r2.searchParams.set("peer_id", e), r2.searchParams.set("user_agent_v2", t2), r2.toString();
28533
28518
  } catch (r2) {
28534
28519
  let s2 = r2;
28535
- throw d2.e(pr, s2.name, s2.message), s2;
28520
+ throw d2.e(ur, s2.name, s2.message), s2;
28536
28521
  }
28537
28522
  }
28538
28523
  function un2(a11, e) {
28539
28524
  var t2;
28540
28525
  return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ua((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
28541
28526
  }
28542
- var zt = class {
28527
+ var Qt = class {
28543
28528
  constructor(e) {
28544
28529
  this.TAG = "[SIGNAL]: ";
28545
28530
  this.pongResponseTimes = new Ce(5);
@@ -28911,7 +28896,7 @@ var Ba = () => {
28911
28896
  return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
28912
28897
  };
28913
28898
  var I2 = "[HMSTransport]:";
28914
- var Yt = class {
28899
+ var zt = class {
28915
28900
  constructor(e, t2, i2, r2, s2, o2, n2) {
28916
28901
  this.observer = e;
28917
28902
  this.deviceManager = t2;
@@ -28950,7 +28935,7 @@ var Yt = class {
28950
28935
  }), onFailure: (e2) => {
28951
28936
  this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
28952
28937
  }, onOffline: (e2) => c2(this, null, function* () {
28953
- d2.d(I2, "socket offline", ir[this.state]);
28938
+ d2.d(I2, "socket offline", tr[this.state]);
28954
28939
  try {
28955
28940
  this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
28956
28941
  } catch (t3) {
@@ -28958,12 +28943,12 @@ var Yt = class {
28958
28943
  }
28959
28944
  }), onOnline: () => {
28960
28945
  var e2;
28961
- d2.d(I2, "socket online", ir[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
28946
+ d2.d(I2, "socket online", tr[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
28962
28947
  }, onNetworkOnline: () => {
28963
28948
  this.analyticsEventsService.flushFailedClientEvents();
28964
28949
  } };
28965
- this.signal = new zt(this.signalObserver);
28966
- this.analyticsSignalTransport = new nr(this.signal);
28950
+ this.signal = new Qt(this.signalObserver);
28951
+ this.analyticsSignalTransport = new or(this.signal);
28967
28952
  this.publishDtlsStateTimer = 0;
28968
28953
  this.lastPublishDtlsState = "new";
28969
28954
  this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
@@ -29053,11 +29038,11 @@ var Yt = class {
29053
29038
  return this.signal.trackUpdate(this.trackStates), e2;
29054
29039
  });
29055
29040
  var u2, p2;
29056
- this.webrtcInternals = new hi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
29041
+ this.webrtcInternals = new pi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
29057
29042
  let l2 = (h2, T) => c2(this, null, function* () {
29058
29043
  h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
29059
29044
  });
29060
- this.retryScheduler = new sr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29045
+ this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29061
29046
  var g2, f2;
29062
29047
  let T = ((f2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : f2.bitrate) || 0;
29063
29048
  this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
@@ -29095,7 +29080,7 @@ var Yt = class {
29095
29080
  }
29096
29081
  connect(e, t2, i2, r2, s2 = false, o2) {
29097
29082
  return c2(this, null, function* () {
29098
- this.setTransportStateForConnect(), this.joinParameters = new tr(e, i2, r2.name, r2.metaData, t2, s2, o2);
29083
+ this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
29099
29084
  try {
29100
29085
  return yield this.internalConnect(e, t2, i2, o2);
29101
29086
  } catch (n2) {
@@ -29149,13 +29134,13 @@ var Yt = class {
29149
29134
  trackUpdate(e) {
29150
29135
  let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
29151
29136
  if (i2) {
29152
- let r2 = new Nt(M2(m({}, i2), { mute: !e.enabled }));
29137
+ let r2 = new _t(M2(m({}, i2), { mute: !e.enabled }));
29153
29138
  this.trackStates.set(i2.track_id, r2), d2.d(I2, "Track Update", this.trackStates, e), this.signal.trackUpdate(/* @__PURE__ */ new Map([[i2.track_id, r2]]));
29154
29139
  }
29155
29140
  }
29156
29141
  publishTrack(e) {
29157
29142
  return c2(this, null, function* () {
29158
- e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
29143
+ e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new _t(e));
29159
29144
  let t2 = new Promise((s2, o2) => {
29160
29145
  this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
29161
29146
  }), i2 = e.stream;
@@ -29193,7 +29178,7 @@ var Yt = class {
29193
29178
  });
29194
29179
  }
29195
29180
  createPeerConnections() {
29196
- this.initConfig && (this.publishConnection || (this.publishConnection = new qt(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new Jt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
29181
+ this.initConfig && (this.publishConnection || (this.publishConnection = new Kt(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new jt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
29197
29182
  }
29198
29183
  negotiateJoinWithRetry(s2) {
29199
29184
  return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 = true }) {
@@ -29283,7 +29268,7 @@ var Yt = class {
29283
29268
  d2.d(I2, "connect: started \u23F0");
29284
29269
  let s2 = /* @__PURE__ */ new Date();
29285
29270
  try {
29286
- this.analyticsTimer.start("init_response_time"), this.initConfig = yield Qt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
29271
+ this.analyticsTimer.start("init_response_time"), this.initConfig = yield Jt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
29287
29272
  let u2 = this.store.getRoom();
29288
29273
  return u2 && (u2.effectsKey = (n2 = this.initConfig.config.vb) == null ? void 0 : n2.effectsKey, u2.isEffectsEnabled = this.isFlagEnabled("effectsSDKEnabled"), u2.isHipaaEnabled = this.isFlagEnabled("hipaa"), u2.isNoiseCancellationEnabled = this.isFlagEnabled("noiseCancellation")), this.analyticsTimer.end("init_response_time"), Pe.setWebsocketEndpoint(this.initConfig.endpoint), this.validateNotDisconnected("post init"), yield this.openSignal(e, i2), this.observer.onConnected(), (l2 = this.connectivityListener) == null || l2.onSignallingSuccess(), this.store.setSimulcastEnabled(this.isFlagEnabled("simulcast")), d2.d(I2, "Adding Analytics Transport: JsonRpcSignal"), this.analyticsEventsService.setTransport(this.analyticsSignalTransport), this.analyticsEventsService.flush(), this.initConfig;
29289
29274
  } catch (u2) {
@@ -29312,7 +29297,7 @@ var Yt = class {
29312
29297
  }
29313
29298
  initStatsAnalytics() {
29314
29299
  var e, t2;
29315
- this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Wt(this.store, this.eventBus, this.getValueFromInitConfig("publishStats", "maxSampleWindowSize", 30), this.getValueFromInitConfig("publishStats", "maxSamplePushInterval", 300)), (e = this.getWebrtcInternals()) == null || e.start()), this.isFlagEnabled("subscribeStats") && (this.subscribeStatsAnalytics = new $t(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
29300
+ this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Gt(this.store, this.eventBus, this.getValueFromInitConfig("publishStats", "maxSampleWindowSize", 30), this.getValueFromInitConfig("publishStats", "maxSamplePushInterval", 300)), (e = this.getWebrtcInternals()) == null || e.start()), this.isFlagEnabled("subscribeStats") && (this.subscribeStatsAnalytics = new Wt(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
29316
29301
  }
29317
29302
  getValueFromInitConfig(e, t2, i2) {
29318
29303
  var r2, s2;
@@ -29371,13 +29356,28 @@ var Yt = class {
29371
29356
  return { network_info: e, document_hidden: t2, num_degraded_tracks: i2, bitrate: { publish: r2, subscribe: s2 }, max_sub_bitrate: this.maxSubscribeBitrate, recent_pong_response_times: this.signal.getPongResponseTimes(), transport_state: this.state };
29372
29357
  }
29373
29358
  };
29359
+ function pr(a11) {
29360
+ if (!a11 || a11.length === 0)
29361
+ throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
29362
+ let e = a11.split(".");
29363
+ if (e.length !== 3)
29364
+ throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
29365
+ let t2 = atob(e[1]);
29366
+ try {
29367
+ let i2 = JSON.parse(t2);
29368
+ return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
29369
+ } catch (i2) {
29370
+ throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
29371
+ }
29372
+ }
29374
29373
  var Fa = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29375
29374
  var hr = class {
29376
29375
  constructor() {
29377
29376
  this.TAG = "[HMSSdk]:";
29378
29377
  this.transportState = "Disconnected";
29379
- this.analyticsTimer = new di();
29378
+ this.analyticsTimer = new ci();
29380
29379
  this.sdkState = m({}, Fa);
29380
+ this.isDiagnostics = false;
29381
29381
  this.playlistSettings = { video: { bitrate: Dr }, audio: { bitrate: wr } };
29382
29382
  this.handleAutoplayError = (e) => {
29383
29383
  var t2, i2;
@@ -29461,7 +29461,7 @@ var hr = class {
29461
29461
  this.sendAudioPresenceFailed = () => {
29462
29462
  var t2;
29463
29463
  let e = S2.TracksErrors.NoAudioDetected("PREVIEW");
29464
- d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), (t2 = this.listener) == null || t2.onError(e);
29464
+ d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), this.isDiagnostics && ((t2 = this.listener) == null || t2.onError(e));
29465
29465
  };
29466
29466
  this.sendJoinAnalyticsEvent = (e = false, t2) => {
29467
29467
  this.eventBus.analytics.publish(y2.join(M2(m({ error: t2 }, this.analyticsTimer.getTimes()), { time: this.analyticsTimer.getTimeTaken("join_time"), is_preview_called: e, retries_join: this.transport.joinRetryCount })));
@@ -29470,11 +29470,11 @@ var hr = class {
29470
29470
  this.eventBus.analytics.publish(y2.preview(M2(m({ error: e }, this.analyticsTimer.getTimes()), { time: this.analyticsTimer.getTimeTaken("preview_time") })));
29471
29471
  };
29472
29472
  this.sendAnalyticsEvent = (e) => {
29473
- this.listener.onInitSuccess || this.analyticsEventsService.queue(e).flush();
29473
+ this.isDiagnostics || this.analyticsEventsService.queue(e).flush();
29474
29474
  };
29475
29475
  }
29476
29476
  initNotificationManager() {
29477
- this.notificationManager || (this.notificationManager = new Zi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29477
+ this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29478
29478
  }
29479
29479
  initStoreAndManagers(e) {
29480
29480
  var t2, i2;
@@ -29482,7 +29482,7 @@ var hr = class {
29482
29482
  (i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
29483
29483
  return;
29484
29484
  }
29485
- this.sdkState.isInitialised = true, this.store = new Ot(), this.eventBus = new Bt(), this.pluginUsageTracker = new xi(this.eventBus), this.wakeLockManager = new Ni(), this.networkTestManager = new _i(this.eventBus, this.listener), this.playlistManager = new Rt(this, this.eventBus), this.deviceManager = new Ut(this.store, this.eventBus), this.audioSinkManager = new xt(this.store, this.deviceManager, this.eventBus), this.audioOutput = new Ui(this.deviceManager, this.audioSinkManager), this.audioSinkManager.setListener(this.listener), this.eventBus.autoplayError.subscribe(this.handleAutoplayError), this.localTrackManager = new ve(this.store, this.observer, this.deviceManager, this.eventBus, this.analyticsTimer), this.analyticsEventsService = new Oi(this.store), this.transport = new Yt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), e.onInitSuccess && this.transport.setConnectivityListener(e), this.sessionStore = new er(this.transport), this.interactivityCenter = new Ft(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
29485
+ this.sdkState.isInitialised = true, this.store = new Nt(), this.eventBus = new Ut(), this.pluginUsageTracker = new Oi(this.eventBus), this.wakeLockManager = new _i(), this.networkTestManager = new wi(this.eventBus, this.listener), this.playlistManager = new bt(this, this.eventBus), this.deviceManager = new xt(this.store, this.eventBus), this.audioSinkManager = new Ot(this.store, this.deviceManager, this.eventBus), this.audioOutput = new xi(this.deviceManager, this.audioSinkManager), this.audioSinkManager.setListener(this.listener), this.eventBus.autoplayError.subscribe(this.handleAutoplayError), this.localTrackManager = new ve(this.store, this.observer, this.deviceManager, this.eventBus, this.analyticsTimer), this.analyticsEventsService = new Ni(this.store), this.transport = new zt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), e.onInitSuccess && this.transport.setConnectivityListener(e), this.sessionStore = new Zi(this.transport), this.interactivityCenter = new Vt(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
29486
29486
  }
29487
29487
  validateJoined(e) {
29488
29488
  if (!this.localPeer)
@@ -29529,7 +29529,7 @@ var hr = class {
29529
29529
  return this.interactivityCenter;
29530
29530
  }
29531
29531
  getPeerListIterator(e) {
29532
- return new mi(this.transport, this.store, e);
29532
+ return new hi(this.transport, this.store, e);
29533
29533
  }
29534
29534
  updatePlaylistSettings(e) {
29535
29535
  e.video && Object.assign(this.playlistSettings.video, e.video), e.audio && Object.assign(this.playlistSettings.audio, e.audio);
@@ -29540,7 +29540,7 @@ var hr = class {
29540
29540
  }
29541
29541
  preview(e, t2) {
29542
29542
  return c2(this, null, function* () {
29543
- if (Tt(), gt(), this.sdkState.isPreviewInProgress)
29543
+ if (gt(), St(), this.sdkState.isPreviewInProgress)
29544
29544
  return Promise.reject(S2.GenericErrors.PreviewAlreadyInProgress("PREVIEW", "Preview already called"));
29545
29545
  if (["Joined", "Reconnecting"].includes(this.transportState))
29546
29546
  return this.midCallPreview(e.asRole, e.settings);
@@ -29600,13 +29600,13 @@ var hr = class {
29600
29600
  join(e, t2) {
29601
29601
  return c2(this, null, function* () {
29602
29602
  var l2, u2, p2, h2, T, g2;
29603
- if (Tt(), gt(), this.sdkState.isPreviewInProgress)
29603
+ if (gt(), St(), this.sdkState.isPreviewInProgress)
29604
29604
  throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
29605
29605
  this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
29606
- let { roomId: i2, userId: r2, role: s2 } = nt(e.authToken), o2 = ((u2 = (l2 = this.localPeer) == null ? void 0 : l2.asRole) == null ? void 0 : u2.name) || ((h2 = (p2 = this.localPeer) == null ? void 0 : p2.role) == null ? void 0 : h2.name);
29606
+ let { roomId: i2, userId: r2, role: s2 } = pr(e.authToken), o2 = ((u2 = (l2 = this.localPeer) == null ? void 0 : l2.asRole) == null ? void 0 : u2.name) || ((h2 = (p2 = this.localPeer) == null ? void 0 : p2.role) == null ? void 0 : h2.name);
29607
29607
  (T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), He.resumeContext();
29608
29608
  let n2 = this.store.getConfig();
29609
- n2 != null && n2.autoManageWakeLock && this.wakeLockManager.acquireLock(), this.localPeer ? (this.localPeer.name = e.userName, this.localPeer.role = this.store.getPolicyForRole(s2), this.localPeer.customerUserId = r2, this.localPeer.metadata = e.metaData, delete this.localPeer.asRole) : this.createAndAddLocalPeerToStore(e, s2, r2), this.roleChangeManager = new _t(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
29609
+ n2 != null && n2.autoManageWakeLock && this.wakeLockManager.acquireLock(), this.localPeer ? (this.localPeer.name = e.userName, this.localPeer.role = this.store.getPolicyForRole(s2), this.localPeer.customerUserId = r2, this.localPeer.metadata = e.metaData, delete this.localPeer.asRole) : this.createAndAddLocalPeerToStore(e, s2, r2), this.roleChangeManager = new wt(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
29610
29610
  try {
29611
29611
  yield this.transport.join(e.authToken, this.localPeer.peerId, { name: e.userName, metaData: e.metaData }, e.initEndpoint, e.autoVideoSubscribe, e.iceServers), d2.d(this.TAG, `\u2705 Joined room ${i2}`), this.analyticsTimer.start("peer_list_time"), yield this.notifyJoin(), this.sdkState.isJoinInProgress = false, yield this.publish(e.settings, o2);
29612
29612
  } catch (f2) {
@@ -29643,7 +29643,7 @@ var hr = class {
29643
29643
  return c2(this, null, function* () {
29644
29644
  let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
29645
29645
  this.analyticsTimer.start("GET_TOKEN");
29646
- let r2 = yield Li(i2, { method: "POST", body: JSON.stringify({ code: e.roomCode, user_id: e.userId }) }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), s2 = yield r2.json();
29646
+ let r2 = yield Ci(i2, { method: "POST", body: JSON.stringify({ code: e.roomCode, user_id: e.userId }) }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), s2 = yield r2.json();
29647
29647
  if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
29648
29648
  throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
29649
29649
  let { token: o2 } = s2;
@@ -29770,7 +29770,7 @@ var hr = class {
29770
29770
  throw S2.GenericErrors.NotConnected("VALIDATION", "No local peer present, cannot addTrack");
29771
29771
  if (this.localPeer.auxiliaryTracks.find((g2) => g2.trackId === e.id))
29772
29772
  return;
29773
- let r2 = e.kind, s2 = new MediaStream([e]), o2 = new We(s2), n2 = r2 === "audio" ? ce : F, l2 = new n2(o2, e, t2, this.eventBus);
29773
+ let r2 = e.kind, s2 = new MediaStream([e]), o2 = new Ge(s2), n2 = r2 === "audio" ? ce : F, l2 = new n2(o2, e, t2, this.eventBus);
29774
29774
  this.setPlaylistSettings({ track: e, hmsTrack: l2, source: t2 }), yield (u2 = this.transport) == null ? void 0 : u2.publish([l2]), l2.peerId = (p2 = this.localPeer) == null ? void 0 : p2.peerId, (h2 = this.localPeer) == null || h2.auxiliaryTracks.push(l2), (T = this.listener) == null || T.onTrackUpdate(0, l2, this.localPeer);
29775
29775
  });
29776
29776
  }
@@ -29801,6 +29801,9 @@ var hr = class {
29801
29801
  var t2;
29802
29802
  (t2 = this.notificationManager) == null || t2.setConnectionQualityListener(e);
29803
29803
  }
29804
+ setIsDiagnostics(e) {
29805
+ this.isDiagnostics = e;
29806
+ }
29804
29807
  changeRole(e, t2, i2 = false) {
29805
29808
  return c2(this, null, function* () {
29806
29809
  var r2;
@@ -30013,7 +30016,7 @@ var hr = class {
30013
30016
  publish(e, t2) {
30014
30017
  return c2(this, null, function* () {
30015
30018
  var i2, r2, s2;
30016
- if ([this.store.getPublishParams(), !this.sdkState.published, !Be].every((o2) => !!o2)) {
30019
+ if ([this.store.getPublishParams(), !this.sdkState.published, !Ue].every((o2) => !!o2)) {
30017
30020
  let o2 = t2 && t2 !== ((r2 = (i2 = this.localPeer) == null ? void 0 : i2.role) == null ? void 0 : r2.name) ? () => {
30018
30021
  var n2;
30019
30022
  return (n2 = this.roleChangeManager) == null ? void 0 : n2.diffRolesAndPublishTracks({ oldRole: this.store.getPolicyForRole(t2), newRole: this.localPeer.role });
@@ -30091,7 +30094,7 @@ var hr = class {
30091
30094
  }
30092
30095
  setUpPreview(e, t2) {
30093
30096
  this.sdkState.isPreviewCalled = true, this.sdkState.isPreviewInProgress = true;
30094
- let { roomId: i2, userId: r2, role: s2 } = nt(e.authToken);
30097
+ let { roomId: i2, userId: r2, role: s2 } = pr(e.authToken);
30095
30098
  this.commonSetup(e, i2, t2), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), this.createAndAddLocalPeerToStore(e, s2, r2, e.asRole);
30096
30099
  }
30097
30100
  setPlaylistSettings(r2) {
@@ -30112,11 +30115,11 @@ var hr = class {
30112
30115
  });
30113
30116
  }
30114
30117
  createAndAddLocalPeerToStore(e, t2, i2, r2) {
30115
- let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new $e({ name: e.userName || "", customerUserId: i2, metadata: e.metaData || "", role: s2, asRole: o2 || s2, type: "regular" });
30118
+ let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new We({ name: e.userName || "", customerUserId: i2, metadata: e.metaData || "", role: s2, asRole: o2 || s2, type: "regular" });
30116
30119
  this.store.addPeer(n2);
30117
30120
  }
30118
30121
  commonSetup(e, t2, i2) {
30119
- this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new Oe(t2));
30122
+ this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new Ke(t2));
30120
30123
  }
30121
30124
  removeDevicesFromConfig(e) {
30122
30125
  this.store.getConfig() && e.settings && (delete e.settings.audioOutputDeviceId, delete e.settings.videoDeviceId, delete e.settings.audioInputDeviceId);
@@ -30139,11 +30142,11 @@ var hr = class {
30139
30142
  e.source === "audioplaylist" ? this.playlistManager.stop("audio") : e.source === "videoplaylist" && this.playlistManager.stop("video");
30140
30143
  }
30141
30144
  };
30142
- var ut = class a10 {
30145
+ var lt = class a10 {
30143
30146
  constructor(e, t2, i2) {
30144
- this.getStats = () => (this.stats || (this.stats = new Xt(this.store, this.sdk)), this.stats);
30147
+ this.getStats = () => (this.stats || (this.stats = new Yt(this.store, this.sdk)), this.stats);
30145
30148
  this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
30146
- e ? this.store = e : this.store = a10.createNewHMSStore(wi("HMSStore"), ti), i2 ? this.notifications = i2 : this.notifications = new Pi(this.store), t2 ? this.actions = t2 : (this.sdk = new hr(), this.actions = new Di(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: Mr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30149
+ e ? this.store = e : this.store = a10.createNewHMSStore(Di("HMSStore"), ei), i2 ? this.notifications = i2 : this.notifications = new ki(this.store), t2 ? this.actions = t2 : (this.sdk = new hr(), this.actions = new Li(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: Mr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30147
30150
  }
30148
30151
  triggerOnSubscribe() {
30149
30152
  this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
@@ -30274,14 +30277,14 @@ var Mn = (a11, e, t2, i2) => {
30274
30277
  };
30275
30278
  var yn = (a11, e = "resetState") => {
30276
30279
  a11.namedSetState((t2) => {
30277
- Object.assign(t2, ii());
30280
+ Object.assign(t2, ti());
30278
30281
  }, e);
30279
30282
  };
30280
- var Xt = class {
30283
+ var Yt = class {
30281
30284
  constructor(e, t2) {
30282
30285
  this.hmsStore = e;
30283
30286
  this.sdk = t2;
30284
- this.store = ut.createNewHMSStore(wi("HMSStatsStore"), ii), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30287
+ this.store = lt.createNewHMSStore(Di("HMSStatsStore"), ti), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30285
30288
  var r2, s2;
30286
30289
  this.hmsStore.getState(ie) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
30287
30290
  var n2, l2;
@@ -39761,7 +39764,7 @@ var useCloseScreenshareWhiteboard = () => {
39761
39764
  };
39762
39765
 
39763
39766
  // src/Prebuilt/layouts/VideoStreamingSection.tsx
39764
- var HLSView = React155.lazy(() => import("./HLSView-C7QKK3HT.js"));
39767
+ var HLSView = React155.lazy(() => import("./HLSView-MWFODCX2.js"));
39765
39768
  var VideoStreamingSection = ({
39766
39769
  screenType,
39767
39770
  elements,
@@ -42106,7 +42109,7 @@ import React183, { useContext as useContext5 } from "react";
42106
42109
 
42107
42110
  // src/Diagnostics/hms.ts
42108
42111
  init_define_process_env();
42109
- var hms = new ut();
42112
+ var hms = new lt();
42110
42113
  var hmsStore = hms.getStore();
42111
42114
  var hmsActions = hms.getActions();
42112
42115
  var hmsNotifications = hms.getNotifications();
@@ -42593,7 +42596,7 @@ var ConnectivityTestReport = ({
42593
42596
  return /* @__PURE__ */ React187.createElement(React187.Fragment, null, /* @__PURE__ */ React187.createElement(TestContainer, null, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$on_primary_medium" } }, "Connectivity test has been completed."), /* @__PURE__ */ React187.createElement(SignallingResult, { result: result == null ? void 0 : result.signallingReport }), /* @__PURE__ */ React187.createElement(MediaServerResult, { result: result == null ? void 0 : result.mediaServerReport }), /* @__PURE__ */ React187.createElement(AudioStats, { stats: (_b7 = (_a8 = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _a8.stats) == null ? void 0 : _b7.audio }), /* @__PURE__ */ React187.createElement(VideoStats, { stats: (_d = (_c = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _c.stats) == null ? void 0 : _d.video })), /* @__PURE__ */ React187.createElement(Footer3, { result, restart: startTest, error }));
42594
42597
  }
42595
42598
  if (progress !== void 0) {
42596
- return /* @__PURE__ */ React187.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$primary_bright" } }, /* @__PURE__ */ React187.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ React187.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ React187.createElement(
42599
+ return /* @__PURE__ */ React187.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$primary_bright", textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ React187.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ React187.createElement(
42597
42600
  Text,
42598
42601
  {
42599
42602
  variant: "body2",
@@ -42934,4 +42937,4 @@ object-assign/index.js:
42934
42937
  @license MIT
42935
42938
  *)
42936
42939
  */
42937
- //# sourceMappingURL=chunk-EODBFJ5Y.js.map
42940
+ //# sourceMappingURL=chunk-VO7L2JWV.js.map