@100mslive/roomkit-react 0.3.14-alpha.5 → 0.3.14-alpha.7

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs.js CHANGED
@@ -35,8 +35,8 @@ var __objRest = (source, exclude) => {
35
35
  }
36
36
  return target;
37
37
  };
38
- var __esm = (fn3, res) => function __init() {
39
- return fn3 && (res = (0, fn3[__getOwnPropNames(fn3)[0]])(fn3 = 0)), res;
38
+ var __esm = (fn2, res) => function __init() {
39
+ return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res;
40
40
  };
41
41
  var __commonJS = (cb, mod) => function __require() {
42
42
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
@@ -109,7 +109,7 @@ var __async = (__this, __arguments, generator) => {
109
109
  var define_process_env_default;
110
110
  var init_define_process_env = __esm({
111
111
  "<define:process.env>"() {
112
- define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1", 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.5", 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.5", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1", 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.5", 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: "601", 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: "20240609.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:17357", 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.5", 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: "9581485352", 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: "2d512204b017ee7b52ba3459eb0af1ef57cd8568", 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: "3159ec212055d836d38a991cc47b4032af46431931d6562d3a56a2b6ebb9c7bb", 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--1718798060760-0.20320992843434693:/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--1718798060566-0.27679053807938003:/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--1718798035643-0.9764389940676401:/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--1718798035468-0.9194833547191164:/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_ddd748a9-4928-4ed3-ba0c-9ae307a41938", INVOCATION_ID: "7e9532587dd64854b25a8c27c43bfc2b", 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: "582", 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 59", 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.5", 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.5", 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: "2d512204b017ee7b52ba3459eb0af1ef57cd8568", 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_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1", 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_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1", 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_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1" };
112
+ define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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.7", 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.7", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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.7", 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:17308", 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.7", 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: "9598388267", 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: "c57e858bbc09c5b82722610c4ae0fcf200e61161", 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: "2c40941210fdfcce83d8f8ea6e75595dc23825a6d30d1f8b04ee1d5c13c011e8", 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--1718890248699-0.19677626630198497:/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--1718890248506-0.34564658162174067:/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--1718890223199-0.8761704666839227:/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--1718890223022-0.05784877896719243:/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_a00aa94b-086d-4f59-aff2-64b17cc8cc39", INVOCATION_ID: "ddaa7297c32e4415969cd4dbdf7c4640", 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: "584", 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 361", 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.7", 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.7", 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: "c57e858bbc09c5b82722610c4ae0fcf200e61161", 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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe" };
113
113
  }
114
114
  });
115
115
 
@@ -2790,12 +2790,12 @@ var init_formatBytes = __esm({
2790
2790
  if (!bytes) {
2791
2791
  return "-";
2792
2792
  }
2793
- const k3 = 1024;
2793
+ const k2 = 1024;
2794
2794
  const dm2 = decimals < 0 ? 0 : decimals;
2795
2795
  const sizes = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"].map((size) => size + unit);
2796
- let i2 = Math.floor(Math.log(bytes) / Math.log(k3));
2796
+ let i2 = Math.floor(Math.log(bytes) / Math.log(k2));
2797
2797
  i2 === 0 && i2++;
2798
- return `${parseFloat((bytes / Math.pow(k3, i2)).toFixed(dm2))} ${sizes[i2]}`;
2798
+ return `${parseFloat((bytes / Math.pow(k2, i2)).toFixed(dm2))} ${sizes[i2]}`;
2799
2799
  };
2800
2800
  }
2801
2801
  });
@@ -6302,8 +6302,8 @@ var require_lodash = __commonJS({
6302
6302
  function createBind(func, bitmask, thisArg) {
6303
6303
  var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
6304
6304
  function wrapper() {
6305
- var fn3 = this && this !== root && this instanceof wrapper ? Ctor : func;
6306
- return fn3.apply(isBind ? thisArg : this, arguments);
6305
+ var fn2 = this && this !== root && this instanceof wrapper ? Ctor : func;
6306
+ return fn2.apply(isBind ? thisArg : this, arguments);
6307
6307
  }
6308
6308
  return wrapper;
6309
6309
  }
@@ -6369,8 +6369,8 @@ var require_lodash = __commonJS({
6369
6369
  arity - length
6370
6370
  );
6371
6371
  }
6372
- var fn3 = this && this !== root && this instanceof wrapper ? Ctor : func;
6373
- return apply(fn3, this, args);
6372
+ var fn2 = this && this !== root && this instanceof wrapper ? Ctor : func;
6373
+ return apply(fn2, this, args);
6374
6374
  }
6375
6375
  return wrapper;
6376
6376
  }
@@ -6458,7 +6458,7 @@ var require_lodash = __commonJS({
6458
6458
  arity - length
6459
6459
  );
6460
6460
  }
6461
- var thisBinding = isBind ? thisArg : this, fn3 = isBindKey ? thisBinding[func] : func;
6461
+ var thisBinding = isBind ? thisArg : this, fn2 = isBindKey ? thisBinding[func] : func;
6462
6462
  length = args.length;
6463
6463
  if (argPos) {
6464
6464
  args = reorder(args, argPos);
@@ -6469,9 +6469,9 @@ var require_lodash = __commonJS({
6469
6469
  args.length = ary2;
6470
6470
  }
6471
6471
  if (this && this !== root && this instanceof wrapper) {
6472
- fn3 = Ctor || createCtor(fn3);
6472
+ fn2 = Ctor || createCtor(fn2);
6473
6473
  }
6474
- return fn3.apply(thisBinding, args);
6474
+ return fn2.apply(thisBinding, args);
6475
6475
  }
6476
6476
  return wrapper;
6477
6477
  }
