diff --git a/.gitignore b/.gitignore index 223e061..58e9255 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,138 @@ - *.iml .gradle -.idea -.kotlin +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml .DS_Store -build -*/build -captures +/build +/captures .externalNativeBuild -.cxx +**/.cxx local.properties -xcuserdata/ -Pods/ -*.jks -*yarn.lock +# Created by .ignore support plugin (hsz.mobi) +### NetBeans template +nbproject/private/ +build/ +nbbuild/ +dist/ +nbdist/ +nbactions.xml +nb-configuration.xml + +# Mac OS X Garbage +.DS_Store +Thumbs.db + +.idea/ + +### Android Studio +/jniLibs +mobile/mobile.iml +mobile/mobile.iml +tv/tv.iml +app/app.iml +app/*.iml +*.iml +mobile/*.iml +tv/*.iml +.idea/workspace.xml +.idea/libraries +.idea/ +.idea +/build +/captures +### Android template +# Built application files +*.apk +*.ap_ +/build +/captures +# Files for the Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ + +# Gradle files +.gradle/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + + +### Java template +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +### Eclipse template +*.pydevproject +.metadata +.gradle +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +.settings/ +.loadpath +/build +/captures +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + +# sbteclipse plugin +.target + +# TeXlipse plugin +.texlipse + +# Android Studio +*.iml + +# Keep external libs +!app/libs/*.jar + +# script output +check-dpi.txt* + +# spring output +target + +# Kotlin2.0 +.kotlin/ +/common/common.podspec \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..66029d8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "compose-multiplatform-media-player"] + path = compose-multiplatform-media-player + url = git@github.com:cybernhl/ComposeMultiplatformMediaPlayer.git diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts new file mode 100644 index 0000000..13bf0c3 --- /dev/null +++ b/androidApp/build.gradle.kts @@ -0,0 +1,63 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.compose.compiler) +} + +android { + namespace = "org.chaintech.app" + compileSdk = 37 + buildFeatures { + compose = true + } + + defaultConfig { + minSdk = 24 + targetSdk =37 + applicationId = "org.chaintech.app.androidApp" + versionCode = 1 + versionName = "1.0.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } +} + +kotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_1_8 + } +} + +dependencies { + implementation(project(":shared")) + + implementation(libs.androidx.activity.compose) + implementation(libs.chaintech.media.player) + implementation(libs.jetbrains.compose.ui.tooling.preview) + debugImplementation(libs.androidx.compose.ui.tooling) +} + diff --git a/androidApp/proguard-rules.pro b/androidApp/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/androidApp/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/androidApp/src/main/AndroidManifest.xml b/androidApp/src/main/AndroidManifest.xml new file mode 100644 index 0000000..085e46b --- /dev/null +++ b/androidApp/src/main/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/androidApp/src/main/kotlin/org/chaintech/app/AndroidApp.kt b/androidApp/src/main/kotlin/org/chaintech/app/AndroidApp.kt new file mode 100644 index 0000000..7a64f62 --- /dev/null +++ b/androidApp/src/main/kotlin/org/chaintech/app/AndroidApp.kt @@ -0,0 +1,14 @@ +package org.chaintech.app + +import android.app.Application + +class AndroidApp : Application() { + companion object { + lateinit var INSTANCE: AndroidApp + } + + override fun onCreate() { + super.onCreate() + INSTANCE = this + } +} \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/org/chaintech/app/App.android.kt b/androidApp/src/main/kotlin/org/chaintech/app/AppActivity.kt similarity index 65% rename from composeApp/src/androidMain/kotlin/org/chaintech/app/App.android.kt rename to androidApp/src/main/kotlin/org/chaintech/app/AppActivity.kt index e9eeffc..7753083 100644 --- a/composeApp/src/androidMain/kotlin/org/chaintech/app/App.android.kt +++ b/androidApp/src/main/kotlin/org/chaintech/app/AppActivity.kt @@ -1,22 +1,10 @@ package org.chaintech.app -import android.app.Application import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import chaintech.videoplayer.util.PlaybackPreference -class AndroidApp : Application() { - companion object { - lateinit var INSTANCE: AndroidApp - } - - override fun onCreate() { - super.onCreate() - INSTANCE = this - } -} - class AppActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) diff --git a/androidApp/src/main/res/drawable-v24/ic_launcher_foreground.xml b/androidApp/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/androidApp/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/androidApp/src/main/res/drawable/ic_launcher_background.xml b/androidApp/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..e93e11a --- /dev/null +++ b/androidApp/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/androidApp/src/main/res/mipmap-hdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..a571e60 Binary files /dev/null and b/androidApp/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/androidApp/src/main/res/mipmap-hdpi/ic_launcher_round.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..61da551 Binary files /dev/null and b/androidApp/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/androidApp/src/main/res/mipmap-mdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c41dd28 Binary files /dev/null and b/androidApp/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/androidApp/src/main/res/mipmap-mdpi/ic_launcher_round.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..db5080a Binary files /dev/null and b/androidApp/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..6dba46d Binary files /dev/null and b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..da31a87 Binary files /dev/null and b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..15ac681 Binary files /dev/null and b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..b216f2d Binary files /dev/null and b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..f25a419 Binary files /dev/null and b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..e96783c Binary files /dev/null and b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml new file mode 100644 index 0000000..176b681 --- /dev/null +++ b/androidApp/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + MyApplication + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 5762ec9..597635b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,75 @@ +buildscript { + // 在 Kotlin DSL 中,使用 extra 屬性來代替 Groovy 的 ext + extra.apply { + set("agp_gradle", libs.versions.agp.get()) + + var tempKotlinVersion = "1.9.25" + println("Show kotlin_version : $tempKotlinVersion") + + tempKotlinVersion = libs.versions.kotlin.get() + set("kotlin_version", tempKotlinVersion) + println("Show kotlin_version from lib.version.toml : $tempKotlinVersion") + + set("coroutine_version", "1.6.4") + set("jb_compose_version", libs.versions.jetbrains.compose.multiplatform.get()) + set("navigation_version", libs.versions.androidx.navigation.get()) + } + + // 從 extra 中讀取值以供後續使用 + val kotlin_version: String by extra + println("Show fianl kotlin_version : $kotlin_version") + + repositories { + gradlePluginPortal() + mavenCentral() + google() + maven { + url = uri("https://plugins.gradle.org/m2/") + } + maven { + url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") + } + } + dependencies { + val agp_gradle: String by extra +// classpath("com.android.tools.build:gradle:$agp_gradle") +// classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") +// classpath("org.jetbrains.kotlin:kotlin-serialization:$kotlin_version") + } +} + plugins { - alias(libs.plugins.multiplatform).apply(false) - alias(libs.plugins.compose.compiler).apply(false) - alias(libs.plugins.compose).apply(false) - alias(libs.plugins.android.application).apply(false) - alias(libs.plugins.android.library).apply(false) - alias(libs.plugins.mavenPublish).apply(false) + alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.android.kotlin.multiplatform.library) apply false + + alias(libs.plugins.kotlin.jvm) apply false + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.kotlin.multiplatform) apply false + + alias(libs.plugins.jetbrains.compose) apply false + alias(libs.plugins.compose.compiler) apply false + + alias(libs.plugins.kotlin.serialization) apply false + + alias(libs.plugins.ksp) apply false + alias(libs.plugins.mavenPublish) apply false +} + +allprojects { + tasks.findByName("run")?.let { task -> + if (task is JavaExec) { + println(">>> [afterEvaluate] 'run' task workingDir is: ${task.workingDir}") + println(">>> [afterEvaluate] 'run' task commandLine is: ${task.commandLine.joinToString(" ")}") + } else { + println(">>> [afterEvaluate] 'run' task found, but it's not a JavaExec task. Type: ${task::class.java.name}") + } + } ?: println(">>> [afterEvaluate] 'run' task NOT found.") + afterEvaluate { + } +} + +subprojects { + afterEvaluate { + } } diff --git a/compose-multiplatform-media-player b/compose-multiplatform-media-player new file mode 160000 index 0000000..3551b80 --- /dev/null +++ b/compose-multiplatform-media-player @@ -0,0 +1 @@ +Subproject commit 3551b80097a680866b92406b952b929f781bbe6b diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 1cb8066..b0e0680 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -3,16 +3,17 @@ import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { - alias(libs.plugins.multiplatform) + alias(libs.plugins.kotlin.multiplatform) alias(libs.plugins.compose.compiler) - alias(libs.plugins.compose) - alias(libs.plugins.android.application) + alias(libs.plugins.jetbrains.compose) + alias(libs.plugins.android.library) } kotlin { androidTarget { + publishLibraryVariants("release", "debug") compilations.all { - compileTaskProvider { + compileTaskProvider.configure { compilerOptions { jvmTarget.set(JvmTarget.JVM_1_8) freeCompilerArgs.add("-Xjdk-release=${JavaVersion.VERSION_1_8}") @@ -23,29 +24,23 @@ kotlin { jvm() - @OptIn(ExperimentalWasmDsl::class) - wasmJs { - browser { - commonWebpackConfig { - cssSupport { - enabled = true - } - } - } - binaries.executable() - } - + val xcfName = "ComposeApp" listOf( - iosX64(), iosArm64(), iosSimulatorArm64() ).forEach { it.binaries.framework { - baseName = "ComposeApp" + baseName = xcfName isStatic = true + binaryOption("bundleId", "org.chaintech.app") } } + @OptIn(ExperimentalWasmDsl::class) + wasmJs { + browser() + } + sourceSets { all { languageSettings { @@ -53,13 +48,13 @@ kotlin { } } commonMain.dependencies { - implementation(compose.runtime) - implementation(compose.foundation) - implementation(compose.materialIconsExtended) - implementation(compose.material) - implementation(compose.material3) - implementation(compose.components.resources) - implementation(compose.components.uiToolingPreview) + implementation(libs.jetbrains.compose.runtime) + implementation(libs.jetbrains.compose.foundation) + implementation(libs.jetbrains.compose.material.icons.extended) + implementation(libs.jetbrains.compose.material) + implementation(libs.jetbrains.compose.material3) + implementation(libs.jetbrains.compose.components.resources) + implementation(libs.jetbrains.compose.ui.tooling.preview) implementation(libs.voyager.navigator) implementation(libs.voyager.transitions) @@ -68,35 +63,40 @@ kotlin { implementation(libs.image.loader) implementation(libs.media.kit) - implementation(libs.media.player) + // 編譯期僅供符號引用,不打包進 Runtime (Shadowing 策略) + compileOnly(libs.chaintech.media.player) } - - androidMain.dependencies { - implementation(compose.uiTooling) - implementation(libs.androidx.activityCompose) + implementation(libs.jetbrains.compose.ui.tooling) + implementation(libs.androidx.activity.compose) + implementation(libs.chaintech.media.player) // Android 運行時使用遠端庫 } iosMain.dependencies { + implementation(libs.chaintech.media.player) // iOS 運行時使用遠端庫 + } + + wasmJsMain.dependencies { + implementation(libs.chaintech.media.player) // Web 運行時使用遠端庫 } jvmMain.dependencies { implementation(compose.desktop.currentOs) + implementation("com.github.cybernhl.ComposeMultiplatformMediaPlayer:compose-multiplatform-media-player:1.0.54") +// api(project(":compose-multiplatform-media-player")) } } } android { namespace = "org.chaintech.app" - compileSdk = 36 - + compileSdk = 37 + buildFeatures { + compose = true + } defaultConfig { minSdk = 24 - targetSdk = 36 - applicationId = "org.chaintech.app.androidApp" - versionCode = 1 - versionName = "1.0.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } @@ -109,18 +109,10 @@ android { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } - buildFeatures { - compose = true - } } -compose.desktop { - application { - mainClass = "MainKt" - - nativeDistributions { - targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) - packageName = "org.chaintech.app.desktopApp" - packageVersion = "1.0.0" - } - } + +compose.resources { + publicResClass = true + packageOfResClass = "reelsdemo.composeapp.generated.resources" + generateResClass = always } \ No newline at end of file diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/composeApp/src/androidMain/AndroidManifest.xml index 8f0de93..776e61f 100644 --- a/composeApp/src/androidMain/AndroidManifest.xml +++ b/composeApp/src/androidMain/AndroidManifest.xml @@ -1,25 +1,5 @@ - - - - - - - - - diff --git a/composeApp/src/jvmMain/kotlin/org/chaintech/app/utility/util.jvm.kt b/composeApp/src/jvmMain/kotlin/org/chaintech/app/utility/util.jvm.kt index 8d25461..7eef0a7 100644 --- a/composeApp/src/jvmMain/kotlin/org/chaintech/app/utility/util.jvm.kt +++ b/composeApp/src/jvmMain/kotlin/org/chaintech/app/utility/util.jvm.kt @@ -5,6 +5,8 @@ import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalWindowInfo import java.io.File +import java.io.FileOutputStream +import java.nio.file.Files @Composable actual fun SystemAppearance() { @@ -14,10 +16,38 @@ actual fun getSafeAreaHeight(): SafeAreaSize { return SafeAreaSize() } +/** + * 修正 JVM 端的資源路徑獲取邏輯。 + * 由於 FFmpeg (JavaCV) 無法直接讀取 JAR 內的資源, + * 我們必須將資源提取到臨時檔案後,返回該檔案的絕對路徑。 + */ actual fun getLocalFilePathFor(item: String): String { val classLoader = Thread.currentThread().contextClassLoader - val resource = classLoader.getResource(item) - return resource?.let { File(it.file).absolutePath } ?: "" + val resourceStream = classLoader.getResourceAsStream(item) + + if (resourceStream == null) { + println("⚠️ 找不到資源: $item") + return "" + } + + return try { + // 在系統臨時目錄建立一個具有原始檔名後綴的暫存檔 + val extension = item.substringAfterLast('.', "tmp") + val tempFile = Files.createTempFile("cv_player_res_", ".$extension").toFile() + tempFile.deleteOnExit() // 程式結束時自動刪除 + + resourceStream.use { input -> + FileOutputStream(tempFile).use { output -> + input.copyTo(output) + } + } + + println("✅ 資源已提取至臨時路徑: ${tempFile.absolutePath}") + tempFile.absolutePath + } catch (e: Exception) { + println("❌ 提取資源失敗: ${e.message}") + "" + } } @@ -28,4 +58,4 @@ actual fun screenWidth(): Float { val screenSize = LocalWindowInfo.current.containerSize val width = with(density) { screenSize.width.toDp() } return width.value -} \ No newline at end of file +} diff --git a/composeApp/src/wasmJsMain/resources/1.mp4 b/composeApp/src/wasmJsMain/resources/1.mp4 deleted file mode 100644 index 354ff36..0000000 Binary files a/composeApp/src/wasmJsMain/resources/1.mp4 and /dev/null differ diff --git a/composeApp/src/wasmJsMain/resources/2.mp4 b/composeApp/src/wasmJsMain/resources/2.mp4 deleted file mode 100644 index 52e5b38..0000000 Binary files a/composeApp/src/wasmJsMain/resources/2.mp4 and /dev/null differ diff --git a/composeApp/src/wasmJsMain/resources/3.mp4 b/composeApp/src/wasmJsMain/resources/3.mp4 deleted file mode 100644 index 56f094a..0000000 Binary files a/composeApp/src/wasmJsMain/resources/3.mp4 and /dev/null differ diff --git a/composeApp/src/wasmJsMain/resources/4.mp4 b/composeApp/src/wasmJsMain/resources/4.mp4 deleted file mode 100644 index 0722c67..0000000 Binary files a/composeApp/src/wasmJsMain/resources/4.mp4 and /dev/null differ diff --git a/composeApp/src/wasmJsMain/resources/Believer.mp3 b/composeApp/src/wasmJsMain/resources/Believer.mp3 deleted file mode 100644 index 00f6fb9..0000000 Binary files a/composeApp/src/wasmJsMain/resources/Believer.mp3 and /dev/null differ diff --git a/composeApp/src/wasmJsMain/resources/favicon.ico b/composeApp/src/wasmJsMain/resources/favicon.ico deleted file mode 100644 index 23dfe87..0000000 Binary files a/composeApp/src/wasmJsMain/resources/favicon.ico and /dev/null differ diff --git a/composeApp/src/wasmJsMain/resources/index.html b/composeApp/src/wasmJsMain/resources/index.html deleted file mode 100644 index 507a98a..0000000 --- a/composeApp/src/wasmJsMain/resources/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - Media Player - - - - - - - - - - - \ No newline at end of file diff --git a/composeApp/src/wasmJsMain/resources/shaka-global.js b/composeApp/src/wasmJsMain/resources/shaka-global.js deleted file mode 100644 index c98b358..0000000 --- a/composeApp/src/wasmJsMain/resources/shaka-global.js +++ /dev/null @@ -1,4 +0,0 @@ -// shaka-global.js -window.createShakaPlayer = function(mediaElement) { - return new shaka.Player(mediaElement); -}; diff --git a/composeApp/src/wasmJsMain/resources/shaka-player.compiled.js b/composeApp/src/wasmJsMain/resources/shaka-player.compiled.js deleted file mode 100644 index 30917ce..0000000 --- a/composeApp/src/wasmJsMain/resources/shaka-player.compiled.js +++ /dev/null @@ -1,1263 +0,0 @@ -/* - @license - Shaka Player - Copyright 2016 Google LLC - SPDX-License-Identifier: Apache-2.0 -*/ -(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/* - - Copyright The Closure Library Authors. - SPDX-License-Identifier: Apache-2.0 -*/ -var r;function aa(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); -fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;cc&&(c=Math.max(c+e,0));c=f}}); -function Ja(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&cb||1342177279>>=1)c+=c;return d}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}}); -fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}}); -fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push([d,b[d]]);return c}});var La=this||self;function M(a,b){a=a.split(".");var c=La;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/* - @license - Shaka Player - Copyright 2016 Google LLC - SPDX-License-Identifier: Apache-2.0 -*/ -function Ma(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ma.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Na(a){return a.h/(1-Math.pow(a.g,a.i))};function Oa(){this.h=new Ma(2);this.j=new Ma(5);this.g=0;this.i=128E3;this.l=16E3}Oa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Oa.prototype.sample=function(a,b){if(!(bb)throw Error("Bad port number "+b);a.jc=b}else a.jc=null} -function jc(a,b,c){b instanceof lc?a.g=b:(c||(b=mc(b,rc)),a.g=new lc(b))}function kc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function mc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,sc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function sc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var nc=/[#\/\?@]/g,pc=/[#\?:]/g,oc=/[#\?]/g,rc=/[#\?@]/g,qc=/#/g;function lc(a){this.g=a||null} -function uc(a){if(!a.va&&(a.va={},a.Jc=0,a.g))for(var b=a.g.split("&"),c=0;c=a.l&&m.startTime=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&bc.g&&b>=c.h&&(c.h=a));E(d)})};function Tc(a,b,c){a.l=b;a.m=c}function Uc(a,b,c){a.A=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)} -function Vc(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Vc(a,d.value,c)} -function Yc(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Vc(a,k,e);k.startTime>=a.l&&k.startTimeu?(u=x,y=[z.Cc]):x==u&&y.push(z.Cc);f.push.apply(f,w(y))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e= -g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Kc(m.codecs),q=Kc(g.codecs);n==q&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(u, -v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=bb();var p=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Kc(m.codecs),q=Kc(g.codecs),n!==q))continue;g.width>m.width||g.height>m.height?(l.push(g),p.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Kc(m.codecs),q=Kc(g.codecs),n==q&&g.bandwidth=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0} -function Qd(a,b){return K(function(c){if(1==c.g)return C(c,Rd(a,b,0=b&&e.width>=c){b=e.height;c=e.width;break}a=te(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=te(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.u=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};r.segmentDownloaded=function(a,b,c){this.i.sample(a,b);c&&null!=this.u&&this.o&&ve(this)}; -r.trySuggestStreams=function(){null!=this.u&&this.o&&ve(this)};r.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.C=a}; -r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.F.U(we)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)}; -function ve(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.u<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function te(a,b,c,d,e){if(a.j){var f=a.j.Pf();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Pd(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})} -function ue(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}M("shaka.abr.SimpleAbrManager",se);se.prototype.configure=se.prototype.configure;se.prototype.setCmsdManager=se.prototype.setCmsdManager;se.prototype.setMediaElement=se.prototype.setMediaElement;se.prototype.playbackRateChanged=se.prototype.playbackRateChanged;se.prototype.setVariants=se.prototype.setVariants; -se.prototype.getBandwidthEstimate=se.prototype.getBandwidthEstimate;se.prototype.trySuggestStreams=se.prototype.trySuggestStreams;se.prototype.segmentDownloaded=se.prototype.segmentDownloaded;se.prototype.disable=se.prototype.disable;se.prototype.enable=se.prototype.enable;se.prototype.chooseVariant=se.prototype.chooseVariant;se.prototype.init=se.prototype.init;se.prototype.release=se.prototype.release;se.prototype.stop=se.prototype.stop;var we=1;function xe(a,b){this.g=a;this.h=b}xe.prototype.toString=function(){return"v"+this.g+"."+this.h};function ye(a,b){var c=new xe(5,0),d=ze,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Ae(a,b,c,d){Ra([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Be(a,b,c,d){Qa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var ze=null;M("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});M("shaka.config.CodecSwitchingStrategy",{Di:"reload",wg:"smooth"});function Ce(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Ce.prototype.add=function(a,b,c){return De(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1}; -function De(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2=a.l)if(a.i)a.g=1,a.h=a.j;else throw new O(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return C(d,new Promise(function(e){(new qd(e)).U(c/1E3)}),2)}a.h*=a.m;E(d)})}function We(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ye(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ye.prototype.resolve=function(){};Ye.prototype.reject=function(){};function Ze(a,b){this.promise=a;this.i=b;this.g=!1}function $e(a){return new Ze(Promise.reject(a),function(){return Promise.resolve()})}function af(){var a=Promise.reject(new O(2,7,7001));a.catch(function(){});return new Ze(a,function(){return Promise.resolve()})}function bf(a){return new Ze(Promise.resolve(a),function(){return Promise.resolve()})}function cf(a){return new Ze(a,function(){return a.catch(function(){})})}Ze.prototype.abort=function(){this.g=!0;return this.i()}; -function df(a){return new Ze(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ze.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this}; -Ze.prototype.pa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=ef(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ye,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new Ze(f,function(){return d()})}; -function ef(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Ze);Ze.prototype.chain=Ze.prototype.pa;Ze.prototype["finally"]=Ze.prototype.finally;Ze.all=df;Ze.prototype.abort=Ze.prototype.abort;Ze.notAbortable=cf;Ze.completed=bf;Ze.aborted=af;Ze.failed=$e;function Q(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1} -function ff(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",Q); -var gf={di:"abrstatuschanged",ei:"adaptation",fi:"buffering",gi:"complete",hi:"downloadfailed",ii:"downloadheadersreceived",ji:"drmsessionupdate",li:"emsg",Ci:"prft",Error:"error",mi:"expirationupdated",ni:"firstquartile",oi:"gapjumped",si:"keystatuschanged",ui:"loaded",vi:"loading",xi:"manifestparsed",yi:"manifestupdated",zi:"mediaqualitychanged",Metadata:"metadata",Ai:"midpoint",Bi:"onstatechange",Ei:"ratechange",Fi:"segmentappended",Gi:"sessiondata",Hi:"stalldetected",Ii:"started",Ji:"statechanged", -Ki:"streaming",Li:"textchanged",Mi:"texttrackvisibility",Ni:"thirdquartile",Oi:"timelineregionadded",Pi:"timelineregionenter",Qi:"timelineregionexit",Ri:"trackschanged",Ti:"unloading",Vi:"variantchanged"};function hf(){this.ka=new md;this.xd=this}hf.prototype.addEventListener=function(a,b){this.ka&&this.ka.push(a,b)};hf.prototype.removeEventListener=function(a,b){this.ka&&this.ka.remove(a,b)};hf.prototype.dispatchEvent=function(a){if(!this.ka)return!0;var b=this.ka.get(a.type)||[],c=this.ka.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.xd;a.currentTarget=this.xd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented}; -hf.prototype.release=function(){this.ka=null};function jf(){this.g=[]}function kf(a,b){a.g.push(b.finally(function(){tb(a.g,b)}))}jf.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function lf(a,b,c,d,e){hf.call(this);this.i=!1;this.m=new jf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.u=d||null;this.A=e||null;this.o=!1}oa(lf,hf);r=lf.prototype;r.lf=function(a){this.o=a};function mf(a,b,c,d){c=c||nf;var e=of[a];if(!e||c>=e.priority)of[a]={priority:c,Sd:b,Gh:void 0===d?!1:d}}r.Hh=function(a){this.g.add(a)};r.Yh=function(a){this.g.delete(a)};r.Fg=function(){this.g.clear()};r.Ih=function(a){this.h.add(a)};r.Zh=function(a){this.h.delete(a)}; -r.Gg=function(){this.h.clear()};function pf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();hf.prototype.release.call(this);return this.m.destroy()}; -r.request=function(a,b,c){var d=this,e=new qf;if(this.i){var f=Promise.reject(new O(2,7,7001));f.catch(function(){});return new rf(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?nd(b.retryParameters):We();b.uris=nd(b.uris);f=sf(this,a,b,c);var g=f.pa(function(){return tf(d,a,b,c,new Ve(b.retryParameters,!1),0,null,e)}),h=g.pa(function(q){return uf(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){}); -var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.pa(function(q){var p=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=p;q.oh||!d.l||u.fromCache||"HEAD"==b.method||a!=vf||d.l(u.timeMs,u.data.byteLength,wf(c));return u},function(q){q&&(q.severity=2);throw q;});f=new rf(n.promise,function(){return n.abort()},e);kf(this.m,f);return f}; -function sf(a,b,c,d){function e(h){f=f.pa(function(){c.body&&(c.body=kb(c.body));return h(b,c,d)})}var f=bf(void 0);a.u&&e(a.u);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.pa(void 0,function(h){if(h instanceof O&&7001==h.code)throw h;throw new O(2,1,1006,h);})} -function tf(a,b,c,d,e,f,g,h){a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128== -(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b} -function Nf(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=nb(a);for(var e=0;e=c[d]}if(!a)return"";var c=hb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Kf(c);if(254==c[0]&&255==c[1])return Nf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Nf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Nf(a,!1);if(0==c[1]&&0==c[3])return Nf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Kf(a);throw new O(2,2,2003);} -function Qf(a){if(window.TextEncoder&&!Dd()){var b=new TextEncoder;return kb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;cthis.h.byteLength)throw Uf();var b=hb(this.h,this.g,a);this.g+=a;return b}; -r.skip=function(a){if(this.g+a>this.h.byteLength)throw Uf();this.g+=a};r.Ph=function(a){if(this.ga||a>this.h.byteLength)throw Uf();this.g=a};r.Zc=function(){for(var a=this.g;this.ia()&&0!=this.h.getUint8(this.g);)this.g+=1;a=hb(this.h,a,this.g-a);this.g+=1;return Kf(a)};function Uf(){return new O(2,3,3E3)}M("shaka.util.DataViewReader",Sf);Sf.prototype.readTerminatedString=Sf.prototype.Zc;Sf.prototype.seek=Sf.prototype.seek;Sf.prototype.rewind=Sf.prototype.Ph; -Sf.prototype.skip=Sf.prototype.skip;Sf.prototype.readBytes=Sf.prototype.qb;Sf.prototype.readUint64=Sf.prototype.kc;Sf.prototype.readInt32=Sf.prototype.dg;Sf.prototype.readUint32=Sf.prototype.L;Sf.prototype.readUint16=Sf.prototype.Ca;Sf.prototype.readUint8=Sf.prototype.ga;Sf.prototype.getLength=Sf.prototype.getLength;Sf.prototype.getPosition=Sf.prototype.qa;Sf.prototype.hasMoreData=Sf.prototype.ia;var Tf=1;Sf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Tf};function Vf(){this.i=[];this.h=[];this.g=!1}r=Vf.prototype;r.box=function(a,b){a=Wf(a);this.i[a]=Xf;this.h[a]=b;return this};r.P=function(a,b){a=Wf(a);this.i[a]=Yf;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Sf(a,0);for(this.g=!1;a.ia()&&!this.g;)this.Wc(0,a,b,c)}; -r.Wc=function(a,b,c,d){var e=b.qa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.L(),g=b.L(),h=Zf(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.qa()+8>b.getLength()){this.g=!0;return}f=b.kc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Yf){if(d&&b.qa()+4>b.getLength()){this.g=!0;return}n=b.L();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.qa(),b=0>24&255,a>>16&255,a>>8&255,a&255)}function ag(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Vf);Vf.headerSize=ag;Vf.typeToString=Zf;Vf.allData=dg;Vf.visualSampleEntry=cg;Vf.sampleDescription=bg;Vf.children=$f;Vf.prototype.parseNext=Vf.prototype.Wc; -Vf.prototype.parse=Vf.prototype.parse;Vf.prototype.stop=Vf.prototype.stop;Vf.prototype.fullBox=Vf.prototype.P;Vf.prototype.box=Vf.prototype.box;var Xf=0,Yf=1;function eg(){}function fg(a){a=hb(a);a=Of.value()(a);return btoa(a)}function gg(a,b){b=void 0==b?!0:b;a=fg(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function hg(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;cd?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new O(2,6,6006,f.message,f,h))}})} -function $g(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u;K(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&gg(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=pf([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(hh(a.g.keySystem)){var y= -Nf(g.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){y=Gg(y,"PlayReadyKeyMessage");for(var z=t(y.getElementsByTagName("HttpHeader")),x=z.next();!x.done;x=z.next())x=x.value,g.headers[x.getElementsByTagName("name")[0].textContent]=x.getElementsByTagName("value")[0].textContent;g.body=hg(y.getElementsByTagName("Challenge")[0].textContent)}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();sa(v,2);l=a.C.Rb.request(2,g);return C(v,l.promise,4);case 4:k=v.h;ua(v,3);break;case 2:return m= -va(v),n=new O(2,6,6007,m),a.o(n),d&&d.eb&&d.eb.reject(n),v.return();case 3:if(a.j.g)return v.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&gg(k.data);sa(v,5);return C(v,c.update(k.data),7);case 7:ua(v,6);break;case 5:return q=va(v),p=new O(2,6,6008,q.message),a.o(p),d&&d.eb&&d.eb.reject(p),v.return();case 6:if(a.j.g)return v.return();u=new Q("drmsessionupdate");a.C.onEvent(u);d&&(d.eb&&d.eb.resolve(),nh(a,d));E(v)}})} -function ph(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(hh(a.g.keySystem)&&16==g.byteLength&&(ud()||Dd())){h=nb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=jg(g).slice(0,32);a.V.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.eb&&(a.i.delete(b),b.close().catch(function(){})); -fh(a)&&(a.l.resolve(),a.W.U(qh))}function Kg(a){var b=a.V,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new O(2,6,6014));a.C.Rd(If(c))} -function rh(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n, -q;return K(function(p){switch(p.g){case 1:sa(p,2);if("org.w3.clearkey"===l&&Id())throw Error("Unsupported keySystem");return C(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,q=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,yd()&&(q=!1),f.set(l,{persistentState:q}),C(p,m.createMediaKeys(),5);case 5:ua(p,0);break;case 2:va(p),f.set(l,null),E(p)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(If(f))})} -function sh(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new qd(e)).U(th)}),sa(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);va(c);E(c)})} -function Ng(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return C(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return sa(g,2),a.ma||a.u.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,sh(e),5):C(g,e.remove(),5);if(2!=g.g)return ua(g,0);va(g);E(g)})})),0)})}function uh(a,b){return a.length&&b.length&&a!==b?0>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Dh=new Gf(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Fh(a,b,c,d,e,f,g){this.Z=a;this.Na=b;this.ua=c;this.Te=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Fh.prototype.Pc=function(){return this.Na};Fh.prototype.Mc=function(){return this.ua};function Gh(a,b){return a&&b?a.Pc()==b.Pc()&&a.Mc()==b.Mc()&&xb(a.Z().sort(),b.Z().sort())&&fb(a.g,b.g):a==b}M("shaka.media.InitSegmentReference",Fh);Fh.prototype.getEndByte=Fh.prototype.Mc; -Fh.prototype.getStartByte=Fh.prototype.Pc; -function S(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v){l=void 0===l?[]:l;p=void 0===p?Hh:p;this.startTime=a;this.h=this.endTime=b;this.A=c;this.Na=d;this.ua=e;this.aa=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.u=void 0===n?null:n;this.ca=void 0===q?null:q;this.status=p;this.l=!1;this.j=!0;this.m=!1;this.aes128Key=void 0===u?null:u;this.s=null;this.i=0;this.o=void 0===v?!1:v;this.Jd=this.Xc=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Zf(); -this.o&&this.g.length&&this.g[this.g.length-1].Yf();this.mimeType=this.codecs=null}r=S.prototype;r.Z=function(){return this.A()};r.getStartTime=function(){return this.startTime};r.Sg=function(){return this.endTime};r.Pc=function(){return this.Na};r.Mc=function(){return this.ua};r.jh=function(){return this.tilesLayout};r.ih=function(){return this.u};r.Nb=function(){return this.status};r.zh=function(){this.status=Ih};r.Se=function(){this.l=!0};r.vh=function(){return this.l};r.Ld=function(){this.j=!1}; -r.sh=function(){return this.j};r.Zf=function(){this.Xc=!0};r.uh=function(){return this.Xc};r.Yf=function(){this.Jd=!0};r.th=function(){return this.Jd};r.Xf=function(){this.m=!0};r.ph=function(){return this.m};r.ng=function(a){this.s=a};r.hh=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.h+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.h+=a}; -r.qf=function(a){null==this.ca?Qa("Sync attempted without sync time!"):(a=this.ca-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};M("shaka.media.SegmentReference",S);S.prototype.syncAgainst=S.prototype.qf;S.prototype.offset=S.prototype.offset;S.prototype.getThumbnailSprite=S.prototype.hh;S.prototype.setThumbnailSprite=S.prototype.ng;S.prototype.hasByterangeOptimization=S.prototype.ph;S.prototype.markAsByterangeOptimization=S.prototype.Xf;S.prototype.isLastPartial=S.prototype.th; -S.prototype.markAsLastPartial=S.prototype.Yf;S.prototype.isPartial=S.prototype.uh;S.prototype.markAsPartial=S.prototype.Zf;S.prototype.isIndependent=S.prototype.sh;S.prototype.markAsNonIndependent=S.prototype.Ld;S.prototype.isPreload=S.prototype.vh;S.prototype.markAsPreload=S.prototype.Se;S.prototype.markAsUnavailable=S.prototype.zh;S.prototype.getStatus=S.prototype.Nb;S.prototype.getTileDuration=S.prototype.ih;S.prototype.getTilesLayout=S.prototype.jh;S.prototype.getEndByte=S.prototype.Mc; -S.prototype.getStartByte=S.prototype.Pc;S.prototype.getEndTime=S.prototype.Sg;S.prototype.getStartTime=S.prototype.getStartTime;S.prototype.getUris=S.prototype.Z;var Hh=0,Ih=1;S.Status={ci:Hh,Si:Ih,wi:2};function Jh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Kh(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Lh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Mh(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c} -function Nh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Mh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Mh(a){if(!a)return[];for(var b=[],c=0;ca[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Qh(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Rh(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127} -function Sh(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Kf(hb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Kf(hb(a.data,3+c,f)),h;"--\x3e"===d?h=Kf(hb(a.data,4+c+f)):h=kb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null; -d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Kf(hb(a.data,1,d));a=Kf(hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Kf(hb(a.data,1,d));a=Kf(hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Kf(hb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"== -c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=kb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Kf(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Kf(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=kb(a.data),b):null} -function Th(a){for(var b=0,c=[];Ph(a,b);){var d=Rh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10>6&1&&(d+=10),d+=10,d+=Rh(a,b+6),Qh(a,b+10)&&(d+=10),b+=d;return 0>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}} -function Yh(a,b,c){var d=a.L(),e=[],f=null;c&1&&(f=a.L());c&4&&a.skip(4);for(var g=0;g>3,31===d&&a.ia()&&(d=32+((c&7)<<3)+((a.ga()&224)>>5)),b+="."+d));return{ha:b}}function ai(a,b){a.skip(87);return{ha:b+"."+this.g(a.ga())+this.g(a.ga())+this.g(a.ga())}}function bi(a){a=a.L();return{ha:Zf(a)}};/* - - Copyright Brightcove, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -function ci(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d>>32-c;a.g-=c;0>>b))return a.h<<=b,a.g-=b,b;di(a);return b+gi(a)}function hi(a){ei(a,1+gi(a))}function T(a){var b=gi(a);return fi(a,b+1)-1}function ii(a){a=T(a);return 1&a?1+a>>>1:-1*(a>>>1)}function U(a){return 1===fi(a,1)}function ji(a){return fi(a,8)} -function ki(a,b){for(var c=8,d=8,e=0;ea.length)return this;for(var b=Math.max(0,ni(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.A=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.A:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Hd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h< -k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-1==g.audio&&0a.byteLength-6)return null;var c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));c=a[8]+9;if(a.byteLength<=c)return null;b.data=a.subarray(c);return b} -r.Fh=function(a){ye("TsParser","Please use parseNalus function instead.");return this.af(a)}; -r.af=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n=e-f)return h; -n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=kg(b.data,a),b.fullData=kg(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=kg.apply(eg,w(c.value)),(c=oi(c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Th(c.data),dts:c.dts,pts:c.pts});return a}; -r.Jb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=kg.apply(eg,w(c.value)),e=oi(d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=kg(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h}; -r.fc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=kg.apply(eg,w(d.value)),f=oi(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=kg(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.af(d,g,void 0), -d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Jb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.fc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.Lc=function(){return{audio:this.o,video:this.m}}; -r.Dd=function(){for(var a=[],b=t(this.fc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};r.mh=function(){ye("TsParser","Please use getVideoInfo function instead.");var a=this.Ge();return{height:a.height,width:a.width}};r.Ge=function(){return"hvc"==this.m?pi(this):qi(this)}; -function qi(a){var b={height:null,width:null,ha:null};a=a.Dd();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new ci(a.data);var c=ji(a),d=ji(a),e=ji(a);hi(a);if(ri.includes(c)){var f=T(a);3===f&&ei(a,1);hi(a);hi(a);ei(a,1);if(U(a)){f=3!==f?8:12;for(var g=0;gg?ki(a,16):ki(a,64))}}hi(a);f=T(a);if(0===f)T(a);else if(1===f)for(ei(a,1),hi(a),hi(a),f=T(a),g=0;gy;y++)fi(c,2);for(y=0;yF;F++)D|=(A>>F&1)<<31-F;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;q&&(e+="."+q.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+ -a.toString(16).toUpperCase());b.ha=e;return b}function si(a){return 0>ni(a)?!1:!0}function ni(a){for(var b=Math.min(1E3,a.length-564),c=0;ca.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Ni(a,b){return a.A?null:b==Dc?a.h.h:Jh(Mi(a,b))}function Oi(a,b,c){if(a.A)return 0;if(b==Dc)return a=a.h,null==a.h||a.hc&&(c+=.001);a.g[b].timestampOffset=c;Ji(a,b)}function Ji(a,b){if(!a.A){var c=a.j[b][0];c&&(c.p.resolve(),cj(a,b))}}function Ri(a,b,c){yf(a.I);c={start:c,p:new Ye};a.j[b].push(c);1==a.j[b].length&&dj(a,b);return c.p} -function bj(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:yf(a.I);c=[];d={};for(e in a.g)d.uc=new Ye,f={start:function(m){return function(){return m.uc.resolve()}}(d),p:d.uc},a.j[e].push(f),c.push(d.uc),1==a.j[e].length&&f.start(),d={uc:d.uc};sa(l,2);return C(l,Promise.all(c),4);case 4:ua(l,3);break;case 2:throw g=va(l),g;case 3:return sa(l,5,6),C(l,b(),6);case 6:wa(l);for(h in a.g)cj(a,h);ya(l,0);break;case 5:throw k=va(l),new O(2,3,3015,k,a.i.error||"No error in the media element"); -}})}function cj(a,b){a.j[b].shift();dj(a,b)}function dj(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d,a.i.error||"No error in the media element")),cj(a,b)}}function Ui(a,b,c,d){var e=a.ma[d];a.C.insertFakeEncryptionInInit&&null==c&&e&&(xd()||vd()||wd("SOPOpenBrowser"))&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=Bh(b));return b} -function ej(a,b,c,d){return Ri(a,b,function(){b!==Dc&&(bb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.g[b].changeType(c+a.C.sourceBufferExtraFeatures),a.G[b]=c),Ji(a,b))})} -function fj(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,B,A,D,F,J,G;return K(function(H){switch(H.g){case 1:c=Ec;a.A=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);ta(H,2);a.s.Wa();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch($c)),n=t(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new O(2,7,7003,void 0));for(u in a.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(I){}}return C(H,Promise.all(g), -4);case 4:return a.m={},a.g={},y=a.l.duration,a.J=new Ye,a.l=Di(a,a.J),C(H,a.J,5);case 5:!isNaN(y)&&y?a.l.duration=y:!isNaN(a.V)&&a.V&&(a.l.duration=a.V);z=new Ye;x=a.l.sourceBuffers;B=b.size;A=0;a.s.D(x,"addsourcebuffer",function(){A++;A===B&&z.resolve()});D=t(b.keys());for(F=D.next();!F.done;F=D.next())J=F.value,G=b.get(J),Gi(a,J,G,G.codecs),a.o?(a.j[c.O]=[],a.j[c.$]=[]):a.j[J]=[];a.i.currentTime=d;return C(H,z,2);case 2:wa(H),a.A=!1,yf(a.I),a.s.ja(a.i,"canplaythrough",function(){yf(a.I);a.i.autoplay= -e;f||a.i.play()}),ya(H,0)}})}function gj(a,b){return bj(a,function(){return fj(a,b)})} -function $i(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,y,z,x,B;return K(function(A){if(1==A.g){f=Ec;if(b==f.na)return A.return(!1);g=Mc(Oc(a.G[b]));h=Nc(a.G[b]);l=!1;m=Gc(c,d);n=a.C.forceTransmux;if(!Za(m)||!a.u&&Hc.includes(m)||d.includes(","))n=!0;n&&(q=Ic(c,d),p=$b(q))&&(k=p(),u=Bc(f.O,(d||"").split(",")),v=Bc(f.$,(d||"").split(",")),u&&v?(l=!0,y=v,b==f.O&&(y=u),m=k.convertCodecs(b,Ic(c,y))):m=k.convertCodecs(b,q));z=Mc(Oc(m));x=Nc(m);if(g===z&&h===x)return A.return(!1);B=!0;if(a.o||l&&k&&!a.m[b])B= -!1;if(B&&"smooth"===a.C.codecSwitchingStrategy&&bb())return C(A,ej(a,b,m,k),3);k&&k.destroy();return C(A,gj(a,e),3)}return A.return(!0)})} -function hj(a,b,c){if(b==Dc)var d=!1;else{d=Mc(Oc(a.G[b]));var e=Nc(a.G[b]),f=Gc(c.mimeType,c.codecs),g=a.C.forceTransmux;if(!Za(f)||!a.u&&Hc.includes(f)||c.codecs.includes(","))g=!0;c=Ic(c.mimeType,c.codecs);g&&(g=$b(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=Mc(Oc(f));f=Nc(f);d=d!==b||e!==f}return d?"smooth"!==a.C.codecSwitchingStrategy||!bb()||a.o:!1}var Fi=window.URL.createObjectURL,Ii="sequence";function ij(a,b,c){this.i=a;this.o=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.C=!0;this.F=0;this.A=void 0===c?!0:c;this.G=0;this.m=!1}r=ij.prototype;r.getDuration=function(){return this.j};r.Yg=function(){return this.g};r.nf=function(a){this.i=a};r.Ma=function(a){this.j=a};r.bh=function(){return this.i};r.kg=function(a){this.s=a};r.lc=function(a){this.C=a};r.Ud=function(a){this.u=a};r.lg=function(a){this.o=a};r.Rg=function(){return this.o}; -r.bg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Pd(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.A&&!this.m&&(this.i=(Date.now()+this.s)/1E3-this.h-this.g)}}; -r.Vc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.s)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,dc.end-.5)){b=!0;break a}b=!1}return b};function nj(a,b,c,d,e){var f=this;this.u=e;this.g=a;this.A=b;this.s=c;this.l=new zf;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return oj(f)});this.m=(new qd(function(){oj(f)})).Xa(this.s.gapJumpTimerTime)}nj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.A=this.u=null};nj.prototype.Ze=function(){this.o=!0;oj(this)}; -function oj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=kj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Nh(c,b,a.s.gapDetectionThreshold),null== -d||0==d&&!a.o||(e=c.start(d),e>=a.A.nb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.u(new Q("gapjumped")))))}}};function pj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=qj.value().get(b),c.ja(a,b,d))}var qj=new Gf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function rj(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new zf;this.i=new sj(a);pj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){tj(e,e.j())})}rj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function uj(a){return a.o?a.g.currentTime:a.j()} -function vj(a,b){0Math.abs(a.g.currentTime-b)?xj(a):(a.h.ja(a.g,"seeking",function(){xj(a)}),wj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function xj(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)} -function sj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new qd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}sj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function wj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Xa(.1)};function yj(a){this.g=a;this.j=!1;this.h=null;this.i=new zf}r=yj.prototype;r.fe=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ja(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;pj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.ge=function(a){this.h=this.j?this.h:a};r.od=function(){return(this.j?this.g.currentTime:this.h)||0};r.zf=function(){return 0}; -r.yf=function(){return 0};r.ag=function(){}; -function zj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=Aj(a,c,f);this.j=new nj(a,b.presentationTimeline,c,this.o,f);this.h=new rj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=uj(g.h);h=Bj(g,k);if(.001g.g.getDuration()? -g.g.dc():g.g.nb():0>h&&(h=g.g.nb()+h);return Cj(g,Dj(g,h))});this.m=new qd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=uj(g.h),k=g.g.dc(),l=g.g.nb();3>l-k&&(k=l-3);h=c?c-a.l.durationBackoff:b} -function Bj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.dc(),f=a.g.nb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Oc(c),k=a.g.Oc(d);c=a.g.Oc(c+d);return b>=g?Cj(a,b):b>f?f:b=h||Kh(a.i.buffered,b)?b:c}function Dj(a,b){var c=a.g.dc();if(ba?a:b} -function Aj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new jj(new mj(a),b.stallThreshold,c);lj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ej(a){this.g=a;this.l=null;this.j=0;this.o=!1}r=Ej.prototype;r.Mb=function(){return this.g.length};r.release=function(){this.o||(this.g=[],this.l&&this.l.stop(),this.l=null)};r.Ah=function(){this.o=!0};function Fj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c=d.startTime&&aa||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};r.Nd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Nd(a);this.Za(b)};r.Za=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}}; -r.$b=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new S(a.startTime,b,a.A,a.Na,a.ua,a.aa,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.u,a.ca,a.status,a.aes128Key),this.g[this.g.length-1].i=a.i)}}; -r.Vd=function(a,b){var c=this;this.o||(this.l&&this.l.stop(),this.l=new qd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.l.stop(),c.l=null)}),this.l.Xa(a))};Ej.prototype[Symbol.iterator]=function(){return this.Kb(0)}; -Ej.prototype.Kb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0=f.startTime&&a=a.g.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)} -Mj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Yc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Te;break a}}d=null}if(e=d)e=c.Gf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width); -if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0=f[0].start&&e=d?!1:!0})}else b.Yc=[]};function Qj(a){hf.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new qd(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTimed.endTime?Vj:Sj;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Wb==e&&h.Vb==f&&h.Ob(d,b)}}}; -function Tj(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Uj=1,Sj=2,Vj=3;function Wj(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function Xj(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.Kb(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.sizee;){var g=f.pop();g&&ck(d,g)}0h?!0:!1):f=!1;f&&b.Ka.abort();E(e)})} -r.bd=function(){if(this.g)for(var a=this.g.Bd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.X&&(e=c.X.current());if(!e||e.startTime>a||e.endTime=e.g&&aa?this.g.T.Ma(a):this.g.T.Ma(Math.pow(2,32))}; -function xk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:yf(a.l);if(b.Ba||null==b.fb||b.Hc)return h.return();b.fb=null;if(!b.sb){h.B(2);break}return C(h,tk(a,b,b.Wd,b.td),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ba||b.fb||nk(a,b,0),h.return();case 4:sa(h,6);d=yk(a,b);null!=d&&(nk(a,b,d),b.Rc=!1);ua(h,7);break;case 6:return e= -va(h),C(h,zk(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return C(h,a.g.T.endOfStream(),10);case 10:yf(a.l),g=a.g.T.getDuration(),0!=g&&gg&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Dc))&&Ak(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/ -2;e=Ck(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Ak(h)||h.X&&!h.X.current()||(f=Math.min(f,h.Aa?h.Aa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ra&&b.X&&(d=e.aa,!d||b.Aa&&Gh(d,b.zb)||ak(b.ra,d),Xj(b.ra,e));Dk(a,b,c,e).catch(function(){});return null} -function Ck(a,b,c,d){if(b.X)return b.X.current();if(b.Aa||d)return c=b.Aa?b.Aa.endTime:d,b.Ve=!0,b.X=b.stream.segmentIndex.Kb(c),b.X&&b.X.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.X=b.stream.segmentIndex.Kb(d),e=b.X&&b.X.next().value);e||(b.X=b.stream.segmentIndex.Kb(c),e=b.X&&b.X.next().value);return e} -function Dk(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,B;return K(function(A){switch(A.g){case 1:e=Ec;f=b.stream;g=b.X;b.Ba=!0;sa(A,2);if(2==d.Nb())throw new O(1,1,1011);return C(A,Ek(a,b,d),4);case 4:yf(a.l);if(a.s)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=q=!1,v=function(D){var F,J,G,H;return K(function(I){switch(I.g){case 1:if(q)return I.return();p=!0;yf(a.l);if(a.s)return I.return(); -sa(I,2);n=Fk(n,D);F=!1;J=0;(new Vf).box("mdat",function(L){J=L.size+L.start;F=!0}).parse(n,!1,!0);if(!F){I.B(4);break}G=n.subarray(0,J);n=n.subarray(J);return C(I,Gk(a,b,c,f,d,G,!0),5);case 5:b.ra&&b.X&&Xj(b.ra,d,!0);case 4:ua(I,0);break;case 2:u=H=va(I),E(I)}})},C(A,Hk(a,b,d,v),9);l=Hk(a,b,d);return C(A,l,7);case 7:m=A.h;yf(a.l);if(a.s)return A.return();yf(a.l);return b.sb?(b.Ba=!1,nk(a,b,0),A.return()):C(A,Gk(a,b,c,f,d,m),6);case 9:y=A.h;if(u)throw u;if(p){A.B(10);break}q=!0;yf(a.l);return a.s? -A.return():b.sb?(b.Ba=!1,nk(a,b,0),A.return()):C(A,Gk(a,b,c,f,d,y),10);case 10:b.ra&&b.X&&Xj(b.ra,d,!0);case 6:yf(a.l);if(a.s)return A.return();b.Aa=d;g.next();b.Ba=!1;b.df=!1;z=a.g.T.mb();x=z[b.type];Xa(JSON.stringify(x));b.sb||a.g.Ze(d,b.stream);nk(a,b,0);ua(A,0);break;case 2:B=va(A);yf(a.l,B);if(a.s)return A.return();b.Ba=!1;if(7001==B.code)b.Ba=!1,hk(b),nk(a,b,0),A.B(0);else if(b.type==e.na&&a.h.ignoreTextStreamFailures)a.i.delete(e.na),A.B(0);else if(3017==B.code)Ik(a,b,B),A.B(0);else return b.Rc= -!0,B.severity=2,C(A,zk(a,b,B),0)}})}function Jk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.B(2):C(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=hb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Fk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c} -function Ik(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.df})){if(0=g?h.return():C(h,a.g.T.remove(b.type,e,e+g),2)}yf(a.l);E(h)})} -function Ak(a){return a&&a.type==Dc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)} -function Hk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Fh&&(e=c.g))return l.return(e);f=null;if(b.ra){var m=b.ra;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=wk(a,c,b.stream,d));g=0;b.X&&(g=b.X.g);b.Ka=f;return C(l,f.promise,2);case 2:h=l.h;b.Ka=null;k=h.data;if(!c.aes128Key){l.B(3);break}return C(l,Jk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})} -function wk(a,b,c,d){var e=b instanceof S?b:void 0,f=e?1:0;b=ek(b.Z(),b.Na,b.ua,a.h.retryParameters,d);return a.g.Rb.request(vf,b,{type:f,stream:c,segment:e})} -function tk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.sb=!1,b.Wd=!1,b.td=0,b.Hc=!0,b.Aa=null,b.zb=null,b.X=null,b.ra&&bk(b.ra),d?(e=a.g.Bd(),f=a.g.T.getDuration(),C(g,a.g.T.remove(b.type,e+d,f),3)):C(g,Yi(a.g.T,b.type),4);if(3!=g.g)return yf(a.l),c?C(g,a.g.T.flush(b.type),3):g.B(3);yf(a.l);b.Hc=!1;b.endOfStream=!1;b.Ba||b.fb||nk(a,b,0);E(g)})} -function nk(a,b,c){var d=b.type;if(d!=Dc||a.i.has(d))b.fb=(new pd(function(){var e;return K(function(f){if(1==f.g)return sa(f,2),C(f,xk(a,b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);E(f)})})).U(c)}function hk(a){null!=a.fb&&(a.fb.stop(),a.fb=null)}function ik(a){return K(function(b){return a.Ka?C(b,a.Ka.abort(),0):b.B(0)})} -function zk(a,b,c){var d;return K(function(e){if(1==e.g)return C(e,Xe(a.G),2);yf(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0"+g+""},a.payload)} -function Pk(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7a});return!0}; -r.append=function(a){var b=Qk(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={Xb:d.Xb},e=b.next())d.Xb=e.value,a.some(function(f){return function(g){return g.startTime==f.Xb.startTime&&g.endTime==f.Xb.endTime&&g.text==f.Xb.payload?!0:!1}}(d))||(e=Tk(d.Xb))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)- -c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(Sk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"}; -function Tk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b} -function Sk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Rk);Rk.prototype.setTextVisibility=Rk.prototype.setTextVisibility;Rk.prototype.isTextVisible=Rk.prototype.isTextVisible;Rk.prototype.destroy=Rk.prototype.destroy;Rk.prototype.append=Rk.prototype.append;Rk.prototype.remove=Rk.prototype.remove;/* - @license - Shaka Player - Copyright 2023 Google LLC - SPDX-License-Identifier: Apache-2.0 -*/ -function Uk(){}r=Uk.prototype;r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};M("shaka.text.StubTextDisplayer",Uk);Uk.prototype.setTextVisibility=Uk.prototype.setTextVisibility;Uk.prototype.isTextVisible=Uk.prototype.isTextVisible;Uk.prototype.destroy=Uk.prototype.destroy;Uk.prototype.append=Uk.prototype.append;Uk.prototype.remove=Uk.prototype.remove;function Vk(){}function Wk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Vk);Vk.removeAllChildren=Wk;function Xk(a,b){var c=this;this.m=!1;this.i=[];this.A=a;this.s=b;this.j=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);this.C=(new qd(function(){Yk(c)})).Xa(.25);this.h=new Map;this.l=new zf;this.l.D(document,"fullscreenchange",function(){Yk(c,!0)});this.l.D(this.A, -"resize",function(){var d=c.A,e=d.videoWidth;d=d.videoHeight;e&&d?c.j=e/d:c.j=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Yk(c,!0)}),this.o.observe(this.g));this.u=new Map}r=Xk.prototype;r.append=function(a){var b=[].concat(w(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={gd:c.gd},d=a.next())c.gd=d.value,b.some(function(e){return function(f){return Lb(f,e.gd)}}(c))||this.i.push(c.gd);Yk(this)}; -r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.l&&(this.l.release(),this.l=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime=b});Yk(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.m}; -r.setTextVisibility=function(a){this.m=a};function Zk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1} -function $k(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ug:null;l&&(g.push(l.me),l.$c&&g.push(l.$c),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Zk(a,n)||(f=!0):(al(a,k,e),l=a.h.get(k),n=l.ug,f=!0));0a.j&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute", -c.writingMode==Eb?(f.width="100%",c.lineAlign==Gb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Gb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Gb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Eb?f.paddingLeft=c.position:f.paddingTop=c.position);a=cl(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right"); -f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Eb?f.width=c.size+"%":f.height=c.size+"%")} -function dl(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function el(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Xk);Xk.prototype.setTextVisibility=Xk.prototype.setTextVisibility; -Xk.prototype.isTextVisible=Xk.prototype.isTextVisible;Xk.prototype.remove=Xk.prototype.remove;Xk.prototype.destroy=Xk.prototype.destroy;Xk.prototype.append=Xk.prototype.append;function fl(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.startf?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Qk(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left"); -break;case "right":g.push("align:right");break;case Cb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}M("shaka.text.WebVttGenerator",function(){});function gl(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}gl.prototype.configure=function(a){this.g=a}; -function hl(a,b,c){try{if(!a.g.enabled)return b;var d=il(a);a:{switch(c.toLowerCase()){case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":var e=jl;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":e=kl;break a}e=void 0}d.ot=e;d.su=!0;var f=ll(d);return ml(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}} -function il(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function nl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,il(a));c.pr=a.h.zd();var e=c.ot===ol||c.ot===jl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=pl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=ll(c);f&&(b.uris=b.uris.map(function(g){return ml(g,f)}))}}} -function ql(a){if(0===a.type)return rl;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?jl:ol;if("audio"==b)return sl;if("text"==b)return"application/mp4"===a.mimeType?tl:ul}}function vl(a,b){b=a.h.mb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN} -function wl(a,b){var c=a.h.yb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case ol:return a.videoBandwidth||NaN;case sl:return a.audioBandwidth||NaN;default:return a.bandwidth}} -function ll(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"=== -l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function pl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a=c?a*(1-c)+b*c:a};function Cl(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}M("shaka.util.CmsdManager",xl);xl.prototype.getBandwidthEstimate=xl.prototype.getBandwidthEstimate;xl.prototype.getRoundTripTime=xl.prototype.eh;xl.prototype.getResponseDelay=xl.prototype.dh;xl.prototype.getEstimatedThroughput=xl.prototype.Of; -xl.prototype.getMaxBitrate=xl.prototype.Pf;var zl="etp",yl="mb",Al="rd",Bl="rtt";function Dl(){} -function El(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=nd(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=nd(l)),k=El(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Qa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ra("Unexpected number of arguments for "+k),a[h]=b[h]):(Qa("Invalid config, unrecognized key "+ -k),g=!1)}return g}function Fl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Gl(a,b){return a&&b}M("shaka.util.ConfigUtils",Dl);Dl.convertToConfigObject=Fl;Dl.mergeConfigObjects=El;function Hl(){this.g=null;this.h=[]}function Il(a,b){return K(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;E(c)})}Hl.prototype.release=function(){0"===c.substr(0,5)&&""===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=kb(hg(c)))}};Jl.expressplayFairPlayRequest=function(a,b){Nl(a,b)}; -Jl.conaxFairPlayRequest=function(a,b){Nl(a,b)};Jl.ezdrmFairPlayRequest=function(a,b){Nl(a,b)};Jl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=hb(b.body),a=gg(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Qf("spc="+a))};Jl.expressplayInitDataTransform=function(a,b,c){return Ml(a,b,c)}; -Jl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Pf(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=mb(d);for(var e=0,f=c.length;e=h.height});g.length&&(g.sort(function(h,k){return k.height- -h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Dc&&"image"!=c.type||b.push(c);return b}M("shaka.util.PlayerConfiguration",Ol);Ol.mergeConfigObjects=Rl;Ol.createDefault=Pl;function Sl(){this.g=null;this.h=[]}function Tl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Ul(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Vl(){this.i=this.h=null;this.g=[]}function Wl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Xl(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.N=this.H=this.I=this.J=this.l=this.o=NaN;this.g=new Sl;this.h=new Vl};function V(a,b){hf.call(this);var c=this;this.l=Yl;this.vd=this.g=null;this.da=!1;this.Ed=new zf;this.oc=new zf;this.o=new zf;this.za=new zf;this.C=this.G=this.m=this.H=null;this.Gd=0;this.W=new Hl;this.ma=this.ea=this.i=this.Id=this.F=this.j=this.xa=this.J=this.cg=this.Y=this.V=this.ya=this.K=this.I=this.Yb=null;this.jb=!1;this.Ke=this.s=null;this.Ue=1E9;this.Kc=[];this.N=NaN;this.h=Zl(this);this.Re={width:Infinity,height:Infinity};this.u=null;this.hb=new Ie(this.h.preferredAudioLanguage,this.h.preferredVariantRole, -this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.ib=this.h.preferredTextLanguage;this.Gc=this.h.preferredTextRole;this.Fc=this.h.preferForcedSubs;this.Dc=[];b&&b(this);this.V=$l(this);this.Y=new xl(this.h.cmsd);this.H=am(this);this.H.lf(this.h.streaming.forceHTTPS);this.A=null;bm&&(this.A=bm()); -this.Ed.D(window,"online",function(){cm(c);c.ef()});this.wd=new qd(function(){return dm(c)});a&&(ye("Player","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ec(a,!0))}oa(V,hf);function em(a){null!=a.J&&(ui(a.J),a.J.release(),a.J=null)} -function fm(a,b){if(b.lcevc.enabled){var c=a.yb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(ud()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Ra("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));em(a);null==a.J&&(a.J=new ti(a.g,a.cg,b.lcevc),a.G&&(a.G.N=a.J))}else em(a)}function gm(a,b){return new Q(a,b)}r=V.prototype; -r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==hm)return c.return();em(a);b=a.detach();a.l=hm;return C(c,b,2);case 2:a.Ed&&(a.Ed.release(),a.Ed=null);a.oc&&(a.oc.release(),a.oc=null);a.o&&(a.o.release(),a.o=null);a.za&&(a.za.release(),a.za=null);a.Ke=null;a.h=null;a.u=null;a.vd=null;a.V=null;a.Y=null;if(!a.H){c.B(3);break}return C(c,a.H.destroy(),4);case 4:a.H=null;case 3:a.s&&(a.s.release(),a.s=null),hf.prototype.release.call(a),E(c)}})}; -function im(a,b){a.dispatchEvent(gm("onstatechange",(new Map).set("state",b)))} -r.Ec=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return K(function(f){switch(f.g){case 1:if(c.l==hm)throw new O(2,7,7E3);if(!c.g||c.g==a){f.B(2);break}return C(f,c.detach(),2);case 2:return C(f,jm(c,"attach"),4);case 4:if(f.h)return f.return();sa(f,5,6);im(c,"attach");d=function(){var g=km(c);g&&lm(c,g)};c.oc.D(a,"error",d);c.g=a;if(!b||!rd()||c.G){f.B(6);break}return C(f,mm(c),6);case 6:wa(f);c.W.release();ya(f,0);break;case 5:return e=va(f),C(f,c.detach(),10);case 10:throw e;}})}; -r.Cg=function(a){this.cg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return K(function(c){if(1==c.g){if(b.l==hm)throw new O(2,7,7E3);return C(c,b.nc(!1,a),2)}if(3!=c.g)return C(c,jm(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.oc.Wa(),b.g=null),im(b,"detach"),b.A&&!a&&b.A.release()}finally{b.W.release()}E(c)})};function jm(a,b){var c;return K(function(d){return 1==d.g?(c=++a.Gd,C(d,Il(a.W,b),2)):c!=a.Gd?(a.W.release(),d.return(!0)):d.return(!1)})} -r.nc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return K(function(q){switch(q.g){case 1:return c.l!=hm&&(c.l=Yl),C(q,jm(c,"unload"),2);case 2:if(q.h)return q.return();ta(q,3);c.jb=!1;im(c,"unload");a&&!rd()&&(a=!1);em(c);d=c.Dc.map(function(p){return p()});c.Dc=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(gm("unloading"));c.ya&&(c.ya.release(),c.ya=null);c.g&&(c.o.Wa(),c.za.Wa());c.wd.stop();c.Yb&&(c.Yb.release(),c.Yb=null);if(!c.F){q.B(6);break}return C(q, -c.F.stop(),7);case 7:c.F=null,c.Id=null;case 6:if(!c.s){q.B(8);break}return C(q,c.s.stop(),8);case 8:if(!c.j){q.B(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.C&&(c.C.release(),c.C=null);if(!c.G){q.B(12);break}return C(q,c.G.destroy(),13);case 13:c.G=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.Y&&(c.Y.g=null);c.g&&Wk(c.g);if(!c.g||!c.g.src){q.B(14);break}return C(q,new Promise(function(p){return(new qd(p)).U(.1)}),15);case 15:c.g.removeAttribute("src"), -c.g.load();case 14:if(!c.m){q.B(16);break}return C(q,c.m.destroy(),17);case 17:c.m=null;case 16:c.ea=null;c.K=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new Xl;c.Le=null;c.Kc=[];c.N=NaN;nm(c);case 3:wa(q);c.W.release();ya(q,4);break;case 4:if(a&& -rd()&&!c.G)return C(q,mm(c),0);q.B(0)}})};r.ai=function(a){this.ma=a}; -r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:if(d.l==hm)throw new O(2,7,7E3);return C(m,Il(d.W,"load"),2);case 2:d.W.release();if(!d.g)throw new O(2,7,7002);if(!d.ea){m.B(3);break}return C(m,d.nc(!1),3);case 3:e=++d.Gd;f=function(){if(d.Gd!=e)throw new O(2,7,7E3);};g=function(n,q){return K(function(p){switch(p.g){case 1:return ta(p,2),C(p,Il(d.W,q),4);case 4:return f(),C(p,n(),5);case 5:f();case 2:wa(p),d.W.release(),ya(p,0)}})};sa(m,5); -d.ma=b;d.jb=!1;d.dispatchEvent(gm("loading"));h=Date.now()/1E3;d.u=new Xl;d.ea=a;if(c){m.B(7);break}return C(m,g(function(){return K(function(n){if(1==n.g)return C(n,om(d),2);c=n.h;E(n)})},"guessMimeType_"),7);case 7:if(k=pm(d,c))return C(m,g(function(){return K(function(n){return C(n,qm(d,c),0)})},"initializeSrcEqualsDrmInner_"),16);if(d.G){m.B(11);break}return C(m,g(function(){return K(function(n){return C(n,mm(d),0)})},"initializeMediaSourceEngineInner_"),11);case 11:return C(m,g(function(){return K(function(n){return C(n, -rm(d,c),0)})},"parseManifestInner_"),13);case 13:return C(m,g(function(){return K(function(n){return C(n,sm(d),0)})},"initializeDrmInner_"),14);case 14:return C(m,g(function(){return K(function(n){return C(n,tm(d,h),0)})},"loadInner_"),10);case 16:return C(m,g(function(){return K(function(n){return C(n,um(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(gm("loaded"));ua(m,0);break;case 5:l=va(m);if(7E3==l.code){m.B(18);break}return C(m,d.nc(!1),18);case 18:throw l;}})}; -function om(a){var b,c;return K(function(d){if(1==d.g)return b=a.h.manifest.retryParameters,C(d,Mk(a.ea,a.H,b),2);c=d.h;"application/x-mpegurl"==c&&Cd()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function pm(a,b){if(!rd())return!0;if(b){if(""==(a.g||td()).canPlayType(b))return!1;if(!(rd()&&b in Ah))return!0;if("application/x-mpegurl"===b||"application/vnd.apple.mpegurl"===b){if(a.h.streaming.preferNativeHls)return!0;if(Cd())return a.h.streaming.useNativeHlsOnSafari}}return!1} -function mm(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return im(a,"media-source"),b=a.h.textDisplayFactory,c=b(),a.Le=b,d=vm(a.g,c,function(h,k,l){wm(a,h,k,l)},a.J),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.Y=f,C(g,d.J,2);a.G=d;E(g)})} -function rm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,im(a,"manifest-parser"),a.Id=zh(a.ea,b||null),a.F=a.Id(),d=nd(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.F.configure(d),a.ya=new Qj(function(){return a.Bb()}),a.ya.addEventListener("regionadd",function(n){n=n.region;xm(a,"timelineregionadded",n);if(a.A)a.A.onDashTimedMetadata(n)}),a.xa=null,a.h.streaming.observeQualityChanges&&(a.xa=new Mj(function(){return a.mb()}),a.xa.addEventListener("qualitychange", -function(n){var q=n.quality;n=n.position;q=(new Map).set("mediaQuality",{bandwidth:q.bandwidth,audioSamplingRate:q.audioSamplingRate,codecs:q.codecs,contentType:q.contentType,frameRate:q.frameRate,height:q.height,mimeType:q.mimeType,channelsCount:q.channelsCount,pixelAspectRatio:q.pixelAspectRatio,width:q.width}).set("position",n);a.dispatchEvent(gm("mediaqualitychanged",q))})),e={networkingEngine:c,filter:function(n){return ym(a,n)},makeTextStreamsForClosedCaptions:function(n){return zm(a,n)},onTimelineRegionAdded:function(n){var q= -a.ya;a:{var p=t(q.g);for(var u=p.next();!u.done;u=p.next())if(u=u.value,u.schemeIdUri==n.schemeIdUri&&u.id==n.id&&u.startTime==n.startTime&&u.endTime==n.endTime){p=u;break a}p=null}null==p&&(q.g.add(n),n=new Q("regionadd",new Map([["region",n]])),q.dispatchEvent(n))},onEvent:function(n){return a.dispatchEvent(n)},onError:function(n){return lm(a,n)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode", -!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(n){var q=a.m?a.m.g:null;q&&a.m.s&&Am(a,q.keySystem,n)},onManifestUpdated:function(){var n=(new Map).set("isLive",a.R());a.dispatchEvent(gm("manifestupdated",n));if(a.A)a.A.onManifestUpdated(a.R())},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}},f=Date.now()/1E3,im(a,"manifest"),g=a,C(m,a.F.start(a.ea,e),2);g.i=m.h;h=gm("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036); -Bm(a.i);k=Date.now()/1E3;l=k-f;a.u.F=l;E(m)})}function sm(a){var b,c;return K(function(d){return 1==d.g?(im(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.m=Cm(a,{Rb:a.H,onError:function(e){lm(a,e)},Rd:function(e){Dm(a,e)},onExpirationUpdated:function(e,f){Em(a,e,f)},onEvent:function(e){a.dispatchEvent(e);"drmsessionupdate"==e.type&&c&&(c=!1,a.u.j=Date.now()/1E3-b,a.J&&ui(a.J))}}),a.m.configure(a.h.drm),C(d,Qg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=d.g?C(d,a.m.Ec(a.g),3):C(d,ym(a,a.i),0)})} -function tm(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,B,A;return K(function(D){switch(D.g){case 1:im(a,"load");c=a.g;a.I=new Jj({Cd:function(){return c.playbackRate},cc:function(){return c.defaultPlaybackRate},pf:function(F){c.playbackRate=F},$f:function(F){c.currentTime+=F}});d=function(){return Fm(a)};e=function(){return Gm(a)};a.o.D(c,"playing",d);a.o.D(c,"pause",d);a.o.D(c,"ended",d);a.o.D(c,"ratechange",e);fm(a,a.h);f=a.h.abrFactory;a.s&&a.Ke==f||(a.Ke=f,a.s=f(),"function"!=typeof a.s.setMediaElement&& -(ye("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),"function"!=typeof a.s.setCmsdManager&&(ye("AbrManager","Please use an AbrManager with setCmsdManager function."),a.s.setCmsdManager=function(){}),"function"!=typeof a.s.trySuggestStreams&&(ye("AbrManager","Please use an AbrManager with trySuggestStreams function."),a.s.trySuggestStreams=function(){}),a.s.configure(a.h.abr));a.hb=new Ie(a.h.preferredAudioLanguage,a.h.preferredVariantRole, -a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferSpatialAudio,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.preferredVideoLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.ib=a.h.preferredTextLanguage;a.Gc=a.h.preferredTextRole;a.Fc=a.h.preferForcedSubs;Hm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(F,J,G){a.j&&F!=a.j.j&&Im(a,F,!0,void 0===J?!1:J,void 0===G?0:G)});a.s.setMediaElement(c);a.s.setCmsdManager(a.Y); -Md(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);a.j=Jm(a);a.j.configure(a.h.streaming);a.l=Km;c.textTracks&&a.o.D(c.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":Lm(a,F)}});a.dispatchEvent(gm("streaming"));g=null;(h=a.j.j)||(g=Mm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(q=n.value)&&!q.segmentIndex&&k.push(q.createSegmentIndex());if(!(0, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.o.ja(d,"error",function(){k.reject(km(a))}),C(p,k,2);(l=a.R())&&a.h.streaming.liveSync?(m=function(){return Wm(a)},a.o.D(d,"timeupdate",m)):l||(n=function(){return Xm(a)}, -a.o.D(d,"timeupdate",n),Xm(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.Bb().end,a.o.D(d,"progress",function(){var u=a.Bb().end;q!=u&&(a.A.onManifestUpdated(a.R()),q=u)})));a.jb=!0;E(p)})}function $m(a){var b=a.h.preferredAudioLanguage;""!=b&&a.hg(b,a.h.preferredVariantRole)}function bn(a){var b=a.h.preferredTextLanguage;""!=b&&a.hf(b,a.h.preferredTextRole,a.h.preferForcedSubs)} -function Ym(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,cn(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new qd(function(){var d=dn(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).mc().U(.5);a.Dc.push(function(){c.stop()})}} -function wm(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())cn(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function cn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(gm("metadata",b))} -function Lm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new qd(function(){b.mode="hidden"})).mc().U(.5);a.Dc.push(function(){c.stop()})}}function Bm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}r.Kh=function(){for(var a=this.W;a.g;)a.release()};function Cm(a,b){return new Jg(b,a.h.drm.updateExpirationTime)} -function am(a){return new lf(function(b,c,d){a.s&&a.s.segmentDownloaded(b,c,d)},function(b,c,d){c=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(gm("downloadheadersreceived",c));if(a.Y&&(c=a.Y,c.h.enabled)){if(d=b["cmsd-static"])try{var e=new Map,f=d.split(",");for(d=0;d=a.g.duration-1}break;case Km:a:if(a.g.ended||Ki(a.G))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.xb();var d=Jh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Lh(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Se:Te;c.g=d;b!=d&&nm(a)}function vm(a,b,c,d){return new Ci(a,b,c,d)} -function $l(a){return new gl({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},mb:function(){return a.mb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},zd:function(){return a.zd()},Lb:function(){return a.Lb()},yb:function(){return a.yb()},R:function(){return a.R()}},a.h.cmcd)} -function Jm(a){return new fk(a.i,{Bd:function(){return a.C?a.C.od():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},T:a.G,Rb:a.H,onError:function(b){return lm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Dh:function(){a.F&&a.F.update&&a.F.update()},Ze:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;a.C&&a.C.ag();en(a);d=(new Map).set("start",d).set("end",e).set("contentType",f);a.dispatchEvent(gm("segmentappended",d));a.s&&c.fastSwitching&&b.Xc&&b.Jd&&a.s.trySuggestStreams()}, -Ch:function(b,c){(c=c.Te)&&a.xa&&Oj(a.xa,c,b)},Cf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new lg(hb(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Zg(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Eh:function(b,c,d){wm(a,b,c,d)},ud:function(b,c){return a.ud(b,c)}})} -r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Fl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(ye("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(ye("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux); -a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.retryParameters&& -(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));var c=Rl(this.h,a,Zl(this));fn(this);return c}; -function fn(a){if(a.F){var b=nd(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.F.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{gn(a,a.i)}catch(f){lm(a,f)}a.s&&Vm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||hn(a)}a.H&&a.H.lf(a.h.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.h.mediaSource),a.G.Y=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Le!=b)){var c=b(),d=a.G,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()), -e.destroy());d.h&&(d.h.j=c);a.Le=b;a.j&&(b=a.j,(c=b.i.get(Dc))&&qk(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Tm(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ue(a.K,b,Math.min(.5,b/2)));a.i&&Hm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.V&&a.V.configure(a.h.cmcd);a.Y&&a.Y.configure(a.h.cmsd)}r.getConfiguration=function(){var a=Zl(this);Rl(a,this.h,Zl(this));return a}; -r.Og=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Bb().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a=d.end&&b.sd():c<=d.start+e&&b.sd()}))};r.sd=function(){var a=this.I.cc();this.l==Zm&&this.I.set(a);this.l==Km&&(this.I.set(a),this.s.playbackRateChanged(a),pk(this.j,!1));this.za.Wa()}; -r.yb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ne(e)){var f=fe(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return me(g)}):[]}; -r.ec=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ge(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?an(this).map(function(f){return ke(f)}):[]};r.Ug=function(){var a=this.Kc;this.i&&(a=this.i.imageStreams);return a.map(function(b){return he(b)})}; -r.Lg=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Km&&b.l!=Zm)return g.return(null);c=b.Kc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Fj(d.segmentIndex,function(h){var k=jn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Hb;for(var l=h.h-h.startTime,m=0;ma(f, -b))c=f;c?(a=fe(c),this.jf(a,!0,d)):hn(this)}else this.g&&this.g.audioTracks&&(d=pe(this.yb(),a,b||"",!1)[0])&&this.jf(d)};r.hf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.ib=a,this.Gc=b||"",this.Fc=c,(a=pe(this.i.textStreams,this.ib,this.Gc,this.Fc)[0]||null)&&a!=this.j.o&&(Wl(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.Je()))sk(this.j,a),kn(this)}else(a=pe(this.ec(),a,b||"",c)[0])&&this.ig(a)}; -r.Sh=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.hb=new Ie(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),hn(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&ln(this,b)}}; -r.Je=function(){var a=this.da;return this.G&&this.l==Km?this.G.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?an(this).some(function(b){return"showing"==b.mode}):a};r.Nf=function(){return this.g&&this.g.src&&this.g.textTracks?on(this).map(function(a){return ke(a)}):[]}; -r.Pg=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=dd(a),c=on(this).filter(function(h){return dd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a}; -function an(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function dn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function on(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})} -r.mg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Km)this.G.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=pe(this.i.textStreams,this.ib,this.Gc,this.Fc),0c?g!=d&&a.vf(d):e&&f&&h-kc&&(c+=Math.pow(2,32)),c=c.toString(16));return new O(2,3,3016,b,c,a.g.error.message)} -function Dm(a,b){if(a.j){var c=gm("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);c=1==d.length&&"00"==d[0];var e=!1;if(d.length){d=t(a.i.variants);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())if(l=l.value,(l=b[c?"00":l])||a.m.F)f.allowedByKeySystem= -f.allowedByKeySystem&&!!l&&!xn.includes(l)}h!=f.allowedByKeySystem&&(e=!0)}}}if(e&&(Um(a),!Vm(a)))return;(b=a.j.j)&&!b.allowedByKeySystem&&hn(a)}}function Em(a,b,c){if(a.F&&a.F.onExpirationUpdated)a.F.onExpirationUpdated(b,c);b=gm("expirationupdated");a.dispatchEvent(b)}function Hm(a,b,c){0a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:rd()?!0:sd("application/x-mpegurl")};V.setAdManagerFactory=function(a){bm=a}; -V.registerSupportPlugin=function(a,b){yn[a]=b};V.prototype.destroy=V.prototype.destroy;var hm=0,Yl=1,Km=2,Zm=3;V.LoadMode={DESTROYED:hm,NOT_LOADED:Yl,MEDIA_SOURCE:Km,SRC_EQUALS:Zm};V.version="v4.7.7";var zn=["4","7"];ze=new function(a){this.g=a;this.i=Ae;this.h=Be}(new xe(Number(zn[0]),Number(zn[1])));var xn=["output-restricted","internal-error"],yn={},bm=null;function An(){this.h=[];this.j=this.i=this.g=0};function Bn(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new zf;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=Bn.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i}; -r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)}; -r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)}; -r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()}; -r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};M("shaka.ads.ClientSideAd",Bn);Bn.prototype.release=Bn.prototype.release; -Bn.prototype.getPodIndex=Bn.prototype.getPodIndex;Bn.prototype.getTimeOffset=Bn.prototype.getTimeOffset;Bn.prototype.getMediaUrl=Bn.prototype.getMediaUrl;Bn.prototype.getAdvertiserName=Bn.prototype.getAdvertiserName;Bn.prototype.getCreativeAdId=Bn.prototype.getCreativeAdId;Bn.prototype.getAdId=Bn.prototype.getAdId;Bn.prototype.getVastMediaWidth=Bn.prototype.getVastMediaWidth;Bn.prototype.getVastMediaHeight=Bn.prototype.getVastMediaHeight;Bn.prototype.getVastMediaBitrate=Bn.prototype.getVastMediaBitrate; -Bn.prototype.getDescription=Bn.prototype.getDescription;Bn.prototype.getTitle=Bn.prototype.getTitle;Bn.prototype.getPositionInSequence=Bn.prototype.getPositionInSequence;Bn.prototype.getSequenceLength=Bn.prototype.getSequenceLength;Bn.prototype.setMuted=Bn.prototype.setMuted;Bn.prototype.resize=Bn.prototype.resize;Bn.prototype.isLinear=Bn.prototype.isLinear;Bn.prototype.isMuted=Bn.prototype.isMuted;Bn.prototype.setVolume=Bn.prototype.setVolume;Bn.prototype.getVolume=Bn.prototype.getVolume; -Bn.prototype.play=Bn.prototype.play;Bn.prototype.pause=Bn.prototype.pause;Bn.prototype.skip=Bn.prototype.skip;Bn.prototype.canSkipNow=Bn.prototype.canSkipNow;Bn.prototype.getTimeUntilSkippable=Bn.prototype.getTimeUntilSkippable;Bn.prototype.isSkippable=Bn.prototype.isSkippable;Bn.prototype.isPaused=Bn.prototype.isPaused;Bn.prototype.getRemainingTime=Bn.prototype.getRemainingTime;Bn.prototype.getMinSuggestedDuration=Bn.prototype.getMinSuggestedDuration;Bn.prototype.getDuration=Bn.prototype.getDuration;function Cn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new zf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.7");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, -function(g){Dn(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){En(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.ja(this.i,"play",function(){f.A=!0})}Cn.prototype.configure=function(a){this.C=a};Cn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Wk(this.o)};Cn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()}; -function En(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new Q("ad-error",b));Fn(a,null);a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))} -function Dn(a,b){a.m(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.C.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.u);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.u);a.m(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager", -a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Gn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Hn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Hn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth, -a.i.offsetHeight,Hn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Hn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A?a.g.start():a.h.ja(a.i,"play",function(){a.A=!0;a.g.start()})}catch(f){Fn(a,null)}}function Hn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1} -function Gn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new Q(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){En(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){In(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){In(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE, -function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Fn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Fn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")}); -a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")}); -a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g, -google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})} -function In(a,b){var c=b.getAd();c?(a.j=new Bn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new Q("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Ra("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")} -function Fn(a,b){a.m(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function Jn(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.l=d}r=Jn.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h.skipOffset?!0:!1}; -r.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var a=this.getRemainingTime()-this.h.skipOffset;return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted}; -r.isLinear=function(){return this.l};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.j?this.j:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId}; -r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};M("shaka.ads.MediaTailorAd",Jn);Jn.prototype.release=Jn.prototype.release;Jn.prototype.getPodIndex=Jn.prototype.getPodIndex;Jn.prototype.getTimeOffset=Jn.prototype.getTimeOffset;Jn.prototype.getMediaUrl=Jn.prototype.getMediaUrl;Jn.prototype.getAdvertiserName=Jn.prototype.getAdvertiserName; -Jn.prototype.getCreativeAdId=Jn.prototype.getCreativeAdId;Jn.prototype.getAdId=Jn.prototype.getAdId;Jn.prototype.getVastMediaWidth=Jn.prototype.getVastMediaWidth;Jn.prototype.getVastMediaHeight=Jn.prototype.getVastMediaHeight;Jn.prototype.getVastMediaBitrate=Jn.prototype.getVastMediaBitrate;Jn.prototype.getDescription=Jn.prototype.getDescription;Jn.prototype.getTitle=Jn.prototype.getTitle;Jn.prototype.getPositionInSequence=Jn.prototype.getPositionInSequence;Jn.prototype.getSequenceLength=Jn.prototype.getSequenceLength; -Jn.prototype.setMuted=Jn.prototype.setMuted;Jn.prototype.resize=Jn.prototype.resize;Jn.prototype.isLinear=Jn.prototype.isLinear;Jn.prototype.isMuted=Jn.prototype.isMuted;Jn.prototype.setVolume=Jn.prototype.setVolume;Jn.prototype.getVolume=Jn.prototype.getVolume;Jn.prototype.play=Jn.prototype.play;Jn.prototype.pause=Jn.prototype.pause;Jn.prototype.skip=Jn.prototype.skip;Jn.prototype.canSkipNow=Jn.prototype.canSkipNow;Jn.prototype.getTimeUntilSkippable=Jn.prototype.getTimeUntilSkippable; -Jn.prototype.isSkippable=Jn.prototype.isSkippable;Jn.prototype.isPaused=Jn.prototype.isPaused;Jn.prototype.getRemainingTime=Jn.prototype.getRemainingTime;Jn.prototype.getMinSuggestedDuration=Jn.prototype.getMinSuggestedDuration;Jn.prototype.getDuration=Jn.prototype.getDuration;function Kn(a,b,c,d){this.A=a;this.I=b;this.g=c;this.l=null;this.W=NaN;this.i=d;this.H=!1;this.u=null;this.j=[];this.K=[];this.J=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.N="";this.V=!0;this.G="";this.o=new zf}Kn.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Tb(b.target,b.type,b.listener);Ln(this);this.m=[];this.s=[];this.N="";this.V=!0;this.G="";this.u=null;this.j=[];this.K=[];this.F.clear()}; -Kn.prototype.release=function(){this.stop();this.o&&this.o.release()};Kn.prototype.onManifestUpdated=function(a){this.H=a;""!=this.N&&(Mn(this,this.N,this.V),this.V=!1)};Kn.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a}; -function Nn(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;K(function(u){if(1==u.g)return d=pf([b],We()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Qf(e)),f=a.I.request(7,d),sa(u,2),C(u,f.promise,4);if(2!=u.g){g=u.h;h=Kf(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new fc(b),m=new fc(k.trackingUrl),a.N=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.W,a.i(new Q("ads-loaded",(new Map).set("loadTime",q))),p=new fc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor."); -return ua(u,0)}va(u);if(!a.G.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.G);a.l=null;E(u)})} -function Mn(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z;K(function(x){if(1==x.g)return d=pf([b],We()),e=a.I.request(7,d),sa(x,2),C(x,e.promise,4);if(2!=x.g){f=x.h;g=[];h=Kf(f.data);k=JSON.parse(h);if(0d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.K.includes(d.adId)&&(a.u=b,a.g.currentTime=c.startTimeInSeconds)}} -function Rn(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if(a.h){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),Tn(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),Tn(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),Tn(a,"thirdQuartile"));d=a.h.getRemainingTime(); -e=a.h.getDuration();0=d||d>e)&&Ln(a)}if(!a.h||!a.h.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.isLinear())break;for(f=0;fb){if(a.K.includes(g.adId)){if(a.g.ended)continue;a.g.currentTime=h;break a}Ln(a);a.J=e;a.h=new Jn(g,f+1,e.ads.length,!0,a.g);a.C=g;0===f&&Tn(a,"breakStart");Un(a);break}}}if(!a.h)for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value; -if(a.h)break;for(f=0;fb&&(a.g.currentTime=a.u),a.u=null)}}} -function Ln(a){if(a.h){for(;a.A.lastChild;)a.A.removeChild(a.A.firstChild);a.H||a.K.push(a.C.adId);Tn(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.o.Tb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&Tn(a,"breakEnd");a.h=null;a.C=null;a.J=null}} -function Un(a){var b=!1;a.g.paused?b=!0:(Tn(a,"impression"),Tn(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&Tn(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||Tn(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(Tn(a,"impression"),Tn(a,"start"),b=!1):Tn(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){Tn(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target, -d.type,d.listener)} -function Tn(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.J.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=pf([d],We()),d.method="POST",a.I.request(7,d))}switch(b){case "impression":a.i(new Q("ad-impression"));break;case "start":a.i(new Q("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new Q("ad-muted"));break;case "unmute":a.i(new Q("ad-volume-changed"));break; -case "resume":a.i(new Q("ad-resumed"));break;case "pause":a.i(new Q("ad-paused"));break;case "firstQuartile":a.i(new Q("ad-first-quartile"));break;case "midpoint":a.i(new Q("ad-midpoint"));break;case "thirdQuartile":a.i(new Q("ad-third-quartile"));break;case "complete":a.i(new Q("ad-complete"));a.i(new Q("ad-stopped"));break;case "breakStart":a.A.setAttribute("ad-active","true");break;case "breakEnd":a.A.removeAttribute("ad-active")}};function Vn(a,b){this.g=a;this.i=null;this.h=b}r=Vn.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)}; -r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.h.muted=a}; -r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};r.getAdId=function(){return this.g.getAdId()}; -r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};M("shaka.ads.ServerSideAd",Vn);Vn.prototype.release=Vn.prototype.release;Vn.prototype.getPodIndex=Vn.prototype.getPodIndex; -Vn.prototype.getTimeOffset=Vn.prototype.getTimeOffset;Vn.prototype.getMediaUrl=Vn.prototype.getMediaUrl;Vn.prototype.getAdvertiserName=Vn.prototype.getAdvertiserName;Vn.prototype.getCreativeAdId=Vn.prototype.getCreativeAdId;Vn.prototype.getAdId=Vn.prototype.getAdId;Vn.prototype.getVastMediaWidth=Vn.prototype.getVastMediaWidth;Vn.prototype.getVastMediaHeight=Vn.prototype.getVastMediaHeight;Vn.prototype.getVastMediaBitrate=Vn.prototype.getVastMediaBitrate;Vn.prototype.getDescription=Vn.prototype.getDescription; -Vn.prototype.getTitle=Vn.prototype.getTitle;Vn.prototype.getPositionInSequence=Vn.prototype.getPositionInSequence;Vn.prototype.getSequenceLength=Vn.prototype.getSequenceLength;Vn.prototype.setMuted=Vn.prototype.setMuted;Vn.prototype.resize=Vn.prototype.resize;Vn.prototype.isLinear=Vn.prototype.isLinear;Vn.prototype.isMuted=Vn.prototype.isMuted;Vn.prototype.setVolume=Vn.prototype.setVolume;Vn.prototype.getVolume=Vn.prototype.getVolume;Vn.prototype.play=Vn.prototype.play;Vn.prototype.pause=Vn.prototype.pause; -Vn.prototype.skip=Vn.prototype.skip;Vn.prototype.canSkipNow=Vn.prototype.canSkipNow;Vn.prototype.getTimeUntilSkippable=Vn.prototype.getTimeUntilSkippable;Vn.prototype.isSkippable=Vn.prototype.isSkippable;Vn.prototype.isPaused=Vn.prototype.isPaused;Vn.prototype.getRemainingTime=Vn.prototype.getRemainingTime;Vn.prototype.getMinSuggestedDuration=Vn.prototype.getMinSuggestedDuration;Vn.prototype.getDuration=Vn.prototype.getDuration;function Wn(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.u=this.m=this.o=null;this.A="";this.C=[];this.h=new zf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new Q("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Xn(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.A.length? -e.j.resolve(e.A):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Vn(f,e.l);e.u&&(e.m.i=e.u);e.i(new Q("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active"); -var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.i=e.u)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new Q("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new Q("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new Q("ad-third-quartile"))}); -this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new Q("ad-complete"));e.i(new Q("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new Q("ad-skipped"));e.i(new Q("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C= -f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=Wn.prototype;r.configure=function(){};r.stop=function(){this.A="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C}; -function Xn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){hf.call(this);this.g=this.i=this.h=null;this.j=new An;this.m=navigator.language;this.l=null}oa(Y,hf);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.h&&this.h.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.h&&this.h.release();this.h=new Cn(a,b,this.m,c,function(e){return Yn(d,e)});this.h.configure(this.l)}; -r.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);hf.prototype.release.call(this)};r.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new An};r.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)}; -r.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.u=a;b.g&&b.g.updateAdsRenderingSettings(b.u)};r.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Kn(a,b,c,function(e){return Yn(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new O(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new O(1,10,10004)):(d.l=new Ye,Nn(d,a,b),d.G=c||"",d.W=Date.now()/1E3,a=d.l);return a}; -r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new Wn(a,b,this.m,function(d){return Yn(c,d)});this.g.configure(this.l)}; -r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ra('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.7.7";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&& -(c.G=!0),c.j=new Ye,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ra('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.7.7";this.g.g.replaceAdTagParameters(a)}; -r.getServerSideCuePoints=function(){ye("AdManager","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)}; -r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)}; -function Yn(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}M("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats; -Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;Y.prototype.initMediaTailor=Y.prototype.initMediaTailor; -Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile"; -Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress"; -Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";bm=function(){return new Y};function Zn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof Q){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof -TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Mh(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})} -function $n(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=ao(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})} -function ao(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}} -var bo="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),co="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),eo=["loop","playbackRate"],fo=["pause","play"],go={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2, -isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},ho={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},io={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},jo=[["getConfiguration","configure"]],ko=[["isTextTrackVisible","setTextTrackVisibility"]],lo="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "), -mo=["attach","attachCanvas","detach","load","unload"];function no(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.j=new qd(b);this.N=c;this.u=!1;this.s=d;this.F=e;this.I=f;this.h=this.m=!1;this.J="";this.o=null;this.A=function(){return oo(h)};this.C=function(k,l){k=$n(l);switch(k.type){case "event":var m=k.targetName,n=ff(k.event);h.s(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.N(),h.u=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new O(q.severity,q.category, -q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;po.add(this)}r=no.prototype;r.destroy=function(){po.delete(this);qo(this);ro&&so(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.C=this.A=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.Ia=function(){return this.h};r.cf=function(){return this.J}; -r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.mc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(po),d=c.next();!d.done;d=c.next())to(d.value,b)},function(b){for(var c=t(po),d=c.next();!d.done;d=c.next())d=d.value,uo="available"==b,d.j.mc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});uo&&this.j.U(vo);(a=ro)&&a.status!=chrome.cast.SessionStatus.STOPPED? -to(this,a):ro=null}else window.__onGCastApiAvailable!==wo&&(xo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=wo)};r.kf=function(a){this.o=a;this.h&&yo(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new O(1,8,8E3);if(!uo)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Ye;chrome.cast.requestSession(function(d){return zo(b,a,d)},function(d){return Ao(b,d)});return C(c,b.l,0)})}; -function Bo(a){if(a.h){var b=a.I();chrome.cast.requestSession(function(c){return zo(a,b,c)},function(c){return Ao(a,c)})}}r.ac=function(){if(this.h){qo(this);if(ro){so(this);try{ro.stop(function(){},function(){})}catch(a){}ro=null}oo(this)}}; -r.get=function(a,b){var c=this;if("video"==a){if(fo.includes(b))return function(){return c.fg.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))}}else if("player"==a){if(io[b]&&!this.get("player","isLive")())return function(){};if(lo.includes(b))return function(){return c.fg.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))};if(mo.includes(b))return function(){return c.Lh.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))};if(go[b]||ho[b])return function(){return c.g[a][b]}}return this.g[a][b]}; -r.set=function(a,b,c){this.g[a][b]=c;yo(this,{type:"set",targetName:a,property:b,value:c})};function zo(a,b,c){ro=c;c.addUpdateListener(a.A);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);oo(a);yo(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Ao(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new O(2,8,c,b))} -r.fg=function(a,b){yo(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};r.Lh=function(a,b){var c=Fa.apply(2,arguments),d=new Ye,e=this.H.toString();this.H++;this.i[e]=d;try{yo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function to(a,b){var c=a.I();a.l=new Ye;a.u=!0;zo(a,c,b)}function so(a){var b=ro;b.removeUpdateListener(a.A);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)} -function oo(a){var b=ro?"connected"==ro.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};qo(a)}a.h=b;a.J=b?ro.receiver.friendlyName:"";a.j.mc()}function qo(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function yo(a,b){b=Zn(b);var c=ro;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Va)}catch(d){throw b=new O(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.s("player",c),a.ac(),b;}}var vo=.02,uo=!1,ro=null,xo=null,po=new Set; -function wo(a){xo?window.__onGCastApiAvailable=xo:delete window.__onGCastApiAvailable;xo=null;if(a)for(var b=t(po),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Co(a,b,c,d){d=void 0===d?!1:d;hf.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.A=d;this.u=new Map;this.g=new no(c,function(){return Do(e)},function(){return Eo(e)},function(f,g){return Fo(e,f,g)},function(){return Go(e)},function(){return Ho(e)},d);Io(this)}oa(Co,hf);r=Co.prototype; -r.destroy=function(a){a&&this.g.ac();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;hf.prototype.release.call(this);return Promise.all(a)};r.lh=function(){return this.l};r.$g=function(){return this.s};r.Dg=function(){return this.g.m&&uo};r.Ia=function(){return this.g.Ia()};r.cf=function(){return this.g.cf()}; -r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Ho(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.nc(),0):c.return()})};r.kf=function(a){this.g.kf(a)};r.Xh=function(){Bo(this.g)};r.ac=function(){this.g.ac()}; -r.Eg=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.C&&b==c.A)return d.return();c.C=a;c.A=b;c.g.ac();return C(d,c.g.destroy(),2)}c.g=null;c.g=new no(a,function(){return Do(c)},function(){return Eo(c)},function(e,f){return Fo(c,e,f)},function(){return Go(c)},function(){return Ho(c)},b);c.g.init();E(d)})}; -function Io(a){a.g.init();a.m=new zf;for(var b=t(bo),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Ia()||(f=ff(f),a.j.dispatchEvent(f))});for(var d in gf)a.m.D(a.h,gf[d],function(f){a.g.Ia()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.sc=e,Object.defineProperty(a.l,b.sc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Jo(a,f.sc)}}(b),set:function(f){return function(g){var h=f.sc;a.g.Ia()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={sc:b.sc};a.s={};Ko(a, -function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Lo(a,f)}})});Mo(a);a.j=new hf;a.j.xd=a.l;a.o=new hf;a.o.xd=a.s}function Mo(a){var b=new Map;Ko(a,function(c,d){b.has(d)?(d=b.get(d),c.length=e)return null;for(var f=-1,g=-1,h=0;hc||127c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;eb;b++)a.i.push(Mp())}function Mp(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Np(a,b){Op(a)&&(a.i[a.h][a.g]=new jp(b,a.C,a.u,a.s,a.A),a.g++)}function Op(a){var b=a.gthis.h.length)throw new O(2,2,3E3);this.g+=a};function gq(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null} -function hq(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=fq(b).value;b=null;c=t(iq(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Pp(e,d,a.i)),Lp(e);return b}if(137===c)for(b=fq(b).value,b=t(iq(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=fq(b).value;b=null;c=t(iq(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Pp(e,d,a.i)),e.l=!1;return b}if(139===c){c=fq(b).value; -b=null;c=t(iq(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Pp(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=fq(b).value,jq(a,b,d);if(143===c)return d=jq(a,255,d),kq(a),d;if(144===c)b.skip(1),d=fq(b).value,a.g&&(a.g.u=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=fq(b).value,c=fq(b).value,b.skip(1),a.g&&(b=lq((c&48)>>4,(c&12)>>2,c&3),a.g.A=lq((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=fq(b).value,b=fq(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1), -b.skip(1),d=fq(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Jp(c,a.i);f.j=d;a.h[c]=f}d=fq(b).value;f=fq(b).value;var g=fq(b).value,h=fq(b).value,k=fq(b).value;b=fq(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.u=!1,b.A="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.K=f&127;b.H=g;b.G=(h&240)>>4;b.J=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null} -function iq(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function jq(a,b,c){var d=null;b=t(iq(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Pp(f,c,a.i));a.h[e]=null}return d}function kq(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function lq(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return mq[a<<2|b<<1|c]} -var nq=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),mq="black blue green cyan red magenta yellow white".split(" ");function oq(){this.h=[];this.g=[];this.i=new cq;this.l=0;this.m=new Map([["CC1",new zp(0,0)],["CC2",new zp(0,1)],["CC3",new zp(1,0)],["CC4",new zp(1,1)]]);this.s=this.o=0;this.j=new Map;this.A=!0;this.u=new Set;pq(this)}oq.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;pq(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())kq(b.value)}; -function pq(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Ap,c.g=c.j,c.m=null,lp(c.i),lp(c.j),lp(c.o);a.A=!0} -oq.prototype.extract=function(a,b){if(this.A){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.A=!1}a=new Sf(a,0);if(!(8>a.getLength())&&181===a.ga()&&49===a.Ca()&&1195456820===a.L()&&3===a.ga()&&(c=a.ga(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d>2,g=a.ga(),h=a.ga();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Pa:g,kb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}}; -oq.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=qq(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())dq(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=rq(this,d.value),b.push.apply(b,w(d));this.i.i=[];this.h=[];this.g=[];return b}; -function qq(a,b){var c=b.type;if(16===(b.Pa&112)){var d=b.Pa>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Pa&&255===b.kb||!b.Pa&&!b.kb||!sq(b.Pa)||!sq(b.kb))return 45<=++a.l&&pq(a),null;a.l=0;b.Pa&=127;b.kb&=127;if(!b.Pa&&!b.kb)return null;a.u.add(d);a=null;if(16===(b.Pa&112))a:{d=b.Pa;a=b.kb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d= -Ip[e]:7===e&&(f=!0);a=1===(a&1);c.h!==Dp&&(e=c.g,c.h===Cp&&b!==e.g&&(c=1+b-e.h,yp(e,c,1+e.g-e.h,e.h),op(e,0,c-1),op(e,b+1,15-b)),e.g=b,e.m=a,e.j=f,e.l=d,e.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",pp(c.g,qp,32),d=!1,b=Ip[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Hp[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))pp(c.g,sp,a);else if(18=== -(d&246)&&32===(a&224))pp(c.g,d&1?wp:up,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.kb){case 32:Ep(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Bp(c,2,a);break;case 38:d=Bp(c,3,a);break;case 39:d=Bp(c,4,a);break;case 40:pp(c.g,qp,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:lp(c.o);Gp(c);break;case 43:Gp(c);break;case 44:b=c.i;d=null;c.h!==Dp&&(d=mp(b,c.l,a));op(b,0,15);break;case 45:b=c.g;c.h!==Cp?d=null:(d=mp(b,c.l,a),f=b.g-b.h+1,yp(b,f-1,f,b.h),op(b,0, -f-1),op(b,b.g,15-b.g),c.l=a);break;case 46:op(c.j,0,15);break;case 47:b=null,c.h!==Dp&&(b=mp(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ep(c),c.l=a,d=b}a=d;break a}a=null}else d=b.kb,pp(c.g,qp,b.Pa),pp(c.g,qp,d);return a} -function rq(a,b){var c=[];try{for(;b.ia();){var d=fq(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=fq(b).value&63);if(0!=e){a.u.add("svc"+e);a.j.has(e)||a.j.set(e,new gq(e));for(var g=a.j.get(e),h=b.qa();b.qa()-h=l){var q=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!Op(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=Pp(p,q,g.i));if(p.h+1>=p.o){q=p;for(var u= -0,v=1;16>v;v++,u++)q.i[u]=q.i[v];for(v=0;1>v;v++,u++)q.i[u]=Mp()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=Pp(p,q,g.i));p.i[p.h]=Mp();p.g=0;break;case 12:p.isVisible()&&(e=Pp(p,q,g.i)),Lp(p),q=p,q.h=0,q.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=hq(g,e,l,m);else{if(4096<=l&&4127>=l)q=l&255,8<=q&&15>=q?e.skip(1):16<=q&&23>=q?e.skip(2):24<=q&&31>=q&&e.skip(3);else if(4224<=l&&4255>=l)q=l&255,128<=q&&135>=q?e.skip(4):136<=q&&143>=q&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Np(g.g, -"\u266a"):Np(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Np(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(nq.has(e)){var z=nq.get(e);Np(g.g,z)}else Np(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Np(g.g,"_"):Np(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(x){if(x instanceof O&&3E3===x.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw x;}return c}function sq(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b} -oq.prototype.getStreams=function(){return Array.from(this.u)};M("shaka.cea.CeaDecoder",oq);rb=function(){return new oq};function tq(a){for(var b=[],c=a,d=a=0;d>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,lc.byteLength){c=[];break a}var f=hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c} -function Hq(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""} -function Iq(a){var b=pg(a.node,"https://dashif.org/CPS","Laurl");if(b&&b.textContent)return b.textContent;a=pg(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=hg(a.textContent);a=Gq(a).filter(function(c){return c.type===Jq})[0];if(!a)return"";a=Nf(a.value,!0);return(a=Gg(a,"WRMHEADER"))?Hq(a):""} -function Eq(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.ad];if(g){var h;if(h=pg(f.node,"urn:microsoft:playready","pro")){h=hg(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:mg(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.ad)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82, -226,251,75]),m=new Uint8Array([]);k=[{initData:mg(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=yc(g,f.init||a||h||k);if(g=Kq.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Cq(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Lq(c.value))&&b.push(c);return b} -function Lq(a){var b=a.getAttribute("schemeIdUri"),c=sg(a,"urn:mpeg:cenc:2013","default_KID"),d=qg(a,"urn:mpeg:cenc:2013","pssh").map(ug);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:hg(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,ad:b,keyId:c,init:0v)if(q){q=wg(q,"t",Cg);if(null==q)break;else if(p>=q)break;v=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;v=Math.ceil((a*b-p)/u)-1}0>>31;q&=2147483647;var u=g.reader.L();g.reader.skip(4);if(1==p)throw new O(2,3,3006);h.push(new S(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function Vq(a){this.h=nb(a);this.g=new Sf(this.h,0)}Vq.prototype.ia=function(){return this.g.ia()}; -function Wq(a){var b=Xq(a);if(7Number.MAX_SAFE_INTEGER&&(R=BigInt(N)*BigInt(v));R=Mq(y,x,I,null,z,R);return xc(B(),[R])},0,null,d,A,m,k(),[],"",null,null,Hh,f);P.h=L;return P}function h(){var I=[Math.max(l.ab(),m),Math.min(l.xb(),k())].map(function(L){return L-m});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(L){return L+u})}function k(){var I=null!=n&&e[n]||q;return I? -m+I:Infinity}var l=a.presentationTimeline,m=a.ba.start,n=a.sa.id,q=a.ba.duration,p=b.wa,u=b.ed,v=b.timescale,y=b.ic,z=a.bandwidth||null,x=a.M.id,B=a.M.$a,A=m-b.rb,D=h();a=a.wb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var F=a;F<=D;++F){var J=g(F);c.push(J)}var G=new Ej(c);c=l.xb()k()&&!N.length?null:N})}return Promise.resolve(G)} -function qr(a,b){var c=Oq(a,wr,"initialization");if(!c)return null;var d=a.M.id,e=a.bandwidth||null,f=a.M.$a;return new Fh(function(){var g=Mq(c,d,null,null,e,null);return xc(f(),[g])},0,null,dr(a),null,null,b)}function vr(a,b,c,d,e,f,g,h,k,l){Ej.call(this,[]);this.h=a;this.F=b;this.A=c;this.C=d;this.i=e;this.m=f;this.s=g;this.u=k;this.G=l;h&&xr(this)}oa(vr,Ej);r=vr.prototype;r.Mb=function(){return this.h?this.h.timeline.length:0};r.release=function(){Ej.prototype.release.call(this);this.h=null}; -r.Za=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.Mb()&&this.release())}};function ur(a,b,c,d,e,f){a.s=f;if(a.h){c=a.h.timeline;a.h.ic=b.ic;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0=a.m)b.pop();else break;a.Za(a.i);0!==b.length&&Infinity!==a.m&&(b[b.length-1].end=a.m-a.i)}} -r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&athis.m)return null;for(var c=b.length-1,d=0;d=f&&aa||a>=this.Mb()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.ic,e=this.h.timeline[a],f=e.Rh,g=this.h.wf+e.xf;c=this.i-this.h.rb;for(var h=[],k=(e.end-e.start)/e.bb,l={},m=0;mh&&a.i.delete(g);d=d.filter(function(k){for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new fc(k.location)).lb))return!1;return!0});d.length&&(a.A=d[0].bf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.A=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:xc(a.j,d)};function Fr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=!1;this.o=new Set}r=Fr.prototype;r.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.kh=function(){return this.j};r.Fe=function(){return this.l.slice()};r.Tg=function(){return this.i}; -function Gr(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Hr(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Ir(n),n]})),l=new Map(h.textStreams.map(function(n){return[Jr(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Kr(n),n]}));if(b){var m=Lr(Dc);l.set(Jr(m),m);m=Lr("image");h.set(Kr(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Bf:c,tg:d,qg:e,Tf:f}} -r.Ef=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,B,A,D,F,J,G,H,I,L,N,P,W,R;return K(function(da){if(1==da.g){d=Ec;if(!b&&1==a.length)return e=Gr(a,!1),f=e.Bf,g=e.tg,h=e.qg,k=e.Tf,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),da.B(2);l=-1;for(m=0;md)return!0;if(ed.length?!0:e.lengthd)return!0;if(ed.length)return!0;if(e.lengtha){if(c<=a||c-ab-a)return ks}else{if(c>a)return ks;if(a-ca-b)return ks}return ms}function ls(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return aa.u)&&(a.u=m);g=xs(a,b,c,{start:m,duration:p,node:k,Ie:null==p||!l});f.push(g);b.sa.id&&p&&(a.K[b.sa.id]=p);if(null==p){g= -null;break}g=m+p}}a.J=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Jf:!1}:{periods:f,duration:g,Jf:!0}} -function xs(a,b,c,d){b.sa=ys(a,d.node,null,c);b.ba=d;b.sa.Zb=b.Zb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=og(d.node,"EventStream");c=b.presentationTimeline.ab();e=t(e);for(var f=e.next();!f.done;f=e.next())zs(a,d.start,d.duration,f.value,c);c=og(d.node,"AdaptationSet").map(function(m){return As(a,b,m)}).filter(ad);if(b.wb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Nh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018); -}d=c.filter(function(m){return!m.uf});c=c.filter(function(m){return m.uf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.uf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={nd:h.nd},l=k.next())h.nd=l.value,h.nd.trickModeVideo=e.streams.find(function(m){return function(n){return Kc(m.nd.codecs)==Kc(n.codecs)}}(h))}}}c=Bs(a.h.disableAudio,d,"audio");e=Bs(a.h.disableVideo,d,"video");f=Bs(a.h.disableText, -d,Dc);d=Bs(a.h.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new O(2,4,4004);return{id:b.sa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Bs(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,w(e.streams));return d},[])} -function As(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.oa=ys(a,c,b.sa,null);var e=!1,f=og(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(ad),h=void 0,k=b.oa.contentType==Dc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h= -l}}var n;m=og(c,"EssentialProperty");f=null;var q=!1;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var u=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==u?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==u?n=d(parseInt(p.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=u&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=u&&("urn:mpeg:dash:ssr:2023"==u?q=!0:l=!0)}m=og(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p= -m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),10)));m=og(c,"Accessibility");var v=new Map,y;m=t(m);for(p=m.next();!p.done;p=m.next())if(u=p.value,p=u.getAttribute("schemeIdUri"),u=u.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=u){u=u.split(";");for(var z=t(u),x=z.next();!x.done;x=z.next()){var B=x.value,A=x=void 0;B.includes("=")?(B=B.split("="),x=B[0].startsWith("CC")?B[0]:"CC"+B[0], -A=B[1]||"und"):(x="CC"+p,2==u.length?p+=2:p++,A=B);v.set(x,dd(A))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=u)for(u=t(u.split(";")),x=u.next();!x.done;x=u.next())x=x.value,B=z=void 0,x.includes("=")?(x=x.split("="),z="svc"+x[0],B=x[1].split(",")[0].split(":").pop()):(z="svc"+p,p++,B=x),v.set(z,dd(B));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=u&&(g.push(u),"captions"==u&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"== -u?y="visually impaired":"2"==u&&(y="hard of hearing"));if(l)return null;l=og(c,"ContentProtection");var D=Bq(l,a.h.dash.ignoreDrmInfo,a.h.dash.keySystemsByURI),F=dd(b.oa.language||"und"),J=c.getAttribute("label");(l=og(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(J=l.textContent));l=og(c,"Representation");c=l.map(function(G){if(G=Cs(a,b,D,h,F,J,e,g,v,G,y))G.hdr=G.hdr||n,G.fastSwitching=q;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.oa.contentType;if(a.h.dash.ignoreEmptyAdaptationSet|| -k||f)return null;throw new O(2,4,4003);}if(!b.oa.contentType||"application"==b.oa.contentType)for(b.oa.contentType=Ds(c[0].mimeType,c[0].codecs),k=t(c),p=k.next();!p.done;p=k.next())p.value.type=b.oa.contentType;k=b.oa.id||"__fake__"+a.I++;m=t(c);for(p=m.next();!p.done;p=m.next()){p=p.value;u=t(D.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&p.keyIds?new Set([].concat(w(z.keyIds),w(p.keyIds))):z.keyIds||p.keyIds;a.h.dash.enableAudioGroups&&(p.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(ad); -return{id:k,contentType:b.oa.contentType,language:F,Yi:e,streams:c,drmInfos:D.drmInfos,uf:f,Nh:l}} -function Cs(a,b,c,d,e,f,g,h,k,l,m){b.M=ys(a,l,b.oa,null);a.A=Math.min(a.A,b.M.Zb);if(!Es(b.M))return null;var n=b.ba.start;b.bandwidth=wg(l,"bandwidth",Bg)||0;var q=b.M.contentType,p=q==Dc||"application"==q;q="image"==q;try{var u=void 0;if(c.he){var v=b.M.$a,y=xc(v(),[c.he.xh]),z=pf(y,a.h.retryParameters);u={method:"AES-128",iv:c.he.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,I,L;return K(function(N){if(1==N.g)return C(N,rs(a,z,6),2);if(3!=N.g){H=N.h;if(!H.data||16!=H.data.byteLength)throw new O(2, -4,4049);I={name:"AES-CBC"};L=u;return C(N,window.crypto.subtle.importKey("raw",H.data,I,!0,["decrypt"]),3)}L.cryptoKey=N.h;u.fetchKey=void 0;E(N)})}}}v=function(H,I,L,N){return Fs(a,H,I,L,N)};if(b.M.cd)var x=er(b,v,u);else if(b.M.Cb)x=kr(b,a.m,u);else if(b.M.dd)x=pr(b,v,a.m,!!a.j,a.h.dash.initialSegmentLimit,a.K,u);else{var B=b.ba.duration||0,A=b.M.$a;x={bc:function(){return Promise.resolve(Hj(n,B,A()))}}}}catch(H){if((p||q)&&4002==H.code)return null;throw H;}v=og(l,"ContentProtection");v=Fq(v,c, -a.h.dash.ignoreDrmInfo,a.h.dash.keySystemsByURI);v=new Set(v?[v]:[]);y=!1;og(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(y=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var F;if(q&&((l=og(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&& -(F=l.getAttribute("value")),!F))return null;var J;l=b.M.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");l=b.M.id?b.sa.id+","+b.M.id:"";var G=l&&a.m[l]?a.m[l]:{id:a.I++,originalId:b.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType, -codecs:b.M.codecs,frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0=a.F||a.G.U(Math.max(a.F-b,Na(a.H)))} -function ys(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Qd:null,audioSamplingRate:null,Zb:0,gf:0};d=d||c.$a;var e=b.getAttribute("id"),f=og(b,"BaseURL"),g,h=!1;if(a.g)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.getAttribute("serviceLocation");m=ug(m);l&&m&&(Dr(a.g,e,l,m),h=!0)}h&&a.g||(g=f.map(ug));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")|| -c.codecs;var n=wg(b,"frameRate",Fg)||c.frameRate,q=b.getAttribute("sar")||c.pixelAspectRatio,p=Gs(og(b,"InbandEventStream"),c.emsgSchemeIdUris),u=og(b,"AudioChannelConfiguration");u=Hs(u)||c.Qd;var v=wg(b,"audioSamplingRate",Cg)||c.audioSamplingRate;k||(k=Ds(l,m));var y=ng(b,"SegmentBase"),z=ng(b,"SegmentTemplate"),x=y?wg(y,"availabilityTimeOffset",Dg)||0:0,B=z?wg(z,"availabilityTimeOffset",Dg)||0:0,A=f&&f.length?wg(f[0],"availabilityTimeOffset",Dg)||0:0;x=c.Zb+A+x+B;B=null;(A=ng(b,"SegmentSequenceProperties"))&& -(A=ng(A,"SAP"))&&(B=wg(A,"cadence",Ag));return{$a:function(){return xc(d(),f.length?a.g&&h?Er(a.g,e):g?g:[]:[])},cd:y||c.cd,Cb:ng(b,"SegmentList")||c.Cb,dd:z||c.dd,width:wg(b,"width",Cg)||c.width,height:wg(b,"height",Cg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.getAttribute("lang"),Qd:u,audioSamplingRate:v,Zb:x,gf:B||c.gf}} -function Gs(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.getAttribute("schemeIdUri"),b.includes(c)||b.push(c);return b} -function Hs(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b= -parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1a.I))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.I-c.ne),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),Ft(a,c,d)} -function Gt(a,b){if(Infinity==a.V){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.ca&&(a.V=Math.min(a.V,d.ca))}}b=a.V;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.ca)Qa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Z(),"Expect AV sync issues!");else for(Ft(a,c,f.ca-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.qf(b)}}} -function Ft(a,b,c){b.Qb+=c;b.ob+=c;a=yt(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.Z()} -function rt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,B,A,D,F,J,G,H,I,L,N,P,W,R,da;return K(function(X){switch(X.g){case 1:d=dt(a.xa,b);e=Ts(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},C(X,Ht(a,d,v),6);It(a,e);k=Ts(d.g,"EXT-X-MEDIA");l=Ts(d.g,"EXT-X-STREAM-INF");m=Ts(d.g,"EXT-X-IMAGE-STREAM-INF");n=Ts(d.g,"EXT-X-I-FRAME-STREAM-INF");q=Ts(d.g,"EXT-X-SESSION-KEY");p=Ts(d.g,"EXT-X-SESSION-DATA");u=Ts(d.g,"EXT-X-CONTENT-STEERING");Jt(a,p);return C(X,Kt(a,u),4);case 4:return Lt(a, -l),Mt(a,k),f=Nt(a,l,q,k),g=Ot(a,k),C(X,Pt(a,m,n),5);case 5:h=X.h;X.B(3);break;case 6:return y=X.h,z=y.type,x=y.mimeType,B=y.codecs,A=y.language,D=y.height,F=y.width,J=y.channelCount,G=y.sampleRate,H=y.closedCaptions,C(X,Qt(a,a.u++,d,v,c,B,z,A,!0,"Media Playlist",J,H,null,!1,G,!1,x),7);case 7:I=X.h,a.h.set(c,I),"video"==z&&Rt(I.stream,F,D,null,null,null),f.push({id:0,language:dd(A||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==z?I.stream:null,video:"video"==z?I.stream:null,bandwidth:I.stream.bandwidth|| -0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.l=new ij(null,0);a.l.lc(!0);1==d.type&&(st(a)&&(St(a,d),L=a.m,a.s.U(L)),N=Array.from(a.h.values()),Tt(a,N),xt(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};if(a.da||!a.g.hls.disableCodecGuessing){X.B(8); -break}P=[];W=t(a.C.variants);for(R=W.next();!R.done;R=W.next())da=R.value,da.audio&&""===da.audio.codecs&&P.push(da.audio.createSegmentIndex()),da.video&&""===da.video.codecs&&P.push(da.video.createSegmentIndex());return C(X,Promise.all(P),8);case 8:a.i.makeTextStreamsForClosedCaptions(a.C),E(X)}})} -function Ht(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,B,A;return K(function(D){switch(D.g){case 1:d=kt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Xs(c(),b.segments[0].h);h=g[0];k=new fc(h);l=k.Ea.split(".").pop();if(m=Ut[l])return D.return(kt(m));n=vf;q=null;p=Vt(a,b,f.g,c);a.W.clear();if(!p){D.B(2);break}u=pf(p.Z(),a.g.retryParameters);return C(D,Wt(a,u,n,{type:0}),3);case 3:v=D.h,q=v.data;case 2:return y=pf(g, -a.g.retryParameters),C(D,Wt(a,y,n,{type:1}),4);case 4:z=D.h;(x=z.headers["content-type"])&&(x=x.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==x){var F=z.data;var J=hb(F);J=(new mi).parse(J);var G=J.Lc();J=J.Ge();var H=[],I=!1,L=!1;switch(G.audio){case "aac":H.push("mp4a.40.2");I=!0;break;case "mp3":H.push("mp4a.40.34");I=!0;break;case "ac3":H.push("ac-3");I=!0;break;case "ec3":H.push("ec-3"),I=!0}switch(G.video){case "avc":J.ha?H.push(J.ha):H.push("avc1.42E01E");L=!0;break;case "hvc":J.ha? -H.push(J.ha):H.push("hvc1.1.6.L93.90"),L=!0}if(H.length){G=I&&!L;I=new Map;if(L){L=new pb("video/mp2t");L.i(F);F=t(L.j());for(var N=F.next();!N.done;N=F.next())N=N.value,I.set(N,N);L.h()}J={type:G?"audio":"video",mimeType:"video/mp2t",codecs:H.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:I}}else J=null;if(B=J)return D.return(B)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"video/mp4"==x||"audio/mp4"==x||"video/iso.segment"==x)if(A=lt(q,z.data))return D.return(A); -return D.return(d)}})}function xt(a){if(st(a)){if(a.ea==Xt){var b=Yt(a);a.g.hls.useSafariBehaviorForLive&&(b=a.l.o);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Ud(b)}if(!a.l.m){b=Array.from(a.h.values()).filter(function(d){return d.stream.segmentIndex});b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,("audio"==c.type||"video"==c.type)&&(c=c.stream.segmentIndex.get(0))&&c.ca&&a.l.nf(c.ca)}}else a.l.Ma(Zt(a));a.l.Kd()} -function It(a,b){var c=(new fc(a.Y)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}} -function zt(a,b,c){c=(new fc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d} -function Lt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=$t(a,d);if(f){var g=Bc(Dc,d);a.G.set(f,g);tb(d,g)}e&&(f=Bc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Bc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}} -function Jt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Xs([a.Y],c,a.o)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new Q("sessiondata",e);if(a.i)a.i.onEvent(c)}} -function Kt(a,b){var c,d,e,f,g,h;return K(function(k){if(!a.i||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new zr(a.i);a.j.configure(a.g);a.j.j=[a.Y];a.j.setManifestType("HLS");a.j.h=g;c=Ar(a.j,h);break}return C(k,c,0)})} -function Ot(a,b){var c=Us(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return au(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Qs(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=bu(Dc,d)||cu(Dc)}}return b.filter(function(g){return g})} -function Pt(a,b,c){var d,e;return K(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return K(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);sa(m,2);return C(m,du(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Qs(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"), -q=Z(g,"CHARACTERISTICS"),p=eu(a,a.u++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),y=v.next().value,z=v.next().value;p.stream.width=Number(y)||void 0;p.stream.height=Number(z)||void 0;var x=Z(g,"BANDWIDTH");x&&(p.stream.bandwidth=Number(x));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})} -function fu(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Ps(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)au(a,d[g],c)} -function Nt(a,b,c,d){var e=[],f=new Set;if(0b-2&&(c=Math.max(1,b-2));b=a.ya*c}a.l.nf(0);a.l.lg(b);a.l.lc(!1)} -function Vt(a,b,c,d,e){var f=Vs(c,"EXT-X-MAP");if(!f)return null;var g=Qs(f,"URI"),h=Xs(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.W.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?"AES-128"==Qs(m,"METHOD")&&m.idc.byteLength){c=[];break a}var f=hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function xu(a){if(a=yu(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=ng(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a} -function yu(a){a=hg(a.textContent);a=wu(a).filter(function(b){return b.type===zu})[0];if(!a)return null;a=Nf(a.value,!0);return(a=Gg(a,"WRMHEADER"))?a:null}var zu=1,Au=(new Map).set("com.microsoft.playready",xu).set("com.microsoft.playready.recommendation",xu).set("com.microsoft.playready.software",xu).set("com.microsoft.playready.hardware",xu);function Bu(a){if(!Cu){Cu=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Du=Eu("ftyp",b,d,b,c);b=Eu("dref",Fu);Gu=Eu("dinf",b)}this.g=a} -function Hu(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Eu;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Iu+1));m=Math.floor(m%(Iu+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Ju(h,4)),[0,0,0,0],w(Ju(n,4)),w(Ju(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],w(Ju(k,2)),[0,0],w(Ju(l, -2)),[0,0]));h=Eu("tkhd",h);k=Eu;n=g.duration*g.timescale;l=Math.floor(n/(Iu+1));n=Math.floor(n%(Iu+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Ju(g.timescale,4)),w(Ju(l,4)),w(Ju(n,4)),w(Ju(m,2)),[0,0]));l=Eu("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Ku;break;case "audio":m=Lu}n=Eu("hdlr",m);a:{switch(g.type){case "video":g=Eu("minf",Eu("vmhd",Mu),Gu,Nu(g));break a; -case "audio":g=Eu("minf",Eu("smhd",Ou),Gu,Nu(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=kg.apply(eg,w(b));f=a.g[0];c=Eu;d=f.duration*f.timescale;e=Math.floor(d/(Iu+1));d=Math.floor(d%(Iu+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Ju(f.timescale,4)),w(Ju(e,4)),w(Ju(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, -255]));e=Eu("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(w(Ju(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Eu("trex",k),h.call(g,k);a=kg.apply(eg,w(d));a=Eu("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=kg.apply(eg,w(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Du.byteLength+ -a.byteLength);b.set(Du);b.set(a,Du.byteLength);return b} -function Nu(a){var b=Eu,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(w(Ju(c,2)),w(Ju(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=new Uint8Array([]); -a.encrypted&&(h=Qu(a),d="encv");c=Eu(d,c,e,h)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Qu(a),d="enca");a=Eu(d,Ru(a),c,e)}c=a}a=Eu("stsd",Su,c);return b("stbl",a,Eu("stts",Tu),Eu("stsc",Uu),Eu("stsz",Vu),Eu("stco",Wu))} -function Ru(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(w(Ju(a.stream.audioSamplingRate||44100,2)),[0,0]))} -function Qu(a){var b=Eu;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e>8*b&255);return c}function Pu(a){for(var b=new Uint8Array(a.length/2),c=0;c>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;cJ)if(G){G=wg(G,"t",Cg);if(null==G)break;else if(H>=G)break;J=Math.ceil((G-H)/I)-1}else{if(Infinity==x)break;else if(H/y>=x)break;J=Math.ceil((x*y-H)/I)-1}for(G=0;G<=J;++G)D=H+I, -A.push({start:H/y,end:D/y,xf:H}),H=D}y=A;z=t(z);for(x=z.next();!x.done;x=z.next())(x=cv(a,v,x.value,y,u,l))&&("audio"!=x.type||a.g.disableAudio?"video"!=x.type||a.g.disableVideo?x.type!=Dc||a.g.disableText||q.push(x):n.push(x):p.push(x))}m=[];p=t(0>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7| -b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function gv(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function hv(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""} -function iv(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={xc:g.xc},h=e.next())g.xc=h.value,d.push(new S(g.xc.start,g.xc.end,function(k){return function(){return xc(a.l,[f.replace("{start time}",String(k.xc.xf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}M("shaka.mss.MssParser",$u);var ev="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),dv={CAPT:"main",SUBT:"alternate",DESC:"main"}; -Ah["application/vnd.ms-sstr+xml"]=function(){return new $u};function jv(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Pf(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function kv(){}function lv(a,b,c,d,e){var f=new mv;Hf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new nv,h={Df:!1,rg:!1};a=ov(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Ze(a,function(){h.Df=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new qd(function(){h.rg=!0;g.abort()});k.U(b/1E3);a.finally(function(){k.stop()})}return a} -function ov(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,y,z,x,B;return K(function(A){switch(A.g){case 1:return h=pv,k=qv,q=n=0,p=Date.now(),sa(A,2),C(A,h(a,c),4);case 4:l=A.h;f(rv(l.headers));if("HEAD"==c.method){A.B(5);break}u=l.clone().body.getReader();y=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;z=function(D){function F(){var J,G;return K(function(H){switch(H.g){case 1:return sa(H,2),C(H,u.read(),4);case 4:J=H.h;ua(H,3);break;case 2:return va(H),H.return();case 3:if(J.done){H.B(5);break}n+= -J.value.byteLength;if(!g){H.B(5);break}return C(H,g(J.value),5);case 5:G=Date.now();if(100b;if(!k||!l){m.B(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),C(m,e.destroy(),10);case 10:ya(m,0);break;case 2:va(m),m.B(3)}})}; -r.onInitialVariantChosen=function(){};r.banLocation=function(){};Ah["application/x-offline-manifest"]=function(){return new tw};function uw(){}function vw(a){var b=mw(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=bf(a)):a=b&&"segment"==b.g?ww(b.key(),b):$e(new O(2,1,9004,a));return a} -function ww(a,b){var c=new Tv;return bf(void 0).pa(function(){return c.init()}).pa(function(){return Xv(c,b.Ta(),b.ta())}).pa(function(d){return d.getSegments([b.key()])}).pa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}M("shaka.offline.OfflineScheme",uw);uw.plugin=vw;mf("offline",vw);function xw(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,yw(v.info,q)){v.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=zw(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})} -function zw(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new Jg({Rb:b,onError:function(){},Rd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),sa(f,2),d.configure(a),C(f,Rg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1== -h.g)return sa(h,2),C(h,ch(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);E(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function yw(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ub(a.audioCapabilities,b.audioCapabilities,c)&&ub(a.videoCapabilities,b.videoCapabilities,c)};function Aw(a,b,c){var d=b.presentationTimeline.getDuration();b=Bw(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Cw(a,b){var c=ow(new nw(a.Ta(),a.ta()),b),d=b.appMetadata||{};c=Bw(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}} -function Bw(a){var b=[],c=oe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(fe(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ge(c.value));return b};function Dw(){this.g={}}function Ew(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Fw(a,b){a.g[b.id]=b.bandwidth||2048}function Gw(a,b){a=a.g[b];null==a&&(a=0);return a};function Hw(a){var b=this;if(a&&a.constructor!=V)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Lb()):(this.h=Pl(),this.g=new lf);this.i=[];this.j=[];var c=!a;this.l=new xf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return Dv(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return C(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return C(k,b.g.destroy(),4); -case 4:b.h=null,b.g=null,E(k)}})})}function Iw(){if(rd())a:{var a=t(Uv.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Hw.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Fl(a,b));return Rl(this.h,a)};r.getConfiguration=function(){var a=Pl();Rl(a,this.h,Pl());return a};r.Lb=function(){return this.g}; -r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Cv(this.g);this.j.push(f);b=Jw(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.B(2):C(h,Mk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=zh(a,c||null);return h.return(g())})},e,f);b=new Ze(b,function(){return Dv(f)});b.finally(function(){tb(d.j,f)});return Kw(this,b)}; -function Jw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,y,z,x,B;return K(function(A){switch(A.g){case 1:return Lw(),h=g=null,k=new Tv,n=m=l=null,sa(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Mw(a,b,g,e),6);case 6:q=A.h;Nw(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.Pb();if(!p)throw new O(2,9,9005,b);return C(A,Ow(a,q,function(D){n=n||D},e),7);case 7:h=A.h;Nw(a);if(n)throw n;return C(A,Pw(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Nw(a),C(A,Vv(k),10);case 10:return l=A.h,Nw(a),u=Qw(h, -q,b,c,e,f),v=u.yh,y=u.tf,C(A,l.ta.addManifests([v]),11);case 11:z=A.h;Nw(a);m=z[0];Nw(a);if(n)throw n;return C(A,Rw(a,y,m,v,f,e,l.ta,q,h),12);case 12:return Nw(a),Sw(q,v,h,e),C(A,l.ta.updateManifest(m,v),13);case 13:return Nw(a),x=new lw("manifest",l.path.Ta,l.path.ta,m),A.return(Cw(x,v));case 3:return wa(A),C(A,k.destroy(),14);case 14:if(!g){A.B(15);break}return C(A,g.stop(),15);case 15:if(!h){A.B(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.B(19);break}return C(A, -Tw(m),19);case 19:throw n||B;}})} -function Rw(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,v,y,z,x;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var F,J,G,H,I,L,N;return K(function(P){if(1==P.g){F={};J=t(A);for(G=J.next();!G.done;F={Fb:F.Fb},G=J.next())F.Fb=G.value,H=zv(F.Fb,f),I=F.Fb.i,L=F.Fb.h,N=function(W){return function(R){var da,X,Sa;return K(function(ab){if(1==ab.g)return C(ab,g.addSegments([{data:R}]),2);da=ab.h;Nw(a);X=W.Fb.g;Sa=yv(X);l[Sa]=da[0];m+=R.byteLength;E(ab)})}}(F),Fv(e,F.Fb.groupId,H,I,L,N);return C(P, -Hv(e),2)}if(!D)return P.B(0);Nw(a);Sw(h,d,k,f);return C(P,g.updateManifest(c,d),0)})};q=!1;sa(B,2);if(!Uw(h)||!q||Vw(h)){B.B(4);break}return C(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return Nw(a),b=b.filter(function(A){return!A.h}),p=l,u=m,l={},m=0,C(B,Ww(g,c,d,p,u,function(){return Nw(a)}),6);case 6:Nw(a);case 4:if(q){B.B(7);break}return C(B,n(b,!1),8);case 8:return Nw(a),v=l,y=m,l={},m=0,C(B,Ww(g,c,d,v,y,function(){return Nw(a)}),9);case 9:Nw(a);case 7:ua(B,0);break;case 2:return z= -va(B),x=Object.values(l),C(B,g.removeSegments(x,function(){}),10);case 10:throw z;}})}function Tw(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Tv,C(f,b.init(),2);case 2:return C(f,Vv(b),3);case 3:return c=f.h,d=new lw("manifest",c.path.Ta,c.path.ta,a),C(f,b.destroy(),4);case 4:return e=new Hw,C(f,e.remove(d.toString()),0)}})} -function Ww(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,y;return K(function(z){switch(z.g){case 1:g=!1;sa(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())p=q.value,u=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=u&&(p.dataKey=u,p.pendingSegmentRefId=void 0),u=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=u&&(p.initSegmentKey=u,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&& -(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(z,a.updateManifest(b,c),4);case 4:g=!0;f();ua(z,0);break;case 2:return v=va(z),C(z,Tw(b),5);case 5:if(g){z.B(6);break}y=Object.values(d);return C(z,a.removeSegments(y,function(){}),6);case 6:throw v;}})} -function Pw(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,B,A,D,F,J,G,H,I,L,N,P,W;return K(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Od(a,c.restrictions,d),C(R,Rd(b,a,c.offline.usePersistentLicense),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Md(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(fe(m));n=t(a.textStreams);for(q=n.next();!q.done;q=n.next())p=q.value,e.push(ge(p));u=t(a.imageStreams); -for(v=u.next();!v.done;v=u.next())y=v.value,e.push(he(y));return C(R,c.offline.trackSelectionCallback(e),3);case 3:z=R.h;x=a.presentationTimeline.getDuration();B=0;A=t(z);for(D=A.next();!D.done;D=A.next())F=D.value,J=F.bandwidth*x/8,B+=J;sa(R,4);return C(R,c.offline.downloadSizeCallback(B),6);case 6:G=R.h;if(!G)throw new O(2,9,9014);ua(R,5);break;case 4:H=va(R);if(H instanceof O)throw H;throw new O(2,9,9015);case 5:I=new Set;L=new Set;N=new Set;P=t(z);for(D=P.next();!D.done;D=P.next())W=D.value,"variant"== -W.type&&I.add(W.id),"text"==W.type&&L.add(W.id),"image"==W.type&&N.add(W.id);a.variants=a.variants.filter(function(da){return I.has(da.id)});a.textStreams=a.textStreams.filter(function(da){return L.has(da.id)});a.imageStreams=a.imageStreams.filter(function(da){return N.has(da.id)});Xw(a);E(R)}})} -function Qw(a,b,c,d,e,f){var g=Aw(c,b,d),h=e.offline.progressCallback;Ev(f,function(p,u){g.size=u;h(g,p)},function(p,u){k&&e.offline.usePersistentLicense&&l==u&&Zg(a,"cenc",p)});var k=Uw(b)&&!Vw(b),l=null;k&&(l=Yw.get(a.g.keySystem));for(var m=new Dw,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())Fw(m,q.value);q=t(b.variants);for(n=q.next();!n.done;n=q.next())Ew(m,n.value);m=Zw(f,m,b,e);f=m.streams;m=m.tf;q=a.g;n=e.offline.usePersistentLicense; -q&&n&&(q.initData=[]);return{yh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Nc(),streams:f,sessionIds:n?ih(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},tf:m}}function Uw(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})} -function Vw(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Sw(a,b,c,d){b.expiration=c.Nc();c=ih(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Uw(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}r.remove=function(a){return $w(this,ax(this,a))}; -function ax(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Lw();c=mw(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new Tv;ta(k,2);return C(k,e.init(),4);case 4:return C(k,Xv(e,d.Ta(),d.ta()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([bx(a,h,e),cx(f,d,h)]),2);case 2:return wa(k),C(k,e.destroy(),8);case 8:ya(k,0)}})} -function dx(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Gc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Gc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function bx(a,b,c){return K(function(d){return C(d,ex(a.g,a.h.drm,c,b),0)})} -function cx(a,b,c){function d(){}var e=fx(c);Cw(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Mh=function(){return $w(this,gx(this))}; -function gx(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return Lw(),b=a.g,c=a.h.drm,d=new Tv,e=!1,ta(n,2),C(n,d.init(),4);case 4:f=[],Yv(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,xw(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return wa(n),C(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})} -r.list=function(){return $w(this,hx())};function hx(){var a,b,c;return K(function(d){switch(d.g){case 1:return Lw(),a=[],b=new Tv,ta(d,2),C(d,b.init(),4);case 4:return c=Promise.resolve(),Wv(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Cw(new lw("manifest",e.Ta,e.ta,l),k);a.push(k)});E(h)})})}),C(d,c,2);case 2:return wa(d),C(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})} -function Mw(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}}, -c.configure(d.manifest),Nw(a),C(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Nw(a),k=ix(h),C(l,Promise.all(Ef(k,function(m){return m.createSegmentIndex()})),3);Nw(a);if(e)throw e;return l.return(h)})}function Ow(a,b,c,d){var e;return K(function(f){return 1==f.g?(e=new Jg({Rb:a.g,onError:c,Rd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),C(f,Og(e,b.variants,d.offline.usePersistentLicense),2)):3!=f.g?C(f,ah(e),3):f.return(e)})} -function Zw(a,b,c,d){var e=new Map,f=ix(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=jx(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),tf:Array.from(e.values())}} -function jx(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate, -spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;kx(d,c.presentationTimeline.ab(),function(l){var m=yv(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=Gw(b,d.id)*q;q=Bv(a.g,q);f.set(m,new xv(l,q,k,!1))}l.aa&&(n=yv(l.aa),f.has(n)||(q=.5*Gw(b,d.id),q=Bv(a.g,q),f.set(n,new xv(l.aa,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime, -endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function kx(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Nw(a){if(a.l.g)throw new O(2,9,7001);}function Lw(){if(!Iw())throw new O(2,9,9E3);} -function $w(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ta(c,2),C(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);tb(a.i,b);return ya(c,0)})}function Kw(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){tb(a.i,c)})}function fx(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)} -function ex(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Zv(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:dx(d,!1),videoCapabilities:dx(d,!0)}});return C(h,xw(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})} -function ix(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b} -function Xw(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",Hw);Hw.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new Tv,ta(b,2),C(b,$v(a),2)):5!=b.g?(wa(b),C(b,a.destroy(),5)):ya(b,0)})}; -Hw.prototype.list=Hw.prototype.list;Hw.prototype.removeEmeSessions=Hw.prototype.Mh;Hw.prototype.remove=Hw.prototype.remove;Hw.prototype.store=Hw.prototype.store;Hw.prototype.getNetworkingEngine=Hw.prototype.Lb;Hw.prototype.getConfiguration=Hw.prototype.getConfiguration;Hw.prototype.configure=Hw.prototype.configure;Hw.prototype.destroy=Hw.prototype.destroy;Hw.support=Iw; -var Yw=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb"); -yn.offline=Iw;function lx(){}function mx(a,b){a={priority:b||0,callback:a};for(b=0;b=a?window.MediaSource=null:12>=a?(Ix(),Jx()):15>=a&&Ix():ud()?Kx():(zd()||yd()||wd("Tizen 4"))&&Lx());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Mx()} -function Ix(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function Jx(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Kx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}} -function Lx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Mc(b)&&a(b)}}function Hx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}} -function Mx(){var a=MediaSource.isTypeSupported;wd("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}lx.MediaSource=Fx;Fx.install=Gx;mx(Gx);function Nx(){}function Ox(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Px():void 0!=window.orientation&&Qx())}function Px(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})} -function Qx(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Rx;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}lx.Orientation=Nx;Nx.install=Ox;function Rx(){hf.call(this);this.type="";this.angle=0}oa(Rx,hf); -Rx.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)}; -Rx.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};mx(Ox);function Sx(){}var Tx,Ux,Vx,Wx,Xx,Yx;function Zx(a,b){try{var c=new $x(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ay(a){var b=this.mediaKeys;b&&b!=a&&by(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?by(a,this):Promise.resolve()} -function cy(a){a=hb(a.initData);if(nb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Nf(a.subarray(4),!0);a=Qf(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=kb(a);this.dispatchEvent(b)}lx.PatchedMediaKeysApple=Sx; -Sx.uninstall=function(){Tx&&(Tx=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Ux),HTMLMediaElement.prototype.setMediaKeys=Vx,window.MediaKeys=Wx,window.MediaKeySystemAccess=Xx,navigator.requestMediaKeySystemAccess=Yx,Ux=Yx=Vx=Xx=Wx=null,window.shakaMediaKeysPolyfill=!1)}; -Sx.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Tx=!0,Ux=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Vx=HTMLMediaElement.prototype.setMediaKeys,Wx=window.MediaKeys,Xx=window.MediaKeySystemAccess,Yx=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ay;window.MediaKeys=dy;window.MediaKeySystemAccess=$x;navigator.requestMediaKeySystemAccess= -Zx;window.shakaMediaKeysPolyfill=!0}}; -function $x(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem, -g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;} -$x.prototype.createMediaKeys=function(){var a=new dy(this.keySystem);return Promise.resolve(a)};$x.prototype.getConfiguration=function(){return this.g};function dy(a){this.h=new WebKitMediaKeys(a);this.g=new zf}dy.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new ey(this.h,a)};dy.prototype.setServerCertificate=function(){return Promise.resolve(!1)}; -function by(a,b){a.g.Wa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",cy);try{return pj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}dy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function ey(a){hf.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new zf;this.sessionId="";this.expiration=NaN;this.closed=new Ye;this.keyStatuses=new fy}oa(ey,hf);r=ey.prototype; -r.generateRequest=function(a,b){var c=this;this.h=new Ye;try{var d=this.l.createSession("video/mp4",hb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Nb()?"license-request":"license-renewal").set("message",kb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(gy(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror", -function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:gy(c,"output-not-allowed");break;default:gy(c,"internal-error")}});gy(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))}; -r.update=function(a){this.g=new Ye;try{this.i.update(hb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Wa()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function gy(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)} -function fy(){this.size=0;this.g=void 0}r=fy.prototype;r.Nb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,wh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=wh.value();return this.g&&fb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function hy(){}function iy(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=jy,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ky,window.MediaKeys=ly,window.MediaKeySystemAccess=my,window.shakaMediaKeysPolyfill=!0)}function jy(){return Promise.reject(Error("The key system specified is not supported."))} -function ky(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}lx.PatchedMediaKeysNop=hy;hy.install=iy;function ly(){throw new TypeError("Illegal constructor.");}ly.prototype.createSession=function(){};ly.prototype.setServerCertificate=function(){};ly.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function my(){this.keySystem="";throw new TypeError("Illegal constructor.");}my.prototype.getConfiguration=function(){}; -my.prototype.createMediaKeys=function(){};mx(iy,-10);function ny(){} -function oy(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)py="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=qy;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ry;window.MediaKeys=sy;window.MediaKeySystemAccess=ty;window.shakaMediaKeysPolyfill=!0}} -function uy(a){var b=py;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function qy(a,b){try{var c=new ty(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ry(a){var b=this.mediaKeys;b&&b!=a&&vy(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&vy(a,this);return Promise.resolve()}lx.PatchedMediaKeysWebkit=ny;ny.install=oy; -function ty(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities), -l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]): -d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}ty.prototype.createMediaKeys=function(){var a=new sy(this.g);return Promise.resolve(a)};ty.prototype.getConfiguration=function(){return this.h};function sy(a){this.l=a;this.h=null;this.g=new zf;this.i=[];this.j=new Map} -function vy(a,b){a.h=b;a.g.Wa();var c=py;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=kb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=wy(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Nb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=wy(a,d.sessionId))xy(d,"usable"), -d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=wy(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?xy(e,"output-restricted"):1==f?xy(e,"expired"):xy(e,"internal-error"))}}))} -sy.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new yy(b,this.l,a);this.i.push(a);return a};sy.prototype.setServerCertificate=function(){return Promise.resolve(!1)};sy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")}; -function wy(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function yy(a,b,c){hf.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Ye;this.keyStatuses=new zy}oa(yy,hf); -function Ay(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=hb(Qf("LOAD_SESSION|"+c));else{var e=Qf("PERSISTENT|");d=kg(e,b)}else d=hb(b)}catch(g){return Promise.reject(g)}a.h=new Ye;var f=uy("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new qd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h} -function By(a,b,c){if(a.g)a.g.then(function(){return By(a,b,c)}).catch(function(){return By(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Kf(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=hg(e.keys[0].k);e=hg(e.keys[0].kid)}else d=hb(c),e=null;var f=uy("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}} -function xy(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}r=yy.prototype;r.generateRequest=function(a,b){return Ay(this,b,null)};r.load=function(a){return"persistent-license"==this.l?Ay(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Ye;By(this,b,a);return b}; -r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=uy("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function zy(){this.size=0;this.g=void 0}r=zy.prototype;r.Nb=function(){return this.g}; -r.forEach=function(a){this.g&&a(this.g,wh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=wh.value();return this.g&&fb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var py="";mx(oy);function Cy(){}function Dy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Ey,Object.defineProperty(a,"disablePictureInPicture",{get:Fy,set:Gy,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Hy,document.addEventListener("webkitpresentationmodechanged",Iy,!0))}} -function Iy(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)} -function Ey(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Hy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))} -function Fy(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Gy(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}lx.PiPWebkit=Cy;Cy.install=Dy;mx(Dy);function Jy(){}function Ky(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Ly))}function Ly(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}lx.RandomUUID=Jy;Jy.install=Ky;mx(Ky);function My(){}function Ny(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Oy)}function Oy(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}lx.StorageEstimate=My;My.install=Ny;mx(Ny);function Py(){}function Qy(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Ry})}function Ry(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}lx.Symbol=Py;Py.install=Qy;mx(Qy);function Sy(){}function Ty(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}lx.VideoPlayPromise=Sy;Sy.install=Ty;mx(Ty);function Uy(){}function Vy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Ad())&&(a.getVideoPlaybackQuality=Wy)}}function Wy(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}lx.VideoPlaybackQuality=Uy;Uy.install=Vy;mx(Vy);function Xy(){}function Yy(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Zy;else if(6==b)a=$y;else{try{var c=!!Zy(1,2,"")}catch(d){c=!1}c&&(a=Zy)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Zy(a,b,c){return new window.TextTrackCue(a,b,c)}function $y(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}lx.VTTCue=Xy;Xy.install=Yy;mx(Yy);function az(){}az.prototype.parseInit=function(){};az.prototype.setSequenceMode=function(){};az.prototype.setManifestType=function(){};az.prototype.parseMedia=function(a,b){var c=null,d=[];a=Kf(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=bz.exec(e))){var f=cz.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new yb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d}; -M("shaka.text.LrcTextParser",az);az.prototype.parseMedia=az.prototype.parseMedia;az.prototype.setManifestType=az.prototype.setManifestType;az.prototype.setSequenceMode=az.prototype.setSequenceMode;az.prototype.parseInit=az.prototype.parseInit;var bz=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,cz=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Rc["application/x-subtitle-lrc"]=function(){return new az};function dz(){}dz.prototype.parseInit=function(){};dz.prototype.setSequenceMode=function(){};dz.prototype.setManifestType=function(){}; -dz.prototype.parseMedia=function(a,b,c){var d=Kf(a);a=[];if(""==d)return a;var e=Gg(d,"tt");if(!e)throw new O(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=tg(e,ez,"frameRate"),g=tg(e,ez,"subFrameRate"),h=tg(e,ez,"frameRateMultiplier"),k=tg(e,ez,"tickRate"),l=tg(e,ez,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=tg(e,fz,"extent");if("default"!=m&&"preserve"!=m)throw new O(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new gz(f, -g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{Hb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?rg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new zb;var v=u.getAttribute("xml:id");if(v){p.id=v;var y=null;n&&(y=hz.exec(n)||iz.exec(n));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var z,x=jz(u,h,"extent");if(x){var B=(z=hz.exec(x))||iz.exec(x); -null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=v&&(p.width=100*p.width/v),null!=y&&(p.height=100*p.height/y)),p.widthUnits=z||null!=v?Sb:0,p.heightUnits=z||null!=y?Sb:0)}if(u=jz(u,h,"origin"))if(B=(z=hz.exec(u))||iz.exec(u),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?x||(p.width=100-p.viewportAnchorX,p.widthUnits=Sb,p.height=100-p.viewportAnchorY,p.heightUnits=Sb):(null!=y&&(p.viewportAnchorY=100*p.viewportAnchorY/y),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/ -v)),p.viewportAnchorUnits=z||null!=v?Sb:0}else p=null;p&&k.push(p)}if(og(d,"p").length)throw new O(2,2,2001,"

