@videojs/html 10.0.0-beta.1 → 10.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/cdn/audio-minimal.css +1 -0
  2. package/cdn/audio-minimal.dev.js +5360 -0
  3. package/cdn/audio-minimal.dev.js.map +1 -0
  4. package/cdn/audio-minimal.js +25 -0
  5. package/cdn/audio-minimal.js.map +1 -0
  6. package/cdn/audio.css +1 -0
  7. package/cdn/audio.dev.js +5351 -0
  8. package/cdn/audio.dev.js.map +1 -0
  9. package/cdn/audio.js +25 -0
  10. package/cdn/audio.js.map +1 -0
  11. package/cdn/background.css +1 -0
  12. package/cdn/background.dev.js +2057 -0
  13. package/cdn/background.dev.js.map +1 -0
  14. package/cdn/background.js +19 -0
  15. package/cdn/background.js.map +1 -0
  16. package/cdn/media/hls-video.dev.js +28728 -0
  17. package/cdn/media/hls-video.dev.js.map +1 -0
  18. package/cdn/media/hls-video.js +83 -0
  19. package/cdn/media/hls-video.js.map +1 -0
  20. package/cdn/media/simple-hls-video.dev.js +3796 -0
  21. package/cdn/media/simple-hls-video.dev.js.map +1 -0
  22. package/cdn/media/simple-hls-video.js +44 -0
  23. package/cdn/media/simple-hls-video.js.map +1 -0
  24. package/cdn/video-minimal.css +1 -0
  25. package/cdn/video-minimal.dev.js +5714 -0
  26. package/cdn/video-minimal.dev.js.map +1 -0
  27. package/cdn/video-minimal.js +25 -0
  28. package/cdn/video-minimal.js.map +1 -0
  29. package/cdn/video.css +1 -0
  30. package/cdn/video.dev.js +5782 -0
  31. package/cdn/video.dev.js.map +1 -0
  32. package/cdn/video.js +25 -0
  33. package/cdn/video.js.map +1 -0
  34. package/dist/default/_virtual/inline-css_src/define/audio/minimal-skin.js +1 -1
  35. package/dist/default/_virtual/inline-css_src/define/audio/minimal-skin.js.map +1 -1
  36. package/dist/default/_virtual/inline-css_src/define/audio/skin.js +1 -1
  37. package/dist/default/_virtual/inline-css_src/define/audio/skin.js.map +1 -1
  38. package/dist/default/_virtual/inline-css_src/define/video/minimal-skin.js +1 -1
  39. package/dist/default/_virtual/inline-css_src/define/video/minimal-skin.js.map +1 -1
  40. package/dist/default/_virtual/inline-css_src/define/video/skin.js +1 -1
  41. package/dist/default/_virtual/inline-css_src/define/video/skin.js.map +1 -1
  42. package/dist/default/define/audio/minimal-skin.js +1 -79
  43. package/dist/default/define/audio/minimal-skin.js.map +1 -1
  44. package/dist/default/define/audio/minimal-skin.tailwind.js +1 -81
  45. package/dist/default/define/audio/minimal-skin.tailwind.js.map +1 -1
  46. package/dist/default/define/audio/skin.js +1 -70
  47. package/dist/default/define/audio/skin.js.map +1 -1
  48. package/dist/default/define/audio/skin.tailwind.js +1 -72
  49. package/dist/default/define/audio/skin.tailwind.js.map +1 -1
  50. package/dist/default/define/background/skin.js +1 -5
  51. package/dist/default/define/background/skin.js.map +1 -1
  52. package/dist/default/define/skin-mixin.js +1 -15
  53. package/dist/default/define/skin-mixin.js.map +1 -1
  54. package/dist/default/define/video/minimal-skin.js +1 -121
  55. package/dist/default/define/video/minimal-skin.js.map +1 -1
  56. package/dist/default/define/video/minimal-skin.tailwind.js +1 -131
  57. package/dist/default/define/video/minimal-skin.tailwind.js.map +1 -1
  58. package/dist/default/define/video/skin.js +1 -116
  59. package/dist/default/define/video/skin.js.map +1 -1
  60. package/dist/default/define/video/skin.tailwind.js +1 -124
  61. package/dist/default/define/video/skin.tailwind.js.map +1 -1
  62. package/dist/default/media/background-video/index.js +1 -18
  63. package/dist/default/media/background-video/index.js.map +1 -1
  64. package/package.json +12 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio.dev.js","names":["#base","#keys","#current","#markPending","#listeners","#pending","#contextStore","#attachMedia","#observer","#onSlotChange","#detach","#getSlottedMedia","#destroyed","#trackedControllers","#updatePromise","#instanceProperties","#controllers","#changedProperties","#enqueueUpdate","#store","#provider","#host","#state","#selector","#cached","#subscribe","#unsubscribe","#onAvailable","#directStore","#consumer","#host","#selector","#accessor","#connect","#snapshot","#host","#selector","#consumer","#connect","#store","#props","#media","#props","#media","#props","#media","#props","#input","#props","#media","#props","#input","#props","#media","#getSeconds","#getText","#getPhrase","#getDatetime","#props","#media","#props","#input","#media","#disconnect","#core","#disconnect","#popover","#snapshot","#cleanupTrigger","#findTrigger","#syncTrigger","#currentTrigger","#triggerAbort","#core","#state","#signSpan","#textNode","#ctx","#resizeObserver","#width","#applyPosition","#ctx","#disconnect","#thumbPropsApplied","#core","#img","#textTracks","#externalThumbnails","#api","#thumbnails","#lastTextTrack","#resetStyles","#applyResize","#ctx","#ctx","#core","#provider","#timeState","#bufferState","#disconnect","#slider","#core","#groupConsumer","#disconnect","#tooltip","#snapshot","#cleanupTrigger","#findTrigger","#syncTrigger","#currentTrigger","#triggerAbort","#core","#provider","#volumeState","#disconnect","#slider","#setVolume","styles"],"sources":["../../store/dist/dev/core/abort-controller-registry.js","../../store/dist/dev/core/combine.js","../../store/dist/dev/core/errors.js","../../utils/dist/predicate/predicate.js","../../utils/dist/object/defaults.js","../../utils/dist/object/pick.js","../../store/dist/dev/core/selector.js","../../store/dist/dev/core/shallow-equal.js","../../store/dist/dev/core/slice.js","../../utils/dist/function/noop.js","../../utils/dist/function/throttle.js","../../store/dist/dev/core/state.js","../../store/dist/dev/core/store.js","../../core/dist/dev/dom/feature.js","../../utils/dist/dom/direction.js","../../utils/dist/dom/event.js","../../utils/dist/dom/supports.js","../../utils/dist/dom/listen.js","../../utils/dist/dom/popover.js","../../utils/dist/string/casing.js","../../utils/dist/dom/style.js","../../utils/dist/dom/text-track.js","../../utils/dist/dom/time-ranges.js","../../core/dist/dev/dom/store/features/buffer.js","../../core/dist/dev/dom/store/features/controls.js","../../core/dist/dev/dom/store/features/error.js","../../core/dist/dev/dom/presentation/fullscreen.js","../../core/dist/dev/dom/presentation/pip.js","../../core/dist/dev/dom/store/features/fullscreen.js","../../core/dist/dev/dom/store/features/pip.js","../../core/dist/dev/dom/store/features/playback.js","../../core/dist/dev/dom/store/features/playback-rate.js","../../core/dist/dev/dom/store/features/source.js","../../core/dist/dev/dom/store/features/text-track.js","../../core/dist/dev/dom/media/predicate.js","../../core/dist/dev/dom/store/signal-keys.js","../../core/dist/dev/dom/store/features/time.js","../../core/dist/dev/dom/store/features/volume.js","../../core/dist/dev/dom/store/features/presets.js","../../core/dist/dev/dom/store/selectors.js","../../core/dist/dev/dom/ui/dismiss-layer.js","../../core/dist/dev/dom/ui/button.js","../../core/dist/dev/dom/ui/popover/popover.js","../../core/dist/dev/core/ui/popover/popover-css-vars.js","../../core/dist/dev/dom/ui/popover/popover-positioning.js","../../utils/dist/number/number.js","../../core/dist/dev/dom/utils/pointer.js","../../core/dist/dev/dom/ui/slider.js","../../core/dist/dev/core/ui/slider/slider-css-vars.js","../../core/dist/dev/dom/ui/slider-css-vars.js","../../core/dist/dev/core/ui/thumbnail/thumbnail-core.js","../../core/dist/dev/dom/ui/thumbnail.js","../../core/dist/dev/dom/ui/tooltip/tooltip.js","../../core/dist/dev/dom/ui/transition.js","../../core/dist/dev/dom/utils/element-props.js","../../core/dist/dev/dom/utils/log.js","../../core/dist/dev/dom/utils/state-data-attrs.js","../../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/development/lib/context-request-event.js","../../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/development/lib/create-context.js","../../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/development/lib/controllers/context-consumer.js","../../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/development/lib/value-notifier.js","../../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/development/lib/controllers/context-provider.js","../src/player/context.ts","../src/store/container-mixin.ts","../../element/dist/dev/destroy-mixin.js","../../element/dist/dev/reactive-element.js","../src/ui/media-element.ts","../src/media/container-element.ts","../src/store/provider-mixin.ts","../../store/dist/dev/html/controllers/snapshot-controller.js","../../store/dist/dev/html/store-accessor.js","../../store/dist/dev/html/controllers/store-controller.js","../src/player/player-controller.ts","../src/player/create-player.ts","../src/define/safe-define.ts","../src/define/audio/player.ts","../../icons/dist/render/default/index.js","../src/define/skin-mixin.ts","../inline-css:src/define/audio/skin.js","../src/define/media/container.ts","../../core/dist/dev/core/ui/transition.js","../../core/dist/dev/core/ui/mute-button/mute-button-core.js","../../core/dist/dev/core/ui/mute-button/mute-button-data-attrs.js","../../core/dist/dev/core/ui/play-button/play-button-core.js","../../core/dist/dev/core/ui/play-button/play-button-data-attrs.js","../../core/dist/dev/core/ui/playback-rate-button/playback-rate-button-core.js","../../core/dist/dev/core/ui/playback-rate-button/playback-rate-button-data-attrs.js","../../core/dist/dev/core/ui/popover/popover-core.js","../../core/dist/dev/core/ui/popover/popover-data-attrs.js","../../core/dist/dev/core/ui/seek-button/seek-button-core.js","../../core/dist/dev/core/ui/seek-button/seek-button-data-attrs.js","../../core/dist/dev/core/ui/slider/slider-core.js","../../core/dist/dev/core/ui/slider/slider-data-attrs.js","../../core/dist/dev/core/ui/thumbnail/thumbnail-data-attrs.js","../../core/dist/dev/core/ui/thumbnail/thumbnail-media-fragment.js","../../utils/dist/time/format.js","../../core/dist/dev/core/ui/time/time-core.js","../../core/dist/dev/core/ui/time/time-data-attrs.js","../../core/dist/dev/core/ui/time-slider/time-slider-core.js","../../core/dist/dev/core/ui/time-slider/time-slider-data-attrs.js","../../core/dist/dev/core/ui/tooltip/tooltip-core.js","../../core/dist/dev/core/ui/tooltip/tooltip-css-vars.js","../../core/dist/dev/core/ui/tooltip/tooltip-data-attrs.js","../../core/dist/dev/core/ui/volume-slider/volume-slider-core.js","../../core/dist/dev/core/ui/volume-slider/volume-slider-data-attrs.js","../src/ui/media-button-element.ts","../src/ui/mute-button/mute-button-element.ts","../src/define/ui/mute-button.ts","../src/ui/play-button/play-button-element.ts","../src/define/ui/play-button.ts","../src/ui/playback-rate-button/playback-rate-button-element.ts","../src/define/ui/playback-rate-button.ts","../src/ui/popover/popover-element.ts","../src/define/ui/popover.ts","../src/ui/seek-button/seek-button-element.ts","../src/define/ui/seek-button.ts","../src/ui/time/time-element.ts","../src/ui/time/time-group-element.ts","../src/ui/time/time-separator-element.ts","../src/define/ui/time.ts","../src/ui/context-part-element.ts","../src/ui/slider/context.ts","../src/ui/slider/slider-buffer-element.ts","../src/ui/slider/slider-fill-element.ts","../src/ui/slider/slider-preview-element.ts","../src/ui/slider/slider-thumb-element.ts","../src/ui/thumbnail/thumbnail-element.ts","../src/ui/slider/slider-thumbnail-element.ts","../src/ui/slider/slider-track-element.ts","../src/ui/slider/slider-value-element.ts","../src/ui/time-slider/time-slider-element.ts","../src/define/ui/time-slider.ts","../src/ui/tooltip/context.ts","../src/ui/tooltip/tooltip-element.ts","../src/define/ui/tooltip.ts","../src/ui/volume-slider/volume-slider-element.ts","../src/define/ui/volume-slider.ts","../src/define/audio/skin.ts"],"sourcesContent":["//#region src/core/abort-controller-registry.ts\nvar AbortControllerRegistry = class {\n\t#base = new AbortController();\n\t#keys = /* @__PURE__ */ new Map();\n\t/** The attach-scoped signal. Aborts on detach or reattach. */\n\tget base() {\n\t\treturn this.#base.signal;\n\t}\n\t/** Clears all keyed signals, leaving base intact. */\n\tclear() {\n\t\tfor (const controller of this.#keys.values()) controller.abort();\n\t\tthis.#keys.clear();\n\t}\n\t/** Resets base and clears all keyed signals. */\n\treset() {\n\t\tthis.clear();\n\t\tthis.#base.abort();\n\t\tthis.#base = new AbortController();\n\t}\n\t/** Creates a new signal for the key, superseding any previous signal. */\n\tsupersede(key) {\n\t\tthis.#keys.get(key)?.abort();\n\t\tconst controller = new AbortController();\n\t\tthis.#keys.set(key, controller);\n\t\treturn AbortSignal.any([this.#base.signal, controller.signal]);\n\t}\n};\n\n//#endregion\nexport { AbortControllerRegistry };\n//# sourceMappingURL=abort-controller-registry.js.map","//#region src/core/combine.ts\n/**\n* Combines multiple slices into a single slice.\n*\n* @param slices - The slices to combine.\n* @returns A new slice that represents the combination of the input slices.\n*/\nfunction combine(...slices) {\n\treturn {\n\t\tstate: (ctx) => {\n\t\t\tconst states = slices.map((slice) => slice.state(ctx));\n\t\t\treturn Object.assign({}, ...states);\n\t\t},\n\t\tattach: (ctx) => {\n\t\t\tfor (const slice of slices) try {\n\t\t\t\tslice.attach?.(ctx);\n\t\t\t} catch (err) {\n\t\t\t\tctx.reportError(err);\n\t\t\t}\n\t\t}\n\t};\n}\n\n//#endregion\nexport { combine };\n//# sourceMappingURL=combine.js.map","//#region src/core/errors.ts\nvar StoreError = class extends Error {\n\tcode;\n\tcause;\n\tconstructor(code, options) {\n\t\tsuper(options?.message ?? code);\n\t\tthis.name = \"StoreError\";\n\t\tthis.code = code;\n\t\tthis.cause = options?.cause;\n\t}\n};\nfunction isStoreError(error) {\n\treturn error instanceof StoreError;\n}\nfunction throwNoTargetError() {\n\tthrow new StoreError(\"NO_TARGET\");\n}\nfunction throwDestroyedError() {\n\tthrow new StoreError(\"DESTROYED\");\n}\n\n//#endregion\nexport { StoreError, isStoreError, throwDestroyedError, throwNoTargetError };\n//# sourceMappingURL=errors.js.map","//#region src/predicate/predicate.ts\nfunction isString(value) {\n\treturn typeof value === \"string\";\n}\nfunction isNumber(value) {\n\treturn typeof value === \"number\";\n}\nfunction isBoolean(value) {\n\treturn typeof value === \"boolean\";\n}\nfunction isFunction(value) {\n\treturn typeof value === \"function\";\n}\nfunction isNull(value) {\n\treturn value === null;\n}\nfunction isUndefined(value) {\n\treturn typeof value === \"undefined\";\n}\nfunction isNil(value) {\n\treturn value == null;\n}\nfunction isPromise(value) {\n\treturn value instanceof Promise;\n}\n/**\n* Check if a value is an object, excluding null.\n*/\nfunction isObject(value) {\n\treturn value !== null && typeof value === \"object\";\n}\n/**\n* Check if a value is a plain object (not a class instance like Date, Map, etc).\n*/\nfunction isPlainObject(value) {\n\tif (!isObject(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === null || proto === Object.prototype;\n}\n/**\n* Check if a value is an AbortError.\n*/\nfunction isAbortError(value) {\n\treturn value instanceof Error && value.name === \"AbortError\";\n}\n\n//#endregion\nexport { isAbortError, isBoolean, isFunction, isNil, isNull, isNumber, isObject, isPlainObject, isPromise, isString, isUndefined };\n//# sourceMappingURL=predicate.js.map","import { isUndefined } from \"../predicate/predicate.js\";\n\n//#region src/object/defaults.ts\n/**\n* Creates a new object with default values filled in for undefined properties.\n*\n* @example\n* ```ts\n* const props = { label: undefined, disabled: true };\n* const defaultProps = { label: '', disabled: false };\n* defaults(props, defaultProps); // { label: '', disabled: true }\n* ```\n*/\nfunction defaults(object, defaultValues) {\n\tconst result = { ...defaultValues };\n\tfor (const key in object) if (!isUndefined(object[key])) result[key] = object[key];\n\treturn result;\n}\n\n//#endregion\nexport { defaults };\n//# sourceMappingURL=defaults.js.map","//#region src/object/pick.ts\n/**\n* Creates a new object with only the specified keys.\n*\n* @example\n* const obj = { a: 1, b: 2, c: 3 };\n* pick(obj, ['a', 'c']); // { a: 1, c: 3 }\n*/\nfunction pick(obj, keys) {\n\tconst result = {};\n\tfor (const key of keys) result[key] = obj[key];\n\treturn result;\n}\n\n//#endregion\nexport { pick };\n//# sourceMappingURL=pick.js.map","import { AbortControllerRegistry } from \"./abort-controller-registry.js\";\nimport { throwNoTargetError } from \"./errors.js\";\nimport { pick } from \"@videojs/utils/object\";\n\n//#region src/core/selector.ts\nconst stateContext = {\n\ttarget: throwNoTargetError,\n\tsignals: new AbortControllerRegistry(),\n\tset: throwNoTargetError\n};\n/**\n* Create a type-safe selector for a slice's state.\n*\n* The selector returns the slice's state, or `undefined` if the slice\n* is not configured in the store.\n*\n* @example\n* ```ts\n* const selectPlayback = createSelector(playbackSlice);\n* selectPlayback(store.state); // { paused, play, pause, ... } | undefined\n* selectPlayback.displayName; // 'playback' (from slice name)\n* ```\n*\n* @param slice - The slice to create a selector for.\n*/\nfunction createSelector(slice) {\n\tconst initialState = slice.state(stateContext);\n\tconst keys = Object.keys(initialState);\n\tconst firstKey = keys[0];\n\tif (!firstKey) return Object.assign(() => void 0, { displayName: slice.name });\n\treturn Object.assign((state) => {\n\t\tif (!(firstKey in state)) return void 0;\n\t\treturn pick(state, keys);\n\t}, { displayName: slice.name });\n}\n\n//#endregion\nexport { createSelector };\n//# sourceMappingURL=selector.js.map","//#region src/core/shallow-equal.ts\nconst hasOwn = Object.prototype.hasOwnProperty;\nfunction shallowEqual(a, b) {\n\tif (Object.is(a, b)) return true;\n\tif (typeof a !== \"object\" || a === null || typeof b !== \"object\" || b === null) return false;\n\tconst keysA = Object.keys(a);\n\tconst keysB = Object.keys(b);\n\tif (keysA.length !== keysB.length) return false;\n\tfor (const key of keysA) if (!hasOwn.call(b, key) || !Object.is(a[key], b[key])) return false;\n\treturn true;\n}\n\n//#endregion\nexport { shallowEqual };\n//# sourceMappingURL=shallow-equal.js.map","//#region src/core/slice.ts\nfunction defineSlice() {\n\treturn (config) => config;\n}\n\n//#endregion\nexport { defineSlice };\n//# sourceMappingURL=slice.js.map","//#region src/function/noop.ts\nfunction noop(..._args) {}\n\n//#endregion\nexport { noop };\n//# sourceMappingURL=noop.js.map","//#region src/function/throttle.ts\n/**\n* Trailing-edge throttle: the first call schedules a timer; subsequent calls\n* within the window update the arguments. The function fires once per `ms`\n* window with the latest arguments.\n*/\nfunction throttle(fn, ms) {\n\tlet timerId = null;\n\tlet latestArgs;\n\tconst throttled = (...args) => {\n\t\tlatestArgs = args;\n\t\tif (timerId !== null) return;\n\t\ttimerId = setTimeout(() => {\n\t\t\ttimerId = null;\n\t\t\tfn(...latestArgs);\n\t\t}, ms);\n\t};\n\tthrottled.cancel = () => {\n\t\tif (timerId !== null) {\n\t\t\tclearTimeout(timerId);\n\t\t\ttimerId = null;\n\t\t}\n\t};\n\treturn throttled;\n}\n\n//#endregion\nexport { throttle };\n//# sourceMappingURL=throttle.js.map","import { noop } from \"@videojs/utils/function\";\n\n//#region src/core/state.ts\nlet isFlushScheduled = false;\nfunction scheduleFlush() {\n\tif (isFlushScheduled) return;\n\tisFlushScheduled = true;\n\tqueueMicrotask(flush);\n}\nconst pendingContainers = /* @__PURE__ */ new Set();\nfunction flush() {\n\tisFlushScheduled = false;\n\tfor (const container of pendingContainers) container.flush();\n\tpendingContainers.clear();\n}\nconst hasOwnProp = Object.prototype.hasOwnProperty;\nvar StateContainer = class {\n\t#current;\n\t#listeners = /* @__PURE__ */ new Set();\n\t#pending = false;\n\tconstructor(initial) {\n\t\tthis.#current = Object.freeze({ ...initial });\n\t}\n\tget current() {\n\t\treturn this.#current;\n\t}\n\tpatch(partial) {\n\t\tconst next = { ...this.#current };\n\t\tlet changed = false;\n\t\tfor (const key in partial) {\n\t\t\tif (!hasOwnProp.call(partial, key)) continue;\n\t\t\tconst value = partial[key];\n\t\t\tif (!Object.is(this.#current[key], value)) {\n\t\t\t\tnext[key] = value;\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\tif (changed) {\n\t\t\tthis.#current = Object.freeze(next);\n\t\t\tthis.#markPending();\n\t\t}\n\t}\n\tsubscribe(callback, options) {\n\t\tconst signal = options?.signal;\n\t\tif (signal?.aborted) return noop;\n\t\tthis.#listeners.add(callback);\n\t\tif (!signal) return () => this.#listeners.delete(callback);\n\t\tconst onAbort = () => this.#listeners.delete(callback);\n\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t\treturn () => {\n\t\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t\t\tthis.#listeners.delete(callback);\n\t\t};\n\t}\n\tflush() {\n\t\tif (!this.#pending) return;\n\t\tthis.#pending = false;\n\t\tfor (const fn of this.#listeners) fn();\n\t}\n\t#markPending() {\n\t\tthis.#pending = true;\n\t\tpendingContainers.add(this);\n\t\tscheduleFlush();\n\t}\n};\nfunction createState(initial) {\n\treturn new StateContainer(initial);\n}\nfunction isState(value) {\n\treturn value instanceof StateContainer;\n}\n\n//#endregion\nexport { createState, flush, isState };\n//# sourceMappingURL=state.js.map","import { AbortControllerRegistry } from \"./abort-controller-registry.js\";\nimport { throwDestroyedError, throwNoTargetError } from \"./errors.js\";\nimport { createState } from \"./state.js\";\nimport { isNull, isObject } from \"@videojs/utils/predicate\";\n\n//#region src/core/store.ts\nconst STORE_SYMBOL = Symbol(\"@videojs/store\");\nfunction createStore() {\n\treturn (slice, options = {}) => {\n\t\tlet target = null;\n\t\tlet destroyed = false;\n\t\tconst setupAbort = new AbortController();\n\t\tconst signals = new AbortControllerRegistry();\n\t\tlet state;\n\t\tfunction validate() {\n\t\t\tif (destroyed) throwDestroyedError();\n\t\t\tif (!target) throwNoTargetError();\n\t\t}\n\t\tconst initialState = slice.state({\n\t\t\ttarget: () => {\n\t\t\t\tvalidate();\n\t\t\t\treturn target;\n\t\t\t},\n\t\t\tsignals,\n\t\t\tset: (partial) => state.patch(partial)\n\t\t});\n\t\tstate = createState(initialState);\n\t\tconst store = {\n\t\t\t[STORE_SYMBOL]: true,\n\t\t\tget $state() {\n\t\t\t\treturn state;\n\t\t\t},\n\t\t\tget target() {\n\t\t\t\treturn target;\n\t\t\t},\n\t\t\tget destroyed() {\n\t\t\t\treturn destroyed;\n\t\t\t},\n\t\t\tget state() {\n\t\t\t\treturn state.current;\n\t\t\t},\n\t\t\tattach,\n\t\t\tdestroy,\n\t\t\tsubscribe\n\t\t};\n\t\tfor (const key of Object.keys(initialState)) Object.defineProperty(store, key, {\n\t\t\tget: () => state.current[key],\n\t\t\tenumerable: true\n\t\t});\n\t\ttry {\n\t\t\toptions.onSetup?.({\n\t\t\t\tstore,\n\t\t\t\tsignal: setupAbort.signal\n\t\t\t});\n\t\t} catch (error) {\n\t\t\treportError(error);\n\t\t}\n\t\treturn store;\n\t\tfunction attach(newTarget) {\n\t\t\tif (destroyed) throwDestroyedError();\n\t\t\tsignals.reset();\n\t\t\ttarget = newTarget;\n\t\t\tconst attachContext = {\n\t\t\t\ttarget: newTarget,\n\t\t\t\tsignal: signals.base,\n\t\t\t\tget: () => state.current,\n\t\t\t\tset: (partial) => state.patch(partial),\n\t\t\t\treportError,\n\t\t\t\tstore: {\n\t\t\t\t\tget state() {\n\t\t\t\t\t\treturn state.current;\n\t\t\t\t\t},\n\t\t\t\t\tsubscribe\n\t\t\t\t}\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tslice.attach?.(attachContext);\n\t\t\t} catch (error) {\n\t\t\t\treportError(error);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\toptions.onAttach?.({\n\t\t\t\t\tstore,\n\t\t\t\t\ttarget: newTarget,\n\t\t\t\t\tsignal: signals.base\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\treportError(error);\n\t\t\t}\n\t\t\treturn detach;\n\t\t}\n\t\tfunction detach() {\n\t\t\tif (isNull(target)) return;\n\t\t\tsignals.reset();\n\t\t\ttarget = null;\n\t\t\tstate.patch(initialState);\n\t\t}\n\t\tfunction destroy() {\n\t\t\tif (destroyed) return;\n\t\t\tdestroyed = true;\n\t\t\tdetach();\n\t\t\tsetupAbort.abort();\n\t\t}\n\t\tfunction subscribe(callback, options) {\n\t\t\treturn state.subscribe(callback, options);\n\t\t}\n\t\tfunction reportError(error) {\n\t\t\tif (options.onError) options.onError({\n\t\t\t\tstore,\n\t\t\t\terror\n\t\t\t});\n\t\t\telse console.error(\"[vjs-store]\", error);\n\t\t}\n\t};\n}\nfunction isStore(value) {\n\treturn isObject(value) && STORE_SYMBOL in value;\n}\n\n//#endregion\nexport { createStore, isStore };\n//# sourceMappingURL=store.js.map","import { defineSlice } from \"@videojs/store\";\n\n//#region src/dom/feature.ts\nconst definePlayerFeature = defineSlice();\n\n//#endregion\nexport { definePlayerFeature };\n//# sourceMappingURL=feature.js.map","//#region src/dom/direction.ts\n/** Check whether an element's text direction is right-to-left. */\nfunction isRTL(element) {\n\tconst dir = element.closest(\"[dir]\")?.getAttribute(\"dir\");\n\tif (dir) return dir.toLowerCase() === \"rtl\";\n\treturn getComputedStyle(element).direction === \"rtl\";\n}\n\n//#endregion\nexport { isRTL };\n//# sourceMappingURL=direction.js.map","//#region src/dom/event.ts\nfunction onEvent(target, type, options) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst handleAbort = () => {\n\t\t\treject(options?.signal?.reason ?? \"Aborted\");\n\t\t};\n\t\tif (options?.signal?.aborted) {\n\t\t\thandleAbort();\n\t\t\treturn;\n\t\t}\n\t\toptions?.signal?.addEventListener(\"abort\", handleAbort, { once: true });\n\t\ttarget.addEventListener(type, (event) => {\n\t\t\toptions?.signal?.removeEventListener(\"abort\", handleAbort);\n\t\t\tresolve(event);\n\t\t}, {\n\t\t\t...options,\n\t\t\tonce: true\n\t\t});\n\t});\n}\n\n//#endregion\nexport { onEvent };\n//# sourceMappingURL=event.js.map","//#region src/dom/supports.ts\nfunction supportsIdleCallback() {\n\treturn typeof requestIdleCallback === \"function\";\n}\nfunction supportsAnimationFrame() {\n\treturn typeof requestAnimationFrame === \"function\";\n}\nfunction supportsAnchorPositioning() {\n\treturn typeof CSS !== \"undefined\" && CSS.supports(\"anchor-name: --a\");\n}\n\n//#endregion\nexport { supportsAnchorPositioning, supportsAnimationFrame, supportsIdleCallback };\n//# sourceMappingURL=supports.js.map","//#region src/dom/listen.ts\nfunction listen(target, type, listener, options) {\n\ttarget.addEventListener(type, listener, options);\n\treturn () => target.removeEventListener(type, listener, options);\n}\n\n//#endregion\nexport { listen };\n//# sourceMappingURL=listen.js.map","//#region src/dom/popover.ts\nfunction tryShowPopover(el) {\n\ttry {\n\t\tel?.showPopover?.();\n\t} catch {}\n}\nfunction tryHidePopover(el) {\n\ttry {\n\t\tel?.hidePopover?.();\n\t} catch {}\n}\n\n//#endregion\nexport { tryHidePopover, tryShowPopover };\n//# sourceMappingURL=popover.js.map","//#region src/string/casing.ts\nfunction pascalCase(str) {\n\treturn str.replace(/[-_](.)/g, (_, c) => c.toUpperCase()).replace(/^(.)/, (_, c) => c.toUpperCase());\n}\nfunction camelCase(str) {\n\treturn pascalCase(str).replace(/^(.)/, (_, c) => c.toLowerCase());\n}\nfunction kebabCase(str) {\n\treturn str.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);\n}\n\n//#endregion\nexport { camelCase, kebabCase, pascalCase };\n//# sourceMappingURL=casing.js.map","import { kebabCase } from \"../string/casing.js\";\n\n//#region src/dom/style.ts\nfunction applyStyles(element, styles) {\n\tfor (const [prop, value] of Object.entries(styles)) if (typeof value === \"string\") {\n\t\tconst key = prop.startsWith(\"--\") ? prop : kebabCase(prop);\n\t\telement.style.setProperty(key, value);\n\t}\n}\n\n//#endregion\nexport { applyStyles };\n//# sourceMappingURL=style.js.map","//#region src/dom/text-track.ts\n/** Find the `<track>` element that owns the given `TextTrack`. */\nfunction findTrackElement(media, track) {\n\tfor (const el of media.querySelectorAll(\"track\")) if (el.track === track) return el;\n\treturn null;\n}\nfunction getTextTrackList(media, filterPred) {\n\tif (!media?.textTracks) return [];\n\treturn Array.from(media.textTracks).filter(filterPred).sort(sortByTextTrackKind);\n}\nfunction sortByTextTrackKind(a, b) {\n\treturn a.kind >= b.kind ? 1 : -1;\n}\n\n//#endregion\nexport { findTrackElement, getTextTrackList };\n//# sourceMappingURL=text-track.js.map","//#region src/dom/time-ranges.ts\n/** Converts a TimeRanges object to an array of [start, end] tuples. */\nfunction serializeTimeRanges(ranges) {\n\tconst result = [];\n\tfor (let i = 0; i < ranges.length; i++) result.push([ranges.start(i), ranges.end(i)]);\n\treturn result;\n}\n\n//#endregion\nexport { serializeTimeRanges };\n//# sourceMappingURL=time-ranges.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { listen, serializeTimeRanges } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/buffer.ts\nconst bufferFeature = definePlayerFeature({\n\tname: \"buffer\",\n\tstate: () => ({\n\t\tbuffered: [],\n\t\tseekable: []\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media } = target;\n\t\tconst sync = () => set({\n\t\t\tbuffered: serializeTimeRanges(media.buffered),\n\t\t\tseekable: serializeTimeRanges(media.seekable)\n\t\t});\n\t\tsync();\n\t\tlisten(media, \"progress\", sync, { signal });\n\t\tlisten(media, \"emptied\", sync, { signal });\n\t}\n});\n\n//#endregion\nexport { bufferFeature };\n//# sourceMappingURL=buffer.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { isNull } from \"@videojs/utils/predicate\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/controls.ts\nconst IDLE_DELAY = 2e3;\nconst TAP_THRESHOLD = 250;\nconst controlsFeature = definePlayerFeature({\n\tname: \"controls\",\n\tstate: () => ({\n\t\tuserActive: true,\n\t\tcontrolsVisible: true\n\t}),\n\tattach({ target, signal, get, set }) {\n\t\tconst { media, container } = target;\n\t\tif (isNull(container)) {\n\t\t\tconsole.warn(\"[vjs] controlsFeature requires a container element for activity tracking.\");\n\t\t\treturn;\n\t\t}\n\t\tfunction computeVisible(userActive) {\n\t\t\treturn userActive || media.paused;\n\t\t}\n\t\tlet idleTimer;\n\t\tfunction clearIdle() {\n\t\t\tclearTimeout(idleTimer);\n\t\t\tidleTimer = void 0;\n\t\t}\n\t\tfunction scheduleIdle() {\n\t\t\tclearIdle();\n\t\t\tidleTimer = setTimeout(setInactive, IDLE_DELAY);\n\t\t}\n\t\tfunction setActive() {\n\t\t\tif (!get().userActive) set({\n\t\t\t\tuserActive: true,\n\t\t\t\tcontrolsVisible: true\n\t\t\t});\n\t\t\tscheduleIdle();\n\t\t}\n\t\tfunction setInactive() {\n\t\t\tclearIdle();\n\t\t\tset({\n\t\t\t\tuserActive: false,\n\t\t\t\tcontrolsVisible: computeVisible(false)\n\t\t\t});\n\t\t}\n\t\tlet pointerDownTime = 0;\n\t\tfunction onPointerDown() {\n\t\t\tpointerDownTime = Date.now();\n\t\t}\n\t\tfunction onPointerUp(event) {\n\t\t\tif (event.pointerType === \"touch\" && Date.now() - pointerDownTime < TAP_THRESHOLD) if (get().controlsVisible) {\n\t\t\t\tclearIdle();\n\t\t\t\tset({\n\t\t\t\t\tuserActive: false,\n\t\t\t\t\tcontrolsVisible: computeVisible(false)\n\t\t\t\t});\n\t\t\t} else setActive();\n\t\t\telse setActive();\n\t\t}\n\t\tfunction onPlaybackChange() {\n\t\t\tconst { userActive } = get();\n\t\t\tset({ controlsVisible: computeVisible(userActive) });\n\t\t\tif (!media.paused && userActive) scheduleIdle();\n\t\t}\n\t\tlisten(container, \"pointermove\", setActive, { signal });\n\t\tlisten(container, \"pointerdown\", onPointerDown, { signal });\n\t\tlisten(container, \"pointerup\", onPointerUp, { signal });\n\t\tlisten(container, \"keyup\", setActive, { signal });\n\t\tlisten(container, \"focusin\", setActive, { signal });\n\t\tlisten(container, \"pointerleave\", setInactive, { signal });\n\t\tlisten(media, \"play\", onPlaybackChange, { signal });\n\t\tlisten(media, \"pause\", onPlaybackChange, { signal });\n\t\tlisten(media, \"ended\", onPlaybackChange, { signal });\n\t\tsignal.addEventListener(\"abort\", clearIdle, { once: true });\n\t\tscheduleIdle();\n\t}\n});\n\n//#endregion\nexport { controlsFeature };\n//# sourceMappingURL=controls.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/error.ts\nconst errorFeature = definePlayerFeature({\n\tname: \"error\",\n\tstate: ({ set }) => ({\n\t\terror: null,\n\t\tdismissError() {\n\t\t\tset({ error: null });\n\t\t}\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media } = target;\n\t\tconst syncError = () => set({ error: media.error });\n\t\tlisten(media, \"error\", syncError, { signal });\n\t\tlisten(media, \"emptied\", () => set({ error: null }), { signal });\n\t}\n});\n\n//#endregion\nexport { errorFeature };\n//# sourceMappingURL=error.js.map","import { isFunction } from \"@videojs/utils/predicate\";\n\n//#region src/dom/presentation/fullscreen.ts\n/** Check if the Fullscreen API is supported on this platform. */\nfunction isFullscreenEnabled() {\n\tconst doc = document;\n\tif (doc.fullscreenEnabled || doc.webkitFullscreenEnabled) return true;\n\treturn document.createElement(\"video\").webkitSupportsFullscreen === true;\n}\n/** Get the current fullscreen element from the document. */\nfunction getFullscreenElement() {\n\tconst doc = document;\n\treturn doc.fullscreenElement ?? doc.webkitFullscreenElement ?? null;\n}\n/**\n* Check if a specific element (or its media) is currently in fullscreen.\n*\n* Uses `:fullscreen` pseudo-class which works across Shadow DOM boundaries.\n*/\nfunction isFullscreenElement(container, media) {\n\tconst video = media;\n\tif (video.webkitDisplayingFullscreen && video.webkitPresentationMode === \"fullscreen\") return true;\n\tconst target = container ?? media;\n\tif (getFullscreenElement() === target) return true;\n\ttry {\n\t\treturn target.matches(\":fullscreen\");\n\t} catch {\n\t\treturn false;\n\t}\n}\n/**\n* Request fullscreen mode.\n*\n* Tries container first (to show custom UI), falls back to media element\n* for platforms that only support video fullscreen (iOS Safari).\n*/\nasync function requestFullscreen(container, media) {\n\tconst video = media;\n\tif (container) {\n\t\tconst el = container;\n\t\tif (isFunction(el.requestFullscreen)) return el.requestFullscreen();\n\t\tif (isFunction(el.webkitRequestFullscreen)) return el.webkitRequestFullscreen();\n\t\tif (isFunction(el.webkitRequestFullScreen)) return el.webkitRequestFullScreen();\n\t}\n\tif (isFunction(video.webkitEnterFullscreen)) {\n\t\tvideo.webkitEnterFullscreen();\n\t\treturn;\n\t}\n\tif (isFunction(media.requestFullscreen)) return media.requestFullscreen();\n\tthrow new DOMException(\"Fullscreen not supported\", \"NotSupportedError\");\n}\n/** Exit fullscreen mode. */\nasync function exitFullscreen() {\n\tconst doc = document;\n\tconst video = getFullscreenElement();\n\tif (isFunction(doc.exitFullscreen)) return doc.exitFullscreen();\n\tif (isFunction(doc.webkitExitFullscreen)) return doc.webkitExitFullscreen();\n\tif (isFunction(doc.webkitCancelFullScreen)) return doc.webkitCancelFullScreen();\n\tif (video && isFunction(video.webkitExitFullscreen)) {\n\t\tvideo.webkitExitFullscreen();\n\t\treturn;\n\t}\n}\n\n//#endregion\nexport { exitFullscreen, isFullscreenElement, isFullscreenEnabled, requestFullscreen };\n//# sourceMappingURL=fullscreen.js.map","import { isFunction } from \"@videojs/utils/predicate\";\n\n//#region src/dom/presentation/pip.ts\n/**\n* Check if Picture-in-Picture is supported on this platform.\n*\n* Note: Safari PWAs don't support PiP even though the API exists.\n*/\nfunction isPictureInPictureEnabled() {\n\tif (document.pictureInPictureEnabled) {\n\t\tconst isSafari = /.*Version\\/.*Safari\\/.*/.test(navigator.userAgent);\n\t\tconst isPWA = typeof matchMedia === \"function\" && matchMedia(\"(display-mode: standalone)\").matches;\n\t\treturn !isSafari || !isPWA;\n\t}\n\treturn isFunction(document.createElement(\"video\").webkitSetPresentationMode);\n}\n/**\n* Check if Picture-in-Picture is currently active for a media element.\n*/\nfunction isPictureInPictureElement(media) {\n\tif (document.pictureInPictureElement === media) return true;\n\treturn media.webkitPresentationMode === \"picture-in-picture\";\n}\n/**\n* Request Picture-in-Picture mode.\n*\n* Uses standard API where available, falls back to iOS Safari's\n* WebKit presentation mode.\n*/\nasync function requestPictureInPicture(media) {\n\tconst video = media;\n\tif (isFunction(video.requestPictureInPicture)) {\n\t\tawait video.requestPictureInPicture();\n\t\treturn;\n\t}\n\tif (isFunction(video.webkitSetPresentationMode)) {\n\t\tvideo.webkitSetPresentationMode(\"picture-in-picture\");\n\t\treturn;\n\t}\n\tthrow new DOMException(\"Picture-in-Picture not supported\", \"NotSupportedError\");\n}\n/**\n* Exit Picture-in-Picture mode.\n*\n* Uses standard API where available, falls back to iOS Safari's\n* WebKit presentation mode.\n*/\nasync function exitPictureInPicture(media) {\n\tif (document.pictureInPictureElement && isFunction(document.exitPictureInPicture)) {\n\t\tawait document.exitPictureInPicture();\n\t\treturn;\n\t}\n\tif (media) {\n\t\tconst video = media;\n\t\tif (video.webkitPresentationMode === \"picture-in-picture\" && isFunction(video.webkitSetPresentationMode)) {\n\t\t\tvideo.webkitSetPresentationMode(\"inline\");\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n//#endregion\nexport { exitPictureInPicture, isPictureInPictureElement, isPictureInPictureEnabled, requestPictureInPicture };\n//# sourceMappingURL=pip.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { exitFullscreen, isFullscreenElement, isFullscreenEnabled, requestFullscreen } from \"../../presentation/fullscreen.js\";\nimport { exitPictureInPicture, isPictureInPictureElement } from \"../../presentation/pip.js\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/fullscreen.ts\nconst fullscreenFeature = definePlayerFeature({\n\tname: \"fullscreen\",\n\tstate: ({ target }) => ({\n\t\tfullscreen: false,\n\t\tfullscreenAvailability: \"unavailable\",\n\t\tasync requestFullscreen() {\n\t\t\tconst { media, container } = target();\n\t\t\tif (isPictureInPictureElement(media)) await exitPictureInPicture(media);\n\t\t\treturn requestFullscreen(container, media);\n\t\t},\n\t\tasync exitFullscreen() {\n\t\t\treturn exitFullscreen();\n\t\t}\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media, container } = target;\n\t\tset({ fullscreenAvailability: isFullscreenEnabled() ? \"available\" : \"unsupported\" });\n\t\tconst sync = () => set({ fullscreen: isFullscreenElement(container, media) });\n\t\tsync();\n\t\tlisten(document, \"fullscreenchange\", sync, { signal });\n\t\tlisten(document, \"webkitfullscreenchange\", sync, { signal });\n\t\tif (\"webkitPresentationMode\" in media) listen(media, \"webkitpresentationmodechanged\", sync, { signal });\n\t}\n});\n\n//#endregion\nexport { fullscreenFeature };\n//# sourceMappingURL=fullscreen.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { exitFullscreen, isFullscreenElement } from \"../../presentation/fullscreen.js\";\nimport { exitPictureInPicture, isPictureInPictureElement, isPictureInPictureEnabled, requestPictureInPicture } from \"../../presentation/pip.js\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/pip.ts\nconst pipFeature = definePlayerFeature({\n\tname: \"pip\",\n\tstate: ({ target }) => ({\n\t\tpip: false,\n\t\tpipAvailability: \"unavailable\",\n\t\tasync requestPictureInPicture() {\n\t\t\tconst { media, container } = target();\n\t\t\tif (isFullscreenElement(container, media)) await exitFullscreen();\n\t\t\treturn requestPictureInPicture(media);\n\t\t},\n\t\tasync exitPictureInPicture() {\n\t\t\tconst { media } = target();\n\t\t\treturn exitPictureInPicture(media);\n\t\t}\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media } = target;\n\t\tset({ pipAvailability: isPictureInPictureEnabled() ? \"available\" : \"unsupported\" });\n\t\tconst sync = () => set({ pip: isPictureInPictureElement(media) });\n\t\tsync();\n\t\tlisten(media, \"enterpictureinpicture\", sync, { signal });\n\t\tlisten(media, \"leavepictureinpicture\", sync, { signal });\n\t\tif (\"webkitPresentationMode\" in media) listen(media, \"webkitpresentationmodechanged\", sync, { signal });\n\t}\n});\n\n//#endregion\nexport { pipFeature };\n//# sourceMappingURL=pip.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/playback.ts\nconst playbackFeature = definePlayerFeature({\n\tname: \"playback\",\n\tstate: ({ target }) => ({\n\t\tpaused: true,\n\t\tended: false,\n\t\tstarted: false,\n\t\twaiting: false,\n\t\tplay() {\n\t\t\treturn target().media.play();\n\t\t},\n\t\tpause() {\n\t\t\ttarget().media.pause();\n\t\t}\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media } = target;\n\t\tconst sync = () => set({\n\t\t\tpaused: media.paused,\n\t\t\tended: media.ended,\n\t\t\tstarted: !media.paused || media.currentTime > 0,\n\t\t\twaiting: media.readyState < HTMLMediaElement.HAVE_FUTURE_DATA && !media.paused\n\t\t});\n\t\tsync();\n\t\tlisten(media, \"emptied\", sync, { signal });\n\t\tlisten(media, \"play\", sync, { signal });\n\t\tlisten(media, \"pause\", sync, { signal });\n\t\tlisten(media, \"ended\", sync, { signal });\n\t\tlisten(media, \"playing\", sync, { signal });\n\t\tlisten(media, \"waiting\", sync, { signal });\n\t}\n});\n\n//#endregion\nexport { playbackFeature };\n//# sourceMappingURL=playback.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/playback-rate.ts\nconst DEFAULT_RATES = [\n\t1,\n\t1.2,\n\t1.5,\n\t1.7,\n\t2\n];\nconst playbackRateFeature = definePlayerFeature({\n\tname: \"playbackRate\",\n\tstate: ({ target }) => ({\n\t\tplaybackRates: DEFAULT_RATES,\n\t\tplaybackRate: 1,\n\t\tsetPlaybackRate(rate) {\n\t\t\ttarget().media.playbackRate = rate;\n\t\t}\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media } = target;\n\t\tconst sync = () => set({ playbackRate: media.playbackRate });\n\t\tsync();\n\t\tlisten(media, \"ratechange\", sync, { signal });\n\t}\n});\n\n//#endregion\nexport { playbackRateFeature };\n//# sourceMappingURL=playback-rate.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/source.ts\nconst sourceFeature = definePlayerFeature({\n\tname: \"source\",\n\tstate: ({ target, signals }) => ({\n\t\tsource: null,\n\t\tcanPlay: false,\n\t\tloadSource(src) {\n\t\t\tsignals.clear();\n\t\t\tconst { media } = target();\n\t\t\tmedia.src = src;\n\t\t\tmedia.load();\n\t\t\treturn src;\n\t\t}\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media } = target;\n\t\tconst sync = () => set({\n\t\t\tsource: media.currentSrc || media.src || null,\n\t\t\tcanPlay: media.readyState >= HTMLMediaElement.HAVE_ENOUGH_DATA\n\t\t});\n\t\tsync();\n\t\tlisten(media, \"canplay\", sync, { signal });\n\t\tlisten(media, \"canplaythrough\", sync, { signal });\n\t\tlisten(media, \"loadstart\", sync, { signal });\n\t\tlisten(media, \"emptied\", sync, { signal });\n\t}\n});\n\n//#endregion\nexport { sourceFeature };\n//# sourceMappingURL=source.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { findTrackElement, getTextTrackList, listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/text-track.ts\nconst textTrackFeature = definePlayerFeature({\n\tname: \"textTrack\",\n\tstate: ({ target }) => ({\n\t\tchaptersCues: [],\n\t\tthumbnailCues: [],\n\t\tthumbnailTrackSrc: null,\n\t\ttextTrackList: [],\n\t\tsubtitlesShowing: false,\n\t\ttoggleSubtitles(forceShow) {\n\t\t\tconst subtitlesTracks = getTextTrackList(target().media, (track) => track.kind === \"subtitles\" || track.kind === \"captions\");\n\t\t\tif (!subtitlesTracks.length) return false;\n\t\t\tconst showing = subtitlesTracks.some((track) => track.mode === \"showing\");\n\t\t\tconst nextShowing = forceShow ?? !showing;\n\t\t\tfor (const track of subtitlesTracks) track.mode = nextShowing ? \"showing\" : \"disabled\";\n\t\t\treturn nextShowing;\n\t\t}\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media } = target;\n\t\tlet trackCleanup = null;\n\t\tfunction sync() {\n\t\t\ttrackCleanup?.abort();\n\t\t\ttrackCleanup = new AbortController();\n\t\t\tlet chaptersTrack = null;\n\t\t\tlet thumbnailTrack = null;\n\t\t\tconst textTrackList = [];\n\t\t\tlet subtitlesShowing = false;\n\t\t\tfor (let i = 0; i < media.textTracks.length; i++) {\n\t\t\t\tconst track = media.textTracks[i];\n\t\t\t\tif (!chaptersTrack && track.kind === \"chapters\") chaptersTrack = track;\n\t\t\t\tif (!thumbnailTrack && track.kind === \"metadata\" && track.label === \"thumbnails\") thumbnailTrack = track;\n\t\t\t\ttextTrackList.push({\n\t\t\t\t\tkind: track.kind,\n\t\t\t\t\tlabel: track.label,\n\t\t\t\t\tlanguage: track.language,\n\t\t\t\t\tmode: track.mode\n\t\t\t\t});\n\t\t\t\tif ((track.kind === \"captions\" || track.kind === \"subtitles\") && track.mode === \"showing\") subtitlesShowing = true;\n\t\t\t}\n\t\t\tconst chaptersCues = chaptersTrack?.cues ? Array.from(chaptersTrack.cues) : [];\n\t\t\tconst thumbnailCues = thumbnailTrack?.cues ? Array.from(thumbnailTrack.cues) : [];\n\t\t\tlet thumbnailTrackSrc = null;\n\t\t\tif (thumbnailTrack) thumbnailTrackSrc = findTrackElement(media, thumbnailTrack)?.src ?? null;\n\t\t\tfor (const trackEl of media.querySelectorAll?.(\"track\") ?? []) if (!trackEl.track?.cues?.length) listen(trackEl, \"load\", sync, { signal: trackCleanup.signal });\n\t\t\tset({\n\t\t\t\tchaptersCues,\n\t\t\t\tthumbnailCues,\n\t\t\t\tthumbnailTrackSrc,\n\t\t\t\ttextTrackList,\n\t\t\t\tsubtitlesShowing\n\t\t\t});\n\t\t}\n\t\tsync();\n\t\tlisten(media.textTracks, \"addtrack\", sync, { signal });\n\t\tlisten(media.textTracks, \"removetrack\", sync, { signal });\n\t\tlisten(media.textTracks, \"change\", sync, { signal });\n\t\tlisten(media, \"loadstart\", sync, { signal });\n\t\tsignal.addEventListener(\"abort\", () => trackCleanup?.abort(), { once: true });\n\t}\n});\n\n//#endregion\nexport { textTrackFeature };\n//# sourceMappingURL=text-track.js.map","//#region src/dom/media/predicate.ts\nfunction hasMetadata(media) {\n\treturn media.readyState >= HTMLMediaElement.HAVE_METADATA;\n}\n\n//#endregion\nexport { hasMetadata };\n//# sourceMappingURL=predicate.js.map","//#region src/dom/store/signal-keys.ts\nconst signalKeys = { seek: Symbol.for(\"@videojs/seek\") };\n\n//#endregion\nexport { signalKeys };\n//# sourceMappingURL=signal-keys.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { hasMetadata } from \"../../media/predicate.js\";\nimport { signalKeys } from \"../signal-keys.js\";\nimport { listen, onEvent } from \"@videojs/utils/dom\";\nimport { noop } from \"@videojs/utils/function\";\n\n//#region src/dom/store/features/time.ts\nconst timeFeature = definePlayerFeature({\n\tname: \"time\",\n\tstate: ({ target, signals, set }) => ({\n\t\tcurrentTime: 0,\n\t\tduration: 0,\n\t\tseeking: false,\n\t\tasync seek(time) {\n\t\t\tconst { media } = target(), signal = signals.supersede(signalKeys.seek);\n\t\t\tif (!hasMetadata(media)) {\n\t\t\t\tif (!await onEvent(media, \"loadedmetadata\", { signal }).catch(() => false)) return media.currentTime;\n\t\t\t}\n\t\t\tconst clampedTime = Math.max(0, Math.min(time, media.duration || Infinity));\n\t\t\tset({\n\t\t\t\tcurrentTime: clampedTime,\n\t\t\t\tseeking: true\n\t\t\t});\n\t\t\tmedia.currentTime = clampedTime;\n\t\t\tawait onEvent(media, \"seeked\", { signal }).catch(noop);\n\t\t\treturn media.currentTime;\n\t\t}\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media } = target;\n\t\tconst sync = () => set({\n\t\t\tcurrentTime: media.currentTime,\n\t\t\tduration: Number.isFinite(media.duration) ? media.duration : 0,\n\t\t\tseeking: media.seeking\n\t\t});\n\t\tsync();\n\t\tlisten(media, \"timeupdate\", sync, { signal });\n\t\tlisten(media, \"durationchange\", sync, { signal });\n\t\tlisten(media, \"seeking\", sync, { signal });\n\t\tlisten(media, \"seeked\", sync, { signal });\n\t\tlisten(media, \"loadedmetadata\", sync, { signal });\n\t\tlisten(media, \"emptied\", sync, { signal });\n\t}\n});\n\n//#endregion\nexport { timeFeature };\n//# sourceMappingURL=time.js.map","import { definePlayerFeature } from \"../../feature.js\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/store/features/volume.ts\n/** Volume to restore when unmuting at zero. */\nconst UNMUTE_VOLUME = .25;\nconst volumeFeature = definePlayerFeature({\n\tname: \"volume\",\n\tstate: ({ target }) => ({\n\t\tvolume: 1,\n\t\tmuted: false,\n\t\tvolumeAvailability: \"unavailable\",\n\t\tsetVolume(volume) {\n\t\t\tconst { media } = target();\n\t\t\tconst clamped = Math.max(0, Math.min(1, volume));\n\t\t\tif (clamped > 0 && media.muted) media.muted = false;\n\t\t\tmedia.volume = clamped;\n\t\t\treturn media.volume;\n\t\t},\n\t\ttoggleMuted() {\n\t\t\tconst { media } = target();\n\t\t\tif (media.muted || media.volume === 0) {\n\t\t\t\tmedia.muted = false;\n\t\t\t\tif (media.volume === 0) media.volume = UNMUTE_VOLUME;\n\t\t\t} else media.muted = true;\n\t\t\treturn media.muted;\n\t\t}\n\t}),\n\tattach({ target, signal, set }) {\n\t\tconst { media } = target;\n\t\tset({ volumeAvailability: canSetVolume() });\n\t\tconst sync = () => set({\n\t\t\tvolume: media.volume,\n\t\t\tmuted: media.muted\n\t\t});\n\t\tsync();\n\t\tlisten(media, \"volumechange\", sync, { signal });\n\t}\n});\n/** Check if volume can be programmatically set (fails on iOS Safari). */\nfunction canSetVolume() {\n\tconst video = document.createElement(\"video\");\n\ttry {\n\t\tvideo.volume = .5;\n\t\treturn video.volume === .5 ? \"available\" : \"unsupported\";\n\t} catch {\n\t\treturn \"unsupported\";\n\t}\n}\n\n//#endregion\nexport { volumeFeature };\n//# sourceMappingURL=volume.js.map","import { bufferFeature } from \"./buffer.js\";\nimport { controlsFeature } from \"./controls.js\";\nimport { errorFeature } from \"./error.js\";\nimport { fullscreenFeature } from \"./fullscreen.js\";\nimport { pipFeature } from \"./pip.js\";\nimport { playbackFeature } from \"./playback.js\";\nimport { playbackRateFeature } from \"./playback-rate.js\";\nimport { sourceFeature } from \"./source.js\";\nimport { textTrackFeature } from \"./text-track.js\";\nimport { timeFeature } from \"./time.js\";\nimport { volumeFeature } from \"./volume.js\";\n\n//#region src/dom/store/features/presets.ts\nconst videoFeatures = [\n\tplaybackFeature,\n\tplaybackRateFeature,\n\tvolumeFeature,\n\ttimeFeature,\n\tsourceFeature,\n\tbufferFeature,\n\tfullscreenFeature,\n\tpipFeature,\n\tcontrolsFeature,\n\ttextTrackFeature,\n\terrorFeature\n];\nconst audioFeatures = [\n\tplaybackFeature,\n\tplaybackRateFeature,\n\tvolumeFeature,\n\ttimeFeature,\n\tsourceFeature,\n\tbufferFeature\n];\nconst backgroundFeatures = [];\n\n//#endregion\nexport { audioFeatures, backgroundFeatures, videoFeatures };\n//# sourceMappingURL=presets.js.map","import { bufferFeature } from \"./features/buffer.js\";\nimport { controlsFeature } from \"./features/controls.js\";\nimport { errorFeature } from \"./features/error.js\";\nimport { fullscreenFeature } from \"./features/fullscreen.js\";\nimport { pipFeature } from \"./features/pip.js\";\nimport { playbackFeature } from \"./features/playback.js\";\nimport { playbackRateFeature } from \"./features/playback-rate.js\";\nimport { sourceFeature } from \"./features/source.js\";\nimport { textTrackFeature } from \"./features/text-track.js\";\nimport { timeFeature } from \"./features/time.js\";\nimport { volumeFeature } from \"./features/volume.js\";\nimport { createSelector } from \"@videojs/store\";\n\n//#region src/dom/store/selectors.ts\n/** Select the buffer state (buffered ranges, percent buffered). */\nconst selectBuffer = createSelector(bufferFeature);\n/** Select the controls state (controls visible, user-active). */\nconst selectControls = createSelector(controlsFeature);\n/** Select the error state (error, dismissed, dismissError). */\nconst selectError = createSelector(errorFeature);\n/** Select the fullscreen state (fullscreen active, availability). */\nconst selectFullscreen = createSelector(fullscreenFeature);\n/** Select the PiP state (picture-in-picture active, availability). */\nconst selectPiP = createSelector(pipFeature);\n/** Select the playback state (paused, ended, play, pause, toggle). */\nconst selectPlayback = createSelector(playbackFeature);\n/** Select the playback rate state (playbackRate, playbackRates, setPlaybackRate). */\nconst selectPlaybackRate = createSelector(playbackRateFeature);\n/** Select the source state (src, type). */\nconst selectSource = createSelector(sourceFeature);\n/** Select the text track state (chapters cues, thumbnail cues). */\nconst selectTextTrack = createSelector(textTrackFeature);\n/** Select the time state (currentTime, duration, seek). */\nconst selectTime = createSelector(timeFeature);\n/** Select the volume state (volume, muted, setVolume, setMuted). */\nconst selectVolume = createSelector(volumeFeature);\n\n//#endregion\nexport { selectBuffer, selectControls, selectError, selectFullscreen, selectPiP, selectPlayback, selectPlaybackRate, selectSource, selectTextTrack, selectTime, selectVolume };\n//# sourceMappingURL=selectors.js.map","import { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/ui/dismiss-layer.ts\nfunction createDismissLayer(options) {\n\tconst { transition } = options;\n\tconst state = transition.state;\n\tconst abort = new AbortController();\n\tlet docAbort = null;\n\tfunction open() {\n\t\tif (abort.signal.aborted) return null;\n\t\tconst { active, status } = state.current;\n\t\tif (active && status !== \"ending\") return null;\n\t\tif (status === \"ending\") transition.cancel();\n\t\treturn transition.open();\n\t}\n\tfunction close(element) {\n\t\tconst { active, status } = state.current;\n\t\tif (abort.signal.aborted || !active || status === \"ending\") return null;\n\t\treturn transition.close(element);\n\t}\n\tfunction setupDocumentListeners() {\n\t\tcleanupDocumentListeners();\n\t\tif (typeof document === \"undefined\") return;\n\t\tdocAbort = new AbortController();\n\t\tconst { signal } = docAbort;\n\t\tlisten(document, \"keydown\", handleKeydown, { signal });\n\t\toptions.onDocumentActive?.(signal);\n\t}\n\tfunction cleanupDocumentListeners() {\n\t\tdocAbort?.abort();\n\t\tdocAbort = null;\n\t}\n\tfunction handleKeydown(event) {\n\t\tif (event.key !== \"Escape\") return;\n\t\tif (!state.current.active) return;\n\t\tif (!(options.closeOnEscape?.() ?? true)) return;\n\t\toptions.onEscapeDismiss(event);\n\t}\n\tconst unsubscribe = state.subscribe(() => {\n\t\tif (state.current.active) setupDocumentListeners();\n\t\telse cleanupDocumentListeners();\n\t});\n\tabort.signal.addEventListener(\"abort\", () => {\n\t\tunsubscribe();\n\t\ttransition.destroy();\n\t\tcleanupDocumentListeners();\n\t});\n\tfunction destroy() {\n\t\tif (abort.signal.aborted) return;\n\t\tabort.abort();\n\t}\n\treturn {\n\t\tinput: state,\n\t\topen,\n\t\tclose,\n\t\tsignal: abort.signal,\n\t\tdestroy\n\t};\n}\n\n//#endregion\nexport { createDismissLayer };\n//# sourceMappingURL=dismiss-layer.js.map","//#region src/dom/ui/button.ts\nfunction createButton(options) {\n\tconst { onActivate, isDisabled } = options;\n\treturn {\n\t\trole: \"button\",\n\t\ttabIndex: 0,\n\t\tonClick(event) {\n\t\t\tif (isDisabled()) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonActivate();\n\t\t},\n\t\tonPointerDown(event) {\n\t\t\tif (isDisabled()) event.preventDefault();\n\t\t},\n\t\tonMouseDown(event) {\n\t\t\tif (isDisabled()) event.preventDefault();\n\t\t},\n\t\tonKeyDown(event) {\n\t\t\tif (event.target !== event.currentTarget) return;\n\t\t\tif (isDisabled()) {\n\t\t\t\tif (event.key !== \"Tab\") event.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (event.key === \"Enter\") {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonActivate();\n\t\t\t} else if (event.key === \" \") event.preventDefault();\n\t\t},\n\t\tonKeyUp(event) {\n\t\t\tif (event.target !== event.currentTarget) return;\n\t\t\tif (isDisabled()) return;\n\t\t\tif (event.key === \" \") onActivate();\n\t\t}\n\t};\n}\n\n//#endregion\nexport { createButton };\n//# sourceMappingURL=button.js.map","import { createDismissLayer } from \"../dismiss-layer.js\";\nimport { listen, tryHidePopover, tryShowPopover } from \"@videojs/utils/dom\";\n\n//#region src/dom/ui/popover/popover.ts\nfunction createPopover(options) {\n\tconst { onOpenChange, closeOnOutsideClick } = options;\n\tlet triggerEl = null;\n\tlet popupEl = null;\n\tlet hoverTimeout = null;\n\tconst capturedPointers = /* @__PURE__ */ new Set();\n\tconst layer = createDismissLayer({\n\t\ttransition: options.transition,\n\t\tcloseOnEscape: options.closeOnEscape,\n\t\tonEscapeDismiss(event) {\n\t\t\tevent.preventDefault();\n\t\t\tapplyClose(\"escape\", event);\n\t\t},\n\t\tonDocumentActive(signal) {\n\t\t\tlisten(document, \"pointerdown\", handleDocumentPointerdown, {\n\t\t\t\tcapture: true,\n\t\t\t\tsignal\n\t\t\t});\n\t\t}\n\t});\n\tconst state = layer.input;\n\tfunction clearHoverTimeout() {\n\t\tif (hoverTimeout !== null) {\n\t\t\tclearTimeout(hoverTimeout);\n\t\t\thoverTimeout = null;\n\t\t}\n\t}\n\tfunction canHover() {\n\t\treturn globalThis.matchMedia?.(\"(hover: hover)\")?.matches ?? false;\n\t}\n\t/**\n\t* The transition handler manages animation lifecycle via `createState`:\n\t*\n\t* **Open:** `transition.open()` patches `{ active: true, status: 'starting' }`.\n\t* After one RAF it patches `{ status: 'idle' }` and the promise resolves.\n\t* Frameworks render `data-starting-style` / `data-ending-style` via\n\t* `getPopupAttrs(state)` — no imperative DOM mutation needed.\n\t*\n\t* **Close:** `transition.close(el)` patches `{ status: 'ending' }` (keeping\n\t* `active: true` so the element stays mounted). After a double-RAF it waits\n\t* for `getAnimations()` to settle, then patches `{ active: false, status: 'idle' }`.\n\t*\n\t* `onOpenChange` fires immediately (before animations).\n\t* `onOpenChangeComplete` fires after animations finish.\n\t*/\n\tfunction applyOpen(reason, event) {\n\t\tconst opening = layer.open();\n\t\tif (!opening) return;\n\t\tonOpenChange(true, event ? {\n\t\t\treason,\n\t\t\tevent\n\t\t} : { reason });\n\t\topening.then(() => {\n\t\t\tif (layer.signal.aborted || !state.current.active) return;\n\t\t\toptions.onOpenChangeComplete?.(true);\n\t\t});\n\t}\n\tfunction applyClose(reason, event) {\n\t\tconst closing = layer.close(popupEl);\n\t\tif (!closing) return;\n\t\tonOpenChange(false, event ? {\n\t\t\treason,\n\t\t\tevent\n\t\t} : { reason });\n\t\tclosing.then(() => {\n\t\t\tif (layer.signal.aborted) return;\n\t\t\ttryHidePopover(popupEl);\n\t\t\toptions.onOpenChangeComplete?.(false);\n\t\t});\n\t}\n\tfunction open(reason = \"click\") {\n\t\tapplyOpen(reason);\n\t}\n\tfunction close(reason = \"click\") {\n\t\tapplyClose(reason);\n\t}\n\tfunction handleDocumentPointerdown(event) {\n\t\tif (!closeOnOutsideClick() || !state.current.active) return;\n\t\tconst path = event.composedPath();\n\t\tif (triggerEl && path.includes(triggerEl) || popupEl && path.includes(popupEl)) return;\n\t\tapplyClose(\"outside-click\", event);\n\t}\n\tlayer.signal.addEventListener(\"abort\", () => {\n\t\tclearHoverTimeout();\n\t\tcapturedPointers.clear();\n\t\ttriggerEl = null;\n\t\tpopupEl = null;\n\t});\n\tconst triggerProps = {\n\t\tonClick(event) {\n\t\t\tif (state.current.active && state.current.status !== \"ending\") applyClose(\"click\", event);\n\t\t\telse applyOpen(\"click\", event);\n\t\t},\n\t\tonPointerEnter(_event) {\n\t\t\tif (!options.openOnHover?.()) return;\n\t\t\tif (!canHover()) return;\n\t\t\tclearHoverTimeout();\n\t\t\tif (state.current.active) return;\n\t\t\tconst delay = options.delay?.() ?? 300;\n\t\t\thoverTimeout = setTimeout(() => applyOpen(\"hover\"), delay);\n\t\t},\n\t\tonPointerLeave(_event) {\n\t\t\tif (!options.openOnHover?.()) return;\n\t\t\tif (!canHover()) return;\n\t\t\tclearHoverTimeout();\n\t\t\tif (!state.current.active) return;\n\t\t\tconst closeDelay = options.closeDelay?.() ?? 0;\n\t\t\thoverTimeout = setTimeout(() => applyClose(\"hover\"), closeDelay);\n\t\t},\n\t\tonFocusIn(_event) {\n\t\t\tif (options.openOnHover?.()) applyOpen(\"focus\");\n\t\t},\n\t\tonFocusOut(event) {\n\t\t\tconst relatedTarget = event.relatedTarget;\n\t\t\tif (relatedTarget && (triggerEl?.contains(relatedTarget) || popupEl?.contains(relatedTarget))) return;\n\t\t\tif (options.openOnHover?.()) applyClose(\"blur\");\n\t\t}\n\t};\n\tconst popupProps = {\n\t\tonPointerEnter(_event) {\n\t\t\tif (!options.openOnHover?.()) return;\n\t\t\tclearHoverTimeout();\n\t\t},\n\t\tonPointerLeave(_event) {\n\t\t\tif (!options.openOnHover?.()) return;\n\t\t\tif (capturedPointers.size > 0) return;\n\t\t\tclearHoverTimeout();\n\t\t\tif (!state.current.active) return;\n\t\t\tconst closeDelay = options.closeDelay?.() ?? 0;\n\t\t\thoverTimeout = setTimeout(() => applyClose(\"hover\"), closeDelay);\n\t\t},\n\t\tonGotPointerCapture(event) {\n\t\t\tcapturedPointers.add(event.pointerId);\n\t\t},\n\t\tonLostPointerCapture(event) {\n\t\t\tcapturedPointers.delete(event.pointerId);\n\t\t},\n\t\tonFocusOut(event) {\n\t\t\tconst relatedTarget = event.relatedTarget;\n\t\t\tif (relatedTarget && (triggerEl?.contains(relatedTarget) || popupEl?.contains(relatedTarget))) return;\n\t\t\tapplyClose(\"blur\");\n\t\t}\n\t};\n\tfunction setTriggerElement(el) {\n\t\ttriggerEl = el;\n\t}\n\tfunction setPopupElement(el) {\n\t\tif (!el && popupEl && state.current.active) tryHidePopover(popupEl);\n\t\tpopupEl = el;\n\t\tif (el) {\n\t\t\tif (state.current.active) tryShowPopover(el);\n\t\t}\n\t}\n\treturn {\n\t\tinput: state,\n\t\ttriggerProps,\n\t\tpopupProps,\n\t\tget triggerElement() {\n\t\t\treturn triggerEl;\n\t\t},\n\t\tsetTriggerElement,\n\t\tsetPopupElement,\n\t\topen,\n\t\tclose,\n\t\tdestroy: layer.destroy\n\t};\n}\n\n//#endregion\nexport { createPopover };\n//# sourceMappingURL=popover.js.map","//#region src/core/ui/popover/popover-css-vars.ts\nconst PopoverCSSVars = {\n\tsideOffset: \"--media-popover-side-offset\",\n\talignOffset: \"--media-popover-align-offset\",\n\tanchorWidth: \"--media-popover-anchor-width\",\n\tanchorHeight: \"--media-popover-anchor-height\",\n\tavailableWidth: \"--media-popover-available-width\",\n\tavailableHeight: \"--media-popover-available-height\"\n};\n\n//#endregion\nexport { PopoverCSSVars };\n//# sourceMappingURL=popover-css-vars.js.map","import { PopoverCSSVars } from \"../../../core/ui/popover/popover-css-vars.js\";\nimport { supportsAnchorPositioning } from \"@videojs/utils/dom\";\n\n//#region src/dom/ui/popover/popover-positioning.ts\nconst OPPOSITE_SIDE = {\n\ttop: \"bottom\",\n\tbottom: \"top\",\n\tleft: \"right\",\n\tright: \"left\"\n};\n/**\n* Get positioning styles for the popup element.\n*\n* When the browser supports CSS Anchor Positioning, returns native CSS properties\n* that reference the provided CSS var names for side/align offsets — no JS offset\n* values needed.\n*\n* When rects are provided and anchor positioning is unsupported, falls back to\n* manual JS-computed positioning. The caller must resolve offset CSS vars via\n* `getComputedStyle` and pass them as `offsets`.\n*\n* Returns camelCase keys for standard CSS properties and `--*` keys for\n* custom properties — compatible with both React's `style` prop and\n* `applyStyles()` from `@videojs/utils/dom`.\n*/\nfunction getAnchorPositionStyle(anchorName, opts, triggerRect, popupRect, boundaryRect, offsets, cssVars = PopoverCSSVars) {\n\tif (supportsAnchorPositioning()) return getAnchorPositionCSS(anchorName, opts, cssVars);\n\tif (triggerRect && popupRect) return {\n\t\t...getManualPositionStyle(triggerRect, popupRect, opts, offsets ?? {\n\t\t\tsideOffset: 0,\n\t\t\talignOffset: 0\n\t\t}),\n\t\t...boundaryRect ? getPositioningCSSVars(triggerRect, boundaryRect, opts.side, cssVars) : {},\n\t\tposition: \"fixed\",\n\t\tinset: \"auto\",\n\t\tmargin: \"0\"\n\t};\n\treturn {};\n}\n/** Generate style to set on the trigger for CSS Anchor Positioning. */\nfunction getAnchorNameStyle(anchorName) {\n\tif (!supportsAnchorPositioning()) return {};\n\treturn { anchorName: `--${anchorName}` };\n}\nfunction getAnchorPositionCSS(anchorName, opts, cssVars = PopoverCSSVars) {\n\tconst SIDE_OFFSET_VAR = `var(${cssVars.sideOffset}, 0px)`;\n\tconst ALIGN_OFFSET_VAR = `var(${cssVars.alignOffset}, 0px)`;\n\tconst { side, align } = opts;\n\tconst style = {\n\t\tpositionAnchor: `--${anchorName}`,\n\t\tposition: \"fixed\",\n\t\tinset: \"auto\",\n\t\tmargin: \"0\",\n\t\tjustifySelf: \"normal\",\n\t\talignSelf: \"normal\",\n\t\tmarginInlineStart: \"0\",\n\t\tmarginBlockStart: \"0\"\n\t};\n\tconst insetProp = OPPOSITE_SIDE[side];\n\tif (side === \"top\" || side === \"bottom\") {\n\t\tstyle[insetProp] = `calc(anchor(${side}) + ${SIDE_OFFSET_VAR})`;\n\t\tif (align === \"start\") style.left = `calc(anchor(left) + ${ALIGN_OFFSET_VAR})`;\n\t\telse if (align === \"end\") style.right = `calc(anchor(right) + ${ALIGN_OFFSET_VAR})`;\n\t\telse {\n\t\t\tstyle.justifySelf = \"anchor-center\";\n\t\t\tstyle.marginInlineStart = ALIGN_OFFSET_VAR;\n\t\t}\n\t} else {\n\t\tstyle[insetProp] = `calc(anchor(${side}) + ${SIDE_OFFSET_VAR})`;\n\t\tif (align === \"start\") style.top = `calc(anchor(top) + ${ALIGN_OFFSET_VAR})`;\n\t\telse if (align === \"end\") style.bottom = `calc(anchor(bottom) + ${ALIGN_OFFSET_VAR})`;\n\t\telse {\n\t\t\tstyle.alignSelf = \"anchor-center\";\n\t\t\tstyle.marginBlockStart = ALIGN_OFFSET_VAR;\n\t\t}\n\t}\n\treturn style;\n}\n/**\n* Compute CSS variables for sizing constraints relative to the anchor/boundary.\n*\n* Accepts a `cssVars` map so the same logic works for both popover\n* (`--media-popover-*`) and tooltip (`--media-tooltip-*`) namespaces.\n*/\nfunction getPositioningCSSVars(triggerRect, boundaryRect, side, cssVars = PopoverCSSVars) {\n\tconst vars = {};\n\tvars[cssVars.anchorWidth] = `${triggerRect.width}px`;\n\tvars[cssVars.anchorHeight] = `${triggerRect.height}px`;\n\tif (side === \"top\" || side === \"bottom\") {\n\t\tvars[cssVars.availableHeight] = side === \"top\" ? `${triggerRect.top - boundaryRect.top}px` : `${boundaryRect.bottom - triggerRect.bottom}px`;\n\t\tvars[cssVars.availableWidth] = `${boundaryRect.width}px`;\n\t} else {\n\t\tvars[cssVars.availableWidth] = side === \"left\" ? `${triggerRect.left - boundaryRect.left}px` : `${boundaryRect.right - triggerRect.right}px`;\n\t\tvars[cssVars.availableHeight] = `${boundaryRect.height}px`;\n\t}\n\treturn vars;\n}\n/** @deprecated Use `getPositioningCSSVars` instead. */\nfunction getPopoverCSSVars(triggerRect, boundaryRect, side) {\n\treturn getPositioningCSSVars(triggerRect, boundaryRect, side, PopoverCSSVars);\n}\n/**\n* Compute manual positioning when CSS Anchor Positioning is not supported.\n*\n* Returns inline `top`/`left` styles in **viewport coordinates** for use\n* with `position: fixed` (the popup is in the top layer). All rects from\n* `getBoundingClientRect()` are already viewport-relative.\n*\n* Offsets are resolved by the caller from CSS custom properties via\n* `getComputedStyle()` and passed as `offsets`.\n*/\nfunction getManualPositionStyle(triggerRect, popupRect, opts, offsets = {\n\tsideOffset: 0,\n\talignOffset: 0\n}) {\n\tconst { side, align } = opts;\n\tconst { sideOffset, alignOffset } = offsets;\n\tlet top = 0;\n\tlet left = 0;\n\tif (side === \"top\") top = triggerRect.top - popupRect.height - sideOffset;\n\telse if (side === \"bottom\") top = triggerRect.bottom + sideOffset;\n\telse if (side === \"left\") left = triggerRect.left - popupRect.width - sideOffset;\n\telse left = triggerRect.right + sideOffset;\n\tif (side === \"top\" || side === \"bottom\") if (align === \"start\") left = triggerRect.left + alignOffset;\n\telse if (align === \"end\") left = triggerRect.right - popupRect.width + alignOffset;\n\telse left = triggerRect.left + (triggerRect.width - popupRect.width) / 2 + alignOffset;\n\telse if (align === \"start\") top = triggerRect.top + alignOffset;\n\telse if (align === \"end\") top = triggerRect.bottom - popupRect.height + alignOffset;\n\telse top = triggerRect.top + (triggerRect.height - popupRect.height) / 2 + alignOffset;\n\treturn {\n\t\ttop: `${top}px`,\n\t\tleft: `${left}px`\n\t};\n}\n/**\n* Read side-offset and align-offset CSS custom properties from the\n* popup element's computed style, returning numeric pixel values.\n*/\nfunction resolveOffsets(el, cssVars = PopoverCSSVars) {\n\tconst computed = getComputedStyle(el);\n\treturn {\n\t\tsideOffset: Number.parseFloat(computed.getPropertyValue(cssVars.sideOffset)) || 0,\n\t\talignOffset: Number.parseFloat(computed.getPropertyValue(cssVars.alignOffset)) || 0\n\t};\n}\n\n//#endregion\nexport { getAnchorNameStyle, getAnchorPositionStyle, getManualPositionStyle, getPopoverCSSVars, getPositioningCSSVars, resolveOffsets };\n//# sourceMappingURL=popover-positioning.js.map","//#region src/number/number.ts\n/** Clamp a value between min and max (inclusive). */\nfunction clamp(value, min, max) {\n\treturn Math.max(min, Math.min(max, value));\n}\n/** Snap a value to the nearest step, offset from min. */\nfunction roundToStep(value, step, min) {\n\tconst nearest = Math.round((value - min) / step) * step + min;\n\tconst dot = `${step}`.indexOf(\".\");\n\treturn dot === -1 ? nearest : Number(nearest.toFixed(`${step}`.length - dot - 1));\n}\n\n//#endregion\nexport { clamp, roundToStep };\n//# sourceMappingURL=number.js.map","import { clamp } from \"@videojs/utils/number\";\n\n//#region src/dom/utils/pointer.ts\n/** Convert a pointer event position to a 0–100 percent along an element's rect. */\nfunction getPercentFromPointerEvent(event, rect, orientation, isRTL) {\n\tlet ratio;\n\tif (orientation === \"vertical\") ratio = 1 - (event.clientY - rect.top) / rect.height;\n\telse if (isRTL) ratio = (rect.right - event.clientX) / rect.width;\n\telse ratio = (event.clientX - rect.left) / rect.width;\n\tif (!Number.isFinite(ratio)) return 0;\n\treturn clamp(ratio * 100, 0, 100);\n}\n\n//#endregion\nexport { getPercentFromPointerEvent };\n//# sourceMappingURL=pointer.js.map","import { getPercentFromPointerEvent } from \"../utils/pointer.js\";\nimport { createState } from \"@videojs/store\";\nimport { isNull } from \"@videojs/utils/predicate\";\nimport { clamp, roundToStep } from \"@videojs/utils/number\";\nimport { throttle } from \"@videojs/utils/function\";\n\n//#region src/dom/ui/slider.ts\n/** Intentional drag threshold — number of pointermove events before drag starts. */\nconst DRAG_THRESHOLD = 2;\nfunction createSlider(options) {\n\tconst input = createState({\n\t\tpointerPercent: 0,\n\t\tdragPercent: 0,\n\t\tdragging: false,\n\t\tpointing: false,\n\t\tfocused: false\n\t});\n\tconst abort = new AbortController();\n\tconst commitThrottleMs = options.commitThrottle ?? 0;\n\tlet isDragging = false, moveCount = 0, cachedRTL = false, cachedRect = null, capturedPointerId = null;\n\tconst throttledCommit = commitThrottleMs > 0 ? throttle((percent) => options.onValueCommit?.(percent), commitThrottleMs) : null;\n\tfunction releaseCapture() {\n\t\tif (isNull(capturedPointerId)) return;\n\t\tconst id = capturedPointerId;\n\t\tcapturedPointerId = null;\n\t\ttry {\n\t\t\toptions.getElement().releasePointerCapture(id);\n\t\t} catch {}\n\t}\n\tfunction endDrag() {\n\t\tif (!isDragging) input.patch({ pointing: false });\n\t\telse {\n\t\t\tisDragging = false;\n\t\t\tinput.patch({\n\t\t\t\tdragging: false,\n\t\t\t\tpointing: false\n\t\t\t});\n\t\t\toptions.onDragEnd?.();\n\t\t}\n\t\tcleanup();\n\t}\n\tfunction cleanup() {\n\t\tthrottledCommit?.cancel();\n\t\tcapturedPointerId = null;\n\t\tcachedRect = null;\n\t}\n\tconst rootProps = {\n\t\tonPointerDown(event) {\n\t\t\tif (options.isDisabled()) return;\n\t\t\tevent.preventDefault();\n\t\t\tconst el = options.getElement();\n\t\t\tcachedRect = el.getBoundingClientRect();\n\t\t\tcachedRTL = options.isRTL();\n\t\t\tmoveCount = 0;\n\t\t\treleaseCapture();\n\t\t\tcapturedPointerId = event.pointerId;\n\t\t\tel.setPointerCapture(event.pointerId);\n\t\t\tconst percent = getPercentFromPointerEvent(event, cachedRect, options.getOrientation(), cachedRTL);\n\t\t\tinput.patch({\n\t\t\t\tpointing: true,\n\t\t\t\tpointerPercent: percent,\n\t\t\t\tdragPercent: percent\n\t\t\t});\n\t\t\toptions.onValueChange?.(percent);\n\t\t\toptions.getThumbElement?.()?.focus();\n\t\t},\n\t\tonPointerMove(event) {\n\t\t\tif (options.isDisabled()) return;\n\t\t\tif (!isNull(capturedPointerId)) {\n\t\t\t\tif (event.pointerType !== \"touch\" && event.buttons === 0) {\n\t\t\t\t\tendDrag();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmoveCount++;\n\t\t\t\tconst percent = getPercentFromPointerEvent(event, cachedRect, options.getOrientation(), cachedRTL);\n\t\t\t\tif (!isDragging && moveCount >= DRAG_THRESHOLD) {\n\t\t\t\t\tisDragging = true;\n\t\t\t\t\tinput.patch({\n\t\t\t\t\t\tdragging: true,\n\t\t\t\t\t\tdragPercent: percent,\n\t\t\t\t\t\tpointerPercent: percent\n\t\t\t\t\t});\n\t\t\t\t\toptions.onDragStart?.();\n\t\t\t\t\toptions.onValueChange?.(percent);\n\t\t\t\t\tthrottledCommit?.(percent);\n\t\t\t\t} else if (isDragging) {\n\t\t\t\t\tinput.patch({\n\t\t\t\t\t\tdragPercent: percent,\n\t\t\t\t\t\tpointerPercent: percent\n\t\t\t\t\t});\n\t\t\t\t\toptions.onValueChange?.(percent);\n\t\t\t\t\tthrottledCommit?.(percent);\n\t\t\t\t} else input.patch({ pointerPercent: percent });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst percent = getPercentFromPointerEvent(event, options.getElement().getBoundingClientRect(), options.getOrientation(), options.isRTL());\n\t\t\tinput.patch({\n\t\t\t\tpointing: true,\n\t\t\t\tpointerPercent: percent\n\t\t\t});\n\t\t},\n\t\tonPointerUp(event) {\n\t\t\tif (isNull(capturedPointerId)) return;\n\t\t\tconst percent = getPercentFromPointerEvent(event, cachedRect, options.getOrientation(), cachedRTL);\n\t\t\tthrottledCommit?.cancel();\n\t\t\toptions.onValueCommit?.(percent);\n\t\t},\n\t\tonPointerLeave() {\n\t\t\tif (!isNull(capturedPointerId)) return;\n\t\t\tinput.patch({ pointing: false });\n\t\t},\n\t\tonLostPointerCapture() {\n\t\t\tendDrag();\n\t\t}\n\t};\n\tconst thumbProps = {\n\t\tonKeyDown(event) {\n\t\t\tif (options.isDisabled()) {\n\t\t\t\tif (event.key !== \"Tab\") event.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst stepPercent = options.getStepPercent();\n\t\t\tconst largeStepPercent = options.getLargeStepPercent();\n\t\t\tconst rounded = roundToStep(options.getPercent(), stepPercent, 0);\n\t\t\tconst horizontalSign = options.isRTL() ? -1 : 1;\n\t\t\tconst step = event.shiftKey ? largeStepPercent : stepPercent;\n\t\t\tlet newPercent = null;\n\t\t\tswitch (event.key) {\n\t\t\t\tcase \"ArrowRight\":\n\t\t\t\t\tnewPercent = rounded + step * horizontalSign;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ArrowLeft\":\n\t\t\t\t\tnewPercent = rounded - step * horizontalSign;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\tnewPercent = rounded + step;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\tnewPercent = rounded - step;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PageUp\":\n\t\t\t\t\tnewPercent = rounded + largeStepPercent;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PageDown\":\n\t\t\t\t\tnewPercent = rounded - largeStepPercent;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Home\":\n\t\t\t\t\tnewPercent = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"End\":\n\t\t\t\t\tnewPercent = 100;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (!event.metaKey && !event.ctrlKey && !event.altKey && event.key >= \"0\" && event.key <= \"9\") newPercent = Number(event.key) * 10;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (newPercent !== null) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tnewPercent = clamp(newPercent, 0, 100);\n\t\t\t\tinput.patch({\n\t\t\t\t\tpointerPercent: newPercent,\n\t\t\t\t\tdragPercent: newPercent\n\t\t\t\t});\n\t\t\t\toptions.onValueChange?.(newPercent);\n\t\t\t\toptions.onValueCommit?.(newPercent);\n\t\t\t}\n\t\t},\n\t\tonFocus() {\n\t\t\tinput.patch({ focused: true });\n\t\t},\n\t\tonBlur() {\n\t\t\tinput.patch({ focused: false });\n\t\t}\n\t};\n\tfunction adjustForAlignment(state) {\n\t\tif (!options.adjustPercent || state.thumbAlignment !== \"edge\") return state;\n\t\tconst rootEl = options.getElement();\n\t\tconst thumbEl = options.getThumbElement?.();\n\t\tif (!thumbEl) return state;\n\t\tconst isHorizontal = state.orientation === \"horizontal\";\n\t\tconst thumbSize = isHorizontal ? thumbEl.offsetWidth : thumbEl.offsetHeight;\n\t\tconst trackSize = isHorizontal ? rootEl.offsetWidth : rootEl.offsetHeight;\n\t\treturn {\n\t\t\t...state,\n\t\t\tfillPercent: options.adjustPercent(state.fillPercent, thumbSize, trackSize),\n\t\t\tpointerPercent: options.adjustPercent(state.pointerPercent, thumbSize, trackSize)\n\t\t};\n\t}\n\tlet resizeObserver = null;\n\tif (options.onResize) {\n\t\tresizeObserver = new ResizeObserver(() => options.onResize());\n\t\tresizeObserver.observe(options.getElement());\n\t}\n\treturn {\n\t\tinput,\n\t\trootProps,\n\t\trootStyle: {\n\t\t\ttouchAction: \"none\",\n\t\t\tuserSelect: \"none\"\n\t\t},\n\t\tthumbProps,\n\t\tadjustForAlignment,\n\t\tdestroy() {\n\t\t\tif (abort.signal.aborted) return;\n\t\t\tabort.abort();\n\t\t\tresizeObserver?.disconnect();\n\t\t\treleaseCapture();\n\t\t\tcleanup();\n\t\t}\n\t};\n}\n\n//#endregion\nexport { createSlider };\n//# sourceMappingURL=slider.js.map","//#region src/core/ui/slider/slider-css-vars.ts\n/** CSS custom property names for slider visual state. */\nconst SliderCSSVars = {\n\tfill: \"--media-slider-fill\",\n\tpointer: \"--media-slider-pointer\",\n\tbuffer: \"--media-slider-buffer\"\n};\n\n//#endregion\nexport { SliderCSSVars };\n//# sourceMappingURL=slider-css-vars.js.map","import { SliderCSSVars } from \"../../core/ui/slider/slider-css-vars.js\";\n\n//#region src/dom/ui/slider-css-vars.ts\nfunction getSliderCSSVars(state) {\n\treturn {\n\t\t[SliderCSSVars.fill]: `${state.fillPercent.toFixed(3)}%`,\n\t\t[SliderCSSVars.pointer]: `${state.pointerPercent.toFixed(3)}%`\n\t};\n}\nfunction getTimeSliderCSSVars(state) {\n\treturn {\n\t\t...getSliderCSSVars(state),\n\t\t[SliderCSSVars.buffer]: `${state.bufferPercent.toFixed(3)}%`\n\t};\n}\n/** Compute structural positioning styles for a slider preview element. */\nfunction getSliderPreviewStyle(width, overflow) {\n\tconst halfWidth = width / 2;\n\treturn {\n\t\tposition: \"absolute\",\n\t\tleft: overflow === \"visible\" ? `calc(var(${SliderCSSVars.pointer}) - ${halfWidth}px)` : `min(max(0px, calc(var(${SliderCSSVars.pointer}) - ${halfWidth}px)), calc(100% - ${width}px))`,\n\t\twidth: \"max-content\",\n\t\tpointerEvents: \"none\"\n\t};\n}\n\n//#endregion\nexport { getSliderCSSVars, getSliderPreviewStyle, getTimeSliderCSSVars };\n//# sourceMappingURL=slider-css-vars.js.map","//#region src/core/ui/thumbnail/thumbnail-core.ts\nvar ThumbnailCore = class {\n\tfindActiveThumbnail(thumbnails, time) {\n\t\tif (thumbnails.length === 0) return void 0;\n\t\tlet low = 0;\n\t\tlet high = thumbnails.length - 1;\n\t\tlet result;\n\t\twhile (low <= high) {\n\t\t\tconst mid = low + high >>> 1;\n\t\t\tconst image = thumbnails[mid];\n\t\t\tif (time >= image.startTime) {\n\t\t\t\tresult = image;\n\t\t\t\tlow = mid + 1;\n\t\t\t} else high = mid - 1;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Parse CSS constraint strings into numeric `ThumbnailConstraints`.\n\t*\n\t* Accepts any object with string `minWidth`/`maxWidth`/`minHeight`/`maxHeight`\n\t* properties — `CSSStyleDeclaration` satisfies this structurally.\n\t*/\n\tparseConstraints(raw) {\n\t\tconst minW = parseFloat(raw.minWidth);\n\t\tconst maxW = parseFloat(raw.maxWidth);\n\t\tconst minH = parseFloat(raw.minHeight);\n\t\tconst maxH = parseFloat(raw.maxHeight);\n\t\treturn {\n\t\t\tminWidth: Number.isFinite(minW) ? minW : 0,\n\t\t\tmaxWidth: Number.isFinite(maxW) ? maxW : Infinity,\n\t\t\tminHeight: Number.isFinite(minH) ? minH : 0,\n\t\t\tmaxHeight: Number.isFinite(maxH) ? maxH : Infinity\n\t\t};\n\t}\n\t/**\n\t* Calculate a uniform scale factor that fits `tileWidth × tileHeight` within the\n\t* given CSS min/max constraints while preserving aspect ratio.\n\t*\n\t* - Scales down when the tile exceeds max constraints.\n\t* - Scales up when the tile is smaller than min constraints.\n\t* - Returns `1` when no scaling is needed.\n\t*/\n\tcalculateScale(tileWidth, tileHeight, constraints) {\n\t\tconst { minWidth, maxWidth, minHeight, maxHeight } = constraints;\n\t\tconst maxRatio = Math.min(maxWidth / tileWidth, maxHeight / tileHeight);\n\t\tconst minRatio = Math.max(minWidth / tileWidth, minHeight / tileHeight);\n\t\tif (Number.isFinite(maxRatio) && maxRatio < 1) return maxRatio;\n\t\tif (Number.isFinite(minRatio) && minRatio > 1) return minRatio;\n\t\treturn 1;\n\t}\n\t/**\n\t* Compute container and image dimensions for the current thumbnail, scaled to\n\t* fit within the element's CSS min/max constraints.\n\t*\n\t* The container clips the sprite sheet via `overflow: hidden`, and the image is\n\t* positioned with `transform: translate()` to show the correct tile.\n\t*/\n\tresize(thumbnail, imgNaturalWidth, imgNaturalHeight, constraints) {\n\t\tconst tileWidth = thumbnail.width ?? imgNaturalWidth;\n\t\tconst tileHeight = thumbnail.height ?? imgNaturalHeight;\n\t\tif (!tileWidth || !tileHeight) return void 0;\n\t\tconst scale = this.calculateScale(tileWidth, tileHeight, constraints);\n\t\treturn {\n\t\t\tscale,\n\t\t\tcontainerWidth: tileWidth * scale,\n\t\t\tcontainerHeight: tileHeight * scale,\n\t\t\timageWidth: imgNaturalWidth * scale,\n\t\t\timageHeight: imgNaturalHeight * scale,\n\t\t\toffsetX: (thumbnail.coords?.x ?? 0) * scale,\n\t\t\toffsetY: (thumbnail.coords?.y ?? 0) * scale\n\t\t};\n\t}\n\tgetState(loading, error, thumbnail) {\n\t\treturn {\n\t\t\tloading,\n\t\t\terror,\n\t\t\thidden: !loading && !thumbnail\n\t\t};\n\t}\n\tgetAttrs(_state) {\n\t\treturn {\n\t\t\trole: \"img\",\n\t\t\t\"aria-hidden\": \"true\"\n\t\t};\n\t}\n};\n\n//#endregion\nexport { ThumbnailCore };\n//# sourceMappingURL=thumbnail-core.js.map","import { ThumbnailCore } from \"../../core/ui/thumbnail/thumbnail-core.js\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/ui/thumbnail.ts\nfunction createThumbnail(options) {\n\tconst { getContainer, getImg, onStateChange } = options;\n\tconst core = new ThumbnailCore();\n\tconst abort = new AbortController();\n\tconst signal = abort.signal;\n\tlet loading = false;\n\tlet error = false;\n\tlet naturalWidth = 0;\n\tlet naturalHeight = 0;\n\tlet lastSrc = \"\";\n\tlet imgBound = false;\n\tlet resizeObserver = null;\n\tfunction onImgLoad() {\n\t\tconst img = getImg();\n\t\tif (img) {\n\t\t\tnaturalWidth = img.naturalWidth;\n\t\t\tnaturalHeight = img.naturalHeight;\n\t\t}\n\t\tloading = false;\n\t\terror = false;\n\t\tonStateChange();\n\t}\n\tfunction onImgError() {\n\t\tloading = false;\n\t\terror = true;\n\t\tonStateChange();\n\t}\n\tfunction bindImg(img) {\n\t\tlisten(img, \"load\", onImgLoad, { signal });\n\t\tlisten(img, \"error\", onImgError, { signal });\n\t}\n\tfunction ensureBindings() {\n\t\tif (!imgBound) {\n\t\t\tconst img = getImg();\n\t\t\tif (img) {\n\t\t\t\tbindImg(img);\n\t\t\t\timgBound = true;\n\t\t\t}\n\t\t}\n\t\tif (!resizeObserver) {\n\t\t\tconst container = getContainer();\n\t\t\tif (container) {\n\t\t\t\tresizeObserver = new ResizeObserver(onStateChange);\n\t\t\t\tresizeObserver.observe(container);\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateSrc(url) {\n\t\tensureBindings();\n\t\tconst src = url ?? \"\";\n\t\tif (src === lastSrc) return;\n\t\tlastSrc = src;\n\t\tif (src) {\n\t\t\tloading = true;\n\t\t\terror = false;\n\t\t} else {\n\t\t\tloading = false;\n\t\t\terror = false;\n\t\t\tnaturalWidth = 0;\n\t\t\tnaturalHeight = 0;\n\t\t}\n\t}\n\tfunction connect() {\n\t\tensureBindings();\n\t\tconst img = getImg();\n\t\tif (img?.complete && img.naturalWidth > 0 && lastSrc) {\n\t\t\tnaturalWidth = img.naturalWidth;\n\t\t\tnaturalHeight = img.naturalHeight;\n\t\t\tloading = false;\n\t\t\terror = false;\n\t\t\tonStateChange();\n\t\t}\n\t}\n\tfunction destroy() {\n\t\tabort.abort();\n\t\tresizeObserver?.disconnect();\n\t\tresizeObserver = null;\n\t}\n\treturn {\n\t\tget loading() {\n\t\t\treturn loading;\n\t\t},\n\t\tget error() {\n\t\t\treturn error;\n\t\t},\n\t\tget naturalWidth() {\n\t\t\treturn naturalWidth;\n\t\t},\n\t\tget naturalHeight() {\n\t\t\treturn naturalHeight;\n\t\t},\n\t\treadConstraints() {\n\t\t\tconst el = getContainer();\n\t\t\tif (!el) return {\n\t\t\t\tminWidth: 0,\n\t\t\t\tmaxWidth: Infinity,\n\t\t\t\tminHeight: 0,\n\t\t\t\tmaxHeight: Infinity\n\t\t\t};\n\t\t\treturn core.parseConstraints(getComputedStyle(el));\n\t\t},\n\t\tupdateSrc,\n\t\tconnect,\n\t\tdestroy\n\t};\n}\n\n//#endregion\nexport { createThumbnail };\n//# sourceMappingURL=thumbnail.js.map","import { createPopover } from \"../popover/popover.js\";\n\n//#region src/dom/ui/tooltip/tooltip.ts\n/** Map popover reasons to tooltip reasons, filtering out click/outside-click. */\nconst REASON_MAP = {\n\thover: \"hover\",\n\tfocus: \"focus\",\n\tescape: \"escape\",\n\tblur: \"blur\"\n};\nfunction createTooltip(options) {\n\tconst popoverOpts = {\n\t\ttransition: options.transition,\n\t\tonOpenChange(open, details) {\n\t\t\tconst reason = REASON_MAP[details.reason];\n\t\t\tif (!reason) return;\n\t\t\tconst group = options.group?.();\n\t\t\tif (open) group?.notifyOpen();\n\t\t\telse group?.notifyClose();\n\t\t\tconst tooltipDetails = details.event ? {\n\t\t\t\treason,\n\t\t\t\tevent: details.event\n\t\t\t} : { reason };\n\t\t\toptions.onOpenChange(open, tooltipDetails);\n\t\t},\n\t\tcloseOnEscape: () => true,\n\t\tcloseOnOutsideClick: () => false,\n\t\topenOnHover: () => true,\n\t\tdelay: () => {\n\t\t\tconst group = options.group?.();\n\t\t\tif (group?.shouldSkipDelay()) return 0;\n\t\t\treturn options.delay?.() ?? group?.delay ?? 600;\n\t\t},\n\t\tcloseDelay: () => {\n\t\t\tconst group = options.group?.();\n\t\t\treturn options.closeDelay?.() ?? group?.closeDelay ?? 0;\n\t\t}\n\t};\n\tif (options.onOpenChangeComplete) popoverOpts.onOpenChangeComplete = options.onOpenChangeComplete;\n\tconst popover = createPopover(popoverOpts);\n\tconst { onClick: _, ...baseTriggerProps } = popover.triggerProps;\n\tconst triggerProps = {\n\t\t...baseTriggerProps,\n\t\tonPointerEnter(event) {\n\t\t\tif (options.disabled?.()) return;\n\t\t\tbaseTriggerProps.onPointerEnter(event);\n\t\t},\n\t\tonFocusIn(event) {\n\t\t\tif (options.disabled?.()) return;\n\t\t\tbaseTriggerProps.onFocusIn(event);\n\t\t}\n\t};\n\tconst popupProps = {\n\t\t...popover.popupProps,\n\t\tonPointerEnter(event) {\n\t\t\tif (options.disableHoverablePopup?.()) return;\n\t\t\tpopover.popupProps.onPointerEnter(event);\n\t\t}\n\t};\n\treturn {\n\t\t...popover,\n\t\ttriggerProps,\n\t\tpopupProps,\n\t\tget triggerElement() {\n\t\t\treturn popover.triggerElement;\n\t\t},\n\t\topen: () => popover.open(\"hover\"),\n\t\tclose: () => popover.close(\"hover\")\n\t};\n}\n\n//#endregion\nexport { createTooltip };\n//# sourceMappingURL=tooltip.js.map","import { createState } from \"@videojs/store\";\nimport { noop } from \"@videojs/utils/function\";\n\n//#region src/dom/ui/transition.ts\n/**\n* Manages open/close transition lifecycle via `createState`.\n*\n* **Open:** patches `{ active: true, status: 'starting' }`, then after a\n* double-RAF patches `{ status: 'idle' }` so the browser paints the\n* initial (\"from\") state before transitioning.\n*\n* **Close:** patches `{ status: 'ending' }` (keeping `active: true` so the\n* element stays mounted), then after a double-RAF waits for\n* `getAnimations()` to settle before patching `{ active: false, status: 'idle' }`.\n*/\nfunction createTransition() {\n\tconst state = createState({\n\t\tactive: false,\n\t\tstatus: \"idle\"\n\t});\n\tlet destroyed = false;\n\tlet rafId1 = 0;\n\tlet rafId2 = 0;\n\tfunction open() {\n\t\tcancelAnimationFrame(rafId1);\n\t\tcancelAnimationFrame(rafId2);\n\t\trafId1 = 0;\n\t\trafId2 = 0;\n\t\tstate.patch({\n\t\t\tactive: true,\n\t\t\tstatus: \"starting\"\n\t\t});\n\t\treturn new Promise((resolve) => {\n\t\t\trafId1 = requestAnimationFrame(() => {\n\t\t\t\trafId1 = 0;\n\t\t\t\trafId2 = requestAnimationFrame(() => {\n\t\t\t\t\trafId2 = 0;\n\t\t\t\t\tif (destroyed || !state.current.active) return resolve();\n\t\t\t\t\tstate.patch({ status: \"idle\" });\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\tfunction close(el) {\n\t\tcancelAnimationFrame(rafId1);\n\t\tcancelAnimationFrame(rafId2);\n\t\trafId1 = 0;\n\t\trafId2 = 0;\n\t\tstate.patch({ status: \"ending\" });\n\t\treturn new Promise((resolve) => {\n\t\t\trafId1 = requestAnimationFrame(() => {\n\t\t\t\trafId1 = 0;\n\t\t\t\trafId2 = requestAnimationFrame(() => {\n\t\t\t\t\trafId2 = 0;\n\t\t\t\t\tif (destroyed) return resolve();\n\t\t\t\t\twaitForAnimations(el).finally(() => {\n\t\t\t\t\t\tif (destroyed || state.current.status !== \"ending\") return resolve();\n\t\t\t\t\t\tstate.patch({\n\t\t\t\t\t\t\tactive: false,\n\t\t\t\t\t\t\tstatus: \"idle\"\n\t\t\t\t\t\t});\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\tfunction cancel() {\n\t\tcancelAnimationFrame(rafId1);\n\t\tcancelAnimationFrame(rafId2);\n\t\trafId1 = 0;\n\t\trafId2 = 0;\n\t\tif (state.current.status !== \"idle\") state.patch({ status: \"idle\" });\n\t}\n\treturn {\n\t\tstate,\n\t\topen,\n\t\tclose,\n\t\tcancel,\n\t\tdestroy() {\n\t\t\tif (destroyed) return;\n\t\t\tdestroyed = true;\n\t\t\tcancel();\n\t\t}\n\t};\n}\nfunction waitForAnimations(el) {\n\tif (!el) return Promise.resolve();\n\tconst animations = el.getAnimations?.() ?? [];\n\tif (animations.length === 0) return Promise.resolve();\n\treturn Promise.all(animations.map((a) => a.finished)).then(noop, noop);\n}\n\n//#endregion\nexport { createTransition };\n//# sourceMappingURL=transition.js.map","import { isFunction, isUndefined } from \"@videojs/utils/predicate\";\nimport { listen } from \"@videojs/utils/dom\";\n\n//#region src/dom/utils/element-props.ts\n/**\n* Apply props to a DOM element.\n*\n* Handles both attributes and event listeners:\n* - Event props (onClick, onKeyDown, etc.) are attached as listeners\n* - Boolean props: `true` sets empty attribute, `false` removes\n* - `undefined` removes the attribute\n* - Other props are set as string attributes\n*/\nfunction applyElementProps(element, props, options) {\n\tconst signal = options?.signal;\n\tfor (const [key, value] of Object.entries(props)) if (isFunction(value) && key.startsWith(\"on\")) listen(element, key.slice(2).toLowerCase(), value, signal ? { signal } : void 0);\n\telse if (isUndefined(value) || value === false) element.removeAttribute(key);\n\telse if (value === true) element.setAttribute(key, \"\");\n\telse element.setAttribute(key, String(value));\n}\n\n//#endregion\nexport { applyElementProps };\n//# sourceMappingURL=element-props.js.map","//#region src/dom/utils/log.ts\nconst warned = /* @__PURE__ */ new Set();\nfunction logMissingFeature(displayName, featureName) {\n\tconst key = `${displayName}:${featureName}`;\n\tif (warned.has(key)) return;\n\twarned.add(key);\n\tconsole.warn(`${displayName} requires ${featureName} feature`);\n}\n\n//#endregion\nexport { logMissingFeature };\n//# sourceMappingURL=log.js.map","//#region src/dom/utils/state-data-attrs.ts\n/**\n* Convert state object to data attributes.\n*\n* - `true` → `data-keyname=\"\"`\n* - truthy string/number → `data-keyname=\"value\"`\n* - falsy → no attribute\n*\n* @example\n* ```ts\n* const state = { paused: true, ended: false, volume: 0.5 };\n* getStateDataAttrs(state);\n* // { 'data-paused': '', 'data-volume': '0.5' }\n* ```\n*\n* When a mapping is provided, only mapped keys are converted.\n*/\nfunction getStateDataAttrs(state, map) {\n\tconst attrs = {};\n\tfor (const key in state) {\n\t\tif (map && !(key in map)) continue;\n\t\tconst name = map?.[key] ?? toDataAttrName(key), value = state[key];\n\t\tif (value === true) attrs[name] = \"\";\n\t\telse if (value) attrs[name] = String(value);\n\t}\n\treturn attrs;\n}\n/**\n* Apply state as data attributes to an element.\n*\n* - `true` → sets `data-keyname=\"\"`\n* - truthy string/number → sets `data-keyname=\"value\"`\n* - falsy → removes the attribute\n*\n* @example\n* ```ts\n* const state = { paused: true, ended: false };\n* applyStateDataAttrs(element, state);\n* // element has data-paused=\"\", data-ended is removed\n* ```\n*/\nfunction applyStateDataAttrs(element, state, map) {\n\tfor (const key in state) {\n\t\tif (map && !(key in map)) continue;\n\t\tconst name = map?.[key] ?? toDataAttrName(key), value = state[key];\n\t\tif (value === true) element.setAttribute(name, \"\");\n\t\telse if (value) element.setAttribute(name, String(value));\n\t\telse element.removeAttribute(name);\n\t}\n}\nfunction toDataAttrName(key) {\n\treturn `data-${key.toLowerCase()}`;\n}\n\n//#endregion\nexport { applyStateDataAttrs, getStateDataAttrs };\n//# sourceMappingURL=state-data-attrs.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * An event fired by a context requester to signal it desires a specified context with the given key.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * method to the callback which consumers can invoke to indicate they no longer wish to receive these updates.\n *\n * If no `subscribe` value is present in the event, then the provider can assume that this is a 'one time'\n * request for the context and can therefore not track the consumer.\n */\nexport class ContextRequestEvent extends Event {\n /**\n *\n * @param context the context key to request\n * @param contextTarget the original context target of the requester\n * @param callback the callback that should be invoked when the context with the specified key is available\n * @param subscribe when, true indicates we want to subscribe to future updates\n */\n constructor(context, contextTarget, callback, subscribe) {\n super('context-request', { bubbles: true, composed: true });\n this.context = context;\n this.contextTarget = contextTarget;\n this.callback = callback;\n this.subscribe = subscribe ?? false;\n }\n}\n//# sourceMappingURL=context-request-event.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * Creates a typed Context.\n *\n * Contexts are compared with strict equality.\n *\n * If you want two separate `createContext()` calls to referer to the same\n * context, then use a key that will by equal under strict equality like a\n * string for `Symbol.for()`:\n *\n * ```ts\n * // true\n * createContext('my-context') === createContext('my-context')\n * // true\n * createContext(Symbol.for('my-context')) === createContext(Symbol.for('my-context'))\n * ```\n *\n * If you want a context to be unique so that it's guaranteed to not collide\n * with other contexts, use a key that's unique under strict equality, like\n * a `Symbol()` or object.:\n *\n * ```\n * // false\n * createContext({}) === createContext({})\n * // false\n * createContext(Symbol('my-context')) === createContext(Symbol('my-context'))\n * ```\n *\n * @param key a context key value\n * @template ValueType the type of value that can be provided by this context.\n * @returns the context key value cast to `Context<K, ValueType>`\n */\nexport function createContext(key) {\n return key;\n}\n//# sourceMappingURL=create-context.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { ContextRequestEvent, } from '../context-request-event.js';\n/**\n * A ReactiveController which adds context consuming behavior to a custom\n * element by dispatching `context-request` events.\n *\n * When the host element is connected to the document it will emit a\n * `context-request` event with its context key. When the context request\n * is satisfied the controller will invoke the callback, if present, and\n * trigger a host update so it can respond to the new value.\n *\n * It will also call the dispose method given by the provider when the\n * host element is disconnected.\n */\nexport class ContextConsumer {\n constructor(host, contextOrOptions, callback, subscribe) {\n this.subscribe = false;\n this.provided = false;\n this.value = undefined;\n // This function must have stable identity to properly dedupe in ContextRoot\n // if this element connects multiple times.\n this._callback = (value, unsubscribe) => {\n // some providers will pass an unsubscribe function indicating they may provide future values\n if (this.unsubscribe) {\n // if the unsubscribe function changes this implies we have changed provider\n if (this.unsubscribe !== unsubscribe) {\n // cleanup the old provider\n this.provided = false;\n this.unsubscribe();\n }\n // if we don't support subscription, immediately unsubscribe\n if (!this.subscribe) {\n this.unsubscribe();\n }\n }\n // store the value so that it can be retrieved from the controller\n this.value = value;\n // schedule an update in case this value is used in a template\n this.host.requestUpdate();\n // only invoke callback if we are either expecting updates or have not yet\n // been provided a value\n if (!this.provided || this.subscribe) {\n this.provided = true;\n if (this.callback) {\n this.callback(value, unsubscribe);\n }\n }\n this.unsubscribe = unsubscribe;\n };\n this.host = host;\n // This is a potentially fragile duck-type. It means a context object can't\n // have a property name context and be used in positional argument form.\n if (contextOrOptions.context !== undefined) {\n const options = contextOrOptions;\n this.context = options.context;\n this.callback = options.callback;\n this.subscribe = options.subscribe ?? false;\n }\n else {\n this.context = contextOrOptions;\n this.callback = callback;\n this.subscribe = subscribe ?? false;\n }\n this.host.addController(this);\n }\n hostConnected() {\n this.dispatchRequest();\n }\n hostDisconnected() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = undefined;\n }\n }\n dispatchRequest() {\n this.host.dispatchEvent(new ContextRequestEvent(this.context, this.host, this._callback, this.subscribe));\n }\n}\n//# sourceMappingURL=context-consumer.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * A simple class which stores a value, and triggers registered callbacks when\n * the value is changed via its setter.\n *\n * An implementor might use other observable patterns such as MobX or Redux to\n * get behavior like this. But this is a pretty minimal approach that will\n * likely work for a number of use cases.\n */\nexport class ValueNotifier {\n get value() {\n return this._value;\n }\n set value(v) {\n this.setValue(v);\n }\n setValue(v, force = false) {\n const update = force || !Object.is(v, this._value);\n this._value = v;\n if (update) {\n this.updateObservers();\n }\n }\n constructor(defaultValue) {\n this.subscriptions = new Map();\n this.updateObservers = () => {\n for (const [callback, { disposer }] of this.subscriptions) {\n callback(this._value, disposer);\n }\n };\n if (defaultValue !== undefined) {\n this.value = defaultValue;\n }\n }\n addCallback(callback, consumerHost, subscribe) {\n if (!subscribe) {\n // just call the callback once and we're done\n callback(this.value);\n return;\n }\n if (!this.subscriptions.has(callback)) {\n this.subscriptions.set(callback, {\n disposer: () => {\n this.subscriptions.delete(callback);\n },\n consumerHost,\n });\n }\n const { disposer } = this.subscriptions.get(callback);\n callback(this.value, disposer);\n }\n clearCallbacks() {\n this.subscriptions.clear();\n }\n}\n//# sourceMappingURL=value-notifier.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { ContextRequestEvent } from '../context-request-event.js';\nimport { ValueNotifier } from '../value-notifier.js';\nexport class ContextProviderEvent extends Event {\n /**\n *\n * @param context the context which this provider can provide\n * @param contextTarget the original context target of the provider\n */\n constructor(context, contextTarget) {\n super('context-provider', { bubbles: true, composed: true });\n this.context = context;\n this.contextTarget = contextTarget;\n }\n}\n/**\n * A ReactiveController which adds context provider behavior to a\n * custom element.\n *\n * This controller simply listens to the `context-request` event when\n * the host is connected to the DOM and registers the received callbacks\n * against its observable Context implementation.\n *\n * The controller may also be attached to any HTML element in which case it's\n * up to the user to call hostConnected() when attached to the DOM. This is\n * done automatically for any custom elements implementing\n * ReactiveControllerHost.\n */\nexport class ContextProvider extends ValueNotifier {\n constructor(host, contextOrOptions, initialValue) {\n super(contextOrOptions.context !== undefined\n ? contextOrOptions.initialValue\n : initialValue);\n this.onContextRequest = (ev) => {\n // Only call the callback if the context matches.\n if (ev.context !== this.context) {\n return;\n }\n // Also, in case an element is a consumer AND a provider\n // of the same context, we want to avoid the element to self-register.\n const consumerHost = ev.contextTarget ?? ev.composedPath()[0];\n if (consumerHost === this.host) {\n return;\n }\n ev.stopPropagation();\n this.addCallback(ev.callback, consumerHost, ev.subscribe);\n };\n /**\n * When we get a provider request event, that means a child of this element\n * has just woken up. If it's a provider of our context, then we may need to\n * re-parent our subscriptions, because is a more specific provider than us\n * for its subtree.\n */\n this.onProviderRequest = (ev) => {\n // Ignore events when the context doesn't match.\n if (ev.context !== this.context) {\n return;\n }\n // Also, in case an element is a consumer AND a provider\n // of the same context it shouldn't provide to itself.\n const childProviderHost = ev.contextTarget ?? ev.composedPath()[0];\n if (childProviderHost === this.host) {\n return;\n }\n // Re-parent all of our subscriptions in case this new child provider\n // should take them over.\n const seen = new Set();\n for (const [callback, { consumerHost }] of this.subscriptions) {\n // Prevent infinite loops in the case where a one host element\n // is providing the same context multiple times.\n //\n // While normally it's a no-op to attempt to re-parent a subscription\n // that already has its proper parent, in the case where there's more\n // than one ValueProvider for the same context on the same hostElement,\n // they will each call the consumer, and since they will each have their\n // own dispose function, a well behaved consumer will notice the change\n // in dispose function and call their old one.\n //\n // This will cause the subscriptions to thrash, but worse, without this\n // set check here, we can end up in an infinite loop, as we add and remove\n // the same subscriptions onto the end of the map over and over.\n if (seen.has(callback)) {\n continue;\n }\n seen.add(callback);\n consumerHost.dispatchEvent(new ContextRequestEvent(this.context, consumerHost, callback, true));\n }\n ev.stopPropagation();\n };\n this.host = host;\n if (contextOrOptions.context !== undefined) {\n this.context = contextOrOptions.context;\n }\n else {\n this.context = contextOrOptions;\n }\n this.attachListeners();\n this.host.addController?.(this);\n }\n attachListeners() {\n this.host.addEventListener('context-request', this.onContextRequest);\n this.host.addEventListener('context-provider', this.onProviderRequest);\n }\n hostConnected() {\n // emit an event to signal a provider is available for this context\n this.host.dispatchEvent(new ContextProviderEvent(this.context, this.host));\n }\n}\n//# sourceMappingURL=context-provider.js.map","import type { AnyPlayerStore, PlayerStore } from '@videojs/core/dom';\nimport { type Context, createContext } from '@videojs/element/context';\n\nexport const PLAYER_CONTEXT_KEY = Symbol('@videojs/player');\n\nexport type PlayerContextValue<Store extends PlayerStore = AnyPlayerStore> = Store;\n\nexport type PlayerContext<Store extends PlayerStore = AnyPlayerStore> = Context<\n typeof PLAYER_CONTEXT_KEY,\n PlayerContextValue<Store>\n>;\n\n/**\n * The default player context instance for consuming the player store in controllers.\n *\n * @public\n */\nexport const playerContext = createContext<PlayerContextValue, typeof PLAYER_CONTEXT_KEY>(PLAYER_CONTEXT_KEY);\n","import type { MediaContainer, PlayerStore, PlayerTarget } from '@videojs/core/dom';\nimport { ContextConsumer } from '@videojs/element/context';\nimport { noop } from '@videojs/utils/function';\nimport type { MediaElementConstructor } from '@/ui/media-element';\nimport type { PlayerContext } from '../player/context';\nimport type { PlayerConsumer, PlayerConsumerConstructor } from './types';\n\nexport type ContainerMixin<Store extends PlayerStore> = <Class extends MediaElementConstructor>(\n BaseClass: Class\n) => Class & PlayerConsumerConstructor<Store>;\n\n/**\n * Create a mixin that consumes player context and auto-attaches media elements.\n *\n * @param context - Player context to consume from an ancestor provider.\n */\nexport function createContainerMixin<Store extends PlayerStore>(context: PlayerContext<Store>): ContainerMixin<Store> {\n return <Class extends MediaElementConstructor>(BaseClass: Class) => {\n class PlayerContainerElement extends BaseClass implements PlayerConsumer<Store>, MediaContainer {\n #detach = noop;\n #observer: MutationObserver | null = null;\n #contextStore: Store | null = null;\n\n constructor(...args: any[]) {\n super(...args);\n\n // Created in the constructor body (after all field initializers) so\n // that #contextStore's private slot exists if the callback fires\n // synchronously — which happens when the element is already connected.\n // The host's controller list keeps the consumer alive; no field needed.\n new ContextConsumer(this, {\n context,\n callback: (value) => {\n this.#contextStore = value ?? null;\n this.#attachMedia();\n },\n subscribe: true,\n });\n }\n\n get store(): Store | null {\n return this.#contextStore;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n\n this.#observer = new MutationObserver((records) => {\n if (records.some(hasMediaNode)) this.#attachMedia();\n });\n\n this.#observer.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['data-media-element'],\n });\n\n // Slotted media elements don't appear in the container's subtree,\n // so listen for slot reassignments to pick them up.\n this.addEventListener('slotchange', this.#onSlotChange);\n\n this.#attachMedia();\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.#observer?.disconnect();\n this.#observer = null;\n this.removeEventListener('slotchange', this.#onSlotChange);\n this.#detach();\n }\n\n #onSlotChange = () => {\n this.#attachMedia();\n };\n\n #getSlottedMedia(): HTMLMediaElement | null {\n const slot = this.querySelector<HTMLSlotElement>('slot[name=\"media\"]');\n if (!slot) return null;\n\n for (const el of slot.assignedElements({ flatten: true })) {\n if (el instanceof HTMLMediaElement) return el;\n }\n\n return null;\n }\n\n #attachMedia() {\n // Prefer the cached context value; fall back to `this.store` which\n // ProviderMixin overrides when both mixins are applied to one element.\n const store = this.#contextStore ?? this.store;\n if (!store) return;\n\n const media =\n this.querySelector<HTMLMediaElement>('video, audio, [data-media-element]') ?? this.#getSlottedMedia();\n\n if (!media) {\n this.#detach();\n this.#detach = noop;\n return;\n }\n\n const target: PlayerTarget = {\n media,\n container: this,\n };\n\n const hasMediaChanged = store.target?.media !== target.media,\n hasContainerChanged = store.target?.container !== target.container;\n\n if (hasMediaChanged || hasContainerChanged) {\n this.#detach();\n this.#detach = store.attach(target);\n }\n }\n }\n\n return PlayerContainerElement;\n };\n}\n\nfunction isMediaNode(node: Node): boolean {\n return node instanceof HTMLMediaElement || (node instanceof Element && node.hasAttribute('data-media-element'));\n}\n\nfunction hasMediaNode(record: MutationRecord): boolean {\n // Attribute mutation: data-media-element was added to a descendant\n if (record.type === 'attributes' && record.target instanceof Element) {\n return record.target.hasAttribute('data-media-element');\n }\n\n for (const node of record.addedNodes) {\n if (isMediaNode(node)) return true;\n }\n\n for (const node of record.removedNodes) {\n if (isMediaNode(node)) return true;\n }\n\n return false;\n}\n","//#region src/destroy-mixin.ts\n/**\n* Mixin that adds a deferred destruction lifecycle to a `ReactiveElement`.\n*\n* On disconnect, schedules destruction after two animation frames.\n* If the element reconnects before the frames fire (e.g. DOM shuffling,\n* framework reconciliation), the `isConnected` check prevents destruction.\n*\n* The `keep-alive` attribute prevents automatic destruction entirely —\n* call `destroy()` manually when done.\n*\n* Subclasses override `destroyCallback()` (calling `super.destroyCallback()`)\n* to release heavy resources like stores or imperative APIs.\n*\n* Mirrors `addController`/`removeController` to track controllers\n* (needed because `ReactiveElement.#controllers` is hard-private),\n* calls `hostDestroyed()` on all tracked controllers in `destroyCallback`,\n* and guards `performUpdate()` so no updates run after destruction.\n*/\nfunction DestroyMixin(SuperClass) {\n\tclass DestroyableElement extends SuperClass {\n\t\t#destroyed = false;\n\t\t#trackedControllers = /* @__PURE__ */ new Set();\n\t\tget destroyed() {\n\t\t\treturn this.#destroyed;\n\t\t}\n\t\tdestroy() {\n\t\t\tif (this.#destroyed) return;\n\t\t\tthis.#destroyed = true;\n\t\t\tthis.destroyCallback();\n\t\t}\n\t\tdestroyCallback() {\n\t\t\tfor (const c of this.#trackedControllers) c.hostDestroyed?.();\n\t\t}\n\t\taddController(controller) {\n\t\t\tsuper.addController(controller);\n\t\t\tthis.#trackedControllers.add(controller);\n\t\t}\n\t\tremoveController(controller) {\n\t\t\tsuper.removeController(controller);\n\t\t\tthis.#trackedControllers.delete(controller);\n\t\t}\n\t\tconnectedCallback() {\n\t\t\tif (this.#destroyed) return;\n\t\t\tsuper.connectedCallback();\n\t\t}\n\t\tdisconnectedCallback() {\n\t\t\tsuper.disconnectedCallback();\n\t\t\tif (!this.#destroyed && !this.hasAttribute(\"keep-alive\")) requestAnimationFrame(() => {\n\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\tif (!this.isConnected) this.destroy();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\tperformUpdate() {\n\t\t\tif (this.#destroyed) return;\n\t\t\tsuper.performUpdate();\n\t\t}\n\t}\n\treturn DestroyableElement;\n}\n\n//#endregion\nexport { DestroyMixin };\n//# sourceMappingURL=destroy-mixin.js.map","//#region src/reactive-element.ts\nconst cache = /* @__PURE__ */ new WeakMap();\nconst propertyKeys = /* @__PURE__ */ new Map();\n/**\n* Lightweight reactive custom element base class.\n*\n* Drop-in subset of Lit's `ReactiveElement` — supports `static properties`,\n* attribute reflection, batched async updates, and reactive controllers.\n* No Shadow DOM, no `static styles`, no decorators.\n*\n* Updates are batched using the same Promise-based scheduling as Lit:\n* property changes enqueue a microtask, and the update is gated behind\n* `connectedCallback` so the first update only runs once the element\n* is in the document.\n*\n* Subclasses that extend another element with properties must spread them:\n*\n* @example\n* ```ts\n* class MyButton extends ReactiveElement {\n* static override properties = {\n* label: { type: String },\n* disabled: { type: Boolean },\n* };\n*\n* label = 'Click me';\n* disabled = false;\n*\n* protected override update(changed: PropertyValues): void {\n* super.update(changed);\n* this.textContent = this.label;\n* }\n* }\n*\n* // Inheritance — spread parent properties\n* class FancyButton extends MyButton {\n* static override properties = {\n* ...MyButton.properties,\n* variant: { type: String },\n* };\n*\n* variant = 'primary';\n* }\n* ```\n*/\nvar ReactiveElement = class extends HTMLElement {\n\tstatic {\n\t\tthis.properties = {};\n\t}\n\t/**\n\t* Returns a list of attributes corresponding to the registered properties.\n\t*/\n\tstatic get observedAttributes() {\n\t\treturn [...resolve(this).attrToProp.keys()];\n\t}\n\t#controllers = /* @__PURE__ */ new Set();\n\t#changedProperties = /* @__PURE__ */ new Map();\n\t#instanceProperties;\n\t/**\n\t* Promise that gates the first update until `connectedCallback`. Also\n\t* used to serialize updates — each `#enqueueUpdate` awaits the previous\n\t* `#updatePromise`, so property changes are batched and updates never\n\t* overlap. Matches Lit's scheduling model.\n\t*/\n\t#updatePromise;\n\tconstructor() {\n\t\tsuper();\n\t\tthis.isUpdatePending = false;\n\t\tthis.hasUpdated = false;\n\t\tthis.#updatePromise = new Promise((res) => this.enableUpdating = res);\n\t\tconst { props } = resolve(this.constructor);\n\t\tfor (const name of props.keys()) if (Object.hasOwn(this, name)) {\n\t\t\t(this.#instanceProperties ??= /* @__PURE__ */ new Map()).set(name, this[name]);\n\t\t\tdelete this[name];\n\t\t}\n\t\tthis.requestUpdate();\n\t}\n\t/**\n\t* Note, this method should be considered final and not overridden. It is\n\t* overridden on the element instance with a function that triggers the\n\t* first update.\n\t*/\n\tenableUpdating(_requestedUpdate) {}\n\t/**\n\t* Registers a {@linkcode ReactiveController} to participate in the\n\t* element's reactive update cycle. The element automatically calls into\n\t* any registered controllers during its lifecycle callbacks.\n\t*\n\t* If the element is connected when `addController()` is called, the\n\t* controller's `hostConnected()` callback will be immediately called.\n\t*/\n\taddController(controller) {\n\t\tthis.#controllers.add(controller);\n\t\tif (this.isConnected) controller.hostConnected?.();\n\t}\n\t/** Removes a {@linkcode ReactiveController} from the element. */\n\tremoveController(controller) {\n\t\tthis.#controllers.delete(controller);\n\t}\n\t/**\n\t* On first connection, enables updating and notifies controllers.\n\t*/\n\tconnectedCallback() {\n\t\tthis.enableUpdating(true);\n\t\tfor (const c of this.#controllers) c.hostConnected?.();\n\t}\n\tdisconnectedCallback() {\n\t\tfor (const c of this.#controllers) c.hostDisconnected?.();\n\t}\n\t/**\n\t* Synchronizes property values when attributes change.\n\t*\n\t* Specifically, when an attribute is set, the corresponding property is\n\t* set. You should rarely need to implement this callback. If this method\n\t* is overridden, `super.attributeChangedCallback(name, _old, value)` must\n\t* be called.\n\t*/\n\tattributeChangedCallback(attr, oldValue, newValue) {\n\t\tif (oldValue === newValue) return;\n\t\tconst { props, attrToProp } = resolve(this.constructor);\n\t\tconst propName = attrToProp.get(attr);\n\t\tif (!propName) return;\n\t\tconst decl = props.get(propName);\n\t\tif (!decl) return;\n\t\tlet value = newValue;\n\t\tif (decl.type === Boolean) value = newValue !== null;\n\t\telse if (decl.type === Number) value = newValue === null ? null : Number(newValue);\n\t\tthis[propName] = value;\n\t}\n\t/**\n\t* Requests an update which is processed asynchronously. This should be\n\t* called when an element should update based on some state not triggered\n\t* by setting a reactive property. In this case, pass no arguments. It\n\t* should also be called when manually implementing a property setter. In\n\t* this case, pass the property `name` and `oldValue` to ensure that any\n\t* configured property options are honored.\n\t*/\n\trequestUpdate(name, oldValue) {\n\t\tif (name !== void 0) this.#changedProperties.set(name, oldValue);\n\t\tif (this.isUpdatePending) return;\n\t\tthis.#updatePromise = this.#enqueueUpdate();\n\t}\n\t/**\n\t* Sets up the element to asynchronously update. Awaits the previous\n\t* `#updatePromise` which both serializes updates and (on first update)\n\t* waits for `connectedCallback` to resolve the gate.\n\t*/\n\tasync #enqueueUpdate() {\n\t\tthis.isUpdatePending = true;\n\t\ttry {\n\t\t\tawait this.#updatePromise;\n\t\t} catch (e) {\n\t\t\tPromise.reject(e);\n\t\t}\n\t\tconst result = this.scheduleUpdate();\n\t\tif (result != null) await result;\n\t\treturn !this.isUpdatePending;\n\t}\n\t/**\n\t* Schedules an element update. You can override this method to change the\n\t* timing of updates by returning a Promise. The update will await the\n\t* returned Promise, and you should resolve the Promise to allow the update\n\t* to proceed. If this method is overridden, `super.scheduleUpdate()` must\n\t* be called.\n\t*\n\t* For instance, to schedule updates to occur just before the next frame:\n\t*\n\t* ```ts\n\t* override protected async scheduleUpdate(): Promise<unknown> {\n\t* await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n\t* super.scheduleUpdate();\n\t* }\n\t* ```\n\t*/\n\tscheduleUpdate() {\n\t\tthis.performUpdate();\n\t}\n\t/**\n\t* Performs an element update. Note, if an exception is thrown during the\n\t* update, `firstUpdated` and `updated` will not be called.\n\t*\n\t* Call `performUpdate()` to immediately process a pending update. This\n\t* should generally not be needed, but it can be done in rare cases when\n\t* you need to update synchronously.\n\t*/\n\tperformUpdate() {\n\t\tif (!this.isUpdatePending) return;\n\t\tif (!this.hasUpdated && this.#instanceProperties) {\n\t\t\tfor (const [name, value] of this.#instanceProperties) this[name] = value;\n\t\t\tthis.#instanceProperties = void 0;\n\t\t}\n\t\tconst changed = this.#changedProperties;\n\t\tthis.willUpdate(changed);\n\t\tfor (const c of this.#controllers) c.hostUpdate?.();\n\t\tthis.update(changed);\n\t\tthis.#changedProperties = /* @__PURE__ */ new Map();\n\t\tthis.isUpdatePending = false;\n\t\tfor (const c of this.#controllers) c.hostUpdated?.();\n\t\tif (!this.hasUpdated) {\n\t\t\tthis.hasUpdated = true;\n\t\t\tthis.firstUpdated(changed);\n\t\t}\n\t\tthis.updated(changed);\n\t}\n\t/**\n\t* Invoked before `update()` to compute values needed during the update.\n\t*\n\t* Implement `willUpdate` to compute property values that depend on other\n\t* properties and are used in the rest of the update process.\n\t*\n\t* ```ts\n\t* willUpdate(changed) {\n\t* if (changed.has('firstName') || changed.has('lastName')) {\n\t* this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n\t* }\n\t* }\n\t* ```\n\t*/\n\twillUpdate(_changed) {}\n\t/**\n\t* Updates the element. This method reflects property values to attributes\n\t* and can be overridden to render and keep updated element DOM. Setting\n\t* properties inside this method will *not* trigger another update.\n\t*/\n\tupdate(_changed) {}\n\t/**\n\t* Invoked when the element is first updated. Implement to perform one\n\t* time work on the element after update.\n\t*\n\t* Setting properties inside this method will trigger the element to\n\t* update again after this update cycle completes.\n\t*/\n\tfirstUpdated(_changed) {}\n\t/**\n\t* Invoked whenever the element is updated. Implement to perform\n\t* post-updating tasks via DOM APIs, for example, focusing an element.\n\t*\n\t* Setting properties inside this method will trigger the element to\n\t* update again after this update cycle completes.\n\t*/\n\tupdated(_changed) {}\n\t/**\n\t* Returns a Promise that resolves when the element has completed updating.\n\t* The Promise value is a boolean that is `true` if the element completed\n\t* the update without triggering another update. The Promise result is\n\t* `false` if a property was set inside `updated()`.\n\t*/\n\tget updateComplete() {\n\t\treturn this.#updatePromise;\n\t}\n};\n/**\n* Resolve `ctor.properties` into lookup Maps and install reactive accessors\n* on the prototype. Runs once per class, result is cached.\n*\n* Subclasses that need parent properties must spread them:\n* `static override properties = { ...Parent.properties, ... }`.\n*/\nfunction resolve(ctor) {\n\tconst existing = cache.get(ctor);\n\tif (existing) return existing;\n\tconst props = /* @__PURE__ */ new Map();\n\tconst attrToProp = /* @__PURE__ */ new Map();\n\tfor (const [name, decl] of Object.entries(ctor.properties)) {\n\t\tprops.set(name, decl);\n\t\tattrToProp.set(decl.attribute ?? name, name);\n\t\tif (!Object.getOwnPropertyDescriptor(ctor.prototype, name)?.get) {\n\t\t\tlet key = propertyKeys.get(name);\n\t\t\tif (!key) {\n\t\t\t\tkey = Symbol(name);\n\t\t\t\tpropertyKeys.set(name, key);\n\t\t\t}\n\t\t\tObject.defineProperty(ctor.prototype, name, {\n\t\t\t\tget() {\n\t\t\t\t\treturn this[key];\n\t\t\t\t},\n\t\t\t\tset(value) {\n\t\t\t\t\tconst old = this[key];\n\t\t\t\t\tthis[key] = value;\n\t\t\t\t\tif (!Object.is(old, value)) this.requestUpdate(name, old);\n\t\t\t\t},\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t}\n\t}\n\tconst meta = {\n\t\tprops,\n\t\tattrToProp\n\t};\n\tcache.set(ctor, meta);\n\treturn meta;\n}\n\n//#endregion\nexport { ReactiveElement };\n//# sourceMappingURL=reactive-element.js.map","import { DestroyMixin, ReactiveElement } from '@videojs/element';\nimport type { Constructor } from '@videojs/utils/types';\n\n/** Base class for interactive media UI elements. */\nexport class MediaElement extends DestroyMixin(ReactiveElement) {}\n\nexport interface MediaElementConstructor extends Constructor<MediaElement> {}\n","import { playerContext } from '../player/context';\nimport { createContainerMixin } from '../store/container-mixin';\nimport { MediaElement } from '../ui/media-element';\n\nconst ContainerMixin = createContainerMixin(playerContext);\n\nexport class MediaContainerElement extends ContainerMixin(MediaElement) {\n static readonly tagName = 'media-container';\n}\n","import type { PlayerStore } from '@videojs/core/dom';\nimport { ContextProvider } from '@videojs/element/context';\nimport { isNull } from '@videojs/utils/predicate';\nimport type { MediaElementConstructor } from '@/ui/media-element';\nimport type { PlayerContext } from '../player/context';\nimport type { PlayerProvider, PlayerProviderConstructor } from './types';\n\nexport type ProviderMixin<Store extends PlayerStore> = <Class extends MediaElementConstructor>(\n BaseClass: Class\n) => Class & PlayerProviderConstructor<Store>;\n\n/**\n * Create a mixin that provides player context to descendant elements.\n *\n * @param context - Player context to provide to descendants.\n * @param factory - Factory function that creates a store instance.\n */\nexport function createProviderMixin<Store extends PlayerStore>(\n context: PlayerContext<Store>,\n factory: () => Store\n): ProviderMixin<Store> {\n return <Class extends MediaElementConstructor>(BaseClass: Class) => {\n class PlayerProviderElement extends BaseClass implements PlayerProvider<Store> {\n #store: Store | null = factory();\n\n #provider = new ContextProvider(this, {\n context,\n initialValue: this.store,\n });\n\n get store(): Store {\n if (isNull(this.#store)) {\n this.#store = factory();\n }\n\n return this.#store;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n this.#provider.setValue(this.store);\n }\n\n override destroyCallback() {\n this.#store?.destroy();\n this.#store = null;\n super.destroyCallback();\n }\n }\n\n return PlayerProviderElement;\n };\n}\n","import { shallowEqual } from \"../../core/shallow-equal.js\";\nimport { noop } from \"@videojs/utils/function\";\n\n//#region src/html/controllers/snapshot-controller.ts\n/**\n* Subscribe to a `State<T>` container with optional selector.\n*\n* Without selector: returns full state, re-renders on any state change.\n* With selector: returns selected slice, re-renders only when the slice changes (shallowEqual).\n*\n* @example\n* ```ts\n* #state = new SnapshotController(this, sliderState, (s) => s.value);\n* ```\n*/\nvar SnapshotController = class {\n\t#host;\n\t#selector;\n\t#state;\n\t#cached;\n\t#unsubscribe = noop;\n\tconstructor(host, state, selector) {\n\t\tthis.#host = host;\n\t\tthis.#state = state;\n\t\tthis.#selector = selector;\n\t\thost.addController(this);\n\t}\n\tget value() {\n\t\tif (!this.#selector) return this.#state.current;\n\t\tthis.#cached ??= this.#selector(this.#state.current);\n\t\treturn this.#cached;\n\t}\n\t/** Switch to tracking a different state container. */\n\ttrack(state) {\n\t\tthis.#state = state;\n\t\tthis.#subscribe();\n\t}\n\thostConnected() {\n\t\tthis.#subscribe();\n\t}\n\thostDisconnected() {\n\t\tthis.#unsubscribe();\n\t\tthis.#unsubscribe = noop;\n\t\tthis.#cached = void 0;\n\t}\n\t#subscribe() {\n\t\tthis.#unsubscribe();\n\t\tif (!this.#selector) {\n\t\t\tthis.#unsubscribe = this.#state.subscribe(() => this.#host.requestUpdate());\n\t\t\treturn;\n\t\t}\n\t\tconst selector = this.#selector;\n\t\tthis.#cached = selector(this.#state.current);\n\t\tthis.#unsubscribe = this.#state.subscribe(() => {\n\t\t\tconst next = selector(this.#state.current);\n\t\t\tif (!shallowEqual(this.#cached, next)) {\n\t\t\t\tthis.#cached = next;\n\t\t\t\tthis.#host.requestUpdate();\n\t\t\t}\n\t\t});\n\t}\n};\n\n//#endregion\nexport { SnapshotController };\n//# sourceMappingURL=snapshot-controller.js.map","import { isStore } from \"../core/store.js\";\nimport { noop } from \"@videojs/utils/function\";\nimport { ContextConsumer } from \"@videojs/element/context\";\n\n//#region src/html/store-accessor.ts\n/**\n* Resolves a store from either a direct instance or context.\n*\n* When given a direct store, provides immediate access.\n* When given a context, sets up a ContextConsumer to receive the store.\n*\n* @example Direct store\n* ```ts\n* const accessor = new StoreAccessor(host, store, (s) => console.log('available', s));\n* accessor.value; // Store (immediately available)\n* ```\n*\n* @example Context source\n* ```ts\n* const accessor = new StoreAccessor(host, context, (s) => console.log('available', s));\n* accessor.value; // null until context provides store\n* ```\n*/\nvar StoreAccessor = class {\n\t#onAvailable;\n\t#consumer;\n\t#directStore;\n\tconstructor(host, source, onAvailable) {\n\t\tthis.#onAvailable = onAvailable ?? noop;\n\t\tif (isStore(source)) {\n\t\t\tthis.#directStore = source;\n\t\t\tthis.#consumer = null;\n\t\t} else {\n\t\t\tthis.#directStore = null;\n\t\t\tthis.#consumer = new ContextConsumer(host, {\n\t\t\t\tcontext: source,\n\t\t\t\tcallback: (store) => this.#onAvailable(store),\n\t\t\t\tsubscribe: false\n\t\t\t});\n\t\t}\n\t\thost.addController(this);\n\t}\n\t/** Returns the store, or null if not yet available from context. */\n\tget value() {\n\t\tif (this.#consumer) return this.#consumer.value ?? null;\n\t\treturn this.#directStore;\n\t}\n\thostConnected() {\n\t\tif (this.#directStore) this.#onAvailable(this.#directStore);\n\t}\n};\n\n//#endregion\nexport { StoreAccessor };\n//# sourceMappingURL=store-accessor.js.map","import { SnapshotController } from \"./snapshot-controller.js\";\nimport { StoreAccessor } from \"../store-accessor.js\";\nimport { isNull, isUndefined } from \"@videojs/utils/predicate\";\n\n//#region src/html/controllers/store-controller.ts\n/**\n* Access store state and actions.\n*\n* Without selector: Returns the store, does NOT subscribe to changes.\n* With selector: Returns selected state, triggers update when selected state changes (shallowEqual).\n*\n* @example\n* ```ts\n* // Store access (no subscription) - access actions\n* class Controls extends LitElement {\n* #store = new StoreController(this, storeSource);\n*\n* handleClick() {\n* this.#store.value.setVolume(0.5);\n* }\n* }\n*\n* // Selector-based subscription - re-renders when playback changes\n* class PlayButton extends LitElement {\n* #playback = new StoreController(this, storeSource, selectPlayback);\n*\n* render() {\n* const playback = this.#playback.value;\n* if (!playback) return nothing;\n* return html`<button @click=${playback.toggle}>\n* ${playback.paused ? 'Play' : 'Pause'}\n* </button>`;\n* }\n* }\n* ```\n*/\nvar StoreController = class {\n\t#host;\n\t#selector;\n\t#accessor;\n\t#snapshot = null;\n\tconstructor(host, source, selector) {\n\t\tthis.#host = host;\n\t\tthis.#selector = selector;\n\t\tthis.#accessor = new StoreAccessor(host, source, (store) => this.#connect(store));\n\t\thost.addController(this);\n\t}\n\tget value() {\n\t\tconst store = this.#accessor.value;\n\t\tif (isNull(store)) throw new Error(\"Store not available\");\n\t\tif (isUndefined(this.#selector)) return store;\n\t\treturn this.#snapshot.value;\n\t}\n\thostConnected() {}\n\t#connect(store) {\n\t\tif (isUndefined(this.#selector)) return;\n\t\tif (!this.#snapshot) this.#snapshot = new SnapshotController(this.#host, store.$state, this.#selector);\n\t\telse this.#snapshot.track(store.$state);\n\t}\n};\n\n//#endregion\nexport { StoreController };\n//# sourceMappingURL=store-controller.js.map","import type { PlayerStore } from '@videojs/core/dom';\nimport type { ReactiveController, ReactiveControllerHost } from '@videojs/element';\nimport { ContextConsumer } from '@videojs/element/context';\nimport type { InferStoreState, Selector } from '@videojs/store';\nimport { StoreController } from '@videojs/store/html';\n\nimport type { PlayerContext } from './context';\n\nexport type PlayerControllerHost = ReactiveControllerHost & HTMLElement;\n\n/**\n * Reactive controller for accessing player store state.\n *\n * Without selector: Returns the store, does NOT subscribe to changes.\n * With selector: Returns selected state, subscribes with shallowEqual comparison.\n *\n * @example\n * ```ts\n * // Store access (no subscription)\n * class Controls extends MediaElement {\n * #player = new PlayerController(this, playerContext);\n *\n * handleClick() {\n * this.#player.value.setVolume(0.5);\n * }\n * }\n *\n * // Selector-based subscription\n * class PlayButton extends MediaElement {\n * #playback = new PlayerController(this, playerContext, selectPlayback);\n * }\n * ```\n */\nexport class PlayerController<Store extends PlayerStore, Result = Store> implements ReactiveController {\n readonly #host: PlayerControllerHost;\n readonly #selector: Selector<InferStoreState<Store>, Result> | undefined;\n\n #consumer: ContextConsumer<PlayerContext<Store>, PlayerControllerHost>;\n #store: StoreController<Store, Result> | null = null;\n\n /**\n * @label Without Selector\n * @param host - The host element that owns this controller.\n * @param context - Player context to resolve the store from.\n */\n constructor(host: PlayerControllerHost, context: PlayerContext<Store>);\n /**\n * @label With Selector\n * @param host - The host element that owns this controller.\n * @param context - Player context to resolve the store from.\n * @param selector - Derives a value from the player store state.\n */\n constructor(\n host: PlayerControllerHost,\n context: PlayerContext<Store>,\n selector: Selector<InferStoreState<Store>, Result>\n );\n constructor(\n host: PlayerControllerHost,\n context: PlayerContext<Store>,\n selector?: Selector<InferStoreState<Store>, Result>\n ) {\n this.#host = host;\n this.#selector = selector;\n\n this.#consumer = new ContextConsumer(host, {\n context,\n callback: (ctx) => this.#connect(ctx),\n subscribe: true,\n });\n\n host.addController(this);\n }\n\n get value(): Result | undefined {\n const store = this.#consumer.value;\n if (!store) return undefined;\n\n // Without selector: return store directly\n if (!this.#selector) return store as unknown as Result;\n\n // With selector: use StoreController\n return this.#store?.value;\n }\n\n get displayName(): string | undefined {\n return this.#selector?.displayName;\n }\n\n hostConnected(): void {\n const store = this.#consumer.value;\n if (store) this.#connect(store);\n }\n\n hostDisconnected(): void {\n this.#store = null;\n }\n\n #connect(store: Store): void {\n if (!this.#store && this.#selector) {\n this.#store = new StoreController(this.#host, store, this.#selector);\n }\n }\n}\n\nexport namespace PlayerController {\n export type Host = PlayerControllerHost;\n\n export type Constructor<Store extends PlayerStore = PlayerStore, Result = Store> = typeof PlayerController<\n Store,\n Result\n >;\n}\n","import type {\n AnyPlayerFeature,\n AudioFeatures,\n AudioPlayerStore,\n PlayerStore,\n PlayerTarget,\n VideoFeatures,\n VideoPlayerStore,\n} from '@videojs/core/dom';\nimport { combine, createStore } from '@videojs/store';\n\nimport { type ContainerMixin, createContainerMixin } from '../store/container-mixin';\nimport { createProviderMixin, type ProviderMixin } from '../store/provider-mixin';\nimport { type PlayerContext, playerContext } from './context';\nimport { PlayerController } from './player-controller';\n\nexport interface CreatePlayerConfig<Features extends AnyPlayerFeature[]> {\n features: Features;\n}\n\nexport interface CreatePlayerResult<Store extends PlayerStore> {\n /** Context for consuming player in controllers. */\n context: PlayerContext<Store>;\n\n /** Creates a store instance for imperative access. */\n create: () => Store;\n\n /** Player controller bound to this player's context. */\n PlayerController: PlayerController.Constructor<Store>;\n\n /** Mixin that provides player context to descendants. */\n ProviderMixin: ProviderMixin<Store>;\n\n /** Mixin that consumes player context and auto-attaches media elements. */\n ContainerMixin: ContainerMixin<Store>;\n}\n\n/**\n * Creates a player factory with typed store, mixins, and controller.\n *\n * @example\n * ```ts\n * import { createPlayer, MediaElement, selectPlayback } from '@videojs/html';\n * import { videoFeatures } from '@videojs/html/video';\n *\n * const { ProviderMixin, ContainerMixin, PlayerController, context } = createPlayer({\n * features: videoFeatures,\n * });\n *\n * // Provider element: owns the store, provides context to descendants\n * class VideoPlayer extends ProviderMixin(MediaElement) {}\n * customElements.define('video-player', VideoPlayer);\n *\n * // Control element with selector\n * class PlayButton extends MediaElement {\n * #playback = new PlayerController(this, context, selectPlayback);\n * }\n * ```\n *\n * @label Video\n * @param config - Player configuration with features.\n */\nexport function createPlayer(config: CreatePlayerConfig<VideoFeatures>): CreatePlayerResult<VideoPlayerStore>;\n\n/**\n * Creates a player factory for audio media.\n *\n * @label Audio\n * @param config - Player configuration with features.\n */\nexport function createPlayer(config: CreatePlayerConfig<AudioFeatures>): CreatePlayerResult<AudioPlayerStore>;\n\n/**\n * Creates a player factory with custom features.\n *\n * @label Generic\n * @param config - Player configuration with features.\n */\nexport function createPlayer<const Features extends AnyPlayerFeature[]>(\n config: CreatePlayerConfig<Features>\n): CreatePlayerResult<PlayerStore<Features>>;\n\nexport function createPlayer(config: CreatePlayerConfig<AnyPlayerFeature[]>): CreatePlayerResult<PlayerStore> {\n const slice = combine<PlayerTarget, AnyPlayerFeature[]>(...config.features);\n\n function create(): PlayerStore {\n return createStore<PlayerTarget>()(slice);\n }\n\n const ProviderMixin = createProviderMixin<PlayerStore>(playerContext, create);\n const ContainerMixin = createContainerMixin<PlayerStore>(playerContext);\n\n return {\n context: playerContext,\n create,\n PlayerController,\n ProviderMixin,\n ContainerMixin,\n };\n}\n","type DefinableElement = CustomElementConstructor & { tagName: string };\n\n/** Define a custom element only if not already registered. */\nexport function safeDefine(element: DefinableElement): void {\n if (!customElements.get(element.tagName)) {\n customElements.define(element.tagName, element);\n }\n}\n","import { audioFeatures } from '@videojs/core/dom';\nimport { MediaContainerElement } from '../../media/container-element';\nimport { createPlayer } from '../../player/create-player';\nimport { MediaElement } from '../../ui/media-element';\nimport { safeDefine } from '../safe-define';\n\nconst { ProviderMixin } = createPlayer({\n features: audioFeatures,\n});\n\nexport class AudioPlayerElement extends ProviderMixin(MediaElement) {\n static readonly tagName = 'audio-player';\n}\n\n// Provider must be defined before consumer for context handshake during upgrade.\nsafeDefine(AudioPlayerElement);\nsafeDefine(MediaContainerElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [AudioPlayerElement.tagName]: AudioPlayerElement;\n }\n}\n","const icons = {\n \"captions-off\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><rect width=\"16\" height=\"12\" x=\"1\" y=\"3\" stroke=\"currentColor\" stroke-width=\"2\" rx=\"3\"/><rect width=\"3\" height=\"2\" x=\"3\" y=\"8\" fill=\"currentColor\" rx=\"1\"/><rect width=\"2\" height=\"2\" x=\"13\" y=\"8\" fill=\"currentColor\" rx=\"1\"/><rect width=\"4\" height=\"2\" x=\"11\" y=\"11\" fill=\"currentColor\" rx=\"1\"/><rect width=\"5\" height=\"2\" x=\"7\" y=\"8\" fill=\"currentColor\" rx=\"1\"/><rect width=\"7\" height=\"2\" x=\"3\" y=\"11\" fill=\"currentColor\" rx=\"1\"/></svg>`,\n \"captions-on\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"M15 2a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3zM4 11a1 1 0 1 0 0 2h5a1 1 0 1 0 0-2zm8 0a1 1 0 1 0 0 2h2a1 1 0 1 0 0-2zM4 8a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2zm4 0a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2zm6 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2\"/></svg>`,\n \"fullscreen-enter\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"M9.57 3.617A1 1 0 0 0 8.646 3H4c-.552 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1 1 1 0 0 0 .706-.293l4.647-4.647a1 1 0 0 0 .216-1.089m4.812 4.812a1 1 0 0 0-1.089.217l-4.647 4.647a.998.998 0 0 0 .708 1.706H14c.552 0 1-.449 1-1V9.353a1 1 0 0 0-.618-.924\"/></svg>`,\n \"fullscreen-exit\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"M7.883 1.93a.99.99 0 0 0-1.09.217L2.146 6.793A.998.998 0 0 0 2.853 8.5H7.5c.551 0 1-.449 1-1V2.854a1 1 0 0 0-.617-.924m7.263 7.57H10.5c-.551 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1.001 1 1 0 0 0 .706-.293l4.646-4.646a.998.998 0 0 0-.707-1.707z\"/></svg>`,\n \"pause\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><rect width=\"5\" height=\"14\" x=\"2\" y=\"2\" fill=\"currentColor\" rx=\"1.75\"/><rect width=\"5\" height=\"14\" x=\"11\" y=\"2\" fill=\"currentColor\" rx=\"1.75\"/></svg>`,\n \"pip\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"M13 2a4 4 0 0 1 4 4v2.035A3.5 3.5 0 0 0 16.5 8H15V6.273C15 5.018 13.96 4 12.679 4H4.32C3.04 4 2 5.018 2 6.273v5.454C2 12.982 3.04 14 4.321 14H6v1.5q0 .255.035.5H4a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4z\"/><rect width=\"10\" height=\"7\" x=\"8\" y=\"10\" fill=\"currentColor\" rx=\"2\"/></svg>`,\n \"play\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"m14.051 10.723-7.985 4.964a1.98 1.98 0 0 1-2.758-.638A2.06 2.06 0 0 1 3 13.964V4.036C3 2.91 3.895 2 5 2c.377 0 .747.109 1.066.313l7.985 4.964a2.057 2.057 0 0 1 .627 2.808c-.16.257-.373.475-.627.637\"/></svg>`,\n \"restart\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"M9 17a8 8 0 0 1-8-8h2a6 6 0 1 0 1.287-3.713l1.286 1.286A.25.25 0 0 1 5.396 7H1.25A.25.25 0 0 1 1 6.75V2.604a.25.25 0 0 1 .427-.177l1.438 1.438A8 8 0 1 1 9 17\"/><path fill=\"currentColor\" d=\"m11.61 9.639-3.331 2.07a.826.826 0 0 1-1.15-.266.86.86 0 0 1-.129-.452V6.849C7 6.38 7.374 6 7.834 6c.158 0 .312.045.445.13l3.331 2.071a.858.858 0 0 1 0 1.438\"/></svg>`,\n \"seek\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"M1 9c0 2.21.895 4.21 2.343 5.657l1.414-1.414a6 6 0 1 1 8.956-7.956l-1.286 1.286a.25.25 0 0 0 .177.427h4.146a.25.25 0 0 0 .25-.25V2.604a.25.25 0 0 0-.427-.177l-1.438 1.438A8 8 0 0 0 1 9\"/></svg>`,\n \"spinner\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"currentColor\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><rect width=\"2\" height=\"5\" x=\"8\" y=\".5\" opacity=\".5\" rx=\"1\"><animate attributeName=\"opacity\" begin=\"0s\" calcMode=\"linear\" dur=\"1s\" repeatCount=\"indefinite\" values=\"1;0\"/></rect><rect width=\"2\" height=\"5\" x=\"12.243\" y=\"2.257\" opacity=\".45\" rx=\"1\" transform=\"rotate(45 13.243 4.757)\"><animate attributeName=\"opacity\" begin=\"0.125s\" calcMode=\"linear\" dur=\"1s\" repeatCount=\"indefinite\" values=\"1;0\"/></rect><rect width=\"5\" height=\"2\" x=\"12.5\" y=\"8\" opacity=\".4\" rx=\"1\"><animate attributeName=\"opacity\" begin=\"0.25s\" calcMode=\"linear\" dur=\"1s\" repeatCount=\"indefinite\" values=\"1;0\"/></rect><rect width=\"5\" height=\"2\" x=\"10.743\" y=\"12.243\" opacity=\".35\" rx=\"1\" transform=\"rotate(45 13.243 13.243)\"><animate attributeName=\"opacity\" begin=\"0.375s\" calcMode=\"linear\" dur=\"1s\" repeatCount=\"indefinite\" values=\"1;0\"/></rect><rect width=\"2\" height=\"5\" x=\"8\" y=\"12.5\" opacity=\".3\" rx=\"1\"><animate attributeName=\"opacity\" begin=\"0.5s\" calcMode=\"linear\" dur=\"1s\" repeatCount=\"indefinite\" values=\"1;0\"/></rect><rect width=\"2\" height=\"5\" x=\"3.757\" y=\"10.743\" opacity=\".25\" rx=\"1\" transform=\"rotate(45 4.757 13.243)\"><animate attributeName=\"opacity\" begin=\"0.625s\" calcMode=\"linear\" dur=\"1s\" repeatCount=\"indefinite\" values=\"1;0\"/></rect><rect width=\"5\" height=\"2\" x=\".5\" y=\"8\" opacity=\".15\" rx=\"1\"><animate attributeName=\"opacity\" begin=\"0.75s\" calcMode=\"linear\" dur=\"1s\" repeatCount=\"indefinite\" values=\"1;0\"/></rect><rect width=\"5\" height=\"2\" x=\"2.257\" y=\"3.757\" opacity=\".1\" rx=\"1\" transform=\"rotate(45 4.757 4.757)\"><animate attributeName=\"opacity\" begin=\"0.875s\" calcMode=\"linear\" dur=\"1s\" repeatCount=\"indefinite\" values=\"1;0\"/></rect></svg>`,\n \"volume-high\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"M15.6 3.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4C15.4 5.9 16 7.4 16 9s-.6 3.1-1.8 4.3c-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7\"/><path fill=\"currentColor\" d=\"M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402\"/></svg>`,\n \"volume-low\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402\"/></svg>`,\n \"volume-off\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\" aria-hidden=\"true\" viewBox=\"0 0 18 18\"><path fill=\"currentColor\" d=\"M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752M14.5 7.586l-1.768-1.768a1 1 0 1 0-1.414 1.414L13.085 9l-1.767 1.768a1 1 0 0 0 1.414 1.414l1.768-1.768 1.768 1.768a1 1 0 0 0 1.414-1.414L15.914 9l1.768-1.768a1 1 0 0 0-1.414-1.414z\"/></svg>`,\n};\n\nexport function renderIcon(name, attrs) {\n const svg = icons[name];\n if (!svg) return '';\n if (!attrs) return svg;\n const attrStr = Object.entries(attrs)\n .map(([k, v]) => ` ${k}=\"${v}\"`)\n .join('');\n return svg.replace('<svg', `<svg${attrStr}`);\n}\n","import type { ReactiveElement } from '@videojs/element';\nimport type { Constructor } from '@videojs/utils/types';\n\n/**\n * Light DOM stylesheet that bridges CSS custom properties set by skins\n * to native WebKit text track pseudo-elements on the slotted `<video>`.\n *\n * `::slotted(video)::-webkit-media-text-track-container` is invalid per\n * CSS spec, so this bridge lives in light DOM where it can directly\n * target the video element's pseudo-elements.\n */\nconst NATIVE_CAPTION_BRIDGE_CSS = /* css */ `\n.media-skin > video::-webkit-media-text-track-container {\n transition: transform var(--media-caption-track-duration, 150ms) ease-out;\n transition-delay: var(--media-caption-track-delay, 600ms);\n transform: translateY(var(--media-caption-track-y, 0)) scale(0.98);\n z-index: var(--media-caption-track-z, 1);\n font-family: inherit;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .media-skin > video::-webkit-media-text-track-container {\n transition-duration: 50ms;\n }\n}\n`;\n\nconst BRIDGE_ID = 'media-caption-bridge';\n\nfunction ensureCaptionBridge(): void {\n if (document.getElementById(BRIDGE_ID)) return;\n const style = document.createElement('style');\n style.id = BRIDGE_ID;\n style.textContent = NATIVE_CAPTION_BRIDGE_CSS;\n document.head.appendChild(style);\n}\n\n/**\n * Mixin for skin elements that renders the template from a static\n * `getTemplateHTML` method into a shadow root. Native `<slot>` elements\n * handle light DOM projection automatically.\n *\n * When `static styles` is set, the stylesheet is adopted into the shadow\n * root via `adoptedStyleSheets`.\n */\nexport function SkinMixin<Base extends Constructor<ReactiveElement>>(\n BaseClass: Base\n): Base & { shadowRootOptions: ShadowRootInit; styles?: CSSStyleSheet } {\n class SkinElement extends (BaseClass as Constructor<ReactiveElement>) {\n static shadowRootOptions: ShadowRootInit = { mode: 'open' };\n static styles?: CSSStyleSheet;\n\n constructor(...args: any[]) {\n super(...args);\n\n this.classList.add('media-skin');\n ensureCaptionBridge();\n\n if (!this.shadowRoot) {\n const ctor = this.constructor as typeof SkinElement & { getTemplateHTML?: () => string };\n this.attachShadow(ctor.shadowRootOptions);\n\n if (ctor.styles) {\n this.shadowRoot!.adoptedStyleSheets = [ctor.styles];\n }\n\n if (ctor.getTemplateHTML) {\n this.shadowRoot!.innerHTML = ctor.getTemplateHTML();\n }\n }\n }\n }\n\n return SkinElement as unknown as Base & { shadowRootOptions: ShadowRootInit; styles?: CSSStyleSheet };\n}\n\n/** Create a shared `CSSStyleSheet` from a CSS string. */\nexport function createStyles(css: string): CSSStyleSheet {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(css);\n return sheet;\n}\n","export default \"/* ==========================================================================\\n Icon State Visibility for Audio Skins\\n\\n Data-attribute-driven visibility rules for multi-state icon buttons.\\n Uses :is() with both element selectors (for HTML custom element wrappers)\\n and class selectors (for React rendered SVG elements).\\n ========================================================================== */\\n\\n/* --- All icons hidden by default --- */\\n\\n.media-button--play .media-icon--restart,\\n.media-button--play .media-icon--play,\\n.media-button--play .media-icon--pause,\\n.media-button--mute .media-icon--volume-off,\\n.media-button--mute .media-icon--volume-low,\\n.media-button--mute .media-icon--volume-high {\\n display: none;\\n opacity: 0;\\n}\\n\\n/* --- Active icon per state --- */\\n\\n/* Play: ended → restart */\\n.media-button--play[data-ended] .media-icon--restart,\\n/* Play: paused (not ended) → play */\\n.media-button--play:not([data-ended])[data-paused] .media-icon--play,\\n/* Play: playing (not paused, not ended) → pause */\\n.media-button--play:not([data-paused]):not([data-ended]) .media-icon--pause,\\n/* Mute: muted → volume off */\\n.media-button--mute[data-muted] .media-icon--volume-off,\\n/* Mute: volume low (not muted) → volume low */\\n.media-button--mute:not([data-muted])[data-volume-level=\\\"low\\\"] .media-icon--volume-low,\\n/* Mute: volume high (not muted, not low) → volume high */\\n.media-button--mute:not([data-muted]):not([data-volume-level=\\\"low\\\"]) .media-icon--volume-high {\\n display: block;\\n opacity: 1;\\n}\\n\\n/* ==========================================================================\\n Tooltip Label State Visibility for Audio Skins\\n\\n Data-attribute-driven visibility rules for multi-state tooltip labels.\\n Uses adjacent sibling selectors to match button state → tooltip content.\\n ========================================================================== */\\n\\n/* --- All multi-state labels hidden by default --- */\\n\\n.media-tooltip-label {\\n display: none;\\n}\\n\\n/* --- Active label per state --- */\\n\\n/* Play: ended → replay */\\n.media-button--play[data-ended] + .media-tooltip .media-tooltip-label--replay,\\n/* Play: paused (not ended) → play */\\n .media-button--play:not([data-ended])[data-paused] + .media-tooltip\\n .media-tooltip-label--play,\\n/* Play: playing (not paused, not ended) → pause */\\n .media-button--play:not([data-paused]):not([data-ended]) + .media-tooltip\\n .media-tooltip-label--pause {\\n display: block;\\n}\\n\\n/* ==========================================================================\\n Reset\\n ========================================================================== */\\n\\n.media-default-skin *,\\n.media-default-skin *::before,\\n.media-default-skin *::after {\\n box-sizing: border-box;\\n margin: 0;\\n}\\n.media-default-skin img,\\n.media-default-skin video,\\n.media-default-skin svg {\\n display: block;\\n max-width: 100%;\\n}\\n.media-default-skin button {\\n font: inherit;\\n}\\n@media (prefers-reduced-motion: no-preference) {\\n .media-default-skin {\\n interpolate-size: allow-keywords;\\n }\\n}\\n\\n/* ==========================================================================\\n Root Container\\n ========================================================================== */\\n\\n.media-default-skin {\\n position: relative;\\n isolation: isolate;\\n display: block;\\n container: media-root / inline-size;\\n border-radius: var(--media-border-radius, 2rem);\\n font-family:\\n Inter Variable,\\n Inter,\\n ui-sans-serif,\\n system-ui,\\n sans-serif;\\n font-size: 0.8125rem;\\n line-height: 1.5;\\n letter-spacing: normal;\\n -webkit-font-smoothing: auto;\\n -moz-osx-font-smoothing: auto;\\n\\n &:fullscreen {\\n border-radius: 0;\\n }\\n}\\n\\n/* ==========================================================================\\n Surface (shared glass effect for tooltips, popovers, controls)\\n ========================================================================== */\\n\\n.media-default-skin .media-surface {\\n background-color: var(--media-surface-background-color);\\n backdrop-filter: var(--media-surface-backdrop-filter);\\n box-shadow:\\n inset 0 0 0 1px var(--media-surface-inner-border-color),\\n 0 1px 3px 0 var(--media-surface-shadow-color),\\n 0 1px 2px -1px var(--media-surface-shadow-color);\\n\\n /* Inner border ring */\\n &::after {\\n content: \\\"\\\";\\n position: absolute;\\n inset: 0;\\n z-index: 10;\\n border-radius: inherit;\\n box-shadow: 0 0 0 1px var(--media-surface-outer-border-color);\\n pointer-events: none;\\n }\\n\\n @media (prefers-reduced-transparency: reduce) {\\n background-color: oklch(from var(--media-surface-background-color) l c h / 0.7);\\n }\\n\\n @media (prefers-contrast: more) {\\n background-color: oklch(from var(--media-surface-background-color) l c h / 0.9);\\n }\\n}\\n\\n/* ==========================================================================\\n Buffering Indicator\\n ========================================================================== */\\n\\n.media-default-skin .media-buffering-indicator {\\n position: absolute;\\n inset: 0;\\n display: none;\\n align-items: center;\\n justify-content: center;\\n color: oklch(1 0 0);\\n pointer-events: none;\\n\\n &[data-visible] {\\n display: flex;\\n }\\n\\n .media-surface {\\n padding: 0.25rem;\\n border-radius: 100%;\\n }\\n}\\n\\n/* ==========================================================================\\n Error Dialog\\n ========================================================================== */\\n\\n.media-default-skin .media-error {\\n position: absolute;\\n inset: 0;\\n z-index: 20;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.media-default-skin .media-error__dialog {\\n display: flex;\\n flex-direction: column;\\n gap: 0.75rem;\\n max-width: 18rem;\\n padding: 0.75rem;\\n border-radius: 1.75rem;\\n color: oklch(1 0 0);\\n font-size: 0.875rem;\\n transition-property: opacity, transform;\\n transition-duration: 500ms;\\n transition-delay: 100ms;\\n transition-timing-function: linear(\\n 0,\\n 0.034 1.5%,\\n 0.763 9.7%,\\n 1.066 13.9%,\\n 1.198 19.9%,\\n 1.184 21.8%,\\n 0.963 37.5%,\\n 0.997 50.9%,\\n 1\\n );\\n\\n /* Simple, fast transition for reduced motion users */\\n @media (prefers-reduced-motion: reduce) {\\n transition-duration: 100ms;\\n transition-delay: 0ms;\\n transition-timing-function: ease-out;\\n }\\n}\\n\\n.media-default-skin .media-error[data-starting-style] .media-error__dialog,\\n.media-default-skin .media-error[data-ending-style] .media-error__dialog {\\n opacity: 0;\\n transform: scale(0.5);\\n}\\n\\n.media-default-skin .media-error__content {\\n display: flex;\\n flex-direction: column;\\n gap: 0.5rem;\\n padding: 0.5rem 0.5rem 0.375rem;\\n}\\n\\n.media-default-skin .media-error__title {\\n font-weight: 600;\\n line-height: 1.25;\\n}\\n\\n.media-default-skin .media-error__description {\\n opacity: 0.7;\\n}\\n\\n.media-default-skin .media-error__actions {\\n display: flex;\\n gap: 0.5rem;\\n\\n & > * {\\n flex: 1;\\n }\\n}\\n\\n/* ==========================================================================\\n Controls\\n ========================================================================== */\\n\\n.media-default-skin .media-controls {\\n container: media-controls / inline-size;\\n display: flex;\\n align-items: center;\\n gap: 0.075rem;\\n padding: 0.175rem;\\n border-radius: calc(infinity * 1px);\\n --media-controls-current-shadow-color: oklch(from currentColor 0 0 0 / clamp(0, calc((l - 0.5) * 0.5), 0.25));\\n --media-controls-current-shadow-color-subtle: oklch(\\n from var(--media-controls-current-shadow-color) l c h /\\n calc(alpha * 0.4)\\n );\\n text-shadow: 0 0 1px var(--media-controls-current-shadow-color);\\n\\n @container media-root (width > 40rem) {\\n gap: 0.125rem;\\n padding: 0.25rem;\\n }\\n}\\n\\n/* ==========================================================================\\n Time Display\\n ========================================================================== */\\n\\n.media-default-skin .media-time {\\n container: media-time / inline-size;\\n display: flex;\\n align-items: center;\\n flex: 1;\\n gap: 0.75rem;\\n padding-inline: 0.5rem;\\n\\n & .media-time__value:first-child {\\n display: none;\\n\\n @container media-time (width > 18rem) {\\n display: block;\\n }\\n }\\n}\\n\\n.media-default-skin .media-time__value {\\n font-variant-numeric: tabular-nums;\\n}\\n\\n/* ==========================================================================\\n Buttons\\n ========================================================================== */\\n\\n/* Base button */\\n.media-default-skin .media-button {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex-shrink: 0;\\n padding: 0.5rem 1rem;\\n background: oklch(1 0 0);\\n border: none;\\n border-radius: calc(infinity * 1px);\\n outline: 2px solid transparent;\\n outline-offset: -2px;\\n color: oklch(0 0 0);\\n font-weight: 500;\\n text-align: center;\\n transition-property: background-color, color, outline-offset, transform;\\n transition-duration: 150ms;\\n transition-timing-function: ease-out;\\n cursor: pointer;\\n user-select: none;\\n\\n &:focus-visible {\\n outline-color: oklch(62.3% 0.214 259.815);\\n outline-offset: 2px;\\n }\\n\\n &[disabled] {\\n opacity: 0.5;\\n filter: grayscale(1);\\n cursor: not-allowed;\\n }\\n\\n &[data-availability=\\\"unavailable\\\"] {\\n display: none;\\n }\\n}\\n\\n/* Icon button variant */\\n.media-default-skin .media-button--icon {\\n display: grid;\\n width: 2.125rem;\\n padding: 0;\\n aspect-ratio: 1;\\n background: transparent;\\n color: inherit;\\n text-shadow: inherit;\\n\\n &:hover,\\n &:focus-visible,\\n &[aria-expanded=\\\"true\\\"] {\\n background-color: oklch(from currentColor l c h / 0.1);\\n text-decoration: none;\\n }\\n\\n &:active {\\n transform: scale(0.9);\\n }\\n\\n & .media-icon {\\n filter: drop-shadow(0 1px 0 var(--media-controls-current-shadow-color, oklch(0 0 0 / 0.25)));\\n }\\n}\\n\\n/* Seek button */\\n.media-default-skin .media-button--seek {\\n & .media-icon__label {\\n position: absolute;\\n right: -1px;\\n bottom: -3px;\\n font-size: 0.75em;\\n font-weight: 480;\\n font-variant-numeric: tabular-nums;\\n }\\n\\n &:has(.media-icon--flipped) .media-icon__label {\\n right: unset;\\n left: -1px;\\n }\\n\\n @container media-controls (width < 28rem) {\\n display: none;\\n }\\n}\\n\\n/* Playback rate button */\\n.media-default-skin .media-button--playback-rate {\\n padding: 0;\\n\\n &::after {\\n content: attr(data-rate) \\\"\\\\00D7\\\";\\n width: 4ch;\\n font-variant-numeric: tabular-nums;\\n }\\n}\\n\\n/* ==========================================================================\\n Icons\\n ========================================================================== */\\n\\n.media-default-skin .media-icon__container {\\n position: relative;\\n}\\n.media-default-skin .media-icon {\\n display: block;\\n flex-shrink: 0;\\n grid-area: 1 / 1;\\n width: 18px;\\n height: 18px;\\n transition-behavior: allow-discrete;\\n transition-property: display, opacity;\\n transition-duration: 150ms;\\n transition-timing-function: ease-out;\\n}\\n.media-default-skin .media-icon--flipped {\\n scale: -1 1;\\n}\\n\\n/* ==========================================================================\\n Slider\\n ========================================================================== */\\n\\n.media-default-skin .media-slider {\\n position: relative;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex: 1;\\n border-radius: calc(infinity * 1px);\\n outline: none;\\n\\n &[data-orientation=\\\"horizontal\\\"] {\\n min-width: 5rem;\\n width: 100%;\\n height: 1.25rem;\\n }\\n\\n &[data-orientation=\\\"vertical\\\"] {\\n width: 1.25rem;\\n height: 5rem;\\n }\\n}\\n\\n/* Track */\\n.media-default-skin .media-slider__track {\\n position: relative;\\n isolation: isolate;\\n overflow: hidden;\\n border-radius: inherit;\\n user-select: none;\\n\\n &[data-orientation=\\\"horizontal\\\"] {\\n width: 100%;\\n height: 0.25rem;\\n }\\n\\n &[data-orientation=\\\"vertical\\\"] {\\n width: 0.25rem;\\n height: 100%;\\n }\\n}\\n\\n/* Thumb */\\n.media-default-skin .media-slider__thumb {\\n z-index: 10;\\n position: absolute;\\n transform: translate(-50%, -50%);\\n width: 0.625rem;\\n height: 0.625rem;\\n background-color: currentColor;\\n border-radius: calc(infinity * 1px);\\n box-shadow:\\n 0 0 0 1px var(--media-controls-current-shadow-color-subtle, oklch(0 0 0 / 0.1)),\\n 0 1px 3px 0 oklch(0 0 0 / 0.15),\\n 0 1px 2px -1px oklch(0 0 0 / 0.15);\\n opacity: 0;\\n transition-property: opacity, height, width, outline-offset;\\n transition-duration: 150ms;\\n transition-timing-function: ease-out;\\n user-select: none;\\n outline: 4px solid transparent;\\n outline-offset: -4px;\\n\\n &[data-orientation=\\\"horizontal\\\"] {\\n top: 50%;\\n left: var(--media-slider-fill);\\n }\\n\\n &[data-orientation=\\\"vertical\\\"] {\\n left: 50%;\\n top: calc(100% - var(--media-slider-fill));\\n }\\n\\n &:hover,\\n &:focus {\\n outline-color: oklch(from currentColor l c h / 0.25);\\n outline-offset: 0;\\n }\\n}\\n\\n.media-default-skin .media-slider:active .media-slider__thumb,\\n.media-default-skin .media-slider__thumb--persistent {\\n width: 0.75rem;\\n height: 0.75rem;\\n}\\n\\n.media-default-skin .media-slider:hover .media-slider__thumb,\\n.media-default-skin .media-slider__thumb:focus-visible,\\n.media-default-skin .media-slider__thumb--persistent {\\n opacity: 1;\\n}\\n\\n/* Shared track fills */\\n.media-default-skin .media-slider__buffer,\\n.media-default-skin .media-slider__fill {\\n position: absolute;\\n border-radius: inherit;\\n pointer-events: none;\\n}\\n\\n.media-default-skin .media-slider__buffer[data-orientation=\\\"horizontal\\\"],\\n.media-default-skin .media-slider__fill[data-orientation=\\\"horizontal\\\"] {\\n inset-block: 0;\\n left: 0;\\n}\\n\\n.media-default-skin .media-slider__buffer[data-orientation=\\\"vertical\\\"],\\n.media-default-skin .media-slider__fill[data-orientation=\\\"vertical\\\"] {\\n inset-inline: 0;\\n bottom: 0;\\n}\\n\\n/* Buffer */\\n.media-default-skin .media-slider__buffer {\\n background-color: oklch(from currentColor l c h / 0.2);\\n transition-duration: 0.25s;\\n transition-timing-function: ease-out;\\n\\n &[data-orientation=\\\"horizontal\\\"] {\\n width: var(--media-slider-buffer);\\n transition-property: width;\\n }\\n\\n &[data-orientation=\\\"vertical\\\"] {\\n height: var(--media-slider-buffer);\\n transition-property: height;\\n }\\n}\\n\\n/* Fill */\\n.media-default-skin .media-slider__fill {\\n background-color: currentColor;\\n\\n &[data-orientation=\\\"horizontal\\\"] {\\n width: var(--media-slider-fill);\\n }\\n\\n &[data-orientation=\\\"vertical\\\"] {\\n height: var(--media-slider-fill);\\n }\\n}\\n\\n/* Time display within slider */\\n.media-default-skin .media-slider__time-display {\\n font-variant-numeric: tabular-nums;\\n}\\n\\n/* ==========================================================================\\n Popups & Tooltips\\n ========================================================================== */\\n\\n.media-default-skin .media-popover,\\n.media-default-skin .media-tooltip {\\n margin: 0;\\n border: 0;\\n color: inherit;\\n overflow: visible;\\n transition-property: transform, scale, opacity, filter;\\n transition-duration: 200ms;\\n\\n &[data-starting-style],\\n &[data-ending-style] {\\n opacity: 0;\\n transform: scale(0);\\n filter: blur(8px);\\n }\\n\\n &[data-instant] {\\n transition-duration: 0ms;\\n }\\n\\n &[data-side=\\\"top\\\"] {\\n transform-origin: bottom;\\n }\\n &[data-side=\\\"bottom\\\"] {\\n transform-origin: top;\\n }\\n &[data-side=\\\"left\\\"] {\\n transform-origin: right;\\n }\\n &[data-side=\\\"right\\\"] {\\n transform-origin: left;\\n }\\n}\\n\\n.media-default-skin .media-popover {\\n --media-popover-side-offset: 0.5rem;\\n}\\n.media-default-skin .media-popover--volume {\\n padding: 0.625rem 0.25rem;\\n border-radius: calc(infinity * 1px);\\n}\\n\\n.media-default-skin .media-tooltip {\\n padding: 0.25rem 0.625rem;\\n border-radius: calc(infinity * 1px);\\n font-size: 0.75rem;\\n white-space: nowrap;\\n --media-tooltip-side-offset: 0.5rem;\\n}\\n\\n\\n/* ==========================================================================\\n Root\\n ========================================================================== */\\n\\n.media-default-skin--audio {\\n --media-border-color: oklch(0 0 0 / 0.1);\\n --media-surface-background-color: oklch(1 0 0 / 0.5);\\n --media-surface-inner-border-color: oklch(1 0 0 / 0.1);\\n --media-surface-outer-border-color: oklch(0 0 0 / 0.05);\\n --media-surface-shadow-color: oklch(0 0 0 / 0.15);\\n --media-surface-backdrop-filter: blur(8px) brightness(0.98) saturate(1.2);\\n\\n @media (prefers-color-scheme: dark) {\\n --media-border-color: oklch(1 0 0 / 0.1);\\n --media-surface-background-color: oklch(0 0 0 / 0.4);\\n }\\n}\\n\\n/* ==========================================================================\\n Controls\\n ========================================================================== */\\n\\n.media-default-skin--audio .media-controls {\\n @media (prefers-color-scheme: dark) {\\n color: oklch(1 0 0);\\n }\\n}\\n\\n/* ==========================================================================\\n Sliders\\n ========================================================================== */\\n.media-default-skin--audio .media-slider__track {\\n background-color: oklch(0 0 0 / 0.1);\\n\\n @media (prefers-color-scheme: dark) {\\n background-color: oklch(1 0 0 / 0.2);\\n box-shadow: 0 0 0 1px oklch(0 0 0 / 0.05);\\n }\\n}\\n\\n\";","import { MediaContainerElement } from '../../media/container-element';\nimport { safeDefine } from '../safe-define';\n\nsafeDefine(MediaContainerElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [MediaContainerElement.tagName]: MediaContainerElement;\n }\n}\n","//#region src/core/ui/transition.ts\nfunction getTransitionFlags(status) {\n\treturn {\n\t\ttransitionStarting: status === \"starting\",\n\t\ttransitionEnding: status === \"ending\"\n\t};\n}\n\n//#endregion\nexport { getTransitionFlags };\n//# sourceMappingURL=transition.js.map","import { defaults } from \"@videojs/utils/object\";\nimport { isFunction } from \"@videojs/utils/predicate\";\n\n//#region src/core/ui/mute-button/mute-button-core.ts\nvar MuteButtonCore = class MuteButtonCore {\n\tstatic defaultProps = {\n\t\tlabel: \"\",\n\t\tdisabled: false\n\t};\n\t#props = { ...MuteButtonCore.defaultProps };\n\t#media = null;\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, MuteButtonCore.defaultProps);\n\t}\n\tgetLabel(state) {\n\t\tconst { label } = this.#props;\n\t\tif (isFunction(label)) {\n\t\t\tconst customLabel = label(state);\n\t\t\tif (customLabel) return customLabel;\n\t\t} else if (label) return label;\n\t\treturn state.muted ? \"Unmute\" : \"Mute\";\n\t}\n\tgetAttrs(state) {\n\t\treturn {\n\t\t\t\"aria-label\": this.getLabel(state),\n\t\t\t\"aria-disabled\": this.#props.disabled ? \"true\" : void 0\n\t\t};\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\tgetState() {\n\t\tconst media = this.#media;\n\t\treturn {\n\t\t\tmuted: media.muted || media.volume === 0,\n\t\t\tvolumeLevel: getVolumeLevel(media)\n\t\t};\n\t}\n\ttoggle(media) {\n\t\tif (this.#props.disabled) return;\n\t\tmedia.toggleMuted();\n\t}\n};\nfunction getVolumeLevel(media) {\n\tif (media.muted || media.volume === 0) return \"off\";\n\tif (media.volume < .5) return \"low\";\n\tif (media.volume < .75) return \"medium\";\n\treturn \"high\";\n}\n\n//#endregion\nexport { MuteButtonCore };\n//# sourceMappingURL=mute-button-core.js.map","//#region src/core/ui/mute-button/mute-button-data-attrs.ts\nconst MuteButtonDataAttrs = {\n\tmuted: \"data-muted\",\n\tvolumeLevel: \"data-volume-level\"\n};\n\n//#endregion\nexport { MuteButtonDataAttrs };\n//# sourceMappingURL=mute-button-data-attrs.js.map","import { defaults } from \"@videojs/utils/object\";\nimport { isFunction } from \"@videojs/utils/predicate\";\n\n//#region src/core/ui/play-button/play-button-core.ts\nvar PlayButtonCore = class PlayButtonCore {\n\tstatic defaultProps = {\n\t\tlabel: \"\",\n\t\tdisabled: false\n\t};\n\t#props = { ...PlayButtonCore.defaultProps };\n\t#media = null;\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, PlayButtonCore.defaultProps);\n\t}\n\tgetLabel(state) {\n\t\tconst { label } = this.#props;\n\t\tif (isFunction(label)) {\n\t\t\tconst customLabel = label(state);\n\t\t\tif (customLabel) return customLabel;\n\t\t} else if (label) return label;\n\t\tif (state.ended) return \"Replay\";\n\t\treturn state.paused ? \"Play\" : \"Pause\";\n\t}\n\tgetAttrs(state) {\n\t\treturn {\n\t\t\t\"aria-label\": this.getLabel(state),\n\t\t\t\"aria-disabled\": this.#props.disabled ? \"true\" : void 0\n\t\t};\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\tgetState() {\n\t\tconst media = this.#media;\n\t\treturn {\n\t\t\tpaused: media.paused,\n\t\t\tended: media.ended,\n\t\t\tstarted: media.started\n\t\t};\n\t}\n\tasync toggle(media) {\n\t\tif (this.#props.disabled) return;\n\t\tif (media.paused || media.ended) return media.play();\n\t\tmedia.pause();\n\t}\n};\n\n//#endregion\nexport { PlayButtonCore };\n//# sourceMappingURL=play-button-core.js.map","//#region src/core/ui/play-button/play-button-data-attrs.ts\nconst PlayButtonDataAttrs = {\n\tpaused: \"data-paused\",\n\tended: \"data-ended\",\n\tstarted: \"data-started\"\n};\n\n//#endregion\nexport { PlayButtonDataAttrs };\n//# sourceMappingURL=play-button-data-attrs.js.map","import { defaults } from \"@videojs/utils/object\";\nimport { isFunction } from \"@videojs/utils/predicate\";\n\n//#region src/core/ui/playback-rate-button/playback-rate-button-core.ts\nvar PlaybackRateButtonCore = class PlaybackRateButtonCore {\n\tstatic defaultProps = {\n\t\tlabel: \"\",\n\t\tdisabled: false\n\t};\n\t#props = { ...PlaybackRateButtonCore.defaultProps };\n\t#media = null;\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, PlaybackRateButtonCore.defaultProps);\n\t}\n\tgetLabel(state) {\n\t\tconst { label } = this.#props;\n\t\tif (isFunction(label)) {\n\t\t\tconst customLabel = label(state);\n\t\t\tif (customLabel) return customLabel;\n\t\t} else if (label) return label;\n\t\treturn `Playback rate ${state.rate}`;\n\t}\n\tgetAttrs(state) {\n\t\treturn {\n\t\t\t\"aria-label\": this.getLabel(state),\n\t\t\t\"aria-disabled\": this.#props.disabled ? \"true\" : void 0\n\t\t};\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\tgetState() {\n\t\treturn { rate: this.#media.playbackRate };\n\t}\n\tcycle(media) {\n\t\tif (this.#props.disabled) return;\n\t\tconst { playbackRates, playbackRate } = media;\n\t\tif (playbackRates.length === 0) return;\n\t\tconst idx = playbackRates.indexOf(playbackRate);\n\t\tconst next = idx === -1 ? playbackRates.find((r) => r > playbackRate) ?? playbackRates[0] : playbackRates[(idx + 1) % playbackRates.length];\n\t\tmedia.setPlaybackRate(next);\n\t}\n};\n\n//#endregion\nexport { PlaybackRateButtonCore };\n//# sourceMappingURL=playback-rate-button-core.js.map","//#region src/core/ui/playback-rate-button/playback-rate-button-data-attrs.ts\nconst PlaybackRateButtonDataAttrs = { rate: \"data-rate\" };\n\n//#endregion\nexport { PlaybackRateButtonDataAttrs };\n//# sourceMappingURL=playback-rate-button-data-attrs.js.map","import { getTransitionFlags } from \"../transition.js\";\nimport { defaults } from \"@videojs/utils/object\";\n\n//#region src/core/ui/popover/popover-core.ts\nvar PopoverCore = class PopoverCore {\n\tstatic defaultProps = {\n\t\tside: \"top\",\n\t\talign: \"center\",\n\t\tmodal: false,\n\t\tcloseOnEscape: true,\n\t\tcloseOnOutsideClick: true,\n\t\topen: false,\n\t\tdefaultOpen: false,\n\t\topenOnHover: false,\n\t\tdelay: 300,\n\t\tcloseDelay: 0\n\t};\n\t#props = { ...PopoverCore.defaultProps };\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, PopoverCore.defaultProps);\n\t}\n\t#input = null;\n\tsetInput(input) {\n\t\tthis.#input = input;\n\t}\n\tgetState() {\n\t\tconst input = this.#input;\n\t\treturn {\n\t\t\topen: input.active,\n\t\t\tstatus: input.status,\n\t\t\tside: this.#props.side,\n\t\t\talign: this.#props.align,\n\t\t\tmodal: this.#props.modal,\n\t\t\t...getTransitionFlags(input.status)\n\t\t};\n\t}\n\tgetTriggerAttrs(state, popupId) {\n\t\treturn {\n\t\t\t\"aria-expanded\": state.open ? \"true\" : \"false\",\n\t\t\t\"aria-haspopup\": \"dialog\",\n\t\t\t\"aria-controls\": popupId\n\t\t};\n\t}\n\tgetPopupAttrs(state) {\n\t\treturn {\n\t\t\tpopover: \"manual\",\n\t\t\trole: \"dialog\",\n\t\t\t\"aria-modal\": state.modal === true ? \"true\" : void 0\n\t\t};\n\t}\n};\n\n//#endregion\nexport { PopoverCore };\n//# sourceMappingURL=popover-core.js.map","//#region src/core/ui/popover/popover-data-attrs.ts\nconst PopoverDataAttrs = {\n\topen: \"data-open\",\n\tside: \"data-side\",\n\talign: \"data-align\",\n\ttransitionStarting: \"data-starting-style\",\n\ttransitionEnding: \"data-ending-style\"\n};\n\n//#endregion\nexport { PopoverDataAttrs };\n//# sourceMappingURL=popover-data-attrs.js.map","import { defaults } from \"@videojs/utils/object\";\nimport { isFunction } from \"@videojs/utils/predicate\";\n\n//#region src/core/ui/seek-button/seek-button-core.ts\nvar SeekButtonCore = class SeekButtonCore {\n\tstatic defaultProps = {\n\t\tseconds: 30,\n\t\tlabel: \"\",\n\t\tdisabled: false\n\t};\n\t#props = { ...SeekButtonCore.defaultProps };\n\t#media = null;\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, SeekButtonCore.defaultProps);\n\t}\n\tgetLabel(state) {\n\t\tconst { label } = this.#props;\n\t\tif (isFunction(label)) {\n\t\t\tconst customLabel = label(state);\n\t\t\tif (customLabel) return customLabel;\n\t\t} else if (label) return label;\n\t\tconst abs = Math.abs(this.#props.seconds);\n\t\treturn state.direction === \"backward\" ? `Seek backward ${abs} seconds` : `Seek forward ${abs} seconds`;\n\t}\n\tgetAttrs(state) {\n\t\treturn {\n\t\t\t\"aria-label\": this.getLabel(state),\n\t\t\t\"aria-disabled\": this.#props.disabled ? \"true\" : void 0\n\t\t};\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\tgetState() {\n\t\treturn {\n\t\t\tseeking: this.#media.seeking,\n\t\t\tdirection: this.#props.seconds < 0 ? \"backward\" : \"forward\"\n\t\t};\n\t}\n\tasync seek(media) {\n\t\tif (this.#props.disabled) return;\n\t\tawait media.seek(media.currentTime + this.#props.seconds);\n\t}\n};\n\n//#endregion\nexport { SeekButtonCore };\n//# sourceMappingURL=seek-button-core.js.map","//#region src/core/ui/seek-button/seek-button-data-attrs.ts\nconst SeekButtonDataAttrs = {\n\tseeking: \"data-seeking\",\n\tdirection: \"data-direction\"\n};\n\n//#endregion\nexport { SeekButtonDataAttrs };\n//# sourceMappingURL=seek-button-data-attrs.js.map","import { defaults } from \"@videojs/utils/object\";\nimport { isFunction } from \"@videojs/utils/predicate\";\nimport { clamp, roundToStep } from \"@videojs/utils/number\";\n\n//#region src/core/ui/slider/slider-core.ts\n/** Base slider logic: value mapping, ARIA attrs, and step calculations. */\nvar SliderCore = class SliderCore {\n\tstatic defaultProps = {\n\t\tlabel: \"\",\n\t\tstep: 1,\n\t\tlargeStep: 10,\n\t\torientation: \"horizontal\",\n\t\tdisabled: false,\n\t\tthumbAlignment: \"center\",\n\t\tvalue: 0,\n\t\tmin: 0,\n\t\tmax: 100\n\t};\n\tstatic defaultInput = {\n\t\tpointerPercent: 0,\n\t\tdragPercent: 0,\n\t\tdragging: false,\n\t\tpointing: false,\n\t\tfocused: false\n\t};\n\t#props = { ...SliderCore.defaultProps };\n\t#input = { ...SliderCore.defaultInput };\n\tget props() {\n\t\treturn this.#props;\n\t}\n\tget input() {\n\t\treturn this.#input;\n\t}\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, SliderCore.defaultProps);\n\t}\n\tsetInput(input) {\n\t\tthis.#input = input;\n\t}\n\tgetSliderState(value) {\n\t\tconst { orientation, disabled, thumbAlignment } = this.#props;\n\t\tconst { pointerPercent, dragging, pointing, focused } = this.#input;\n\t\treturn {\n\t\t\tvalue,\n\t\t\tfillPercent: this.percentFromValue(value),\n\t\t\tpointerPercent,\n\t\t\tdragging,\n\t\t\tpointing,\n\t\t\tinteractive: dragging || pointing || focused,\n\t\t\torientation,\n\t\t\tdisabled,\n\t\t\tthumbAlignment\n\t\t};\n\t}\n\tgetLabel(state) {\n\t\tconst { label } = this.#props;\n\t\tif (isFunction(label)) {\n\t\t\tconst customLabel = label(state);\n\t\t\tif (customLabel) return customLabel;\n\t\t} else if (label) return label;\n\t\treturn \"\";\n\t}\n\tgetAttrs(state) {\n\t\treturn {\n\t\t\trole: \"slider\",\n\t\t\ttabIndex: state.disabled ? -1 : 0,\n\t\t\tautoComplete: \"off\",\n\t\t\t\"aria-label\": this.getLabel(state),\n\t\t\t\"aria-valuemin\": this.#props.min,\n\t\t\t\"aria-valuemax\": this.#props.max,\n\t\t\t\"aria-valuenow\": state.value,\n\t\t\t\"aria-orientation\": state.orientation,\n\t\t\t\"aria-disabled\": state.disabled ? \"true\" : void 0\n\t\t};\n\t}\n\tvalueFromPercent(percent) {\n\t\tconst { min, max, step } = this.#props;\n\t\treturn roundToStep(clamp(min + percent / 100 * (max - min), min, max), step, min);\n\t}\n\tpercentFromValue(value) {\n\t\tconst { min, max } = this.#props;\n\t\tif (max === min) return 0;\n\t\treturn (value - min) / (max - min) * 100;\n\t}\n\t/** Step as a percentage of the slider range. */\n\tgetStepPercent() {\n\t\tconst { step, min, max } = this.#props;\n\t\tconst range = max - min;\n\t\treturn range > 0 ? step / range * 100 : 0;\n\t}\n\t/** Large step as a percentage of the slider range. */\n\tgetLargeStepPercent() {\n\t\tconst { largeStep, min, max } = this.#props;\n\t\tconst range = max - min;\n\t\treturn range > 0 ? largeStep / range * 100 : 0;\n\t}\n\tadjustPercentForAlignment(rawPercent, thumbSize, trackSize) {\n\t\tif (this.#props.thumbAlignment === \"center\" || trackSize === 0) return rawPercent;\n\t\tconst thumbHalf = thumbSize / trackSize * 100 / 2;\n\t\tconst minPercent = thumbHalf;\n\t\tconst maxPercent = 100 - thumbHalf;\n\t\treturn minPercent + rawPercent / 100 * (maxPercent - minPercent);\n\t}\n};\n\n//#endregion\nexport { SliderCore };\n//# sourceMappingURL=slider-core.js.map","//#region src/core/ui/slider/slider-data-attrs.ts\nconst SliderDataAttrs = {\n\tdragging: \"data-dragging\",\n\tpointing: \"data-pointing\",\n\tinteractive: \"data-interactive\",\n\torientation: \"data-orientation\",\n\tdisabled: \"data-disabled\"\n};\n\n//#endregion\nexport { SliderDataAttrs };\n//# sourceMappingURL=slider-data-attrs.js.map","//#region src/core/ui/thumbnail/thumbnail-data-attrs.ts\nconst ThumbnailDataAttrs = {\n\tloading: \"data-loading\",\n\terror: \"data-error\",\n\thidden: \"data-hidden\"\n};\n\n//#endregion\nexport { ThumbnailDataAttrs };\n//# sourceMappingURL=thumbnail-data-attrs.js.map","import { isNumber } from \"@videojs/utils/predicate\";\n\n//#region src/core/ui/thumbnail/thumbnail-media-fragment.ts\n/** Parse `url#xywh=x,y,w,h` into a URL and optional sprite coordinates. */\nfunction parseMediaFragment(text, baseURL) {\n\tconst parts = text.trim().split(\"#\");\n\tconst rawURL = parts[0] ?? \"\";\n\tconst hash = parts[1];\n\tconst url = baseURL ? new URL(rawURL, baseURL).href : rawURL;\n\tif (!hash) return { url };\n\tconst eqIndex = hash.indexOf(\"=\");\n\tif (eqIndex === -1) return { url };\n\tconst keys = hash.slice(0, eqIndex);\n\tconst values = hash.slice(eqIndex + 1).split(\",\").map(Number);\n\tconst data = {};\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst key = keys[i];\n\t\tconst value = values[i];\n\t\tif (key && isNumber(value) && !Number.isNaN(value)) data[key] = value;\n\t}\n\tconst result = { url };\n\tif (isNumber(data.w)) result.width = data.w;\n\tif (isNumber(data.h)) result.height = data.h;\n\tif (isNumber(data.x) && isNumber(data.y)) result.coords = {\n\t\tx: data.x,\n\t\ty: data.y\n\t};\n\treturn result;\n}\n/**\n* Convert an array of text cues (e.g. `VTTCue` from a `<track>` element)\n* into {@link ThumbnailImage} entries by parsing the media-fragment in\n* each cue's text.\n*/\nfunction mapCuesToThumbnails(cues, baseURL) {\n\tconst images = [];\n\tfor (const cue of cues) {\n\t\tconst fragment = parseMediaFragment(cue.text, baseURL);\n\t\tconst image = {\n\t\t\turl: fragment.url,\n\t\t\tstartTime: cue.startTime,\n\t\t\tendTime: cue.endTime\n\t\t};\n\t\tif (fragment.width) image.width = fragment.width;\n\t\tif (fragment.height) image.height = fragment.height;\n\t\tif (fragment.coords) image.coords = fragment.coords;\n\t\timages.push(image);\n\t}\n\treturn images;\n}\n\n//#endregion\nexport { mapCuesToThumbnails, parseMediaFragment };\n//# sourceMappingURL=thumbnail-media-fragment.js.map","import { isNumber } from \"../predicate/predicate.js\";\n\n//#region src/time/format.ts\nconst UNIT_LABELS = [\n\t{\n\t\tsingular: \"hour\",\n\t\tplural: \"hours\"\n\t},\n\t{\n\t\tsingular: \"minute\",\n\t\tplural: \"minutes\"\n\t},\n\t{\n\t\tsingular: \"second\",\n\t\tplural: \"seconds\"\n\t}\n];\nfunction isValidTime(value) {\n\treturn isNumber(value) && Number.isFinite(value);\n}\nfunction toTimeUnitPhrase(value, unitIndex) {\n\treturn `${value} ${value === 1 ? UNIT_LABELS[unitIndex]?.singular : UNIT_LABELS[unitIndex]?.plural}`;\n}\n/**\n* Format seconds to digital display string.\n*\n* @param seconds - Time in seconds (can be negative)\n* @param guide - Guide time (typically duration) to determine display format\n* @returns Formatted string like \"1:30\" or \"1:05:30\"\n*\n* @example\n* formatTime(90) // \"1:30\"\n* formatTime(3661) // \"1:01:01\"\n* formatTime(35, 3600) // \"0:00:35\" (guided by 1-hour duration)\n* formatTime(35, 600) // \"00:35\" (guided by 10-minute duration)\n*/\nfunction formatTime(seconds, guide) {\n\tif (!isValidTime(seconds)) return \"0:00\";\n\tconst negative = seconds < 0;\n\tconst positiveSeconds = Math.abs(seconds);\n\tconst h = Math.floor(positiveSeconds / 3600);\n\tconst m = Math.floor(positiveSeconds / 60 % 60);\n\tconst s = Math.floor(positiveSeconds % 60);\n\tconst guideAbs = guide ? Math.abs(guide) : 0;\n\tconst gh = Math.floor(guideAbs / 3600);\n\tconst gm = Math.floor(guideAbs / 60 % 60);\n\tconst showHours = h > 0 || gh > 0;\n\tconst padMinutes = showHours || gm >= 10;\n\tconst hoursStr = showHours ? `${h}:` : \"\";\n\tconst minutesStr = `${padMinutes && m < 10 ? \"0\" : \"\"}${m}:`;\n\tconst secondsStr = s < 10 ? `0${s}` : `${s}`;\n\treturn `${negative ? \"-\" : \"\"}${hoursStr}${minutesStr}${secondsStr}`;\n}\n/**\n* Format seconds to human-readable phrase for screen readers.\n*\n* @param seconds - Time in seconds (negative indicates remaining)\n* @returns Human-readable phrase like \"1 minute, 30 seconds\"\n*\n* @example\n* formatTimeAsPhrase(90) // \"1 minute, 30 seconds\"\n* formatTimeAsPhrase(3661) // \"1 hour, 1 minute, 1 second\"\n* formatTimeAsPhrase(-270) // \"4 minutes, 30 seconds remaining\"\n*/\nfunction formatTimeAsPhrase(seconds) {\n\tif (!isValidTime(seconds)) return \"\";\n\tconst negative = seconds < 0;\n\tconst positiveSeconds = Math.abs(seconds);\n\tconst h = Math.floor(positiveSeconds / 3600);\n\tconst m = Math.floor(positiveSeconds / 60 % 60);\n\tconst s = Math.floor(positiveSeconds % 60);\n\tif (positiveSeconds === 0) return `${toTimeUnitPhrase(0, 2)}${negative ? \" remaining\" : \"\"}`;\n\treturn `${[\n\t\th,\n\t\tm,\n\t\ts\n\t].map((value, index) => value > 0 ? toTimeUnitPhrase(value, index) : null).filter(Boolean).join(\", \")}${negative ? \" remaining\" : \"\"}`;\n}\n/**\n* Convert seconds to ISO 8601 duration for datetime attribute.\n*\n* @param seconds - Time in seconds\n* @returns ISO 8601 duration string like \"PT1M30S\"\n*\n* @example\n* secondsToIsoDuration(90) // \"PT1M30S\"\n* secondsToIsoDuration(3661) // \"PT1H1M1S\"\n*/\nfunction secondsToIsoDuration(seconds) {\n\tif (!isValidTime(seconds)) return \"PT0S\";\n\tconst positiveSeconds = Math.abs(seconds);\n\tconst h = Math.floor(positiveSeconds / 3600);\n\tconst m = Math.floor(positiveSeconds / 60 % 60);\n\tconst s = Math.floor(positiveSeconds % 60);\n\tlet duration = \"PT\";\n\tif (h > 0) duration += `${h}H`;\n\tif (m > 0) duration += `${m}M`;\n\tif (s > 0 || duration === \"PT\") duration += `${s}S`;\n\treturn duration;\n}\n\n//#endregion\nexport { formatTime, formatTimeAsPhrase, secondsToIsoDuration };\n//# sourceMappingURL=format.js.map","import { defaults } from \"@videojs/utils/object\";\nimport { isFunction } from \"@videojs/utils/predicate\";\nimport { formatTime, formatTimeAsPhrase, secondsToIsoDuration } from \"@videojs/utils/time\";\n\n//#region src/core/ui/time/time-core.ts\nconst DEFAULT_LABELS = {\n\tcurrent: \"Current time\",\n\tduration: \"Duration\",\n\tremaining: \"Remaining\"\n};\nvar TimeCore = class TimeCore {\n\tstatic defaultProps = {\n\t\ttype: \"current\",\n\t\tnegativeSign: \"-\",\n\t\tlabel: \"\"\n\t};\n\t#props = { ...TimeCore.defaultProps };\n\t#media = null;\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, TimeCore.defaultProps);\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\t#getSeconds() {\n\t\tconst media = this.#media;\n\t\tconst { type } = this.#props;\n\t\tswitch (type) {\n\t\t\tcase \"current\": return media.currentTime;\n\t\t\tcase \"duration\": return media.duration;\n\t\t\tcase \"remaining\": return media.currentTime - media.duration;\n\t\t\tdefault: return 0;\n\t\t}\n\t}\n\t#getText() {\n\t\tconst media = this.#media;\n\t\tconst seconds = this.#getSeconds();\n\t\treturn formatTime(Math.abs(seconds), media.duration);\n\t}\n\t#getPhrase() {\n\t\tconst { type } = this.#props;\n\t\tconst seconds = this.#getSeconds();\n\t\tif (type === \"remaining\") return formatTimeAsPhrase(seconds < 0 ? seconds : -Math.abs(seconds));\n\t\treturn formatTimeAsPhrase(seconds);\n\t}\n\t#getDatetime() {\n\t\tconst seconds = this.#getSeconds();\n\t\treturn secondsToIsoDuration(Math.abs(seconds));\n\t}\n\tgetLabel(state) {\n\t\tconst { label } = this.#props;\n\t\tif (isFunction(label)) {\n\t\t\tconst customLabel = label(state);\n\t\t\tif (customLabel) return customLabel;\n\t\t} else if (label) return label;\n\t\treturn DEFAULT_LABELS[this.#props.type];\n\t}\n\tgetAttrs(state) {\n\t\treturn {\n\t\t\t\"aria-label\": this.getLabel(state),\n\t\t\t\"aria-valuetext\": state.phrase\n\t\t};\n\t}\n\tgetState() {\n\t\tconst seconds = this.#getSeconds();\n\t\treturn {\n\t\t\ttype: this.#props.type,\n\t\t\tseconds,\n\t\t\tnegative: this.#props.type === \"remaining\" && seconds < 0,\n\t\t\ttext: this.#getText(),\n\t\t\tphrase: this.#getPhrase(),\n\t\t\tdatetime: this.#getDatetime()\n\t\t};\n\t}\n};\n\n//#endregion\nexport { TimeCore };\n//# sourceMappingURL=time-core.js.map","//#region src/core/ui/time/time-data-attrs.ts\nconst TimeDataAttrs = { type: \"data-type\" };\n\n//#endregion\nexport { TimeDataAttrs };\n//# sourceMappingURL=time-data-attrs.js.map","import { SliderCore } from \"../slider/slider-core.js\";\nimport { defaults } from \"@videojs/utils/object\";\nimport { clamp } from \"@videojs/utils/number\";\nimport { formatTimeAsPhrase } from \"@videojs/utils/time\";\n\n//#region src/core/ui/time-slider/time-slider-core.ts\n/** Time-domain slider: maps media time/buffer state to slider state. */\nvar TimeSliderCore = class TimeSliderCore extends SliderCore {\n\tstatic defaultProps = {\n\t\t...SliderCore.defaultProps,\n\t\tlabel: \"Seek\",\n\t\tcommitThrottle: 100\n\t};\n\t#props = { ...TimeSliderCore.defaultProps };\n\t#media = null;\n\tconstructor(props) {\n\t\tsuper();\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, TimeSliderCore.defaultProps);\n\t\tsuper.setProps({\n\t\t\t...props,\n\t\t\tmin: 0\n\t\t});\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\tgetState() {\n\t\tconst { duration, currentTime, seeking, buffered } = this.#media;\n\t\tconst { dragging, dragPercent } = this.input;\n\t\tsuper.setProps({\n\t\t\t...this.#props,\n\t\t\tmin: 0,\n\t\t\tmax: duration\n\t\t});\n\t\tconst value = dragging ? clamp(dragPercent / 100 * duration, 0, duration) : currentTime;\n\t\tconst base = super.getSliderState(value);\n\t\tconst bufferedEnd = buffered.length > 0 ? buffered[buffered.length - 1][1] : 0;\n\t\tconst bufferPercent = duration > 0 ? bufferedEnd / duration * 100 : 0;\n\t\treturn {\n\t\t\t...base,\n\t\t\tcurrentTime,\n\t\t\tduration,\n\t\t\tseeking,\n\t\t\tbufferPercent\n\t\t};\n\t}\n\tgetLabel(state) {\n\t\treturn super.getLabel(state) || \"Seek\";\n\t}\n\tgetAttrs(state) {\n\t\tconst base = super.getAttrs(state);\n\t\tconst currentPhrase = formatTimeAsPhrase(state.value);\n\t\tconst durationPhrase = formatTimeAsPhrase(state.duration);\n\t\tconst valuetext = durationPhrase ? `${currentPhrase} of ${durationPhrase}` : currentPhrase;\n\t\treturn {\n\t\t\t...base,\n\t\t\t\"aria-valuetext\": valuetext\n\t\t};\n\t}\n};\n\n//#endregion\nexport { TimeSliderCore };\n//# sourceMappingURL=time-slider-core.js.map","import { SliderDataAttrs } from \"../slider/slider-data-attrs.js\";\n\n//#region src/core/ui/time-slider/time-slider-data-attrs.ts\nconst TimeSliderDataAttrs = {\n\t...SliderDataAttrs,\n\tseeking: \"data-seeking\"\n};\n\n//#endregion\nexport { TimeSliderDataAttrs };\n//# sourceMappingURL=time-slider-data-attrs.js.map","import { getTransitionFlags } from \"../transition.js\";\nimport { defaults } from \"@videojs/utils/object\";\n\n//#region src/core/ui/tooltip/tooltip-core.ts\nvar TooltipCore = class TooltipCore {\n\tstatic defaultProps = {\n\t\tside: \"top\",\n\t\talign: \"center\",\n\t\topen: false,\n\t\tdefaultOpen: false,\n\t\tdelay: 600,\n\t\tcloseDelay: 0,\n\t\tdisableHoverablePopup: true,\n\t\tdisabled: false\n\t};\n\t#props = { ...TooltipCore.defaultProps };\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, TooltipCore.defaultProps);\n\t}\n\t#input = null;\n\tsetInput(input) {\n\t\tthis.#input = input;\n\t}\n\tgetState() {\n\t\tconst input = this.#input;\n\t\treturn {\n\t\t\topen: input.active,\n\t\t\tstatus: input.status,\n\t\t\tside: this.#props.side,\n\t\t\talign: this.#props.align,\n\t\t\t...getTransitionFlags(input.status)\n\t\t};\n\t}\n\tgetTriggerAttrs(state, popupId) {\n\t\treturn { \"aria-describedby\": state.open ? popupId : void 0 };\n\t}\n\tgetPopupAttrs(_state) {\n\t\treturn {\n\t\t\tpopover: \"manual\",\n\t\t\trole: \"tooltip\"\n\t\t};\n\t}\n};\n\n//#endregion\nexport { TooltipCore };\n//# sourceMappingURL=tooltip-core.js.map","//#region src/core/ui/tooltip/tooltip-css-vars.ts\nconst TooltipCSSVars = {\n\tsideOffset: \"--media-tooltip-side-offset\",\n\talignOffset: \"--media-tooltip-align-offset\",\n\tanchorWidth: \"--media-tooltip-anchor-width\",\n\tanchorHeight: \"--media-tooltip-anchor-height\",\n\tavailableWidth: \"--media-tooltip-available-width\",\n\tavailableHeight: \"--media-tooltip-available-height\"\n};\n\n//#endregion\nexport { TooltipCSSVars };\n//# sourceMappingURL=tooltip-css-vars.js.map","//#region src/core/ui/tooltip/tooltip-data-attrs.ts\nconst TooltipDataAttrs = {\n\topen: \"data-open\",\n\tside: \"data-side\",\n\talign: \"data-align\",\n\ttransitionStarting: \"data-starting-style\",\n\ttransitionEnding: \"data-ending-style\"\n};\n\n//#endregion\nexport { TooltipDataAttrs };\n//# sourceMappingURL=tooltip-data-attrs.js.map","import { SliderCore } from \"../slider/slider-core.js\";\nimport { defaults } from \"@videojs/utils/object\";\n\n//#region src/core/ui/volume-slider/volume-slider-core.ts\n/** Volume-domain slider: maps media volume/mute state to slider state. */\nvar VolumeSliderCore = class VolumeSliderCore extends SliderCore {\n\tstatic defaultProps = {\n\t\t...SliderCore.defaultProps,\n\t\tlabel: \"Volume\"\n\t};\n\t#media = null;\n\tconstructor(props) {\n\t\tsuper();\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tsuper.setProps(defaults(props, VolumeSliderCore.defaultProps));\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\tgetState() {\n\t\tconst { volume, muted } = this.#media;\n\t\tconst effectivelyMuted = muted || volume === 0;\n\t\tconst { dragging, dragPercent } = this.input;\n\t\tconst volumePercent = volume * 100;\n\t\tconst value = dragging ? this.valueFromPercent(dragPercent) : volumePercent;\n\t\tconst base = super.getSliderState(value);\n\t\treturn {\n\t\t\t...base,\n\t\t\tfillPercent: effectivelyMuted ? 0 : base.fillPercent,\n\t\t\tvolume,\n\t\t\tmuted: effectivelyMuted\n\t\t};\n\t}\n\tgetLabel(state) {\n\t\treturn super.getLabel(state) || \"Volume\";\n\t}\n\tgetAttrs(state) {\n\t\tconst base = super.getAttrs(state);\n\t\tconst valuetext = `${Math.round(state.value)} percent${state.muted ? \", muted\" : \"\"}`;\n\t\treturn {\n\t\t\t...base,\n\t\t\t\"aria-valuetext\": valuetext\n\t\t};\n\t}\n};\n\n//#endregion\nexport { VolumeSliderCore };\n//# sourceMappingURL=volume-slider-core.js.map","import { SliderDataAttrs } from \"../slider/slider-data-attrs.js\";\n\n//#region src/core/ui/volume-slider/volume-slider-data-attrs.ts\nconst VolumeSliderDataAttrs = { ...SliderDataAttrs };\n\n//#endregion\nexport { VolumeSliderDataAttrs };\n//# sourceMappingURL=volume-slider-data-attrs.js.map","import type { InferComponentState, InferMediaState, MediaUIComponent, StateAttrMap } from '@videojs/core';\nimport { applyElementProps, applyStateDataAttrs, createButton, logMissingFeature } from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\n\nimport type { PlayerController } from '../player/player-controller';\nimport { MediaElement } from './media-element';\n\n/** Abstract base for HTML custom elements that render a media-control button. */\nexport abstract class MediaButtonElement<Core extends MediaUIComponent> extends MediaElement {\n static override properties: PropertyDeclarationMap = {\n label: { type: String },\n disabled: { type: Boolean },\n };\n\n disabled = false;\n label = '';\n\n protected abstract readonly core: Core;\n protected abstract readonly stateAttrMap: StateAttrMap<InferComponentState<Core>>;\n protected abstract readonly mediaState: PlayerController<any, InferMediaState<Core> | undefined>;\n\n protected abstract activate(state: InferMediaState<Core>): void;\n\n #disconnect: AbortController | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n this.#disconnect = new AbortController();\n\n const buttonProps = createButton({\n onActivate: () => this.activate(this.mediaState.value!),\n isDisabled: () => this.disabled || !this.mediaState.value,\n });\n\n applyElementProps(this, buttonProps, { signal: this.#disconnect.signal });\n\n if (__DEV__ && !this.mediaState.value && this.mediaState.displayName) {\n logMissingFeature(this.localName, this.mediaState.displayName);\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#disconnect?.abort();\n this.#disconnect = null;\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n this.core.setProps?.(this);\n }\n\n protected override update(changed: PropertyValues): void {\n super.update(changed);\n\n const media = this.mediaState.value;\n\n if (!media) return;\n\n this.core.setMedia(media);\n const state = this.core.getState();\n applyElementProps(this, this.core.getAttrs?.(state) ?? {});\n applyStateDataAttrs(this, state, this.stateAttrMap);\n }\n}\n","import { type MediaVolumeState, MuteButtonCore, MuteButtonDataAttrs } from '@videojs/core';\nimport { selectVolume } from '@videojs/core/dom';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaButtonElement } from '../media-button-element';\n\nexport class MuteButtonElement extends MediaButtonElement<MuteButtonCore> {\n static readonly tagName = 'media-mute-button';\n\n protected readonly core = new MuteButtonCore();\n protected readonly stateAttrMap = MuteButtonDataAttrs;\n protected readonly mediaState = new PlayerController(this, playerContext, selectVolume);\n\n protected activate(state: MediaVolumeState): void {\n this.core.toggle(state);\n }\n}\n","import { MuteButtonElement } from '../../ui/mute-button/mute-button-element';\nimport { safeDefine } from '../safe-define';\n\nsafeDefine(MuteButtonElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [MuteButtonElement.tagName]: MuteButtonElement;\n }\n}\n","import { type MediaPlaybackState, PlayButtonCore, PlayButtonDataAttrs } from '@videojs/core';\nimport { selectPlayback } from '@videojs/core/dom';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaButtonElement } from '../media-button-element';\n\nexport class PlayButtonElement extends MediaButtonElement<PlayButtonCore> {\n static readonly tagName = 'media-play-button';\n\n protected readonly core = new PlayButtonCore();\n protected readonly stateAttrMap = PlayButtonDataAttrs;\n protected readonly mediaState = new PlayerController(this, playerContext, selectPlayback);\n\n protected activate(state: MediaPlaybackState): void {\n this.core.toggle(state);\n }\n}\n","import { PlayButtonElement } from '../../ui/play-button/play-button-element';\nimport { safeDefine } from '../safe-define';\n\nsafeDefine(PlayButtonElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [PlayButtonElement.tagName]: PlayButtonElement;\n }\n}\n","import { type MediaPlaybackRateState, PlaybackRateButtonCore, PlaybackRateButtonDataAttrs } from '@videojs/core';\nimport { selectPlaybackRate } from '@videojs/core/dom';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaButtonElement } from '../media-button-element';\n\nexport class PlaybackRateButtonElement extends MediaButtonElement<PlaybackRateButtonCore> {\n static readonly tagName = 'media-playback-rate-button';\n\n protected readonly core = new PlaybackRateButtonCore();\n protected readonly stateAttrMap = PlaybackRateButtonDataAttrs;\n protected readonly mediaState = new PlayerController(this, playerContext, selectPlaybackRate);\n\n protected activate(state: MediaPlaybackRateState): void {\n this.core.cycle(state);\n }\n}\n","import { PlaybackRateButtonElement } from '../../ui/playback-rate-button/playback-rate-button-element';\nimport { safeDefine } from '../safe-define';\n\nsafeDefine(PlaybackRateButtonElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [PlaybackRateButtonElement.tagName]: PlaybackRateButtonElement;\n }\n}\n","import { PopoverCore, PopoverDataAttrs, type PopoverInput, type PopoverProps } from '@videojs/core';\nimport {\n applyElementProps,\n applyStateDataAttrs,\n createPopover,\n createTransition,\n getAnchorNameStyle,\n getAnchorPositionStyle,\n type PopoverApi,\n type PopoverChangeDetails,\n resolveOffsets,\n} from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\nimport { SnapshotController } from '@videojs/store/html';\nimport { applyStyles, supportsAnchorPositioning, tryHidePopover, tryShowPopover } from '@videojs/utils/dom';\n\nimport { MediaElement } from '../media-element';\n\nexport class PopoverElement extends MediaElement {\n static readonly tagName = 'media-popover';\n\n static override properties = {\n open: { type: Boolean },\n defaultOpen: { type: Boolean, attribute: 'default-open' },\n side: { type: String },\n align: { type: String },\n modal: { type: Boolean },\n closeOnEscape: { type: Boolean, attribute: 'close-on-escape' },\n closeOnOutsideClick: { type: Boolean, attribute: 'close-on-outside-click' },\n openOnHover: { type: Boolean, attribute: 'open-on-hover' },\n delay: { type: Number },\n closeDelay: { type: Number, attribute: 'close-delay' },\n } satisfies PropertyDeclarationMap<keyof PopoverCore.Props>;\n\n open = PopoverCore.defaultProps.open;\n defaultOpen = PopoverCore.defaultProps.defaultOpen;\n side = PopoverCore.defaultProps.side;\n align = PopoverCore.defaultProps.align;\n modal: PopoverProps['modal'] = PopoverCore.defaultProps.modal;\n closeOnEscape = PopoverCore.defaultProps.closeOnEscape;\n closeOnOutsideClick = PopoverCore.defaultProps.closeOnOutsideClick;\n openOnHover = PopoverCore.defaultProps.openOnHover;\n delay = PopoverCore.defaultProps.delay;\n closeDelay = PopoverCore.defaultProps.closeDelay;\n\n readonly #core = new PopoverCore();\n #popover: PopoverApi | null = null;\n #snapshot: SnapshotController<PopoverInput> | null = null;\n\n // Cleanup controllers\n #disconnect: AbortController | null = null;\n #triggerAbort: AbortController | null = null;\n #currentTrigger: HTMLElement | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.destroyed) return;\n\n this.#disconnect = new AbortController();\n\n this.#popover = createPopover({\n transition: createTransition(),\n onOpenChange: (nextOpen: boolean, details: PopoverChangeDetails) => {\n this.open = nextOpen;\n this.dispatchEvent(new CustomEvent('open-change', { detail: { open: nextOpen, ...details } }));\n },\n closeOnEscape: () => this.closeOnEscape,\n closeOnOutsideClick: () => this.closeOnOutsideClick,\n openOnHover: () => this.openOnHover,\n delay: () => this.delay,\n closeDelay: () => this.closeDelay,\n });\n\n // Register self as the popup element — the element IS the popup.\n this.#popover.setPopupElement(this);\n\n // Apply popup event handlers (pointerenter/leave, focusout) to self.\n applyElementProps(this, this.#popover.popupProps, { signal: this.#disconnect.signal });\n\n // Subscribe to interaction state for reactive updates.\n // Reuse the controller across connect/disconnect cycles to avoid\n // leaking stale controllers in the host's controller set.\n if (this.#snapshot) {\n this.#snapshot.track(this.#popover.input);\n } else {\n this.#snapshot = new SnapshotController(this, this.#popover.input);\n }\n }\n\n protected override firstUpdated(changed: PropertyValues): void {\n super.firstUpdated(changed);\n\n // Uncontrolled mode: open if `defaultOpen` is set. Controlled `open`\n // is already synced by `willUpdate` on the first render cycle.\n if (this.defaultOpen && !this.open) {\n this.#popover?.open();\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#disconnect?.abort();\n this.#disconnect = null;\n }\n\n override destroyCallback(): void {\n this.#cleanupTrigger();\n this.#popover?.destroy();\n super.destroyCallback();\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n this.#core.setProps(this);\n\n // Sync controlled open state\n if (this.#popover && changed.has('open')) {\n const { active: interactionOpen } = this.#popover.input.current;\n if (this.open !== interactionOpen) {\n if (this.open) {\n this.#popover.open();\n } else {\n this.#popover.close();\n }\n }\n }\n }\n\n protected override update(_changed: PropertyValues): void {\n super.update(_changed);\n if (!this.#popover) return;\n\n // Discover trigger via commandfor linkage.\n const triggerEl = this.#findTrigger();\n this.#syncTrigger(triggerEl);\n\n // Derive state from core + input.\n const input = this.#popover.input.current;\n this.#core.setInput(input);\n const state = this.#core.getState();\n\n // Apply popup ARIA and data attributes to self.\n applyElementProps(this, this.#core.getPopupAttrs(state));\n applyStateDataAttrs(this, state, PopoverDataAttrs);\n\n // Show/hide via Popover API AFTER data attributes are applied so\n // `data-starting-style` is present before the first visible frame.\n if (state.open) {\n tryShowPopover(this);\n } else {\n tryHidePopover(this);\n }\n\n // Apply trigger ARIA and anchor-name to the discovered trigger.\n if (this.#currentTrigger) {\n applyElementProps(this.#currentTrigger, this.#core.getTriggerAttrs(state, this.id));\n applyStyles(this.#currentTrigger, getAnchorNameStyle(this.id));\n }\n\n // Skip positioning when closed — no rects to measure.\n if (!state.open) return;\n\n // Apply positioning styles to self.\n const posOpts = { side: state.side, align: state.align };\n\n if (supportsAnchorPositioning()) {\n // Native CSS Anchor Positioning — no JS rect measurements needed.\n applyStyles(this, getAnchorPositionStyle(this.id, posOpts));\n } else {\n // JS fallback: measure rects and resolve CSS var offsets.\n const triggerRect = this.#currentTrigger?.getBoundingClientRect();\n const selfRect = this.getBoundingClientRect();\n const boundaryRect = document.documentElement.getBoundingClientRect();\n const offsets = resolveOffsets(this);\n applyStyles(this, getAnchorPositionStyle(this.id, posOpts, triggerRect, selfRect, boundaryRect, offsets));\n }\n }\n\n // --- Trigger discovery ---\n\n #findTrigger(): HTMLElement | null {\n if (!this.id) return null;\n const root = this.getRootNode() as Document | ShadowRoot;\n return root.querySelector<HTMLElement>(`[commandfor=\"${this.id}\"]`);\n }\n\n #syncTrigger(triggerEl: HTMLElement | null): void {\n if (triggerEl === this.#currentTrigger) return;\n\n this.#cleanupTrigger();\n this.#currentTrigger = triggerEl;\n this.#popover?.setTriggerElement(triggerEl);\n\n if (triggerEl && this.#popover) {\n this.#triggerAbort = new AbortController();\n applyElementProps(triggerEl, this.#popover.triggerProps, { signal: this.#triggerAbort.signal });\n }\n }\n\n #cleanupTrigger(): void {\n if (this.#currentTrigger) {\n // Remove ARIA attributes and anchor-name style from the old trigger.\n applyElementProps(this.#currentTrigger, {\n 'aria-expanded': undefined,\n 'aria-haspopup': undefined,\n 'aria-controls': undefined,\n });\n this.#currentTrigger.style.removeProperty('anchor-name');\n }\n\n this.#triggerAbort?.abort();\n this.#triggerAbort = null;\n this.#currentTrigger = null;\n }\n}\n","import { PopoverElement } from '../../ui/popover/popover-element';\nimport { safeDefine } from '../safe-define';\n\nsafeDefine(PopoverElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [PopoverElement.tagName]: PopoverElement;\n }\n}\n","import { type MediaTimeState, SeekButtonCore, SeekButtonDataAttrs } from '@videojs/core';\nimport { selectTime } from '@videojs/core/dom';\nimport type { PropertyDeclarationMap } from '@videojs/element';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaButtonElement } from '../media-button-element';\n\nexport class SeekButtonElement extends MediaButtonElement<SeekButtonCore> {\n static readonly tagName = 'media-seek-button';\n\n static override properties: PropertyDeclarationMap = {\n ...MediaButtonElement.properties,\n seconds: { type: Number },\n };\n\n seconds = SeekButtonCore.defaultProps.seconds;\n\n protected readonly core = new SeekButtonCore();\n protected readonly stateAttrMap = SeekButtonDataAttrs;\n protected readonly mediaState = new PlayerController(this, playerContext, selectTime);\n\n protected activate(state: MediaTimeState): void {\n this.core.seek(state);\n }\n}\n","import { SeekButtonElement } from '../../ui/seek-button/seek-button-element';\nimport { safeDefine } from '../safe-define';\n\nsafeDefine(SeekButtonElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [SeekButtonElement.tagName]: SeekButtonElement;\n }\n}\n","import { TimeCore, TimeDataAttrs, type TimeType } from '@videojs/core';\nimport { applyElementProps, applyStateDataAttrs, logMissingFeature, selectTime } from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaElement } from '../media-element';\n\nexport class TimeElement extends MediaElement {\n static readonly tagName = 'media-time';\n\n static override properties = {\n type: { type: String },\n negativeSign: { type: String, attribute: 'negative-sign' },\n label: { type: String },\n } satisfies PropertyDeclarationMap<keyof TimeCore.Props>;\n\n type: TimeType = TimeCore.defaultProps.type;\n negativeSign = TimeCore.defaultProps.negativeSign;\n label = TimeCore.defaultProps.label;\n\n readonly #core = new TimeCore();\n readonly #state = new PlayerController(this, playerContext, selectTime);\n\n readonly #signSpan = document.createElement('span');\n readonly #textNode = document.createTextNode('');\n\n constructor() {\n super();\n\n this.#signSpan.setAttribute('aria-hidden', 'true');\n this.#signSpan.hidden = true;\n\n this.appendChild(this.#signSpan);\n this.appendChild(this.#textNode);\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n if (__DEV__ && !this.#state.value) {\n logMissingFeature(this.localName, this.#state.displayName!);\n }\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n this.#core.setProps(this);\n }\n\n protected override update(changed: PropertyValues): void {\n super.update(changed);\n\n const media = this.#state.value;\n\n if (!media) return;\n\n this.#core.setMedia(media);\n const state = this.#core.getState();\n\n this.#signSpan.hidden = !state.negative;\n this.#signSpan.textContent = state.negative ? this.negativeSign : '';\n this.#textNode.textContent = state.text;\n\n applyElementProps(this, this.#core.getAttrs(state));\n applyStateDataAttrs(this, state, TimeDataAttrs);\n }\n}\n","import { MediaElement } from '../media-element';\n\nexport class TimeGroupElement extends MediaElement {\n static readonly tagName = 'media-time-group';\n\n // Future: Could provide context for hoursDisplay to children via Lit context\n}\n","import { MediaElement } from '../media-element';\n\nexport class TimeSeparatorElement extends MediaElement {\n static readonly tagName = 'media-time-separator';\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n // Set aria-hidden for accessibility\n this.setAttribute('aria-hidden', 'true');\n\n // Set default content if empty\n if (!this.textContent?.trim()) {\n this.textContent = '/';\n }\n }\n}\n","import { TimeElement } from '../../ui/time/time-element';\nimport { TimeGroupElement } from '../../ui/time/time-group-element';\nimport { TimeSeparatorElement } from '../../ui/time/time-separator-element';\nimport { safeDefine } from '../safe-define';\n\nsafeDefine(TimeElement);\nsafeDefine(TimeGroupElement);\nsafeDefine(TimeSeparatorElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [TimeElement.tagName]: TimeElement;\n }\n}\n","import type { StateAttrMap } from '@videojs/core';\nimport { applyStateDataAttrs } from '@videojs/core/dom';\nimport type { PropertyValues } from '@videojs/element';\n\nimport { MediaElement } from './media-element';\n\n/** Shape that compound context values must satisfy for parts to consume. */\nexport interface PartContextValue<State extends object> {\n state: State;\n stateAttrMap: StateAttrMap<State>;\n}\n\n/**\n * Abstract base for compound-component part elements that consume a parent\n * context and apply data attributes from `ctx.state` + `ctx.stateAttrMap`.\n *\n * Subclasses only need to declare the `consumer` property:\n *\n * ```ts\n * export class SliderTrackElement extends ContextPartElement<SliderState> {\n * static readonly tagName = 'media-slider-track';\n * protected readonly consumer = new ContextConsumer(this, { context: sliderContext, subscribe: true });\n * }\n * ```\n */\nexport abstract class ContextPartElement<State extends object> extends MediaElement {\n protected abstract readonly consumer: { value?: PartContextValue<State> | undefined };\n\n protected override update(_changed: PropertyValues): void {\n super.update(_changed);\n const ctx = this.consumer.value;\n if (ctx) applyStateDataAttrs(this, ctx.state, ctx.stateAttrMap);\n }\n}\n","import type { SliderState, StateAttrMap } from '@videojs/core';\nimport type { SliderThumbProps } from '@videojs/core/dom';\nimport { createContext } from '@videojs/element/context';\n\nexport interface SliderContextValue {\n /** Base slider state — children use this for data attributes and value display. */\n state: SliderState;\n /** Maps state keys to `data-*` attribute names for part elements. */\n stateAttrMap: StateAttrMap<SliderState>;\n /** Domain value at the current pointer position (e.g., seconds for time, percent for volume). */\n pointerValue: number;\n /** ARIA attributes for the thumb element (role, tabindex, aria-value*, etc.). */\n thumbAttrs: Record<string, string | number | boolean | undefined>;\n /** Keyboard and focus event handlers for the thumb element. */\n thumbProps: SliderThumbProps;\n /** Optional formatter for value display. Receives domain value and value type. */\n formatValue?: ((value: number, type: 'current' | 'pointer') => string) | undefined;\n}\n\nconst SLIDER_CONTEXT_KEY = Symbol('@videojs/slider');\n\nexport const sliderContext = createContext<SliderContextValue>(SLIDER_CONTEXT_KEY);\n","import type { SliderState } from '@videojs/core';\nimport { ContextConsumer } from '@videojs/element/context';\n\nimport { ContextPartElement } from '../context-part-element';\nimport { sliderContext } from './context';\n\nexport class SliderBufferElement extends ContextPartElement<SliderState> {\n static readonly tagName = 'media-slider-buffer';\n\n protected readonly consumer = new ContextConsumer(this, { context: sliderContext, subscribe: true });\n}\n","import type { SliderState } from '@videojs/core';\nimport { ContextConsumer } from '@videojs/element/context';\n\nimport { ContextPartElement } from '../context-part-element';\nimport { sliderContext } from './context';\n\nexport class SliderFillElement extends ContextPartElement<SliderState> {\n static readonly tagName = 'media-slider-fill';\n\n protected readonly consumer = new ContextConsumer(this, { context: sliderContext, subscribe: true });\n}\n","import type { SliderPreviewOverflow } from '@videojs/core/dom';\nimport { applyStateDataAttrs, getSliderPreviewStyle } from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\nimport { ContextConsumer } from '@videojs/element/context';\nimport { applyStyles } from '@videojs/utils/dom';\n\nimport { MediaElement } from '../media-element';\nimport { sliderContext } from './context';\n\nexport class SliderPreviewElement extends MediaElement {\n static readonly tagName = 'media-slider-preview';\n\n static override properties = {\n overflow: { type: String },\n } satisfies PropertyDeclarationMap<'overflow'>;\n\n overflow: SliderPreviewOverflow = 'clamp';\n\n readonly #ctx = new ContextConsumer(this, {\n context: sliderContext,\n subscribe: true,\n });\n\n #resizeObserver: ResizeObserver | null = null;\n #width = 0;\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n this.#resizeObserver = new ResizeObserver(([entry]) => {\n this.#width = entry!.contentRect.width;\n this.#applyPosition();\n });\n\n this.#resizeObserver.observe(this);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#resizeObserver?.disconnect();\n this.#resizeObserver = null;\n }\n\n #applyPosition(): void {\n applyStyles(this, getSliderPreviewStyle(this.#width, this.overflow));\n }\n\n protected override update(_changed: PropertyValues): void {\n super.update(_changed);\n\n const ctx = this.#ctx.value;\n if (ctx) applyStateDataAttrs(this, ctx.state, ctx.stateAttrMap);\n\n this.#applyPosition();\n }\n}\n","import { applyElementProps, applyStateDataAttrs } from '@videojs/core/dom';\nimport type { PropertyValues } from '@videojs/element';\nimport { ContextConsumer } from '@videojs/element/context';\n\nimport { MediaElement } from '../media-element';\nimport { sliderContext } from './context';\n\nexport class SliderThumbElement extends MediaElement {\n static readonly tagName = 'media-slider-thumb';\n\n readonly #ctx = new ContextConsumer(this, {\n context: sliderContext,\n subscribe: true,\n });\n\n #disconnect: AbortController | null = null;\n #thumbPropsApplied = false;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.#disconnect = new AbortController();\n this.#thumbPropsApplied = false;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#disconnect?.abort();\n this.#disconnect = null;\n this.#thumbPropsApplied = false;\n }\n\n protected override update(_changed: PropertyValues): void {\n super.update(_changed);\n\n const ctx = this.#ctx.value;\n if (!ctx) return;\n\n // Apply keyboard and focus handlers once — they don't change per slider instance.\n if (!this.#thumbPropsApplied && this.#disconnect) {\n applyElementProps(this, ctx.thumbProps, { signal: this.#disconnect.signal });\n this.#thumbPropsApplied = true;\n }\n\n // Apply ARIA attributes every update (values change as slider moves).\n applyElementProps(this, ctx.thumbAttrs);\n\n // Apply state data attributes.\n applyStateDataAttrs(this, ctx.state, ctx.stateAttrMap);\n }\n}\n","import {\n type MediaTextTrackState,\n mapCuesToThumbnails,\n ThumbnailCore,\n ThumbnailDataAttrs,\n type ThumbnailImage,\n type ThumbnailResizeResult,\n} from '@videojs/core';\nimport type { ThumbnailApi } from '@videojs/core/dom';\nimport { applyElementProps, applyStateDataAttrs, createThumbnail, selectTextTrack } from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaElement } from '../media-element';\n\nconst SHADOW_CSS = `\\\n:host {\n display: inline-block;\n overflow: hidden;\n}\nimg {\n display: block;\n}`;\n\nexport class ThumbnailElement extends MediaElement {\n static readonly tagName = 'media-thumbnail';\n\n static override properties = {\n time: { type: Number },\n crossOrigin: { type: String, attribute: 'crossorigin' },\n loading: { type: String },\n fetchPriority: { type: String, attribute: 'fetchpriority' },\n } satisfies PropertyDeclarationMap<keyof ThumbnailCore.Props>;\n\n time = 0;\n crossOrigin: ThumbnailCore.Props['crossOrigin'];\n loading: ThumbnailCore.Props['loading'];\n fetchPriority: ThumbnailCore.Props['fetchPriority'];\n\n readonly #core = new ThumbnailCore();\n readonly #img = document.createElement('img');\n readonly #textTracks = new PlayerController(this, playerContext, selectTextTrack);\n\n #thumbnails: ThumbnailImage[] = [];\n #externalThumbnails: ThumbnailImage[] | undefined;\n #lastTextTrack: MediaTextTrackState | undefined;\n #api: ThumbnailApi | null = null;\n\n constructor() {\n super();\n\n const shadow = this.attachShadow({ mode: 'open' });\n\n const style = document.createElement('style');\n style.textContent = SHADOW_CSS;\n shadow.appendChild(style);\n\n this.#img.alt = '';\n this.#img.setAttribute('part', 'img');\n this.#img.setAttribute('aria-hidden', 'true');\n this.#img.setAttribute('decoding', 'async');\n shadow.appendChild(this.#img);\n }\n\n /**\n * Set thumbnail images directly, bypassing the automatic `<track>` detection.\n * When set, this takes priority over the text track path.\n */\n get thumbnails(): ThumbnailImage[] | undefined {\n return this.#externalThumbnails;\n }\n\n set thumbnails(value: ThumbnailImage[] | undefined) {\n this.#externalThumbnails = value;\n this.requestUpdate();\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.destroyed) return;\n\n this.#api = createThumbnail({\n getContainer: () => this,\n getImg: () => this.#img,\n onStateChange: () => this.requestUpdate(),\n });\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n }\n\n override destroyCallback(): void {\n this.#api?.destroy();\n super.destroyCallback();\n }\n\n protected override update(changed: PropertyValues): void {\n super.update(changed);\n\n // Resolve thumbnails: external prop takes priority over auto <track> path.\n if (this.#externalThumbnails) {\n this.#thumbnails = this.#externalThumbnails;\n } else {\n const textTrack = this.#textTracks.value;\n\n if (textTrack !== this.#lastTextTrack) {\n this.#lastTextTrack = textTrack;\n this.#thumbnails =\n textTrack && textTrack.thumbnailCues.length > 0\n ? mapCuesToThumbnails(textTrack.thumbnailCues, textTrack.thumbnailTrackSrc ?? undefined)\n : [];\n }\n }\n\n const thumbnail = this.#core.findActiveThumbnail(this.#thumbnails, this.time);\n\n // Sync img attributes from element properties.\n applyElementProps(this.#img, {\n crossorigin: this.crossOrigin || undefined,\n loading: this.loading,\n fetchpriority: this.fetchPriority,\n });\n\n // Track src changes via the thumbnail API.\n this.#api?.updateSrc(thumbnail?.url);\n\n if (!thumbnail) {\n this.#img.removeAttribute('src');\n this.#resetStyles();\n\n const state = this.#core.getState(false, false, undefined);\n applyElementProps(this, this.#core.getAttrs(state));\n applyStateDataAttrs(this, state, ThumbnailDataAttrs);\n return;\n }\n\n // Set the img src directly (imperative DOM).\n if (this.#img.getAttribute('src') !== thumbnail.url) {\n this.#img.src = thumbnail.url;\n }\n\n const api = this.#api;\n const state = this.#core.getState(api?.loading ?? false, api?.error ?? false, thumbnail);\n applyElementProps(this, this.#core.getAttrs(state));\n applyStateDataAttrs(this, state, ThumbnailDataAttrs);\n\n if (api?.naturalWidth && api.naturalHeight) {\n const constraints = api.readConstraints();\n const result = this.#core.resize(thumbnail, api.naturalWidth, api.naturalHeight, constraints);\n\n if (result) {\n this.#applyResize(result);\n }\n }\n }\n\n #applyResize(result: ThumbnailResizeResult): void {\n this.style.width = `${result.containerWidth}px`;\n this.style.height = `${result.containerHeight}px`;\n\n const imgStyle = this.#img.style;\n imgStyle.width = `${result.imageWidth}px`;\n imgStyle.height = `${result.imageHeight}px`;\n imgStyle.maxWidth = 'none';\n imgStyle.transform =\n result.offsetX || result.offsetY ? `translate(-${result.offsetX}px, -${result.offsetY}px)` : '';\n }\n\n #resetStyles(): void {\n this.style.width = '';\n this.style.height = '';\n\n const imgStyle = this.#img.style;\n imgStyle.width = '';\n imgStyle.height = '';\n imgStyle.maxWidth = '';\n imgStyle.transform = '';\n }\n}\n","import type { PropertyValues } from '@videojs/element';\nimport { ContextConsumer } from '@videojs/element/context';\n\nimport { ThumbnailElement } from '../thumbnail/thumbnail-element';\nimport { sliderContext } from './context';\n\n// @ts-expect-error TS2417 — tagName narrows to a different literal for custom element registration.\nexport class SliderThumbnailElement extends ThumbnailElement {\n static override readonly tagName = 'media-slider-thumbnail';\n\n readonly #ctx = new ContextConsumer(this, {\n context: sliderContext,\n subscribe: true,\n });\n\n protected override update(changed: PropertyValues): void {\n const ctx = this.#ctx.value;\n if (ctx) this.time = ctx.pointerValue;\n super.update(changed);\n }\n}\n","import type { SliderState } from '@videojs/core';\nimport { ContextConsumer } from '@videojs/element/context';\n\nimport { ContextPartElement } from '../context-part-element';\nimport { sliderContext } from './context';\n\nexport class SliderTrackElement extends ContextPartElement<SliderState> {\n static readonly tagName = 'media-slider-track';\n\n protected readonly consumer = new ContextConsumer(this, { context: sliderContext, subscribe: true });\n}\n","import { applyStateDataAttrs } from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\nimport { ContextConsumer } from '@videojs/element/context';\n\nimport { MediaElement } from '../media-element';\nimport { sliderContext } from './context';\n\nexport class SliderValueElement extends MediaElement {\n static readonly tagName = 'media-slider-value';\n\n static override properties = {\n type: { type: String },\n } satisfies PropertyDeclarationMap<'type'>;\n\n type: 'current' | 'pointer' = 'current';\n\n readonly #ctx = new ContextConsumer(this, {\n context: sliderContext,\n subscribe: true,\n });\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('aria-live', 'off');\n }\n\n protected override update(_changed: PropertyValues): void {\n super.update(_changed);\n\n const ctx = this.#ctx.value;\n if (!ctx) return;\n\n const value = this.type === 'pointer' ? ctx.pointerValue : ctx.state.value;\n\n this.textContent = ctx.formatValue ? ctx.formatValue(value, this.type) : String(Math.round(value));\n\n applyStateDataAttrs(this, ctx.state, ctx.stateAttrMap);\n }\n}\n","import { TimeSliderCore, TimeSliderDataAttrs } from '@videojs/core';\nimport {\n applyElementProps,\n applyStateDataAttrs,\n createSlider,\n getTimeSliderCSSVars,\n logMissingFeature,\n type SliderApi,\n selectBuffer,\n selectTime,\n} from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\nimport { ContextProvider } from '@videojs/element/context';\nimport { applyStyles, isRTL } from '@videojs/utils/dom';\nimport { formatTime } from '@videojs/utils/time';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaElement } from '../media-element';\nimport { sliderContext } from '../slider/context';\n\nexport class TimeSliderElement extends MediaElement {\n static readonly tagName = 'media-time-slider';\n\n static override properties = {\n label: { type: String },\n commitThrottle: { type: Number, attribute: 'commit-throttle' },\n step: { type: Number },\n largeStep: { type: Number, attribute: 'large-step' },\n orientation: { type: String },\n disabled: { type: Boolean },\n thumbAlignment: { type: String, attribute: 'thumb-alignment' },\n } satisfies PropertyDeclarationMap<Exclude<keyof TimeSliderCore.Props, 'value' | 'min' | 'max'>>;\n\n label = TimeSliderCore.defaultProps.label;\n commitThrottle = TimeSliderCore.defaultProps.commitThrottle;\n step = TimeSliderCore.defaultProps.step;\n largeStep = TimeSliderCore.defaultProps.largeStep;\n orientation = TimeSliderCore.defaultProps.orientation;\n disabled = TimeSliderCore.defaultProps.disabled;\n thumbAlignment = TimeSliderCore.defaultProps.thumbAlignment;\n\n readonly #core = new TimeSliderCore();\n readonly #provider = new ContextProvider(this, { context: sliderContext });\n readonly #timeState = new PlayerController(this, playerContext, selectTime);\n readonly #bufferState = new PlayerController(this, playerContext, selectBuffer);\n\n #slider: SliderApi | null = null;\n #disconnect: AbortController | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.destroyed) return;\n\n this.#disconnect = new AbortController();\n const signal = this.#disconnect.signal;\n\n this.#slider = createSlider({\n getElement: () => this,\n getThumbElement: () => this.querySelector<HTMLElement>('media-slider-thumb'),\n getOrientation: () => this.orientation,\n isRTL: () => isRTL(this),\n isDisabled: () => this.disabled || !this.#timeState.value,\n getPercent: () => {\n const media = this.#timeState.value;\n if (!media) return 0;\n return this.#core.percentFromValue(media.currentTime);\n },\n getStepPercent: () => this.#core.getStepPercent(),\n getLargeStepPercent: () => this.#core.getLargeStepPercent(),\n onValueCommit: (percent) => {\n const media = this.#timeState.value;\n if (media) media.seek(this.#core.valueFromPercent(percent));\n },\n commitThrottle: this.commitThrottle,\n onDragStart: () => {\n this.dispatchEvent(new CustomEvent('drag-start', { bubbles: true }));\n },\n onDragEnd: () => {\n this.dispatchEvent(new CustomEvent('drag-end', { bubbles: true }));\n },\n adjustPercent: (raw, thumbSize, trackSize) => this.#core.adjustPercentForAlignment(raw, thumbSize, trackSize),\n onResize: () => this.requestUpdate(),\n });\n\n applyElementProps(this, this.#slider.rootProps, { signal });\n applyStyles(this, this.#slider.rootStyle);\n this.#slider.input.subscribe(() => this.requestUpdate(), { signal });\n\n if (__DEV__ && !this.#timeState.value) {\n logMissingFeature(this.localName, this.#timeState.displayName!);\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#disconnect?.abort();\n this.#disconnect = null;\n }\n\n override destroyCallback(): void {\n this.#slider?.destroy();\n super.destroyCallback();\n }\n\n protected override willUpdate(_changed: PropertyValues): void {\n super.willUpdate(_changed);\n this.#core.setProps(this);\n }\n\n protected override update(_changed: PropertyValues): void {\n super.update(_changed);\n if (!this.#slider) return;\n\n const time = this.#timeState.value;\n const buffer = this.#bufferState.value;\n if (!time) return;\n\n this.#core.setInput(this.#slider.input.current);\n const media = { ...time, ...(buffer ?? { buffered: [], seekable: [] }) };\n this.#core.setMedia(media);\n const state = this.#core.getState();\n\n const cssVars = getTimeSliderCSSVars(this.#slider.adjustForAlignment(state));\n\n applyStyles(this, cssVars);\n\n // Domain-specific data attributes on root (includes data-seeking).\n applyStateDataAttrs(this, state, TimeSliderDataAttrs);\n\n // Provide context to child elements with base slider data attrs.\n this.#provider.setValue({\n state,\n stateAttrMap: TimeSliderDataAttrs,\n pointerValue: this.#core.valueFromPercent(state.pointerPercent),\n thumbAttrs: this.#core.getAttrs(state),\n thumbProps: this.#slider.thumbProps,\n formatValue: (value) => formatTime(value, state.duration),\n });\n }\n}\n","import { SliderBufferElement } from '../../ui/slider/slider-buffer-element';\nimport { SliderFillElement } from '../../ui/slider/slider-fill-element';\nimport { SliderPreviewElement } from '../../ui/slider/slider-preview-element';\nimport { SliderThumbElement } from '../../ui/slider/slider-thumb-element';\nimport { SliderThumbnailElement } from '../../ui/slider/slider-thumbnail-element';\nimport { SliderTrackElement } from '../../ui/slider/slider-track-element';\nimport { SliderValueElement } from '../../ui/slider/slider-value-element';\nimport { TimeSliderElement } from '../../ui/time-slider/time-slider-element';\nimport { safeDefine } from '../safe-define';\n\n// Parent slider first — sub-elements consume its context.\nsafeDefine(TimeSliderElement);\nsafeDefine(SliderBufferElement);\nsafeDefine(SliderFillElement);\nsafeDefine(SliderPreviewElement);\nsafeDefine(SliderThumbElement);\nsafeDefine(SliderThumbnailElement);\nsafeDefine(SliderTrackElement);\nsafeDefine(SliderValueElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [TimeSliderElement.tagName]: TimeSliderElement;\n }\n}\n","import type { TooltipGroupCore } from '@videojs/core';\nimport { createContext } from '@videojs/element/context';\n\nconst TOOLTIP_GROUP_CONTEXT_KEY = Symbol('@videojs/tooltip-group');\n\nexport const tooltipGroupContext = createContext<TooltipGroupCore>(TOOLTIP_GROUP_CONTEXT_KEY);\n","import { TooltipCore, TooltipCSSVars, TooltipDataAttrs, type TooltipInput } from '@videojs/core';\nimport {\n applyElementProps,\n applyStateDataAttrs,\n createTooltip,\n createTransition,\n getAnchorNameStyle,\n getAnchorPositionStyle,\n resolveOffsets,\n type TooltipApi,\n type TooltipChangeDetails,\n} from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\nimport { ContextConsumer } from '@videojs/element/context';\nimport { SnapshotController } from '@videojs/store/html';\nimport { applyStyles, supportsAnchorPositioning, tryHidePopover, tryShowPopover } from '@videojs/utils/dom';\n\nimport { MediaElement } from '../media-element';\nimport { tooltipGroupContext } from './context';\n\nexport class TooltipElement extends MediaElement {\n static readonly tagName = 'media-tooltip';\n\n static override properties = {\n open: { type: Boolean },\n defaultOpen: { type: Boolean, attribute: 'default-open' },\n side: { type: String },\n align: { type: String },\n delay: { type: Number },\n closeDelay: { type: Number, attribute: 'close-delay' },\n disableHoverablePopup: { type: Boolean, attribute: 'disable-hoverable-popup' },\n disabled: { type: Boolean },\n } satisfies PropertyDeclarationMap<keyof TooltipCore.Props>;\n\n open = TooltipCore.defaultProps.open;\n defaultOpen = TooltipCore.defaultProps.defaultOpen;\n side = TooltipCore.defaultProps.side;\n align = TooltipCore.defaultProps.align;\n delay = TooltipCore.defaultProps.delay;\n closeDelay = TooltipCore.defaultProps.closeDelay;\n disableHoverablePopup = TooltipCore.defaultProps.disableHoverablePopup;\n disabled = TooltipCore.defaultProps.disabled;\n\n readonly #core = new TooltipCore();\n readonly #groupConsumer = new ContextConsumer(this, { context: tooltipGroupContext });\n #tooltip: TooltipApi | null = null;\n #snapshot: SnapshotController<TooltipInput> | null = null;\n\n // Cleanup controllers\n #disconnect: AbortController | null = null;\n #triggerAbort: AbortController | null = null;\n #currentTrigger: HTMLElement | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.#disconnect = new AbortController();\n\n this.#tooltip = createTooltip({\n transition: createTransition(),\n onOpenChange: (nextOpen: boolean, details: TooltipChangeDetails) => {\n this.open = nextOpen;\n this.dispatchEvent(new CustomEvent('open-change', { detail: { open: nextOpen, ...details } }));\n },\n delay: () => this.delay,\n closeDelay: () => this.closeDelay,\n disableHoverablePopup: () => this.disableHoverablePopup,\n disabled: () => this.disabled,\n // Lazy getter — group may arrive after connect via context.\n group: () => this.#groupConsumer.value,\n });\n\n // Register self as the popup element — the element IS the popup.\n this.#tooltip.setPopupElement(this);\n\n // Apply popup event handlers (pointerenter/leave, focusout) to self.\n applyElementProps(this, this.#tooltip.popupProps, { signal: this.#disconnect.signal });\n\n // Subscribe to interaction state for reactive updates.\n if (this.#snapshot) {\n this.#snapshot.track(this.#tooltip.input);\n } else {\n this.#snapshot = new SnapshotController(this, this.#tooltip.input);\n }\n }\n\n protected override firstUpdated(changed: PropertyValues): void {\n super.firstUpdated(changed);\n\n // Uncontrolled mode: open if `defaultOpen` is set. Controlled `open`\n // is already synced by `willUpdate` on the first render cycle.\n if (this.defaultOpen && !this.open) {\n this.#tooltip?.open();\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#cleanupTrigger();\n this.#tooltip?.destroy();\n this.#tooltip = null;\n this.#disconnect?.abort();\n this.#disconnect = null;\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n this.#core.setProps(this);\n\n // Sync controlled open state\n if (this.#tooltip && changed.has('open')) {\n const { active: interactionOpen } = this.#tooltip.input.current;\n if (this.open !== interactionOpen) {\n if (this.open) {\n this.#tooltip.open();\n } else {\n this.#tooltip.close();\n }\n }\n }\n }\n\n protected override update(_changed: PropertyValues): void {\n super.update(_changed);\n if (!this.#tooltip) return;\n\n // Discover trigger via commandfor linkage.\n const triggerEl = this.#findTrigger();\n this.#syncTrigger(triggerEl);\n\n // Derive state from core + input.\n const input = this.#tooltip.input.current;\n this.#core.setInput(input);\n const state = this.#core.getState();\n\n // Apply popup ARIA and data attributes to self.\n applyElementProps(this, this.#core.getPopupAttrs(state));\n applyStateDataAttrs(this, state, TooltipDataAttrs);\n\n // Show/hide via Popover API AFTER data attributes are applied so\n // `data-starting-style` is present before the first visible frame.\n if (state.open) {\n tryShowPopover(this);\n } else {\n tryHidePopover(this);\n }\n\n // Apply trigger ARIA and anchor-name to the discovered trigger.\n if (this.#currentTrigger) {\n applyElementProps(this.#currentTrigger, this.#core.getTriggerAttrs(state, this.id));\n applyStyles(this.#currentTrigger, getAnchorNameStyle(this.id));\n }\n\n // Skip positioning when closed — no rects to measure.\n if (!state.open) return;\n\n // Apply positioning styles to self.\n const posOpts = { side: state.side, align: state.align };\n\n if (supportsAnchorPositioning()) {\n // Native CSS Anchor Positioning — no JS rect measurements needed.\n applyStyles(\n this,\n getAnchorPositionStyle(this.id, posOpts, undefined, undefined, undefined, undefined, TooltipCSSVars)\n );\n } else {\n // JS fallback: measure rects and resolve CSS var offsets.\n const triggerRect = this.#currentTrigger?.getBoundingClientRect();\n const selfRect = this.getBoundingClientRect();\n const boundaryRect = document.documentElement.getBoundingClientRect();\n const offsets = resolveOffsets(this, TooltipCSSVars);\n applyStyles(\n this,\n getAnchorPositionStyle(this.id, posOpts, triggerRect, selfRect, boundaryRect, offsets, TooltipCSSVars)\n );\n }\n }\n\n // --- Trigger discovery ---\n\n #findTrigger(): HTMLElement | null {\n if (!this.id) return null;\n const root = this.getRootNode() as Document | ShadowRoot;\n return root.querySelector<HTMLElement>(`[commandfor=\"${this.id}\"]`);\n }\n\n #syncTrigger(triggerEl: HTMLElement | null): void {\n if (triggerEl === this.#currentTrigger) return;\n\n this.#cleanupTrigger();\n this.#currentTrigger = triggerEl;\n this.#tooltip?.setTriggerElement(triggerEl);\n\n if (triggerEl && this.#tooltip) {\n this.#triggerAbort = new AbortController();\n applyElementProps(triggerEl, this.#tooltip.triggerProps, { signal: this.#triggerAbort.signal });\n }\n }\n\n #cleanupTrigger(): void {\n if (this.#currentTrigger) {\n // Remove ARIA attributes and anchor-name style from the old trigger.\n applyElementProps(this.#currentTrigger, {\n 'aria-describedby': undefined,\n });\n this.#currentTrigger.style.removeProperty('anchor-name');\n }\n\n this.#triggerAbort?.abort();\n this.#triggerAbort = null;\n this.#currentTrigger = null;\n }\n}\n","import { TooltipElement } from '../../ui/tooltip/tooltip-element';\nimport { safeDefine } from '../safe-define';\n\nsafeDefine(TooltipElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [TooltipElement.tagName]: TooltipElement;\n }\n}\n","import { SliderDataAttrs, VolumeSliderCore } from '@videojs/core';\nimport {\n applyElementProps,\n applyStateDataAttrs,\n createSlider,\n getSliderCSSVars,\n logMissingFeature,\n type SliderApi,\n selectVolume,\n} from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\nimport { ContextProvider } from '@videojs/element/context';\nimport { applyStyles, isRTL } from '@videojs/utils/dom';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaElement } from '../media-element';\nimport { sliderContext } from '../slider/context';\n\nexport class VolumeSliderElement extends MediaElement {\n static readonly tagName = 'media-volume-slider';\n\n static override properties = {\n label: { type: String },\n step: { type: Number },\n largeStep: { type: Number, attribute: 'large-step' },\n orientation: { type: String },\n disabled: { type: Boolean },\n thumbAlignment: { type: String, attribute: 'thumb-alignment' },\n } satisfies PropertyDeclarationMap<Exclude<keyof VolumeSliderCore.Props, 'value' | 'min' | 'max'>>;\n\n label = VolumeSliderCore.defaultProps.label;\n step = VolumeSliderCore.defaultProps.step;\n largeStep = VolumeSliderCore.defaultProps.largeStep;\n orientation = VolumeSliderCore.defaultProps.orientation;\n disabled = VolumeSliderCore.defaultProps.disabled;\n thumbAlignment = VolumeSliderCore.defaultProps.thumbAlignment;\n\n readonly #core = new VolumeSliderCore();\n readonly #provider = new ContextProvider(this, { context: sliderContext });\n readonly #volumeState = new PlayerController(this, playerContext, selectVolume);\n\n #slider: SliderApi | null = null;\n #disconnect: AbortController | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.destroyed) return;\n\n this.#disconnect = new AbortController();\n const signal = this.#disconnect.signal;\n\n this.#slider = createSlider({\n getElement: () => this,\n getThumbElement: () => this.querySelector<HTMLElement>('media-slider-thumb'),\n getOrientation: () => this.orientation,\n isRTL: () => isRTL(this),\n isDisabled: () => this.disabled || !this.#volumeState.value,\n getPercent: () => {\n const media = this.#volumeState.value;\n if (!media) return 0;\n return media.volume * 100;\n },\n getStepPercent: () => this.#core.getStepPercent(),\n getLargeStepPercent: () => this.#core.getLargeStepPercent(),\n onValueChange: (percent) => {\n this.#setVolume(percent);\n },\n onValueCommit: (percent) => {\n this.#setVolume(percent);\n },\n onDragStart: () => {\n this.dispatchEvent(new CustomEvent('drag-start', { bubbles: true }));\n },\n onDragEnd: () => {\n this.dispatchEvent(new CustomEvent('drag-end', { bubbles: true }));\n },\n adjustPercent: (raw, thumbSize, trackSize) => this.#core.adjustPercentForAlignment(raw, thumbSize, trackSize),\n onResize: () => this.requestUpdate(),\n });\n\n applyElementProps(this, this.#slider.rootProps, { signal });\n applyStyles(this, this.#slider.rootStyle);\n this.#slider.input.subscribe(() => this.requestUpdate(), { signal });\n\n if (__DEV__ && !this.#volumeState.value) {\n logMissingFeature(this.localName, this.#volumeState.displayName!);\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#disconnect?.abort();\n this.#disconnect = null;\n }\n\n override destroyCallback(): void {\n this.#slider?.destroy();\n super.destroyCallback();\n }\n\n protected override willUpdate(_changed: PropertyValues): void {\n super.willUpdate(_changed);\n this.#core.setProps(this);\n }\n\n protected override update(_changed: PropertyValues): void {\n super.update(_changed);\n if (!this.#slider) return;\n\n const media = this.#volumeState.value;\n if (!media) return;\n\n this.#core.setInput(this.#slider.input.current);\n this.#core.setMedia(media);\n const state = this.#core.getState();\n\n const cssVars = getSliderCSSVars(this.#slider.adjustForAlignment(state));\n\n applyStyles(this, cssVars);\n\n // Apply data attributes to root.\n applyStateDataAttrs(this, state, SliderDataAttrs);\n\n // Provide context to child elements.\n this.#provider.setValue({\n state,\n stateAttrMap: SliderDataAttrs,\n pointerValue: this.#core.valueFromPercent(state.pointerPercent),\n thumbAttrs: this.#core.getAttrs(state),\n thumbProps: this.#slider.thumbProps,\n formatValue: (value) => `${Math.round(value)}%`,\n });\n }\n\n #setVolume(percent: number): void {\n const media = this.#volumeState.value;\n media?.setVolume(this.#core.valueFromPercent(percent) / 100);\n }\n}\n","import { SliderFillElement } from '../../ui/slider/slider-fill-element';\nimport { SliderPreviewElement } from '../../ui/slider/slider-preview-element';\nimport { SliderThumbElement } from '../../ui/slider/slider-thumb-element';\nimport { SliderTrackElement } from '../../ui/slider/slider-track-element';\nimport { SliderValueElement } from '../../ui/slider/slider-value-element';\nimport { VolumeSliderElement } from '../../ui/volume-slider/volume-slider-element';\nimport { safeDefine } from '../safe-define';\n\n// Parent slider first — sub-elements consume its context.\nsafeDefine(VolumeSliderElement);\nsafeDefine(SliderFillElement);\nsafeDefine(SliderPreviewElement);\nsafeDefine(SliderThumbElement);\nsafeDefine(SliderTrackElement);\nsafeDefine(SliderValueElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [VolumeSliderElement.tagName]: VolumeSliderElement;\n }\n}\n","import { ReactiveElement } from '@videojs/element';\nimport { renderIcon } from '@videojs/icons/render';\nimport { createStyles, SkinMixin } from '../skin-mixin';\nimport styles from './skin.css?inline';\n\n// Side-effect imports: register all custom elements used in the template.\nimport '../media/container';\nimport '../ui/mute-button';\nimport '../ui/play-button';\nimport '../ui/playback-rate-button';\nimport '../ui/popover';\nimport '../ui/seek-button';\nimport '../ui/time';\nimport '../ui/time-slider';\nimport '../ui/tooltip';\nimport '../ui/volume-slider';\n\nconst SEEK_TIME = 10;\n\nfunction getTemplateHTML() {\n return /*html*/ `\n <media-container class=\"media-default-skin media-default-skin--audio\">\n <slot name=\"media\"></slot>\n\n <div class=\"media-surface media-controls\">\n <media-play-button commandfor=\"play-tooltip\" class=\"media-button media-button--icon media-button--play\">\n ${renderIcon('restart', { class: 'media-icon media-icon--restart' })}\n ${renderIcon('play', { class: 'media-icon media-icon--play' })}\n ${renderIcon('pause', { class: 'media-icon media-icon--pause' })}\n </media-play-button>\n <media-tooltip id=\"play-tooltip\" side=\"top\" class=\"media-surface media-tooltip\">\n <span class=\"media-tooltip-label media-tooltip-label--replay\">Replay</span>\n <span class=\"media-tooltip-label media-tooltip-label--play\">Play</span>\n <span class=\"media-tooltip-label media-tooltip-label--pause\">Pause</span>\n </media-tooltip>\n\n <media-seek-button commandfor=\"seek-backward-tooltip\" seconds=\"${-SEEK_TIME}\" class=\"media-button media-button--icon media-button--seek\">\n <span class=\"media-icon__container\">\n ${renderIcon('seek', { class: 'media-icon media-icon--seek media-icon--flipped' })}\n <span class=\"media-icon__label\">${SEEK_TIME}</span>\n </span>\n </media-seek-button>\n <media-tooltip id=\"seek-backward-tooltip\" side=\"top\" class=\"media-surface media-tooltip\">\n Seek backward ${SEEK_TIME} seconds\n </media-tooltip>\n\n <media-seek-button commandfor=\"seek-forward-tooltip\" seconds=\"${SEEK_TIME}\" class=\"media-button media-button--icon media-button--seek\">\n <span class=\"media-icon__container\">\n ${renderIcon('seek', { class: 'media-icon media-icon--seek' })}\n <span class=\"media-icon__label\">${SEEK_TIME}</span>\n </span>\n </media-seek-button>\n <media-tooltip id=\"seek-forward-tooltip\" side=\"top\" class=\"media-surface media-tooltip\">\n Seek forward ${SEEK_TIME} seconds\n </media-tooltip>\n\n <media-time-group class=\"media-time\">\n <media-time type=\"current\" class=\"media-time__value\"></media-time>\n <media-time-slider class=\"media-slider\">\n <media-slider-track class=\"media-slider__track\">\n <media-slider-fill class=\"media-slider__fill\"></media-slider-fill>\n <media-slider-buffer class=\"media-slider__buffer\"></media-slider-buffer>\n </media-slider-track>\n <media-slider-thumb class=\"media-slider__thumb\"></media-slider-thumb>\n </media-time-slider>\n <media-time type=\"duration\" class=\"media-time__value\"></media-time>\n </media-time-group>\n\n <media-playback-rate-button commandfor=\"playback-rate-tooltip\" class=\"media-button media-button--icon media-button--playback-rate\"></media-playback-rate-button>\n <media-tooltip id=\"playback-rate-tooltip\" side=\"top\" class=\"media-surface media-tooltip\">\n Toggle playback rate\n </media-tooltip>\n\n <media-mute-button commandfor=\"audio-volume-popover\" class=\"media-button media-button--icon media-button--mute\">\n ${renderIcon('volume-off', { class: 'media-icon media-icon--volume-off' })}\n ${renderIcon('volume-low', { class: 'media-icon media-icon--volume-low' })}\n ${renderIcon('volume-high', { class: 'media-icon media-icon--volume-high' })}\n </media-mute-button>\n\n <media-popover id=\"audio-volume-popover\" open-on-hover delay=\"200\" close-delay=\"100\" side=\"top\" class=\"media-surface media-popover media-popover--volume\">\n <media-volume-slider class=\"media-slider\" orientation=\"vertical\" thumb-alignment=\"edge\">\n <media-slider-track class=\"media-slider__track\">\n <media-slider-fill class=\"media-slider__fill\"></media-slider-fill>\n </media-slider-track>\n <media-slider-thumb class=\"media-slider__thumb media-slider__thumb--persistent\"></media-slider-thumb>\n </media-volume-slider>\n </media-popover>\n </div>\n </media-container>\n `;\n}\n\nexport class AudioSkinElement extends SkinMixin(ReactiveElement) {\n static readonly tagName = 'audio-skin';\n static styles = createStyles(styles);\n static getTemplateHTML = getTemplateHTML;\n}\n\ncustomElements.define(AudioSkinElement.tagName, AudioSkinElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [AudioSkinElement.tagName]: AudioSkinElement;\n }\n}\n"],"x_google_ignoreList":[57,58,59,60,61],"mappings":";AACA,IAAI,0BAA0B,MAAM;CACnC,QAAQ,IAAI,iBAAiB;CAC7B,wBAAwB,IAAI,KAAK;;CAEjC,IAAI,OAAO;AACV,SAAO,MAAKA,KAAM;;;CAGnB,QAAQ;AACP,OAAK,MAAM,cAAc,MAAKC,KAAM,QAAQ,CAAE,YAAW,OAAO;AAChE,QAAKA,KAAM,OAAO;;;CAGnB,QAAQ;AACP,OAAK,OAAO;AACZ,QAAKD,KAAM,OAAO;AAClB,QAAKA,OAAQ,IAAI,iBAAiB;;;CAGnC,UAAU,KAAK;AACd,QAAKC,KAAM,IAAI,IAAI,EAAE,OAAO;EAC5B,MAAM,aAAa,IAAI,iBAAiB;AACxC,QAAKA,KAAM,IAAI,KAAK,WAAW;AAC/B,SAAO,YAAY,IAAI,CAAC,MAAKD,KAAM,QAAQ,WAAW,OAAO,CAAC;;;;;;;;;;;;ACjBhE,SAAS,QAAQ,GAAG,QAAQ;AAC3B,QAAO;EACN,QAAQ,QAAQ;GACf,MAAM,SAAS,OAAO,KAAK,UAAU,MAAM,MAAM,IAAI,CAAC;AACtD,UAAO,OAAO,OAAO,EAAE,EAAE,GAAG,OAAO;;EAEpC,SAAS,QAAQ;AAChB,QAAK,MAAM,SAAS,OAAQ,KAAI;AAC/B,UAAM,SAAS,IAAI;YACX,KAAK;AACb,QAAI,YAAY,IAAI;;;EAGtB;;;;;ACnBF,IAAI,aAAa,cAAc,MAAM;CACpC;CACA;CACA,YAAY,MAAM,SAAS;AAC1B,QAAM,SAAS,WAAW,KAAK;AAC/B,OAAK,OAAO;AACZ,OAAK,OAAO;AACZ,OA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