@@ -6528,14 +6528,14 @@ var require_lodash = __commonJS({
6528
6528
  function createPartial(func, bitmask, thisArg, partials) {
6529
6529
  var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
6530
6530
  function wrapper() {
6531
- var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn3 = this && this !== root && this instanceof wrapper ? Ctor : func;
6531
+ var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn2 = this && this !== root && this instanceof wrapper ? Ctor : func;
6532
6532
  while (++leftIndex < leftLength) {
6533
6533
  args[leftIndex] = partials[leftIndex];
6534
6534
  }
6535
6535
  while (argsLength--) {
6536
6536
  args[leftIndex++] = arguments[++argsIndex];
6537
6537
  }
6538
- return apply(fn3, isBind ? thisArg : this, args);
6538
+ return apply(fn2, isBind ? thisArg : this, args);
6539
6539
  }
6540
6540
  return wrapper;
6541
6541
  }
@@ -14519,10 +14519,10 @@ var require_ua_parser = __commonJS({
14519
14519
  }
14520
14520
  };
14521
14521
  var rgxMapper = function(ua2, arrays) {
14522
- var i2 = 0, j3, k3, p2, q3, matches, match18;
14522
+ var i2 = 0, j3, k2, p2, q3, matches, match18;
14523
14523
  while (i2 < arrays.length && !matches) {
14524
14524
  var regex = arrays[i2], props = arrays[i2 + 1];
14525
- j3 = k3 = 0;
14525
+ j3 = k2 = 0;
14526
14526
  while (j3 < regex.length && !matches) {
14527
14527
  if (!regex[j3]) {
14528
14528
  break;
@@ -14530,7 +14530,7 @@ var require_ua_parser = __commonJS({
14530
14530
  matches = regex[j3++].exec(ua2);
14531
14531
  if (!!matches) {
14532
14532
  for (p2 = 0; p2 < props.length; p2++) {
14533
- match18 = matches[++k3];
14533
+ match18 = matches[++k2];
14534
14534
  q3 = props[p2];
14535
14535
  if (typeof q3 === OBJ_TYPE && q3.length > 0) {
14536
14536
  if (q3.length === 2) {
@@ -20378,7 +20378,7 @@ function xe(a11, e) {
20378
20378
  if (e)
20379
20379
  for (let r2 of e.auxiliaryTracks) {
20380
20380
  let s2 = a11[r2];
20381
- Xa(s2) && (i2 = pt(s2) ? s2 : i2, t2 = ht(s2) ? s2 : t2);
20381
+ Za(s2) && (i2 = pt(s2) ? s2 : i2, t2 = ht(s2) ? s2 : t2);
20382
20382
  }
20383
20383
  return { video: t2, audio: i2 };
20384
20384
  }
@@ -20388,7 +20388,7 @@ function pt(a11) {
20388
20388
  function ht(a11) {
20389
20389
  return a11 && a11.type === "video";
20390
20390
  }
20391
- function Xa(a11) {
20391
+ function Za(a11) {
20392
20392
  return a11 && a11.source === "screen";
20393
20393
  }
20394
20394
  function ri(a11) {
@@ -20397,13 +20397,13 @@ function ri(a11) {
20397
20397
  function mt(a11) {
20398
20398
  return a11 && a11.source === "videoplaylist";
20399
20399
  }
20400
- function as(a11) {
20400
+ function os(a11) {
20401
20401
  return a11 ? !!(a11 != null && a11.degraded) : false;
20402
20402
  }
20403
20403
  function qe(a11, e) {
20404
20404
  return e && a11.tracks[e] ? a11.tracks[e].enabled : false;
20405
20405
  }
20406
- function os(a11, e) {
20406
+ function ns(a11, e) {
20407
20407
  return e && a11.tracks[e] ? a11.tracks[e].displayEnabled : false;
20408
20408
  }
20409
20409
  function St(a11) {
@@ -20411,14 +20411,14 @@ function St(a11) {
20411
20411
  let e = false, t2 = false, i2 = false;
20412
20412
  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 };
20413
20413
  }
20414
- function io() {
20414
+ function ro() {
20415
20415
  if (O2 && window) {
20416
20416
  let a11 = window.location.hostname;
20417
20417
  return a11 === "localhost" || a11 === "127.0.0.1" ? "LOCAL" : a11.includes("app.100ms.live") ? "HMS" : "CUSTOM";
20418
20418
  }
20419
20419
  return "CUSTOM";
20420
20420
  }
20421
- function Tr(a11) {
20421
+ function fr(a11) {
20422
20422
  switch (a11) {
20423
20423
  case "join":
20424
20424
  return "JOIN";
@@ -20432,24 +20432,24 @@ function Tr(a11) {
20432
20432
  return "NONE";
20433
20433
  }
20434
20434
  }
20435
- function ee(a11) {
20435
+ function oe(a11) {
20436
20436
  return a11 != null;
20437
20437
  }
20438
20438
  function ft(a11 = "prod", e) {
20439
20439
  let t2 = "web", i2 = Je !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
20440
20440
  if (Ue)
20441
- return fs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: Ts, env: i2, domain: Je, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
20442
- let r2 = ge.getOS(), s2 = ge.getDevice(), o2 = ge.getBrowser(), n2 = Mr(`web_${r2.name}`), l2 = r2.version || "", u2 = Mr(`${o2.name}_${o2.version}`), p2 = u2;
20443
- return s2.type && (p2 = `${Mr(`${s2.vendor}_${s2.type}`)}/${u2}`), fs({ os: n2, os_version: l2, sdk: t2, sdk_version: Ts, device_model: p2, env: i2, domain: Je, 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 });
20441
+ return vs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: fs, env: i2, domain: Je, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
20442
+ 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;
20443
+ 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: Je, 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 });
20444
20444
  }
20445
- function Mr(a11) {
20445
+ function yr(a11) {
20446
20446
  return a11.replace(/ /g, "_");
20447
20447
  }
20448
- function lo(a11, e) {
20448
+ function uo(a11, e) {
20449
20449
  let t2 = a11.toLowerCase();
20450
20450
  return t2.includes("device not found") ? S2.TracksErrors.DeviceNotAvailable("TRACK", e, a11) : t2.includes("permission denied") ? S2.TracksErrors.CantAccessCaptureDevice("TRACK", e, a11) : S2.TracksErrors.GenericTrack("TRACK", a11);
20451
20451
  }
20452
- function uo(a11, e = "") {
20452
+ function po(a11, e = "") {
20453
20453
  if (adapter_core_default.browserDetails.browser === "chrome" && a11.name === "NotAllowedError" && a11.message.includes("denied by system"))
20454
20454
  return S2.TracksErrors.SystemDeniedPermission("TRACK", e, a11.message);
20455
20455
  if (adapter_core_default.browserDetails.browser === "firefox" && a11.name === "NotFoundError") {
@@ -20468,14 +20468,14 @@ function uo(a11, e = "") {
20468
20468
  case "TypeError":
20469
20469
  return S2.TracksErrors.NothingToReturn("TRACK", a11.message);
20470
20470
  default:
20471
- return lo(a11.message, e);
20471
+ return uo(a11.message, e);
20472
20472
  }
20473
20473
  }
20474
20474
  function Qe(a11, e) {
20475
- let t2 = uo(a11, e);
20475
+ let t2 = po(a11, e);
20476
20476
  return t2.addNativeError(a11), t2;
20477
20477
  }
20478
- function Ms(a11) {
20478
+ function ys(a11) {
20479
20479
  return c2(this, null, function* () {
20480
20480
  try {
20481
20481
  return (yield navigator.mediaDevices.getUserMedia({ audio: a11 ? a11.toConstraints() : false })).getAudioTracks()[0];
@@ -20484,7 +20484,7 @@ function Ms(a11) {
20484
20484
  }
20485
20485
  });
20486
20486
  }
20487
- function ys(a11) {
20487
+ function ks(a11) {
20488
20488
  return c2(this, null, function* () {
20489
20489
  try {
20490
20490
  return (yield navigator.mediaDevices.getUserMedia({ video: a11 ? a11.toConstraints() : false })).getVideoTracks()[0];
@@ -20508,17 +20508,17 @@ function Ce(a11) {
20508
20508
  throw Error("`ms` should be a positive integer");
20509
20509
  if (typeof Worker == "undefined")
20510
20510
  return K(a11);
20511
- let e = new Worker(URL.createObjectURL(new Blob([ks], { type: "application/javascript" })));
20511
+ let e = new Worker(URL.createObjectURL(new Blob([Ps], { type: "application/javascript" })));
20512
20512
  return e.postMessage(["start", a11]), new Promise((t2) => {
20513
20513
  e.onmessage = (i2) => {
20514
20514
  i2.data === "tick" && (t2(), e.terminate());
20515
20515
  };
20516
20516
  });
20517
20517
  }
20518
- function Ps() {
20518
+ function Es() {
20519
20519
  if (typeof Worker == "undefined")
20520
20520
  return { sleep: (e) => K(e) };
20521
- let a11 = new Worker(URL.createObjectURL(new Blob([ks], { type: "application/javascript" })));
20521
+ let a11 = new Worker(URL.createObjectURL(new Blob([Ps], { type: "application/javascript" })));
20522
20522
  return { sleep: (e) => (a11.postMessage(["start", e]), new Promise((t2) => {
20523
20523
  a11.onmessage = (i2) => {
20524
20524
  i2.data === "tick" && t2();
@@ -20535,27 +20535,27 @@ function oi(a11, e = 300) {
20535
20535
  }, e);
20536
20536
  };
20537
20537
  }
20538
- function Ls(a11, e) {
20538
+ function Ds(a11, e) {
20539
20539
  return function(i2) {
20540
20540
  return !(0, import_lodash3.default)(a11[i2], e[i2]);
20541
20541
  };
20542
20542
  }
20543
- function Os(a11, e) {
20543
+ function xs(a11, e) {
20544
20544
  return function(i2) {
20545
20545
  return !(0, import_lodash4.default)(a11[i2], e[i2]);
20546
20546
  };
20547
20547
  }
20548
- function A2(a11) {
20548
+ function I2(a11) {
20549
20549
  return (e) => (t2) => a11(t2, e);
20550
20550
  }
20551
- function Om(a11) {
20551
+ function xm(a11) {
20552
20552
  return (e) => {
20553
20553
  if (e.sessionStore)
20554
20554
  return a11 ? e.sessionStore[a11] : e.sessionStore;
20555
20555
  };
20556
20556
  }
20557
- function ka(a11) {
20558
- return a11 instanceof ae || a11 instanceof U2;
20557
+ function Pa(a11) {
20558
+ return a11 instanceof se || a11 instanceof U2;
20559
20559
  }
20560
20560
  function nt(a11) {
20561
20561
  if (!a11 || a11.length === 0)
@@ -20571,7 +20571,7 @@ function nt(a11) {
20571
20571
  throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
20572
20572
  }
20573
20573
  }
20574
- function _a7(a11, e) {
20574
+ function Na(a11, e) {
20575
20575
  var r2;
20576
20576
  let t2 = Kt.parse(a11.sdp);
20577
20577
  if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
@@ -20583,30 +20583,30 @@ function _a7(a11, e) {
20583
20583
  n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
20584
20584
  }), { type: a11.type, sdp: Kt.write(t2) };
20585
20585
  }
20586
- function Na(a11, e) {
20586
+ function Oa(a11, e) {
20587
20587
  var s2;
20588
20588
  if (!(a11 != null && a11.sdp) || !e)
20589
20589
  return;
20590
- let i2 = Kt.parse(a11.sdp).media.find((o2) => ee(o2.mid) && parseInt(o2.mid) === parseInt(e));
20590
+ let i2 = Kt.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
20591
20591
  return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
20592
20592
  }
20593
- function Oa(a11) {
20593
+ function xa(a11) {
20594
20594
  return a11.sdp.includes("usedtx=1") ? a11 : { type: a11.type, sdp: a11.sdp.replace("useinbandfec=1", "useinbandfec=1;usedtx=1") };
20595
20595
  }
20596
- function dn2(a11, e, t2, i2) {
20596
+ function ln2(a11, e, t2, i2) {
20597
20597
  try {
20598
20598
  let r2 = new URL("/init", a11);
20599
20599
  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();
20600
20600
  } catch (r2) {
20601
20601
  let s2 = r2;
20602
- throw d2.e(ur, s2.name, s2.message), s2;
20602
+ throw d2.e(pr, s2.name, s2.message), s2;
20603
20603
  }
20604
20604
  }
20605
- function ln2(a11, e) {
20605
+ function un2(a11, e) {
20606
20606
  var t2;
20607
- return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: xa((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
20607
+ return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ua((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
20608
20608
  }
20609
- var import_ua_parser_js, import_lodash3, import_uuid3, import_uuid4, import_lodash4, import_uuid5, import_uuid6, import_uuid7, import_eventemitter2, import_eventemitter22, import_uuid8, import_eventemitter23, Kt, import_eventemitter24, import_uuid9, import_uuid10, Ka, qa, ja, ei, Ja, ts, is, Qa, es, m, M2, hr, za, Q2, c2, vr, mr, ti, ii, Ya, rs, Sr, ss, ns, Za, d2, je, ge, O2, cs, Ue, to, ec, Te, us, gr, ds, ls, ps, si, Re, Ie, hs, Je, k2, f2, ro, S2, fr, ms, le, Ss, gs, gt, Tt, Ts, fs, H2, y2, yr, z2, kr, Pr, ne, ai, no, co, vt, Ae, He, ks, ho, mo, ni, Er, Es, bs, Rs, Is, As, Be, Hs, te, Ve, Y2, Fe, Le, ze, ce, ae, Ye, Mt, go, Ds, br, ws, Rr, _s, Xe, Ir, Ar, yt, Ze, Ns, fo, vo, kt, ci, Mo, di, Hr, pe, li, ve, F, et, ui, tt, xs, Us, Pt, G2, Bs, Vs, Me, Lr, Dr, Fs, Gs, U2, wr, Ge, fe, Ws, $s, Po, Nr, Eo, Ks, qs, Et, _r, Or, pi, hi, it, rt, We, bt, he, mi, st, De, Si, gi, Ti, Rt, B2, Io, Gh, Wh, q2, fi, js, N2, Js, xr, Ao, we, qh, Ho, me, Co, ie, ye, jh, Jh, oe, X2, Lo, Qs, Qh, zh, Ur, zs, Br, Do, Xh, Zh, em, tm, im, rm, sm, am, It, wo, om, re, Ys, nm, cm, Se, dm, at, _o, Xs, lm, Zs, um, pm, hm, mm, Sm, gm, Tm, fm, vm, ea, Pm, No, Em, ia, Vr, ra, sa, aa, oa, na, ca, da, la, At, b2, Fr, Ht, ua, Oo, xo, j2, Gr, Uo, Bo, Vo, Fo, Go, Z2, Nm, Um, Bm, vi, pa, Vm, Fm, Gm, Wo, $o, $m, ha, Km, Ko, qm, jm, Jm, Qm, zm, Ym, ma, Sa, Zm, eS, ga, tS, iS, Ta, rS, sS, aS, fa, va, qo, jo, Jo, oS, nS, cS, dS, lS, Ma, kS, Qo, PS, ES, bS, Yo, Xo, yi, Ct, ki, ya, Wr, Pi, Ei, Pa, Ea, ba, $r, Ra, Kr, $e, qr, bi, se, Lt, _2, Dt, Ri, Ii, Ia, Aa, ot, Ha, en2, de, _e, Ai, tn2, Ca, La, Hi, Ne, Ci, wt, Li, Di, wi, _t, jr, Pe, Nt, Ot, _i, Ni, Da, xt, Oi, Ut, xi, V, Bt, Ui, Bi, Vi, ct, Fi, Gi, C, Wi, $i, Vt, Ki, Ft, qi, ji, Ji, Qi, zi, Yi, Xi, Zi, er, J, wa, tr, ir, rr, sr, ar, or, dt, lt, nr, cr, Gt, Wt, Qr, $t, Yr, lr, Ee, Ke, qt, jt, Jt, xa, ur, Qt, zt, Ua, I2, Yt, Va, pr, ut, Ga, Fa, fn2, vn2, Mn, Xt, yn, kn, Pn, En, Wa, bn, $a, Xr, be, Rn, In, An, Hn, Cn, Ln, Dn, wn, _n, Nn, Zr, On, xn, Un, Bn, Vn, Fn;
20609
+ var import_ua_parser_js, import_lodash3, import_uuid3, import_uuid4, import_lodash4, import_uuid5, import_uuid6, import_uuid7, import_eventemitter2, import_eventemitter22, import_uuid8, import_eventemitter23, Kt, import_eventemitter24, import_uuid9, import_uuid10, qa, ja, Ja, ei, Qa, is, rs, za, ts, m, M2, mr, Ya, Q2, c2, Mr, Sr, ti, ii, Xa, ss, gr, as, cs, eo, d2, je, ge, O2, ds, Ue, io, tc, Te, ps, Tr, ls, us, hs, si, Re, Ae, ms, Je, P4, f2, so, S2, vr, Ss, le, gs, Ts, gt, Tt, fs, vs, H2, y2, kr, z2, Pr, Er, ne, ai, co, lo, vt, Ie, He, Ps, mo, So, ni, br, bs, Rs, As, Is, Hs, Be, Cs, ee, Ve, Y2, Fe, Le, ze, ce, se, Ye, Mt, To, ws, Rr, _s, Ar, Ns, Xe, Ir, Hr, yt, Ze, Os, vo, Mo, kt, ci, yo, di, Cr, pe, li, ve, F, et, ui, tt, Us, Bs, Pt, G2, Vs, Fs, Me, Dr, wr, Gs, Ws, U2, _r, Ge, fe, $s, Ks, Eo, Or, bo, qs, js, Et, Nr, xr, pi, hi, it, rt, We, bt, he, mi, st, De, Si, gi, Ti, Rt, B2, Io, Wh, $h, q2, fi, Js, N2, Qs, Ur, Ho, we, jh, Co, me, Lo, te, ye, Jh, Qh, ae, X2, Do, zs, zh, Yh, Br, Ys, Vr, wo, Zh, em, tm, im, rm, sm, am, om, At, _o, nm, ie, Xs, cm, dm, Se, lm, at, No, Zs, um, ea, pm, hm, mm, Sm, gm, Tm, fm, vm, Mm, ta, Em, Oo, bm, ra, Fr, sa, aa, oa, na, ca, da, la, ua, It, b2, Gr, Ht, pa, xo, Uo, j2, Wr, Bo, Vo, Fo, Go, Wo, Z2, Om, Bm, Vm, vi, ha, Fm, Gm, Wm, $o, Ko, Km, ma, qm, qo, jm, Jm, Qm, zm, Ym, Xm, Sa, ga, eS, tS, Ta, iS, rS, fa, sS, aS, oS, va, Ma, jo, Jo, Qo, nS, cS, dS, lS, uS, ya, PS, zo, ES, bS, RS, Xo, Zo, yi, Ct, ki, ka, $r, Pi, Ei, Ea, ba, Ra, Kr, Aa, qr, $e, jr, bi, re, Lt, _2, Dt, Ri, Ai, Ia, Ha, ot, Ca, Ii, tn2, de, _e, Hi, rn2, La, Da, Ci, Ne, Li, wt, Di, wi, _i, _t, Jr, Pe, Nt, Ot, Ni, Oi, wa, xt, xi, Ut, Ui, V, Bt, Bi, Vi, Fi, ct, Gi, Wi, C, $i, Ki, Vt, qi, Ft, ji, Ji, Qi, zi, Yi, Xi, Zi, er, tr, J, _a7, ir, rr, sr, ar, or, nr, dt, lt, cr, dr, Gt, Wt, zr, $t, Xr, ur, Ee, Ke, qt, jt, Jt, Ua, pr, Qt, zt, Ba, A2, Yt, Fa, hr, ut, Wa, Ga, vn2, Mn, yn, Xt, kn, Pn, En, bn, $a, Rn, Ka, Zr, be, An, In, Hn, Cn, Ln, Dn, wn, _n, Nn, On, es, xn, Un, Bn, Vn, Fn, Gn;
20610
20610
  var init_dist = __esm({
20611
20611
  "../hms-video-store/dist/index.js"() {
20612
20612
  "use strict";
@@ -20637,35 +20637,35 @@ var init_dist = __esm({
20637
20637
  import_uuid9 = require("uuid");
20638
20638
  import_uuid10 = require("uuid");
20639
20639
  init_es();
20640
- Ka = Object.defineProperty;
20641
- qa = Object.defineProperties;
20642
- ja = Object.getOwnPropertyDescriptors;
20640
+ qa = Object.defineProperty;
20641
+ ja = Object.defineProperties;
20642
+ Ja = Object.getOwnPropertyDescriptors;
20643
20643
  ei = Object.getOwnPropertySymbols;
20644
- Ja = Object.getPrototypeOf;
20645
- ts = Object.prototype.hasOwnProperty;
20646
- is = Object.prototype.propertyIsEnumerable;
20647
- Qa = Reflect.get;
20648
- es = (a11, e, t2) => e in a11 ? Ka(a11, e, { enumerable: true, configurable: true, writable: true, value: t2 }) : a11[e] = t2;
20644
+ Qa = Object.getPrototypeOf;
20645
+ is = Object.prototype.hasOwnProperty;
20646
+ rs = Object.prototype.propertyIsEnumerable;
20647
+ za = Reflect.get;
20648
+ ts = (a11, e, t2) => e in a11 ? qa(a11, e, { enumerable: true, configurable: true, writable: true, value: t2 }) : a11[e] = t2;
20649
20649
  m = (a11, e) => {
20650
20650
  for (var t2 in e || (e = {}))
20651
- ts.call(e, t2) && es(a11, t2, e[t2]);
20651
+ is.call(e, t2) && ts(a11, t2, e[t2]);
20652
20652
  if (ei)
20653
20653
  for (var t2 of ei(e))
20654
- is.call(e, t2) && es(a11, t2, e[t2]);
20654
+ rs.call(e, t2) && ts(a11, t2, e[t2]);
20655
20655
  return a11;
20656
20656
  };
20657
- M2 = (a11, e) => qa(a11, ja(e));
20658
- hr = (a11, e) => {
20657
+ M2 = (a11, e) => ja(a11, Ja(e));
20658
+ mr = (a11, e) => {
20659
20659
  var t2 = {};
20660
20660
  for (var i2 in a11)
20661
- ts.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
20661
+ is.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
20662
20662
  if (a11 != null && ei)
20663
20663
  for (var i2 of ei(a11))
20664
- e.indexOf(i2) < 0 && is.call(a11, i2) && (t2[i2] = a11[i2]);
20664
+ e.indexOf(i2) < 0 && rs.call(a11, i2) && (t2[i2] = a11[i2]);
20665
20665
  return t2;
20666
20666
  };
20667
- za = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
20668
- Q2 = (a11, e, t2) => Qa(Ja(a11), t2, e);
20667
+ Ya = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
20668
+ Q2 = (a11, e, t2) => za(Qa(a11), t2, e);
20669
20669
  c2 = (a11, e, t2) => new Promise((i2, r2) => {
20670
20670
  var s2 = (l2) => {
20671
20671
  try {
@@ -20682,18 +20682,18 @@ var init_dist = __esm({
20682
20682
  }, n2 = (l2) => l2.done ? i2(l2.value) : Promise.resolve(l2.value).then(s2, o2);
20683
20683
  n2((t2 = t2.apply(a11, e)).next());
20684
20684
  });
20685
- vr = za((Bc, ao) => {
20686
- ao.exports = { version: "0.12.14-alpha.5", 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"] };
20685
+ Mr = Ya((Vc, oo) => {
20686
+ oo.exports = { version: "0.12.14-alpha.7", 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"] };
20687
20687
  });
20688
- mr = ((n2) => (n2.Disconnected = "Disconnected", n2.Preview = "Preview", n2.Connecting = "Connecting", n2.Connected = "Connected", n2.Reconnecting = "Reconnecting", n2.Disconnecting = "Disconnecting", n2.Failed = "Failed", n2))(mr || {});
20688
+ 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 || {});
20689
20689
  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 });
20690
20690
  ii = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20691
- Ya = ((e) => (e.CHAT = "chat", e))(Ya || {});
20692
- rs = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(rs || {});
20693
- Sr = ((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))(Sr || {});
20694
- ss = ((t2) => (t2.audio = "audio", t2.video = "video", t2))(ss || {});
20695
- ns = ((l2) => (l2[l2.VERBOSE = 0] = "VERBOSE", l2[l2.DEBUG = 1] = "DEBUG", l2[l2.INFO = 2] = "INFO", l2[l2.WARN = 3] = "WARN", l2[l2.TIME = 4] = "TIME", l2[l2.TIMEEND = 5] = "TIMEEND", l2[l2.ERROR = 6] = "ERROR", l2[l2.NONE = 7] = "NONE", l2))(ns || {});
20696
- Za = typeof window != "undefined" && typeof window.expect != "undefined";
20691
+ Xa = ((e) => (e.CHAT = "chat", e))(Xa || {});
20692
+ ss = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(ss || {});
20693
+ 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 || {});
20694
+ as = ((t2) => (t2.audio = "audio", t2.video = "video", t2))(as || {});
20695
+ cs = ((l2) => (l2[l2.VERBOSE = 0] = "VERBOSE", l2[l2.DEBUG = 1] = "DEBUG", l2[l2.INFO = 2] = "INFO", l2[l2.WARN = 3] = "WARN", l2[l2.TIME = 4] = "TIME", l2[l2.TIMEEND = 5] = "TIMEEND", l2[l2.ERROR = 6] = "ERROR", l2[l2.NONE = 7] = "NONE", l2))(cs || {});
20696
+ eo = typeof window != "undefined" && typeof window.expect != "undefined";
20697
20697
  d2 = class {
20698
20698
  static v(e, ...t2) {
20699
20699
  this.log(0, e, ...t2);
@@ -20759,7 +20759,7 @@ var init_dist = __esm({
20759
20759
  }
20760
20760
  }
20761
20761
  };
20762
- d2.level = Za ? 7 : 0;
20762
+ d2.level = eo ? 7 : 0;
20763
20763
  je = class {
20764
20764
  constructor(e) {
20765
20765
  this.tracks = new Array();
@@ -20771,16 +20771,16 @@ var init_dist = __esm({
20771
20771
  };
20772
20772
  ge = new import_ua_parser_js.UAParser();
20773
20773
  O2 = typeof window != "undefined";
20774
- Ue = typeof window == "undefined" && !((cs = ge.getBrowser().name) != null && cs.toLowerCase().includes("electron"));
20775
- to = () => !Ue;
20776
- ec = to();
20774
+ Ue = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
20775
+ io = () => !Ue;
20776
+ tc = io();
20777
20777
  Te = () => ge.getDevice().type === "mobile";
20778
- us = () => typeof document != "undefined" && document.hidden;
20779
- gr = () => {
20778
+ ps = () => typeof document != "undefined" && document.hidden;
20779
+ Tr = () => {
20780
20780
  var a11;
20781
20781
  return ((a11 = ge.getOS().name) == null ? void 0 : a11.toLowerCase()) === "ios";
20782
20782
  };
20783
- ps = ((ls = (ds = ge.getBrowser()) == null ? void 0 : ds.name) == null ? void 0 : ls.toLowerCase()) === "firefox";
20783
+ hs = ((us = (ls = ge.getBrowser()) == null ? void 0 : ls.name) == null ? void 0 : us.toLowerCase()) === "firefox";
20784
20784
  si = (a11) => a11 ? `{
20785
20785
  trackId: ${a11.id};
20786
20786
  kind: ${a11.kind};
@@ -20831,7 +20831,7 @@ var init_dist = __esm({
20831
20831
  }`;
20832
20832
  }
20833
20833
  };
20834
- Ie = class extends Re {
20834
+ Ae = class extends Re {
20835
20835
  constructor(t2, i2, r2) {
20836
20836
  super(t2, i2, r2);
20837
20837
  this.type = "audio";
@@ -20873,7 +20873,7 @@ var init_dist = __esm({
20873
20873
  return;
20874
20874
  }
20875
20875
  try {
20876
- typeof this.audioElement.setSinkId == "function" && (ps || (yield (i2 = this.audioElement) == null ? void 0 : i2.setSinkId(t2.deviceId)), this.outputDevice = t2);
20876
+ typeof this.audioElement.setSinkId == "function" && (hs || (yield (i2 = this.audioElement) == null ? void 0 : i2.setSinkId(t2.deviceId)), this.outputDevice = t2);
20877
20877
  } catch (r2) {
20878
20878
  d2.d("[HMSAudioTrack]", "error in setSinkId", r2);
20879
20879
  }
@@ -20885,9 +20885,9 @@ var init_dist = __esm({
20885
20885
  });
20886
20886
  }
20887
20887
  };
20888
- hs = ((i2) => (i2.CUSTOM = "CUSTOM", i2.LOCAL = "LOCAL", i2.HMS = "HMS", i2))(hs || {});
20889
- Je = io();
20890
- k2 = { WebSocketConnectionErrors: { FAILED_TO_CONNECT: 1e3, WEBSOCKET_CONNECTION_LOST: 1003, ABNORMAL_CLOSE: 1006 }, APIErrors: { SERVER_ERRORS: 2e3, INIT_CONFIG_NOT_AVAILABLE: 2002, ENDPOINT_UNREACHABLE: 2003, INVALID_TOKEN_FORMAT: 2004 }, TracksErrors: { GENERIC_TRACK: 3e3, CANT_ACCESS_CAPTURE_DEVICE: 3001, DEVICE_NOT_AVAILABLE: 3002, DEVICE_IN_USE: 3003, DEVICE_LOST_MIDWAY: 3004, NOTHING_TO_RETURN: 3005, INVALID_VIDEO_SETTINGS: 3006, CODEC_CHANGE_NOT_PERMITTED: 3007, AUTOPLAY_ERROR: 3008, OVER_CONSTRAINED: 3009, NO_AUDIO_DETECTED: 3010, SYSTEM_DENIED_PERMISSION: 3011, CURRENT_TAB_NOT_SHARED: 3012, AUDIO_PLAYBACK_ERROR: 3013, SELECTED_DEVICE_MISSING: 3014 }, WebrtcErrors: { CREATE_OFFER_FAILED: 4001, CREATE_ANSWER_FAILED: 4002, SET_LOCAL_DESCRIPTION_FAILED: 4003, SET_REMOTE_DESCRIPTION_FAILED: 4004, ICE_FAILURE: 4005, ICE_DISCONNECTED: 4006, STATS_FAILED: 4007 }, WebsocketMethodErrors: { SERVER_ERRORS: 5e3, ALREADY_JOINED: 5001, CANNOT_JOIN_PREVIEW_IN_PROGRESS: 5002 }, GenericErrors: { NOT_CONNECTED: 6e3, SIGNALLING: 6001, UNKNOWN: 6002, NOT_READY: 6003, JSON_PARSING_FAILED: 6004, TRACK_METADATA_MISSING: 6005, RTC_TRACK_MISSING: 6006, PEER_METADATA_MISSING: 6007, INVALID_ROLE: 6008, PREVIEW_IN_PROGRESS: 6009, MISSING_MEDIADEVICES: 6010, MISSING_RTCPEERCONNECTION: 6011, LOCAL_STORAGE_ACCESS_DENIED: 6012, VALIDATION_FAILED: 6013 }, PlaylistErrors: { NO_ENTRY_TO_PLAY: 8001, NO_ENTRY_IS_PLAYING: 8002 } };
20888
+ ms = ((i2) => (i2.CUSTOM = "CUSTOM", i2.LOCAL = "LOCAL", i2.HMS = "HMS", i2))(ms || {});
20889
+ Je = ro();
20890
+ P4 = { WebSocketConnectionErrors: { FAILED_TO_CONNECT: 1e3, WEBSOCKET_CONNECTION_LOST: 1003, ABNORMAL_CLOSE: 1006 }, APIErrors: { SERVER_ERRORS: 2e3, INIT_CONFIG_NOT_AVAILABLE: 2002, ENDPOINT_UNREACHABLE: 2003, INVALID_TOKEN_FORMAT: 2004 }, TracksErrors: { GENERIC_TRACK: 3e3, CANT_ACCESS_CAPTURE_DEVICE: 3001, DEVICE_NOT_AVAILABLE: 3002, DEVICE_IN_USE: 3003, DEVICE_LOST_MIDWAY: 3004, NOTHING_TO_RETURN: 3005, INVALID_VIDEO_SETTINGS: 3006, CODEC_CHANGE_NOT_PERMITTED: 3007, AUTOPLAY_ERROR: 3008, OVER_CONSTRAINED: 3009, NO_AUDIO_DETECTED: 3010, SYSTEM_DENIED_PERMISSION: 3011, CURRENT_TAB_NOT_SHARED: 3012, AUDIO_PLAYBACK_ERROR: 3013, SELECTED_DEVICE_MISSING: 3014 }, WebrtcErrors: { CREATE_OFFER_FAILED: 4001, CREATE_ANSWER_FAILED: 4002, SET_LOCAL_DESCRIPTION_FAILED: 4003, SET_REMOTE_DESCRIPTION_FAILED: 4004, ICE_FAILURE: 4005, ICE_DISCONNECTED: 4006, STATS_FAILED: 4007 }, WebsocketMethodErrors: { SERVER_ERRORS: 5e3, ALREADY_JOINED: 5001, CANNOT_JOIN_PREVIEW_IN_PROGRESS: 5002 }, GenericErrors: { NOT_CONNECTED: 6e3, SIGNALLING: 6001, UNKNOWN: 6002, NOT_READY: 6003, JSON_PARSING_FAILED: 6004, TRACK_METADATA_MISSING: 6005, RTC_TRACK_MISSING: 6006, PEER_METADATA_MISSING: 6007, INVALID_ROLE: 6008, PREVIEW_IN_PROGRESS: 6009, MISSING_MEDIADEVICES: 6010, MISSING_RTCPEERCONNECTION: 6011, LOCAL_STORAGE_ACCESS_DENIED: 6012, VALIDATION_FAILED: 6013 }, PlaylistErrors: { NO_ENTRY_TO_PLAY: 8001, NO_ENTRY_IS_PLAYING: 8002 } };
20891
20891
  f2 = class a2 extends Error {
20892
20892
  constructor(t2, i2, r2, s2, o2, n2 = false) {
20893
20893
  super(s2);
@@ -20917,99 +20917,99 @@ var init_dist = __esm({
20917
20917
  }`;
20918
20918
  }
20919
20919
  };
20920
- ro = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
20920
+ so = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
20921
20921
  S2 = { WebSocketConnectionErrors: { FailedToConnect(a11, e = "") {
20922
- return new f2(k2.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
20922
+ return new f2(P4.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
20923
20923
  }, WebSocketConnectionLost(a11, e = "") {
20924
- return new f2(k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
20924
+ return new f2(P4.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
20925
20925
  }, AbnormalClose(a11, e = "") {
20926
- return new f2(k2.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
20926
+ return new f2(P4.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
20927
20927
  } }, APIErrors: { ServerErrors(a11, e, t2 = "", i2 = true) {
20928
20928
  return new f2(a11, "ServerErrors", e, `[${e}]: Server error ${t2}`, t2, i2);
20929
20929
  }, EndpointUnreachable(a11, e = "") {
20930
- return new f2(k2.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
20930
+ return new f2(P4.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
20931
20931
  }, InvalidTokenFormat(a11, e = "") {
20932
- return new f2(k2.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
20932
+ return new f2(P4.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
20933
20933
  }, InitConfigNotAvailable(a11, e = "") {
20934
- return new f2(k2.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
20934
+ return new f2(P4.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
20935
20935
  } }, TracksErrors: { GenericTrack(a11, e = "") {
20936
- return new f2(k2.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
20936
+ return new f2(P4.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
20937
20937
  }, CantAccessCaptureDevice(a11, e, t2 = "") {
20938
- return new f2(k2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
20938
+ return new f2(P4.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
20939
20939
  }, DeviceNotAvailable(a11, e, t2 = "") {
20940
- return new f2(k2.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
20940
+ return new f2(P4.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
20941
20941
  }, DeviceInUse(a11, e, t2 = "") {
20942
- return new f2(k2.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
20942
+ return new f2(P4.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
20943
20943
  }, DeviceLostMidway(a11, e, t2 = "") {
20944
- return new f2(k2.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
20944
+ return new f2(P4.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
20945
20945
  }, NothingToReturn(a11, e = "", t2 = "There is no media to return. Please select either video or audio or both.") {
20946
- return new f2(k2.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
20946
+ return new f2(P4.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
20947
20947
  }, InvalidVideoSettings(a11, e = "") {
20948
- return new f2(k2.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
20948
+ return new f2(P4.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
20949
20949
  }, AutoplayBlocked(a11, e = "") {
20950
- return new f2(k2.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
20950
+ return new f2(P4.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
20951
20951
  }, CodecChangeNotPermitted(a11, e = "") {
20952
- return new f2(k2.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
20952
+ return new f2(P4.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
20953
20953
  }, OverConstrained(a11, e, t2 = "") {
20954
- return new f2(k2.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
20954
+ return new f2(P4.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
20955
20955
  }, NoAudioDetected(a11, e = "Please check the mic or use another audio input") {
20956
- return new f2(k2.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
20956
+ return new f2(P4.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
20957
20957
  }, SystemDeniedPermission(a11, e, t2 = "") {
20958
- return new f2(k2.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
20958
+ return new f2(P4.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
20959
20959
  }, CurrentTabNotShared() {
20960
- return new f2(k2.TracksErrors.CURRENT_TAB_NOT_SHARED, "CurrentTabNotShared", "TRACK", "The app requires you to share the current tab", "You must screen share the current tab in order to proceed");
20960
+ return new f2(P4.TracksErrors.CURRENT_TAB_NOT_SHARED, "CurrentTabNotShared", "TRACK", "The app requires you to share the current tab", "You must screen share the current tab in order to proceed");
20961
20961
  }, AudioPlaybackError(a11) {
20962
- return new f2(k2.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
20962
+ return new f2(P4.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
20963
20963
  }, SelectedDeviceMissing(a11) {
20964
- return new f2(k2.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
20964
+ return new f2(P4.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
20965
20965
  } }, WebrtcErrors: { CreateOfferFailed(a11, e = "") {
20966
- return new f2(k2.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
20966
+ return new f2(P4.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
20967
20967
  }, CreateAnswerFailed(a11, e = "") {
20968
- return new f2(k2.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
20968
+ return new f2(P4.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
20969
20969
  }, SetLocalDescriptionFailed(a11, e = "") {
20970
- return new f2(k2.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
20970
+ return new f2(P4.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
20971
20971
  }, SetRemoteDescriptionFailed(a11, e = "") {
20972
- return new f2(k2.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
20972
+ return new f2(P4.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
20973
20973
  }, ICEFailure(a11, e = "", t2 = false) {
20974
- return new f2(k2.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
20974
+ return new f2(P4.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
20975
20975
  }, ICEDisconnected(a11, e = "") {
20976
- return new f2(k2.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
20976
+ return new f2(P4.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
20977
20977
  }, StatsFailed(a11, e = "") {
20978
- return new f2(k2.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
20978
+ return new f2(P4.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
20979
20979
  } }, WebsocketMethodErrors: { ServerErrors(a11, e, t2) {
20980
- return new f2(a11, "ServerErrors", e, t2, t2, ro.includes(e));
20980
+ return new f2(a11, "ServerErrors", e, t2, t2, so.includes(e));
20981
20981
  }, AlreadyJoined(a11, e = "") {
20982
- return new f2(k2.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
20982
+ return new f2(P4.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
20983
20983
  }, CannotJoinPreviewInProgress(a11, e = "") {
20984
- return new f2(k2.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
20984
+ return new f2(P4.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
20985
20985
  } }, GenericErrors: { NotConnected(a11, e = "") {
20986
- return new f2(k2.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
20986
+ return new f2(P4.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
20987
20987
  }, Signalling(a11, e) {
20988
- return new f2(k2.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
20988
+ return new f2(P4.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
20989
20989
  }, Unknown(a11, e) {
20990
- return new f2(k2.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
20990
+ return new f2(P4.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
20991
20991
  }, NotReady(a11, e = "") {
20992
- return new f2(k2.GenericErrors.NOT_READY, "NotReady", a11, e, e);
20992
+ return new f2(P4.GenericErrors.NOT_READY, "NotReady", a11, e, e);
20993
20993
  }, JsonParsingFailed(a11, e, t2 = "") {
20994
- return new f2(k2.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
20994
+ return new f2(P4.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
20995
20995
  }, TrackMetadataMissing(a11, e = "") {
20996
- return new f2(k2.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
20996
+ return new f2(P4.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
20997
20997
  }, RTCTrackMissing(a11, e = "") {
20998
- return new f2(k2.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
20998
+ return new f2(P4.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
20999
20999
  }, PeerMetadataMissing(a11, e = "") {
21000
- return new f2(k2.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
21000
+ return new f2(P4.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
21001
21001
  }, ValidationFailed(a11, e) {
21002
- return new f2(k2.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
21002
+ return new f2(P4.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
21003
21003
  }, InvalidRole(a11, e) {
21004
- return new f2(k2.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
21004
+ return new f2(P4.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
21005
21005
  }, PreviewAlreadyInProgress(a11, e = "") {
21006
- return new f2(k2.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
21006
+ return new f2(P4.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
21007
21007
  }, LocalStorageAccessDenied(a11 = "Access to localStorage has been denied") {
21008
- return new f2(k2.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
21008
+ return new f2(P4.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
21009
21009
  }, MissingMediaDevices() {
21010
- return new f2(k2.GenericErrors.MISSING_MEDIADEVICES, "MissingMediaDevices", "JOIN", "navigator.mediaDevices is undefined. 100ms SDK won't work on this website as WebRTC is not supported on HTTP endpoints(missing navigator.mediaDevices). Please ensure you're using the SDK either on localhost or a valid HTTPS endpoint.", "", true);
21010
+ return new f2(P4.GenericErrors.MISSING_MEDIADEVICES, "MissingMediaDevices", "JOIN", "navigator.mediaDevices is undefined. 100ms SDK won't work on this website as WebRTC is not supported on HTTP endpoints(missing navigator.mediaDevices). Please ensure you're using the SDK either on localhost or a valid HTTPS endpoint.", "", true);
21011
21011
  }, MissingRTCPeerConnection() {
21012
- return new f2(k2.GenericErrors.MISSING_RTCPEERCONNECTION, "MissingRTCPeerConnection", "JOIN", "RTCPeerConnection which is a core requirement for WebRTC call was not found, this could be due to an unsupported browser or browser extensions blocking WebRTC", "", true);
21012
+ return new f2(P4.GenericErrors.MISSING_RTCPEERCONNECTION, "MissingRTCPeerConnection", "JOIN", "RTCPeerConnection which is a core requirement for WebRTC call was not found, this could be due to an unsupported browser or browser extensions blocking WebRTC", "", true);
21013
21013
  } }, MediaPluginErrors: { PlatformNotSupported(a11, e = "") {
21014
21014
  return new f2(7001, "PlatformNotSupported", a11, "Check HMS Docs to see the list of supported platforms", e);
21015
21015
  }, InitFailed(a11, e = "") {
@@ -21021,11 +21021,11 @@ var init_dist = __esm({
21021
21021
  }, DeviceNotSupported(a11, e = "") {
21022
21022
  return new f2(7005, "DeviceNotSupported", a11, "Check HMS Docs to see the list of supported devices", e);
21023
21023
  } }, PlaylistErrors: { NoEntryToPlay(a11, e) {
21024
- return new f2(k2.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
21024
+ return new f2(P4.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
21025
21025
  }, NoEntryPlaying(a11, e) {
21026
- return new f2(k2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
21026
+ return new f2(P4.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
21027
21027
  } } };
21028
- fr = class {
21028
+ vr = class {
21029
21029
  constructor() {
21030
21030
  this.valuesMap = /* @__PURE__ */ new Map();
21031
21031
  }
@@ -21050,9 +21050,9 @@ var init_dist = __esm({
21050
21050
  return this.valuesMap.size;
21051
21051
  }
21052
21052
  };
21053
- ms = () => {
21053
+ Ss = () => {
21054
21054
  try {
21055
- O2 && !localStorage && (window.localStorage = new fr());
21055
+ O2 && !localStorage && (window.localStorage = new vr());
21056
21056
  } catch (a11) {
21057
21057
  d2.e("Error initialising localStorage", S2.GenericErrors.LocalStorageAccessDenied());
21058
21058
  }
@@ -21064,7 +21064,7 @@ var init_dist = __esm({
21064
21064
  }
21065
21065
  getStorage() {
21066
21066
  try {
21067
- return O2 && !this.storage && (ms(), this.storage = window.localStorage), this.storage;
21067
+ return O2 && !this.storage && (Ss(), this.storage = window.localStorage), this.storage;
21068
21068
  } catch (e) {
21069
21069
  return d2.e("Error initialising localStorage", S2.GenericErrors.LocalStorageAccessDenied()), null;
21070
21070
  }
@@ -21084,29 +21084,29 @@ var init_dist = __esm({
21084
21084
  (e = this.getStorage()) == null || e.removeItem(this.key);
21085
21085
  }
21086
21086
  };
21087
- Ss = () => {
21087
+ gs = () => {
21088
21088
  let a11, e = new le("hms-analytics-deviceId"), t2 = e.get();
21089
21089
  return t2 ? a11 = t2 : (a11 = (0, import_uuid4.v4)(), e.set(a11)), a11;
21090
21090
  };
21091
- gs = "[VALIDATIONS]";
21091
+ Ts = "[VALIDATIONS]";
21092
21092
  gt = () => {
21093
- if (!ee(RTCPeerConnection)) {
21093
+ if (!oe(RTCPeerConnection)) {
21094
21094
  let a11 = S2.GenericErrors.MissingRTCPeerConnection();
21095
- throw d2.e(gs, a11), a11;
21095
+ throw d2.e(Ts, a11), a11;
21096
21096
  }
21097
21097
  };
21098
21098
  Tt = () => {
21099
- if (!ee(navigator.mediaDevices)) {
21099
+ if (!oe(navigator.mediaDevices)) {
21100
21100
  let a11 = S2.GenericErrors.MissingMediaDevices();
21101
- throw d2.e(gs, a11), a11;
21101
+ throw d2.e(Ts, a11), a11;
21102
21102
  }
21103
21103
  };
21104
- Ts = vr().version;
21105
- fs = (a11, e = ",") => Object.keys(a11).filter((t2) => ee(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
21104
+ fs = Mr().version;
21105
+ vs = (a11, e = ",") => Object.keys(a11).filter((t2) => oe(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
21106
21106
  H2 = class {
21107
21107
  constructor({ name: e, level: t2, properties: i2, includesPII: r2, timestamp: s2 }) {
21108
21108
  this.metadata = { peer: {}, userAgent: ft() };
21109
- this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = (0, import_uuid3.v4)(), this.device_id = Ss();
21109
+ this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = (0, import_uuid3.v4)(), this.device_id = gs();
21110
21110
  }
21111
21111
  toSignalParams() {
21112
21112
  return { name: this.name, info: M2(m({}, this.properties), { timestamp: this.timestamp, domain: Je }), timestamp: (/* @__PURE__ */ new Date()).getTime() };
@@ -21122,12 +21122,12 @@ var init_dist = __esm({
21122
21122
  return new H2({ name: i2, level: r2, properties: s2 });
21123
21123
  }
21124
21124
  static preview(i2) {
21125
- var r2 = i2, { error: e } = r2, t2 = hr(r2, ["error"]);
21125
+ var r2 = i2, { error: e } = r2, t2 = mr(r2, ["error"]);
21126
21126
  let s2 = this.eventNameFor("preview", e === void 0), o2 = e ? 2 : 1, n2 = this.getPropertiesWithError(t2, e);
21127
21127
  return new H2({ name: s2, level: o2, properties: n2 });
21128
21128
  }
21129
21129
  static join(i2) {
21130
- var r2 = i2, { error: e } = r2, t2 = hr(r2, ["error"]);
21130
+ var r2 = i2, { error: e } = r2, t2 = mr(r2, ["error"]);
21131
21131
  let s2 = this.eventNameFor("join", e === void 0), o2 = e ? 2 : 1, n2 = this.getPropertiesWithError(M2(m({}, t2), { is_preview_called: !!t2.is_preview_called }), e);
21132
21132
  return new H2({ name: s2, level: o2, properties: n2 });
21133
21133
  }
@@ -21209,7 +21209,7 @@ var init_dist = __esm({
21209
21209
  }
21210
21210
  };
21211
21211
  y2.KEY_REQUESTED_AT = "requested_at", y2.KEY_RESPONDED_AT = "responded_at";
21212
- yr = class {
21212
+ kr = class {
21213
21213
  constructor() {
21214
21214
  this.storage = new le("hms-device-selection");
21215
21215
  this.remember = false;
@@ -21243,9 +21243,9 @@ var init_dist = __esm({
21243
21243
  return e.deviceId === t2.deviceId && (e.groupId === t2.groupId || !e.groupId);
21244
21244
  }
21245
21245
  };
21246
- z2 = new yr();
21247
- kr = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(kr || {});
21248
- Pr = ((t2) => (t2.PLATFORM_NOT_SUPPORTED = "PLATFORM_NOT_SUPPORTED", t2.DEVICE_NOT_SUPPORTED = "DEVICE_NOT_SUPPORTED", t2))(Pr || {});
21246
+ z2 = new kr();
21247
+ Pr = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Pr || {});
21248
+ Er = ((t2) => (t2.PLATFORM_NOT_SUPPORTED = "PLATFORM_NOT_SUPPORTED", t2.DEVICE_NOT_SUPPORTED = "DEVICE_NOT_SUPPORTED", t2))(Er || {});
21249
21249
  ne = class {
21250
21250
  static failure(e, t2) {
21251
21251
  let i2 = "mediaPlugin.failed", r2 = 2, s2 = m({ plugin_name: e }, t2.toAnalyticsProperties());
@@ -21312,8 +21312,8 @@ var init_dist = __esm({
21312
21312
  delete this.addedTimestamps[e], delete this.initTime[e], delete this.pluginAdded[e], delete this.pluginSampleRate[e];
21313
21313
  }
21314
21314
  };
21315
- no = 48e3;
21316
- co = () => navigator.userAgent.indexOf("Firefox") !== -1;
21315
+ co = 48e3;
21316
+ lo = () => navigator.userAgent.indexOf("Firefox") !== -1;
21317
21317
  vt = class {
21318
21318
  constructor(e, t2, i2) {
21319
21319
  this.eventBus = t2;
@@ -21478,10 +21478,10 @@ var init_dist = __esm({
21478
21478
  });
21479
21479
  }
21480
21480
  createAudioContext() {
21481
- this.audioContext || (co() ? this.audioContext = new AudioContext() : this.audioContext = new AudioContext({ sampleRate: no }));
21481
+ this.audioContext || (lo() ? this.audioContext = new AudioContext() : this.audioContext = new AudioContext({ sampleRate: co }));
21482
21482
  }
21483
21483
  };
21484
- Ae = { audioContext: null, getAudioContext() {
21484
+ Ie = { audioContext: null, getAudioContext() {
21485
21485
  return this.audioContext || (this.audioContext = new AudioContext()), this.audioContext;
21486
21486
  }, resumeContext() {
21487
21487
  return c2(this, null, function* () {
@@ -21513,7 +21513,7 @@ var init_dist = __esm({
21513
21513
  return e(this.storage);
21514
21514
  }
21515
21515
  };
21516
- ks = `(function workerSetup() {
21516
+ Ps = `(function workerSetup() {
21517
21517
  function ticker() {
21518
21518
  self.postMessage('tick');
21519
21519
  }
@@ -21528,8 +21528,8 @@ var init_dist = __esm({
21528
21528
  }
21529
21529
  };
21530
21530
  })()`;
21531
- ho = 35;
21532
- mo = 5;
21531
+ mo = 35;
21532
+ So = 5;
21533
21533
  ni = class {
21534
21534
  constructor(e, t2, i2) {
21535
21535
  this.track = e;
@@ -21579,7 +21579,7 @@ var init_dist = __esm({
21579
21579
  });
21580
21580
  }
21581
21581
  sendAudioLevel(e = 0) {
21582
- if (e = e > ho ? e : 0, Math.abs(this.audioLevel - e) > mo) {
21582
+ if (e = e > mo ? e : 0, Math.abs(this.audioLevel - e) > So) {
21583
21583
  this.audioLevel = e;
21584
21584
  let i2 = { track: this.track, audioLevel: this.audioLevel };
21585
21585
  this.audioLevelEvent.publish(i2);
@@ -21615,19 +21615,19 @@ var init_dist = __esm({
21615
21615
  return this.analyserNode.getByteTimeDomainData(e), !e.some((t2) => t2 !== 128 && t2 !== 0);
21616
21616
  }
21617
21617
  createAnalyserNodeForStream(e) {
21618
- let t2 = Ae.getAudioContext(), i2 = t2.createAnalyser();
21618
+ let t2 = Ie.getAudioContext(), i2 = t2.createAnalyser();
21619
21619
  return t2.createMediaStreamSource(e).connect(i2), i2;
21620
21620
  }
21621
21621
  };
21622
- Er = ((t2) => (t2.SIP = "sip", t2.REGULAR = "regular", t2))(Er || {});
21623
- Es = ((n2) => (n2.NONE = "none", n2.INITIALISED = "initialised", n2.STARTED = "started", n2.PAUSED = "paused", n2.RESUMED = "resumed", n2.STOPPED = "stopped", n2.FAILED = "failed", n2))(Es || {});
21624
- bs = ((t2) => (t2.DVR = "dvr", t2.NO_DVR = "no-dvr", t2))(bs || {});
21625
- Rs = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(Rs || {});
21622
+ br = ((t2) => (t2.SIP = "sip", t2.REGULAR = "regular", t2))(br || {});
21623
+ bs = ((n2) => (n2.NONE = "none", n2.INITIALISED = "initialised", n2.STARTED = "started", n2.PAUSED = "paused", n2.RESUMED = "resumed", n2.STOPPED = "stopped", n2.FAILED = "failed", n2))(bs || {});
21624
+ Rs = ((t2) => (t2.DVR = "dvr", t2.NO_DVR = "no-dvr", t2))(Rs || {});
21625
+ As = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(As || {});
21626
21626
  Is = ((r2) => (r2.INITIALISED = "initialised", r2.STARTED = "started", r2.STOPPED = "stopped", r2.FAILED = "failed", r2))(Is || {});
21627
- As = ((e) => (e.CAPTION = "caption", e))(As || {});
21627
+ Hs = ((e) => (e.CAPTION = "caption", e))(Hs || {});
21628
21628
  Be = { f: "high", h: "medium", q: "low" };
21629
- Hs = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Hs || {});
21630
- te = class {
21629
+ Cs = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Cs || {});
21630
+ ee = class {
21631
21631
  constructor() {
21632
21632
  this._volume = 1;
21633
21633
  this._codec = "opus";
@@ -21734,7 +21734,7 @@ var init_dist = __esm({
21734
21734
  Le = class {
21735
21735
  constructor() {
21736
21736
  this._video = new Y2().build();
21737
- this._audio = new te().build();
21737
+ this._audio = new ee().build();
21738
21738
  this._screen = new Y2().build();
21739
21739
  this._simulcast = false;
21740
21740
  }
@@ -21767,8 +21767,8 @@ var init_dist = __esm({
21767
21767
  return this.audio && (e = m(m({}, this.audio.toAnalyticsProperties()), e)), this.video && (e = m(m({}, this.video.toAnalyticsProperties()), e)), e;
21768
21768
  }
21769
21769
  };
21770
- ce = class a3 extends Ie {
21771
- constructor(t2, i2, r2, s2, o2 = new te().build(), n2) {
21770
+ ce = class a3 extends Ae {
21771
+ constructor(t2, i2, r2, s2, o2 = new ee().build(), n2) {
21772
21772
  super(t2, i2, r2);
21773
21773
  this.eventBus = s2;
21774
21774
  this.TAG = "[HMSLocalAudioTrack]";
@@ -21784,17 +21784,17 @@ var init_dist = __esm({
21784
21784
  yield this.transceiver.sender.replaceTrack(this.processedTrack || this.nativeTrack);
21785
21785
  });
21786
21786
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
21787
- let i3 = this.stream, r3 = Ls(t3, this.settings);
21787
+ let i3 = this.stream, r3 = Ds(t3, this.settings);
21788
21788
  (r3("maxBitrate") || r3("audioMode")) && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this, t3)), (r3("advanced") || r3("audioMode")) && (yield this.replaceTrackWith(t3));
21789
21789
  });
21790
21790
  this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
21791
- if (Ls(t3, this.settings)("deviceId")) {
21791
+ if (Ds(t3, this.settings)("deviceId")) {
21792
21792
  this.manuallySelectedDeviceId = i3 ? this.manuallySelectedDeviceId : t3.deviceId, d2.d(this.TAG, "device change", "manual selection:", this.manuallySelectedDeviceId, "new device:", t3.deviceId), yield this.replaceTrackWith(t3);
21793
21793
  let s3 = this.nativeTrack.getSettings().groupId;
21794
21794
  !i3 && t3.deviceId && (z2.updateSelection("audioInput", { deviceId: t3.deviceId, groupId: s3 }), this.eventBus.deviceChange.publish({ isUserSelection: true, type: "audioInput", selection: { deviceId: t3.deviceId, groupId: s3 } }));
21795
21795
  }
21796
21796
  });
21797
- 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), gr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21797
+ 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);
21798
21798
  }
21799
21799
  getManuallySelectedDeviceId() {
21800
21800
  return this.manuallySelectedDeviceId;
@@ -21808,7 +21808,7 @@ var init_dist = __esm({
21808
21808
  i2 == null || i2.stop();
21809
21809
  let r2 = !!this.audioLevelMonitor;
21810
21810
  try {
21811
- let s2 = yield Ms(t2);
21811
+ let s2 = yield ys(t2);
21812
21812
  s2.enabled = this.enabled, d2.d(this.TAG, "replaceTrack, Previous track stopped", i2, "newTrack", s2), yield this.stream.replaceStreamTrack(i2, s2), this.nativeTrack = s2, yield this.replaceSenderTrack(), r2 && this.initAudioLevelMonitor();
21813
21813
  } catch (s2) {
21814
21814
  throw this.isPublished && this.eventBus.analytics.publish(y2.publish({ error: s2 })), s2;
@@ -21869,7 +21869,7 @@ var init_dist = __esm({
21869
21869
  cleanup() {
21870
21870
  return c2(this, null, function* () {
21871
21871
  var t2;
21872
- Q2(a3.prototype, this, "cleanup").call(this), yield this.pluginsManager.cleanup(), yield this.pluginsManager.closeContext(), this.transceiver = void 0, (t2 = this.processedTrack) == null || t2.stop(), this.isPublished = false, this.destroyAudioLevelMonitor(), gr() && O2 && document.removeEventListener("visibilitychange", this.handleVisibilityChange);
21872
+ Q2(a3.prototype, this, "cleanup").call(this), yield this.pluginsManager.cleanup(), yield this.pluginsManager.closeContext(), this.transceiver = void 0, (t2 = this.processedTrack) == null || t2.stop(), this.isPublished = false, this.destroyAudioLevelMonitor(), Tr() && O2 && document.removeEventListener("visibilitychange", this.handleVisibilityChange);
21873
21873
  });
21874
21874
  }
21875
21875
  getTrackIDBeingSent() {
@@ -21883,7 +21883,7 @@ var init_dist = __esm({
21883
21883
  return new Ve(i2, r2, s2, o2, n2, l2);
21884
21884
  }
21885
21885
  };
21886
- ae = class a4 extends Ie {
21886
+ se = class a4 extends Ae {
21887
21887
  setEnabled(e) {
21888
21888
  return c2(this, null, function* () {
21889
21889
  e !== this.enabled && (yield Q2(a4.prototype, this, "setEnabled").call(this, e), yield this.subscribeToAudio(e));
@@ -21949,8 +21949,8 @@ var init_dist = __esm({
21949
21949
  }
21950
21950
  };
21951
21951
  Mt = { none: -1, low: 0, medium: 1, high: 2 };
21952
- go = 0.5;
21953
- Ds = (a11, e) => {
21952
+ To = 0.5;
21953
+ ws = (a11, e) => {
21954
21954
  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);
21955
21955
  for (let o2 = 0; o2 < r2.length; o2++) {
21956
21956
  let { resolution: n2, layer: l2 } = r2[o2], u2 = n2[i2];
@@ -21959,7 +21959,7 @@ var init_dist = __esm({
21959
21959
  break;
21960
21960
  } else {
21961
21961
  let p2 = r2[o2 + 1], h2 = p2 ? p2.resolution[i2] : Number.POSITIVE_INFINITY;
21962
- if ((s2 - u2) / (h2 - u2) < go) {
21962
+ if ((s2 - u2) / (h2 - u2) < To) {
21963
21963
  t2 = l2;
21964
21964
  break;
21965
21965
  }
@@ -21967,7 +21967,7 @@ var init_dist = __esm({
21967
21967
  }
21968
21968
  return t2;
21969
21969
  };
21970
- br = class {
21970
+ Rr = class {
21971
21971
  constructor() {
21972
21972
  this.TAG = "[HMSIntersectionObserverWrapper]";
21973
21973
  this.listeners = /* @__PURE__ */ new WeakMap();
@@ -21994,8 +21994,8 @@ var init_dist = __esm({
21994
21994
  return e || d2.w(this.TAG, "IntersectionObserver is not supported, fallback will be used instead"), e;
21995
21995
  }
21996
21996
  };
21997
- ws = new br();
21998
- Rr = class {
21997
+ _s = new Rr();
21998
+ Ar = class {
21999
21999
  constructor() {
22000
22000
  this.TAG = "[HMSResizeObserverWrapper]";
22001
22001
  this.listeners = /* @__PURE__ */ new WeakMap();
@@ -22022,7 +22022,7 @@ var init_dist = __esm({
22022
22022
  return e || d2.w(this.TAG, "Resize Observer is not supported"), e;
22023
22023
  }
22024
22024
  };
22025
- _s = new Rr();
22025
+ Ns = new Ar();
22026
22026
  Xe = class {
22027
22027
  constructor(e) {
22028
22028
  this.track = e;
@@ -22066,7 +22066,7 @@ var init_dist = __esm({
22066
22066
  return Array.from(this.videoElements);
22067
22067
  }
22068
22068
  init() {
22069
- O2 && (this.resizeObserver = _s, this.intersectionObserver = ws);
22069
+ O2 && (this.resizeObserver = Ns, this.intersectionObserver = _s);
22070
22070
  }
22071
22071
  isElementInViewport(e) {
22072
22072
  let t2 = e.offsetTop, i2 = e.offsetLeft, r2 = e.offsetWidth, s2 = e.offsetHeight, { hidden: o2 } = e, { opacity: n2, display: l2 } = getComputedStyle(e);
@@ -22086,7 +22086,7 @@ var init_dist = __esm({
22086
22086
  let { width: r2, height: s2 } = i2;
22087
22087
  if (r2 === 0 || s2 === 0)
22088
22088
  continue;
22089
- let o2 = Ds(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
22089
+ let o2 = ws(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
22090
22090
  e ? e = Mt[o2] > Mt[e] ? o2 : e : e = o2;
22091
22091
  }
22092
22092
  e && (d2.d(this.TAG, `selecting max layer ${e} for the track`, `${this.track}`), yield this.track.setPreferredLayer(e));
@@ -22094,7 +22094,7 @@ var init_dist = __esm({
22094
22094
  }
22095
22095
  };
22096
22096
  Ir = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ir || {});
22097
- Ar = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Ar || {});
22097
+ Hr = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Hr || {});
22098
22098
  yt = class {
22099
22099
  constructor() {
22100
22100
  this.total = 0;
@@ -22174,16 +22174,16 @@ var init_dist = __esm({
22174
22174
  delete this.addedTimestamps[e], delete this.initTime[e], delete this.processingAvgs[e], delete this.pluginAdded[e], delete this.pluginInputFrameRate[e], delete this.pluginFrameRate[e];
22175
22175
  }
22176
22176
  };
22177
- Ns = 24;
22178
- fo = 320;
22179
- vo = 240;
22177
+ Os = 24;
22178
+ vo = 320;
22179
+ Mo = 240;
22180
22180
  kt = class {
22181
22181
  constructor(e, t2) {
22182
22182
  this.TAG = "[VideoPluginsManager]";
22183
22183
  this.pluginsLoopRunning = false;
22184
22184
  this.pluginsLoopState = "paused";
22185
22185
  this.pluginAddInProgress = false;
22186
- this.reusableWorker = Ps();
22186
+ this.reusableWorker = Es();
22187
22187
  this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.pluginNumFramesToSkip = {}, this.pluginNumFramesSkipped = {}, this.analytics = new Ze(t2), this.canvases = new Array();
22188
22188
  }
22189
22189
  getPlugins() {
@@ -22221,7 +22221,7 @@ var init_dist = __esm({
22221
22221
  d2.w(this.TAG, `plugin - ${e.getName()} already added.`);
22222
22222
  return;
22223
22223
  }
22224
- let r2 = this.hmsTrack.getMediaTrackSettings().frameRate || Ns, s2 = 0;
22224
+ let r2 = this.hmsTrack.getMediaTrackSettings().frameRate || Os, s2 = 0;
22225
22225
  t2 && t2 > 0 ? (d2.i(this.TAG, `adding plugin ${e.getName()} with framerate ${t2}`), t2 < r2 && (s2 = Math.ceil(r2 / t2) - 1), this.analytics.added(i2, r2, t2)) : (d2.i(this.TAG, `adding plugin ${e.getName()}`), this.analytics.added(i2, r2)), d2.i(this.TAG, "numFrames to skip processing", s2), this.pluginNumFramesToSkip[i2] = s2, this.pluginNumFramesSkipped[i2] = s2, this.validateAndThrow(i2, e);
22226
22226
  try {
22227
22227
  if (yield this.analytics.initWithTime(i2, () => c2(this, null, function* () {
@@ -22309,7 +22309,7 @@ var init_dist = __esm({
22309
22309
  pluginsLoop() {
22310
22310
  return c2(this, null, function* () {
22311
22311
  for (; this.pluginsLoopRunning; ) {
22312
- let e = this.hmsTrack.getMediaTrackSettings().frameRate || Ns, t2 = Math.floor(1e3 / e);
22312
+ let e = this.hmsTrack.getMediaTrackSettings().frameRate || Os, t2 = Math.floor(1e3 / e);
22313
22313
  if (!this.hmsTrack.enabled || this.hmsTrack.nativeTrack.readyState === "ended") {
22314
22314
  this.pluginsLoopState === "running" && this.resetCanvases(), this.pluginsLoopState = "paused", yield this.reusableWorker.sleep(t2);
22315
22315
  continue;
@@ -22385,7 +22385,7 @@ var init_dist = __esm({
22385
22385
  return c2(this, null, function* () {
22386
22386
  if (!this.inputCanvas || !this.inputVideo)
22387
22387
  return;
22388
- let { width: e = fo, height: t2 = vo } = this.hmsTrack.getMediaTrackSettings();
22388
+ let { width: e = vo, height: t2 = Mo } = this.hmsTrack.getMediaTrackSettings();
22389
22389
  this.inputCanvas.height !== t2 && (this.inputCanvas.height = t2), this.inputCanvas.width !== e && (this.inputCanvas.width = e), this.inputCanvas.getContext("2d").drawImage(this.inputVideo, 0, 0, e, t2);
22390
22390
  });
22391
22391
  }
@@ -22444,7 +22444,7 @@ var init_dist = __esm({
22444
22444
  return Array.from(this.plugins).map((e) => e.getName());
22445
22445
  }
22446
22446
  };
22447
- Mo = ["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"];
22447
+ 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"];
22448
22448
  di = class {
22449
22449
  constructor() {
22450
22450
  this.eventPerformanceMeasures = {};
@@ -22465,13 +22465,13 @@ var init_dist = __esm({
22465
22465
  return (t2 = this.eventPerformanceMeasures[e]) == null ? void 0 : t2.duration;
22466
22466
  }
22467
22467
  getTimes(...e) {
22468
- return [...Mo, ...e].reduce((t2, i2) => M2(m({}, t2), { [i2]: this.getTimeTaken(i2) }), {});
22468
+ return [...yo, ...e].reduce((t2, i2) => M2(m({}, t2), { [i2]: this.getTimeTaken(i2) }), {});
22469
22469
  }
22470
22470
  cleanup() {
22471
22471
  this.eventPerformanceMeasures = {};
22472
22472
  }
22473
22473
  };
22474
- Hr = { isAudioMuted: false, isVideoMuted: false, audioInputDeviceId: "default", audioOutputDeviceId: "default", videoDeviceId: "default" };
22474
+ Cr = { isAudioMuted: false, isVideoMuted: false, audioInputDeviceId: "default", audioOutputDeviceId: "default", videoDeviceId: "default" };
22475
22475
  ve = class a5 {
22476
22476
  constructor(e, t2, i2, r2, s2) {
22477
22477
  this.store = e;
@@ -22483,7 +22483,7 @@ var init_dist = __esm({
22483
22483
  this.setScreenCaptureHandleConfig();
22484
22484
  }
22485
22485
  getTracksToPublish() {
22486
- return c2(this, arguments, function* (e = Hr) {
22486
+ return c2(this, arguments, function* (e = Cr) {
22487
22487
  var T, g2, v2, E2;
22488
22488
  let t2 = this.getAVTrackSettings(e);
22489
22489
  if (!t2)
@@ -22495,8 +22495,8 @@ var init_dist = __esm({
22495
22495
  h2.audio && ((T = this.analyticsTimer) == null || T.start("local_audio_track_time")), h2.video && ((g2 = this.analyticsTimer) == null || g2.start("local_video_track_time"));
22496
22496
  try {
22497
22497
  d2.d(this.TAG, "Init Local Tracks", { fetchTrackOptions: h2 }), s2 = yield this.getLocalTracks(h2, t2, l2);
22498
- } catch (P8) {
22499
- s2 = yield this.retryGetLocalTracks(P8, t2, h2, l2);
22498
+ } catch (k2) {
22499
+ s2 = yield this.retryGetLocalTracks(k2, t2, h2, l2);
22500
22500
  }
22501
22501
  return h2.audio && ((v2 = this.analyticsTimer) == null || v2.end("local_audio_track_time")), h2.video && ((E2 = this.analyticsTimer) == null || E2.end("local_video_track_time")), o2 && r2 && !u2 && s2.push(o2), n2 && i2 && !p2 && s2.push(n2), s2;
22502
22502
  });
@@ -22529,8 +22529,8 @@ var init_dist = __esm({
22529
22529
  r2.srcObject = e, r2.addEventListener("loadedmetadata", () => c2(this, null, function* () {
22530
22530
  let { videoWidth: l2, videoHeight: u2 } = r2, p2 = i2.screen, h2 = p2.width * p2.height, T = l2 / u2, g2 = p2.width / p2.height;
22531
22531
  if (T > g2) {
22532
- let v2 = t2.video, E2 = T / g2, P8 = Math.sqrt(E2);
22533
- l2 * u2 > h2 ? (v2.width = l2 / P8, v2.height = u2 / P8) : (v2.height = u2 * P8, v2.width = l2 * P8), yield e.getVideoTracks()[0].applyConstraints(v2);
22532
+ let v2 = t2.video, E2 = T / g2, k2 = Math.sqrt(E2);
22533
+ l2 * u2 > h2 ? (v2.width = l2 / k2, v2.height = u2 / k2) : (v2.height = u2 * k2, v2.width = l2 * k2), yield e.getVideoTracks()[0].applyConstraints(v2);
22534
22534
  }
22535
22535
  }));
22536
22536
  });
@@ -22598,7 +22598,7 @@ var init_dist = __esm({
22598
22598
  return o2.enabled = false, o2;
22599
22599
  }
22600
22600
  static getEmptyAudioTrack() {
22601
- let e = Ae.getAudioContext(), t2 = e.createOscillator(), i2 = e.createMediaStreamDestination();
22601
+ let e = Ie.getAudioContext(), t2 = e.createOscillator(), i2 = e.createMediaStreamDestination();
22602
22602
  t2.connect(i2), t2.start();
22603
22603
  let r2 = i2.stream.getAudioTracks()[0];
22604
22604
  return r2.enabled = false, r2;
@@ -22633,7 +22633,7 @@ var init_dist = __esm({
22633
22633
  return c2(this, null, function* () {
22634
22634
  if (e instanceof f2 && e.action === "TRACK") {
22635
22635
  this.observer.onFailure(e);
22636
- let s2 = e.code === k2.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
22636
+ let s2 = e.code === P4.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
22637
22637
  if (s2) {
22638
22638
  let l2 = new Le().video(new Fe()).audio(new Ve()).build();
22639
22639
  d2.w(this.TAG, "Fetch AV Tracks failed with overconstrained error", { fetchTrackOptions: i2 }, { error: e });
@@ -22679,7 +22679,7 @@ var init_dist = __esm({
22679
22679
  if (!t2 || !((o2 = t2.allowed) != null && o2.includes("audio")))
22680
22680
  return null;
22681
22681
  let i2 = this.store.getLocalPeer(), r2 = i2 == null ? void 0 : i2.audioTrack, s2 = (r2 == null ? void 0 : r2.settings.deviceId) || e.audioInputDeviceId;
22682
- return new te().codec(t2.audio.codec).maxBitrate(t2.audio.bitRate).deviceId(s2 || Hr.audioInputDeviceId).build();
22682
+ return new ee().codec(t2.audio.codec).maxBitrate(t2.audio.bitRate).deviceId(s2 || Cr.audioInputDeviceId).build();
22683
22683
  }
22684
22684
  getVideoSettings(e) {
22685
22685
  var n2;
@@ -22687,7 +22687,7 @@ var init_dist = __esm({
22687
22687
  if (!t2 || !((n2 = t2.allowed) != null && n2.includes("video")))
22688
22688
  return null;
22689
22689
  let i2 = this.store.getLocalPeer(), r2 = i2 == null ? void 0 : i2.videoTrack, s2 = (r2 == null ? void 0 : r2.settings.deviceId) || e.videoDeviceId, o2 = t2.video;
22690
- return new Y2().codec(o2.codec).maxBitrate(o2.bitRate).maxFramerate(o2.frameRate).setWidth(o2.width).setHeight(o2.height).deviceId(s2 || Hr.videoDeviceId).build();
22690
+ return new Y2().codec(o2.codec).maxBitrate(o2.bitRate).maxFramerate(o2.frameRate).setWidth(o2.width).setHeight(o2.height).deviceId(s2 || Cr.videoDeviceId).build();
22691
22691
  }
22692
22692
  getScreenshareSettings(e = false) {
22693
22693
  var r2;
@@ -22695,7 +22695,7 @@ var init_dist = __esm({
22695
22695
  if (!t2 || !((r2 = t2.allowed) != null && r2.includes("screen")))
22696
22696
  return null;
22697
22697
  let i2 = t2.screen;
22698
- return { video: new Y2().maxBitrate(i2.bitRate, false).codec(i2.codec).maxFramerate(i2.frameRate).setWidth(i2.width).setHeight(i2.height).build(), audio: e ? void 0 : new te().build() };
22698
+ return { video: new Y2().maxBitrate(i2.bitRate, false).codec(i2.codec).maxFramerate(i2.frameRate).setWidth(i2.width).setHeight(i2.height).build(), audio: e ? void 0 : new ee().build() };
22699
22699
  }
22700
22700
  getOrDefaultScreenshareConfig(e) {
22701
22701
  return c2(this, null, function* () {
@@ -22740,7 +22740,7 @@ var init_dist = __esm({
22740
22740
  return new Fe(i3, r3, s3, o3, l2, u2, n3, p2);
22741
22741
  };
22742
22742
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
22743
- let i3 = this.stream, r3 = Os(t3, this.settings);
22743
+ let i3 = this.stream, r3 = xs(t3, this.settings);
22744
22744
  if (r3("maxBitrate") && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this)), r3("width") || r3("height") || r3("advanced"))
22745
22745
  if (this.source === "video") {
22746
22746
  let s3 = yield this.replaceTrackWith(t3);
@@ -22749,7 +22749,7 @@ var init_dist = __esm({
22749
22749
  yield this.nativeTrack.applyConstraints(t3.toConstraints());
22750
22750
  });
22751
22751
  this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
22752
- if (Os(t3, this.settings)("deviceId") && this.source === "regular") {
22752
+ if (xs(t3, this.settings)("deviceId") && this.source === "regular") {
22753
22753
  if (this.enabled) {
22754
22754
  delete t3.facingMode;
22755
22755
  let o3 = yield this.replaceTrackWith(t3);
@@ -22901,7 +22901,7 @@ var init_dist = __esm({
22901
22901
  let i2 = this.nativeTrack;
22902
22902
  i2 == null || i2.stop();
22903
22903
  try {
22904
- let r2 = yield ys(t2);
22904
+ let r2 = yield ks(t2);
22905
22905
  return d2.d(this.TAG, "replaceTrack, Previous track stopped", i2, "newTrack", r2), this.settings.deviceId === "default" && (this.settings = this.buildNewSettings({ deviceId: this.nativeTrack.getSettings().deviceId })), r2;
22906
22906
  } catch (r2) {
22907
22907
  throw this.isPublished && this.eventBus.analytics.publish(y2.publish({ error: r2 })), r2;
@@ -22923,24 +22923,24 @@ var init_dist = __esm({
22923
22923
  et = "renegotiation-callback-id";
22924
22924
  ui = "ion-sfu";
22925
22925
  tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
22926
- xs = "https://event.100ms.live/v2/client/report";
22927
- Us = "https://event-nonprod.100ms.live/v2/client/report";
22926
+ Us = "https://event.100ms.live/v2/client/report";
22927
+ Bs = "https://event-nonprod.100ms.live/v2/client/report";
22928
22928
  Pt = Math.pow(2, 31) - 1;
22929
22929
  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" };
22930
- Bs = "2.5";
22931
- Vs = "20240521";
22930
+ Vs = "2.5";
22931
+ Fs = "20240521";
22932
22932
  Me = "_handraise";
22933
- Lr = 1e3;
22934
- Dr = 64;
22935
- Fs = "https://whiteboard.100ms.live";
22936
- Gs = "https://whiteboard-qa.100ms.live";
22933
+ Dr = 1e3;
22934
+ wr = 64;
22935
+ Gs = "https://whiteboard.100ms.live";
22936
+ Ws = "https://whiteboard-qa.100ms.live";
22937
22937
  U2 = class a7 extends Ye {
22938
22938
  constructor(t2, i2, r2) {
22939
22939
  super(t2, i2, r2);
22940
22940
  this._degraded = false;
22941
22941
  this._degradedAt = null;
22942
22942
  this._layerDefinitions = [];
22943
- this.history = new wr();
22943
+ this.history = new _r();
22944
22944
  this.preferredLayer = "high";
22945
22945
  this.setVideoHandler(new Xe(this));
22946
22946
  }
@@ -23054,7 +23054,7 @@ var init_dist = __esm({
23054
23054
  return this.degraded && t2 === "none" ? true : r2 === t2 ? (d2.d(`[Remote Track] ${this.logIdentifier}`, `Not sending update, already on layer ${t2}, source=${i2}`), false) : true;
23055
23055
  }
23056
23056
  };
23057
- wr = class {
23057
+ _r = class {
23058
23058
  constructor() {
23059
23059
  this.history = [];
23060
23060
  }
@@ -23150,7 +23150,7 @@ var init_dist = __esm({
23150
23150
  return this.audio;
23151
23151
  }
23152
23152
  };
23153
- Ws = (a11, e, t2, i2) => c2(void 0, null, function* () {
23153
+ $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23154
23154
  var o2;
23155
23155
  let r2, s2 = {};
23156
23156
  if ((o2 = e.transceiver) != null && o2.sender.track) {
@@ -23172,8 +23172,8 @@ var init_dist = __esm({
23172
23172
  break;
23173
23173
  }
23174
23174
  }), Object.keys(m({}, l2)).forEach((p2) => {
23175
- var P8, w2;
23176
- let h2 = (P8 = l2[p2]) == null ? void 0 : P8.codecId, T = h2 ? n2[h2] : void 0, g2;
23175
+ var k2, w2;
23176
+ let h2 = (k2 = l2[p2]) == null ? void 0 : k2.codecId, T = h2 ? n2[h2] : void 0, g2;
23177
23177
  T && (g2 = T.substring(T.indexOf("/") + 1));
23178
23178
  let v2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), E2 = u2[v2.ssrc];
23179
23179
  s2[p2] = M2(m({}, v2), { bitrate: Et("bytesSent", v2, i2 == null ? void 0 : i2[p2]), packetsLost: E2 == null ? void 0 : E2.packetsLost, jitter: E2 == null ? void 0 : E2.jitter, roundTripTime: E2 == null ? void 0 : E2.roundTripTime, totalRoundTripTime: E2 == null ? void 0 : E2.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
@@ -23184,7 +23184,7 @@ var init_dist = __esm({
23184
23184
  return s2;
23185
23185
  }
23186
23186
  });
23187
- $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23187
+ Ks = (a11, e, t2, i2) => c2(void 0, null, function* () {
23188
23188
  var l2;
23189
23189
  let r2;
23190
23190
  try {
@@ -23192,10 +23192,10 @@ var init_dist = __esm({
23192
23192
  } catch (u2) {
23193
23193
  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);
23194
23194
  }
23195
- let s2 = Po(r2), o2 = Et("bytesReceived", s2, i2), n2 = _r("packetsLost", s2, i2);
23196
- return s2 != null && s2.remote && Object.assign(s2.remote, { packetsLostRate: _r("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 });
23195
+ let s2 = Eo(r2), o2 = Et("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
23196
+ 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 });
23197
23197
  });
23198
- Po = (a11) => {
23198
+ Eo = (a11) => {
23199
23199
  let e, t2, i2 = {};
23200
23200
  a11 == null || a11.forEach((o2) => {
23201
23201
  switch (o2.type) {
@@ -23218,11 +23218,11 @@ var init_dist = __esm({
23218
23218
  let r2 = e != null && e.codecId ? i2[e.codecId] : void 0, s2;
23219
23219
  return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
23220
23220
  };
23221
- Nr = (a11, e, t2) => {
23222
- let i2 = Eo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23221
+ Or = (a11, e, t2) => {
23222
+ let i2 = bo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23223
23223
  return i2 && Object.assign(i2, { bitrate: r2 });
23224
23224
  };
23225
- Eo = (a11) => {
23225
+ bo = (a11) => {
23226
23226
  let e;
23227
23227
  return a11 == null || a11.forEach((t2) => {
23228
23228
  t2.type === "transport" && (e = a11 == null ? void 0 : a11.get(t2.selectedCandidatePairId));
@@ -23230,19 +23230,19 @@ var init_dist = __esm({
23230
23230
  t2.type === "candidate-pair" && t2.selected && (e = t2);
23231
23231
  }), e;
23232
23232
  };
23233
- Ks = (a11) => {
23233
+ qs = (a11) => {
23234
23234
  let e = { packetsLost: 0, jitter: 0 };
23235
23235
  return a11 == null || a11.forEach((t2) => {
23236
23236
  t2.packetsLost && (e.packetsLost += t2.packetsLost), t2.jitter > e.jitter && (e.jitter = t2.jitter);
23237
23237
  }), e;
23238
23238
  };
23239
- qs = (a11, e) => Array.from(new Set(a11.concat(e)));
23240
- Et = (a11, e, t2) => _r(a11, e, t2) * 8;
23241
- _r = (a11, e, t2) => {
23239
+ js = (a11, e) => Array.from(new Set(a11.concat(e)));
23240
+ Et = (a11, e, t2) => Nr(a11, e, t2) * 8;
23241
+ Nr = (a11, e, t2) => {
23242
23242
  let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
23243
- return [e, t2, ee(i2), ee(r2)].every((o2) => !!o2) ? Or(i2, r2, e == null ? void 0 : e.timestamp, t2 == null ? void 0 : t2.timestamp) * 1e3 : 0;
23243
+ 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;
23244
23244
  };
23245
- Or = (a11, e, t2, i2) => ee(a11) && ee(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
23245
+ xr = (a11, e, t2, i2) => oe(a11) && oe(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
23246
23246
  pi = class {
23247
23247
  constructor(e, t2, i2) {
23248
23248
  this.getStats = e;
@@ -23264,36 +23264,36 @@ var init_dist = __esm({
23264
23264
  let e2 = this.getLocalPeerStats(), t3;
23265
23265
  try {
23266
23266
  t3 = yield (h2 = (p2 = this.getStats).publish) == null ? void 0 : h2.call(p2);
23267
- } catch (P8) {
23268
- this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("PUBLISH", P8.message))), d2.w(this.TAG, "Error in getting publish stats", P8);
23267
+ } catch (k2) {
23268
+ this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("PUBLISH", k2.message))), d2.w(this.TAG, "Error in getting publish stats", k2);
23269
23269
  }
23270
- let i3 = t3 && Nr("publish", t3, e2), r3;
23270
+ let i3 = t3 && Or("publish", t3, e2), r3;
23271
23271
  try {
23272
23272
  r3 = yield (g2 = (T = this.getStats).subscribe) == null ? void 0 : g2.call(T);
23273
- } catch (P8) {
23274
- this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", P8.message))), d2.w(this.TAG, "Error in getting subscribe stats", P8);
23273
+ } catch (k2) {
23274
+ this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", k2.message))), d2.w(this.TAG, "Error in getting subscribe stats", k2);
23275
23275
  }
23276
- let s2 = r3 && Nr("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = Ks(r3), l2 = Or(o2, (v2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : v2.packetsLost, s2 == null ? void 0 : s2.timestamp, (E2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : E2.timestamp), u2 = s2 && Object.assign(s2, { packetsLostRate: l2, jitter: n2, packetsLost: o2 });
23276
+ let s2 = r3 && Or("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = qs(r3), l2 = xr(o2, (v2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : v2.packetsLost, s2 == null ? void 0 : s2.timestamp, (E2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : E2.timestamp), u2 = s2 && Object.assign(s2, { packetsLostRate: l2, jitter: n2, packetsLost: o2 });
23277
23277
  this.peerStats[this.localPeerID] = { publish: i3, subscribe: u2 };
23278
23278
  });
23279
23279
  this.updateRemoteTrackStats = () => c2(this, null, function* () {
23280
23280
  var i3;
23281
- let e2 = Array.from(this.store.getTracksMap().values()).filter((r3) => r3 instanceof U2 || r3 instanceof ae), t3 = e2.map((r3) => r3.trackId);
23281
+ let e2 = Array.from(this.store.getTracksMap().values()).filter((r3) => r3 instanceof U2 || r3 instanceof se), t3 = e2.map((r3) => r3.trackId);
23282
23282
  Object.keys(this.remoteTrackStats).forEach((r3) => {
23283
23283
  t3.includes(r3) || delete this.remoteTrackStats[r3];
23284
23284
  });
23285
23285
  for (let r3 of e2) {
23286
- let s2 = r3.peerId && ((i3 = this.store.getPeerById(r3.peerId)) == null ? void 0 : i3.name), o2 = this.getRemoteTrackStats(r3.trackId), n2 = yield $s(this.eventBus, r3, s2, o2);
23286
+ let s2 = r3.peerId && ((i3 = this.store.getPeerById(r3.peerId)) == null ? void 0 : i3.name), o2 = this.getRemoteTrackStats(r3.trackId), n2 = yield Ks(this.eventBus, r3, s2, o2);
23287
23287
  n2 && (this.remoteTrackStats[r3.trackId] = n2);
23288
23288
  }
23289
23289
  });
23290
23290
  this.updateLocalTrackStats = () => c2(this, null, function* () {
23291
23291
  var i3;
23292
- let e2 = this.store.getLocalPeerTracks().reduce((r3, s2) => (r3[s2.getTrackIDBeingSent()] = s2, r3), {}), t3 = qs(Object.keys(this.localTrackStats), Object.keys(e2));
23292
+ let e2 = this.store.getLocalPeerTracks().reduce((r3, s2) => (r3[s2.getTrackIDBeingSent()] = s2, r3), {}), t3 = js(Object.keys(this.localTrackStats), Object.keys(e2));
23293
23293
  for (let r3 of t3) {
23294
23294
  let s2 = e2[r3];
23295
23295
  if (s2) {
23296
- let o2 = (i3 = this.store.getLocalPeer()) == null ? void 0 : i3.name, n2 = yield Ws(this.eventBus, s2, o2, this.localTrackStats[r3]);
23296
+ let o2 = (i3 = this.store.getLocalPeer()) == null ? void 0 : i3.name, n2 = yield $s(this.eventBus, s2, o2, this.localTrackStats[r3]);
23297
23297
  n2 && (this.localTrackStats[r3] = n2);
23298
23298
  } else
23299
23299
  delete this.localTrackStats[r3];
@@ -23863,33 +23863,33 @@ var init_dist = __esm({
23863
23863
  };
23864
23864
  B2 = (a11) => a11.room;
23865
23865
  Io = (a11) => a11.errors;
23866
- Gh = createSelector(Io, (a11) => a11.length === 0 ? null : a11.at(-1));
23867
- Wh = createSelector(B2, (a11) => a11.id);
23866
+ Wh = createSelector(Io, (a11) => a11.length === 0 ? null : a11.at(-1));
23867
+ $h = createSelector(B2, (a11) => a11.id);
23868
23868
  q2 = (a11) => a11.peers;
23869
23869
  fi = (a11) => a11.messages.byID;
23870
- js = (a11) => a11.messages.allIDs;
23870
+ Js = (a11) => a11.messages.allIDs;
23871
23871
  N2 = (a11) => a11.tracks;
23872
- Js = (a11) => a11.settings;
23873
- xr = (a11) => a11.appData;
23874
- Ao = (a11) => a11.speakers;
23872
+ Qs = (a11) => a11.settings;
23873
+ Ur = (a11) => a11.appData;
23874
+ Ho = (a11) => a11.speakers;
23875
23875
  we = createSelector([B2], (a11) => a11 && a11.isConnected);
23876
- qh = createSelector([we, B2], (a11, e) => a11 ? e.peerCount !== void 0 ? e.peerCount || 1 : e.peers.length : Math.max(e.peerCount !== void 0 ? e.peerCount : e.peers.length - 1, 0));
23877
- Ho = (a11) => a11.hideLocalPeer;
23878
- me = createSelector([B2, q2, Ho], (a11, e, t2) => t2 ? a11.peers.filter((i2) => a11.localPeer !== i2).map((i2) => e[i2]) : a11.peers.map((i2) => e[i2]));
23879
- Co = createSelector(N2, (a11) => Object.values(a11));
23880
- ie = createSelector(B2, q2, (a11, e) => e[a11.localPeer]);
23876
+ jh = createSelector([we, B2], (a11, e) => a11 ? e.peerCount !== void 0 ? e.peerCount || 1 : e.peers.length : Math.max(e.peerCount !== void 0 ? e.peerCount : e.peers.length - 1, 0));
23877
+ Co = (a11) => a11.hideLocalPeer;
23878
+ me = createSelector([B2, q2, Co], (a11, e, t2) => t2 ? a11.peers.filter((i2) => a11.localPeer !== i2).map((i2) => e[i2]) : a11.peers.map((i2) => e[i2]));
23879
+ Lo = createSelector(N2, (a11) => Object.values(a11));
23880
+ te = createSelector(B2, q2, (a11, e) => e[a11.localPeer]);
23881
23881
  ye = createSelector(B2, (a11) => a11.localPeer);
23882
- jh = createSelector(ie, (a11) => a11 == null ? void 0 : a11.name);
23883
- Jh = createSelector(ie, (a11) => a11 == null ? void 0 : a11.roleName);
23884
- oe = createSelector(ie, (a11) => a11 == null ? void 0 : a11.audioTrack);
23885
- X2 = createSelector(ie, (a11) => a11 == null ? void 0 : a11.videoTrack);
23886
- Lo = createSelector(ie, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
23887
- Qs = createSelector([oe, X2, Lo], (a11, e, t2) => {
23882
+ Jh = createSelector(te, (a11) => a11 == null ? void 0 : a11.name);
23883
+ Qh = createSelector(te, (a11) => a11 == null ? void 0 : a11.roleName);
23884
+ ae = createSelector(te, (a11) => a11 == null ? void 0 : a11.audioTrack);
23885
+ X2 = createSelector(te, (a11) => a11 == null ? void 0 : a11.videoTrack);
23886
+ Do = createSelector(te, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
23887
+ zs = createSelector([ae, X2, Do], (a11, e, t2) => {
23888
23888
  let i2 = t2 ? [...t2] : [];
23889
23889
  return a11 && i2.unshift(a11), e && i2.unshift(e), i2;
23890
23890
  });
23891
- Qh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
23892
- zh = createSelector(q2, Ao, (a11, e) => {
23891
+ zh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
23892
+ Yh = createSelector(q2, Ho, (a11, e) => {
23893
23893
  let t2 = Object.entries(e).sort((i2, r2) => {
23894
23894
  var n2, l2;
23895
23895
  let s2 = ((n2 = i2[1]) == null ? void 0 : n2.audioLevel) || 0;
@@ -23902,19 +23902,19 @@ var init_dist = __esm({
23902
23902
  }
23903
23903
  return null;
23904
23904
  });
23905
- Ur = (a11) => {
23906
- let e = ie(a11);
23905
+ Br = (a11) => {
23906
+ let e = te(a11);
23907
23907
  return qe(a11, e == null ? void 0 : e.videoTrack);
23908
23908
  };
23909
- zs = (a11) => {
23910
- let e = ie(a11);
23911
- return os(a11, e == null ? void 0 : e.videoTrack);
23909
+ Ys = (a11) => {
23910
+ let e = te(a11);
23911
+ return ns(a11, e == null ? void 0 : e.videoTrack);
23912
23912
  };
23913
- Br = createSelector(ie, N2, (a11, e) => {
23913
+ Vr = createSelector(te, N2, (a11, e) => {
23914
23914
  let { video: t2, audio: i2 } = xe(e, a11);
23915
23915
  return !!(t2 || i2);
23916
23916
  });
23917
- Do = createSelector(q2, N2, (a11, e) => {
23917
+ wo = createSelector(q2, N2, (a11, e) => {
23918
23918
  let t2;
23919
23919
  for (let i2 in a11) {
23920
23920
  let r2 = a11[i2], { video: s2, audio: o2 } = xe(e, r2);
@@ -23924,15 +23924,15 @@ var init_dist = __esm({
23924
23924
  }
23925
23925
  return t2;
23926
23926
  });
23927
- Xh = createSelector(Do, (a11) => !!a11);
23928
- Zh = createSelector(q2, N2, (a11, e) => {
23927
+ Zh = createSelector(wo, (a11) => !!a11);
23928
+ em = createSelector(q2, N2, (a11, e) => {
23929
23929
  for (let t2 in a11) {
23930
23930
  let i2 = a11[t2], { audio: r2, video: s2 } = xe(e, i2);
23931
23931
  if (!s2 && r2)
23932
23932
  return i2;
23933
23933
  }
23934
23934
  });
23935
- em = createSelector(q2, N2, (a11, e) => {
23935
+ tm = createSelector(q2, N2, (a11, e) => {
23936
23936
  let t2 = [], i2 = [];
23937
23937
  for (let r2 in a11) {
23938
23938
  let s2 = a11[r2], { video: o2, audio: n2 } = xe(e, s2);
@@ -23940,78 +23940,78 @@ var init_dist = __esm({
23940
23940
  }
23941
23941
  return t2.concat(i2);
23942
23942
  });
23943
- tm = createSelector(q2, N2, (a11, e) => {
23943
+ im = createSelector(q2, N2, (a11, e) => {
23944
23944
  for (let t2 in e) {
23945
23945
  let i2 = e[t2];
23946
23946
  if (mt(i2) && ht(i2) && i2.peerId)
23947
23947
  return a11[i2.peerId];
23948
23948
  }
23949
23949
  });
23950
- im = createSelector(q2, N2, (a11, e) => {
23950
+ rm = createSelector(q2, N2, (a11, e) => {
23951
23951
  for (let t2 in e) {
23952
23952
  let i2 = e[t2];
23953
23953
  if (ri(i2) && i2.peerId)
23954
23954
  return a11[i2.peerId];
23955
23955
  }
23956
23956
  });
23957
- rm = createSelector(Co, (a11) => a11.filter(as));
23958
- sm = createSelector(js, (a11) => a11.length);
23959
- am = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
23960
- It = createSelector(js, fi, (a11, e) => {
23957
+ sm = createSelector(Lo, (a11) => a11.filter(os));
23958
+ am = createSelector(Js, (a11) => a11.length);
23959
+ om = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
23960
+ At = createSelector(Js, fi, (a11, e) => {
23961
23961
  let t2 = [];
23962
23962
  return a11.forEach((i2) => {
23963
23963
  t2.push(e[i2]);
23964
23964
  }), t2;
23965
23965
  });
23966
- wo = createSelector(It, (a11) => a11.filter((e) => {
23966
+ _o = createSelector(At, (a11) => a11.filter((e) => {
23967
23967
  var t2;
23968
23968
  return !e.recipientPeer && !(e.recipientRoles && ((t2 = e.recipientRoles) == null ? void 0 : t2.length) > 0);
23969
23969
  }));
23970
- om = createSelector(wo, (a11) => a11.filter((e) => !e.read).length);
23971
- re = createSelector([B2], (a11) => a11 && a11.roomState);
23972
- Ys = createSelector(re, (a11) => a11 === "Preview");
23973
- nm = createSelector(B2, (a11) => a11.roomState !== "Disconnected");
23974
- cm = createSelector(B2, (a11) => !a11.transcriptions || a11.transcriptions.length <= 0 ? false : a11.transcriptions.some((e) => e.mode === "caption" && e.state === "started"));
23970
+ nm = createSelector(_o, (a11) => a11.filter((e) => !e.read).length);
23971
+ ie = createSelector([B2], (a11) => a11 && a11.roomState);
23972
+ Xs = createSelector(ie, (a11) => a11 === "Preview");
23973
+ cm = createSelector(B2, (a11) => a11.roomState !== "Disconnected");
23974
+ dm = createSelector(B2, (a11) => !a11.transcriptions || a11.transcriptions.length <= 0 ? false : a11.transcriptions.some((e) => e.mode === "caption" && e.state === "started"));
23975
23975
  Se = (a11) => a11.roles;
23976
- dm = createSelector([Se], (a11) => Object.keys(a11));
23977
- at = createSelector([ie, Se], (a11, e) => a11 != null && a11.roleName ? e[a11.roleName] : null);
23978
- _o = (a11) => {
23976
+ lm = createSelector([Se], (a11) => Object.keys(a11));
23977
+ at = createSelector([te, Se], (a11, e) => a11 != null && a11.roleName ? e[a11.roleName] : null);
23978
+ No = (a11) => {
23979
23979
  var e;
23980
23980
  return (e = a11.preview) == null ? void 0 : e.asRole;
23981
23981
  };
23982
- Xs = createSelector([_o, Se], (a11, e) => a11 ? e[a11] : null);
23983
- lm = createSelector([at], (a11) => {
23982
+ Zs = createSelector([No, Se], (a11, e) => a11 ? e[a11] : null);
23983
+ um = createSelector([at], (a11) => {
23984
23984
  var e;
23985
23985
  return (e = a11 == null ? void 0 : a11.subscribeParams) != null && e.subscribeToRoles ? a11.subscribeParams.subscribeToRoles.length > 0 : false;
23986
23986
  });
23987
- Zs = createSelector(at, (a11) => a11 == null ? void 0 : a11.permissions);
23988
- um = createSelector(B2, (a11) => a11.recording);
23989
- pm = createSelector(B2, (a11) => a11.rtmp);
23990
- hm = createSelector(B2, (a11) => a11.hls);
23991
- mm = createSelector(B2, (a11) => a11.transcriptions);
23992
- Sm = createSelector(B2, (a11) => a11.sessionId);
23993
- gm = createSelector(B2, (a11) => a11.startedAt);
23994
- Tm = createSelector(B2, (a11) => !!a11.isLargeRoom);
23995
- fm = createSelector(B2, (a11) => !!a11.isEffectsEnabled);
23996
- vm = createSelector(B2, (a11) => a11.effectsKey);
23997
- ea = (a11) => a11.polls;
23998
- Pm = createSelector(me, (a11) => a11.filter((e) => e.isHandRaised));
23999
- No = (a11) => a11.whiteboards;
24000
- Em = createSelector(No, (a11) => Object.values(a11)[0]);
24001
- ia = (a11 = "audio") => (e) => e.playlist[a11].list;
24002
- Vr = (a11 = "audio") => (e) => e.playlist[a11].selection;
24003
- ra = (a11 = "audio") => (e) => e.playlist[a11].progress;
24004
- sa = (a11 = "audio") => (e) => e.playlist[a11].currentTime;
24005
- aa = (a11 = "audio") => (e) => e.playlist[a11].playbackRate;
24006
- oa = (a11 = "audio") => (e) => e.playlist[a11].volume;
24007
- na = (a11 = "audio") => createSelector(ia(a11), (e) => Object.values(e));
24008
- ca = (a11 = "audio") => createSelector(ia(a11), Vr(a11), (e, t2) => {
23987
+ ea = createSelector(at, (a11) => a11 == null ? void 0 : a11.permissions);
23988
+ pm = createSelector(B2, (a11) => a11.recording);
23989
+ hm = createSelector(B2, (a11) => a11.rtmp);
23990
+ mm = createSelector(B2, (a11) => a11.hls);
23991
+ Sm = createSelector(B2, (a11) => a11.transcriptions);
23992
+ gm = createSelector(B2, (a11) => a11.sessionId);
23993
+ Tm = createSelector(B2, (a11) => a11.startedAt);
23994
+ fm = createSelector(B2, (a11) => !!a11.isLargeRoom);
23995
+ vm = createSelector(B2, (a11) => !!a11.isEffectsEnabled);
23996
+ Mm = createSelector(B2, (a11) => a11.effectsKey);
23997
+ ta = (a11) => a11.polls;
23998
+ Em = createSelector(me, (a11) => a11.filter((e) => e.isHandRaised));
23999
+ Oo = (a11) => a11.whiteboards;
24000
+ bm = createSelector(Oo, (a11) => Object.values(a11)[0]);
24001
+ ra = (a11 = "audio") => (e) => e.playlist[a11].list;
24002
+ Fr = (a11 = "audio") => (e) => e.playlist[a11].selection;
24003
+ sa = (a11 = "audio") => (e) => e.playlist[a11].progress;
24004
+ aa = (a11 = "audio") => (e) => e.playlist[a11].currentTime;
24005
+ oa = (a11 = "audio") => (e) => e.playlist[a11].playbackRate;
24006
+ na = (a11 = "audio") => (e) => e.playlist[a11].volume;
24007
+ ca = (a11 = "audio") => createSelector(ra(a11), (e) => Object.values(e));
24008
+ da = (a11 = "audio") => createSelector(ra(a11), Fr(a11), (e, t2) => {
24009
24009
  if (t2.id)
24010
24010
  return e[t2.id];
24011
24011
  });
24012
- da = { selection: Vr("audio"), progress: ra("audio"), currentTime: sa("audio"), playbackRate: aa("audio"), volume: oa("audio"), list: na("audio"), selectedItem: ca("audio") };
24013
- la = { selection: Vr("video"), progress: ra("video"), currentTime: sa("video"), playbackRate: aa("video"), volume: oa("video"), list: na("video"), selectedItem: ca("video") };
24014
- At = "HMS-Store:";
24012
+ la = { selection: Fr("audio"), progress: sa("audio"), currentTime: aa("audio"), playbackRate: oa("audio"), volume: na("audio"), list: ca("audio"), selectedItem: da("audio") };
24013
+ ua = { selection: Fr("video"), progress: sa("video"), currentTime: aa("video"), playbackRate: oa("video"), volume: na("video"), list: ca("video"), selectedItem: da("video") };
24014
+ It = "HMS-Store:";
24015
24015
  b2 = class {
24016
24016
  static v(e, ...t2) {
24017
24017
  this.log(0, e, ...t2);
@@ -24041,23 +24041,23 @@ var init_dist = __esm({
24041
24041
  if (!(this.level.valueOf() > e.valueOf()))
24042
24042
  switch (e) {
24043
24043
  case 0: {
24044
- console.log(At, ...t2);
24044
+ console.log(It, ...t2);
24045
24045
  break;
24046
24046
  }
24047
24047
  case 1: {
24048
- console.debug(At, ...t2);
24048
+ console.debug(It, ...t2);
24049
24049
  break;
24050
24050
  }
24051
24051
  case 2: {
24052
- console.info(At, ...t2);
24052
+ console.info(It, ...t2);
24053
24053
  break;
24054
24054
  }
24055
24055
  case 3: {
24056
- console.warn(At, ...t2);
24056
+ console.warn(It, ...t2);
24057
24057
  break;
24058
24058
  }
24059
24059
  case 6: {
24060
- console.error(At, ...t2);
24060
+ console.error(It, ...t2);
24061
24061
  break;
24062
24062
  }
24063
24063
  case 4: {
@@ -24078,127 +24078,127 @@ var init_dist = __esm({
24078
24078
  }
24079
24079
  };
24080
24080
  b2.level = 0;
24081
- Fr = (a11, e) => e;
24081
+ Gr = (a11, e) => e;
24082
24082
  Ht = (a11, e) => e;
24083
- ua = (a11, e) => e;
24084
- Oo = (a11, e) => e;
24083
+ pa = (a11, e) => e;
24085
24084
  xo = (a11, e) => e;
24086
- j2 = createSelector([q2, Fr], (a11, e) => e ? a11[e] : null);
24087
- Gr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
24088
- Uo = createSelector([N2, Ht], (a11, e) => {
24085
+ Uo = (a11, e) => e;
24086
+ j2 = createSelector([q2, Gr], (a11, e) => e ? a11[e] : null);
24087
+ Wr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
24088
+ Bo = createSelector([N2, Ht], (a11, e) => {
24089
24089
  if (!e)
24090
24090
  return null;
24091
24091
  let t2 = a11[e];
24092
24092
  return (t2 == null ? void 0 : t2.type) === "video" ? t2 : null;
24093
24093
  });
24094
- Bo = createSelector([N2, Ht], (a11, e) => {
24094
+ Vo = createSelector([N2, Ht], (a11, e) => {
24095
24095
  if (!e)
24096
24096
  return null;
24097
24097
  let t2 = a11[e];
24098
24098
  return (t2 == null ? void 0 : t2.type) === "audio" ? t2 : null;
24099
24099
  });
24100
- Vo = createSelector([N2, Ht], (a11, e) => {
24100
+ Fo = createSelector([N2, Ht], (a11, e) => {
24101
24101
  if (!e)
24102
24102
  return null;
24103
24103
  let t2 = a11[e];
24104
24104
  return (t2 == null ? void 0 : t2.type) === "audio" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
24105
24105
  });
24106
- Fo = createSelector([N2, Ht], (a11, e) => {
24106
+ Go = createSelector([N2, Ht], (a11, e) => {
24107
24107
  if (!e)
24108
24108
  return null;
24109
24109
  let t2 = a11[e];
24110
24110
  return (t2 == null ? void 0 : t2.type) === "video" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
24111
24111
  });
24112
- Go = createSelector([ea, xo], (a11, e) => e ? a11[e] : null);
24113
- Z2 = A2(j2);
24114
- Nm = A2(createSelector([xr, Oo], (a11, e) => {
24112
+ Wo = createSelector([ta, Uo], (a11, e) => e ? a11[e] : null);
24113
+ Z2 = I2(j2);
24114
+ Om = I2(createSelector([Ur, xo], (a11, e) => {
24115
24115
  if (a11)
24116
24116
  return e ? a11[e] : a11;
24117
24117
  }));
24118
- Um = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.name));
24119
- Bm = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.type));
24120
- vi = A2(Gr);
24121
- pa = A2(Uo);
24122
- Vm = A2(Bo);
24123
- Fm = A2(Vo);
24124
- Gm = A2(Fo);
24125
- Wo = A2((a11, e) => {
24118
+ Bm = I2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.name));
24119
+ Vm = I2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.type));
24120
+ vi = I2(Wr);
24121
+ ha = I2(Bo);
24122
+ Fm = I2(Vo);
24123
+ Gm = I2(Fo);
24124
+ Wm = I2(Go);
24125
+ $o = I2((a11, e) => {
24126
24126
  let t2 = j2(a11, e);
24127
24127
  if (t2 && t2.videoTrack && t2.videoTrack !== "")
24128
24128
  return a11.tracks[t2.videoTrack];
24129
24129
  });
24130
- $o = A2((a11, e) => {
24130
+ Ko = I2((a11, e) => {
24131
24131
  let t2 = j2(a11, e);
24132
24132
  if (t2 && t2.audioTrack && t2.audioTrack !== "")
24133
24133
  return a11.tracks[t2.audioTrack];
24134
24134
  });
24135
- $m = A2((a11, e) => {
24135
+ Km = I2((a11, e) => {
24136
24136
  let t2 = j2(a11, e);
24137
24137
  return (t2 == null ? void 0 : t2.auxiliaryTracks.map((i2) => a11.tracks[i2])) || [];
24138
24138
  });
24139
- ha = (a11, e) => e ? a11.speakers[e] : null;
24140
- Km = A2(createSelector(ha, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24141
- Ko = (a11, e) => {
24142
- let t2 = $o(e)(a11);
24143
- return ha(a11, t2 == null ? void 0 : t2.id);
24144
- };
24145
- qm = A2(createSelector(Ko, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24146
- jm = A2((a11, e) => {
24139
+ ma = (a11, e) => e ? a11.speakers[e] : null;
24140
+ qm = I2(createSelector(ma, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24141
+ qo = (a11, e) => {
24142
+ let t2 = Ko(e)(a11);
24143
+ return ma(a11, t2 == null ? void 0 : t2.id);
24144
+ };
24145
+ jm = I2(createSelector(qo, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24146
+ Jm = I2((a11, e) => {
24147
24147
  if (e)
24148
24148
  return a11.connectionQualities[e];
24149
24149
  });
24150
- Jm = A2((a11, e) => {
24150
+ Qm = I2((a11, e) => {
24151
24151
  let t2 = j2(a11, e);
24152
24152
  if (t2) {
24153
24153
  let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => pt(a11.tracks[r2]));
24154
24154
  return i2 ? a11.tracks[i2] : void 0;
24155
24155
  }
24156
24156
  });
24157
- Qm = A2(createSelector(N2, j2, (a11, e) => {
24157
+ zm = I2(createSelector(N2, j2, (a11, e) => {
24158
24158
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24159
24159
  let r2 = a11[i2];
24160
24160
  return mt(r2) && ht(r2);
24161
24161
  });
24162
24162
  return t2 ? a11[t2] : void 0;
24163
24163
  }));
24164
- zm = A2(createSelector(N2, j2, (a11, e) => {
24164
+ Ym = I2(createSelector(N2, j2, (a11, e) => {
24165
24165
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24166
24166
  let r2 = a11[i2];
24167
24167
  return mt(r2) && pt(r2);
24168
24168
  });
24169
24169
  return t2 ? a11[t2] : void 0;
24170
24170
  }));
24171
- Ym = A2(createSelector(N2, j2, (a11, e) => {
24171
+ Xm = I2(createSelector(N2, j2, (a11, e) => {
24172
24172
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24173
24173
  let r2 = a11[i2];
24174
24174
  return ri(r2) && pt(r2);
24175
24175
  });
24176
24176
  return t2 ? a11[t2] : void 0;
24177
24177
  }));
24178
- ma = A2(createSelector(N2, j2, (a11, e) => xe(a11, e)));
24179
- Sa = (a11) => createSelector(ma(a11), (e) => e.audio);
24180
- Zm = A2((a11, e) => {
24178
+ Sa = I2(createSelector(N2, j2, (a11, e) => xe(a11, e)));
24179
+ ga = (a11) => createSelector(Sa(a11), (e) => e.audio);
24180
+ eS = I2((a11, e) => {
24181
24181
  let t2 = j2(a11, e);
24182
24182
  return qe(a11, t2 == null ? void 0 : t2.audioTrack);
24183
24183
  });
24184
- eS = A2((a11, e) => {
24184
+ tS = I2((a11, e) => {
24185
24185
  let t2 = j2(a11, e);
24186
24186
  return qe(a11, t2 == null ? void 0 : t2.videoTrack);
24187
24187
  });
24188
- ga = A2((a11, e) => {
24188
+ Ta = I2((a11, e) => {
24189
24189
  if (e && a11.tracks[e])
24190
24190
  return a11.tracks[e].volume === 0;
24191
24191
  });
24192
- tS = A2((a11, e) => {
24192
+ iS = I2((a11, e) => {
24193
24193
  let t2 = j2(a11, e);
24194
- return ga(t2 == null ? void 0 : t2.audioTrack)(a11);
24194
+ return Ta(t2 == null ? void 0 : t2.audioTrack)(a11);
24195
24195
  });
24196
- iS = A2((a11, e) => {
24197
- let t2 = Sa(e)(a11);
24198
- return ga(t2 == null ? void 0 : t2.id)(a11);
24196
+ rS = I2((a11, e) => {
24197
+ let t2 = ga(e)(a11);
24198
+ return Ta(t2 == null ? void 0 : t2.id)(a11);
24199
24199
  });
24200
- Ta = A2((a11, e) => {
24201
- let t2 = Gr(a11, e);
24200
+ fa = I2((a11, e) => {
24201
+ let t2 = Wr(a11, e);
24202
24202
  if (t2) {
24203
24203
  if (t2.type !== "audio") {
24204
24204
  b2.w("Please pass audio track here");
@@ -24207,16 +24207,16 @@ var init_dist = __esm({
24207
24207
  return t2.volume;
24208
24208
  }
24209
24209
  });
24210
- rS = A2((a11, e) => {
24210
+ sS = I2((a11, e) => {
24211
24211
  let t2 = j2(a11, e);
24212
- return Ta(t2 == null ? void 0 : t2.audioTrack)(a11);
24212
+ return fa(t2 == null ? void 0 : t2.audioTrack)(a11);
24213
24213
  });
24214
- sS = A2((a11, e) => {
24215
- let t2 = Sa(e)(a11);
24216
- return Ta(t2 == null ? void 0 : t2.id)(a11);
24214
+ aS = I2((a11, e) => {
24215
+ let t2 = ga(e)(a11);
24216
+ return fa(t2 == null ? void 0 : t2.id)(a11);
24217
24217
  });
24218
- aS = A2((a11, e) => {
24219
- let t2 = Gr(a11, e);
24218
+ oS = I2((a11, e) => {
24219
+ let t2 = Wr(a11, e);
24220
24220
  if (t2) {
24221
24221
  if (t2.type !== "video") {
24222
24222
  b2.w("Please pass video track here");
@@ -24225,53 +24225,53 @@ var init_dist = __esm({
24225
24225
  return t2.layer;
24226
24226
  }
24227
24227
  });
24228
- fa = createSelector([It, ye, Fr], (a11, e, t2) => {
24228
+ va = createSelector([At, ye, Gr], (a11, e, t2) => {
24229
24229
  if (t2)
24230
24230
  return a11.filter((i2) => {
24231
24231
  var r2;
24232
24232
  return !i2.recipientPeer && !((r2 = i2.recipientRoles) != null && r2.length) || i2.sender && ![e, t2].includes(i2.sender) ? false : [e, t2].includes(i2.recipientPeer);
24233
24233
  });
24234
24234
  });
24235
- va = createSelector([It, ua], (a11, e) => {
24235
+ Ma = createSelector([At, pa], (a11, e) => {
24236
24236
  if (e)
24237
24237
  return a11.filter((t2) => {
24238
24238
  var i2, r2;
24239
24239
  return (i2 = t2.recipientRoles) != null && i2.length ? (r2 = t2.recipientRoles) == null ? void 0 : r2.includes(e) : false;
24240
24240
  });
24241
24241
  });
24242
- qo = createSelector(It, (a11) => a11.filter((e) => {
24242
+ jo = createSelector(At, (a11) => a11.filter((e) => {
24243
24243
  var t2;
24244
24244
  return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
24245
24245
  }));
24246
- jo = createSelector([va, ua], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24247
- Jo = createSelector([fa, Fr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24248
- oS = createSelector(qo, (a11) => a11.filter((e) => !e.read).length);
24249
- nS = A2(fa);
24250
- cS = A2(va);
24251
- dS = A2(jo);
24252
- lS = A2(Jo);
24253
- Ma = A2(Go);
24254
- kS = createSelector([q2, N2], (a11, e) => Object.values(a11).map((i2) => {
24246
+ Jo = createSelector([Ma, pa], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24247
+ Qo = createSelector([va, Gr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24248
+ nS = createSelector(jo, (a11) => a11.filter((e) => !e.read).length);
24249
+ cS = I2(va);
24250
+ dS = I2(Ma);
24251
+ lS = I2(Jo);
24252
+ uS = I2(Qo);
24253
+ ya = I2(Wo);
24254
+ PS = createSelector([q2, N2], (a11, e) => Object.values(a11).map((i2) => {
24255
24255
  var r2;
24256
24256
  return { peer: i2, isAudioEnabled: i2.audioTrack ? (r2 = e[i2.audioTrack]) == null ? void 0 : r2.enabled : false };
24257
24257
  }));
24258
- Qo = (a11) => a11.roleChangeRequests[0] || null;
24259
- PS = createSelector([Qo, q2, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
24260
- ES = createSelector([at], (a11) => St(a11));
24261
- bS = createSelector([Xs], (a11) => St(a11));
24262
- Yo = createSelector([X2, N2], (a11, e) => {
24258
+ zo = (a11) => a11.roleChangeRequests[0] || null;
24259
+ ES = createSelector([zo, q2, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
24260
+ bS = createSelector([at], (a11) => St(a11));
24261
+ RS = createSelector([Zs], (a11) => St(a11));
24262
+ Xo = createSelector([X2, N2], (a11, e) => {
24263
24263
  let t2 = null;
24264
24264
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24265
24265
  });
24266
- Xo = createSelector([oe, N2], (a11, e) => {
24266
+ Zo = createSelector([ae, N2], (a11, e) => {
24267
24267
  let t2 = null;
24268
24268
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24269
24269
  });
24270
24270
  yi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24271
24271
  Ct = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24272
24272
  ki = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24273
- ya = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24274
- Wr = "hmsNotification";
24273
+ ka = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24274
+ $r = "hmsNotification";
24275
24275
  Pi = class {
24276
24276
  constructor(e) {
24277
24277
  this.id = 0;
@@ -24284,11 +24284,11 @@ var init_dist = __esm({
24284
24284
  }
24285
24285
  e2(r2);
24286
24286
  };
24287
- return this.eventEmitter.addListener(Wr, i2), () => {
24288
- this.eventEmitter.removeListener(Wr, i2);
24287
+ return this.eventEmitter.addListener($r, i2), () => {
24288
+ this.eventEmitter.removeListener($r, i2);
24289
24289
  };
24290
24290
  };
24291
- this.store = e, this.eventEmitter = new import_eventemitter22.EventEmitter2({ maxListeners: Object.keys(Sr).length });
24291
+ this.store = e, this.eventEmitter = new import_eventemitter22.EventEmitter2({ maxListeners: Object.keys(gr).length });
24292
24292
  }
24293
24293
  sendPlaylistTrackEnded(e) {
24294
24294
  let t2 = this.createNotification("PLAYLIST_TRACK_ENDED", e, "info");
@@ -24349,18 +24349,18 @@ var init_dist = __esm({
24349
24349
  this.emitEvent(t2);
24350
24350
  }
24351
24351
  sendPollUpdate(e, t2) {
24352
- let i2 = ki[e], r2 = this.store.getState(Ma(t2));
24352
+ let i2 = ki[e], r2 = this.store.getState(ya(t2));
24353
24353
  if (i2) {
24354
24354
  let s2 = this.createNotification(i2, r2, "info");
24355
24355
  this.emitEvent(s2);
24356
24356
  }
24357
24357
  }
24358
24358
  sendTranscriptionUpdate(e) {
24359
- let t2 = this.createNotification(ya.TRANSCRIPTION_STATE_UPDATED, e, "info");
24359
+ let t2 = this.createNotification(ka.TRANSCRIPTION_STATE_UPDATED, e, "info");
24360
24360
  this.emitEvent(t2);
24361
24361
  }
24362
24362
  emitEvent(e) {
24363
- this.eventEmitter.emit(Wr, e);
24363
+ this.eventEmitter.emit($r, e);
24364
24364
  }
24365
24365
  createNotification(e, t2, i2, r2 = "") {
24366
24366
  return this.id++, { id: this.id, type: e, message: r2, data: t2, severity: i2 };
@@ -24393,35 +24393,35 @@ var init_dist = __esm({
24393
24393
  delete this.queuedUpdates[e], window && this.timers[e] && (window.clearTimeout(this.timers[e]), delete this.timers[e]);
24394
24394
  }
24395
24395
  };
24396
- Pa = (a11, e) => {
24396
+ Ea = (a11, e) => {
24397
24397
  let t2 = Lt(Object.keys(a11), Object.keys(e));
24398
24398
  for (let i2 of t2) {
24399
24399
  let r2 = a11[i2], s2 = e[i2];
24400
- $e(r2, s2) ? (se(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && se(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24400
+ $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] : bi(r2, s2) && (a11[i2] = s2);
24401
24401
  }
24402
24402
  };
24403
- Ea = (a11, e) => {
24403
+ ba = (a11, e) => {
24404
24404
  let t2 = Lt(Object.keys(a11), Object.keys(e));
24405
24405
  for (let i2 of t2) {
24406
24406
  let r2 = a11[i2], s2 = e[i2];
24407
- $e(r2, s2) ? (Kr(r2, s2), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24407
+ $e(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24408
24408
  }
24409
24409
  };
24410
- ba = (a11, e) => {
24410
+ Ra = (a11, e) => {
24411
24411
  let t2 = Lt(Object.keys(a11), Object.keys(e));
24412
24412
  for (let i2 of t2) {
24413
24413
  let r2 = a11[i2], s2 = e[i2];
24414
- $e(r2, s2) ? (r2.questions && se(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
24414
+ $e(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
24415
24415
  }
24416
24416
  };
24417
- $r = (a11, e) => {
24417
+ Kr = (a11, e) => {
24418
24418
  let t2 = Lt(Object.keys(a11), Object.keys(e));
24419
24419
  for (let i2 of t2) {
24420
24420
  let r2 = a11[i2], s2 = e[i2];
24421
- $e(r2, s2) ? Object.assign(r2, s2) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24421
+ $e(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24422
24422
  }
24423
24423
  };
24424
- Ra = (a11, e, t2) => {
24424
+ Aa = (a11, e, t2) => {
24425
24425
  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));
24426
24426
  for (let s2 of r2) {
24427
24427
  if (!i2[s2]) {
@@ -24431,13 +24431,13 @@ var init_dist = __esm({
24431
24431
  a11[s2] = i2[s2];
24432
24432
  }
24433
24433
  };
24434
- Kr = (a11, e) => {
24435
- a11.plugins && se(a11.plugins, e.plugins) && (e.plugins = a11.plugins), a11.type === "video" && a11.layerDefinitions && se(a11.layerDefinitions, e.layerDefinitions) && (e.layerDefinitions = a11.layerDefinitions);
24434
+ qr = (a11, e) => {
24435
+ 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);
24436
24436
  };
24437
24437
  $e = (a11, e) => a11 && e;
24438
- qr = (a11, e) => a11 && !e;
24438
+ jr = (a11, e) => a11 && !e;
24439
24439
  bi = (a11, e) => !a11 && e;
24440
- se = (a11, e) => {
24440
+ re = (a11, e) => {
24441
24441
  if (a11 === e || a11.length === 0 && (e == null ? void 0 : e.length) === 0)
24442
24442
  return true;
24443
24443
  if (!a11 || !e || a11.length !== e.length)
@@ -24466,7 +24466,7 @@ var init_dist = __esm({
24466
24466
  }
24467
24467
  static enrichTrack(e, t2) {
24468
24468
  let i2 = t2.getMediaTrackSettings();
24469
- t2 instanceof ae && (e.volume = t2.getVolume() || 0), a8.updateDeviceID(e, t2), a8.enrichLocalTrack(e, t2), e.type === "video" && (e.source === "screen" ? (e.displaySurface = i2.displaySurface, a8.enrichScreenTrack(e, t2)) : e.source === "regular" && (e.facingMode = i2.facingMode), e.height = i2.height, e.width = i2.width, a8.enrichVideoTrack(e, t2)), a8.enrichPluginsDetails(e, t2);
24469
+ t2 instanceof se && (e.volume = t2.getVolume() || 0), a8.updateDeviceID(e, t2), a8.enrichLocalTrack(e, t2), e.type === "video" && (e.source === "screen" ? (e.displaySurface = i2.displaySurface, a8.enrichScreenTrack(e, t2)) : e.source === "regular" && (e.facingMode = i2.facingMode), e.height = i2.height, e.width = i2.width, a8.enrichVideoTrack(e, t2)), a8.enrichPluginsDetails(e, t2);
24470
24470
  }
24471
24471
  static enrichLocalTrack(e, t2) {
24472
24472
  (t2 instanceof F || t2 instanceof ce) && (e.isPublished = t2.isPublished);
@@ -24476,7 +24476,7 @@ var init_dist = __esm({
24476
24476
  t2 instanceof F || t2 instanceof ce ? e.deviceID = t2.settings.deviceId : e.deviceID = (i2 = t2.getMediaTrackSettings()) == null ? void 0 : i2.deviceId;
24477
24477
  }
24478
24478
  static enrichVideoTrack(e, t2) {
24479
- t2 instanceof U2 && (e.layer = t2.getLayer(), e.preferredLayer = t2.getPreferredLayer(), e.degraded = t2.degraded), (t2 instanceof U2 || t2 instanceof F) && (se(t2.getSimulcastDefinitions(), e.layerDefinitions) || (e.layerDefinitions = t2.getSimulcastDefinitions()));
24479
+ t2 instanceof U2 && (e.layer = t2.getLayer(), e.preferredLayer = t2.getPreferredLayer(), e.degraded = t2.degraded), (t2 instanceof U2 || t2 instanceof F) && (re(t2.getSimulcastDefinitions(), e.layerDefinitions) || (e.layerDefinitions = t2.getSimulcastDefinitions()));
24480
24480
  }
24481
24481
  static enrichScreenTrack(e, t2) {
24482
24482
  var i2, r2;
@@ -24486,7 +24486,7 @@ var init_dist = __esm({
24486
24486
  }
24487
24487
  }
24488
24488
  static enrichPluginsDetails(e, t2) {
24489
- (t2 instanceof F || t2 instanceof ce) && (se(t2.getPlugins(), e.plugins) || (e.plugins = t2.getPlugins()));
24489
+ (t2 instanceof F || t2 instanceof ce) && (re(t2.getPlugins(), e.plugins) || (e.plugins = t2.getPlugins()));
24490
24490
  }
24491
24491
  static convertRoom(e, t2) {
24492
24492
  let { recording: i2, rtmp: r2, hls: s2, transcriptions: o2 } = a8.convertRecordingStreamingState(e.recording, e.rtmp, e.hls, e.transcriptions);
@@ -24550,7 +24550,7 @@ var init_dist = __esm({
24550
24550
  }
24551
24551
  pause() {
24552
24552
  return c2(this, null, function* () {
24553
- let e = this.type === "audio" ? da : la, t2 = this.store.getState(e.selection);
24553
+ let e = this.type === "audio" ? la : ua, t2 = this.store.getState(e.selection);
24554
24554
  if (!t2.id) {
24555
24555
  b2.w("No item is currently playing to pause");
24556
24556
  return;
@@ -24630,7 +24630,7 @@ var init_dist = __esm({
24630
24630
  });
24631
24631
  }
24632
24632
  };
24633
- Ii = class {
24633
+ Ai = class {
24634
24634
  constructor(e, t2) {
24635
24635
  this.intervalMs = 100, this.shouldMonitor = false, this.hasStarted = false, this.unsubs = [], this.analysers = {}, this.store = e, this.actions = t2;
24636
24636
  }
@@ -24707,16 +24707,36 @@ var init_dist = __esm({
24707
24707
  }
24708
24708
  };
24709
24709
  Ia = 2e4;
24710
- Aa = 1e4;
24710
+ Ha = 1e4;
24711
24711
  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 } };
24712
- Ha = "https://100ms.live/test-audio.wav";
24713
- en2 = (a11) => !!a11 && !isNaN(a11);
24712
+ Ca = "https://100ms.live/test-audio.wav";
24713
+ Ii = class {
24714
+ constructor() {
24715
+ this.networkScores = [];
24716
+ this.lastPushedAt = 0;
24717
+ }
24718
+ pushScore(e) {
24719
+ !e || e < 0 || (this.networkScores.length === 0 ? (this.networkScores.push(e), this.lastPushedAt = Date.now()) : this.addPendingCQSTillNow());
24720
+ }
24721
+ addPendingCQSTillNow() {
24722
+ if (this.networkScores.length > 0) {
24723
+ let e = (Date.now() - this.lastPushedAt) / 1e3;
24724
+ for (; e > 0; )
24725
+ this.networkScores.push(this.networkScores[this.networkScores.length - 1]), e -= 1;
24726
+ this.lastPushedAt = Date.now();
24727
+ }
24728
+ }
24729
+ getCQS() {
24730
+ return this.networkScores.reduce((e, t2) => e + t2, 0) / this.networkScores.length;
24731
+ }
24732
+ };
24733
+ tn2 = (a11) => !!a11 && !isNaN(a11);
24714
24734
  de = (a11) => a11[a11.length - 1];
24715
24735
  _e = (a11, e) => {
24716
- let t2 = a11.filter((i2) => en2(e(i2)));
24736
+ let t2 = a11.filter((i2) => tn2(e(i2)));
24717
24737
  return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
24718
24738
  };
24719
- Ai = class {
24739
+ Hi = class {
24720
24740
  constructor(e) {
24721
24741
  this.sdk = e;
24722
24742
  this.peerStatsList = [];
@@ -24727,22 +24747,22 @@ var init_dist = __esm({
24727
24747
  }
24728
24748
  handleStatsUpdate(e) {
24729
24749
  return c2(this, null, function* () {
24730
- var n2, l2, u2, p2, h2, T;
24750
+ var n2, l2, u2, p2, h2, T, g2, v2;
24731
24751
  let t2 = e.getLocalPeerStats();
24732
24752
  t2 && this.peerStatsList.push(t2);
24733
- let i2 = (l2 = (n2 = this.sdk.getLocalPeer()) == null ? void 0 : n2.audioTrack) == null ? void 0 : l2.trackId, r2 = (p2 = (u2 = this.sdk.getLocalPeer()) == null ? void 0 : u2.videoTrack) == null ? void 0 : p2.trackId, s2 = e.getLocalTrackStats();
24753
+ let i2 = (u2 = (l2 = (n2 = this.sdk.getLocalPeer()) == null ? void 0 : n2.audioTrack) == null ? void 0 : l2.nativeTrack) == null ? void 0 : u2.id, r2 = (T = (h2 = (p2 = this.sdk.getLocalPeer()) == null ? void 0 : p2.videoTrack) == null ? void 0 : h2.nativeTrack) == null ? void 0 : T.id, s2 = e.getLocalTrackStats();
24734
24754
  s2 && (i2 && this.localAudioTrackStatsList.push(s2[i2]), r2 && this.localVideoTrackStatsList.push(s2[r2]));
24735
- let o2 = yield (T = (h2 = this.sdk.getWebrtcInternals()) == null ? void 0 : h2.getSubscribePeerConnection()) == null ? void 0 : T.getStats();
24736
- o2 == null || o2.forEach((g2) => {
24737
- if (g2.type === "inbound-rtp") {
24738
- let v2 = g2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, E2 = Et("bytesReceived", g2, de(v2));
24739
- v2.push(M2(m({}, g2), { bitrate: E2 }));
24755
+ let o2 = yield (v2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : v2.getStats();
24756
+ o2 == null || o2.forEach((E2) => {
24757
+ if (E2.type === "inbound-rtp") {
24758
+ let k2 = E2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Et("bytesReceived", E2, de(k2));
24759
+ k2.push(M2(m({}, E2), { bitrate: w2 }));
24740
24760
  }
24741
24761
  });
24742
24762
  });
24743
24763
  }
24744
24764
  buildReport() {
24745
- var T, g2, v2, E2, P8, w2, Oe, Zt;
24765
+ var T, g2, v2, E2, k2, w2, Oe, Zt;
24746
24766
  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 = ((v2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : v2.packetsReceived) || 0, n2 = ((E2 = de(this.remoteVideoTrackStatsList)) == null ? void 0 : E2.packetsReceived) || 0, l2 = this.localAudioTrackStatsList.map((x2) => x2 ? _e(Object.values(x2), ($) => $.bitrate) : 0), u2 = this.localVideoTrackStatsList.map((x2) => x2 ? _e(Object.values(x2), ($) => $.bitrate) : 0), p2 = de(this.localAudioTrackStatsList), h2 = de(this.localVideoTrackStatsList);
24747
24767
  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: _e(this.peerStatsList, (x2) => {
24748
24768
  var $;
@@ -24750,11 +24770,11 @@ var init_dist = __esm({
24750
24770
  }), bitrateReceived: _e(this.peerStatsList, (x2) => {
24751
24771
  var $;
24752
24772
  return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
24753
- }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((P8 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : P8.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: _e(l2, (x2) => x2), bitrateReceived: _e(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: ((Zt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Zt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: _e(u2, (x2) => x2), bitrateReceived: _e(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24773
+ }) }, 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: _e(l2, (x2) => x2), bitrateReceived: _e(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: ((Zt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Zt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: _e(u2, (x2) => x2), bitrateReceived: _e(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24754
24774
  }
24755
24775
  };
24756
- tn2 = ((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))(tn2 || {});
24757
- Hi = class {
24776
+ 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 || {});
24777
+ Ci = class {
24758
24778
  constructor(e, t2, i2, r2) {
24759
24779
  this.sdk = e;
24760
24780
  this.sdkListener = t2;
@@ -24766,26 +24786,25 @@ var init_dist = __esm({
24766
24786
  this.isSubscribeICEConnected = false;
24767
24787
  this.gatheredPublishICECandidates = [];
24768
24788
  this.gatheredSubscribeICECandidates = [];
24769
- this.networkScores = [];
24770
24789
  this.errors = [];
24771
24790
  this.isAudioTrackCaptured = false;
24772
24791
  this.isVideoTrackCaptured = false;
24773
24792
  this.isAudioTrackPublished = false;
24774
24793
  this.isVideoTrackPublished = false;
24794
+ this.cqsCalculator = new Ii();
24775
24795
  this.timestamp = Date.now();
24776
24796
  this.onRoomUpdate = this.sdkListener.onRoomUpdate.bind(this.sdkListener);
24777
24797
  this.onPeerUpdate = this.sdkListener.onPeerUpdate.bind(this.sdkListener);
24778
24798
  this.onMessageReceived = this.sdkListener.onMessageReceived.bind(this.sdkListener);
24779
- this.onReconnecting = this.sdkListener.onReconnecting.bind(this.sdkListener);
24780
24799
  this.onReconnected = this.sdkListener.onReconnected.bind(this.sdkListener);
24781
24800
  this.onRoleChangeRequest = this.sdkListener.onRoleChangeRequest.bind(this.sdkListener);
24782
24801
  this.onRoleUpdate = this.sdkListener.onRoleUpdate.bind(this.sdkListener);
24783
24802
  this.onChangeTrackStateRequest = this.sdkListener.onChangeTrackStateRequest.bind(this.sdkListener);
24784
24803
  this.onChangeMultiTrackStateRequest = this.sdkListener.onChangeMultiTrackStateRequest.bind(this.sdkListener);
24785
24804
  this.onRemovedFromRoom = this.sdkListener.onRemovedFromRoom.bind(this.sdkListener);
24786
- this.onNetworkQuality = (Ca = this.sdkListener.onNetworkQuality) == null ? void 0 : Ca.bind(this.sdkListener);
24805
+ this.onNetworkQuality = (La = this.sdkListener.onNetworkQuality) == null ? void 0 : La.bind(this.sdkListener);
24787
24806
  this.onPreview = this.sdkListener.onPreview.bind(this.sdkListener);
24788
- this.onDeviceChange = (La = this.sdkListener.onDeviceChange) == null ? void 0 : La.bind(this.sdkListener);
24807
+ this.onDeviceChange = (Da = this.sdkListener.onDeviceChange) == null ? void 0 : Da.bind(this.sdkListener);
24789
24808
  this.onSessionStoreUpdate = this.sdkListener.onSessionStoreUpdate.bind(this.sdkListener);
24790
24809
  this.onPollsUpdate = this.sdkListener.onPollsUpdate.bind(this.sdkListener);
24791
24810
  this.onWhiteboardUpdate = this.sdkListener.onWhiteboardUpdate.bind(this.sdkListener);
@@ -24794,9 +24813,9 @@ var init_dist = __esm({
24794
24813
  var r3, s2;
24795
24814
  return i3.peerID === ((s2 = (r3 = this.sdk) == null ? void 0 : r3.store.getLocalPeer()) == null ? void 0 : s2.peerId);
24796
24815
  });
24797
- this.networkScores.push(ee(t3 == null ? void 0 : t3.downlinkQuality) ? t3.downlinkQuality : -1);
24816
+ this.cqsCalculator.pushScore(t3 == null ? void 0 : t3.downlinkQuality);
24798
24817
  };
24799
- this.statsCollector = new Ai(e), this.state = 0;
24818
+ this.statsCollector = new Hi(e), this.state = 0;
24800
24819
  }
24801
24820
  get state() {
24802
24821
  return this._state;
@@ -24857,12 +24876,16 @@ var init_dist = __esm({
24857
24876
  this.isVideoTrackCaptured && this.isAudioTrackCaptured && (this.state = 4);
24858
24877
  }
24859
24878
  }
24879
+ onReconnecting(e) {
24880
+ this.sdkListener.onReconnecting(e), this.cqsCalculator.addPendingCQSTillNow();
24881
+ }
24860
24882
  cleanupAndReport() {
24861
24883
  var e;
24862
24884
  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();
24863
24885
  }
24864
24886
  buildReport() {
24865
- let e = this.networkScores.reduce((i2, r2) => i2 + r2, 0) / this.networkScores.length, t2 = this.statsCollector.buildReport();
24887
+ this.cqsCalculator.addPendingCQSTillNow();
24888
+ let e = this.cqsCalculator.getCQS(), t2 = this.statsCollector.buildReport();
24866
24889
  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 } };
24867
24890
  }
24868
24891
  };
@@ -24875,7 +24898,7 @@ var init_dist = __esm({
24875
24898
  this.id = e;
24876
24899
  }
24877
24900
  };
24878
- Ci = (a11, e, t2) => c2(void 0, null, function* () {
24901
+ Li = (a11, e, t2) => c2(void 0, null, function* () {
24879
24902
  let r2 = Error("something went wrong during fetch");
24880
24903
  for (let s2 = 0; s2 < 4; s2++)
24881
24904
  try {
@@ -24892,7 +24915,7 @@ var init_dist = __esm({
24892
24915
  constructor(e, t2) {
24893
24916
  this.sdk = e;
24894
24917
  this.sdkListener = t2;
24895
- this.recordedAudio = Ha;
24918
+ this.recordedAudio = Ca;
24896
24919
  this.initSdkWithLocalPeer();
24897
24920
  }
24898
24921
  get localPeer() {
@@ -24925,7 +24948,7 @@ var init_dist = __esm({
24925
24948
  (t2 = (e = this.localPeer) == null ? void 0 : e.videoTrack) == null || t2.cleanup(), this.localPeer && (this.localPeer.videoTrack = void 0);
24926
24949
  }
24927
24950
  startMicCheck(r2, s2) {
24928
- return c2(this, arguments, function* (e, t2, i2 = Aa) {
24951
+ return c2(this, arguments, function* (e, t2, i2 = Ha) {
24929
24952
  var l2, u2, p2, h2;
24930
24953
  this.initSdkWithLocalPeer();
24931
24954
  let o2 = yield this.getLocalAudioTrack(e);
@@ -24955,17 +24978,22 @@ var init_dist = __esm({
24955
24978
  }
24956
24979
  startConnectivityCheck(e, t2, i2) {
24957
24980
  return c2(this, null, function* () {
24958
- var n2;
24981
+ var o2;
24959
24982
  if (!this.sdk)
24960
24983
  throw new Error("SDK not found");
24961
- let r2 = new Hi(this.sdk, this.sdkListener, e, t2), s2 = yield this.getAuthToken(i2), { roomId: o2 } = nt(s2);
24962
- (n2 = this.sdk) == null || n2.store.setRoom(new Ne(o2)), yield this.sdk.leave(), yield this.sdk.join({ authToken: s2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, r2), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate(l2) {
24963
- r2.handleConnectionQualityUpdate(l2);
24984
+ this.connectivityCheck = new Ci(this.sdk, this.sdkListener, e, t2);
24985
+ let r2 = yield this.getAuthToken(i2), { roomId: s2 } = nt(r2);
24986
+ yield this.sdk.leave(), (o2 = this.sdk) == null || o2.store.setRoom(new Ne(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) => {
24987
+ var l2;
24988
+ (l2 = this.connectivityCheck) == null || l2.handleConnectionQualityUpdate(n2);
24964
24989
  } });
24965
24990
  });
24966
24991
  }
24967
24992
  stopConnectivityCheck() {
24968
- return this.sdk.leave();
24993
+ return c2(this, null, function* () {
24994
+ var e;
24995
+ return (e = this.connectivityCheck) == null ? void 0 : e.cleanupAndReport();
24996
+ });
24969
24997
  }
24970
24998
  initSdkWithLocalPeer() {
24971
24999
  var i2, r2, s2;
@@ -24979,7 +25007,7 @@ var init_dist = __esm({
24979
25007
  return c2(this, null, function* () {
24980
25008
  let t2 = new URL("https://api-nonprod.100ms.live/v2/diagnostics/token");
24981
25009
  e && t2.searchParams.append("region", e);
24982
- 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();
25010
+ 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();
24983
25011
  if (!i2.ok)
24984
25012
  throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
24985
25013
  let { token: s2 } = r2;
@@ -24994,12 +25022,12 @@ var init_dist = __esm({
24994
25022
  if (!this.localPeer)
24995
25023
  return;
24996
25024
  this.localPeer.role = M2(m({}, ot), { publishParams: M2(m({}, ot.publishParams), { allowed: ["audio"] }) });
24997
- let t2 = new Le().audio(new te().deviceId(e || "default").build()).build(), i2 = yield (r2 = this.sdk) == null ? void 0 : r2.localTrackManager.getLocalTracks({ audio: true, video: false }, t2);
25025
+ let t2 = new Le().audio(new ee().deviceId(e || "default").build()).build(), i2 = yield (r2 = this.sdk) == null ? void 0 : r2.localTrackManager.getLocalTracks({ audio: true, video: false }, t2);
24998
25026
  return i2 == null ? void 0 : i2.find((s2) => s2.type === "audio");
24999
25027
  });
25000
25028
  }
25001
25029
  };
25002
- Li = class {
25030
+ Di = class {
25003
25031
  constructor(e, t2, i2) {
25004
25032
  this.isRoomJoinCalled = false;
25005
25033
  this.ignoredMessageTypes = [];
@@ -25025,7 +25053,7 @@ var init_dist = __esm({
25025
25053
  let s2 = _2.convertPeer(t3);
25026
25054
  this.setState((o2) => {
25027
25055
  let n2 = o2.peers[s2.id];
25028
- $e(n2, s2) && (se(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
25056
+ $e(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
25029
25057
  }, r2);
25030
25058
  }
25031
25059
  this.hmsNotifications.sendPeerUpdate(e2, i3);
@@ -25075,7 +25103,7 @@ var init_dist = __esm({
25075
25103
  b2.d("layer none will be ignored");
25076
25104
  return;
25077
25105
  }
25078
- if (((r2 = this.store.getState(pa(e))) == null ? void 0 : r2.preferredLayer) === t2) {
25106
+ if (((r2 = this.store.getState(ha(e))) == null ? void 0 : r2.preferredLayer) === t2) {
25079
25107
  b2.d(`preferred layer is already ${t2}`);
25080
25108
  return;
25081
25109
  }
@@ -25101,7 +25129,7 @@ var init_dist = __esm({
25101
25129
  }
25102
25130
  preview(e) {
25103
25131
  return c2(this, null, function* () {
25104
- let t2 = this.store.getState(re);
25132
+ let t2 = this.store.getState(ie);
25105
25133
  if (t2 === "Preview" || t2 === "Connecting") {
25106
25134
  this.logPossibleInconsistency("attempting to call preview while room is in preview/connecting");
25107
25135
  return;
@@ -25139,7 +25167,7 @@ var init_dist = __esm({
25139
25167
  return c2(this, null, function* () {
25140
25168
  let e = this.store.getState(we), t2 = true;
25141
25169
  e || (t2 = false, this.logPossibleInconsistency("room leave is called when no room is connected"));
25142
- let i2 = this.store.getState(re);
25170
+ let i2 = this.store.getState(ie);
25143
25171
  return this.setState((r2) => {
25144
25172
  r2.room.roomState = "Disconnecting";
25145
25173
  }, "leaving"), this.sdk.leave(t2).then(() => {
@@ -25173,7 +25201,7 @@ var init_dist = __esm({
25173
25201
  }
25174
25202
  setLocalAudioEnabled(e) {
25175
25203
  return c2(this, null, function* () {
25176
- let t2 = this.store.getState(oe);
25204
+ let t2 = this.store.getState(ae);
25177
25205
  t2 && (yield this.setEnabledTrack(t2, e));
25178
25206
  });
25179
25207
  }
@@ -25206,7 +25234,7 @@ var init_dist = __esm({
25206
25234
  }
25207
25235
  setAudioSettings(e) {
25208
25236
  return c2(this, null, function* () {
25209
- let t2 = this.store.getState(oe);
25237
+ let t2 = this.store.getState(ae);
25210
25238
  t2 && (yield this.setSDKLocalAudioTrackSettings(t2, e), this.syncRoomState("setAudioSettings"));
25211
25239
  });
25212
25240
  }
@@ -25270,7 +25298,7 @@ var init_dist = __esm({
25270
25298
  return new Promise((i2) => {
25271
25299
  let r2 = this.store.subscribe((s2) => c2(this, null, function* () {
25272
25300
  s2 && (yield this.attachVideoInternal(e, t2), r2(), i2());
25273
- }), Ur);
25301
+ }), Br);
25274
25302
  });
25275
25303
  yield this.attachVideoInternal(e, t2);
25276
25304
  });
@@ -25315,7 +25343,7 @@ var init_dist = __esm({
25315
25343
  let t2 = {};
25316
25344
  if (t2.isSupported = false, !e)
25317
25345
  return b2.w('no plugin passed in for checking support"'), t2.errMsg = 'no plugin passed in for checking support"', t2;
25318
- let i2 = this.store.getState(oe);
25346
+ let i2 = this.store.getState(ae);
25319
25347
  if (!i2)
25320
25348
  return b2.w("audio track not added to local peer yet"), t2.errMsg = "call this function only after local peer has audio track", t2;
25321
25349
  let r2 = this.getTrackById(i2);
@@ -25417,12 +25445,12 @@ var init_dist = __esm({
25417
25445
  }
25418
25446
  endRoom(e, t2) {
25419
25447
  return c2(this, null, function* () {
25420
- let i2 = this.store.getState(Zs);
25448
+ let i2 = this.store.getState(ea);
25421
25449
  if (!(i2 != null && i2.endRoom)) {
25422
25450
  b2.w("You are not allowed to perform this action - endRoom");
25423
25451
  return;
25424
25452
  }
25425
- let r2 = this.store.getState(re);
25453
+ let r2 = this.store.getState(ie);
25426
25454
  this.setState((s2) => {
25427
25455
  s2.room.roomState = "Disconnecting";
25428
25456
  }, "endingRoom");
@@ -25506,7 +25534,7 @@ var init_dist = __esm({
25506
25534
  return c2(this, null, function* () {
25507
25535
  if (typeof e == "string") {
25508
25536
  let i2 = this.getTrackById(e);
25509
- i2 && ka(i2) ? yield this.sdk.changeTrackState(i2, t2) : this.logPossibleInconsistency(`No remote track with ID ${e} found for change track state`);
25537
+ i2 && Pa(i2) ? yield this.sdk.changeTrackState(i2, t2) : this.logPossibleInconsistency(`No remote track with ID ${e} found for change track state`);
25510
25538
  } else
25511
25539
  Array.isArray(e) && e.forEach((i2) => this.setRemoteTrackEnabled(i2, t2));
25512
25540
  });
@@ -25536,7 +25564,7 @@ var init_dist = __esm({
25536
25564
  }
25537
25565
  enableBeamSpeakerLabelsLogging() {
25538
25566
  return c2(this, null, function* () {
25539
- this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ii(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25567
+ this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ai(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25540
25568
  });
25541
25569
  }
25542
25570
  initDiagnostics() {
@@ -25564,9 +25592,9 @@ var init_dist = __esm({
25564
25592
  let t2 = e.devices;
25565
25593
  if (!t2)
25566
25594
  return;
25567
- let i2 = this.store.getState(ie);
25595
+ let i2 = this.store.getState(te);
25568
25596
  if (this.setState((r2) => {
25569
- se(r2.devices.audioInput, t2.audioInput) || (r2.devices.audioInput = t2.audioInput), se(r2.devices.videoInput, t2.videoInput) || (r2.devices.videoInput = t2.videoInput), se(r2.devices.audioOutput, t2.audioOutput) || (r2.devices.audioOutput = t2.audioOutput);
25597
+ re(r2.devices.audioInput, t2.audioInput) || (r2.devices.audioInput = t2.audioInput), re(r2.devices.videoInput, t2.videoInput) || (r2.devices.videoInput = t2.videoInput), re(r2.devices.audioOutput, t2.audioOutput) || (r2.devices.audioOutput = t2.audioOutput);
25570
25598
  let s2 = this.sdk.getLocalPeer();
25571
25599
  i2 != null && i2.id && s2 && Object.assign(r2.settings, this.getMediaSettings(s2));
25572
25600
  }, "deviceChange"), e.selection) {
@@ -25599,7 +25627,7 @@ var init_dist = __esm({
25599
25627
  return M2(m({}, u2), { answer: u2.answer ? m({}, u2.answer) : void 0, options: (p2 = u2.options) == null ? void 0 : p2.map((T) => m({}, T)), responses: (h2 = u2.responses) == null ? void 0 : h2.map((T) => m({}, T)) });
25600
25628
  }) }), o2;
25601
25629
  }, {});
25602
- ba(r2.polls, s2);
25630
+ Ra(r2.polls, s2);
25603
25631
  }, i2), t2.forEach((r2) => this.hmsNotifications.sendPollUpdate(e, r2.id));
25604
25632
  }
25605
25633
  onWhiteboardUpdate(e) {
@@ -25609,12 +25637,12 @@ var init_dist = __esm({
25609
25637
  }
25610
25638
  startScreenShare(e) {
25611
25639
  return c2(this, null, function* () {
25612
- this.store.getState(Br) ? this.logPossibleInconsistency("start screenshare is called while it's on") : (yield this.sdk.startScreenShare(() => this.syncRoomState("screenshareStopped"), e), this.syncRoomState("startScreenShare"));
25640
+ this.store.getState(Vr) ? this.logPossibleInconsistency("start screenshare is called while it's on") : (yield this.sdk.startScreenShare(() => this.syncRoomState("screenshareStopped"), e), this.syncRoomState("startScreenShare"));
25613
25641
  });
25614
25642
  }
25615
25643
  stopScreenShare() {
25616
25644
  return c2(this, null, function* () {
25617
- this.store.getState(Br) ? (yield this.sdk.stopScreenShare(), this.syncRoomState("stopScreenShare")) : this.logPossibleInconsistency("stop screenshare is called while it's not on");
25645
+ this.store.getState(Vr) ? (yield this.sdk.stopScreenShare(), this.syncRoomState("stopScreenShare")) : this.logPossibleInconsistency("stop screenshare is called while it's not on");
25618
25646
  });
25619
25647
  }
25620
25648
  attachVideoInternal(e, t2) {
@@ -25630,23 +25658,23 @@ var init_dist = __esm({
25630
25658
  let v2 = _2.convertPeer(g2);
25631
25659
  t2[v2.id] = v2, i2.push(v2.id), o2[v2.id] = { peerID: v2.id, downlinkQuality: g2.networkQuality || -1 };
25632
25660
  let E2 = [g2.audioTrack, g2.videoTrack, ...g2.auxiliaryTracks];
25633
- for (let P8 of E2) {
25634
- if (!P8)
25661
+ for (let k2 of E2) {
25662
+ if (!k2)
25635
25663
  continue;
25636
- let w2 = _2.convertTrack(P8);
25664
+ let w2 = _2.convertTrack(k2);
25637
25665
  r2[w2.id] = w2;
25638
25666
  }
25639
25667
  if (g2.isLocal) {
25640
- let P8 = g2;
25641
- n2 = this.getPreviewFields(P8), Object.assign(s2, this.getMediaSettings(P8));
25668
+ let k2 = g2;
25669
+ n2 = this.getPreviewFields(k2), Object.assign(s2, this.getMediaSettings(k2));
25642
25670
  }
25643
25671
  }
25644
25672
  let u2 = this.sdk.getRecordingState(), p2 = this.sdk.getRTMPState(), h2 = this.sdk.getHLSState(), T = this.sdk.getTranscriptionState();
25645
25673
  this.setState((g2) => {
25646
- var P8;
25674
+ var k2;
25647
25675
  g2.room.peers = i2;
25648
25676
  let v2 = g2.peers, E2 = g2.tracks;
25649
- Pa(v2, t2), Ea(E2, r2), Object.assign(g2.settings, s2), g2.room.isConnected && Object.assign(g2.connectionQualities, o2), (P8 = g2.preview) != null && P8.localPeer && (n2 != null && n2.localPeer) ? Object.assign(g2.preview, n2) : g2.preview = n2, Object.assign(g2.roles, _2.convertRoles(this.sdk.getRoles())), Object.assign(g2.playlist, _2.convertPlaylist(this.sdk.getPlaylistManager())), Object.assign(g2.room, _2.convertRecordingStreamingState(u2, p2, h2, T)), Object.assign(g2.templateAppData, this.sdk.getTemplateAppData());
25677
+ Ea(v2, t2), ba(E2, r2), Object.assign(g2.settings, s2), g2.room.isConnected && Object.assign(g2.connectionQualities, o2), (k2 = g2.preview) != null && k2.localPeer && (n2 != null && n2.localPeer) ? Object.assign(g2.preview, n2) : g2.preview = n2, Object.assign(g2.roles, _2.convertRoles(this.sdk.getRoles())), Object.assign(g2.playlist, _2.convertPlaylist(this.sdk.getPlaylistManager())), Object.assign(g2.room, _2.convertRecordingStreamingState(u2, p2, h2, T)), Object.assign(g2.templateAppData, this.sdk.getTemplateAppData());
25650
25678
  }, e), b2.timeEnd(`store-sync-${e}`);
25651
25679
  }
25652
25680
  onPreview(e) {
@@ -25705,7 +25733,7 @@ var init_dist = __esm({
25705
25733
  let r2 = Ct[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25706
25734
  this.setState((o2) => {
25707
25735
  let n2 = o2.tracks[s2.id];
25708
- $e(n2, s2) && (Kr(n2, s2), Object.assign(n2, s2));
25736
+ $e(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
25709
25737
  }, r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
25710
25738
  }
25711
25739
  }
@@ -25812,7 +25840,7 @@ var init_dist = __esm({
25812
25840
  }
25813
25841
  getMediaSettings(e) {
25814
25842
  var s2;
25815
- let t2 = this.store.getState(Js), i2 = e.audioTrack, r2 = e.videoTrack;
25843
+ let t2 = this.store.getState(Qs), i2 = e.audioTrack, r2 = e.videoTrack;
25816
25844
  return { audioInputDeviceId: (i2 == null ? void 0 : i2.settings.deviceId) || t2.audioInputDeviceId, videoInputDeviceId: (r2 == null ? void 0 : r2.settings.deviceId) || t2.videoInputDeviceId, audioOutputDeviceId: (s2 = this.sdk.getAudioOutput().getDevice()) == null ? void 0 : s2.deviceId };
25817
25845
  }
25818
25846
  getPreviewFields(e) {
@@ -25825,17 +25853,17 @@ var init_dist = __esm({
25825
25853
  setTrackVolume(e, t2) {
25826
25854
  return c2(this, null, function* () {
25827
25855
  let i2 = this.getTrackById(t2);
25828
- i2 ? i2 instanceof Ie ? (yield i2.setVolume(e), this.setState((r2) => {
25856
+ i2 ? i2 instanceof Ae ? (yield i2.setVolume(e), this.setState((r2) => {
25829
25857
  let s2 = r2.tracks[t2];
25830
25858
  s2 && s2.type === "audio" && (s2.volume = e);
25831
25859
  }, "trackVolume")) : b2.w(`track ${t2} is not an audio track`) : this.logPossibleInconsistency(`track ${t2} not present, unable to set volume`);
25832
25860
  });
25833
25861
  }
25834
25862
  localAndVideoUnmuting(e) {
25835
- let t2 = this.store.getState(ie);
25863
+ let t2 = this.store.getState(te);
25836
25864
  if ((t2 == null ? void 0 : t2.videoTrack) !== e)
25837
25865
  return false;
25838
- let i2 = this.store.getState(zs), r2 = this.store.getState(Ur);
25866
+ let i2 = this.store.getState(Ys), r2 = this.store.getState(Br);
25839
25867
  return i2 && !r2;
25840
25868
  }
25841
25869
  logPossibleInconsistency(e) {
@@ -25873,7 +25901,7 @@ var init_dist = __esm({
25873
25901
  b2.w("Invalid plugin received in store");
25874
25902
  return;
25875
25903
  }
25876
- let i2 = this.store.getState(oe);
25904
+ let i2 = this.store.getState(ae);
25877
25905
  if (i2) {
25878
25906
  let r2 = this.getLocalTrack(i2);
25879
25907
  r2 ? (t2 === "add" ? yield r2.addPlugin(e) : t2 === "remove" && (yield r2.removePlugin(e)), this.syncRoomState(`${t2}AudioPlugin`)) : this.logPossibleInconsistency(`track ${i2} not present, unable to ${t2} plugin`);
@@ -25895,13 +25923,13 @@ var init_dist = __esm({
25895
25923
  this.syncRoomState("roleUpdate");
25896
25924
  }
25897
25925
  getStoreLocalTrackIDfromSDKTrack(e) {
25898
- return this.store.getState(Qs).find((i2) => {
25926
+ return this.store.getState(zs).find((i2) => {
25899
25927
  var r2;
25900
25928
  return ((r2 = this.getTrackById(i2)) == null ? void 0 : r2.trackId) === e.trackId;
25901
25929
  });
25902
25930
  }
25903
25931
  updateMidCallPreviewRoomState(e, t2) {
25904
- t2.isLocal && e === 8 && this.store.getState(Ys) && this.setState((i2) => {
25932
+ t2.isLocal && e === 8 && this.store.getState(Xs) && this.setState((i2) => {
25905
25933
  i2.room.roomState = "Connected";
25906
25934
  }, "midCallPreviewCompleted");
25907
25935
  }
@@ -25914,8 +25942,8 @@ var init_dist = __esm({
25914
25942
  }, t2);
25915
25943
  }
25916
25944
  };
25917
- Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
25918
- wi = class {
25945
+ wi = (a11) => O2 ? `${a11} ${document.title}` : a11;
25946
+ _i = class {
25919
25947
  constructor(e, t2) {
25920
25948
  this.eventBus = e;
25921
25949
  this.listener = t2;
@@ -25984,8 +26012,8 @@ var init_dist = __esm({
25984
26012
  r3 && (yield this.diffRolesAndPublishTracks({ oldRole: e2, newRole: t3 }), (s3 = this.listener) == null || s3.onPeerUpdate(8, r3));
25985
26013
  });
25986
26014
  this.diffRolesAndPublishTracks = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
25987
- var g2, v2, E2, P8, w2, Oe;
25988
- 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, (v2 = t3.publishParams.simulcast) == null ? void 0 : v2.video), p2 = this.hasSimulcastDifference((E2 = e2.publishParams.simulcast) == null ? void 0 : E2.screen, (P8 = t3.publishParams.simulcast) == null ? void 0 : P8.screen), h2 = (Oe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : Oe.enabled;
26015
+ var g2, v2, E2, k2, w2, Oe;
26016
+ 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, (v2 = t3.publishParams.simulcast) == null ? void 0 : v2.video), p2 = this.hasSimulcastDifference((E2 = e2.publishParams.simulcast) == null ? void 0 : E2.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;
25989
26017
  yield this.removeAudioTrack(n2), yield this.removeVideoTracks(o3 || u2), yield this.removeScreenTracks(l2 || p2);
25990
26018
  let T = this.getSettings();
25991
26019
  u2 && (T.isVideoMuted = !h2), yield this.publish(T), yield this.syncDevices(T, t3);
@@ -26046,7 +26074,7 @@ var init_dist = __esm({
26046
26074
  return { isAudioMuted: (i2 = e == null ? void 0 : e.isAudioMuted) != null ? i2 : true, isVideoMuted: (r2 = e == null ? void 0 : e.isVideoMuted) != null ? r2 : true, audioInputDeviceId: (e == null ? void 0 : e.audioInputDeviceId) || "default", audioOutputDeviceId: (e == null ? void 0 : e.audioOutputDeviceId) || "default", videoDeviceId: (e == null ? void 0 : e.videoDeviceId) || "default" };
26047
26075
  }
26048
26076
  };
26049
- jr = class {
26077
+ Jr = class {
26050
26078
  constructor() {
26051
26079
  this.TAG = "[HTTPAnalyticsTransport]";
26052
26080
  this.failedEvents = new le("client-events");
@@ -26065,7 +26093,7 @@ var init_dist = __esm({
26065
26093
  this.addEventToStorage(e);
26066
26094
  return;
26067
26095
  }
26068
- let t2 = { event: e.name, payload: e.properties, event_id: String(e.timestamp), peer: e.metadata.peer, timestamp: e.timestamp, device_id: e.device_id, cluster: { websocket_url: this.websocketURL } }, i2 = this.env === "prod" ? xs : Us;
26096
+ let t2 = { event: e.name, payload: e.properties, event_id: String(e.timestamp), peer: e.metadata.peer, timestamp: e.timestamp, device_id: e.device_id, cluster: { websocket_url: this.websocketURL } }, i2 = this.env === "prod" ? Us : Bs;
26069
26097
  fetch(i2, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${e.metadata.token}`, user_agent_v2: e.metadata.userAgent }, body: JSON.stringify(t2) }).then((r2) => {
26070
26098
  if (r2.status === 401) {
26071
26099
  this.removeFromStorage(e);
@@ -26091,7 +26119,7 @@ var init_dist = __esm({
26091
26119
  i2 > -1 && (t2.splice(i2, 1), this.failedEvents.set(t2));
26092
26120
  }
26093
26121
  };
26094
- Pe = new jr();
26122
+ Pe = new Jr();
26095
26123
  Nt = class {
26096
26124
  constructor(e) {
26097
26125
  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);
@@ -26282,7 +26310,7 @@ var init_dist = __esm({
26282
26310
  return c2(this, null, function* () {
26283
26311
  let t2 = [];
26284
26312
  this.getAudioTracks().forEach((i2) => {
26285
- i2 instanceof ae && t2.push(i2.setOutputDevice(e));
26313
+ i2 instanceof se && t2.push(i2.setOutputDevice(e));
26286
26314
  }), yield Promise.all(t2);
26287
26315
  });
26288
26316
  }
@@ -26368,7 +26396,7 @@ var init_dist = __esm({
26368
26396
  t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
26369
26397
  }
26370
26398
  };
26371
- _i = class {
26399
+ Ni = class {
26372
26400
  constructor() {
26373
26401
  this.TAG = "[WakeLockManager]";
26374
26402
  this.wakeLock = null;
@@ -26402,7 +26430,7 @@ var init_dist = __esm({
26402
26430
  });
26403
26431
  }
26404
26432
  };
26405
- Ni = class {
26433
+ Oi = class {
26406
26434
  constructor(e) {
26407
26435
  this.store = e;
26408
26436
  this.bufferSize = 100;
@@ -26444,7 +26472,7 @@ var init_dist = __esm({
26444
26472
  e.metadata.token = (r2 = this.store.getConfig()) == null ? void 0 : r2.authToken, e.metadata.peer = { session_id: t2 == null ? void 0 : t2.sessionId, room_id: t2 == null ? void 0 : t2.id, room_name: t2 == null ? void 0 : t2.name, template_id: t2 == null ? void 0 : t2.templateId, joined_at: (s2 = t2 == null ? void 0 : t2.joinedAt) == null ? void 0 : s2.getTime(), session_started_at: (o2 = t2 == null ? void 0 : t2.startedAt) == null ? void 0 : o2.getTime(), role: (n2 = i2 == null ? void 0 : i2.role) == null ? void 0 : n2.name, user_name: i2 == null ? void 0 : i2.name, user_data: i2 == null ? void 0 : i2.metadata, peer_id: i2 == null ? void 0 : i2.peerId }, Pe.sendEvent(e);
26445
26473
  }
26446
26474
  };
26447
- Da = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26475
+ wa = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26448
26476
  xt = class {
26449
26477
  constructor(e, t2, i2) {
26450
26478
  this.store = e;
@@ -26453,7 +26481,7 @@ var init_dist = __esm({
26453
26481
  this.autoPausedTracks = /* @__PURE__ */ new Set();
26454
26482
  this.TAG = "[AudioSinkManager]:";
26455
26483
  this.volume = 100;
26456
- this.state = m({}, Da);
26484
+ this.state = m({}, wa);
26457
26485
  this.timer = null;
26458
26486
  this.autoUnpauseTimer = null;
26459
26487
  this.earpieceSelected = false;
@@ -26560,7 +26588,7 @@ var init_dist = __esm({
26560
26588
  }
26561
26589
  cleanup() {
26562
26590
  var e;
26563
- (e = this.audioSink) == null || e.remove(), this.audioSink = void 0, this.timer && (clearInterval(this.timer), this.timer = null), this.autoUnpauseTimer && (clearInterval(this.autoUnpauseTimer), this.autoUnpauseTimer = null), this.eventBus.audioTrackAdded.unsubscribe(this.handleTrackAdd), this.eventBus.audioTrackRemoved.unsubscribe(this.handleTrackRemove), this.eventBus.audioTrackUpdate.unsubscribe(this.handleTrackUpdate), this.eventBus.deviceChange.unsubscribe(this.handleAudioDeviceChange), this.autoPausedTracks = /* @__PURE__ */ new Set(), this.state = m({}, Da);
26591
+ (e = this.audioSink) == null || e.remove(), this.audioSink = void 0, this.timer && (clearInterval(this.timer), this.timer = null), this.autoUnpauseTimer && (clearInterval(this.autoUnpauseTimer), this.autoUnpauseTimer = null), this.eventBus.audioTrackAdded.unsubscribe(this.handleTrackAdd), this.eventBus.audioTrackRemoved.unsubscribe(this.handleTrackRemove), this.eventBus.audioTrackUpdate.unsubscribe(this.handleTrackUpdate), this.eventBus.deviceChange.unsubscribe(this.handleAudioDeviceChange), this.autoPausedTracks = /* @__PURE__ */ new Set(), this.state = m({}, wa);
26564
26592
  }
26565
26593
  playAudioFor(e) {
26566
26594
  return c2(this, null, function* () {
@@ -26583,7 +26611,7 @@ var init_dist = __esm({
26583
26611
  });
26584
26612
  }
26585
26613
  };
26586
- Oi = class {
26614
+ xi = class {
26587
26615
  constructor(e) {
26588
26616
  this.eventBus = e;
26589
26617
  this.pluginUsage = /* @__PURE__ */ new Map();
@@ -26679,7 +26707,7 @@ var init_dist = __esm({
26679
26707
  this.eventBus.analytics.publish(y2.deviceChange({ selection: { audioInput: t3 }, error: S2.TracksErrors.SelectedDeviceMissing("audio"), devices: this.getDevices(), type: "audioInput" })), d2.e(this.TAG, "Audio device not found");
26680
26708
  return;
26681
26709
  }
26682
- let { settings: i3 } = e2, r2 = new te().codec(i3.codec).maxBitrate(i3.maxBitrate).deviceId(t3.deviceId).audioMode(i3.audioMode).build();
26710
+ let { settings: i3 } = e2, r2 = new ee().codec(i3.codec).maxBitrate(i3.maxBitrate).deviceId(t3.deviceId).audioMode(i3.audioMode).build();
26683
26711
  try {
26684
26712
  yield e2.setSettings(r2, true), this.eventBus.deviceChange.publish({ devices: this.getDevices(), selection: t3, type: "audioInput" }), this.logDevices("Audio Device Change Success");
26685
26713
  } catch (s2) {
@@ -26766,7 +26794,7 @@ var init_dist = __esm({
26766
26794
  d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
26767
26795
  }
26768
26796
  };
26769
- xi = class {
26797
+ Ui = class {
26770
26798
  constructor(e, t2) {
26771
26799
  this.deviceManager = e;
26772
26800
  this.audioSinkManager = t2;
@@ -26787,7 +26815,7 @@ var init_dist = __esm({
26787
26815
  }
26788
26816
  unblockAutoplay() {
26789
26817
  return c2(this, null, function* () {
26790
- yield this.audioSinkManager.unblockAutoplay(), yield Ae.resumeContext();
26818
+ yield this.audioSinkManager.unblockAutoplay(), yield Ie.resumeContext();
26791
26819
  });
26792
26820
  }
26793
26821
  };
@@ -26835,7 +26863,7 @@ var init_dist = __esm({
26835
26863
  this.leave = new V(G2.LEAVE, this.eventEmitter);
26836
26864
  }
26837
26865
  };
26838
- Ui = class {
26866
+ Bi = class {
26839
26867
  constructor(e, t2, i2) {
26840
26868
  this.store = e;
26841
26869
  this.listener = t2;
@@ -26853,7 +26881,7 @@ var init_dist = __esm({
26853
26881
  (n2 = this.listener) == null || n2.onPeerUpdate(5, null);
26854
26882
  }
26855
26883
  };
26856
- Bi = class {
26884
+ Vi = class {
26857
26885
  constructor(e) {
26858
26886
  this.listener = e;
26859
26887
  this.TAG = "[BroadcastManager]";
@@ -26866,7 +26894,7 @@ var init_dist = __esm({
26866
26894
  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);
26867
26895
  }
26868
26896
  };
26869
- Vi = class {
26897
+ Fi = class {
26870
26898
  constructor(e, t2) {
26871
26899
  this.store = e;
26872
26900
  this.listener = t2;
@@ -27012,7 +27040,7 @@ var init_dist = __esm({
27012
27040
  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;
27013
27041
  }
27014
27042
  };
27015
- Fi = class extends ct {
27043
+ Gi = class extends ct {
27016
27044
  constructor(t2, i2, r2, s2) {
27017
27045
  super(t2, i2, s2);
27018
27046
  this.transport = r2;
@@ -27052,7 +27080,7 @@ var init_dist = __esm({
27052
27080
  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));
27053
27081
  }
27054
27082
  };
27055
- Gi = class {
27083
+ Wi = class {
27056
27084
  constructor(e, t2, i2, r2) {
27057
27085
  this.store = e;
27058
27086
  this.peerManager = t2;
@@ -27119,7 +27147,7 @@ var init_dist = __esm({
27119
27147
  }
27120
27148
  };
27121
27149
  C = (a11) => a11 ? new Date(a11) : void 0;
27122
- Wi = class {
27150
+ $i = class {
27123
27151
  constructor(e, t2, i2) {
27124
27152
  this.store = e;
27125
27153
  this.trackManager = t2;
@@ -27218,7 +27246,7 @@ var init_dist = __esm({
27218
27246
  });
27219
27247
  }
27220
27248
  };
27221
- $i = class {
27249
+ Ki = class {
27222
27250
  constructor(e, t2) {
27223
27251
  this.store = e;
27224
27252
  this.eventBus = t2;
@@ -27243,10 +27271,10 @@ var init_dist = __esm({
27243
27271
  }
27244
27272
  };
27245
27273
  Vt = (a11, e, t2) => {
27246
- let i2 = t2 === "qa" ? Gs : Fs, r2 = new URL(i2);
27274
+ let i2 = t2 === "qa" ? Ws : Gs, r2 = new URL(i2);
27247
27275
  return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
27248
27276
  };
27249
- Ki = class {
27277
+ qi = class {
27250
27278
  constructor(e, t2, i2) {
27251
27279
  this.transport = e;
27252
27280
  this.store = t2;
@@ -27308,7 +27336,7 @@ var init_dist = __esm({
27308
27336
  this.transport = e;
27309
27337
  this.store = t2;
27310
27338
  this.listener = i2;
27311
- this.whiteboard = new Ki(e, t2, i2);
27339
+ this.whiteboard = new qi(e, t2, i2);
27312
27340
  }
27313
27341
  setListener(e) {
27314
27342
  this.listener = e, this.whiteboard.setListener(e);
@@ -27318,7 +27346,7 @@ var init_dist = __esm({
27318
27346
  var o2, n2;
27319
27347
  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 }));
27320
27348
  e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
27321
- 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 }));
27349
+ 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 }));
27322
27350
  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]);
27323
27351
  });
27324
27352
  }
@@ -27386,10 +27414,10 @@ var init_dist = __esm({
27386
27414
  r2 = [...l2.polls, ...r2, ...u2.polls];
27387
27415
  }
27388
27416
  for (let l2 of r2) {
27389
- 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);
27417
+ 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);
27390
27418
  p2.questions = u2.questions.map(({ question: T, options: g2, answer: v2 }, E2) => {
27391
- var P8, w2;
27392
- return M2(m({}, T), { options: g2, answer: v2, responses: (w2 = (P8 = h2 == null ? void 0 : h2.questions) == null ? void 0 : P8[E2]) == null ? void 0 : w2.responses });
27419
+ var k2, w2;
27420
+ return M2(m({}, T), { options: g2, answer: v2, responses: (w2 = (k2 = h2 == null ? void 0 : h2.questions) == null ? void 0 : k2[E2]) == null ? void 0 : w2.responses });
27393
27421
  }), t2.push(p2), this.store.setPoll(p2);
27394
27422
  }
27395
27423
  return (n2 = this.listener) == null || n2.onPollsUpdate(3, t2), t2;
@@ -27412,11 +27440,11 @@ var init_dist = __esm({
27412
27440
  return i2;
27413
27441
  }
27414
27442
  };
27415
- qi = (a11) => {
27443
+ ji = (a11) => {
27416
27444
  let e = { userid: "customerID", peerid: "peerID", username: "userName" };
27417
27445
  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) };
27418
27446
  };
27419
- ji = class {
27447
+ Ji = class {
27420
27448
  constructor(e, t2, i2) {
27421
27449
  this.store = e;
27422
27450
  this.transport = t2;
@@ -27449,7 +27477,7 @@ var init_dist = __esm({
27449
27477
  (i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
27450
27478
  return;
27451
27479
  }
27452
- let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = qi(s2);
27480
+ let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = ji(s2);
27453
27481
  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);
27454
27482
  }
27455
27483
  (r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
@@ -27509,7 +27537,7 @@ var init_dist = __esm({
27509
27537
  });
27510
27538
  }
27511
27539
  };
27512
- Ji = class {
27540
+ Qi = class {
27513
27541
  constructor(e, t2) {
27514
27542
  this.store = e;
27515
27543
  this.listener = t2;
@@ -27570,7 +27598,7 @@ var init_dist = __esm({
27570
27598
  return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
27571
27599
  }
27572
27600
  };
27573
- Qi = class {
27601
+ zi = class {
27574
27602
  constructor(e, t2) {
27575
27603
  this.store = e;
27576
27604
  this.listener = t2;
@@ -27727,7 +27755,7 @@ var init_dist = __esm({
27727
27755
  return d2.e(this.TAG, "error in streaming/recording", i2), i2;
27728
27756
  }
27729
27757
  };
27730
- zi = class {
27758
+ Yi = class {
27731
27759
  constructor(e, t2) {
27732
27760
  this.store = e;
27733
27761
  this.listener = t2;
@@ -27741,7 +27769,7 @@ var init_dist = __esm({
27741
27769
  (i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
27742
27770
  }
27743
27771
  };
27744
- Yi = class {
27772
+ Xi = class {
27745
27773
  constructor(e, t2, i2) {
27746
27774
  this.store = e;
27747
27775
  this.transport = t2;
@@ -27772,7 +27800,7 @@ var init_dist = __esm({
27772
27800
  });
27773
27801
  }
27774
27802
  };
27775
- Xi = class {
27803
+ Zi = class {
27776
27804
  constructor(e, t2, i2, r2, s2, o2) {
27777
27805
  this.store = e;
27778
27806
  this.transport = i2;
@@ -27799,7 +27827,7 @@ var init_dist = __esm({
27799
27827
  this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
27800
27828
  };
27801
27829
  let n2 = this.transport.isFlagEnabled("onDemandTracks");
27802
- this.trackManager = n2 ? new Fi(this.store, t2, this.transport, this.listener) : new ct(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);
27830
+ 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);
27803
27831
  }
27804
27832
  setListener(e) {
27805
27833
  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;
@@ -27851,7 +27879,7 @@ var init_dist = __esm({
27851
27879
  }
27852
27880
  }
27853
27881
  };
27854
- Zi = class {
27882
+ er = class {
27855
27883
  constructor(e) {
27856
27884
  this.transport = e;
27857
27885
  this.observedKeys = /* @__PURE__ */ new Set();
@@ -27891,7 +27919,7 @@ var init_dist = __esm({
27891
27919
  });
27892
27920
  }
27893
27921
  };
27894
- er = class {
27922
+ tr = class {
27895
27923
  constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
27896
27924
  this.authToken = e;
27897
27925
  this.peerId = t2;
@@ -27903,16 +27931,16 @@ var init_dist = __esm({
27903
27931
  }
27904
27932
  };
27905
27933
  J = ((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))(J || {});
27906
- wa = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27907
- 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 || {});
27908
- ir = class {
27934
+ _a7 = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27935
+ 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 || {});
27936
+ rr = class {
27909
27937
  constructor(e) {
27910
27938
  this.promise = new Promise((t2, i2) => {
27911
27939
  this.resolve = t2, this.reject = i2, e(t2, i2);
27912
27940
  });
27913
27941
  }
27914
27942
  };
27915
- rr = class {
27943
+ sr = class {
27916
27944
  constructor(e, t2) {
27917
27945
  this.onStateChange = e;
27918
27946
  this.sendEvent = t2;
@@ -27939,11 +27967,11 @@ var init_dist = __esm({
27939
27967
  d2.d(this.TAG, `schedule: Already a task for ${J[e]} scheduled, waiting for its completion`), yield g2.promise;
27940
27968
  return;
27941
27969
  }
27942
- let v2 = new ir((E2, P8) => {
27970
+ let v2 = new rr((E2, k2) => {
27943
27971
  });
27944
27972
  this.inProgress.set(e, v2), this.sendEvent(t2, e);
27945
27973
  }
27946
- let u2 = false, p2 = wa[e];
27974
+ let u2 = false, p2 = _a7[e];
27947
27975
  for (let g2 in p2) {
27948
27976
  let v2 = p2[parseInt(g2)];
27949
27977
  try {
@@ -28000,7 +28028,7 @@ var init_dist = __esm({
28000
28028
  });
28001
28029
  }
28002
28030
  };
28003
- sr = class extends He {
28031
+ ar = class extends He {
28004
28032
  constructor() {
28005
28033
  super(100);
28006
28034
  this.localStorage = new le("hms-analytics");
@@ -28021,7 +28049,7 @@ var init_dist = __esm({
28021
28049
  });
28022
28050
  }
28023
28051
  };
28024
- ar = class {
28052
+ or = class {
28025
28053
  constructor() {
28026
28054
  this.TAG = "[AnalyticsTransport]";
28027
28055
  }
@@ -28051,11 +28079,11 @@ var init_dist = __esm({
28051
28079
  }
28052
28080
  }
28053
28081
  };
28054
- or = class extends ar {
28082
+ nr = class extends or {
28055
28083
  constructor(t2) {
28056
28084
  super();
28057
28085
  this.transportProvider = t2;
28058
- this.failedEvents = new sr();
28086
+ this.failedEvents = new ar();
28059
28087
  }
28060
28088
  };
28061
28089
  dt = class {
@@ -28136,8 +28164,8 @@ var init_dist = __esm({
28136
28164
  return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
28137
28165
  }
28138
28166
  };
28139
- nr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28140
- cr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28167
+ cr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28168
+ dr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28141
28169
  Gt = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28142
28170
  Wt = class extends dt {
28143
28171
  constructor() {
@@ -28167,8 +28195,8 @@ var init_dist = __esm({
28167
28195
  if (p2 && this.trackAnalytics.has(p2))
28168
28196
  (E2 = this.trackAnalytics.get(p2)) == null || E2.pushTempStat(h2);
28169
28197
  else if (n2) {
28170
- let P8 = new Qr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
28171
- P8.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), P8);
28198
+ let k2 = new zr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
28199
+ k2.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), k2);
28172
28200
  }
28173
28201
  let T = this.trackAnalytics.get(p2);
28174
28202
  T != null && T.shouldCreateSample() && (i2 = true);
@@ -28179,7 +28207,7 @@ var init_dist = __esm({
28179
28207
  return i2.rid ? `${t2}:${i2.rid}` : t2;
28180
28208
  }
28181
28209
  };
28182
- Qr = class extends lt {
28210
+ zr = class extends lt {
28183
28211
  constructor() {
28184
28212
  super(...arguments);
28185
28213
  this.samples = [];
@@ -28189,7 +28217,7 @@ var init_dist = __esm({
28189
28217
  };
28190
28218
  this.shouldCreateSample = () => {
28191
28219
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28192
- return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28220
+ return t2 === 30 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28193
28221
  };
28194
28222
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28195
28223
  }
@@ -28213,19 +28241,19 @@ var init_dist = __esm({
28213
28241
  let i2 = t2.getAllRemoteTracksStats(), r2 = false;
28214
28242
  Object.keys(i2).forEach((s2) => {
28215
28243
  var v2, E2;
28216
- let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (v2 = this.trackAnalytics.get(s2)) == null ? void 0 : v2.getLatestStat(), p2 = ((P8, w2) => {
28217
- let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((P8 == null ? void 0 : P8.jitterBufferDelay) || 0) - Oe, $ = ((P8 == null ? void 0 : P8.jitterBufferEmittedCount) || 0) - Zt;
28244
+ let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (v2 = this.trackAnalytics.get(s2)) == null ? void 0 : v2.getLatestStat(), p2 = ((k2, w2) => {
28245
+ let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((k2 == null ? void 0 : k2.jitterBufferDelay) || 0) - Oe, $ = ((k2 == null ? void 0 : k2.jitterBufferEmittedCount) || 0) - Zt;
28218
28246
  return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
28219
28247
  })(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
28220
28248
  if (n2.kind === "video") {
28221
- let P8 = o2.getPreferredLayerDefinition();
28222
- T.expectedFrameHeight = P8 == null ? void 0 : P8.resolution.height, T.expectedFrameWidth = P8 == null ? void 0 : P8.resolution.width;
28249
+ let k2 = o2.getPreferredLayerDefinition();
28250
+ T.expectedFrameHeight = k2 == null ? void 0 : k2.resolution.height, T.expectedFrameWidth = k2 == null ? void 0 : k2.resolution.width;
28223
28251
  }
28224
28252
  if (this.trackAnalytics.has(s2))
28225
28253
  (E2 = this.trackAnalytics.get(s2)) == null || E2.pushTempStat(T);
28226
28254
  else if (o2) {
28227
- let P8 = new Yr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
28228
- P8.pushTempStat(T), this.trackAnalytics.set(s2, P8);
28255
+ let k2 = new Xr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
28256
+ k2.pushTempStat(T), this.trackAnalytics.set(s2, k2);
28229
28257
  }
28230
28258
  let g2 = this.trackAnalytics.get(s2);
28231
28259
  g2 != null && g2.shouldCreateSample() && (r2 = true);
@@ -28244,7 +28272,7 @@ var init_dist = __esm({
28244
28272
  return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
28245
28273
  }
28246
28274
  };
28247
- Yr = class extends lt {
28275
+ Xr = class extends lt {
28248
28276
  constructor() {
28249
28277
  super(...arguments);
28250
28278
  this.samples = [];
@@ -28259,7 +28287,7 @@ var init_dist = __esm({
28259
28287
  };
28260
28288
  this.shouldCreateSample = () => {
28261
28289
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28262
- return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28290
+ return t2 === 10 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28263
28291
  };
28264
28292
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28265
28293
  }
@@ -28268,7 +28296,7 @@ var init_dist = __esm({
28268
28296
  return i2.length === 0 ? Pt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28269
28297
  }
28270
28298
  };
28271
- lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
28299
+ ur = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(ur || {});
28272
28300
  Ee = "[HMSConnection]";
28273
28301
  Ke = class {
28274
28302
  constructor(e, t2) {
@@ -28291,7 +28319,7 @@ var init_dist = __esm({
28291
28319
  return c2(this, null, function* () {
28292
28320
  try {
28293
28321
  let i2 = yield this.nativeConnection.createOffer(t2);
28294
- return d2.d(Ee, `[role=${this.role}] createOffer offer=${JSON.stringify(i2, null, 1)}`), Oa(_a7(i2, e));
28322
+ return d2.d(Ee, `[role=${this.role}] createOffer offer=${JSON.stringify(i2, null, 1)}`), xa(Na(i2, e));
28295
28323
  } catch (i2) {
28296
28324
  throw S2.WebrtcErrors.CreateOfferFailed(this.action, i2.message);
28297
28325
  }
@@ -28347,13 +28375,13 @@ var init_dist = __esm({
28347
28375
  let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
28348
28376
  if (t2.transport) {
28349
28377
  let s2 = t2.transport.iceTransport, o2 = () => {
28350
- 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))));
28378
+ 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))));
28351
28379
  };
28352
28380
  typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
28353
28381
  }
28354
28382
  });
28355
28383
  } catch (e) {
28356
- d2.w(Ee, `Error in logging selected ice candidate pair for ${lr[this.role]} connection`, e);
28384
+ d2.w(Ee, `Error in logging selected ice candidate pair for ${ur[this.role]} connection`, e);
28357
28385
  }
28358
28386
  }
28359
28387
  removeTrack(e) {
@@ -28504,9 +28532,9 @@ var init_dist = __esm({
28504
28532
  this.observer.onTrackRemove(T), s2.tracks.splice(h2, 1), s2.tracks.length === 0 && this.remoteStreams.delete(r2);
28505
28533
  }
28506
28534
  });
28507
- let s2 = this.remoteStreams.get(r2), o2 = t2.track.kind === "audio" ? ae : U2, n2 = new o2(s2, t2.track);
28535
+ let s2 = this.remoteStreams.get(r2), o2 = t2.track.kind === "audio" ? se : U2, n2 = new o2(s2, t2.track);
28508
28536
  t2.track.kind === "video" && s2.setVideoLayerLocally("none", "addTrack", "subscribeConnection"), n2.transceiver = t2.transceiver;
28509
- let l2 = Na(this.remoteDescription, (u2 = t2.transceiver) == null ? void 0 : u2.mid);
28537
+ let l2 = Oa(this.remoteDescription, (u2 = t2.transceiver) == null ? void 0 : u2.mid);
28510
28538
  l2 && n2.setSdpTrackId(l2), s2.tracks.push(n2), this.observer.onTrackAdd(n2);
28511
28539
  };
28512
28540
  }
@@ -28529,8 +28557,8 @@ var init_dist = __esm({
28529
28557
  });
28530
28558
  }
28531
28559
  };
28532
- xa = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28533
- ur = "[InitService]";
28560
+ Ua = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28561
+ pr = "[InitService]";
28534
28562
  Qt = class {
28535
28563
  static handleError(e, t2) {
28536
28564
  switch (e.status) {
@@ -28544,16 +28572,16 @@ var init_dist = __esm({
28544
28572
  }
28545
28573
  static fetchInitConfig(n2) {
28546
28574
  return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
28547
- d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28548
- let l2 = dn2(r2, t2, i2, s2);
28575
+ d2.d(pr, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28576
+ let l2 = ln2(r2, t2, i2, s2);
28549
28577
  try {
28550
28578
  let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
28551
28579
  try {
28552
28580
  let p2 = yield u2.clone().json();
28553
- return this.handleError(u2, p2), d2.d(ur, `config is ${JSON.stringify(p2, null, 2)}`), ln2(p2, o2);
28581
+ return this.handleError(u2, p2), d2.d(pr, `config is ${JSON.stringify(p2, null, 2)}`), un2(p2, o2);
28554
28582
  } catch (p2) {
28555
28583
  let h2 = yield u2.text();
28556
- throw d2.e(ur, "json error", p2.message, h2), p2 instanceof f2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28584
+ throw d2.e(pr, "json error", p2.message, h2), p2 instanceof f2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28557
28585
  }
28558
28586
  } catch (u2) {
28559
28587
  let p2 = u2;
@@ -28610,7 +28638,7 @@ var init_dist = __esm({
28610
28638
  if (o2 instanceof f2)
28611
28639
  throw o2;
28612
28640
  let n2 = o2;
28613
- throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), Tr(e), n2.message);
28641
+ throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), fr(e), n2.message);
28614
28642
  }
28615
28643
  });
28616
28644
  }
@@ -28896,7 +28924,7 @@ var init_dist = __esm({
28896
28924
  rejectPendingCalls(e = "") {
28897
28925
  this.callbacks.forEach((t2, i2) => {
28898
28926
  var r2, s2, o2, n2;
28899
- ((r2 = t2.metadata) == null ? void 0 : r2.method) !== "ping" && (d2.e(this.TAG, `rejecting pending callback ${(s2 = t2.metadata) == null ? void 0 : s2.method}, id=${i2}`), t2.reject(S2.WebSocketConnectionErrors.WebSocketConnectionLost((o2 = t2.metadata) != null && o2.method ? Tr((n2 = t2.metadata) == null ? void 0 : n2.method) : "RECONNECT_SIGNAL", e)), this.callbacks.delete(i2));
28927
+ ((r2 = t2.metadata) == null ? void 0 : r2.method) !== "ping" && (d2.e(this.TAG, `rejecting pending callback ${(s2 = t2.metadata) == null ? void 0 : s2.method}, id=${i2}`), t2.reject(S2.WebSocketConnectionErrors.WebSocketConnectionLost((o2 = t2.metadata) != null && o2.method ? fr((n2 = t2.metadata) == null ? void 0 : n2.method) : "RECONNECT_SIGNAL", e)), this.callbacks.delete(i2));
28900
28928
  });
28901
28929
  }
28902
28930
  pingPongLoop(e) {
@@ -28905,7 +28933,7 @@ var init_dist = __esm({
28905
28933
  let t2 = ((i2 = window.HMS) == null ? void 0 : i2.PING_TIMEOUT) || 12e3;
28906
28934
  if (this.isConnected) {
28907
28935
  let s2 = yield this.ping(t2);
28908
- this.pongResponseTimes.enqueue(s2), s2 > t2 ? (d2.d(this.TAG, `Pong timeout ${e}, pageHidden=${us()}`), this.id === e && this.setIsConnected(false, "ping pong failure")) : setTimeout(() => this.pingPongLoop(e), ((r2 = window.HMS) == null ? void 0 : r2.PING_INTERVAL) || 3e3);
28936
+ this.pongResponseTimes.enqueue(s2), s2 > t2 ? (d2.d(this.TAG, `Pong timeout ${e}, pageHidden=${ps()}`), this.id === e && this.setIsConnected(false, "ping pong failure")) : setTimeout(() => this.pingPongLoop(e), ((r2 = window.HMS) == null ? void 0 : r2.PING_INTERVAL) || 3e3);
28909
28937
  }
28910
28938
  });
28911
28939
  }
@@ -28927,13 +28955,13 @@ var init_dist = __esm({
28927
28955
  });
28928
28956
  }
28929
28957
  };
28930
- Ua = () => {
28958
+ Ba = () => {
28931
28959
  if (!O2 || typeof navigator.connection == "undefined")
28932
28960
  return;
28933
28961
  let a11 = navigator.connection;
28934
28962
  return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
28935
28963
  };
28936
- I2 = "[HMSTransport]:";
28964
+ A2 = "[HMSTransport]:";
28937
28965
  Yt = class {
28938
28966
  constructor(e, t2, i2, r2, s2, o2, n2) {
28939
28967
  this.observer = e;
@@ -28954,14 +28982,14 @@ var init_dist = __esm({
28954
28982
  try {
28955
28983
  if (!this.subscribeConnection)
28956
28984
  return;
28957
- yield this.subscribeConnection.setRemoteDescription(e2), d2.d(I2, `[SUBSCRIBE] Adding ${this.subscribeConnection.candidates.length} ice-candidates`, this.subscribeConnection.candidates);
28985
+ yield this.subscribeConnection.setRemoteDescription(e2), d2.d(A2, `[SUBSCRIBE] Adding ${this.subscribeConnection.candidates.length} ice-candidates`, this.subscribeConnection.candidates);
28958
28986
  for (let i3 of this.subscribeConnection.candidates)
28959
28987
  yield this.subscribeConnection.addIceCandidate(i3);
28960
28988
  this.subscribeConnection.candidates.length = 0;
28961
28989
  let t3 = yield this.subscribeConnection.createAnswer();
28962
- yield this.subscribeConnection.setLocalDescription(t3), this.signal.answer(t3), d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation DONE \u2705");
28990
+ yield this.subscribeConnection.setLocalDescription(t3), this.signal.answer(t3), d2.d(A2, "[role=SUBSCRIBE] onOffer renegotiation DONE \u2705");
28963
28991
  } catch (t3) {
28964
- d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation FAILED \u274C", t3), this.state = "Failed";
28992
+ d2.d(A2, "[role=SUBSCRIBE] onOffer renegotiation FAILED \u274C", t3), this.state = "Failed";
28965
28993
  let i3;
28966
28994
  t3 instanceof f2 ? i3 = t3 : i3 = S2.GenericErrors.Unknown("PUBLISH", t3.message), this.observer.onFailure(i3), this.eventBus.analytics.publish(y2.subscribeFail(i3));
28967
28995
  }
@@ -28973,7 +29001,7 @@ var init_dist = __esm({
28973
29001
  }), onFailure: (e2) => {
28974
29002
  this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
28975
29003
  }, onOffline: (e2) => c2(this, null, function* () {
28976
- d2.d(I2, "socket offline", tr[this.state]);
29004
+ d2.d(A2, "socket offline", ir[this.state]);
28977
29005
  try {
28978
29006
  this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
28979
29007
  } catch (t3) {
@@ -28981,19 +29009,19 @@ var init_dist = __esm({
28981
29009
  }
28982
29010
  }), onOnline: () => {
28983
29011
  var e2;
28984
- d2.d(I2, "socket online", tr[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
29012
+ d2.d(A2, "socket online", ir[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
28985
29013
  }, onNetworkOnline: () => {
28986
29014
  this.analyticsEventsService.flushFailedClientEvents();
28987
29015
  } };
28988
29016
  this.signal = new zt(this.signalObserver);
28989
- this.analyticsSignalTransport = new or(this.signal);
29017
+ this.analyticsSignalTransport = new nr(this.signal);
28990
29018
  this.publishDtlsStateTimer = 0;
28991
29019
  this.lastPublishDtlsState = "new";
28992
29020
  this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
28993
29021
  yield this.performPublishRenegotiation();
28994
29022
  }), onDTLSTransportStateChange: (e2) => {
28995
29023
  var r3, s3, o3;
28996
- if ((e2 === "failed" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publisher on dtls transport state change: ${e2}`), !e2 || this.lastPublishDtlsState === e2 || (this.lastPublishDtlsState = e2, this.publishDtlsStateTimer !== 0 && (clearTimeout(this.publishDtlsStateTimer), this.publishDtlsStateTimer = 0), e2 !== "connecting" && e2 !== "failed"))
29024
+ if ((e2 === "failed" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `Publisher on dtls transport state change: ${e2}`), !e2 || this.lastPublishDtlsState === e2 || (this.lastPublishDtlsState = e2, this.publishDtlsStateTimer !== 0 && (clearTimeout(this.publishDtlsStateTimer), this.publishDtlsStateTimer = 0), e2 !== "connecting" && e2 !== "failed"))
28997
29025
  return;
28998
29026
  let i3 = (o3 = (s3 = (r3 = this.initConfig) == null ? void 0 : r3.config) == null ? void 0 : s3.dtlsStateTimeouts) == null ? void 0 : o3[e2];
28999
29027
  !i3 || i3 <= 0 || (this.publishDtlsStateTimer = window.setTimeout(() => {
@@ -29005,14 +29033,14 @@ var init_dist = __esm({
29005
29033
  }
29006
29034
  }, i3));
29007
29035
  }, onDTLSTransportError: (e2) => {
29008
- d2.e(I2, `onDTLSTransportError ${e2.name} ${e2.message}`, e2), this.eventBus.analytics.publish(y2.disconnect(e2));
29036
+ d2.e(A2, `onDTLSTransportError ${e2.name} ${e2.message}`, e2), this.eventBus.analytics.publish(y2.disconnect(e2));
29009
29037
  }, onIceConnectionChange: (e2) => c2(this, null, function* () {
29010
- (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publish ice connection state change: ${e2}`);
29038
+ (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `Publish ice connection state change: ${e2}`);
29011
29039
  }), onConnectionStateChange: (e2) => c2(this, null, function* () {
29012
29040
  var i3, r3, s3, o3, n3, l3, u3, p3;
29013
- (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publish connection state change: ${e2}`), e2 === "connected" && ((i3 = this.connectivityListener) == null || i3.onICESuccess(true), (r3 = this.publishConnection) == null || r3.handleSelectedIceCandidatePairs()), e2 === "disconnected" && setTimeout(() => {
29014
- var h2, T, g2, v2, E2, P8, w2;
29015
- ((h2 = this.publishConnection) == null ? void 0 : h2.connectionState) === "disconnected" && this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEDisconnected("PUBLISH", `local candidate - ${(v2 = (g2 = (T = this.publishConnection) == null ? void 0 : T.selectedCandidatePair) == null ? void 0 : g2.local) == null ? void 0 : v2.candidate}; remote candidate - ${(w2 = (P8 = (E2 = this.publishConnection) == null ? void 0 : E2.selectedCandidatePair) == null ? void 0 : P8.remote) == null ? void 0 : w2.candidate}`));
29041
+ (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `Publish connection state change: ${e2}`), e2 === "connected" && ((i3 = this.connectivityListener) == null || i3.onICESuccess(true), (r3 = this.publishConnection) == null || r3.handleSelectedIceCandidatePairs()), e2 === "disconnected" && setTimeout(() => {
29042
+ var h2, T, g2, v2, E2, k2, w2;
29043
+ ((h2 = this.publishConnection) == null ? void 0 : h2.connectionState) === "disconnected" && this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEDisconnected("PUBLISH", `local candidate - ${(v2 = (g2 = (T = this.publishConnection) == null ? void 0 : T.selectedCandidatePair) == null ? void 0 : g2.local) == null ? void 0 : v2.candidate}; remote candidate - ${(w2 = (k2 = (E2 = this.publishConnection) == null ? void 0 : E2.selectedCandidatePair) == null ? void 0 : k2.remote) == null ? void 0 : w2.candidate}`));
29016
29044
  }, 5e3), e2 === "failed" && (yield this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEFailure("PUBLISH", `local candidate - ${(n3 = (o3 = (s3 = this.publishConnection) == null ? void 0 : s3.selectedCandidatePair) == null ? void 0 : o3.local) == null ? void 0 : n3.candidate}; remote candidate - ${(p3 = (u3 = (l3 = this.publishConnection) == null ? void 0 : l3.selectedCandidatePair) == null ? void 0 : u3.remote) == null ? void 0 : p3.candidate}`)));
29017
29045
  }), onIceCandidate: (e2) => {
29018
29046
  var t3;
@@ -29024,18 +29052,18 @@ var init_dist = __esm({
29024
29052
  this.subscribeConnectionObserver = { onApiChannelMessage: (e2) => {
29025
29053
  this.observer.onNotification(JSON.parse(e2));
29026
29054
  }, onTrackAdd: (e2) => {
29027
- d2.d(I2, "[Subscribe] onTrackAdd", `${e2}`), this.observer.onTrackAdd(e2);
29055
+ d2.d(A2, "[Subscribe] onTrackAdd", `${e2}`), this.observer.onTrackAdd(e2);
29028
29056
  }, onTrackRemove: (e2) => {
29029
- d2.d(I2, "[Subscribe] onTrackRemove", `${e2}`), this.observer.onTrackRemove(e2);
29057
+ d2.d(A2, "[Subscribe] onTrackRemove", `${e2}`), this.observer.onTrackRemove(e2);
29030
29058
  }, onIceConnectionChange: (e2) => c2(this, null, function* () {
29031
29059
  var i3;
29032
- if ((e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Subscribe ice connection state change: ${e2}`), e2 === "connected") {
29060
+ if ((e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `Subscribe ice connection state change: ${e2}`), e2 === "connected") {
29033
29061
  let r3 = this.callbacks.get(tt);
29034
29062
  this.callbacks.delete(tt), (i3 = this.connectivityListener) == null || i3.onICESuccess(false), r3 && r3.promise.resolve(true);
29035
29063
  }
29036
29064
  }), onConnectionStateChange: (e2) => c2(this, null, function* () {
29037
29065
  var i3, r3, s3, o3, n3, l3;
29038
- (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Subscribe connection state change: ${e2}`), e2 === "failed" && (yield this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEFailure("SUBSCRIBE", `local candidate - ${(s3 = (r3 = (i3 = this.subscribeConnection) == null ? void 0 : i3.selectedCandidatePair) == null ? void 0 : r3.local) == null ? void 0 : s3.candidate}; remote candidate - ${(l3 = (n3 = (o3 = this.subscribeConnection) == null ? void 0 : o3.selectedCandidatePair) == null ? void 0 : n3.remote) == null ? void 0 : l3.candidate}`))), e2 === "disconnected" && setTimeout(() => {
29066
+ (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `Subscribe connection state change: ${e2}`), e2 === "failed" && (yield this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEFailure("SUBSCRIBE", `local candidate - ${(s3 = (r3 = (i3 = this.subscribeConnection) == null ? void 0 : i3.selectedCandidatePair) == null ? void 0 : r3.local) == null ? void 0 : s3.candidate}; remote candidate - ${(l3 = (n3 = (o3 = this.subscribeConnection) == null ? void 0 : o3.selectedCandidatePair) == null ? void 0 : n3.remote) == null ? void 0 : l3.candidate}`))), e2 === "disconnected" && setTimeout(() => {
29039
29067
  var u3, p3, h2, T, g2, v2, E2;
29040
29068
  ((u3 = this.subscribeConnection) == null ? void 0 : u3.connectionState) === "disconnected" && this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEDisconnected("SUBSCRIBE", `local candidate - ${(T = (h2 = (p3 = this.subscribeConnection) == null ? void 0 : p3.selectedCandidatePair) == null ? void 0 : h2.local) == null ? void 0 : T.candidate}; remote candidate - ${(E2 = (v2 = (g2 = this.subscribeConnection) == null ? void 0 : g2.selectedCandidatePair) == null ? void 0 : v2.remote) == null ? void 0 : E2.candidate}`));
29041
29069
  }, 5e3), e2 === "connected" && this.handleSubscribeConnectionConnected();
@@ -29047,7 +29075,7 @@ var init_dist = __esm({
29047
29075
  (t3 = this.connectivityListener) == null || t3.onSelectedICECandidatePairChange(e2, false);
29048
29076
  } };
29049
29077
  this.handleLocalRoleUpdate = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
29050
- !this.doesRoleNeedWebRTC(e2) && this.doesRoleNeedWebRTC(t3) && (d2.d(I2, "Local peer role updated to webrtc role, creating PeerConnections and performing inital publish negotiation \u23F3"), this.createPeerConnections(), yield this.negotiateOnFirstPublish());
29078
+ !this.doesRoleNeedWebRTC(e2) && this.doesRoleNeedWebRTC(t3) && (d2.d(A2, "Local peer role updated to webrtc role, creating PeerConnections and performing inital publish negotiation \u23F3"), this.createPeerConnections(), yield this.negotiateOnFirstPublish());
29051
29079
  });
29052
29080
  this.retryPublishIceFailedTask = () => c2(this, null, function* () {
29053
29081
  if (this.publishConnection) {
@@ -29071,7 +29099,7 @@ var init_dist = __esm({
29071
29099
  });
29072
29100
  this.retrySignalDisconnectTask = () => c2(this, null, function* () {
29073
29101
  var t3;
29074
- d2.d(I2, "retrySignalDisconnectTask", { signalConnected: this.signal.isConnected }), this.signal.isConnected || (yield this.internalConnect(this.joinParameters.authToken, this.joinParameters.endpoint, this.joinParameters.peerId, this.joinParameters.iceServers));
29102
+ d2.d(A2, "retrySignalDisconnectTask", { signalConnected: this.signal.isConnected }), this.signal.isConnected || (yield this.internalConnect(this.joinParameters.authToken, this.joinParameters.endpoint, this.joinParameters.peerId, this.joinParameters.iceServers));
29075
29103
  let e2 = (t3 = this.store.getRoom()) != null && t3.joinedAt ? this.signal.isConnected && (yield this.retryPublishIceFailedTask()) : this.signal.isConnected;
29076
29104
  return this.signal.trackUpdate(this.trackStates), e2;
29077
29105
  });
@@ -29080,7 +29108,7 @@ var init_dist = __esm({
29080
29108
  let l2 = (h2, T) => c2(this, null, function* () {
29081
29109
  h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
29082
29110
  });
29083
- this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29111
+ this.retryScheduler = new sr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29084
29112
  var g2, v2;
29085
29113
  let T = ((v2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : v2.bitrate) || 0;
29086
29114
  this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
@@ -29105,24 +29133,24 @@ var init_dist = __esm({
29105
29133
  }
29106
29134
  join(e, t2, i2, r2, s2 = false, o2) {
29107
29135
  return c2(this, null, function* () {
29108
- d2.d(I2, "join: started \u23F0");
29136
+ d2.d(A2, "join: started \u23F0");
29109
29137
  try {
29110
- (!this.signal.isConnected || !this.initConfig) && (yield this.connect(e, r2, t2, i2, s2, o2)), this.validateNotDisconnected("connect"), this.initConfig && (yield this.waitForLocalRoleAvailability(), yield this.createConnectionsAndNegotiateJoin(i2, s2), yield this.initRtcStatsMonitor(), d2.d(I2, "\u2705 join: Negotiated over PUBLISH connection"));
29138
+ (!this.signal.isConnected || !this.initConfig) && (yield this.connect(e, r2, t2, i2, s2, o2)), this.validateNotDisconnected("connect"), this.initConfig && (yield this.waitForLocalRoleAvailability(), yield this.createConnectionsAndNegotiateJoin(i2, s2), yield this.initRtcStatsMonitor(), d2.d(A2, "\u2705 join: Negotiated over PUBLISH connection"));
29111
29139
  } catch (n2) {
29112
- d2.e(I2, `join: failed \u274C [token=${e}]`, n2), this.state = "Failed";
29140
+ d2.e(A2, `join: failed \u274C [token=${e}]`, n2), this.state = "Failed";
29113
29141
  let l2 = n2;
29114
29142
  throw l2.isTerminal = l2.isTerminal || l2.code === 500, yield this.observer.onStateChange(this.state, l2), l2;
29115
29143
  }
29116
- d2.d(I2, "\u2705 join: successful"), this.state = "Joined", this.observer.onStateChange(this.state);
29144
+ d2.d(A2, "\u2705 join: successful"), this.state = "Joined", this.observer.onStateChange(this.state);
29117
29145
  });
29118
29146
  }
29119
29147
  connect(e, t2, i2, r2, s2 = false, o2) {
29120
29148
  return c2(this, null, function* () {
29121
- this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
29149
+ this.setTransportStateForConnect(), this.joinParameters = new tr(e, i2, r2.name, r2.metaData, t2, s2, o2);
29122
29150
  try {
29123
29151
  return yield this.internalConnect(e, t2, i2, o2);
29124
29152
  } catch (n2) {
29125
- if (n2 instanceof f2 && ([k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, k2.WebSocketConnectionErrors.FAILED_TO_CONNECT, k2.WebSocketConnectionErrors.ABNORMAL_CLOSE, k2.APIErrors.ENDPOINT_UNREACHABLE].includes(n2.code) || n2.code.toString().startsWith("5") || n2.code.toString().startsWith("429"))) {
29153
+ if (n2 instanceof f2 && ([P4.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, P4.WebSocketConnectionErrors.FAILED_TO_CONNECT, P4.WebSocketConnectionErrors.ABNORMAL_CLOSE, P4.APIErrors.ENDPOINT_UNREACHABLE].includes(n2.code) || n2.code.toString().startsWith("5") || n2.code.toString().startsWith("429"))) {
29126
29154
  let u2 = () => c2(this, null, function* () {
29127
29155
  return yield this.internalConnect(e, t2, i2, o2), !!(this.initConfig && this.initConfig.endpoint);
29128
29156
  });
@@ -29135,18 +29163,18 @@ var init_dist = __esm({
29135
29163
  leave(e) {
29136
29164
  return c2(this, null, function* () {
29137
29165
  var t2, i2, r2, s2, o2;
29138
- this.retryScheduler.reset(), this.joinParameters = void 0, d2.d(I2, "leaving in transport");
29166
+ this.retryScheduler.reset(), this.joinParameters = void 0, d2.d(A2, "leaving in transport");
29139
29167
  try {
29140
29168
  let n2 = this.pluginUsageTracker.getPluginUsage("HMSKrispPlugin");
29141
29169
  if (n2 && this.eventBus.analytics.publish(y2.getKrispUsage(n2)), this.state = "Leaving", (t2 = this.publishStatsAnalytics) == null || t2.stop(), (i2 = this.subscribeStatsAnalytics) == null || i2.stop(), (r2 = this.webrtcInternals) == null || r2.cleanup(), yield (s2 = this.publishConnection) == null ? void 0 : s2.close(), yield (o2 = this.subscribeConnection) == null ? void 0 : o2.close(), e)
29142
29170
  try {
29143
- this.signal.leave(), d2.d(I2, "signal leave done");
29171
+ this.signal.leave(), d2.d(A2, "signal leave done");
29144
29172
  } catch (l2) {
29145
- d2.w(I2, "failed to send leave on websocket to server", l2);
29173
+ d2.w(A2, "failed to send leave on websocket to server", l2);
29146
29174
  }
29147
29175
  this.analyticsEventsService.flushFailedClientEvents(), this.analyticsEventsService.reset(), yield this.signal.close();
29148
29176
  } catch (n2) {
29149
- this.eventBus.analytics.publish(y2.disconnect(n2)), d2.e(I2, "leave: FAILED \u274C", n2);
29177
+ this.eventBus.analytics.publish(y2.disconnect(n2)), d2.e(A2, "leave: FAILED \u274C", n2);
29150
29178
  } finally {
29151
29179
  this.state = "Disconnected", this.observer.onStateChange(this.state);
29152
29180
  }
@@ -29173,25 +29201,25 @@ var init_dist = __esm({
29173
29201
  let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
29174
29202
  if (i2) {
29175
29203
  let r2 = new Nt(M2(m({}, i2), { mute: !e.enabled }));
29176
- 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]]));
29204
+ this.trackStates.set(i2.track_id, r2), d2.d(A2, "Track Update", this.trackStates, e), this.signal.trackUpdate(/* @__PURE__ */ new Map([[i2.track_id, r2]]));
29177
29205
  }
29178
29206
  }
29179
29207
  publishTrack(e) {
29180
29208
  return c2(this, null, function* () {
29181
- e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
29209
+ e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(A2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
29182
29210
  let t2 = new Promise((s2, o2) => {
29183
29211
  this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
29184
29212
  }), i2 = e.stream;
29185
29213
  i2.setConnection(this.publishConnection);
29186
29214
  let r2 = this.store.getSimulcastLayers(e.source);
29187
29215
  i2.addTransceiver(e, r2), d2.time(`publish-${e.trackId}-${e.type}`), yield t2, d2.timeEnd(`publish-${e.trackId}-${e.type}`), this.store.addTrack(e), yield i2.setMaxBitrateAndFramerate(e).then(() => {
29188
- d2.d(I2, `Setting maxBitrate=${e.settings.maxBitrate} kpbs${e instanceof F ? ` and maxFramerate=${e.settings.maxFramerate}` : ""} for ${e.source} ${e.type} ${e.trackId}`);
29189
- }).catch((s2) => d2.w(I2, "Failed setting maxBitrate and maxFramerate", s2)), e.isPublished = true, d2.d(I2, `\u2705 publishTrack: trackId=${e.trackId}`, `${e}`, this.callbacks);
29216
+ d2.d(A2, `Setting maxBitrate=${e.settings.maxBitrate} kpbs${e instanceof F ? ` and maxFramerate=${e.settings.maxFramerate}` : ""} for ${e.source} ${e.type} ${e.trackId}`);
29217
+ }).catch((s2) => d2.w(A2, "Failed setting maxBitrate and maxFramerate", s2)), e.isPublished = true, d2.d(A2, `\u2705 publishTrack: trackId=${e.trackId}`, `${e}`, this.callbacks);
29190
29218
  });
29191
29219
  }
29192
29220
  unpublishTrack(e) {
29193
29221
  return c2(this, null, function* () {
29194
- if (d2.d(I2, `\u23F3 unpublishTrack: trackId=${e.trackId}`, `${e}`), e.publishedTrackId && this.trackStates.has(e.publishedTrackId))
29222
+ if (d2.d(A2, `\u23F3 unpublishTrack: trackId=${e.trackId}`, `${e}`), e.publishedTrackId && this.trackStates.has(e.publishedTrackId))
29195
29223
  this.trackStates.delete(e.publishedTrackId);
29196
29224
  else {
29197
29225
  let s2 = Array.from(this.trackStates.values()).find((o2) => e.type === o2.type && e.source === o2.source);
@@ -29200,7 +29228,7 @@ var init_dist = __esm({
29200
29228
  let t2 = new Promise((r2, s2) => {
29201
29229
  this.callbacks.set(et, { promise: { resolve: r2, reject: s2 }, action: "UNPUBLISH", extra: {} });
29202
29230
  });
29203
- e.stream.removeSender(e), yield t2, yield e.cleanup(), this.store.removeTrack(e), d2.d(I2, `\u2705 unpublishTrack: trackId=${e.trackId}`, this.callbacks);
29231
+ e.stream.removeSender(e), yield t2, yield e.cleanup(), this.store.removeTrack(e), d2.d(A2, `\u2705 unpublishTrack: trackId=${e.trackId}`, this.callbacks);
29204
29232
  });
29205
29233
  }
29206
29234
  waitForLocalRoleAvailability() {
@@ -29223,8 +29251,8 @@ var init_dist = __esm({
29223
29251
  try {
29224
29252
  yield this.negotiateJoin({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 });
29225
29253
  } catch (o2) {
29226
- d2.e(I2, "Join negotiation failed \u274C", o2);
29227
- let n2 = o2 instanceof f2 ? o2 : S2.WebsocketMethodErrors.ServerErrors(500, "JOIN", `Websocket join error - ${o2.message}`), l2 = parseInt(`${n2.code / 100}`) === 5 || [k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, 429].includes(n2.code);
29254
+ d2.e(A2, "Join negotiation failed \u274C", o2);
29255
+ let n2 = o2 instanceof f2 ? o2 : S2.WebsocketMethodErrors.ServerErrors(500, "JOIN", `Websocket join error - ${o2.message}`), l2 = parseInt(`${n2.code / 100}`) === 5 || [P4.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, 429].includes(n2.code);
29228
29256
  if (n2.code === 410 && (n2.isTerminal = true), l2) {
29229
29257
  this.joinRetryCount = 0, n2.isTerminal = false;
29230
29258
  let u2 = () => c2(this, null, function* () {
@@ -29243,8 +29271,8 @@ var init_dist = __esm({
29243
29271
  }
29244
29272
  negotiateJoinWebRTC(r2) {
29245
29273
  return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2 }) {
29246
- if (d2.d(I2, "\u23F3 join: Negotiating over PUBLISH connection"), !this.publishConnection)
29247
- return d2.e(I2, "Publish peer connection not found, cannot negotiate"), false;
29274
+ if (d2.d(A2, "\u23F3 join: Negotiating over PUBLISH connection"), !this.publishConnection)
29275
+ return d2.e(A2, "Publish peer connection not found, cannot negotiate"), false;
29248
29276
  let s2 = yield this.publishConnection.createOffer();
29249
29277
  yield this.publishConnection.setLocalDescription(s2);
29250
29278
  let o2 = this.isFlagEnabled("subscribeDegradation"), n2 = this.isFlagEnabled("simulcast"), l2 = this.isFlagEnabled("onDemandTracks"), u2 = yield this.signal.join(e, t2, !i2, o2, n2, l2, s2);
@@ -29256,15 +29284,15 @@ var init_dist = __esm({
29256
29284
  }
29257
29285
  negotiateJoinNonWebRTC(r2) {
29258
29286
  return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2 }) {
29259
- d2.d(I2, "\u23F3 join: Negotiating Non-WebRTC");
29287
+ d2.d(A2, "\u23F3 join: Negotiating Non-WebRTC");
29260
29288
  let s2 = this.isFlagEnabled("subscribeDegradation"), o2 = this.isFlagEnabled("simulcast"), n2 = this.isFlagEnabled("onDemandTracks");
29261
29289
  return !!(yield this.signal.join(e, t2, !i2, s2, o2, n2));
29262
29290
  });
29263
29291
  }
29264
29292
  negotiateOnFirstPublish() {
29265
29293
  return c2(this, null, function* () {
29266
- if (d2.d(I2, "\u23F3 Negotiating offer over PUBLISH connection"), !this.publishConnection)
29267
- return d2.e(I2, "Publish peer connection not found, cannot negotiate"), false;
29294
+ if (d2.d(A2, "\u23F3 Negotiating offer over PUBLISH connection"), !this.publishConnection)
29295
+ return d2.e(A2, "Publish peer connection not found, cannot negotiate"), false;
29268
29296
  let e = yield this.publishConnection.createOffer(this.trackStates);
29269
29297
  yield this.publishConnection.setLocalDescription(e);
29270
29298
  let t2 = yield this.signal.offer(e, this.trackStates);
@@ -29276,21 +29304,21 @@ var init_dist = __esm({
29276
29304
  }
29277
29305
  performPublishRenegotiation(e) {
29278
29306
  return c2(this, null, function* () {
29279
- d2.d(I2, "\u23F3 [role=PUBLISH] onRenegotiationNeeded START", this.trackStates);
29307
+ d2.d(A2, "\u23F3 [role=PUBLISH] onRenegotiationNeeded START", this.trackStates);
29280
29308
  let t2 = this.callbacks.get(et);
29281
29309
  if (t2) {
29282
29310
  if (!this.publishConnection) {
29283
- d2.e(I2, "Publish peer connection not found, cannot renegotiate");
29311
+ d2.e(A2, "Publish peer connection not found, cannot renegotiate");
29284
29312
  return;
29285
29313
  }
29286
29314
  try {
29287
29315
  let i2 = yield this.publishConnection.createOffer(this.trackStates, e);
29288
29316
  yield this.publishConnection.setLocalDescription(i2), d2.time("renegotiation-offer-exchange");
29289
29317
  let r2 = yield this.signal.offer(i2, this.trackStates);
29290
- this.callbacks.delete(et), d2.timeEnd("renegotiation-offer-exchange"), yield this.publishConnection.setRemoteDescription(r2), t2.promise.resolve(true), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded DONE \u2705");
29318
+ this.callbacks.delete(et), d2.timeEnd("renegotiation-offer-exchange"), yield this.publishConnection.setRemoteDescription(r2), t2.promise.resolve(true), d2.d(A2, "[role=PUBLISH] onRenegotiationNeeded DONE \u2705");
29291
29319
  } catch (i2) {
29292
29320
  let r2;
29293
- i2 instanceof f2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
29321
+ i2 instanceof f2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(A2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
29294
29322
  }
29295
29323
  }
29296
29324
  });
@@ -29303,28 +29331,28 @@ var init_dist = __esm({
29303
29331
  internalConnect(e, t2, i2, r2) {
29304
29332
  return c2(this, null, function* () {
29305
29333
  var o2, n2, l2;
29306
- d2.d(I2, "connect: started \u23F0");
29334
+ d2.d(A2, "connect: started \u23F0");
29307
29335
  let s2 = /* @__PURE__ */ new Date();
29308
29336
  try {
29309
29337
  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);
29310
29338
  let u2 = this.store.getRoom();
29311
- 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;
29339
+ 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(A2, "Adding Analytics Transport: JsonRpcSignal"), this.analyticsEventsService.setTransport(this.analyticsSignalTransport), this.analyticsEventsService.flush(), this.initConfig;
29312
29340
  } catch (u2) {
29313
- throw this.state !== "Reconnecting" && this.eventBus.analytics.publish(y2.connect(u2, this.getAdditionalAnalyticsProperties(), s2, /* @__PURE__ */ new Date(), t2)), d2.e(I2, "\u274C internal connect: failed", u2), u2;
29341
+ throw this.state !== "Reconnecting" && this.eventBus.analytics.publish(y2.connect(u2, this.getAdditionalAnalyticsProperties(), s2, /* @__PURE__ */ new Date(), t2)), d2.e(A2, "\u274C internal connect: failed", u2), u2;
29314
29342
  }
29315
29343
  });
29316
29344
  }
29317
29345
  validateNotDisconnected(e) {
29318
29346
  if (this.state === "Disconnected")
29319
- throw d2.w(I2, "aborting join as transport state is disconnected"), S2.GenericErrors.ValidationFailed(`leave called before join could complete - stage=${e}`);
29347
+ throw d2.w(A2, "aborting join as transport state is disconnected"), S2.GenericErrors.ValidationFailed(`leave called before join could complete - stage=${e}`);
29320
29348
  }
29321
29349
  openSignal(e, t2) {
29322
29350
  return c2(this, null, function* () {
29323
29351
  if (!this.initConfig)
29324
29352
  throw S2.APIErrors.InitConfigNotAvailable("INIT", "Init Config not found");
29325
- d2.d(I2, "\u23F3 internal connect: connecting to ws endpoint", this.initConfig.endpoint);
29353
+ d2.d(A2, "\u23F3 internal connect: connecting to ws endpoint", this.initConfig.endpoint);
29326
29354
  let i2 = new URL(this.initConfig.endpoint);
29327
- i2.searchParams.set("peer", t2), i2.searchParams.set("token", e), i2.searchParams.set("user_agent_v2", this.store.getUserAgent()), i2.searchParams.set("protocol_version", Bs), i2.searchParams.set("protocol_spec", Vs), this.endpoint = i2.toString(), this.analyticsTimer.start("ws_connect_time"), yield this.signal.open(this.endpoint), this.analyticsTimer.end("ws_connect_time"), this.analyticsTimer.start("on_policy_change_time"), this.analyticsTimer.start("room_state_time"), d2.d(I2, "\u2705 internal connect: connected to ws endpoint");
29355
+ i2.searchParams.set("peer", t2), i2.searchParams.set("token", e), i2.searchParams.set("user_agent_v2", this.store.getUserAgent()), i2.searchParams.set("protocol_version", Vs), i2.searchParams.set("protocol_spec", Fs), this.endpoint = i2.toString(), this.analyticsTimer.start("ws_connect_time"), yield this.signal.open(this.endpoint), this.analyticsTimer.end("ws_connect_time"), this.analyticsTimer.start("on_policy_change_time"), this.analyticsTimer.start("room_state_time"), d2.d(A2, "\u2705 internal connect: connected to ws endpoint");
29328
29356
  });
29329
29357
  }
29330
29358
  initRtcStatsMonitor() {
@@ -29390,18 +29418,18 @@ var init_dist = __esm({
29390
29418
  }
29391
29419
  getAdditionalAnalyticsProperties() {
29392
29420
  var o2, n2, l2, u2, p2, h2, T, g2;
29393
- let e = Ua(), t2 = typeof document != "undefined" && document.hidden, i2 = this.store.getRemoteVideoTracks().filter((v2) => v2.degraded).length, r2 = (u2 = (l2 = (n2 = (o2 = this.getWebrtcInternals()) == null ? void 0 : o2.getCurrentStats()) == null ? void 0 : n2.getLocalPeerStats()) == null ? void 0 : l2.publish) == null ? void 0 : u2.bitrate, s2 = (g2 = (T = (h2 = (p2 = this.getWebrtcInternals()) == null ? void 0 : p2.getCurrentStats()) == null ? void 0 : h2.getLocalPeerStats()) == null ? void 0 : T.subscribe) == null ? void 0 : g2.bitrate;
29421
+ let e = Ba(), t2 = typeof document != "undefined" && document.hidden, i2 = this.store.getRemoteVideoTracks().filter((v2) => v2.degraded).length, r2 = (u2 = (l2 = (n2 = (o2 = this.getWebrtcInternals()) == null ? void 0 : o2.getCurrentStats()) == null ? void 0 : n2.getLocalPeerStats()) == null ? void 0 : l2.publish) == null ? void 0 : u2.bitrate, s2 = (g2 = (T = (h2 = (p2 = this.getWebrtcInternals()) == null ? void 0 : p2.getCurrentStats()) == null ? void 0 : h2.getLocalPeerStats()) == null ? void 0 : T.subscribe) == null ? void 0 : g2.bitrate;
29394
29422
  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 };
29395
29423
  }
29396
29424
  };
29397
- Va = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29398
- pr = class {
29425
+ Fa = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29426
+ hr = class {
29399
29427
  constructor() {
29400
29428
  this.TAG = "[HMSSdk]:";
29401
29429
  this.transportState = "Disconnected";
29402
29430
  this.analyticsTimer = new di();
29403
- this.sdkState = m({}, Va);
29404
- this.playlistSettings = { video: { bitrate: Lr }, audio: { bitrate: Dr } };
29431
+ this.sdkState = m({}, Fa);
29432
+ this.playlistSettings = { video: { bitrate: Dr }, audio: { bitrate: wr } };
29405
29433
  this.handleAutoplayError = (e) => {
29406
29434
  var t2, i2;
29407
29435
  (i2 = (t2 = this.errorListener) == null ? void 0 : t2.onError) == null || i2.call(t2, e);
@@ -29469,7 +29497,7 @@ var init_dist = __esm({
29469
29497
  var s2, o2, n2, l2;
29470
29498
  if (e.error && e.type) {
29471
29499
  let u2 = e.type.includes("audio") ? (s2 = this.localPeer) == null ? void 0 : s2.audioTrack : (o2 = this.localPeer) == null ? void 0 : o2.videoTrack;
29472
- (n2 = this.errorListener) == null || n2.onError(e.error), [k2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, k2.TracksErrors.DEVICE_IN_USE, k2.TracksErrors.DEVICE_NOT_AVAILABLE].includes(e.error.code) && u2 && (u2.setEnabled(false), (l2 = this.listener) == null || l2.onTrackUpdate(2, u2, this.localPeer));
29500
+ (n2 = this.errorListener) == null || n2.onError(e.error), [P4.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, P4.TracksErrors.DEVICE_IN_USE, P4.TracksErrors.DEVICE_NOT_AVAILABLE].includes(e.error.code) && u2 && (u2.setEnabled(false), (l2 = this.listener) == null || l2.onTrackUpdate(2, u2, this.localPeer));
29473
29501
  }
29474
29502
  })();
29475
29503
  };
@@ -29496,7 +29524,7 @@ var init_dist = __esm({
29496
29524
  };
29497
29525
  }
29498
29526
  initNotificationManager() {
29499
- this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29527
+ this.notificationManager || (this.notificationManager = new Zi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29500
29528
  }
29501
29529
  initStoreAndManagers(e) {
29502
29530
  var t2, i2;
@@ -29504,7 +29532,7 @@ var init_dist = __esm({
29504
29532
  (i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
29505
29533
  return;
29506
29534
  }
29507
- this.sdkState.isInitialised = true, this.store = new Ot(), this.eventBus = new Bt(), this.pluginUsageTracker = new Oi(this.eventBus), this.wakeLockManager = new _i(), this.networkTestManager = new wi(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 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 Yt(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 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);
29535
+ 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);
29508
29536
  }
29509
29537
  validateJoined(e) {
29510
29538
  if (!this.localPeer)
@@ -29626,7 +29654,7 @@ var init_dist = __esm({
29626
29654
  throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
29627
29655
  this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
29628
29656
  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);
29629
- (T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), Ae.resumeContext();
29657
+ (T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), Ie.resumeContext();
29630
29658
  let n2 = this.store.getConfig();
29631
29659
  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}`);
29632
29660
  try {
@@ -29642,7 +29670,7 @@ var init_dist = __esm({
29642
29670
  }
29643
29671
  cleanup() {
29644
29672
  var e, t2, i2;
29645
- this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(), z2.cleanup(), this.playlistManager.cleanup(), (e = this.wakeLockManager) == null || e.cleanup(), ve.cleanup(), this.notificationManager = void 0, d2.cleanup(), this.sdkState = m({}, Va), this.localPeer && ((t2 = this.localPeer.audioTrack) == null || t2.cleanup(), this.localPeer.audioTrack = void 0, (i2 = this.localPeer.videoTrack) == null || i2.cleanup(), this.localPeer.videoTrack = void 0), this.store.cleanup(), this.listener = void 0, this.roleChangeManager && this.eventBus.localRoleUpdate.unsubscribe(this.handleLocalRoleUpdate);
29673
+ this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(), z2.cleanup(), this.playlistManager.cleanup(), (e = this.wakeLockManager) == null || e.cleanup(), ve.cleanup(), this.notificationManager = void 0, d2.cleanup(), this.sdkState = m({}, Fa), this.localPeer && ((t2 = this.localPeer.audioTrack) == null || t2.cleanup(), this.localPeer.audioTrack = void 0, (i2 = this.localPeer.videoTrack) == null || i2.cleanup(), this.localPeer.videoTrack = void 0), this.store.cleanup(), this.listener = void 0, this.roleChangeManager && this.eventBus.localRoleUpdate.unsubscribe(this.handleLocalRoleUpdate);
29646
29674
  }
29647
29675
  leave(e) {
29648
29676
  return this.internalLeave(e);
@@ -29663,7 +29691,7 @@ var init_dist = __esm({
29663
29691
  return c2(this, null, function* () {
29664
29692
  let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
29665
29693
  this.analyticsTimer.start("GET_TOKEN");
29666
- 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();
29694
+ 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();
29667
29695
  if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
29668
29696
  throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
29669
29697
  let { token: o2 } = s2;
@@ -30120,9 +30148,9 @@ var init_dist = __esm({
30120
30148
  if (i2 === "videoplaylist") {
30121
30149
  let n2 = {};
30122
30150
  if (e.kind === "audio")
30123
- n2.maxBitrate = ((s2 = this.playlistSettings.audio) == null ? void 0 : s2.bitrate) || Dr;
30151
+ n2.maxBitrate = ((s2 = this.playlistSettings.audio) == null ? void 0 : s2.bitrate) || wr;
30124
30152
  else {
30125
- n2.maxBitrate = ((o2 = this.playlistSettings.video) == null ? void 0 : o2.bitrate) || Lr;
30153
+ n2.maxBitrate = ((o2 = this.playlistSettings.video) == null ? void 0 : o2.bitrate) || Dr;
30126
30154
  let { width: l2, height: u2 } = e.getSettings();
30127
30155
  n2.width = l2, n2.height = u2;
30128
30156
  }
@@ -30163,7 +30191,7 @@ var init_dist = __esm({
30163
30191
  constructor(e, t2, i2) {
30164
30192
  this.getStats = () => (this.stats || (this.stats = new Xt(this.store, this.sdk)), this.stats);
30165
30193
  this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
30166
- e ? this.store = e : this.store = a10.createNewHMSStore(Di("HMSStore"), ti), i2 ? this.notifications = i2 : this.notifications = new Pi(this.store), t2 ? this.actions = t2 : (this.sdk = new pr(), this.actions = new Li(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: vr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30194
+ 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);
30167
30195
  }
30168
30196
  triggerOnSubscribe() {
30169
30197
  this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
@@ -30240,22 +30268,22 @@ var init_dist = __esm({
30240
30268
  };
30241
30269
  }
30242
30270
  };
30243
- Ga = (a11, e, t2) => {
30271
+ Wa = (a11, e, t2) => {
30244
30272
  let i2;
30245
- t2.getState(re) === "Connected" && (i2 = Fa(a11, e, t2)), t2.subscribe((r2) => {
30246
- ["Connected", "Reconnecting"].includes(r2) ? i2 || (i2 = Fa(a11, e, t2)) : ["Disconnected", "Failed"].includes(r2) && i2 && (Mn(e, r2), i2(), i2 = void 0);
30247
- }, re);
30273
+ t2.getState(ie) === "Connected" && (i2 = Ga(a11, e, t2)), t2.subscribe((r2) => {
30274
+ ["Connected", "Reconnecting"].includes(r2) ? i2 || (i2 = Ga(a11, e, t2)) : ["Disconnected", "Failed"].includes(r2) && i2 && (yn(e, r2), i2(), i2 = void 0);
30275
+ }, ie);
30248
30276
  };
30249
- Fa = (a11, e, t2) => {
30277
+ Ga = (a11, e, t2) => {
30250
30278
  var s2, o2;
30251
- let i2 = fn2(t2, e);
30279
+ let i2 = vn2(t2, e);
30252
30280
  (s2 = a11.getWebrtcInternals()) == null || s2.start();
30253
- let r2 = (o2 = a11.getWebrtcInternals()) == null ? void 0 : o2.onStatsChange((n2) => vn2(e, n2, t2, a11));
30281
+ let r2 = (o2 = a11.getWebrtcInternals()) == null ? void 0 : o2.onStatsChange((n2) => Mn(e, n2, t2, a11));
30254
30282
  return () => {
30255
30283
  i2(), r2 && r2();
30256
30284
  };
30257
30285
  };
30258
- fn2 = (a11, e) => {
30286
+ vn2 = (a11, e) => {
30259
30287
  let t2, i2, r2;
30260
30288
  return a11.getState(ye) ? e.namedSetState((s2) => {
30261
30289
  s2.localPeer.id = a11.getState(ye);
@@ -30269,17 +30297,17 @@ var init_dist = __esm({
30269
30297
  s2 && e.namedSetState((o2) => {
30270
30298
  o2.localPeer.videoTrack = s2;
30271
30299
  }, "localpeer-videotrack-id");
30272
- }, X2), a11.getState(oe) ? e.namedSetState((s2) => {
30273
- s2.localPeer.audioTrack = a11.getState(oe);
30300
+ }, X2), a11.getState(ae) ? e.namedSetState((s2) => {
30301
+ s2.localPeer.audioTrack = a11.getState(ae);
30274
30302
  }, "localpeer-audiotrack-id") : r2 = a11.subscribe((s2) => {
30275
30303
  s2 && e.namedSetState((o2) => {
30276
30304
  o2.localPeer.audioTrack = s2;
30277
30305
  }, "localpeer-audiotrack-id");
30278
- }, oe), () => {
30306
+ }, ae), () => {
30279
30307
  t2 == null || t2(), i2 == null || i2(), r2 == null || r2();
30280
30308
  };
30281
30309
  };
30282
- vn2 = (a11, e, t2, i2) => {
30310
+ Mn = (a11, e, t2, i2) => {
30283
30311
  let r2 = t2.getState(N2);
30284
30312
  a11.namedSetState((s2) => {
30285
30313
  let o2 = t2.getState(ye), n2 = {}, l2 = Object.keys(r2).filter((p2) => r2[p2].peerId !== o2);
@@ -30287,12 +30315,12 @@ var init_dist = __esm({
30287
30315
  let h2 = e.getRemoteTrackStats(p2);
30288
30316
  h2 && (n2[p2] = h2);
30289
30317
  }
30290
- $r(s2.remoteTrackStats, n2);
30318
+ Kr(s2.remoteTrackStats, n2);
30291
30319
  let u2 = { [o2]: e.getLocalPeerStats() };
30292
- $r(s2.peerStats, u2), Ra(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
30320
+ Kr(s2.peerStats, u2), Aa(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
30293
30321
  }, "webrtc-stats");
30294
30322
  };
30295
- Mn = (a11, e = "resetState") => {
30323
+ yn = (a11, e = "resetState") => {
30296
30324
  a11.namedSetState((t2) => {
30297
30325
  Object.assign(t2, ii());
30298
30326
  }, e);
@@ -30301,31 +30329,31 @@ var init_dist = __esm({
30301
30329
  constructor(e, t2) {
30302
30330
  this.hmsStore = e;
30303
30331
  this.sdk = t2;
30304
- this.store = ut.createNewHMSStore(Di("HMSStatsStore"), ii), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30332
+ this.store = ut.createNewHMSStore(wi("HMSStatsStore"), ii), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30305
30333
  var r2, s2;
30306
- this.hmsStore.getState(re) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
30334
+ this.hmsStore.getState(ie) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
30307
30335
  var n2, l2;
30308
30336
  o2 === "Connected" && i2((l2 = (n2 = this.sdk) == null ? void 0 : n2.getWebrtcInternals()) == null ? void 0 : l2.getPublishPeerConnection());
30309
- }, re);
30337
+ }, ie);
30310
30338
  }), this.getSubscribePeerConnection = () => new Promise((i2) => {
30311
30339
  var r2, s2;
30312
- this.hmsStore.getState(re) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getSubscribePeerConnection()) : this.hmsStore.subscribe((o2) => {
30340
+ this.hmsStore.getState(ie) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getSubscribePeerConnection()) : this.hmsStore.subscribe((o2) => {
30313
30341
  var n2, l2;
30314
30342
  o2 === "Connected" && i2((l2 = (n2 = this.sdk) == null ? void 0 : n2.getWebrtcInternals()) == null ? void 0 : l2.getSubscribePeerConnection());
30315
- }, re);
30316
- }), this.sdk && Ga(this.sdk, this.store, this.hmsStore);
30317
- }
30318
- };
30319
- yn = (a11) => a11.localPeer.id;
30320
- kn = (a11) => a11.localPeer.audioTrack;
30321
- Pn = (a11) => a11.localPeer.videoTrack;
30322
- En = (a11, e) => e;
30323
- Wa = (a11, e) => e;
30324
- bn = (a11) => a11.remoteTrackStats;
30325
- $a = (a11) => a11.peerStats;
30326
- Xr = (a11) => a11.localTrackStats;
30327
- be = createSelector([$a, yn], (a11, e) => a11[e]);
30328
- Rn = createSelector(be, (a11) => {
30343
+ }, ie);
30344
+ }), this.sdk && Wa(this.sdk, this.store, this.hmsStore);
30345
+ }
30346
+ };
30347
+ kn = (a11) => a11.localPeer.id;
30348
+ Pn = (a11) => a11.localPeer.audioTrack;
30349
+ En = (a11) => a11.localPeer.videoTrack;
30350
+ bn = (a11, e) => e;
30351
+ $a = (a11, e) => e;
30352
+ Rn = (a11) => a11.remoteTrackStats;
30353
+ Ka = (a11) => a11.peerStats;
30354
+ Zr = (a11) => a11.localTrackStats;
30355
+ be = createSelector([Ka, kn], (a11, e) => a11[e]);
30356
+ An = createSelector(be, (a11) => {
30329
30357
  var e;
30330
30358
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.packetsLost;
30331
30359
  });
@@ -30333,45 +30361,45 @@ var init_dist = __esm({
30333
30361
  var e;
30334
30362
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.jitter;
30335
30363
  });
30336
- An = createSelector(be, (a11) => {
30364
+ Hn = createSelector(be, (a11) => {
30337
30365
  var e;
30338
30366
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.bitrate;
30339
30367
  });
30340
- Hn = createSelector(be, (a11) => {
30368
+ Cn = createSelector(be, (a11) => {
30341
30369
  var e;
30342
30370
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.bitrate;
30343
30371
  });
30344
- Cn = createSelector(be, (a11) => {
30372
+ Ln = createSelector(be, (a11) => {
30345
30373
  var e;
30346
30374
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.availableOutgoingBitrate;
30347
30375
  });
30348
- Ln = createSelector(be, (a11) => {
30376
+ Dn = createSelector(be, (a11) => {
30349
30377
  var e;
30350
30378
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.availableIncomingBitrate;
30351
30379
  });
30352
- Dn = createSelector(be, (a11) => {
30380
+ wn = createSelector(be, (a11) => {
30353
30381
  var e;
30354
30382
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.bytesSent;
30355
30383
  });
30356
- wn = createSelector(be, (a11) => {
30384
+ _n = createSelector(be, (a11) => {
30357
30385
  var e;
30358
30386
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.bytesReceived;
30359
30387
  });
30360
- _n = createSelector([$a, En], (a11, e) => e ? a11[e] : void 0);
30361
- Nn = createSelector([bn, Wa], (a11, e) => e ? a11[e] : void 0);
30362
- Zr = createSelector([Xr, Wa], (a11, e) => e ? a11[e] : void 0);
30363
- On = A2(_n);
30364
- xn = A2(Nn);
30365
- Un = createSelector([Xr, kn], (a11, e) => {
30388
+ Nn = createSelector([Ka, bn], (a11, e) => e ? a11[e] : void 0);
30389
+ On = createSelector([Rn, $a], (a11, e) => e ? a11[e] : void 0);
30390
+ es = createSelector([Zr, $a], (a11, e) => e ? a11[e] : void 0);
30391
+ xn = I2(Nn);
30392
+ Un = I2(On);
30393
+ Bn = createSelector([Zr, Pn], (a11, e) => {
30366
30394
  var t2;
30367
30395
  return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
30368
30396
  });
30369
- Bn = A2(createSelector(Zr, (a11) => a11 == null ? void 0 : a11[0]));
30370
- Vn = createSelector([Xr, Pn], (a11, e) => {
30397
+ Vn = I2(createSelector(es, (a11) => a11 == null ? void 0 : a11[0]));
30398
+ Fn = createSelector([Zr, En], (a11, e) => {
30371
30399
  var t2;
30372
30400
  return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
30373
30401
  });
30374
- Fn = A2(createSelector(Zr, (a11) => a11));
30402
+ Gn = I2(createSelector(es, (a11) => a11));
30375
30403
  }
30376
30404
  });
30377
30405
 
@@ -30649,7 +30677,7 @@ var init_StreamActions = __esm({
30649
30677
  };
30650
30678
  RecordingPauseStatus = () => {
30651
30679
  const recording = (0, import_react_sdk35.useHMSStore)(import_react_sdk35.selectRecordingState);
30652
- if (recording.hls && recording.hls.state === Es.PAUSED) {
30680
+ if (recording.hls && recording.hls.state === bs.PAUSED) {
30653
30681
  return /* @__PURE__ */ import_react77.default.createElement(
30654
30682
  Tooltip,
30655
30683
  {
@@ -36840,7 +36868,7 @@ var init_Chat = __esm({
36840
36868
  const listRef = (0, import_react149.useRef)(null);
36841
36869
  const hmsActions2 = (0, import_react_sdk73.useHMSActions)();
36842
36870
  const vanillaStore = (0, import_react_sdk73.useHMSVanillaStore)();
36843
- const { enabled: isChatEnabled = true } = (0, import_react_sdk73.useHMSStore)(Om("chatState" /* CHAT_STATE */)) || {};
36871
+ const { enabled: isChatEnabled = true } = (0, import_react_sdk73.useHMSStore)(xm("chatState" /* CHAT_STATE */)) || {};
36844
36872
  const isMobile = (0, import_react_use24.useMedia)(config.media.md);
36845
36873
  const isMobileHLSStream = useMobileHLSStream();
36846
36874
  const isLandscapeStream = useLandscapeHLSStream();
@@ -36930,7 +36958,7 @@ var init_Chat = __esm({
36930
36958
  scrollToBottom,
36931
36959
  listRef
36932
36960
  }) => {
36933
- const unreadCount = (0, import_react_sdk73.useHMSStore)(am);
36961
+ const unreadCount = (0, import_react_sdk73.useHMSStore)(om);
36934
36962
  if (!unreadCount || !listRef.current) {
36935
36963
  return null;
36936
36964
  }
@@ -38145,12 +38173,12 @@ var init_VBPicker = __esm({
38145
38173
  const [blurAmount, setBlurAmount] = (0, import_react159.useState)(VBHandler.getBlurAmount() || 0.5);
38146
38174
  const roomState = (0, import_react_sdk81.useHMSStore)(import_react_sdk81.selectRoomState);
38147
38175
  const isLargeRoom = (0, import_react_sdk81.useHMSStore)(import_react_sdk81.selectIsLargeRoom);
38148
- const isEffectsEnabled = (0, import_react_sdk81.useHMSStore)(fm);
38149
- const effectsKey = (0, import_react_sdk81.useHMSStore)(vm);
38176
+ const isEffectsEnabled = (0, import_react_sdk81.useHMSStore)(vm);
38177
+ const effectsKey = (0, import_react_sdk81.useHMSStore)(Mm);
38150
38178
  const isMobile = (0, import_react_use30.useMedia)(config.media.md);
38151
38179
  const [loadingEffects, setLoadingEffects] = useSetAppDataByKey(APP_DATA.loadingEffects);
38152
38180
  const isPluginAdded = (0, import_react_sdk81.useHMSStore)((0, import_react_sdk81.selectIsLocalVideoPluginPresent)(((_a8 = VBHandler) == null ? void 0 : _a8.getName()) || ""));
38153
- const background = (0, import_react_sdk81.useHMSStore)(Nm(APP_DATA.background));
38181
+ const background = (0, import_react_sdk81.useHMSStore)(Om(APP_DATA.background));
38154
38182
  const mediaList = backgroundMedia.length ? backgroundMedia.map((media) => media.url || "") : defaultMedia2;
38155
38183
  const inPreview = roomState === import_react_sdk81.HMSRoomState.Preview;
38156
38184
  const showVideoTile = isVideoOn && isLargeRoom && !inPreview;
@@ -40077,9 +40105,9 @@ var init_ScreenshareLayout = __esm({
40077
40105
  }
40078
40106
  });
40079
40107
 
40080
- // ../../../../../../../tmp/tmp-2808-fXB3CL0vj3pd/19030590e800/index.css
40081
- var init_e800 = __esm({
40082
- "../../../../../../../tmp/tmp-2808-fXB3CL0vj3pd/19030590e800/index.css"() {
40108
+ // ../../../../../../../tmp/tmp-2777-ppkSGwyjZwID/19035d7bbbe0/index.css
40109
+ var init_d7bbbe0 = __esm({
40110
+ "../../../../../../../tmp/tmp-2777-ppkSGwyjZwID/19035d7bbbe0/index.css"() {
40083
40111
  }
40084
40112
  });
40085
40113
 
@@ -40101,7 +40129,7 @@ var init_WhiteboardLayout = __esm({
40101
40129
  init_ProminenceLayout();
40102
40130
  init_useUISettings();
40103
40131
  init_constants();
40104
- init_e800();
40132
+ init_d7bbbe0();
40105
40133
  WhiteboardEmbed = () => {
40106
40134
  const isMobile = (0, import_react_use42.useMedia)(config.media.md);
40107
40135
  const { token, endpoint, zoomToContent } = (0, import_react_sdk93.useWhiteboard)(isMobile);
@@ -45047,14 +45075,12 @@ var init_App = __esm({
45047
45075
  const hmsActions2 = hms2.getActions();
45048
45076
  const hmsNotifications2 = hms2.getNotifications();
45049
45077
  const hmsStats2 = hms2.getStats();
45050
- const hmsDiagnostics2 = hms2.getDiagnosticsSDK();
45051
45078
  hms2.triggerOnSubscribe();
45052
45079
  reactiveStore.current = {
45053
45080
  hmsActions: hmsActions2,
45054
45081
  hmsStats: hmsStats2,
45055
45082
  hmsStore: hmsStore2,
45056
- hmsNotifications: hmsNotifications2,
45057
- hmsDiagnostics: hmsDiagnostics2
45083
+ hmsNotifications: hmsNotifications2
45058
45084
  };
45059
45085
  }, []);
45060
45086
  (0, import_react238.useEffect)(() => {
@@ -45310,6 +45336,10 @@ var init_components = __esm({
45310
45336
  activeStep: "video",
45311
45337
  setActiveStep: () => {
45312
45338
  return;
45339
+ },
45340
+ connectivityTested: false,
45341
+ setConnectivityTested: () => {
45342
+ return;
45313
45343
  }
45314
45344
  });
45315
45345
  TestContainer = ({ css: css2, children }) => {
@@ -45338,11 +45368,17 @@ var init_components = __esm({
45338
45368
  css: {
45339
45369
  py: "$8",
45340
45370
  px: "$10",
45371
+ position: "sticky",
45372
+ bottom: "0",
45373
+ background: "$background_dim",
45341
45374
  justifyContent: "space-between",
45342
45375
  alignItems: "center",
45343
45376
  borderTop: "1px solid $border_default",
45344
45377
  fontSize: "$sm",
45378
+ borderBottomLeftRadius: "$1",
45379
+ borderBottomRightRadius: "$1",
45345
45380
  lineHeight: "$sm",
45381
+ zIndex: 1001,
45346
45382
  "@lg": { flexDirection: "column", gap: "$8" }
45347
45383
  }
45348
45384
  },
@@ -45365,7 +45401,7 @@ var require_react_is_production_min = __commonJS({
45365
45401
  var f3 = b3 ? Symbol.for("react.strict_mode") : 60108;
45366
45402
  var g2 = b3 ? Symbol.for("react.profiler") : 60114;
45367
45403
  var h2 = b3 ? Symbol.for("react.provider") : 60109;
45368
- var k3 = b3 ? Symbol.for("react.context") : 60110;
45404
+ var k2 = b3 ? Symbol.for("react.context") : 60110;
45369
45405
  var l2 = b3 ? Symbol.for("react.async_mode") : 60111;
45370
45406
  var m2 = b3 ? Symbol.for("react.concurrent_mode") : 60111;
45371
45407
  var n2 = b3 ? Symbol.for("react.forward_ref") : 60112;
@@ -45392,7 +45428,7 @@ var require_react_is_production_min = __commonJS({
45392
45428
  return a11;
45393
45429
  default:
45394
45430
  switch (a11 = a11 && a11.$$typeof, a11) {
45395
- case k3:
45431
+ case k2:
45396
45432
  case n2:
45397
45433
  case t2:
45398
45434
  case r2:
@@ -45412,7 +45448,7 @@ var require_react_is_production_min = __commonJS({
45412
45448
  }
45413
45449
  exports.AsyncMode = l2;
45414
45450
  exports.ConcurrentMode = m2;
45415
- exports.ContextConsumer = k3;
45451
+ exports.ContextConsumer = k2;
45416
45452
  exports.ContextProvider = h2;
45417
45453
  exports.Element = c3;
45418
45454
  exports.ForwardRef = n2;
@@ -45428,7 +45464,7 @@ var require_react_is_production_min = __commonJS({
45428
45464
  };
45429
45465
  exports.isConcurrentMode = A3;
45430
45466
  exports.isContextConsumer = function(a11) {
45431
- return z3(a11) === k3;
45467
+ return z3(a11) === k2;
45432
45468
  };
45433
45469
  exports.isContextProvider = function(a11) {
45434
45470
  return z3(a11) === h2;
@@ -45461,7 +45497,7 @@ var require_react_is_production_min = __commonJS({
45461
45497
  return z3(a11) === p2;
45462
45498
  };
45463
45499
  exports.isValidElementType = function(a11) {
45464
- return "string" === typeof a11 || "function" === typeof a11 || a11 === e || a11 === m2 || a11 === g2 || a11 === f3 || a11 === p2 || a11 === q3 || "object" === typeof a11 && null !== a11 && (a11.$$typeof === t2 || a11.$$typeof === r2 || a11.$$typeof === h2 || a11.$$typeof === k3 || a11.$$typeof === n2 || a11.$$typeof === w2 || a11.$$typeof === x2 || a11.$$typeof === y3 || a11.$$typeof === v2);
45500
+ return "string" === typeof a11 || "function" === typeof a11 || a11 === e || a11 === m2 || a11 === g2 || a11 === f3 || a11 === p2 || a11 === q3 || "object" === typeof a11 && null !== a11 && (a11.$$typeof === t2 || a11.$$typeof === r2 || a11.$$typeof === h2 || a11.$$typeof === k2 || a11.$$typeof === n2 || a11.$$typeof === w2 || a11.$$typeof === x2 || a11.$$typeof === y3 || a11.$$typeof === v2);
45465
45501
  };
45466
45502
  exports.typeOf = z3;
45467
45503
  }
@@ -46404,18 +46440,23 @@ var init_AudioTest = __esm({
46404
46440
  init_hms();
46405
46441
  init_useAudioOutputTest();
46406
46442
  init_constants();
46407
- SelectContainer = ({ children }) => /* @__PURE__ */ import_react241.default.createElement(Box, { css: { w: "50%", "@lg": { w: "100%" } } }, children);
46443
+ SelectContainer = ({ children }) => /* @__PURE__ */ import_react241.default.createElement(Box, { css: { w: "calc(50% - 0.75rem)", "@lg": { w: "100%" } } }, children);
46408
46444
  MicTest = () => {
46445
+ var _a8, _b7;
46409
46446
  const devices = (0, import_react_sdk128.useHMSStore)(import_react_sdk128.selectDevices);
46410
46447
  const [isRecording, setIsRecording] = (0, import_react241.useState)(false);
46411
46448
  const { audioInputDeviceId } = (0, import_react_sdk128.useHMSStore)(import_react_sdk128.selectLocalMediaSettings);
46412
- const [selectedMic, setSelectedMic] = (0, import_react241.useState)(audioInputDeviceId || "default");
46449
+ const [selectedMic, setSelectedMic] = (0, import_react241.useState)(audioInputDeviceId || ((_a8 = devices.audioInput[0]) == null ? void 0 : _a8.deviceId));
46413
46450
  const trackID = (0, import_react_sdk128.useHMSStore)(import_react_sdk128.selectLocalAudioTrackID);
46414
46451
  const audioLevel = (0, import_react_sdk128.useHMSStore)((0, import_react_sdk128.selectTrackAudioByID)(trackID));
46452
+ const { audioOutputDeviceId } = (0, import_react_sdk128.useHMSStore)(import_react_sdk128.selectLocalMediaSettings);
46453
+ const { playing, setPlaying, audioRef } = useAudioOutputTest({
46454
+ deviceId: audioOutputDeviceId || ((_b7 = devices.audioOutput[0]) == null ? void 0 : _b7.deviceId)
46455
+ });
46415
46456
  return /* @__PURE__ */ import_react241.default.createElement(SelectContainer, null, /* @__PURE__ */ import_react241.default.createElement(
46416
46457
  DeviceSelector2,
46417
46458
  {
46418
- title: "Microphone(Input)",
46459
+ title: "Microphone (Input)",
46419
46460
  devices: devices.audioInput,
46420
46461
  selection: selectedMic,
46421
46462
  icon: /* @__PURE__ */ import_react241.default.createElement(import_react_icons110.MicOnIcon, null),
@@ -46428,6 +46469,8 @@ var init_AudioTest = __esm({
46428
46469
  ), /* @__PURE__ */ import_react241.default.createElement(Flex, { css: { gap: "$6", alignItems: "center" } }, /* @__PURE__ */ import_react241.default.createElement(
46429
46470
  Button,
46430
46471
  {
46472
+ variant: "standard",
46473
+ icon: true,
46431
46474
  onClick: () => hmsDiagnostics.startMicCheck(selectedMic, () => {
46432
46475
  setIsRecording(false);
46433
46476
  }).then(() => {
@@ -46435,8 +46478,33 @@ var init_AudioTest = __esm({
46435
46478
  }),
46436
46479
  disabled: isRecording
46437
46480
  },
46481
+ /* @__PURE__ */ import_react241.default.createElement(import_react_icons110.MicOnIcon, null),
46438
46482
  isRecording ? "Recording..." : "Record"
46439
- ), isRecording && /* @__PURE__ */ import_react241.default.createElement(import_react241.default.Fragment, null, /* @__PURE__ */ import_react241.default.createElement(Text, null, /* @__PURE__ */ import_react241.default.createElement(import_react_icons110.MicOnIcon, null)), /* @__PURE__ */ import_react241.default.createElement(Progress.Root, { value: audioLevel, css: { h: "$2" } }, /* @__PURE__ */ import_react241.default.createElement(
46483
+ ), /* @__PURE__ */ import_react241.default.createElement(
46484
+ Button,
46485
+ {
46486
+ icon: true,
46487
+ variant: "standard",
46488
+ outlined: hmsDiagnostics.getRecordedAudio() === TEST_AUDIO_URL,
46489
+ onClick: () => {
46490
+ if (audioRef.current) {
46491
+ audioRef.current.src = hmsDiagnostics.getRecordedAudio() || "";
46492
+ audioRef.current.play();
46493
+ }
46494
+ },
46495
+ disabled: playing || hmsDiagnostics.getRecordedAudio() === TEST_AUDIO_URL
46496
+ },
46497
+ /* @__PURE__ */ import_react241.default.createElement(import_react_icons110.SpeakerIcon, null),
46498
+ playing ? "Playing..." : "Playback"
46499
+ ), /* @__PURE__ */ import_react241.default.createElement(
46500
+ "audio",
46501
+ {
46502
+ ref: audioRef,
46503
+ onEnded: () => setPlaying(false),
46504
+ onPlay: () => setPlaying(true),
46505
+ style: { display: "none" }
46506
+ }
46507
+ )), /* @__PURE__ */ import_react241.default.createElement(Flex, { align: "center", css: { mt: "$4", maxWidth: "10rem", opacity: isRecording ? "1" : "0", gap: "$4" } }, /* @__PURE__ */ import_react241.default.createElement(Text, null, /* @__PURE__ */ import_react241.default.createElement(import_react_icons110.MicOnIcon, null)), /* @__PURE__ */ import_react241.default.createElement(Progress.Root, { value: audioLevel, css: { h: "$2" } }, /* @__PURE__ */ import_react241.default.createElement(
46440
46508
  Progress.Content,
46441
46509
  {
46442
46510
  style: {
@@ -46444,45 +46512,27 @@ var init_AudioTest = __esm({
46444
46512
  transition: "transform 0.3s"
46445
46513
  }
46446
46514
  }
46447
- )))));
46515
+ ))));
46448
46516
  };
46449
46517
  SpeakerTest = () => {
46518
+ var _a8;
46450
46519
  const actions = (0, import_react_sdk128.useHMSActions)();
46451
46520
  const devices = (0, import_react_sdk128.useHMSStore)(import_react_sdk128.selectDevices);
46452
46521
  const { audioOutputDeviceId } = (0, import_react_sdk128.useHMSStore)(import_react_sdk128.selectLocalMediaSettings);
46453
- const { playing, setPlaying, audioRef } = useAudioOutputTest({ deviceId: audioOutputDeviceId || "default" });
46522
+ if (devices.audioOutput.length === 0) {
46523
+ return /* @__PURE__ */ import_react241.default.createElement(import_react241.default.Fragment, null);
46524
+ }
46454
46525
  return /* @__PURE__ */ import_react241.default.createElement(SelectContainer, null, /* @__PURE__ */ import_react241.default.createElement(
46455
46526
  DeviceSelector2,
46456
46527
  {
46457
- title: "Speaker(output)",
46528
+ title: "Speaker (Output)",
46458
46529
  devices: devices.audioOutput,
46459
- selection: audioOutputDeviceId || "default",
46530
+ selection: audioOutputDeviceId || ((_a8 = devices.audioOutput[0]) == null ? void 0 : _a8.deviceId),
46460
46531
  icon: /* @__PURE__ */ import_react241.default.createElement(import_react_icons110.SpeakerIcon, null),
46461
46532
  onChange: (deviceId) => {
46462
46533
  actions.setAudioOutputDevice(deviceId);
46463
46534
  }
46464
46535
  }
46465
- ), /* @__PURE__ */ import_react241.default.createElement(
46466
- Button,
46467
- {
46468
- onClick: () => {
46469
- if (audioRef.current) {
46470
- audioRef.current.src = hmsDiagnostics.getRecordedAudio() || TEST_AUDIO_URL;
46471
- audioRef.current.play();
46472
- }
46473
- },
46474
- disabled: playing
46475
- },
46476
- /* @__PURE__ */ import_react241.default.createElement(import_react_icons110.SpeakerIcon, null),
46477
- /* @__PURE__ */ import_react241.default.createElement(Text, { css: { ml: "$4" } }, playing ? "Playing" : "Playback")
46478
- ), /* @__PURE__ */ import_react241.default.createElement(
46479
- "audio",
46480
- {
46481
- ref: audioRef,
46482
- onEnded: () => setPlaying(false),
46483
- onPlay: () => setPlaying(true),
46484
- style: { display: "none" }
46485
- }
46486
46536
  ));
46487
46537
  };
46488
46538
  AudioTest = () => {
@@ -46490,7 +46540,7 @@ var init_AudioTest = __esm({
46490
46540
  (0, import_react241.useEffect)(() => {
46491
46541
  hmsDiagnostics.requestPermission({ audio: true }).catch((error2) => setError(error2));
46492
46542
  }, []);
46493
- return /* @__PURE__ */ import_react241.default.createElement(import_react241.default.Fragment, null, /* @__PURE__ */ import_react241.default.createElement(TestContainer, null, /* @__PURE__ */ import_react241.default.createElement(Text, { variant: "body2", css: { c: "$on_primary_medium" } }, "Record an audio clip and play it back to check that your microphone and speaker are working. If they aren't, make sure your volume is turned up, try a different speaker or microphone, or check your bluetooth settings."), /* @__PURE__ */ import_react241.default.createElement(
46543
+ return /* @__PURE__ */ import_react241.default.createElement(import_react241.default.Fragment, null, /* @__PURE__ */ import_react241.default.createElement(TestContainer, null, /* @__PURE__ */ import_react241.default.createElement(Text, { variant: "body2", css: { c: "$on_primary_medium" } }, "Record a 10 second audio clip and play it back to check that your microphone and speaker are working. If they aren't, make sure your volume is turned up, try a different speaker or microphone, or check your bluetooth settings."), /* @__PURE__ */ import_react241.default.createElement(
46494
46544
  Flex,
46495
46545
  {
46496
46546
  css: {
@@ -46585,6 +46635,11 @@ var init_BrowserTest = __esm({
46585
46635
  val: "Safari",
46586
46636
  icon: `${CMS_MEDIA_SERVER}cms/Safari_254e74ed94/Safari_254e74ed94.svg`
46587
46637
  },
46638
+ "mobile safari": {
46639
+ key: "safari",
46640
+ val: "Safari",
46641
+ icon: `${CMS_MEDIA_SERVER}cms/Safari_254e74ed94/Safari_254e74ed94.svg`
46642
+ },
46588
46643
  edge: {
46589
46644
  key: "edge",
46590
46645
  val: "Edge",
@@ -46596,9 +46651,9 @@ var init_BrowserTest = __esm({
46596
46651
  icon: `${CMS_MEDIA_SERVER}cms/Opera_0f3bf4eb19/Opera_0f3bf4eb19.svg`
46597
46652
  }
46598
46653
  };
46599
- CheckDetails = ({ title, value, iconURL }) => /* @__PURE__ */ import_react242.default.createElement(Box, { css: { w: "100%", my: "$10", p: "$10", r: "$1", bg: "$surface_default", "@lg": { w: "auto" } } }, /* @__PURE__ */ import_react242.default.createElement(Text, { css: { c: "$on_primary_medium", mb: "$6" } }, title), /* @__PURE__ */ import_react242.default.createElement(Flex, { align: "center" }, iconURL && /* @__PURE__ */ import_react242.default.createElement(Box, { css: { size: "2rem", r: "$round", bg: "$surface_brighter" } }, /* @__PURE__ */ import_react242.default.createElement("img", { style: { objectFit: "contain", width: "2rem" }, src: iconURL, alt: value })), /* @__PURE__ */ import_react242.default.createElement(Text, { css: { ml: "$4" } }, value)));
46654
+ CheckDetails = ({ title, value, iconURL }) => /* @__PURE__ */ import_react242.default.createElement(Box, { css: { w: "100%", my: "$10", p: "$10", r: "$1", bg: "$surface_default", "@lg": { w: "auto" } } }, /* @__PURE__ */ import_react242.default.createElement(Text, { css: { c: "$on_primary_medium", mb: "$6" } }, title), /* @__PURE__ */ import_react242.default.createElement(Flex, { align: "center" }, iconURL && /* @__PURE__ */ import_react242.default.createElement(Box, { css: { size: "2rem", r: "$round", bg: "$surface_brighter", mr: "$4" } }, /* @__PURE__ */ import_react242.default.createElement("img", { style: { objectFit: "contain", width: "2rem" }, src: iconURL, alt: value })), /* @__PURE__ */ import_react242.default.createElement(Text, null, value)));
46600
46655
  BrowserTest = () => {
46601
- var _a8, _b7;
46656
+ var _a8, _b7, _c, _d;
46602
46657
  const [error, setError] = (0, import_react242.useState)();
46603
46658
  (0, import_react242.useEffect)(() => {
46604
46659
  try {
@@ -46611,14 +46666,14 @@ var init_BrowserTest = __esm({
46611
46666
  CheckDetails,
46612
46667
  {
46613
46668
  title: "Browser",
46614
- iconURL: import_react_sdk129.parsedUserAgent.getBrowser().name && browserTypeIconInfo[(_a8 = import_react_sdk129.parsedUserAgent.getBrowser().name) == null ? void 0 : _a8.toLowerCase()].icon,
46669
+ iconURL: import_react_sdk129.parsedUserAgent.getBrowser().name && ((_b7 = browserTypeIconInfo[(_a8 = import_react_sdk129.parsedUserAgent.getBrowser().name) == null ? void 0 : _a8.toLowerCase()]) == null ? void 0 : _b7.icon),
46615
46670
  value: `${import_react_sdk129.parsedUserAgent.getBrowser().name} ${import_react_sdk129.parsedUserAgent.getBrowser().version}`
46616
46671
  }
46617
46672
  ), /* @__PURE__ */ import_react242.default.createElement(
46618
46673
  CheckDetails,
46619
46674
  {
46620
46675
  title: "Operating system",
46621
- iconURL: import_react_sdk129.parsedUserAgent.getOS().name && operatingSystemIconInfo[(_b7 = import_react_sdk129.parsedUserAgent.getOS().name) == null ? void 0 : _b7.toLowerCase()].icon,
46676
+ iconURL: import_react_sdk129.parsedUserAgent.getOS().name && ((_d = operatingSystemIconInfo[(_c = import_react_sdk129.parsedUserAgent.getOS().name) == null ? void 0 : _c.toLowerCase()]) == null ? void 0 : _d.icon),
46622
46677
  value: `${import_react_sdk129.parsedUserAgent.getOS().name} ${import_react_sdk129.parsedUserAgent.getOS().version}`
46623
46678
  }
46624
46679
  )), /* @__PURE__ */ import_react242.default.createElement(TestFooter, { error, ctaText: "Is your device information correct?" }));
@@ -46793,11 +46848,13 @@ var init_ConnectivityTest = __esm({
46793
46848
  ));
46794
46849
  };
46795
46850
  ConnectivityTest = () => {
46851
+ const { setConnectivityTested } = (0, import_react243.useContext)(DiagnosticsContext);
46796
46852
  const [region, setRegion] = (0, import_react243.useState)(Object.keys(Regions)[0]);
46797
46853
  const [error, setError] = (0, import_react243.useState)();
46798
46854
  const [progress, setProgress] = (0, import_react243.useState)();
46799
46855
  const [result, setResult] = (0, import_react243.useState)();
46800
46856
  const startTest = () => {
46857
+ setConnectivityTested(false);
46801
46858
  setError(void 0);
46802
46859
  setResult(void 0);
46803
46860
  hmsDiagnostics.startConnectivityCheck(
@@ -46805,6 +46862,7 @@ var init_ConnectivityTest = __esm({
46805
46862
  setProgress(state);
46806
46863
  },
46807
46864
  (result2) => {
46865
+ setConnectivityTested(true);
46808
46866
  setResult(result2);
46809
46867
  },
46810
46868
  region
@@ -46862,10 +46920,10 @@ var init_VideoTest = __esm({
46862
46920
  StyledVideoTile.Container,
46863
46921
  {
46864
46922
  css: {
46865
- w: "90%",
46866
- height: "$48",
46923
+ width: "90%",
46924
+ aspectRatio: "16/9",
46867
46925
  mr: "$10",
46868
- "@lg": { mr: 0, mb: "$10" }
46926
+ "@lg": { mr: 0, mb: "$10", aspectRatio: "1/1" }
46869
46927
  }
46870
46928
  },
46871
46929
  /* @__PURE__ */ import_react244.default.createElement(Video, { mirror: true, trackId: trackID })
@@ -46914,8 +46972,8 @@ var init_Diagnostics = __esm({
46914
46972
  Box,
46915
46973
  {
46916
46974
  css: {
46917
- px: "155px",
46918
- py: "160px",
46975
+ px: "120px",
46976
+ py: "120px",
46919
46977
  bg: "$background_dim",
46920
46978
  lineHeight: "1.5",
46921
46979
  "-webkit-text-size-adjust": "100%",
@@ -46947,28 +47005,29 @@ var init_Diagnostics = __esm({
46947
47005
  return /* @__PURE__ */ import_react245.default.createElement(Flex, { css: { py: "$8", px: "$10", alignItems: "center", borderBottom: "1px solid $border_default" } }, /* @__PURE__ */ import_react245.default.createElement(Text, { css: { c: "$primary_bright", mt: "$xs" } }, DiagnosticsStepIcon[activeStep]), /* @__PURE__ */ import_react245.default.createElement(Text, { css: { fontSize: "$h6", ml: "$9" } }, DiagnosticsSteps[activeStep]));
46948
47006
  };
46949
47007
  DiagnosticsStep = () => {
46950
- return /* @__PURE__ */ import_react245.default.createElement(Box, { css: { border: "1px solid $border_default", r: "$1", w: "75%", "@lg": { w: "100%" } } }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStepHeader, null), /* @__PURE__ */ import_react245.default.createElement(Box, { css: { maxHeight: "55vh", overflowY: "auto" } }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStepTest, null)));
47008
+ return /* @__PURE__ */ import_react245.default.createElement(Box, { css: { border: "1px solid $border_default", r: "$1", w: "75%", maxWidth: "65rem", "@lg": { w: "100%" } } }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStepHeader, null), /* @__PURE__ */ import_react245.default.createElement(Box, { css: { maxHeight: "55vh", overflowY: "auto" } }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStepTest, null)));
46951
47009
  };
46952
47010
  DiagnosticsStepsList = () => {
46953
- const { activeStep } = (0, import_react245.useContext)(DiagnosticsContext);
47011
+ const { activeStep, connectivityTested } = (0, import_react245.useContext)(DiagnosticsContext);
46954
47012
  return /* @__PURE__ */ import_react245.default.createElement(Box, { css: { w: "25%", "@lg": { display: "none" } } }, Object.keys(DiagnosticsSteps).map((key) => {
46955
47013
  const keys = Object.keys(DiagnosticsSteps);
46956
47014
  const activeStepIndex = keys.indexOf(activeStep);
46957
47015
  const keyIndex = keys.indexOf(key);
46958
- const isStepCompleted = activeStepIndex > keyIndex;
47016
+ const isStepCompleted = activeStepIndex > keyIndex || activeStep === "connectivity" && connectivityTested;
46959
47017
  let color = "$on_primary_low";
46960
- if (isStepCompleted) {
46961
- color = "$primary_bright";
46962
- }
46963
47018
  if (activeStep === key) {
46964
47019
  color = "$on_primary_high";
46965
47020
  }
46966
- return /* @__PURE__ */ import_react245.default.createElement(Flex, { css: { mb: "$10", c: color, gap: "$4", alignItems: "center" } }, isStepCompleted ? /* @__PURE__ */ import_react245.default.createElement(import_react_icons113.CheckCircleIcon, { width: "1rem", height: "1rem" }) : /* @__PURE__ */ import_react245.default.createElement(Text, { css: { c: color, fontSize: "1.75rem" } }, "\u2022"), /* @__PURE__ */ import_react245.default.createElement(Text, { css: { c: color } }, DiagnosticsSteps[key]));
47021
+ if (isStepCompleted) {
47022
+ color = "$primary_bright";
47023
+ }
47024
+ return /* @__PURE__ */ import_react245.default.createElement(Flex, { key, css: { mb: "$10", c: color, gap: "$4", alignItems: "center" } }, isStepCompleted ? /* @__PURE__ */ import_react245.default.createElement(import_react_icons113.CheckCircleIcon, { width: "1rem", height: "1rem" }) : /* @__PURE__ */ import_react245.default.createElement(Text, { css: { c: color, fontSize: "1.75rem" } }, "\u2022"), /* @__PURE__ */ import_react245.default.createElement(Text, { css: { c: color } }, DiagnosticsSteps[key]));
46967
47025
  }));
46968
47026
  };
46969
47027
  Diagnostics = () => {
46970
47028
  const [activeStep, setActiveStep] = import_react245.default.useState(Object.keys(DiagnosticsSteps)[0]);
46971
- return /* @__PURE__ */ import_react245.default.createElement(import_react_sdk132.HMSRoomProvider, { store: hmsStore, actions: hmsActions, notifications: hmsNotifications, stats: hmsStats }, /* @__PURE__ */ import_react245.default.createElement(HMSThemeProvider, { themeType: "default" }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsContext.Provider, { value: { activeStep, setActiveStep } }, /* @__PURE__ */ import_react245.default.createElement(Container5, null, /* @__PURE__ */ import_react245.default.createElement(Text, { variant: "h4" }, "Pre-call Test"), /* @__PURE__ */ import_react245.default.createElement(Text, { variant: "md", css: { c: "$on_primary_medium" } }, "Make sure your devices and network are good to go, let's get started."), /* @__PURE__ */ import_react245.default.createElement(Flex, { css: { direction: "column", mt: "$12", justifyItems: "center" } }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStepsList, null), /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStep, null))))));
47029
+ const [connectivityTested, setConnectivityTested] = import_react245.default.useState(false);
47030
+ return /* @__PURE__ */ import_react245.default.createElement(import_react_sdk132.HMSRoomProvider, { store: hmsStore, actions: hmsActions, notifications: hmsNotifications, stats: hmsStats }, /* @__PURE__ */ import_react245.default.createElement(HMSThemeProvider, { themeType: "default" }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsContext.Provider, { value: { activeStep, setActiveStep, connectivityTested, setConnectivityTested } }, /* @__PURE__ */ import_react245.default.createElement(Container5, null, /* @__PURE__ */ import_react245.default.createElement(Text, { variant: "h4" }, "Pre-call Test"), /* @__PURE__ */ import_react245.default.createElement(Text, { variant: "md", css: { c: "$on_primary_medium" } }, "Make sure your devices and network are good to go, let's get started."), /* @__PURE__ */ import_react245.default.createElement(Flex, { css: { direction: "column", mt: "$12", justifyItems: "center" } }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStepsList, null), /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStep, null))))));
46972
47031
  };
46973
47032
  }
46974
47033
  });