can only be inside

in TTML");n=t(og(d,"div"));for(q=n.next();!q.done;q=n.next())if(og(q.value,"span").length)throw new O(2,2,2001," can only be inside

in TTML");if(b=kz(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a}; -function kz(a,b,c,d,e,f,g,h,k,l,m,n){var q=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var u=null,v=t(lz),y=v.next();!y.done&&!(u=mz(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;var z=tg(p,lz,"backgroundImage");n&&z&&!z.startsWith("#")&&(y=new fc(n),z=new fc(z),(y=y.resolve(z).toString())&&(v=y));if("p"==a.nodeName||u||v)m=!0;a=m;y="default"==(p.getAttribute("xml:space")|| -(h?"default":"preserve"));z=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var x=t(p.childNodes),B=x.next();!B.done;B=x.next())(B=kz(B.value,b,c,d,e,f,g,y,k,p,m,n))&&h.push(B);d=null!=l;n=/\S/.test(p.textContent);B=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(B||n||"br"==p.tagName||0!=h.length||d&&!y))return null;x=nz(p,c);n=x.start;for(x=x.end;q&&q.nodeType==Node.ELEMENT_NODE&&"tt"!=q.tagName;)x=oz(q,c,n,x),n=x.start,x= -x.end,q=q.parentNode;null==n&&(n=0);n+=b.periodStart;x=null==x?Infinity:x+b.periodStart;n=Math.max(n,b.segmentStart);x=Math.min(x,b.segmentEnd);if(!B&&0c.length)return f;var g=a;for(a=null;g&&!(a=e?sg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function oz(a,b,c,d){a=nz(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}} -function nz(a,b){var c=yz(a.getAttribute("begin"),b),d=yz(a.getAttribute("end"),b);a=yz(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}} -function yz(a,b){var c=null;if(zz.test(a)){a=zz.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Az.test(a))c=Bz(Az,a);else if(Cz.test(a))c=Bz(Cz,a);else if(Dz.test(a))a=Dz.exec(a),c=Number(a[1])/b.frameRate;else if(Ez.test(a))a=Ez.exec(a),c=Number(a[1])/b.g;else if(Fz.test(a))c=Bz(Fz,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c} -function Bz(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}M("shaka.text.TtmlTextParser",dz);dz.prototype.parseMedia=dz.prototype.parseMedia;dz.prototype.setManifestType=dz.prototype.setManifestType;dz.prototype.setSequenceMode=dz.prototype.setSequenceMode;dz.prototype.parseInit=dz.prototype.parseInit; -function gz(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))} -var hz=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,uz=/^(\d{1,2}(?:\.\d+)?|100)%$/,tz=/^(\d+px|\d+em|\d*\.?\d+c)$/,iz=/^(\d+)px (\d+)px$/,zz=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Az=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Cz=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Dz=/^(\d*(?:\.\d*)?)f$/,Ez=/^(\d*(?:\.\d*)?)t$/,Fz=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),sz={left:Gb,center:"center",right:"end",start:Gb, -end:"end"},rz={left:"line-left",center:"center",right:"line-right"},ez=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],fz=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],lz=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Rc["application/ttml+xml"]=function(){return new dz};function Gz(){this.g=new dz}Gz.prototype.parseInit=function(a){var b=!1;(new Vf).box("moov",$f).box("trak",$f).box("mdia",$f).box("minf",$f).box("stbl",$f).P("stsd",bg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};Gz.prototype.setSequenceMode=function(){};Gz.prototype.setManifestType=function(){}; -Gz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Vf).box("mdat",dg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new O(2,2,2007);return f};M("shaka.text.Mp4TtmlParser",Gz);Gz.prototype.parseMedia=Gz.prototype.parseMedia;Gz.prototype.setManifestType=Gz.prototype.setManifestType;Gz.prototype.setSequenceMode=Gz.prototype.setSequenceMode;Gz.prototype.parseInit=Gz.prototype.parseInit;Rc['application/mp4; codecs="stpp"']=function(){return new Gz}; -Rc['application/mp4; codecs="stpp.ttml"']=function(){return new Gz};Rc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Gz};Rc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Gz};function Hz(){this.h=!1;this.g="UNKNOWN"}Hz.prototype.parseInit=function(){};Hz.prototype.setSequenceMode=function(a){this.h=a};Hz.prototype.setManifestType=function(a){this.g=a}; -Hz.prototype.parseMedia=function(a,b){a=Kf(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new O(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Iz(new Zs(d[1]));if(null==a)throw new O(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+ -e/9E4-a}}else c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(a=b.segmentStart);b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Zs(d);var f=new zb;bt(d);$s(d);for(var g=bt(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY= -Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");$s(d);g=bt(d)}b.push(f)}e=new Map;Jz(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0"===d[e]&& -0",'

