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AAS3I,EACtE,CACA,SAAS6qC,EAAgB3P,GACvB,MAAkB,iBAAPA,IAEHx6B,MAAMw6B,KAASx6B,MAAMksB,WAAWsO,GAC1C,C,yMACA,MAAMhR,EAAS4gB,GAAO,IAAI/oC,SAASC,GAAYoL,WAAWpL,EAAS8oC,I","sources":["webpack://jumpstart-app/./node_modules/media-chrome/dist/constants.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/time.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/fullscreen-api.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/platform-tests.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-store/util.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-store/state-mediator.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-store/request-map.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-store/media-store.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-controller.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-airplay-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-captions-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-cast-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-chrome-dialog.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-chrome-range.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-control-bar.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-text-display.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-duration-display.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-error-dialog.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-fullscreen-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-live-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-loading-indicator.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-mute-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-pip-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-play-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-poster-image.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-preview-chapter-display.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-preview-thumbnail.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-preview-time-display.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-seek-backward-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-seek-forward-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-time-display.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/range-animation.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-time-range.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-tooltip.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-volume-range.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/labels/labels.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-chrome-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-container.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-gesture-receiver.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-playback-rate-button.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/template-parts.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/template-processor.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/media-theme-element.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/attribute-token-list.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/captions.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/element-utils.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/resize-observer.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/server-safe-globals.js","webpack://jumpstart-app/./node_modules/media-chrome/dist/utils/utils.js"],"sourcesContent":["const MediaUIEvents = {\n MEDIA_PLAY_REQUEST: \"mediaplayrequest\",\n MEDIA_PAUSE_REQUEST: \"mediapauserequest\",\n MEDIA_MUTE_REQUEST: \"mediamuterequest\",\n MEDIA_UNMUTE_REQUEST: \"mediaunmuterequest\",\n MEDIA_VOLUME_REQUEST: \"mediavolumerequest\",\n MEDIA_SEEK_REQUEST: \"mediaseekrequest\",\n MEDIA_AIRPLAY_REQUEST: \"mediaairplayrequest\",\n MEDIA_ENTER_FULLSCREEN_REQUEST: \"mediaenterfullscreenrequest\",\n MEDIA_EXIT_FULLSCREEN_REQUEST: \"mediaexitfullscreenrequest\",\n MEDIA_PREVIEW_REQUEST: \"mediapreviewrequest\",\n MEDIA_ENTER_PIP_REQUEST: \"mediaenterpiprequest\",\n MEDIA_EXIT_PIP_REQUEST: \"mediaexitpiprequest\",\n MEDIA_ENTER_CAST_REQUEST: \"mediaentercastrequest\",\n MEDIA_EXIT_CAST_REQUEST: \"mediaexitcastrequest\",\n MEDIA_SHOW_TEXT_TRACKS_REQUEST: \"mediashowtexttracksrequest\",\n MEDIA_HIDE_TEXT_TRACKS_REQUEST: \"mediahidetexttracksrequest\",\n MEDIA_SHOW_SUBTITLES_REQUEST: \"mediashowsubtitlesrequest\",\n MEDIA_DISABLE_SUBTITLES_REQUEST: \"mediadisablesubtitlesrequest\",\n MEDIA_TOGGLE_SUBTITLES_REQUEST: \"mediatogglesubtitlesrequest\",\n MEDIA_PLAYBACK_RATE_REQUEST: \"mediaplaybackraterequest\",\n MEDIA_RENDITION_REQUEST: \"mediarenditionrequest\",\n MEDIA_AUDIO_TRACK_REQUEST: \"mediaaudiotrackrequest\",\n MEDIA_SEEK_TO_LIVE_REQUEST: \"mediaseektoliverequest\",\n REGISTER_MEDIA_STATE_RECEIVER: \"registermediastatereceiver\",\n UNREGISTER_MEDIA_STATE_RECEIVER: \"unregistermediastatereceiver\"\n};\nconst MediaStateReceiverAttributes = {\n MEDIA_CHROME_ATTRIBUTES: \"mediachromeattributes\",\n MEDIA_CONTROLLER: \"mediacontroller\"\n};\nconst MediaUIProps = {\n MEDIA_AIRPLAY_UNAVAILABLE: \"mediaAirplayUnavailable\",\n MEDIA_AUDIO_TRACK_ENABLED: \"mediaAudioTrackEnabled\",\n MEDIA_AUDIO_TRACK_LIST: \"mediaAudioTrackList\",\n MEDIA_AUDIO_TRACK_UNAVAILABLE: \"mediaAudioTrackUnavailable\",\n MEDIA_BUFFERED: \"mediaBuffered\",\n MEDIA_CAST_UNAVAILABLE: \"mediaCastUnavailable\",\n MEDIA_CHAPTERS_CUES: \"mediaChaptersCues\",\n MEDIA_CURRENT_TIME: \"mediaCurrentTime\",\n MEDIA_DURATION: \"mediaDuration\",\n MEDIA_ENDED: \"mediaEnded\",\n MEDIA_ERROR: \"mediaError\",\n MEDIA_ERROR_CODE: \"mediaErrorCode\",\n MEDIA_ERROR_MESSAGE: \"mediaErrorMessage\",\n MEDIA_FULLSCREEN_UNAVAILABLE: \"mediaFullscreenUnavailable\",\n MEDIA_HAS_PLAYED: \"mediaHasPlayed\",\n MEDIA_HEIGHT: \"mediaHeight\",\n MEDIA_IS_AIRPLAYING: \"mediaIsAirplaying\",\n MEDIA_IS_CASTING: \"mediaIsCasting\",\n MEDIA_IS_FULLSCREEN: \"mediaIsFullscreen\",\n MEDIA_IS_PIP: \"mediaIsPip\",\n MEDIA_LOADING: \"mediaLoading\",\n MEDIA_MUTED: \"mediaMuted\",\n MEDIA_PAUSED: \"mediaPaused\",\n MEDIA_PIP_UNAVAILABLE: \"mediaPipUnavailable\",\n MEDIA_PLAYBACK_RATE: \"mediaPlaybackRate\",\n MEDIA_PREVIEW_CHAPTER: \"mediaPreviewChapter\",\n MEDIA_PREVIEW_COORDS: \"mediaPreviewCoords\",\n MEDIA_PREVIEW_IMAGE: \"mediaPreviewImage\",\n MEDIA_PREVIEW_TIME: \"mediaPreviewTime\",\n MEDIA_RENDITION_LIST: \"mediaRenditionList\",\n MEDIA_RENDITION_SELECTED: \"mediaRenditionSelected\",\n MEDIA_RENDITION_UNAVAILABLE: \"mediaRenditionUnavailable\",\n MEDIA_SEEKABLE: \"mediaSeekable\",\n MEDIA_STREAM_TYPE: \"mediaStreamType\",\n MEDIA_SUBTITLES_LIST: \"mediaSubtitlesList\",\n MEDIA_SUBTITLES_SHOWING: \"mediaSubtitlesShowing\",\n MEDIA_TARGET_LIVE_WINDOW: \"mediaTargetLiveWindow\",\n MEDIA_TIME_IS_LIVE: \"mediaTimeIsLive\",\n MEDIA_VOLUME: \"mediaVolume\",\n MEDIA_VOLUME_LEVEL: \"mediaVolumeLevel\",\n MEDIA_VOLUME_UNAVAILABLE: \"mediaVolumeUnavailable\",\n MEDIA_WIDTH: \"mediaWidth\"\n};\nconst MediaUIPropsEntries = Object.entries(\n MediaUIProps\n);\nconst MediaUIAttributes = MediaUIPropsEntries.reduce(\n (dictObj, [key, propName]) => {\n dictObj[key] = propName.toLowerCase();\n return dictObj;\n },\n {}\n);\nconst AdditionalStateChangeEvents = {\n USER_INACTIVE: \"userinactivechange\",\n BREAKPOINTS_CHANGE: \"breakpointchange\",\n BREAKPOINTS_COMPUTED: \"breakpointscomputed\"\n};\nconst MediaStateChangeEvents = MediaUIPropsEntries.reduce(\n (dictObj, [key, propName]) => {\n dictObj[key] = propName.toLowerCase();\n return dictObj;\n },\n { ...AdditionalStateChangeEvents }\n);\nconst StateChangeEventToAttributeMap = Object.entries(\n MediaStateChangeEvents\n).reduce(\n (mapObj, [key, eventType]) => {\n const attrName = MediaUIAttributes[key];\n if (attrName) {\n mapObj[eventType] = attrName;\n }\n return mapObj;\n },\n { userinactivechange: \"userinactive\" }\n);\nconst AttributeToStateChangeEventMap = Object.entries(\n MediaUIAttributes\n).reduce(\n (mapObj, [key, attrName]) => {\n const evtType = MediaStateChangeEvents[key];\n if (evtType) {\n mapObj[attrName] = evtType;\n }\n return mapObj;\n },\n { userinactive: \"userinactivechange\" }\n);\nconst TextTrackKinds = {\n SUBTITLES: \"subtitles\",\n CAPTIONS: \"captions\",\n DESCRIPTIONS: \"descriptions\",\n CHAPTERS: \"chapters\",\n METADATA: \"metadata\"\n};\nconst TextTrackModes = {\n DISABLED: \"disabled\",\n HIDDEN: \"hidden\",\n SHOWING: \"showing\"\n};\nconst ReadyStates = {\n HAVE_NOTHING: 0,\n HAVE_METADATA: 1,\n HAVE_CURRENT_DATA: 2,\n HAVE_FUTURE_DATA: 3,\n HAVE_ENOUGH_DATA: 4\n};\nconst PointerTypes = {\n MOUSE: \"mouse\",\n PEN: \"pen\",\n TOUCH: \"touch\"\n};\nconst AvailabilityStates = {\n UNAVAILABLE: \"unavailable\",\n UNSUPPORTED: \"unsupported\"\n};\nconst StreamTypes = {\n LIVE: \"live\",\n ON_DEMAND: \"on-demand\",\n UNKNOWN: \"unknown\"\n};\nconst VolumeLevels = {\n HIGH: \"high\",\n MEDIUM: \"medium\",\n LOW: \"low\",\n OFF: \"off\"\n};\nconst WebkitPresentationModes = {\n INLINE: \"inline\",\n FULLSCREEN: \"fullscreen\",\n PICTURE_IN_PICTURE: \"picture-in-picture\"\n};\nexport {\n AttributeToStateChangeEventMap,\n AvailabilityStates,\n MediaStateChangeEvents,\n MediaStateReceiverAttributes,\n MediaUIAttributes,\n MediaUIEvents,\n MediaUIProps,\n PointerTypes,\n ReadyStates,\n StateChangeEventToAttributeMap,\n StreamTypes,\n TextTrackKinds,\n TextTrackModes,\n VolumeLevels,\n WebkitPresentationModes\n};\n","import { isValidNumber } from \"./utils.js\";\nconst UnitLabels = [\n {\n singular: \"hour\",\n plural: \"hours\"\n },\n {\n singular: \"minute\",\n plural: \"minutes\"\n },\n {\n singular: \"second\",\n plural: \"seconds\"\n }\n];\nconst toTimeUnitPhrase = (timeUnitValue, unitIndex) => {\n const unitLabel = timeUnitValue === 1 ? UnitLabels[unitIndex].singular : UnitLabels[unitIndex].plural;\n return `${timeUnitValue} ${unitLabel}`;\n};\nconst formatAsTimePhrase = (seconds) => {\n if (!isValidNumber(seconds))\n return \"\";\n const positiveSeconds = Math.abs(seconds);\n const negative = positiveSeconds !== seconds;\n const secondsDateTime = new Date(0, 0, 0, 0, 0, positiveSeconds, 0);\n const timeParts = [\n secondsDateTime.getHours(),\n secondsDateTime.getMinutes(),\n secondsDateTime.getSeconds()\n ];\n const timeString = timeParts.map(\n (timeUnitValue, index) => timeUnitValue && toTimeUnitPhrase(timeUnitValue, index)\n ).filter((x) => x).join(\", \");\n const negativeSuffix = negative ? \" remaining\" : \"\";\n return `${timeString}${negativeSuffix}`;\n};\nfunction formatTime(seconds, guide) {\n let negative = false;\n if (seconds < 0) {\n negative = true;\n seconds = 0 - seconds;\n }\n seconds = seconds < 0 ? 0 : seconds;\n let s = Math.floor(seconds % 60);\n let m = Math.floor(seconds / 60 % 60);\n let h = Math.floor(seconds / 3600);\n const gm = Math.floor(guide / 60 % 60);\n const gh = Math.floor(guide / 3600);\n if (isNaN(seconds) || seconds === Infinity) {\n h = m = s = \"0\";\n }\n h = h > 0 || gh > 0 ? h + \":\" : \"\";\n m = ((h || gm >= 10) && m < 10 ? \"0\" + m : m) + \":\";\n s = s < 10 ? \"0\" + s : s;\n return (negative ? \"-\" : \"\") + h + m + s;\n}\nconst emptyTimeRanges = Object.freeze({\n length: 0,\n start(index) {\n const unsignedIdx = index >>> 0;\n if (unsignedIdx >= this.length) {\n throw new DOMException(\n `Failed to execute 'start' on 'TimeRanges': The index provided (${unsignedIdx}) is greater than or equal to the maximum bound (${this.length}).`\n );\n }\n return 0;\n },\n end(index) {\n const unsignedIdx = index >>> 0;\n if (unsignedIdx >= this.length) {\n throw new DOMException(\n `Failed to execute 'end' on 'TimeRanges': The index provided (${unsignedIdx}) is greater than or equal to the maximum bound (${this.length}).`\n );\n }\n return 0;\n }\n});\nfunction serializeTimeRanges(timeRanges = emptyTimeRanges) {\n return Array.from(timeRanges).map(\n (_, i) => [\n Number(timeRanges.start(i).toFixed(3)),\n Number(timeRanges.end(i).toFixed(3))\n ].join(\":\")\n ).join(\" \");\n}\nexport {\n emptyTimeRanges,\n formatAsTimePhrase,\n formatTime,\n serializeTimeRanges\n};\n","import { WebkitPresentationModes } from \"../constants.js\";\nimport { containsComposedNode } from \"./element-utils.js\";\nimport { document } from \"./server-safe-globals.js\";\nconst enterFullscreen = (stateOwners) => {\n var _a;\n const { media, fullscreenElement } = stateOwners;\n const enterFullscreenKey = fullscreenElement && \"requestFullscreen\" in fullscreenElement ? \"requestFullscreen\" : fullscreenElement && \"webkitRequestFullScreen\" in fullscreenElement ? \"webkitRequestFullScreen\" : void 0;\n if (enterFullscreenKey) {\n const maybePromise = (_a = fullscreenElement[enterFullscreenKey]) == null ? void 0 : _a.call(fullscreenElement);\n if (maybePromise instanceof Promise) {\n return maybePromise.catch(() => {\n });\n }\n } else if (media == null ? void 0 : media.webkitEnterFullscreen) {\n media.webkitEnterFullscreen();\n } else if (media == null ? void 0 : media.requestFullscreen) {\n media.requestFullscreen();\n }\n};\nconst exitFullscreenKey = \"exitFullscreen\" in document ? \"exitFullscreen\" : \"webkitExitFullscreen\" in document ? \"webkitExitFullscreen\" : \"webkitCancelFullScreen\" in document ? \"webkitCancelFullScreen\" : void 0;\nconst exitFullscreen = (stateOwners) => {\n var _a;\n const { documentElement } = stateOwners;\n if (exitFullscreenKey) {\n const maybePromise = (_a = documentElement == null ? void 0 : documentElement[exitFullscreenKey]) == null ? void 0 : _a.call(documentElement);\n if (maybePromise instanceof Promise) {\n return maybePromise.catch(() => {\n });\n }\n }\n};\nconst fullscreenElementKey = \"fullscreenElement\" in document ? \"fullscreenElement\" : \"webkitFullscreenElement\" in document ? \"webkitFullscreenElement\" : void 0;\nconst getFullscreenElement = (stateOwners) => {\n const { documentElement, media } = stateOwners;\n const docFullscreenElement = documentElement == null ? void 0 : documentElement[fullscreenElementKey];\n if (!docFullscreenElement && \"webkitDisplayingFullscreen\" in media && \"webkitPresentationMode\" in media && media.webkitDisplayingFullscreen && media.webkitPresentationMode === WebkitPresentationModes.FULLSCREEN) {\n return media;\n }\n return docFullscreenElement;\n};\nconst isFullscreen = (stateOwners) => {\n var _a;\n const { media, documentElement, fullscreenElement = media } = stateOwners;\n if (!media || !documentElement)\n return false;\n const currentFullscreenElement = getFullscreenElement(stateOwners);\n if (!currentFullscreenElement)\n return false;\n if (currentFullscreenElement === fullscreenElement || currentFullscreenElement === media) {\n return true;\n }\n if (currentFullscreenElement.localName.includes(\"-\")) {\n let currentRoot = currentFullscreenElement.shadowRoot;\n if (!(fullscreenElementKey in currentRoot)) {\n return containsComposedNode(\n currentFullscreenElement,\n /** @TODO clean up type assumptions (e.g. Node) (CJP) */\n // @ts-ignore\n fullscreenElement\n );\n }\n while (currentRoot == null ? void 0 : currentRoot[fullscreenElementKey]) {\n if (currentRoot[fullscreenElementKey] === fullscreenElement)\n return true;\n currentRoot = (_a = currentRoot[fullscreenElementKey]) == null ? void 0 : _a.shadowRoot;\n }\n }\n return false;\n};\nconst fullscreenEnabledKey = \"fullscreenEnabled\" in document ? \"fullscreenEnabled\" : \"webkitFullscreenEnabled\" in document ? \"webkitFullscreenEnabled\" : void 0;\nconst isFullscreenEnabled = (stateOwners) => {\n const { documentElement, media } = stateOwners;\n return !!(documentElement == null ? void 0 : documentElement[fullscreenEnabledKey]) || media && \"webkitSupportsFullscreen\" in media;\n};\nexport {\n enterFullscreen,\n exitFullscreen,\n getFullscreenElement,\n isFullscreen,\n isFullscreenEnabled\n};\n","import { globalThis, document } from \"./server-safe-globals.js\";\nimport { delay } from \"./utils.js\";\nimport { isFullscreenEnabled } from \"./fullscreen-api.js\";\nlet testMediaEl;\nconst getTestMediaEl = () => {\n var _a, _b;\n if (testMediaEl)\n return testMediaEl;\n testMediaEl = (_b = (_a = document) == null ? void 0 : _a.createElement) == null ? void 0 : _b.call(_a, \"video\");\n return testMediaEl;\n};\nconst hasVolumeSupportAsync = async (mediaEl = getTestMediaEl()) => {\n if (!mediaEl)\n return false;\n const prevVolume = mediaEl.volume;\n mediaEl.volume = prevVolume / 2 + 0.1;\n const abortController = new AbortController();\n const volumeSupported = await Promise.race([\n dispatchedVolumeChange(mediaEl, abortController.signal),\n volumeChanged(mediaEl, prevVolume)\n ]);\n abortController.abort();\n return volumeSupported;\n};\nconst dispatchedVolumeChange = (mediaEl, signal) => {\n return new Promise((resolve) => {\n mediaEl.addEventListener(\"volumechange\", () => resolve(true), { signal });\n });\n};\nconst volumeChanged = async (mediaEl, prevVolume) => {\n for (let i = 0; i < 10; i++) {\n if (mediaEl.volume === prevVolume)\n return false;\n await delay(10);\n }\n return mediaEl.volume !== prevVolume;\n};\nconst isSafari = /.*Version\\/.*Safari\\/.*/.test(\n globalThis.navigator.userAgent\n);\nconst hasPipSupport = (mediaEl = getTestMediaEl()) => {\n if (globalThis.matchMedia(\"(display-mode: standalone)\").matches && isSafari)\n return false;\n return typeof (mediaEl == null ? void 0 : mediaEl.requestPictureInPicture) === \"function\";\n};\nconst hasFullscreenSupport = (mediaEl = getTestMediaEl()) => {\n return isFullscreenEnabled({ documentElement: document, media: mediaEl });\n};\nconst fullscreenSupported = hasFullscreenSupport();\nconst pipSupported = hasPipSupport();\nconst airplaySupported = !!globalThis.WebKitPlaybackTargetAvailabilityEvent;\nconst castSupported = !!globalThis.chrome;\nexport {\n airplaySupported,\n castSupported,\n fullscreenSupported,\n getTestMediaEl,\n hasFullscreenSupport,\n hasPipSupport,\n hasVolumeSupportAsync,\n pipSupported\n};\n","import { TextTrackKinds, TextTrackModes } from \"../constants.js\";\nimport { getTextTracksList, updateTracksModeTo } from \"../utils/captions.js\";\nconst getSubtitleTracks = (stateOwners) => {\n return getTextTracksList(stateOwners.media, (textTrack) => {\n return [TextTrackKinds.SUBTITLES, TextTrackKinds.CAPTIONS].includes(\n textTrack.kind\n );\n }).sort((a, b) => a.kind >= b.kind ? 1 : -1);\n};\nconst getShowingSubtitleTracks = (stateOwners) => {\n return getTextTracksList(stateOwners.media, (textTrack) => {\n return textTrack.mode === TextTrackModes.SHOWING && [TextTrackKinds.SUBTITLES, TextTrackKinds.CAPTIONS].includes(\n textTrack.kind\n );\n });\n};\nconst toggleSubtitleTracks = (stateOwners, force) => {\n const tracks = getSubtitleTracks(stateOwners);\n const showingSubitleTracks = getShowingSubtitleTracks(stateOwners);\n const subtitlesShowing = !!showingSubitleTracks.length;\n if (!tracks.length)\n return;\n if (force === false || subtitlesShowing && force !== true) {\n updateTracksModeTo(TextTrackModes.DISABLED, tracks, showingSubitleTracks);\n } else if (force === true || !subtitlesShowing && force !== false) {\n let subTrack = tracks[0];\n const { options } = stateOwners;\n if (!(options == null ? void 0 : options.noSubtitlesLangPref)) {\n const subtitlesPref = globalThis.localStorage.getItem(\n \"media-chrome-pref-subtitles-lang\"\n );\n const userLangPrefs = subtitlesPref ? [subtitlesPref, ...globalThis.navigator.languages] : globalThis.navigator.languages;\n const preferredAvailableSubs = tracks.filter((textTrack) => {\n return userLangPrefs.some(\n (lang) => textTrack.language.toLowerCase().startsWith(lang.split(\"-\")[0])\n );\n }).sort((textTrackA, textTrackB) => {\n const idxA = userLangPrefs.findIndex(\n (lang) => textTrackA.language.toLowerCase().startsWith(lang.split(\"-\")[0])\n );\n const idxB = userLangPrefs.findIndex(\n (lang) => textTrackB.language.toLowerCase().startsWith(lang.split(\"-\")[0])\n );\n return idxA - idxB;\n });\n if (preferredAvailableSubs[0]) {\n subTrack = preferredAvailableSubs[0];\n }\n }\n const { language, label, kind } = subTrack;\n updateTracksModeTo(TextTrackModes.DISABLED, tracks, showingSubitleTracks);\n updateTracksModeTo(TextTrackModes.SHOWING, tracks, [\n { language, label, kind }\n ]);\n }\n};\nconst areValuesEq = (x, y) => {\n if (x === y)\n return true;\n if (x == null || y == null)\n return false;\n if (typeof x !== typeof y)\n return false;\n if (typeof x === \"number\" && Number.isNaN(x) && Number.isNaN(y))\n return true;\n if (typeof x !== \"object\")\n return false;\n if (Array.isArray(x))\n return areArraysEq(x, y);\n return Object.entries(x).every(\n // NOTE: Checking key in y to disambiguate between between missing keys and keys whose value are undefined (CJP)\n ([key, value]) => key in y && areValuesEq(value, y[key])\n );\n};\nconst areArraysEq = (xs, ys) => {\n const xIsArray = Array.isArray(xs);\n const yIsArray = Array.isArray(ys);\n if (xIsArray !== yIsArray)\n return false;\n if (!(xIsArray || yIsArray))\n return true;\n if (xs.length !== ys.length)\n return false;\n return xs.every((x, i) => areValuesEq(x, ys[i]));\n};\nexport {\n areArraysEq,\n areValuesEq,\n getShowingSubtitleTracks,\n getSubtitleTracks,\n toggleSubtitleTracks\n};\n","import { document, globalThis } from \"../utils/server-safe-globals.js\";\nimport {\n AvailabilityStates,\n StreamTypes,\n TextTrackKinds\n} from \"../constants.js\";\nimport { containsComposedNode } from \"../utils/element-utils.js\";\nimport { enterFullscreen, exitFullscreen, isFullscreen } from \"../utils/fullscreen-api.js\";\nimport {\n airplaySupported,\n castSupported,\n fullscreenSupported,\n hasFullscreenSupport,\n hasPipSupport,\n hasVolumeSupportAsync,\n pipSupported\n} from \"../utils/platform-tests.js\";\nimport {\n getShowingSubtitleTracks,\n getSubtitleTracks,\n toggleSubtitleTracks\n} from \"./util.js\";\nimport { getTextTracksList } from \"../utils/captions.js\";\nimport { isValidNumber } from \"../utils/utils.js\";\nconst StreamTypeValues = Object.values(StreamTypes);\nlet volumeSupported;\nconst volumeSupportPromise = hasVolumeSupportAsync().then((supported) => {\n volumeSupported = supported;\n return volumeSupported;\n});\nconst prepareStateOwners = async (...stateOwners) => {\n await Promise.all(\n stateOwners.filter((x) => x).map(async (stateOwner) => {\n if (!(\"localName\" in stateOwner && stateOwner instanceof globalThis.HTMLElement)) {\n return;\n }\n const name = stateOwner.localName;\n if (!name.includes(\"-\"))\n return;\n const classDef = globalThis.customElements.get(name);\n if (classDef && stateOwner instanceof classDef)\n return;\n await globalThis.customElements.whenDefined(name);\n globalThis.customElements.upgrade(stateOwner);\n })\n );\n};\nconst stateMediator = {\n mediaError: {\n get(stateOwners, event) {\n const { media } = stateOwners;\n if ((event == null ? void 0 : event.type) === \"playing\")\n return;\n return media == null ? void 0 : media.error;\n },\n mediaEvents: [\"emptied\", \"error\", \"playing\"]\n },\n mediaErrorCode: {\n get(stateOwners, event) {\n var _a;\n const { media } = stateOwners;\n if ((event == null ? void 0 : event.type) === \"playing\")\n return;\n return (_a = media == null ? void 0 : media.error) == null ? void 0 : _a.code;\n },\n mediaEvents: [\"emptied\", \"error\", \"playing\"]\n },\n mediaErrorMessage: {\n get(stateOwners, event) {\n var _a, _b;\n const { media } = stateOwners;\n if ((event == null ? void 0 : event.type) === \"playing\")\n return;\n return (_b = (_a = media == null ? void 0 : media.error) == null ? void 0 : _a.message) != null ? _b : \"\";\n },\n mediaEvents: [\"emptied\", \"error\", \"playing\"]\n },\n mediaWidth: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return (_a = media == null ? void 0 : media.videoWidth) != null ? _a : 0;\n },\n mediaEvents: [\"resize\"]\n },\n mediaHeight: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return (_a = media == null ? void 0 : media.videoHeight) != null ? _a : 0;\n },\n mediaEvents: [\"resize\"]\n },\n mediaPaused: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return (_a = media == null ? void 0 : media.paused) != null ? _a : true;\n },\n set(value, stateOwners) {\n var _a;\n const { media } = stateOwners;\n if (!media)\n return;\n if (value) {\n media.pause();\n } else {\n (_a = media.play()) == null ? void 0 : _a.catch(() => {\n });\n }\n },\n mediaEvents: [\"play\", \"playing\", \"pause\", \"emptied\"]\n },\n mediaHasPlayed: {\n // We want to let the user know that the media started playing at any point (`media-has-played`).\n // Since these propagators are all called when boostrapping state, let's verify this is\n // a real playing event by checking that 1) there's media and 2) it isn't currently paused.\n get(stateOwners, event) {\n const { media } = stateOwners;\n if (!media)\n return false;\n if (!event)\n return !media.paused;\n return event.type === \"playing\";\n },\n mediaEvents: [\"playing\", \"emptied\"]\n },\n mediaEnded: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return (_a = media == null ? void 0 : media.ended) != null ? _a : false;\n },\n mediaEvents: [\"seeked\", \"ended\", \"emptied\"]\n },\n mediaPlaybackRate: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return (_a = media == null ? void 0 : media.playbackRate) != null ? _a : 1;\n },\n set(value, stateOwners) {\n const { media } = stateOwners;\n if (!media)\n return;\n if (!Number.isFinite(+value))\n return;\n media.playbackRate = +value;\n },\n mediaEvents: [\"ratechange\", \"loadstart\"]\n },\n mediaMuted: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return (_a = media == null ? void 0 : media.muted) != null ? _a : false;\n },\n set(value, stateOwners) {\n const { media } = stateOwners;\n if (!media)\n return;\n media.muted = value;\n },\n mediaEvents: [\"volumechange\"]\n },\n mediaVolume: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return (_a = media == null ? void 0 : media.volume) != null ? _a : 1;\n },\n set(value, stateOwners) {\n const { media } = stateOwners;\n if (!media)\n return;\n try {\n if (value == null) {\n globalThis.localStorage.removeItem(\"media-chrome-pref-volume\");\n } else {\n globalThis.localStorage.setItem(\n \"media-chrome-pref-volume\",\n value.toString()\n );\n }\n } catch (err) {\n }\n if (!Number.isFinite(+value))\n return;\n media.volume = +value;\n },\n mediaEvents: [\"volumechange\"],\n stateOwnersUpdateHandlers: [\n (handler, stateOwners) => {\n const {\n options: { noVolumePref }\n } = stateOwners;\n if (noVolumePref)\n return;\n try {\n const volumePref = globalThis.localStorage.getItem(\n \"media-chrome-pref-volume\"\n );\n if (volumePref == null)\n return;\n stateMediator.mediaVolume.set(+volumePref, stateOwners);\n handler(+volumePref);\n } catch (e) {\n console.debug(\"Error getting volume pref\", e);\n }\n }\n ]\n },\n // NOTE: Keeping this roughly equivalent to prior impl to reduce number of changes,\n // however we may want to model \"derived\" state differently from \"primary\" state\n // (in this case, derived === mediaVolumeLevel, primary === mediaMuted, mediaVolume) (CJP)\n mediaVolumeLevel: {\n get(stateOwners) {\n const { media } = stateOwners;\n if (typeof (media == null ? void 0 : media.volume) == \"undefined\")\n return \"high\";\n if (media.muted || media.volume === 0)\n return \"off\";\n if (media.volume < 0.5)\n return \"low\";\n if (media.volume < 0.75)\n return \"medium\";\n return \"high\";\n },\n mediaEvents: [\"volumechange\"]\n },\n mediaCurrentTime: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return (_a = media == null ? void 0 : media.currentTime) != null ? _a : 0;\n },\n set(value, stateOwners) {\n const { media } = stateOwners;\n if (!media || !isValidNumber(value))\n return;\n media.currentTime = value;\n },\n mediaEvents: [\"timeupdate\", \"loadedmetadata\"]\n },\n mediaDuration: {\n get(stateOwners) {\n const { media, options: { defaultDuration } = {} } = stateOwners;\n if (defaultDuration && (!media || !media.duration || Number.isNaN(media.duration) || !Number.isFinite(media.duration))) {\n return defaultDuration;\n }\n return Number.isFinite(media == null ? void 0 : media.duration) ? media.duration : Number.NaN;\n },\n mediaEvents: [\"durationchange\", \"loadedmetadata\", \"emptied\"]\n },\n mediaLoading: {\n get(stateOwners) {\n const { media } = stateOwners;\n return (media == null ? void 0 : media.readyState) < 3;\n },\n mediaEvents: [\"waiting\", \"playing\", \"emptied\"]\n },\n mediaSeekable: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n if (!((_a = media == null ? void 0 : media.seekable) == null ? void 0 : _a.length))\n return void 0;\n const start = media.seekable.start(0);\n const end = media.seekable.end(media.seekable.length - 1);\n if (!start && !end)\n return void 0;\n return [Number(start.toFixed(3)), Number(end.toFixed(3))];\n },\n mediaEvents: [\"loadedmetadata\", \"emptied\", \"progress\", \"seekablechange\"]\n },\n mediaBuffered: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n const timeRanges = (_a = media == null ? void 0 : media.buffered) != null ? _a : [];\n return Array.from(timeRanges).map((_, i) => [\n Number(timeRanges.start(i).toFixed(3)),\n Number(timeRanges.end(i).toFixed(3))\n ]);\n },\n mediaEvents: [\"progress\", \"emptied\"]\n },\n mediaStreamType: {\n get(stateOwners) {\n const { media, options: { defaultStreamType } = {} } = stateOwners;\n const usedDefaultStreamType = [\n StreamTypes.LIVE,\n StreamTypes.ON_DEMAND\n ].includes(defaultStreamType) ? defaultStreamType : void 0;\n if (!media)\n return usedDefaultStreamType;\n const { streamType } = media;\n if (StreamTypeValues.includes(streamType)) {\n if (streamType === StreamTypes.UNKNOWN) {\n return usedDefaultStreamType;\n }\n return streamType;\n }\n const duration = media.duration;\n if (duration === Infinity) {\n return StreamTypes.LIVE;\n } else if (Number.isFinite(duration)) {\n return StreamTypes.ON_DEMAND;\n }\n return usedDefaultStreamType;\n },\n mediaEvents: [\n \"emptied\",\n \"durationchange\",\n \"loadedmetadata\",\n \"streamtypechange\"\n ]\n },\n mediaTargetLiveWindow: {\n get(stateOwners) {\n const { media } = stateOwners;\n if (!media)\n return Number.NaN;\n const { targetLiveWindow } = media;\n const streamType = stateMediator.mediaStreamType.get(stateOwners);\n if ((targetLiveWindow == null || Number.isNaN(targetLiveWindow)) && streamType === StreamTypes.LIVE) {\n return 0;\n }\n return targetLiveWindow;\n },\n mediaEvents: [\n \"emptied\",\n \"durationchange\",\n \"loadedmetadata\",\n \"streamtypechange\",\n \"targetlivewindowchange\"\n ]\n },\n mediaTimeIsLive: {\n get(stateOwners) {\n const {\n media,\n // Default to 10 seconds\n options: { liveEdgeOffset = 10 } = {}\n } = stateOwners;\n if (!media)\n return false;\n if (typeof media.liveEdgeStart === \"number\") {\n if (Number.isNaN(media.liveEdgeStart))\n return false;\n return media.currentTime >= media.liveEdgeStart;\n }\n const live = stateMediator.mediaStreamType.get(stateOwners) === StreamTypes.LIVE;\n if (!live)\n return false;\n const seekable = media.seekable;\n if (!seekable)\n return true;\n if (!seekable.length)\n return false;\n const liveEdgeStart = seekable.end(seekable.length - 1) - liveEdgeOffset;\n return media.currentTime >= liveEdgeStart;\n },\n mediaEvents: [\"playing\", \"timeupdate\", \"progress\", \"waiting\", \"emptied\"]\n },\n // Text Tracks modeling\n mediaSubtitlesList: {\n get(stateOwners) {\n return getSubtitleTracks(stateOwners).map(\n ({ kind, label, language }) => ({ kind, label, language })\n );\n },\n mediaEvents: [\"loadstart\"],\n textTracksEvents: [\"addtrack\", \"removetrack\"]\n },\n mediaSubtitlesShowing: {\n get(stateOwners) {\n return getShowingSubtitleTracks(stateOwners).map(\n ({ kind, label, language }) => ({ kind, label, language })\n );\n },\n mediaEvents: [\"loadstart\"],\n textTracksEvents: [\"addtrack\", \"removetrack\", \"change\"],\n stateOwnersUpdateHandlers: [\n (_handler, stateOwners) => {\n var _a, _b;\n const { media, options } = stateOwners;\n if (!media)\n return;\n const updateDefaultSubtitlesCallback = (event) => {\n var _a2;\n if (!options.defaultSubtitles)\n return;\n const nonSubsEvent = event && ![TextTrackKinds.CAPTIONS, TextTrackKinds.SUBTITLES].includes(\n // @ts-ignore\n (_a2 = event == null ? void 0 : event.track) == null ? void 0 : _a2.kind\n );\n if (nonSubsEvent)\n return;\n toggleSubtitleTracks(stateOwners, true);\n };\n (_a = media.textTracks) == null ? void 0 : _a.addEventListener(\n \"addtrack\",\n updateDefaultSubtitlesCallback\n );\n (_b = media.textTracks) == null ? void 0 : _b.addEventListener(\n \"removetrack\",\n updateDefaultSubtitlesCallback\n );\n updateDefaultSubtitlesCallback();\n return () => {\n var _a2, _b2;\n (_a2 = media.textTracks) == null ? void 0 : _a2.removeEventListener(\n \"addtrack\",\n updateDefaultSubtitlesCallback\n );\n (_b2 = media.textTracks) == null ? void 0 : _b2.removeEventListener(\n \"removetrack\",\n updateDefaultSubtitlesCallback\n );\n };\n }\n ]\n },\n mediaChaptersCues: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n if (!media)\n return [];\n const [chaptersTrack] = getTextTracksList(media, {\n kind: TextTrackKinds.CHAPTERS\n });\n return Array.from((_a = chaptersTrack == null ? void 0 : chaptersTrack.cues) != null ? _a : []).map(\n ({ text, startTime, endTime }) => ({\n text,\n startTime,\n endTime\n })\n );\n },\n mediaEvents: [\"loadstart\", \"loadedmetadata\"],\n textTracksEvents: [\"addtrack\", \"removetrack\", \"change\"],\n stateOwnersUpdateHandlers: [\n (handler, stateOwners) => {\n var _a;\n const { media } = stateOwners;\n if (!media)\n return;\n const chaptersTrack = media.querySelector(\n 'track[kind=\"chapters\"][default][src]'\n );\n const shadowChaptersTrack = (_a = media.shadowRoot) == null ? void 0 : _a.querySelector(\n ':is(video,audio) > track[kind=\"chapters\"][default][src]'\n );\n chaptersTrack == null ? void 0 : chaptersTrack.addEventListener(\"load\", handler);\n shadowChaptersTrack == null ? void 0 : shadowChaptersTrack.addEventListener(\"load\", handler);\n return () => {\n chaptersTrack == null ? void 0 : chaptersTrack.removeEventListener(\"load\", handler);\n shadowChaptersTrack == null ? void 0 : shadowChaptersTrack.removeEventListener(\"load\", handler);\n };\n }\n ]\n },\n // Modeling state tied to root node\n mediaIsPip: {\n get(stateOwners) {\n var _a, _b;\n const { media, documentElement } = stateOwners;\n if (!media || !documentElement)\n return false;\n if (!documentElement.pictureInPictureElement)\n return false;\n if (documentElement.pictureInPictureElement === media)\n return true;\n if (documentElement.pictureInPictureElement instanceof HTMLMediaElement) {\n if (!((_a = media.localName) == null ? void 0 : _a.includes(\"-\")))\n return false;\n return containsComposedNode(\n media,\n documentElement.pictureInPictureElement\n );\n }\n if (documentElement.pictureInPictureElement.localName.includes(\"-\")) {\n let currentRoot = documentElement.pictureInPictureElement.shadowRoot;\n while (currentRoot == null ? void 0 : currentRoot.pictureInPictureElement) {\n if (currentRoot.pictureInPictureElement === media)\n return true;\n currentRoot = (_b = currentRoot.pictureInPictureElement) == null ? void 0 : _b.shadowRoot;\n }\n }\n return false;\n },\n set(value, stateOwners) {\n const { media } = stateOwners;\n if (!media)\n return;\n if (value) {\n if (!document.pictureInPictureEnabled) {\n console.warn(\"MediaChrome: Picture-in-picture is not enabled\");\n return;\n }\n if (!media.requestPictureInPicture) {\n console.warn(\n \"MediaChrome: The current media does not support picture-in-picture\"\n );\n return;\n }\n const warnNotReady = () => {\n console.warn(\n \"MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.\"\n );\n };\n media.requestPictureInPicture().catch((err) => {\n if (err.code === 11) {\n if (!media.src) {\n console.warn(\n \"MediaChrome: The media is not ready for picture-in-picture. It must have a src set.\"\n );\n return;\n }\n if (media.readyState === 0 && media.preload === \"none\") {\n const cleanup = () => {\n media.removeEventListener(\"loadedmetadata\", tryPip);\n media.preload = \"none\";\n };\n const tryPip = () => {\n media.requestPictureInPicture().catch(warnNotReady);\n cleanup();\n };\n media.addEventListener(\"loadedmetadata\", tryPip);\n media.preload = \"metadata\";\n setTimeout(() => {\n if (media.readyState === 0)\n warnNotReady();\n cleanup();\n }, 1e3);\n } else {\n throw err;\n }\n } else {\n throw err;\n }\n });\n } else if (document.pictureInPictureElement) {\n document.exitPictureInPicture();\n }\n },\n mediaEvents: [\"enterpictureinpicture\", \"leavepictureinpicture\"]\n },\n mediaRenditionList: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return [...(_a = media == null ? void 0 : media.videoRenditions) != null ? _a : []].map((videoRendition) => ({\n ...videoRendition\n }));\n },\n mediaEvents: [\"emptied\", \"loadstart\"],\n videoRenditionsEvents: [\"addrendition\", \"removerendition\"]\n },\n /** @TODO Model this as a derived value? (CJP) */\n mediaRenditionSelected: {\n get(stateOwners) {\n var _a, _b, _c;\n const { media } = stateOwners;\n return (_c = (_b = media == null ? void 0 : media.videoRenditions) == null ? void 0 : _b[(_a = media.videoRenditions) == null ? void 0 : _a.selectedIndex]) == null ? void 0 : _c.id;\n },\n set(value, stateOwners) {\n const { media } = stateOwners;\n if (!(media == null ? void 0 : media.videoRenditions)) {\n console.warn(\n \"MediaController: Rendition selection not supported by this media.\"\n );\n return;\n }\n const renditionId = value;\n const index = Array.prototype.findIndex.call(\n media.videoRenditions,\n (r) => r.id == renditionId\n );\n if (media.videoRenditions.selectedIndex != index) {\n media.videoRenditions.selectedIndex = index;\n }\n },\n mediaEvents: [\"emptied\"],\n videoRenditionsEvents: [\"addrendition\", \"removerendition\", \"change\"]\n },\n mediaAudioTrackList: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n return [...(_a = media == null ? void 0 : media.audioTracks) != null ? _a : []];\n },\n mediaEvents: [\"emptied\", \"loadstart\"],\n audioTracksEvents: [\"addtrack\", \"removetrack\"]\n },\n mediaAudioTrackEnabled: {\n get(stateOwners) {\n var _a, _b;\n const { media } = stateOwners;\n return (_b = [...(_a = media == null ? void 0 : media.audioTracks) != null ? _a : []].find(\n (audioTrack) => audioTrack.enabled\n )) == null ? void 0 : _b.id;\n },\n set(value, stateOwners) {\n const { media } = stateOwners;\n if (!(media == null ? void 0 : media.audioTracks)) {\n console.warn(\n \"MediaChrome: Audio track selection not supported by this media.\"\n );\n return;\n }\n const audioTrackId = value;\n for (const track of media.audioTracks) {\n track.enabled = audioTrackId == track.id;\n }\n },\n mediaEvents: [\"emptied\"],\n audioTracksEvents: [\"addtrack\", \"removetrack\", \"change\"]\n },\n mediaIsFullscreen: {\n get(stateOwners) {\n return isFullscreen(stateOwners);\n },\n set(value, stateOwners) {\n if (!value) {\n exitFullscreen(stateOwners);\n } else {\n enterFullscreen(stateOwners);\n }\n },\n // older Safari version may require webkit-specific events\n rootEvents: [\"fullscreenchange\", \"webkitfullscreenchange\"],\n // iOS requires webkit-specific events on the video.\n mediaEvents: [\"webkitbeginfullscreen\", \"webkitendfullscreen\", \"webkitpresentationmodechanged\"]\n },\n mediaIsCasting: {\n // Note this relies on a customized castable-video element.\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n if (!(media == null ? void 0 : media.remote) || ((_a = media.remote) == null ? void 0 : _a.state) === \"disconnected\")\n return false;\n return !!media.remote.state;\n },\n set(value, stateOwners) {\n var _a, _b;\n const { media } = stateOwners;\n if (!media)\n return;\n if (value && ((_a = media.remote) == null ? void 0 : _a.state) !== \"disconnected\")\n return;\n if (!value && ((_b = media.remote) == null ? void 0 : _b.state) !== \"connected\")\n return;\n if (typeof media.remote.prompt !== \"function\") {\n console.warn(\n \"MediaChrome: Casting is not supported in this environment\"\n );\n return;\n }\n media.remote.prompt().catch(() => {\n });\n },\n remoteEvents: [\"connect\", \"connecting\", \"disconnect\"]\n },\n // NOTE: Newly added state for tracking airplaying\n mediaIsAirplaying: {\n // NOTE: Cannot know if airplaying since Safari doesn't fully support HTMLMediaElement::remote yet (e.g. remote::state) (CJP)\n get() {\n return false;\n },\n set(_value, stateOwners) {\n const { media } = stateOwners;\n if (!media)\n return;\n if (!(media.webkitShowPlaybackTargetPicker && globalThis.WebKitPlaybackTargetAvailabilityEvent)) {\n console.warn(\n \"MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment\"\n );\n return;\n }\n media.webkitShowPlaybackTargetPicker();\n },\n mediaEvents: [\"webkitcurrentplaybacktargetiswirelesschanged\"]\n },\n mediaFullscreenUnavailable: {\n get(stateOwners) {\n const { media } = stateOwners;\n if (!fullscreenSupported || !hasFullscreenSupport(media))\n return AvailabilityStates.UNSUPPORTED;\n return void 0;\n }\n },\n mediaPipUnavailable: {\n get(stateOwners) {\n const { media } = stateOwners;\n if (!pipSupported || !hasPipSupport(media))\n return AvailabilityStates.UNSUPPORTED;\n }\n },\n mediaVolumeUnavailable: {\n get(stateOwners) {\n const { media } = stateOwners;\n if (volumeSupported === false || (media == null ? void 0 : media.volume) == void 0) {\n return AvailabilityStates.UNSUPPORTED;\n }\n return void 0;\n },\n // NOTE: Slightly different impl here. Added generic support for\n // \"stateOwnersUpdateHandlers\" since the original impl had to hack around\n // race conditions. (CJP)\n stateOwnersUpdateHandlers: [\n (handler) => {\n if (volumeSupported == null) {\n volumeSupportPromise.then(\n (supported) => handler(supported ? void 0 : AvailabilityStates.UNSUPPORTED)\n );\n }\n }\n ]\n },\n mediaCastUnavailable: {\n // @ts-ignore\n get(stateOwners, { availability = \"not-available\" } = {}) {\n var _a;\n const { media } = stateOwners;\n if (!castSupported || !((_a = media == null ? void 0 : media.remote) == null ? void 0 : _a.state)) {\n return AvailabilityStates.UNSUPPORTED;\n }\n if (availability == null || availability === \"available\")\n return void 0;\n return AvailabilityStates.UNAVAILABLE;\n },\n stateOwnersUpdateHandlers: [\n (handler, stateOwners) => {\n var _a;\n const { media } = stateOwners;\n if (!media)\n return;\n const remotePlaybackDisabled = media.disableRemotePlayback || media.hasAttribute(\"disableremoteplayback\");\n if (!remotePlaybackDisabled) {\n (_a = media == null ? void 0 : media.remote) == null ? void 0 : _a.watchAvailability((availabilityBool) => {\n const availability = availabilityBool ? \"available\" : \"not-available\";\n handler({ availability });\n }).catch((error) => {\n if (error.name === \"NotSupportedError\") {\n handler({ availability: null });\n } else {\n handler({ availability: \"not-available\" });\n }\n });\n }\n return () => {\n var _a2;\n (_a2 = media == null ? void 0 : media.remote) == null ? void 0 : _a2.cancelWatchAvailability().catch(() => {\n });\n };\n }\n ]\n },\n mediaAirplayUnavailable: {\n get(_stateOwners, event) {\n if (!airplaySupported)\n return AvailabilityStates.UNSUPPORTED;\n if ((event == null ? void 0 : event.availability) === \"not-available\") {\n return AvailabilityStates.UNAVAILABLE;\n }\n return void 0;\n },\n // NOTE: Keeping this event, as it's still the documented way of monitoring\n // for AirPlay availability from Apple.\n // See: https://developer.apple.com/documentation/webkitjs/adding_an_airplay_button_to_your_safari_media_controls#2940021 (CJP)\n mediaEvents: [\"webkitplaybacktargetavailabilitychanged\"],\n stateOwnersUpdateHandlers: [\n (handler, stateOwners) => {\n var _a;\n const { media } = stateOwners;\n if (!media)\n return;\n const remotePlaybackDisabled = media.disableRemotePlayback || media.hasAttribute(\"disableremoteplayback\");\n if (!remotePlaybackDisabled) {\n (_a = media == null ? void 0 : media.remote) == null ? void 0 : _a.watchAvailability((availabilityBool) => {\n const availability = availabilityBool ? \"available\" : \"not-available\";\n handler({ availability });\n }).catch((error) => {\n if (error.name === \"NotSupportedError\") {\n handler({ availability: null });\n } else {\n handler({ availability: \"not-available\" });\n }\n });\n }\n return () => {\n var _a2;\n (_a2 = media == null ? void 0 : media.remote) == null ? void 0 : _a2.cancelWatchAvailability().catch(() => {\n });\n };\n }\n ]\n },\n mediaRenditionUnavailable: {\n get(stateOwners) {\n var _a;\n const { media } = stateOwners;\n if (!(media == null ? void 0 : media.videoRenditions)) {\n return AvailabilityStates.UNSUPPORTED;\n }\n if (!((_a = media.videoRenditions) == null ? void 0 : _a.length)) {\n return AvailabilityStates.UNAVAILABLE;\n }\n return void 0;\n },\n mediaEvents: [\"emptied\", \"loadstart\"],\n videoRenditionsEvents: [\"addrendition\", \"removerendition\"]\n },\n mediaAudioTrackUnavailable: {\n get(stateOwners) {\n var _a, _b;\n const { media } = stateOwners;\n if (!(media == null ? void 0 : media.audioTracks)) {\n return AvailabilityStates.UNSUPPORTED;\n }\n if (((_b = (_a = media.audioTracks) == null ? void 0 : _a.length) != null ? _b : 0) <= 1) {\n return AvailabilityStates.UNAVAILABLE;\n }\n return void 0;\n },\n mediaEvents: [\"emptied\", \"loadstart\"],\n audioTracksEvents: [\"addtrack\", \"removetrack\"]\n }\n};\nexport {\n prepareStateOwners,\n stateMediator,\n volumeSupportPromise\n};\n","import { globalThis } from \"../utils/server-safe-globals.js\";\nimport {\n MediaUIEvents,\n StreamTypes,\n TextTrackKinds,\n TextTrackModes\n} from \"../constants.js\";\nimport {\n getTextTracksList,\n parseTracks,\n updateTracksModeTo\n} from \"../utils/captions.js\";\nimport { getSubtitleTracks, toggleSubtitleTracks } from \"./util.js\";\nconst requestMap = {\n /**\n * @TODO Consider adding state to `StateMediator` for e.g. `mediaThumbnailCues` and use that for derived state here (CJP)\n */\n [MediaUIEvents.MEDIA_PREVIEW_REQUEST](stateMediator, stateOwners, { detail }) {\n var _a, _b, _c;\n const { media } = stateOwners;\n const mediaPreviewTime = detail != null ? detail : void 0;\n let mediaPreviewImage = void 0;\n let mediaPreviewCoords = void 0;\n if (media && mediaPreviewTime != null) {\n const [track] = getTextTracksList(media, {\n kind: TextTrackKinds.METADATA,\n label: \"thumbnails\"\n });\n const cue = Array.prototype.find.call((_a = track == null ? void 0 : track.cues) != null ? _a : [], (c, i, cs) => {\n if (i === 0)\n return c.endTime > mediaPreviewTime;\n if (i === cs.length - 1)\n return c.startTime <= mediaPreviewTime;\n return c.startTime <= mediaPreviewTime && c.endTime > mediaPreviewTime;\n });\n if (cue) {\n const base = !/'^(?:[a-z]+:)?\\/\\//i.test(cue.text) ? (_b = media == null ? void 0 : media.querySelector(\n 'track[label=\"thumbnails\"]'\n )) == null ? void 0 : _b.src : void 0;\n const url = new URL(cue.text, base);\n const previewCoordsStr = new URLSearchParams(url.hash).get(\"#xywh\");\n mediaPreviewCoords = previewCoordsStr.split(\",\").map((numStr) => +numStr);\n mediaPreviewImage = url.href;\n }\n }\n const mediaDuration = stateMediator.mediaDuration.get(stateOwners);\n const mediaChaptersCues = stateMediator.mediaChaptersCues.get(stateOwners);\n let mediaPreviewChapter = (_c = mediaChaptersCues.find((c, i, cs) => {\n if (i === cs.length - 1 && mediaDuration === c.endTime) {\n return c.startTime <= mediaPreviewTime && c.endTime >= mediaPreviewTime;\n }\n return c.startTime <= mediaPreviewTime && c.endTime > mediaPreviewTime;\n })) == null ? void 0 : _c.text;\n if (detail != null && mediaPreviewChapter == null) {\n mediaPreviewChapter = \"\";\n }\n return {\n mediaPreviewTime,\n mediaPreviewImage,\n mediaPreviewCoords,\n mediaPreviewChapter\n };\n },\n [MediaUIEvents.MEDIA_PAUSE_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaPaused\";\n const value = true;\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_PLAY_REQUEST](stateMediator, stateOwners) {\n var _a;\n const key = \"mediaPaused\";\n const value = false;\n const live = stateMediator.mediaStreamType.get(stateOwners) === StreamTypes.LIVE;\n if (live) {\n const notDvr = !(stateMediator.mediaTargetLiveWindow.get(stateOwners) > 0);\n const liveEdgeTime = (_a = stateMediator.mediaSeekable.get(stateOwners)) == null ? void 0 : _a[1];\n if (notDvr && liveEdgeTime) {\n stateMediator.mediaCurrentTime.set(liveEdgeTime, stateOwners);\n }\n }\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_PLAYBACK_RATE_REQUEST](stateMediator, stateOwners, { detail }) {\n const key = \"mediaPlaybackRate\";\n const value = detail;\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_MUTE_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaMuted\";\n const value = true;\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_UNMUTE_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaMuted\";\n const value = false;\n if (!stateMediator.mediaVolume.get(stateOwners)) {\n stateMediator.mediaVolume.set(0.25, stateOwners);\n }\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_VOLUME_REQUEST](stateMediator, stateOwners, { detail }) {\n const key = \"mediaVolume\";\n const value = detail;\n if (value && stateMediator.mediaMuted.get(stateOwners)) {\n stateMediator.mediaMuted.set(false, stateOwners);\n }\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_SEEK_REQUEST](stateMediator, stateOwners, { detail }) {\n const key = \"mediaCurrentTime\";\n const value = detail;\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_SEEK_TO_LIVE_REQUEST](stateMediator, stateOwners) {\n var _a;\n const key = \"mediaCurrentTime\";\n const value = (_a = stateMediator.mediaSeekable.get(stateOwners)) == null ? void 0 : _a[1];\n if (Number.isNaN(Number(value)))\n return;\n stateMediator[key].set(value, stateOwners);\n },\n // Text Tracks state change requests\n [MediaUIEvents.MEDIA_SHOW_SUBTITLES_REQUEST](_stateMediator, stateOwners, { detail }) {\n var _a;\n const { options } = stateOwners;\n const tracks = getSubtitleTracks(stateOwners);\n const tracksToUpdate = parseTracks(detail);\n const preferredLanguage = (_a = tracksToUpdate[0]) == null ? void 0 : _a.language;\n if (preferredLanguage && !options.noSubtitlesLangPref) {\n globalThis.localStorage.setItem(\n \"media-chrome-pref-subtitles-lang\",\n preferredLanguage\n );\n }\n updateTracksModeTo(TextTrackModes.SHOWING, tracks, tracksToUpdate);\n },\n [MediaUIEvents.MEDIA_DISABLE_SUBTITLES_REQUEST](_stateMediator, stateOwners, { detail }) {\n const tracks = getSubtitleTracks(stateOwners);\n const tracksToUpdate = detail != null ? detail : [];\n updateTracksModeTo(TextTrackModes.DISABLED, tracks, tracksToUpdate);\n },\n [MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST](_stateMediator, stateOwners, { detail }) {\n toggleSubtitleTracks(stateOwners, detail);\n },\n // Renditions/Tracks state change requests\n [MediaUIEvents.MEDIA_RENDITION_REQUEST](stateMediator, stateOwners, { detail }) {\n const key = \"mediaRenditionSelected\";\n const value = detail;\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_AUDIO_TRACK_REQUEST](stateMediator, stateOwners, { detail }) {\n const key = \"mediaAudioTrackEnabled\";\n const value = detail;\n stateMediator[key].set(value, stateOwners);\n },\n // State change requests dependent on root node\n [MediaUIEvents.MEDIA_ENTER_PIP_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaIsPip\";\n const value = true;\n if (stateMediator.mediaIsFullscreen.get(stateOwners)) {\n stateMediator.mediaIsFullscreen.set(false, stateOwners);\n }\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_EXIT_PIP_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaIsPip\";\n const value = false;\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_ENTER_FULLSCREEN_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaIsFullscreen\";\n const value = true;\n if (stateMediator.mediaIsPip.get(stateOwners)) {\n stateMediator.mediaIsPip.set(false, stateOwners);\n }\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_EXIT_FULLSCREEN_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaIsFullscreen\";\n const value = false;\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_ENTER_CAST_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaIsCasting\";\n const value = true;\n if (stateMediator.mediaIsFullscreen.get(stateOwners)) {\n stateMediator.mediaIsFullscreen.set(false, stateOwners);\n }\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_EXIT_CAST_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaIsCasting\";\n const value = false;\n stateMediator[key].set(value, stateOwners);\n },\n [MediaUIEvents.MEDIA_AIRPLAY_REQUEST](stateMediator, stateOwners) {\n const key = \"mediaIsAirplaying\";\n const value = true;\n stateMediator[key].set(value, stateOwners);\n }\n};\nexport {\n requestMap\n};\n","import {\n stateMediator as defaultStateMediator,\n prepareStateOwners\n} from \"./state-mediator.js\";\nimport { areValuesEq } from \"./util.js\";\nimport { requestMap as defaultRequestMap } from \"./request-map.js\";\nconst createMediaStore = ({\n media,\n fullscreenElement,\n documentElement,\n stateMediator = defaultStateMediator,\n requestMap = defaultRequestMap,\n options = {},\n monitorStateOwnersOnlyWithSubscriptions = true\n}) => {\n const callbacks = [];\n const stateOwners = {\n // Spreading options here since folks should not rely on holding onto references\n // for any app-level logic wrt options.\n options: { ...options }\n };\n let state = Object.freeze({\n mediaPreviewTime: void 0,\n mediaPreviewImage: void 0,\n mediaPreviewCoords: void 0,\n mediaPreviewChapter: void 0\n });\n const updateState = (nextStateDelta) => {\n if (nextStateDelta == void 0)\n return;\n if (areValuesEq(nextStateDelta, state)) {\n return;\n }\n state = Object.freeze({\n ...state,\n ...nextStateDelta\n });\n callbacks.forEach((cb) => cb(state));\n };\n const updateStateFromFacade = () => {\n const nextState = Object.entries(stateMediator).reduce(\n (nextState2, [stateName, { get }]) => {\n nextState2[stateName] = get(stateOwners);\n return nextState2;\n },\n {}\n );\n updateState(nextState);\n };\n const stateUpdateHandlers = {};\n let nextStateOwners = void 0;\n const updateStateOwners = async (nextStateOwnersDelta, nextSubscriberCount) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;\n const pendingUpdate = !!nextStateOwners;\n nextStateOwners = {\n ...stateOwners,\n ...nextStateOwners != null ? nextStateOwners : {},\n ...nextStateOwnersDelta\n };\n if (pendingUpdate)\n return;\n await prepareStateOwners(...Object.values(nextStateOwnersDelta));\n const shouldTeardownFromSubscriberCount = callbacks.length > 0 && nextSubscriberCount === 0 && monitorStateOwnersOnlyWithSubscriptions;\n const mediaChanged = stateOwners.media !== nextStateOwners.media;\n const textTracksChanged = ((_a = stateOwners.media) == null ? void 0 : _a.textTracks) !== ((_b = nextStateOwners.media) == null ? void 0 : _b.textTracks);\n const videoRenditionsChanged = ((_c = stateOwners.media) == null ? void 0 : _c.videoRenditions) !== ((_d = nextStateOwners.media) == null ? void 0 : _d.videoRenditions);\n const audioTracksChanged = ((_e = stateOwners.media) == null ? void 0 : _e.audioTracks) !== ((_f = nextStateOwners.media) == null ? void 0 : _f.audioTracks);\n const remoteChanged = ((_g = stateOwners.media) == null ? void 0 : _g.remote) !== ((_h = nextStateOwners.media) == null ? void 0 : _h.remote);\n const rootNodeChanged = stateOwners.documentElement !== nextStateOwners.documentElement;\n const teardownMedia = !!stateOwners.media && (mediaChanged || shouldTeardownFromSubscriberCount);\n const teardownTextTracks = !!((_i = stateOwners.media) == null ? void 0 : _i.textTracks) && (textTracksChanged || shouldTeardownFromSubscriberCount);\n const teardownVideoRenditions = !!((_j = stateOwners.media) == null ? void 0 : _j.videoRenditions) && (videoRenditionsChanged || shouldTeardownFromSubscriberCount);\n const teardownAudioTracks = !!((_k = stateOwners.media) == null ? void 0 : _k.audioTracks) && (audioTracksChanged || shouldTeardownFromSubscriberCount);\n const teardownRemote = !!((_l = stateOwners.media) == null ? void 0 : _l.remote) && (remoteChanged || shouldTeardownFromSubscriberCount);\n const teardownRootNode = !!stateOwners.documentElement && (rootNodeChanged || shouldTeardownFromSubscriberCount);\n const teardownSomething = teardownMedia || teardownTextTracks || teardownVideoRenditions || teardownAudioTracks || teardownRemote || teardownRootNode;\n const shouldSetupFromSubscriberCount = callbacks.length === 0 && nextSubscriberCount === 1 && monitorStateOwnersOnlyWithSubscriptions;\n const setupMedia = !!nextStateOwners.media && (mediaChanged || shouldSetupFromSubscriberCount);\n const setupTextTracks = !!((_m = nextStateOwners.media) == null ? void 0 : _m.textTracks) && (textTracksChanged || shouldSetupFromSubscriberCount);\n const setupVideoRenditions = !!((_n = nextStateOwners.media) == null ? void 0 : _n.videoRenditions) && (videoRenditionsChanged || shouldSetupFromSubscriberCount);\n const setupAudioTracks = !!((_o = nextStateOwners.media) == null ? void 0 : _o.audioTracks) && (audioTracksChanged || shouldSetupFromSubscriberCount);\n const setupRemote = !!((_p = nextStateOwners.media) == null ? void 0 : _p.remote) && (remoteChanged || shouldSetupFromSubscriberCount);\n const setupRootNode = !!nextStateOwners.documentElement && (rootNodeChanged || shouldSetupFromSubscriberCount);\n const setupSomething = setupMedia || setupTextTracks || setupVideoRenditions || setupAudioTracks || setupRemote || setupRootNode;\n const somethingToDo = teardownSomething || setupSomething;\n if (!somethingToDo) {\n Object.entries(nextStateOwners).forEach(\n ([stateOwnerName, stateOwner]) => {\n stateOwners[stateOwnerName] = stateOwner;\n }\n );\n updateStateFromFacade();\n nextStateOwners = void 0;\n return;\n }\n Object.entries(stateMediator).forEach(\n ([\n stateName,\n {\n get,\n mediaEvents = [],\n textTracksEvents = [],\n videoRenditionsEvents = [],\n audioTracksEvents = [],\n remoteEvents = [],\n rootEvents = [],\n stateOwnersUpdateHandlers = []\n }\n ]) => {\n if (!stateUpdateHandlers[stateName]) {\n stateUpdateHandlers[stateName] = {};\n }\n const handler = (event) => {\n const nextValue = get(stateOwners, event);\n updateState({ [stateName]: nextValue });\n };\n let prevHandler;\n prevHandler = stateUpdateHandlers[stateName].mediaEvents;\n mediaEvents.forEach((eventType) => {\n if (prevHandler && teardownMedia) {\n stateOwners.media.removeEventListener(eventType, prevHandler);\n stateUpdateHandlers[stateName].mediaEvents = void 0;\n }\n if (setupMedia) {\n nextStateOwners.media.addEventListener(eventType, handler);\n stateUpdateHandlers[stateName].mediaEvents = handler;\n }\n });\n prevHandler = stateUpdateHandlers[stateName].textTracksEvents;\n textTracksEvents.forEach((eventType) => {\n var _a2, _b2;\n if (prevHandler && teardownTextTracks) {\n (_a2 = stateOwners.media.textTracks) == null ? void 0 : _a2.removeEventListener(\n eventType,\n prevHandler\n );\n stateUpdateHandlers[stateName].textTracksEvents = void 0;\n }\n if (setupTextTracks) {\n (_b2 = nextStateOwners.media.textTracks) == null ? void 0 : _b2.addEventListener(\n eventType,\n handler\n );\n stateUpdateHandlers[stateName].textTracksEvents = handler;\n }\n });\n prevHandler = stateUpdateHandlers[stateName].videoRenditionsEvents;\n videoRenditionsEvents.forEach((eventType) => {\n var _a2, _b2;\n if (prevHandler && teardownVideoRenditions) {\n (_a2 = stateOwners.media.videoRenditions) == null ? void 0 : _a2.removeEventListener(\n eventType,\n prevHandler\n );\n stateUpdateHandlers[stateName].videoRenditionsEvents = void 0;\n }\n if (setupVideoRenditions) {\n (_b2 = nextStateOwners.media.videoRenditions) == null ? void 0 : _b2.addEventListener(\n eventType,\n handler\n );\n stateUpdateHandlers[stateName].videoRenditionsEvents = handler;\n }\n });\n prevHandler = stateUpdateHandlers[stateName].audioTracksEvents;\n audioTracksEvents.forEach((eventType) => {\n var _a2, _b2;\n if (prevHandler && teardownAudioTracks) {\n (_a2 = stateOwners.media.audioTracks) == null ? void 0 : _a2.removeEventListener(\n eventType,\n prevHandler\n );\n stateUpdateHandlers[stateName].audioTracksEvents = void 0;\n }\n if (setupAudioTracks) {\n (_b2 = nextStateOwners.media.audioTracks) == null ? void 0 : _b2.addEventListener(\n eventType,\n handler\n );\n stateUpdateHandlers[stateName].audioTracksEvents = handler;\n }\n });\n prevHandler = stateUpdateHandlers[stateName].remoteEvents;\n remoteEvents.forEach((eventType) => {\n var _a2, _b2;\n if (prevHandler && teardownRemote) {\n (_a2 = stateOwners.media.remote) == null ? void 0 : _a2.removeEventListener(\n eventType,\n prevHandler\n );\n stateUpdateHandlers[stateName].remoteEvents = void 0;\n }\n if (setupRemote) {\n (_b2 = nextStateOwners.media.remote) == null ? void 0 : _b2.addEventListener(eventType, handler);\n stateUpdateHandlers[stateName].remoteEvents = handler;\n }\n });\n prevHandler = stateUpdateHandlers[stateName].rootEvents;\n rootEvents.forEach((eventType) => {\n if (prevHandler && teardownRootNode) {\n stateOwners.documentElement.removeEventListener(\n eventType,\n prevHandler\n );\n stateUpdateHandlers[stateName].rootEvents = void 0;\n }\n if (setupRootNode) {\n nextStateOwners.documentElement.addEventListener(\n eventType,\n handler\n );\n stateUpdateHandlers[stateName].rootEvents = handler;\n }\n });\n const prevHandlerTeardown = stateUpdateHandlers[stateName].stateOwnersUpdateHandlers;\n stateOwnersUpdateHandlers.forEach((fn) => {\n if (prevHandlerTeardown && teardownSomething) {\n prevHandlerTeardown();\n }\n if (setupSomething) {\n stateUpdateHandlers[stateName].stateOwnersUpdateHandlers = fn(\n handler,\n nextStateOwners\n );\n }\n });\n }\n );\n Object.entries(nextStateOwners).forEach(([stateOwnerName, stateOwner]) => {\n stateOwners[stateOwnerName] = stateOwner;\n });\n updateStateFromFacade();\n nextStateOwners = void 0;\n };\n updateStateOwners({ media, fullscreenElement, documentElement, options });\n return {\n // note that none of these cases directly interact with the media element, root node, full screen element, etc.\n // note these \"actions\" could just be the events if we wanted, especially if we normalize on \"detail\" for\n // any payload-relevant values\n // This is roughly equivalent to our used to be in our state requests dictionary object, though much of the\n // \"heavy lifting\" is now moved into the facade `set()`\n dispatch(action) {\n const { type, detail } = action;\n if (requestMap[type] && state.mediaErrorCode == null) {\n updateState(requestMap[type](stateMediator, stateOwners, action));\n return;\n }\n if (type === \"mediaelementchangerequest\") {\n updateStateOwners({ media: detail });\n } else if (type === \"fullscreenelementchangerequest\") {\n updateStateOwners({ fullscreenElement: detail });\n } else if (type === \"documentelementchangerequest\") {\n updateStateOwners({ documentElement: detail });\n } else if (type === \"optionschangerequest\") {\n Object.entries(detail != null ? detail : {}).forEach(([optionName, optionValue]) => {\n stateOwners.options[optionName] = optionValue;\n });\n }\n },\n getState() {\n return state;\n },\n subscribe(callback) {\n updateStateOwners({}, callbacks.length + 1);\n callbacks.push(callback);\n callback(state);\n return () => {\n const idx = callbacks.indexOf(callback);\n if (idx >= 0) {\n updateStateOwners({}, callbacks.length - 1);\n callbacks.splice(idx, 1);\n }\n };\n }\n };\n};\nvar media_store_default = createMediaStore;\nexport {\n createMediaStore,\n media_store_default as default\n};\n","var __accessCheck = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet = (obj, member, getter) => {\n __accessCheck(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd = (obj, member, value) => {\n if (member.has(obj))\n throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet = (obj, member, value, setter) => {\n __accessCheck(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar __privateMethod = (obj, member, method) => {\n __accessCheck(obj, member, \"access private method\");\n return method;\n};\nvar _hotKeys, _fullscreenElement, _mediaStore, _mediaStateCallback, _mediaStoreUnsubscribe, _mediaStateEventHandler, _setupDefaultStore, setupDefaultStore_fn, _keyUpHandler, keyUpHandler_fn, _keyDownHandler, keyDownHandler_fn;\nimport { MediaContainer } from \"./media-container.js\";\nimport { document, globalThis } from \"./utils/server-safe-globals.js\";\nimport { AttributeTokenList } from \"./utils/attribute-token-list.js\";\nimport {\n delay,\n stringifyRenditionList,\n stringifyAudioTrackList\n} from \"./utils/utils.js\";\nimport { stringifyTextTrackList } from \"./utils/captions.js\";\nimport {\n MediaUIEvents,\n MediaUIAttributes,\n MediaStateReceiverAttributes,\n AttributeToStateChangeEventMap,\n MediaUIProps\n} from \"./constants.js\";\nimport {\n setBooleanAttr,\n setNumericAttr,\n setStringAttr\n} from \"./utils/element-utils.js\";\nimport { createMediaStore } from \"./media-store/media-store.js\";\nconst ButtonPressedKeys = [\n \"ArrowLeft\",\n \"ArrowRight\",\n \"Enter\",\n \" \",\n \"f\",\n \"m\",\n \"k\",\n \"c\"\n];\nconst DEFAULT_SEEK_OFFSET = 10;\nconst Attributes = {\n DEFAULT_SUBTITLES: \"defaultsubtitles\",\n DEFAULT_STREAM_TYPE: \"defaultstreamtype\",\n DEFAULT_DURATION: \"defaultduration\",\n FULLSCREEN_ELEMENT: \"fullscreenelement\",\n HOTKEYS: \"hotkeys\",\n KEYS_USED: \"keysused\",\n LIVE_EDGE_OFFSET: \"liveedgeoffset\",\n NO_AUTO_SEEK_TO_LIVE: \"noautoseektolive\",\n NO_HOTKEYS: \"nohotkeys\",\n NO_VOLUME_PREF: \"novolumepref\",\n NO_SUBTITLES_LANG_PREF: \"nosubtitleslangpref\",\n NO_DEFAULT_STORE: \"nodefaultstore\",\n KEYBOARD_FORWARD_SEEK_OFFSET: \"keyboardforwardseekoffset\",\n KEYBOARD_BACKWARD_SEEK_OFFSET: \"keyboardbackwardseekoffset\"\n};\nclass MediaController extends MediaContainer {\n constructor() {\n super();\n __privateAdd(this, _setupDefaultStore);\n __privateAdd(this, _keyUpHandler);\n __privateAdd(this, _keyDownHandler);\n this.mediaStateReceivers = [];\n this.associatedElementSubscriptions = /* @__PURE__ */ new Map();\n __privateAdd(this, _hotKeys, new AttributeTokenList(this, Attributes.HOTKEYS));\n __privateAdd(this, _fullscreenElement, void 0);\n __privateAdd(this, _mediaStore, void 0);\n __privateAdd(this, _mediaStateCallback, void 0);\n __privateAdd(this, _mediaStoreUnsubscribe, void 0);\n __privateAdd(this, _mediaStateEventHandler, (event) => {\n var _a;\n (_a = __privateGet(this, _mediaStore)) == null ? void 0 : _a.dispatch(event);\n });\n this.associateElement(this);\n let prevState = {};\n __privateSet(this, _mediaStateCallback, (nextState) => {\n Object.entries(nextState).forEach(([stateName, stateValue]) => {\n if (stateName in prevState && prevState[stateName] === stateValue)\n return;\n this.propagateMediaState(stateName, stateValue);\n const attrName = stateName.toLowerCase();\n const evt = new globalThis.CustomEvent(\n AttributeToStateChangeEventMap[attrName],\n { composed: true, detail: stateValue }\n );\n this.dispatchEvent(evt);\n });\n prevState = nextState;\n });\n this.enableHotkeys();\n }\n static get observedAttributes() {\n return super.observedAttributes.concat(\n Attributes.NO_HOTKEYS,\n Attributes.HOTKEYS,\n Attributes.DEFAULT_STREAM_TYPE,\n Attributes.DEFAULT_SUBTITLES,\n Attributes.DEFAULT_DURATION\n );\n }\n get mediaStore() {\n return __privateGet(this, _mediaStore);\n }\n set mediaStore(value) {\n var _a, _b;\n if (__privateGet(this, _mediaStore)) {\n (_a = __privateGet(this, _mediaStoreUnsubscribe)) == null ? void 0 : _a.call(this);\n __privateSet(this, _mediaStoreUnsubscribe, void 0);\n }\n __privateSet(this, _mediaStore, value);\n if (!__privateGet(this, _mediaStore) && !this.hasAttribute(Attributes.NO_DEFAULT_STORE)) {\n __privateMethod(this, _setupDefaultStore, setupDefaultStore_fn).call(this);\n return;\n }\n __privateSet(this, _mediaStoreUnsubscribe, (_b = __privateGet(this, _mediaStore)) == null ? void 0 : _b.subscribe(\n __privateGet(this, _mediaStateCallback)\n ));\n }\n get fullscreenElement() {\n var _a;\n return (_a = __privateGet(this, _fullscreenElement)) != null ? _a : this;\n }\n set fullscreenElement(element) {\n var _a;\n if (this.hasAttribute(Attributes.FULLSCREEN_ELEMENT)) {\n this.removeAttribute(Attributes.FULLSCREEN_ELEMENT);\n }\n __privateSet(this, _fullscreenElement, element);\n (_a = __privateGet(this, _mediaStore)) == null ? void 0 : _a.dispatch({\n type: \"fullscreenelementchangerequest\",\n detail: this.fullscreenElement\n });\n }\n attributeChangedCallback(attrName, oldValue, newValue) {\n var _a, _b, _c, _d, _e, _f;\n super.attributeChangedCallback(attrName, oldValue, newValue);\n if (attrName === Attributes.NO_HOTKEYS) {\n if (newValue !== oldValue && newValue === \"\") {\n if (this.hasAttribute(Attributes.HOTKEYS)) {\n console.warn(\n \"Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled.\"\n );\n }\n this.disableHotkeys();\n } else if (newValue !== oldValue && newValue === null) {\n this.enableHotkeys();\n }\n } else if (attrName === Attributes.HOTKEYS) {\n __privateGet(this, _hotKeys).value = newValue;\n } else if (attrName === Attributes.DEFAULT_SUBTITLES && newValue !== oldValue) {\n (_a = __privateGet(this, _mediaStore)) == null ? void 0 : _a.dispatch({\n type: \"optionschangerequest\",\n detail: {\n defaultSubtitles: this.hasAttribute(Attributes.DEFAULT_SUBTITLES)\n }\n });\n } else if (attrName === Attributes.DEFAULT_STREAM_TYPE) {\n (_c = __privateGet(this, _mediaStore)) == null ? void 0 : _c.dispatch({\n type: \"optionschangerequest\",\n detail: {\n defaultStreamType: (_b = this.getAttribute(Attributes.DEFAULT_STREAM_TYPE)) != null ? _b : void 0\n }\n });\n } else if (attrName === Attributes.LIVE_EDGE_OFFSET) {\n (_d = __privateGet(this, _mediaStore)) == null ? void 0 : _d.dispatch({\n type: \"optionschangerequest\",\n detail: {\n liveEdgeOffset: this.hasAttribute(Attributes.LIVE_EDGE_OFFSET) ? +this.getAttribute(Attributes.LIVE_EDGE_OFFSET) : void 0\n }\n });\n } else if (attrName === Attributes.FULLSCREEN_ELEMENT) {\n const el = newValue ? (_e = this.getRootNode()) == null ? void 0 : _e.getElementById(newValue) : void 0;\n __privateSet(this, _fullscreenElement, el);\n (_f = __privateGet(this, _mediaStore)) == null ? void 0 : _f.dispatch({\n type: \"fullscreenelementchangerequest\",\n detail: this.fullscreenElement\n });\n }\n }\n connectedCallback() {\n var _a, _b;\n if (!__privateGet(this, _mediaStore) && !this.hasAttribute(Attributes.NO_DEFAULT_STORE)) {\n __privateMethod(this, _setupDefaultStore, setupDefaultStore_fn).call(this);\n }\n (_a = __privateGet(this, _mediaStore)) == null ? void 0 : _a.dispatch({\n type: \"documentelementchangerequest\",\n detail: document\n });\n super.connectedCallback();\n if (__privateGet(this, _mediaStore) && !__privateGet(this, _mediaStoreUnsubscribe)) {\n __privateSet(this, _mediaStoreUnsubscribe, (_b = __privateGet(this, _mediaStore)) == null ? void 0 : _b.subscribe(\n __privateGet(this, _mediaStateCallback)\n ));\n }\n this.enableHotkeys();\n }\n disconnectedCallback() {\n var _a, _b, _c, _d;\n (_a = super.disconnectedCallback) == null ? void 0 : _a.call(this);\n if (__privateGet(this, _mediaStore)) {\n (_b = __privateGet(this, _mediaStore)) == null ? void 0 : _b.dispatch({\n type: \"documentelementchangerequest\",\n detail: void 0\n });\n (_c = __privateGet(this, _mediaStore)) == null ? void 0 : _c.dispatch({\n type: MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST,\n detail: false\n });\n }\n if (__privateGet(this, _mediaStoreUnsubscribe)) {\n (_d = __privateGet(this, _mediaStoreUnsubscribe)) == null ? void 0 : _d.call(this);\n __privateSet(this, _mediaStoreUnsubscribe, void 0);\n }\n }\n /**\n * @override\n * @param {HTMLMediaElement} media\n */\n mediaSetCallback(media) {\n var _a;\n super.mediaSetCallback(media);\n (_a = __privateGet(this, _mediaStore)) == null ? void 0 : _a.dispatch({\n type: \"mediaelementchangerequest\",\n detail: media\n });\n if (!media.hasAttribute(\"tabindex\")) {\n media.tabIndex = -1;\n }\n }\n /**\n * @override\n * @param {HTMLMediaElement} media\n */\n mediaUnsetCallback(media) {\n var _a;\n super.mediaUnsetCallback(media);\n (_a = __privateGet(this, _mediaStore)) == null ? void 0 : _a.dispatch({\n type: \"mediaelementchangerequest\",\n detail: void 0\n });\n }\n propagateMediaState(stateName, state) {\n propagateMediaState(this.mediaStateReceivers, stateName, state);\n }\n associateElement(element) {\n if (!element)\n return;\n const { associatedElementSubscriptions } = this;\n if (associatedElementSubscriptions.has(element))\n return;\n const registerMediaStateReceiver = this.registerMediaStateReceiver.bind(this);\n const unregisterMediaStateReceiver = this.unregisterMediaStateReceiver.bind(this);\n const unsubscribe = monitorForMediaStateReceivers(\n element,\n registerMediaStateReceiver,\n unregisterMediaStateReceiver\n );\n Object.values(MediaUIEvents).forEach((eventName) => {\n element.addEventListener(eventName, __privateGet(this, _mediaStateEventHandler));\n });\n associatedElementSubscriptions.set(element, unsubscribe);\n }\n unassociateElement(element) {\n if (!element)\n return;\n const { associatedElementSubscriptions } = this;\n if (!associatedElementSubscriptions.has(element))\n return;\n const unsubscribe = associatedElementSubscriptions.get(element);\n unsubscribe();\n associatedElementSubscriptions.delete(element);\n Object.values(MediaUIEvents).forEach((eventName) => {\n element.removeEventListener(eventName, __privateGet(this, _mediaStateEventHandler));\n });\n }\n registerMediaStateReceiver(el) {\n if (!el)\n return;\n const els = this.mediaStateReceivers;\n const index = els.indexOf(el);\n if (index > -1)\n return;\n els.push(el);\n if (__privateGet(this, _mediaStore)) {\n Object.entries(__privateGet(this, _mediaStore).getState()).forEach(\n ([stateName, stateValue]) => {\n propagateMediaState([el], stateName, stateValue);\n }\n );\n }\n }\n unregisterMediaStateReceiver(el) {\n const els = this.mediaStateReceivers;\n const index = els.indexOf(el);\n if (index < 0)\n return;\n els.splice(index, 1);\n }\n enableHotkeys() {\n this.addEventListener(\"keydown\", __privateMethod(this, _keyDownHandler, keyDownHandler_fn));\n }\n disableHotkeys() {\n this.removeEventListener(\"keydown\", __privateMethod(this, _keyDownHandler, keyDownHandler_fn));\n this.removeEventListener(\"keyup\", __privateMethod(this, _keyUpHandler, keyUpHandler_fn));\n }\n get hotkeys() {\n return __privateGet(this, _hotKeys);\n }\n keyboardShortcutHandler(e) {\n var _a, _b, _c, _d, _e;\n const target = e.target;\n const keysUsed = ((_c = (_b = (_a = target.getAttribute(Attributes.KEYS_USED)) == null ? void 0 : _a.split(\" \")) != null ? _b : target == null ? void 0 : target.keysUsed) != null ? _c : []).map((key) => key === \"Space\" ? \" \" : key).filter(Boolean);\n if (keysUsed.includes(e.key)) {\n return;\n }\n let eventName, detail, evt;\n if (__privateGet(this, _hotKeys).contains(`no${e.key.toLowerCase()}`))\n return;\n if (e.key === \" \" && __privateGet(this, _hotKeys).contains(`nospace`))\n return;\n switch (e.key) {\n case \" \":\n case \"k\":\n eventName = __privateGet(this, _mediaStore).getState().mediaPaused ? MediaUIEvents.MEDIA_PLAY_REQUEST : MediaUIEvents.MEDIA_PAUSE_REQUEST;\n this.dispatchEvent(\n new globalThis.CustomEvent(eventName, {\n composed: true,\n bubbles: true\n })\n );\n break;\n case \"m\":\n eventName = this.mediaStore.getState().mediaVolumeLevel === \"off\" ? MediaUIEvents.MEDIA_UNMUTE_REQUEST : MediaUIEvents.MEDIA_MUTE_REQUEST;\n this.dispatchEvent(\n new globalThis.CustomEvent(eventName, {\n composed: true,\n bubbles: true\n })\n );\n break;\n case \"f\":\n eventName = this.mediaStore.getState().mediaIsFullscreen ? MediaUIEvents.MEDIA_EXIT_FULLSCREEN_REQUEST : MediaUIEvents.MEDIA_ENTER_FULLSCREEN_REQUEST;\n this.dispatchEvent(\n new globalThis.CustomEvent(eventName, {\n composed: true,\n bubbles: true\n })\n );\n break;\n case \"c\":\n this.dispatchEvent(\n new globalThis.CustomEvent(\n MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST,\n { composed: true, bubbles: true }\n )\n );\n break;\n case \"ArrowLeft\": {\n const offsetValue = this.hasAttribute(\n Attributes.KEYBOARD_BACKWARD_SEEK_OFFSET\n ) ? +this.getAttribute(Attributes.KEYBOARD_BACKWARD_SEEK_OFFSET) : DEFAULT_SEEK_OFFSET;\n detail = Math.max(\n ((_d = this.mediaStore.getState().mediaCurrentTime) != null ? _d : 0) - offsetValue,\n 0\n );\n evt = new globalThis.CustomEvent(MediaUIEvents.MEDIA_SEEK_REQUEST, {\n composed: true,\n bubbles: true,\n detail\n });\n this.dispatchEvent(evt);\n break;\n }\n case \"ArrowRight\": {\n const offsetValue = this.hasAttribute(\n Attributes.KEYBOARD_FORWARD_SEEK_OFFSET\n ) ? +this.getAttribute(Attributes.KEYBOARD_FORWARD_SEEK_OFFSET) : DEFAULT_SEEK_OFFSET;\n detail = Math.max(\n ((_e = this.mediaStore.getState().mediaCurrentTime) != null ? _e : 0) + offsetValue,\n 0\n );\n evt = new globalThis.CustomEvent(MediaUIEvents.MEDIA_SEEK_REQUEST, {\n composed: true,\n bubbles: true,\n detail\n });\n this.dispatchEvent(evt);\n break;\n }\n default:\n break;\n }\n }\n}\n_hotKeys = new WeakMap();\n_fullscreenElement = new WeakMap();\n_mediaStore = new WeakMap();\n_mediaStateCallback = new WeakMap();\n_mediaStoreUnsubscribe = new WeakMap();\n_mediaStateEventHandler = new WeakMap();\n_setupDefaultStore = new WeakSet();\nsetupDefaultStore_fn = function() {\n var _a;\n this.mediaStore = createMediaStore({\n media: this.media,\n fullscreenElement: this.fullscreenElement,\n options: {\n defaultSubtitles: this.hasAttribute(Attributes.DEFAULT_SUBTITLES),\n defaultDuration: this.hasAttribute(Attributes.DEFAULT_DURATION) ? +this.getAttribute(Attributes.DEFAULT_DURATION) : void 0,\n defaultStreamType: (\n /** @type {import('./media-store/state-mediator.js').StreamTypeValue} */\n (_a = this.getAttribute(\n Attributes.DEFAULT_STREAM_TYPE\n )) != null ? _a : void 0\n ),\n liveEdgeOffset: this.hasAttribute(Attributes.LIVE_EDGE_OFFSET) ? +this.getAttribute(Attributes.LIVE_EDGE_OFFSET) : void 0,\n // NOTE: This wasn't updated if it was changed later. Should it be? (CJP)\n noVolumePref: this.hasAttribute(Attributes.NO_VOLUME_PREF),\n noSubtitlesLangPref: this.hasAttribute(\n Attributes.NO_SUBTITLES_LANG_PREF\n )\n }\n });\n};\n_keyUpHandler = new WeakSet();\nkeyUpHandler_fn = function(e) {\n const { key } = e;\n if (!ButtonPressedKeys.includes(key)) {\n this.removeEventListener(\"keyup\", __privateMethod(this, _keyUpHandler, keyUpHandler_fn));\n return;\n }\n this.keyboardShortcutHandler(e);\n};\n_keyDownHandler = new WeakSet();\nkeyDownHandler_fn = function(e) {\n const { metaKey, altKey, key } = e;\n if (metaKey || altKey || !ButtonPressedKeys.includes(key)) {\n this.removeEventListener(\"keyup\", __privateMethod(this, _keyUpHandler, keyUpHandler_fn));\n return;\n }\n if ([\" \", \"ArrowLeft\", \"ArrowRight\"].includes(key) && !(__privateGet(this, _hotKeys).contains(`no${key.toLowerCase()}`) || key === \" \" && __privateGet(this, _hotKeys).contains(\"nospace\"))) {\n e.preventDefault();\n }\n this.addEventListener(\"keyup\", __privateMethod(this, _keyUpHandler, keyUpHandler_fn), { once: true });\n};\nconst MEDIA_UI_ATTRIBUTE_NAMES = Object.values(MediaUIAttributes);\nconst MEDIA_UI_PROP_NAMES = Object.values(MediaUIProps);\nconst getMediaUIAttributesFrom = (child) => {\n var _a, _b, _c, _d;\n let { observedAttributes } = child.constructor;\n if (!observedAttributes && ((_a = child.nodeName) == null ? void 0 : _a.includes(\"-\"))) {\n globalThis.customElements.upgrade(child);\n ({ observedAttributes } = child.constructor);\n }\n const mediaChromeAttributesList = (_d = (_c = (_b = child == null ? void 0 : child.getAttribute) == null ? void 0 : _b.call(child, MediaStateReceiverAttributes.MEDIA_CHROME_ATTRIBUTES)) == null ? void 0 : _c.split) == null ? void 0 : _d.call(_c, /\\s+/);\n if (!Array.isArray(observedAttributes || mediaChromeAttributesList))\n return [];\n return (observedAttributes || mediaChromeAttributesList).filter(\n (attrName) => MEDIA_UI_ATTRIBUTE_NAMES.includes(attrName)\n );\n};\nconst hasMediaUIProps = (mediaStateReceiverCandidate) => {\n var _a, _b;\n if (((_a = mediaStateReceiverCandidate.nodeName) == null ? void 0 : _a.includes(\"-\")) && !!globalThis.customElements.get(\n (_b = mediaStateReceiverCandidate.nodeName) == null ? void 0 : _b.toLowerCase()\n ) && !(mediaStateReceiverCandidate instanceof globalThis.customElements.get(\n mediaStateReceiverCandidate.nodeName.toLowerCase()\n ))) {\n globalThis.customElements.upgrade(mediaStateReceiverCandidate);\n }\n return MEDIA_UI_PROP_NAMES.some(\n (propName) => propName in mediaStateReceiverCandidate\n );\n};\nconst isMediaStateReceiver = (child) => {\n return hasMediaUIProps(child) || !!getMediaUIAttributesFrom(child).length;\n};\nconst serializeTuple = (tuple) => {\n var _a;\n return (_a = tuple == null ? void 0 : tuple.join) == null ? void 0 : _a.call(tuple, \":\");\n};\nconst CustomAttrSerializer = {\n [MediaUIAttributes.MEDIA_SUBTITLES_LIST]: stringifyTextTrackList,\n [MediaUIAttributes.MEDIA_SUBTITLES_SHOWING]: stringifyTextTrackList,\n [MediaUIAttributes.MEDIA_SEEKABLE]: serializeTuple,\n [MediaUIAttributes.MEDIA_BUFFERED]: (tuples) => tuples == null ? void 0 : tuples.map(serializeTuple).join(\" \"),\n [MediaUIAttributes.MEDIA_PREVIEW_COORDS]: (coords) => coords == null ? void 0 : coords.join(\" \"),\n [MediaUIAttributes.MEDIA_RENDITION_LIST]: stringifyRenditionList,\n [MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST]: stringifyAudioTrackList\n};\nconst setAttr = async (child, attrName, attrValue) => {\n var _a, _b;\n if (!child.isConnected) {\n await delay(0);\n }\n if (typeof attrValue === \"boolean\" || attrValue == null) {\n return setBooleanAttr(child, attrName, attrValue);\n }\n if (typeof attrValue === \"number\") {\n return setNumericAttr(child, attrName, attrValue);\n }\n if (typeof attrValue === \"string\") {\n return setStringAttr(child, attrName, attrValue);\n }\n if (Array.isArray(attrValue) && !attrValue.length) {\n return child.removeAttribute(attrName);\n }\n const val = (_b = (_a = CustomAttrSerializer[attrName]) == null ? void 0 : _a.call(CustomAttrSerializer, attrValue)) != null ? _b : attrValue;\n return child.setAttribute(attrName, val);\n};\nconst isMediaSlotElementDescendant = (el) => {\n var _a;\n return !!((_a = el.closest) == null ? void 0 : _a.call(el, '*[slot=\"media\"]'));\n};\nconst traverseForMediaStateReceivers = (rootNode, mediaStateReceiverCallback) => {\n if (isMediaSlotElementDescendant(rootNode)) {\n return;\n }\n const traverseForMediaStateReceiversSync = (rootNode2, mediaStateReceiverCallback2) => {\n var _a, _b;\n if (isMediaStateReceiver(rootNode2)) {\n mediaStateReceiverCallback2(rootNode2);\n }\n const { children = [] } = rootNode2 != null ? rootNode2 : {};\n const shadowChildren = (_b = (_a = rootNode2 == null ? void 0 : rootNode2.shadowRoot) == null ? void 0 : _a.children) != null ? _b : [];\n const allChildren = [...children, ...shadowChildren];\n allChildren.forEach(\n (child) => traverseForMediaStateReceivers(\n child,\n mediaStateReceiverCallback2\n )\n );\n };\n const name = rootNode == null ? void 0 : rootNode.nodeName.toLowerCase();\n if (name.includes(\"-\") && !isMediaStateReceiver(rootNode)) {\n globalThis.customElements.whenDefined(name).then(() => {\n traverseForMediaStateReceiversSync(rootNode, mediaStateReceiverCallback);\n });\n return;\n }\n traverseForMediaStateReceiversSync(rootNode, mediaStateReceiverCallback);\n};\nconst propagateMediaState = (els, stateName, val) => {\n els.forEach((el) => {\n if (stateName in el) {\n el[stateName] = val;\n return;\n }\n const relevantAttrs = getMediaUIAttributesFrom(el);\n const attrName = stateName.toLowerCase();\n if (!relevantAttrs.includes(attrName))\n return;\n setAttr(el, attrName, val);\n });\n};\nconst monitorForMediaStateReceivers = (rootNode, registerMediaStateReceiver, unregisterMediaStateReceiver) => {\n traverseForMediaStateReceivers(rootNode, registerMediaStateReceiver);\n const registerMediaStateReceiverHandler = (evt) => {\n var _a;\n const el = (_a = evt == null ? void 0 : evt.composedPath()[0]) != null ? _a : evt.target;\n registerMediaStateReceiver(el);\n };\n const unregisterMediaStateReceiverHandler = (evt) => {\n var _a;\n const el = (_a = evt == null ? void 0 : evt.composedPath()[0]) != null ? _a : evt.target;\n unregisterMediaStateReceiver(el);\n };\n rootNode.addEventListener(\n MediaUIEvents.REGISTER_MEDIA_STATE_RECEIVER,\n registerMediaStateReceiverHandler\n );\n rootNode.addEventListener(\n MediaUIEvents.UNREGISTER_MEDIA_STATE_RECEIVER,\n unregisterMediaStateReceiverHandler\n );\n const mutationCallback = (mutationsList) => {\n mutationsList.forEach((mutationRecord) => {\n const {\n addedNodes = [],\n removedNodes = [],\n type,\n target,\n attributeName\n } = mutationRecord;\n if (type === \"childList\") {\n Array.prototype.forEach.call(\n addedNodes,\n (node) => traverseForMediaStateReceivers(\n node,\n registerMediaStateReceiver\n )\n );\n Array.prototype.forEach.call(\n removedNodes,\n (node) => traverseForMediaStateReceivers(\n node,\n unregisterMediaStateReceiver\n )\n );\n } else if (type === \"attributes\" && attributeName === MediaStateReceiverAttributes.MEDIA_CHROME_ATTRIBUTES) {\n if (isMediaStateReceiver(target)) {\n registerMediaStateReceiver(target);\n } else {\n unregisterMediaStateReceiver(target);\n }\n }\n });\n };\n let prevSlotted = [];\n const slotChangeHandler = (event) => {\n const slotEl = event.target;\n if (slotEl.name === \"media\")\n return;\n prevSlotted.forEach(\n (node) => traverseForMediaStateReceivers(node, unregisterMediaStateReceiver)\n );\n prevSlotted = [\n ...slotEl.assignedElements({ flatten: true })\n ];\n prevSlotted.forEach(\n (node) => traverseForMediaStateReceivers(node, registerMediaStateReceiver)\n );\n };\n rootNode.addEventListener(\"slotchange\", slotChangeHandler);\n const observer = new MutationObserver(mutationCallback);\n observer.observe(rootNode, {\n childList: true,\n attributes: true,\n subtree: true\n });\n const unsubscribe = () => {\n traverseForMediaStateReceivers(rootNode, unregisterMediaStateReceiver);\n rootNode.removeEventListener(\"slotchange\", slotChangeHandler);\n observer.disconnect();\n rootNode.removeEventListener(\n MediaUIEvents.REGISTER_MEDIA_STATE_RECEIVER,\n registerMediaStateReceiverHandler\n );\n rootNode.removeEventListener(\n MediaUIEvents.UNREGISTER_MEDIA_STATE_RECEIVER,\n unregisterMediaStateReceiverHandler\n );\n };\n return unsubscribe;\n};\nif (!globalThis.customElements.get(\"media-controller\")) {\n globalThis.customElements.define(\"media-controller\", MediaController);\n}\nvar media_controller_default = MediaController;\nexport {\n Attributes,\n MediaController,\n media_controller_default as default\n};\n","import { MediaChromeButton } from \"./media-chrome-button.js\";\nimport { globalThis, document } from \"./utils/server-safe-globals.js\";\nimport { MediaUIEvents, MediaUIAttributes } from \"./constants.js\";\nimport { tooltipLabels, verbs } from \"./labels/labels.js\";\nimport {\n getStringAttr,\n setStringAttr,\n getBooleanAttr,\n setBooleanAttr\n} from \"./utils/element-utils.js\";\nconst airplayIcon = `\n`;\nconst slotTemplate = document.createElement(\"template\");\nslotTemplate.innerHTML = /*html*/\n`\n \n\n
${message}