bitmovin-player-ui
Version:
Bitmovin Player UI Framework
1 lines • 333 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["bitmovinplayer-ui"]=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.playerui=t())}(self,function(){return function(){var e={66:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundColorSelectBox=void 0;var r=n(8091),s=n(5801),a=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitlesettingsbackgroundcolorselectbox"]},n.config),n}return i(t,e),t.prototype.configure=function(t,n){var o=this;e.prototype.configure.call(this,t,n),this.addItem(null,s.i18n.getLocalizer("default")),this.addItem("white",s.i18n.getLocalizer("colors.white")),this.addItem("black",s.i18n.getLocalizer("colors.black")),this.addItem("red",s.i18n.getLocalizer("colors.red")),this.addItem("green",s.i18n.getLocalizer("colors.green")),this.addItem("blue",s.i18n.getLocalizer("colors.blue")),this.addItem("cyan",s.i18n.getLocalizer("colors.cyan")),this.addItem("yellow",s.i18n.getLocalizer("colors.yellow")),this.addItem("magenta",s.i18n.getLocalizer("colors.magenta"));var i=function(){o.settingsManager.backgroundColor.isSet()&&o.settingsManager.backgroundOpacity.isSet()?o.toggleOverlayClass("bgcolor-"+o.settingsManager.backgroundColor.value+o.settingsManager.backgroundOpacity.value):o.toggleOverlayClass(null)};this.onItemSelectionChanged.subscribe(function(e,t){o.settingsManager.backgroundColor.value=t}),this.settingsManager.backgroundColor.onChanged.subscribe(function(e,t){o.settingsManager.backgroundColor.isSet()?o.settingsManager.backgroundOpacity.isSet()||(o.settingsManager.backgroundOpacity.value="100"):o.settingsManager.backgroundOpacity.clear(),o.selectItem(t.value),i()}),this.settingsManager.backgroundOpacity.onChanged.subscribe(function(){i()}),this.settingsManager.backgroundColor.isSet()&&this.selectItem(this.settingsManager.backgroundColor.value)},t}(r.SubtitleSettingSelectBox);t.BackgroundColorSelectBox=a},323:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DOM=void 0;var n=function(){function e(e,t,n){if(e instanceof Array){if(e.length>0&&e[0]instanceof HTMLElement){var o=e;this.elements=o}}else if(e instanceof HTMLElement){var i=e;this.elements=[i]}else if(e instanceof Document||e instanceof ShadowRoot)this.documentOrShadowRoot=e,this.elements=null;else if(t){var r=e;for(var s in i=document.createElement(r),t){var a=t[s];null!=a&&i.setAttribute(s,a)}n&&(i.component=n),this.elements=[i]}else{var l=e;this.elements=this.findChildElements(l)}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.elements?this.elements.length:0},enumerable:!1,configurable:!0}),e.prototype.get=function(e){return void 0===e?this.elements:!this.elements||e>=this.elements.length||e<-this.elements.length?void 0:e<0?this.elements[this.elements.length-e]:this.elements[e]},e.prototype.forEach=function(e){this.elements&&this.elements.forEach(function(t){e(t)})},e.prototype.findChildElementsOfElement=function(e,t){var n=e.querySelectorAll(t);return[].slice.call(n)},e.prototype.findChildElements=function(e){var t=this,n=[];return this.elements?(this.forEach(function(o){n=n.concat(t.findChildElementsOfElement(o,e))}),n):this.findChildElementsOfElement(document,e)},e.prototype.find=function(t){return new e(this.findChildElements(t))},e.prototype.focusToFirstInput=function(){var e=this.findChildElements('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');e.length>0&&e[0].focus()},e.prototype.scrollTo=function(e,t){this.elements[0].scrollTo(e,t)},e.prototype.html=function(e){return arguments.length>0?this.setHtml(e):this.getHtml()},e.prototype.getHtml=function(){return this.elements[0].innerHTML},e.prototype.setHtml=function(e){return void 0!==e&&null!=e||(e=""),this.forEach(function(t){t.innerHTML=e}),this},e.prototype.empty=function(){return this.forEach(function(e){e.innerHTML=""}),this},e.prototype.val=function(){var e=this.elements[0];if(e instanceof HTMLSelectElement||e instanceof HTMLInputElement)return e.value;throw new Error("val() not supported for ".concat(typeof e))},e.prototype.attr=function(e,t){return arguments.length>1?this.setAttr(e,t):this.getAttr(e)},e.prototype.removeAttr=function(e){this.forEach(function(t){t.removeAttribute(e)})},e.prototype.getAttr=function(e){return this.elements[0].getAttribute(e)},e.prototype.setAttr=function(e,t){return this.forEach(function(n){n.setAttribute(e,t)}),this},e.prototype.data=function(e,t){return arguments.length>1?this.setData(e,t):this.getData(e)},e.prototype.getData=function(e){return this.elements[0].getAttribute("data-"+e)},e.prototype.setData=function(e,t){return this.forEach(function(n){n.setAttribute("data-"+e,t)}),this},e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(t){e.forEach(function(e){e.elements.forEach(function(n,o){t.appendChild(e.elements[o])})})};return this.elements?this.forEach(function(e){return n(e)}):n(this.documentOrShadowRoot),this},e.prototype.prepend=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(t){e.forEach(function(e){e.elements.forEach(function(n,o){t.insertBefore(e.elements[o],t.firstChild)})})};return this.elements?this.forEach(function(e){return n(e)}):n(this.documentOrShadowRoot),this},e.prototype.remove=function(){var e=function(e){var t=e.parentNode;t&&t.removeChild(e)};this.elements?this.forEach(function(t){return e(t)}):e(this.documentOrShadowRoot)},e.prototype.offset=function(){var e=this.elements[0].getBoundingClientRect(),t=document.body.parentElement.getBoundingClientRect();return{top:e.top-t.top,left:e.left-t.left}},e.prototype.width=function(){return this.elements[0].offsetWidth},e.prototype.height=function(){return this.elements[0].offsetHeight},e.prototype.size=function(){return{width:this.width(),height:this.height()}},e.prototype.on=function(e,t,n){var o=this;return e.split(" ").forEach(function(e){null==o.elements?o.documentOrShadowRoot.addEventListener(e,t,n):o.forEach(function(o){o.addEventListener(e,t,n)})}),this},e.prototype.off=function(e,t,n){var o=this;return e.split(" ").forEach(function(e){null==o.elements?o.documentOrShadowRoot.removeEventListener(e,t,n):o.forEach(function(o){o.removeEventListener(e,t,n)})}),this},e.prototype.addClass=function(e){return this.forEach(function(t){var n;if(t.classList){var o=e.split(" ").filter(function(e){return e.length>0});o.length>0&&(n=t.classList).add.apply(n,o)}else t.className+=" "+e}),this},e.prototype.removeClass=function(e){return this.forEach(function(t){var n;if(t.classList){var o=e.split(" ").filter(function(e){return e.length>0});o.length>0&&(n=t.classList).remove.apply(n,o)}else t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}),this},e.prototype.hasClass=function(e){var t=!1;return this.forEach(function(n){n.classList?n.classList.contains(e)&&(t=!0):new RegExp("(^| )"+e+"( |$)","gi").test(n.className)&&(t=!0)}),t},e.prototype.css=function(e,t){if("string"==typeof e){var n=e;return 2===arguments.length?this.setCss(n,t):this.getCss(n)}var o=e;return this.setCssCollection(o)},e.prototype.removeCss=function(e,t){return void 0===t&&(t=0),this.elements[t].style.removeProperty(e)},e.prototype.getCss=function(e){return getComputedStyle(this.elements[0])[e]},e.prototype.setCss=function(e,t){return this.forEach(function(n){n.style[e]=t}),this},e.prototype.setCssCollection=function(e){return this.forEach(function(t){Object.assign(t.style,e)}),this},e}();t.DOM=n},509:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FontSizeSelectBox=void 0;var r=n(8091),s=n(5801),a=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitlesettingsfontsizeselectbox"]},n.config),n}return i(t,e),t.prototype.getFontSizeOptions=function(){return[{key:null,label:s.i18n.getLocalizer("default")},{key:"50",label:s.i18n.getLocalizer("percent",{value:50})},{key:"75",label:s.i18n.getLocalizer("percent",{value:75})},{key:"100",label:s.i18n.getLocalizer("percent",{value:100})},{key:"150",label:s.i18n.getLocalizer("percent",{value:150})},{key:"200",label:s.i18n.getLocalizer("percent",{value:200})},{key:"300",label:s.i18n.getLocalizer("percent",{value:300})},{key:"400",label:s.i18n.getLocalizer("percent",{value:400})}]},t.prototype.populateItemsWithFilter=function(){this.clearItems();for(var e=0,t=this.getFontSizeOptions();e<t.length;e++){var n=t[e];this.config.filter&&!this.config.filter(n)||this.addItem(n.key,n.label)}this.settingsManager.fontSize.isSet()&&this.selectItem(this.settingsManager.fontSize.value)},t.prototype.reapplyFilterAndReload=function(){this.populateItemsWithFilter()},t.prototype.configure=function(t,n){var o=this;e.prototype.configure.call(this,t,n),this.settingsManager.fontSize.onChanged.subscribe(function(e,t){t.isSet()?o.toggleOverlayClass("fontsize-"+t.value):o.toggleOverlayClass(null),o.selectItem(t.value)}),this.onItemSelectionChanged.subscribe(function(e,t){o.settingsManager.fontSize.value=t}),this.onShow.subscribe(function(){o.populateItemsWithFilter()}),this.populateItemsWithFilter()},t}(r.SubtitleSettingSelectBox);t.FontSizeSelectBox=a},739:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsToggleButton=void 0;var r=n(2572),s=n(4073),a=n(1971),l=n(5801),c=function(e){function t(t){var n=e.call(this,t)||this;if(n.visibleSettingsPanels=[],!t.settingsPanel)throw new Error("Required SettingsPanel is missing");return n.config=n.mergeConfig(t,{cssClass:"ui-settingstogglebutton",text:l.i18n.getLocalizer("settings"),settingsPanel:null,autoHideWhenNoActiveSettings:!0,role:"pop-up button"},n.config),n.getDomElement().attr("aria-owns",t.settingsPanel.getActivePage().getConfig().id),n.getDomElement().attr("aria-haspopup","true"),n}return i(t,e),t.prototype.configure=function(t,n){var o=this;e.prototype.configure.call(this,t,n);var i=this.getConfig(),r=i.settingsPanel;if(this.onClick.subscribe(function(){r.isShown()||o.visibleSettingsPanels.slice().forEach(function(e){return e.hide()}),r.toggleHidden()}),r.onShow.subscribe(function(){o.on()}),r.onHide.subscribe(function(){o.off()}),n.onComponentShow.subscribe(function(e){e instanceof s.SettingsPanel&&(o.visibleSettingsPanels.push(e),e.onHide.subscribeOnce(function(){return a.ArrayUtils.remove(o.visibleSettingsPanels,e)}))}),i.autoHideWhenNoActiveSettings){var l=function(){r.rootPageHasActiveSettings()?o.isHidden()&&o.show():o.isShown()&&o.hide()};r.onSettingsStateChanged.subscribe(l),l()}},t}(r.ToggleButton);t.SettingsToggleButton=c},796:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AudioTrackListBox=void 0;var r=n(6171),s=n(9367),a=n(1886),l=function(e){function t(t){return e.call(this,{listSelector:new a.AudioTrackSelectBox,title:t})||this}return i(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),new s.AudioTrackSwitchHandler(t,this.config.listSelector,n)},t}(r.ListBox);t.AudioTrackListBox=l},815:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageLoader=void 0;var o=n(323),i=function(){function e(){this.state={}}return e.prototype.load=function(e,t){var n=this;if(this.state[e]){var i=this.state[e];i.loadedCallback=t,i.loaded&&this.callLoadedCallback(i)}else{var r={url:e,image:new o.DOM("img",{}),loadedCallback:t,loaded:!1,width:0,height:0};this.state[e]=r,r.image.on("load",function(e){r.loaded=!0,r.width=r.image.get(0).width,r.height=r.image.get(0).height,n.callLoadedCallback(r)}),r.image.attr("src",r.url)}},e.prototype.callLoadedCallback=function(e){e.loadedCallback(e.url,e.width,e.height)},e}();t.ImageLoader=i},823:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessageOverlay=void 0;var r=n(1779),s=n(8248),a=n(6884),l=n(2414),c=n(2157),u=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.errorLabel=new s.Label({cssClass:"ui-errormessage-label"}),n.tvNoiseBackground=new a.TvNoiseCanvas,n.config=n.mergeConfig(t,{cssClass:"ui-errormessage-overlay",components:[n.tvNoiseBackground,n.errorLabel],hidden:!0,role:"status"},n.config),n}return i(t,e),t.prototype.configure=function(t,n){var o=this;e.prototype.configure.call(this,t,n);var i=this.getConfig(),r=function(e,t){var r=function(e,t){if(e){if("function"==typeof e)return e(t);if(e[t.code]){var n=e[t.code];return"string"==typeof n?n:n(t)}}}(n.getConfig().errorMessages||i.messages,e);r&&(t=r),o.display(t)};if((0,c.isMobileV3PlayerAPI)(t)){var s=function(e){var t=l.ErrorUtils.defaultMobileV3ErrorMessageTranslator(e);r(e,t)};t.on(c.MobileV3PlayerEvent.PlayerError,s),t.on(c.MobileV3PlayerEvent.SourceError,s)}else t.on(t.exports.PlayerEvent.Error,function(e){var t=l.ErrorUtils.defaultWebErrorMessageTranslator(e);r(e,t)});t.on(t.exports.PlayerEvent.SourceLoaded,function(e){o.isShown()&&o.clear()})},t.prototype.display=function(e){this.errorLabel.setText(e),this.tvNoiseBackground.start(),this.show()},t.prototype.clear=function(){this.errorLabel.setText(""),this.tvNoiseBackground.stop(),this.hide()},t.prototype.release=function(){e.prototype.release.call(this),this.clear()},t}(r.Container);t.ErrorMessageOverlay=u},938:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EventDispatcher=void 0;var r=n(1971),s=n(3998),a=function(){function e(){this.listeners=[]}return e.prototype.subscribe=function(e){this.listeners.push(new l(e))},e.prototype.subscribeOnce=function(e){this.listeners.push(new l(e,!0))},e.prototype.subscribeRateLimited=function(e,t){this.listeners.push(new c(e,t))},e.prototype.unsubscribe=function(e){for(var t=0;t<this.listeners.length;t++){var n=this.listeners[t];if(n.listener===e)return n.clear(),r.ArrayUtils.remove(this.listeners,n),!0}return!1},e.prototype.unsubscribeAll=function(){for(var e=0,t=this.listeners;e<t.length;e++)t[e].clear();this.listeners=[]},e.prototype.dispatch=function(e,t){void 0===t&&(t=null);for(var n=[],o=0,i=this.listeners.slice(0);o<i.length;o++){var s=i[o];s.fire(e,t),s.isOnce()&&n.push(s)}for(var a=0,l=n;a<l.length;a++){var c=l[a];r.ArrayUtils.remove(this.listeners,c)}},e.prototype.getEvent=function(){return this},e}();t.EventDispatcher=a;var l=function(){function e(e,t){void 0===t&&(t=!1),this.eventListener=e,this.once=t}return Object.defineProperty(e.prototype,"listener",{get:function(){return this.eventListener},enumerable:!1,configurable:!0}),e.prototype.fire=function(e,t){this.eventListener(e,t)},e.prototype.isOnce=function(){return this.once},e.prototype.clear=function(){},e}(),c=function(e){function t(t,n){var o=e.call(this,t)||this;o.rateMs=n;var i=function(){o.rateLimitTimout.start()};return o.rateLimitTimout=new s.Timeout(o.rateMs,function(){o.lastSeenEvent&&(o.fireSuper(o.lastSeenEvent.sender,o.lastSeenEvent.args),i(),o.lastSeenEvent=null)}),o.rateLimitingEventListener=function(e,t){if(o.shouldFireEvent())return o.fireSuper(e,t),void i();o.lastSeenEvent={sender:e,args:t}},o}return i(t,e),t.prototype.shouldFireEvent=function(){return!this.rateLimitTimout.isActive()},t.prototype.fireSuper=function(t,n){e.prototype.fire.call(this,t,n)},t.prototype.fire=function(e,t){this.rateLimitingEventListener(e,t)},t.prototype.clear=function(){e.prototype.clear.call(this),this.rateLimitTimout.clear()},t}(l)},958:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HugePlaybackToggleButton=void 0;var r=n(4617),s=n(5801),a=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-hugeplaybacktogglebutton",text:s.i18n.getLocalizer("playPause"),role:"button"},n.config),n}return i(t,e),t.prototype.configure=function(t,n){var o=this;e.prototype.configure.call(this,t,n,!1),"boolean"==typeof n.getConfig().enterFullscreenOnInitialPlayback&&(this.config.enterFullscreenOnInitialPlayback=n.getConfig().enterFullscreenOnInitialPlayback);var i=function(){t.isPlaying()||o.isPlayInitiated?t.pause("ui"):t.play("ui")},r=function(){t.getViewMode()===t.exports.ViewMode.Fullscreen?t.setViewMode(t.exports.ViewMode.Inline):t.setViewMode(t.exports.ViewMode.Fullscreen)},s=!0,a=0,l=0;this.onClick.subscribe(function(){if(s)return i(),void(o.config.enterFullscreenOnInitialPlayback&&t.setViewMode(t.exports.ViewMode.Fullscreen));var e=Date.now();return e-a<200?(r(),void(l=e)):e-a<500?(r(),i(),void(l=e)):(a=e,void setTimeout(function(){Date.now()-l>200&&i()},200))}),t.on(t.exports.PlayerEvent.Play,function(){s=!1}),t.on(t.exports.PlayerEvent.Warning,function(e){e.code===t.exports.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(s=!0)});var c=function(){o.setTransitionAnimationsEnabled(!1),o.onToggle.subscribeOnce(function(){o.setTransitionAnimationsEnabled(!0)})};c();var u=t.getConfig().playback&&Boolean(t.getConfig().playback.autoplay),p=!t.getSource()&&u;(t.isPlaying()||p)&&(this.on(),c(),t.on(t.exports.PlayerEvent.Warning,function(e){e.code===t.exports.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&c()}))},t.prototype.setTransitionAnimationsEnabled=function(e){var t=this.prefixCss("no-transition-animations");e?this.getDomElement().removeClass(t):this.getDomElement().hasClass(t)||this.getDomElement().addClass(t)},t}(r.PlaybackToggleButton);t.HugePlaybackToggleButton=a},1015:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleListBox=void 0;var r=n(6171),s=n(1436),a=n(5277),l=function(e){function t(t){return e.call(this,{listSelector:new a.SubtitleSelectBox,title:t})||this}return i(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),new s.SubtitleSwitchHandler(t,this.config.listSelector,n)},t}(r.ListBox);t.SubtitleListBox=l},1291:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CastToggleButton=void 0;var r=n(2572),s=n(5801),a=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-casttogglebutton",text:s.i18n.getLocalizer("googleCast")},n.config),n}return i(t,e),t.prototype.configure=function(t,n){var o=this;e.prototype.configure.call(this,t,n),this.onClick.subscribe(function(){t.isCastAvailable()?t.isCasting()?t.castStop():t.castVideo():console&&console.log("Cast unavailable")});var i=function(){t.isCastAvailable()?o.show():o.hide()};t.on(t.exports.PlayerEvent.CastAvailable,i),t.on(t.exports.PlayerEvent.CastWaitingForDevice,function(){o.on()}),t.on(t.exports.PlayerEvent.CastStarted,function(){o.on()}),t.on(t.exports.PlayerEvent.CastStopped,function(){o.off()}),i(),t.isCasting()&&this.on()},t}(r.ToggleButton);t.CastToggleButton=a},1308:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HugeReplayButton=void 0;var r=n(9404),s=n(5801),a=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-hugereplaybutton",text:s.i18n.getLocalizer("replay")},n.config),n}return i(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),this.onClick.subscribe(function(){t.play("ui")})},t}(r.Button);t.HugeReplayButton=a},1315:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toHtmlElement=function(e){return e.getDomElement().get(0)}},1321:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FontStyleSelectBox=void 0;var r=n(8091),s=n(5801),a=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitle-settings-font-style-select-box"]},n.config),n}return i(t,e),t.prototype.configure=function(t,n){var o,i,r=this;e.prototype.configure.call(this,t,n),this.addItem(null,s.i18n.getLocalizer("default")),this.addItem("italic",s.i18n.getLocalizer("settings.subtitles.font.style.italic")),this.addItem("bold",s.i18n.getLocalizer("settings.subtitles.font.style.bold")),null===(o=this.settingsManager)||void 0===o||o.fontStyle.onChanged.subscribe(function(e,t){t.isSet()?r.toggleOverlayClass("fontstyle-"+t.value):r.toggleOverlayClass(null),r.selectItem(t.value)}),this.onItemSelectionChanged.subscribe(function(e,t){r.settingsManager&&(r.settingsManager.fontStyle.value=t)}),(null===(i=this.settingsManager)||void 0===i?void 0:i.fontStyle.isSet())&&this.selectItem(this.settingsManager.fontStyle.value)},t}(r.SubtitleSettingSelectBox);t.FontStyleSelectBox=a},1368:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TouchControlOverlay=void 0;var r=n(1779),s=n(5092),a=n(938),l=n(3998),c=n(8248),u=n(5801),p=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.SEEK_FORWARD_CLASS="seek-forward",n.SEEK_BACKWARD_CLASS="seek-backward",n.touchControlEvents={onSingleClick:new a.EventDispatcher,onDoubleClick:new a.EventDispatcher,onSeekBackward:new a.EventDispatcher,onSeekForward:new a.EventDispatcher},n.playbackToggleButton=new s.SmallCenteredPlaybackToggleButton({enterFullscreenOnInitialPlayback:Boolean(t.enterFullscreenOnInitialPlayback)}),n.seekForwardLabel=new c.Label({text:"",for:n.getConfig().id,cssClass:"seek-forward-label",hidden:!0}),n.seekBackwardLabel=new c.Label({text:"",for:n.getConfig().id,cssClass:"seek-backward-label",hidden:!0}),n.config=n.mergeConfig(t,{cssClass:"ui-touch-control-overlay",acceptsTouchWithUiHidden:!0,seekTime:10,seekDoubleTapMargin:15,seekDoubleTapTimeout:200,components:[n.seekBackwardLabel,n.playbackToggleButton,n.seekForwardLabel]},n.config),n}return i(t,e),t.prototype.configure=function(n,o){var i=this;e.prototype.configure.call(this,n,o);var r=0,s=0;this.doubleTapTimeout=new l.Timeout(this.config.seekDoubleTapTimeout,function(){i.couldBeDoubleTapping=!1,s=0,setTimeout(function(){return i.hideSeekAnimationElements()},150)});var a=!1,c=!1,p=function(){i.playbackToggleButton.show()},f=function(){i.playbackToggleButton.hide()};o.onBufferingShow.subscribe(function(){a=!0,f()}),o.onBufferingHide.subscribe(function(){a=!1,c&&p()}),o.onControlsHide.subscribe(function(){c=!1,f()}),o.onControlsShow.subscribe(function(){c=!0,a||p()}),this.touchControlEvents.onSeekBackward.subscribe(function(){r-=i.config.seekTime,n.seek(r),i.seekBackwardLabel.setText(Math.abs(Math.round(r-s))+" "+u.i18n.performLocalization(u.i18n.getLocalizer("settings.time.seconds"))),i.seekBackwardLabel.show(),i.getDomElement().addClass(i.prefixCss(i.SEEK_BACKWARD_CLASS)),i.seekForwardLabel.hide(),i.getDomElement().removeClass(i.prefixCss(i.SEEK_FORWARD_CLASS))}),this.touchControlEvents.onSeekForward.subscribe(function(){r+=i.config.seekTime,n.seek(r),i.seekForwardLabel.setText(Math.abs(Math.round(r-s))+" "+u.i18n.performLocalization(u.i18n.getLocalizer("settings.time.seconds"))),i.seekForwardLabel.show(),i.getDomElement().addClass(i.prefixCss(i.SEEK_FORWARD_CLASS)),i.seekBackwardLabel.hide(),i.getDomElement().removeClass(i.prefixCss(i.SEEK_BACKWARD_CLASS))}),this.touchControlEvents.onSingleClick.subscribe(function(e,t){o.getUI().toggleUiShown(),r=n.getCurrentTime(),s=r;var a=t.target.getBoundingClientRect(),l=t.clientX-a.left,c=t.clientY-a.top;i.latestTapPosition={x:l,y:c}}),this.touchControlEvents.onDoubleClick.subscribe(function(e,n){o.getUI().hideUi();var r=n.target;if(r&&r.component instanceof t){var s=r.clientWidth,a=.4*s,l=r.getBoundingClientRect(),c=n.clientX-l.left,u=n.clientY-l.top,p=i.config.seekDoubleTapMargin;Math.abs(i.latestTapPosition.x-c)<=p&&Math.abs(i.latestTapPosition.y-u)<=p&&(c<a?i.touchControlEvents.onSeekBackward.dispatch(i):c>s-a&&i.touchControlEvents.onSeekForward.dispatch(i)),i.latestTapPosition={x:c,y:u}}}),this.getDomElement().on("click",function(e){e.target.component instanceof t&&d(e)});var d=function(e){i.couldBeDoubleTapping?i.onDoubleClickEvent(e):i.onSingleClickEvent(e),i.couldBeDoubleTapping=!0,i.doubleTapTimeout.start()}},t.prototype.hideSeekAnimationElements=function(){this.getDomElement().removeClass(this.prefixCss(this.SEEK_FORWARD_CLASS)),this.getDomElement().removeClass(this.prefixCss(this.SEEK_BACKWARD_CLASS)),this.seekForwardLabel.hide(),this.seekBackwardLabel.hide()},t.prototype.onDoubleClickEvent=function(e){this.touchControlEvents.onDoubleClick.dispatch(this,e)},t.prototype.onSingleClickEvent=function(e){this.touchControlEvents.onSingleClick.dispatch(this,e)},Object.defineProperty(t.prototype,"onClick",{get:function(){return this.touchControlEvents.onSingleClick.getEvent()},enumerable:!1,configurable:!0}),t}(r.Container);t.TouchControlOverlay=p},1436:function(e,t,n){"use strict";var o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleSwitchHandler=void 0;var i=n(5801),r=function(){function e(t,n,r){var s=this;this.addSubtitle=function(e){var t=e.subtitle;s.listElement.hasItem(t.id)||s.listElement.addItem(t.id,t.label)},this.removeSubtitle=function(e){var t=e.subtitle;s.listElement.hasItem(t.id)&&s.listElement.removeItem(t.id),s.selectCurrentSubtitle()},this.selectCurrentSubtitle=function(){if(s.player.subtitles){var t=s.player.subtitles.list().filter(function(e){return e.enabled}).pop();s.listElement.selectItem(t?t.id:e.SUBTITLES_OFF_KEY)}},this.clearSubtitles=function(){s.listElement.clearItems()},this.refreshSubtitles=function(){if(s.player.subtitles){var t={key:e.SUBTITLES_OFF_KEY,label:i.i18n.getLocalizer("off")},n=s.player.subtitles.list();s.listElement.synchronizeItems(o([t],n.map(function(e){return{key:e.id,label:e.label}}),!0)),s.selectCurrentSubtitle()}},this.player=t,this.listElement=n,this.uimanager=r,this.bindSelectionEvent(),this.bindPlayerEvents(),this.refreshSubtitles()}return e.prototype.bindSelectionEvent=function(){var t=this;this.listElement.onItemSelectionChanged.subscribe(function(n,o){if(o===e.SUBTITLES_OFF_KEY){var i=t.player.subtitles.list().filter(function(e){return e.enabled}).pop();i&&t.player.subtitles.disable(i.id)}else t.player.subtitles.enable(o,!0)})},e.prototype.bindPlayerEvents=function(){this.player.on(this.player.exports.PlayerEvent.SubtitleAdded,this.addSubtitle),this.player.on(this.player.exports.PlayerEvent.SubtitleEnabled,this.selectCurrentSubtitle),this.player.on(this.player.exports.PlayerEvent.SubtitleDisabled,this.selectCurrentSubtitle),this.player.on(this.player.exports.PlayerEvent.SubtitleRemoved,this.removeSubtitle),this.player.on(this.player.exports.PlayerEvent.SourceUnloaded,this.clearSubtitles),this.player.on(this.player.exports.PlayerEvent.PeriodSwitched,this.refreshSubtitles),this.uimanager.getConfig().events.onUpdated.subscribe(this.refreshSubtitles)},e.SUBTITLES_OFF_KEY="null",e}();t.SubtitleSwitchHandler=r},1742:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanelItem=void 0;var r=n(1779),s=n(5955),a=n(938),l=n(8248),c=n(6441),u=n(6448),p=n(9523),f=n(6541),d=function(e){function t(t){var n=e.call(this,t)||this;n.settingsPanelItemEvents={onActiveChanged:new a.EventDispatcher},n.settingComponent=t.settingComponent,n.config=n.mergeConfig(t,{cssClass:"ui-settings-panel-item",role:"menuitem",addSettingAsComponent:!0,isSetting:!0,labelStyle:l.LabelStyle.Text},n.config);var o=t.label;return null!==o&&(o instanceof s.Component?n.label=o:n.label=new l.Label({text:o,labelStyle:t.labelStyle}),n.addComponent(n.label)),n}return i(t,e),t.prototype.configure=function(t,n){var o=this;if(e.prototype.configure.call(this,t,n),null!=this.settingComponent&&this.config.addSettingAsComponent&&(this.addComponent(this.settingComponent),this.updateComponents()),this.settingComponent instanceof f.ListSelector){var i=function(){if(o.settingComponent instanceof f.ListSelector){var e=2;(o.settingComponent instanceof c.VideoQualitySelectBox&&o.settingComponent.hasAutoItem()||o.settingComponent instanceof u.AudioQualitySelectBox)&&(e=3),o.settingComponent.itemCount()<e||o.settingComponent instanceof p.PlaybackSpeedSelectBox&&!n.getConfig().playbackSpeedSelectionEnabled?o.hide():o.show(),o.onActiveChangedEvent(),o.getDomElement().attr("aria-haspopup","true")}};this.settingComponent.onItemAdded.subscribe(i),this.settingComponent.onItemRemoved.subscribe(i),i()}},t.prototype.isActive=function(){return this.isShown()},t.prototype.onActiveChangedEvent=function(){this.settingsPanelItemEvents.onActiveChanged.dispatch(this)},Object.defineProperty(t.prototype,"onActiveChanged",{get:function(){return this.settingsPanelItemEvents.onActiveChanged.getEvent()},enumerable:!1,configurable:!0}),t}(r.Container);t.SettingsPanelItem=d},1758:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerWrapper=t.UIInstanceManager=t.UIManager=void 0;var a=n(6233),l=n(323),c=n(1779),u=n(938),p=n(3226),f=n(1971),d=n(5256),g=n(1767),h=n(5801),v=n(8101),y=n(2157),m=n(7885),b=n(8919),C=n(7682),S=function(){function e(e,t,n){void 0===n&&(n={});var o=this;if(this.events={onUiVariantResolve:new u.EventDispatcher,onActiveUiChanged:new u.EventDispatcher},t instanceof a.UIContainer){var i=t,s=[];s.push({ui:i}),this.uiVariants=s}else this.uiVariants=t;this.subtitleSettingsManager=new m.SubtitleSettingsManager,this.shadowDomManager=new C.ShadowDomManager,this.player=e,this.managerPlayerWrapper=new E(e),n.metadata=n.metadata?n.metadata:{},this.config=r(r({playbackSpeedSelectionEnabled:!0,autoUiVariantResolve:!0,disableAutoHideWhenHovered:!1,enableSeekPreview:!0,shadowDom:!1},n),{events:{onUpdated:new u.EventDispatcher},volumeController:new g.VolumeController(this.managerPlayerWrapper.getPlayer())});var c=function(){var t=e.getSource()||{};o.config.metadata=JSON.parse(JSON.stringify(n.metadata||{}));var i={metadata:{title:t.title,description:t.description,markers:t.markers,recommendations:t.recommendations}};o.config.metadata.title=i.metadata.title||n.metadata.title,o.config.metadata.description=i.metadata.description||n.metadata.description,o.config.metadata.markers=i.metadata.markers||n.metadata.markers||[],o.config.metadata.recommendations=i.metadata.recommendations||n.metadata.recommendations||[],b.StorageUtils.setStorageApiDisabled(n)};c(),this.subtitleSettingsManager.initialize();var p=function(){c(),o.config.events.onUpdated.dispatch(o)},f=this.managerPlayerWrapper.getPlayer();f.on(this.player.exports.PlayerEvent.SourceLoaded,p),(0,y.isMobileV3PlayerAPI)(f)&&f.on(y.MobileV3PlayerEvent.PlaylistTransition,p),n.container?this.uiContainerElement=(n.container,HTMLElement,new l.DOM(n.container)):this.uiContainerElement=new l.DOM(e.getContainer()),(1==this.config.shadowDom||this.config.shadowDom&&this.config.shadowDom.enabled)&&(C.ShadowDomManager.isShadowDomSupported()?this.shadowDomManager.initialize(this.uiContainerElement,!0===this.config.shadowDom?{enabled:!0}:this.config.shadowDom):console.warn("Shadow DOM is not supported in this environment. Falling back to classic UI rendering.")),this.uiInstanceManagers=[];for(var d=[],h=0,S=this.uiVariants;h<S.length;h++){var P=S[h];null==P.condition&&d.push(P),this.uiInstanceManagers.push(new w(e,P.ui,this.config,this.subtitleSettingsManager,this.uiWrapperElement,P.spatialNavigation))}if(d.length>1)throw Error("Too many UIs without a condition: You cannot have more than one default UI");if(d.length>0&&d[0]!==this.uiVariants[this.uiVariants.length-1])throw Error("Invalid UI variant order: the default UI (without condition) must be at the end of the list");var _=null,O=null!=e.getSource();e.on(e.exports.PlayerEvent.SourceLoaded,function(){O=!0}),e.on(e.exports.PlayerEvent.SourceUnloaded,function(){O=!1});var k=function(t){if(null!=t)switch(t.type){case e.exports.PlayerEvent.AdStarted:_=t;break;case e.exports.PlayerEvent.AdBreakFinished:_=null,o.config.events.onUpdated.dispatch(o);break;case e.exports.PlayerEvent.SourceLoaded:case e.exports.PlayerEvent.SourceUnloaded:_=null}var n=null!=_,i=!1;if(n){var r=_.ad;if(r.isLinear){var s=r;i=s.uiConfig&&s.uiConfig.requestsUi||!1}}i&&o.config.events.onUpdated.dispatch(o),o.resolveUiVariant({isAd:n,adRequiresUi:i,isSourceLoaded:O},function(e){e.isAd&&o.currentUi.getWrappedPlayer().fireEventInUI(o.player.exports.PlayerEvent.AdStarted,_)})};this.config.autoUiVariantResolve&&(this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.SourceLoaded,k),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.SourceUnloaded,k),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.Play,k),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.Paused,k),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.Playing,k),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.AdStarted,k),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.AdBreakFinished,k),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.PlayerResized,k),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.ViewModeChanged,k)),this.focusVisibilityTracker=new v.FocusVisibilityTracker("bmpui",this.uiWrapperElement),k(null)}return e.localize=function(e){return h.i18n.getLocalizer(e)},e.setLocalizationConfig=function(e){h.i18n.setConfig(e)},e.prototype.getSubtitleSettingsManager=function(){return this.subtitleSettingsManager},e.prototype.getConfig=function(){return this.config},e.prototype.getUiVariants=function(){return this.uiVariants},e.prototype.switchToUiVariant=function(e,t){var n=this.uiVariants.indexOf(e),o=this.currentUi,i=this.uiInstanceManagers[n];i!==this.currentUi&&(this.currentUi&&this.currentUi.getUI().hide(),this.currentUi=i,null!=this.currentUi&&(this.currentUi.isConfigured()||(this.addUi(this.currentUi),this.currentUi.getUI().isHidden()||this.currentUi.getUI().hide()),t&&t(),this.currentUi.getUI().show(),this.events.onActiveUiChanged.dispatch(this,{previousUi:o,currentUi:i})))},e.prototype.resolveUiVariant=function(e,t){void 0===e&&(e={});var n={isAd:!1,adRequiresUi:!1,isFullscreen:this.player.getViewMode()===this.player.exports.ViewMode.Fullscreen,isMobile:d.BrowserUtils.isMobile,isTv:d.BrowserUtils.isTv,isPlaying:this.player.isPlaying(),isSourceLoaded:!1,width:this.uiContainerElement.width(),documentWidth:document.body.clientWidth},o=r(r({},n),e);this.events.onUiVariantResolve.dispatch(this,o);for(var i=null,s=0,a=this.uiVariants;s<a.length;s++){var l=a[s],c=null==l.condition||!0===l.condition(o);null==i&&c?i=l:l.ui.hide()}this.switchToUiVariant(i,function(){t&&t(o)})},Object.defineProperty(e.prototype,"uiWrapperElement",{get:function(){var e=this.shadowDomManager.getShadowRoot();return null!=e?new l.DOM(e):this.uiContainerElement},enumerable:!1,configurable:!0}),e.prototype.addUi=function(e){var t=e.getUI().getDomElement(),n=e.getWrappedPlayer();e.configureControls(),this.uiWrapperElement.append(t),n.getSource()&&this.config.events.onUpdated.dispatch(this),window.requestAnimationFrame?requestAnimationFrame(function(){e.onConfigured.dispatch(e.getUI())}):setTimeout(function(){e.onConfigured.dispatch(e.getUI())},0)},e.prototype.releaseUi=function(e){e.releaseControls();var t=e.getUI();t.hasDomElement()&&t.getDomElement().remove(),e.clearEventHandlers()},e.prototype.release=function(){for(var e=0,t=this.uiInstanceManagers;e<t.length;e++){var n=t[e];this.releaseUi(n)}this.managerPlayerWrapper.clearEventHandlers(),this.focusVisibilityTracker.release(),this.shadowDomManager.release()},Object.defineProperty(e.prototype,"onUiVariantResolve",{get:function(){return this.events.onUiVariantResolve},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onActiveUiChanged",{get:function(){return this.events.onActiveUiChanged},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeUi",{get:function(){return this.currentUi},enumerable:!1,configurable:!0}),e.prototype.getTimelineMarkers=function(){return this.config.metadata.markers},e.prototype.addTimelineMarker=function(e){this.config.metadata.markers.push(e),this.config.events.onUpdated.dispatch(this)},e.prototype.removeTimelineMarker=function(e){return f.ArrayUtils.remove(this.config.metadata.markers,e)===e&&(this.config.events.onUpdated.dispatch(this),!0)},e}();t.UIManager=S;var P=function(){function e(e,t,n,o,i,r){this.events={onConfigured:new u.EventDispatcher,onSeek:new u.EventDispatcher,onSeekPreview:new u.EventDispatcher,onSeeked:new u.EventDispatcher,onComponentShow:new u.EventDispatcher,onComponentHide:new u.EventDispatcher,onComponentViewModeChanged:new u.EventDispatcher,onControlsShow:new u.EventDispatcher,onPreviewControlsHide:new u.EventDispatcher,onControlsHide:new u.EventDispatcher,onRelease:new u.EventDispatcher,onBufferingShow:new u.EventDispatcher,onBufferingHide:new u.EventDispatcher},this.playerWrapper=new E(e),this.ui=t,this.config=n,this.subtitleSettingsManager=o,this.uiWrapperElement=i,this.spatialNavigation=r}return e.prototype.getSubtitleSettingsManager=function(){return this.subtitleSettingsManager},e.prototype.getConfig=function(){return this.config},e.prototype.getUI=function(){return this.ui},e.prototype.getPlayer=function(){return this.playerWrapper.getPlayer()},Object.defineProperty(e.prototype,"onConfigured",{get:function(){return this.events.onConfigured},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSeek",{get:function(){return this.events.onSeek},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSeekPreview",{get:function(){return this.events.onSeekPreview},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSeeked",{get:function(){return this.events.onSeeked},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComponentShow",{get:function(){return this.events.onComponentShow},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComponentHide",{get:function(){return this.events.onComponentHide},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onControlsShow",{get:function(){return this.events.onControlsShow},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onPreviewControlsHide",{get:function(){return this.events.onPreviewControlsHide},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onControlsHide",{get:function(){return this.events.onControlsHide},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBufferingShow",{get:function(){return this.events.onBufferingShow},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBufferingHide",{get:function(){return this.events.onBufferingHide},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRelease",{get:function(){return this.events.onRelease},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComponentViewModeChanged",{get:function(){return this.events.onComponentViewModeChanged},enumerable:!1,configurable:!0}),e.prototype.clearEventHandlers=function(){this.playerWrapper.clearEventHandlers();var e=this.events;for(var t in e)e[t].unsubscribeAll()},e}();t.UIInstanceManager=P;var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getWrappedPlayer=function(){return this.getPlayer()},t.prototype.configureControls=function(){this.configureControlsTree(this.getUI()),this.configured=!0},t.prototype.isConfigured=function(){return this.configured},t.prototype.configureControlsTree=function(e){var t=this,n=[];p.UIUtils.traverseTree(e,function(e){for(var o=0,i=n;o<i.length;o++)if(i[o]===e)throw console&&console.error("Circular reference in UI tree",e),Error("Circular reference in UI tree: "+e.constructor.name);e.initialize(),e.configure(t.getPlayer(),t),n.push(e)})},t.prototype.releaseControls=function(){var e;this.configured&&(this.onRelease.dispatch(this.getUI()),this.releaseControlsTree(this.getUI()),this.configured=!1),null===(e=this.spatialNavigation)||void 0===e||e.release(),this.released=!0},t.prototype.isReleased=function(){return this.released},t.prototype.releaseControlsTree=function(e){if(e.release(),e instanceof c.Container)for(var t=0,n=e.getComponents();t<n.length;t++){var o=n[t];this.releaseControlsTree(o)}},t.prototype.clearEventHandlers=function(){e.prototype.clearEventHandlers.call(this)},t}(P),E=function(){function e(e){var t=this;this.eventHandlers={},this.player=e;for(var n=Object.getOwnPropertyNames(Object.getPrototypeOf({})),o=s(["constructor"],n,!0),i=[],r=[],a=0,l=function(e){for(var t=[];e;){var n=Object.getOwnPropertyNames(e).filter(function(e){return-1===t.indexOf(e)});t=t.concat(n),e=Object.getPrototypeOf(e)}return t}(e).filter(function(e){return-1===o.indexOf(e)});a<l.length;a++){var c=l[a];"function"==typeof e[c]?i.push(c):r.push(c)}for(var u={},p=function(t){u[t]=function(){return e[t].apply(e,arguments)}},d=0,g=i;d<g.length;d++)p(g[d]);for(var h=function(t){var n=function(e){for(;e;){var n=Object.getOwnPropertyDescriptor(e,t);if(n)return n;e=Object.getPrototypeOf(e)}}(e);n&&(n.get||n.set)?Object.defineProperty(u,t,{get:function(){return n.get.call(e)},set:function(t){return n.set.call(e,t)}}):u[t]=e[t]},v=0,y=r;v<y.length;v++)h(y[v]);u.on=function(n,o){return e.on(n,o),t.eventHandlers[n]||(t.eventHandlers[n]=[]),t.eventHandlers[n].push(o),u},u.off=function(n,o){return e.off(n,o),t.eventHandlers[n]&&f.ArrayUtils.remove(t.eventHandlers[n],o),u},u.fireEventInUI=function(e,n){if(t.eventHandlers[e])for(var o=Object.assign({},{timestamp:Date.now(),type:e,uiSourced:!0},n),i=0,r=t.eventHandlers[e];i<r.length;i++)(0,r[i])(o)},this.wrapper=u}return e.prototype.getPlayer=function(){return this.wrapper},e.prototype.clearEventHandlers=function(){try{this.player.getSource()}catch(e){e instanceof this.player.exports.PlayerAPINotAvailableError&&(this.eventHandlers={})}for(var e in this.eventHandlers)for(var t=0,n=this.eventHandlers[e];t<n.length;t++){var o=n[t];this.player.off(e,o)}},e}();t.PlayerWrapper=E},1767:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VolumeTransition=t.VolumeController=void 0;var o=n(938),i=function(){function e(e){var t=this;this.player=e,this.events={onChanged:new o.EventDispatcher},this.storeVolume();var n=function(){t.onChangedEvent()};e.on(e.exports.PlayerEvent.SourceLoaded,n),e.on(e.exports.PlayerEvent.VolumeChanged,n),e.on(e.exports.PlayerEvent.Muted,n),e.on(e.exports.PlayerEvent.Unmuted,n)}return e.prototype.setVolume=function(t){this.player.setVolume(t,e.issuerName)},e.prototype.getVolume=function(){return this.player.getVolume()},e.prototype.setMuted=function(t){t?this.player.mute(e.issuerName):this.player.unmute(e.issuerName)},e.prototype.toggleMuted=function(){this.isMuted()||0===this.getVolume()?this.recallVolume():this.setMuted(!0)},e.prototype.isMuted=function(){return this.player.isMuted()},e.prototype.storeVolu