'),d+="
";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!= -e[g]&&(g=-1)):">"===e[h]&&0","<"+g+">"),a=a.replace("",""),d||(a+="")}if(d=Gg(""+a+"","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Nz(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())Oz(d.value,b,c)}else b.payload=Nz(a)}else b.payload=Nz(a)} -function Pz(a,b){return a&&0",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}M("shaka.text.VttTextParser",Hz);Hz.prototype.parseMedia=Hz.prototype.parseMedia;Hz.prototype.setManifestType=Hz.prototype.setManifestType;Hz.prototype.setSequenceMode=Hz.prototype.setSequenceMode;Hz.prototype.parseInit=Hz.prototype.parseInit; -var Mz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Rc["text/vtt"]=function(){return new Hz};Rc['text/vtt; codecs="vtt"']=function(){return new Hz};Rc['text/vtt; codecs="wvtt"']=function(){return new Hz};function Rz(){this.g=null}Rz.prototype.parseInit=function(a){var b=this,c=!1;(new Vf).box("moov",$f).box("trak",$f).box("mdia",$f).P("mdhd",function(d){d=Xh(d.reader,d.version);b.g=d.timescale}).box("minf",$f).box("stbl",$f).P("stsd",bg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};Rz.prototype.setSequenceMode=function(){};Rz.prototype.setManifestType=function(){}; -Rz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Vf).box("moof",$f).box("traf",$f).P("tfdt",function(B){g=!0;c=Wh(B.reader,B.version).baseMediaDecodeTime}).P("tfhd",function(B){l=Vh(B.reader,B.flags).If}).P("trun",function(B){h=!0;d=Yh(B.reader,B.version,B.flags).gg}).box("mdat",dg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);a=c;for(var m=new Sf(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q= -q.value;var p=q.ff||l,u=q.Td?c+q.Td:a;a=u+(p||0);var v=0;do{var y=m.L();v+=y;var z=m.L(),x=null;"vttc"==Zf(z)?8").replace(/{\/b}/g,"").replace(/{i}/g,"").replace(/{\/i}/g,"").replace(/{u}/g,"").replace(/{\/u}/g,"")+"\n\n";return b}M("shaka.text.SrtTextParser",Wz);Wz.srt2webvtt=Xz;Wz.prototype.parseMedia=Wz.prototype.parseMedia; -Wz.prototype.setManifestType=Wz.prototype.setManifestType;Wz.prototype.setSequenceMode=Wz.prototype.setSequenceMode;Wz.prototype.parseInit=Wz.prototype.parseInit;Rc["text/srt"]=function(){return new Wz};function Yz(){}Yz.prototype.parseInit=function(){};Yz.prototype.setSequenceMode=function(){};Yz.prototype.setManifestType=function(){}; -Yz.prototype.parseMedia=function(a){var b="",c="";a=Kf(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Zz.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=$z.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(aA);else if("Style"==e){e=f.split(aA);f={};for(var g=0;g>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function bA(a){a=eA.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Yz);Yz.prototype.parseMedia=Yz.prototype.parseMedia;Yz.prototype.setManifestType=Yz.prototype.setManifestType;Yz.prototype.setSequenceMode=Yz.prototype.setSequenceMode;Yz.prototype.parseInit=Yz.prototype.parseInit; -var Zz=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,$z=/^\s*([^:]+):\s*(.*)/,aA=/\s*,\s*/,eA=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Rc["text/x-ssa"]=function(){return new Yz};function fA(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,ha:"mp4a.40."+e}} -function hA(a,b){if(b+1=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344, -1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,fa:a,S:e}} -function lA(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0>>24+h<>h;c=c?c<c)return!0}return!1};function mA(a){this.i=a;this.h=0;this.g=new Map}r=mA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i}; -r.transmux=function(a,b,c,d){a=hb(a);for(var e=Uh(a),f=e.length;fa.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new ci(a.subarray(b+2));ei(c,2);ei(c,3);var d=fi(c,11)+1<<1,e=fi(c,2);if(3==e){e=fi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=fi(c,2);var g=fi(c,3),h=fi(c,1);c=fi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,fa:a,S:d}};function oA(a){this.i=a;this.h=0;this.g=new Map}r=oA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i}; -r.transmux=function(a,b,c,d){a=hb(a);for(var e=Uh(a),f=e.length;fe?ki(c,16):ki(c,64))}hi(c);d=T(c);if(0===d)T(c);else if(1===d)for(ei(c,1),hi(c),hi(c),d=T(c),e=0;e>>8&255);e.push(b.byteLength&255);e=e.concat.apply(e,w(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,e[3],e[4],e[5],255,225].concat(e,[1],b));return{height:c,width:d,la:a}} -function rA(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(kg(h, -f.fullData)))}return c.length?{data:kg.apply(eg,w(c)),Tc:b}:null}var qA=[100,110,122,244,44,83,86,118,128,138,139,134];function sA(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=tA(b.fullData);a=uA(c.fullData);var f=vA(d.fullData);b=wA(b.fullData,c.fullData,d.fullData,{Xe:e.Xe,rf:e.rf,Ae:a.Ae,Be:a.Be,ue:a.ue,ze:a.ze,ve:a.ve,we:a.we,xe:a.xe,ye:a.ye,oe:a.oe,pe:a.pe,qe:a.qe,re:a.re,se:a.se,te:a.te,le:a.le,Od:a.Od,ke:a.ke,je:a.je,ie:a.ie,$e:f.$e});return{height:a.height,width:a.width, -la:b}}function tA(a){var b=new ci(a,!0);ji(b);ji(b);fi(b,4);fi(b,2);fi(b,6);a=fi(b,3);b=U(b);return{Xe:a+1,rf:b}} -function uA(a){a=new ci(a,!0);ji(a);ji(a);var b=0,c=0,d=0,e=0;fi(a,4);var f=fi(a,3);U(a);for(var g=fi(a,2),h=fi(a,1),k=fi(a,5),l=ji(a),m=ji(a),n=ji(a),q=ji(a),p=ji(a),u=ji(a),v=ji(a),y=ji(a),z=ji(a),x=ji(a),B=ji(a),A=[],D=[],F=0;FF;F++)fi(a,2);for(F=0;FI;I++)for(var L=0;L<(3===I?2:6);L++)if(U(a)){var N=Math.min(64,1<<4+(I<<1));1>8;e[14]=d.Od&255;e[15]=252|d.$e&3;e[16]=252|d.ke&3;e[17]=248|d.je&7;e[18]=248|d.ie&7;e[19]=0;e[20]=0;e[21]=(d.le&3)<<6|(d.Xe&7)<<3|(d.rf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength& -255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function xA(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*yA[14*(3===c?3-d:3===d?3:4)+e-1];f=zA[3*(3===c?0:2===c?1:2)+f];c=AA[c][d];var h=BA[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,S:k,Qh:8*c*h}}return null} -function CA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var yA=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],zA=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],AA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BA=[0,1,1,4];function DA(a){this.i=a;this.h=0;this.g=new Map}r=DA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i}; -r.transmux=function(a,b,c,d){a=hb(a);for(c=Uh(a).length;cd;d++)this.usertype[d]!==HA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=FA.prototype;r.destroy=function(){}; -r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return Za(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Za(b)||Za(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h}; -r.transmux=function(a,b,c){if(!c)return Promise.resolve(hb(a));if(!b.mssPrivateData)return Promise.reject(new O(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m), -1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d>24&255;J[1]=F>>16&255;J[2]=F>>8&255;J[3]=F&255;x.push(kg(J,A.fullData))}}var G=x.length?{data:kg.apply(eg,w(x)),Tc:z}:null;G&&(null==p&&null!= -l.dts&&(p=l.dts),z=void 0,z=v+1 + + + + diff --git a/iosApp/iosApp.xcodeproj/xcuserdata/neo.chang.xcuserdatad/xcschemes/iosApp.xcscheme b/iosApp/iosApp.xcodeproj/xcuserdata/neo.chang.xcuserdatad/xcschemes/iosApp.xcscheme new file mode 100644 index 0000000..19ce4b0 --- /dev/null +++ b/iosApp/iosApp.xcodeproj/xcuserdata/neo.chang.xcuserdatad/xcschemes/iosApp.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/iosApp/iosApp.xcodeproj/xcuserdata/neo.chang.xcuserdatad/xcschemes/xcschememanagement.plist b/iosApp/iosApp.xcodeproj/xcuserdata/neo.chang.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..fa59f97 --- /dev/null +++ b/iosApp/iosApp.xcodeproj/xcuserdata/neo.chang.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + iosApp.xcscheme + + orderHint + 0 + + + + diff --git a/kotlin-js-store/wasm/yarn.lock b/kotlin-js-store/wasm/yarn.lock new file mode 100644 index 0000000..85e59fb --- /dev/null +++ b/kotlin-js-store/wasm/yarn.lock @@ -0,0 +1,23 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@js-joda/core@3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-3.2.0.tgz#3e61e21b7b2b8a6be746df1335cf91d70db2a273" + integrity sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg== + +format-util@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" + integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== + +ws@8.18.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +ws@8.20.1: + version "8.20.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.20.1.tgz#91a9ae2b312ccf98e0a85ec499b48cef45ab0ddb" + integrity sha512-It4dO0K5v//JtTXuPkfEOaI3uUN87iYPnqo/ZzqCoG3g8uhA66QUMs/SrM0YK7/NAu+r4LMh/9dq2A7k+rHs+w== diff --git a/settings.gradle.kts b/settings.gradle.kts index 6083652..651e1a4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,20 +1,104 @@ -rootProject.name = "ReelsDemo" -include(":composeApp") - pluginManagement { repositories { - google() gradlePluginPortal() + maven(url = "https://plugins.gradle.org/m2/") mavenCentral() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots") + name = "SonatypeSnapshots" + mavenContent { + snapshotsOnly() + } + } + maven(url = "https://maven.aliyun.com/repository/gradle-plugin/") + maven(url = "https://maven.aliyun.com/repository/spring-plugin/") + maven(url = "https://jitpack.io") + maven(url = "https://s3.amazonaws.com/repo.commonsware.com") + maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev") + maven(url = "https://api.xposed.info/") + maven(url = "https://jogamp.org/deployment/maven") + maven(url = "https://developer.huawei.com/repo/") + maven(url = "https://raw.githubusercontent.com/cybernhl/maven-repository/master/") + maven(url = "https://maven.aliyun.com/repository/jcenter") + maven(url = "https://maven.aliyun.com/repository/public/") + maven(url = "https://maven.aliyun.com/repository/spring/") + maven(url = "https://maven.aliyun.com/repository/google/") + maven(url = "https://maven.aliyun.com/repository/grails-core/") + maven(url = "https://maven.aliyun.com/repository/apache-snapshots/") + maven(url = "https://packages.jetbrains.team/maven/p/skija/maven") + } + plugins { + } } +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" +} + +val fullVersion = System.getProperty("java.version", "8.0.0") +val versionComponents = fullVersion + .split(".") + .take(2) + .filter { it.isNotBlank() } + .map { Integer.parseInt(it) } + +val currentJdk = if (versionComponents[0] == 1) versionComponents[1] else versionComponents[0] + + +@Suppress("UnstableApiUsage") dependencyResolutionManagement { repositories { - google() mavenCentral() - mavenLocal() - maven("https://jogamp.org/deployment/maven") - maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") + google() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots") + name = "SonatypeSnapshots" + mavenContent { + snapshotsOnly() + } + } + maven(url = "https://jitpack.io") + maven(url = "https://s3.amazonaws.com/repo.commonsware.com") + maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev") + maven(url = "https://api.xposed.info/") + maven(url = "https://jogamp.org/deployment/maven") + maven(url = "https://raw.githubusercontent.com/cybernhl/maven-repository/master/") + maven(url = "https://maven.aliyun.com/repository/jcenter") + maven(url = "https://maven.aliyun.com/repository/public/") + maven(url = "https://maven.aliyun.com/repository/spring/") + maven(url = "https://maven.aliyun.com/repository/google/") + maven(url = "https://packages.jetbrains.team/maven/p/skija/maven") } } + +rootProject.name = "ReelsDemo" +include(":shared") +project(":shared").projectDir = file("./composeApp") + +include(":desktopApp") +include(":androidApp") +include(":webApp") + +//include(":compose-multiplatform-media-player") +//project(":compose-multiplatform-media-player").projectDir = file("./compose-multiplatform-media-player/media_player") + +//include(":core") +//project(":core").projectDir = file("./compose-multiplatform-media-player/JavaCvPlayer/core") +//include(":core-video-swing") +//project(":core-video-swing").projectDir = file("./compose-multiplatform-media-player/JavaCvPlayer/core-video-swing") +//include(":core_ui_compose") +//project(":core_ui_compose").projectDir = file("./compose-multiplatform-media-player/JavaCvPlayer/core_ui_compose") +//include(":core-video-javafx") +//project(":core-video-javafx").projectDir = file("./compose-multiplatform-media-player/JavaCvPlayer/core-video-javafx") +//include(":core-video-compose-jvm") +//project(":core-video-compose-jvm").projectDir = file("./compose-multiplatform-media-player/JavaCvPlayer/core-video-compose-jvm") +//include(":core-video-skia") +//project(":core-video-skia").projectDir = file("./compose-multiplatform-media-player/JavaCvPlayer/core-video-skia") \ No newline at end of file diff --git a/webApp/build.gradle.kts b/webApp/build.gradle.kts new file mode 100644 index 0000000..62499f2 --- /dev/null +++ b/webApp/build.gradle.kts @@ -0,0 +1,45 @@ +import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl + +plugins { + alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.jetbrains.compose) +} + +kotlin { + @OptIn(ExperimentalWasmDsl::class) + wasmJs { + browser { + commonWebpackConfig { + cssSupport { + enabled = true + } + } + } + binaries.executable() + } + + sourceSets { + commonMain.dependencies { + implementation(project(":shared")) + implementation(libs.jetbrains.compose.ui) + implementation(libs.jetbrains.compose.runtime) + implementation(libs.jetbrains.compose.foundation) + implementation(libs.jetbrains.compose.material3) + implementation(libs.chaintech.media.player) + } + + val wasmJsMain by getting { + resources.srcDirs( + "src/wasmJsMain/resources", + "../assets", // 連結根目錄 assets (提供 /git_banner.jpg 等) + "../assets/wasmJs", // 連結根目錄 assets/wasmJs (提供 shaka 腳本到根目錄) + "../composeApp/src/androidMain/assets" // 提供影片資源 1.mp4 等到根目錄 + ) + } + } +} + +tasks.withType().configureEach { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} diff --git a/composeApp/src/wasmJsMain/kotlin/main.kt b/webApp/src/wasmJsMain/kotlin/main.kt similarity index 64% rename from composeApp/src/wasmJsMain/kotlin/main.kt rename to webApp/src/wasmJsMain/kotlin/main.kt index 0da9632..4f8f3b8 100644 --- a/composeApp/src/wasmJsMain/kotlin/main.kt +++ b/webApp/src/wasmJsMain/kotlin/main.kt @@ -1,12 +1,11 @@ import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.window.ComposeViewport -import kotlinx.browser.document import org.chaintech.app.MainView @OptIn(ExperimentalComposeUiApi::class) fun main() { - val body = document.body ?: return - ComposeViewport(body) { + // 將 Compose 渲染到指定的 HTML 容器,以便透過 CSS 控制層級 + ComposeViewport("compose-target") { MainView() } } diff --git a/webApp/src/wasmJsMain/resources/index.html b/webApp/src/wasmJsMain/resources/index.html new file mode 100644 index 0000000..5e1aba6 --- /dev/null +++ b/webApp/src/wasmJsMain/resources/index.html @@ -0,0 +1,52 @@ + + + + + + Media Player + + + + + + + + + +
+ + +